hi-ucs/front/public/leaflet/libs/mapbox-gl-js/mapbox-gl.js.map

1 line
2.2 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["node_modules/browser-pack/_prelude.js","package.json","src/style-spec/reference/v8.json","node_modules/@mapbox/geojson-area/index.js","node_modules/@mapbox/gl-matrix/dist/gl-matrix.js","node_modules/@mapbox/mapbox-gl-supported/index.js","node_modules/@mapbox/point-geometry/index.js","node_modules/@mapbox/shelf-pack/index.umd.js","node_modules/@mapbox/tiny-sdf/index.js","node_modules/@mapbox/unitbezier/index.js","node_modules/@mapbox/vector-tile/index.js","node_modules/@mapbox/vector-tile/lib/vectortile.js","node_modules/@mapbox/vector-tile/lib/vectortilefeature.js","node_modules/@mapbox/vector-tile/lib/vectortilelayer.js","node_modules/@mapbox/whoots-js/index.umd.js","node_modules/earcut/src/earcut.js","node_modules/geojson-rewind/index.js","node_modules/geojson-vt/src/clip.js","node_modules/geojson-vt/src/convert.js","node_modules/geojson-vt/src/feature.js","node_modules/geojson-vt/src/index.js","node_modules/geojson-vt/src/simplify.js","node_modules/geojson-vt/src/tile.js","node_modules/geojson-vt/src/transform.js","node_modules/geojson-vt/src/wrap.js","node_modules/grid-index/grid-index.js","node_modules/ieee754/index.js","node_modules/kdbush/src/kdbush.js","node_modules/kdbush/src/range.js","node_modules/kdbush/src/sort.js","node_modules/kdbush/src/within.js","node_modules/pbf/index.js","node_modules/process/browser.js","node_modules/quickselect/index.js","node_modules/supercluster/index.js","node_modules/tinyqueue/index.js","node_modules/util/node_modules/inherits/inherits_browser.js","node_modules/util/support/isBufferBrowser.js","node_modules/util/util.js","node_modules/vt-pbf/index.js","node_modules/vt-pbf/lib/geojson_wrapper.js","node_modules/webworkify/index.js","node_modules/wgs84/index.js","src/data/array_types.js","src/data/bucket.js","src/data/bucket/circle_attributes.js","src/data/bucket/circle_bucket.js","src/data/bucket/fill_bucket.js","src/data/bucket/fill_extrusion_attributes.js","src/data/bucket/fill_extrusion_bucket.js","src/data/bucket/heatmap_bucket.js","src/data/bucket/line_attributes.js","src/data/bucket/line_bucket.js","src/data/bucket/symbol_attributes.js","src/data/bucket/symbol_bucket.js","src/data/dem_data.js","src/data/extent.js","src/data/feature_index.js","src/data/index_array_type.js","src/data/load_geometry.js","src/data/pos_attributes.js","src/data/program_configuration.js","src/data/raster_bounds_attributes.js","src/data/segment.js","src/geo/coordinate.js","src/geo/lng_lat.js","src/geo/lng_lat_bounds.js","src/geo/transform.js","src/gl/color_mode.js","src/gl/context.js","src/gl/depth_mode.js","src/gl/framebuffer.js","src/gl/index_buffer.js","src/gl/stencil_mode.js","src/gl/value.js","src/gl/vertex_buffer.js","src/index.js","src/render/draw_background.js","src/render/draw_circle.js","src/render/draw_collision_debug.js","src/render/draw_debug.js","src/render/draw_fill.js","src/render/draw_fill_extrusion.js","src/render/draw_heatmap.js","src/render/draw_hillshade.js","src/render/draw_line.js","src/render/draw_raster.js","src/render/draw_symbol.js","src/render/glyph_atlas.js","src/render/glyph_manager.js","src/render/image_atlas.js","src/render/image_manager.js","src/render/line_atlas.js","src/render/painter.js","src/render/pattern.js","src/render/program.js","src/render/texture.js","src/render/tile_mask.js","src/render/vertex_array_object.js","src/shaders/encode_attribute.js","src/shaders/index.js","src/source/canvas_source.js","src/source/geojson_source.js","src/source/geojson_worker_source.js","src/source/geojson_wrapper.js","src/source/image_source.js","src/source/load_tilejson.js","src/source/pixels_to_tile_units.js","src/source/query_features.js","src/source/raster_dem_tile_source.js","src/source/raster_dem_tile_worker_source.js","src/source/raster_tile_source.js","src/source/rtl_text_plugin.js","src/source/source.js","src/source/source_cache.js","src/source/tile.js","src/source/tile_bounds.js","src/source/tile_id.js","src/source/vector_tile_source.js","src/source/vector_tile_worker_source.js","src/source/video_source.js","src/source/worker.js","src/source/worker_tile.js","src/style-spec/deref.js","src/style-spec/diff.js","src/style-spec/error/validation_error.js","src/style-spec/expression/compound_expression.js","src/style-spec/expression/definitions/array.js","src/style-spec/expression/definitions/assertion.js","src/style-spec/expression/definitions/at.js","src/style-spec/expression/definitions/case.js","src/style-spec/expression/definitions/coalesce.js","src/style-spec/expression/definitions/coercion.js","src/style-spec/expression/definitions/equals.js","src/style-spec/expression/definitions/index.js","src/style-spec/expression/definitions/interpolate.js","src/style-spec/expression/definitions/let.js","src/style-spec/expression/definitions/literal.js","src/style-spec/expression/definitions/match.js","src/style-spec/expression/definitions/step.js","src/style-spec/expression/definitions/var.js","src/style-spec/expression/evaluation_context.js","src/style-spec/expression/index.js","src/style-spec/expression/is_constant.js","src/style-spec/expression/parsing_context.js","src/style-spec/expression/parsing_error.js","src/style-spec/expression/runtime_error.js","src/style-spec/expression/scope.js","src/style-spec/expression/stops.js","src/style-spec/expression/types.js","src/style-spec/expression/values.js","src/style-spec/feature_filter/index.js","src/style-spec/function/index.js","src/style-spec/group_by_layout.js","src/style-spec/node_modules/csscolorparser/csscolorparser.js","src/style-spec/node_modules/lodash._baseisequal/index.js","src/style-spec/node_modules/lodash._bindcallback/index.js","src/style-spec/node_modules/lodash._getnative/index.js","src/style-spec/node_modules/lodash.isarguments/index.js","src/style-spec/node_modules/lodash.isarray/index.js","src/style-spec/node_modules/lodash.isequal/index.js","src/style-spec/node_modules/lodash.istypedarray/index.js","src/style-spec/node_modules/lodash.keys/index.js","src/style-spec/reference/latest.js","src/style-spec/util/color.js","src/style-spec/util/color_spaces.js","src/style-spec/util/extend.js","src/style-spec/util/get_type.js","src/style-spec/util/interpolate.js","src/style-spec/util/ref_properties.js","src/style-spec/util/result.js","src/style-spec/util/unbundle_jsonlint.js","src/style-spec/validate/validate.js","src/style-spec/validate/validate_array.js","src/style-spec/validate/validate_boolean.js","src/style-spec/validate/validate_color.js","src/style-spec/validate/validate_constants.js","src/style-spec/validate/validate_enum.js","src/style-spec/validate/validate_expression.js","src/style-spec/validate/validate_filter.js","src/style-spec/validate/validate_function.js","src/style-spec/validate/validate_glyphs_url.js","src/style-spec/validate/validate_layer.js","src/style-spec/validate/validate_layout_property.js","src/style-spec/validate/validate_light.js","src/style-spec/validate/validate_number.js","src/style-spec/validate/validate_object.js","src/style-spec/validate/validate_paint_property.js","src/style-spec/validate/validate_property.js","src/style-spec/validate/validate_source.js","src/style-spec/validate/validate_string.js","src/style-spec/validate_style.min.js","src/style/evaluation_parameters.js","src/style/light.js","src/style/load_glyph_range.js","src/style/load_sprite.js","src/style/parse_glyph_pbf.js","src/style/placement.js","src/style/properties.js","src/style/query_utils.js","src/style/style.js","src/style/style_layer.js","src/style/style_layer/background_style_layer.js","src/style/style_layer/background_style_layer_properties.js","src/style/style_layer/circle_style_layer.js","src/style/style_layer/circle_style_layer_properties.js","src/style/style_layer/fill_extrusion_style_layer.js","src/style/style_layer/fill_extrusion_style_layer_properties.js","src/style/style_layer/fill_style_layer.js","src/style/style_layer/fill_style_layer_properties.js","src/style/style_layer/heatmap_style_layer.js","src/style/style_layer/heatmap_style_layer_properties.js","src/style/style_layer/hillshade_style_layer.js","src/style/style_layer/hillshade_style_layer_properties.js","src/style/style_layer/line_style_layer.js","src/style/style_layer/line_style_layer_properties.js","src/style/style_layer/raster_style_layer.js","src/style/style_layer/raster_style_layer_properties.js","src/style/style_layer/symbol_style_layer.js","src/style/style_layer/symbol_style_layer_properties.js","src/style/style_layer_index.js","src/style/validate_style.js","src/style/zoom_history.js","src/symbol/anchor.js","src/symbol/check_max_angle.js","src/symbol/clip_line.js","src/symbol/collision_feature.js","src/symbol/collision_index.js","src/symbol/cross_tile_symbol_index.js","src/symbol/get_anchors.js","src/symbol/grid_index.js","src/symbol/mergelines.js","src/symbol/opacity_state.js","src/symbol/projection.js","src/symbol/quads.js","src/symbol/shaping.js","src/symbol/symbol_layout.js","src/symbol/symbol_placement.js","src/symbol/symbol_size.js","src/symbol/transform_text.js","src/ui/bind_handlers.js","src/ui/camera.js","src/ui/control/attribution_control.js","src/ui/control/fullscreen_control.js","src/ui/control/geolocate_control.js","src/ui/control/logo_control.js","src/ui/control/navigation_control.js","src/ui/control/scale_control.js","src/ui/handler/box_zoom.js","src/ui/handler/dblclick_zoom.js","src/ui/handler/drag_pan.js","src/ui/handler/drag_rotate.js","src/ui/handler/keyboard.js","src/ui/handler/scroll_zoom.js","src/ui/handler/touch_zoom_rotate.js","src/ui/hash.js","src/ui/map.js","src/ui/marker.js","src/ui/popup.js","src/util/actor.js","src/util/ajax.js","src/util/browser.js","src/util/browser/web_worker.js","src/util/browser/window.js","src/util/classify_rings.js","src/util/config.js","src/util/dictionary_coder.js","src/util/dispatcher.js","src/util/dom.js","src/util/evented.js","src/util/find_pole_of_inaccessibility.js","src/util/global_worker_pool.js","src/util/image.js","src/util/intersection_tests.js","src/util/is_char_in_unicode_block.js","src/util/lru_cache.js","src/util/mapbox.js","src/util/script_detection.js","src/util/smart_wrap.js","src/util/struct_array.js","src/util/throttle.js","src/util/tile_cover.js","src/util/token.js","src/util/util.js","src/util/vectortile_to_geojson.js","src/util/verticalize_punctuation.js","src/util/web_worker_transfer.js","src/util/worker_pool.js"],"names":["geometry","_","i","area","type","polygonArea","coordinates","length","geometries","coords","Math","abs","ringArea","p1","p2","p3","lowerIndex","middleIndex","upperIndex","coordsLength","rad","sin","wgs84","RADIUS","PI","require","module","exports","ring","global","factory","define","amd","glMatrix","this","transformMat3","out","a","m","x","y","z","transformMat4$1","w","create$2","Float32Array","rotate","a0","a1","a2","a3","s","c","cos","scale$2","v","v0","v1","create$3","fromRotation$1","create$4","identity$2","invert$2","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","a30","a31","a32","a33","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","b11","det","multiply$4","b","b0","b1","b2","b3","translate$1","scale$4","rotateX$1","rotateZ$1","perspective","fovy","aspect","near","far","f","tan","nf","ortho","left","right","bottom","top","lr","bt","vec3","vec4","transformMat4","mat2","create","scale","mat3","fromRotation","mat4","identity","translate","multiply","rotateX","rotateZ","invert","isSupported","options","isBrowser","isArraySupported","isFunctionSupported","isObjectSupported","isJSONSupported","isWorkerSupported","isUint8ClampedArraySupported","isWebGLSupportedCached","failIfMajorPerformanceCaveat","window","document","Array","prototype","every","filter","forEach","indexOf","lastIndexOf","map","some","reduce","reduceRight","isArray","Function","bind","Object","keys","getPrototypeOf","getOwnPropertyNames","isSealed","isFrozen","isExtensible","getOwnPropertyDescriptor","defineProperty","defineProperties","seal","freeze","preventExtensions","JSON","supported","worker","blob","Blob","workerURL","URL","createObjectURL","Worker","e","terminate","revokeObjectURL","undefined","isWebGLSupportedCache","isWebGLSupported","canvas","createElement","attributes","webGLContextAttributes","probablySupportsContext","supportsContext","getContext","mapboxgl","antialias","alpha","stencil","depth","Point","clone","add","p","_add","sub","_sub","multByPoint","_multByPoint","divByPoint","_divByPoint","mult","k","_mult","div","_div","_rotate","rotateAround","_rotateAround","matMult","_matMult","unit","_unit","perp","_perp","round","_round","mag","sqrt","equals","other","dist","distSqr","dx","dy","angle","atan2","angleTo","angleWith","angleWithSep","convert","ShelfPack","ShelfPack$1","h","autoResize","shelves","freebins","stats","bins","maxId","Shelf","free","Bin","id","maxw","maxh","refcount","pack","concat","allocation","results","width","height","packOne","inPlace","push","shrink","bin","shelf","waste","best","freebin","Infinity","getBin","ref","max","allocFreebin","allocShelf","h1","h2","w1","w2","resize","index","splice","alloc","j","unref","clear","TinySDF","fontSize","buffer","radius","cutoff","fontFamily","fontWeight","size","ctx","font","textBaseline","fillStyle","gridOuter","Float64Array","gridInner","d","Int16Array","middle","navigator","userAgent","edt","data","edt1d","n","INF","q","draw","char","clearRect","fillText","imgData","getImageData","alphaChannel","Uint8ClampedArray","pow","min","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","sampleCurveX","t","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","x2","d2","solve","VectorTile","VectorTileFeature","VectorTileLayer","pbf","end","layers","readFields","readTile","tag","layer","readVarint","pos","name","extent","values","properties","_pbf","_geometry","_keys","_values","readFeature","feature","readTag","key","value","classifyRings","rings","len","polygon","ccw","polygons","signedArea","sum","types","loadGeometry","line","cmd","lines","cmdLen","readSVarint","Error","bbox","x1","y1","y2","toGeoJSON","project","y0","x0","atan","exp","points","result","version","_features","readLayer","readString","readValueMessage","readFloat","readDouble","readVarint64","readBoolean","WhooTS","getURL","baseUrl","getTileBBox","format","service","request","srs","join","getMercCoords","resolution","earcut","holeIndices","dim","hasHoles","outerLen","outerNode","linkedList","triangles","minX","minY","maxX","maxY","eliminateHoles","earcutLinked","start","clockwise","last","insertNode","next","removeNode","filterPoints","again","steiner","prev","ear","pass","indexCurve","stop","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","zOrder","maxZ","nextZ","prevZ","intersects","locallyInside","isValidDiagonal","splitPolygon","list","queue","getLeftmost","sort","compareX","eliminateHole","hole","findHoleBridge","hx","hy","qx","mx","my","tanMin","sortLinked","tail","numMerges","pSize","qSize","inSize","leftmost","px","py","intersectsPolygon","middleInside","r","q1","q2","inside","Node","an","bp","deviation","trianglesArea","flatten","vertices","holes","dimensions","holeIndex","rewind","gj","outer","features","curryOuter","correct","correctRings","wind","dir","cw","reverse","geojsonArea","clip","k1","k2","axis","minAll","maxAll","clipped","newGeometry","clipPoints","clipLine","clipLines","createFeature","tags","geom","newGeom","isPolygon","slice","intersect","intersectX","intersectY","az","sliced","addPoint","tolerance","convertFeature","geojson","tol","convertPoint","convertLine","convertLines","projectX","projectY","simplify","log","calcBBox","calcLineBBox","geojsonvt","GeoJSONVT","extend","debug","console","time","maxZoom","z2","tiles","tileCoords","timeEnd","indexMaxZoom","indexMaxPoints","total","wrap","splitTile","numFeatures","numPoints","stringify","toID","dest","src","transform","createTile","cz","stack","pop","tile","tileTolerance","numSimplified","source","floor","tl","bl","tr","br","k3","k4","getTile","parent","z0","first","sqTolerance","maxSqDist","getSqSegDist","tx","ty","noSimplify","transformed","addFeature","simplified","addLine","tileFeature","isOuter","transformTile","transformPoint","point","merged","shiftFeatureCoords","offset","newFeatures","shiftCoords","newPolygon","newPoints","GridIndex","padding","cells","ArrayBuffer","arrayBuffer","array","Int32Array","NUM_PARAMS","subarray","keysOffset","bboxesOffset","bboxes","insert","_insertReadonly","uid","_forEachCell","_insertCell","cellIndex","query","call","seenUids","_queryCell","cell","u","fn","arg1","arg2","cx1","_convertToCellCoord","cy1","cx2","cy2","toArrayBuffer","metadataLength","totalCellLength","set","read","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","write","rt","isNaN","LN2","kdbush","getX","getY","nodeSize","ArrayType","KDBush","defaultGetX","defaultGetY","ids","range","within","nextAxis","sortKD","select","inc","sd","swapItem","swap","arr","tmp","qy","r2","sqDist","Pbf","buf","isView","Uint8Array","readVarintRemainder","l","toNum","readPackedEnd","Bytes","low","high","isSigned","writeBigVarint","val","realloc","writeBigVarintLow","writeBigVarintHigh","lsb","makeRoomForExtraLength","startPos","extraLen","ceil","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","readInt32","readUtf8","str","bytesPerSequence","String","fromCharCode","writeUtf8","lead","charCodeAt","ieee754","Varint","Fixed64","Fixed32","SHIFT_LEFT_32","SHIFT_RIGHT_32","destroy","readField","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","num","Boolean","readBytes","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","finish","writeString","writeBytes","writeRawMessage","obj","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","setTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","noop","process","nextTick","args","arguments","apply","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","partialSort","compare","defaultCompare","supercluster","SuperCluster","trees","createCluster","zoom","parentId","createPointCluster","lngX","latY","getClusterJSON","cluster","getClusterProperties","xLng","yLat","count","abbrev","cluster_id","point_count","point_count_abbreviated","lng","lat","minZoom","initial","props","load","timerId","clusters","now","Date","_cluster","getClusters","tree","_limitZoom","getChildren","clusterId","clusterZoom","origin","children","getLeaves","limit","leaves","_appendLeaves","_addTileFeatures","getClusterExpansionZoom","skipped","neighborIds","wx","wy","clusterProperties","_accumulate","numPoints2","TinyQueue","_down","item","_up","peek","current","halfLen","ctor","superCtor","super_","constructor","enumerable","writable","configurable","TempCtor","arg","copy","fill","readUInt8","inspect","opts","seen","stylize","stylizeNoColor","colors","isBoolean","showHidden","_extend","isUndefined","customInspect","stylizeWithColor","formatValue","styleType","style","styles","arrayToHash","hash","idx","recurseTimes","isFunction","ret","isString","primitive","formatPrimitive","visibleKeys","isError","formatError","isRegExp","RegExp","toString","isDate","base","braces","toUTCString","output","formatArray","formatProperty","reduceToSingleString","simple","replace","isNumber","isNull","hasOwnProperty","match","desc","get","split","substr","numLinesEst","cur","ar","isNullOrUndefined","isSymbol","re","isObject","objectToString","isPrimitive","o","pad","timestamp","getHours","getMinutes","getSeconds","getDate","months","getMonth","prop","formatRegExp","objects","Number","deprecate","msg","deprecated","warned","throwDeprecation","traceDeprecation","trace","error","noDeprecation","debugs","debugEnviron","debuglog","NODE_DEBUG","toUpperCase","test","pid","bold","italic","underline","inverse","white","grey","black","blue","cyan","green","magenta","red","yellow","special","number","boolean","null","string","date","regexp","isBuffer","inherits","fromVectorTileJs","writeTile","fromGeojsonVt","GeoJSONWrapper","writeLayer","context","keycache","valuecache","writeFeature","writeValue","writeProperties","writeGeometry","keyIndex","valueKey","valueIndex","command","zigzag","FeatureWrapper","rawGeometry","newRing","coord","bundleFn","sources","cache","resolveSources","workerSources","depPath","depKey","wkey","cacheKeys","default","random","wcache","skey","scache","webkitURL","mozURL","msURL","bare","workerUrl","objectURL","FLATTENING","POLAR_RADIUS","StructArray","ref$1","Struct","ref$2","register","StructArrayLayout2i4","_refreshViews","uint8","int16","emplaceBack","const","o2","bytesPerElement","StructArrayLayout4i8","v2","v3","StructArrayLayout2i4i12","v4","v5","StructArrayLayout4i4ub12","v6","v7","o1","StructArrayLayout4i4ui16","uint16","Uint16Array","StructArrayLayout3f12","float32","o4","StructArrayLayout1ul4","uint32","Uint32Array","StructArrayLayout6i1ul2ui2i24","v8","v9","v10","StructArrayLayout2i2i2i12","StructArrayLayout2ub4","StructArrayLayout2i2ui3ul3ui2f2ub40","v11","v12","v13","StructArrayLayout1f4","StructArrayLayout3i6","StructArrayLayout1ul2ui8","StructArrayLayout3ui6","StructArrayLayout2ui4","StructArrayLayout2f8","StructArrayLayout4f16","CollisionBoxStruct","prototypeAccessors","anchorPointX","_structArray","_pos2","anchorPointY","featureIndex","_pos4","sourceLayerIndex","bucketIndex","signedDistanceFromAnchor","anchorPoint","CollisionBoxArray","PlacedSymbolStruct","prototypeAccessors$1","anchorX","anchorY","glyphStartIndex","numGlyphs","vertexStartIndex","lineStartIndex","lineLength","segment","lowerSize","upperSize","lineOffsetX","lineOffsetY","writingMode","_pos1","hidden","PlacedSymbolArray","GlyphOffsetStruct","prototypeAccessors$2","offsetX","GlyphOffsetArray","getoffsetX","SymbolLineVertexStruct","prototypeAccessors$3","tileUnitDistanceFromAnchor","SymbolLineVertexArray","getx","gety","gettileUnitDistanceFromAnchor","FeatureIndexStruct","prototypeAccessors$4","FeatureIndexArray","PosArray","RasterBoundsArray","CircleLayoutArray","FillLayoutArray","FillExtrusionLayoutArray","HeatmapLayoutArray","LineLayoutArray","SymbolLayoutArray","SymbolDynamicLayoutArray","SymbolOpacityArray","CollisionBoxLayoutArray","CollisionCircleLayoutArray","CollisionVertexArray","TriangleIndexArray","LineIndexArray","deserialize","input","bucket","layerIds","getLayer","i$1","list$1","createLayout","components","addCircleVertex","layoutVertexArray","extrudeX","extrudeY","layoutAttributes","members","SegmentVector","ProgramConfigurationSet","ref$3","EXTENT","ref$4","CircleBucket","overscaling","indexArray","segments","programConfigurations","populate","this$1","_featureFilter","isEmpty","upload","layoutVertexBuffer","createVertexBuffer","indexBuffer","createIndexBuffer","prepareSegment","vertexLength","primitiveLength","populatePaintArrays","omit","EARCUT_MAX_RINGS","FillBucket","indexArray2","segments2","indexBuffer2","i$2","numVertices","i$3","triangleSegment","triangleIndex","flattened","i$4","list$2","lineSegment","lineIndex","let","indices","addVertex","vertexArray","nx","ny","nz","FACTOR","isBoundaryEdge","isEntirelyOutside","MAX_VERTEX_ARRAY_LENGTH","FillExtrusionBucket","edgeDistance","bottomRight","list$3","HeatmapBucket","addLineVertex","extrude","up","linesofar","EXTRUDE_SCALE","LINE_DISTANCE_SCALE","vectorTileFeatureTypes","COS_HALF_SHARP_CORNER","SHARP_CORNER_OFFSET","LINE_DISTANCE_BUFFER_BITS","MAX_LINE_DISTANCE","LineBucket","layout","evaluate","cap","miterLimit","roundLimit","sharpCornerOffset","firstVertex","distance","currentVertex","offsetA","offsetB","beginCap","endCap","startOfLine","prevVertex","nextVertex","prevNormal","nextNormal","e1","e2","e3","joinNormal","cosHalfAngle","miterLength","isSharpCorner","prevSegmentLength","newPrevVertex","addCurrentVertex","middleVertex","currentJoin","direction","bevelLength","lineTurnsLeft","approxFractionalJoinNormal","addPieSliceVertex","nextSegmentLength","newCurrentVertex","normal","endLeft","endRight","symbolLayoutAttributes","dynamicLayoutAttributes","placementOpacityAttributes","collisionVertexAttributes","symbolAttributes","collisionBox","collisionBoxLayout","collisionCircleLayout","placement","glyphOffset","lineVertex","ox","oy","sizeVertex","addDynamicAttributes","dynamicLayoutVertexArray","transformText","mergeLines","scriptDetection","verticalizePunctuation","Anchor","OpacityState","ref$5","getSizeData","ref$6","shaderOpacityAttributes","symbolBufferConfigurations","text","LayoutArray","IndexArray","dynamicLayout","opacity","collision","icon","collisionCircle","SymbolBuffers","configuration","opacityVertexArray","collisionVertexArray","dynamicIndexBuffer","dynamicLayoutVertexBuffer","opacityVertexBuffer","itemSize","collisionVertexBuffer","SymbolBucket","collisionBoxArray","pixelRatio","unevaluatedLayoutValues","_unevaluatedLayout","textSizeData","iconSizeData","sortFeaturesByY","createArrays","property","placedGlyphArray","placedIconArray","glyphOffsetArray","lineVertexArray","textFont","textField","iconImage","hasText","kind","hasIcon","icons","iconDependencies","stacks","glyphDependencies","globalProperties","getValueAndResolveTokens","symbolFeature","fontStack","textAlongLine","allowsVerticalWritingMode","verticalChar","lookup","charAt","symbolInstances","addToLineVertexArray","anchor","sumForwardLength","sumBackwardLength","vertex","addSymbols","arrays","quads","lineOffset","alongLine","labelAnchor","placedSymbolArray","glyphOffsetArrayStart","symbol","tex","_addCollisionDebugVertex","addCollisionDebugVertices","boxAnchorPoint","symbolInstance","isCircle","indexArray$1","generateCollisionDebugBuffers","textCollisionFeature","boxStartIndex","textBoxStartIndex","boxEndIndex","textBoxEndIndex","iconCollisionFeature","iconBoxStartIndex","iconBoxEndIndex","box","deserializeCollisionBoxes","textStartIndex","textEndIndex","iconStartIndex","iconEndIndex","collisionArrays","textBox","textCircles","iconBox","sortFeatures","sortedAngle","symbolInstanceIndexes","aIndex","bIndex","placedTextSymbolIndices","placedTextSymbolIndex","placedSymbol","endIndex","vertexIndex","placedIcon","updateData","shallow","MAX_GLYPHS","RGBAImage","util","Level","border","RangeError","stride","_idx","DEMData","level","loaded","loadFromImage","pixels","getPixels","backfillBorder","borderTile","_xMin","_xMax","_yMin","_yMax","xMin","clamp","xMax","yMin","yMax","topDownFeatureComparator","featureFilter","Grid","DictionaryCoder","vt","Protobuf","GeoJSONFeature","arraysIntersect","OverscaledTileID","FeatureIndex","tileID","grid","featureIndexArray","canonical","setCollisionIndex","collisionIndex","styleLayers","vtLayers","rawTileData","sourceLayerCoder","params","pixelsToTileUnits","tileSize","queryGeometry","additionalRadius","matching","filterMatching","bearing","matchingSymbols","queryRenderedSymbols","sourceID","filterLayerIDs","previousIndex","layerIDs","bucketLayerIDs","sourceLayerName","decode","sourceLayer","overscaledZ","layerID","styleLayer","queryIntersectsFeature","geojsonFeature","serialize","layerResult","hasLayer","createBounds","bits","bounds","warnOnce","packColor","color","packUint8ToFloat","g","paintAttributeName","text-opacity","icon-opacity","text-color","icon-color","text-halo-color","icon-halo-color","text-halo-blur","icon-halo-blur","text-halo-width","icon-halo-width","line-gap-width","Color","PossiblyEvaluatedPropertyValue","ConstantBinder","statistics","defines","populatePaintArray","setUniforms","program","globals","currentValue","constantOr","gl","uniform4f","uniforms","uniform1f","SourceExpressionBinder","expression","PaintVertexArray","paintVertexAttributes","paintVertexArray","paintArray","reserve","paintVertexBuffer","CompositeExpressionBinder","useIntegerZoom","minColor","maxColor","interpolationFactor","currentZoom","ProgramConfiguration","binders","cacheKey","_buffers","createDynamic","filterProperties","self","paint","specification","forBackgroundColor","forBackgroundPattern","forTileClippingMask","getPaintVertexBuffers","buffers","binder","layerId","vertexOffset","primitiveOffset","vaos","Coordinate","column","row","zoomTo","_zoomTo","LngLat","toArray","toBounds","latAccuracy","lngAccuracy","LngLatBounds","sw","ne","setSouthWest","setNorthEast","_ne","_sw","sw2","ne2","getCenter","getSouthWest","getNorthEast","getNorthWest","getWest","getNorth","getSouthEast","getEast","getSouth","interp","tileCover","CanonicalTileID","UnwrappedTileID","glmatrix","Transform","renderWorldCopies","_renderWorldCopies","_minZoom","_maxZoom","latRange","_center","_fov","_pitch","_unmodified","_posMatrixCache","_calcMatrices","worldSize","centerPoint","rotationMatrix","pitch","fov","_zoom","zoomScale","tileZoom","zoomFraction","_constrain","center","coveringZoomLevel","roundZoom","scaleZoom","getVisibleUnwrappedCoordinates","ul","pointCoordinate","ur","w0","coveringTiles","actualZ","minzoom","maxzoom","centerCoord","cornerCoords","reparseOverscaled","pixelsToGLUnits","unmodified","lnglat","unproject","setLocationAtPoint","coordinateLocation","locationCoordinate","locationPoint","coordinatePoint","pointLocation","zoomedCoord","coord0","coord1","pixelMatrixInverse","z1","pixelMatrix","calculatePosMatrix","unwrappedTileID","posMatrixKey","unwrappedX","posMatrix","projMatrix","_constraining","sy","sx","lngRange","cameraToCenterDistance","halfFov","groundAngle","topHalfSurfaceDistance","furthestDistance","farZ","verticalScale","ZERO","ONE","ONE_MINUS_SRC_ALPHA","ColorMode","blendFunction","blendColor","mask","Replace","disabled","transparent","unblended","alphaBlended","IndexBuffer","VertexBuffer","Framebuffer","DepthMode","StencilMode","ClearColor","ClearDepth","ClearStencil","ColorMask","DepthMask","StencilMask","StencilFunc","StencilOp","StencilTest","DepthRange","DepthTest","DepthFunc","Blend","BlendFunc","BlendColor","Program","LineWidth","ActiveTextureUnit","Viewport","BindFramebuffer","BindRenderbuffer","BindTexture","BindVertexBuffer","BindElementBuffer","BindVertexArrayOES","PixelStoreUnpack","PixelStoreUnpackPremultiplyAlpha","Context","extVertexArrayObject","getExtension","lineWidthRange","getParameter","ALIASED_LINE_WIDTH_RANGE","clearColor","clearDepth","clearStencil","colorMask","depthMask","stencilMask","stencilFunc","stencilOp","stencilTest","depthRange","depthTest","depthFunc","blend","blendFunc","lineWidth","activeTexture","viewport","bindFramebuffer","bindRenderbuffer","bindTexture","bindVertexBuffer","bindElementBuffer","bindVertexArrayOES","pixelStoreUnpack","pixelStoreUnpackPremultiplyAlpha","extTextureFilterAnisotropic","extTextureFilterAnisotropicMax","MAX_TEXTURE_MAX_ANISOTROPY_EXT","extTextureHalfFloat","dynamicDraw","createRenderbuffer","storageFormat","rbo","renderbufferStorage","RENDERBUFFER","createFramebuffer","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","setDepthMode","depthMode","func","ALWAYS","setStencilMode","stencilMode","fail","depthFail","setColorMode","colorMode","deepEqual","ReadOnly","ReadWrite","ColorAttachment","DepthAttachment","fbo","framebuffer","colorAttachment","depthAttachment","texture","deleteTexture","renderbuffer","deleteRenderbuffer","deleteFramebuffer","createBuffer","unbindVAO","bufferData","ELEMENT_ARRAY_BUFFER","DYNAMIC_DRAW","STATIC_DRAW","bufferSubData","deleteBuffer","KEEP","enable","STENCIL_TEST","disable","DEPTH_TEST","LESS","BLEND","useProgram","clamped","TEXTURE0","drawingBufferWidth","drawingBufferHeight","FRAMEBUFFER","TEXTURE_2D","bindBuffer","ARRAY_BUFFER","pixelStorei","UNPACK_ALIGNMENT","UNPACK_PREMULTIPLY_ALPHA_WEBGL","FramebufferValue","super","dirty","framebufferTexture2D","COLOR_ATTACHMENT0","setDirty","framebufferRenderbuffer","DEPTH_ATTACHMENT","AttributeType","Int8","Uint8","Int16","Uint16","Int32","Uint32","Float32","enableAttributes","member","attribIndex","enableVertexAttribArray","setVertexAttribPointers","vertexAttribPointer","Map","NavigationControl","GeolocateControl","AttributionControl","ScaleControl","FullscreenControl","Popup","Marker","Style","Evented","config","rtlTextPlugin","workerCount","hardwareConcurrency","setRTLTextPlugin","accessToken","ACCESS_TOKEN","token","drawBackground","painter","sourceCache","image","renderPass","depthModeForSublayer","colorModeForRenderPass","PossiblyEvaluated","fillLayerPaintProperties","pattern","isPatternMissing","prepare","tileExtentPatternVAO","tileExtentBuffer","tileExtentVAO","tileIDs","setTile","uniformMatrix4fv","u_matrix","toUnwrapped","drawArrays","TRIANGLE_STRIP","drawCircles","strokeWidth","strokeOpacity","getBucket","prevProgram","programConfiguration","u_camera_to_center_distance","uniform1i","u_scale_with_map","u_pitch_with_map","uniform2f","u_extrude_scale","uniform2fv","translatePosMatrix","TRIANGLES","drawCollisionDebugGeometry","u_pixels_to_tile_units","LINES","drawCollisionDebug","drawDebug","drawDebugTile","devicePixelRatio","u_color","debugVAO","debugBuffer","LINE_STRIP","createTextVerticies","debugTextArray","debugTextBuffer","posAttributes","VertexArrayObject","onePixel","translations","translation","baseline","len2","glyph","strokes","simplexFont"," ","!","\"","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","`","{","|","}","~","drawFill","drawFillTiles","drawFillTile","getPaintProperty","drawStrokeTile","drawFn","firstTile","stencilModeForClipping","setFillProgram","u_world","programId","pat","drawToExtrusionFramebuffer","drawExtrusion","drawExtrusionTexture","renderTarget","viewportFrame","depthRboNeedsClear","setupOffscreenDepthRenderbuffer","Texture","RGBA","LINEAR","CLAMP_TO_EDGE","depthRbo","LEQUAL","renderedTexture","u_opacity","u_image","matrix","viewportVAO","viewportBuffer","u_height_factor","setLight","light","_lp","lightPos","lightMat","uniform3fv","u_lightpos","u_lightintensity","uniform3f","u_lightcolor","drawHeatmap","hasRenderableParent","u_intensity","renderTextureToMap","TEXTURE1","heatmapFbo","createTexture","texParameteri","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","TEXTURE_MAG_FILTER","bindTextureToFramebuffer","texImage2D","HALF_FLOAT_OES","UNSIGNED_BYTE","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","colorRampTexture","colorRamp","u_color_ramp","drawHillshade","needsHillshadePrepare","prepareHillshade","renderHillshade","azimuthal","u_light","getTileLatRange","coordinate0","toCoordinate","coordinate1","u_latrange","shadowColor","u_shadow","highlightColor","u_highlight","accentColor","u_accent","maskedBoundsBuffer","maskedIndexBuffer","rasterBoundsBuffer","rasterBoundsVAO","dem","pixelData","demTexture","getTileTexture","update","NEAREST","renderTexture","u_zoom","u_dimension","drawLineTile","programChanged","tileRatioChanged","posA","posB","imagePosA","imagePosB","dasharray","tileRatio","lineAtlas","getDash","from","to","widthA","fromScale","widthB","toScale","u_patternscale_a","u_patternscale_b","u_sdfgamma","imageManager","getPattern","u_pattern_size_a","displaySize","u_pattern_size_b","getPixelSize","u_texsize","u_gl_units_to_pixels","u_tex_y_a","u_tex_y_b","u_mix","u_pattern_tl_a","u_pattern_br_a","u_pattern_tl_b","u_pattern_br_b","u_fade","u_ratio","prevTileZoom","drawRaster","getSource","u_brightness_low","u_brightness_high","u_saturation_factor","saturationFactor","u_contrast_factor","contrastFactor","u_spin_weights","spinWeights","u_buffer_scale","u_image0","u_image1","minTileZ","registerFadeDuration","parentTile","findLoadedParent","fade","getFadeValues","parentScaleBy","parentTL","LINEAR_MIPMAP_NEAREST","u_tl_parent","u_scale_parent","u_fade_t","mix","ImageSource","boundsBuffer","boundsVAO","vao","contrast","saturation","fadeDuration","sinceTile","timeAdded","sinceParent","idealZ","fadeIn","childOpacity","refreshedUponExpiration","drawSymbols","drawLayerSymbols","showCollisionBoxes","isText","translateAnchor","rotationAlignment","pitchAlignment","keepUpright","rotateWithMap","pitchWithMap","rotateInShader","depthOn","isSDF","sdfIcons","sizeData","setSymbolDrawState","u_texture","glyphAtlasTexture","iconScaled","iconsNeedLinear","iconTransformed","iconAtlasTexture","rotating","zooming","labelPlaneMatrix","symbolProjection","getLabelPlaneMatrix","glCoordMatrix","getGlCoordMatrix","u_gl_coord_matrix","u_label_plane_matrix","identityMat4","updateLineLabels","u_fade_change","fadeStartTime","drawTileSymbols","u_is_text","u_pitch","isZoomConstant","functionType","isFeatureConstant","u_is_size_zoom_constant","u_is_size_feature_constant","symbolSize","evaluateSizeForZoom","symbolLayoutProperties","uSizeT","u_size_t","uSize","u_size","u_aspect_ratio","u_rotate_symbol","hasHalo","gammaScale","u_gamma_scale","u_is_halo","drawSymbolElements","makeGlyphAtlas","AlphaImage","positions","glyphs","stackPositions","bitmap","rect","metrics","loadGlyphRange","isChar","asyncAll","GlyphManager","requestTransform","localIdeographFontFamily","entries","setURL","url","getGlyphs","callback","all","entry","requests","_tinySDF","err","response","cb","family","tinySDF","advance","imagePosition","textureRect","makeImageAtlas","images","ImageManager","requestors","shelfPack","patterns","atlasImage","isLoaded","setLoaded","_notify","getImage","addImage","removeImage","getImages","hasAllDependencies","sdf","position","dst","atlasTexture","LineAtlas","nextRow","bytes","addDash","stretch","halfWidth","oddLength","partIndex","distLeft","distRight","signedDistance","distMiddle","distEdge","texSubImage2D","REPEAT","SourceCache","rasterBoundsAttributes","CrossTileSymbolIndex","shaders","updateTileMasks","circle","heatmap","fill-extrusion","hillshade","raster","background","Painter","_tileTextures","setup","numSublayers","maxUnderzooming","maxOverzooming","depthEpsilon","emptyProgramConfiguration","crossTileSymbolIndex","_order","_layers","tileExtentArray","debugArray","rasterBoundsArray","viewportArray","_renderTileClippingMasks","idNext","_tileClippingMaskIDs","REPLACE","EQUAL","_showOverdrawInspector","CONSTANT_COLOR","farDepth","currentLayer","nearDepth","render","glyphManager","sourceCaches","used","rasterSources","filterObject","sc","getVisibleCoordinates","visibleTiles","hasOffscreenPass","isHidden","sourceCache$2","coords$1","renderLayer","showOverdrawInspector","sourceCache$3","isTileClipped","sourceCache$4","coords$3","showTileBoundaries","DEPTH_COMPONENT16","inViewportPixelUnitsUnits","sinA","cosA","translatedMatrix","saveTileTexture","textures","_createProgramCached","nextProgram","u_scale_a","u_scale_b","u_tile_units_to_pixels","numTiles","tileSizeAtNearestZoom","pixelX","pixelY","u_pixel_coord_upper","u_pixel_coord_lower","createProgram","toFixed","fragmentSource","prelude","vertexSource","fragmentShader","createShader","FRAGMENT_SHADER","shaderSource","compileShader","attachShader","vertexShader","VERTEX_SHADER","bindAttribLocation","linkProgram","numAttributes","getProgramParameter","ACTIVE_ATTRIBUTES","attribute","getActiveAttrib","getAttribLocation","numUniforms","ACTIVE_UNIFORMS","uniform","getActiveUniform","getUniformLocation","drawMode","dynamicLayoutBuffer","dynamicLayoutBuffer2","primitiveSize","drawElements","UNSIGNED_SHORT","HTMLImageElement","HTMLCanvasElement","HTMLVideoElement","ImageData","premultiply","minFilter","computeTileMasks","rootTile","childArray","lowerBound","childTile","isLessThan","isChildOf","diffZ","maskTileId","renderableTiles","sortedRenderables","wrapped","setMask","boundProgram","boundLayoutVertexBuffer","boundPaintVertexBuffers","boundIndexBuffer","boundVertexOffset","boundDynamicVertexBuffer","paintVertexBuffers","dynamicVertexBuffer","dynamicVertexBuffer2","paintBuffersDiffer","isFreshBindRequired","boundDynamicVertexBuffer2","freshBind","numPrevAttributes","numNextAttributes","createVertexArrayOES","currentNumAttributes","disableVertexAttribArray","vertexBuffer","deleteVertexArrayOES","heatmapTexture","fillOutline","fillOutlinePattern","fillPattern","fillExtrusion","fillExtrusionPattern","extrusionTexture","hillshadePrepare","linePattern","lineSDF","symbolIcon","symbolSDF","loop","programName","fragmentPragmas","operation","precision","attrType","CanvasSource","dispatcher","eventedParent","animate","getElementById","_hasInvalidDimensions","fire","play","_playing","_rerender","pause","_finishLoading","getCanvas","onAdd","onRemove","_boundsArray","state","hasTransition","resolveURL","href","ResourceType","GeoJSONSource","setEventedParent","_data","_options","workerOptions","geojsonVtOptions","superclusterOptions","clusterMaxZoom","clusterRadius","dataType","_updateWorkerData","sourceDataType","setData","_transformRequest","Source","workerID","send","_loaded","loadTile","message","overscaleFactor","unloadVectorData","aborted","loadVectorData","abortTile","unloadTile","broadcast","loadGeoJSONTile","_geoJSONIndexes","geoJSONTile","geojsonWrapper","vtpbf","byteOffset","byteLength","vectorTile","rawData","ajax","VectorTileWorkerSource","GeoJSONWorkerSource","actor","layerIndex","loadGeoJSON","loadData","reloadTile","getJSON","parse","removeSource","_feature","parseInt","geometry$1","_geojsonTileLayer","Image","setCoordinates","cornerZ0Coords","getCoordinatesCenter","buckets","normalizeURL","normalizeSourceURL","requestTransformFn","tileJSON","pick","vector_layers","vectorLayers","vectorLayerIds","frame","pixelValue","sortTilesIn","idA","idB","mergeRenderedFeatureLayers","wrappedIDLayerMap","queryResults","wrappedID","wrappedTileID","wrappedIDLayers","tileFeatures","wrappedIDFeatures","resultFeatures","rendered","tilesIn","renderedFeatureLayers","tileIn","queryRenderedFeatures","getRenderableIds","getTileByID","dataTiles","dataID","querySourceFeatures","normalizeTileURL","RasterTileSource","RasterDEMTileSource","imageLoaded","img","_refreshExpiredTiles","setExpiryData","cacheControl","expires","rawImageData","done","scheme","Tile","neighboringTiles","_getNeighboringTiles","pxw","nxw","backfilled","RasterDEMTileWorkerSource","loading","removeTile","loadTileJSON","TileBounds","tileBounds","hasTile","contains","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","generateMipmap","abort","pluginRequested","pluginBlobURL","evented","registerForPluginAvailability","errorCallback","createBlobURL","clearRTLTextPlugin","pluginURL","getArrayBuffer","applyArabicShaping","processBidirectionalText","sourceTypes","vector","raster-dem","video","bindAll","getType","setType","coordinateToTilePoint","isRasterType","createSource","Cache","_sourceLoaded","_paused","reload","_sourceErrored","_source","_tiles","_cache","_unloadTile","_timers","_cacheTimers","_maxTileCacheSize","_isIdRenderable","_coveredTiles","getNeedsFullPlacement","_needsFullPlacement","resume","shouldReload","_shouldReloadOnResume","_loadTile","_abortTile","getIds","compareKeyZoom","a_","b_","rotatedA","rotatedB","hasData","reset","_reloadTile","_tileLoaded","previousState","status","_setTileReloadTimer","_backfillDEM","_updatePlacement","added","fillBorder","borderId","renderables","getZoom","_findLoadedChildren","maxCoveringZoom","retain","found","scaledTo","minCoveringZoom","has","updateCacheSize","widthInTiles","heightInTiles","approxTilesInView","viewDependentMaxSize","maxSize","setMaxSize","idealTileIDs","unwrapped","_updateRetainedTiles","parentsForFading","fadeEndTime","_addTile","fadedParent","remove","keysDifference","_removeTile","checked","parentWasRequested","wasRequested","covered","childCoord","getAndRemove","cached","uses","expiryTimeout","getExpiryTimeout","_setCacheInvalidationTimer","removed","wrappedId","clearTiles","tileResults","tileSpaceBounds","tileSpaceQueryGeometry","commitPlacement","collisionFadeTimes","deserializeBucket","CollisionIndex","projection","performSymbolPlacement","updateOpacities","CLOCK_SKEW_RETRY_TIMEOUT","uniqueId","expirationTime","expiredRequestCount","duration","iconAtlasImage","glyphAtlasImage","justReloaded","unloadDEMData","addTileLayer","removeTileLayer","placeLayer","textPixelRatio","uploaded","ALPHA","queryRadius","clearMask","maskedBoundsArray","maskArray","maskCoord","vertexExtent","tlVertex","brVertex","prior","parsedCC","parseCacheControl","getTime","isExpired","delta","validateBounds","calculateKey","getQuadkey","quadkey","urls","targetZ","zDifference","sourceMaxZoom","rhs","VectorTileSource","reloadCallback","loadVectorTile","xhr","WorkerTile","workerTile","vtSource","VideoSource","getVideo","addEventListener","readyState","paused","Actor","StyleLayerIndex","globalRTLTextPlugin","layerIndexes","workerSourceTypes","demWorkerSources","registerWorkerSource","WorkerSource","registerRTLTextPlugin","setLayers","mapId","getLayerIndex","updateLayers","removedIds","getWorkerSource","loadDEMTile","getDEMWorkerSource","removeDEMTile","loadWorkerSource","importScripts","loadRTLTextPlugin","recalculateLayers","parameters","EvaluationParameters","recalculate","performSymbolLayout","maybePrepare","glyphMap","imageMap","glyphAtlas","imageAtlas","layerFamilies","familiesBySource","sourceLayerId","encode","visibility","createBucket","mapObject","deref","refProperties","derefLayers","addSource","sourceId","after","commands","operations","sourcesRemoved","updateSource","canUpdateGeoJSON","before","isEqual","diffSources","setGeoJSONSourceData","diffLayerPropertyChanges","klass","pluckId","indexById","group","diffLayers","beforeLayer","afterLayer","insertBeforeLayerId","beforeOrder","afterOrder","beforeIndex","afterIndex","tracker","clean","removeLayer","addLayer","setLayoutProperty","setPaintProperty","setFilter","setLayerZoomRange","setLayerProperty","diffStyles","setStyle","setCenter","setZoom","setBearing","setPitch","sprite","setSprite","setGlyphs","transition","setTransition","removeOrAddSourceCommands","beforeLayers","warn","ValidationError","__line__","varargs","stringifySignature","signature","ParsingContext","EvaluationContext","CompoundExpression","_evaluate","eachChild","possibleOutputs","op","definition","definitions","availableOverloads","overloads","parsedArgs","expected","parsed","signatureContext","path","scope","checkSubtype","errors","signatures","actualTypes","expressions","ValueType","StringType","NumberType","BooleanType","typeOf","RuntimeError","ArrayAssertion","itemType","ObjectType","object","Assertion","At","expectedType","Case","branches","otherwise","outputType","Coalesce","omitTypeAnnotations","ColorType","validateRGBA","to-number","to-color","Coercion","parseColor","eq","lhs","isComparableType","Equals","rgba","lt","gt","lteq","gteq","ErrorType","Let","Var","Literal","Match","Step","Interpolate","!=","==","at","case","coalesce","interpolate","literal","step","var","typeof","to-string","to-boolean","to-rgba","rgb","geometry-type","geometryType","heatmap-density","heatmapDensity","ln2","pi","log10","ln","log2","asin","acos",">=","<=","any","upcase","downcase","toLowerCase","exponentialInterpolation","lowerValue","upperValue","difference","progress","findStopLessThanOrEqualTo","interpolation","stops","labels","outputs","label","lower","upper","controlPoints","ub","rest","labelKey","stopCount","outputLower","outputUpper","bindings","pushScope","popScope","isValue","inputType","cases","labelContext","MAX_SAFE_INTEGER","unshift","Scope","geometryTypes","_parseColorCache","isExpression","createExpression","propertySpec","parser","getExpectedType","success","handleErrors","StyleExpression","StyleExpressionWithErrorHandling","createPropertyExpression","isConstant","ParsingError","isGlobalPropertyConstant","zoomCurve","findZoomCurve","ZoomDependentExpression","ZoomConstantExpression","normalizePropertyExpression","StylePropertyFunction","constant","child","childResult","spec","enum","getDefaultValue","_evaluator","_warningHistory","_defaultValue","_enumValues","_styleExpression","zoomStops","_interpolationType","createFunction","_parameters","_specification","serialized","literalArgs","part","expr","Expr","actual","ec","toJSON","currentIndex","valueMemberTypes","memberType","NullType","mixed","isExpressionFilter","createFilter","compile","compiled","filterSpec","compileComparisonOp","compileLogicalOp","compileNegation","compileInOp","compileHasOp","compilePropertyReference","checkType","function","property-function","zoom-function","identityFunction","isColor","zoomAndFeatureDependent","featureDependent","zoomDependent","colorSpace","colorSpaces","innerFun","hashedStops","categoricalKeyType","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","evaluateIdentityFunction","featureFunctions","featureFunctionStops","keyType","colorspace","forward","evaluatedLower","evaluatedUpper","str$1","getKey","groupByLayout","groups","clamp_css_byte","clamp_css_float","parse_css_int","parseFloat","parse_css_float","css_hue_to_rgb","m1","m2","parseCSSColor","css_str","kCSSColorTable","iv","ep","fname","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","isObjectLike","arraySome","predicate","baseIsEqual","customizer","isLoose","stackA","stackB","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","arrayTag","othTag","objToString","argsTag","objectTag","isTypedArray","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","equalArrays","equalObjects","arrLength","othLength","arrValue","othValue","boolTag","dateTag","errorTag","numberTag","regexpTag","stringTag","objProps","objLength","skipCtor","objValue","objCtor","othCtor","objectProto","bindCallback","thisArg","argCount","collection","accumulator","getNative","isNative","funcTag","reIsNative","fnToString","reIsHostCtor","isArguments","isArrayLikeObject","propertyIsEnumerable","isArrayLike","isLength","genTag","nativeIsArray","typedArrayTags","mapTag","setTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","baseProperty","getLength","isIndex","reIsUint","shimKeys","keysIn","propsLength","allowIndexes","Ctor","isProto","skipIndexes","nativeKeys","transformRgb","xyz2lab","t3","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","Xn","Yn","Zn","labToRgb","labColor","interpolateLab","interpolateNumber","rgbToHcl","rad2deg","hclToRgb","hclColor","deg2rad","interpolateHue","interpolateHcl","lab","hcl","inputs","unbundle","valueOf","deepUnbundle","deep","validateFunction","validateExpression","validateObject","VALIDATORS","constants","valueSpec","styleSpec","$version","validate","arraySpec","validateArrayElement","arrayElementValidator","arrayElementSpec","arrayIndex","expressionContext","propertyKey","validateNonExpressionFilter","validateEnum","filter_operator","geometry_type","validateArray","validateNumber","validateFunctionStops","validateFunctionStop","isZoomAndPropertyFunction","previousStopDomainZoom","previousStopDomainValue","stopDomainValues","objectElementValidators","validateStopDomainValue","functionValueSpec","reportValue","stopKeyType","isFinite","validateFunctionDefault","isZoomFunction","isPropertyFunction","objectKey","validateString","validateFilter","validatePaintProperty","validateLayoutProperty","validateSpec","otherLayer","sourceType","layerType","validateProperty","lightSpec","rootType","transitionMatch","minimum","maximum","elementSpecs","elementValidators","elementSpecKey","elementSpec","validateElement","required","propertyType","layerSpec","tokenMatch","tokens","exec","source_geojson","source_video","source_image","source_canvas","validateStyleMin","latestStyleSpec","$root","validateGlyphsURL","validateConstants","sortErrors","wrapCleanErrors","inner","paintProperty","layoutProperty","ZoomHistory","zoomHistory","crossFadingFactor","lastIntegerZoomTime","validateStyle","sphericalToCartesian","Properties","Transitionable","Transitioning","DataConstantProperty","LightPositionProperty","possiblyEvaluate","intensity","TRANSITION_SUFFIX","Light","lightOptions","_transitionable","_transitioning","untransitioned","getLight","_validate","endsWith","setValue","updateTransitions","transitioned","emitErrors","normalizeGlyphsURL","parseGlyphPBF","fontstack","urlTemplate","begin","Glyphs","normalizeSpriteURL","baseURL","transformRequestCallback","maybeComplete","json","imageData","SpriteJSON","SpriteImage","readFontstacks","readFontstack","readGlyph","GLYPH_PBF_BORDER","LayerPlacement","_currentTileIndex","_tileIDs","continuePlacement","shouldPausePlacement","Placement","order","forceFullPlacement","previousPlacement","_currentPlacementIndex","_forceFullPlacement","_showCollisionBoxes","_sourceCacheTileIDs","_done","_delayUntil","_collisionFadeTimes","latestStart","isDone","startTime","elapsedTime","_inProgressLayer","aCoord","bCoord","stillFading","easeCubicInOut","PropertyValue","isDataDriven","TransitionablePropertyValue","TransitioningPropertyValue","_properties","defaultTransitionablePropertyValues","getValue","getTransition","delay","finalValue","defaultTransitioningPropertyValues","Layout","defaultPropertyValues","defaultPossiblyEvaluatedValues","DataDrivenProperty","CrossFadedProperty","_calculate","mid","fraction","lastIntegerZoom","HeatmapColorProperty","defaultPropertyValue","defaultTransitionablePropertyValue","getMaximumPaintValue","translateDistance","pt","translated","translatedRing","StyleLayer","loadSprite","mapbox","Dispatcher","getSourceType","setSourceType","QueryFeatures","getWorkerPool","diff","supportedDiffOperations","ignoredDiffOperations","_resetUpdates","_rtlTextPluginCallback","event","_validateLayer","loadURL","isMapboxURL","normalizeStyleURL","_load","loadJSON","stylesheet","_serializeLayers","_updatedSources","hasTransitions","_checkLoaded","_changed","updatedIds","_updatedLayers","_removedLayers","_updateWorkerLayers","action","_reloadSource","_clearSource","_updatedPaintProps","setState","nextState","changes","unimplementedOps","isSourceLoaded","layerObject","_layerOrderChanged","_updateLayer","moveLayer","newIndex","getFilter","getLayoutProperty","wasDataDriven","_transitionablePaint","metadata","_flattenRenderedFeatures","sourceResults","sourceResult","layerFeatures","includedSources","addSourceType","SourceType","workerSourceURL","_update","_remove","_updateSources","_generateCollisionBoxes","_transitioningPaint","source-layer","subclasses","BackgroundStyleLayer","background-color","background-pattern","background-opacity","multiPolygonIntersectsBufferedMultiPoint","CircleStyleLayer","circleBucket","translatedPolygon","stroke","circle-radius","circle-color","circle-blur","circle-opacity","circle-translate","circle-translate-anchor","circle-pitch-scale","circle-pitch-alignment","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","multiPolygonIntersectsMultiPolygon","FillExtrusionStyleLayer","fill-extrusion-opacity","fill-extrusion-color","fill-extrusion-translate","fill-extrusion-translate-anchor","fill-extrusion-pattern","fill-extrusion-height","fill-extrusion-base","FillStyleLayer","fill-antialias","fill-opacity","fill-color","fill-outline-color","fill-translate","fill-translate-anchor","fill-pattern","HeatmapStyleLayer","_updateColorRamp","colorRampData","pxColor","heatmap-radius","heatmap-weight","heatmap-intensity","heatmap-color","heatmap-opacity","HillshadeStyleLayer","hillshade-illumination-direction","hillshade-illumination-anchor","hillshade-exaggeration","hillshade-shadow-color","hillshade-highlight-color","hillshade-accent-color","getLineWidth","lineGapWidth","offsetLine","newRings","zero","aToB","bToC","multiPolygonIntersectsBufferedMultiLine","LineFloorwidthProperty","lineFloorwidthProperty","LineStyleLayer","lineBucket","line-cap","line-join","line-miter-limit","line-round-limit","line-opacity","line-color","line-translate","line-translate-anchor","line-width","line-offset","line-blur","line-dasharray","line-pattern","RasterStyleLayer","raster-opacity","raster-hue-rotate","raster-brightness-min","raster-brightness-max","raster-saturation","raster-contrast","raster-fade-duration","resolveTokens","SymbolStyleLayer","unevaluated","symbol-placement","symbol-spacing","symbol-avoid-edges","icon-allow-overlap","icon-ignore-placement","icon-optional","icon-rotation-alignment","icon-size","icon-text-fit","icon-text-fit-padding","icon-image","icon-rotate","icon-padding","icon-keep-upright","icon-offset","icon-anchor","icon-pitch-alignment","text-pitch-alignment","text-rotation-alignment","text-field","text-font","text-size","text-max-width","text-line-height","text-letter-spacing","text-justify","text-anchor","text-max-angle","text-rotate","text-padding","text-keep-upright","text-transform","text-offset","text-allow-overlap","text-ignore-placement","text-optional","icon-translate","icon-translate-anchor","text-translate","text-translate-anchor","layerConfigs","_layerConfigs","layerConfig","sourceGroup","sourceLayerFamilies","emitter","floorZ","lastZoom","lastFloorZoom","checkMaxAngle","labelLength","windowSize","maxAngle","anchorDistance","recentCorners","recentAngleDelta","angleDelta","shift","clippedLines","clippedLine","p0","CollisionFeature","shaped","boxScale","alignLine","_addLineCollisionCircles","boxSize","nBoxes","overscalingPaddingFactor","nPitchPaddingBoxes","firstBoxOffset","labelStartDistance","paddingStartDistance","segmentLength","boxOffset","boxDistanceToAnchor","segmentBoxDistance","paddedAnchorDistance","markCollisionCircleUsed","collisionCircles","intersectionTests","viewportPadding","ignoredGrid","pitchfactor","placeCollisionBox","allowOverlap","projectedPoint","projectAndGetPerspectiveRatio","tileToViewport","perspectiveRatio","tlX","tlY","brX","brY","hitTest","approximateTileDistance","tileDistance","lastSegmentAngle","cameraToAnchorDistance","incidenceStretch","lastSegmentTile","lastSegmentViewportDistance","prevTileDistance","placeCollisionCircles","showCollisionCircles","placedCollisionCircles","projectedAnchor","projectAnchor","projectionCache","fontScale","tileUnitAnchorPoint","labelPlaneAnchorPoint","firstAndLastGlyph","placeFirstAndLastGlyph","collisionDetected","firstTileDistance","lastTileDistance","cameraDistance","tileUnitRadius","boxSignedDistanceFromAnchor","projectPoint","nextBoxDistanceToAnchor","collisionBoxArrayIndex","hitTestCircle","tileCoord","sourceLayerFeatures","keysLength","thisTileFeatures","boxIndex","ignoredFeatures","blocking","polygonIntersectsPolygon","insertCollisionBox","ignorePlacement","insertCollisionCircles","insertCircle","xyTransformMat4","roundingFactor","TileLayerIndex","instance","getScaledCoordinates","isDuplicate","textOpacityState","iconOpacityState","childTileID","getMatchingSymbol","childTileSymbol","childTileSymbolCoordinates","thisTileSymbol","forEachSymbolInstance","keyedSymbolInstances","CrossTileSymbolLayerIndex","indexes","addTile","tileIndex","zoomIndexes","childIndex","blockLabels","oldTileIndex","parentCoord","parentIndex","removedIndex","unblockLabels","copyParentOpacity","parentSymbolInstance","getAnchors","spacing","shapedText","shapedIcon","glyphSize","tileExtent","angleWindowSize","isLineContinued","fixedExtraOffset","resample","placeAtMiddle","halfLabelLength","markedDistance","anchors","segmentDist","cellSize","boxCells","circleCells","xCellCount","yCellCount","circleKeys","boxKeys","circles","xScale","yScale","boxUid","circleUid","_insertBoxCell","_insertCircleCell","_query","queryArgs","_queryCircle","_queryCellCircle","boxCell","circleCell","_circleAndRectCollide","_circlesCollide","_convertToXCellCoord","_convertToYCellCoord","r1","bothRadii","circleX","circleY","halfRectWidth","distX","halfRectHeight","distY","mergedFeatures","mergedIndex","mergeFromRight","leftKey","rightKey","rightIndex","mergeFromLeft","leftIndex","onRight","targetOpacity","signedDistanceFromCamera","isVisible","anchorPos","clippingBuffer","partiallyEvaluatedSize","placedSymbols","aspectRatio","useVertical","WritingMode","vertical","hideGlyphs","evaluateSizeForFeature","pitchScaledFontSize","tileAnchorPoint","placeUnflipped","placeGlyphsAlongLine","notEnoughRoom","needsFlipping","flip","returnTileDistance","glyphEndIndex","lineEndIndex","firstGlyphOffset","lastGlyphOffset","firstPlacedGlyph","placeGlyphAlongLine","lastPlacedGlyph","requiresOrientationChange","firstPoint","lastPoint","horizontal","placedGlyphs","orientationChange","glyphIndex","tileVertexIndex","tileSegmentEnd","projectedVertex","projectTruncatedLineSegment","singleGlyph","previousTilePoint","currentTilePoint","previousProjectedPoint","minimumLength","projectionMatrix","projectedUnitVertex","projectedUnitSegment","anchorSegment","combinedOffsetX","initialIndex","distanceToPrev","currentSegmentDistance","absOffsetX","previousLineVertexIndex","segmentInterpolationT","prevToCurrent","hiddenGlyphAttributes","getIconQuads","iconWidth","iconHeight","textLeft","textRight","textTop","textBottom","textWidth","textHeight","padT","padR","padB","padL","offsetY","getGlyphQuads","shaping","textRotate","textOffset","positionedGlyphs","positionedGlyph","rectBuffer","halfAdvance","builtInOffset","verticalRotation","xOffsetCorrection","breakLines","lineBreakPoints","lineBreak","substring","shapeText","maxWidth","lineHeight","textAnchor","textJustify","verticalHeight","logicalInput","trim","determineLineBreaks","shapeLines","determineAverageLineWidth","totalWidth","calculateBadness","targetWidth","penalty","isLastBreak","raggedness","calculatePenalty","codePoint","nextCodePoint","evaluateBreak","breakIndex","breakX","potentialBreaks","bestPriorBreak","bestBreakBadness","potentialBreak","breakBadness","badness","priorBreak","leastBadBreaks","lastLineBreak","potentialLineBreaks","currentX","whitespace","breakable","charAllowsIdeographicBreaking","getAnchorAlignment","horizontalAlign","verticalAlign","maxLineLength","justify","charHasUprightVerticalOrientation","justifyLine","align","lastAdvance","lineIndent","lineCount","shiftX","shiftY","shapeIcon","iconOffset","iconAnchor","horizontalOnly","glyphPositions","imagePositions","tilePixelRatio","compareText","sizes","zoomRange","compositeTextSizes","compositeIconSizes","layoutTextSize","layoutIconSize","textMaxSize","glyphPositionMap","shapedTextOrientations","spacingIfAllowed","allowsLetterSpacing","textBoxScale","textMaxBoxScale","iconBoxScale","symbolMinDistance","textPadding","iconPadding","textMaxAngle","iconAlongLine","symbolPlacement","textRepeatDistance","addSymbolAtAnchor","addSymbol","anchorIsTooClose","poi","findPoleOfInaccessibility","list$4","i$5","list$5","addTextVertices","lineArray","glyphQuads","numIconVertices","numGlyphVertices","numVerticalGlyphVertices","iconQuads","repeatDistance","otherAnchors","updateOpacity","opacityState","opacityUpdateTime","instant","increment","packOpacity","targetBit","opacityBits","shift25","shift24","shift17","shift16","shift9","shift8","shift1","glyphOpacityArray","iconOpacityArray","placedText","initialHidden","nowHidden","opacityEntryCount","packedOpacity","updateCollisionBox","placed","updateCollisionCircles","notUsed","collisionDebugBoxArray","collisionDebugCircleArray","partiallyEvaluatedTextSize","iconWithoutText","textWithoutIcon","placedGlyphBox","placedIconBox","placedGlyphCircles","placedCircles","placeGlyph","placeIcon","layoutSize","levels","propertyValue","sizeRange","toLocaleUpperCase","toLocaleLowerCase","DOM","handlers","scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","onMouseOut","fireMouseEvent","onMouseDown","isActive","mousePos","el","mouseDown","onMouseUp","contextMenuEvent","onMouseMove","target","toElement","parentNode","onTouchStart","fireTouchEvent","touches","tapped","onTouchTimeout","onTouchMove","onTouchEnd","onTouchCancel","onClick","onDblClick","preventDefault","onContextMenu","lngLat","originalEvent","touchPos","singular","curr","lngLats","getCanvasContainer","interactive","Camera","moving","_bearingSnap","bearingSnap","eventData","jumpTo","panBy","panTo","easeTo","zoomIn","zoomOut","getBearing","rotateTo","resetNorth","snapToNorth","getPitch","fitBounds","paddingOffset","lateralPadding","verticalPadding","nw","se","scaleX","scaleY","linear","flyTo","zoomChanged","bearingChanged","pitchChanged","easing","ease","smoothEasing","_smoothOutEasing","startZoom","startBearing","startPitch","_normalizeBearing","pointAtOffset","locationAtOffset","_normalizeCenter","around","aroundPoint","finalScale","pitching","_prepareEase","noMoveStart","_onEaseEnd","_ease","speedup","newCenter","_fireMoveEvents","delayEndEvents","_easeToEnd","wasZooming","wasPitching","rho2","u1","sinh","cosh","tanh","speed","curve","rho","wMax","r0","screenSpeed","maxDuration","isEasing","_easeFn","isMoving","_finishEase","_easeStart","_finishFn","_easeOptions","_updateEase","currentBearing","_prevEase","bezier","getDefaultPosition","compact","_map","_container","classList","_updateAttributions","_updateEditLink","_updateData","_updateCompact","editLink","_editLink","querySelector","styleOwner","styleId","paramString","acc","_hash","getHashString","attributions","owner","attribution","attrib","innerHTML","offsetWidth","_fullscreen","_fullscreenchange","_className","_mapContainer","getContainer","_checkFullscreenSupport","_setupUI","display","removeEventListener","_changeIcon","fullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","webkitFullscreenEnabled","button","_fullscreenButton","setAttribute","_onClickFullscreen","_isFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","toggle","exitFullscreen","mozCancelFullScreen","msExitFullscreen","webkitCancelFullScreen","requestFullscreen","mozRequestFullScreen","msRequestFullscreen","webkitRequestFullscreen","checkGeolocationSupport","supportsGeolocation","permissions","then","geolocation","defaultOptions","positionOptions","enableHighAccuracy","fitBoundsOptions","trackUserLocation","showUserLocation","className","_geolocationWatchID","clearWatch","_userLocationDotMarker","_onSuccess","_lastKnownPosition","_watchState","_geolocateButton","_updateMarker","_updateCamera","_dotElement","_finish","longitude","latitude","accuracy","geolocateSource","setLngLat","addTo","_onError","code","_clearWatch","_timeoutId","_onClickGeolocate","watchPosition","getCurrentPosition","LogoControl","appendChild","_updateLogo","_logoRequired","mapbox_logo","DragRotateHandler","_zoomInButton","_createButton","_zoomOutButton","_compass","_compassArrow","_rotateCompassArrow","_handler","element","ariaLabel","updateScale","container","clientHeight","maxMeters","getDistance","maxFeet","setScale","maxNauticals","maxDistance","getRoundNum","ratio","latlng1","latlng2","lat1","lat2","pow10","_onMove","BoxZoomHandler","_el","isEnabled","_enabled","_active","_onMouseDown","shiftKey","_onMouseMove","_onKeyDown","_onMouseUp","disableDrag","_startPos","_box","_fireEvent","setTransform","boxZoomBounds","keyCode","enableDrag","DoubleClickZoomHandler","_onDblClick","_onZoomEnd","inertiaLinearity","inertiaEasing","inertiaMaxSpeed","inertiaDeceleration","DragPanHandler","_onDown","_ignoreEvent","_onTouchEnd","_pos","_inertia","_drainInertiaBuffer","_onUp","inertia","flingOffset","flingDuration","velocity","ctrlKey","_button","_pitchWithRotate","pitchWithRotate","eventButton","InstallTrigger","platform","capture","bearingDiff","pitchDiff","mapBearing","previous","flingDiff","sign","easeOut","panStep","bearingStep","pitchStep","KeyboardHandler","altKey","metaKey","zoomDir","bearingDir","pitchDir","xDir","yDir","easeOptions","ua","firefox","safari","ScrollZoomHandler","_onWheel","_aroundCenter","deltaY","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","wheelDeltaY","timeDelta","_time","_type","_lastValue","_timeout","_onTimeout","targetZoom","significantScaleThreshold","significantRotateThreshold","TouchZoomRotateHandler","_onStart","disableRotation","_rotationDisabled","enableRotation","_startVec","_startScale","_startBearing","_gestureIntent","_onEnd","vec","param","scalingSignificantly","lastScale","firstScale","scaleOffset","scaleDuration","targetScale","throttle","Hash","_updateHash","_updateHashUnthrottled","_onHashChange","mapFeedback","LN10","loc","location","history","replaceState","node","removeChild","HTMLElement","bindHandlers","defaultMinZoom","defaultMaxZoom","attributionControl","preserveDrawingBuffer","trackResize","refreshExpiredTiles","maxTileCacheSize","transformRequest","_interactive","_failIfMajorPerformanceCaveat","_preserveDrawingBuffer","_trackResize","_fadeDuration","_crossFadingFactor","transformRequestFn","maxBounds","setMaxBounds","_setupContainer","_setupPainter","_onWindowOnline","_onWindowResize","addControl","logoPosition","_onData","_onDataLoading","control","controlElement","positionContainer","_controlPositions","insertBefore","firstChild","removeControl","_containerDimensions","_resizeCanvas","getBounds","getMaxBounds","lnglatbounds","setMinZoom","getMinZoom","setMaxZoom","getMaxZoom","listener","delegatedListener","mousein","delegates","mousemove","mouseout","delegate","_delegatedListeners","_makeQueryGeometry","pointOrBox","getStyle","isStyleLoaded","areTilesLoaded","hasImage","loadImage","beforeId","_canvasContainer","_canvas","offsetHeight","_missingCSSContainer","canvasContainer","_contextLost","_contextRestored","controlContainer","_controlContainer","positionName","_frameId","cancelFrame","_styleDirty","_sourcesDirty","updateStyle","_render","crossFading","factor","_placementDirty","_repaint","extension","loseContext","_showTileBoundaries","repaint","_vertices","smartWrap","_offset","svg","createNS","setAttributeNS","markerLarge","page1","shadow","ellipses","rx","ry","ellipse","bgPath","borderPath","maki","circleContainer","circle1","circle2","_element","_popup","_onMapClick","getLngLat","_lngLat","getElement","setPopup","popup","targetElement","togglePopup","getPopup","isOpen","getOffset","setOffset","normalizeOffset","cornerOffset","top-left","top-right","bottom-left","bottom-right","convertedOffset","closeButton","closeOnClick","_onClickClose","_content","setText","setDOMContent","createTextNode","setHTML","html","frag","createDocumentFragment","temp","htmlNode","_createContent","_closeButton","_tip","offsetedPos","anchorTranslate","callbacks","callbackID","receive","targetMapId","postMessage","sourceMapId","workerSource","makeRequest","requestParameters","XMLHttpRequest","open","headers","setRequestHeader","withCredentials","credentials","sameOrigin","protocol","host","Unknown","AJAXError","onerror","statusText","onload","responseType","getResponseHeader","transparentPngUrl","onloadstart","crossOrigin","performance","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","cancel","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","msCancelAnimationFrame","drawImage","supportsWebp","webpImgTest","WebWorkify","compareAreas","quickselect","calculateSignedArea","maxRings","API_URL","REQUIRE_ACCESS_TOKEN","strings","_stringToNumber","_numberToString","workerPool","actors","currentActor","workers","acquire","targetID","release","testProp","docStyle","tagName","namespaceURI","createElementNS","documentElement","selectProp","userSelect","transformProp","suppressClick","stopPropagation","getBoundingClientRect","clientX","clientLeft","clientY","clientTop","changedTouches","_addEventListener","listenerList","_removeEventListener","_listeners","_oneTimeListeners","listens","oneTimeListeners","listener$1","_eventedParent","_eventedParentData","compareMax","Cell","pointToPolygonDist","SQRT2","minDistSq","distToSegmentSquared","getCentroidCell","Queue","polygonRings","outerRing","cellQueue","bestCell","numProbes","WorkerPool","globalWorkerPool","createImage","channels","resizeImage","newImage","copyImage","srcImg","dstImg","srcPt","dstPt","srcData","dstData","srcOffset","dstOffset","polygonA","polygonB","polygonContainsPoint","lineIntersectsLine","multiPolygon","pointIntersectsBufferedLine","multiPolygonA","multiPolygonB","multiPolygonContainsPoint","multiLine","lineIntersectsBufferedLine","lineA","lineB","lineSegmentIntersectsLineSegment","isCounterClockwise","radiusSquared","l2","unicodeBlockLookup","Latin-1 Supplement","Arabic","Arabic Supplement","Arabic Extended-A","Hangul Jamo","Unified Canadian Aboriginal Syllabics","Unified Canadian Aboriginal Syllabics Extended","General Punctuation","Letterlike Symbols","Number Forms","Miscellaneous Technical","Control Pictures","Optical Character Recognition","Enclosed Alphanumerics","Geometric Shapes","Miscellaneous Symbols","Miscellaneous Symbols and Arrows","CJK Radicals Supplement","Kangxi Radicals","Ideographic Description Characters","CJK Symbols and Punctuation","Hiragana","Katakana","Bopomofo","Hangul Compatibility Jamo","Kanbun","Bopomofo Extended","CJK Strokes","Katakana Phonetic Extensions","Enclosed CJK Letters and Months","CJK Compatibility","CJK Unified Ideographs Extension A","Yijing Hexagram Symbols","CJK Unified Ideographs","Yi Syllables","Yi Radicals","Hangul Jamo Extended-A","Hangul Syllables","Hangul Jamo Extended-B","Private Use Area","CJK Compatibility Ideographs","Arabic Presentation Forms-A","Vertical Forms","CJK Compatibility Forms","Small Form Variants","Arabic Presentation Forms-B","Halfwidth and Fullwidth Forms","LRUCache","removedData","makeAPIURL","urlObject","apiUrlObject","parseUrl","authority","formatUrl","help","replaceTempAccessToken","parts","urlRe","imageExtensionRe","tileURL","sourceURL","suffix","allowsIdeographicBreaking","chars","charAllowsLetterSpacing","charHasNeutralVerticalOrientation","charHasRotatedVerticalOrientation","priorPos","alignment","typeSize","sizeOf","memberOffset","viewTypes","BYTES_PER_ELEMENT","Int8Array","structArray","_pos8","DEFAULT_CAPACITY","RESIZE_MULTIPLIER","isTransferred","capacity","transferables","_trim","oldUint8Array","pending","later","scanLine","scanTriangle","edge","scanSpans","e0","ymin","ymax","m0","d0","d1","ab","bc","ca","remaining","fns","dMax","iterator","warnOnceHistory","isClosedPolygon","polar","header","$0","$1","$2","$3","maxAge","Feature","vectorTileFeature","_vectorTileFeature","_z","_x","_y","nextCharCode","prevCharCode","¢","£","¥","¦","¬","¯","","—","","","“","”","…","‧","₩","、","。","〈","〉","《","》","「","」","『","』","【","】","","","〖","〗","","","","","","","","","","","","","","_","","","","⦅","⦆","。","「","」","writeable","registry","view","_classRegistryKey","_serialized","WebWorker","active"],"mappings":"AAAA;AGKA,QAASA,UAASC,GACd,GAAcC,GAAVC,EAAO,CACX,QAAQF,EAAEG,MACN,IAAK,UACD,MAAOC,aAAYJ,EAAEK,YACzB,KAAK,eACD,IAAKJ,EAAI,EAAGA,EAAID,EAAEK,YAAYC,OAAQL,IAClCC,GAAQE,YAAYJ,EAAEK,YAAYJ,GAEtC,OA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I,QAAO,SAACz2D,GAAe,GAAAvgD,GAAAloC,IACnB,KAAKA,KAAKi/I,QAAS,CAInB,GAAU5uF,GAAc9wD,QAAQ,OAAO8wD,WAIvC,KADArwD,KAASi/I,WACEj/I,KAAKi/I,QAAQ5gJ,OAASgyD,GACzBrwD,EAAKi/I,QAAQ3wI,KAAK,GAAI2gJ,YAK9B,MADAjvJ,MAAKkvJ,OAAOzmE,IAAS,EACdzoF,KAAKi/I,QAAQ9/H,SAG5B0iI,WAAI76I,UAAAo4I,QAAO,SAAC32D,SACGzoF,MAAKkvJ,OAAOzmE,GACqB,IAApC5gF,OAAOC,KAAK9H,KAAKkvJ,QAAQ7wJ,SACzB2B,KAAKi/I,QAAQ93I,QAAQ,SAAC1G,GACtBA,EAAM2I,cAENpJ,KAAKi/I,QAAW,OAK5Bz/I,OAAOC,QAAUoiJ","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","module.exports={\"version\":\"0.43.0\"}","module.exports={\"$version\":8,\"$root\":{\"version\":{\"required\":true,\"type\":\"enum\",\"values\":[8]},\"name\":{\"type\":\"string\"},\"metadata\":{\"type\":\"*\"},\"center\":{\"type\":\"array\",\"value\":\"number\"},\"zoom\":{\"type\":\"number\"},\"bearing\":{\"type\":\"number\",\"default\":0,\"period\":360,\"units\":\"degrees\"},\"pitch\":{\"type\":\"number\",\"default\":0,\"units\":\"degrees\"},\"light\":{\"type\":\"light\"},\"sources\":{\"required\":true,\"type\":\"sources\"},\"sprite\":{\"type\":\"string\"},\"glyphs\":{\"type\":\"string\"},\"transition\":{\"type\":\"transition\"},\"layers\":{\"required\":true,\"type\":\"array\",\"value\":\"layer\"}},\"sources\":{\"*\":{\"type\":\"source\"}},\"source\":[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\",\"source_canvas\"],\"source_vector\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"vector\":{}}},\"url\":{\"type\":\"string\"},\"tiles\":{\"type\":\"array\",\"value\":\"string\"},\"bounds\":{\"type\":\"array\",\"value\":\"number\",\"length\":4,\"default\":[-180,-85.0511,180,85.0511]},\"minzoom\":{\"type\":\"number\",\"default\":0},\"maxzoom\":{\"type\":\"number\",\"default\":22},\"attribution\":{\"type\":\"string\"},\"*\":{\"type\":\"*\"}},\"source_raster\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"raster\":{}}},\"url\":{\"type\":\"string\"},\"tiles\":{\"type\":\"array\",\"value\":\"string\"},\"bounds\":{\"type\":\"array\",\"value\":\"number\",\"length\":4,\"default\":[-180,-85.0511,180,85.0511]},\"minzoom\":{\"type\":\"number\",\"default\":0},\"maxzoom\":{\"type\":\"number\",\"default\":22},\"tileSize\":{\"type\":\"number\",\"default\":512,\"units\":\"pixels\"},\"scheme\":{\"type\":\"enum\",\"values\":{\"xyz\":{},\"tms\":{}},\"default\":\"xyz\"},\"attribution\":{\"type\":\"string\"},\"*\":{\"type\":\"*\"}},\"source_raster_dem\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"raster-dem\":{}}},\"url\":{\"type\":\"string\"},\"tiles\":{\"type\":\"array\",\"value\":\"string\"},\"bounds\":{\"type\":\"array\",\"value\":\"number\",\"length\":4,\"default\":[-180,-85.0511,180,85.0511]},\"minzoom\":{\"type\":\"number\",\"default\":0},\"maxzoom\":{\"type\":\"number\",\"default\":22},\"tileSize\":{\"type\":\"number\",\"default\":512,\"units\":\"pixels\"},\"attribution\":{\"type\":\"string\"},\"*\":{\"type\":\"*\"}},\"source_geojson\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"geojson\":{}}},\"data\":{\"type\":\"*\"},\"maxzoom\":{\"type\":\"number\",\"default\":18},\"buffer\":{\"type\":\"number\",\"default\":128,\"maximum\":512,\"minimum\":0},\"tolerance\":{\"type\":\"number\",\"default\":0.375},\"cluster\":{\"type\":\"boolean\",\"default\":false},\"clusterRadius\":{\"type\":\"number\",\"default\":50,\"minimum\":0},\"clusterMaxZoom\":{\"type\":\"number\"}},\"source_video\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"video\":{}}},\"urls\":{\"required\":true,\"type\":\"array\",\"value\":\"string\"},\"coordinates\":{\"required\":true,\"type\":\"array\",\"length\":4,\"value\":{\"type\":\"array\",\"length\":2,\"value\":\"number\"}}},\"source_image\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"image\":{}}},\"url\":{\"required\":true,\"type\":\"string\"},\"coordinates\":{\"required\":true,\"type\":\"array\",\"length\":4,\"value\":{\"type\":\"array\",\"length\":2,\"value\":\"number\"}}},\"source_canvas\":{\"type\":{\"required\":true,\"type\":\"enum\",\"values\":{\"canvas\":{}}},\"coordinates\":{\"required\":true,\"type\":\"array\",\"length\":4,\"value\":{\"type\":\"array\",\"length\":2,\"value\":\"number\"}},\"animate\":{\"type\":\"boolean\",\"default\":\"true\"},\"canvas\":{\"type\":\"string\",\"required\":true}},\"layer\":{\"id\":{\"type\":\"string\",\"required\":true},\"type\":{\"type\":\"enum\",\"values\":{\"fill\":{},\"line\":{},\"symbol\":{},\"circle\":{},\"heatmap\":{},\"fill-extrusion\":{},\"raster\":{},\"hillshade\":{},\"background\":{}},\"required\":true},\"metadata\":{\"type\":\"*\"},\"source\":{\"type\":\"string\"},\"source-layer\":{\"type\":\"string\"},\"minzoom\":{\"type\":\"number\",\"minimum\":0,\"maximum\":24},\"maxzoom\":{\"type\":\"number\",\"minimum\":0,\"maximum\":24},\"filter\":{\"type\":\"filter\"},\"layout\":{\"type\":\"layout\"},\"paint\":{\"type\":\"paint\"}},\"layout\":[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],\"layout_background\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_fill\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_circle\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_heatmap\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_fill-extrusion\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_line\":{\"line-cap\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"butt\":{},\"round\":{},\"square\":{}},\"default\":\"butt\"},\"line-join\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"values\":{\"bevel\":{},\"round\":{},\"miter\":{}},\"default\":\"miter\"},\"line-miter-limit\":{\"type\":\"number\",\"default\":2,\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[{\"line-join\":\"miter\"}]},\"line-round-limit\":{\"type\":\"number\",\"default\":1.05,\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[{\"line-join\":\"round\"}]},\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_symbol\":{\"symbol-placement\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"point\":{},\"line\":{}},\"default\":\"point\"},\"symbol-spacing\":{\"type\":\"number\",\"default\":250,\"minimum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"units\":\"pixels\",\"requires\":[{\"symbol-placement\":\"line\"}]},\"symbol-avoid-edges\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false},\"icon-allow-overlap\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"icon-image\"]},\"icon-ignore-placement\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"icon-image\"]},\"icon-optional\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"icon-image\",\"text-field\"]},\"icon-rotation-alignment\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{},\"auto\":{}},\"default\":\"auto\",\"requires\":[\"icon-image\"]},\"icon-size\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"units\":\"factor of the original icon size\",\"requires\":[\"icon-image\"]},\"icon-text-fit\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"none\":{},\"width\":{},\"height\":{},\"both\":{}},\"default\":\"none\",\"requires\":[\"icon-image\",\"text-field\"]},\"icon-text-fit-padding\":{\"type\":\"array\",\"value\":\"number\",\"length\":4,\"default\":[0,0,0,0],\"units\":\"pixels\",\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}]},\"icon-image\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"tokens\":true},\"icon-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"units\":\"degrees\",\"requires\":[\"icon-image\"]},\"icon-padding\":{\"type\":\"number\",\"default\":2,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-keep-upright\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":\"line\"}]},\"icon-offset\":{\"type\":\"array\",\"value\":\"number\",\"units\":\"pixels multiplied by the value of \\\"icon-size\\\"\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"requires\":[\"icon-image\"]},\"icon-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"values\":{\"center\":{},\"left\":{},\"right\":{},\"top\":{},\"bottom\":{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},\"default\":\"center\",\"requires\":[\"icon-image\"]},\"icon-pitch-alignment\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{},\"auto\":{}},\"default\":\"auto\",\"requires\":[\"icon-image\"]},\"text-pitch-alignment\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{},\"auto\":{}},\"default\":\"auto\",\"requires\":[\"text-field\"]},\"text-rotation-alignment\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{},\"auto\":{}},\"default\":\"auto\",\"requires\":[\"text-field\"]},\"text-field\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"default\":\"\",\"tokens\":true},\"text-font\":{\"type\":\"array\",\"value\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"default\":[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],\"requires\":[\"text-field\"]},\"text-size\":{\"type\":\"number\",\"default\":16,\"minimum\":0,\"units\":\"pixels\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"requires\":[\"text-field\"]},\"text-max-width\":{\"type\":\"number\",\"default\":10,\"minimum\":0,\"units\":\"ems\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"requires\":[\"text-field\"]},\"text-line-height\":{\"type\":\"number\",\"default\":1.2,\"units\":\"ems\",\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[\"text-field\"]},\"text-letter-spacing\":{\"type\":\"number\",\"default\":0,\"units\":\"ems\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"requires\":[\"text-field\"]},\"text-justify\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"values\":{\"left\":{},\"center\":{},\"right\":{}},\"default\":\"center\",\"requires\":[\"text-field\"]},\"text-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"values\":{\"center\":{},\"left\":{},\"right\":{},\"top\":{},\"bottom\":{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},\"default\":\"center\",\"requires\":[\"text-field\"]},\"text-max-angle\":{\"type\":\"number\",\"default\":45,\"units\":\"degrees\",\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[\"text-field\",{\"symbol-placement\":\"line\"}]},\"text-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"units\":\"degrees\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"requires\":[\"text-field\"]},\"text-padding\":{\"type\":\"number\",\"default\":2,\"minimum\":0,\"units\":\"pixels\",\"function\":\"interpolated\",\"zoom-function\":true,\"requires\":[\"text-field\"]},\"text-keep-upright\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true,\"requires\":[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":\"line\"}]},\"text-transform\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"property-function\":true,\"values\":{\"none\":{},\"uppercase\":{},\"lowercase\":{}},\"default\":\"none\",\"requires\":[\"text-field\"]},\"text-offset\":{\"type\":\"array\",\"value\":\"number\",\"units\":\"ems\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"length\":2,\"default\":[0,0],\"requires\":[\"text-field\"]},\"text-allow-overlap\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"text-field\"]},\"text-ignore-placement\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"text-field\"]},\"text-optional\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":false,\"requires\":[\"text-field\",\"icon-image\"]},\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_raster\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"layout_hillshade\":{\"visibility\":{\"type\":\"enum\",\"values\":{\"visible\":{},\"none\":{}},\"default\":\"visible\"}},\"filter\":{\"type\":\"array\",\"value\":\"*\"},\"filter_operator\":{\"type\":\"enum\",\"values\":{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},\"in\":{},\"!in\":{},\"all\":{},\"any\":{},\"none\":{},\"has\":{},\"!has\":{}}},\"geometry_type\":{\"type\":\"enum\",\"values\":{\"Point\":{},\"LineString\":{},\"Polygon\":{}}},\"function\":{\"expression\":{\"type\":\"expression\"},\"stops\":{\"type\":\"array\",\"value\":\"function_stop\"},\"base\":{\"type\":\"number\",\"default\":1,\"minimum\":0},\"property\":{\"type\":\"string\",\"default\":\"$zoom\"},\"type\":{\"type\":\"enum\",\"values\":{\"identity\":{},\"exponential\":{},\"interval\":{},\"categorical\":{}},\"default\":\"exponential\"},\"colorSpace\":{\"type\":\"enum\",\"values\":{\"rgb\":{},\"lab\":{},\"hcl\":{}},\"default\":\"rgb\"},\"default\":{\"type\":\"*\",\"required\":false}},\"function_stop\":{\"type\":\"array\",\"minimum\":0,\"maximum\":22,\"value\":[\"number\",\"color\"],\"length\":2},\"expression\":{\"type\":\"array\",\"value\":\"*\",\"minimum\":1},\"expression_name\":{\"type\":\"enum\",\"values\":{\"let\":{\"group\":\"Variable binding\"},\"var\":{\"group\":\"Variable binding\"},\"literal\":{\"group\":\"Types\"},\"array\":{\"group\":\"Types\"},\"at\":{\"group\":\"Lookup\"},\"case\":{\"group\":\"Decision\"},\"match\":{\"group\":\"Decision\"},\"coalesce\":{\"group\":\"Decision\"},\"step\":{\"group\":\"Ramps, scales, curves\"},\"interpolate\":{\"group\":\"Ramps, scales, curves\"},\"ln2\":{\"group\":\"Math\"},\"pi\":{\"group\":\"Math\"},\"e\":{\"group\":\"Math\"},\"typeof\":{\"group\":\"Types\"},\"string\":{\"group\":\"Types\"},\"number\":{\"group\":\"Types\"},\"boolean\":{\"group\":\"Types\"},\"object\":{\"group\":\"Types\"},\"to-string\":{\"group\":\"Types\"},\"to-number\":{\"group\":\"Types\"},\"to-boolean\":{\"group\":\"Types\"},\"to-rgba\":{\"group\":\"Color\"},\"to-color\":{\"group\":\"Types\"},\"rgb\":{\"group\":\"Color\"},\"rgba\":{\"group\":\"Color\"},\"get\":{\"group\":\"Lookup\"},\"has\":{\"group\":\"Lookup\"},\"length\":{\"group\":\"Lookup\"},\"properties\":{\"group\":\"Feature data\"},\"geometry-type\":{\"group\":\"Feature data\"},\"id\":{\"group\":\"Feature data\"},\"zoom\":{\"group\":\"Zoom\"},\"heatmap-density\":{\"group\":\"Heatmap\"},\"+\":{\"group\":\"Math\"},\"*\":{\"group\":\"Math\"},\"-\":{\"group\":\"Math\"},\"/\":{\"group\":\"Math\"},\"%\":{\"group\":\"Math\"},\"^\":{\"group\":\"Math\"},\"sqrt\":{\"group\":\"Math\"},\"log10\":{\"group\":\"Math\"},\"ln\":{\"group\":\"Math\"},\"log2\":{\"group\":\"Math\"},\"sin\":{\"group\":\"Math\"},\"cos\":{\"group\":\"Math\"},\"tan\":{\"group\":\"Math\"},\"asin\":{\"group\":\"Math\"},\"acos\":{\"group\":\"Math\"},\"atan\":{\"group\":\"Math\"},\"min\":{\"group\":\"Math\"},\"max\":{\"group\":\"Math\"},\"==\":{\"group\":\"Decision\"},\"!=\":{\"group\":\"Decision\"},\">\":{\"group\":\"Decision\"},\"<\":{\"group\":\"Decision\"},\">=\":{\"group\":\"Decision\"},\"<=\":{\"group\":\"Decision\"},\"all\":{\"group\":\"Decision\"},\"any\":{\"group\":\"Decision\"},\"!\":{\"group\":\"Decision\"},\"upcase\":{\"group\":\"String\"},\"downcase\":{\"group\":\"String\"},\"concat\":{\"group\":\"String\"}}},\"light\":{\"anchor\":{\"type\":\"enum\",\"default\":\"viewport\",\"values\":{\"map\":{},\"viewport\":{}},\"transition\":false,\"zoom-function\":true,\"property-function\":false,\"function\":\"piecewise-constant\"},\"position\":{\"type\":\"array\",\"default\":[1.15,210,30],\"length\":3,\"value\":\"number\",\"transition\":true,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false},\"color\":{\"type\":\"color\",\"default\":\"#ffffff\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"intensity\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint\":[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],\"paint_fill\":{\"fill-antialias\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true},\"fill-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"}]},\"fill-outline-color\":{\"type\":\"color\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"},{\"fill-antialias\":true}]},\"fill-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-translate\"]},\"fill-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-extrusion-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-extrusion-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"fill-extrusion-height\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true},\"fill-extrusion-base\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true,\"requires\":[\"fill-extrusion-height\"]}},\"paint_line\":{\"line-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"line-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"line-pattern\"}]},\"line-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"line-translate\"]},\"line-width\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-gap-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-offset\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-dasharray\":{\"type\":\"array\",\"value\":\"number\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"minimum\":0,\"transition\":true,\"units\":\"line widths\",\"requires\":[{\"!\":\"line-pattern\"}]},\"line-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_circle\":{\"circle-radius\":{\"type\":\"number\",\"default\":5,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-blur\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"circle-translate\"]},\"circle-pitch-scale\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\"},\"circle-pitch-alignment\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"viewport\"},\"circle-stroke-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-stroke-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-stroke-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true}},\"paint_heatmap\":{\"heatmap-radius\":{\"type\":\"number\",\"default\":30,\"minimum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"heatmap-weight\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":false},\"heatmap-intensity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"heatmap-color\":{\"type\":\"color\",\"default\":[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",0.1,\"royalblue\",0.3,\"cyan\",0.5,\"lime\",0.7,\"yellow\",1,\"red\"],\"function\":\"interpolated\",\"zoom-function\":false,\"property-function\":false,\"transition\":false},\"heatmap-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint_symbol\":{\"icon-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"icon-image\",\"icon-translate\"]},\"text-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"text-field\",\"text-translate\"]}},\"paint_raster\":{\"raster-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-hue-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"degrees\"},\"raster-brightness-min\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":0,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-brightness-max\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-saturation\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-contrast\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-fade-duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":false,\"units\":\"milliseconds\"}},\"paint_hillshade\":{\"hillshade-illumination-direction\":{\"type\":\"number\",\"default\":335,\"minimum\":0,\"maximum\":359,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"hillshade-illumination-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"viewport\"},\"hillshade-exaggeration\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"hillshade-shadow-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"hillshade-highlight-color\":{\"type\":\"color\",\"default\":\"#FFFFFF\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"hillshade-accent-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"paint_background\":{\"background-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"requires\":[{\"!\":\"background-pattern\"}]},\"background-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"background-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"transition\":{\"duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"units\":\"milliseconds\"},\"delay\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"units\":\"milliseconds\"}}}","var wgs84 = require('wgs84');\n\nmodule.exports.geometry = geometry;\nmodule.exports.ring = ringArea;\n\nfunction geometry(_) {\n var area = 0, i;\n switch (_.type) {\n case 'Polygon':\n return polygonArea(_.coordinates);\n case 'MultiPolygon':\n for (i = 0; i < _.coordinates.length; i++) {\n area += polygonArea(_.coordinates[i]);\n }\n return area;\n case 'Point':\n case 'MultiPoint':\n case 'LineString':\n case 'MultiLineString':\n return 0;\n case 'GeometryCollection':\n for (i = 0; i < _.geometries.length; i++) {\n area += geometry(_.geometries[i]);\n }\n return area;\n }\n}\n\nfunction polygonArea(coords) {\n var area = 0;\n if (coords && coords.length > 0) {\n area += Math.abs(ringArea(coords[0]));\n for (var i = 1; i < coords.length; i++) {\n area -= Math.abs(ringArea(coords[i]));\n }\n }\n return area;\n}\n\n/**\n * Calculate the approximate area of the polygon were it projected onto\n * the earth. Note that this area will be positive if ring is oriented\n * clockwise, otherwise it will be negative.\n *\n * Reference:\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409\n *\n * Returns:\n * {float} The approximate signed geodesic area of the polygon in square\n * meters.\n */\n\nfunction ringArea(coords) {\n var p1, p2, p3, lowerIndex, middleIndex, upperIndex, i,\n area = 0,\n coordsLength = coords.length;\n\n if (coordsLength > 2) {\n for (i = 0; i < coordsLength; i++) {\n if (i === coordsLength - 2) {// i = N-2\n lowerIndex = coordsLength - 2;\n middleIndex = coordsLength -1;\n upperIndex = 0;\n } else if (i === coordsLength - 1) {// i = N-1\n lowerIndex = coordsLength - 1;\n middleIndex = 0;\n upperIndex = 1;\n } else { // i = 0 to N-3\n lowerIndex = i;\n middleIndex = i+1;\n upperIndex = i+2;\n }\n p1 = coords[lowerIndex];\n p2 = coords[middleIndex];\n p3 = coords[upperIndex];\n area += ( rad(p3[0]) - rad(p1[0]) ) * Math.sin( rad(p2[1]));\n }\n\n area = area * wgs84.RADIUS * wgs84.RADIUS / 2;\n }\n\n return area;\n}\n\nfunction rad(_) {\n return _ * Math.PI / 180;\n}","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.glMatrix = factory());\n}(this, (function () { 'use strict';\n\nfunction create() {\n var out = new Float32Array(3);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n return out;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction transformMat3(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n\n\n\n\nvar vec = create();\n\nfunction create$1() {\n var out = new Float32Array(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n return out;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction scale$1(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n\n\n\n\n\n\n\nfunction normalize$1(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var len = x * x + y * y + z * z + w * w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n }\n return out;\n}\n\n\n\nfunction transformMat4$1(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n\nvar vec$1 = create$1();\n\nfunction create$2() {\n var out = new Float32Array(4);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n\n\n\n\n\n\n\n\n\n\nfunction rotate(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\nfunction scale$2(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n\nfunction create$3() {\n var out = new Float32Array(9);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction fromRotation$1(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\nfunction create$4() {\n var out = new Float32Array(16);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n\n\n\nfunction identity$2(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\nfunction invert$2(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n\n\nfunction multiply$4(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\nfunction translate$1(out, a, v) {\n var x = v[0], y = v[1], z = v[2],\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n}\nfunction scale$4(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\nfunction rotateX$1(out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n if (a !== out) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n\nfunction rotateZ$1(out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n if (a !== out) {\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n return out;\n}\n\nfunction ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n\nvar mapboxBuild = {\n vec3: {\n transformMat3: transformMat3\n },\n vec4: {\n transformMat4: transformMat4$1\n },\n mat2: {\n create: create$2,\n rotate: rotate,\n scale: scale$2\n },\n mat3: {\n create: create$3,\n fromRotation: fromRotation$1\n },\n mat4: {\n create: create$4,\n identity: identity$2,\n translate: translate$1,\n scale: scale$4,\n multiply: multiply$4,\n perspective: perspective,\n rotateX: rotateX$1,\n rotateZ: rotateZ$1,\n invert: invert$2,\n ortho: ortho\n }\n};\n\nreturn mapboxBuild;\n\n})));\n","'use strict';\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = isSupported;\n} else if (window) {\n window.mapboxgl = window.mapboxgl || {};\n window.mapboxgl.supported = isSupported;\n}\n\n/**\n * Test whether the current browser supports Mapbox GL JS\n * @param {Object} options\n * @param {boolean} [options.failIfMajorPerformanceCaveat=false] Return `false`\n * if the performance of Mapbox GL JS would be dramatically worse than\n * expected (i.e. a software renderer is would be used)\n * @return {boolean}\n */\nfunction isSupported(options) {\n return !!(\n isBrowser() &&\n isArraySupported() &&\n isFunctionSupported() &&\n isObjectSupported() &&\n isJSONSupported() &&\n isWorkerSupported() &&\n isUint8ClampedArraySupported() &&\n isWebGLSupportedCached(options && options.failIfMajorPerformanceCaveat)\n );\n}\n\nfunction isBrowser() {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\nfunction isArraySupported() {\n return (\n Array.prototype &&\n Array.prototype.every &&\n Array.prototype.filter &&\n Array.prototype.forEach &&\n Array.prototype.indexOf &&\n Array.prototype.lastIndexOf &&\n Array.prototype.map &&\n Array.prototype.some &&\n Array.prototype.reduce &&\n Array.prototype.reduceRight &&\n Array.isArray\n );\n}\n\nfunction isFunctionSupported() {\n return Function.prototype && Function.prototype.bind;\n}\n\nfunction isObjectSupported() {\n return (\n Object.keys &&\n Object.create &&\n Object.getPrototypeOf &&\n Object.getOwnPropertyNames &&\n Object.isSealed &&\n Object.isFrozen &&\n Object.isExtensible &&\n Object.getOwnPropertyDescriptor &&\n Object.defineProperty &&\n Object.defineProperties &&\n Object.seal &&\n Object.freeze &&\n Object.preventExtensions\n );\n}\n\nfunction isJSONSupported() {\n return 'JSON' in window && 'parse' in JSON && 'stringify' in JSON;\n}\n\nfunction isWorkerSupported() {\n if (!('Worker' in window && 'Blob' in window)) {\n return false;\n }\n\n var blob = new Blob([''], { type: 'text/javascript' });\n var workerURL = URL.createObjectURL(blob);\n var supported;\n var worker;\n\n try {\n worker = new Worker(workerURL);\n supported = true;\n } catch (e) {\n supported = false;\n }\n\n if (worker) {\n worker.terminate();\n }\n URL.revokeObjectURL(workerURL);\n\n return supported;\n}\n\n// IE11 only supports `Uint8ClampedArray` as of version\n// [KB2929437](https://support.microsoft.com/en-us/kb/2929437)\nfunction isUint8ClampedArraySupported() {\n return 'Uint8ClampedArray' in window;\n}\n\nvar isWebGLSupportedCache = {};\nfunction isWebGLSupportedCached(failIfMajorPerformanceCaveat) {\n\n if (isWebGLSupportedCache[failIfMajorPerformanceCaveat] === undefined) {\n isWebGLSupportedCache[failIfMajorPerformanceCaveat] = isWebGLSupported(failIfMajorPerformanceCaveat);\n }\n\n return isWebGLSupportedCache[failIfMajorPerformanceCaveat];\n}\n\nisSupported.webGLContextAttributes = {\n antialias: false,\n alpha: true,\n stencil: true,\n depth: true\n};\n\nfunction isWebGLSupported(failIfMajorPerformanceCaveat) {\n\n var canvas = document.createElement('canvas');\n\n var attributes = Object.create(isSupported.webGLContextAttributes);\n attributes.failIfMajorPerformanceCaveat = failIfMajorPerformanceCaveat;\n\n if (canvas.probablySupportsContext) {\n return (\n canvas.probablySupportsContext('webgl', attributes) ||\n canvas.probablySupportsContext('experimental-webgl', attributes)\n );\n\n } else if (canvas.supportsContext) {\n return (\n canvas.supportsContext('webgl', attributes) ||\n canvas.supportsContext('experimental-webgl', attributes)\n );\n\n } else {\n return (\n canvas.getContext('webgl', attributes) ||\n canvas.getContext('experimental-webgl', attributes)\n );\n }\n}\n","'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array<Number>} m transformation matrix\n * @return {Point} output point\n */\n matMult: function(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function() { return this.clone()._round(); },\n\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n _matMult: function(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _add: function(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n _sub: function(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n _mult: function(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n _div: function(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n _multByPoint: function(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n _divByPoint: function(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit: function() {\n this._div(this.mag());\n return this;\n },\n\n _perp: function() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n _rotate: function(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _rotateAround: function(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round: function() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array<Number>|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ShelfPack = factory());\n}(this, (function () {\n\n/**\n * Create a new ShelfPack bin allocator.\n *\n * Uses the Shelf Best Height Fit algorithm from\n * http://clb.demon.fi/files/RectangleBinPack.pdf\n *\n * @class ShelfPack\n * @param {number} [w=64] Initial width of the sprite\n * @param {number} [h=64] Initial width of the sprite\n * @param {Object} [options]\n * @param {boolean} [options.autoResize=false] If `true`, the sprite will automatically grow\n * @example\n * var sprite = new ShelfPack(64, 64, { autoResize: false });\n */\nfunction ShelfPack$1(w, h, options) {\n options = options || {};\n this.w = w || 64;\n this.h = h || 64;\n this.autoResize = !!options.autoResize;\n this.shelves = [];\n this.freebins = [];\n this.stats = {};\n this.bins = {};\n this.maxId = 0;\n}\n\n\n/**\n * Batch pack multiple bins into the sprite.\n *\n * @param {Object[]} bins Array of requested bins - each object should have `width`, `height` (or `w`, `h`) properties\n * @param {number} bins[].w Requested bin width\n * @param {number} bins[].h Requested bin height\n * @param {Object} [options]\n * @param {boolean} [options.inPlace=false] If `true`, the supplied bin objects will be updated inplace with `x` and `y` properties\n * @returns {Bin[]} Array of allocated Bins - each Bin is an object with `id`, `x`, `y`, `w`, `h` properties\n * @example\n * var bins = [\n * { id: 1, w: 12, h: 12 },\n * { id: 2, w: 12, h: 16 },\n * { id: 3, w: 12, h: 24 }\n * ];\n * var results = sprite.pack(bins, { inPlace: false });\n */\nShelfPack$1.prototype.pack = function(bins, options) {\n bins = [].concat(bins);\n options = options || {};\n\n var results = [],\n w, h, id, allocation;\n\n for (var i = 0; i < bins.length; i++) {\n w = bins[i].w || bins[i].width;\n h = bins[i].h || bins[i].height;\n id = bins[i].id;\n\n if (w && h) {\n allocation = this.packOne(w, h, id);\n if (!allocation) {\n continue;\n }\n if (options.inPlace) {\n bins[i].x = allocation.x;\n bins[i].y = allocation.y;\n bins[i].id = allocation.id;\n }\n results.push(allocation);\n }\n }\n\n this.shrink();\n\n return results;\n};\n\n\n/**\n * Pack a single bin into the sprite.\n *\n * Each bin will have a unique identitifer.\n * If no identifier is supplied in the `id` parameter, one will be created.\n * Note: The supplied `id` is used as an object index, so numeric values are fastest!\n *\n * Bins are automatically refcounted (i.e. a newly packed Bin will have a refcount of 1).\n * When a bin is no longer needed, use the `ShelfPack.unref` function to mark it\n * as unused. When a Bin's refcount decrements to 0, the Bin will be marked\n * as free and its space may be reused by the packing code.\n *\n * @param {number} w Width of the bin to allocate\n * @param {number} h Height of the bin to allocate\n * @param {number|string} [id] Unique identifier for this bin, (if unsupplied, assume it's a new bin and create an id)\n * @returns {Bin} Bin object with `id`, `x`, `y`, `w`, `h` properties, or `null` if allocation failed\n * @example\n * var results = sprite.packOne(12, 16, 'a');\n */\nShelfPack$1.prototype.packOne = function(w, h, id) {\n var best = { freebin: -1, shelf: -1, waste: Infinity },\n y = 0,\n bin, shelf, waste, i;\n\n // if id was supplied, attempt a lookup..\n if (typeof id === 'string' || typeof id === 'number') {\n bin = this.getBin(id);\n if (bin) { // we packed this bin already\n this.ref(bin);\n return bin;\n }\n if (typeof id === 'number') {\n this.maxId = Math.max(id, this.maxId);\n }\n } else {\n id = ++this.maxId;\n }\n\n // First try to reuse a free bin..\n for (i = 0; i < this.freebins.length; i++) {\n bin = this.freebins[i];\n\n // exactly the right height and width, use it..\n if (h === bin.maxh && w === bin.maxw) {\n return this.allocFreebin(i, w, h, id);\n }\n // not enough height or width, skip it..\n if (h > bin.maxh || w > bin.maxw) {\n continue;\n }\n // extra height or width, minimize wasted area..\n if (h <= bin.maxh && w <= bin.maxw) {\n waste = (bin.maxw * bin.maxh) - (w * h);\n if (waste < best.waste) {\n best.waste = waste;\n best.freebin = i;\n }\n }\n }\n\n // Next find the best shelf..\n for (i = 0; i < this.shelves.length; i++) {\n shelf = this.shelves[i];\n y += shelf.h;\n\n // not enough width on this shelf, skip it..\n if (w > shelf.free) {\n continue;\n }\n // exactly the right height, pack it..\n if (h === shelf.h) {\n return this.allocShelf(i, w, h, id);\n }\n // not enough height, skip it..\n if (h > shelf.h) {\n continue;\n }\n // extra height, minimize wasted area..\n if (h < shelf.h) {\n waste = (shelf.h - h) * w;\n if (waste < best.waste) {\n best.freebin = -1;\n best.waste = waste;\n best.shelf = i;\n }\n }\n }\n\n if (best.freebin !== -1) {\n return this.allocFreebin(best.freebin, w, h, id);\n }\n\n if (best.shelf !== -1) {\n return this.allocShelf(best.shelf, w, h, id);\n }\n\n // No free bins or shelves.. add shelf..\n if (h <= (this.h - y) && w <= this.w) {\n shelf = new Shelf(y, this.w, h);\n return this.allocShelf(this.shelves.push(shelf) - 1, w, h, id);\n }\n\n // No room for more shelves..\n // If `autoResize` option is set, grow the sprite as follows:\n // * double whichever sprite dimension is smaller (`w1` or `h1`)\n // * if sprite dimensions are equal, grow width before height\n // * accomodate very large bin requests (big `w` or `h`)\n if (this.autoResize) {\n var h1, h2, w1, w2;\n\n h1 = h2 = this.h;\n w1 = w2 = this.w;\n\n if (w1 <= h1 || w > w1) { // grow width..\n w2 = Math.max(w, w1) * 2;\n }\n if (h1 < w1 || h > h1) { // grow height..\n h2 = Math.max(h, h1) * 2;\n }\n\n this.resize(w2, h2);\n return this.packOne(w, h, id); // retry\n }\n\n return null;\n};\n\n\n/**\n * Called by packOne() to allocate a bin by reusing an existing freebin\n *\n * @private\n * @param {number} index Index into the `this.freebins` array\n * @param {number} w Width of the bin to allocate\n * @param {number} h Height of the bin to allocate\n * @param {number|string} id Unique identifier for this bin\n * @returns {Bin} Bin object with `id`, `x`, `y`, `w`, `h` properties\n * @example\n * var bin = sprite.allocFreebin(0, 12, 16, 'a');\n */\nShelfPack$1.prototype.allocFreebin = function (index, w, h, id) {\n var bin = this.freebins.splice(index, 1)[0];\n bin.id = id;\n bin.w = w;\n bin.h = h;\n bin.refcount = 0;\n this.bins[id] = bin;\n this.ref(bin);\n return bin;\n};\n\n\n/**\n * Called by `packOne() to allocate bin on an existing shelf\n *\n * @private\n * @param {number} index Index into the `this.shelves` array\n * @param {number} w Width of the bin to allocate\n * @param {number} h Height of the bin to allocate\n * @param {number|string} id Unique identifier for this bin\n * @returns {Bin} Bin object with `id`, `x`, `y`, `w`, `h` properties\n * @example\n * var results = sprite.allocShelf(0, 12, 16, 'a');\n */\nShelfPack$1.prototype.allocShelf = function(index, w, h, id) {\n var shelf = this.shelves[index];\n var bin = shelf.alloc(w, h, id);\n this.bins[id] = bin;\n this.ref(bin);\n return bin;\n};\n\n\n/**\n * Shrink the width/height of the sprite to the bare minimum.\n * Since shelf-pack doubles first width, then height when running out of shelf space\n * this can result in fairly large unused space both in width and height if that happens\n * towards the end of bin packing.\n */\nShelfPack$1.prototype.shrink = function() {\n if (this.shelves.length > 0) {\n var w2 = 0;\n var h2 = 0;\n\n for (var j = 0; j < this.shelves.length; j++) {\n var shelf = this.shelves[j];\n h2 += shelf.h;\n w2 = Math.max(shelf.w - shelf.free, w2);\n }\n\n this.resize(w2, h2);\n }\n};\n\n\n/**\n * Return a packed bin given its id, or undefined if the id is not found\n *\n * @param {number|string} id Unique identifier for this bin,\n * @returns {Bin} The requested bin, or undefined if not yet packed\n * @example\n * var b = sprite.getBin('a');\n */\nShelfPack$1.prototype.getBin = function(id) {\n return this.bins[id];\n};\n\n\n/**\n * Increment the ref count of a bin and update statistics.\n *\n * @param {Bin} bin Bin instance\n * @returns {number} New refcount of the bin\n * @example\n * var bin = sprite.getBin('a');\n * sprite.ref(bin);\n */\nShelfPack$1.prototype.ref = function(bin) {\n if (++bin.refcount === 1) { // a new Bin.. record height in stats historgram..\n var h = bin.h;\n this.stats[h] = (this.stats[h] | 0) + 1;\n }\n\n return bin.refcount;\n};\n\n\n/**\n * Decrement the ref count of a bin and update statistics.\n * The bin will be automatically marked as free space once the refcount reaches 0.\n *\n * @param {Bin} bin Bin instance\n * @returns {number} New refcount of the bin\n * @example\n * var bin = sprite.getBin('a');\n * sprite.unref(bin);\n */\nShelfPack$1.prototype.unref = function(bin) {\n if (bin.refcount === 0) {\n return 0;\n }\n\n if (--bin.refcount === 0) {\n this.stats[bin.h]--;\n delete this.bins[bin.id];\n this.freebins.push(bin);\n }\n\n return bin.refcount;\n};\n\n\n/**\n * Clear the sprite. Resets everything and resets statistics.\n *\n * @example\n * sprite.clear();\n */\nShelfPack$1.prototype.clear = function() {\n this.shelves = [];\n this.freebins = [];\n this.stats = {};\n this.bins = {};\n this.maxId = 0;\n};\n\n\n/**\n * Resize the sprite.\n *\n * @param {number} w Requested new sprite width\n * @param {number} h Requested new sprite height\n * @returns {boolean} `true` if resize succeeded, `false` if failed\n * @example\n * sprite.resize(256, 256);\n */\nShelfPack$1.prototype.resize = function(w, h) {\n this.w = w;\n this.h = h;\n for (var i = 0; i < this.shelves.length; i++) {\n this.shelves[i].resize(w);\n }\n return true;\n};\n\n\n/**\n * Create a new Shelf.\n *\n * @private\n * @class Shelf\n * @param {number} y Top coordinate of the new shelf\n * @param {number} w Width of the new shelf\n * @param {number} h Height of the new shelf\n * @example\n * var shelf = new Shelf(64, 512, 24);\n */\nfunction Shelf(y, w, h) {\n this.x = 0;\n this.y = y;\n this.w = this.free = w;\n this.h = h;\n}\n\n\n/**\n * Allocate a single bin into the shelf.\n *\n * @private\n * @param {number} w Width of the bin to allocate\n * @param {number} h Height of the bin to allocate\n * @param {number|string} id Unique id of the bin to allocate\n * @returns {Bin} Bin object with `id`, `x`, `y`, `w`, `h` properties, or `null` if allocation failed\n * @example\n * shelf.alloc(12, 16, 'a');\n */\nShelf.prototype.alloc = function(w, h, id) {\n if (w > this.free || h > this.h) {\n return null;\n }\n var x = this.x;\n this.x += w;\n this.free -= w;\n return new Bin(id, x, this.y, w, h, w, this.h);\n};\n\n\n/**\n * Resize the shelf.\n *\n * @private\n * @param {number} w Requested new width of the shelf\n * @returns {boolean} true\n * @example\n * shelf.resize(512);\n */\nShelf.prototype.resize = function(w) {\n this.free += (w - this.w);\n this.w = w;\n return true;\n};\n\n\n/**\n * Create a new Bin object.\n *\n * @class Bin\n * @param {number|string} id Unique id of the bin\n * @param {number} x Left coordinate of the bin\n * @param {number} y Top coordinate of the bin\n * @param {number} w Width of the bin\n * @param {number} h Height of the bin\n * @param {number} [maxw] Max width of the bin (defaults to `w` if not provided)\n * @param {number} [maxh] Max height of the bin (defaults to `h` if not provided)\n * @example\n * var bin = new Bin('a', 0, 0, 12, 16);\n */\nfunction Bin(id, x, y, w, h, maxw, maxh) {\n this.id = id;\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.maxw = maxw || w;\n this.maxh = maxh || h;\n this.refcount = 0;\n}\n\nreturn ShelfPack$1;\n\n})));\n","'use strict';\n\nmodule.exports = TinySDF;\n\nvar INF = 1e20;\n\nfunction TinySDF(fontSize, buffer, radius, cutoff, fontFamily, fontWeight) {\n this.fontSize = fontSize || 24;\n this.buffer = buffer === undefined ? 3 : buffer;\n this.cutoff = cutoff || 0.25;\n this.fontFamily = fontFamily || 'sans-serif';\n this.fontWeight = fontWeight || 'normal';\n this.radius = radius || 8;\n var size = this.size = this.fontSize + this.buffer * 2;\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.canvas.height = size;\n\n this.ctx = this.canvas.getContext('2d');\n this.ctx.font = this.fontWeight + ' ' + this.fontSize + 'px ' + this.fontFamily;\n this.ctx.textBaseline = 'middle';\n this.ctx.fillStyle = 'black';\n\n // temporary arrays for the distance transform\n this.gridOuter = new Float64Array(size * size);\n this.gridInner = new Float64Array(size * size);\n this.f = new Float64Array(size);\n this.d = new Float64Array(size);\n this.z = new Float64Array(size + 1);\n this.v = new Int16Array(size);\n\n // hack around https://bugzilla.mozilla.org/show_bug.cgi?id=737852\n this.middle = Math.round((size / 2) * (navigator.userAgent.indexOf('Gecko/') >= 0 ? 1.2 : 1));\n}\n\nTinySDF.prototype.draw = function (char) {\n this.ctx.clearRect(0, 0, this.size, this.size);\n this.ctx.fillText(char, this.buffer, this.middle);\n\n var imgData = this.ctx.getImageData(0, 0, this.size, this.size);\n var alphaChannel = new Uint8ClampedArray(this.size * this.size);\n\n for (var i = 0; i < this.size * this.size; i++) {\n var a = imgData.data[i * 4 + 3] / 255; // alpha value\n this.gridOuter[i] = a === 1 ? 0 : a === 0 ? INF : Math.pow(Math.max(0, 0.5 - a), 2);\n this.gridInner[i] = a === 1 ? INF : a === 0 ? 0 : Math.pow(Math.max(0, a - 0.5), 2);\n }\n\n edt(this.gridOuter, this.size, this.size, this.f, this.d, this.v, this.z);\n edt(this.gridInner, this.size, this.size, this.f, this.d, this.v, this.z);\n\n for (i = 0; i < this.size * this.size; i++) {\n var d = this.gridOuter[i] - this.gridInner[i];\n alphaChannel[i] = Math.max(0, Math.min(255, Math.round(255 - 255 * (d / this.radius + this.cutoff))));\n }\n\n return alphaChannel;\n};\n\n// 2D Euclidean distance transform by Felzenszwalb & Huttenlocher https://cs.brown.edu/~pff/dt/\nfunction edt(data, width, height, f, d, v, z) {\n for (var x = 0; x < width; x++) {\n for (var y = 0; y < height; y++) {\n f[y] = data[y * width + x];\n }\n edt1d(f, d, v, z, height);\n for (y = 0; y < height; y++) {\n data[y * width + x] = d[y];\n }\n }\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n f[x] = data[y * width + x];\n }\n edt1d(f, d, v, z, width);\n for (x = 0; x < width; x++) {\n data[y * width + x] = Math.sqrt(d[x]);\n }\n }\n}\n\n// 1D squared distance transform\nfunction edt1d(f, d, v, z, n) {\n v[0] = 0;\n z[0] = -INF;\n z[1] = +INF;\n\n for (var q = 1, k = 0; q < n; q++) {\n var s = ((f[q] + q * q) - (f[v[k]] + v[k] * v[k])) / (2 * q - 2 * v[k]);\n while (s <= z[k]) {\n k--;\n s = ((f[q] + q * q) - (f[v[k]] + v[k] * v[k])) / (2 * q - 2 * v[k]);\n }\n k++;\n v[k] = q;\n z[k] = s;\n z[k + 1] = +INF;\n }\n\n for (q = 0, k = 0; q < n; q++) {\n while (z[k + 1] < q) k++;\n d[q] = (q - v[k]) * (q - v[k]) + f[v[k]];\n }\n}\n","/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p2y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n if (typeof epsilon === 'undefined') epsilon = 1e-6;\n\n var t0, t1, t2, x2, i;\n\n // First try a few iterations of Newton's method -- normally very fast.\n for (t2 = x, i = 0; i < 8; i++) {\n\n x2 = this.sampleCurveX(t2) - x;\n if (Math.abs(x2) < epsilon) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\n\n t2 = t2 - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n t0 = 0.0;\n t1 = 1.0;\n t2 = x;\n\n if (t2 < t0) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\n\n if (x > x2) {\n t0 = t2;\n } else {\n t1 = t2;\n }\n\n t2 = (t1 - t0) * 0.5 + t0;\n }\n\n // Failure.\n return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n","module.exports.VectorTile = require('./lib/vectortile.js');\nmodule.exports.VectorTileFeature = require('./lib/vectortilefeature.js');\nmodule.exports.VectorTileLayer = require('./lib/vectortilelayer.js');\n","'use strict';\n\nvar VectorTileLayer = require('./vectortilelayer');\n\nmodule.exports = VectorTile;\n\nfunction VectorTile(pbf, end) {\n this.layers = pbf.readFields(readTile, {}, end);\n}\n\nfunction readTile(tag, layers, pbf) {\n if (tag === 3) {\n var layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length) layers[layer.name] = layer;\n }\n}\n\n","'use strict';\n\nvar Point = require('@mapbox/point-geometry');\n\nmodule.exports = VectorTileFeature;\n\nfunction VectorTileFeature(pbf, end, extent, keys, values) {\n // Public\n this.properties = {};\n this.extent = extent;\n this.type = 0;\n\n // Private\n this._pbf = pbf;\n this._geometry = -1;\n this._keys = keys;\n this._values = values;\n\n pbf.readFields(readFeature, this, end);\n}\n\nfunction readFeature(tag, feature, pbf) {\n if (tag == 1) feature.id = pbf.readVarint();\n else if (tag == 2) readTag(pbf, feature);\n else if (tag == 3) feature.type = pbf.readVarint();\n else if (tag == 4) feature._geometry = pbf.pos;\n}\n\nfunction readTag(pbf, feature) {\n var end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n var key = feature._keys[pbf.readVarint()],\n value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n\nVectorTileFeature.types = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nVectorTileFeature.prototype.loadGeometry = function() {\n var pbf = this._pbf;\n pbf.pos = this._geometry;\n\n var end = pbf.readVarint() + pbf.pos,\n cmd = 1,\n length = 0,\n x = 0,\n y = 0,\n lines = [],\n line;\n\n while (pbf.pos < end) {\n if (!length) {\n var cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) { // moveTo\n if (line) lines.push(line);\n line = [];\n }\n\n line.push(new Point(x, y));\n\n } else if (cmd === 7) {\n\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (line) {\n line.push(line[0].clone()); // closePolygon\n }\n\n } else {\n throw new Error('unknown command ' + cmd);\n }\n }\n\n if (line) lines.push(line);\n\n return lines;\n};\n\nVectorTileFeature.prototype.bbox = function() {\n var pbf = this._pbf;\n pbf.pos = this._geometry;\n\n var end = pbf.readVarint() + pbf.pos,\n cmd = 1,\n length = 0,\n x = 0,\n y = 0,\n x1 = Infinity,\n x2 = -Infinity,\n y1 = Infinity,\n y2 = -Infinity;\n\n while (pbf.pos < end) {\n if (!length) {\n var cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n if (x < x1) x1 = x;\n if (x > x2) x2 = x;\n if (y < y1) y1 = y;\n if (y > y2) y2 = y;\n\n } else if (cmd !== 7) {\n throw new Error('unknown command ' + cmd);\n }\n }\n\n return [x1, y1, x2, y2];\n};\n\nVectorTileFeature.prototype.toGeoJSON = function(x, y, z) {\n var size = this.extent * Math.pow(2, z),\n x0 = this.extent * x,\n y0 = this.extent * y,\n coords = this.loadGeometry(),\n type = VectorTileFeature.types[this.type],\n i, j;\n\n function project(line) {\n for (var j = 0; j < line.length; j++) {\n var p = line[j], y2 = 180 - (p.y + y0) * 360 / size;\n line[j] = [\n (p.x + x0) * 360 / size - 180,\n 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90\n ];\n }\n }\n\n switch (this.type) {\n case 1:\n var points = [];\n for (i = 0; i < coords.length; i++) {\n points[i] = coords[i][0];\n }\n coords = points;\n project(coords);\n break;\n\n case 2:\n for (i = 0; i < coords.length; i++) {\n project(coords[i]);\n }\n break;\n\n case 3:\n coords = classifyRings(coords);\n for (i = 0; i < coords.length; i++) {\n for (j = 0; j < coords[i].length; j++) {\n project(coords[i][j]);\n }\n }\n break;\n }\n\n if (coords.length === 1) {\n coords = coords[0];\n } else {\n type = 'Multi' + type;\n }\n\n var result = {\n type: \"Feature\",\n geometry: {\n type: type,\n coordinates: coords\n },\n properties: this.properties\n };\n\n if ('id' in this) {\n result.id = this.id;\n }\n\n return result;\n};\n\n// classifies an array of rings into polygons with outer rings and holes\n\nfunction classifyRings(rings) {\n var len = rings.length;\n\n if (len <= 1) return [rings];\n\n var polygons = [],\n polygon,\n ccw;\n\n for (var i = 0; i < len; i++) {\n var area = signedArea(rings[i]);\n if (area === 0) continue;\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon) polygons.push(polygon);\n polygon = [rings[i]];\n\n } else {\n polygon.push(rings[i]);\n }\n }\n if (polygon) polygons.push(polygon);\n\n return polygons;\n}\n\nfunction signedArea(ring) {\n var sum = 0;\n for (var 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","'use strict';\n\nvar VectorTileFeature = require('./vectortilefeature.js');\n\nmodule.exports = VectorTileLayer;\n\nfunction VectorTileLayer(pbf, end) {\n // Public\n this.version = 1;\n this.name = null;\n this.extent = 4096;\n this.length = 0;\n\n // Private\n this._pbf = pbf;\n this._keys = [];\n this._values = [];\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n}\n\nfunction readLayer(tag, layer, pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n else if (tag === 2) layer._features.push(pbf.pos);\n else if (tag === 3) layer._keys.push(pbf.readString());\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n}\n\nfunction readValueMessage(pbf) {\n var value = null,\n end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n var tag = pbf.readVarint() >> 3;\n\n value = tag === 1 ? pbf.readString() :\n tag === 2 ? pbf.readFloat() :\n tag === 3 ? pbf.readDouble() :\n tag === 4 ? pbf.readVarint64() :\n tag === 5 ? pbf.readVarint() :\n tag === 6 ? pbf.readSVarint() :\n tag === 7 ? pbf.readBoolean() : null;\n }\n\n return value;\n}\n\n// return feature `i` from this layer as a `VectorTileFeature`\nVectorTileLayer.prototype.feature = function(i) {\n if (i < 0 || i >= this._features.length) throw new Error('feature index out of bounds');\n\n this._pbf.pos = this._features[i];\n\n var end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);\n};\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.WhooTS = global.WhooTS || {})));\n}(this, (function (exports) {\n\n/**\n * getURL\n *\n * @param {String} baseUrl Base url of the WMS server\n * @param {String} layer Layer name\n * @param {Number} x Tile coordinate x\n * @param {Number} y Tile coordinate y\n * @param {Number} z Tile zoom\n * @param {Object} [options]\n * @param {String} [options.format='image/png']\n * @param {String} [options.service='WMS']\n * @param {String} [options.version='1.1.1']\n * @param {String} [options.request='GetMap']\n * @param {String} [options.srs='EPSG:3857']\n * @param {Number} [options.width='256']\n * @param {Number} [options.height='256']\n * @returns {String} url\n * @example\n * var baseUrl = 'http://geodata.state.nj.us/imagerywms/Natural2015';\n * var layer = 'Natural2015';\n * var url = whoots.getURL(baseUrl, layer, 154308, 197167, 19);\n */\nfunction getURL(baseUrl, layer, x, y, z, options) {\n options = options || {};\n\n var url = baseUrl + '?' + [\n 'bbox=' + getTileBBox(x, y, z),\n 'format=' + (options.format || 'image/png'),\n 'service=' + (options.service || 'WMS'),\n 'version=' + (options.version || '1.1.1'),\n 'request=' + (options.request || 'GetMap'),\n 'srs=' + (options.srs || 'EPSG:3857'),\n 'width=' + (options.width || 256),\n 'height=' + (options.height || 256),\n 'layers=' + layer\n ].join('&');\n\n return url;\n}\n\n\n/**\n * getTileBBox\n *\n * @param {Number} x Tile coordinate x\n * @param {Number} y Tile coordinate y\n * @param {Number} z Tile zoom\n * @returns {String} String of the bounding box\n */\nfunction getTileBBox(x, y, z) {\n // for Google/OSM tile scheme we need to alter the y\n y = (Math.pow(2, z) - y - 1);\n\n var min = getMercCoords(x * 256, y * 256, z),\n max = getMercCoords((x + 1) * 256, (y + 1) * 256, z);\n\n return min[0] + ',' + min[1] + ',' + max[0] + ',' + max[1];\n}\n\n\n/**\n * getMercCoords\n *\n * @param {Number} x Pixel coordinate x\n * @param {Number} y Pixel coordinate y\n * @param {Number} z Tile zoom\n * @returns {Array} [x, y]\n */\nfunction getMercCoords(x, y, z) {\n var resolution = (2 * Math.PI * 6378137 / 256) / Math.pow(2, z),\n merc_x = (x * resolution - 2 * Math.PI * 6378137 / 2.0),\n merc_y = (y * resolution - 2 * Math.PI * 6378137 / 2.0);\n\n return [merc_x, merc_y];\n}\n\nexports.getURL = getURL;\nexports.getTileBBox = getTileBBox;\nexports.getMercCoords = getMercCoords;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","'use strict';\n\nmodule.exports = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode) return triangles;\n\n var minX, minY, maxX, maxY, x, y, size;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and size are later used to transform coords into integers for z-order calculation\n size = Math.max(maxX - minX, maxY - minY);\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, size);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) return null;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, size, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && size) indexCurve(ear, minX, minY, size);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (size ? isEarHashed(ear, minX, minY, size) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertice leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, size, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(ear, triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, size, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, size);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, size) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, size),\n maxZ = zOrder(maxTX, maxTY, minX, minY, size);\n\n // first look for points inside the triangle in increasing z-order\n var p = ear.nextZ;\n\n while (p && p.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.nextZ;\n }\n\n // then look for points in decreasing z-order\n p = ear.prevZ;\n\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, size) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, size);\n earcutLinked(c, triangles, dim, minX, minY, size);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m.next;\n\n while (p !== stop) {\n if (hx >= p.x && p.x >= mx &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n }\n\n return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, size) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, size);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize === 0) {\n e = q;\n q = q.nextZ;\n qSize--;\n } else if (qSize === 0 || !q) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else if (p.z <= q.z) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and size of the data bounding box\nfunction zOrder(x, y, minX, minY, size) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) / size;\n y = 32767 * (y - minY) / size;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n if ((equals(p1, q1) && equals(p2, q2)) ||\n (equals(p1, q2) && equals(p2, q1))) return true;\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertice index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertice nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n","var geojsonArea = require('@mapbox/geojson-area');\n\nmodule.exports = rewind;\n\nfunction rewind(gj, outer) {\n switch ((gj && gj.type) || null) {\n case 'FeatureCollection':\n gj.features = gj.features.map(curryOuter(rewind, outer));\n return gj;\n case 'Feature':\n gj.geometry = rewind(gj.geometry, outer);\n return gj;\n case 'Polygon':\n case 'MultiPolygon':\n return correct(gj, outer);\n default:\n return gj;\n }\n}\n\nfunction curryOuter(a, b) {\n return function(_) { return a(_, b); };\n}\n\nfunction correct(_, outer) {\n if (_.type === 'Polygon') {\n _.coordinates = correctRings(_.coordinates, outer);\n } else if (_.type === 'MultiPolygon') {\n _.coordinates = _.coordinates.map(curryOuter(correctRings, outer));\n }\n return _;\n}\n\nfunction correctRings(_, outer) {\n outer = !!outer;\n _[0] = wind(_[0], outer);\n for (var i = 1; i < _.length; i++) {\n _[i] = wind(_[i], !outer);\n }\n return _;\n}\n\nfunction wind(_, dir) {\n return cw(_) === dir ? _ : _.reverse();\n}\n\nfunction cw(_) {\n return geojsonArea.ring(_) >= 0;\n}\n","'use strict';\n\nmodule.exports = clip;\n\nvar createFeature = require('./feature');\n\n/* clip features between two axis-parallel lines:\n * | |\n * ___|___ | /\n * / | \\____|____/\n * | |\n */\n\nfunction clip(features, scale, k1, k2, axis, minAll, maxAll) {\n\n k1 /= scale;\n k2 /= scale;\n\n if (minAll >= k1 && maxAll <= k2) return features; // trivial accept\n else if (minAll > k2 || maxAll < k1) return null; // trivial reject\n\n var clipped = [];\n\n for (var i = 0; i < features.length; i++) {\n\n var feature = features[i];\n var geometry = feature.geometry;\n var type = feature.type;\n\n var min = axis === 0 ? feature.minX : feature.minY;\n var max = axis === 0 ? feature.maxX : feature.maxY;\n\n if (min >= k1 && max <= k2) { // trivial accept\n clipped.push(feature);\n continue;\n } else if (min > k2 || max < k1) { // trivial reject\n continue;\n }\n\n var newGeometry = [];\n\n if (type === 'Point' || type === 'MultiPoint') {\n clipPoints(geometry, newGeometry, k1, k2, axis);\n\n } else if (type === 'LineString') {\n clipLine(geometry, newGeometry, k1, k2, axis, false);\n\n } else if (type === 'MultiLineString') {\n clipLines(geometry, newGeometry, k1, k2, axis, false);\n\n } else if (type === 'Polygon') {\n clipLines(geometry, newGeometry, k1, k2, axis, true);\n\n } else if (type === 'MultiPolygon') {\n for (var j = 0; j < geometry.length; j++) {\n var polygon = [];\n clipLines(geometry[j], polygon, k1, k2, axis, true);\n if (polygon.length) {\n newGeometry.push(polygon);\n }\n }\n }\n\n if (newGeometry.length) {\n if (type === 'LineString' || type === 'MultiLineString') {\n if (newGeometry.length === 1) {\n type = 'LineString';\n newGeometry = newGeometry[0];\n } else {\n type = 'MultiLineString';\n }\n }\n if (type === 'Point' || type === 'MultiPoint') {\n type = newGeometry.length === 3 ? 'Point' : 'MultiPoint';\n }\n\n clipped.push(createFeature(feature.id, type, newGeometry, feature.tags));\n }\n }\n\n return clipped.length ? clipped : null;\n}\n\nfunction clipPoints(geom, newGeom, k1, k2, axis) {\n for (var i = 0; i < geom.length; i += 3) {\n var a = geom[i + axis];\n\n if (a >= k1 && a <= k2) {\n newGeom.push(geom[i]);\n newGeom.push(geom[i + 1]);\n newGeom.push(geom[i + 2]);\n }\n }\n}\n\nfunction clipLine(geom, newGeom, k1, k2, axis, isPolygon) {\n\n var slice = [];\n var intersect = axis === 0 ? intersectX : intersectY;\n\n for (var i = 0; i < geom.length - 3; i += 3) {\n var ax = geom[i];\n var ay = geom[i + 1];\n var az = geom[i + 2];\n var bx = geom[i + 3];\n var by = geom[i + 4];\n var a = axis === 0 ? ax : ay;\n var b = axis === 0 ? bx : by;\n var sliced = false;\n\n if (a < k1) {\n // ---|--> |\n if (b >= k1) intersect(slice, ax, ay, bx, by, k1);\n } else if (a > k2) {\n // | <--|---\n if (b <= k2) intersect(slice, ax, ay, bx, by, k2);\n } else {\n addPoint(slice, ax, ay, az);\n }\n if (b < k1 && a >= k1) {\n // <--|--- | or <--|-----|---\n intersect(slice, ax, ay, bx, by, k1);\n sliced = true;\n }\n if (b > k2 && a <= k2) {\n // | ---|--> or ---|-----|-->\n intersect(slice, ax, ay, bx, by, k2);\n sliced = true;\n }\n\n if (!isPolygon && sliced) {\n slice.size = geom.size;\n newGeom.push(slice);\n slice = [];\n }\n }\n\n // add the last point\n var last = geom.length - 3;\n ax = geom[last];\n ay = geom[last + 1];\n az = geom[last + 2];\n a = axis === 0 ? ax : ay;\n if (a >= k1 && a <= k2) addPoint(slice, ax, ay, az);\n\n // close the polygon if its endpoints are not the same after clipping\n last = slice.length - 3;\n if (isPolygon && last >= 3 && (slice[last] !== slice[0] || slice[last + 1] !== slice[1])) {\n addPoint(slice, slice[0], slice[1], slice[2]);\n }\n\n // add the final slice\n if (slice.length) {\n slice.size = geom.size;\n newGeom.push(slice);\n }\n}\n\nfunction clipLines(geom, newGeom, k1, k2, axis, isPolygon) {\n for (var i = 0; i < geom.length; i++) {\n clipLine(geom[i], newGeom, k1, k2, axis, isPolygon);\n }\n}\n\nfunction addPoint(out, x, y, z) {\n out.push(x);\n out.push(y);\n out.push(z);\n}\n\nfunction intersectX(out, ax, ay, bx, by, x) {\n out.push(x);\n out.push(ay + (x - ax) * (by - ay) / (bx - ax));\n out.push(1);\n}\n\nfunction intersectY(out, ax, ay, bx, by, y) {\n out.push(ax + (y - ay) * (bx - ax) / (by - ay));\n out.push(y);\n out.push(1);\n}\n","'use strict';\n\nmodule.exports = convert;\n\nvar simplify = require('./simplify');\nvar createFeature = require('./feature');\n\n// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data\n\nfunction convert(data, tolerance) {\n var features = [];\n\n if (data.type === 'FeatureCollection') {\n for (var i = 0; i < data.features.length; i++) {\n convertFeature(features, data.features[i], tolerance);\n }\n\n } else if (data.type === 'Feature') {\n convertFeature(features, data, tolerance);\n\n } else {\n // single geometry or a geometry collection\n convertFeature(features, {geometry: data}, tolerance);\n }\n\n return features;\n}\n\nfunction convertFeature(features, geojson, tolerance) {\n if (!geojson.geometry) return;\n\n var coords = geojson.geometry.coordinates;\n var type = geojson.geometry.type;\n var tol = tolerance * tolerance;\n var geometry = [];\n\n if (type === 'Point') {\n convertPoint(coords, geometry);\n\n } else if (type === 'MultiPoint') {\n for (var i = 0; i < coords.length; i++) {\n convertPoint(coords[i], geometry);\n }\n\n } else if (type === 'LineString') {\n convertLine(coords, geometry, tol, false);\n\n } else if (type === 'MultiLineString') {\n convertLines(coords, geometry, tol, false);\n\n } else if (type === 'Polygon') {\n convertLines(coords, geometry, tol, true);\n\n } else if (type === 'MultiPolygon') {\n for (i = 0; i < coords.length; i++) {\n var polygon = [];\n convertLines(coords[i], polygon, tol, true);\n geometry.push(polygon);\n }\n } else if (type === 'GeometryCollection') {\n for (i = 0; i < geojson.geometry.geometries.length; i++) {\n convertFeature(features, {\n geometry: geojson.geometry.geometries[i],\n properties: geojson.properties\n }, tolerance);\n }\n return;\n } else {\n throw new Error('Input data is not a valid GeoJSON object.');\n }\n\n features.push(createFeature(geojson.id, type, geometry, geojson.properties));\n}\n\nfunction convertPoint(coords, out) {\n out.push(projectX(coords[0]));\n out.push(projectY(coords[1]));\n out.push(0);\n}\n\nfunction convertLine(ring, out, tol, isPolygon) {\n var x0, y0;\n var size = 0;\n\n for (var j = 0; j < ring.length; j++) {\n var x = projectX(ring[j][0]);\n var y = projectY(ring[j][1]);\n\n out.push(x);\n out.push(y);\n out.push(0);\n\n if (j > 0) {\n if (isPolygon) {\n size += (x0 * y - x * y0) / 2; // area\n } else {\n size += Math.sqrt(Math.pow(x - x0, 2) + Math.pow(y - y0, 2)); // length\n }\n }\n x0 = x;\n y0 = y;\n }\n\n var last = out.length - 3;\n out[2] = 1;\n simplify(out, 0, last, tol);\n out[last + 2] = 1;\n\n out.size = Math.abs(size);\n}\n\nfunction convertLines(rings, out, tol, isPolygon) {\n for (var i = 0; i < rings.length; i++) {\n var geom = [];\n convertLine(rings[i], geom, tol, isPolygon);\n out.push(geom);\n }\n}\n\nfunction projectX(x) {\n return x / 360 + 0.5;\n}\n\nfunction projectY(y) {\n var sin = Math.sin(y * Math.PI / 180);\n var y2 = 0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI;\n return y2 < 0 ? 0 : y2 > 1 ? 1 : y2;\n}\n","'use strict';\n\nmodule.exports = createFeature;\n\nfunction createFeature(id, type, geom, tags) {\n var feature = {\n id: id || null,\n type: type,\n geometry: geom,\n tags: tags,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n calcBBox(feature);\n return feature;\n}\n\nfunction calcBBox(feature) {\n var geom = feature.geometry;\n var type = feature.type;\n\n if (type === 'Point' || type === 'MultiPoint' || type === 'LineString') {\n calcLineBBox(feature, geom);\n\n } else if (type === 'Polygon' || type === 'MultiLineString') {\n for (var i = 0; i < geom.length; i++) {\n calcLineBBox(feature, geom[i]);\n }\n\n } else if (type === 'MultiPolygon') {\n for (i = 0; i < geom.length; i++) {\n for (var j = 0; j < geom[i].length; j++) {\n calcLineBBox(feature, geom[i][j]);\n }\n }\n }\n}\n\nfunction calcLineBBox(feature, geom) {\n for (var i = 0; i < geom.length; i += 3) {\n feature.minX = Math.min(feature.minX, geom[i]);\n feature.minY = Math.min(feature.minY, geom[i + 1]);\n feature.maxX = Math.max(feature.maxX, geom[i]);\n feature.maxY = Math.max(feature.maxY, geom[i + 1]);\n }\n}\n","'use strict';\n\nmodule.exports = geojsonvt;\n\nvar convert = require('./convert'), // GeoJSON conversion and preprocessing\n transform = require('./transform'), // coordinate transformation\n clip = require('./clip'), // stripe clipping algorithm\n wrap = require('./wrap'), // date line processing\n createTile = require('./tile'); // final simplified tile generation\n\n\nfunction geojsonvt(data, options) {\n return new GeoJSONVT(data, options);\n}\n\nfunction GeoJSONVT(data, options) {\n options = this.options = extend(Object.create(this.options), options);\n\n var debug = options.debug;\n\n if (debug) console.time('preprocess data');\n\n if (options.maxZoom < 0 || options.maxZoom > 24) throw new Error('maxZoom should be in the 0-24 range');\n\n var z2 = 1 << options.maxZoom, // 2^z\n features = convert(data, options.tolerance / (z2 * options.extent));\n\n this.tiles = {};\n this.tileCoords = [];\n\n if (debug) {\n console.timeEnd('preprocess data');\n console.log('index: maxZoom: %d, maxPoints: %d', options.indexMaxZoom, options.indexMaxPoints);\n console.time('generate tiles');\n this.stats = {};\n this.total = 0;\n }\n\n features = wrap(features, options.buffer / options.extent);\n\n // start slicing from the top tile down\n if (features.length) this.splitTile(features, 0, 0, 0);\n\n if (debug) {\n if (features.length) console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints);\n console.timeEnd('generate tiles');\n console.log('tiles generated:', this.total, JSON.stringify(this.stats));\n }\n}\n\nGeoJSONVT.prototype.options = {\n maxZoom: 14, // max zoom to preserve detail on\n indexMaxZoom: 5, // max zoom in the tile index\n indexMaxPoints: 100000, // max number of points per tile in the tile index\n tolerance: 3, // simplification tolerance (higher means simpler)\n extent: 4096, // tile extent\n buffer: 64, // tile buffer on each side\n debug: 0 // logging level (0, 1 or 2)\n};\n\nGeoJSONVT.prototype.splitTile = function (features, z, x, y, cz, cx, cy) {\n\n var stack = [features, z, x, y],\n options = this.options,\n debug = options.debug;\n\n // avoid recursion by using a processing queue\n while (stack.length) {\n y = stack.pop();\n x = stack.pop();\n z = stack.pop();\n features = stack.pop();\n\n var z2 = 1 << z,\n id = toID(z, x, y),\n tile = this.tiles[id],\n tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * options.extent);\n\n if (!tile) {\n if (debug > 1) console.time('creation');\n\n tile = this.tiles[id] = createTile(features, z2, x, y, tileTolerance, z === options.maxZoom);\n this.tileCoords.push({z: z, x: x, y: y});\n\n if (debug) {\n if (debug > 1) {\n console.log('tile z%d-%d-%d (features: %d, points: %d, simplified: %d)',\n z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified);\n console.timeEnd('creation');\n }\n var key = 'z' + z;\n this.stats[key] = (this.stats[key] || 0) + 1;\n this.total++;\n }\n }\n\n // save reference to original geometry in tile so that we can drill down later if we stop now\n tile.source = features;\n\n // if it's the first-pass tiling\n if (!cz) {\n // stop tiling if we reached max zoom, or if the tile is too simple\n if (z === options.indexMaxZoom || tile.numPoints <= options.indexMaxPoints) continue;\n\n // if a drilldown to a specific tile\n } else {\n // stop tiling if we reached base zoom or our target tile zoom\n if (z === options.maxZoom || z === cz) continue;\n\n // stop tiling if it's not an ancestor of the target tile\n var m = 1 << (cz - z);\n if (x !== Math.floor(cx / m) || y !== Math.floor(cy / m)) continue;\n }\n\n // if we slice further down, no need to keep source geometry\n tile.source = null;\n\n if (features.length === 0) continue;\n\n if (debug > 1) console.time('clipping');\n\n // values we'll use for clipping\n var k1 = 0.5 * options.buffer / options.extent,\n k2 = 0.5 - k1,\n k3 = 0.5 + k1,\n k4 = 1 + k1,\n tl, bl, tr, br, left, right;\n\n tl = bl = tr = br = null;\n\n left = clip(features, z2, x - k1, x + k3, 0, tile.minX, tile.maxX);\n right = clip(features, z2, x + k2, x + k4, 0, tile.minX, tile.maxX);\n features = null;\n\n if (left) {\n tl = clip(left, z2, y - k1, y + k3, 1, tile.minY, tile.maxY);\n bl = clip(left, z2, y + k2, y + k4, 1, tile.minY, tile.maxY);\n left = null;\n }\n\n if (right) {\n tr = clip(right, z2, y - k1, y + k3, 1, tile.minY, tile.maxY);\n br = clip(right, z2, y + k2, y + k4, 1, tile.minY, tile.maxY);\n right = null;\n }\n\n if (debug > 1) console.timeEnd('clipping');\n\n stack.push(tl || [], z + 1, x * 2, y * 2);\n stack.push(bl || [], z + 1, x * 2, y * 2 + 1);\n stack.push(tr || [], z + 1, x * 2 + 1, y * 2);\n stack.push(br || [], z + 1, x * 2 + 1, y * 2 + 1);\n }\n};\n\nGeoJSONVT.prototype.getTile = function (z, x, y) {\n var options = this.options,\n extent = options.extent,\n debug = options.debug;\n\n if (z < 0 || z > 24) return null;\n\n var z2 = 1 << z;\n x = ((x % z2) + z2) % z2; // wrap tile x coordinate\n\n var id = toID(z, x, y);\n if (this.tiles[id]) return transform.tile(this.tiles[id], extent);\n\n if (debug > 1) console.log('drilling down to z%d-%d-%d', z, x, y);\n\n var z0 = z,\n x0 = x,\n y0 = y,\n parent;\n\n while (!parent && z0 > 0) {\n z0--;\n x0 = Math.floor(x0 / 2);\n y0 = Math.floor(y0 / 2);\n parent = this.tiles[toID(z0, x0, y0)];\n }\n\n if (!parent || !parent.source) return null;\n\n // if we found a parent tile containing the original geometry, we can drill down from it\n if (debug > 1) console.log('found parent tile z%d-%d-%d', z0, x0, y0);\n\n if (debug > 1) console.time('drilling down');\n this.splitTile(parent.source, z0, x0, y0, z, x, y);\n if (debug > 1) console.timeEnd('drilling down');\n\n return this.tiles[id] ? transform.tile(this.tiles[id], extent) : null;\n};\n\nfunction toID(z, x, y) {\n return (((1 << z) * y + x) * 32) + z;\n}\n\nfunction extend(dest, src) {\n for (var i in src) dest[i] = src[i];\n return dest;\n}\n","'use strict';\n\nmodule.exports = simplify;\n\n// calculate simplification data using optimized Douglas-Peucker algorithm\n\nfunction simplify(coords, first, last, sqTolerance) {\n var maxSqDist = sqTolerance;\n var index;\n\n var ax = coords[first];\n var ay = coords[first + 1];\n var bx = coords[last];\n var by = coords[last + 1];\n\n for (var i = first + 3; i < last; i += 3) {\n var d = getSqSegDist(coords[i], coords[i + 1], ax, ay, bx, by);\n if (d > maxSqDist) {\n index = i;\n maxSqDist = d;\n }\n }\n\n if (maxSqDist > sqTolerance) {\n if (index - first > 3) simplify(coords, first, index, sqTolerance);\n coords[index + 2] = maxSqDist;\n if (last - index > 3) simplify(coords, index, last, sqTolerance);\n }\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(px, py, x, y, bx, by) {\n\n var dx = bx - x;\n var dy = by - y;\n\n if (dx !== 0 || dy !== 0) {\n\n var t = ((px - x) * dx + (py - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = bx;\n y = by;\n\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = px - x;\n dy = py - y;\n\n return dx * dx + dy * dy;\n}\n","'use strict';\n\nmodule.exports = createTile;\n\nfunction createTile(features, z2, tx, ty, tolerance, noSimplify) {\n var tile = {\n features: [],\n numPoints: 0,\n numSimplified: 0,\n numFeatures: 0,\n source: null,\n x: tx,\n y: ty,\n z2: z2,\n transformed: false,\n minX: 2,\n minY: 1,\n maxX: -1,\n maxY: 0\n };\n for (var i = 0; i < features.length; i++) {\n tile.numFeatures++;\n addFeature(tile, features[i], tolerance, noSimplify);\n\n var minX = features[i].minX;\n var minY = features[i].minY;\n var maxX = features[i].maxX;\n var maxY = features[i].maxY;\n\n if (minX < tile.minX) tile.minX = minX;\n if (minY < tile.minY) tile.minY = minY;\n if (maxX > tile.maxX) tile.maxX = maxX;\n if (maxY > tile.maxY) tile.maxY = maxY;\n }\n return tile;\n}\n\nfunction addFeature(tile, feature, tolerance, noSimplify) {\n\n var geom = feature.geometry,\n type = feature.type,\n simplified = [];\n\n if (type === 'Point' || type === 'MultiPoint') {\n for (var i = 0; i < geom.length; i += 3) {\n simplified.push(geom[i]);\n simplified.push(geom[i + 1]);\n tile.numPoints++;\n tile.numSimplified++;\n }\n\n } else if (type === 'LineString') {\n addLine(simplified, geom, tile, tolerance, noSimplify, false, false);\n\n } else if (type === 'MultiLineString' || type === 'Polygon') {\n for (i = 0; i < geom.length; i++) {\n addLine(simplified, geom[i], tile, tolerance, noSimplify, type === 'Polygon', i === 0);\n }\n\n } else if (type === 'MultiPolygon') {\n\n for (var k = 0; k < geom.length; k++) {\n var polygon = geom[k];\n for (i = 0; i < polygon.length; i++) {\n addLine(simplified, polygon[i], tile, tolerance, noSimplify, true, i === 0);\n }\n }\n }\n\n if (simplified.length) {\n var tileFeature = {\n geometry: simplified,\n type: type === 'Polygon' || type === 'MultiPolygon' ? 3 :\n type === 'LineString' || type === 'MultiLineString' ? 2 : 1,\n tags: feature.tags || null\n };\n if (feature.id !== null) {\n tileFeature.id = feature.id;\n }\n tile.features.push(tileFeature);\n }\n}\n\nfunction addLine(result, geom, tile, tolerance, noSimplify, isPolygon, isOuter) {\n var sqTolerance = tolerance * tolerance;\n\n if (!noSimplify && (geom.size < (isPolygon ? sqTolerance : tolerance))) {\n tile.numPoints += geom.length / 3;\n return;\n }\n\n var ring = [];\n\n for (var i = 0; i < geom.length; i += 3) {\n if (noSimplify || geom[i + 2] > sqTolerance) {\n tile.numSimplified++;\n ring.push(geom[i]);\n ring.push(geom[i + 1]);\n }\n tile.numPoints++;\n }\n\n if (isPolygon) rewind(ring, isOuter);\n\n result.push(ring);\n}\n\nfunction rewind(ring, clockwise) {\n var area = 0;\n for (var i = 0, len = ring.length, j = len - 2; i < len; j = i, i += 2) {\n area += (ring[i] - ring[j]) * (ring[i + 1] + ring[j + 1]);\n }\n if (area > 0 === clockwise) {\n for (i = 0, len = ring.length; i < len / 2; i += 2) {\n var x = ring[i];\n var y = ring[i + 1];\n ring[i] = ring[len - 2 - i];\n ring[i + 1] = ring[len - 1 - i];\n ring[len - 2 - i] = x;\n ring[len - 1 - i] = y;\n }\n }\n}\n","'use strict';\n\nexports.tile = transformTile;\nexports.point = transformPoint;\n\n// Transforms the coordinates of each feature in the given tile from\n// mercator-projected space into (extent x extent) tile space.\nfunction transformTile(tile, extent) {\n if (tile.transformed) return tile;\n\n var z2 = tile.z2,\n tx = tile.x,\n ty = tile.y,\n i, j, k;\n\n for (i = 0; i < tile.features.length; i++) {\n var feature = tile.features[i],\n geom = feature.geometry,\n type = feature.type;\n\n feature.geometry = [];\n\n if (type === 1) {\n for (j = 0; j < geom.length; j += 2) {\n feature.geometry.push(transformPoint(geom[j], geom[j + 1], extent, z2, tx, ty));\n }\n } else {\n for (j = 0; j < geom.length; j++) {\n var ring = [];\n for (k = 0; k < geom[j].length; k += 2) {\n ring.push(transformPoint(geom[j][k], geom[j][k + 1], extent, z2, tx, ty));\n }\n feature.geometry.push(ring);\n }\n }\n }\n\n tile.transformed = true;\n\n return tile;\n}\n\nfunction transformPoint(x, y, extent, z2, tx, ty) {\n return [\n Math.round(extent * (x * z2 - tx)),\n Math.round(extent * (y * z2 - ty))];\n}\n","'use strict';\n\nvar clip = require('./clip');\nvar createFeature = require('./feature');\n\nmodule.exports = wrap;\n\nfunction wrap(features, buffer) {\n var merged = features,\n left = clip(features, 1, -1 - buffer, buffer, 0, -1, 2), // left world copy\n right = clip(features, 1, 1 - buffer, 2 + buffer, 0, -1, 2); // right world copy\n\n if (left || right) {\n merged = clip(features, 1, -buffer, 1 + buffer, 0, -1, 2) || []; // center world copy\n\n if (left) merged = shiftFeatureCoords(left, 1).concat(merged); // merge left into center\n if (right) merged = merged.concat(shiftFeatureCoords(right, -1)); // merge right into center\n }\n\n return merged;\n}\n\nfunction shiftFeatureCoords(features, offset) {\n var newFeatures = [];\n\n for (var i = 0; i < features.length; i++) {\n var feature = features[i],\n type = feature.type;\n\n var newGeometry;\n\n if (type === 'Point' || type === 'MultiPoint' || type === 'LineString') {\n newGeometry = shiftCoords(feature.geometry, offset);\n\n } else if (type === 'MultiLineString' || type === 'Polygon') {\n newGeometry = [];\n for (var j = 0; j < feature.geometry.length; j++) {\n newGeometry.push(shiftCoords(feature.geometry[j], offset));\n }\n } else if (type === 'MultiPolygon') {\n newGeometry = [];\n for (j = 0; j < feature.geometry.length; j++) {\n var newPolygon = [];\n for (var k = 0; k < feature.geometry[j].length; k++) {\n newPolygon.push(shiftCoords(feature.geometry[j][k], offset));\n }\n newGeometry.push(newPolygon);\n }\n }\n\n newFeatures.push(createFeature(feature.id, type, newGeometry, feature.tags));\n }\n\n return newFeatures;\n}\n\nfunction shiftCoords(points, offset) {\n var newPoints = [];\n newPoints.size = points.size;\n\n for (var i = 0; i < points.length; i += 3) {\n newPoints.push(points[i] + offset, points[i + 1], points[i + 2]);\n }\n return newPoints;\n}\n","'use strict';\n\nmodule.exports = GridIndex;\n\nvar NUM_PARAMS = 3;\n\nfunction GridIndex(extent, n, padding) {\n var cells = this.cells = [];\n\n if (extent instanceof ArrayBuffer) {\n this.arrayBuffer = extent;\n var array = new Int32Array(this.arrayBuffer);\n extent = array[0];\n n = array[1];\n padding = array[2];\n\n this.d = n + 2 * padding;\n for (var k = 0; k < this.d * this.d; k++) {\n var start = array[NUM_PARAMS + k];\n var end = array[NUM_PARAMS + k + 1];\n cells.push(start === end ?\n null :\n array.subarray(start, end));\n }\n var keysOffset = array[NUM_PARAMS + cells.length];\n var bboxesOffset = array[NUM_PARAMS + cells.length + 1];\n this.keys = array.subarray(keysOffset, bboxesOffset);\n this.bboxes = array.subarray(bboxesOffset);\n\n this.insert = this._insertReadonly;\n\n } else {\n this.d = n + 2 * padding;\n for (var i = 0; i < this.d * this.d; i++) {\n cells.push([]);\n }\n this.keys = [];\n this.bboxes = [];\n }\n\n this.n = n;\n this.extent = extent;\n this.padding = padding;\n this.scale = n / extent;\n this.uid = 0;\n\n var p = (padding / n) * extent;\n this.min = -p;\n this.max = extent + p;\n}\n\n\nGridIndex.prototype.insert = function(key, x1, y1, x2, y2) {\n this._forEachCell(x1, y1, x2, y2, this._insertCell, this.uid++);\n this.keys.push(key);\n this.bboxes.push(x1);\n this.bboxes.push(y1);\n this.bboxes.push(x2);\n this.bboxes.push(y2);\n};\n\nGridIndex.prototype._insertReadonly = function() {\n throw 'Cannot insert into a GridIndex created from an ArrayBuffer.';\n};\n\nGridIndex.prototype._insertCell = function(x1, y1, x2, y2, cellIndex, uid) {\n this.cells[cellIndex].push(uid);\n};\n\nGridIndex.prototype.query = function(x1, y1, x2, y2) {\n var min = this.min;\n var max = this.max;\n if (x1 <= min && y1 <= min && max <= x2 && max <= y2) {\n // We use `Array#slice` because `this.keys` may be a `Int32Array` and\n // some browsers (Safari and IE) do not support `TypedArray#slice`\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice#Browser_compatibility\n return Array.prototype.slice.call(this.keys);\n\n } else {\n var result = [];\n var seenUids = {};\n this._forEachCell(x1, y1, x2, y2, this._queryCell, result, seenUids);\n return result;\n }\n};\n\nGridIndex.prototype._queryCell = function(x1, y1, x2, y2, cellIndex, result, seenUids) {\n var cell = this.cells[cellIndex];\n if (cell !== null) {\n var keys = this.keys;\n var bboxes = this.bboxes;\n for (var u = 0; u < cell.length; u++) {\n var uid = cell[u];\n if (seenUids[uid] === undefined) {\n var offset = uid * 4;\n if ((x1 <= bboxes[offset + 2]) &&\n (y1 <= bboxes[offset + 3]) &&\n (x2 >= bboxes[offset + 0]) &&\n (y2 >= bboxes[offset + 1])) {\n seenUids[uid] = true;\n result.push(keys[uid]);\n } else {\n seenUids[uid] = false;\n }\n }\n }\n }\n};\n\nGridIndex.prototype._forEachCell = function(x1, y1, x2, y2, fn, arg1, arg2) {\n var cx1 = this._convertToCellCoord(x1);\n var cy1 = this._convertToCellCoord(y1);\n var cx2 = this._convertToCellCoord(x2);\n var cy2 = this._convertToCellCoord(y2);\n for (var x = cx1; x <= cx2; x++) {\n for (var y = cy1; y <= cy2; y++) {\n var cellIndex = this.d * y + x;\n if (fn.call(this, x1, y1, x2, y2, cellIndex, arg1, arg2)) return;\n }\n }\n};\n\nGridIndex.prototype._convertToCellCoord = function(x) {\n return Math.max(0, Math.min(this.d - 1, Math.floor(x * this.scale) + this.padding));\n};\n\nGridIndex.prototype.toArrayBuffer = function() {\n if (this.arrayBuffer) return this.arrayBuffer;\n\n var cells = this.cells;\n\n var metadataLength = NUM_PARAMS + this.cells.length + 1 + 1;\n var totalCellLength = 0;\n for (var i = 0; i < this.cells.length; i++) {\n totalCellLength += this.cells[i].length;\n }\n\n var array = new Int32Array(metadataLength + totalCellLength + this.keys.length + this.bboxes.length);\n array[0] = this.extent;\n array[1] = this.n;\n array[2] = this.padding;\n\n var offset = metadataLength;\n for (var k = 0; k < cells.length; k++) {\n var cell = cells[k];\n array[NUM_PARAMS + k] = offset;\n array.set(cell, offset);\n offset += cell.length;\n }\n\n array[NUM_PARAMS + cells.length] = offset;\n array.set(this.keys, offset);\n offset += this.keys.length;\n\n array[NUM_PARAMS + cells.length + 1] = offset;\n array.set(this.bboxes, offset);\n offset += this.bboxes.length;\n\n return array.buffer;\n};\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","'use strict';\n\nvar sort = require('./sort');\nvar range = require('./range');\nvar within = require('./within');\n\nmodule.exports = kdbush;\n\nfunction kdbush(points, getX, getY, nodeSize, ArrayType) {\n return new KDBush(points, getX, getY, nodeSize, ArrayType);\n}\n\nfunction KDBush(points, getX, getY, nodeSize, ArrayType) {\n getX = getX || defaultGetX;\n getY = getY || defaultGetY;\n ArrayType = ArrayType || Array;\n\n this.nodeSize = nodeSize || 64;\n this.points = points;\n\n this.ids = new ArrayType(points.length);\n this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n this.ids[i] = i;\n this.coords[2 * i] = getX(points[i]);\n this.coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(this.ids, this.coords, this.nodeSize, 0, this.ids.length - 1, 0);\n}\n\nKDBush.prototype = {\n range: function (minX, minY, maxX, maxY) {\n return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n },\n\n within: function (x, y, r) {\n return within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n};\n\nfunction defaultGetX(p) { return p[0]; }\nfunction defaultGetY(p) { return p[1]; }\n","'use strict';\n\nmodule.exports = range;\n\nfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n x = coords[2 * m];\n y = coords[2 * m + 1];\n\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n","'use strict';\n\nmodule.exports = sortKD;\n\nfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n\n var m = Math.floor((left + right) / 2);\n\n select(ids, coords, m, left, right, depth % 2);\n\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + inc] < t) i++;\n while (coords[2 * j + inc] > t) j--;\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n","'use strict';\n\nmodule.exports = within;\n\nfunction within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos,\n str = readUtf8(this.buf, this.pos, end);\n this.pos = end;\n return str;\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.ceil(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nmodule.exports = partialSort;\n\n// Floyd-Rivest selection algorithm:\n// Rearrange items so that all items in the [left, k] range are smaller than all items in (k, right];\n// The k-th element will have the (k - left + 1)th smallest value in [left, right]\n\nfunction partialSort(arr, k, left, right, compare) {\n left = left || 0;\n right = right || (arr.length - 1);\n compare = compare || defaultCompare;\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n partialSort(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var 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\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","'use strict';\n\nvar kdbush = require('kdbush');\n\nmodule.exports = supercluster;\n\nfunction supercluster(options) {\n return new SuperCluster(options);\n}\n\nfunction SuperCluster(options) {\n this.options = extend(Object.create(this.options), options);\n this.trees = new Array(this.options.maxZoom + 1);\n}\n\nSuperCluster.prototype = {\n options: {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // function (accumulated, props) { accumulated.sum += props.sum; }\n\n // initial properties of a cluster (before running the reducer)\n initial: function () { return {}; }, // function () { return {sum: 0}; },\n\n // properties to use for individual points when running the reducer\n map: function (props) { return props; } // function (props) { return {sum: props.my_value}; },\n },\n\n load: function (points) {\n var log = this.options.log;\n\n if (log) console.time('total time');\n\n var timerId = 'prepare ' + points.length + ' points';\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point\n var clusters = points.map(createPointCluster);\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (var z = this.options.maxZoom; z >= this.options.minZoom; z--) {\n var now = +Date.now();\n\n // index input points into a KD-tree\n this.trees[z + 1] = kdbush(clusters, getX, getY, this.options.nodeSize, Float32Array);\n\n clusters = this._cluster(clusters, z); // create a new set of clusters for the zoom\n\n if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);\n }\n\n // index top-level clusters\n this.trees[this.options.minZoom] = kdbush(clusters, getX, getY, this.options.nodeSize, Float32Array);\n\n if (log) console.timeEnd('total time');\n\n return this;\n },\n\n getClusters: function (bbox, zoom) {\n var tree = this.trees[this._limitZoom(zoom)];\n var ids = tree.range(lngX(bbox[0]), latY(bbox[3]), lngX(bbox[2]), latY(bbox[1]));\n var clusters = [];\n for (var i = 0; i < ids.length; i++) {\n var c = tree.points[ids[i]];\n clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.id]);\n }\n return clusters;\n },\n\n getChildren: function (clusterId, clusterZoom) {\n var origin = this.trees[clusterZoom + 1].points[clusterId];\n var r = this.options.radius / (this.options.extent * Math.pow(2, clusterZoom));\n var points = this.trees[clusterZoom + 1].within(origin.x, origin.y, r);\n var children = [];\n for (var i = 0; i < points.length; i++) {\n var c = this.trees[clusterZoom + 1].points[points[i]];\n if (c.parentId === clusterId) {\n children.push(c.numPoints ? getClusterJSON(c) : this.points[c.id]);\n }\n }\n return children;\n },\n\n getLeaves: function (clusterId, clusterZoom, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n var leaves = [];\n this._appendLeaves(leaves, clusterId, clusterZoom, limit, offset, 0);\n\n return leaves;\n },\n\n getTile: function (z, x, y) {\n var tree = this.trees[this._limitZoom(z)];\n var z2 = Math.pow(2, z);\n var extent = this.options.extent;\n var r = this.options.radius;\n var p = r / extent;\n var top = (y - p) / z2;\n var bottom = (y + 1 + p) / z2;\n\n var tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.points, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.points, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.points, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n },\n\n getClusterExpansionZoom: function (clusterId, clusterZoom) {\n while (clusterZoom < this.options.maxZoom) {\n var children = this.getChildren(clusterId, clusterZoom);\n clusterZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return clusterZoom;\n },\n\n _appendLeaves: function (result, clusterId, clusterZoom, limit, offset, skipped) {\n var children = this.getChildren(clusterId, clusterZoom);\n\n for (var i = 0; i < children.length; i++) {\n var props = children[i].properties;\n\n if (props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(\n result, props.cluster_id, clusterZoom + 1, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(children[i]);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n },\n\n _addTileFeatures: function (ids, points, x, y, z2, tile) {\n for (var i = 0; i < ids.length; i++) {\n var c = points[ids[i]];\n tile.features.push({\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (c.x * z2 - x)),\n Math.round(this.options.extent * (c.y * z2 - y))\n ]],\n tags: c.numPoints ? getClusterProperties(c) : this.points[c.id].properties\n });\n }\n },\n\n _limitZoom: function (z) {\n return Math.max(this.options.minZoom, Math.min(z, this.options.maxZoom + 1));\n },\n\n _cluster: function (points, zoom) {\n var clusters = [];\n var r = this.options.radius / (this.options.extent * Math.pow(2, zoom));\n\n // loop through each point\n for (var i = 0; i < points.length; i++) {\n var p = points[i];\n // if we've already visited the point at this zoom level, skip it\n if (p.zoom <= zoom) continue;\n p.zoom = zoom;\n\n // find all nearby points\n var tree = this.trees[zoom + 1];\n var neighborIds = tree.within(p.x, p.y, r);\n\n var numPoints = p.numPoints || 1;\n var wx = p.x * numPoints;\n var wy = p.y * numPoints;\n\n var clusterProperties = null;\n\n if (this.options.reduce) {\n clusterProperties = this.options.initial();\n this._accumulate(clusterProperties, p);\n }\n\n for (var j = 0; j < neighborIds.length; j++) {\n var b = tree.points[neighborIds[j]];\n // filter out neighbors that are too far or already processed\n if (zoom < b.zoom) {\n var numPoints2 = b.numPoints || 1;\n b.zoom = zoom; // save the zoom (so it doesn't get processed twice)\n wx += b.x * numPoints2; // accumulate coordinates for calculating weighted center\n wy += b.y * numPoints2;\n numPoints += numPoints2;\n b.parentId = i;\n\n if (this.options.reduce) {\n this._accumulate(clusterProperties, b);\n }\n }\n }\n\n if (numPoints === 1) {\n clusters.push(p);\n } else {\n p.parentId = i;\n clusters.push(createCluster(wx / numPoints, wy / numPoints, numPoints, i, clusterProperties));\n }\n }\n\n return clusters;\n },\n\n _accumulate: function (clusterProperties, point) {\n var properties = point.numPoints ?\n point.properties :\n this.options.map(this.points[point.id].properties);\n\n this.options.reduce(clusterProperties, properties);\n }\n};\n\nfunction createCluster(x, y, numPoints, id, properties) {\n return {\n x: x, // weighted cluster center\n y: y,\n zoom: Infinity, // the last zoom the cluster was processed at\n id: id, // index of the first child of the cluster in the zoom level tree\n properties: properties,\n parentId: -1, // parent cluster id\n numPoints: numPoints\n };\n}\n\nfunction createPointCluster(p, id) {\n var coords = p.geometry.coordinates;\n return {\n x: lngX(coords[0]), // projected point coordinates\n y: latY(coords[1]),\n zoom: Infinity, // the last zoom the point was processed at\n id: id, // index of the source feature in the original input array\n parentId: -1 // parent cluster id\n };\n}\n\nfunction getClusterJSON(cluster) {\n return {\n type: 'Feature',\n properties: getClusterProperties(cluster),\n geometry: {\n type: 'Point',\n coordinates: [xLng(cluster.x), yLat(cluster.y)]\n }\n };\n}\n\nfunction getClusterProperties(cluster) {\n var count = cluster.numPoints;\n var abbrev = count >= 10000 ? Math.round(count / 1000) + 'k' :\n count >= 1000 ? (Math.round(count / 100) / 10) + 'k' : count;\n return extend(extend({}, cluster.properties), {\n cluster: true,\n cluster_id: cluster.id,\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n var sin = Math.sin(lat * Math.PI / 180),\n y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 :\n y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n var y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n\nfunction extend(dest, src) {\n for (var id in src) dest[id] = src[id];\n return dest;\n}\n\nfunction getX(p) {\n return p.x;\n}\nfunction getY(p) {\n return p.y;\n}\n","'use strict';\n\nmodule.exports = TinyQueue;\n\nfunction TinyQueue(data, compare) {\n if (!(this instanceof TinyQueue)) return new TinyQueue(data, compare);\n\n this.data = data || [];\n this.length = this.data.length;\n this.compare = compare || defaultCompare;\n\n if (this.length > 0) {\n for (var i = (this.length >> 1); i >= 0; i--) this._down(i);\n }\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nTinyQueue.prototype = {\n\n push: function (item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n },\n\n pop: function () {\n if (this.length === 0) return undefined;\n var top = this.data[0];\n this.length--;\n if (this.length > 0) {\n this.data[0] = this.data[this.length];\n this._down(0);\n }\n this.data.pop();\n return top;\n },\n\n peek: function () {\n return this.data[0];\n },\n\n _up: function (pos) {\n var data = this.data;\n var compare = this.compare;\n var item = data[pos];\n\n while (pos > 0) {\n var parent = (pos - 1) >> 1;\n var 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: function (pos) {\n var data = this.data;\n var compare = this.compare;\n var len = this.length;\n var halfLen = len >> 1;\n var item = data[pos];\n\n while (pos < halfLen) {\n var left = (pos << 1) + 1;\n var right = left + 1;\n var best = data[left];\n\n if (right < len && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) break;\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n }\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","var Pbf = require('pbf')\nvar GeoJSONWrapper = require('./lib/geojson_wrapper')\n\nmodule.exports = fromVectorTileJs\nmodule.exports.fromVectorTileJs = fromVectorTileJs\nmodule.exports.fromGeojsonVt = fromGeojsonVt\nmodule.exports.GeoJSONWrapper = GeoJSONWrapper\n\n/**\n * Serialize a vector-tile-js-created tile to pbf\n *\n * @param {Object} tile\n * @return {Buffer} uncompressed, pbf-serialized tile data\n */\nfunction fromVectorTileJs (tile) {\n var out = new Pbf()\n writeTile(tile, out)\n return out.finish()\n}\n\n/**\n * Serialized a geojson-vt-created tile to pbf.\n *\n * @param {Object} layers - An object mapping layer names to geojson-vt-created vector tile objects\n * @return {Buffer} uncompressed, pbf-serialized tile data\n */\nfunction fromGeojsonVt (layers) {\n var l = {}\n for (var k in layers) {\n l[k] = new GeoJSONWrapper(layers[k].features)\n l[k].name = k\n }\n return fromVectorTileJs({layers: l})\n}\n\nfunction writeTile (tile, pbf) {\n for (var key in tile.layers) {\n pbf.writeMessage(3, writeLayer, tile.layers[key])\n }\n}\n\nfunction writeLayer (layer, pbf) {\n pbf.writeVarintField(15, layer.version || 1)\n pbf.writeStringField(1, layer.name || '')\n pbf.writeVarintField(5, layer.extent || 4096)\n\n var i\n var context = {\n keys: [],\n values: [],\n keycache: {},\n valuecache: {}\n }\n\n for (i = 0; i < layer.length; i++) {\n context.feature = layer.feature(i)\n pbf.writeMessage(2, writeFeature, context)\n }\n\n var keys = context.keys\n for (i = 0; i < keys.length; i++) {\n pbf.writeStringField(3, keys[i])\n }\n\n var values = context.values\n for (i = 0; i < values.length; i++) {\n pbf.writeMessage(4, writeValue, values[i])\n }\n}\n\nfunction writeFeature (context, pbf) {\n var feature = context.feature\n\n if (feature.id !== undefined) {\n pbf.writeVarintField(1, feature.id)\n }\n\n pbf.writeMessage(2, writeProperties, context)\n pbf.writeVarintField(3, feature.type)\n pbf.writeMessage(4, writeGeometry, feature)\n}\n\nfunction writeProperties (context, pbf) {\n var feature = context.feature\n var keys = context.keys\n var values = context.values\n var keycache = context.keycache\n var valuecache = context.valuecache\n\n for (var key in feature.properties) {\n var keyIndex = keycache[key]\n if (typeof keyIndex === 'undefined') {\n keys.push(key)\n keyIndex = keys.length - 1\n keycache[key] = keyIndex\n }\n pbf.writeVarint(keyIndex)\n\n var value = feature.properties[key]\n var type = typeof value\n if (type !== 'string' && type !== 'boolean' && type !== 'number') {\n value = JSON.stringify(value)\n }\n var valueKey = type + ':' + value\n var valueIndex = valuecache[valueKey]\n if (typeof valueIndex === 'undefined') {\n values.push(value)\n valueIndex = values.length - 1\n valuecache[valueKey] = valueIndex\n }\n pbf.writeVarint(valueIndex)\n }\n}\n\nfunction command (cmd, length) {\n return (length << 3) + (cmd & 0x7)\n}\n\nfunction zigzag (num) {\n return (num << 1) ^ (num >> 31)\n}\n\nfunction writeGeometry (feature, pbf) {\n var geometry = feature.loadGeometry()\n var type = feature.type\n var x = 0\n var y = 0\n var rings = geometry.length\n for (var r = 0; r < rings; r++) {\n var ring = geometry[r]\n var count = 1\n if (type === 1) {\n count = ring.length\n }\n pbf.writeVarint(command(1, count)) // moveto\n for (var i = 0; i < ring.length; i++) {\n if (i === 1 && type !== 1) {\n pbf.writeVarint(command(2, ring.length - 1)) // lineto\n }\n var dx = ring[i].x - x\n var dy = ring[i].y - y\n pbf.writeVarint(zigzag(dx))\n pbf.writeVarint(zigzag(dy))\n x += dx\n y += dy\n }\n }\n}\n\nfunction writeValue (value, pbf) {\n var type = typeof value\n if (type === 'string') {\n pbf.writeStringField(1, value)\n } else if (type === 'boolean') {\n pbf.writeBooleanField(7, value)\n } else if (type === 'number') {\n if (value % 1 !== 0) {\n pbf.writeDoubleField(3, value)\n } else if (value < 0) {\n pbf.writeSVarintField(6, value)\n } else {\n pbf.writeVarintField(5, value)\n }\n }\n}\n","'use strict'\n\nvar Point = require('@mapbox/point-geometry')\nvar VectorTileFeature = require('@mapbox/vector-tile').VectorTileFeature\n\nmodule.exports = GeoJSONWrapper\n\n// conform to vectortile api\nfunction GeoJSONWrapper (features) {\n this.features = features\n this.length = features.length\n}\n\nGeoJSONWrapper.prototype.feature = function (i) {\n return new FeatureWrapper(this.features[i])\n}\n\nfunction FeatureWrapper (feature) {\n this.id = typeof feature.id === 'number' ? feature.id : undefined\n this.type = feature.type\n this.rawGeometry = feature.type === 1 ? [feature.geometry] : feature.geometry\n this.properties = feature.tags\n this.extent = 4096\n}\n\nFeatureWrapper.prototype.loadGeometry = function () {\n var rings = this.rawGeometry\n this.geometry = []\n\n for (var i = 0; i < rings.length; i++) {\n var ring = rings[i]\n var newRing = []\n for (var j = 0; j < ring.length; j++) {\n newRing.push(new Point(ring[j][0], ring[j][1]))\n }\n this.geometry.push(newRing)\n }\n return this.geometry\n}\n\nFeatureWrapper.prototype.bbox = function () {\n if (!this.geometry) this.loadGeometry()\n\n var rings = this.geometry\n var x1 = Infinity\n var x2 = -Infinity\n var y1 = Infinity\n var y2 = -Infinity\n\n for (var i = 0; i < rings.length; i++) {\n var ring = rings[i]\n\n for (var j = 0; j < ring.length; j++) {\n var coord = ring[j]\n\n x1 = Math.min(x1, coord.x)\n x2 = Math.max(x2, coord.x)\n y1 = Math.min(y1, coord.y)\n y2 = Math.max(y2, coord.y)\n }\n }\n\n return [x1, y1, x2, y2]\n}\n\nFeatureWrapper.prototype.toGeoJSON = VectorTileFeature.prototype.toGeoJSON\n","var bundleFn = arguments[3];\nvar sources = arguments[4];\nvar cache = arguments[5];\n\nvar stringify = JSON.stringify;\n\nmodule.exports = function (fn, options) {\n var wkey;\n var cacheKeys = Object.keys(cache);\n\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n var exp = cache[key].exports;\n // Using babel as a transpiler to use esmodule, the export will always\n // be an object with the default export as a property of it. To ensure\n // the existing api and babel esmodule exports are both supported we\n // check for both\n if (exp === fn || exp && exp.default === fn) {\n wkey = key;\n break;\n }\n }\n\n if (!wkey) {\n wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n var wcache = {};\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n wcache[key] = key;\n }\n sources[wkey] = [\n Function(['require','module','exports'], '(' + fn + ')(self)'),\n wcache\n ];\n }\n var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n\n var scache = {}; scache[wkey] = wkey;\n sources[skey] = [\n Function(['require'], (\n // try to call default if defined to also support babel esmodule\n // exports\n 'var f = require(' + stringify(wkey) + ');' +\n '(f.default ? f.default : f)(self);'\n )),\n scache\n ];\n\n var workerSources = {};\n resolveSources(skey);\n\n function resolveSources(key) {\n workerSources[key] = true;\n\n for (var depPath in sources[key][1]) {\n var depKey = sources[key][1][depPath];\n if (!workerSources[depKey]) {\n resolveSources(depKey);\n }\n }\n }\n\n var src = '(' + bundleFn + ')({'\n + Object.keys(workerSources).map(function (key) {\n return stringify(key) + ':['\n + sources[key][0]\n + ',' + stringify(sources[key][1]) + ']'\n ;\n }).join(',')\n + '},{},[' + stringify(skey) + '])'\n ;\n\n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n var blob = new Blob([src], { type: 'text/javascript' });\n if (options && options.bare) { return blob; }\n var workerUrl = URL.createObjectURL(blob);\n var worker = new Worker(workerUrl);\n worker.objectURL = workerUrl;\n return worker;\n};\n","module.exports.RADIUS = 6378137;\nmodule.exports.FLATTENING = 1/298.257223563;\nmodule.exports.POLAR_RADIUS = 6356752.3142;\n","// This file is generated. Edit build/generate-struct-arrays.js, then run `yarn run codegen`.\n// \n\nconst assert = require('assert');\nconst {StructArray} = require('../util/struct_array');\nconst {Struct} = require('../util/struct_array');\nconst {register} = require('../util/web_worker_transfer');\nconst Point = require('@mapbox/point-geometry');\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[2]\n *\n * @private\n */\nclass StructArrayLayout2i4 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 2;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n return i;\n }\n\n}\n\nStructArrayLayout2i4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout2i4', StructArrayLayout2i4);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[4]\n *\n * @private\n */\nclass StructArrayLayout4i8 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 4;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n return i;\n }\n\n}\n\nStructArrayLayout4i8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout4i8', StructArrayLayout4i8);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[2]\n * [4]: Int16[4]\n *\n * @private\n */\nclass StructArrayLayout2i4i12 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 6;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n return i;\n }\n\n}\n\nStructArrayLayout2i4i12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout2i4i12', StructArrayLayout2i4i12);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[4]\n * [8]: Uint8[4]\n *\n * @private\n */\nclass StructArrayLayout4i4ub12 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 , v6 , v7 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 6;\n const o1 = i * 12;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.uint8[o1 + 8] = v4;\n this.uint8[o1 + 9] = v5;\n this.uint8[o1 + 10] = v6;\n this.uint8[o1 + 11] = v7;\n return i;\n }\n\n}\n\nStructArrayLayout4i4ub12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout4i4ub12', StructArrayLayout4i4ub12);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[4]\n * [8]: Uint16[4]\n *\n * @private\n */\nclass StructArrayLayout4i4ui16 extends StructArray {\n \n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 , v6 , v7 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 8;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.uint16[o2 + 4] = v4;\n this.uint16[o2 + 5] = v5;\n this.uint16[o2 + 6] = v6;\n this.uint16[o2 + 7] = v7;\n return i;\n }\n\n}\n\nStructArrayLayout4i4ui16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout4i4ui16', StructArrayLayout4i4ui16);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Float32[3]\n *\n * @private\n */\nclass StructArrayLayout3f12 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 3;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n return i;\n }\n\n}\n\nStructArrayLayout3f12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout3f12', StructArrayLayout3f12);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Uint32[1]\n *\n * @private\n */\nclass StructArrayLayout1ul4 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 1;\n this.uint32[o4 + 0] = v0;\n return i;\n }\n\n}\n\nStructArrayLayout1ul4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout1ul4', StructArrayLayout1ul4);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[6]\n * [12]: Uint32[1]\n * [16]: Uint16[2]\n * [20]: Int16[2]\n *\n * @private\n */\nclass StructArrayLayout6i1ul2ui2i24 extends StructArray {\n \n \n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 , v6 , v7 , v8 , v9 , v10 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 12;\n const o4 = i * 6;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n this.uint32[o4 + 3] = v6;\n this.uint16[o2 + 8] = v7;\n this.uint16[o2 + 9] = v8;\n this.int16[o2 + 10] = v9;\n this.int16[o2 + 11] = v10;\n return i;\n }\n\n}\n\nStructArrayLayout6i1ul2ui2i24.prototype.bytesPerElement = 24;\nregister('StructArrayLayout6i1ul2ui2i24', StructArrayLayout6i1ul2ui2i24);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[2]\n * [4]: Int16[2]\n * [8]: Int16[2]\n *\n * @private\n */\nclass StructArrayLayout2i2i2i12 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 6;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n this.int16[o2 + 3] = v3;\n this.int16[o2 + 4] = v4;\n this.int16[o2 + 5] = v5;\n return i;\n }\n\n}\n\nStructArrayLayout2i2i2i12.prototype.bytesPerElement = 12;\nregister('StructArrayLayout2i2i2i12', StructArrayLayout2i2i2i12);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Uint8[2]\n *\n * @private\n */\nclass StructArrayLayout2ub4 extends StructArray {\n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 ) {\n const i = this.length;\n this.resize(i + 1);\n const o1 = i * 4;\n this.uint8[o1 + 0] = v0;\n this.uint8[o1 + 1] = v1;\n return i;\n }\n\n}\n\nStructArrayLayout2ub4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout2ub4', StructArrayLayout2ub4);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[2]\n * [4]: Uint16[2]\n * [8]: Uint32[3]\n * [20]: Uint16[3]\n * [28]: Float32[2]\n * [36]: Uint8[2]\n *\n * @private\n */\nclass StructArrayLayout2i2ui3ul3ui2f2ub40 extends StructArray {\n \n \n \n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 , v4 , v5 , v6 , v7 , v8 , v9 , v10 , v11 , v12 , v13 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 20;\n const o4 = i * 10;\n const o1 = i * 40;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n this.uint16[o2 + 3] = v3;\n this.uint32[o4 + 2] = v4;\n this.uint32[o4 + 3] = v5;\n this.uint32[o4 + 4] = v6;\n this.uint16[o2 + 10] = v7;\n this.uint16[o2 + 11] = v8;\n this.uint16[o2 + 12] = v9;\n this.float32[o4 + 7] = v10;\n this.float32[o4 + 8] = v11;\n this.uint8[o1 + 36] = v12;\n this.uint8[o1 + 37] = v13;\n return i;\n }\n\n}\n\nStructArrayLayout2i2ui3ul3ui2f2ub40.prototype.bytesPerElement = 40;\nregister('StructArrayLayout2i2ui3ul3ui2f2ub40', StructArrayLayout2i2ui3ul3ui2f2ub40);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Float32[1]\n *\n * @private\n */\nclass StructArrayLayout1f4 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 1;\n this.float32[o4 + 0] = v0;\n return i;\n }\n\n}\n\nStructArrayLayout1f4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout1f4', StructArrayLayout1f4);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Int16[3]\n *\n * @private\n */\nclass StructArrayLayout3i6 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.int16 = new Int16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 3;\n this.int16[o2 + 0] = v0;\n this.int16[o2 + 1] = v1;\n this.int16[o2 + 2] = v2;\n return i;\n }\n\n}\n\nStructArrayLayout3i6.prototype.bytesPerElement = 6;\nregister('StructArrayLayout3i6', StructArrayLayout3i6);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Uint32[1]\n * [4]: Uint16[2]\n *\n * @private\n */\nclass StructArrayLayout1ul2ui8 extends StructArray {\n \n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint32 = new Uint32Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 2;\n const o2 = i * 4;\n this.uint32[o4 + 0] = v0;\n this.uint16[o2 + 2] = v1;\n this.uint16[o2 + 3] = v2;\n return i;\n }\n\n}\n\nStructArrayLayout1ul2ui8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout1ul2ui8', StructArrayLayout1ul2ui8);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Uint16[3]\n *\n * @private\n */\nclass StructArrayLayout3ui6 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 3;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n this.uint16[o2 + 2] = v2;\n return i;\n }\n\n}\n\nStructArrayLayout3ui6.prototype.bytesPerElement = 6;\nregister('StructArrayLayout3ui6', StructArrayLayout3ui6);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Uint16[2]\n *\n * @private\n */\nclass StructArrayLayout2ui4 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.uint16 = new Uint16Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 ) {\n const i = this.length;\n this.resize(i + 1);\n const o2 = i * 2;\n this.uint16[o2 + 0] = v0;\n this.uint16[o2 + 1] = v1;\n return i;\n }\n\n}\n\nStructArrayLayout2ui4.prototype.bytesPerElement = 4;\nregister('StructArrayLayout2ui4', StructArrayLayout2ui4);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Float32[2]\n *\n * @private\n */\nclass StructArrayLayout2f8 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 2;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n return i;\n }\n\n}\n\nStructArrayLayout2f8.prototype.bytesPerElement = 8;\nregister('StructArrayLayout2f8', StructArrayLayout2f8);\n\n\n/**\n * Implementation of the StructArray layout:\n * [0]: Float32[4]\n *\n * @private\n */\nclass StructArrayLayout4f16 extends StructArray {\n \n \n\n _refreshViews() {\n this.uint8 = new Uint8Array(this.arrayBuffer);\n this.float32 = new Float32Array(this.arrayBuffer);\n }\n\n emplaceBack(v0 , v1 , v2 , v3 ) {\n const i = this.length;\n this.resize(i + 1);\n const o4 = i * 4;\n this.float32[o4 + 0] = v0;\n this.float32[o4 + 1] = v1;\n this.float32[o4 + 2] = v2;\n this.float32[o4 + 3] = v3;\n return i;\n }\n\n}\n\nStructArrayLayout4f16.prototype.bytesPerElement = 16;\nregister('StructArrayLayout4f16', StructArrayLayout4f16);\n\n\nclass CollisionBoxStruct extends Struct {\n \n \n \n \n \n \n \n \n \n \n \n \n \n get anchorPointX() { return this._structArray.int16[this._pos2 + 0]; }\n set anchorPointX(x) { this._structArray.int16[this._pos2 + 0] = x; }\n get anchorPointY() { return this._structArray.int16[this._pos2 + 1]; }\n set anchorPointY(x) { this._structArray.int16[this._pos2 + 1] = x; }\n get x1() { return this._structArray.int16[this._pos2 + 2]; }\n set x1(x) { this._structArray.int16[this._pos2 + 2] = x; }\n get y1() { return this._structArray.int16[this._pos2 + 3]; }\n set y1(x) { this._structArray.int16[this._pos2 + 3] = x; }\n get x2() { return this._structArray.int16[this._pos2 + 4]; }\n set x2(x) { this._structArray.int16[this._pos2 + 4] = x; }\n get y2() { return this._structArray.int16[this._pos2 + 5]; }\n set y2(x) { this._structArray.int16[this._pos2 + 5] = x; }\n get featureIndex() { return this._structArray.uint32[this._pos4 + 3]; }\n set featureIndex(x) { this._structArray.uint32[this._pos4 + 3] = x; }\n get sourceLayerIndex() { return this._structArray.uint16[this._pos2 + 8]; }\n set sourceLayerIndex(x) { this._structArray.uint16[this._pos2 + 8] = x; }\n get bucketIndex() { return this._structArray.uint16[this._pos2 + 9]; }\n set bucketIndex(x) { this._structArray.uint16[this._pos2 + 9] = x; }\n get radius() { return this._structArray.int16[this._pos2 + 10]; }\n set radius(x) { this._structArray.int16[this._pos2 + 10] = x; }\n get signedDistanceFromAnchor() { return this._structArray.int16[this._pos2 + 11]; }\n set signedDistanceFromAnchor(x) { this._structArray.int16[this._pos2 + 11] = x; }\n get anchorPoint() { return new Point(this.anchorPointX, this.anchorPointY); }\n}\n\nCollisionBoxStruct.prototype.size = 24;\n\n \n\n\n/**\n * @private\n */\nclass CollisionBoxArray extends StructArrayLayout6i1ul2ui2i24 {\n /**\n * Return the CollisionBoxStruct at the given location in the array.\n * @param {number} index The index of the element.\n */\n get(index ) {\n assert(!this.isTransferred);\n return new CollisionBoxStruct(this, index);\n }\n}\n\nregister('CollisionBoxArray', CollisionBoxArray);\n\nclass PlacedSymbolStruct extends Struct {\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n get anchorX() { return this._structArray.int16[this._pos2 + 0]; }\n set anchorX(x) { this._structArray.int16[this._pos2 + 0] = x; }\n get anchorY() { return this._structArray.int16[this._pos2 + 1]; }\n set anchorY(x) { this._structArray.int16[this._pos2 + 1] = x; }\n get glyphStartIndex() { return this._structArray.uint16[this._pos2 + 2]; }\n set glyphStartIndex(x) { this._structArray.uint16[this._pos2 + 2] = x; }\n get numGlyphs() { return this._structArray.uint16[this._pos2 + 3]; }\n set numGlyphs(x) { this._structArray.uint16[this._pos2 + 3] = x; }\n get vertexStartIndex() { return this._structArray.uint32[this._pos4 + 2]; }\n set vertexStartIndex(x) { this._structArray.uint32[this._pos4 + 2] = x; }\n get lineStartIndex() { return this._structArray.uint32[this._pos4 + 3]; }\n set lineStartIndex(x) { this._structArray.uint32[this._pos4 + 3] = x; }\n get lineLength() { return this._structArray.uint32[this._pos4 + 4]; }\n set lineLength(x) { this._structArray.uint32[this._pos4 + 4] = x; }\n get segment() { return this._structArray.uint16[this._pos2 + 10]; }\n set segment(x) { this._structArray.uint16[this._pos2 + 10] = x; }\n get lowerSize() { return this._structArray.uint16[this._pos2 + 11]; }\n set lowerSize(x) { this._structArray.uint16[this._pos2 + 11] = x; }\n get upperSize() { return this._structArray.uint16[this._pos2 + 12]; }\n set upperSize(x) { this._structArray.uint16[this._pos2 + 12] = x; }\n get lineOffsetX() { return this._structArray.float32[this._pos4 + 7]; }\n set lineOffsetX(x) { this._structArray.float32[this._pos4 + 7] = x; }\n get lineOffsetY() { return this._structArray.float32[this._pos4 + 8]; }\n set lineOffsetY(x) { this._structArray.float32[this._pos4 + 8] = x; }\n get writingMode() { return this._structArray.uint8[this._pos1 + 36]; }\n set writingMode(x) { this._structArray.uint8[this._pos1 + 36] = x; }\n get hidden() { return this._structArray.uint8[this._pos1 + 37]; }\n set hidden(x) { this._structArray.uint8[this._pos1 + 37] = x; }\n}\n\nPlacedSymbolStruct.prototype.size = 40;\n\n \n\n\n/**\n * @private\n */\nclass PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f2ub40 {\n /**\n * Return the PlacedSymbolStruct at the given location in the array.\n * @param {number} index The index of the element.\n */\n get(index ) {\n assert(!this.isTransferred);\n return new PlacedSymbolStruct(this, index);\n }\n}\n\nregister('PlacedSymbolArray', PlacedSymbolArray);\n\nclass GlyphOffsetStruct extends Struct {\n \n \n get offsetX() { return this._structArray.float32[this._pos4 + 0]; }\n set offsetX(x) { this._structArray.float32[this._pos4 + 0] = x; }\n}\n\nGlyphOffsetStruct.prototype.size = 4;\n\n \n\n\n/**\n * @private\n */\nclass GlyphOffsetArray extends StructArrayLayout1f4 {\n getoffsetX(index ) { return this.float32[index * 1 + 0]; }\n /**\n * Return the GlyphOffsetStruct at the given location in the array.\n * @param {number} index The index of the element.\n */\n get(index ) {\n assert(!this.isTransferred);\n return new GlyphOffsetStruct(this, index);\n }\n}\n\nregister('GlyphOffsetArray', GlyphOffsetArray);\n\nclass SymbolLineVertexStruct extends Struct {\n \n \n \n \n get x() { return this._structArray.int16[this._pos2 + 0]; }\n set x(x) { this._structArray.int16[this._pos2 + 0] = x; }\n get y() { return this._structArray.int16[this._pos2 + 1]; }\n set y(x) { this._structArray.int16[this._pos2 + 1] = x; }\n get tileUnitDistanceFromAnchor() { return this._structArray.int16[this._pos2 + 2]; }\n set tileUnitDistanceFromAnchor(x) { this._structArray.int16[this._pos2 + 2] = x; }\n}\n\nSymbolLineVertexStruct.prototype.size = 6;\n\n \n\n\n/**\n * @private\n */\nclass SymbolLineVertexArray extends StructArrayLayout3i6 {\n getx(index ) { return this.int16[index * 3 + 0]; }\n gety(index ) { return this.int16[index * 3 + 1]; }\n gettileUnitDistanceFromAnchor(index ) { return this.int16[index * 3 + 2]; }\n /**\n * Return the SymbolLineVertexStruct at the given location in the array.\n * @param {number} index The index of the element.\n */\n get(index ) {\n assert(!this.isTransferred);\n return new SymbolLineVertexStruct(this, index);\n }\n}\n\nregister('SymbolLineVertexArray', SymbolLineVertexArray);\n\nclass FeatureIndexStruct extends Struct {\n \n \n \n \n get featureIndex() { return this._structArray.uint32[this._pos4 + 0]; }\n set featureIndex(x) { this._structArray.uint32[this._pos4 + 0] = x; }\n get sourceLayerIndex() { return this._structArray.uint16[this._pos2 + 2]; }\n set sourceLayerIndex(x) { this._structArray.uint16[this._pos2 + 2] = x; }\n get bucketIndex() { return this._structArray.uint16[this._pos2 + 3]; }\n set bucketIndex(x) { this._structArray.uint16[this._pos2 + 3] = x; }\n}\n\nFeatureIndexStruct.prototype.size = 8;\n\n \n\n\n/**\n * @private\n */\nclass FeatureIndexArray extends StructArrayLayout1ul2ui8 {\n /**\n * Return the FeatureIndexStruct at the given location in the array.\n * @param {number} index The index of the element.\n */\n get(index ) {\n assert(!this.isTransferred);\n return new FeatureIndexStruct(this, index);\n }\n}\n\nregister('FeatureIndexArray', FeatureIndexArray);\n\n\nmodule.exports = {\n StructArrayLayout2i4,\n StructArrayLayout4i8,\n StructArrayLayout2i4i12,\n StructArrayLayout4i4ub12,\n StructArrayLayout4i4ui16,\n StructArrayLayout3f12,\n StructArrayLayout1ul4,\n StructArrayLayout6i1ul2ui2i24,\n StructArrayLayout2i2i2i12,\n StructArrayLayout2ub4,\n StructArrayLayout2i2ui3ul3ui2f2ub40,\n StructArrayLayout1f4,\n StructArrayLayout3i6,\n StructArrayLayout1ul2ui8,\n StructArrayLayout3ui6,\n StructArrayLayout2ui4,\n StructArrayLayout2f8,\n StructArrayLayout4f16,\n PosArray: StructArrayLayout2i4,\n RasterBoundsArray: StructArrayLayout4i8,\n CircleLayoutArray: StructArrayLayout2i4,\n FillLayoutArray: StructArrayLayout2i4,\n FillExtrusionLayoutArray: StructArrayLayout2i4i12,\n HeatmapLayoutArray: StructArrayLayout2i4,\n LineLayoutArray: StructArrayLayout4i4ub12,\n SymbolLayoutArray: StructArrayLayout4i4ui16,\n SymbolDynamicLayoutArray: StructArrayLayout3f12,\n SymbolOpacityArray: StructArrayLayout1ul4,\n CollisionBoxLayoutArray: StructArrayLayout2i2i2i12,\n CollisionCircleLayoutArray: StructArrayLayout2i2i2i12,\n CollisionVertexArray: StructArrayLayout2ub4,\n TriangleIndexArray: StructArrayLayout3ui6,\n LineIndexArray: StructArrayLayout2ui4,\n CollisionBoxArray,\n PlacedSymbolArray,\n GlyphOffsetArray,\n SymbolLineVertexArray,\n FeatureIndexArray\n};\n","// \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n/**\n * The `Bucket` interface is the single point of knowledge about turning vector\n * tiles into WebGL buffers.\n *\n * `Bucket` is an abstract interface. An implementation exists for each style layer type.\n * Create a bucket via the `StyleLayer#createBucket` method.\n *\n * The concrete bucket types, using layout options from the style layer,\n * transform feature geometries into vertex and index data for use by the\n * vertex shader. They also (via `ProgramConfiguration`) use feature\n * properties and the zoom level to populate the attributes needed for\n * data-driven styling.\n *\n * Buckets are designed to be built on a worker thread and then serialized and\n * transferred back to the main thread for rendering. On the worker side, a\n * bucket's vertex, index, and attribute data is stored in `bucket.arrays:\n * ArrayGroup`. When a bucket's data is serialized and sent back to the main\n * thread, is gets deserialized (using `new Bucket(serializedBucketData)`, with\n * the array data now stored in `bucket.buffers: BufferGroup`. BufferGroups\n * hold the same data as ArrayGroups, but are tuned for consumption by WebGL.\n *\n * @private\n */\n \n \n\n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n\nmodule.exports = {\n deserialize(input , style ) {\n const output = {};\n\n // Guard against the case where the map's style has been set to null while\n // this bucket has been parsing.\n if (!style) return output;\n\n for (const bucket of input) {\n const layers = bucket.layerIds\n .map((id) => style.getLayer(id))\n .filter(Boolean);\n\n if (layers.length === 0) {\n continue;\n }\n\n // look up StyleLayer objects from layer ids (since we don't\n // want to waste time serializing/copying them from the worker)\n (bucket ).layers = layers;\n\n for (const layer of layers) {\n output[layer.id] = bucket;\n }\n }\n\n return output;\n }\n};\n","// \nconst {createLayout} = require('../../util/struct_array');\nmodule.exports = createLayout([\n {name: 'a_pos', components: 2, type: 'Int16'}\n], 4);\n","// \n\nconst {CircleLayoutArray} = require('../array_types');\nconst layoutAttributes = require('./circle_attributes').members;\nconst {SegmentVector} = require('../segment');\nconst {ProgramConfigurationSet} = require('../program_configuration');\nconst {TriangleIndexArray} = require('../index_array_type');\nconst loadGeometry = require('../load_geometry');\nconst EXTENT = require('../extent');\nconst {register} = require('../../util/web_worker_transfer');\n\n \n \n \n \n \n \n \n \n \n \n \n \n\nfunction addCircleVertex(layoutVertexArray, x, y, extrudeX, extrudeY) {\n layoutVertexArray.emplaceBack(\n (x * 2) + ((extrudeX + 1) / 2),\n (y * 2) + ((extrudeY + 1) / 2));\n}\n\n\n/**\n * Circles are represented by two triangles.\n *\n * Each corner has a pos that is the center of the circle and an extrusion\n * vector that is where it points.\n * @private\n */\nclass CircleBucket {\n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n constructor(options ) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n\n this.layoutVertexArray = new CircleLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.segments = new SegmentVector();\n this.programConfigurations = new ProgramConfigurationSet(layoutAttributes, options.layers, options.zoom);\n }\n\n populate(features , options ) {\n for (const {feature, index, sourceLayerIndex} of features) {\n if (this.layers[0]._featureFilter({zoom: this.zoom}, feature)) {\n const geometry = loadGeometry(feature);\n this.addFeature(feature, geometry);\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n upload(context ) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.programConfigurations.upload(context);\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n }\n\n addFeature(feature , geometry ) {\n for (const ring of geometry) {\n for (const point of ring) {\n const x = point.x;\n const y = point.y;\n\n // Do not include points that are outside the tile boundaries.\n if (x < 0 || x >= EXTENT || y < 0 || y >= EXTENT) continue;\n\n // this geometry will be of the Point type, and we'll derive\n // two triangles from it.\n //\n // ┌─────────┐\n // │ 3 2 │\n // │ │\n // │ 0 1 │\n // └─────────┘\n\n const segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);\n const index = segment.vertexLength;\n\n addCircleVertex(this.layoutVertexArray, x, y, -1, -1);\n addCircleVertex(this.layoutVertexArray, x, y, 1, -1);\n addCircleVertex(this.layoutVertexArray, x, y, 1, 1);\n addCircleVertex(this.layoutVertexArray, x, y, -1, 1);\n\n this.indexArray.emplaceBack(index, index + 1, index + 2);\n this.indexArray.emplaceBack(index, index + 3, index + 2);\n\n segment.vertexLength += 4;\n segment.primitiveLength += 2;\n }\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature);\n }\n}\n\nregister('CircleBucket', CircleBucket, {omit: ['layers']});\n\nmodule.exports = CircleBucket;\n","// \n\nconst {FillLayoutArray} = require('../array_types');\nconst layoutAttributes = require('./fill_attributes').members;\nconst {SegmentVector} = require('../segment');\nconst {ProgramConfigurationSet} = require('../program_configuration');\nconst {LineIndexArray, TriangleIndexArray} = require('../index_array_type');\nconst loadGeometry = require('../load_geometry');\nconst earcut = require('earcut');\nconst classifyRings = require('../../util/classify_rings');\nconst assert = require('assert');\nconst EARCUT_MAX_RINGS = 500;\nconst {register} = require('../../util/web_worker_transfer');\n\n \n \n \n \n \n \n \n \n \n \n \n\nclass FillBucket {\n \n \n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n \n \n\n constructor(options ) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n\n this.layoutVertexArray = new FillLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.indexArray2 = new LineIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(layoutAttributes, options.layers, options.zoom);\n this.segments = new SegmentVector();\n this.segments2 = new SegmentVector();\n }\n\n populate(features , options ) {\n for (const {feature, index, sourceLayerIndex} of features) {\n if (this.layers[0]._featureFilter({zoom: this.zoom}, feature)) {\n const geometry = loadGeometry(feature);\n this.addFeature(feature, geometry);\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n upload(context ) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.indexBuffer2 = context.createIndexBuffer(this.indexArray2);\n this.programConfigurations.upload(context);\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.indexBuffer2.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n this.segments2.destroy();\n }\n\n addFeature(feature , geometry ) {\n for (const polygon of classifyRings(geometry, EARCUT_MAX_RINGS)) {\n let numVertices = 0;\n for (const ring of polygon) {\n numVertices += ring.length;\n }\n\n const triangleSegment = this.segments.prepareSegment(numVertices, this.layoutVertexArray, this.indexArray);\n const triangleIndex = triangleSegment.vertexLength;\n\n const flattened = [];\n const holeIndices = [];\n\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n if (ring !== polygon[0]) {\n holeIndices.push(flattened.length / 2);\n }\n\n const lineSegment = this.segments2.prepareSegment(ring.length, this.layoutVertexArray, this.indexArray2);\n const lineIndex = lineSegment.vertexLength;\n\n this.layoutVertexArray.emplaceBack(ring[0].x, ring[0].y);\n this.indexArray2.emplaceBack(lineIndex + ring.length - 1, lineIndex);\n flattened.push(ring[0].x);\n flattened.push(ring[0].y);\n\n for (let i = 1; i < ring.length; i++) {\n this.layoutVertexArray.emplaceBack(ring[i].x, ring[i].y);\n this.indexArray2.emplaceBack(lineIndex + i - 1, lineIndex + i);\n flattened.push(ring[i].x);\n flattened.push(ring[i].y);\n }\n\n lineSegment.vertexLength += ring.length;\n lineSegment.primitiveLength += ring.length;\n }\n\n const indices = earcut(flattened, holeIndices);\n assert(indices.length % 3 === 0);\n\n for (let i = 0; i < indices.length; i += 3) {\n this.indexArray.emplaceBack(\n triangleIndex + indices[i],\n triangleIndex + indices[i + 1],\n triangleIndex + indices[i + 2]);\n }\n\n triangleSegment.vertexLength += numVertices;\n triangleSegment.primitiveLength += indices.length / 3;\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature);\n }\n}\n\nregister('FillBucket', FillBucket, {omit: ['layers']});\n\nmodule.exports = FillBucket;\n","// \nconst {createLayout} = require('../../util/struct_array');\nmodule.exports = createLayout([\n {name: 'a_pos', components: 2, type: 'Int16'},\n {name: 'a_normal_ed', components: 4, type: 'Int16'},\n], 4);\n","// \n\nconst {FillExtrusionLayoutArray} = require('../array_types');\nconst layoutAttributes = require('./fill_extrusion_attributes').members;\nconst {SegmentVector, MAX_VERTEX_ARRAY_LENGTH} = require('../segment');\nconst {ProgramConfigurationSet} = require('../program_configuration');\nconst {TriangleIndexArray} = require('../index_array_type');\nconst loadGeometry = require('../load_geometry');\nconst EXTENT = require('../extent');\nconst earcut = require('earcut');\nconst classifyRings = require('../../util/classify_rings');\nconst assert = require('assert');\nconst EARCUT_MAX_RINGS = 500;\nconst {register} = require('../../util/web_worker_transfer');\n\n \n \n \n \n \n \n \n \n \n \n \n\nconst FACTOR = Math.pow(2, 13);\n\nfunction addVertex(vertexArray, x, y, nx, ny, nz, t, e) {\n vertexArray.emplaceBack(\n // a_pos\n x,\n y,\n // a_normal_ed: 3-component normal and 1-component edgedistance\n Math.floor(nx * FACTOR) * 2 + t,\n ny * FACTOR * 2,\n nz * FACTOR * 2,\n // edgedistance (used for wrapping patterns around extrusion sides)\n Math.round(e)\n );\n}\n\n\nclass FillExtrusionBucket {\n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n constructor(options ) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n\n this.layoutVertexArray = new FillExtrusionLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(layoutAttributes, options.layers, options.zoom);\n this.segments = new SegmentVector();\n }\n\n populate(features , options ) {\n for (const {feature, index, sourceLayerIndex} of features) {\n if (this.layers[0]._featureFilter({zoom: this.zoom}, feature)) {\n const geometry = loadGeometry(feature);\n this.addFeature(feature, geometry);\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n upload(context ) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.programConfigurations.upload(context);\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n }\n\n addFeature(feature , geometry ) {\n for (const polygon of classifyRings(geometry, EARCUT_MAX_RINGS)) {\n let numVertices = 0;\n for (const ring of polygon) {\n numVertices += ring.length;\n }\n let segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);\n\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n if (isEntirelyOutside(ring)) {\n continue;\n }\n\n let edgeDistance = 0;\n\n for (let p = 0; p < ring.length; p++) {\n const p1 = ring[p];\n\n if (p >= 1) {\n const p2 = ring[p - 1];\n\n if (!isBoundaryEdge(p1, p2)) {\n if (segment.vertexLength + 4 > MAX_VERTEX_ARRAY_LENGTH) {\n segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);\n }\n\n const perp = p1.sub(p2)._perp()._unit();\n const dist = p2.dist(p1);\n if (edgeDistance + dist > 32768) edgeDistance = 0;\n\n addVertex(this.layoutVertexArray, p1.x, p1.y, perp.x, perp.y, 0, 0, edgeDistance);\n addVertex(this.layoutVertexArray, p1.x, p1.y, perp.x, perp.y, 0, 1, edgeDistance);\n\n edgeDistance += dist;\n\n addVertex(this.layoutVertexArray, p2.x, p2.y, perp.x, perp.y, 0, 0, edgeDistance);\n addVertex(this.layoutVertexArray, p2.x, p2.y, perp.x, perp.y, 0, 1, edgeDistance);\n\n const bottomRight = segment.vertexLength;\n\n this.indexArray.emplaceBack(bottomRight, bottomRight + 1, bottomRight + 2);\n this.indexArray.emplaceBack(bottomRight + 1, bottomRight + 2, bottomRight + 3);\n\n segment.vertexLength += 4;\n segment.primitiveLength += 2;\n }\n }\n }\n }\n\n if (segment.vertexLength + numVertices > MAX_VERTEX_ARRAY_LENGTH) {\n segment = this.segments.prepareSegment(numVertices, this.layoutVertexArray, this.indexArray);\n }\n\n const flattened = [];\n const holeIndices = [];\n const triangleIndex = segment.vertexLength;\n\n for (const ring of polygon) {\n if (ring.length === 0) {\n continue;\n }\n\n if (ring !== polygon[0]) {\n holeIndices.push(flattened.length / 2);\n }\n\n for (let i = 0; i < ring.length; i++) {\n const p = ring[i];\n\n addVertex(this.layoutVertexArray, p.x, p.y, 0, 0, 1, 1, 0);\n\n flattened.push(p.x);\n flattened.push(p.y);\n }\n }\n\n const indices = earcut(flattened, holeIndices);\n assert(indices.length % 3 === 0);\n\n for (let j = 0; j < indices.length; j += 3) {\n this.indexArray.emplaceBack(\n triangleIndex + indices[j],\n triangleIndex + indices[j + 1],\n triangleIndex + indices[j + 2]);\n }\n\n segment.primitiveLength += indices.length / 3;\n segment.vertexLength += numVertices;\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature);\n }\n}\n\nregister('FillExtrusionBucket', FillExtrusionBucket, {omit: ['layers']});\n\nmodule.exports = FillExtrusionBucket;\n\nfunction isBoundaryEdge(p1, p2) {\n return (p1.x === p2.x && (p1.x < 0 || p1.x > EXTENT)) ||\n (p1.y === p2.y && (p1.y < 0 || p1.y > EXTENT));\n}\n\nfunction isEntirelyOutside(ring) {\n return ring.every(p => p.x < 0) ||\n ring.every(p => p.x > EXTENT) ||\n ring.every(p => p.y < 0) ||\n ring.every(p => p.y > EXTENT);\n}\n","// \n\nconst CircleBucket = require('./circle_bucket');\nconst {register} = require('../../util/web_worker_transfer');\n\n \n\nclass HeatmapBucket extends CircleBucket {\n // Needed for flow to accept omit: ['layers'] below, due to\n // https://github.com/facebook/flow/issues/4262\n \n}\n\nregister('HeatmapBucket', HeatmapBucket, {omit: ['layers']});\n\nmodule.exports = HeatmapBucket;\n","// \nconst {createLayout} = require('../../util/struct_array');\nmodule.exports = createLayout([\n {name: 'a_pos_normal', components: 4, type: 'Int16'},\n {name: 'a_data', components: 4, type: 'Uint8'}\n], 4);\n","// \n\nconst {LineLayoutArray} = require('../array_types');\nconst layoutAttributes = require('./line_attributes').members;\nconst {SegmentVector} = require('../segment');\nconst {ProgramConfigurationSet} = require('../program_configuration');\nconst {TriangleIndexArray} = require('../index_array_type');\nconst loadGeometry = require('../load_geometry');\nconst EXTENT = require('../extent');\nconst vectorTileFeatureTypes = require('@mapbox/vector-tile').VectorTileFeature.types;\nconst {register} = require('../../util/web_worker_transfer');\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n// NOTE ON EXTRUDE SCALE:\n// scale the extrusion vector so that the normal length is this value.\n// contains the \"texture\" normals (-1..1). this is distinct from the extrude\n// normals for line joins, because the x-value remains 0 for the texture\n// normal array, while the extrude normal actually moves the vertex to create\n// the acute/bevelled line join.\nconst EXTRUDE_SCALE = 63;\n\n/*\n * Sharp corners cause dashed lines to tilt because the distance along the line\n * is the same at both the inner and outer corners. To improve the appearance of\n * dashed lines we add extra points near sharp corners so that a smaller part\n * of the line is tilted.\n *\n * COS_HALF_SHARP_CORNER controls how sharp a corner has to be for us to add an\n * extra vertex. The default is 75 degrees.\n *\n * The newly created vertices are placed SHARP_CORNER_OFFSET pixels from the corner.\n */\nconst COS_HALF_SHARP_CORNER = Math.cos(75 / 2 * (Math.PI / 180));\nconst SHARP_CORNER_OFFSET = 15;\n\n// The number of bits that is used to store the line distance in the buffer.\nconst LINE_DISTANCE_BUFFER_BITS = 15;\n\n// We don't have enough bits for the line distance as we'd like to have, so\n// use this value to scale the line distance (in tile units) down to a smaller\n// value. This lets us store longer distances while sacrificing precision.\nconst LINE_DISTANCE_SCALE = 1 / 2;\n\n// The maximum line distance, in tile units, that fits in the buffer.\nconst MAX_LINE_DISTANCE = Math.pow(2, LINE_DISTANCE_BUFFER_BITS - 1) / LINE_DISTANCE_SCALE;\n\nfunction addLineVertex(layoutVertexBuffer, point , extrude , round , up , dir , linesofar ) {\n layoutVertexBuffer.emplaceBack(\n // a_pos_normal\n point.x,\n point.y,\n round ? 1 : 0,\n up ? 1 : -1,\n // a_data\n // add 128 to store a byte in an unsigned byte\n Math.round(EXTRUDE_SCALE * extrude.x) + 128,\n Math.round(EXTRUDE_SCALE * extrude.y) + 128,\n // Encode the -1/0/1 direction value into the first two bits of .z of a_data.\n // Combine it with the lower 6 bits of `linesofar` (shifted by 2 bites to make\n // room for the direction value). The upper 8 bits of `linesofar` are placed in\n // the `w` component. `linesofar` is scaled down by `LINE_DISTANCE_SCALE` so that\n // we can store longer distances while sacrificing precision.\n ((dir === 0 ? 0 : (dir < 0 ? -1 : 1)) + 1) | (((linesofar * LINE_DISTANCE_SCALE) & 0x3F) << 2),\n (linesofar * LINE_DISTANCE_SCALE) >> 6);\n}\n\n\n/**\n * @private\n */\nclass LineBucket {\n \n \n \n \n\n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n constructor(options ) {\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n\n this.layoutVertexArray = new LineLayoutArray();\n this.indexArray = new TriangleIndexArray();\n this.programConfigurations = new ProgramConfigurationSet(layoutAttributes, options.layers, options.zoom);\n this.segments = new SegmentVector();\n }\n\n populate(features , options ) {\n for (const {feature, index, sourceLayerIndex} of features) {\n if (this.layers[0]._featureFilter({zoom: this.zoom}, feature)) {\n const geometry = loadGeometry(feature);\n this.addFeature(feature, geometry);\n options.featureIndex.insert(feature, geometry, index, sourceLayerIndex, this.index);\n }\n }\n }\n\n isEmpty() {\n return this.layoutVertexArray.length === 0;\n }\n\n upload(context ) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray);\n this.programConfigurations.upload(context);\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n }\n\n addFeature(feature , geometry ) {\n const layout = this.layers[0].layout;\n const join = layout.get('line-join').evaluate(feature);\n const cap = layout.get('line-cap');\n const miterLimit = layout.get('line-miter-limit');\n const roundLimit = layout.get('line-round-limit');\n\n for (const line of geometry) {\n this.addLine(line, feature, join, cap, miterLimit, roundLimit);\n }\n }\n\n addLine(vertices , feature , join , cap , miterLimit , roundLimit ) {\n const isPolygon = vectorTileFeatureTypes[feature.type] === 'Polygon';\n\n // If the line has duplicate vertices at the ends, adjust start/length to remove them.\n let len = vertices.length;\n while (len >= 2 && vertices[len - 1].equals(vertices[len - 2])) {\n len--;\n }\n let first = 0;\n while (first < len - 1 && vertices[first].equals(vertices[first + 1])) {\n first++;\n }\n\n // Ignore invalid geometry.\n if (len < (isPolygon ? 3 : 2)) return;\n\n if (join === 'bevel') miterLimit = 1.05;\n\n const sharpCornerOffset = SHARP_CORNER_OFFSET * (EXTENT / (512 * this.overscaling));\n\n const firstVertex = vertices[first];\n\n // we could be more precise, but it would only save a negligible amount of space\n const segment = this.segments.prepareSegment(len * 10, this.layoutVertexArray, this.indexArray);\n\n this.distance = 0;\n\n const beginCap = cap,\n endCap = isPolygon ? 'butt' : cap;\n let startOfLine = true;\n let currentVertex;\n let prevVertex = ((undefined ) );\n let nextVertex = ((undefined ) );\n let prevNormal = ((undefined ) );\n let nextNormal = ((undefined ) );\n let offsetA;\n let offsetB;\n\n // the last three vertices added\n this.e1 = this.e2 = this.e3 = -1;\n\n if (isPolygon) {\n currentVertex = vertices[len - 2];\n nextNormal = firstVertex.sub(currentVertex)._unit()._perp();\n }\n\n for (let i = first; i < len; i++) {\n\n nextVertex = isPolygon && i === len - 1 ?\n vertices[first + 1] : // if the line is closed, we treat the last vertex like the first\n vertices[i + 1]; // just the next vertex\n\n // if two consecutive vertices exist, skip the current one\n if (nextVertex && vertices[i].equals(nextVertex)) continue;\n\n if (nextNormal) prevNormal = nextNormal;\n if (currentVertex) prevVertex = currentVertex;\n\n currentVertex = vertices[i];\n\n // Calculate the normal towards the next vertex in this line. In case\n // there is no next vertex, pretend that the line is continuing straight,\n // meaning that we are just using the previous normal.\n nextNormal = nextVertex ? nextVertex.sub(currentVertex)._unit()._perp() : prevNormal;\n\n // If we still don't have a previous normal, this is the beginning of a\n // non-closed line, so we're doing a straight \"join\".\n prevNormal = prevNormal || nextNormal;\n\n // Determine the normal of the join extrusion. It is the angle bisector\n // of the segments between the previous line and the next line.\n // In the case of 180° angles, the prev and next normals cancel each other out:\n // prevNormal + nextNormal = (0, 0), its magnitude is 0, so the unit vector would be\n // undefined. In that case, we're keeping the joinNormal at (0, 0), so that the cosHalfAngle\n // below will also become 0 and miterLength will become Infinity.\n let joinNormal = prevNormal.add(nextNormal);\n if (joinNormal.x !== 0 || joinNormal.y !== 0) {\n joinNormal._unit();\n }\n /* joinNormal prevNormal\n * ↖ ↑\n * .________. prevVertex\n * |\n * nextNormal ← | currentVertex\n * |\n * nextVertex !\n *\n */\n\n // Calculate the length of the miter (the ratio of the miter to the width).\n // Find the cosine of the angle between the next and join normals\n // using dot product. The inverse of that is the miter length.\n const cosHalfAngle = joinNormal.x * nextNormal.x + joinNormal.y * nextNormal.y;\n const miterLength = cosHalfAngle !== 0 ? 1 / cosHalfAngle : Infinity;\n\n const isSharpCorner = cosHalfAngle < COS_HALF_SHARP_CORNER && prevVertex && nextVertex;\n\n if (isSharpCorner && i > first) {\n const prevSegmentLength = currentVertex.dist(prevVertex);\n if (prevSegmentLength > 2 * sharpCornerOffset) {\n const newPrevVertex = currentVertex.sub(currentVertex.sub(prevVertex)._mult(sharpCornerOffset / prevSegmentLength)._round());\n this.distance += newPrevVertex.dist(prevVertex);\n this.addCurrentVertex(newPrevVertex, this.distance, prevNormal.mult(1), 0, 0, false, segment);\n prevVertex = newPrevVertex;\n }\n }\n\n // The join if a middle vertex, otherwise the cap.\n const middleVertex = prevVertex && nextVertex;\n let currentJoin = middleVertex ? join : nextVertex ? beginCap : endCap;\n\n if (middleVertex && currentJoin === 'round') {\n if (miterLength < roundLimit) {\n currentJoin = 'miter';\n } else if (miterLength <= 2) {\n currentJoin = 'fakeround';\n }\n }\n\n if (currentJoin === 'miter' && miterLength > miterLimit) {\n currentJoin = 'bevel';\n }\n\n if (currentJoin === 'bevel') {\n // The maximum extrude length is 128 / 63 = 2 times the width of the line\n // so if miterLength >= 2 we need to draw a different type of bevel here.\n if (miterLength > 2) currentJoin = 'flipbevel';\n\n // If the miterLength is really small and the line bevel wouldn't be visible,\n // just draw a miter join to save a triangle.\n if (miterLength < miterLimit) currentJoin = 'miter';\n }\n\n // Calculate how far along the line the currentVertex is\n if (prevVertex) this.distance += currentVertex.dist(prevVertex);\n\n if (currentJoin === 'miter') {\n\n joinNormal._mult(miterLength);\n this.addCurrentVertex(currentVertex, this.distance, joinNormal, 0, 0, false, segment);\n\n } else if (currentJoin === 'flipbevel') {\n // miter is too big, flip the direction to make a beveled join\n\n if (miterLength > 100) {\n // Almost parallel lines\n joinNormal = nextNormal.clone().mult(-1);\n\n } else {\n const direction = prevNormal.x * nextNormal.y - prevNormal.y * nextNormal.x > 0 ? -1 : 1;\n const bevelLength = miterLength * prevNormal.add(nextNormal).mag() / prevNormal.sub(nextNormal).mag();\n joinNormal._perp()._mult(bevelLength * direction);\n }\n this.addCurrentVertex(currentVertex, this.distance, joinNormal, 0, 0, false, segment);\n this.addCurrentVertex(currentVertex, this.distance, joinNormal.mult(-1), 0, 0, false, segment);\n\n } else if (currentJoin === 'bevel' || currentJoin === 'fakeround') {\n const lineTurnsLeft = (prevNormal.x * nextNormal.y - prevNormal.y * nextNormal.x) > 0;\n const offset = -Math.sqrt(miterLength * miterLength - 1);\n if (lineTurnsLeft) {\n offsetB = 0;\n offsetA = offset;\n } else {\n offsetA = 0;\n offsetB = offset;\n }\n\n // Close previous segment with a bevel\n if (!startOfLine) {\n this.addCurrentVertex(currentVertex, this.distance, prevNormal, offsetA, offsetB, false, segment);\n }\n\n if (currentJoin === 'fakeround') {\n // The join angle is sharp enough that a round join would be visible.\n // Bevel joins fill the gap between segments with a single pie slice triangle.\n // Create a round join by adding multiple pie slices. The join isn't actually round, but\n // it looks like it is at the sizes we render lines at.\n\n // Add more triangles for sharper angles.\n // This math is just a good enough approximation. It isn't \"correct\".\n const n = Math.floor((0.5 - (cosHalfAngle - 0.5)) * 8);\n let approxFractionalJoinNormal;\n\n for (let m = 0; m < n; m++) {\n approxFractionalJoinNormal = nextNormal.mult((m + 1) / (n + 1))._add(prevNormal)._unit();\n this.addPieSliceVertex(currentVertex, this.distance, approxFractionalJoinNormal, lineTurnsLeft, segment);\n }\n\n this.addPieSliceVertex(currentVertex, this.distance, joinNormal, lineTurnsLeft, segment);\n\n for (let k = n - 1; k >= 0; k--) {\n approxFractionalJoinNormal = prevNormal.mult((k + 1) / (n + 1))._add(nextNormal)._unit();\n this.addPieSliceVertex(currentVertex, this.distance, approxFractionalJoinNormal, lineTurnsLeft, segment);\n }\n }\n\n // Start next segment\n if (nextVertex) {\n this.addCurrentVertex(currentVertex, this.distance, nextNormal, -offsetA, -offsetB, false, segment);\n }\n\n } else if (currentJoin === 'butt') {\n if (!startOfLine) {\n // Close previous segment with a butt\n this.addCurrentVertex(currentVertex, this.distance, prevNormal, 0, 0, false, segment);\n }\n\n // Start next segment with a butt\n if (nextVertex) {\n this.addCurrentVertex(currentVertex, this.distance, nextNormal, 0, 0, false, segment);\n }\n\n } else if (currentJoin === 'square') {\n\n if (!startOfLine) {\n // Close previous segment with a square cap\n this.addCurrentVertex(currentVertex, this.distance, prevNormal, 1, 1, false, segment);\n\n // The segment is done. Unset vertices to disconnect segments.\n this.e1 = this.e2 = -1;\n }\n\n // Start next segment\n if (nextVertex) {\n this.addCurrentVertex(currentVertex, this.distance, nextNormal, -1, -1, false, segment);\n }\n\n } else if (currentJoin === 'round') {\n\n if (!startOfLine) {\n // Close previous segment with butt\n this.addCurrentVertex(currentVertex, this.distance, prevNormal, 0, 0, false, segment);\n\n // Add round cap or linejoin at end of segment\n this.addCurrentVertex(currentVertex, this.distance, prevNormal, 1, 1, true, segment);\n\n // The segment is done. Unset vertices to disconnect segments.\n this.e1 = this.e2 = -1;\n }\n\n\n // Start next segment with a butt\n if (nextVertex) {\n // Add round cap before first segment\n this.addCurrentVertex(currentVertex, this.distance, nextNormal, -1, -1, true, segment);\n\n this.addCurrentVertex(currentVertex, this.distance, nextNormal, 0, 0, false, segment);\n }\n }\n\n if (isSharpCorner && i < len - 1) {\n const nextSegmentLength = currentVertex.dist(nextVertex);\n if (nextSegmentLength > 2 * sharpCornerOffset) {\n const newCurrentVertex = currentVertex.add(nextVertex.sub(currentVertex)._mult(sharpCornerOffset / nextSegmentLength)._round());\n this.distance += newCurrentVertex.dist(currentVertex);\n this.addCurrentVertex(newCurrentVertex, this.distance, nextNormal.mult(1), 0, 0, false, segment);\n currentVertex = newCurrentVertex;\n }\n }\n\n startOfLine = false;\n }\n\n this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature);\n }\n\n /**\n * Add two vertices to the buffers.\n *\n * @param {Object} currentVertex the line vertex to add buffer vertices for\n * @param {number} distance the distance from the beginning of the line to the vertex\n * @param {number} endLeft extrude to shift the left vertex along the line\n * @param {number} endRight extrude to shift the left vertex along the line\n * @param {boolean} round whether this is a round cap\n * @private\n */\n addCurrentVertex(currentVertex ,\n distance ,\n normal ,\n endLeft ,\n endRight ,\n round ,\n segment ) {\n let extrude;\n const layoutVertexArray = this.layoutVertexArray;\n const indexArray = this.indexArray;\n\n extrude = normal.clone();\n if (endLeft) extrude._sub(normal.perp()._mult(endLeft));\n addLineVertex(layoutVertexArray, currentVertex, extrude, round, false, endLeft, distance);\n this.e3 = segment.vertexLength++;\n if (this.e1 >= 0 && this.e2 >= 0) {\n indexArray.emplaceBack(this.e1, this.e2, this.e3);\n segment.primitiveLength++;\n }\n this.e1 = this.e2;\n this.e2 = this.e3;\n\n extrude = normal.mult(-1);\n if (endRight) extrude._sub(normal.perp()._mult(endRight));\n addLineVertex(layoutVertexArray, currentVertex, extrude, round, true, -endRight, distance);\n this.e3 = segment.vertexLength++;\n if (this.e1 >= 0 && this.e2 >= 0) {\n indexArray.emplaceBack(this.e1, this.e2, this.e3);\n segment.primitiveLength++;\n }\n this.e1 = this.e2;\n this.e2 = this.e3;\n\n // There is a maximum \"distance along the line\" that we can store in the buffers.\n // When we get close to the distance, reset it to zero and add the vertex again with\n // a distance of zero. The max distance is determined by the number of bits we allocate\n // to `linesofar`.\n if (distance > MAX_LINE_DISTANCE / 2) {\n this.distance = 0;\n this.addCurrentVertex(currentVertex, this.distance, normal, endLeft, endRight, round, segment);\n }\n }\n\n /**\n * Add a single new vertex and a triangle using two previous vertices.\n * This adds a pie slice triangle near a join to simulate round joins\n *\n * @param currentVertex the line vertex to add buffer vertices for\n * @param distance the distance from the beggining of the line to the vertex\n * @param extrude the offset of the new vertex from the currentVertex\n * @param lineTurnsLeft whether the line is turning left or right at this angle\n * @private\n */\n addPieSliceVertex(currentVertex ,\n distance ,\n extrude ,\n lineTurnsLeft ,\n segment ) {\n extrude = extrude.mult(lineTurnsLeft ? -1 : 1);\n const layoutVertexArray = this.layoutVertexArray;\n const indexArray = this.indexArray;\n\n addLineVertex(layoutVertexArray, currentVertex, extrude, false, lineTurnsLeft, 0, distance);\n this.e3 = segment.vertexLength++;\n if (this.e1 >= 0 && this.e2 >= 0) {\n indexArray.emplaceBack(this.e1, this.e2, this.e3);\n segment.primitiveLength++;\n }\n\n if (lineTurnsLeft) {\n this.e2 = this.e3;\n } else {\n this.e1 = this.e3;\n }\n }\n}\n\nregister('LineBucket', LineBucket, {omit: ['layers']});\n\nmodule.exports = LineBucket;\n","// \n\nconst {createLayout} = require('../../util/struct_array');\n \n\nconst symbolLayoutAttributes = createLayout([\n {name: 'a_pos_offset', components: 4, type: 'Int16'},\n {name: 'a_data', components: 4, type: 'Uint16'}\n]);\n\nconst dynamicLayoutAttributes = createLayout([\n { name: 'a_projected_pos', components: 3, type: 'Float32' }\n], 4);\n\nconst placementOpacityAttributes = createLayout([\n { name: 'a_fade_opacity', components: 1, type: 'Uint32' }\n], 4);\n\nconst collisionVertexAttributes = createLayout([\n { name: 'a_placed', components: 2, type: 'Uint8' }\n], 4);\n\nconst symbolAttributes = {\n symbolLayoutAttributes,\n dynamicLayoutAttributes,\n placementOpacityAttributes,\n collisionVertexAttributes,\n collisionBox: createLayout([\n // the box is centered around the anchor point\n { type: 'Int16', name: 'anchorPointX' },\n { type: 'Int16', name: 'anchorPointY' },\n\n // distances to the edges from the anchor\n { type: 'Int16', name: 'x1' },\n { type: 'Int16', name: 'y1' },\n { type: 'Int16', name: 'x2' },\n { type: 'Int16', name: 'y2' },\n\n // the index of the feature in the original vectortile\n { type: 'Uint32', name: 'featureIndex' },\n // the source layer the feature appears in\n { type: 'Uint16', name: 'sourceLayerIndex' },\n // the bucket the feature appears in\n { type: 'Uint16', name: 'bucketIndex' },\n\n // collision circles for lines store their distance to the anchor in tile units\n // so that they can be ignored if the projected label doesn't extend into\n // the box area\n { type: 'Int16', name: 'radius' },\n { type: 'Int16', name: 'signedDistanceFromAnchor' }\n ]),\n collisionBoxLayout: createLayout([ // used to render collision boxes for debugging purposes\n {name: 'a_pos', components: 2, type: 'Int16'},\n {name: 'a_anchor_pos', components: 2, type: 'Int16'},\n {name: 'a_extrude', components: 2, type: 'Int16'}\n ], 4),\n collisionCircleLayout: createLayout([ // used to render collision circles for debugging purposes\n {name: 'a_pos', components: 2, type: 'Int16'},\n {name: 'a_anchor_pos', components: 2, type: 'Int16'},\n {name: 'a_extrude', components: 2, type: 'Int16'}\n ], 4),\n placement: createLayout([\n { type: 'Int16', name: 'anchorX' },\n { type: 'Int16', name: 'anchorY' },\n { type: 'Uint16', name: 'glyphStartIndex' },\n { type: 'Uint16', name: 'numGlyphs' },\n { type: 'Uint32', name: 'vertexStartIndex' },\n { type: 'Uint32', name: 'lineStartIndex' },\n { type: 'Uint32', name: 'lineLength' },\n { type: 'Uint16', name: 'segment' },\n { type: 'Uint16', name: 'lowerSize' },\n { type: 'Uint16', name: 'upperSize' },\n { type: 'Float32', name: 'lineOffsetX' },\n { type: 'Float32', name: 'lineOffsetY' },\n { type: 'Uint8', name: 'writingMode' },\n { type: 'Uint8', name: 'hidden' }\n ]),\n glyphOffset: createLayout([\n { type: 'Float32', name: 'offsetX' }\n ]),\n lineVertex: createLayout([\n { type: 'Int16', name: 'x' },\n { type: 'Int16', name: 'y' },\n { type: 'Int16', name: 'tileUnitDistanceFromAnchor' }\n ])\n};\n\nmodule.exports = symbolAttributes;\n","// \n\nconst {\n symbolLayoutAttributes,\n collisionVertexAttributes,\n collisionBoxLayout,\n collisionCircleLayout,\n dynamicLayoutAttributes\n} = require('./symbol_attributes');\n\nconst {\n SymbolLayoutArray,\n SymbolDynamicLayoutArray,\n SymbolOpacityArray,\n CollisionBoxLayoutArray,\n CollisionCircleLayoutArray,\n CollisionVertexArray,\n PlacedSymbolArray,\n GlyphOffsetArray,\n SymbolLineVertexArray\n} = require('../array_types');\n\nconst Point = require('@mapbox/point-geometry');\nconst {SegmentVector} = require('../segment');\nconst {ProgramConfigurationSet} = require('../program_configuration');\nconst {TriangleIndexArray, LineIndexArray} = require('../index_array_type');\nconst transformText = require('../../symbol/transform_text');\nconst mergeLines = require('../../symbol/mergelines');\nconst scriptDetection = require('../../util/script_detection');\nconst loadGeometry = require('../load_geometry');\nconst vectorTileFeatureTypes = require('@mapbox/vector-tile').VectorTileFeature.types;\nconst verticalizePunctuation = require('../../util/verticalize_punctuation');\nconst Anchor = require('../../symbol/anchor');\nconst OpacityState = require('../../symbol/opacity_state');\nconst {getSizeData} = require('../../symbol/symbol_size');\nconst {register} = require('../../util/web_worker_transfer');\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n\n// Opacity arrays are frequently updated but don't contain a lot of information, so we pack them\n// tight. Each Uint32 is actually four duplicate Uint8s for the four corners of a glyph\n// 7 bits are for the current opacity, and the lowest bit is the target opacity\n\n// actually defined in symbol_attributes.js\n// const placementOpacityAttributes = [\n// { name: 'a_fade_opacity', components: 1, type: 'Uint32' }\n// ];\nconst shaderOpacityAttributes = [\n { name: 'a_fade_opacity', components: 1, type: 'Uint8', offset: 0 }\n];\n\n \n \n \n \n \n \n \n \n\nconst symbolBufferConfigurations = {\n text: {\n LayoutArray: SymbolLayoutArray,\n layoutAttributes: symbolLayoutAttributes.members,\n IndexArray: TriangleIndexArray,\n dynamicLayout: true,\n opacity: true,\n collision: false\n },\n icon: {\n LayoutArray: SymbolLayoutArray,\n layoutAttributes: symbolLayoutAttributes.members,\n IndexArray: TriangleIndexArray,\n dynamicLayout: true,\n opacity: true,\n collision: false\n },\n collisionBox: { // used to render collision boxes for debugging purposes\n LayoutArray: CollisionBoxLayoutArray,\n layoutAttributes: collisionBoxLayout.members,\n IndexArray: LineIndexArray,\n dynamicLayout: false,\n opacity: false,\n collision: true\n },\n collisionCircle: { // used to render collision circles for debugging purposes\n LayoutArray: CollisionCircleLayoutArray,\n layoutAttributes: collisionCircleLayout.members,\n IndexArray: TriangleIndexArray,\n dynamicLayout: false,\n opacity: false,\n collision: true\n }\n};\n\nfunction addVertex(array, anchorX, anchorY, ox, oy, tx, ty, sizeVertex) {\n array.emplaceBack(\n // a_pos_offset\n anchorX,\n anchorY,\n Math.round(ox * 64),\n Math.round(oy * 64),\n\n // a_data\n tx, // x coordinate of symbol on glyph atlas texture\n ty, // y coordinate of symbol on glyph atlas texture\n sizeVertex ? sizeVertex[0] : undefined,\n sizeVertex ? sizeVertex[1] : undefined\n );\n}\n\nfunction addDynamicAttributes(dynamicLayoutVertexArray , p , angle ) {\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n dynamicLayoutVertexArray.emplaceBack(p.x, p.y, angle);\n}\n\nclass SymbolBuffers {\n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n constructor(configuration , programConfigurations ) {\n this.layoutVertexArray = new configuration.LayoutArray();\n this.layoutAttributes = configuration.layoutAttributes;\n this.indexArray = new configuration.IndexArray();\n this.programConfigurations = programConfigurations;\n this.segments = new SegmentVector();\n\n if (configuration.dynamicLayout) {\n this.dynamicLayoutVertexArray = new SymbolDynamicLayoutArray();\n }\n\n if (configuration.opacity) {\n this.opacityVertexArray = new SymbolOpacityArray();\n }\n\n if (configuration.collision) {\n this.collisionVertexArray = new CollisionVertexArray();\n }\n }\n\n upload(context , dynamicIndexBuffer = false) {\n this.layoutVertexBuffer = context.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes);\n this.indexBuffer = context.createIndexBuffer(this.indexArray, dynamicIndexBuffer);\n this.programConfigurations.upload(context);\n\n if (this.dynamicLayoutVertexArray) {\n this.dynamicLayoutVertexBuffer = context.createVertexBuffer(this.dynamicLayoutVertexArray, dynamicLayoutAttributes.members, true);\n }\n if (this.opacityVertexArray) {\n this.opacityVertexBuffer = context.createVertexBuffer(this.opacityVertexArray, shaderOpacityAttributes, true);\n // This is a performance hack so that we can write to opacityVertexArray with uint32s\n // even though the shaders read uint8s\n this.opacityVertexBuffer.itemSize = 1;\n }\n if (this.collisionVertexArray) {\n this.collisionVertexBuffer = context.createVertexBuffer(this.collisionVertexArray, collisionVertexAttributes.members, true);\n }\n }\n\n destroy() {\n if (!this.layoutVertexBuffer) return;\n this.layoutVertexBuffer.destroy();\n this.indexBuffer.destroy();\n this.programConfigurations.destroy();\n this.segments.destroy();\n if (this.dynamicLayoutVertexBuffer) {\n this.dynamicLayoutVertexBuffer.destroy();\n }\n if (this.opacityVertexBuffer) {\n this.opacityVertexBuffer.destroy();\n }\n if (this.collisionVertexBuffer) {\n this.collisionVertexBuffer.destroy();\n }\n }\n}\n\nregister('SymbolBuffers', SymbolBuffers);\n\n/**\n * Unlike other buckets, which simply implement #addFeature with type-specific\n * logic for (essentially) triangulating feature geometries, SymbolBucket\n * requires specialized behavior:\n *\n * 1. WorkerTile#parse(), the logical owner of the bucket creation process,\n * calls SymbolBucket#populate(), which resolves text and icon tokens on\n * each feature, adds each glyphs and symbols needed to the passed-in\n * collections options.glyphDependencies and options.iconDependencies, and\n * stores the feature data for use in subsequent step (this.features).\n *\n * 2. WorkerTile asynchronously requests from the main thread all of the glyphs\n * and icons needed (by this bucket and any others). When glyphs and icons\n * have been received, the WorkerTile creates a CollisionIndex and invokes:\n *\n * 3. performSymbolLayout(bucket, stacks, icons) perform texts shaping and\n * layout on a Symbol Bucket. This step populates:\n * `this.symbolInstances`: metadata on generated symbols\n * `this.collisionBoxArray`: collision data for use by foreground\n * `this.text`: SymbolBuffers for text symbols\n * `this.icons`: SymbolBuffers for icons\n * `this.collisionBox`: Debug SymbolBuffers for collision boxes\n * `this.collisionCircle`: Debug SymbolBuffers for collision circles\n * The results are sent to the foreground for rendering\n *\n * 4. performSymbolPlacement(bucket, collisionIndex) is run on the foreground,\n * and uses the CollisionIndex along with current camera settings to determine\n * which symbols can actually show on the map. Collided symbols are hidden\n * using a dynamic \"OpacityVertexArray\".\n *\n * @private\n */\nclass SymbolBucket {\n \n \n\n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n constructor(options ) {\n this.collisionBoxArray = options.collisionBoxArray;\n this.zoom = options.zoom;\n this.overscaling = options.overscaling;\n this.layers = options.layers;\n this.layerIds = this.layers.map(layer => layer.id);\n this.index = options.index;\n this.pixelRatio = options.pixelRatio;\n\n const layer = this.layers[0];\n const unevaluatedLayoutValues = layer._unevaluatedLayout._values;\n\n this.textSizeData = getSizeData(this.zoom, unevaluatedLayoutValues['text-size']);\n this.iconSizeData = getSizeData(this.zoom, unevaluatedLayoutValues['icon-size']);\n\n const layout = this.layers[0].layout;\n this.sortFeaturesByY = layout.get('text-allow-overlap') || layout.get('icon-allow-overlap') ||\n layout.get('text-ignore-placement') || layout.get('icon-ignore-placement');\n }\n\n createArrays() {\n this.text = new SymbolBuffers(symbolBufferConfigurations.text, new ProgramConfigurationSet(symbolLayoutAttributes.members, this.layers, this.zoom, property => /^text/.test(property)));\n this.icon = new SymbolBuffers(symbolBufferConfigurations.icon, new ProgramConfigurationSet(symbolLayoutAttributes.members, this.layers, this.zoom, property => /^icon/.test(property)));\n this.collisionBox = new SymbolBuffers(symbolBufferConfigurations.collisionBox, new ProgramConfigurationSet(collisionBoxLayout.members, this.layers, this.zoom, () => false));\n this.collisionCircle = new SymbolBuffers(symbolBufferConfigurations.collisionCircle, new ProgramConfigurationSet(collisionCircleLayout.members, this.layers, this.zoom, () => false));\n\n this.placedGlyphArray = new PlacedSymbolArray();\n this.placedIconArray = new PlacedSymbolArray();\n this.glyphOffsetArray = new GlyphOffsetArray();\n this.lineVertexArray = new SymbolLineVertexArray();\n }\n\n populate(features , options ) {\n const layer = this.layers[0];\n const layout = layer.layout;\n\n const textFont = layout.get('text-font');\n const textField = layout.get('text-field');\n const iconImage = layout.get('icon-image');\n const hasText =\n (textField.value.kind !== 'constant' || textField.value.value.length > 0) &&\n (textFont.value.kind !== 'constant' || textFont.value.value.length > 0);\n const hasIcon = iconImage.value.kind !== 'constant' || iconImage.value.value && iconImage.value.value.length > 0;\n\n this.features = [];\n\n if (!hasText && !hasIcon) {\n return;\n }\n\n const icons = options.iconDependencies;\n const stacks = options.glyphDependencies;\n const globalProperties = {zoom: this.zoom};\n\n for (const {feature, index, sourceLayerIndex} of features) {\n if (!layer._featureFilter(globalProperties, feature)) {\n continue;\n }\n\n let text;\n if (hasText) {\n text = layer.getValueAndResolveTokens('text-field', feature);\n text = transformText(text, layer, feature);\n }\n\n let icon;\n if (hasIcon) {\n icon = layer.getValueAndResolveTokens('icon-image', feature);\n }\n\n if (!text && !icon) {\n continue;\n }\n\n const symbolFeature = {\n text,\n icon,\n index,\n sourceLayerIndex,\n geometry: loadGeometry(feature),\n properties: feature.properties,\n type: vectorTileFeatureTypes[feature.type]\n };\n if (typeof feature.id !== 'undefined') {\n symbolFeature.id = feature.id;\n }\n this.features.push(symbolFeature);\n\n if (icon) {\n icons[icon] = true;\n }\n\n if (text) {\n const fontStack = textFont.evaluate(feature).join(',');\n const stack = stacks[fontStack] = stacks[fontStack] || {};\n const textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') === 'line';\n const allowsVerticalWritingMode = scriptDetection.allowsVerticalWritingMode(text);\n for (let i = 0; i < text.length; i++) {\n stack[text.charCodeAt(i)] = true;\n if (textAlongLine && allowsVerticalWritingMode) {\n const verticalChar = verticalizePunctuation.lookup[text.charAt(i)];\n if (verticalChar) {\n stack[verticalChar.charCodeAt(0)] = true;\n }\n }\n }\n }\n }\n\n if (layout.get('symbol-placement') === 'line') {\n // Merge adjacent lines with the same text to improve labelling.\n // It's better to place labels on one long line than on many short segments.\n this.features = mergeLines(this.features);\n }\n }\n\n\n isEmpty() {\n return this.symbolInstances.length === 0;\n }\n\n upload(context ) {\n this.text.upload(context, this.sortFeaturesByY);\n this.icon.upload(context, this.sortFeaturesByY);\n this.collisionBox.upload(context);\n this.collisionCircle.upload(context);\n }\n\n destroy() {\n this.text.destroy();\n this.icon.destroy();\n this.collisionBox.destroy();\n this.collisionCircle.destroy();\n }\n\n addToLineVertexArray(anchor , line ) {\n const lineStartIndex = this.lineVertexArray.length;\n if (anchor.segment !== undefined) {\n let sumForwardLength = anchor.dist(line[anchor.segment + 1]);\n let sumBackwardLength = anchor.dist(line[anchor.segment]);\n const vertices = {};\n for (let i = anchor.segment + 1; i < line.length; i++) {\n vertices[i] = { x: line[i].x, y: line[i].y, tileUnitDistanceFromAnchor: sumForwardLength };\n if (i < line.length - 1) {\n sumForwardLength += line[i + 1].dist(line[i]);\n }\n }\n for (let i = anchor.segment || 0; i >= 0; i--) {\n vertices[i] = { x: line[i].x, y: line[i].y, tileUnitDistanceFromAnchor: sumBackwardLength };\n if (i > 0) {\n sumBackwardLength += line[i - 1].dist(line[i]);\n }\n }\n for (let i = 0; i < line.length; i++) {\n const vertex = vertices[i];\n this.lineVertexArray.emplaceBack(vertex.x, vertex.y, vertex.tileUnitDistanceFromAnchor);\n }\n }\n return {\n lineStartIndex: lineStartIndex,\n lineLength: this.lineVertexArray.length - lineStartIndex\n };\n }\n\n addSymbols(arrays ,\n quads ,\n sizeVertex ,\n lineOffset ,\n alongLine ,\n feature ,\n writingMode ,\n labelAnchor ,\n lineStartIndex ,\n lineLength ,\n placedSymbolArray ) {\n const indexArray = arrays.indexArray;\n const layoutVertexArray = arrays.layoutVertexArray;\n const dynamicLayoutVertexArray = arrays.dynamicLayoutVertexArray;\n\n const segment = arrays.segments.prepareSegment(4 * quads.length, arrays.layoutVertexArray, arrays.indexArray);\n const glyphOffsetArrayStart = this.glyphOffsetArray.length;\n const vertexStartIndex = segment.vertexLength;\n\n for (const symbol of quads) {\n\n const tl = symbol.tl,\n tr = symbol.tr,\n bl = symbol.bl,\n br = symbol.br,\n tex = symbol.tex;\n\n const index = segment.vertexLength;\n\n const y = symbol.glyphOffset[1];\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, tl.x, y + tl.y, tex.x, tex.y, sizeVertex);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, tr.x, y + tr.y, tex.x + tex.w, tex.y, sizeVertex);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, bl.x, y + bl.y, tex.x, tex.y + tex.h, sizeVertex);\n addVertex(layoutVertexArray, labelAnchor.x, labelAnchor.y, br.x, y + br.y, tex.x + tex.w, tex.y + tex.h, sizeVertex);\n\n addDynamicAttributes(dynamicLayoutVertexArray, labelAnchor, 0);\n\n indexArray.emplaceBack(index, index + 1, index + 2);\n indexArray.emplaceBack(index + 1, index + 2, index + 3);\n\n segment.vertexLength += 4;\n segment.primitiveLength += 2;\n\n this.glyphOffsetArray.emplaceBack(symbol.glyphOffset[0]);\n }\n\n placedSymbolArray.emplaceBack(labelAnchor.x, labelAnchor.y,\n glyphOffsetArrayStart, this.glyphOffsetArray.length - glyphOffsetArrayStart, vertexStartIndex,\n lineStartIndex, lineLength, (labelAnchor.segment ),\n sizeVertex ? sizeVertex[0] : 0, sizeVertex ? sizeVertex[1] : 0,\n lineOffset[0], lineOffset[1],\n writingMode, (false ));\n\n arrays.programConfigurations.populatePaintArrays(arrays.layoutVertexArray.length, feature);\n }\n\n _addCollisionDebugVertex(layoutVertexArray , collisionVertexArray , point , anchor , extrude ) {\n collisionVertexArray.emplaceBack(0, 0);\n return layoutVertexArray.emplaceBack(\n // pos\n point.x,\n point.y,\n // a_anchor_pos\n anchor.x,\n anchor.y,\n // extrude\n Math.round(extrude.x),\n Math.round(extrude.y));\n }\n\n\n addCollisionDebugVertices(x1 , y1 , x2 , y2 , arrays , boxAnchorPoint , symbolInstance , isCircle ) {\n const segment = arrays.segments.prepareSegment(4, arrays.layoutVertexArray, arrays.indexArray);\n const index = segment.vertexLength;\n\n const layoutVertexArray = arrays.layoutVertexArray;\n const collisionVertexArray = arrays.collisionVertexArray;\n\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, symbolInstance.anchor, new Point(x1, y1));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, symbolInstance.anchor, new Point(x2, y1));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, symbolInstance.anchor, new Point(x2, y2));\n this._addCollisionDebugVertex(layoutVertexArray, collisionVertexArray, boxAnchorPoint, symbolInstance.anchor, new Point(x1, y2));\n\n segment.vertexLength += 4;\n if (isCircle) {\n const indexArray = (arrays.indexArray );\n indexArray.emplaceBack(index, index + 1, index + 2);\n indexArray.emplaceBack(index, index + 2, index + 3);\n\n segment.primitiveLength += 2;\n } else {\n const indexArray = (arrays.indexArray );\n indexArray.emplaceBack(index, index + 1);\n indexArray.emplaceBack(index + 1, index + 2);\n indexArray.emplaceBack(index + 2, index + 3);\n indexArray.emplaceBack(index + 3, index);\n\n segment.primitiveLength += 4;\n }\n }\n\n generateCollisionDebugBuffers() {\n for (const symbolInstance of this.symbolInstances) {\n symbolInstance.textCollisionFeature = {boxStartIndex: symbolInstance.textBoxStartIndex, boxEndIndex: symbolInstance.textBoxEndIndex};\n symbolInstance.iconCollisionFeature = {boxStartIndex: symbolInstance.iconBoxStartIndex, boxEndIndex: symbolInstance.iconBoxEndIndex};\n\n for (let i = 0; i < 2; i++) {\n const feature = symbolInstance[i === 0 ? 'textCollisionFeature' : 'iconCollisionFeature'];\n if (!feature) continue;\n\n for (let b = feature.boxStartIndex; b < feature.boxEndIndex; b++) {\n const box = (this.collisionBoxArray.get(b) );\n const x1 = box.x1;\n const y1 = box.y1;\n const x2 = box.x2;\n const y2 = box.y2;\n\n // If the radius > 0, this collision box is actually a circle\n // The data we add to the buffers is exactly the same, but we'll render with a different shader.\n const isCircle = box.radius > 0;\n this.addCollisionDebugVertices(x1, y1, x2, y2, isCircle ? this.collisionCircle : this.collisionBox, box.anchorPoint, symbolInstance, isCircle);\n }\n }\n }\n }\n\n // These flat arrays are meant to be quicker to iterate over than the source\n // CollisionBoxArray\n deserializeCollisionBoxes(collisionBoxArray , textStartIndex , textEndIndex , iconStartIndex , iconEndIndex ) {\n const collisionArrays = {};\n for (let k = textStartIndex; k < textEndIndex; k++) {\n const box = (collisionBoxArray.get(k) );\n if (box.radius === 0) {\n collisionArrays.textBox = { x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY };\n\n break; // Only one box allowed per instance\n } else {\n if (!collisionArrays.textCircles) {\n collisionArrays.textCircles = [];\n }\n const used = 1; // May be updated at collision detection time\n collisionArrays.textCircles.push(box.anchorPointX, box.anchorPointY, box.radius, box.signedDistanceFromAnchor, used);\n }\n }\n for (let k = iconStartIndex; k < iconEndIndex; k++) {\n // An icon can only have one box now, so this indexing is a bit vestigial...\n const box = (collisionBoxArray.get(k) );\n if (box.radius === 0) {\n collisionArrays.iconBox = { x1: box.x1, y1: box.y1, x2: box.x2, y2: box.y2, anchorPointX: box.anchorPointX, anchorPointY: box.anchorPointY };\n break; // Only one box allowed per instance\n }\n }\n return collisionArrays;\n }\n\n sortFeatures(angle ) {\n if (!this.sortFeaturesByY) return;\n\n if (this.sortedAngle === angle) return;\n this.sortedAngle = angle;\n\n // The current approach to sorting doesn't sort across segments so don't try.\n // Sorting within segments separately seemed not to be worth the complexity.\n if (this.text.segments.get().length > 1 || this.icon.segments.get().length > 1) return;\n\n // If the symbols are allowed to overlap sort them by their vertical screen position.\n // The index array buffer is rewritten to reference the (unchanged) vertices in the\n // sorted order.\n\n // To avoid sorting the actual symbolInstance array we sort an array of indexes.\n const symbolInstanceIndexes = [];\n for (let i = 0; i < this.symbolInstances.length; i++) {\n symbolInstanceIndexes.push(i);\n }\n\n const sin = Math.sin(angle),\n cos = Math.cos(angle);\n\n symbolInstanceIndexes.sort((aIndex, bIndex) => {\n const a = this.symbolInstances[aIndex];\n const b = this.symbolInstances[bIndex];\n const aRotated = (sin * a.anchor.x + cos * a.anchor.y) | 0;\n const bRotated = (sin * b.anchor.x + cos * b.anchor.y) | 0;\n return (aRotated - bRotated) || (b.featureIndex - a.featureIndex);\n });\n\n this.text.indexArray.clear();\n this.icon.indexArray.clear();\n\n for (const i of symbolInstanceIndexes) {\n const symbolInstance = this.symbolInstances[i];\n\n for (const placedTextSymbolIndex of symbolInstance.placedTextSymbolIndices) {\n const placedSymbol = (this.placedGlyphArray.get(placedTextSymbolIndex) );\n\n const endIndex = placedSymbol.vertexStartIndex + placedSymbol.numGlyphs * 4;\n for (let vertexIndex = placedSymbol.vertexStartIndex; vertexIndex < endIndex; vertexIndex += 4) {\n this.text.indexArray.emplaceBack(vertexIndex, vertexIndex + 1, vertexIndex + 2);\n this.text.indexArray.emplaceBack(vertexIndex + 1, vertexIndex + 2, vertexIndex + 3);\n }\n }\n\n const placedIcon = (this.placedIconArray.get(i) );\n if (placedIcon.numGlyphs) {\n const vertexIndex = placedIcon.vertexStartIndex;\n this.icon.indexArray.emplaceBack(vertexIndex, vertexIndex + 1, vertexIndex + 2);\n this.icon.indexArray.emplaceBack(vertexIndex + 1, vertexIndex + 2, vertexIndex + 3);\n }\n }\n\n if (this.text.indexBuffer) this.text.indexBuffer.updateData(this.text.indexArray);\n if (this.icon.indexBuffer) this.icon.indexBuffer.updateData(this.icon.indexArray);\n }\n}\n\nregister('SymbolBucket', SymbolBucket, {\n omit: ['layers', 'collisionBoxArray', 'features', 'compareText'],\n shallow: ['symbolInstances']\n});\n\n// this constant is based on the size of StructArray indexes used in a symbol\n// bucket--namely, glyphOffsetArrayStart\n// eg the max valid UInt16 is 65,535\n// See https://github.com/mapbox/mapbox-gl-js/issues/2907 for motivation\n// lineStartIndex and textBoxStartIndex could potentially be concerns\n// but we expect there to be many fewer boxes/lines than glyphs\nSymbolBucket.MAX_GLYPHS = 65535;\n\nSymbolBucket.addDynamicAttributes = addDynamicAttributes;\n\nmodule.exports = SymbolBucket;\n","// \nconst {RGBAImage} = require('../util/image');\nconst util = require('../util/util');\nconst {register} = require('../util/web_worker_transfer');\n\nclass Level {\n \n \n \n \n\n constructor(dim , border , data ) {\n if (dim <= 0) throw new RangeError('Level must have positive dimension');\n this.dim = dim;\n this.border = border;\n this.stride = this.dim + 2 * this.border;\n this.data = data || new Int32Array((this.dim + 2 * this.border) * (this.dim + 2 * this.border));\n }\n\n set(x , y , value ) {\n this.data[this._idx(x, y)] = value + 65536;\n }\n\n get(x , y ) {\n return this.data[this._idx(x, y)] - 65536;\n }\n\n _idx(x , y ) {\n if (x < -this.border || x >= this.dim + this.border || y < -this.border || y >= this.dim + this.border) throw new RangeError('out of range source coordinates for DEM data');\n return (y + this.border) * this.stride + (x + this.border);\n }\n}\n\nregister('Level', Level);\n\n// DEMData is a data structure for decoding, backfilling, and storing elevation data for processing in the hillshade shaders\n// data can be populated either from a pngraw image tile or from serliazed data sent back from a worker. When data is initially\n// loaded from a image tile, we decode the pixel values using the mapbox terrain-rgb tileset decoding formula, but we store the\n// elevation data in a Level as an Int32 value. we add 65536 (2^16) to eliminate negative values and enable the use of\n// integer overflow when creating the texture used in the hillshadePrepare step.\n\n// DEMData also handles the backfilling of data from a tile's neighboring tiles. This is necessary because we use a pixel's 8\n// surrounding pixel values to compute the slope at that pixel, and we cannot accurately calculate the slope at pixels on a\n// tile's edge without backfilling from neighboring tiles.\n\nclass DEMData {\n \n \n \n \n\n constructor(uid , scale , data ) {\n this.uid = uid;\n this.scale = scale || 1;\n // if no data is provided, use a temporary empty level to satisfy flow\n this.level = data || new Level(256, 512);\n this.loaded = !!data;\n }\n\n loadFromImage(data ) {\n if (data.height !== data.width) throw new RangeError('DEM tiles must be square');\n\n // Build level 0\n const level = this.level = new Level(data.width, data.width / 2);\n const pixels = data.data;\n\n // unpack\n for (let y = 0; y < level.dim; y++) {\n for (let x = 0; x < level.dim; x++) {\n const i = y * level.dim + x;\n const j = i * 4;\n // decoding per https://blog.mapbox.com/global-elevation-data-6689f1d0ba65\n level.set(x, y, this.scale * ((pixels[j] * 256 * 256 + pixels[j + 1] * 256.0 + pixels[j + 2]) / 10.0 - 10000.0));\n }\n }\n\n // in order to avoid flashing seams between tiles, here we are initially populating a 1px border of pixels around the image\n // with the data of the nearest pixel from the image. this data is eventually replaced when the tile's neighboring\n // tiles are loaded and the accurate data can be backfilled using DEMData#backfillBorder\n for (let x = 0; x < level.dim; x++) {\n // left vertical border\n level.set(-1, x, level.get(0, x));\n // right vertical border\n level.set(level.dim, x, level.get(level.dim - 1, x));\n // left horizontal border\n level.set(x, -1, level.get(x, 0));\n // right horizontal border\n level.set(x, level.dim, level.get(x, level.dim - 1));\n }\n // corners\n level.set(-1, -1, level.get(0, 0));\n level.set(level.dim, -1, level.get(level.dim - 1, 0));\n level.set(-1, level.dim, level.get(0, level.dim - 1));\n level.set(level.dim, level.dim, level.get(level.dim - 1, level.dim - 1));\n this.loaded = true;\n }\n\n getPixels() {\n return new RGBAImage({width: this.level.dim + 2 * this.level.border, height: this.level.dim + 2 * this.level.border}, new Uint8Array(this.level.data.buffer));\n }\n\n backfillBorder(borderTile , dx , dy ) {\n const t = this.level;\n const o = borderTile.level;\n\n if (t.dim !== o.dim) throw new Error('level mismatch (dem dimension)');\n\n let _xMin = dx * t.dim,\n _xMax = dx * t.dim + t.dim,\n _yMin = dy * t.dim,\n _yMax = dy * t.dim + t.dim;\n\n switch (dx) {\n case -1:\n _xMin = _xMax - 1;\n break;\n case 1:\n _xMax = _xMin + 1;\n break;\n }\n\n switch (dy) {\n case -1:\n _yMin = _yMax - 1;\n break;\n case 1:\n _yMax = _yMin + 1;\n break;\n }\n\n const xMin = util.clamp(_xMin, -t.border, t.dim + t.border);\n const xMax = util.clamp(_xMax, -t.border, t.dim + t.border);\n const yMin = util.clamp(_yMin, -t.border, t.dim + t.border);\n const yMax = util.clamp(_yMax, -t.border, t.dim + t.border);\n\n const ox = -dx * t.dim;\n const oy = -dy * t.dim;\n for (let y = yMin; y < yMax; y++) {\n for (let x = xMin; x < xMax; x++) {\n t.set(x, y, o.get(x + ox, y + oy));\n }\n }\n }\n}\n\nregister('DEMData', DEMData);\nmodule.exports = {DEMData, Level};\n\n","// \n\n/**\n * The maximum value of a coordinate in the internal tile coordinate system. Coordinates of\n * all source features normalized to this extent upon load.\n *\n * The value is a consequence of the following:\n *\n * * Vertex buffer store positions as signed 16 bit integers.\n * * One bit is lost for signedness to support tile buffers.\n * * One bit is lost because the line vertex buffer used to pack 1 bit of other data into the int.\n * This is no longer the case but we're reserving this bit anyway.\n * * One bit is lost to support features extending past the extent on the right edge of the tile.\n * * This leaves us with 2^13 = 8192\n *\n * @private\n * @readonly\n */\nmodule.exports = 8192;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst loadGeometry = require('./load_geometry');\nconst EXTENT = require('./extent');\nconst featureFilter = require('../style-spec/feature_filter');\nconst Grid = require('grid-index');\nconst DictionaryCoder = require('../util/dictionary_coder');\nconst vt = require('@mapbox/vector-tile');\nconst Protobuf = require('pbf');\nconst GeoJSONFeature = require('../util/vectortile_to_geojson');\nconst arraysIntersect = require('../util/util').arraysIntersect;\nconst {OverscaledTileID} = require('../source/tile_id');\nconst {register} = require('../util/web_worker_transfer');\n\n \n \n \n \n\nconst {FeatureIndexArray} = require('./array_types');\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\nclass FeatureIndex {\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n\n constructor(tileID ,\n overscaling ,\n grid ,\n featureIndexArray ) {\n this.tileID = tileID;\n this.overscaling = overscaling;\n this.x = tileID.canonical.x;\n this.y = tileID.canonical.y;\n this.z = tileID.canonical.z;\n this.grid = grid || new Grid(EXTENT, 16, 0);\n this.featureIndexArray = featureIndexArray || new FeatureIndexArray();\n }\n\n insert(feature , geometry , featureIndex , sourceLayerIndex , bucketIndex ) {\n const key = this.featureIndexArray.length;\n this.featureIndexArray.emplaceBack(featureIndex, sourceLayerIndex, bucketIndex);\n\n for (let r = 0; r < geometry.length; r++) {\n const ring = geometry[r];\n\n const bbox = [Infinity, Infinity, -Infinity, -Infinity];\n for (let i = 0; i < ring.length; i++) {\n const p = ring[i];\n bbox[0] = Math.min(bbox[0], p.x);\n bbox[1] = Math.min(bbox[1], p.y);\n bbox[2] = Math.max(bbox[2], p.x);\n bbox[3] = Math.max(bbox[3], p.y);\n }\n\n this.grid.insert(key, bbox[0], bbox[1], bbox[2], bbox[3]);\n }\n }\n\n setCollisionIndex(collisionIndex ) {\n this.collisionIndex = collisionIndex;\n }\n\n // Finds features in this tile at a particular position.\n query(args , styleLayers ) {\n if (!this.vtLayers) {\n this.vtLayers = new vt.VectorTile(new Protobuf(this.rawTileData)).layers;\n this.sourceLayerCoder = new DictionaryCoder(this.vtLayers ? Object.keys(this.vtLayers).sort() : ['_geojsonTileLayer']);\n }\n\n const result = {};\n\n const params = args.params || {},\n pixelsToTileUnits = EXTENT / args.tileSize / args.scale,\n filter = featureFilter(params.filter);\n\n const queryGeometry = args.queryGeometry;\n const additionalRadius = args.additionalRadius * pixelsToTileUnits;\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n for (let i = 0; i < queryGeometry.length; i++) {\n const ring = queryGeometry[i];\n for (let k = 0; k < ring.length; k++) {\n const p = ring[k];\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n }\n }\n\n const matching = this.grid.query(minX - additionalRadius, minY - additionalRadius, maxX + additionalRadius, maxY + additionalRadius);\n matching.sort(topDownFeatureComparator);\n this.filterMatching(result, matching, this.featureIndexArray, queryGeometry, filter, params.layers, styleLayers, args.bearing, pixelsToTileUnits);\n\n const matchingSymbols = this.collisionIndex ?\n this.collisionIndex.queryRenderedSymbols(queryGeometry, this.tileID, EXTENT / args.tileSize, args.collisionBoxArray, args.sourceID) :\n [];\n matchingSymbols.sort();\n this.filterMatching(result, matchingSymbols, args.collisionBoxArray, queryGeometry, filter, params.layers, styleLayers, args.bearing, pixelsToTileUnits);\n\n return result;\n }\n\n filterMatching(\n result ,\n matching ,\n array ,\n queryGeometry ,\n filter ,\n filterLayerIDs ,\n styleLayers ,\n bearing ,\n pixelsToTileUnits \n ) {\n let previousIndex;\n for (let k = 0; k < matching.length; k++) {\n const index = matching[k];\n\n // don't check the same feature more than once\n if (index === previousIndex) continue;\n previousIndex = index;\n\n const match = array.get(index);\n\n const layerIDs = this.bucketLayerIDs[match.bucketIndex];\n if (filterLayerIDs && !arraysIntersect(filterLayerIDs, layerIDs)) continue;\n\n const sourceLayerName = this.sourceLayerCoder.decode(match.sourceLayerIndex);\n const sourceLayer = this.vtLayers[sourceLayerName];\n const feature = sourceLayer.feature(match.featureIndex);\n\n if (!filter({zoom: this.tileID.overscaledZ}, feature)) continue;\n\n let geometry = null;\n\n for (let l = 0; l < layerIDs.length; l++) {\n const layerID = layerIDs[l];\n\n if (filterLayerIDs && filterLayerIDs.indexOf(layerID) < 0) {\n continue;\n }\n\n const styleLayer = styleLayers[layerID];\n if (!styleLayer) continue;\n\n if (styleLayer.type !== 'symbol') {\n // all symbols already match the style\n if (!geometry) {\n geometry = loadGeometry(feature);\n }\n if (!styleLayer.queryIntersectsFeature(queryGeometry, feature, geometry, this.z, bearing, pixelsToTileUnits)) {\n continue;\n }\n }\n\n const geojsonFeature = new GeoJSONFeature(feature, this.z, this.x, this.y);\n (geojsonFeature ).layer = styleLayer.serialize();\n let layerResult = result[layerID];\n if (layerResult === undefined) {\n layerResult = result[layerID] = [];\n }\n layerResult.push({ featureIndex: index, feature: geojsonFeature });\n }\n }\n }\n\n hasLayer(id ) {\n for (const layerIDs of this.bucketLayerIDs) {\n for (const layerID of layerIDs) {\n if (id === layerID) return true;\n }\n }\n\n return false;\n }\n}\n\nregister(\n 'FeatureIndex',\n FeatureIndex,\n { omit: ['rawTileData', 'sourceLayerCoder', 'collisionIndex'] }\n);\n\nmodule.exports = FeatureIndex;\n\nfunction topDownFeatureComparator(a, b) {\n return b - a;\n}\n","// \n\n/**\n * An index array stores Uint16 indicies of vertexes in a corresponding vertex array. We use\n * two kinds of index arrays: arrays storing groups of three indicies, forming triangles; and\n * arrays storing pairs of indicies, forming line segments.\n * @private\n */\nmodule.exports = {\n LineIndexArray: require('./array_types').LineIndexArray,\n TriangleIndexArray: require('./array_types').TriangleIndexArray\n};\n","// \n\nconst util = require('../util/util');\nconst EXTENT = require('./extent');\n\n \n\n// These bounds define the minimum and maximum supported coordinate values.\n// While visible coordinates are within [0, EXTENT], tiles may theoretically\n// contain cordinates within [-Infinity, Infinity]. Our range is limited by the\n// number of bits used to represent the coordinate.\nfunction createBounds(bits) {\n return {\n min: -1 * Math.pow(2, bits - 1),\n max: Math.pow(2, bits - 1) - 1\n };\n}\n\nconst bounds = createBounds(16);\n\n/**\n * Loads a geometry from a VectorTileFeature and scales it to the common extent\n * used internally.\n * @param {VectorTileFeature} feature\n * @private\n */\nmodule.exports = function loadGeometry(feature ) {\n const scale = EXTENT / feature.extent;\n const geometry = feature.loadGeometry();\n for (let r = 0; r < geometry.length; r++) {\n const ring = geometry[r];\n for (let p = 0; p < ring.length; p++) {\n const point = ring[p];\n // round here because mapbox-gl-native uses integers to represent\n // points and we need to do the same to avoid renering differences.\n point.x = Math.round(point.x * scale);\n point.y = Math.round(point.y * scale);\n\n if (point.x < bounds.min || point.x > bounds.max || point.y < bounds.min || point.y > bounds.max) {\n util.warnOnce('Geometry exceeds allowed extent, reduce your vector tile buffer size');\n }\n }\n }\n return geometry;\n};\n","// \nconst {createLayout} = require('../util/struct_array');\nmodule.exports = createLayout([\n { name: 'a_pos', type: 'Int16', components: 2 }\n]);\n","// \n\n \n\nconst packUint8ToFloat = require('../shaders/encode_attribute').packUint8ToFloat;\nconst Color = require('../style-spec/util/color');\nconst {register} = require('../util/web_worker_transfer');\nconst {PossiblyEvaluatedPropertyValue} = require('../style/properties');\nconst {\n StructArrayLayout1f4,\n StructArrayLayout2f8,\n StructArrayLayout4f16\n} = require('./array_types');\n\n \n \n \n \n \n \n \n\nfunction packColor(color ) {\n return [\n packUint8ToFloat(255 * color.r, 255 * color.g),\n packUint8ToFloat(255 * color.b, 255 * color.a)\n ];\n}\n\n/**\n * `Binder` is the interface definition for the strategies for constructing,\n * uploading, and binding paint property data as GLSL attributes.\n *\n * It has three implementations, one for each of the three strategies we use:\n *\n * * For _constant_ properties -- those whose value is a constant, or the constant\n * result of evaluating a camera expression at a particular camera position -- we\n * don't need a vertex buffer, and instead use a uniform.\n * * For data expressions, we use a vertex buffer with a single attribute value,\n * the evaluated result of the source function for the given feature.\n * * For composite expressions, we use a vertex buffer with two attributes: min and\n * max values covering the range of zooms at which we expect the tile to be\n * displayed. These values are calculated by evaluating the composite expression for\n * the given feature at strategically chosen zoom levels. In addition to this\n * attribute data, we also use a uniform value which the shader uses to interpolate\n * between the min and max value at the final displayed zoom level. The use of a\n * uniform allows us to cheaply update the value on every frame.\n *\n * Note that the shader source varies depending on whether we're using a uniform or\n * attribute. We dynamically compile shaders at runtime to accomodate this.\n *\n * @private\n */\n \n \n\n \n \n \n\n \n\n \n \n \n \n \n\nclass ConstantBinder {\n \n \n \n \n\n constructor(value , name , type ) {\n this.value = value;\n this.name = name;\n this.type = type;\n this.statistics = { max: -Infinity };\n }\n\n defines() {\n return [`#define HAS_UNIFORM_u_${this.name}`];\n }\n\n populatePaintArray() {}\n upload() {}\n destroy() {}\n\n setUniforms(context ,\n program ,\n globals ,\n currentValue ) {\n const value = currentValue.constantOr(this.value);\n const gl = context.gl;\n if (this.type === 'color') {\n gl.uniform4f(program.uniforms[`u_${this.name}`], value.r, value.g, value.b, value.a);\n } else {\n gl.uniform1f(program.uniforms[`u_${this.name}`], value);\n }\n }\n}\n\nclass SourceExpressionBinder {\n \n \n \n \n\n \n \n \n\n constructor(expression , name , type ) {\n this.expression = expression;\n this.name = name;\n this.type = type;\n this.statistics = { max: -Infinity };\n const PaintVertexArray = type === 'color' ? StructArrayLayout2f8 : StructArrayLayout1f4;\n this.paintVertexAttributes = [{\n name: `a_${name}`,\n type: 'Float32',\n components: type === 'color' ? 2 : 1,\n offset: 0\n }];\n this.paintVertexArray = new PaintVertexArray();\n }\n\n defines() {\n return [];\n }\n\n populatePaintArray(length , feature ) {\n const paintArray = this.paintVertexArray;\n\n const start = paintArray.length;\n paintArray.reserve(length);\n\n const value = this.expression.evaluate({zoom: 0}, feature);\n\n if (this.type === 'color') {\n const color = packColor(value);\n for (let i = start; i < length; i++) {\n paintArray.emplaceBack(color[0], color[1]);\n }\n } else {\n for (let i = start; i < length; i++) {\n paintArray.emplaceBack(value);\n }\n\n this.statistics.max = Math.max(this.statistics.max, value);\n }\n }\n\n upload(context ) {\n if (this.paintVertexArray) {\n this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes);\n }\n }\n\n destroy() {\n if (this.paintVertexBuffer) {\n this.paintVertexBuffer.destroy();\n }\n }\n\n setUniforms(context , program ) {\n context.gl.uniform1f(program.uniforms[`a_${this.name}_t`], 0);\n }\n}\n\nclass CompositeExpressionBinder {\n \n \n \n \n \n \n\n \n \n \n\n constructor(expression , name , type , useIntegerZoom , zoom ) {\n this.expression = expression;\n this.name = name;\n this.type = type;\n this.useIntegerZoom = useIntegerZoom;\n this.zoom = zoom;\n this.statistics = { max: -Infinity };\n const PaintVertexArray = type === 'color' ? StructArrayLayout4f16 : StructArrayLayout2f8;\n this.paintVertexAttributes = [{\n name: `a_${name}`,\n type: 'Float32',\n components: type === 'color' ? 4 : 2,\n offset: 0\n }];\n this.paintVertexArray = new PaintVertexArray();\n }\n\n defines() {\n return [];\n }\n\n populatePaintArray(length , feature ) {\n const paintArray = this.paintVertexArray;\n\n const start = paintArray.length;\n paintArray.reserve(length);\n\n const min = this.expression.evaluate({zoom: this.zoom }, feature);\n const max = this.expression.evaluate({zoom: this.zoom + 1}, feature);\n\n if (this.type === 'color') {\n const minColor = packColor(min);\n const maxColor = packColor(max);\n for (let i = start; i < length; i++) {\n paintArray.emplaceBack(minColor[0], minColor[1], maxColor[0], maxColor[1]);\n }\n } else {\n for (let i = start; i < length; i++) {\n paintArray.emplaceBack(min, max);\n }\n\n this.statistics.max = Math.max(this.statistics.max, min, max);\n }\n }\n\n upload(context ) {\n if (this.paintVertexArray) {\n this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes);\n }\n }\n\n destroy() {\n if (this.paintVertexBuffer) {\n this.paintVertexBuffer.destroy();\n }\n }\n\n interpolationFactor(currentZoom ) {\n if (this.useIntegerZoom) {\n return this.expression.interpolationFactor(Math.floor(currentZoom), this.zoom, this.zoom + 1);\n } else {\n return this.expression.interpolationFactor(currentZoom, this.zoom, this.zoom + 1);\n }\n }\n\n setUniforms(context , program , globals ) {\n context.gl.uniform1f(program.uniforms[`a_${this.name}_t`], this.interpolationFactor(globals.zoom));\n }\n}\n\n/**\n * ProgramConfiguration contains the logic for binding style layer properties and tile\n * layer feature data into GL program uniforms and vertex attributes.\n *\n * Non-data-driven property values are bound to shader uniforms. Data-driven property\n * values are bound to vertex attributes. In order to support a uniform GLSL syntax over\n * both, [Mapbox GL Shaders](https://github.com/mapbox/mapbox-gl-shaders) defines a `#pragma`\n * abstraction, which ProgramConfiguration is responsible for implementing. At runtime,\n * it examines the attributes of a particular layer, combines this with fixed knowledge\n * about how layers of the particular type are implemented, and determines which uniforms\n * and vertex attributes will be required. It can then substitute the appropriate text\n * into the shader source code, create and link a program, and bind the uniforms and\n * vertex attributes in preparation for drawing.\n *\n * When a vector tile is parsed, this same configuration information is used to\n * populate the attribute buffers needed for data-driven styling using the zoom\n * level and feature property data.\n *\n * @private\n */\nclass ProgramConfiguration {\n \n \n \n\n \n\n constructor() {\n this.binders = {};\n this.cacheKey = '';\n\n this._buffers = [];\n }\n\n static createDynamic (layer , zoom , filterProperties ) {\n const self = new ProgramConfiguration();\n const keys = [];\n\n for (const property in layer.paint._values) {\n if (!filterProperties(property)) continue;\n const value = layer.paint.get(property);\n if (!(value instanceof PossiblyEvaluatedPropertyValue) || !value.property.specification['property-function']) {\n continue;\n }\n const name = paintAttributeName(property, layer.type);\n const type = value.property.specification.type;\n const useIntegerZoom = value.property.useIntegerZoom;\n\n if (value.value.kind === 'constant') {\n self.binders[property] = new ConstantBinder(value.value, name, type);\n keys.push(`/u_${name}`);\n } else if (value.value.kind === 'source') {\n self.binders[property] = new SourceExpressionBinder(value.value, name, type);\n keys.push(`/a_${name}`);\n } else {\n self.binders[property] = new CompositeExpressionBinder(value.value, name, type, useIntegerZoom, zoom);\n keys.push(`/z_${name}`);\n }\n }\n\n self.cacheKey = keys.sort().join('');\n\n return self;\n }\n\n static forBackgroundColor(color , opacity ) {\n const self = new ProgramConfiguration();\n\n self.binders['background-color'] = new ConstantBinder(color, 'color', 'color');\n self.cacheKey += `/u_color`;\n\n self.binders['background-opacity'] = new ConstantBinder(opacity, 'opacity', 'number');\n self.cacheKey += `/u_opacity`;\n\n return self;\n }\n\n static forBackgroundPattern(opacity ) {\n const self = new ProgramConfiguration();\n\n self.binders['background-opacity'] = new ConstantBinder(opacity, 'opacity', 'number');\n self.cacheKey += `/u_opacity`;\n\n return self;\n }\n\n static forTileClippingMask() {\n // The color and opacity values don't matter.\n return ProgramConfiguration.forBackgroundColor(Color.black, 1);\n }\n\n populatePaintArrays(length , feature ) {\n for (const property in this.binders) {\n this.binders[property].populatePaintArray(length, feature);\n }\n }\n\n defines() {\n const result = [];\n for (const property in this.binders) {\n result.push.apply(result, this.binders[property].defines());\n }\n return result;\n }\n\n setUniforms (context , program , properties , globals ) {\n for (const property in this.binders) {\n const binder = this.binders[property];\n binder.setUniforms(context, program, globals, properties.get(property));\n }\n }\n\n getPaintVertexBuffers() {\n return this._buffers;\n }\n\n upload(context ) {\n for (const property in this.binders) {\n this.binders[property].upload(context);\n }\n\n const buffers = [];\n for (const property in this.binders) {\n const binder = this.binders[property];\n if ((binder instanceof SourceExpressionBinder ||\n binder instanceof CompositeExpressionBinder) &&\n binder.paintVertexBuffer\n ) {\n buffers.push(binder.paintVertexBuffer);\n }\n }\n this._buffers = buffers;\n }\n\n destroy() {\n for (const property in this.binders) {\n this.binders[property].destroy();\n }\n }\n}\n\nclass ProgramConfigurationSet {\n \n\n constructor(layoutAttributes , layers , zoom , filterProperties = () => true) {\n this.programConfigurations = {};\n for (const layer of layers) {\n this.programConfigurations[layer.id] = ProgramConfiguration.createDynamic(layer, zoom, filterProperties);\n this.programConfigurations[layer.id].layoutAttributes = layoutAttributes;\n }\n }\n\n populatePaintArrays(length , feature ) {\n for (const key in this.programConfigurations) {\n this.programConfigurations[key].populatePaintArrays(length, feature);\n }\n }\n\n get(layerId ) {\n return this.programConfigurations[layerId];\n }\n\n upload(context ) {\n for (const layerId in this.programConfigurations) {\n this.programConfigurations[layerId].upload(context);\n }\n }\n\n destroy() {\n for (const layerId in this.programConfigurations) {\n this.programConfigurations[layerId].destroy();\n }\n }\n}\n\n// paint property arrays\nfunction paintAttributeName(property, type) {\n const attributeNameExceptions = {\n 'text-opacity': 'opacity',\n 'icon-opacity': 'opacity',\n 'text-color': 'fill_color',\n 'icon-color': 'fill_color',\n 'text-halo-color': 'halo_color',\n 'icon-halo-color': 'halo_color',\n 'text-halo-blur': 'halo_blur',\n 'icon-halo-blur': 'halo_blur',\n 'text-halo-width': 'halo_width',\n 'icon-halo-width': 'halo_width',\n 'line-gap-width': 'gapwidth'\n };\n return attributeNameExceptions[property] ||\n property.replace(`${type}-`, '').replace(/-/g, '_');\n}\n\nregister('ConstantBinder', ConstantBinder);\nregister('SourceExpressionBinder', SourceExpressionBinder);\nregister('CompositeExpressionBinder', CompositeExpressionBinder);\nregister('ProgramConfiguration', ProgramConfiguration, {omit: ['_buffers']});\nregister('ProgramConfigurationSet', ProgramConfigurationSet);\n\nmodule.exports = {\n ProgramConfiguration,\n ProgramConfigurationSet\n};\n","// \nconst {createLayout} = require('../util/struct_array');\nmodule.exports = createLayout([\n { name: 'a_pos', type: 'Int16', components: 2 },\n { name: 'a_texture_pos', type: 'Int16', components: 2 }\n]);\n","// \n\nconst {warnOnce} = require('../util/util');\nconst {register} = require('../util/web_worker_transfer');\n\n \n \n\nconst MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1;\n\n \n \n \n \n \n \n \n\nclass SegmentVector {\n \n\n constructor(segments = []) {\n this.segments = segments;\n }\n\n prepareSegment(numVertices , layoutVertexArray , indexArray ) {\n let segment = this.segments[this.segments.length - 1];\n if (numVertices > MAX_VERTEX_ARRAY_LENGTH) warnOnce(`Max vertices per segment is ${MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${numVertices}`);\n if (!segment || segment.vertexLength + numVertices > module.exports.MAX_VERTEX_ARRAY_LENGTH) {\n segment = ({\n vertexOffset: layoutVertexArray.length,\n primitiveOffset: indexArray.length,\n vertexLength: 0,\n primitiveLength: 0\n } );\n this.segments.push(segment);\n }\n return segment;\n }\n\n get() {\n return this.segments;\n }\n\n destroy() {\n for (const segment of this.segments) {\n for (const k in segment.vaos) {\n segment.vaos[k].destroy();\n }\n }\n }\n}\n\nregister('SegmentVector', SegmentVector);\n\nmodule.exports = {\n SegmentVector,\n\n /**\n * The maximum size of a vertex array. This limit is imposed by WebGL's 16 bit\n * addressing of vertex buffers.\n * @private\n * @readonly\n */\n MAX_VERTEX_ARRAY_LENGTH: MAX_VERTEX_ARRAY_LENGTH\n};\n","// \n\n/**\n * A coordinate is a column, row, zoom combination, often used\n * as the data component of a tile.\n *\n * @param {number} column\n * @param {number} row\n * @param {number} zoom\n * @private\n */\nclass Coordinate {\n \n \n \n constructor(column , row , zoom ) {\n this.column = column;\n this.row = row;\n this.zoom = zoom;\n }\n\n /**\n * Create a clone of this coordinate that can be mutated without\n * changing the original coordinate\n *\n * @returns {Coordinate} clone\n * @private\n * var coord = new Coordinate(0, 0, 0);\n * var c2 = coord.clone();\n * // since coord is cloned, modifying a property of c2 does\n * // not modify it.\n * c2.zoom = 2;\n */\n clone() {\n return new Coordinate(this.column, this.row, this.zoom);\n }\n\n /**\n * Zoom this coordinate to a given zoom level. This returns a new\n * coordinate object, not mutating the old one.\n *\n * @param {number} zoom\n * @returns {Coordinate} zoomed coordinate\n * @private\n * @example\n * var coord = new Coordinate(0, 0, 0);\n * var c2 = coord.zoomTo(1);\n * c2 // equals new Coordinate(0, 0, 1);\n */\n zoomTo(zoom ) { return this.clone()._zoomTo(zoom); }\n\n /**\n * Subtract the column and row values of this coordinate from those\n * of another coordinate. The other coordinat will be zoomed to the\n * same level as `this` before the subtraction occurs\n *\n * @param {Coordinate} c other coordinate\n * @returns {Coordinate} result\n * @private\n */\n sub(c ) { return this.clone()._sub(c); }\n\n _zoomTo(zoom ) {\n const scale = Math.pow(2, zoom - this.zoom);\n this.column *= scale;\n this.row *= scale;\n this.zoom = zoom;\n return this;\n }\n\n _sub(c ) {\n c = c.zoomTo(this.zoom);\n this.column -= c.column;\n this.row -= c.row;\n return this;\n }\n}\n\nmodule.exports = Coordinate;\n","// \n\nconst wrap = require('../util/util').wrap;\n\n/**\n * A `LngLat` object represents a given longitude and latitude coordinate, measured in degrees.\n *\n * Mapbox GL uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON.\n *\n * Note that any Mapbox GL method that accepts a `LngLat` object as an argument or option\n * can also accept an `Array` of two numbers and will perform an implicit conversion.\n * This flexible type is documented as {@link LngLatLike}.\n *\n * @param {number} lng Longitude, measured in degrees.\n * @param {number} lat Latitude, measured in degrees.\n * @example\n * var ll = new mapboxgl.LngLat(-73.9749, 40.7736);\n * @see [Get coordinates of the mouse pointer](https://www.mapbox.com/mapbox-gl-js/example/mouse-position/)\n * @see [Display a popup](https://www.mapbox.com/mapbox-gl-js/example/popup/)\n * @see [Highlight features within a bounding box](https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/)\n * @see [Create a timeline animation](https://www.mapbox.com/mapbox-gl-js/example/timeline-animation/)\n */\nclass LngLat {\n \n \n\n constructor(lng , lat ) {\n if (isNaN(lng) || isNaN(lat)) {\n throw new Error(`Invalid LngLat object: (${lng}, ${lat})`);\n }\n this.lng = +lng;\n this.lat = +lat;\n if (this.lat > 90 || this.lat < -90) {\n throw new Error('Invalid LngLat latitude value: must be between -90 and 90');\n }\n }\n\n /**\n * Returns a new `LngLat` object whose longitude is wrapped to the range (-180, 180).\n *\n * @returns {LngLat} The wrapped `LngLat` object.\n * @example\n * var ll = new mapboxgl.LngLat(286.0251, 40.7736);\n * var wrapped = ll.wrap();\n * wrapped.lng; // = -73.9749\n */\n wrap() {\n return new LngLat(wrap(this.lng, -180, 180), this.lat);\n }\n\n /**\n * Returns the coordinates represented as an array of two numbers.\n *\n * @returns {Array<number>} The coordinates represeted as an array of longitude and latitude.\n * @example\n * var ll = new mapboxgl.LngLat(-73.9749, 40.7736);\n * ll.toArray(); // = [-73.9749, 40.7736]\n */\n toArray() {\n return [this.lng, this.lat];\n }\n\n /**\n * Returns the coordinates represent as a string.\n *\n * @returns {string} The coordinates represented as a string of the format `'LngLat(lng, lat)'`.\n * @example\n * var ll = new mapboxgl.LngLat(-73.9749, 40.7736);\n * ll.toString(); // = \"LngLat(-73.9749, 40.7736)\"\n */\n toString() {\n return `LngLat(${this.lng}, ${this.lat})`;\n }\n\n /**\n * Returns a `LngLatBounds` from the coordinates extended by a given `radius`.\n *\n * @param {number} radius Distance in meters from the coordinates to extend the bounds.\n * @returns {LngLatBounds} A new `LngLatBounds` object representing the coordinates extended by the `radius`.\n * @example\n * var ll = new mapboxgl.LngLat(-73.9749, 40.7736);\n * ll.toBounds(100).toArray(); // = [[-73.97501862141328, 40.77351016847229], [-73.97478137858673, 40.77368983152771]]\n */\n toBounds(radius ) {\n const earthCircumferenceInMetersAtEquator = 40075017;\n const latAccuracy = 360 * radius / earthCircumferenceInMetersAtEquator,\n lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\n\n const LngLatBounds = require('./lng_lat_bounds');\n return new LngLatBounds(new LngLat(this.lng - lngAccuracy, this.lat - latAccuracy),\n new LngLat(this.lng + lngAccuracy, this.lat + latAccuracy));\n }\n\n /**\n * Converts an array of two numbers to a `LngLat` object.\n *\n * If a `LngLat` object is passed in, the function returns it unchanged.\n *\n * @param {LngLatLike} input An array of two numbers to convert, or a `LngLat` object to return.\n * @returns {LngLat} A new `LngLat` object, if a conversion occurred, or the original `LngLat` object.\n * @example\n * var arr = [-73.9749, 40.7736];\n * var ll = mapboxgl.LngLat.convert(arr);\n * ll; // = LngLat {lng: -73.9749, lat: 40.7736}\n */\n static convert(input ) {\n if (input instanceof LngLat) {\n return input;\n }\n if (Array.isArray(input) && (input.length === 2 || input.length === 3)) {\n return new LngLat(Number(input[0]), Number(input[1]));\n }\n if (!Array.isArray(input) && typeof input === 'object' && input !== null) {\n return new LngLat(Number(input.lng), Number(input.lat));\n }\n throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\");\n }\n}\n\n/**\n * A {@link LngLat} object, an array of two numbers representing longitude and latitude,\n * or an object with `lng` and `lat` properties.\n *\n * @typedef {LngLat | {lng: number, lat: number} | [number, number]} LngLatLike\n * @example\n * var v1 = new mapboxgl.LngLat(-122.420679, 37.772537);\n * var v2 = [-122.420679, 37.772537];\n */\n \n\nmodule.exports = LngLat;\n","// \n\nconst LngLat = require('./lng_lat');\n\n \n\n/**\n * A `LngLatBounds` object represents a geographical bounding box,\n * defined by its southwest and northeast points in longitude and latitude.\n *\n * If no arguments are provided to the constructor, a `null` bounding box is created.\n *\n * Note that any Mapbox GL method that accepts a `LngLatBounds` object as an argument or option\n * can also accept an `Array` of two {@link LngLatLike} constructs and will perform an implicit conversion.\n * This flexible type is documented as {@link LngLatBoundsLike}.\n *\n * @param {LngLatLike} [sw] The southwest corner of the bounding box.\n * @param {LngLatLike} [ne] The northeast corner of the bounding box.\n * @example\n * var sw = new mapboxgl.LngLat(-73.9876, 40.7661);\n * var ne = new mapboxgl.LngLat(-73.9397, 40.8002);\n * var llb = new mapboxgl.LngLatBounds(sw, ne);\n */\nclass LngLatBounds {\n \n \n\n // This constructor is too flexible to type. It should not be so flexible.\n constructor(sw , ne ) {\n if (!sw) {\n return;\n } else if (ne) {\n this.setSouthWest(sw).setNorthEast(ne);\n } else if (sw.length === 4) {\n this.setSouthWest([sw[0], sw[1]]).setNorthEast([sw[2], sw[3]]);\n } else {\n this.setSouthWest(sw[0]).setNorthEast(sw[1]);\n }\n }\n\n /**\n * Set the northeast corner of the bounding box\n *\n * @param {LngLatLike} ne\n * @returns {LngLatBounds} `this`\n */\n setNorthEast(ne ) {\n this._ne = ne instanceof LngLat ? new LngLat(ne.lng, ne.lat) : LngLat.convert(ne);\n return this;\n }\n\n /**\n * Set the southwest corner of the bounding box\n *\n * @param {LngLatLike} sw\n * @returns {LngLatBounds} `this`\n */\n setSouthWest(sw ) {\n this._sw = sw instanceof LngLat ? new LngLat(sw.lng, sw.lat) : LngLat.convert(sw);\n return this;\n }\n\n /**\n * Extend the bounds to include a given LngLat or LngLatBounds.\n *\n * @param {LngLat|LngLatBounds} obj object to extend to\n * @returns {LngLatBounds} `this`\n */\n extend(obj) {\n const sw = this._sw,\n ne = this._ne;\n let sw2, ne2;\n\n if (obj instanceof LngLat) {\n sw2 = obj;\n ne2 = obj;\n\n } else if (obj instanceof LngLatBounds) {\n sw2 = obj._sw;\n ne2 = obj._ne;\n\n if (!sw2 || !ne2) return this;\n\n } else {\n if (Array.isArray(obj)) {\n if (obj.every(Array.isArray)) {\n return this.extend(LngLatBounds.convert(obj));\n } else {\n return this.extend(LngLat.convert(obj));\n }\n }\n return this;\n }\n\n if (!sw && !ne) {\n this._sw = new LngLat(sw2.lng, sw2.lat);\n this._ne = new LngLat(ne2.lng, ne2.lat);\n\n } else {\n sw.lng = Math.min(sw2.lng, sw.lng);\n sw.lat = Math.min(sw2.lat, sw.lat);\n ne.lng = Math.max(ne2.lng, ne.lng);\n ne.lat = Math.max(ne2.lat, ne.lat);\n }\n\n return this;\n }\n\n /**\n * Returns the geographical coordinate equidistant from the bounding box's corners.\n *\n * @returns {LngLat} The bounding box's center.\n * @example\n * var llb = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.getCenter(); // = LngLat {lng: -73.96365, lat: 40.78315}\n */\n getCenter() {\n return new LngLat((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);\n }\n\n /**\n * Returns the southwest corner of the bounding box.\n *\n * @returns {LngLat} The southwest corner of the bounding box.\n */\n getSouthWest() { return this._sw; }\n\n /**\n * Returns the northeast corner of the bounding box.\n *\n * @returns {LngLat} The northeast corner of the bounding box.\n */\n getNorthEast() { return this._ne; }\n\n /**\n * Returns the northwest corner of the bounding box.\n *\n * @returns {LngLat} The northwest corner of the bounding box.\n */\n getNorthWest() { return new LngLat(this.getWest(), this.getNorth()); }\n\n /**\n * Returns the southeast corner of the bounding box.\n *\n * @returns {LngLat} The southeast corner of the bounding box.\n */\n getSouthEast() { return new LngLat(this.getEast(), this.getSouth()); }\n\n /**\n * Returns the west edge of the bounding box.\n *\n * @returns {number} The west edge of the bounding box.\n */\n getWest() { return this._sw.lng; }\n\n /**\n * Returns the south edge of the bounding box.\n *\n * @returns {number} The south edge of the bounding box.\n */\n getSouth() { return this._sw.lat; }\n\n /**\n * Returns the east edge of the bounding box.\n *\n * @returns {number} The east edge of the bounding box.\n */\n getEast() { return this._ne.lng; }\n\n /**\n * Returns the north edge of the bounding box.\n *\n * @returns {number} The north edge of the bounding box.\n */\n getNorth() { return this._ne.lat; }\n\n /**\n * Returns the bounding box represented as an array.\n *\n * @returns {Array<Array<number>>} The bounding box represented as an array, consisting of the\n * southwest and northeast coordinates of the bounding represented as arrays of numbers.\n * @example\n * var llb = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.toArray(); // = [[-73.9876, 40.7661], [-73.9397, 40.8002]]\n */\n toArray() {\n return [this._sw.toArray(), this._ne.toArray()];\n }\n\n /**\n * Return the bounding box represented as a string.\n *\n * @returns {string} The bounding box represents as a string of the format\n * `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.\n * @example\n * var llb = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);\n * llb.toString(); // = \"LngLatBounds(LngLat(-73.9876, 40.7661), LngLat(-73.9397, 40.8002))\"\n */\n toString() {\n return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`;\n }\n\n /**\n * Converts an array to a `LngLatBounds` object.\n *\n * If a `LngLatBounds` object is passed in, the function returns it unchanged.\n *\n * Internally, the function calls `LngLat#convert` to convert arrays to `LngLat` values.\n *\n * @param {LngLatBoundsLike} input An array of two coordinates to convert, or a `LngLatBounds` object to return.\n * @returns {LngLatBounds} A new `LngLatBounds` object, if a conversion occurred, or the original `LngLatBounds` object.\n * @example\n * var arr = [[-73.9876, 40.7661], [-73.9397, 40.8002]];\n * var llb = mapboxgl.LngLatBounds.convert(arr);\n * llb; // = LngLatBounds {_sw: LngLat {lng: -73.9876, lat: 40.7661}, _ne: LngLat {lng: -73.9397, lat: 40.8002}}\n */\n static convert(input ) {\n if (!input || input instanceof LngLatBounds) return input;\n return new LngLatBounds(input);\n }\n}\n\n/**\n * A {@link LngLatBounds} object, an array of {@link LngLatLike} objects in [sw, ne] order,\n * or an array of numbers in [west, south, east, north] order.\n *\n * @typedef {LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number]} LngLatBoundsLike\n * @example\n * var v1 = new mapboxgl.LngLatBounds(\n * new mapboxgl.LngLat(-73.9876, 40.7661),\n * new mapboxgl.LngLat(-73.9397, 40.8002)\n * );\n * var v2 = new mapboxgl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002])\n * var v3 = [[-73.9876, 40.7661], [-73.9397, 40.8002]];\n */\n \n\nmodule.exports = LngLatBounds;\n","// \n\nconst LngLat = require('./lng_lat'),\n Point = require('@mapbox/point-geometry'),\n Coordinate = require('./coordinate'),\n util = require('../util/util'),\n interp = require('../style-spec/util/interpolate').number,\n tileCover = require('../util/tile_cover'),\n {CanonicalTileID, UnwrappedTileID} = require('../source/tile_id'),\n EXTENT = require('../data/extent'),\n glmatrix = require('@mapbox/gl-matrix');\n\nconst vec4 = glmatrix.vec4,\n mat4 = glmatrix.mat4,\n mat2 = glmatrix.mat2;\n\n/**\n * A single transform, generally used for a single tile to be\n * scaled, rotated, and zoomed.\n * @private\n */\nclass Transform {\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n constructor(minZoom , maxZoom , renderWorldCopies ) {\n this.tileSize = 512; // constant\n\n this._renderWorldCopies = renderWorldCopies === undefined ? true : renderWorldCopies;\n this._minZoom = minZoom || 0;\n this._maxZoom = maxZoom || 22;\n\n this.latRange = [-85.05113, 85.05113];\n\n this.width = 0;\n this.height = 0;\n this._center = new LngLat(0, 0);\n this.zoom = 0;\n this.angle = 0;\n this._fov = 0.6435011087932844;\n this._pitch = 0;\n this._unmodified = true;\n this._posMatrixCache = {};\n }\n\n clone() {\n const clone = new Transform(this._minZoom, this._maxZoom, this._renderWorldCopies);\n clone.tileSize = this.tileSize;\n clone.latRange = this.latRange;\n clone.width = this.width;\n clone.height = this.height;\n clone._center = this._center;\n clone.zoom = this.zoom;\n clone.angle = this.angle;\n clone._fov = this._fov;\n clone._pitch = this._pitch;\n clone._unmodified = this._unmodified;\n clone._calcMatrices();\n return clone;\n }\n\n get minZoom() { return this._minZoom; }\n set minZoom(zoom ) {\n if (this._minZoom === zoom) return;\n this._minZoom = zoom;\n this.zoom = Math.max(this.zoom, zoom);\n }\n\n get maxZoom() { return this._maxZoom; }\n set maxZoom(zoom ) {\n if (this._maxZoom === zoom) return;\n this._maxZoom = zoom;\n this.zoom = Math.min(this.zoom, zoom);\n }\n\n get renderWorldCopies() {\n return this._renderWorldCopies;\n }\n\n get worldSize() {\n return this.tileSize * this.scale;\n }\n\n get centerPoint() {\n return this.size._div(2);\n }\n\n get size() {\n return new Point(this.width, this.height);\n }\n\n get bearing() {\n return -this.angle / Math.PI * 180;\n }\n set bearing(bearing ) {\n const b = -util.wrap(bearing, -180, 180) * Math.PI / 180;\n if (this.angle === b) return;\n this._unmodified = false;\n this.angle = b;\n this._calcMatrices();\n\n // 2x2 matrix for rotating points\n this.rotationMatrix = mat2.create();\n mat2.rotate(this.rotationMatrix, this.rotationMatrix, this.angle);\n }\n\n get pitch() {\n return this._pitch / Math.PI * 180;\n }\n set pitch(pitch ) {\n const p = util.clamp(pitch, 0, 60) / 180 * Math.PI;\n if (this._pitch === p) return;\n this._unmodified = false;\n this._pitch = p;\n this._calcMatrices();\n }\n\n get fov() {\n return this._fov / Math.PI * 180;\n }\n set fov(fov ) {\n fov = Math.max(0.01, Math.min(60, fov));\n if (this._fov === fov) return;\n this._unmodified = false;\n this._fov = fov / 180 * Math.PI;\n this._calcMatrices();\n }\n\n get zoom() { return this._zoom; }\n set zoom(zoom ) {\n const z = Math.min(Math.max(zoom, this.minZoom), this.maxZoom);\n if (this._zoom === z) return;\n this._unmodified = false;\n this._zoom = z;\n this.scale = this.zoomScale(z);\n this.tileZoom = Math.floor(z);\n this.zoomFraction = z - this.tileZoom;\n this._constrain();\n this._calcMatrices();\n }\n\n get center() { return this._center; }\n set center(center ) {\n if (center.lat === this._center.lat && center.lng === this._center.lng) return;\n this._unmodified = false;\n this._center = center;\n this._constrain();\n this._calcMatrices();\n }\n\n /**\n * Return a zoom level that will cover all tiles the transform\n * @param {Object} options\n * @param {number} options.tileSize\n * @param {boolean} options.roundZoom\n * @returns {number} zoom level\n */\n coveringZoomLevel(options ) {\n return (options.roundZoom ? Math.round : Math.floor)(\n this.zoom + this.scaleZoom(this.tileSize / options.tileSize)\n );\n }\n\n /**\n * Return any \"wrapped\" copies of a given tile coordinate that are visible\n * in the current view.\n *\n * @private\n */\n getVisibleUnwrappedCoordinates(tileID ) {\n const ul = this.pointCoordinate(new Point(0, 0), 0);\n const ur = this.pointCoordinate(new Point(this.width, 0), 0);\n const w0 = Math.floor(ul.column);\n const w1 = Math.floor(ur.column);\n const result = [new UnwrappedTileID(0, tileID)];\n for (let w = w0; w <= w1; w++) {\n if (w === 0) continue;\n result.push(new UnwrappedTileID(w, tileID));\n }\n return result;\n }\n\n /**\n * Return all coordinates that could cover this transform for a covering\n * zoom level.\n * @param {Object} options\n * @param {number} options.tileSize\n * @param {number} options.minzoom\n * @param {number} options.maxzoom\n * @param {boolean} options.roundZoom\n * @param {boolean} options.reparseOverscaled\n * @param {boolean} options.renderWorldCopies\n * @returns {Array<Tile>} tiles\n */\n coveringTiles(\n options \n \n \n \n \n \n \n \n ) {\n let z = this.coveringZoomLevel(options);\n const actualZ = z;\n\n if (options.minzoom !== undefined && z < options.minzoom) return [];\n if (options.maxzoom !== undefined && z > options.maxzoom) z = options.maxzoom;\n\n const centerCoord = this.pointCoordinate(this.centerPoint, z);\n const centerPoint = new Point(centerCoord.column - 0.5, centerCoord.row - 0.5);\n const cornerCoords = [\n this.pointCoordinate(new Point(0, 0), z),\n this.pointCoordinate(new Point(this.width, 0), z),\n this.pointCoordinate(new Point(this.width, this.height), z),\n this.pointCoordinate(new Point(0, this.height), z)\n ];\n return tileCover(z, cornerCoords, options.reparseOverscaled ? actualZ : z, this._renderWorldCopies)\n .sort((a, b) => centerPoint.dist(a.canonical) - centerPoint.dist(b.canonical));\n }\n\n resize(width , height ) {\n this.width = width;\n this.height = height;\n\n this.pixelsToGLUnits = [2 / width, -2 / height];\n this._constrain();\n this._calcMatrices();\n }\n\n get unmodified() { return this._unmodified; }\n\n zoomScale(zoom ) { return Math.pow(2, zoom); }\n scaleZoom(scale ) { return Math.log(scale) / Math.LN2; }\n\n project(lnglat ) {\n return new Point(\n this.lngX(lnglat.lng),\n this.latY(lnglat.lat));\n }\n\n unproject(point) {\n return new LngLat(\n this.xLng(point.x),\n this.yLat(point.y));\n }\n\n get x() { return this.lngX(this.center.lng); }\n get y() { return this.latY(this.center.lat); }\n\n get point() { return new Point(this.x, this.y); }\n\n /**\n * latitude to absolute x coord\n * @returns {number} pixel coordinate\n */\n lngX(lng ) {\n return (180 + lng) * this.worldSize / 360;\n }\n /**\n * latitude to absolute y coord\n * @returns {number} pixel coordinate\n */\n latY(lat ) {\n const y = 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360));\n return (180 - y) * this.worldSize / 360;\n }\n\n xLng(x) {\n return x * 360 / this.worldSize - 180;\n }\n yLat(y) {\n const y2 = 180 - y * 360 / this.worldSize;\n return 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90;\n }\n\n setLocationAtPoint(lnglat , point ) {\n const translate = this.pointCoordinate(point)._sub(this.pointCoordinate(this.centerPoint));\n this.center = this.coordinateLocation(this.locationCoordinate(lnglat)._sub(translate));\n if (this._renderWorldCopies) {\n this.center = this.center.wrap();\n }\n }\n\n /**\n * Given a location, return the screen point that corresponds to it\n * @param {LngLat} lnglat location\n * @returns {Point} screen point\n */\n locationPoint(lnglat ) {\n return this.coordinatePoint(this.locationCoordinate(lnglat));\n }\n\n /**\n * Given a point on screen, return its lnglat\n * @param {Point} p screen point\n * @returns {LngLat} lnglat location\n */\n pointLocation(p ) {\n return this.coordinateLocation(this.pointCoordinate(p));\n }\n\n /**\n * Given a geographical lnglat, return an unrounded\n * coordinate that represents it at this transform's zoom level.\n * @param {LngLat} lnglat\n * @returns {Coordinate}\n */\n locationCoordinate(lnglat ) {\n return new Coordinate(\n this.lngX(lnglat.lng) / this.tileSize,\n this.latY(lnglat.lat) / this.tileSize,\n this.zoom).zoomTo(this.tileZoom);\n }\n\n /**\n * Given a Coordinate, return its geographical position.\n * @param {Coordinate} coord\n * @returns {LngLat} lnglat\n */\n coordinateLocation(coord) {\n const zoomedCoord = coord.zoomTo(this.zoom);\n return new LngLat(\n this.xLng(zoomedCoord.column * this.tileSize),\n this.yLat(zoomedCoord.row * this.tileSize));\n }\n\n pointCoordinate(p , zoom ) {\n if (zoom === undefined) zoom = this.tileZoom;\n\n const targetZ = 0;\n // since we don't know the correct projected z value for the point,\n // unproject two points to get a line and then find the point on that\n // line with z=0\n\n const coord0 = [p.x, p.y, 0, 1];\n const coord1 = [p.x, p.y, 1, 1];\n\n vec4.transformMat4(coord0, coord0, this.pixelMatrixInverse);\n vec4.transformMat4(coord1, coord1, this.pixelMatrixInverse);\n\n const w0 = coord0[3];\n const w1 = coord1[3];\n const x0 = coord0[0] / w0;\n const x1 = coord1[0] / w1;\n const y0 = coord0[1] / w0;\n const y1 = coord1[1] / w1;\n const z0 = coord0[2] / w0;\n const z1 = coord1[2] / w1;\n\n const t = z0 === z1 ? 0 : (targetZ - z0) / (z1 - z0);\n\n return new Coordinate(\n interp(x0, x1, t) / this.tileSize,\n interp(y0, y1, t) / this.tileSize,\n this.zoom)._zoomTo(zoom);\n }\n\n /**\n * Given a coordinate, return the screen point that corresponds to it\n * @param {Coordinate} coord\n * @returns {Point} screen point\n */\n coordinatePoint(coord) {\n const zoomedCoord = coord.zoomTo(this.zoom);\n const p = [zoomedCoord.column * this.tileSize, zoomedCoord.row * this.tileSize, 0, 1];\n vec4.transformMat4(p, p, this.pixelMatrix);\n return new Point(p[0] / p[3], p[1] / p[3]);\n }\n\n /**\n * Calculate the posMatrix that, given a tile coordinate, would be used to display the tile on a map.\n * @param {UnwrappedTileID} unwrappedTileID;\n */\n calculatePosMatrix(unwrappedTileID ) {\n const posMatrixKey = unwrappedTileID.key;\n if (this._posMatrixCache[posMatrixKey]) {\n return this._posMatrixCache[posMatrixKey];\n }\n\n const canonical = unwrappedTileID.canonical;\n const scale = this.worldSize / this.zoomScale(canonical.z);\n const unwrappedX = canonical.x + Math.pow(2, canonical.z) * unwrappedTileID.wrap;\n\n const posMatrix = mat4.identity(new Float64Array(16));\n mat4.translate(posMatrix, posMatrix, [unwrappedX * scale, canonical.y * scale, 0]);\n mat4.scale(posMatrix, posMatrix, [scale / EXTENT, scale / EXTENT, 1]);\n mat4.multiply(posMatrix, this.projMatrix, posMatrix);\n\n this._posMatrixCache[posMatrixKey] = new Float32Array(posMatrix);\n return this._posMatrixCache[posMatrixKey];\n }\n\n _constrain() {\n if (!this.center || !this.width || !this.height || this._constraining) return;\n\n this._constraining = true;\n\n let minY = -90;\n let maxY = 90;\n let minX = -180;\n let maxX = 180;\n let sy, sx, x2, y2;\n const size = this.size,\n unmodified = this._unmodified;\n\n if (this.latRange) {\n const latRange = this.latRange;\n minY = this.latY(latRange[1]);\n maxY = this.latY(latRange[0]);\n sy = maxY - minY < size.y ? size.y / (maxY - minY) : 0;\n }\n\n if (this.lngRange) {\n const lngRange = this.lngRange;\n minX = this.lngX(lngRange[0]);\n maxX = this.lngX(lngRange[1]);\n sx = maxX - minX < size.x ? size.x / (maxX - minX) : 0;\n }\n\n // how much the map should scale to fit the screen into given latitude/longitude ranges\n const s = Math.max(sx || 0, sy || 0);\n\n if (s) {\n this.center = this.unproject(new Point(\n sx ? (maxX + minX) / 2 : this.x,\n sy ? (maxY + minY) / 2 : this.y));\n this.zoom += this.scaleZoom(s);\n this._unmodified = unmodified;\n this._constraining = false;\n return;\n }\n\n if (this.latRange) {\n const y = this.y,\n h2 = size.y / 2;\n\n if (y - h2 < minY) y2 = minY + h2;\n if (y + h2 > maxY) y2 = maxY - h2;\n }\n\n if (this.lngRange) {\n const x = this.x,\n w2 = size.x / 2;\n\n if (x - w2 < minX) x2 = minX + w2;\n if (x + w2 > maxX) x2 = maxX - w2;\n }\n\n // pan the map if the screen goes off the range\n if (x2 !== undefined || y2 !== undefined) {\n this.center = this.unproject(new Point(\n x2 !== undefined ? x2 : this.x,\n y2 !== undefined ? y2 : this.y));\n }\n\n this._unmodified = unmodified;\n this._constraining = false;\n }\n\n _calcMatrices() {\n if (!this.height) return;\n\n this.cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height;\n\n // Find the distance from the center point [width/2, height/2] to the\n // center top point [width/2, 0] in Z units, using the law of sines.\n // 1 Z unit is equivalent to 1 horizontal px at the center of the map\n // (the distance between[width/2, height/2] and [width/2 + 1, height/2])\n const halfFov = this._fov / 2;\n const groundAngle = Math.PI / 2 + this._pitch;\n const topHalfSurfaceDistance = Math.sin(halfFov) * this.cameraToCenterDistance / Math.sin(Math.PI - groundAngle - halfFov);\n\n // Calculate z distance of the farthest fragment that should be rendered.\n const furthestDistance = Math.cos(Math.PI / 2 - this._pitch) * topHalfSurfaceDistance + this.cameraToCenterDistance;\n // Add a bit extra to avoid precision problems when a fragment's distance is exactly `furthestDistance`\n const farZ = furthestDistance * 1.01;\n\n // matrix for conversion from location to GL coordinates (-1 .. 1)\n let m = new Float64Array(16);\n mat4.perspective(m, this._fov, this.width / this.height, 1, farZ);\n\n mat4.scale(m, m, [1, -1, 1]);\n mat4.translate(m, m, [0, 0, -this.cameraToCenterDistance]);\n mat4.rotateX(m, m, this._pitch);\n mat4.rotateZ(m, m, this.angle);\n mat4.translate(m, m, [-this.x, -this.y, 0]);\n\n // scale vertically to meters per pixel (inverse of ground resolution):\n // worldSize / (circumferenceOfEarth * cos(lat * π / 180))\n const verticalScale = this.worldSize / (2 * Math.PI * 6378137 * Math.abs(Math.cos(this.center.lat * (Math.PI / 180))));\n mat4.scale(m, m, [1, 1, verticalScale, 1]);\n\n this.projMatrix = m;\n\n // matrix for conversion from location to screen coordinates\n m = mat4.create();\n mat4.scale(m, m, [this.width / 2, -this.height / 2, 1]);\n mat4.translate(m, m, [1, -1, 0]);\n this.pixelMatrix = mat4.multiply(new Float64Array(16), m, this.projMatrix);\n\n // inverse matrix for conversion from screen coordinaes to location\n m = mat4.invert(new Float64Array(16), this.pixelMatrix);\n if (!m) throw new Error(\"failed to invert matrix\");\n this.pixelMatrixInverse = m;\n\n this._posMatrixCache = {};\n }\n}\n\nmodule.exports = Transform;\n","// \nconst Color = require('../style-spec/util/color');\n\n \n\nconst ZERO = 0x0000;\nconst ONE = 0x0001;\nconst ONE_MINUS_SRC_ALPHA = 0x0303;\n\nclass ColorMode {\n \n \n \n\n constructor(blendFunction , blendColor , mask ) {\n this.blendFunction = blendFunction;\n this.blendColor = blendColor;\n this.mask = mask;\n }\n\n \n\n \n \n \n}\n\nColorMode.Replace = [ONE, ZERO];\n\nColorMode.disabled = new ColorMode(ColorMode.Replace, Color.transparent, [false, false, false, false]);\nColorMode.unblended = new ColorMode(ColorMode.Replace, Color.transparent, [true, true, true, true]);\nColorMode.alphaBlended = new ColorMode([ONE, ONE_MINUS_SRC_ALPHA], Color.transparent, [true, true, true, true]);\n\nmodule.exports = ColorMode;\n","// \nconst IndexBuffer = require('./index_buffer');\nconst VertexBuffer = require('./vertex_buffer');\nconst Framebuffer = require('./framebuffer');\nconst DepthMode = require('./depth_mode');\nconst StencilMode = require('./stencil_mode');\nconst ColorMode = require('./color_mode');\nconst util = require('../util/util');\nconst {\n ClearColor,\n ClearDepth,\n ClearStencil,\n ColorMask,\n DepthMask,\n StencilMask,\n StencilFunc,\n StencilOp,\n StencilTest,\n DepthRange,\n DepthTest,\n DepthFunc,\n Blend,\n BlendFunc,\n BlendColor,\n Program,\n LineWidth,\n ActiveTextureUnit,\n Viewport,\n BindFramebuffer,\n BindRenderbuffer,\n BindTexture,\n BindVertexBuffer,\n BindElementBuffer,\n BindVertexArrayOES,\n PixelStoreUnpack,\n PixelStoreUnpackPremultiplyAlpha,\n} = require('./value');\n\n\n \n \n \n \n \n \n\n \n \n \n \n \n\n\nclass Context {\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n constructor(gl ) {\n this.gl = gl;\n this.extVertexArrayObject = this.gl.getExtension('OES_vertex_array_object');\n this.lineWidthRange = gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE);\n\n this.clearColor = new ClearColor(this);\n this.clearDepth = new ClearDepth(this);\n this.clearStencil = new ClearStencil(this);\n this.colorMask = new ColorMask(this);\n this.depthMask = new DepthMask(this);\n this.stencilMask = new StencilMask(this);\n this.stencilFunc = new StencilFunc(this);\n this.stencilOp = new StencilOp(this);\n this.stencilTest = new StencilTest(this);\n this.depthRange = new DepthRange(this);\n this.depthTest = new DepthTest(this);\n this.depthFunc = new DepthFunc(this);\n this.blend = new Blend(this);\n this.blendFunc = new BlendFunc(this);\n this.blendColor = new BlendColor(this);\n this.program = new Program(this);\n this.lineWidth = new LineWidth(this);\n this.activeTexture = new ActiveTextureUnit(this);\n this.viewport = new Viewport(this);\n this.bindFramebuffer = new BindFramebuffer(this);\n this.bindRenderbuffer = new BindRenderbuffer(this);\n this.bindTexture = new BindTexture(this);\n this.bindVertexBuffer = new BindVertexBuffer(this);\n this.bindElementBuffer = new BindElementBuffer(this);\n this.bindVertexArrayOES = this.extVertexArrayObject && new BindVertexArrayOES(this);\n this.pixelStoreUnpack = new PixelStoreUnpack(this);\n this.pixelStoreUnpackPremultiplyAlpha = new PixelStoreUnpackPremultiplyAlpha(this);\n\n this.extTextureFilterAnisotropic = (\n gl.getExtension('EXT_texture_filter_anisotropic') ||\n gl.getExtension('MOZ_EXT_texture_filter_anisotropic') ||\n gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic')\n );\n if (this.extTextureFilterAnisotropic) {\n this.extTextureFilterAnisotropicMax = gl.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n }\n\n this.extTextureHalfFloat = gl.getExtension('OES_texture_half_float');\n if (this.extTextureHalfFloat) {\n gl.getExtension('OES_texture_half_float_linear');\n }\n\n }\n\n createIndexBuffer(array , dynamicDraw ) {\n return new IndexBuffer(this, array, dynamicDraw);\n }\n\n createVertexBuffer(array , attributes , dynamicDraw ) {\n return new VertexBuffer(this, array, attributes, dynamicDraw);\n }\n\n createRenderbuffer(storageFormat , width , height ) {\n const gl = this.gl;\n\n const rbo = gl.createRenderbuffer();\n this.bindRenderbuffer.set(rbo);\n gl.renderbufferStorage(gl.RENDERBUFFER, storageFormat, width, height);\n this.bindRenderbuffer.set(null);\n\n return rbo;\n }\n\n createFramebuffer(width , height ) {\n return new Framebuffer(this, width, height);\n }\n\n clear({color, depth} ) {\n const gl = this.gl;\n let mask = 0;\n\n if (color) {\n mask |= gl.COLOR_BUFFER_BIT;\n this.clearColor.set(color);\n this.colorMask.set([true, true, true, true]);\n }\n\n if (typeof depth !== 'undefined') {\n mask |= gl.DEPTH_BUFFER_BIT;\n this.clearDepth.set(depth);\n this.depthMask.set(true);\n }\n\n // See note in Painter#clearStencil: implement this the easy way once GPU bug/workaround is fixed upstream\n // if (typeof stencil !== 'undefined') {\n // mask |= gl.STENCIL_BUFFER_BIT;\n // this.clearStencil.set(stencil);\n // this.stencilMask.set(0xFF);\n // }\n\n gl.clear(mask);\n }\n\n setDepthMode(depthMode ) {\n if (depthMode.func === this.gl.ALWAYS && !depthMode.mask) {\n this.depthTest.set(false);\n } else {\n this.depthTest.set(true);\n this.depthFunc.set(depthMode.func);\n this.depthMask.set(depthMode.mask);\n this.depthRange.set(depthMode.range);\n }\n }\n\n setStencilMode(stencilMode ) {\n if (stencilMode.func === this.gl.ALWAYS && !stencilMode.mask) {\n this.stencilTest.set(false);\n } else {\n this.stencilTest.set(true);\n this.stencilMask.set(stencilMode.mask);\n this.stencilOp.set([stencilMode.fail, stencilMode.depthFail, stencilMode.pass]);\n this.stencilFunc.set({\n func: stencilMode.test.func,\n ref: stencilMode.ref,\n mask: stencilMode.test.mask\n });\n }\n }\n\n setColorMode(colorMode ) {\n if (util.deepEqual(colorMode.blendFunction, ColorMode.Replace)) {\n this.blend.set(false);\n } else {\n this.blend.set(true);\n this.blendFunc.set(colorMode.blendFunction);\n this.blendColor.set(colorMode.blendColor);\n }\n\n this.colorMask.set(colorMode.mask);\n }\n}\n\nmodule.exports = Context;\n","// \n \n\nconst ALWAYS = 0x0207;\n\nclass DepthMode {\n \n \n \n\n // DepthMask enums\n \n \n\n constructor(depthFunc , depthMask , depthRange ) {\n this.func = depthFunc;\n this.mask = depthMask;\n this.range = depthRange;\n }\n\n \n}\n\nDepthMode.ReadOnly = false;\nDepthMode.ReadWrite = true;\n\nDepthMode.disabled = new DepthMode(ALWAYS, DepthMode.ReadOnly, [0, 1]);\n\nmodule.exports = DepthMode;\n","// \nconst { ColorAttachment, DepthAttachment } = require('./value');\n\n \n\nclass Framebuffer {\n \n \n \n \n \n \n\n constructor(context , width , height ) {\n this.context = context;\n this.width = width;\n this.height = height;\n const gl = context.gl;\n const fbo = this.framebuffer = gl.createFramebuffer();\n\n this.colorAttachment = new ColorAttachment(context, fbo);\n this.depthAttachment = new DepthAttachment(context, fbo);\n }\n\n destroy() {\n const gl = this.context.gl;\n\n const texture = this.colorAttachment.get();\n if (texture) gl.deleteTexture(texture);\n\n const renderbuffer = this.depthAttachment.get();\n if (renderbuffer) gl.deleteRenderbuffer(renderbuffer);\n\n gl.deleteFramebuffer(this.framebuffer);\n }\n}\n\nmodule.exports = Framebuffer;\n","// \nconst assert = require('assert');\n\n \n \n \n\n\nclass IndexBuffer {\n \n \n \n\n constructor(context , array , dynamicDraw ) {\n this.context = context;\n const gl = context.gl;\n this.buffer = gl.createBuffer();\n this.dynamicDraw = Boolean(dynamicDraw);\n\n this.unbindVAO();\n\n context.bindElementBuffer.set(this.buffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, array.arrayBuffer, this.dynamicDraw ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW);\n\n if (!this.dynamicDraw) {\n delete array.arrayBuffer;\n }\n }\n\n unbindVAO() {\n // The bound index buffer is part of vertex array object state. We don't want to\n // modify whatever VAO happens to be currently bound, so make sure the default\n // vertex array provided by the context is bound instead.\n if (this.context.extVertexArrayObject) {\n this.context.bindVertexArrayOES.set(null);\n }\n }\n\n bind() {\n this.context.bindElementBuffer.set(this.buffer);\n }\n\n updateData(array ) {\n const gl = this.context.gl;\n assert(this.dynamicDraw);\n // The right VAO will get this buffer re-bound later in VertexArrayObject#bind\n // See https://github.com/mapbox/mapbox-gl-js/issues/5620\n this.unbindVAO();\n this.bind();\n gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, array.arrayBuffer);\n }\n\n destroy() {\n const gl = this.context.gl;\n if (this.buffer) {\n gl.deleteBuffer(this.buffer);\n delete this.buffer;\n }\n }\n}\n\nmodule.exports = IndexBuffer;\n","// \n \n\nconst ALWAYS = 0x0207;\nconst KEEP = 0x1E00;\n\nclass StencilMode {\n \n \n \n \n \n \n\n constructor(test , ref , mask , fail ,\n depthFail , pass ) {\n this.test = test;\n this.ref = ref;\n this.mask = mask;\n this.fail = fail;\n this.depthFail = depthFail;\n this.pass = pass;\n }\n\n \n}\n\nStencilMode.disabled = new StencilMode({ func: ALWAYS, mask: 0 }, 0, 0, KEEP, KEEP, KEEP);\n\nmodule.exports = StencilMode;\n","// \n\nconst Color = require('../style-spec/util/color');\nconst util = require('../util/util');\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\nclass ClearColor {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = Color.transparent;\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v.r !== c.r || v.g !== c.g || v.b !== c.b || v.a !== c.a) {\n this.context.gl.clearColor(v.r, v.g, v.b, v.a);\n this.current = v;\n }\n }\n}\n\nclass ClearDepth {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = 1;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.clearDepth(v);\n this.current = v;\n }\n }\n}\n\nclass ClearStencil {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = 0;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.clearStencil(v);\n this.current = v;\n }\n }\n}\n\nclass ColorMask {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = [true, true, true, true];\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v[0] !== c[0] || v[1] !== c[1] || v[2] !== c[2] || v[3] !== c[3]) {\n this.context.gl.colorMask(v[0], v[1], v[2], v[3]);\n this.current = v;\n }\n }\n}\n\nclass DepthMask {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = true;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.depthMask(v);\n this.current = v;\n }\n }\n}\n\nclass StencilMask {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = 0xFF;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.stencilMask(v);\n this.current = v;\n }\n }\n}\n\nclass StencilFunc {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = {\n func: context.gl.ALWAYS,\n ref: 0,\n mask: 0xFF\n };\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v.func !== c.func || v.ref !== c.ref || v.mask !== c.mask) {\n this.context.gl.stencilFunc(v.func, v.ref, v.mask);\n this.current = v;\n }\n }\n}\n\nclass StencilOp {\n \n \n\n constructor(context ) {\n this.context = context;\n const gl = this.context.gl;\n this.current = [gl.KEEP, gl.KEEP, gl.KEEP];\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v[0] !== c[0] || v[1] !== c[1] || v[2] !== c[2]) {\n this.context.gl.stencilOp(v[0], v[1], v[2]);\n this.current = v;\n }\n }\n}\n\nclass StencilTest {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = false;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n if (v) {\n gl.enable(gl.STENCIL_TEST);\n } else {\n gl.disable(gl.STENCIL_TEST);\n }\n this.current = v;\n }\n }\n}\n\nclass DepthRange {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = [0, 1];\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v[0] !== c[0] || v[1] !== c[1]) {\n this.context.gl.depthRange(v[0], v[1]);\n this.current = v;\n }\n }\n}\n\nclass DepthTest {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = false;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n if (v) {\n gl.enable(gl.DEPTH_TEST);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n this.current = v;\n }\n }\n}\n\nclass DepthFunc {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = context.gl.LESS;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.depthFunc(v);\n this.current = v;\n }\n }\n}\n\nclass Blend {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = false;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n if (v) {\n gl.enable(gl.BLEND);\n } else {\n gl.disable(gl.BLEND);\n }\n this.current = v;\n }\n }\n}\n\nclass BlendFunc {\n \n \n\n constructor(context ) {\n this.context = context;\n const gl = this.context.gl;\n this.current = [gl.ONE, gl.ZERO];\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v[0] !== c[0] || v[1] !== c[1]) {\n this.context.gl.blendFunc(v[0], v[1]);\n this.current = v;\n }\n }\n}\n\nclass BlendColor {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = Color.transparent;\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v.r !== c.r || v.g !== c.g || v.b !== c.b || v.a !== c.a) {\n this.context.gl.blendColor(v.r, v.g, v.b, v.a);\n this.current = v;\n }\n }\n}\n\nclass Program {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.useProgram(v);\n this.current = v;\n }\n }\n}\n\nclass LineWidth {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = 1;\n }\n\n get() { return this.current; }\n\n set(v ) {\n const range = this.context.lineWidthRange;\n const clamped = util.clamp(v, range[0], range[1]);\n if (this.current !== clamped) {\n this.context.gl.lineWidth(clamped);\n this.current = v;\n }\n }\n}\n\nclass ActiveTextureUnit {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = context.gl.TEXTURE0;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n this.context.gl.activeTexture(v);\n this.current = v;\n }\n }\n}\n\nclass Viewport {\n \n \n\n constructor(context ) {\n this.context = context;\n const gl = this.context.gl;\n this.current = [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight];\n }\n\n get() { return this.current; }\n\n set(v ) {\n const c = this.current;\n if (v[0] !== c[0] || v[1] !== c[1] || v[2] !== c[2] || v[3] !== c[3]) {\n this.context.gl.viewport(v[0], v[1], v[2], v[3]);\n this.current = v;\n }\n }\n}\n\nclass BindFramebuffer {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.bindFramebuffer(gl.FRAMEBUFFER, v);\n this.current = v;\n }\n }\n}\n\nclass BindRenderbuffer {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.bindRenderbuffer(gl.RENDERBUFFER, v);\n this.current = v;\n }\n }\n}\n\nclass BindTexture {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.bindTexture(gl.TEXTURE_2D, v);\n this.current = v;\n }\n }\n}\n\nclass BindVertexBuffer {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, v);\n this.current = v;\n }\n }\n}\n\nclass BindElementBuffer {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n // Always rebind\n const gl = this.context.gl;\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, v);\n this.current = v;\n }\n}\n\nclass BindVertexArrayOES {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = null;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v && this.context.extVertexArrayObject) {\n this.context.extVertexArrayObject.bindVertexArrayOES(v);\n this.current = v;\n }\n }\n}\n\nclass PixelStoreUnpack {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = 4;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, v);\n this.current = v;\n }\n }\n}\n\nclass PixelStoreUnpackPremultiplyAlpha {\n \n \n\n constructor(context ) {\n this.context = context;\n this.current = false;\n }\n\n get() { return this.current; }\n\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, (v ));\n this.current = v;\n }\n }\n}\n\n/**\n * Framebuffer values\n */\nclass FramebufferValue {\n \n \n \n\n constructor(context , parent ) {\n this.context = context;\n this.current = null;\n this.parent = parent;\n }\n\n get() { return this.current; }\n}\n\nclass ColorAttachment extends FramebufferValue {\n \n\n constructor(context , parent ) {\n super(context, parent);\n this.dirty = false;\n }\n\n set(v ) {\n if (this.dirty || this.current !== v) {\n const gl = this.context.gl;\n this.context.bindFramebuffer.set(this.parent);\n // note: it's possible to attach a renderbuffer to the color\n // attachment point, but thus far MBGL only uses textures for color\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, v, 0);\n this.current = v;\n this.dirty = false;\n }\n }\n\n setDirty() {\n this.dirty = true;\n }\n}\n\nclass DepthAttachment extends FramebufferValue {\n set(v ) {\n if (this.current !== v) {\n const gl = this.context.gl;\n this.context.bindFramebuffer.set(this.parent);\n // note: it's possible to attach a texture to the depth attachment\n // point, but thus far MBGL only uses renderbuffers for depth\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, v);\n this.current = v;\n }\n }\n}\n\nmodule.exports = {\n ClearColor,\n ClearDepth,\n ClearStencil,\n ColorMask,\n DepthMask,\n StencilMask,\n StencilFunc,\n StencilOp,\n StencilTest,\n DepthRange,\n DepthTest,\n DepthFunc,\n Blend,\n BlendFunc,\n BlendColor,\n Program,\n LineWidth,\n ActiveTextureUnit,\n Viewport,\n BindFramebuffer,\n BindRenderbuffer,\n BindTexture,\n BindVertexBuffer,\n BindElementBuffer,\n BindVertexArrayOES,\n PixelStoreUnpack,\n PixelStoreUnpackPremultiplyAlpha,\n\n ColorAttachment,\n DepthAttachment,\n};\n","// \n\n \n \n \n \n\n \n \n\n/**\n * @enum {string} AttributeType\n * @private\n * @readonly\n */\nconst AttributeType = {\n Int8: 'BYTE',\n Uint8: 'UNSIGNED_BYTE',\n Int16: 'SHORT',\n Uint16: 'UNSIGNED_SHORT',\n Int32: 'INT',\n Uint32: 'UNSIGNED_INT',\n Float32: 'FLOAT'\n};\n\n/**\n * The `VertexBuffer` class turns a `StructArray` into a WebGL buffer. Each member of the StructArray's\n * Struct type is converted to a WebGL atribute.\n * @private\n */\nclass VertexBuffer {\n \n \n \n \n \n \n\n /**\n * @param dynamicDraw Whether this buffer will be repeatedly updated.\n */\n constructor(context , array , attributes , dynamicDraw ) {\n this.length = array.length;\n this.attributes = attributes;\n this.itemSize = array.bytesPerElement;\n this.dynamicDraw = dynamicDraw;\n\n this.context = context;\n const gl = context.gl;\n this.buffer = gl.createBuffer();\n context.bindVertexBuffer.set(this.buffer);\n gl.bufferData(gl.ARRAY_BUFFER, array.arrayBuffer, this.dynamicDraw ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW);\n\n if (!this.dynamicDraw) {\n delete array.arrayBuffer;\n }\n }\n\n bind() {\n this.context.bindVertexBuffer.set(this.buffer);\n }\n\n updateData(array ) {\n const gl = this.context.gl;\n this.bind();\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, array.arrayBuffer);\n }\n\n enableAttributes(gl , program ) {\n for (let j = 0; j < this.attributes.length; j++) {\n const member = this.attributes[j];\n const attribIndex = program.attributes[member.name];\n if (attribIndex !== undefined) {\n gl.enableVertexAttribArray(attribIndex);\n }\n }\n }\n\n /**\n * Set the attribute pointers in a WebGL context\n * @param gl The WebGL context\n * @param program The active WebGL program\n * @param vertexOffset Index of the starting vertex of the segment\n */\n setVertexAttribPointers(gl , program , vertexOffset ) {\n for (let j = 0; j < this.attributes.length; j++) {\n const member = this.attributes[j];\n const attribIndex = program.attributes[member.name];\n\n if (attribIndex !== undefined) {\n gl.vertexAttribPointer(\n attribIndex,\n member.components,\n (gl )[AttributeType[member.type]],\n false,\n this.itemSize,\n member.offset + (this.itemSize * (vertexOffset || 0))\n );\n }\n }\n }\n\n /**\n * Destroy the GL buffer bound to the given WebGL context\n */\n destroy() {\n const gl = this.context.gl;\n if (this.buffer) {\n gl.deleteBuffer(this.buffer);\n delete this.buffer;\n }\n }\n}\n\nmodule.exports = VertexBuffer;\n","// \n\nconst supported = require('@mapbox/mapbox-gl-supported');\nconst browser = require('./util/browser');\nconst version = require('../package.json').version;\nconst Map = require('./ui/map');\nconst NavigationControl = require('./ui/control/navigation_control');\nconst GeolocateControl = require('./ui/control/geolocate_control');\nconst AttributionControl = require('./ui/control/attribution_control');\nconst ScaleControl = require('./ui/control/scale_control');\nconst FullscreenControl = require('./ui/control/fullscreen_control');\nconst Popup = require('./ui/popup');\nconst Marker = require('./ui/marker');\nconst Style = require('./style/style');\nconst LngLat = require('./geo/lng_lat');\nconst LngLatBounds = require('./geo/lng_lat_bounds');\nconst Point = require('@mapbox/point-geometry');\nconst Evented = require('./util/evented');\nconst config = require('./util/config');\nconst rtlTextPlugin = require('./source/rtl_text_plugin');\n\nmodule.exports = {\n version,\n supported,\n\n workerCount: Math.max(Math.floor(browser.hardwareConcurrency / 2), 1),\n setRTLTextPlugin: rtlTextPlugin.setRTLTextPlugin,\n\n Map,\n NavigationControl,\n GeolocateControl,\n AttributionControl,\n ScaleControl,\n FullscreenControl,\n Popup,\n Marker,\n Style,\n LngLat,\n LngLatBounds,\n Point,\n Evented,\n config,\n\n /**\n * Gets and sets the map's [access token](https://www.mapbox.com/help/define-access-token/).\n *\n * @var {string} accessToken\n * @example\n * mapboxgl.accessToken = myAccessToken;\n * @see [Display a map](https://www.mapbox.com/mapbox-gl-js/examples/)\n */\n get accessToken() {\n return config.ACCESS_TOKEN;\n },\n\n set accessToken(token ) {\n config.ACCESS_TOKEN = token;\n }\n};\n\n/**\n * The version of Mapbox GL JS in use as specified in `package.json`,\n * `CHANGELOG.md`, and the GitHub release.\n *\n * @var {string} version\n */\n\n/**\n * Test whether the browser [supports Mapbox GL JS](https://www.mapbox.com/help/mapbox-browser-support/#mapbox-gl-js).\n *\n * @function supported\n * @param {Object} [options]\n * @param {boolean} [options.failIfMajorPerformanceCaveat=false] If `true`,\n * the function will return `false` if the performance of Mapbox GL JS would\n * be dramatically worse than expected (e.g. a software WebGL renderer would be used).\n * @return {boolean}\n * @example\n * mapboxgl.supported() // = true\n * @see [Check for browser support](https://www.mapbox.com/mapbox-gl-js/example/check-for-support/)\n */\n\n/**\n * Sets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text).\n * Necessary for supporting languages like Arabic and Hebrew that are written right-to-left.\n *\n * @function setRTLTextPlugin\n * @param {string} pluginURL URL pointing to the Mapbox RTL text plugin source.\n * @param {Function} callback Called with an error argument if there is an error.\n * @example\n * mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.1.1/mapbox-gl-rtl-text.js');\n * @see [Add support for right-to-left scripts](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/)\n */\n","// \n\nconst pattern = require('./pattern');\nconst {ProgramConfiguration} = require('../data/program_configuration');\nconst {PossiblyEvaluated, PossiblyEvaluatedPropertyValue} = require('../style/properties');\nconst fillLayerPaintProperties = require('../style/style_layer/fill_style_layer_properties').paint;\nconst StencilMode = require('../gl/stencil_mode');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n\nmodule.exports = drawBackground;\n\nfunction drawBackground(painter , sourceCache , layer ) {\n const color = layer.paint.get('background-color');\n const opacity = layer.paint.get('background-opacity');\n\n if (opacity === 0) return;\n\n const context = painter.context;\n const gl = context.gl;\n const transform = painter.transform;\n const tileSize = transform.tileSize;\n const image = layer.paint.get('background-pattern');\n const globals = {zoom: transform.zoom};\n\n const pass = (!image && color.a === 1 && opacity === 1) ? 'opaque' : 'translucent';\n if (painter.renderPass !== pass) return;\n\n context.setStencilMode(StencilMode.disabled);\n context.setDepthMode(painter.depthModeForSublayer(0, pass === 'opaque' ? DepthMode.ReadWrite : DepthMode.ReadOnly));\n context.setColorMode(painter.colorModeForRenderPass());\n\n const properties = new PossiblyEvaluated(fillLayerPaintProperties);\n\n (properties._values )['background-color'] = new PossiblyEvaluatedPropertyValue(\n fillLayerPaintProperties.properties['fill-color'], {kind: 'constant', value: color}, globals);\n (properties._values )['background-opacity'] = new PossiblyEvaluatedPropertyValue(\n fillLayerPaintProperties.properties['fill-opacity'], {kind: 'constant', value: opacity}, globals);\n\n let program;\n if (image) {\n if (pattern.isPatternMissing(image, painter)) return;\n const configuration = ProgramConfiguration.forBackgroundPattern(opacity);\n program = painter.useProgram('fillPattern', configuration);\n configuration.setUniforms(context, program, properties, globals);\n pattern.prepare(image, painter, program);\n painter.tileExtentPatternVAO.bind(context, program, painter.tileExtentBuffer, []);\n } else {\n const configuration = ProgramConfiguration.forBackgroundColor(color, opacity);\n program = painter.useProgram('fill', configuration);\n configuration.setUniforms(context, program, properties, globals);\n painter.tileExtentVAO.bind(context, program, painter.tileExtentBuffer, []);\n }\n\n const tileIDs = transform.coveringTiles({tileSize});\n\n for (const tileID of tileIDs) {\n if (image) {\n pattern.setTile({tileID, tileSize}, painter, program);\n }\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, painter.transform.calculatePosMatrix(tileID.toUnwrapped()));\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, painter.tileExtentBuffer.length);\n }\n}\n","// \n\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst StencilMode = require('../gl/stencil_mode');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n \n\nmodule.exports = drawCircles;\n\nfunction drawCircles(painter , sourceCache , layer , coords ) {\n if (painter.renderPass !== 'translucent') return;\n\n const opacity = layer.paint.get('circle-opacity');\n const strokeWidth = layer.paint.get('circle-stroke-width');\n const strokeOpacity = layer.paint.get('circle-stroke-opacity');\n\n if (opacity.constantOr(1) === 0 && (strokeWidth.constantOr(1) === 0 || strokeOpacity.constantOr(1) === 0)) {\n return;\n }\n\n const context = painter.context;\n const gl = context.gl;\n\n context.setDepthMode(painter.depthModeForSublayer(0, DepthMode.ReadOnly));\n // Allow circles to be drawn across boundaries, so that\n // large circles are not clipped to tiles\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n let first = true;\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n\n const prevProgram = painter.context.program.get();\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram('circle', programConfiguration);\n if (first || program.program !== prevProgram) {\n programConfiguration.setUniforms(context, program, layer.paint, {zoom: painter.transform.zoom});\n first = false;\n }\n\n gl.uniform1f(program.uniforms.u_camera_to_center_distance, painter.transform.cameraToCenterDistance);\n gl.uniform1i(program.uniforms.u_scale_with_map, layer.paint.get('circle-pitch-scale') === 'map' ? 1 : 0);\n if (layer.paint.get('circle-pitch-alignment') === 'map') {\n gl.uniform1i(program.uniforms.u_pitch_with_map, 1);\n const pixelRatio = pixelsToTileUnits(tile, 1, painter.transform.zoom);\n gl.uniform2f(program.uniforms.u_extrude_scale, pixelRatio, pixelRatio);\n } else {\n gl.uniform1i(program.uniforms.u_pitch_with_map, 0);\n gl.uniform2fv(program.uniforms.u_extrude_scale, painter.transform.pixelsToGLUnits);\n }\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, painter.translatePosMatrix(\n coord.posMatrix,\n tile,\n layer.paint.get('circle-translate'),\n layer.paint.get('circle-translate-anchor')\n ));\n\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer,\n bucket.segments,\n programConfiguration);\n }\n}\n","// \n\n \n \n \n \n \nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst DepthMode = require('../gl/depth_mode');\nconst StencilMode = require('../gl/stencil_mode');\n\nmodule.exports = drawCollisionDebug;\n\nfunction drawCollisionDebugGeometry(painter , sourceCache , layer , coords , drawCircles ) {\n const context = painter.context;\n const gl = context.gl;\n const program = drawCircles ? painter.useProgram('collisionCircle') : painter.useProgram('collisionBox');\n\n context.setDepthMode(DepthMode.disabled);\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n const buffers = drawCircles ? bucket.collisionCircle : bucket.collisionBox;\n if (!buffers) continue;\n\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, coord.posMatrix);\n\n if (!drawCircles) {\n context.lineWidth.set(1);\n }\n\n gl.uniform1f(program.uniforms.u_camera_to_center_distance, painter.transform.cameraToCenterDistance);\n const pixelRatio = pixelsToTileUnits(tile, 1, painter.transform.zoom);\n const scale = Math.pow(2, painter.transform.zoom - tile.tileID.overscaledZ);\n gl.uniform1f(program.uniforms.u_pixels_to_tile_units, pixelRatio);\n gl.uniform2f(program.uniforms.u_extrude_scale,\n painter.transform.pixelsToGLUnits[0] / (pixelRatio * scale),\n painter.transform.pixelsToGLUnits[1] / (pixelRatio * scale));\n\n program.draw(\n context,\n drawCircles ? gl.TRIANGLES : gl.LINES,\n layer.id,\n buffers.layoutVertexBuffer,\n buffers.indexBuffer,\n buffers.segments,\n null,\n buffers.collisionVertexBuffer,\n null);\n }\n}\n\nfunction drawCollisionDebug(painter , sourceCache , layer , coords ) {\n drawCollisionDebugGeometry(painter, sourceCache, layer, coords, false);\n drawCollisionDebugGeometry(painter, sourceCache, layer, coords, true);\n}\n","// \n\nconst browser = require('../util/browser');\nconst mat4 = require('@mapbox/gl-matrix').mat4;\nconst EXTENT = require('../data/extent');\nconst VertexArrayObject = require('./vertex_array_object');\nconst {PosArray} = require('../data/array_types');\nconst posAttributes = require('../data/pos_attributes');\nconst DepthMode = require('../gl/depth_mode');\nconst StencilMode = require('../gl/stencil_mode');\n\n \n \n \n\nmodule.exports = drawDebug;\n\nfunction drawDebug(painter , sourceCache , coords ) {\n for (let i = 0; i < coords.length; i++) {\n drawDebugTile(painter, sourceCache, coords[i]);\n }\n}\n\nfunction drawDebugTile(painter, sourceCache, coord) {\n const context = painter.context;\n const gl = context.gl;\n\n context.lineWidth.set(1 * browser.devicePixelRatio);\n\n const posMatrix = coord.posMatrix;\n const program = painter.useProgram('debug');\n\n context.setDepthMode(DepthMode.disabled);\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, posMatrix);\n gl.uniform4f(program.uniforms.u_color, 1, 0, 0, 1);\n painter.debugVAO.bind(context, program, painter.debugBuffer, []);\n gl.drawArrays(gl.LINE_STRIP, 0, painter.debugBuffer.length);\n\n const vertices = createTextVerticies(coord.toString(), 50, 200, 5);\n const debugTextArray = new PosArray();\n for (let v = 0; v < vertices.length; v += 2) {\n debugTextArray.emplaceBack(vertices[v], vertices[v + 1]);\n }\n const debugTextBuffer = context.createVertexBuffer(debugTextArray, posAttributes.members);\n const debugTextVAO = new VertexArrayObject();\n debugTextVAO.bind(context, program, debugTextBuffer, []);\n gl.uniform4f(program.uniforms.u_color, 1, 1, 1, 1);\n\n // Draw the halo with multiple 1px lines instead of one wider line because\n // the gl spec doesn't guarantee support for lines with width > 1.\n const tileSize = sourceCache.getTile(coord).tileSize;\n const onePixel = EXTENT / (Math.pow(2, painter.transform.zoom - coord.overscaledZ) * tileSize);\n const translations = [[-1, -1], [-1, 1], [1, -1], [1, 1]];\n for (let i = 0; i < translations.length; i++) {\n const translation = translations[i];\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, mat4.translate([], posMatrix, [onePixel * translation[0], onePixel * translation[1], 0]));\n gl.drawArrays(gl.LINES, 0, debugTextBuffer.length);\n }\n\n gl.uniform4f(program.uniforms.u_color, 0, 0, 0, 1);\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, posMatrix);\n gl.drawArrays(gl.LINES, 0, debugTextBuffer.length);\n}\n\n// Font data From Hershey Simplex Font\n// http://paulbourke.net/dataformats/hershey/\nconst simplexFont = {\n \" \": [16, []],\n \"!\": [10, [5, 21, 5, 7, -1, -1, 5, 2, 4, 1, 5, 0, 6, 1, 5, 2]],\n \"\\\"\": [16, [4, 21, 4, 14, -1, -1, 12, 21, 12, 14]],\n \"#\": [21, [11, 25, 4, -7, -1, -1, 17, 25, 10, -7, -1, -1, 4, 12, 18, 12, -1, -1, 3, 6, 17, 6]],\n \"$\": [20, [8, 25, 8, -4, -1, -1, 12, 25, 12, -4, -1, -1, 17, 18, 15, 20, 12, 21, 8, 21, 5, 20, 3, 18, 3, 16, 4, 14, 5, 13, 7, 12, 13, 10, 15, 9, 16, 8, 17, 6, 17, 3, 15, 1, 12, 0, 8, 0, 5, 1, 3, 3]],\n \"%\": [24, [21, 21, 3, 0, -1, -1, 8, 21, 10, 19, 10, 17, 9, 15, 7, 14, 5, 14, 3, 16, 3, 18, 4, 20, 6, 21, 8, 21, 10, 20, 13, 19, 16, 19, 19, 20, 21, 21, -1, -1, 17, 7, 15, 6, 14, 4, 14, 2, 16, 0, 18, 0, 20, 1, 21, 3, 21, 5, 19, 7, 17, 7]],\n \"&\": [26, [23, 12, 23, 13, 22, 14, 21, 14, 20, 13, 19, 11, 17, 6, 15, 3, 13, 1, 11, 0, 7, 0, 5, 1, 4, 2, 3, 4, 3, 6, 4, 8, 5, 9, 12, 13, 13, 14, 14, 16, 14, 18, 13, 20, 11, 21, 9, 20, 8, 18, 8, 16, 9, 13, 11, 10, 16, 3, 18, 1, 20, 0, 22, 0, 23, 1, 23, 2]],\n \"'\": [10, [5, 19, 4, 20, 5, 21, 6, 20, 6, 18, 5, 16, 4, 15]],\n \"(\": [14, [11, 25, 9, 23, 7, 20, 5, 16, 4, 11, 4, 7, 5, 2, 7, -2, 9, -5, 11, -7]],\n \")\": [14, [3, 25, 5, 23, 7, 20, 9, 16, 10, 11, 10, 7, 9, 2, 7, -2, 5, -5, 3, -7]],\n \"*\": [16, [8, 21, 8, 9, -1, -1, 3, 18, 13, 12, -1, -1, 13, 18, 3, 12]],\n \"+\": [26, [13, 18, 13, 0, -1, -1, 4, 9, 22, 9]],\n \",\": [10, [6, 1, 5, 0, 4, 1, 5, 2, 6, 1, 6, -1, 5, -3, 4, -4]],\n \"-\": [26, [4, 9, 22, 9]],\n \".\": [10, [5, 2, 4, 1, 5, 0, 6, 1, 5, 2]],\n \"/\": [22, [20, 25, 2, -7]],\n \"0\": [20, [9, 21, 6, 20, 4, 17, 3, 12, 3, 9, 4, 4, 6, 1, 9, 0, 11, 0, 14, 1, 16, 4, 17, 9, 17, 12, 16, 17, 14, 20, 11, 21, 9, 21]],\n \"1\": [20, [6, 17, 8, 18, 11, 21, 11, 0]],\n \"2\": [20, [4, 16, 4, 17, 5, 19, 6, 20, 8, 21, 12, 21, 14, 20, 15, 19, 16, 17, 16, 15, 15, 13, 13, 10, 3, 0, 17, 0]],\n \"3\": [20, [5, 21, 16, 21, 10, 13, 13, 13, 15, 12, 16, 11, 17, 8, 17, 6, 16, 3, 14, 1, 11, 0, 8, 0, 5, 1, 4, 2, 3, 4]],\n \"4\": [20, [13, 21, 3, 7, 18, 7, -1, -1, 13, 21, 13, 0]],\n \"5\": [20, [15, 21, 5, 21, 4, 12, 5, 13, 8, 14, 11, 14, 14, 13, 16, 11, 17, 8, 17, 6, 16, 3, 14, 1, 11, 0, 8, 0, 5, 1, 4, 2, 3, 4]],\n \"6\": [20, [16, 18, 15, 20, 12, 21, 10, 21, 7, 20, 5, 17, 4, 12, 4, 7, 5, 3, 7, 1, 10, 0, 11, 0, 14, 1, 16, 3, 17, 6, 17, 7, 16, 10, 14, 12, 11, 13, 10, 13, 7, 12, 5, 10, 4, 7]],\n \"7\": [20, [17, 21, 7, 0, -1, -1, 3, 21, 17, 21]],\n \"8\": [20, [8, 21, 5, 20, 4, 18, 4, 16, 5, 14, 7, 13, 11, 12, 14, 11, 16, 9, 17, 7, 17, 4, 16, 2, 15, 1, 12, 0, 8, 0, 5, 1, 4, 2, 3, 4, 3, 7, 4, 9, 6, 11, 9, 12, 13, 13, 15, 14, 16, 16, 16, 18, 15, 20, 12, 21, 8, 21]],\n \"9\": [20, [16, 14, 15, 11, 13, 9, 10, 8, 9, 8, 6, 9, 4, 11, 3, 14, 3, 15, 4, 18, 6, 20, 9, 21, 10, 21, 13, 20, 15, 18, 16, 14, 16, 9, 15, 4, 13, 1, 10, 0, 8, 0, 5, 1, 4, 3]],\n \":\": [10, [5, 14, 4, 13, 5, 12, 6, 13, 5, 14, -1, -1, 5, 2, 4, 1, 5, 0, 6, 1, 5, 2]],\n \";\": [10, [5, 14, 4, 13, 5, 12, 6, 13, 5, 14, -1, -1, 6, 1, 5, 0, 4, 1, 5, 2, 6, 1, 6, -1, 5, -3, 4, -4]],\n \"<\": [24, [20, 18, 4, 9, 20, 0]],\n \"=\": [26, [4, 12, 22, 12, -1, -1, 4, 6, 22, 6]],\n \">\": [24, [4, 18, 20, 9, 4, 0]],\n \"?\": [18, [3, 16, 3, 17, 4, 19, 5, 20, 7, 21, 11, 21, 13, 20, 14, 19, 15, 17, 15, 15, 14, 13, 13, 12, 9, 10, 9, 7, -1, -1, 9, 2, 8, 1, 9, 0, 10, 1, 9, 2]],\n \"@\": [27, [18, 13, 17, 15, 15, 16, 12, 16, 10, 15, 9, 14, 8, 11, 8, 8, 9, 6, 11, 5, 14, 5, 16, 6, 17, 8, -1, -1, 12, 16, 10, 14, 9, 11, 9, 8, 10, 6, 11, 5, -1, -1, 18, 16, 17, 8, 17, 6, 19, 5, 21, 5, 23, 7, 24, 10, 24, 12, 23, 15, 22, 17, 20, 19, 18, 20, 15, 21, 12, 21, 9, 20, 7, 19, 5, 17, 4, 15, 3, 12, 3, 9, 4, 6, 5, 4, 7, 2, 9, 1, 12, 0, 15, 0, 18, 1, 20, 2, 21, 3, -1, -1, 19, 16, 18, 8, 18, 6, 19, 5]],\n \"A\": [18, [9, 21, 1, 0, -1, -1, 9, 21, 17, 0, -1, -1, 4, 7, 14, 7]],\n \"B\": [21, [4, 21, 4, 0, -1, -1, 4, 21, 13, 21, 16, 20, 17, 19, 18, 17, 18, 15, 17, 13, 16, 12, 13, 11, -1, -1, 4, 11, 13, 11, 16, 10, 17, 9, 18, 7, 18, 4, 17, 2, 16, 1, 13, 0, 4, 0]],\n \"C\": [21, [18, 16, 17, 18, 15, 20, 13, 21, 9, 21, 7, 20, 5, 18, 4, 16, 3, 13, 3, 8, 4, 5, 5, 3, 7, 1, 9, 0, 13, 0, 15, 1, 17, 3, 18, 5]],\n \"D\": [21, [4, 21, 4, 0, -1, -1, 4, 21, 11, 21, 14, 20, 16, 18, 17, 16, 18, 13, 18, 8, 17, 5, 16, 3, 14, 1, 11, 0, 4, 0]],\n \"E\": [19, [4, 21, 4, 0, -1, -1, 4, 21, 17, 21, -1, -1, 4, 11, 12, 11, -1, -1, 4, 0, 17, 0]],\n \"F\": [18, [4, 21, 4, 0, -1, -1, 4, 21, 17, 21, -1, -1, 4, 11, 12, 11]],\n \"G\": [21, [18, 16, 17, 18, 15, 20, 13, 21, 9, 21, 7, 20, 5, 18, 4, 16, 3, 13, 3, 8, 4, 5, 5, 3, 7, 1, 9, 0, 13, 0, 15, 1, 17, 3, 18, 5, 18, 8, -1, -1, 13, 8, 18, 8]],\n \"H\": [22, [4, 21, 4, 0, -1, -1, 18, 21, 18, 0, -1, -1, 4, 11, 18, 11]],\n \"I\": [8, [4, 21, 4, 0]],\n \"J\": [16, [12, 21, 12, 5, 11, 2, 10, 1, 8, 0, 6, 0, 4, 1, 3, 2, 2, 5, 2, 7]],\n \"K\": [21, [4, 21, 4, 0, -1, -1, 18, 21, 4, 7, -1, -1, 9, 12, 18, 0]],\n \"L\": [17, [4, 21, 4, 0, -1, -1, 4, 0, 16, 0]],\n \"M\": [24, [4, 21, 4, 0, -1, -1, 4, 21, 12, 0, -1, -1, 20, 21, 12, 0, -1, -1, 20, 21, 20, 0]],\n \"N\": [22, [4, 21, 4, 0, -1, -1, 4, 21, 18, 0, -1, -1, 18, 21, 18, 0]],\n \"O\": [22, [9, 21, 7, 20, 5, 18, 4, 16, 3, 13, 3, 8, 4, 5, 5, 3, 7, 1, 9, 0, 13, 0, 15, 1, 17, 3, 18, 5, 19, 8, 19, 13, 18, 16, 17, 18, 15, 20, 13, 21, 9, 21]],\n \"P\": [21, [4, 21, 4, 0, -1, -1, 4, 21, 13, 21, 16, 20, 17, 19, 18, 17, 18, 14, 17, 12, 16, 11, 13, 10, 4, 10]],\n \"Q\": [22, [9, 21, 7, 20, 5, 18, 4, 16, 3, 13, 3, 8, 4, 5, 5, 3, 7, 1, 9, 0, 13, 0, 15, 1, 17, 3, 18, 5, 19, 8, 19, 13, 18, 16, 17, 18, 15, 20, 13, 21, 9, 21, -1, -1, 12, 4, 18, -2]],\n \"R\": [21, [4, 21, 4, 0, -1, -1, 4, 21, 13, 21, 16, 20, 17, 19, 18, 17, 18, 15, 17, 13, 16, 12, 13, 11, 4, 11, -1, -1, 11, 11, 18, 0]],\n \"S\": [20, [17, 18, 15, 20, 12, 21, 8, 21, 5, 20, 3, 18, 3, 16, 4, 14, 5, 13, 7, 12, 13, 10, 15, 9, 16, 8, 17, 6, 17, 3, 15, 1, 12, 0, 8, 0, 5, 1, 3, 3]],\n \"T\": [16, [8, 21, 8, 0, -1, -1, 1, 21, 15, 21]],\n \"U\": [22, [4, 21, 4, 6, 5, 3, 7, 1, 10, 0, 12, 0, 15, 1, 17, 3, 18, 6, 18, 21]],\n \"V\": [18, [1, 21, 9, 0, -1, -1, 17, 21, 9, 0]],\n \"W\": [24, [2, 21, 7, 0, -1, -1, 12, 21, 7, 0, -1, -1, 12, 21, 17, 0, -1, -1, 22, 21, 17, 0]],\n \"X\": [20, [3, 21, 17, 0, -1, -1, 17, 21, 3, 0]],\n \"Y\": [18, [1, 21, 9, 11, 9, 0, -1, -1, 17, 21, 9, 11]],\n \"Z\": [20, [17, 21, 3, 0, -1, -1, 3, 21, 17, 21, -1, -1, 3, 0, 17, 0]],\n \"[\": [14, [4, 25, 4, -7, -1, -1, 5, 25, 5, -7, -1, -1, 4, 25, 11, 25, -1, -1, 4, -7, 11, -7]],\n \"\\\\\": [14, [0, 21, 14, -3]],\n \"]\": [14, [9, 25, 9, -7, -1, -1, 10, 25, 10, -7, -1, -1, 3, 25, 10, 25, -1, -1, 3, -7, 10, -7]],\n \"^\": [16, [6, 15, 8, 18, 10, 15, -1, -1, 3, 12, 8, 17, 13, 12, -1, -1, 8, 17, 8, 0]],\n \"_\": [16, [0, -2, 16, -2]],\n \"`\": [10, [6, 21, 5, 20, 4, 18, 4, 16, 5, 15, 6, 16, 5, 17]],\n \"a\": [19, [15, 14, 15, 0, -1, -1, 15, 11, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"b\": [19, [4, 21, 4, 0, -1, -1, 4, 11, 6, 13, 8, 14, 11, 14, 13, 13, 15, 11, 16, 8, 16, 6, 15, 3, 13, 1, 11, 0, 8, 0, 6, 1, 4, 3]],\n \"c\": [18, [15, 11, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"d\": [19, [15, 21, 15, 0, -1, -1, 15, 11, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"e\": [18, [3, 8, 15, 8, 15, 10, 14, 12, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"f\": [12, [10, 21, 8, 21, 6, 20, 5, 17, 5, 0, -1, -1, 2, 14, 9, 14]],\n \"g\": [19, [15, 14, 15, -2, 14, -5, 13, -6, 11, -7, 8, -7, 6, -6, -1, -1, 15, 11, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"h\": [19, [4, 21, 4, 0, -1, -1, 4, 10, 7, 13, 9, 14, 12, 14, 14, 13, 15, 10, 15, 0]],\n \"i\": [8, [3, 21, 4, 20, 5, 21, 4, 22, 3, 21, -1, -1, 4, 14, 4, 0]],\n \"j\": [10, [5, 21, 6, 20, 7, 21, 6, 22, 5, 21, -1, -1, 6, 14, 6, -3, 5, -6, 3, -7, 1, -7]],\n \"k\": [17, [4, 21, 4, 0, -1, -1, 14, 14, 4, 4, -1, -1, 8, 8, 15, 0]],\n \"l\": [8, [4, 21, 4, 0]],\n \"m\": [30, [4, 14, 4, 0, -1, -1, 4, 10, 7, 13, 9, 14, 12, 14, 14, 13, 15, 10, 15, 0, -1, -1, 15, 10, 18, 13, 20, 14, 23, 14, 25, 13, 26, 10, 26, 0]],\n \"n\": [19, [4, 14, 4, 0, -1, -1, 4, 10, 7, 13, 9, 14, 12, 14, 14, 13, 15, 10, 15, 0]],\n \"o\": [19, [8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3, 16, 6, 16, 8, 15, 11, 13, 13, 11, 14, 8, 14]],\n \"p\": [19, [4, 14, 4, -7, -1, -1, 4, 11, 6, 13, 8, 14, 11, 14, 13, 13, 15, 11, 16, 8, 16, 6, 15, 3, 13, 1, 11, 0, 8, 0, 6, 1, 4, 3]],\n \"q\": [19, [15, 14, 15, -7, -1, -1, 15, 11, 13, 13, 11, 14, 8, 14, 6, 13, 4, 11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0, 11, 0, 13, 1, 15, 3]],\n \"r\": [13, [4, 14, 4, 0, -1, -1, 4, 8, 5, 11, 7, 13, 9, 14, 12, 14]],\n \"s\": [17, [14, 11, 13, 13, 10, 14, 7, 14, 4, 13, 3, 11, 4, 9, 6, 8, 11, 7, 13, 6, 14, 4, 14, 3, 13, 1, 10, 0, 7, 0, 4, 1, 3, 3]],\n \"t\": [12, [5, 21, 5, 4, 6, 1, 8, 0, 10, 0, -1, -1, 2, 14, 9, 14]],\n \"u\": [19, [4, 14, 4, 4, 5, 1, 7, 0, 10, 0, 12, 1, 15, 4, -1, -1, 15, 14, 15, 0]],\n \"v\": [16, [2, 14, 8, 0, -1, -1, 14, 14, 8, 0]],\n \"w\": [22, [3, 14, 7, 0, -1, -1, 11, 14, 7, 0, -1, -1, 11, 14, 15, 0, -1, -1, 19, 14, 15, 0]],\n \"x\": [17, [3, 14, 14, 0, -1, -1, 14, 14, 3, 0]],\n \"y\": [16, [2, 14, 8, 0, -1, -1, 14, 14, 8, 0, 6, -4, 4, -6, 2, -7, 1, -7]],\n \"z\": [17, [14, 14, 3, 0, -1, -1, 3, 14, 14, 14, -1, -1, 3, 0, 14, 0]],\n \"{\": [14, [9, 25, 7, 24, 6, 23, 5, 21, 5, 19, 6, 17, 7, 16, 8, 14, 8, 12, 6, 10, -1, -1, 7, 24, 6, 22, 6, 20, 7, 18, 8, 17, 9, 15, 9, 13, 8, 11, 4, 9, 8, 7, 9, 5, 9, 3, 8, 1, 7, 0, 6, -2, 6, -4, 7, -6, -1, -1, 6, 8, 8, 6, 8, 4, 7, 2, 6, 1, 5, -1, 5, -3, 6, -5, 7, -6, 9, -7]],\n \"|\": [8, [4, 25, 4, -7]],\n \"}\": [14, [5, 25, 7, 24, 8, 23, 9, 21, 9, 19, 8, 17, 7, 16, 6, 14, 6, 12, 8, 10, -1, -1, 7, 24, 8, 22, 8, 20, 7, 18, 6, 17, 5, 15, 5, 13, 6, 11, 10, 9, 6, 7, 5, 5, 5, 3, 6, 1, 7, 0, 8, -2, 8, -4, 7, -6, -1, -1, 8, 8, 6, 6, 6, 4, 7, 2, 8, 1, 9, -1, 9, -3, 8, -5, 7, -6, 5, -7]],\n \"~\": [24, [3, 6, 3, 8, 4, 11, 6, 12, 8, 12, 10, 11, 14, 8, 16, 7, 18, 7, 20, 8, 21, 10, -1, -1, 3, 8, 4, 10, 6, 11, 8, 11, 10, 10, 14, 7, 16, 6, 18, 6, 20, 7, 21, 10, 21, 12]]\n};\n\nfunction createTextVerticies(text, left, baseline, scale) {\n scale = scale || 1;\n\n const strokes = [];\n let i, len, j, len2, glyph, x, y, prev;\n\n for (i = 0, len = text.length; i < len; i++) {\n glyph = simplexFont[text[i]];\n if (!glyph) continue;\n prev = null;\n\n for (j = 0, len2 = glyph[1].length; j < len2; j += 2) {\n if (glyph[1][j] === -1 && glyph[1][j + 1] === -1) {\n prev = null;\n\n } else {\n x = left + glyph[1][j] * scale;\n y = baseline - glyph[1][j + 1] * scale;\n if (prev) {\n strokes.push(prev.x, prev.y, x, y);\n }\n prev = {x: x, y: y};\n }\n }\n left += glyph[0] * scale;\n }\n\n return strokes;\n}\n","// \n\nconst pattern = require('./pattern');\nconst Color = require('../style-spec/util/color');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n \n \n\nmodule.exports = drawFill;\n\nfunction drawFill(painter , sourceCache , layer , coords ) {\n const color = layer.paint.get('fill-color');\n const opacity = layer.paint.get('fill-opacity');\n\n if (opacity.constantOr(1) === 0) {\n return;\n }\n\n const context = painter.context;\n context.setColorMode(painter.colorModeForRenderPass());\n\n const pass = (!layer.paint.get('fill-pattern') &&\n color.constantOr(Color.transparent).a === 1 &&\n opacity.constantOr(0) === 1) ? 'opaque' : 'translucent';\n\n // Draw fill\n if (painter.renderPass === pass) {\n // Once we switch to earcut drawing we can pull most of the WebGL setup\n // outside of this coords loop.\n context.setDepthMode(painter.depthModeForSublayer(1, painter.renderPass === 'opaque' ? DepthMode.ReadWrite : DepthMode.ReadOnly));\n drawFillTiles(painter, sourceCache, layer, coords, drawFillTile);\n }\n\n // Draw stroke\n if (painter.renderPass === 'translucent' && layer.paint.get('fill-antialias')) {\n context.lineWidth.set(2);\n\n // If we defined a different color for the fill outline, we are\n // going to ignore the bits in 0x07 and just care about the global\n // clipping mask.\n // Otherwise, we only want to drawFill the antialiased parts that are\n // *outside* the current shape. This is important in case the fill\n // or stroke color is translucent. If we wouldn't clip to outside\n // the current shape, some pixels from the outline stroke overlapped\n // the (non-antialiased) fill.\n context.setDepthMode(painter.depthModeForSublayer(\n layer.getPaintProperty('fill-outline-color') ? 2 : 0, DepthMode.ReadOnly));\n drawFillTiles(painter, sourceCache, layer, coords, drawStrokeTile);\n }\n}\n\nfunction drawFillTiles(painter, sourceCache, layer, coords, drawFn) {\n if (pattern.isPatternMissing(layer.paint.get('fill-pattern'), painter)) return;\n\n let firstTile = true;\n for (const coord of coords) {\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n\n painter.context.setStencilMode(painter.stencilModeForClipping(coord));\n drawFn(painter, sourceCache, layer, tile, coord, bucket, firstTile);\n firstTile = false;\n }\n}\n\nfunction drawFillTile(painter, sourceCache, layer, tile, coord, bucket, firstTile) {\n const gl = painter.context.gl;\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n\n const program = setFillProgram('fill', layer.paint.get('fill-pattern'), painter, programConfiguration, layer, tile, coord, firstTile);\n\n program.draw(\n painter.context,\n gl.TRIANGLES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer,\n bucket.segments,\n programConfiguration);\n}\n\nfunction drawStrokeTile(painter, sourceCache, layer, tile, coord, bucket, firstTile) {\n const gl = painter.context.gl;\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const pattern = layer.getPaintProperty('fill-outline-color') ? null : layer.paint.get('fill-pattern');\n\n const program = setFillProgram('fillOutline', pattern, painter, programConfiguration, layer, tile, coord, firstTile);\n gl.uniform2f(program.uniforms.u_world, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n program.draw(\n painter.context,\n gl.LINES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer2,\n bucket.segments2,\n programConfiguration);\n}\n\nfunction setFillProgram(programId, pat , painter, programConfiguration, layer, tile, coord, firstTile) {\n let program;\n const prevProgram = painter.context.program.get();\n if (!pat) {\n program = painter.useProgram(programId, programConfiguration);\n if (firstTile || program.program !== prevProgram) {\n programConfiguration.setUniforms(painter.context, program, layer.paint, {zoom: painter.transform.zoom});\n }\n } else {\n program = painter.useProgram(`${programId}Pattern`, programConfiguration);\n if (firstTile || program.program !== prevProgram) {\n programConfiguration.setUniforms(painter.context, program, layer.paint, {zoom: painter.transform.zoom});\n pattern.prepare(pat, painter, program);\n }\n pattern.setTile(tile, painter, program);\n }\n painter.context.gl.uniformMatrix4fv(program.uniforms.u_matrix, false, painter.translatePosMatrix(\n coord.posMatrix, tile,\n layer.paint.get('fill-translate'),\n layer.paint.get('fill-translate-anchor')\n ));\n return program;\n}\n","// \n\nconst glMatrix = require('@mapbox/gl-matrix');\nconst pattern = require('./pattern');\nconst Texture = require('./texture');\nconst Color = require('../style-spec/util/color');\nconst DepthMode = require('../gl/depth_mode');\nconst mat3 = glMatrix.mat3;\nconst mat4 = glMatrix.mat4;\nconst vec3 = glMatrix.vec3;\nconst StencilMode = require('../gl/stencil_mode');\n\n \n \n \n \n \n\nmodule.exports = draw;\n\nfunction draw(painter , source , layer , coords ) {\n if (layer.paint.get('fill-extrusion-opacity') === 0) {\n return;\n }\n\n if (painter.renderPass === 'offscreen') {\n drawToExtrusionFramebuffer(painter, layer);\n\n let first = true;\n for (const coord of coords) {\n const tile = source.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n\n drawExtrusion(painter, source, layer, tile, coord, bucket, first);\n first = false;\n }\n } else if (painter.renderPass === 'translucent') {\n drawExtrusionTexture(painter, layer);\n }\n}\n\nfunction drawToExtrusionFramebuffer(painter, layer) {\n const context = painter.context;\n const gl = context.gl;\n\n let renderTarget = layer.viewportFrame;\n\n if (painter.depthRboNeedsClear) {\n painter.setupOffscreenDepthRenderbuffer();\n }\n\n if (!renderTarget) {\n const texture = new Texture(context, {width: painter.width, height: painter.height, data: null}, gl.RGBA);\n texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n renderTarget = layer.viewportFrame = context.createFramebuffer(painter.width, painter.height);\n renderTarget.colorAttachment.set(texture.texture);\n }\n\n context.bindFramebuffer.set(renderTarget.framebuffer);\n renderTarget.depthAttachment.set(painter.depthRbo);\n\n if (painter.depthRboNeedsClear) {\n context.clear({ depth: 1 });\n painter.depthRboNeedsClear = false;\n }\n\n context.clear({ color: Color.transparent });\n\n context.setStencilMode(StencilMode.disabled);\n context.setDepthMode(new DepthMode(gl.LEQUAL, DepthMode.ReadWrite, [0, 1]));\n context.setColorMode(painter.colorModeForRenderPass());\n}\n\nfunction drawExtrusionTexture(painter, layer) {\n const renderedTexture = layer.viewportFrame;\n if (!renderedTexture) return;\n\n const context = painter.context;\n const gl = context.gl;\n const program = painter.useProgram('extrusionTexture');\n\n context.setStencilMode(StencilMode.disabled);\n context.setDepthMode(DepthMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, renderedTexture.colorAttachment.get());\n\n gl.uniform1f(program.uniforms.u_opacity, layer.paint.get('fill-extrusion-opacity'));\n gl.uniform1i(program.uniforms.u_image, 0);\n\n const matrix = mat4.create();\n mat4.ortho(matrix, 0, painter.width, painter.height, 0, 0, 1);\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, matrix);\n\n gl.uniform2f(program.uniforms.u_world, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n painter.viewportVAO.bind(context, program, painter.viewportBuffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n}\n\nfunction drawExtrusion(painter, source, layer, tile, coord, bucket, first) {\n const context = painter.context;\n const gl = context.gl;\n\n const image = layer.paint.get('fill-extrusion-pattern');\n\n const prevProgram = painter.context.program.get();\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram(image ? 'fillExtrusionPattern' : 'fillExtrusion', programConfiguration);\n if (first || program.program !== prevProgram) {\n programConfiguration.setUniforms(context, program, layer.paint, {zoom: painter.transform.zoom});\n }\n\n if (image) {\n if (pattern.isPatternMissing(image, painter)) return;\n pattern.prepare(image, painter, program);\n pattern.setTile(tile, painter, program);\n gl.uniform1f(program.uniforms.u_height_factor, -Math.pow(2, coord.overscaledZ) / tile.tileSize / 8);\n }\n\n painter.context.gl.uniformMatrix4fv(program.uniforms.u_matrix, false, painter.translatePosMatrix(\n coord.posMatrix,\n tile,\n layer.paint.get('fill-extrusion-translate'),\n layer.paint.get('fill-extrusion-translate-anchor')\n ));\n\n setLight(program, painter);\n\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer,\n bucket.segments,\n programConfiguration);\n}\n\nfunction setLight(program, painter) {\n const gl = painter.context.gl;\n const light = painter.style.light;\n\n const _lp = light.properties.get('position');\n const lightPos = [_lp.x, _lp.y, _lp.z];\n\n const lightMat = mat3.create();\n if (light.properties.get('anchor') === 'viewport') {\n mat3.fromRotation(lightMat, -painter.transform.angle);\n }\n vec3.transformMat3(lightPos, lightPos, lightMat);\n\n const color = light.properties.get('color');\n\n gl.uniform3fv(program.uniforms.u_lightpos, lightPos);\n gl.uniform1f(program.uniforms.u_lightintensity, light.properties.get('intensity'));\n gl.uniform3f(program.uniforms.u_lightcolor, color.r, color.g, color.b);\n}\n","// \n\nconst mat4 = require('@mapbox/gl-matrix').mat4;\nconst Texture = require('./texture');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst Color = require('../style-spec/util/color');\nconst DepthMode = require('../gl/depth_mode');\nconst StencilMode = require('../gl/stencil_mode');\nconst ColorMode = require('../gl/color_mode');\n\n \n \n \n \n \n\nmodule.exports = drawHeatmap;\n\nfunction drawHeatmap(painter , sourceCache , layer , coords ) {\n if (layer.paint.get('heatmap-opacity') === 0) {\n return;\n }\n\n if (painter.renderPass === 'offscreen') {\n const context = painter.context;\n const gl = context.gl;\n\n context.setDepthMode(painter.depthModeForSublayer(0, DepthMode.ReadOnly));\n\n // Allow kernels to be drawn across boundaries, so that\n // large kernels are not clipped to tiles\n context.setStencilMode(StencilMode.disabled);\n\n bindFramebuffer(context, painter, layer);\n\n context.clear({ color: Color.transparent });\n\n // Turn on additive blending for kernels, which is a key aspect of kernel density estimation formula\n context.setColorMode(new ColorMode([gl.ONE, gl.ONE], Color.transparent, [true, true, true, true]));\n\n let first = true;\n for (let i = 0; i < coords.length; i++) {\n const coord = coords[i];\n\n // Skip tiles that have uncovered parents to avoid flickering; we don't need\n // to use complex tile masking here because the change between zoom levels is subtle,\n // so it's fine to simply render the parent until all its 4 children are loaded\n if (sourceCache.hasRenderableParent(coord)) continue;\n\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n\n const prevProgram = painter.context.program.get();\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const program = painter.useProgram('heatmap', programConfiguration);\n const {zoom} = painter.transform;\n if (first || program.program !== prevProgram) {\n programConfiguration.setUniforms(painter.context, program, layer.paint, {zoom});\n first = false;\n }\n\n gl.uniform1f(program.uniforms.u_extrude_scale, pixelsToTileUnits(tile, 1, zoom));\n\n gl.uniform1f(program.uniforms.u_intensity, layer.paint.get('heatmap-intensity'));\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, coord.posMatrix);\n\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer,\n bucket.segments,\n programConfiguration);\n }\n\n context.viewport.set([0, 0, painter.width, painter.height]);\n\n } else if (painter.renderPass === 'translucent') {\n painter.context.setColorMode(painter.colorModeForRenderPass());\n renderTextureToMap(painter, layer);\n }\n}\n\nfunction bindFramebuffer(context, painter, layer) {\n const gl = context.gl;\n context.activeTexture.set(gl.TEXTURE1);\n\n // Use a 4x downscaled screen texture for better performance\n context.viewport.set([0, 0, painter.width / 4, painter.height / 4]);\n\n let fbo = layer.heatmapFbo;\n\n if (!fbo) {\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\n fbo = layer.heatmapFbo = context.createFramebuffer(painter.width / 4, painter.height / 4);\n\n bindTextureToFramebuffer(context, painter, texture, fbo);\n\n } else {\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n context.bindFramebuffer.set(fbo.framebuffer);\n }\n}\n\nfunction bindTextureToFramebuffer(context, painter, texture, fbo) {\n const gl = context.gl;\n // Use the higher precision half-float texture where available (producing much smoother looking heatmaps);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, painter.width / 4, painter.height / 4, 0, gl.RGBA,\n context.extTextureHalfFloat ? context.extTextureHalfFloat.HALF_FLOAT_OES : gl.UNSIGNED_BYTE, null);\n\n fbo.colorAttachment.set(texture);\n\n // If using half-float texture as a render target is not supported, fall back to a low precision texture\n if (context.extTextureHalfFloat && gl.checkFramebufferStatus(gl.FRAMEBUFFER) !== gl.FRAMEBUFFER_COMPLETE) {\n context.extTextureHalfFloat = null;\n fbo.colorAttachment.setDirty();\n bindTextureToFramebuffer(context, painter, texture, fbo);\n }\n}\n\nfunction renderTextureToMap(painter, layer) {\n const context = painter.context;\n const gl = context.gl;\n\n\n // Here we bind two different textures from which we'll sample in drawing\n // heatmaps: the kernel texture, prepared in the offscreen pass, and a\n // color ramp texture.\n const fbo = layer.heatmapFbo;\n if (!fbo) return;\n context.activeTexture.set(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n\n context.activeTexture.set(gl.TEXTURE1);\n let colorRampTexture = layer.colorRampTexture;\n if (!colorRampTexture) {\n colorRampTexture = layer.colorRampTexture = new Texture(context, layer.colorRamp, gl.RGBA);\n }\n colorRampTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n context.setDepthMode(DepthMode.disabled);\n\n const program = painter.useProgram('heatmapTexture');\n\n const opacity = layer.paint.get('heatmap-opacity');\n gl.uniform1f(program.uniforms.u_opacity, opacity);\n gl.uniform1i(program.uniforms.u_image, 0);\n gl.uniform1i(program.uniforms.u_color_ramp, 1);\n\n const matrix = mat4.create();\n mat4.ortho(matrix, 0, painter.width, painter.height, 0, 0, 1);\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, matrix);\n\n gl.uniform2f(program.uniforms.u_world, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n painter.viewportVAO.bind(painter.context, program, painter.viewportBuffer, []);\n\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n}\n","// \nconst Coordinate = require('../geo/coordinate');\nconst Texture = require('./texture');\nconst EXTENT = require('../data/extent');\nconst mat4 = require('@mapbox/gl-matrix').mat4;\nconst StencilMode = require('../gl/stencil_mode');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n\nmodule.exports = drawHillshade;\n\nfunction drawHillshade(painter , sourceCache , layer , tileIDs ) {\n if (painter.renderPass !== 'offscreen' && painter.renderPass !== 'translucent') return;\n\n const context = painter.context;\n\n context.setDepthMode(painter.depthModeForSublayer(0, DepthMode.ReadOnly));\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n for (const tileID of tileIDs) {\n const tile = sourceCache.getTile(tileID);\n if (tile.needsHillshadePrepare && painter.renderPass === 'offscreen') {\n prepareHillshade(painter, tile);\n continue;\n } else if (painter.renderPass === 'translucent') {\n renderHillshade(painter, tile, layer);\n }\n }\n\n context.viewport.set([0, 0, painter.width, painter.height]);\n}\n\nfunction setLight(program, painter, layer) {\n let azimuthal = layer.paint.get('hillshade-illumination-direction') * (Math.PI / 180);\n // modify azimuthal angle by map rotation if light is anchored at the viewport\n if (layer.paint.get('hillshade-illumination-anchor') === 'viewport') azimuthal -= painter.transform.angle;\n painter.context.gl.uniform2f(program.uniforms.u_light, layer.paint.get('hillshade-exaggeration'), azimuthal);\n\n}\n\nfunction getTileLatRange(painter, tileID ) {\n const coordinate0 = tileID.toCoordinate();\n const coordinate1 = new Coordinate(coordinate0.column, coordinate0.row + 1, coordinate0.zoom);\n return [painter.transform.coordinateLocation(coordinate0).lat, painter.transform.coordinateLocation(coordinate1).lat];\n}\n\nfunction renderHillshade(painter, tile, layer) {\n const context = painter.context;\n const gl = context.gl;\n const fbo = tile.fbo;\n if (!fbo) return;\n\n const program = painter.useProgram('hillshade');\n const posMatrix = painter.transform.calculatePosMatrix(tile.tileID.toUnwrapped());\n setLight(program, painter, layer);\n // for scaling the magnitude of a points slope by its latitude\n const latRange = getTileLatRange(painter, tile.tileID);\n context.activeTexture.set(gl.TEXTURE0);\n\n gl.bindTexture(gl.TEXTURE_2D, fbo.colorAttachment.get());\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, posMatrix);\n gl.uniform2fv(program.uniforms.u_latrange, latRange);\n gl.uniform1i(program.uniforms.u_image, 0);\n\n const shadowColor = layer.paint.get(\"hillshade-shadow-color\");\n gl.uniform4f(program.uniforms.u_shadow, shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a);\n const highlightColor = layer.paint.get(\"hillshade-highlight-color\");\n gl.uniform4f(program.uniforms.u_highlight, highlightColor.r, highlightColor.g, highlightColor.b, highlightColor.a);\n const accentColor = layer.paint.get(\"hillshade-accent-color\");\n gl.uniform4f(program.uniforms.u_accent, accentColor.r, accentColor.g, accentColor.b, accentColor.a);\n\n if (tile.maskedBoundsBuffer && tile.maskedIndexBuffer && tile.segments) {\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n tile.maskedBoundsBuffer,\n tile.maskedIndexBuffer,\n tile.segments\n );\n } else {\n const buffer = painter.rasterBoundsBuffer;\n const vao = painter.rasterBoundsVAO;\n vao.bind(context, program, buffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, buffer.length);\n }\n}\n\n\n// hillshade rendering is done in two steps. the prepare step first calculates the slope of the terrain in the x and y\n// directions for each pixel, and saves those values to a framebuffer texture in the r and g channels.\nfunction prepareHillshade(painter, tile) {\n const context = painter.context;\n const gl = context.gl;\n // decode rgba levels by using integer overflow to convert each Uint32Array element -> 4 Uint8Array elements.\n // ex.\n // Uint32:\n // base 10 - 67308\n // base 2 - 0000 0000 0000 0001 0000 0110 1110 1100\n //\n // Uint8:\n // base 10 - 0, 1, 6, 236 (this order is reversed in the resulting array via the overflow.\n // first 8 bits represent 236, so the r component of the texture pixel will be 236 etc.)\n // base 2 - 0000 0000, 0000 0001, 0000 0110, 1110 1100\n if (tile.dem && tile.dem.level) {\n const tileSize = tile.dem.level.dim;\n\n const pixelData = tile.dem.getPixels();\n context.activeTexture.set(gl.TEXTURE1);\n\n // if UNPACK_PREMULTIPLY_ALPHA_WEBGL is set to true prior to drawHillshade being called\n // tiles will appear blank, because as you can see above the alpha value for these textures\n // is always 0\n context.pixelStoreUnpackPremultiplyAlpha.set(false);\n tile.demTexture = tile.demTexture || painter.getTileTexture(tile.tileSize);\n if (tile.demTexture) {\n const demTexture = tile.demTexture;\n demTexture.update(pixelData, false);\n demTexture.bind(gl.NEAREST, gl.CLAMP_TO_EDGE);\n } else {\n tile.demTexture = new Texture(context, pixelData, gl.RGBA, false);\n tile.demTexture.bind(gl.NEAREST, gl.CLAMP_TO_EDGE);\n }\n\n context.activeTexture.set(gl.TEXTURE0);\n\n let fbo = tile.fbo;\n\n if (!fbo) {\n const renderTexture = new Texture(context, {width: tileSize, height: tileSize, data: null}, gl.RGBA);\n renderTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n\n fbo = tile.fbo = context.createFramebuffer(tileSize, tileSize);\n fbo.colorAttachment.set(renderTexture.texture);\n }\n\n context.bindFramebuffer.set(fbo.framebuffer);\n context.viewport.set([0, 0, tileSize, tileSize]);\n\n const matrix = mat4.create();\n // Flip rendering at y axis.\n mat4.ortho(matrix, 0, EXTENT, -EXTENT, 0, 0, 1);\n mat4.translate(matrix, matrix, [0, -EXTENT, 0]);\n\n const program = painter.useProgram('hillshadePrepare');\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, matrix);\n gl.uniform1f(program.uniforms.u_zoom, tile.tileID.overscaledZ);\n gl.uniform2fv(program.uniforms.u_dimension, [tileSize * 2, tileSize * 2]);\n gl.uniform1i(program.uniforms.u_image, 1);\n\n const buffer = painter.rasterBoundsBuffer;\n const vao = painter.rasterBoundsVAO;\n\n vao.bind(context, program, buffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, buffer.length);\n\n tile.needsHillshadePrepare = false;\n }\n}\n","// \n\nconst browser = require('../util/browser');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n \n\nmodule.exports = function drawLine(painter , sourceCache , layer , coords ) {\n if (painter.renderPass !== 'translucent') return;\n\n const opacity = layer.paint.get('line-opacity');\n if (opacity.constantOr(1) === 0) return;\n\n const context = painter.context;\n\n context.setDepthMode(painter.depthModeForSublayer(0, DepthMode.ReadOnly));\n context.setColorMode(painter.colorModeForRenderPass());\n\n const programId =\n layer.paint.get('line-dasharray') ? 'lineSDF' :\n layer.paint.get('line-pattern') ? 'linePattern' : 'line';\n\n let prevTileZoom;\n let firstTile = true;\n\n for (const coord of coords) {\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n\n const programConfiguration = bucket.programConfigurations.get(layer.id);\n const prevProgram = painter.context.program.get();\n const program = painter.useProgram(programId, programConfiguration);\n const programChanged = firstTile || program.program !== prevProgram;\n const tileRatioChanged = prevTileZoom !== tile.tileID.overscaledZ;\n\n if (programChanged) {\n programConfiguration.setUniforms(painter.context, program, layer.paint, {zoom: painter.transform.zoom});\n }\n drawLineTile(program, painter, tile, bucket, layer, coord, programConfiguration, programChanged, tileRatioChanged);\n prevTileZoom = tile.tileID.overscaledZ;\n firstTile = false;\n }\n};\n\nfunction drawLineTile(program, painter, tile, bucket, layer, coord, programConfiguration, programChanged, tileRatioChanged) {\n const context = painter.context;\n const gl = context.gl;\n const dasharray = layer.paint.get('line-dasharray');\n const image = layer.paint.get('line-pattern');\n\n let posA, posB, imagePosA, imagePosB;\n\n if (programChanged || tileRatioChanged) {\n const tileRatio = 1 / pixelsToTileUnits(tile, 1, painter.transform.tileZoom);\n\n if (dasharray) {\n posA = painter.lineAtlas.getDash(dasharray.from, layer.layout.get('line-cap') === 'round');\n posB = painter.lineAtlas.getDash(dasharray.to, layer.layout.get('line-cap') === 'round');\n\n const widthA = posA.width * dasharray.fromScale;\n const widthB = posB.width * dasharray.toScale;\n\n gl.uniform2f(program.uniforms.u_patternscale_a, tileRatio / widthA, -posA.height / 2);\n gl.uniform2f(program.uniforms.u_patternscale_b, tileRatio / widthB, -posB.height / 2);\n gl.uniform1f(program.uniforms.u_sdfgamma, painter.lineAtlas.width / (Math.min(widthA, widthB) * 256 * browser.devicePixelRatio) / 2);\n\n } else if (image) {\n imagePosA = painter.imageManager.getPattern(image.from);\n imagePosB = painter.imageManager.getPattern(image.to);\n if (!imagePosA || !imagePosB) return;\n\n gl.uniform2f(program.uniforms.u_pattern_size_a, imagePosA.displaySize[0] * image.fromScale / tileRatio, imagePosB.displaySize[1]);\n gl.uniform2f(program.uniforms.u_pattern_size_b, imagePosB.displaySize[0] * image.toScale / tileRatio, imagePosB.displaySize[1]);\n\n const {width, height} = painter.imageManager.getPixelSize();\n gl.uniform2fv(program.uniforms.u_texsize, [width, height]);\n }\n\n gl.uniform2f(program.uniforms.u_gl_units_to_pixels, 1 / painter.transform.pixelsToGLUnits[0], 1 / painter.transform.pixelsToGLUnits[1]);\n }\n\n if (programChanged) {\n\n if (dasharray) {\n gl.uniform1i(program.uniforms.u_image, 0);\n context.activeTexture.set(gl.TEXTURE0);\n painter.lineAtlas.bind(context);\n\n gl.uniform1f(program.uniforms.u_tex_y_a, (posA ).y);\n gl.uniform1f(program.uniforms.u_tex_y_b, (posB ).y);\n gl.uniform1f(program.uniforms.u_mix, dasharray.t);\n\n } else if (image) {\n gl.uniform1i(program.uniforms.u_image, 0);\n context.activeTexture.set(gl.TEXTURE0);\n painter.imageManager.bind(context);\n\n gl.uniform2fv(program.uniforms.u_pattern_tl_a, (imagePosA ).tl);\n gl.uniform2fv(program.uniforms.u_pattern_br_a, (imagePosA ).br);\n gl.uniform2fv(program.uniforms.u_pattern_tl_b, (imagePosB ).tl);\n gl.uniform2fv(program.uniforms.u_pattern_br_b, (imagePosB ).br);\n gl.uniform1f(program.uniforms.u_fade, image.t);\n }\n }\n\n context.setStencilMode(painter.stencilModeForClipping(coord));\n\n const posMatrix = painter.translatePosMatrix(coord.posMatrix, tile, layer.paint.get('line-translate'), layer.paint.get('line-translate-anchor'));\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, posMatrix);\n\n gl.uniform1f(program.uniforms.u_ratio, 1 / pixelsToTileUnits(tile, 1, painter.transform.zoom));\n\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n bucket.layoutVertexBuffer,\n bucket.indexBuffer,\n bucket.segments,\n programConfiguration);\n}\n","// \n\nconst util = require('../util/util');\nconst ImageSource = require('../source/image_source');\nconst browser = require('../util/browser');\nconst StencilMode = require('../gl/stencil_mode');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n\nmodule.exports = drawRaster;\n\nfunction drawRaster(painter , sourceCache , layer , coords ) {\n if (painter.renderPass !== 'translucent') return;\n if (layer.paint.get('raster-opacity') === 0) return;\n\n const context = painter.context;\n const gl = context.gl;\n const source = sourceCache.getSource();\n const program = painter.useProgram('raster');\n\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n // Constant parameters.\n gl.uniform1f(program.uniforms.u_brightness_low, layer.paint.get('raster-brightness-min'));\n gl.uniform1f(program.uniforms.u_brightness_high, layer.paint.get('raster-brightness-max'));\n gl.uniform1f(program.uniforms.u_saturation_factor, saturationFactor(layer.paint.get('raster-saturation')));\n gl.uniform1f(program.uniforms.u_contrast_factor, contrastFactor(layer.paint.get('raster-contrast')));\n gl.uniform3fv(program.uniforms.u_spin_weights, spinWeights(layer.paint.get('raster-hue-rotate')));\n gl.uniform1f(program.uniforms.u_buffer_scale, 1);\n gl.uniform1i(program.uniforms.u_image0, 0);\n gl.uniform1i(program.uniforms.u_image1, 1);\n\n const minTileZ = coords.length && coords[0].overscaledZ;\n\n for (const coord of coords) {\n // Set the lower zoom level to sublayer 0, and higher zoom levels to higher sublayers\n // Use gl.LESS to prevent double drawing in areas where tiles overlap.\n context.setDepthMode(painter.depthModeForSublayer(coord.overscaledZ - minTileZ,\n layer.paint.get('raster-opacity') === 1 ? DepthMode.ReadWrite : DepthMode.ReadOnly, gl.LESS));\n\n const tile = sourceCache.getTile(coord);\n const posMatrix = painter.transform.calculatePosMatrix(coord.toUnwrapped());\n\n tile.registerFadeDuration(layer.paint.get('raster-fade-duration'));\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, posMatrix);\n\n const parentTile = sourceCache.findLoadedParent(coord, 0, {}),\n fade = getFadeValues(tile, parentTile, sourceCache, layer, painter.transform);\n\n let parentScaleBy, parentTL;\n\n context.activeTexture.set(gl.TEXTURE0);\n tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n\n context.activeTexture.set(gl.TEXTURE1);\n\n if (parentTile) {\n parentTile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n parentScaleBy = Math.pow(2, parentTile.tileID.overscaledZ - tile.tileID.overscaledZ);\n parentTL = [tile.tileID.canonical.x * parentScaleBy % 1, tile.tileID.canonical.y * parentScaleBy % 1];\n\n } else {\n tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n }\n\n // cross-fade parameters\n gl.uniform2fv(program.uniforms.u_tl_parent, parentTL || [0, 0]);\n gl.uniform1f(program.uniforms.u_scale_parent, parentScaleBy || 1);\n gl.uniform1f(program.uniforms.u_fade_t, fade.mix);\n gl.uniform1f(program.uniforms.u_opacity, fade.opacity * layer.paint.get('raster-opacity'));\n\n\n if (source instanceof ImageSource) {\n const buffer = source.boundsBuffer;\n const vao = source.boundsVAO;\n vao.bind(context, program, buffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, buffer.length);\n } else if (tile.maskedBoundsBuffer && tile.maskedIndexBuffer && tile.segments) {\n program.draw(\n context,\n gl.TRIANGLES,\n layer.id,\n tile.maskedBoundsBuffer,\n tile.maskedIndexBuffer,\n tile.segments\n );\n } else {\n const buffer = painter.rasterBoundsBuffer;\n const vao = painter.rasterBoundsVAO;\n vao.bind(context, program, buffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, buffer.length);\n }\n }\n}\n\nfunction spinWeights(angle) {\n angle *= Math.PI / 180;\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n return [\n (2 * c + 1) / 3,\n (-Math.sqrt(3) * s - c + 1) / 3,\n (Math.sqrt(3) * s - c + 1) / 3\n ];\n}\n\nfunction contrastFactor(contrast) {\n return contrast > 0 ?\n 1 / (1 - contrast) :\n 1 + contrast;\n}\n\nfunction saturationFactor(saturation) {\n return saturation > 0 ?\n 1 - 1 / (1.001 - saturation) :\n -saturation;\n}\n\nfunction getFadeValues(tile, parentTile, sourceCache, layer, transform) {\n const fadeDuration = layer.paint.get('raster-fade-duration');\n\n if (fadeDuration > 0) {\n const now = browser.now();\n const sinceTile = (now - tile.timeAdded) / fadeDuration;\n const sinceParent = parentTile ? (now - parentTile.timeAdded) / fadeDuration : -1;\n\n const source = sourceCache.getSource();\n const idealZ = transform.coveringZoomLevel({\n tileSize: source.tileSize,\n roundZoom: source.roundZoom\n });\n\n // if no parent or parent is older, fade in; if parent is younger, fade out\n const fadeIn = !parentTile || Math.abs(parentTile.tileID.overscaledZ - idealZ) > Math.abs(tile.tileID.overscaledZ - idealZ);\n\n const childOpacity = (fadeIn && tile.refreshedUponExpiration) ? 1 : util.clamp(fadeIn ? sinceTile : 1 - sinceParent, 0, 1);\n\n // we don't crossfade tiles that were just refreshed upon expiring:\n // once they're old enough to pass the crossfading threshold\n // (fadeDuration), unset the `refreshedUponExpiration` flag so we don't\n // incorrectly fail to crossfade them when zooming\n if (tile.refreshedUponExpiration && sinceTile >= 1) tile.refreshedUponExpiration = false;\n\n if (parentTile) {\n return {\n opacity: 1,\n mix: 1 - childOpacity\n };\n } else {\n return {\n opacity: childOpacity,\n mix: 0\n };\n }\n } else {\n return {\n opacity: 1,\n mix: 0\n };\n }\n}\n","// \n\nconst drawCollisionDebug = require('./draw_collision_debug');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst symbolProjection = require('../symbol/projection');\nconst symbolSize = require('../symbol/symbol_size');\nconst mat4 = require('@mapbox/gl-matrix').mat4;\nconst identityMat4 = mat4.identity(new Float32Array(16));\nconst symbolLayoutProperties = require('../style/style_layer/symbol_style_layer_properties').layout;\nconst browser = require('../util/browser');\nconst StencilMode = require('../gl/stencil_mode');\nconst DepthMode = require('../gl/depth_mode');\n\n \n \n \n \n \n\nmodule.exports = drawSymbols;\n\nfunction drawSymbols(painter , sourceCache , layer , coords ) {\n if (painter.renderPass !== 'translucent') return;\n\n const context = painter.context;\n\n // Disable the stencil test so that labels aren't clipped to tile boundaries.\n context.setStencilMode(StencilMode.disabled);\n context.setColorMode(painter.colorModeForRenderPass());\n\n if (layer.paint.get('icon-opacity').constantOr(1) !== 0) {\n drawLayerSymbols(painter, sourceCache, layer, coords, false,\n layer.paint.get('icon-translate'),\n layer.paint.get('icon-translate-anchor'),\n layer.layout.get('icon-rotation-alignment'),\n layer.layout.get('icon-pitch-alignment'),\n layer.layout.get('icon-keep-upright')\n );\n }\n\n if (layer.paint.get('text-opacity').constantOr(1) !== 0) {\n drawLayerSymbols(painter, sourceCache, layer, coords, true,\n layer.paint.get('text-translate'),\n layer.paint.get('text-translate-anchor'),\n layer.layout.get('text-rotation-alignment'),\n layer.layout.get('text-pitch-alignment'),\n layer.layout.get('text-keep-upright')\n );\n }\n\n if (sourceCache.map.showCollisionBoxes) {\n drawCollisionDebug(painter, sourceCache, layer, coords);\n }\n}\n\nfunction drawLayerSymbols(painter, sourceCache, layer, coords, isText, translate, translateAnchor,\n rotationAlignment, pitchAlignment, keepUpright) {\n\n const context = painter.context;\n const gl = context.gl;\n const tr = painter.transform;\n\n const rotateWithMap = rotationAlignment === 'map';\n const pitchWithMap = pitchAlignment === 'map';\n const alongLine = rotateWithMap && layer.layout.get('symbol-placement') === 'line';\n // Line label rotation happens in `updateLineLabels`\n // Pitched point labels are automatically rotated by the labelPlaneMatrix projection\n // Unpitched point labels need to have their rotation applied after projection\n const rotateInShader = rotateWithMap && !pitchWithMap && !alongLine;\n\n const depthOn = pitchWithMap;\n\n context.setDepthMode(depthOn ? painter.depthModeForSublayer(0, DepthMode.ReadOnly) : DepthMode.disabled);\n\n let program;\n\n for (const coord of coords) {\n const tile = sourceCache.getTile(coord);\n const bucket = (tile.getBucket(layer) );\n if (!bucket) continue;\n const buffers = isText ? bucket.text : bucket.icon;\n if (!buffers || !buffers.segments.get().length) continue;\n const programConfiguration = buffers.programConfigurations.get(layer.id);\n\n const isSDF = isText || bucket.sdfIcons;\n\n const sizeData = isText ? bucket.textSizeData : bucket.iconSizeData;\n\n if (!program) {\n program = painter.useProgram(isSDF ? 'symbolSDF' : 'symbolIcon', programConfiguration);\n programConfiguration.setUniforms(painter.context, program, layer.paint, {zoom: painter.transform.zoom});\n\n setSymbolDrawState(program, painter, layer, isText, rotateInShader, pitchWithMap, sizeData);\n }\n\n context.activeTexture.set(gl.TEXTURE0);\n gl.uniform1i(program.uniforms.u_texture, 0);\n\n if (isText) {\n tile.glyphAtlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n gl.uniform2fv(program.uniforms.u_texsize, tile.glyphAtlasTexture.size);\n } else {\n const iconScaled = layer.layout.get('icon-size').constantOr(0) !== 1 || bucket.iconsNeedLinear;\n const iconTransformed = pitchWithMap || tr.pitch !== 0;\n\n tile.iconAtlasTexture.bind(isSDF || painter.options.rotating || painter.options.zooming || iconScaled || iconTransformed ?\n gl.LINEAR : gl.NEAREST, gl.CLAMP_TO_EDGE);\n gl.uniform2fv(program.uniforms.u_texsize, tile.iconAtlasTexture.size);\n }\n\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, painter.translatePosMatrix(coord.posMatrix, tile, translate, translateAnchor));\n\n const s = pixelsToTileUnits(tile, 1, painter.transform.zoom);\n const labelPlaneMatrix = symbolProjection.getLabelPlaneMatrix(coord.posMatrix, pitchWithMap, rotateWithMap, painter.transform, s);\n const glCoordMatrix = symbolProjection.getGlCoordMatrix(coord.posMatrix, pitchWithMap, rotateWithMap, painter.transform, s);\n gl.uniformMatrix4fv(program.uniforms.u_gl_coord_matrix, false, painter.translatePosMatrix(glCoordMatrix, tile, translate, translateAnchor, true));\n\n if (alongLine) {\n gl.uniformMatrix4fv(program.uniforms.u_label_plane_matrix, false, identityMat4);\n symbolProjection.updateLineLabels(bucket, coord.posMatrix, painter, isText, labelPlaneMatrix, glCoordMatrix, pitchWithMap, keepUpright);\n } else {\n gl.uniformMatrix4fv(program.uniforms.u_label_plane_matrix, false, labelPlaneMatrix);\n }\n\n gl.uniform1f(program.uniforms.u_fade_change, painter.options.fadeDuration ? ((browser.now() - bucket.fadeStartTime) / painter.options.fadeDuration) : 1);\n\n drawTileSymbols(program, programConfiguration, painter, layer, tile, buffers, isText, isSDF, pitchWithMap);\n }\n}\n\nfunction setSymbolDrawState(program, painter, layer, isText, rotateInShader, pitchWithMap, sizeData) {\n\n const gl = painter.context.gl;\n const tr = painter.transform;\n\n gl.uniform1i(program.uniforms.u_pitch_with_map, pitchWithMap ? 1 : 0);\n\n gl.uniform1f(program.uniforms.u_is_text, isText ? 1 : 0);\n\n gl.uniform1f(program.uniforms.u_pitch, tr.pitch / 360 * 2 * Math.PI);\n\n const isZoomConstant = sizeData.functionType === 'constant' || sizeData.functionType === 'source';\n const isFeatureConstant = sizeData.functionType === 'constant' || sizeData.functionType === 'camera';\n gl.uniform1i(program.uniforms.u_is_size_zoom_constant, isZoomConstant ? 1 : 0);\n gl.uniform1i(program.uniforms.u_is_size_feature_constant, isFeatureConstant ? 1 : 0);\n\n gl.uniform1f(program.uniforms.u_camera_to_center_distance, tr.cameraToCenterDistance);\n\n const size = symbolSize.evaluateSizeForZoom(sizeData, tr.zoom, symbolLayoutProperties.properties[isText ? 'text-size' : 'icon-size']);\n if (size.uSizeT !== undefined) gl.uniform1f(program.uniforms.u_size_t, size.uSizeT);\n if (size.uSize !== undefined) gl.uniform1f(program.uniforms.u_size, size.uSize);\n\n gl.uniform1f(program.uniforms.u_aspect_ratio, tr.width / tr.height);\n gl.uniform1i(program.uniforms.u_rotate_symbol, rotateInShader ? 1 : 0);\n}\n\nfunction drawTileSymbols(program, programConfiguration, painter, layer, tile, buffers, isText, isSDF, pitchWithMap) {\n\n const context = painter.context;\n const gl = context.gl;\n const tr = painter.transform;\n\n if (isSDF) {\n const hasHalo = layer.paint.get(isText ? 'text-halo-width' : 'icon-halo-width').constantOr(1) !== 0;\n const gammaScale = (pitchWithMap ? Math.cos(tr._pitch) * tr.cameraToCenterDistance : 1);\n gl.uniform1f(program.uniforms.u_gamma_scale, gammaScale);\n\n if (hasHalo) { // Draw halo underneath the text.\n gl.uniform1f(program.uniforms.u_is_halo, 1);\n drawSymbolElements(buffers, layer, context, program);\n }\n\n gl.uniform1f(program.uniforms.u_is_halo, 0);\n }\n\n drawSymbolElements(buffers, layer, context, program);\n}\n\nfunction drawSymbolElements(buffers, layer, context, program) {\n program.draw(\n context,\n context.gl.TRIANGLES,\n layer.id,\n buffers.layoutVertexBuffer,\n buffers.indexBuffer,\n buffers.segments,\n buffers.programConfigurations.get(layer.id),\n buffers.dynamicLayoutVertexBuffer,\n buffers.opacityVertexBuffer);\n}\n","// \n\nconst ShelfPack = require('@mapbox/shelf-pack');\nconst {AlphaImage} = require('../util/image');\n\n \n\nconst padding = 1;\n\n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\nfunction makeGlyphAtlas(stacks ) {\n const image = new AlphaImage({width: 0, height: 0});\n const positions = {};\n\n const pack = new ShelfPack(0, 0, {autoResize: true});\n\n for (const stack in stacks) {\n const glyphs = stacks[stack];\n const stackPositions = positions[stack] = {};\n\n for (const id in glyphs) {\n const src = glyphs[+id];\n if (src && src.bitmap.width !== 0 && src.bitmap.height !== 0) {\n const bin = pack.packOne(\n src.bitmap.width + 2 * padding,\n src.bitmap.height + 2 * padding);\n\n image.resize({\n width: pack.w,\n height: pack.h\n });\n\n AlphaImage.copy(\n src.bitmap,\n image,\n { x: 0, y: 0 },\n {\n x: bin.x + padding,\n y: bin.y + padding\n },\n src.bitmap);\n\n stackPositions[id] = { rect: bin, metrics: src.metrics };\n }\n }\n }\n\n pack.shrink();\n image.resize({\n width: pack.w,\n height: pack.h\n });\n\n return {image, positions};\n}\n\nmodule.exports = {\n makeGlyphAtlas\n};\n","// \n\nconst loadGlyphRange = require('../style/load_glyph_range');\nconst TinySDF = require('@mapbox/tiny-sdf');\nconst isChar = require('../util/is_char_in_unicode_block');\nconst {asyncAll} = require('../util/util');\nconst {AlphaImage} = require('../util/image');\n\n \n \n \n\n \n \n \n \n \n \n\nclass GlyphManager {\n \n \n \n \n\n constructor(requestTransform , localIdeographFontFamily ) {\n this.requestTransform = requestTransform;\n this.localIdeographFontFamily = localIdeographFontFamily;\n this.entries = {};\n }\n\n setURL(url ) {\n this.url = url;\n }\n\n getGlyphs(glyphs , callback ) {\n const all = [];\n\n for (const stack in glyphs) {\n for (const id of glyphs[stack]) {\n all.push({stack, id});\n }\n }\n\n asyncAll(all, ({stack, id}, callback ) => {\n let entry = this.entries[stack];\n if (!entry) {\n entry = this.entries[stack] = {\n glyphs: {},\n requests: {}\n };\n }\n\n let glyph = entry.glyphs[id];\n if (glyph !== undefined) {\n callback(null, {stack, id, glyph});\n return;\n }\n\n glyph = this._tinySDF(entry, stack, id);\n if (glyph) {\n callback(null, {stack, id, glyph});\n return;\n }\n\n const range = Math.floor(id / 256);\n if (range * 256 > 65535) {\n callback(new Error('glyphs > 65535 not supported'));\n return;\n }\n\n let requests = entry.requests[range];\n if (!requests) {\n requests = entry.requests[range] = [];\n loadGlyphRange(stack, range, (this.url ), this.requestTransform,\n (err, response ) => {\n if (response) {\n for (const id in response) {\n entry.glyphs[+id] = response[+id];\n }\n }\n for (const cb of requests) {\n cb(err, response);\n }\n delete entry.requests[range];\n });\n }\n\n requests.push((err, result ) => {\n if (err) {\n callback(err);\n } else if (result) {\n callback(null, {stack, id, glyph: result[id] || null});\n }\n });\n }, (err, glyphs ) => {\n if (err) {\n callback(err);\n } else if (glyphs) {\n const result = {};\n\n for (const {stack, id, glyph} of glyphs) {\n // Clone the glyph so that our own copy of its ArrayBuffer doesn't get transferred.\n (result[stack] || (result[stack] = {}))[id] = glyph && {\n id: glyph.id,\n bitmap: glyph.bitmap.clone(),\n metrics: glyph.metrics\n };\n }\n\n callback(null, result);\n }\n });\n }\n\n _tinySDF(entry , stack , id ) {\n const family = this.localIdeographFontFamily;\n if (!family) {\n return;\n }\n\n if (!isChar['CJK Unified Ideographs'](id) && !isChar['Hangul Syllables'](id)) { // eslint-disable-line new-cap\n return;\n }\n\n let tinySDF = entry.tinySDF;\n if (!tinySDF) {\n let fontWeight = '400';\n if (/bold/i.test(stack)) {\n fontWeight = '900';\n } else if (/medium/i.test(stack)) {\n fontWeight = '500';\n } else if (/light/i.test(stack)) {\n fontWeight = '200';\n }\n tinySDF = entry.tinySDF = new TinySDF(24, 3, 8, .25, family, fontWeight);\n }\n\n return {\n id,\n bitmap: new AlphaImage({width: 30, height: 30}, tinySDF.draw(String.fromCharCode(id))),\n metrics: {\n width: 24,\n height: 24,\n left: 0,\n top: -8,\n advance: 24\n }\n };\n }\n}\n\nmodule.exports = GlyphManager;\n","// \n\nconst ShelfPack = require('@mapbox/shelf-pack');\nconst {RGBAImage} = require('../util/image');\n\n \n\nconst padding = 1;\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n// This wants to be a class, but is sent to workers, so must be a plain JSON blob.\nfunction imagePosition(rect , {pixelRatio} ) {\n const textureRect = {\n x: rect.x + padding,\n y: rect.y + padding,\n w: rect.w - padding * 2,\n h: rect.h - padding * 2\n };\n return {\n pixelRatio,\n textureRect,\n\n // Redundant calculated members.\n tl: [\n textureRect.x,\n textureRect.y\n ],\n br: [\n textureRect.x + textureRect.w,\n textureRect.y + textureRect.h\n ],\n displaySize: [\n textureRect.w / pixelRatio,\n textureRect.h / pixelRatio\n ]\n };\n}\n\n \n \n \n \n\nfunction makeImageAtlas(images ) {\n const image = new RGBAImage({width: 0, height: 0});\n const positions = {};\n\n const pack = new ShelfPack(0, 0, {autoResize: true});\n\n for (const id in images) {\n const src = images[id];\n\n const bin = pack.packOne(\n src.data.width + 2 * padding,\n src.data.height + 2 * padding);\n\n image.resize({\n width: pack.w,\n height: pack.h\n });\n\n RGBAImage.copy(\n src.data,\n image,\n { x: 0, y: 0 },\n {\n x: bin.x + padding,\n y: bin.y + padding\n },\n src.data);\n\n positions[id] = imagePosition(bin, src);\n }\n\n pack.shrink();\n image.resize({\n width: pack.w,\n height: pack.h\n });\n\n return {image, positions};\n}\n\nmodule.exports = {\n imagePosition,\n makeImageAtlas\n};\n","// \n\nconst ShelfPack = require('@mapbox/shelf-pack');\nconst {RGBAImage} = require('../util/image');\nconst {imagePosition} = require('./image_atlas');\nconst Texture = require('./texture');\nconst assert = require('assert');\n\n \n \n \n \n \n\n \n \n \n \n\n// When copied into the atlas texture, image data is padded by one pixel on each side. Icon\n// images are padded with fully transparent pixels, while pattern images are padded with a\n// copy of the image data wrapped from the opposite side. In both cases, this ensures the\n// correct behavior of GL_LINEAR texture sampling mode.\nconst padding = 1;\n\n/*\n ImageManager does two things:\n\n 1. Tracks requests for icon images from tile workers and sends responses when the requests are fulfilled.\n 2. Builds a texture atlas for pattern images.\n\n These are disparate responsibilities and should eventually be handled by different classes. When we implement\n data-driven support for `*-pattern`, we'll likely use per-bucket pattern atlases, and that would be a good time\n to refactor this.\n*/\nclass ImageManager {\n \n \n \n\n \n \n \n \n \n\n constructor() {\n this.images = {};\n this.loaded = false;\n this.requestors = [];\n\n this.shelfPack = new ShelfPack(64, 64, {autoResize: true});\n this.patterns = {};\n this.atlasImage = new RGBAImage({width: 64, height: 64});\n this.dirty = true;\n }\n\n isLoaded() {\n return this.loaded;\n }\n\n setLoaded(loaded ) {\n if (this.loaded === loaded) {\n return;\n }\n\n this.loaded = loaded;\n\n if (loaded) {\n for (const {ids, callback} of this.requestors) {\n this._notify(ids, callback);\n }\n this.requestors = [];\n }\n }\n\n getImage(id ) {\n return this.images[id];\n }\n\n addImage(id , image ) {\n assert(!this.images[id]);\n this.images[id] = image;\n }\n\n removeImage(id ) {\n assert(this.images[id]);\n delete this.images[id];\n\n const pattern = this.patterns[id];\n if (pattern) {\n this.shelfPack.unref(pattern.bin);\n delete this.patterns[id];\n }\n }\n\n getImages(ids , callback ) {\n // If the sprite has been loaded, or if all the icon dependencies are already present\n // (i.e. if they've been addeded via runtime styling), then notify the requestor immediately.\n // Otherwise, delay notification until the sprite is loaded. At that point, if any of the\n // dependencies are still unavailable, we'll just assume they are permanently missing.\n let hasAllDependencies = true;\n if (!this.isLoaded()) {\n for (const id of ids) {\n if (!this.images[id]) {\n hasAllDependencies = false;\n }\n }\n }\n if (this.isLoaded() || hasAllDependencies) {\n this._notify(ids, callback);\n } else {\n this.requestors.push({ids, callback});\n }\n }\n\n _notify(ids , callback ) {\n const response = {};\n\n for (const id of ids) {\n const image = this.images[id];\n if (image) {\n // Clone the image so that our own copy of its ArrayBuffer doesn't get transferred.\n response[id] = {\n data: image.data.clone(),\n pixelRatio: image.pixelRatio,\n sdf: image.sdf\n };\n }\n }\n\n callback(null, response);\n }\n\n // Pattern stuff\n\n getPixelSize() {\n return {\n width: this.shelfPack.w,\n height: this.shelfPack.h\n };\n }\n\n getPattern(id ) {\n const pattern = this.patterns[id];\n if (pattern) {\n return pattern.position;\n }\n\n const image = this.getImage(id);\n if (!image) {\n return null;\n }\n\n const width = image.data.width + padding * 2;\n const height = image.data.height + padding * 2;\n\n const bin = this.shelfPack.packOne(width, height);\n if (!bin) {\n return null;\n }\n\n this.atlasImage.resize(this.getPixelSize());\n\n const src = image.data;\n const dst = this.atlasImage;\n\n const x = bin.x + padding;\n const y = bin.y + padding;\n const w = src.width;\n const h = src.height;\n\n RGBAImage.copy(src, dst, { x: 0, y: 0 }, { x, y }, { width: w, height: h });\n\n // Add 1 pixel wrapped padding on each side of the image.\n RGBAImage.copy(src, dst, { x: 0, y: h - 1 }, { x: x, y: y - 1 }, { width: w, height: 1 }); // T\n RGBAImage.copy(src, dst, { x: 0, y: 0 }, { x: x, y: y + h }, { width: w, height: 1 }); // B\n RGBAImage.copy(src, dst, { x: w - 1, y: 0 }, { x: x - 1, y: y }, { width: 1, height: h }); // L\n RGBAImage.copy(src, dst, { x: 0, y: 0 }, { x: x + w, y: y }, { width: 1, height: h }); // R\n\n this.dirty = true;\n\n const position = imagePosition(bin, image);\n this.patterns[id] = { bin, position };\n return position;\n }\n\n bind(context ) {\n const gl = context.gl;\n if (!this.atlasTexture) {\n this.atlasTexture = new Texture(context, this.atlasImage, gl.RGBA);\n } else if (this.dirty) {\n this.atlasTexture.update(this.atlasImage);\n this.dirty = false;\n }\n\n this.atlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n }\n}\n\nmodule.exports = ImageManager;\n","// \n\nconst util = require('../util/util');\n\n \n\n/**\n * A LineAtlas lets us reuse rendered dashed lines\n * by writing many of them to a texture and then fetching their positions\n * using .getDash.\n *\n * @param {number} width\n * @param {number} height\n * @private\n */\nclass LineAtlas {\n \n \n \n \n \n \n \n \n\n constructor(width , height ) {\n this.width = width;\n this.height = height;\n this.nextRow = 0;\n\n this.bytes = 4;\n this.data = new Uint8Array(this.width * this.height * this.bytes);\n\n this.positions = {};\n }\n\n /**\n * Get or create a dash line pattern.\n *\n * @param {Array<number>} dasharray\n * @param {boolean} round whether to add circle caps in between dash segments\n * @returns {Object} position of dash texture in { y, height, width }\n * @private\n */\n getDash(dasharray , round ) {\n const key = dasharray.join(\",\") + String(round);\n\n if (!this.positions[key]) {\n this.positions[key] = this.addDash(dasharray, round);\n }\n return this.positions[key];\n }\n\n addDash(dasharray , round ) {\n\n const n = round ? 7 : 0;\n const height = 2 * n + 1;\n const offset = 128;\n\n if (this.nextRow + height > this.height) {\n util.warnOnce('LineAtlas out of space');\n return null;\n }\n\n let length = 0;\n for (let i = 0; i < dasharray.length; i++) {\n length += dasharray[i];\n }\n\n const stretch = this.width / length;\n const halfWidth = stretch / 2;\n\n // If dasharray has an odd length, both the first and last parts\n // are dashes and should be joined seamlessly.\n const oddLength = dasharray.length % 2 === 1;\n\n for (let y = -n; y <= n; y++) {\n const row = this.nextRow + n + y;\n const index = this.width * row;\n\n let left = oddLength ? -dasharray[dasharray.length - 1] : 0;\n let right = dasharray[0];\n let partIndex = 1;\n\n for (let x = 0; x < this.width; x++) {\n\n while (right < x / stretch) {\n left = right;\n right = right + dasharray[partIndex];\n\n if (oddLength && partIndex === dasharray.length - 1) {\n right += dasharray[0];\n }\n\n partIndex++;\n }\n\n const distLeft = Math.abs(x - left * stretch);\n const distRight = Math.abs(x - right * stretch);\n const dist = Math.min(distLeft, distRight);\n const inside = (partIndex % 2) === 1;\n let signedDistance;\n\n if (round) {\n // Add circle caps\n const distMiddle = n ? y / n * (halfWidth + 1) : 0;\n if (inside) {\n const distEdge = halfWidth - Math.abs(distMiddle);\n signedDistance = Math.sqrt(dist * dist + distEdge * distEdge);\n } else {\n signedDistance = halfWidth - Math.sqrt(dist * dist + distMiddle * distMiddle);\n }\n } else {\n signedDistance = (inside ? 1 : -1) * dist;\n }\n\n this.data[3 + (index + x) * 4] = Math.max(0, Math.min(255, signedDistance + offset));\n }\n }\n\n const pos = {\n y: (this.nextRow + n + 0.5) / this.height,\n height: 2 * n / this.height,\n width: length\n };\n\n this.nextRow += height;\n this.dirty = true;\n\n return pos;\n }\n\n bind(context ) {\n const gl = context.gl;\n if (!this.texture) {\n this.texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.data);\n\n } else {\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n\n if (this.dirty) {\n this.dirty = false;\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, this.width, this.height, gl.RGBA, gl.UNSIGNED_BYTE, this.data);\n }\n }\n }\n}\n\nmodule.exports = LineAtlas;\n","// \n\nconst browser = require('../util/browser');\nconst mat4 = require('@mapbox/gl-matrix').mat4;\nconst SourceCache = require('../source/source_cache');\nconst EXTENT = require('../data/extent');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst util = require('../util/util');\nconst VertexArrayObject = require('./vertex_array_object');\nconst {RasterBoundsArray, PosArray} = require('../data/array_types');\nconst rasterBoundsAttributes = require('../data/raster_bounds_attributes');\nconst posAttributes = require('../data/pos_attributes');\nconst {ProgramConfiguration} = require('../data/program_configuration');\nconst CrossTileSymbolIndex = require('../symbol/cross_tile_symbol_index');\nconst shaders = require('../shaders');\nconst Program = require('./program');\nconst Context = require('../gl/context');\nconst DepthMode = require('../gl/depth_mode');\nconst StencilMode = require('../gl/stencil_mode');\nconst ColorMode = require('../gl/color_mode');\nconst Texture = require('./texture');\nconst updateTileMasks = require('./tile_mask');\nconst Color = require('../style-spec/util/color');\n\nconst draw = {\n symbol: require('./draw_symbol'),\n circle: require('./draw_circle'),\n heatmap: require('./draw_heatmap'),\n line: require('./draw_line'),\n fill: require('./draw_fill'),\n 'fill-extrusion': require('./draw_fill_extrusion'),\n hillshade: require('./draw_hillshade'),\n raster: require('./draw_raster'),\n background: require('./draw_background'),\n debug: require('./draw_debug')\n};\n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n \n \n \n \n \n\n/**\n * Initialize a new painter object.\n *\n * @param {Canvas} gl an experimental-webgl drawing context\n * @private\n */\nclass Painter {\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n constructor(gl , transform ) {\n this.context = new Context(gl);\n this.transform = transform;\n this._tileTextures = {};\n\n this.setup();\n\n // Within each layer there are multiple distinct z-planes that can be drawn to.\n // This is implemented using the WebGL depth buffer.\n this.numSublayers = SourceCache.maxUnderzooming + SourceCache.maxOverzooming + 1;\n this.depthEpsilon = 1 / Math.pow(2, 16);\n\n this.depthRboNeedsClear = true;\n\n this.emptyProgramConfiguration = new ProgramConfiguration();\n\n this.crossTileSymbolIndex = new CrossTileSymbolIndex();\n }\n\n /*\n * Update the GL viewport, projection matrix, and transforms to compensate\n * for a new width and height value.\n */\n resize(width , height ) {\n const gl = this.context.gl;\n\n this.width = width * browser.devicePixelRatio;\n this.height = height * browser.devicePixelRatio;\n this.context.viewport.set([0, 0, this.width, this.height]);\n\n if (this.style) {\n for (const layerId of this.style._order) {\n this.style._layers[layerId].resize();\n }\n }\n\n if (this.depthRbo) {\n gl.deleteRenderbuffer(this.depthRbo);\n this.depthRbo = null;\n }\n }\n\n setup() {\n const context = this.context;\n\n const tileExtentArray = new PosArray();\n tileExtentArray.emplaceBack(0, 0);\n tileExtentArray.emplaceBack(EXTENT, 0);\n tileExtentArray.emplaceBack(0, EXTENT);\n tileExtentArray.emplaceBack(EXTENT, EXTENT);\n this.tileExtentBuffer = context.createVertexBuffer(tileExtentArray, posAttributes.members);\n this.tileExtentVAO = new VertexArrayObject();\n this.tileExtentPatternVAO = new VertexArrayObject();\n\n const debugArray = new PosArray();\n debugArray.emplaceBack(0, 0);\n debugArray.emplaceBack(EXTENT, 0);\n debugArray.emplaceBack(EXTENT, EXTENT);\n debugArray.emplaceBack(0, EXTENT);\n debugArray.emplaceBack(0, 0);\n this.debugBuffer = context.createVertexBuffer(debugArray, posAttributes.members);\n this.debugVAO = new VertexArrayObject();\n\n const rasterBoundsArray = new RasterBoundsArray();\n rasterBoundsArray.emplaceBack(0, 0, 0, 0);\n rasterBoundsArray.emplaceBack(EXTENT, 0, EXTENT, 0);\n rasterBoundsArray.emplaceBack(0, EXTENT, 0, EXTENT);\n rasterBoundsArray.emplaceBack(EXTENT, EXTENT, EXTENT, EXTENT);\n this.rasterBoundsBuffer = context.createVertexBuffer(rasterBoundsArray, rasterBoundsAttributes.members);\n this.rasterBoundsVAO = new VertexArrayObject();\n\n const viewportArray = new PosArray();\n viewportArray.emplaceBack(0, 0);\n viewportArray.emplaceBack(1, 0);\n viewportArray.emplaceBack(0, 1);\n viewportArray.emplaceBack(1, 1);\n this.viewportBuffer = context.createVertexBuffer(viewportArray, posAttributes.members);\n this.viewportVAO = new VertexArrayObject();\n }\n\n /*\n * Reset the drawing canvas by clearing the stencil buffer so that we can draw\n * new tiles at the same location, while retaining previously drawn pixels.\n */\n clearStencil() {\n const context = this.context;\n const gl = context.gl;\n\n // As a temporary workaround for https://github.com/mapbox/mapbox-gl-js/issues/5490,\n // pending an upstream fix, we draw a fullscreen stencil=0 clipping mask here,\n // effectively clearing the stencil buffer: once an upstream patch lands, remove\n // this function in favor of context.clear({ stencil: 0x0 })\n\n context.setColorMode(ColorMode.disabled);\n context.setDepthMode(DepthMode.disabled);\n context.setStencilMode(new StencilMode({ func: gl.ALWAYS, mask: 0 }, 0x0, 0xFF, gl.ZERO, gl.ZERO, gl.ZERO));\n\n const matrix = mat4.create();\n mat4.ortho(matrix, 0, this.width, this.height, 0, 0, 1);\n mat4.scale(matrix, matrix, [gl.drawingBufferWidth, gl.drawingBufferHeight, 0]);\n\n const program = this.useProgram('fill', ProgramConfiguration.forTileClippingMask());\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, matrix);\n\n this.viewportVAO.bind(context, program, this.viewportBuffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n }\n\n _renderTileClippingMasks(tileIDs ) {\n const context = this.context;\n const gl = context.gl;\n\n context.setColorMode(ColorMode.disabled);\n context.setDepthMode(DepthMode.disabled);\n\n let idNext = 1;\n this._tileClippingMaskIDs = {};\n const programConfiguration = ProgramConfiguration.forTileClippingMask();\n\n for (const tileID of tileIDs) {\n const id = this._tileClippingMaskIDs[tileID.key] = idNext++;\n\n // Tests will always pass, and ref value will be written to stencil buffer.\n context.setStencilMode(new StencilMode({ func: gl.ALWAYS, mask: 0 }, id, 0xFF, gl.KEEP, gl.KEEP, gl.REPLACE));\n\n const program = this.useProgram('fill', programConfiguration);\n gl.uniformMatrix4fv(program.uniforms.u_matrix, false, tileID.posMatrix);\n\n // Draw the clipping mask\n this.tileExtentVAO.bind(this.context, program, this.tileExtentBuffer, []);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, this.tileExtentBuffer.length);\n }\n }\n\n stencilModeForClipping(tileID ) {\n const gl = this.context.gl;\n return new StencilMode({ func: gl.EQUAL, mask: 0xFF }, this._tileClippingMaskIDs[tileID.key], 0x00, gl.KEEP, gl.KEEP, gl.REPLACE);\n }\n\n colorModeForRenderPass() {\n const gl = this.context.gl;\n if (this._showOverdrawInspector) {\n const numOverdrawSteps = 8;\n const a = 1 / numOverdrawSteps;\n\n return new ColorMode([gl.CONSTANT_COLOR, gl.ONE], new Color(a, a, a, 0), [true, true, true, true]);\n } else if (this.renderPass === 'opaque') {\n return ColorMode.unblended;\n } else {\n return ColorMode.alphaBlended;\n }\n }\n\n depthModeForSublayer(n , mask , func ) {\n const farDepth = 1 - ((1 + this.currentLayer) * this.numSublayers + n) * this.depthEpsilon;\n const nearDepth = farDepth - 1 + this.depthRange;\n return new DepthMode(func || this.context.gl.LEQUAL, mask, [nearDepth, farDepth]);\n }\n\n render(style , options ) {\n this.style = style;\n this.options = options;\n\n this.lineAtlas = style.lineAtlas;\n this.imageManager = style.imageManager;\n this.glyphManager = style.glyphManager;\n\n for (const id in style.sourceCaches) {\n const sourceCache = this.style.sourceCaches[id];\n if (sourceCache.used) {\n sourceCache.prepare(this.context);\n }\n }\n\n const layerIds = this.style._order;\n\n const rasterSources = util.filterObject(this.style.sourceCaches, (sc) => { return sc.getSource().type === 'raster' || sc.getSource().type === 'raster-dem'; });\n for (const key in rasterSources) {\n const sourceCache = rasterSources[key];\n const coords = sourceCache.getVisibleCoordinates();\n const visibleTiles = coords.map((c)=>{ return sourceCache.getTile(c); });\n updateTileMasks(visibleTiles, this.context);\n }\n\n // Offscreen pass\n // We first do all rendering that requires rendering to a separate\n // framebuffer, and then save those for rendering back to the map\n // later: in doing this we avoid doing expensive framebuffer restores.\n this.renderPass = 'offscreen';\n {\n let sourceCache;\n let coords = [];\n this.depthRboNeedsClear = true;\n\n for (let i = 0; i < layerIds.length; i++) {\n const layer = this.style._layers[layerIds[i]];\n\n if (!layer.hasOffscreenPass() || layer.isHidden(this.transform.zoom)) continue;\n\n if (layer.source !== (sourceCache && sourceCache.id)) {\n sourceCache = this.style.sourceCaches[layer.source];\n coords = [];\n\n if (sourceCache) {\n coords = sourceCache.getVisibleCoordinates();\n coords.reverse();\n }\n }\n\n if (!coords.length) continue;\n\n this.renderLayer(this, (sourceCache ), layer, coords);\n }\n\n // Rebind the main framebuffer now that all offscreen layers\n // have been rendered:\n this.context.bindFramebuffer.set(null);\n }\n\n // Clear buffers in preparation for drawing to the main framebuffer\n this.context.clear({ color: options.showOverdrawInspector ? Color.black : Color.transparent, depth: 1 });\n\n this._showOverdrawInspector = options.showOverdrawInspector;\n\n this.depthRange = (style._order.length + 2) * this.numSublayers * this.depthEpsilon;\n\n // Opaque pass\n // Draw opaque layers top-to-bottom first.\n this.renderPass = 'opaque';\n {\n let sourceCache;\n let coords = [];\n\n this.currentLayer = layerIds.length - 1;\n\n for (this.currentLayer; this.currentLayer >= 0; this.currentLayer--) {\n const layer = this.style._layers[layerIds[this.currentLayer]];\n\n if (layer.source !== (sourceCache && sourceCache.id)) {\n sourceCache = this.style.sourceCaches[layer.source];\n coords = [];\n\n if (sourceCache) {\n this.clearStencil();\n coords = sourceCache.getVisibleCoordinates();\n if (sourceCache.getSource().isTileClipped) {\n this._renderTileClippingMasks(coords);\n }\n }\n }\n\n this.renderLayer(this, (sourceCache ), layer, coords);\n }\n }\n\n // Translucent pass\n // Draw all other layers bottom-to-top.\n this.renderPass = 'translucent';\n {\n let sourceCache;\n let coords = [];\n\n this.currentLayer = 0;\n\n for (this.currentLayer; this.currentLayer < layerIds.length; this.currentLayer++) {\n const layer = this.style._layers[layerIds[this.currentLayer]];\n\n if (layer.source !== (sourceCache && sourceCache.id)) {\n sourceCache = this.style.sourceCaches[layer.source];\n coords = [];\n\n if (sourceCache) {\n this.clearStencil();\n coords = sourceCache.getVisibleCoordinates();\n if (sourceCache.getSource().isTileClipped) {\n this._renderTileClippingMasks(coords);\n }\n }\n\n coords.reverse();\n }\n\n this.renderLayer(this, (sourceCache ), layer, coords);\n }\n }\n\n if (this.options.showTileBoundaries) {\n const sourceCache = this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];\n if (sourceCache) {\n draw.debug(this, sourceCache, sourceCache.getVisibleCoordinates());\n }\n }\n }\n\n setupOffscreenDepthRenderbuffer() {\n const context = this.context;\n // All of the 3D textures will use the same depth renderbuffer.\n if (!this.depthRbo) {\n this.depthRbo = context.createRenderbuffer(context.gl.DEPTH_COMPONENT16, this.width, this.height);\n }\n }\n\n renderLayer(painter , sourceCache , layer , coords ) {\n if (layer.isHidden(this.transform.zoom)) return;\n if (layer.type !== 'background' && !coords.length) return;\n this.id = layer.id;\n\n draw[layer.type](painter, sourceCache, layer, coords);\n }\n\n /**\n * Transform a matrix to incorporate the *-translate and *-translate-anchor properties into it.\n * @param inViewportPixelUnitsUnits True when the units accepted by the matrix are in viewport pixels instead of tile units.\n * @returns {Float32Array} matrix\n */\n translatePosMatrix(matrix , tile , translate , translateAnchor , inViewportPixelUnitsUnits ) {\n if (!translate[0] && !translate[1]) return matrix;\n\n const angle = inViewportPixelUnitsUnits ?\n (translateAnchor === 'map' ? this.transform.angle : 0) :\n (translateAnchor === 'viewport' ? -this.transform.angle : 0);\n\n if (angle) {\n const sinA = Math.sin(angle);\n const cosA = Math.cos(angle);\n translate = [\n translate[0] * cosA - translate[1] * sinA,\n translate[0] * sinA + translate[1] * cosA\n ];\n }\n\n const translation = [\n inViewportPixelUnitsUnits ? translate[0] : pixelsToTileUnits(tile, translate[0], this.transform.zoom),\n inViewportPixelUnitsUnits ? translate[1] : pixelsToTileUnits(tile, translate[1], this.transform.zoom),\n 0\n ];\n\n const translatedMatrix = new Float32Array(16);\n mat4.translate(translatedMatrix, matrix, translation);\n return translatedMatrix;\n }\n\n saveTileTexture(texture ) {\n const textures = this._tileTextures[texture.size[0]];\n if (!textures) {\n this._tileTextures[texture.size[0]] = [texture];\n } else {\n textures.push(texture);\n }\n }\n\n getTileTexture(size ) {\n const textures = this._tileTextures[size];\n return textures && textures.length > 0 ? textures.pop() : null;\n }\n\n _createProgramCached(name , programConfiguration ) {\n this.cache = this.cache || {};\n const key = `${name}${programConfiguration.cacheKey || ''}${this._showOverdrawInspector ? '/overdraw' : ''}`;\n if (!this.cache[key]) {\n this.cache[key] = new Program(this.context, shaders[name], programConfiguration, this._showOverdrawInspector);\n }\n return this.cache[key];\n }\n\n useProgram(name , programConfiguration ) {\n const nextProgram = this._createProgramCached(name, programConfiguration || this.emptyProgramConfiguration);\n\n this.context.program.set(nextProgram.program);\n\n return nextProgram;\n }\n}\n\nmodule.exports = Painter;\n","// \n\nconst assert = require('assert');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\n\n \n \n \n \n\n/**\n * Checks whether a pattern image is needed, and if it is, whether it is not loaded.\n *\n * @returns true if a needed image is missing and rendering needs to be skipped.\n */\nexports.isPatternMissing = function(image , painter ) {\n if (!image) return false;\n const imagePosA = painter.imageManager.getPattern(image.from);\n const imagePosB = painter.imageManager.getPattern(image.to);\n return !imagePosA || !imagePosB;\n};\n\nexports.prepare = function (image , painter , program ) {\n const context = painter.context;\n const gl = context.gl;\n\n const imagePosA = painter.imageManager.getPattern(image.from);\n const imagePosB = painter.imageManager.getPattern(image.to);\n assert(imagePosA && imagePosB);\n\n gl.uniform1i(program.uniforms.u_image, 0);\n gl.uniform2fv(program.uniforms.u_pattern_tl_a, (imagePosA ).tl);\n gl.uniform2fv(program.uniforms.u_pattern_br_a, (imagePosA ).br);\n gl.uniform2fv(program.uniforms.u_pattern_tl_b, (imagePosB ).tl);\n gl.uniform2fv(program.uniforms.u_pattern_br_b, (imagePosB ).br);\n const {width, height} = painter.imageManager.getPixelSize();\n gl.uniform2fv(program.uniforms.u_texsize, [width, height]);\n gl.uniform1f(program.uniforms.u_mix, image.t);\n gl.uniform2fv(program.uniforms.u_pattern_size_a, (imagePosA ).displaySize);\n gl.uniform2fv(program.uniforms.u_pattern_size_b, (imagePosB ).displaySize);\n gl.uniform1f(program.uniforms.u_scale_a, image.fromScale);\n gl.uniform1f(program.uniforms.u_scale_b, image.toScale);\n\n context.activeTexture.set(gl.TEXTURE0);\n painter.imageManager.bind(painter.context);\n};\n\nexports.setTile = function (tile , painter , program ) {\n const gl = painter.context.gl;\n\n gl.uniform1f(program.uniforms.u_tile_units_to_pixels, 1 / pixelsToTileUnits(tile, 1, painter.transform.tileZoom));\n\n const numTiles = Math.pow(2, tile.tileID.overscaledZ);\n const tileSizeAtNearestZoom = tile.tileSize * Math.pow(2, painter.transform.tileZoom) / numTiles;\n\n const pixelX = tileSizeAtNearestZoom * (tile.tileID.canonical.x + tile.tileID.wrap * numTiles);\n const pixelY = tileSizeAtNearestZoom * tile.tileID.canonical.y;\n\n // split the pixel coord into two pairs of 16 bit numbers. The glsl spec only guarantees 16 bits of precision.\n gl.uniform2f(program.uniforms.u_pixel_coord_upper, pixelX >> 16, pixelY >> 16);\n gl.uniform2f(program.uniforms.u_pixel_coord_lower, pixelX & 0xFFFF, pixelY & 0xFFFF);\n};\n","// \n\nconst browser = require('../util/browser');\nconst shaders = require('../shaders');\nconst assert = require('assert');\nconst {ProgramConfiguration} = require('../data/program_configuration');\nconst VertexArrayObject = require('./vertex_array_object');\nconst Context = require('../gl/context');\n\n \n \n \n\n \n \n \n\nclass Program {\n \n \n \n \n\n constructor(context ,\n source ,\n configuration ,\n showOverdrawInspector ) {\n const gl = context.gl;\n this.program = gl.createProgram();\n\n const defines = configuration.defines().concat(\n `#define DEVICE_PIXEL_RATIO ${browser.devicePixelRatio.toFixed(1)}`);\n if (showOverdrawInspector) {\n defines.push('#define OVERDRAW_INSPECTOR;');\n }\n\n const fragmentSource = defines.concat(shaders.prelude.fragmentSource, source.fragmentSource).join('\\n');\n const vertexSource = defines.concat(shaders.prelude.vertexSource, source.vertexSource).join('\\n');\n\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, fragmentSource);\n gl.compileShader(fragmentShader);\n assert(gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS), (gl.getShaderInfoLog(fragmentShader) ));\n gl.attachShader(this.program, fragmentShader);\n\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexSource);\n gl.compileShader(vertexShader);\n assert(gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS), (gl.getShaderInfoLog(vertexShader) ));\n gl.attachShader(this.program, vertexShader);\n\n // Manually bind layout attributes in the order defined by their\n // ProgramInterface so that we don't dynamically link an unused\n // attribute at position 0, which can cause rendering to fail for an\n // entire layer (see #4607, #4728)\n const layoutAttributes = configuration.layoutAttributes || [];\n for (let i = 0; i < layoutAttributes.length; i++) {\n gl.bindAttribLocation(this.program, i, layoutAttributes[i].name);\n }\n\n gl.linkProgram(this.program);\n assert(gl.getProgramParameter(this.program, gl.LINK_STATUS), (gl.getProgramInfoLog(this.program) ));\n\n this.numAttributes = gl.getProgramParameter(this.program, gl.ACTIVE_ATTRIBUTES);\n\n this.attributes = {};\n this.uniforms = {};\n\n for (let i = 0; i < this.numAttributes; i++) {\n const attribute = gl.getActiveAttrib(this.program, i);\n if (attribute) {\n this.attributes[attribute.name] = gl.getAttribLocation(this.program, attribute.name);\n }\n }\n\n const numUniforms = gl.getProgramParameter(this.program, gl.ACTIVE_UNIFORMS);\n for (let i = 0; i < numUniforms; i++) {\n const uniform = gl.getActiveUniform(this.program, i);\n if (uniform) {\n this.uniforms[uniform.name] = gl.getUniformLocation(this.program, uniform.name);\n }\n }\n }\n\n draw(context ,\n drawMode ,\n layerID ,\n layoutVertexBuffer ,\n indexBuffer ,\n segments ,\n configuration ,\n dynamicLayoutBuffer ,\n dynamicLayoutBuffer2 ) {\n\n const gl = context.gl;\n\n const primitiveSize = {\n [gl.LINES]: 2,\n [gl.TRIANGLES]: 3\n }[drawMode];\n\n for (const segment of segments.get()) {\n const vaos = segment.vaos || (segment.vaos = {});\n const vao = vaos[layerID] || (vaos[layerID] = new VertexArrayObject());\n\n vao.bind(\n context,\n this,\n layoutVertexBuffer,\n configuration ? configuration.getPaintVertexBuffers() : [],\n indexBuffer,\n segment.vertexOffset,\n dynamicLayoutBuffer,\n dynamicLayoutBuffer2\n );\n\n gl.drawElements(\n drawMode,\n segment.primitiveLength * primitiveSize,\n gl.UNSIGNED_SHORT,\n segment.primitiveOffset * primitiveSize * 2);\n }\n }\n}\n\nmodule.exports = Program;\n","// \n\nconst {HTMLImageElement, HTMLCanvasElement, HTMLVideoElement, ImageData} = require('../util/window');\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\nclass Texture {\n \n \n \n \n \n \n\n constructor(context , image , format , premultiply ) {\n this.context = context;\n\n const {width, height} = image;\n this.size = [width, height];\n this.format = format;\n\n this.texture = context.gl.createTexture();\n this.update(image, premultiply);\n }\n\n update(image , premultiply ) {\n const {width, height} = image;\n this.size = [width, height];\n\n const {context} = this;\n const {gl} = context;\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n context.pixelStoreUnpack.set(1);\n\n if (this.format === gl.RGBA && premultiply !== false) {\n context.pixelStoreUnpackPremultiplyAlpha.set(true);\n }\n\n if (image instanceof HTMLImageElement || image instanceof HTMLCanvasElement || image instanceof HTMLVideoElement || image instanceof ImageData) {\n gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, gl.UNSIGNED_BYTE, image);\n } else {\n gl.texImage2D(gl.TEXTURE_2D, 0, this.format, width, height, 0, this.format, gl.UNSIGNED_BYTE, image.data);\n }\n }\n\n bind(filter , wrap , minFilter ) {\n const {context} = this;\n const {gl} = context;\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n\n if (filter !== this.filter) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter || filter);\n this.filter = filter;\n }\n\n if (wrap !== this.wrap) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrap);\n this.wrap = wrap;\n }\n }\n\n destroy() {\n const {gl} = this.context;\n gl.deleteTexture(this.texture);\n this.texture = (null );\n }\n}\n\nmodule.exports = Texture;\n","// \n\nconst {OverscaledTileID, CanonicalTileID} = require('../source/tile_id');\n\n \n \n\n \n \n \n\n// Updates the TileMasks for all renderable tiles. A TileMask describes all regions\n// within that tile that are *not* covered by other renderable tiles.\n// Example: renderableTiles in our list are 2/1/3, 3/3/6, and 4/5/13. The schematic for creating the\n// TileMask for 2/1/3 looks like this:\n//\n// ┌────────┬────────┬─────────────────┐\n// │ │ │#################│\n// │ 4/4/12 │ 4/5/12 │#################│\n// │ │ │#################│\n// ├──────3/2/6──────┤#####3/3/6#######│\n// │ │########│#################│\n// │ 4/4/13 │#4/5/13#│#################│\n// │ │########│#################│\n// ├────────┴──────2/1/3───────────────┤\n// │ │ │\n// │ │ │\n// │ │ │\n// │ 3/2/7 │ 3/3/7 │\n// │ │ │\n// │ │ │\n// │ │ │\n// └─────────────────┴─────────────────┘\n//\n// The TileMask for 2/1/3 thus consists of the tiles 4/4/12, 4/5/12, 4/4/13, 3/2/7, and 3/3/7,\n// but it does *not* include 4/5/13, and 3/3/6, since these are other renderableTiles.\n// A TileMask always contains TileIDs *relative* to the tile it is generated for, so 2/1/3 is\n// \"subtracted\" from these TileIDs. The final TileMask for 2/1/3 will thus be:\n//\n// ┌────────┬────────┬─────────────────┐\n// │ │ │#################│\n// │ 2/0/0 │ 2/1/0 │#################│\n// │ │ │#################│\n// ├────────┼────────┤#################│\n// │ │########│#################│\n// │ 2/0/1 │########│#################│\n// │ │########│#################│\n// ├────────┴────────┼─────────────────┤\n// │ │ │\n// │ │ │\n// │ │ │\n// │ 1/0/1 │ 1/1/1 │\n// │ │ │\n// │ │ │\n// │ │ │\n// └─────────────────┴─────────────────┘\n//\n// Only other renderable tiles that are *children* of the tile we are generating the mask for will\n// be considered. For example, adding TileID 4/8/13 to renderableTiles won't affect the TileMask for\n// 2/1/3, since it is not a descendant of it.\n\n\nmodule.exports = function(renderableTiles , context ) {\n const sortedRenderables = renderableTiles.sort((a, b) => { return a.tileID.isLessThan(b.tileID) ? -1 : b.tileID.isLessThan(a.tileID) ? 1 : 0; });\n\n for (let i = 0; i < sortedRenderables.length; i++) {\n const mask = {};\n const tile = sortedRenderables[i];\n const childArray = sortedRenderables.slice(i + 1);\n // Try to add all remaining ids as children. We sorted the tile list\n // by z earlier, so all preceding items cannot be children of the current\n // tile. We also compute the lower bound of the next wrap, because items of the next wrap\n // can never be children of the current wrap.\n\n computeTileMasks(tile.tileID.wrapped(), tile.tileID, childArray, new OverscaledTileID(0, tile.tileID.wrap + 1, 0, 0, 0), mask);\n tile.setMask(mask, context);\n }\n};\n\nfunction computeTileMasks(rootTile , ref , childArray , lowerBound , mask ) {\n // If the reference or any of its children is found in the list, we need to recurse.\n for (let i = 0; i < childArray.length; i++) {\n const childTile = childArray[i];\n // childTile is from a larger wrap than the rootTile so it cannot be a child tile\n if (lowerBound.isLessThan(childTile.tileID)) break;\n // The current tile is masked out, so we don't need to add them to the mask set.\n if (ref.key === childTile.tileID.key) {\n return;\n } else if (childTile.tileID.isChildOf(ref)) {\n // There's at least one child tile that is masked out, so recursively descend\n const children = ref.children(Infinity);\n for (let j = 0; j < children.length; j++) {\n const child = children[j];\n computeTileMasks(rootTile, child, childArray.slice(i), lowerBound, mask);\n }\n return;\n }\n }\n // We couldn't find a child, so it's definitely a masked part.\n // Compute the difference between the root tile ID and the reference tile ID, since TileMask\n // elements are always relative (see below for explanation).\n const diffZ = ref.overscaledZ - rootTile.overscaledZ;\n const maskTileId = new CanonicalTileID(diffZ, ref.canonical.x - (rootTile.canonical.x << diffZ), ref.canonical.y - (rootTile.canonical.y << diffZ));\n mask[maskTileId.key] = mask[maskTileId.key] || maskTileId;\n}\n","// \n\nconst assert = require('assert');\n\n \n \n \n \n\nclass VertexArrayObject {\n \n \n \n \n \n \n \n \n \n\n constructor() {\n this.boundProgram = null;\n this.boundLayoutVertexBuffer = null;\n this.boundPaintVertexBuffers = [];\n this.boundIndexBuffer = null;\n this.boundVertexOffset = null;\n this.boundDynamicVertexBuffer = null;\n this.vao = null;\n }\n\n bind(context ,\n program ,\n layoutVertexBuffer ,\n paintVertexBuffers ,\n indexBuffer ,\n vertexOffset ,\n dynamicVertexBuffer ,\n dynamicVertexBuffer2 ) {\n\n this.context = context;\n\n let paintBuffersDiffer = this.boundPaintVertexBuffers.length !== paintVertexBuffers.length;\n for (let i = 0; !paintBuffersDiffer && i < paintVertexBuffers.length; i++) {\n if (this.boundPaintVertexBuffers[i] !== paintVertexBuffers[i]) {\n paintBuffersDiffer = true;\n }\n }\n\n const isFreshBindRequired = (\n !this.vao ||\n this.boundProgram !== program ||\n this.boundLayoutVertexBuffer !== layoutVertexBuffer ||\n paintBuffersDiffer ||\n this.boundIndexBuffer !== indexBuffer ||\n this.boundVertexOffset !== vertexOffset ||\n this.boundDynamicVertexBuffer !== dynamicVertexBuffer ||\n this.boundDynamicVertexBuffer2 !== dynamicVertexBuffer2\n );\n\n if (!context.extVertexArrayObject || isFreshBindRequired) {\n this.freshBind(program, layoutVertexBuffer, paintVertexBuffers, indexBuffer, vertexOffset, dynamicVertexBuffer, dynamicVertexBuffer2);\n } else {\n context.bindVertexArrayOES.set(this.vao);\n\n if (dynamicVertexBuffer) {\n // The buffer may have been updated. Rebind to upload data.\n dynamicVertexBuffer.bind();\n }\n\n if (indexBuffer && indexBuffer.dynamicDraw) {\n indexBuffer.bind();\n }\n\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.bind();\n }\n }\n }\n\n freshBind(program ,\n layoutVertexBuffer ,\n paintVertexBuffers ,\n indexBuffer ,\n vertexOffset ,\n dynamicVertexBuffer ,\n dynamicVertexBuffer2 ) {\n let numPrevAttributes;\n const numNextAttributes = program.numAttributes;\n\n const context = this.context;\n const gl = context.gl;\n\n if (context.extVertexArrayObject) {\n if (this.vao) this.destroy();\n this.vao = context.extVertexArrayObject.createVertexArrayOES();\n context.bindVertexArrayOES.set(this.vao);\n numPrevAttributes = 0;\n\n // store the arguments so that we can verify them when the vao is bound again\n this.boundProgram = program;\n this.boundLayoutVertexBuffer = layoutVertexBuffer;\n this.boundPaintVertexBuffers = paintVertexBuffers;\n this.boundIndexBuffer = indexBuffer;\n this.boundVertexOffset = vertexOffset;\n this.boundDynamicVertexBuffer = dynamicVertexBuffer;\n this.boundDynamicVertexBuffer2 = dynamicVertexBuffer2;\n\n } else {\n numPrevAttributes = context.currentNumAttributes || 0;\n\n // Disable all attributes from the previous program that aren't used in\n // the new program. Note: attribute indices are *not* program specific!\n for (let i = numNextAttributes; i < numPrevAttributes; i++) {\n // WebGL breaks if you disable attribute 0.\n // http://stackoverflow.com/questions/20305231\n assert(i !== 0);\n gl.disableVertexAttribArray(i);\n }\n }\n\n layoutVertexBuffer.enableAttributes(gl, program);\n for (const vertexBuffer of paintVertexBuffers) {\n vertexBuffer.enableAttributes(gl, program);\n }\n\n if (dynamicVertexBuffer) {\n dynamicVertexBuffer.enableAttributes(gl, program);\n }\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.enableAttributes(gl, program);\n }\n\n layoutVertexBuffer.bind();\n layoutVertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n for (const vertexBuffer of paintVertexBuffers) {\n vertexBuffer.bind();\n vertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n }\n\n if (dynamicVertexBuffer) {\n dynamicVertexBuffer.bind();\n dynamicVertexBuffer.setVertexAttribPointers(gl, program, vertexOffset);\n }\n if (indexBuffer) {\n indexBuffer.bind();\n }\n if (dynamicVertexBuffer2) {\n dynamicVertexBuffer2.bind();\n dynamicVertexBuffer2.setVertexAttribPointers(gl, program, vertexOffset);\n }\n\n context.currentNumAttributes = numNextAttributes;\n }\n\n destroy() {\n if (this.vao) {\n this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao);\n this.vao = null;\n }\n }\n}\n\nmodule.exports = VertexArrayObject;\n","// \n\nconst util = require('../util/util');\n\n/**\n * Packs two numbers, interpreted as 8-bit unsigned integers, into a single\n * float. Unpack them in the shader using the `unpack_float()` function,\n * defined in _prelude.vertex.glsl\n *\n * @private\n */\nexports.packUint8ToFloat = function pack(a , b ) {\n // coerce a and b to 8-bit ints\n a = util.clamp(Math.floor(a), 0, 255);\n b = util.clamp(Math.floor(b), 0, 255);\n return 256 * a + b;\n};\n\n","// \n\nconst fs = require('fs');\n\n// readFileSync calls must be written out long-form for brfs.\n/* eslint-disable prefer-template, no-path-concat */\n\nconst shaders = {\n prelude: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/_prelude.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/_prelude.vertex.glsl', 'utf8')\n },\n circle: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/circle.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/circle.vertex.glsl', 'utf8')\n },\n heatmap: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/heatmap.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/heatmap.vertex.glsl', 'utf8')\n },\n heatmapTexture: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/heatmap_texture.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/heatmap_texture.vertex.glsl', 'utf8')\n },\n collisionBox: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/collision_box.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/collision_box.vertex.glsl', 'utf8')\n },\n collisionCircle: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/collision_circle.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/collision_circle.vertex.glsl', 'utf8')\n },\n debug: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/debug.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/debug.vertex.glsl', 'utf8')\n },\n fill: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill.vertex.glsl', 'utf8')\n },\n fillOutline: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill_outline.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill_outline.vertex.glsl', 'utf8')\n },\n fillOutlinePattern: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill_outline_pattern.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill_outline_pattern.vertex.glsl', 'utf8')\n },\n fillPattern: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill_pattern.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill_pattern.vertex.glsl', 'utf8')\n },\n fillExtrusion: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill_extrusion.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill_extrusion.vertex.glsl', 'utf8')\n },\n fillExtrusionPattern: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/fill_extrusion_pattern.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/fill_extrusion_pattern.vertex.glsl', 'utf8')\n },\n extrusionTexture: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/extrusion_texture.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/extrusion_texture.vertex.glsl', 'utf8')\n },\n hillshadePrepare: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/hillshade_prepare.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/hillshade_prepare.vertex.glsl', 'utf8')\n },\n hillshade: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/hillshade.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/hillshade.vertex.glsl', 'utf8')\n },\n line: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/line.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/line.vertex.glsl', 'utf8')\n },\n linePattern: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/line_pattern.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/line_pattern.vertex.glsl', 'utf8')\n },\n lineSDF: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/line_sdf.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/line_sdf.vertex.glsl', 'utf8')\n },\n raster: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/raster.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/raster.vertex.glsl', 'utf8')\n },\n symbolIcon: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/symbol_icon.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/symbol_icon.vertex.glsl', 'utf8')\n },\n symbolSDF: {\n fragmentSource: fs.readFileSync(__dirname + '/../shaders/symbol_sdf.fragment.glsl', 'utf8'),\n vertexSource: fs.readFileSync(__dirname + '/../shaders/symbol_sdf.vertex.glsl', 'utf8')\n }\n};\n\n// Expand #pragmas to #ifdefs.\n\nconst re = /#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g;\n\nfor (const programName in shaders) {\n const program = shaders[programName];\n const fragmentPragmas = {};\n\n program.fragmentSource = program.fragmentSource.replace(re, (match , operation , precision , type , name ) => {\n fragmentPragmas[name] = true;\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nvarying ${precision} ${type} ${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n return `\n#ifdef HAS_UNIFORM_u_${name}\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n });\n\n program.vertexSource = program.vertexSource.replace(re, (match , operation , precision , type , name ) => {\n const attrType = type === 'float' ? 'vec2' : 'vec4';\n if (fragmentPragmas[name]) {\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nuniform lowp float a_${name}_t;\nattribute ${precision} ${attrType} a_${name};\nvarying ${precision} ${type} ${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${name} = unpack_mix_${attrType}(a_${name}, a_${name}_t);\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n } else {\n if (operation === 'define') {\n return `\n#ifndef HAS_UNIFORM_u_${name}\nuniform lowp float a_${name}_t;\nattribute ${precision} ${attrType} a_${name};\n#else\nuniform ${precision} ${type} u_${name};\n#endif\n`;\n } else /* if (operation === 'initialize') */ {\n return `\n#ifndef HAS_UNIFORM_u_${name}\n ${precision} ${type} ${name} = unpack_mix_${attrType}(a_${name}, a_${name}_t);\n#else\n ${precision} ${type} ${name} = u_${name};\n#endif\n`;\n }\n }\n });\n}\n\nmodule.exports = shaders;\n","// \n\nconst ImageSource = require('./image_source');\nconst window = require('../util/window');\nconst rasterBoundsAttributes = require('../data/raster_bounds_attributes');\nconst VertexArrayObject = require('../render/vertex_array_object');\nconst Texture = require('../render/texture');\n\n \n \n \n\n/**\n * A data source containing the contents of an HTML canvas.\n * (See the [Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#sources-canvas) for detailed documentation of options.)\n * @interface CanvasSource\n * @example\n * // add to map\n * map.addSource('some id', {\n * type: 'canvas',\n * canvas: 'idOfMyHTMLCanvas',\n * animate: true,\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update\n * var mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * map.removeSource('some id'); // remove\n */\nclass CanvasSource extends ImageSource {\n \n \n \n \n \n \n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super(id, options, dispatcher, eventedParent);\n this.options = options;\n this.animate = options.animate !== undefined ? options.animate : true;\n }\n\n /**\n * Enables animation. The image will be copied from the canvas to the map on each frame.\n * @method play\n * @instance\n * @memberof CanvasSource\n */\n\n /**\n * Disables animation. The map will display a static copy of the canvas image.\n * @method pause\n * @instance\n * @memberof CanvasSource\n */\n\n load() {\n this.canvas = this.canvas || window.document.getElementById(this.options.canvas);\n this.width = this.canvas.width;\n this.height = this.canvas.height;\n if (this._hasInvalidDimensions()) return this.fire('error', new Error('Canvas dimensions cannot be less than or equal to zero.'));\n\n this.play = function() {\n this._playing = true;\n this.map._rerender();\n };\n\n this.pause = function() {\n this._playing = false;\n };\n\n this._finishLoading();\n }\n\n /**\n * Returns the HTML `canvas` element.\n *\n * @returns {HTMLCanvasElement} The HTML `canvas` element.\n */\n getCanvas() {\n return this.canvas;\n }\n\n onAdd(map ) {\n this.map = map;\n this.load();\n if (this.canvas) {\n if (this.animate) this.play();\n }\n }\n\n onRemove() {\n this.pause();\n }\n\n /**\n * Sets the canvas's coordinates and re-renders the map.\n *\n * @method setCoordinates\n * @instance\n * @memberof CanvasSource\n * @param {Array<Array<number>>} coordinates Four geographical coordinates,\n * represented as arrays of longitude and latitude numbers, which define the corners of the canvas.\n * The coordinates start at the top left corner of the canvas and proceed in clockwise order.\n * They do not have to represent a rectangle.\n * @returns {CanvasSource} this\n */\n // setCoordinates inherited from ImageSource\n\n prepare() {\n let resize = false;\n if (this.canvas.width !== this.width) {\n this.width = this.canvas.width;\n resize = true;\n }\n if (this.canvas.height !== this.height) {\n this.height = this.canvas.height;\n resize = true;\n }\n\n if (this._hasInvalidDimensions()) return;\n\n if (Object.keys(this.tiles).length === 0) return; // not enough data for current position\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.boundsBuffer) {\n this.boundsBuffer = context.createVertexBuffer(this._boundsArray, rasterBoundsAttributes.members);\n }\n\n if (!this.boundsVAO) {\n this.boundsVAO = new VertexArrayObject();\n }\n\n if (!this.texture) {\n this.texture = new Texture(context, this.canvas, gl.RGBA);\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n } else if (resize) {\n this.texture.update(this.canvas);\n } else if (this._playing) {\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.canvas);\n }\n\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n }\n }\n }\n\n serialize() {\n return {\n type: 'canvas',\n canvas: this.canvas,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return this._playing;\n }\n\n _hasInvalidDimensions() {\n for (const x of [this.canvas.width, this.canvas.height]) {\n if (isNaN(x) || x <= 0) return true;\n }\n return false;\n }\n}\n\nmodule.exports = CanvasSource;\n","// \n\nconst Evented = require('../util/evented');\nconst util = require('../util/util');\nconst window = require('../util/window');\nconst EXTENT = require('../data/extent');\nconst ResourceType = require('../util/ajax').ResourceType;\nconst browser = require('../util/browser');\n\n \n \n \n \n \n\n/**\n * A source containing GeoJSON.\n * (See the [Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson) for detailed documentation of options.)\n *\n * @interface GeoJSONSource\n * @example\n *\n * map.addSource('some id', {\n * type: 'geojson',\n * data: 'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_ports.geojson'\n * });\n *\n * @example\n * map.addSource('some id', {\n * type: 'geojson',\n * data: {\n * \"type\": \"FeatureCollection\",\n * \"features\": [{\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [\n * -76.53063297271729,\n * 39.18174077994108\n * ]\n * }\n * }]\n * }\n * });\n *\n * @example\n * map.getSource('some id').setData({\n * \"type\": \"FeatureCollection\",\n * \"features\": [{\n * \"type\": \"Feature\",\n * \"properties\": { \"name\": \"Null Island\" },\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [ 0, 0 ]\n * }\n * }]\n * });\n * @see [Draw GeoJSON points](https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/)\n * @see [Add a GeoJSON line](https://www.mapbox.com/mapbox-gl-js/example/geojson-line/)\n * @see [Create a heatmap from points](https://www.mapbox.com/mapbox-gl-js/example/heatmap/)\n */\nclass GeoJSONSource extends Evented {\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super();\n\n this.id = id;\n\n // `type` is a property rather than a constant to make it easy for 3rd\n // parties to use GeoJSONSource to build their own source types.\n this.type = 'geojson';\n\n this.minzoom = 0;\n this.maxzoom = 18;\n this.tileSize = 512;\n this.isTileClipped = true;\n this.reparseOverscaled = true;\n\n this.dispatcher = dispatcher;\n this.setEventedParent(eventedParent);\n\n this._data = (options.data );\n this._options = util.extend({}, options);\n\n if (options.maxzoom !== undefined) this.maxzoom = options.maxzoom;\n if (options.type) this.type = options.type;\n\n const scale = EXTENT / this.tileSize;\n\n // sent to the worker, along with `url: ...` or `data: literal geojson`,\n // so that it can load/parse/index the geojson data\n // extending with `options.workerOptions` helps to make it easy for\n // third-party sources to hack/reuse GeoJSONSource.\n this.workerOptions = util.extend({\n source: this.id,\n cluster: options.cluster || false,\n geojsonVtOptions: {\n buffer: (options.buffer !== undefined ? options.buffer : 128) * scale,\n tolerance: (options.tolerance !== undefined ? options.tolerance : 0.375) * scale,\n extent: EXTENT,\n maxZoom: this.maxzoom\n },\n superclusterOptions: {\n maxZoom: options.clusterMaxZoom !== undefined ?\n Math.min(options.clusterMaxZoom, this.maxzoom - 1) :\n (this.maxzoom - 1),\n extent: EXTENT,\n radius: (options.clusterRadius || 50) * scale,\n log: false\n }\n }, options.workerOptions);\n }\n\n load() {\n this.fire('dataloading', {dataType: 'source'});\n this._updateWorkerData((err) => {\n if (err) {\n this.fire('error', {error: err});\n return;\n }\n // although GeoJSON sources contain no metadata, we fire this event to let the SourceCache\n // know its ok to start requesting tiles.\n this.fire('data', {dataType: 'source', sourceDataType: 'metadata'});\n });\n }\n\n onAdd(map ) {\n this.map = map;\n this.load();\n }\n\n /**\n * Sets the GeoJSON data and re-renders the map.\n *\n * @param {Object|string} data A GeoJSON data object or a URL to one. The latter is preferable in the case of large GeoJSON files.\n * @returns {GeoJSONSource} this\n */\n setData(data ) {\n this._data = data;\n this.fire('dataloading', {dataType: 'source'});\n this._updateWorkerData((err) => {\n if (err) {\n return this.fire('error', { error: err });\n }\n this.fire('data', {dataType: 'source', sourceDataType: 'content'});\n });\n\n return this;\n }\n\n /*\n * Responsible for invoking WorkerSource's geojson.loadData target, which\n * handles loading the geojson data and preparing to serve it up as tiles,\n * using geojson-vt or supercluster as appropriate.\n */\n _updateWorkerData(callback ) {\n const options = util.extend({}, this.workerOptions);\n const data = this._data;\n if (typeof data === 'string') {\n options.request = this.map._transformRequest(resolveURL(data), ResourceType.Source);\n } else {\n options.data = JSON.stringify(data);\n }\n\n // target {this.type}.loadData rather than literally geojson.loadData,\n // so that other geojson-like source types can easily reuse this\n // implementation\n this.workerID = this.dispatcher.send(`${this.type}.loadData`, options, (err) => {\n this._loaded = true;\n callback(err);\n }, this.workerID);\n }\n\n loadTile(tile , callback ) {\n const message = tile.workerID === undefined || tile.state === 'expired' ? 'loadTile' : 'reloadTile';\n const params = {\n type: this.type,\n uid: tile.uid,\n tileID: tile.tileID,\n zoom: tile.tileID.overscaledZ,\n maxZoom: this.maxzoom,\n tileSize: this.tileSize,\n source: this.id,\n pixelRatio: browser.devicePixelRatio,\n overscaling: tile.tileID.overscaleFactor(),\n showCollisionBoxes: this.map.showCollisionBoxes\n };\n\n tile.workerID = this.dispatcher.send(message, params, (err, data) => {\n tile.unloadVectorData();\n\n if (tile.aborted) {\n return callback(null);\n }\n\n if (err) {\n return callback(err);\n }\n\n tile.loadVectorData(data, this.map.painter);\n\n return callback(null);\n }, this.workerID);\n }\n\n abortTile(tile ) {\n tile.aborted = true;\n }\n\n unloadTile(tile ) {\n tile.unloadVectorData();\n this.dispatcher.send('removeTile', { uid: tile.uid, type: this.type, source: this.id }, null, tile.workerID);\n }\n\n onRemove() {\n this.dispatcher.broadcast('removeSource', { type: this.type, source: this.id });\n }\n\n serialize() {\n return util.extend({}, this._options, {\n type: this.type,\n data: this._data\n });\n }\n\n hasTransition() {\n return false;\n }\n}\n\nfunction resolveURL(url) {\n const a = window.document.createElement('a');\n a.href = url;\n return a.href;\n}\n\nmodule.exports = GeoJSONSource;\n","// \n\nconst ajax = require('../util/ajax');\nconst rewind = require('geojson-rewind');\nconst GeoJSONWrapper = require('./geojson_wrapper');\nconst vtpbf = require('vt-pbf');\nconst supercluster = require('supercluster');\nconst geojsonvt = require('geojson-vt');\n\nconst VectorTileWorkerSource = require('./vector_tile_worker_source');\n\n \n \n \n \n\n \n \n\n \n \n \n\n \n\n \n \n \n \n \n \n \n\n \n\n \n \n\nfunction loadGeoJSONTile(params , callback ) {\n const source = params.source,\n canonical = params.tileID.canonical;\n\n if (!this._geoJSONIndexes[source]) {\n return callback(null, null); // we couldn't load the file\n }\n\n const geoJSONTile = this._geoJSONIndexes[source].getTile(canonical.z, canonical.x, canonical.y);\n if (!geoJSONTile) {\n return callback(null, null); // nothing in the given tile\n }\n\n const geojsonWrapper = new GeoJSONWrapper(geoJSONTile.features);\n\n // Encode the geojson-vt tile into binary vector tile form form. This\n // is a convenience that allows `FeatureIndex` to operate the same way\n // across `VectorTileSource` and `GeoJSONSource` data.\n let pbf = vtpbf(geojsonWrapper);\n if (pbf.byteOffset !== 0 || pbf.byteLength !== pbf.buffer.byteLength) {\n // Compatibility with node Buffer (https://github.com/mapbox/pbf/issues/35)\n pbf = new Uint8Array(pbf);\n }\n\n callback(null, {\n vectorTile: geojsonWrapper,\n rawData: pbf.buffer\n });\n}\n\n/**\n * The {@link WorkerSource} implementation that supports {@link GeoJSONSource}.\n * This class is designed to be easily reused to support custom source types\n * for data formats that can be parsed/converted into an in-memory GeoJSON\n * representation. To do so, create it with\n * `new GeoJSONWorkerSource(actor, layerIndex, customLoadGeoJSONFunction)`.\n * For a full example, see [mapbox-gl-topojson](https://github.com/developmentseed/mapbox-gl-topojson).\n *\n * @private\n */\nclass GeoJSONWorkerSource extends VectorTileWorkerSource {\n \n \n\n /**\n * @param [loadGeoJSON] Optional method for custom loading/parsing of\n * GeoJSON based on parameters passed from the main-thread Source.\n * See {@link GeoJSONWorkerSource#loadGeoJSON}.\n */\n constructor(actor , layerIndex , loadGeoJSON ) {\n super(actor, layerIndex, loadGeoJSONTile);\n if (loadGeoJSON) {\n this.loadGeoJSON = loadGeoJSON;\n }\n // object mapping source ids to geojson-vt-like tile indexes\n this._geoJSONIndexes = {};\n }\n\n /**\n * Fetches (if appropriate), parses, and index geojson data into tiles. This\n * preparatory method must be called before {@link GeoJSONWorkerSource#loadTile}\n * can correctly serve up tiles.\n *\n * Defers to {@link GeoJSONWorkerSource#loadGeoJSON} for the fetching/parsing,\n * expecting `callback(error, data)` to be called with either an error or a\n * parsed GeoJSON object.\n * @param params\n * @param params.source The id of the source.\n * @param callback\n */\n loadData(params , callback ) {\n this.loadGeoJSON(params, (err, data) => {\n if (err || !data) {\n return callback(err);\n } else if (typeof data !== 'object') {\n return callback(new Error(\"Input data is not a valid GeoJSON object.\"));\n } else {\n rewind(data, true);\n\n try {\n this._geoJSONIndexes[params.source] = params.cluster ?\n supercluster(params.superclusterOptions).load(data.features) :\n geojsonvt(data, params.geojsonVtOptions);\n } catch (err) {\n return callback(err);\n }\n\n this.loaded[params.source] = {};\n callback(null);\n }\n });\n }\n\n /**\n * Implements {@link WorkerSource#reloadTile}.\n *\n * If the tile is loaded, uses the implementation in VectorTileWorkerSource.\n * Otherwise, such as after a setData() call, we load the tile fresh.\n *\n * @param params\n * @param params.source The id of the source for which we're loading this tile.\n * @param params.uid The UID for this tile.\n */\n reloadTile(params , callback ) {\n const loaded = this.loaded[params.source],\n uid = params.uid;\n\n if (loaded && loaded[uid]) {\n return super.reloadTile(params, callback);\n } else {\n return this.loadTile(params, callback);\n }\n }\n\n /**\n * Fetch and parse GeoJSON according to the given params. Calls `callback`\n * with `(err, data)`, where `data` is a parsed GeoJSON object.\n *\n * GeoJSON is loaded and parsed from `params.url` if it exists, or else\n * expected as a literal (string or object) `params.data`.\n *\n * @param params\n * @param [params.url] A URL to the remote GeoJSON data.\n * @param [params.data] Literal GeoJSON data. Must be provided if `params.url` is not.\n */\n loadGeoJSON(params , callback ) {\n // Because of same origin issues, urls must either include an explicit\n // origin or absolute path.\n // ie: /foo/bar.json or http://example.com/bar.json\n // but not ../foo/bar.json\n if (params.request) {\n ajax.getJSON(params.request, callback);\n } else if (typeof params.data === 'string') {\n try {\n return callback(null, JSON.parse(params.data));\n } catch (e) {\n return callback(new Error(\"Input data is not a valid GeoJSON object.\"));\n }\n } else {\n return callback(new Error(\"Input data is not a valid GeoJSON object.\"));\n }\n }\n\n removeSource(params , callback ) {\n if (this._geoJSONIndexes[params.source]) {\n delete this._geoJSONIndexes[params.source];\n }\n callback();\n }\n}\n\nmodule.exports = GeoJSONWorkerSource;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst toGeoJSON = require('@mapbox/vector-tile').VectorTileFeature.prototype.toGeoJSON;\nconst EXTENT = require('../data/extent');\n\n// The feature type used by geojson-vt and supercluster. Should be extracted to\n// global type and used in module definitions for those two modules.\n \n \n \n \n \n \n \n \n \n \n \n\nclass FeatureWrapper {\n \n\n \n \n \n \n\n constructor(feature ) {\n this._feature = feature;\n\n this.extent = EXTENT;\n this.type = feature.type;\n this.properties = feature.tags;\n\n // If the feature has a top-level `id` property, copy it over, but only\n // if it can be coerced to an integer, because this wrapper is used for\n // serializing geojson feature data into vector tile PBF data, and the\n // vector tile spec only supports integer values for feature ids --\n // allowing non-integer values here results in a non-compliant PBF\n // that causes an exception when it is parsed with vector-tile-js\n if ('id' in feature && !isNaN(feature.id)) {\n this.id = parseInt(feature.id, 10);\n }\n }\n\n loadGeometry() {\n if (this._feature.type === 1) {\n const geometry = [];\n for (const point of this._feature.geometry) {\n geometry.push([new Point(point[0], point[1])]);\n }\n return geometry;\n } else {\n const geometry = [];\n for (const ring of this._feature.geometry) {\n const newRing = [];\n for (const point of ring) {\n newRing.push(new Point(point[0], point[1]));\n }\n geometry.push(newRing);\n }\n return geometry;\n }\n }\n\n toGeoJSON(x , y , z ) {\n return toGeoJSON.call(this, x, y, z);\n }\n}\n\nclass GeoJSONWrapper {\n \n \n \n \n \n\n constructor(features ) {\n this.layers = { '_geojsonTileLayer': this };\n this.name = '_geojsonTileLayer';\n this.extent = EXTENT;\n this.length = features.length;\n this._features = features;\n }\n\n feature(i ) {\n return new FeatureWrapper(this._features[i]);\n }\n}\n\nmodule.exports = GeoJSONWrapper;\n","// \n\nconst util = require('../util/util');\nconst {CanonicalTileID} = require('./tile_id');\nconst LngLat = require('../geo/lng_lat');\nconst Point = require('@mapbox/point-geometry');\nconst Evented = require('../util/evented');\nconst ajax = require('../util/ajax');\nconst browser = require('../util/browser');\nconst EXTENT = require('../data/extent');\nconst {RasterBoundsArray} = require('../data/array_types');\nconst rasterBoundsAttributes = require('../data/raster_bounds_attributes');\nconst VertexArrayObject = require('../render/vertex_array_object');\nconst Texture = require('../render/texture');\n\n \n \n \n \n \n \n \n\n/**\n * A data source containing an image.\n * (See the [Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#sources-image) for detailed documentation of options.)\n *\n * @interface ImageSource\n * @example\n * // add to map\n * map.addSource('some id', {\n * type: 'image',\n * url: 'https://www.mapbox.com/images/foo.png',\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update\n * var mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * map.removeSource('some id'); // remove\n * @see [Add an image](https://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/)\n */\nclass ImageSource extends Evented {\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n this.coordinates = options.coordinates;\n\n this.type = 'image';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.tileSize = 512;\n this.tiles = {};\n\n this.setEventedParent(eventedParent);\n\n this.options = options;\n }\n\n load() {\n this.fire('dataloading', {dataType: 'source'});\n\n this.url = this.options.url;\n\n ajax.getImage(this.map._transformRequest(this.url, ajax.ResourceType.Image), (err, image) => {\n if (err) {\n this.fire('error', {error: err});\n } else if (image) {\n this.image = browser.getImageData(image);\n this._finishLoading();\n }\n });\n }\n\n _finishLoading() {\n if (this.map) {\n this.setCoordinates(this.coordinates);\n this.fire('data', {dataType: 'source', sourceDataType: 'metadata'});\n }\n }\n\n onAdd(map ) {\n this.map = map;\n this.load();\n }\n\n /**\n * Sets the image's coordinates and re-renders the map.\n *\n * @param {Array<Array<number>>} coordinates Four geographical coordinates,\n * represented as arrays of longitude and latitude numbers, which define the corners of the image.\n * The coordinates start at the top left corner of the image and proceed in clockwise order.\n * They do not have to represent a rectangle.\n * @returns {ImageSource} this\n */\n setCoordinates(coordinates ) {\n this.coordinates = coordinates;\n\n // Calculate which mercator tile is suitable for rendering the video in\n // and create a buffer with the corner coordinates. These coordinates\n // may be outside the tile, because raster tiles aren't clipped when rendering.\n\n const map = this.map;\n\n // transform the geo coordinates into (zoom 0) tile space coordinates\n const cornerZ0Coords = coordinates.map((coord) => {\n return map.transform.locationCoordinate(LngLat.convert(coord)).zoomTo(0);\n });\n\n // Compute the coordinates of the tile we'll use to hold this image's\n // render data\n const centerCoord = this.centerCoord = util.getCoordinatesCenter(cornerZ0Coords);\n // `column` and `row` may be fractional; round them down so that they\n // represent integer tile coordinates\n centerCoord.column = Math.floor(centerCoord.column);\n centerCoord.row = Math.floor(centerCoord.row);\n this.tileID = new CanonicalTileID(centerCoord.zoom, centerCoord.column, centerCoord.row);\n\n // Constrain min/max zoom to our tile's zoom level in order to force\n // SourceCache to request this tile (no matter what the map's zoom\n // level)\n this.minzoom = this.maxzoom = centerCoord.zoom;\n\n // Transform the corner coordinates into the coordinate space of our\n // tile.\n const tileCoords = cornerZ0Coords.map((coord) => {\n const zoomedCoord = coord.zoomTo(centerCoord.zoom);\n return new Point(\n Math.round((zoomedCoord.column - centerCoord.column) * EXTENT),\n Math.round((zoomedCoord.row - centerCoord.row) * EXTENT));\n });\n\n this._boundsArray = new RasterBoundsArray();\n this._boundsArray.emplaceBack(tileCoords[0].x, tileCoords[0].y, 0, 0);\n this._boundsArray.emplaceBack(tileCoords[1].x, tileCoords[1].y, EXTENT, 0);\n this._boundsArray.emplaceBack(tileCoords[3].x, tileCoords[3].y, 0, EXTENT);\n this._boundsArray.emplaceBack(tileCoords[2].x, tileCoords[2].y, EXTENT, EXTENT);\n\n if (this.boundsBuffer) {\n this.boundsBuffer.destroy();\n delete this.boundsBuffer;\n }\n\n this.fire('data', {dataType:'source', sourceDataType: 'content'});\n return this;\n }\n\n prepare() {\n if (Object.keys(this.tiles).length === 0 || !this.image) {\n return;\n }\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.boundsBuffer) {\n this.boundsBuffer = context.createVertexBuffer(this._boundsArray, rasterBoundsAttributes.members);\n }\n\n if (!this.boundsVAO) {\n this.boundsVAO = new VertexArrayObject();\n }\n\n if (!this.texture) {\n this.texture = new Texture(context, this.image, gl.RGBA);\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n }\n\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n }\n }\n }\n\n loadTile(tile , callback ) {\n // We have a single tile -- whoose coordinates are this.tileID -- that\n // covers the image we want to render. If that's the one being\n // requested, set it up with the image; otherwise, mark the tile as\n // `errored` to indicate that we have no data for it.\n // If the world wraps, we may have multiple \"wrapped\" copies of the\n // single tile.\n if (this.tileID && this.tileID.equals(tile.tileID.canonical)) {\n this.tiles[String(tile.tileID.wrap)] = tile;\n tile.buckets = {};\n callback(null);\n } else {\n tile.state = 'errored';\n callback(null);\n }\n }\n\n serialize() {\n return {\n type: 'image',\n url: this.options.url,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return false;\n }\n}\n\nmodule.exports = ImageSource;\n","// \n\nconst util = require('../util/util');\nconst ajax = require('../util/ajax');\nconst browser = require('../util/browser');\nconst normalizeURL = require('../util/mapbox').normalizeSourceURL;\n\n \n \n \n\nmodule.exports = function(options , requestTransformFn , callback ) {\n const loaded = function(err, tileJSON ) {\n if (err) {\n return callback(err);\n } else if (tileJSON) {\n const result = util.pick(tileJSON, ['tiles', 'minzoom', 'maxzoom', 'attribution', 'mapbox_logo', 'bounds']);\n\n if (tileJSON.vector_layers) {\n result.vectorLayers = tileJSON.vector_layers;\n result.vectorLayerIds = result.vectorLayers.map((layer) => { return layer.id; });\n }\n\n callback(null, result);\n }\n };\n\n if (options.url) {\n ajax.getJSON(requestTransformFn(normalizeURL(options.url), ajax.ResourceType.Source), loaded);\n } else {\n browser.frame(() => loaded(null, options));\n }\n};\n","// \n\nconst EXTENT = require('../data/extent');\n\n \n\n/**\n * Converts a pixel value at a the given zoom level to tile units.\n *\n * The shaders mostly calculate everything in tile units so style\n * properties need to be converted from pixels to tile units using this.\n *\n * For example, a translation by 30 pixels at zoom 6.5 will be a\n * translation by pixelsToTileUnits(30, 6.5) tile units.\n *\n * @returns value in tile units\n * @private\n */\nmodule.exports = function(tile , pixelValue , z ) {\n return pixelValue * (EXTENT / (tile.tileSize * Math.pow(2, z - tile.tileID.overscaledZ)));\n};\n","// \n\n \n \n \n\nexports.rendered = function(sourceCache ,\n styleLayers ,\n queryGeometry ,\n params ,\n zoom ,\n bearing ) {\n const tilesIn = sourceCache.tilesIn(queryGeometry);\n\n tilesIn.sort(sortTilesIn);\n\n const renderedFeatureLayers = [];\n for (const tileIn of tilesIn) {\n renderedFeatureLayers.push({\n wrappedTileID: tileIn.tileID.wrapped().key,\n queryResults: tileIn.tile.queryRenderedFeatures(\n styleLayers,\n tileIn.queryGeometry,\n tileIn.scale,\n params,\n bearing,\n sourceCache.id)\n });\n }\n\n return mergeRenderedFeatureLayers(renderedFeatureLayers);\n};\n\nexports.source = function(sourceCache , params ) {\n const tiles = sourceCache.getRenderableIds().map((id) => {\n return sourceCache.getTileByID(id);\n });\n\n const result = [];\n\n const dataTiles = {};\n for (let i = 0; i < tiles.length; i++) {\n const tile = tiles[i];\n const dataID = tile.tileID.canonical.key;\n if (!dataTiles[dataID]) {\n dataTiles[dataID] = true;\n tile.querySourceFeatures(result, params);\n }\n }\n\n return result;\n};\n\nfunction sortTilesIn(a, b) {\n const idA = a.tileID;\n const idB = b.tileID;\n return (idA.overscaledZ - idB.overscaledZ) || (idA.canonical.y - idB.canonical.y) || (idA.wrap - idB.wrap) || (idA.canonical.x - idB.canonical.x);\n}\n\nfunction mergeRenderedFeatureLayers(tiles) {\n // Merge results from all tiles, but if two tiles share the same\n // wrapped ID, don't duplicate features between the two tiles\n const result = {};\n const wrappedIDLayerMap = {};\n for (const tile of tiles) {\n const queryResults = tile.queryResults;\n const wrappedID = tile.wrappedTileID;\n const wrappedIDLayers = wrappedIDLayerMap[wrappedID] = wrappedIDLayerMap[wrappedID] || {};\n for (const layerID in queryResults) {\n const tileFeatures = queryResults[layerID];\n const wrappedIDFeatures = wrappedIDLayers[layerID] = wrappedIDLayers[layerID] || {};\n const resultFeatures = result[layerID] = result[layerID] || [];\n for (const tileFeature of tileFeatures) {\n if (!wrappedIDFeatures[tileFeature.featureIndex]) {\n wrappedIDFeatures[tileFeature.featureIndex] = true;\n resultFeatures.push(tileFeature.feature);\n }\n }\n }\n }\n return result;\n}\n","// \n\nconst ajax = require('../util/ajax');\nconst util = require('../util/util');\nconst Evented = require('../util/evented');\nconst normalizeURL = require('../util/mapbox').normalizeTileURL;\nconst browser = require('../util/browser');\nconst {OverscaledTileID} = require('./tile_id');\nconst RasterTileSource = require('./raster_tile_source');\n\n \n \n \n \n\n\nclass RasterDEMTileSource extends RasterTileSource {\n constructor(id , options , dispatcher , eventedParent ) {\n super(id, options, dispatcher, eventedParent);\n this.type = 'raster-dem';\n this.maxzoom = 22;\n this._options = util.extend({}, options);\n }\n\n serialize() {\n return {\n type: 'raster-dem',\n url: this.url,\n tileSize: this.tileSize,\n tiles: this.tiles,\n bounds: this.bounds,\n };\n }\n\n loadTile(tile , callback ) {\n const url = normalizeURL(tile.tileID.canonical.url(this.tiles, this.scheme), this.url, this.tileSize);\n tile.request = ajax.getImage(this.map._transformRequest(url, ajax.ResourceType.Tile), imageLoaded.bind(this));\n\n tile.neighboringTiles = this._getNeighboringTiles(tile.tileID);\n function imageLoaded(err, img) {\n delete tile.request;\n if (tile.aborted) {\n tile.state = 'unloaded';\n callback(null);\n } else if (err) {\n tile.state = 'errored';\n callback(err);\n } else if (img) {\n if (this.map._refreshExpiredTiles) tile.setExpiryData(img);\n delete (img ).cacheControl;\n delete (img ).expires;\n\n const rawImageData = browser.getImageData(img);\n const params = {\n uid: tile.uid,\n coord: tile.tileID,\n source: this.id,\n rawImageData: rawImageData\n };\n\n if (!tile.workerID || tile.state === 'expired') {\n tile.workerID = this.dispatcher.send('loadDEMTile', params, done.bind(this));\n }\n }\n }\n\n function done(err, dem) {\n if (err) {\n tile.state = 'errored';\n callback(err);\n }\n\n if (dem) {\n tile.dem = dem;\n tile.needsHillshadePrepare = true;\n tile.state = 'loaded';\n callback(null);\n }\n }\n }\n\n\n _getNeighboringTiles(tileID ) {\n const canonical = tileID.canonical;\n const dim = Math.pow(2, canonical.z);\n\n const px = (canonical.x - 1 + dim) % dim;\n const pxw = canonical.x === 0 ? tileID.wrap - 1 : tileID.wrap;\n const nx = (canonical.x + 1 + dim) % dim;\n const nxw = canonical.x + 1 === dim ? tileID.wrap + 1 : tileID.wrap;\n\n const neighboringTiles = {};\n // add adjacent tiles\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y).key] = {backfilled: false};\n\n // Add upper neighboringTiles\n if (canonical.y > 0) {\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y - 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, tileID.wrap, canonical.z, canonical.x, canonical.y - 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y - 1).key] = {backfilled: false};\n }\n // Add lower neighboringTiles\n if (canonical.y + 1 < dim) {\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, pxw, canonical.z, px, canonical.y + 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, tileID.wrap, canonical.z, canonical.x, canonical.y + 1).key] = {backfilled: false};\n neighboringTiles[new OverscaledTileID(tileID.overscaledZ, nxw, canonical.z, nx, canonical.y + 1).key] = {backfilled: false};\n }\n\n return neighboringTiles;\n }\n\n\n unloadTile(tile ) {\n if (tile.demTexture) this.map.painter.saveTileTexture(tile.demTexture);\n if (tile.fbo) {\n tile.fbo.destroy();\n delete tile.fbo;\n }\n if (tile.dem) delete tile.dem;\n delete tile.neighboringTiles;\n\n tile.state = 'unloaded';\n this.dispatcher.send('removeDEMTile', { uid: tile.uid, source: this.id }, undefined, tile.workerID);\n }\n\n}\n\nmodule.exports = RasterDEMTileSource;\n","// \n\nconst {DEMData} = require('../data/dem_data');\n\n \n \n \n \n \n \n\n\nclass RasterDEMTileWorkerSource {\n \n \n \n\n constructor() {\n this.loading = {};\n this.loaded = {};\n }\n\n loadTile(params , callback ) {\n const source = params.source,\n uid = params.uid;\n\n if (!this.loading[source])\n this.loading[source] = {};\n\n const dem = new DEMData(uid);\n this.loading[source][uid] = dem;\n dem.loadFromImage(params.rawImageData);\n delete this.loading[source][uid];\n\n this.loaded[source] = this.loaded[source] || {};\n this.loaded[source][uid] = dem;\n callback(null, dem);\n }\n\n removeTile(params ) {\n const loaded = this.loaded[params.source],\n uid = params.uid;\n if (loaded && loaded[uid]) {\n delete loaded[uid];\n }\n }\n}\n\nmodule.exports = RasterDEMTileWorkerSource;\n","// \n\nconst util = require('../util/util');\nconst ajax = require('../util/ajax');\nconst Evented = require('../util/evented');\nconst loadTileJSON = require('./load_tilejson');\nconst normalizeURL = require('../util/mapbox').normalizeTileURL;\nconst TileBounds = require('./tile_bounds');\nconst Texture = require('../render/texture');\n\n \n \n \n \n \n \n\nclass RasterTileSource extends Evented {\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n this.setEventedParent(eventedParent);\n\n this.type = 'raster';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.roundZoom = true;\n this.scheme = 'xyz';\n this.tileSize = 512;\n this._loaded = false;\n\n this._options = util.extend({}, options);\n util.extend(this, util.pick(options, ['url', 'scheme', 'tileSize']));\n }\n\n load() {\n this.fire('dataloading', {dataType: 'source'});\n loadTileJSON(this._options, this.map._transformRequest, (err, tileJSON) => {\n if (err) {\n this.fire('error', err);\n } else if (tileJSON) {\n util.extend(this, tileJSON);\n if (tileJSON.bounds) this.tileBounds = new TileBounds(tileJSON.bounds, this.minzoom, this.maxzoom);\n\n // `content` is included here to prevent a race condition where `Style#_updateSources` is called\n // before the TileJSON arrives. this makes sure the tiles needed are loaded once TileJSON arrives\n // ref: https://github.com/mapbox/mapbox-gl-js/pull/4347#discussion_r104418088\n this.fire('data', {dataType: 'source', sourceDataType: 'metadata'});\n this.fire('data', {dataType: 'source', sourceDataType: 'content'});\n }\n });\n }\n\n onAdd(map ) {\n this.map = map;\n this.load();\n }\n\n serialize() {\n return util.extend({}, this._options);\n }\n\n hasTile(tileID ) {\n return !this.tileBounds || this.tileBounds.contains(tileID.canonical);\n }\n\n loadTile(tile , callback ) {\n const url = normalizeURL(tile.tileID.canonical.url(this.tiles, this.scheme), this.url, this.tileSize);\n tile.request = ajax.getImage(this.map._transformRequest(url, ajax.ResourceType.Tile), (err, img) => {\n delete tile.request;\n\n if (tile.aborted) {\n tile.state = 'unloaded';\n callback(null);\n } else if (err) {\n tile.state = 'errored';\n callback(err);\n } else if (img) {\n if (this.map._refreshExpiredTiles) tile.setExpiryData(img);\n delete (img ).cacheControl;\n delete (img ).expires;\n\n const context = this.map.painter.context;\n const gl = context.gl;\n tile.texture = this.map.painter.getTileTexture(img.width);\n if (tile.texture) {\n tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, img);\n } else {\n tile.texture = new Texture(context, img, gl.RGBA);\n tile.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE, gl.LINEAR_MIPMAP_NEAREST);\n\n if (context.extTextureFilterAnisotropic) {\n gl.texParameterf(gl.TEXTURE_2D, context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, context.extTextureFilterAnisotropicMax);\n }\n }\n gl.generateMipmap(gl.TEXTURE_2D);\n\n tile.state = 'loaded';\n\n callback(null);\n }\n });\n }\n\n abortTile(tile , callback ) {\n if (tile.request) {\n tile.request.abort();\n delete tile.request;\n }\n callback();\n }\n\n unloadTile(tile , callback ) {\n if (tile.texture) this.map.painter.saveTileTexture(tile.texture);\n callback();\n }\n\n hasTransition() {\n return false;\n }\n}\n\nmodule.exports = RasterTileSource;\n","// \n\nconst ajax = require('../util/ajax');\nconst Evented = require('../util/evented');\nconst window = require('../util/window');\n\nlet pluginRequested = false;\nlet pluginBlobURL = null;\n\nmodule.exports.evented = new Evented();\n\n \n\nmodule.exports.registerForPluginAvailability = function(\n callback \n) {\n if (pluginBlobURL) {\n callback({ pluginBlobURL: pluginBlobURL, errorCallback: module.exports.errorCallback});\n } else {\n module.exports.evented.once('pluginAvailable', callback);\n }\n return callback;\n};\n\n// Exposed so it can be stubbed out by tests\nmodule.exports.createBlobURL = function(response ) {\n return window.URL.createObjectURL(new window.Blob([response.data], {type: \"text/javascript\"}));\n};\n// Only exposed for tests\nmodule.exports.clearRTLTextPlugin = function() {\n pluginRequested = false;\n pluginBlobURL = null;\n};\n\nmodule.exports.setRTLTextPlugin = function(pluginURL , callback ) {\n if (pluginRequested) {\n throw new Error('setRTLTextPlugin cannot be called multiple times.');\n }\n pluginRequested = true;\n module.exports.errorCallback = callback;\n ajax.getArrayBuffer({ url: pluginURL }, (err, response) => {\n if (err) {\n callback(err);\n } else if (response) {\n pluginBlobURL = module.exports.createBlobURL(response);\n module.exports.evented.fire('pluginAvailable', { pluginBlobURL: pluginBlobURL, errorCallback: callback });\n }\n });\n};\n\nmodule.exports.applyArabicShaping = (null );\nmodule.exports.processBidirectionalText = (null );\n","// \n\nconst util = require('../util/util');\n\n \n \n \n \n \n \n\n/**\n * The `Source` interface must be implemented by each source type, including \"core\" types (`vector`, `raster`,\n * `video`, etc.) and all custom, third-party types.\n *\n * @class Source\n * @private\n *\n * @param {string} id The id for the source. Must not be used by any existing source.\n * @param {Object} options Source options, specific to the source type (except for `options.type`, which is always\n * required).\n * @param {string} options.type The source type, matching the value of `name` used in {@link Style#addSourceType}.\n * @param {Dispatcher} dispatcher A {@link Dispatcher} instance, which can be used to send messages to the workers.\n *\n * @fires data with `{dataType: 'source', sourceDataType: 'metadata'}` to indicate that any necessary metadata\n * has been loaded so that it's okay to call `loadTile`; and with `{dataType: 'source', sourceDataType: 'content'}`\n * to indicate that the source data has changed, so that any current caches should be flushed.\n * @property {string} id The id for the source. Must match the id passed to the constructor.\n * @property {number} minzoom\n * @property {number} maxzoom\n * @property {boolean} isTileClipped `false` if tiles can be drawn outside their boundaries, `true` if they cannot.\n * @property {boolean} reparseOverscaled `true` if tiles should be sent back to the worker for each overzoomed zoom\n * level, `false` if not.\n * @property {boolean} roundZoom `true` if zoom levels are rounded to the nearest integer in the source data, `false`\n * if they are floor-ed to the nearest integer.\n */\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n\n \n\n \n\n \n \n\n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\nconst sourceTypes = {\n 'vector': require('../source/vector_tile_source'),\n 'raster': require('../source/raster_tile_source'),\n 'raster-dem': require('../source/raster_dem_tile_source'),\n 'geojson': require('../source/geojson_source'),\n 'video': require('../source/video_source'),\n 'image': require('../source/image_source'),\n 'canvas': require('../source/canvas_source')\n};\n\n/*\n * Creates a tiled data source instance given an options object.\n *\n * @param id\n * @param {Object} source A source definition object compliant with\n * [`mapbox-gl-style-spec`](https://www.mapbox.com/mapbox-gl-style-spec/#sources) or, for a third-party source type,\n * with that type's requirements.\n * @param {Dispatcher} dispatcher\n * @returns {Source}\n */\nexports.create = function(id , specification , dispatcher , eventedParent ) {\n const source = new sourceTypes[specification.type](id, (specification ), dispatcher, eventedParent);\n\n if (source.id !== id) {\n throw new Error(`Expected Source id to be ${id} instead of ${source.id}`);\n }\n\n util.bindAll(['load', 'abort', 'unload', 'serialize', 'prepare'], source);\n return source;\n};\n\nexports.getType = function (name ) {\n return sourceTypes[name];\n};\n\nexports.setType = function (name , type ) {\n sourceTypes[name] = type;\n};\n\n \n \n \n","// \n\nconst createSource = require('./source').create;\nconst Tile = require('./tile');\nconst Evented = require('../util/evented');\nconst Cache = require('../util/lru_cache');\nconst Coordinate = require('../geo/coordinate');\nconst util = require('../util/util');\nconst EXTENT = require('../data/extent');\nconst Context = require('../gl/context');\nconst Point = require('@mapbox/point-geometry');\nconst browser = require('../util/browser');\nconst {OverscaledTileID} = require('./tile_id');\nconst assert = require('assert');\n\n \n \n \n \n \n \n \n \n\n/**\n * `SourceCache` is responsible for\n *\n * - creating an instance of `Source`\n * - forwarding events from `Source`\n * - caching tiles loaded from an instance of `Source`\n * - loading the tiles needed to render a given viewport\n * - unloading the cached tiles not needed to render a given viewport\n *\n * @private\n */\nclass SourceCache extends Evented {\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n constructor(id , options , dispatcher ) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n\n this.on('data', (e) => {\n // this._sourceLoaded signifies that the TileJSON is loaded if applicable.\n // if the source type does not come with a TileJSON, the flag signifies the\n // source data has loaded (i.e geojson has been tiled on the worker and is ready)\n if (e.dataType === 'source' && e.sourceDataType === 'metadata') this._sourceLoaded = true;\n\n // for sources with mutable data, this event fires when the underlying data\n // to a source is changed. (i.e. GeoJSONSource#setData and ImageSource#serCoordinates)\n if (this._sourceLoaded && !this._paused && e.dataType === \"source\" && e.sourceDataType === 'content') {\n this.reload();\n if (this.transform) {\n this.update(this.transform);\n }\n }\n });\n\n this.on('error', () => {\n this._sourceErrored = true;\n });\n\n this._source = createSource(id, options, dispatcher, this);\n\n this._tiles = {};\n this._cache = new Cache(0, this._unloadTile.bind(this));\n this._timers = {};\n this._cacheTimers = {};\n this._maxTileCacheSize = null;\n\n this._isIdRenderable = this._isIdRenderable.bind(this);\n\n this._coveredTiles = {};\n }\n\n onAdd(map ) {\n this.map = map;\n this._maxTileCacheSize = map ? map._maxTileCacheSize : null;\n if (this._source && this._source.onAdd) {\n this._source.onAdd(map);\n }\n }\n\n onRemove(map ) {\n if (this._source && this._source.onRemove) {\n this._source.onRemove(map);\n }\n }\n\n /**\n * Return true if no tile data is pending, tiles will not change unless\n * an additional API call is received.\n */\n loaded() {\n if (this._sourceErrored) { return true; }\n if (!this._sourceLoaded) { return false; }\n for (const t in this._tiles) {\n const tile = this._tiles[t];\n if (tile.state !== 'loaded' && tile.state !== 'errored')\n return false;\n }\n return true;\n }\n\n getSource() {\n return this._source;\n }\n\n pause() {\n this._paused = true;\n }\n\n getNeedsFullPlacement() {\n return this._needsFullPlacement;\n }\n\n resume() {\n if (!this._paused) return;\n const shouldReload = this._shouldReloadOnResume;\n this._paused = false;\n this._shouldReloadOnResume = false;\n if (shouldReload) this.reload();\n if (this.transform) this.update(this.transform);\n }\n\n _loadTile(tile , callback ) {\n return this._source.loadTile(tile, callback);\n }\n\n _unloadTile(tile ) {\n if (this._source.unloadTile)\n return this._source.unloadTile(tile, () => {});\n }\n\n _abortTile(tile ) {\n if (this._source.abortTile)\n return this._source.abortTile(tile, () => {});\n }\n\n serialize() {\n return this._source.serialize();\n }\n\n prepare(context ) {\n if (this._source.prepare) {\n this._source.prepare();\n }\n\n for (const i in this._tiles) {\n this._tiles[i].upload(context);\n }\n }\n\n /**\n * Return all tile ids ordered with z-order, and cast to numbers\n */\n getIds() {\n\n const compareKeyZoom = (a_, b_) => {\n const a = this._tiles[a_].tileID;\n const b = this._tiles[b_].tileID;\n const rotatedA = (new Point(a.canonical.x, a.canonical.y)).rotate(this.transform.angle);\n const rotatedB = (new Point(b.canonical.x, b.canonical.y)).rotate(this.transform.angle);\n return a.overscaledZ - b.overscaledZ || rotatedB.y - rotatedA.y || rotatedB.x - rotatedA.x;\n };\n\n return Object.keys(this._tiles).map(Number).sort(compareKeyZoom);\n }\n\n getRenderableIds() {\n return this.getIds().filter(this._isIdRenderable);\n }\n\n hasRenderableParent(tileID ) {\n const parentTile = this.findLoadedParent(tileID, 0, {});\n if (parentTile) {\n return this._isIdRenderable(parentTile.tileID.key);\n }\n return false;\n }\n\n _isIdRenderable(id ) {\n return this._tiles[id] && this._tiles[id].hasData() && !this._coveredTiles[id];\n }\n\n reload() {\n if (this._paused) {\n this._shouldReloadOnResume = true;\n return;\n }\n\n this._cache.reset();\n for (const i in this._tiles) {\n this._reloadTile(i, 'reloading');\n }\n }\n\n _reloadTile(id , state ) {\n const tile = this._tiles[id];\n\n // this potentially does not address all underlying\n // issues https://github.com/mapbox/mapbox-gl-js/issues/4252\n // - hard to tell without repro steps\n if (!tile) return;\n\n // The difference between \"loading\" tiles and \"reloading\" or \"expired\"\n // tiles is that \"reloading\"/\"expired\" tiles are \"renderable\".\n // Therefore, a \"loading\" tile cannot become a \"reloading\" tile without\n // first becoming a \"loaded\" tile.\n if (tile.state !== 'loading') {\n tile.state = state;\n }\n\n this._loadTile(tile, this._tileLoaded.bind(this, tile, id, state));\n }\n\n _tileLoaded(tile , id , previousState , err ) {\n if (err) {\n tile.state = 'errored';\n if (err.status !== 404) this._source.fire('error', {tile: tile, error: err});\n // continue to try loading parent/children tiles if a tile doesn't exist (404)\n else this.update(this.transform);\n return;\n }\n\n tile.timeAdded = browser.now();\n if (previousState === 'expired') tile.refreshedUponExpiration = true;\n this._setTileReloadTimer(id, tile);\n if (this.getSource().type === 'raster-dem' && tile.dem) this._backfillDEM(tile);\n this._source.fire('data', {dataType: 'source', tile: tile, coord: tile.tileID});\n\n // HACK this is necessary to fix https://github.com/mapbox/mapbox-gl-js/issues/2986\n if (this.map) this.map.painter.tileExtentVAO.vao = null;\n\n this._updatePlacement();\n if (this.map && this.getTileByID(id)) {\n // Only add this tile to the CrossTileSymbolIndex if it is still in the retain set\n // See issue #5837\n tile.added(this.map.painter.crossTileSymbolIndex);\n }\n }\n\n /**\n * For raster terrain source, backfill DEM to eliminate visible tile boundaries\n * @private\n */\n _backfillDEM(tile ) {\n const renderables = this.getRenderableIds();\n for (let i = 0; i < renderables.length; i++) {\n const borderId = renderables[i];\n if (tile.neighboringTiles && tile.neighboringTiles[borderId]) {\n const borderTile = this.getTileByID(borderId);\n fillBorder(tile, borderTile);\n fillBorder(borderTile, tile);\n }\n }\n\n function fillBorder(tile, borderTile) {\n tile.needsHillshadePrepare = true;\n let dx = borderTile.tileID.canonical.x - tile.tileID.canonical.x;\n const dy = borderTile.tileID.canonical.y - tile.tileID.canonical.y;\n const dim = Math.pow(2, tile.tileID.canonical.z);\n const borderId = borderTile.tileID.key;\n if (dx === 0 && dy === 0) return;\n\n if (Math.abs(dy) > 1) {\n return;\n }\n if (Math.abs(dx) > 1) {\n // Adjust the delta coordinate for world wraparound.\n if (Math.abs(dx + dim) === 1) {\n dx += dim;\n } else if (Math.abs(dx - dim) === 1) {\n dx -= dim;\n }\n }\n if (!borderTile.dem || !tile.dem) return;\n tile.dem.backfillBorder(borderTile.dem, dx, dy);\n if (tile.neighboringTiles && tile.neighboringTiles[borderId])\n tile.neighboringTiles[borderId].backfilled = true;\n }\n }\n /**\n * Get a specific tile by TileID\n */\n getTile(tileID ) {\n return this.getTileByID(tileID.key);\n }\n\n /**\n * Get a specific tile by id\n */\n getTileByID(id ) {\n return this._tiles[id];\n }\n\n /**\n * get the zoom level adjusted for the difference in map and source tilesizes\n */\n getZoom(transform ) {\n return transform.zoom + transform.scaleZoom(transform.tileSize / this._source.tileSize);\n }\n\n /**\n * Recursively find children of the given tile (up to maxCoveringZoom) that are already loaded;\n * adds found tiles to retain object; returns true if any child is found.\n */\n _findLoadedChildren(tileID , maxCoveringZoom , retain ) {\n let found = false;\n\n for (const id in this._tiles) {\n let tile = this._tiles[id];\n\n // only consider renderable tiles on higher zoom levels (up to maxCoveringZoom)\n if (retain[id] || !tile.hasData() || tile.tileID.overscaledZ <= tileID.overscaledZ || tile.tileID.overscaledZ > maxCoveringZoom) continue;\n\n // disregard tiles that are not descendants of the given tile coordinate\n const z2 = Math.pow(2, tile.tileID.canonical.z - tileID.canonical.z);\n if (Math.floor(tile.tileID.canonical.x / z2) !== tileID.canonical.x ||\n Math.floor(tile.tileID.canonical.y / z2) !== tileID.canonical.y)\n continue;\n\n // found loaded child\n retain[id] = tile.tileID;\n found = true;\n\n // loop through parents; retain the topmost loaded one if found\n while (tile && tile.tileID.overscaledZ - 1 > tileID.overscaledZ) {\n const parent = tile.tileID.scaledTo(tile.tileID.overscaledZ - 1);\n if (!parent) break;\n\n tile = this._tiles[parent.key];\n if (tile && tile.hasData()) {\n delete retain[id];\n retain[parent.key] = parent;\n }\n }\n }\n return found;\n }\n\n /**\n * Find a loaded parent of the given tile (up to minCoveringZoom);\n * adds the found tile to retain object and returns the tile if found\n */\n findLoadedParent(tileID , minCoveringZoom , retain ) {\n for (let z = tileID.overscaledZ - 1; z >= minCoveringZoom; z--) {\n const parent = tileID.scaledTo(z);\n if (!parent) return;\n const id = String(parent.key);\n const tile = this._tiles[id];\n if (tile && tile.hasData()) {\n retain[id] = parent;\n return tile;\n }\n if (this._cache.has(id)) {\n retain[id] = parent;\n return this._cache.get(id);\n }\n }\n }\n\n /**\n * Resizes the tile cache based on the current viewport's size\n * or the maxTileCacheSize option passed during map creation\n *\n * Larger viewports use more tiles and need larger caches. Larger viewports\n * are more likely to be found on devices with more memory and on pages where\n * the map is more important.\n */\n updateCacheSize(transform ) {\n const widthInTiles = Math.ceil(transform.width / this._source.tileSize) + 1;\n const heightInTiles = Math.ceil(transform.height / this._source.tileSize) + 1;\n const approxTilesInView = widthInTiles * heightInTiles;\n const commonZoomRange = 5;\n\n const viewDependentMaxSize = Math.floor(approxTilesInView * commonZoomRange);\n const maxSize = typeof this._maxTileCacheSize === 'number' ? Math.min(this._maxTileCacheSize, viewDependentMaxSize) : viewDependentMaxSize;\n\n this._cache.setMaxSize(maxSize);\n }\n\n /**\n * Removes tiles that are outside the viewport and adds new tiles that\n * are inside the viewport.\n */\n update(transform ) {\n this.transform = transform;\n if (!this._sourceLoaded || this._paused) { return; }\n\n this.updateCacheSize(transform);\n // Covered is a list of retained tiles who's areas are fully covered by other,\n // better, retained tiles. They are not drawn separately.\n this._coveredTiles = {};\n\n let idealTileIDs;\n if (!this.used) {\n idealTileIDs = [];\n } else if (this._source.tileID) {\n idealTileIDs = transform.getVisibleUnwrappedCoordinates((this._source.tileID ))\n .map((unwrapped) => new OverscaledTileID(unwrapped.canonical.z, unwrapped.wrap, unwrapped.canonical.z, unwrapped.canonical.x, unwrapped.canonical.y));\n } else {\n idealTileIDs = transform.coveringTiles({\n tileSize: this._source.tileSize,\n minzoom: this._source.minzoom,\n maxzoom: this._source.maxzoom,\n roundZoom: this._source.roundZoom,\n reparseOverscaled: this._source.reparseOverscaled\n });\n\n if (this._source.hasTile) {\n idealTileIDs = idealTileIDs.filter((coord) => (this._source.hasTile )(coord));\n }\n }\n\n // Determine the overzooming/underzooming amounts.\n const zoom = (this._source.roundZoom ? Math.round : Math.floor)(this.getZoom(transform));\n const minCoveringZoom = Math.max(zoom - SourceCache.maxOverzooming, this._source.minzoom);\n const maxCoveringZoom = Math.max(zoom + SourceCache.maxUnderzooming, this._source.minzoom);\n\n // Retain is a list of tiles that we shouldn't delete, even if they are not\n // the most ideal tile for the current viewport. This may include tiles like\n // parent or child tiles that are *already* loaded.\n const retain = this._updateRetainedTiles(idealTileIDs, zoom);\n\n const parentsForFading = {};\n\n if (isRasterType(this._source.type)) {\n const ids = Object.keys(retain);\n for (let k = 0; k < ids.length; k++) {\n const id = ids[k];\n const tileID = retain[id];\n assert(tileID.key === +id);\n const tile = this._tiles[id];\n if (!tile) continue;\n\n // If the drawRasterTile has never seen this tile, then\n // tile.fadeEndTime may be unset. In that case, or if\n // fadeEndTime is in the future, then this tile is still\n // fading in. Find tiles to cross-fade with it.\n if (typeof tile.fadeEndTime === 'undefined' || tile.fadeEndTime >= browser.now()) {\n if (this._findLoadedChildren(tileID, maxCoveringZoom, retain)) {\n retain[id] = tileID;\n }\n const parentTile = this.findLoadedParent(tileID, minCoveringZoom, parentsForFading);\n if (parentTile) {\n this._addTile(parentTile.tileID);\n }\n }\n }\n }\n\n let fadedParent;\n for (fadedParent in parentsForFading) {\n if (!retain[fadedParent]) {\n // If a tile is only needed for fading, mark it as covered so that it isn't rendered on it's own.\n this._coveredTiles[fadedParent] = true;\n }\n }\n for (fadedParent in parentsForFading) {\n retain[fadedParent] = parentsForFading[fadedParent];\n }\n // Remove the tiles we don't need anymore.\n const remove = util.keysDifference(this._tiles, retain);\n for (let i = 0; i < remove.length; i++) {\n this._removeTile(remove[i]);\n }\n }\n\n _updateRetainedTiles(idealTileIDs , zoom ) {\n const retain = {};\n const checked = {};\n const minCoveringZoom = Math.max(zoom - SourceCache.maxOverzooming, this._source.minzoom);\n const maxCoveringZoom = Math.max(zoom + SourceCache.maxUnderzooming, this._source.minzoom);\n\n for (let i = 0; i < idealTileIDs.length; i++) {\n const tileID = idealTileIDs[i];\n let tile = this._addTile(tileID);\n let parentWasRequested = false;\n if (tile.hasData()) {\n retain[tileID.key] = tileID;\n } else {\n // The tile we require is not yet loaded or does not exist.\n // We are now attempting to load child and parent tiles.\n\n // As we descend up and down the tile pyramid of the ideal tile, we check whether the parent\n // tile has been previously requested (and errored in this case due to the previous conditional)\n // in order to determine if we need to request its parent.\n parentWasRequested = tile.wasRequested();\n\n // The tile isn't loaded yet, but retain it anyway because it's an ideal tile.\n retain[tileID.key] = tileID;\n let covered = true;\n const overscaledZ = zoom + 1;\n if (overscaledZ > this._source.maxzoom) {\n // We're looking for an overzoomed child tile.\n const childCoord = tileID.children(this._source.maxzoom)[0];\n const childTile = this.getTile(childCoord);\n if (!!childTile && childTile.hasData()) {\n retain[childCoord.key] = childCoord;\n } else {\n covered = false;\n }\n } else {\n this._findLoadedChildren(tileID, maxCoveringZoom, retain);\n // check if all 4 immediate children are loaded (i.e. the missing ideal tile is covered)\n const children = tileID.children(this._source.maxzoom);\n for (let j = 0; j < children.length; j++) {\n if (!retain[children[j].key]) {\n covered = false;\n break;\n }\n }\n }\n\n if (!covered) {\n\n // We couldn't find child tiles that entirely cover the ideal tile.\n for (let overscaledZ = tileID.overscaledZ - 1; overscaledZ >= minCoveringZoom; --overscaledZ) {\n\n const parentId = tileID.scaledTo(overscaledZ);\n if (checked[parentId.key]) {\n // Break parent tile ascent, this route has been previously checked by another child.\n break;\n } else {\n checked[parentId.key] = true;\n }\n\n tile = this.getTile(parentId);\n if (!tile && parentWasRequested) {\n tile = this._addTile(parentId);\n }\n\n if (tile) {\n retain[parentId.key] = parentId;\n // Save the current values, since they're the parent of the next iteration\n // of the parent tile ascent loop.\n parentWasRequested = tile.wasRequested();\n if (tile.hasData()) {\n break;\n }\n }\n }\n }\n }\n }\n\n return retain;\n }\n\n /**\n * Add a tile, given its coordinate, to the pyramid.\n * @private\n */\n _addTile(tileID ) {\n let tile = this._tiles[tileID.key];\n if (tile)\n return tile;\n\n\n tile = this._cache.getAndRemove((tileID.key ));\n if (tile) {\n this._updatePlacement();\n if (this.map)\n tile.added(this.map.painter.crossTileSymbolIndex);\n if (this._cacheTimers[tileID.key]) {\n clearTimeout(this._cacheTimers[tileID.key]);\n delete this._cacheTimers[tileID.key];\n this._setTileReloadTimer(tileID.key, tile);\n }\n }\n\n const cached = Boolean(tile);\n if (!cached) {\n tile = new Tile(tileID, this._source.tileSize * tileID.overscaleFactor());\n this._loadTile(tile, this._tileLoaded.bind(this, tile, tileID.key, tile.state));\n }\n\n // Impossible, but silence flow.\n if (!tile) return (null );\n\n tile.uses++;\n this._tiles[tileID.key] = tile;\n if (!cached) this._source.fire('dataloading', {tile: tile, coord: tile.tileID, dataType: 'source'});\n\n return tile;\n }\n\n _setTileReloadTimer(id , tile ) {\n const expiryTimeout = tile.getExpiryTimeout();\n if (expiryTimeout) {\n this._timers[id] = setTimeout(() => {\n this._reloadTile(id, 'expired');\n delete this._timers[id];\n }, expiryTimeout);\n }\n }\n\n _setCacheInvalidationTimer(id , tile ) {\n const expiryTimeout = tile.getExpiryTimeout();\n if (expiryTimeout) {\n this._cacheTimers[id] = setTimeout(() => {\n this._cache.remove((id ));\n delete this._cacheTimers[id];\n }, expiryTimeout);\n }\n }\n\n /**\n * Remove a tile, given its id, from the pyramid\n * @private\n */\n _removeTile(id ) {\n const tile = this._tiles[id];\n if (!tile)\n return;\n\n tile.uses--;\n delete this._tiles[id];\n if (this._timers[id]) {\n clearTimeout(this._timers[id]);\n delete this._timers[id];\n }\n\n if (tile.uses > 0)\n return;\n\n this._updatePlacement();\n if (this.map)\n tile.removed(this.map.painter.crossTileSymbolIndex);\n\n if (tile.hasData()) {\n tile.tileID = tile.tileID.wrapped();\n const wrappedId = tile.tileID.key;\n this._cache.add((wrappedId ), tile);\n this._setCacheInvalidationTimer(wrappedId, tile);\n } else {\n tile.aborted = true;\n this._abortTile(tile);\n this._unloadTile(tile);\n }\n }\n\n _updatePlacement() {\n this._needsFullPlacement = true;\n }\n\n /**\n * Remove all tiles from this pyramid\n */\n clearTiles() {\n this._shouldReloadOnResume = false;\n this._paused = false;\n\n for (const id in this._tiles)\n this._removeTile(id);\n this._cache.reset();\n }\n\n /**\n * Search through our current tiles and attempt to find the tiles that\n * cover the given bounds.\n * @param queryGeometry coordinates of the corners of bounding rectangle\n * @returns {Array<Object>} result items have {tile, minX, maxX, minY, maxY}, where min/max bounding values are the given bounds transformed in into the coordinate space of this tile.\n */\n tilesIn(queryGeometry ) {\n const tileResults = [];\n const ids = this.getIds();\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n const z = queryGeometry[0].zoom;\n\n for (let k = 0; k < queryGeometry.length; k++) {\n const p = queryGeometry[k];\n minX = Math.min(minX, p.column);\n minY = Math.min(minY, p.row);\n maxX = Math.max(maxX, p.column);\n maxY = Math.max(maxY, p.row);\n }\n\n\n for (let i = 0; i < ids.length; i++) {\n const tile = this._tiles[ids[i]];\n const tileID = tile.tileID;\n\n const tileSpaceBounds = [\n coordinateToTilePoint(tileID, new Coordinate(minX, minY, z)),\n coordinateToTilePoint(tileID, new Coordinate(maxX, maxY, z))\n ];\n\n if (tileSpaceBounds[0].x < EXTENT && tileSpaceBounds[0].y < EXTENT &&\n tileSpaceBounds[1].x >= 0 && tileSpaceBounds[1].y >= 0) {\n\n const tileSpaceQueryGeometry = [];\n for (let j = 0; j < queryGeometry.length; j++) {\n tileSpaceQueryGeometry.push(coordinateToTilePoint(tileID, queryGeometry[j]));\n }\n\n tileResults.push({\n tile: tile,\n tileID: tileID,\n queryGeometry: [tileSpaceQueryGeometry],\n scale: Math.pow(2, this.transform.zoom - tile.tileID.overscaledZ)\n });\n }\n }\n\n return tileResults;\n }\n\n commitPlacement(collisionIndex , collisionFadeTimes ) {\n this._needsFullPlacement = false;\n const ids = this.getIds();\n for (let i = 0; i < ids.length; i++) {\n const tile = this.getTileByID(ids[i]);\n tile.commitPlacement(collisionIndex, collisionFadeTimes, this.transform.angle);\n }\n }\n\n getVisibleCoordinates() {\n const coords = this.getRenderableIds().map((id) => this._tiles[id].tileID);\n for (const coord of coords) {\n coord.posMatrix = this.transform.calculatePosMatrix(coord.toUnwrapped());\n }\n return coords;\n }\n\n hasTransition() {\n if (this._source.hasTransition()) {\n return true;\n }\n\n if (isRasterType(this._source.type)) {\n for (const id in this._tiles) {\n const tile = this._tiles[id];\n if (tile.fadeEndTime !== undefined && tile.fadeEndTime >= browser.now()) {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n\nSourceCache.maxOverzooming = 10;\nSourceCache.maxUnderzooming = 3;\n\n/**\n * Convert a coordinate to a point in a tile's coordinate space.\n * @private\n */\nfunction coordinateToTilePoint(tileID , coord ) {\n const zoomedCoord = coord.zoomTo(tileID.canonical.z);\n return new Point(\n (zoomedCoord.column - (tileID.canonical.x + tileID.wrap * Math.pow(2, tileID.canonical.z))) * EXTENT,\n (zoomedCoord.row - tileID.canonical.y) * EXTENT\n );\n}\n\nfunction isRasterType(type) {\n return type === 'raster' || type === 'image' || type === 'video';\n}\n\nmodule.exports = SourceCache;\n","// \n\nconst util = require('../util/util');\nconst deserializeBucket = require('../data/bucket').deserialize;\nconst SymbolBucket = require('../data/bucket/symbol_bucket');\nconst FeatureIndex = require('../data/feature_index');\nconst vt = require('@mapbox/vector-tile');\nconst Protobuf = require('pbf');\nconst GeoJSONFeature = require('../util/vectortile_to_geojson');\nconst featureFilter = require('../style-spec/feature_filter');\nconst CollisionIndex = require('../symbol/collision_index');\nconst {\n RasterBoundsArray,\n CollisionBoxArray\n} = require('../data/array_types');\nconst rasterBoundsAttributes = require('../data/raster_bounds_attributes');\nconst EXTENT = require('../data/extent');\nconst Point = require('@mapbox/point-geometry');\nconst Texture = require('../render/texture');\nconst {SegmentVector} = require('../data/segment');\nconst {TriangleIndexArray} = require('../data/index_array_type');\nconst projection = require('../symbol/projection');\nconst {performSymbolPlacement, updateOpacities} = require('../symbol/symbol_placement');\nconst pixelsToTileUnits = require('../source/pixels_to_tile_units');\nconst browser = require('../util/browser');\n\nconst CLOCK_SKEW_RETRY_TIMEOUT = 30000;\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n /* Tile data was previously loaded, but has expired per its\n * HTTP headers and is in the process of refreshing. */\n\n/**\n * A tile object is the combination of a Coordinate, which defines\n * its place, as well as a unique ID and data tracking for its content\n *\n * @private\n */\nclass Tile {\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n /**\n * @param {OverscaledTileID} tileID\n * @param size\n */\n constructor(tileID , size ) {\n this.tileID = tileID;\n this.uid = util.uniqueId();\n this.uses = 0;\n this.tileSize = size;\n this.buckets = {};\n this.expirationTime = null;\n\n // Counts the number of times a response was already expired when\n // received. We're using this to add a delay when making a new request\n // so we don't have to keep retrying immediately in case of a server\n // serving expired tiles.\n this.expiredRequestCount = 0;\n\n this.state = 'loading';\n }\n\n registerFadeDuration(duration ) {\n const fadeEndTime = duration + this.timeAdded;\n if (fadeEndTime < browser.now()) return;\n if (this.fadeEndTime && fadeEndTime < this.fadeEndTime) return;\n\n this.fadeEndTime = fadeEndTime;\n }\n\n wasRequested() {\n return this.state === 'errored' || this.state === 'loaded' || this.state === 'reloading';\n }\n\n /**\n * Given a data object with a 'buffers' property, load it into\n * this tile's elementGroups and buffers properties and set loaded\n * to true. If the data is null, like in the case of an empty\n * GeoJSON tile, no-op but still set loaded to true.\n * @param {Object} data\n * @param painter\n * @returns {undefined}\n * @private\n */\n loadVectorData(data , painter ) {\n if (this.hasData()) {\n this.unloadVectorData();\n }\n\n this.state = 'loaded';\n\n // empty GeoJSON tile\n if (!data) {\n this.collisionBoxArray = new CollisionBoxArray();\n return;\n }\n\n if (data.rawTileData) {\n // Only vector tiles have rawTileData\n this.rawTileData = data.rawTileData;\n }\n this.collisionBoxArray = data.collisionBoxArray;\n this.featureIndex = data.featureIndex;\n this.featureIndex.rawTileData = this.rawTileData;\n this.buckets = deserializeBucket(data.buckets, painter.style);\n\n if (data.iconAtlasImage) {\n this.iconAtlasImage = data.iconAtlasImage;\n }\n if (data.glyphAtlasImage) {\n this.glyphAtlasImage = data.glyphAtlasImage;\n }\n }\n\n /**\n * Release any data or WebGL resources referenced by this tile.\n * @returns {undefined}\n * @private\n */\n unloadVectorData() {\n if (this.state === 'reloading') {\n this.justReloaded = true;\n }\n\n for (const id in this.buckets) {\n this.buckets[id].destroy();\n }\n this.buckets = {};\n\n if (this.iconAtlasTexture) {\n this.iconAtlasTexture.destroy();\n }\n if (this.glyphAtlasTexture) {\n this.glyphAtlasTexture.destroy();\n }\n\n this.collisionBoxArray = null;\n this.featureIndex = null;\n this.state = 'unloaded';\n }\n\n unloadDEMData() {\n this.dem = null;\n this.neighboringTiles = null;\n this.state = 'unloaded';\n }\n\n added(crossTileSymbolIndex ) {\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket instanceof SymbolBucket) {\n crossTileSymbolIndex.addTileLayer(id, this.tileID, bucket.symbolInstances);\n }\n }\n }\n\n removed(crossTileSymbolIndex ) {\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket instanceof SymbolBucket) {\n crossTileSymbolIndex.removeTileLayer(id, this.tileID);\n }\n }\n }\n\n placeLayer(showCollisionBoxes , collisionIndex , layer , sourceID ) {\n const bucket = this.getBucket(layer);\n const collisionBoxArray = this.collisionBoxArray;\n\n if (bucket && bucket instanceof SymbolBucket && collisionBoxArray) {\n const posMatrix = collisionIndex.transform.calculatePosMatrix(this.tileID.toUnwrapped());\n\n const pitchWithMap = bucket.layers[0].layout.get('text-pitch-alignment') === 'map';\n const textPixelRatio = EXTENT / this.tileSize; // text size is not meant to be affected by scale\n const pixelRatio = pixelsToTileUnits(this, 1, collisionIndex.transform.zoom);\n\n const labelPlaneMatrix = projection.getLabelPlaneMatrix(posMatrix, pitchWithMap, true, collisionIndex.transform, pixelRatio);\n performSymbolPlacement(bucket, collisionIndex, showCollisionBoxes, collisionIndex.transform.zoom, textPixelRatio, posMatrix, labelPlaneMatrix, this.tileID.key, sourceID, collisionBoxArray);\n }\n }\n\n commitPlacement(collisionIndex , collisionFadeTimes , angle ) {\n // Start all collision animations at the same time\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (bucket instanceof SymbolBucket) {\n updateOpacities(bucket, collisionFadeTimes, this.justReloaded);\n bucket.sortFeatures(angle);\n }\n }\n\n // Don't update the collision index used for queryRenderedFeatures\n // until all layers have been updated to the same state\n if (this.featureIndex) {\n this.featureIndex.setCollisionIndex(collisionIndex);\n }\n\n this.justReloaded = false;\n }\n\n getBucket(layer ) {\n return this.buckets[layer.id];\n }\n\n upload(context ) {\n for (const id in this.buckets) {\n const bucket = this.buckets[id];\n if (!bucket.uploaded) {\n bucket.upload(context);\n bucket.uploaded = true;\n }\n }\n\n const gl = context.gl;\n\n if (this.iconAtlasImage) {\n this.iconAtlasTexture = new Texture(context, this.iconAtlasImage, gl.RGBA);\n this.iconAtlasImage = null;\n }\n\n if (this.glyphAtlasImage) {\n this.glyphAtlasTexture = new Texture(context, this.glyphAtlasImage, gl.ALPHA);\n this.glyphAtlasImage = null;\n }\n }\n\n queryRenderedFeatures(layers ,\n queryGeometry ,\n scale ,\n params ,\n bearing ,\n sourceID ) {\n if (!this.featureIndex || !this.collisionBoxArray)\n return {};\n\n // Determine the additional radius needed factoring in property functions\n let additionalRadius = 0;\n for (const id in layers) {\n const bucket = this.getBucket(layers[id]);\n if (bucket) {\n additionalRadius = Math.max(additionalRadius, layers[id].queryRadius(bucket));\n }\n }\n\n return this.featureIndex.query({\n queryGeometry: queryGeometry,\n scale: scale,\n tileSize: this.tileSize,\n bearing: bearing,\n params: params,\n additionalRadius: additionalRadius,\n collisionBoxArray: this.collisionBoxArray,\n sourceID: sourceID\n }, layers);\n }\n\n querySourceFeatures(result , params ) {\n if (!this.rawTileData) return;\n\n if (!this.vtLayers) {\n this.vtLayers = new vt.VectorTile(new Protobuf(this.rawTileData)).layers;\n }\n\n const sourceLayer = params ? params.sourceLayer : '';\n const layer = this.vtLayers._geojsonTileLayer || this.vtLayers[sourceLayer];\n\n if (!layer) return;\n\n const filter = featureFilter(params && params.filter);\n const coord = { z: this.tileID.overscaledZ, x: this.tileID.canonical.x, y: this.tileID.canonical.y };\n\n for (let i = 0; i < layer.length; i++) {\n const feature = layer.feature(i);\n if (filter({zoom: this.tileID.overscaledZ}, feature)) {\n const geojsonFeature = new GeoJSONFeature(feature, coord.z, coord.x, coord.y);\n (geojsonFeature ).tile = coord;\n result.push(geojsonFeature);\n }\n }\n }\n\n clearMask() {\n if (this.segments) {\n this.segments.destroy();\n delete this.segments;\n }\n if (this.maskedBoundsBuffer) {\n this.maskedBoundsBuffer.destroy();\n delete this.maskedBoundsBuffer;\n }\n if (this.maskedIndexBuffer) {\n this.maskedIndexBuffer.destroy();\n delete this.maskedIndexBuffer;\n }\n }\n\n setMask(mask , context ) {\n\n // don't redo buffer work if the mask is the same;\n if (util.deepEqual(this.mask, mask)) return;\n\n this.mask = mask;\n this.clearMask();\n\n // We want to render the full tile, and keeping the segments/vertices/indices empty means\n // using the global shared buffers for covering the entire tile.\n if (util.deepEqual(mask, {'0': true})) return;\n\n const maskedBoundsArray = new RasterBoundsArray();\n const indexArray = new TriangleIndexArray();\n\n this.segments = new SegmentVector();\n // Create a new segment so that we will upload (empty) buffers even when there is nothing to\n // draw for this tile.\n this.segments.prepareSegment(0, maskedBoundsArray, indexArray);\n\n const maskArray = Object.keys(mask);\n for (let i = 0; i < maskArray.length; i++) {\n const maskCoord = mask[maskArray[i]];\n const vertexExtent = EXTENT >> maskCoord.z;\n const tlVertex = new Point(maskCoord.x * vertexExtent, maskCoord.y * vertexExtent);\n const brVertex = new Point(tlVertex.x + vertexExtent, tlVertex.y + vertexExtent);\n\n // not sure why flow is complaining here because it doesn't complain at L401\n const segment = (this.segments ).prepareSegment(4, maskedBoundsArray, indexArray);\n\n maskedBoundsArray.emplaceBack(tlVertex.x, tlVertex.y, tlVertex.x, tlVertex.y);\n maskedBoundsArray.emplaceBack(brVertex.x, tlVertex.y, brVertex.x, tlVertex.y);\n maskedBoundsArray.emplaceBack(tlVertex.x, brVertex.y, tlVertex.x, brVertex.y);\n maskedBoundsArray.emplaceBack(brVertex.x, brVertex.y, brVertex.x, brVertex.y);\n\n const offset = segment.vertexLength;\n // 0, 1, 2\n // 1, 2, 3\n indexArray.emplaceBack(offset, offset + 1, offset + 2);\n indexArray.emplaceBack(offset + 1, offset + 2, offset + 3);\n\n segment.vertexLength += 4;\n segment.primitiveLength += 2;\n }\n\n this.maskedBoundsBuffer = context.createVertexBuffer(maskedBoundsArray, rasterBoundsAttributes.members);\n this.maskedIndexBuffer = context.createIndexBuffer(indexArray);\n }\n\n hasData() {\n return this.state === 'loaded' || this.state === 'reloading' || this.state === 'expired';\n }\n\n setExpiryData(data ) {\n const prior = this.expirationTime;\n\n if (data.cacheControl) {\n const parsedCC = util.parseCacheControl(data.cacheControl);\n if (parsedCC['max-age']) this.expirationTime = Date.now() + parsedCC['max-age'] * 1000;\n } else if (data.expires) {\n this.expirationTime = new Date(data.expires).getTime();\n }\n\n if (this.expirationTime) {\n const now = Date.now();\n let isExpired = false;\n\n if (this.expirationTime > now) {\n isExpired = false;\n } else if (!prior) {\n isExpired = true;\n } else if (this.expirationTime < prior) {\n // Expiring date is going backwards:\n // fall back to exponential backoff\n isExpired = true;\n\n } else {\n const delta = this.expirationTime - prior;\n\n if (!delta) {\n // Server is serving the same expired resource over and over: fall\n // back to exponential backoff.\n isExpired = true;\n\n } else {\n // Assume that either the client or the server clock is wrong and\n // try to interpolate a valid expiration date (from the client POV)\n // observing a minimum timeout.\n this.expirationTime = now + Math.max(delta, CLOCK_SKEW_RETRY_TIMEOUT);\n\n }\n }\n\n if (isExpired) {\n this.expiredRequestCount++;\n this.state = 'expired';\n } else {\n this.expiredRequestCount = 0;\n }\n }\n }\n\n getExpiryTimeout() {\n if (this.expirationTime) {\n if (this.expiredRequestCount) {\n return 1000 * (1 << Math.min(this.expiredRequestCount - 1, 31));\n } else {\n // Max value for `setTimeout` implementations is a 32 bit integer; cap this accordingly\n return Math.min(this.expirationTime - new Date().getTime(), Math.pow(2, 31) - 1);\n }\n }\n }\n}\n\nmodule.exports = Tile;\n","// \n\nconst LngLatBounds = require('../geo/lng_lat_bounds');\nconst clamp = require('../util/util').clamp;\n\n \n\nclass TileBounds {\n \n \n \n\n constructor(bounds , minzoom , maxzoom ) {\n this.bounds = LngLatBounds.convert(this.validateBounds(bounds));\n this.minzoom = minzoom || 0;\n this.maxzoom = maxzoom || 24;\n }\n\n validateBounds(bounds ) {\n // make sure the bounds property contains valid longitude and latitudes\n if (!Array.isArray(bounds) || bounds.length !== 4) return [-180, -90, 180, 90];\n return [Math.max(-180, bounds[0]), Math.max(-90, bounds[1]), Math.min(180, bounds[2]), Math.min(90, bounds[3])];\n }\n\n contains(tileID ) {\n const level = {\n minX: Math.floor(this.lngX(this.bounds.getWest(), tileID.z)),\n minY: Math.floor(this.latY(this.bounds.getNorth(), tileID.z)),\n maxX: Math.ceil(this.lngX(this.bounds.getEast(), tileID.z)),\n maxY: Math.ceil(this.latY(this.bounds.getSouth(), tileID.z))\n };\n const hit = tileID.x >= level.minX && tileID.x < level.maxX && tileID.y >= level.minY && tileID.y < level.maxY;\n return hit;\n }\n\n lngX(lng , zoom ) {\n return (lng + 180) * (Math.pow(2, zoom) / 360);\n }\n\n latY(lat , zoom ) {\n const f = clamp(Math.sin(Math.PI / 180 * lat), -0.9999, 0.9999);\n const scale = Math.pow(2, zoom) / (2 * Math.PI);\n return Math.pow(2, zoom - 1) + 0.5 * Math.log((1 + f) / (1 - f)) * -scale;\n }\n}\n\nmodule.exports = TileBounds;\n","// \n\nconst WhooTS = require('@mapbox/whoots-js');\nconst assert = require('assert');\nconst {register} = require('../util/web_worker_transfer');\nconst Coordinate = require('../geo/coordinate');\n\nclass CanonicalTileID {\n \n \n \n \n\n constructor(z , x , y ) {\n assert(z >= 0 && z <= 25);\n assert(x >= 0 && x < Math.pow(2, z));\n assert(y >= 0 && y < Math.pow(2, z));\n this.z = z;\n this.x = x;\n this.y = y;\n this.key = calculateKey(0, z, x, y);\n }\n\n equals(id ) {\n return this.z === id.z && this.x === id.x && this.y === id.y;\n }\n\n // given a list of urls, choose a url template and return a tile URL\n url(urls , scheme ) {\n const bbox = WhooTS.getTileBBox(this.x, this.y, this.z);\n const quadkey = getQuadkey(this.z, this.x, this.y);\n\n return urls[(this.x + this.y) % urls.length]\n .replace('{prefix}', (this.x % 16).toString(16) + (this.y % 16).toString(16))\n .replace('{z}', String(this.z))\n .replace('{x}', String(this.x))\n .replace('{y}', String(scheme === 'tms' ? (Math.pow(2, this.z) - this.y - 1) : this.y))\n .replace('{quadkey}', quadkey)\n .replace('{bbox-epsg-3857}', bbox);\n }\n}\n\nclass UnwrappedTileID {\n \n \n \n\n constructor(wrap , canonical ) {\n this.wrap = wrap;\n this.canonical = canonical;\n this.key = calculateKey(wrap, canonical.z, canonical.x, canonical.y);\n }\n}\n\nclass OverscaledTileID {\n \n \n \n \n \n\n constructor(overscaledZ , wrap , z , x , y ) {\n assert(overscaledZ >= z);\n this.overscaledZ = overscaledZ;\n this.wrap = wrap;\n this.canonical = new CanonicalTileID(z, +x, +y);\n this.key = calculateKey(wrap, overscaledZ, x, y);\n }\n\n scaledTo(targetZ ) {\n assert(targetZ <= this.overscaledZ);\n const zDifference = this.canonical.z - targetZ;\n if (targetZ > this.canonical.z) {\n return new OverscaledTileID(targetZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);\n } else {\n return new OverscaledTileID(targetZ, this.wrap, targetZ, this.canonical.x >> zDifference, this.canonical.y >> zDifference);\n }\n }\n\n isChildOf(parent ) {\n const zDifference = this.canonical.z - parent.canonical.z;\n // We're first testing for z == 0, to avoid a 32 bit shift, which is undefined.\n return parent.overscaledZ === 0 || (\n parent.overscaledZ < this.overscaledZ &&\n parent.canonical.x === (this.canonical.x >> zDifference) &&\n parent.canonical.y === (this.canonical.y >> zDifference));\n }\n\n children(sourceMaxZoom ) {\n if (this.overscaledZ >= sourceMaxZoom) {\n // return a single tile coord representing a an overscaled tile\n return [new OverscaledTileID(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];\n }\n\n const z = this.canonical.z + 1;\n const x = this.canonical.x * 2;\n const y = this.canonical.y * 2;\n return [\n new OverscaledTileID(z, this.wrap, z, x, y),\n new OverscaledTileID(z, this.wrap, z, x + 1, y),\n new OverscaledTileID(z, this.wrap, z, x, y + 1),\n new OverscaledTileID(z, this.wrap, z, x + 1, y + 1)\n ];\n }\n\n isLessThan(rhs ) {\n if (this.wrap < rhs.wrap) return true;\n if (this.wrap > rhs.wrap) return false;\n\n if (this.overscaledZ < rhs.overscaledZ) return true;\n if (this.overscaledZ > rhs.overscaledZ) return false;\n\n if (this.canonical.x < rhs.canonical.x) return true;\n if (this.canonical.x > rhs.canonical.x) return false;\n\n if (this.canonical.y < rhs.canonical.y) return true;\n return false;\n }\n\n wrapped() {\n return new OverscaledTileID(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);\n }\n\n overscaleFactor() {\n return Math.pow(2, this.overscaledZ - this.canonical.z);\n }\n\n toUnwrapped() {\n return new UnwrappedTileID(this.wrap, this.canonical);\n }\n\n toString() {\n return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;\n }\n\n toCoordinate() {\n return new Coordinate(this.canonical.x + Math.pow(2, this.wrap), this.canonical.y, this.canonical.z);\n }\n}\n\nfunction calculateKey(wrap , z , x , y ) {\n wrap *= 2;\n if (wrap < 0) wrap = wrap * -1 - 1;\n const dim = 1 << z;\n return ((dim * dim * wrap + dim * y + x) * 32) + z;\n}\n\n\nfunction getQuadkey(z, x, y) {\n let quadkey = '', mask;\n for (let i = z; i > 0; i--) {\n mask = 1 << (i - 1);\n quadkey += ((x & mask ? 1 : 0) + (y & mask ? 2 : 0));\n }\n return quadkey;\n}\n\nregister('CanonicalTileID', CanonicalTileID);\nregister('OverscaledTileID', OverscaledTileID, {omit: ['posMatrix']});\n\nmodule.exports = {\n CanonicalTileID: CanonicalTileID,\n OverscaledTileID: OverscaledTileID,\n UnwrappedTileID: UnwrappedTileID\n};\n","// \n\nconst Evented = require('../util/evented');\nconst util = require('../util/util');\nconst loadTileJSON = require('./load_tilejson');\nconst normalizeURL = require('../util/mapbox').normalizeTileURL;\nconst TileBounds = require('./tile_bounds');\nconst ResourceType = require('../util/ajax').ResourceType;\nconst browser = require('../util/browser');\n\n \n \n \n \n \n \n\nclass VectorTileSource extends Evented {\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super();\n this.id = id;\n this.dispatcher = dispatcher;\n\n this.type = 'vector';\n this.minzoom = 0;\n this.maxzoom = 22;\n this.scheme = 'xyz';\n this.tileSize = 512;\n this.reparseOverscaled = true;\n this.isTileClipped = true;\n\n util.extend(this, util.pick(options, ['url', 'scheme', 'tileSize']));\n this._options = util.extend({ type: 'vector' }, options);\n\n if (this.tileSize !== 512) {\n throw new Error('vector tile sources must have a tileSize of 512');\n }\n\n this.setEventedParent(eventedParent);\n }\n\n load() {\n this.fire('dataloading', {dataType: 'source'});\n\n loadTileJSON(this._options, this.map._transformRequest, (err, tileJSON) => {\n if (err) {\n this.fire('error', err);\n } else if (tileJSON) {\n util.extend(this, tileJSON);\n if (tileJSON.bounds) this.tileBounds = new TileBounds(tileJSON.bounds, this.minzoom, this.maxzoom);\n\n // `content` is included here to prevent a race condition where `Style#_updateSources` is called\n // before the TileJSON arrives. this makes sure the tiles needed are loaded once TileJSON arrives\n // ref: https://github.com/mapbox/mapbox-gl-js/pull/4347#discussion_r104418088\n this.fire('data', {dataType: 'source', sourceDataType: 'metadata'});\n this.fire('data', {dataType: 'source', sourceDataType: 'content'});\n }\n });\n }\n\n hasTile(tileID ) {\n return !this.tileBounds || this.tileBounds.contains(tileID.canonical);\n }\n\n onAdd(map ) {\n this.map = map;\n this.load();\n }\n\n serialize() {\n return util.extend({}, this._options);\n }\n\n loadTile(tile , callback ) {\n const overscaling = tile.tileID.overscaleFactor();\n const url = normalizeURL(tile.tileID.canonical.url(this.tiles, this.scheme), this.url);\n const params = {\n request: this.map._transformRequest(url, ResourceType.Tile),\n uid: tile.uid,\n tileID: tile.tileID,\n zoom: tile.tileID.overscaledZ,\n tileSize: this.tileSize * overscaling,\n type: this.type,\n source: this.id,\n pixelRatio: browser.devicePixelRatio,\n overscaling: overscaling,\n showCollisionBoxes: this.map.showCollisionBoxes\n };\n\n if (tile.workerID === undefined || tile.state === 'expired') {\n tile.workerID = this.dispatcher.send('loadTile', params, done.bind(this));\n } else if (tile.state === 'loading') {\n // schedule tile reloading after it has been loaded\n tile.reloadCallback = callback;\n } else {\n this.dispatcher.send('reloadTile', params, done.bind(this), tile.workerID);\n }\n\n function done(err, data) {\n if (tile.aborted)\n return callback(null);\n\n if (err) {\n return callback(err);\n }\n\n if (this.map._refreshExpiredTiles) tile.setExpiryData(data);\n tile.loadVectorData(data, this.map.painter);\n\n callback(null);\n\n if (tile.reloadCallback) {\n this.loadTile(tile, tile.reloadCallback);\n tile.reloadCallback = null;\n }\n }\n }\n\n abortTile(tile ) {\n this.dispatcher.send('abortTile', { uid: tile.uid, type: this.type, source: this.id }, undefined, tile.workerID);\n }\n\n unloadTile(tile ) {\n tile.unloadVectorData();\n this.dispatcher.send('removeTile', { uid: tile.uid, type: this.type, source: this.id }, undefined, tile.workerID);\n }\n\n hasTransition() {\n return false;\n }\n}\n\nmodule.exports = VectorTileSource;\n","// \n\nconst ajax = require('../util/ajax');\nconst vt = require('@mapbox/vector-tile');\nconst Protobuf = require('pbf');\nconst WorkerTile = require('./worker_tile');\nconst util = require('../util/util');\n\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n\n/**\n * @callback LoadVectorDataCallback\n * @param error\n * @param vectorTile\n * @private\n */\n \n\n \n \n\n/**\n * @private\n */\nfunction loadVectorTile(params , callback ) {\n const xhr = ajax.getArrayBuffer(params.request, (err, response) => {\n if (err) {\n callback(err);\n } else if (response) {\n callback(null, {\n vectorTile: new vt.VectorTile(new Protobuf(response.data)),\n rawData: response.data,\n cacheControl: response.cacheControl,\n expires: response.expires\n });\n }\n });\n return () => {\n xhr.abort();\n callback();\n };\n}\n\n/**\n * The {@link WorkerSource} implementation that supports {@link VectorTileSource}.\n * This class is designed to be easily reused to support custom source types\n * for data formats that can be parsed/converted into an in-memory VectorTile\n * representation. To do so, create it with\n * `new VectorTileWorkerSource(actor, styleLayers, customLoadVectorDataFunction)`.\n *\n * @private\n */\nclass VectorTileWorkerSource {\n \n \n \n \n \n\n /**\n * @param [loadVectorData] Optional method for custom loading of a VectorTile\n * object based on parameters passed from the main-thread Source. See\n * {@link VectorTileWorkerSource#loadTile}. The default implementation simply\n * loads the pbf at `params.url`.\n */\n constructor(actor , layerIndex , loadVectorData ) {\n this.actor = actor;\n this.layerIndex = layerIndex;\n this.loadVectorData = loadVectorData || loadVectorTile;\n this.loading = {};\n this.loaded = {};\n }\n\n /**\n * Implements {@link WorkerSource#loadTile}. Delegates to\n * {@link VectorTileWorkerSource#loadVectorData} (which by default expects\n * a `params.url` property) for fetching and producing a VectorTile object.\n */\n loadTile(params , callback ) {\n const source = params.source,\n uid = params.uid;\n\n if (!this.loading[source])\n this.loading[source] = {};\n\n const workerTile = this.loading[source][uid] = new WorkerTile(params);\n workerTile.abort = this.loadVectorData(params, (err, response) => {\n delete this.loading[source][uid];\n\n if (err || !response) {\n return callback(err);\n }\n\n const rawTileData = response.rawData;\n const cacheControl = {};\n if (response.expires) cacheControl.expires = response.expires;\n if (response.cacheControl) cacheControl.cacheControl = response.cacheControl;\n\n workerTile.vectorTile = response.vectorTile;\n workerTile.parse(response.vectorTile, this.layerIndex, this.actor, (err, result) => {\n if (err || !result) return callback(err);\n\n // Transferring a copy of rawTileData because the worker needs to retain its copy.\n callback(null, util.extend({rawTileData: rawTileData.slice(0)}, result, cacheControl));\n });\n\n this.loaded[source] = this.loaded[source] || {};\n this.loaded[source][uid] = workerTile;\n });\n }\n\n /**\n * Implements {@link WorkerSource#reloadTile}.\n */\n reloadTile(params , callback ) {\n const loaded = this.loaded[params.source],\n uid = params.uid,\n vtSource = this;\n if (loaded && loaded[uid]) {\n const workerTile = loaded[uid];\n workerTile.showCollisionBoxes = params.showCollisionBoxes;\n\n if (workerTile.status === 'parsing') {\n workerTile.reloadCallback = callback;\n } else if (workerTile.status === 'done') {\n workerTile.parse(workerTile.vectorTile, this.layerIndex, this.actor, done.bind(workerTile));\n }\n\n }\n\n function done(err, data) {\n if (this.reloadCallback) {\n const reloadCallback = this.reloadCallback;\n delete this.reloadCallback;\n this.parse(this.vectorTile, vtSource.layerIndex, vtSource.actor, reloadCallback);\n }\n\n callback(err, data);\n }\n }\n\n /**\n * Implements {@link WorkerSource#abortTile}.\n *\n * @param params\n * @param params.source The id of the source for which we're loading this tile.\n * @param params.uid The UID for this tile.\n */\n abortTile(params , callback ) {\n const loading = this.loading[params.source],\n uid = params.uid;\n if (loading && loading[uid] && loading[uid].abort) {\n loading[uid].abort();\n delete loading[uid];\n }\n callback();\n }\n\n /**\n * Implements {@link WorkerSource#removeTile}.\n *\n * @param params\n * @param params.source The id of the source for which we're loading this tile.\n * @param params.uid The UID for this tile.\n */\n removeTile(params , callback ) {\n const loaded = this.loaded[params.source],\n uid = params.uid;\n if (loaded && loaded[uid]) {\n delete loaded[uid];\n }\n callback();\n }\n}\n\nmodule.exports = VectorTileWorkerSource;\n","// \n\nconst ajax = require('../util/ajax');\nconst ImageSource = require('./image_source');\nconst rasterBoundsAttributes = require('../data/raster_bounds_attributes');\nconst VertexArrayObject = require('../render/vertex_array_object');\nconst Texture = require('../render/texture');\n\n \n \n \n\n/**\n * A data source containing video.\n * (See the [Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#sources-video) for detailed documentation of options.)\n * @interface VideoSource\n * @example\n * // add to map\n * map.addSource('some id', {\n * type: 'video',\n * url: [\n * 'https://www.mapbox.com/blog/assets/baltimore-smoke.mp4',\n * 'https://www.mapbox.com/blog/assets/baltimore-smoke.webm'\n * ],\n * coordinates: [\n * [-76.54, 39.18],\n * [-76.52, 39.18],\n * [-76.52, 39.17],\n * [-76.54, 39.17]\n * ]\n * });\n *\n * // update\n * var mySource = map.getSource('some id');\n * mySource.setCoordinates([\n * [-76.54335737228394, 39.18579907229748],\n * [-76.52803659439087, 39.1838364847587],\n * [-76.5295386314392, 39.17683392507606],\n * [-76.54520273208618, 39.17876344106642]\n * ]);\n *\n * map.removeSource('some id'); // remove\n * @see [Add a video](https://www.mapbox.com/mapbox-gl-js/example/video-on-a-map/)\n */\nclass VideoSource extends ImageSource {\n \n \n \n \n\n constructor(id , options , dispatcher , eventedParent ) {\n super(id, options, dispatcher, eventedParent);\n this.roundZoom = true;\n this.type = 'video';\n this.options = options;\n }\n\n load() {\n const options = this.options;\n this.urls = options.urls;\n\n ajax.getVideo(options.urls, (err, video) => {\n if (err) {\n this.fire('error', {error: err});\n } else if (video) {\n this.video = video;\n this.video.loop = true;\n\n // Start repainting when video starts playing. hasTransition() will then return\n // true to trigger additional frames as long as the videos continues playing.\n this.video.addEventListener('playing', () => {\n this.map._rerender();\n });\n\n if (this.map) {\n this.video.play();\n }\n\n this._finishLoading();\n }\n });\n }\n\n /**\n * Returns the HTML `video` element.\n *\n * @returns {HTMLVideoElement} The HTML `video` element.\n */\n getVideo() {\n return this.video;\n }\n\n onAdd(map ) {\n if (this.map) return;\n this.map = map;\n this.load();\n if (this.video) {\n this.video.play();\n this.setCoordinates(this.coordinates);\n }\n }\n\n /**\n * Sets the video's coordinates and re-renders the map.\n *\n * @method setCoordinates\n * @instance\n * @memberof VideoSource\n * @param {Array<Array<number>>} coordinates Four geographical coordinates,\n * represented as arrays of longitude and latitude numbers, which define the corners of the video.\n * The coordinates start at the top left corner of the video and proceed in clockwise order.\n * They do not have to represent a rectangle.\n * @returns {VideoSource} this\n */\n // setCoordinates inherited from ImageSource\n\n prepare() {\n if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) {\n return; // not enough data for current position\n }\n\n const context = this.map.painter.context;\n const gl = context.gl;\n\n if (!this.boundsBuffer) {\n this.boundsBuffer = context.createVertexBuffer(this._boundsArray, rasterBoundsAttributes.members);\n }\n\n if (!this.boundsVAO) {\n this.boundsVAO = new VertexArrayObject();\n }\n\n if (!this.texture) {\n this.texture = new Texture(context, this.video, gl.RGBA);\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n } else if (!this.video.paused) {\n this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.video);\n }\n\n for (const w in this.tiles) {\n const tile = this.tiles[w];\n if (tile.state !== 'loaded') {\n tile.state = 'loaded';\n tile.texture = this.texture;\n }\n }\n }\n\n serialize() {\n return {\n type: 'video',\n urls: this.urls,\n coordinates: this.coordinates\n };\n }\n\n hasTransition() {\n return this.video && !this.video.paused;\n }\n}\n\nmodule.exports = VideoSource;\n","// \n\nconst Actor = require('../util/actor');\nconst StyleLayerIndex = require('../style/style_layer_index');\n\nconst VectorTileWorkerSource = require('./vector_tile_worker_source');\nconst RasterDEMTileWorkerSource = require('./raster_dem_tile_worker_source');\nconst GeoJSONWorkerSource = require('./geojson_worker_source');\nconst assert = require('assert');\n\nconst globalRTLTextPlugin = require('./rtl_text_plugin');\n\n \n \n \n \n \n \n \n \n\n \n \n\n/**\n * @private\n */\nclass Worker {\n \n \n \n \n \n \n\n constructor(self ) {\n this.self = self;\n this.actor = new Actor(self, this);\n\n this.layerIndexes = {};\n\n this.workerSourceTypes = {\n vector: VectorTileWorkerSource,\n geojson: GeoJSONWorkerSource\n };\n\n // [mapId][sourceType] => worker source instance\n this.workerSources = {};\n this.demWorkerSources = {};\n\n this.self.registerWorkerSource = (name , WorkerSource ) => {\n if (this.workerSourceTypes[name]) {\n throw new Error(`Worker source with name \"${name}\" already registered.`);\n }\n this.workerSourceTypes[name] = WorkerSource;\n };\n\n this.self.registerRTLTextPlugin = (rtlTextPlugin ) => {\n if (globalRTLTextPlugin.applyArabicShaping || globalRTLTextPlugin.processBidirectionalText) {\n throw new Error('RTL text plugin already registered.');\n }\n globalRTLTextPlugin['applyArabicShaping'] = rtlTextPlugin.applyArabicShaping;\n globalRTLTextPlugin['processBidirectionalText'] = rtlTextPlugin.processBidirectionalText;\n };\n }\n\n setLayers(mapId , layers , callback ) {\n this.getLayerIndex(mapId).replace(layers);\n callback();\n }\n\n updateLayers(mapId , params , callback ) {\n this.getLayerIndex(mapId).update(params.layers, params.removedIds);\n callback();\n }\n\n loadTile(mapId , params , callback ) {\n assert(params.type);\n this.getWorkerSource(mapId, params.type).loadTile(params, callback);\n }\n\n loadDEMTile(mapId , params , callback ) {\n this.getDEMWorkerSource(mapId).loadTile(params, callback);\n }\n\n reloadTile(mapId , params , callback ) {\n assert(params.type);\n this.getWorkerSource(mapId, params.type).reloadTile(params, callback);\n }\n\n abortTile(mapId , params , callback ) {\n assert(params.type);\n this.getWorkerSource(mapId, params.type).abortTile(params, callback);\n }\n\n removeTile(mapId , params , callback ) {\n assert(params.type);\n this.getWorkerSource(mapId, params.type).removeTile(params, callback);\n }\n\n removeDEMTile(mapId , params ) {\n this.getDEMWorkerSource(mapId).removeTile(params);\n }\n\n removeSource(mapId , params , callback ) {\n assert(params.type);\n const worker = this.getWorkerSource(mapId, params.type);\n if (worker.removeSource !== undefined) {\n worker.removeSource(params, callback);\n } else {\n callback();\n }\n }\n\n /**\n * Load a {@link WorkerSource} script at params.url. The script is run\n * (using importScripts) with `registerWorkerSource` in scope, which is a\n * function taking `(name, workerSourceObject)`.\n * @private\n */\n loadWorkerSource(map , params , callback ) {\n try {\n this.self.importScripts(params.url);\n callback();\n } catch (e) {\n callback(e);\n }\n }\n\n loadRTLTextPlugin(map , pluginURL , callback ) {\n try {\n if (!globalRTLTextPlugin.applyArabicShaping && !globalRTLTextPlugin.processBidirectionalText) {\n this.self.importScripts(pluginURL);\n if (!globalRTLTextPlugin.applyArabicShaping || !globalRTLTextPlugin.processBidirectionalText) {\n callback(new Error(`RTL Text Plugin failed to import scripts from ${pluginURL}`));\n }\n }\n } catch (e) {\n callback(e);\n }\n }\n\n getLayerIndex(mapId ) {\n let layerIndexes = this.layerIndexes[mapId];\n if (!layerIndexes) {\n layerIndexes = this.layerIndexes[mapId] = new StyleLayerIndex();\n }\n return layerIndexes;\n }\n\n getWorkerSource(mapId , type ) {\n if (!this.workerSources[mapId])\n this.workerSources[mapId] = {};\n if (!this.workerSources[mapId][type]) {\n // use a wrapped actor so that we can attach a target mapId param\n // to any messages invoked by the WorkerSource\n const actor = {\n send: (type, data, callback) => {\n this.actor.send(type, data, callback, mapId);\n }\n };\n\n this.workerSources[mapId][type] = new (this.workerSourceTypes[type] )((actor ), this.getLayerIndex(mapId));\n }\n\n return this.workerSources[mapId][type];\n }\n\n getDEMWorkerSource(mapId ) {\n if (!this.demWorkerSources[mapId]) {\n this.demWorkerSources[mapId] = new RasterDEMTileWorkerSource();\n }\n\n return this.demWorkerSources[mapId];\n }\n}\n\nmodule.exports = function createWorker(self ) {\n return new Worker(self);\n};\n","// \n\nconst FeatureIndex = require('../data/feature_index');\nconst {performSymbolLayout} = require('../symbol/symbol_layout');\nconst {CollisionBoxArray} = require('../data/array_types');\nconst DictionaryCoder = require('../util/dictionary_coder');\nconst SymbolBucket = require('../data/bucket/symbol_bucket');\nconst util = require('../util/util');\nconst assert = require('assert');\nconst {makeImageAtlas} = require('../render/image_atlas');\nconst {makeGlyphAtlas} = require('../render/glyph_atlas');\nconst EvaluationParameters = require('../style/evaluation_parameters');\nconst {OverscaledTileID} = require('./tile_id');\n\n \n \n \n \n \n \n \n \n \n \n\nclass WorkerTile {\n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n constructor(params ) {\n this.tileID = new OverscaledTileID(params.tileID.overscaledZ, params.tileID.wrap, params.tileID.canonical.z, params.tileID.canonical.x, params.tileID.canonical.y);\n this.uid = params.uid;\n this.zoom = params.zoom;\n this.pixelRatio = params.pixelRatio;\n this.tileSize = params.tileSize;\n this.source = params.source;\n this.overscaling = params.overscaling;\n this.showCollisionBoxes = params.showCollisionBoxes;\n }\n\n parse(data , layerIndex , actor , callback ) {\n this.status = 'parsing';\n this.data = data;\n\n this.collisionBoxArray = new CollisionBoxArray();\n const sourceLayerCoder = new DictionaryCoder(Object.keys(data.layers).sort());\n\n const featureIndex = new FeatureIndex(this.tileID, this.overscaling);\n featureIndex.bucketLayerIDs = [];\n\n const buckets = {};\n\n const options = {\n featureIndex: featureIndex,\n iconDependencies: {},\n glyphDependencies: {}\n };\n\n const layerFamilies = layerIndex.familiesBySource[this.source];\n for (const sourceLayerId in layerFamilies) {\n const sourceLayer = data.layers[sourceLayerId];\n if (!sourceLayer) {\n continue;\n }\n\n if (sourceLayer.version === 1) {\n util.warnOnce(`Vector tile source \"${this.source}\" layer \"${sourceLayerId}\" ` +\n `does not use vector tile spec v2 and therefore may have some rendering errors.`);\n }\n\n const sourceLayerIndex = sourceLayerCoder.encode(sourceLayerId);\n const features = [];\n for (let index = 0; index < sourceLayer.length; index++) {\n const feature = sourceLayer.feature(index);\n features.push({ feature, index, sourceLayerIndex });\n }\n\n for (const family of layerFamilies[sourceLayerId]) {\n const layer = family[0];\n\n assert(layer.source === this.source);\n if (layer.minzoom && this.zoom < Math.floor(layer.minzoom)) continue;\n if (layer.maxzoom && this.zoom >= layer.maxzoom) continue;\n if (layer.visibility === 'none') continue;\n\n recalculateLayers(family, this.zoom);\n\n const bucket = buckets[layer.id] = layer.createBucket({\n index: featureIndex.bucketLayerIDs.length,\n layers: family,\n zoom: this.zoom,\n pixelRatio: this.pixelRatio,\n overscaling: this.overscaling,\n collisionBoxArray: this.collisionBoxArray\n });\n\n bucket.populate(features, options);\n featureIndex.bucketLayerIDs.push(family.map((l) => l.id));\n }\n }\n\n let error ;\n let glyphMap ;\n let imageMap ;\n\n const stacks = util.mapObject(options.glyphDependencies, (glyphs) => Object.keys(glyphs).map(Number));\n if (Object.keys(stacks).length) {\n actor.send('getGlyphs', {uid: this.uid, stacks}, (err, result) => {\n if (!error) {\n error = err;\n glyphMap = result;\n maybePrepare.call(this);\n }\n });\n } else {\n glyphMap = {};\n }\n\n const icons = Object.keys(options.iconDependencies);\n if (icons.length) {\n actor.send('getImages', {icons}, (err, result) => {\n if (!error) {\n error = err;\n imageMap = result;\n maybePrepare.call(this);\n }\n });\n } else {\n imageMap = {};\n }\n\n maybePrepare.call(this);\n\n function maybePrepare() {\n if (error) {\n return callback(error);\n } else if (glyphMap && imageMap) {\n const glyphAtlas = makeGlyphAtlas(glyphMap);\n const imageAtlas = makeImageAtlas(imageMap);\n\n for (const key in buckets) {\n const bucket = buckets[key];\n if (bucket instanceof SymbolBucket) {\n recalculateLayers(bucket.layers, this.zoom);\n performSymbolLayout(bucket, glyphMap, glyphAtlas.positions, imageMap, imageAtlas.positions, this.showCollisionBoxes);\n }\n }\n\n this.status = 'done';\n\n callback(null, {\n buckets: util.values(buckets).filter(b => !b.isEmpty()),\n featureIndex,\n collisionBoxArray: this.collisionBoxArray,\n glyphAtlasImage: glyphAtlas.image,\n iconAtlasImage: imageAtlas.image\n });\n }\n }\n }\n}\n\nfunction recalculateLayers(layers , zoom ) {\n // Layers are shared and may have been used by a WorkerTile with a different zoom.\n const parameters = new EvaluationParameters(zoom);\n for (const layer of layers) {\n layer.recalculate(parameters);\n }\n}\n\nmodule.exports = WorkerTile;\n","\nconst refProperties = require('./util/ref_properties');\n\nfunction deref(layer, parent) {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n\n return result;\n}\n\nmodule.exports = derefLayers;\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array<Layer>} layers\n * @returns {Array<Layer>}\n */\nfunction derefLayers(layers) {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[layers[i].ref]);\n }\n }\n\n return layers;\n}\n","\nconst isEqual = require('lodash.isequal');\n\nconst operations = {\n\n /*\n * { command: 'setStyle', args: [stylesheet] }\n */\n setStyle: 'setStyle',\n\n /*\n * { command: 'addLayer', args: [layer, 'beforeLayerId'] }\n */\n addLayer: 'addLayer',\n\n /*\n * { command: 'removeLayer', args: ['layerId'] }\n */\n removeLayer: 'removeLayer',\n\n /*\n * { command: 'setPaintProperty', args: ['layerId', 'prop', value] }\n */\n setPaintProperty: 'setPaintProperty',\n\n /*\n * { command: 'setLayoutProperty', args: ['layerId', 'prop', value] }\n */\n setLayoutProperty: 'setLayoutProperty',\n\n /*\n * { command: 'setFilter', args: ['layerId', filter] }\n */\n setFilter: 'setFilter',\n\n /*\n * { command: 'addSource', args: ['sourceId', source] }\n */\n addSource: 'addSource',\n\n /*\n * { command: 'removeSource', args: ['sourceId'] }\n */\n removeSource: 'removeSource',\n\n /*\n * { command: 'setGeoJSONSourceData', args: ['sourceId', data] }\n */\n setGeoJSONSourceData: 'setGeoJSONSourceData',\n\n /*\n * { command: 'setLayerZoomRange', args: ['layerId', 0, 22] }\n */\n setLayerZoomRange: 'setLayerZoomRange',\n\n /*\n * { command: 'setLayerProperty', args: ['layerId', 'prop', value] }\n */\n setLayerProperty: 'setLayerProperty',\n\n /*\n * { command: 'setCenter', args: [[lon, lat]] }\n */\n setCenter: 'setCenter',\n\n /*\n * { command: 'setZoom', args: [zoom] }\n */\n setZoom: 'setZoom',\n\n /*\n * { command: 'setBearing', args: [bearing] }\n */\n setBearing: 'setBearing',\n\n /*\n * { command: 'setPitch', args: [pitch] }\n */\n setPitch: 'setPitch',\n\n /*\n * { command: 'setSprite', args: ['spriteUrl'] }\n */\n setSprite: 'setSprite',\n\n /*\n * { command: 'setGlyphs', args: ['glyphsUrl'] }\n */\n setGlyphs: 'setGlyphs',\n\n /*\n * { command: 'setTransition', args: [transition] }\n */\n setTransition: 'setTransition',\n\n /*\n * { command: 'setLighting', args: [lightProperties] }\n */\n setLight: 'setLight'\n\n};\n\nfunction addSource(sourceId, after, commands) {\n commands.push({ command: operations.addSource, args: [sourceId, after[sourceId]] });\n}\n\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n commands.push({ command: operations.removeSource, args: [sourceId] });\n sourcesRemoved[sourceId] = true;\n}\n\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n removeSource(sourceId, commands, sourcesRemoved);\n addSource(sourceId, after, commands);\n}\n\nfunction canUpdateGeoJSON(before, after, sourceId) {\n let prop;\n for (prop in before[sourceId]) {\n if (!before[sourceId].hasOwnProperty(prop)) continue;\n if (prop !== 'data' && !isEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n for (prop in after[sourceId]) {\n if (!after[sourceId].hasOwnProperty(prop)) continue;\n if (prop !== 'data' && !isEqual(before[sourceId][prop], after[sourceId][prop])) {\n return false;\n }\n }\n return true;\n}\n\nfunction diffSources(before, after, commands, sourcesRemoved) {\n before = before || {};\n after = after || {};\n\n let sourceId;\n\n // look for sources to remove\n for (sourceId in before) {\n if (!before.hasOwnProperty(sourceId)) continue;\n if (!after.hasOwnProperty(sourceId)) {\n removeSource(sourceId, commands, sourcesRemoved);\n }\n }\n\n // look for sources to add/update\n for (sourceId in after) {\n if (!after.hasOwnProperty(sourceId)) continue;\n if (!before.hasOwnProperty(sourceId)) {\n addSource(sourceId, after, commands);\n } else if (!isEqual(before[sourceId], after[sourceId])) {\n if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n commands.push({ command: operations.setGeoJSONSourceData, args: [sourceId, after[sourceId].data] });\n } else {\n // no update command, must remove then add\n updateSource(sourceId, after, commands, sourcesRemoved);\n }\n }\n }\n}\n\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n before = before || {};\n after = after || {};\n\n let prop;\n\n for (prop in before) {\n if (!before.hasOwnProperty(prop)) continue;\n if (!isEqual(before[prop], after[prop])) {\n commands.push({ command: command, args: [layerId, prop, after[prop], klass] });\n }\n }\n for (prop in after) {\n if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop)) continue;\n if (!isEqual(before[prop], after[prop])) {\n commands.push({ command: command, args: [layerId, prop, after[prop], klass] });\n }\n }\n}\n\nfunction pluckId(layer) {\n return layer.id;\n}\nfunction indexById(group, layer) {\n group[layer.id] = layer;\n return group;\n}\n\nfunction diffLayers(before, after, commands) {\n before = before || [];\n after = after || [];\n\n // order of layers by id\n const beforeOrder = before.map(pluckId);\n const afterOrder = after.map(pluckId);\n\n // index of layer by id\n const beforeIndex = before.reduce(indexById, {});\n const afterIndex = after.reduce(indexById, {});\n\n // track order of layers as if they have been mutated\n const tracker = beforeOrder.slice();\n\n // layers that have been added do not need to be diffed\n const clean = Object.create(null);\n\n let i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n\n // remove layers\n for (i = 0, d = 0; i < beforeOrder.length; i++) {\n layerId = beforeOrder[i];\n if (!afterIndex.hasOwnProperty(layerId)) {\n commands.push({ command: operations.removeLayer, args: [layerId] });\n tracker.splice(tracker.indexOf(layerId, d), 1);\n } else {\n // limit where in tracker we need to look for a match\n d++;\n }\n }\n\n // add/reorder layers\n for (i = 0, d = 0; i < afterOrder.length; i++) {\n // work backwards as insert is before an existing layer\n layerId = afterOrder[afterOrder.length - 1 - i];\n\n if (tracker[tracker.length - 1 - i] === layerId) continue;\n\n if (beforeIndex.hasOwnProperty(layerId)) {\n // remove the layer before we insert at the correct position\n commands.push({ command: operations.removeLayer, args: [layerId] });\n tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n } else {\n // limit where in tracker we need to look for a match\n d++;\n }\n\n // add layer at correct position\n insertBeforeLayerId = tracker[tracker.length - i];\n commands.push({ command: operations.addLayer, args: [afterIndex[layerId], insertBeforeLayerId] });\n tracker.splice(tracker.length - i, 0, layerId);\n clean[layerId] = true;\n }\n\n // update layers\n for (i = 0; i < afterOrder.length; i++) {\n layerId = afterOrder[i];\n beforeLayer = beforeIndex[layerId];\n afterLayer = afterIndex[layerId];\n\n // no need to update if previously added (new or moved)\n if (clean[layerId] || isEqual(beforeLayer, afterLayer)) continue;\n\n // If source, source-layer, or type have changes, then remove the layer\n // and add it back 'from scratch'.\n if (!isEqual(beforeLayer.source, afterLayer.source) || !isEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !isEqual(beforeLayer.type, afterLayer.type)) {\n commands.push({ command: operations.removeLayer, args: [layerId] });\n // we add the layer back at the same position it was already in, so\n // there's no need to update the `tracker`\n insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n commands.push({ command: operations.addLayer, args: [afterLayer, insertBeforeLayerId] });\n continue;\n }\n\n // layout, paint, filter, minzoom, maxzoom\n diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n if (!isEqual(beforeLayer.filter, afterLayer.filter)) {\n commands.push({ command: operations.setFilter, args: [layerId, afterLayer.filter] });\n }\n if (!isEqual(beforeLayer.minzoom, afterLayer.minzoom) || !isEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n commands.push({ command: operations.setLayerZoomRange, args: [layerId, afterLayer.minzoom, afterLayer.maxzoom] });\n }\n\n // handle all other layer props, including paint.*\n for (prop in beforeLayer) {\n if (!beforeLayer.hasOwnProperty(prop)) continue;\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||\n prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({ command: operations.setLayerProperty, args: [layerId, prop, afterLayer[prop]] });\n }\n }\n for (prop in afterLayer) {\n if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) continue;\n if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||\n prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;\n if (prop.indexOf('paint.') === 0) {\n diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n } else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {\n commands.push({ command: operations.setLayerProperty, args: [layerId, prop, afterLayer[prop]] });\n }\n }\n }\n}\n\n/**\n * Diff two stylesheet\n *\n * Creates semanticly aware diffs that can easily be applied at runtime.\n * Operations produced by the diff closely resemble the mapbox-gl-js API. Any\n * error creating the diff will fall back to the 'setStyle' operation.\n *\n * Example diff:\n * [\n * { command: 'setConstant', args: ['@water', '#0000FF'] },\n * { command: 'setPaintProperty', args: ['background', 'background-color', 'black'] }\n * ]\n *\n * @private\n * @param {*} [before] stylesheet to compare from\n * @param {*} after stylesheet to compare to\n * @returns Array list of changes\n */\nfunction diffStyles(before, after) {\n if (!before) return [{ command: operations.setStyle, args: [after] }];\n\n let commands = [];\n\n try {\n // Handle changes to top-level properties\n if (!isEqual(before.version, after.version)) {\n return [{ command: operations.setStyle, args: [after] }];\n }\n if (!isEqual(before.center, after.center)) {\n commands.push({ command: operations.setCenter, args: [after.center] });\n }\n if (!isEqual(before.zoom, after.zoom)) {\n commands.push({ command: operations.setZoom, args: [after.zoom] });\n }\n if (!isEqual(before.bearing, after.bearing)) {\n commands.push({ command: operations.setBearing, args: [after.bearing] });\n }\n if (!isEqual(before.pitch, after.pitch)) {\n commands.push({ command: operations.setPitch, args: [after.pitch] });\n }\n if (!isEqual(before.sprite, after.sprite)) {\n commands.push({ command: operations.setSprite, args: [after.sprite] });\n }\n if (!isEqual(before.glyphs, after.glyphs)) {\n commands.push({ command: operations.setGlyphs, args: [after.glyphs] });\n }\n if (!isEqual(before.transition, after.transition)) {\n commands.push({ command: operations.setTransition, args: [after.transition] });\n }\n if (!isEqual(before.light, after.light)) {\n commands.push({ command: operations.setLight, args: [after.light] });\n }\n\n // Handle changes to `sources`\n // If a source is to be removed, we also--before the removeSource\n // command--need to remove all the style layers that depend on it.\n const sourcesRemoved = {};\n\n // First collect the {add,remove}Source commands\n const removeOrAddSourceCommands = [];\n diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n\n // Push a removeLayer command for each style layer that depends on a\n // source that's being removed.\n // Also, exclude any such layers them from the input to `diffLayers`\n // below, so that diffLayers produces the appropriate `addLayers`\n // command\n const beforeLayers = [];\n if (before.layers) {\n before.layers.forEach((layer) => {\n if (sourcesRemoved[layer.source]) {\n commands.push({ command: operations.removeLayer, args: [layer.id] });\n } else {\n beforeLayers.push(layer);\n }\n });\n }\n commands = commands.concat(removeOrAddSourceCommands);\n\n // Handle changes to `layers`\n diffLayers(beforeLayers, after.layers, commands);\n\n } catch (e) {\n // fall back to setStyle\n console.warn('Unable to compute style diff:', e);\n commands = [{ command: operations.setStyle, args: [after] }];\n }\n\n return commands;\n}\n\nmodule.exports = diffStyles;\nmodule.exports.operations = operations;\n","\nconst format = require('util').format;\n\nfunction ValidationError(key, value, ...args) {\n this.message = (key ? `${key}: ` : '') + format.apply(format, args);\n\n if (value !== null && value !== undefined && value.__line__) {\n this.line = value.__line__;\n }\n}\n\nmodule.exports = ValidationError;\n","// \n\nconst { toString } = require('./types');\nconst ParsingContext = require('./parsing_context');\nconst EvaluationContext = require('./evaluation_context');\nconst assert = require('assert');\n\n \n \n \n\n \n \n \n \n \n\nclass CompoundExpression {\n \n \n \n \n\n \n\n constructor(name , type , evaluate , args ) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx ) {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn ) {\n this.args.forEach(fn);\n }\n\n possibleOutputs() {\n return [undefined];\n }\n\n static parse(args , context ) {\n const op = (args[0] );\n const definition = CompoundExpression.definitions[op];\n if (!definition) {\n return context.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n // First parse all the args\n const parsedArgs = [];\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n let expected;\n if (overloads.length === 1) {\n const params = overloads[0][0];\n expected = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n }\n const parsed = context.parse(arg, 1 + parsedArgs.length, expected);\n if (!parsed) return null;\n parsedArgs.push(parsed);\n }\n\n let signatureContext = (null );\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.definitions, context.path, null, context.scope);\n\n if (Array.isArray(params)) {\n if (params.length !== parsedArgs.length) {\n signatureContext.error(`Expected ${params.length} arguments, but found ${parsedArgs.length} instead.`);\n continue;\n }\n }\n\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push.apply(context.errors, signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n const actualTypes = parsedArgs\n .map(arg => toString(arg.type))\n .join(', ');\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes}) instead.`);\n }\n\n return null;\n }\n\n static register(\n expressions ,\n definitions \n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n expressions[name] = CompoundExpression;\n }\n }\n}\n\nfunction varargs(type ) {\n return { type };\n}\n\nfunction stringifySignature(signature ) {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nmodule.exports = {\n CompoundExpression,\n varargs\n};\n\n","// \n\nconst {\n toString,\n array,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype\n} = require('../types');\n\nconst {typeOf} = require('../values');\nconst RuntimeError = require('../runtime_error');\n\n \n \n \n \n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType\n};\n\nclass ArrayAssertion {\n \n \n\n constructor(type , input ) {\n this.type = type;\n this.input = input;\n }\n\n static parse(args , context ) {\n if (args.length < 2 || args.length > 4)\n return context.error(`Expected 1, 2, or 3 arguments, but found ${args.length - 1} instead.`);\n\n let itemType;\n let N;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types))\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n } else {\n itemType = ValueType;\n }\n\n if (args.length > 3) {\n if (\n typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2])\n ) {\n return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n }\n N = args[2];\n }\n\n const type = array(itemType, N);\n\n const input = context.parse(args[args.length - 1], args.length - 1, ValueType);\n if (!input) return null;\n\n return new ArrayAssertion(type, input);\n }\n\n evaluate(ctx ) {\n const value = this.input.evaluate(ctx);\n const error = checkSubtype(this.type, typeOf(value));\n if (error) {\n throw new RuntimeError(`Expected value to be of type ${toString(this.type)}, but found ${toString(typeOf(value))} instead.`);\n }\n return value;\n }\n\n eachChild(fn ) {\n fn(this.input);\n }\n\n possibleOutputs() {\n return this.input.possibleOutputs();\n }\n}\n\nmodule.exports = ArrayAssertion;\n","// \n\nconst assert = require('assert');\nconst {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType\n} = require('../types');\n\nconst RuntimeError = require('../runtime_error');\nconst {checkSubtype, toString} = require('../types');\nconst {typeOf} = require('../values');\n\n \n \n \n \n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion {\n \n \n\n constructor(type , args ) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args , context ) {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name = (args[0] );\n assert(types[name], name);\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 Assertion(type, parsed);\n }\n\n evaluate(ctx ) {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const error = checkSubtype(this.type, typeOf(value));\n if (!error) {\n return value;\n } else if (i === this.args.length - 1) {\n throw new RuntimeError(`Expected value to be of type ${toString(this.type)}, but found ${toString(typeOf(value))} instead.`);\n }\n }\n\n assert(false);\n return null;\n }\n\n eachChild(fn ) {\n this.args.forEach(fn);\n }\n\n possibleOutputs() {\n return [].concat(...this.args.map((arg) => arg.possibleOutputs()));\n }\n}\n\nmodule.exports = Assertion;\n","// \n\nconst {\n array,\n ValueType,\n NumberType\n} = require('../types');\n\nconst RuntimeError = require('../runtime_error');\n\n \n \n \n \n \n\nclass At {\n \n \n \n\n constructor(type , index , input ) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args , context ) {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t = (input.type );\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx ) {\n const index = ((this.index.evaluate(ctx) ) );\n const array = ((this.input.evaluate(ctx) ) );\n\n if (index < 0 || index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length}.`);\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 ) {\n fn(this.index);\n fn(this.input);\n }\n\n possibleOutputs() {\n return [undefined];\n }\n}\n\nmodule.exports = At;\n","// \n\nconst assert = require('assert');\nconst { BooleanType } = require('../types');\n\n \n \n \n \n\n \n\nclass Case {\n \n\n \n \n\n constructor(type , branches , otherwise ) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args , context ) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType ;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType ), branches, otherwise);\n }\n\n evaluate(ctx ) {\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 ) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n possibleOutputs() {\n return []\n .concat(...this.branches.map(([_, out]) => out.possibleOutputs()))\n .concat(this.otherwise.possibleOutputs());\n }\n}\n\nmodule.exports = Case;\n","// \n\nconst assert = require('assert');\nconst {checkSubtype, ValueType} = require('../types');\n\n \n \n \n \n\nclass Coalesce {\n \n \n\n constructor(type , args ) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args , context ) {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType = (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, {omitTypeAnnotations: true});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType ), parsedArgs);\n }\n\n evaluate(ctx ) {\n let result = null;\n for (const arg of this.args) {\n result = arg.evaluate(ctx);\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn ) {\n this.args.forEach(fn);\n }\n\n possibleOutputs() {\n return [].concat(...this.args.map((arg) => arg.possibleOutputs()));\n }\n}\n\nmodule.exports = Coalesce;\n","// \n\nconst assert = require('assert');\nconst {\n ColorType,\n ValueType,\n NumberType,\n} = require('../types');\n\nconst { Color, validateRGBA } = require('../values');\nconst RuntimeError = require('../runtime_error');\n\n \n \n \n \n\nconst types = {\n 'to-number': NumberType,\n 'to-color': ColorType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion {\n \n \n\n constructor(type , args ) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args , context ) {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name = (args[0] );\n assert(types[name], name);\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 ) {\n if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\n } else if (Array.isArray(input)) {\n if (input.length < 3 || input.length > 4) {\n error = `Invalid rbga value ${JSON.stringify(input)}: expected an array containing either three or four numeric values.`;\n } else {\n error = validateRGBA(input[0], input[1], input[2], input[3]);\n }\n if (!error) {\n return new Color((input[0] ) / 255, (input[1] ) / 255, (input[2] ) / 255, (input[3] ));\n }\n }\n }\n throw new RuntimeError(error || `Could not parse color from value '${typeof input === 'string' ? input : JSON.stringify(input)}'`);\n } else {\n let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) continue;\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 }\n\n eachChild(fn ) {\n this.args.forEach(fn);\n }\n\n possibleOutputs() {\n return [].concat(...this.args.map((arg) => arg.possibleOutputs()));\n }\n}\n\nmodule.exports = Coercion;\n","// \n\nconst {\n ValueType,\n BooleanType,\n} = require('../types');\nconst {toString} = require('../types');\n\n \n \n \n \n\nfunction eq(ctx) { return this.lhs.evaluate(ctx) === this.rhs.evaluate(ctx); }\nfunction ne(ctx) { return this.lhs.evaluate(ctx) !== this.rhs.evaluate(ctx); }\n\nfunction isComparableType(type ) {\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'boolean' ||\n type.kind === 'null';\n}\n\n/**\n * Special form for ==, !=, implementing the following signatures:\n * - (T1: Comparable, T2: Comparable) => boolean { T1 == T2 }\n * - (Comparable, value) => boolean\n * - (value, Comparable) => boolean\n *\n * Where Comparable = string | number | boolean | null.\n *\n * Evaluation semantics for the value cases are equivalent to Javascript's\n * strict equality (===/!==) -- i.e., when the value argument's type doesn't\n * match that of the Comparable argument, == evaluates to false, != to true.\n *\n * @private\n */\nclass Equals {\n \n \n \n \n\n constructor(op , lhs , rhs ) {\n this.type = BooleanType;\n this.lhs = lhs;\n this.rhs = rhs;\n this.evaluate = op === '==' ? eq : ne;\n }\n\n static parse(args , context ) {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const op = (args[0] );\n\n const lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n const rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n\n if (!isComparableType(lhs.type) && !isComparableType(rhs.type)) {\n return context.error(`Expected at least one argument to be a string, number, boolean, or null, but found (${toString(lhs.type)}, ${toString(rhs.type)}) instead.`);\n }\n\n if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n return context.error(`Cannot compare ${toString(lhs.type)} and ${toString(rhs.type)}.`);\n }\n\n return new Equals(op, lhs, rhs);\n }\n\n eachChild(fn ) {\n fn(this.lhs);\n fn(this.rhs);\n }\n\n possibleOutputs() {\n return [true, false];\n }\n}\n\nmodule.exports = Equals;\n","// \n\nconst {\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n array,\n toString\n} = require('../types');\n\nconst { typeOf, Color, validateRGBA } = require('../values');\nconst { CompoundExpression, varargs } = require('../compound_expression');\nconst RuntimeError = require('../runtime_error');\nconst Let = require('./let');\nconst Var = require('./var');\nconst Literal = require('./literal');\nconst Assertion = require('./assertion');\nconst ArrayAssertion = require('./array');\nconst Coercion = require('./coercion');\nconst At = require('./at');\nconst Match = require('./match');\nconst Case = require('./case');\nconst Step = require('./step');\nconst Interpolate = require('./interpolate');\nconst Coalesce = require('./coalesce');\nconst Equals = require('./equals');\n\n \n\nconst expressions = {\n // special forms\n '!=': Equals,\n '==': Equals,\n 'array': ArrayAssertion,\n 'at': At,\n 'boolean': Assertion,\n 'case': Case,\n 'coalesce': Coalesce,\n 'interpolate': Interpolate,\n 'let': Let,\n 'literal': Literal,\n 'match': Match,\n 'number': Assertion,\n 'object': Assertion,\n 'step': Step,\n 'string': Assertion,\n 'to-color': Coercion,\n 'to-number': Coercion,\n 'var': Var\n};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction length(ctx, [v]) {\n return v.evaluate(ctx).length;\n}\n\nfunction lt(ctx, [a, b]) { return a.evaluate(ctx) < b.evaluate(ctx); }\nfunction gt(ctx, [a, b]) { return a.evaluate(ctx) > b.evaluate(ctx); }\nfunction lteq(ctx, [a, b]) { return a.evaluate(ctx) <= b.evaluate(ctx); }\nfunction gteq(ctx, [a, b]) { return a.evaluate(ctx) >= b.evaluate(ctx); }\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => toString(typeOf(v.evaluate(ctx)))\n ],\n 'to-string': [\n StringType,\n [ValueType],\n (ctx, [v]) => {\n v = v.evaluate(ctx);\n const type = typeof v;\n if (v === null || type === 'string' || type === 'number' || type === 'boolean') {\n return String(v);\n } else if (v instanceof Color) {\n return v.toString();\n } else {\n return JSON.stringify(v);\n }\n }\n ],\n 'to-boolean': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => Boolean(v.evaluate(ctx))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n const {r, g, b, a} = v.evaluate(ctx);\n return [255 * r / a, 255 * g / a, 255 * b / a, a];\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'length': {\n type: NumberType,\n overloads: [\n [\n [StringType],\n length\n ], [\n [array(ValueType)],\n length\n ]\n ]\n },\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log10(n.evaluate(ctx))\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log2(n.evaluate(ctx))\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n '>': {\n type: BooleanType,\n overloads: [\n [[NumberType, NumberType], gt],\n [[StringType, StringType], gt]\n ]\n },\n '<': {\n type: BooleanType,\n overloads: [\n [[NumberType, NumberType], lt],\n [[StringType, StringType], lt]\n ]\n },\n '>=': {\n type: BooleanType,\n overloads: [\n [[NumberType, NumberType], gteq],\n [[StringType, StringType], gteq]\n ]\n },\n '<=': {\n type: BooleanType,\n overloads: [\n [[NumberType, NumberType], lteq],\n [[StringType, StringType], lteq]\n ]\n },\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'upcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(StringType),\n (ctx, args) => args.map(arg => arg.evaluate(ctx)).join('')\n ]\n});\n\nmodule.exports = expressions;\n","// \n\nconst UnitBezier = require('@mapbox/unitbezier');\nconst interpolate = require('../../util/interpolate');\nconst { toString, NumberType } = require('../types');\nconst { findStopLessThanOrEqualTo } = require(\"../stops\");\n\n \n \n \n \n \n\n \n \n \n \n\nclass Interpolate {\n \n\n \n \n \n \n\n constructor(type , interpolation , input , stops ) {\n this.type = type;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation , input , lower , upper ) {\n let t = 0;\n if (interpolation.name === 'exponential') {\n t = exponentialInterpolation(input, interpolation.base, lower, upper);\n } else if (interpolation.name === 'linear') {\n t = exponentialInterpolation(input, 1, lower, upper);\n } else if (interpolation.name === 'cubic-bezier') {\n const c = interpolation.controlPoints;\n const ub = new UnitBezier(c[0], c[1], c[2], c[3]);\n t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n }\n return t;\n }\n\n static parse(args , context ) {\n let [ , interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = { name: 'linear' };\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => typeof t !== 'number' || t < 0 || t > 1)\n ) {\n return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n }\n\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints )\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops = [];\n\n let outputType = (null );\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, interpolation, input, stops);\n }\n\n evaluate(ctx ) {\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) ) );\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 return (interpolate[this.type.kind.toLowerCase()] )(outputLower, outputUpper, t);\n }\n\n eachChild(fn ) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n possibleOutputs() {\n return [].concat(...this.outputs.map((output) => output.possibleOutputs()));\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\nmodule.exports = Interpolate;\n","// \n\n \n \n \n \n\nclass Let {\n \n \n \n\n constructor(bindings , result ) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx ) {\n ctx.pushScope(this.bindings);\n const result = this.result.evaluate(ctx);\n ctx.popScope();\n return result;\n }\n\n eachChild(fn ) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args , context ) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, undefined, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n possibleOutputs() {\n return this.result.possibleOutputs();\n }\n}\n\nmodule.exports = Let;\n","// \n\nconst { isValue, typeOf } = require('../values');\n\n \n \n \n \n\nclass Literal {\n \n \n\n constructor(type , value ) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args , context ) {\n if (args.length !== 2)\n return context.error(`'literal' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n\n if (!isValue(args[1]))\n return context.error(`invalid value`);\n\n const value = (args[1] );\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 possibleOutputs() {\n return [this.value];\n }\n}\n\nmodule.exports = Literal;\n","// \n\nconst assert = require('assert');\nconst { typeOf } = require('../values');\n\n \n \n \n \n\n// Map input label values to output expression index\n \n\nclass Match {\n \n \n\n \n \n \n \n\n constructor(inputType , outputType , input , cases , outputs , otherwise ) {\n this.inputType = inputType;\n this.type = outputType;\n this.input = input;\n this.cases = cases;\n this.outputs = outputs;\n this.otherwise = otherwise;\n }\n\n static parse(args , context ) {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\n return labelContext.error(`Branch labels must be numbers or strings.`);\n } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n return labelContext.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);\n\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, inputType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n return new Match((inputType ), (outputType ), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx ) {\n const input = (this.input.evaluate(ctx) );\n return (this.outputs[this.cases[input]] || this.otherwise).evaluate(ctx);\n }\n\n eachChild(fn ) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n possibleOutputs() {\n return []\n .concat(...this.outputs.map((out) => out.possibleOutputs()))\n .concat(this.otherwise.possibleOutputs());\n }\n}\n\nmodule.exports = Match;\n","// \n\nconst { NumberType } = require('../types');\nconst { findStopLessThanOrEqualTo } = require(\"../stops\");\n\n \n \n \n \n \n\nclass Step {\n \n\n \n \n \n\n constructor(type , input , 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 , context ) {\n let [ , input, ...rest] = args;\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 1, NumberType);\n if (!input) return null;\n\n const stops = [];\n\n let outputType = (null );\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n rest.unshift(-Infinity);\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 + 1;\n const valueKey = i + 2;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx ) {\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) ) );\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 ) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n possibleOutputs() {\n return [].concat(...this.outputs.map((output) => output.possibleOutputs()));\n }\n}\n\nmodule.exports = Step;\n","// \n\n \n \n \n \n\nclass Var {\n \n \n\n constructor(name , type ) {\n this.type = type;\n this.name = name;\n }\n\n static parse(args , context ) {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const name = args[1];\n if (!context.scope.has(name)) {\n return context.error(`Unknown variable \"${name}\". Make sure \"${name}\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n }\n\n return new Var(name, context.scope.get(name).type);\n }\n\n evaluate(ctx ) {\n return ctx.scope.get(this.name).evaluate(ctx);\n }\n\n eachChild() {}\n\n possibleOutputs() {\n return [undefined];\n }\n}\n\nmodule.exports = Var;\n","// \n\nconst assert = require('assert');\nconst Scope = require('./scope');\nconst {Color} = require('./values');\n\n \n \n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n \n \n\n \n \n\n constructor() {\n this.scope = new Scope();\n this._parseColorCache = {};\n }\n\n id() {\n return this.feature && 'id' in this.feature ? this.feature.id : null;\n }\n\n geometryType() {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n properties() {\n return this.feature && this.feature.properties || {};\n }\n\n pushScope(bindings ) {\n this.scope = this.scope.concat(bindings);\n }\n\n popScope() {\n assert(this.scope.parent);\n this.scope = (this.scope.parent );\n }\n\n parseColor(input ) {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nmodule.exports = EvaluationContext;\n","// \n\nconst assert = require('assert');\nconst extend = require('../util/extend');\nconst ParsingError = require('./parsing_error');\nconst ParsingContext = require('./parsing_context');\nconst EvaluationContext = require('./evaluation_context');\nconst {CompoundExpression} = require('./compound_expression');\nconst Step = require('./definitions/step');\nconst Interpolate = require('./definitions/interpolate');\nconst Coalesce = require('./definitions/coalesce');\nconst Let = require('./definitions/let');\nconst definitions = require('./definitions');\nconst isConstant = require('./is_constant');\nconst RuntimeError = require('./runtime_error');\nconst {success, error} = require('../util/result');\n\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n\nclass StyleExpression {\n \n\n \n\n constructor(expression ) {\n this.expression = expression;\n }\n\n evaluate(globals , feature ) {\n if (!this._evaluator) {\n this._evaluator = new EvaluationContext();\n }\n\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n return this.expression.evaluate(this._evaluator);\n }\n}\n\nclass StyleExpressionWithErrorHandling extends StyleExpression {\n \n \n \n\n \n\n constructor(expression , propertySpec ) {\n super(expression);\n this._warningHistory = {};\n this._defaultValue = getDefaultValue(propertySpec);\n if (propertySpec.type === 'enum') {\n this._enumValues = propertySpec.values;\n }\n }\n\n evaluate(globals , feature ) {\n if (!this._evaluator) {\n this._evaluator = new EvaluationContext();\n }\n\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n if (val === null || val === undefined) {\n return this._defaultValue;\n }\n if (this._enumValues && !(val in this._enumValues)) {\n throw new RuntimeError(`Expected value to be one of ${Object.keys(this._enumValues).map(v => JSON.stringify(v)).join(', ')}, but found ${JSON.stringify(val)} instead.`);\n }\n return val;\n } catch (e) {\n if (!this._warningHistory[e.message]) {\n this._warningHistory[e.message] = true;\n if (typeof console !== 'undefined') {\n console.warn(e.message);\n }\n }\n return this._defaultValue;\n }\n }\n}\n\nfunction isExpression(expression ) {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nfunction createExpression(expression ,\n propertySpec ,\n options = {}) {\n const parser = new ParsingContext(definitions, [], getExpectedType(propertySpec));\n const parsed = parser.parse(expression);\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n if (options.handleErrors === false) {\n return success(new StyleExpression(parsed));\n } else {\n return success(new StyleExpressionWithErrorHandling(parsed, propertySpec));\n }\n}\n\nclass ZoomConstantExpression {\n \n \n constructor(kind , expression ) {\n this.kind = kind;\n this._styleExpression = expression;\n }\n evaluate(globals , feature ) {\n return this._styleExpression.evaluate(globals, feature);\n }\n}\n\nclass ZoomDependentExpression {\n \n \n\n \n \n\n constructor(kind , expression , zoomCurve ) {\n this.kind = kind;\n this.zoomStops = zoomCurve.labels;\n this._styleExpression = expression;\n if (zoomCurve instanceof Interpolate) {\n this._interpolationType = zoomCurve.interpolation;\n }\n }\n\n evaluate(globals , feature ) {\n return this._styleExpression.evaluate(globals, feature);\n }\n\n interpolationFactor(input , lower , upper ) {\n if (this._interpolationType) {\n return Interpolate.interpolationFactor(this._interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n\nfunction createPropertyExpression(expression ,\n propertySpec ,\n options = {}) {\n expression = createExpression(expression, propertySpec, options);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !propertySpec['property-function']) {\n return error([new ParsingError('', 'property expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom']);\n if (!isZoomConstant && propertySpec['zoom-function'] === false) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const zoomCurve = findZoomCurve(parsed);\n if (!zoomCurve && !isZoomConstant) {\n return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n } else if (zoomCurve instanceof ParsingError) {\n return error([zoomCurve]);\n } else if (zoomCurve instanceof Interpolate && propertySpec['function'] === 'piecewise-constant') {\n return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n }\n\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value) ) :\n (new ZoomConstantExpression('source', expression.value) ));\n }\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve) ) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve) ));\n}\n\nconst {isFunction, createFunction} = require('../function');\nconst {Color} = require('./values');\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nclass StylePropertyFunction {\n \n \n\n \n \n \n \n\n constructor(parameters , specification ) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized ) {\n return ((new StylePropertyFunction(serialized._parameters, serialized._specification)) );\n }\n\n static serialize(input ) {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nfunction normalizePropertyExpression (value , specification ) {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification) );\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\nmodule.exports = {\n StyleExpression,\n StyleExpressionWithErrorHandling,\n isExpression,\n createExpression,\n createPropertyExpression,\n normalizePropertyExpression,\n ZoomConstantExpression,\n ZoomDependentExpression,\n StylePropertyFunction\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 ) {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const childResult = findZoomCurve(child);\n if (childResult instanceof ParsingError) {\n result = childResult;\n } else if (!result && childResult) {\n result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n } else if (result && childResult && result !== childResult) {\n result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n\n return result;\n}\n\nconst {\n ColorType,\n StringType,\n NumberType,\n BooleanType,\n ValueType,\n array\n} = require('./types');\n\nfunction getExpectedType(spec ) {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type] || null;\n}\n\nfunction getDefaultValue(spec ) {\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 } else if (spec.type === 'color') {\n return Color.parse(spec.default) || null;\n } else if (spec.default === undefined) {\n return null;\n } else {\n return spec.default;\n }\n}\n","// \n\nconst { CompoundExpression } = require('./compound_expression');\n\n \n\nfunction isFeatureConstant(e ) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'get' && e.args.length === 1) {\n return false;\n } else if (e.name === 'has' && e.args.length === 1) {\n return false;\n } else if (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n }\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e , properties ) {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nmodule.exports = {\n isFeatureConstant,\n isGlobalPropertyConstant,\n};\n","// \n\nconst Scope = require('./scope');\nconst {checkSubtype} = require('./types');\nconst ParsingError = require('./parsing_error');\nconst Literal = require('./definitions/literal');\nconst Assertion = require('./definitions/assertion');\nconst ArrayAssertion = require('./definitions/array');\nconst Coercion = require('./definitions/coercion');\n\n \n \n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n \n \n \n \n \n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n \n\n constructor(\n definitions ,\n path = [],\n expectedType ,\n scope = new Scope(),\n errors = []\n ) {\n this.definitions = definitions;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr ,\n index ,\n expectedType ,\n bindings ,\n options = {}\n ) {\n let context = this;\n if (index) {\n context = context.concat(index, expectedType, bindings);\n }\n\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n if (Array.isArray(expr)) {\n if (expr.length === 0) {\n return context.error(`Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].`);\n }\n\n const op = expr[0];\n if (typeof op !== 'string') {\n context.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n\n const Expr = context.definitions[op];\n if (Expr) {\n let parsed = Expr.parse(expr, context);\n if (!parsed) return null;\n\n if (context.expectedType) {\n const expected = context.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but\n // have a Value, we can wrap it in a refining assertion.\n // When we expect a Color but have a String or Value, we\n // can wrap it in \"to-color\" coercion.\n // Otherwise, we do static type-checking.\n if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean') && actual.kind === 'value') {\n if (!options.omitTypeAnnotations) {\n parsed = new Assertion(expected, [parsed]);\n }\n } else if (expected.kind === 'array' && actual.kind === 'value') {\n if (!options.omitTypeAnnotations) {\n parsed = new ArrayAssertion(expected, parsed);\n }\n } else if (expected.kind === 'color' && (actual.kind === 'value' || actual.kind === 'string')) {\n if (!options.omitTypeAnnotations) {\n parsed = new Coercion(expected, [parsed]);\n }\n } else if (context.checkSubtype(context.expectedType, parsed.type)) {\n return null;\n }\n }\n\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result.\n if (!(parsed instanceof Literal) && isConstant(parsed)) {\n const ec = new (require('./evaluation_context'))();\n try {\n parsed = new Literal(parsed.type, parsed.evaluate(ec));\n } catch (e) {\n context.error(e.message);\n return null;\n }\n }\n\n return parsed;\n }\n\n return context.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n } else if (typeof expr === 'undefined') {\n return context.error(`'undefined' value invalid. Use null instead.`);\n } else if (typeof expr === 'object') {\n return context.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n } else {\n return context.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index , expectedType , bindings ) {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.definitions,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error , ...keys ) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected , t ) {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nmodule.exports = ParsingContext;\n\nfunction isConstant(expression ) {\n // requires within function body to workaround circular dependency\n const {CompoundExpression} = require('./compound_expression');\n const {isGlobalPropertyConstant, isFeatureConstant} = require('./is_constant');\n const Var = require('./definitions/var');\n\n if (expression instanceof Var) {\n return false;\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n }\n\n let literalArgs = true;\n expression.eachChild(arg => {\n if (!(arg instanceof Literal)) { literalArgs = false; }\n });\n if (!literalArgs) {\n return false;\n }\n\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density']);\n}\n","// \n\nclass ParsingError extends Error {\n \n \n constructor(key , message ) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nmodule.exports = ParsingError;\n","// \n\nclass RuntimeError {\n \n \n\n constructor(message ) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON() {\n return this.message;\n }\n}\n\nmodule.exports = RuntimeError;\n","// \n\n \n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n \n \n constructor(parent , bindings = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings ) {\n return new Scope(this, bindings);\n }\n\n get(name ) {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name ) {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nmodule.exports = Scope;\n","// \n\nconst RuntimeError = require('./runtime_error');\n\n \n\n \n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nfunction findStopLessThanOrEqualTo(stops , input ) {\n const n = stops.length;\n let lowerIndex = 0;\n let upperIndex = n - 1;\n let currentIndex = 0;\n let currentValue, upperValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n upperValue = stops[currentIndex + 1];\n if (input === currentValue || input > currentValue && input < upperValue) { // Search complete\n return currentIndex;\n } else if (currentValue < input) {\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 Math.max(currentIndex - 1, 0);\n}\n\nmodule.exports = {findStopLessThanOrEqualTo};\n","// \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\nconst NullType = { kind: 'null' };\nconst NumberType = { kind: 'number' };\nconst StringType = { kind: 'string' };\nconst BooleanType = { kind: 'boolean' };\nconst ColorType = { kind: 'color' };\nconst ObjectType = { kind: 'object' };\nconst ValueType = { kind: 'value' };\nconst ErrorType = { kind: 'error' };\n\nfunction array(itemType , N ) {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nfunction toString(type ) {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n array(ValueType)\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nfunction checkSubtype(expected , t ) {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n !checkSubtype(expected.itemType, t.itemType) &&\n (typeof expected.N !== 'number' || expected.N === t.N)) {\n return null;\n }\n } else if (expected.kind === t.kind) {\n return null;\n } else if (expected.kind === 'value') {\n for (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nmodule.exports = {\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n array,\n ErrorType,\n toString,\n checkSubtype\n};\n","// \n\nconst assert = require('assert');\nconst Color = require('../util/color');\n\nconst {\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n array\n} = require('./types');\n\n \n\nfunction validateRGBA(r , g , b , a ) {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\n \n\nfunction isValue(mixed ) {\n if (mixed === null) {\n return true;\n } else if (typeof mixed === 'string') {\n return true;\n } else if (typeof mixed === 'boolean') {\n return true;\n } else if (typeof mixed === 'number') {\n return true;\n } else if (mixed instanceof Color) {\n return true;\n } else if (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\nfunction typeOf(value ) {\n if (value === null) {\n return NullType;\n } else if (typeof value === 'string') {\n return StringType;\n } else if (typeof value === 'boolean') {\n return BooleanType;\n } else if (typeof value === 'number') {\n return NumberType;\n } else if (value instanceof Color) {\n return ColorType;\n } else if (Array.isArray(value)) {\n const length = value.length;\n let itemType ;\n\n for (const item of value) {\n const t = typeOf(item);\n if (!itemType) {\n itemType = t;\n } else if (itemType === t) {\n continue;\n } else {\n itemType = ValueType;\n break;\n }\n }\n\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nmodule.exports = {\n Color,\n validateRGBA,\n isValue,\n typeOf\n};\n","// \n\nconst {createExpression} = require('../expression');\n\n \n \n\nmodule.exports = createFilter;\nmodule.exports.isExpressionFilter = isExpressionFilter;\n\nfunction isExpressionFilter(filter) {\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 case '!in':\n case '!has':\n case 'none':\n return false;\n\n case '==':\n case '!=':\n case '>':\n case '>=':\n case '<':\n case '<=':\n return filter.length === 3 && (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\nconst types = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nconst filterSpec = {\n 'type': 'boolean',\n 'default': false,\n 'function': true,\n 'property-function': true,\n 'zoom-function': true\n};\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter ) {\n if (!filter) {\n return () => true;\n }\n\n if (!isExpressionFilter(filter)) {\n return (new Function('g', 'f', `var p = (f && f.properties || {}); return ${compile(filter)}`) );\n }\n\n const compiled = createExpression(filter, filterSpec);\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n return (globalProperties , feature ) => compiled.value.evaluate(globalProperties, feature);\n }\n}\n\nfunction compile(filter) {\n if (!filter) return 'true';\n const op = filter[0];\n if (filter.length <= 1) return op === 'any' ? 'false' : 'true';\n const str =\n op === '==' ? compileComparisonOp(filter[1], filter[2], '===', false) :\n op === '!=' ? compileComparisonOp(filter[1], filter[2], '!==', false) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? compileComparisonOp(filter[1], filter[2], op, true) :\n op === 'any' ? compileLogicalOp(filter.slice(1), '||') :\n op === 'all' ? compileLogicalOp(filter.slice(1), '&&') :\n op === 'none' ? compileNegation(compileLogicalOp(filter.slice(1), '||')) :\n op === 'in' ? compileInOp(filter[1], filter.slice(2)) :\n op === '!in' ? compileNegation(compileInOp(filter[1], filter.slice(2))) :\n op === 'has' ? compileHasOp(filter[1]) :\n op === '!has' ? compileNegation(compileHasOp(filter[1])) :\n 'true';\n return `(${str})`;\n}\n\nfunction compilePropertyReference(property) {\n const ref =\n property === '$type' ? 'f.type' :\n property === '$id' ? 'f.id' : `p[${JSON.stringify(property)}]`;\n return ref;\n}\n\nfunction compileComparisonOp(property, value, op, checkType) {\n const left = compilePropertyReference(property);\n const right = property === '$type' ? types.indexOf(value) : JSON.stringify(value);\n return (checkType ? `typeof ${left}=== typeof ${right}&&` : '') + left + op + right;\n}\n\nfunction compileLogicalOp(expressions, op) {\n return expressions.map(compile).join(op);\n}\n\nfunction compileInOp(property, values) {\n if (property === '$type') values = values.map((value) => {\n return types.indexOf(value);\n });\n const left = JSON.stringify(values.sort(compare));\n const right = compilePropertyReference(property);\n\n if (values.length <= 200) return `${left}.indexOf(${right}) !== -1`;\n\n return `${'function(v, a, i, j) {' +\n 'while (i <= j) { var m = (i + j) >> 1;' +\n ' if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;' +\n '}' +\n 'return false; }('}${right}, ${left},0,${values.length - 1})`;\n}\n\nfunction compileHasOp(property) {\n return property === '$id' ? '\"id\" in f' : `${JSON.stringify(property)} in p`;\n}\n\nfunction compileNegation(expression) {\n return `!(${expression})`;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","\nconst colorSpaces = require('../util/color_spaces');\nconst Color = require('../util/color');\nconst extend = require('../util/extend');\nconst getType = require('../util/get_type');\nconst interpolate = require('../util/interpolate');\nconst Interpolate = require('../expression/definitions/interpolate');\n\nfunction isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nfunction createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (propertySpec.function === 'interpolated' ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], Color.parse(stop[1])];\n });\n }\n\n if (parameters.default) {\n parameters.default = Color.parse(parameters.default);\n } else {\n parameters.default = Color.parse(propertySpec.default);\n }\n }\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom: zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n return {\n kind: 'composite',\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, {name: 'linear'}),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n return {\n kind: 'camera',\n interpolationFactor: type === 'exponential' ?\n Interpolate.interpolationFactor.bind(undefined, {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1}) :\n () => 0,\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n if (value === undefined) {\n return coalesce(parameters.default, propertySpec.default);\n }\n return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n }\n };\n }\n}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops, input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops, input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction;\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace];\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\n\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n if (propertySpec.type === 'color') {\n input = Color.parse(input);\n } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n return coalesce(input, parameters.default, propertySpec.default);\n}\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n *\n * @private\n */\nfunction findStopLessThanOrEqualTo(stops, input) {\n const n = stops.length;\n let lowerIndex = 0;\n let upperIndex = n - 1;\n let currentIndex = 0;\n let currentValue, upperValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex][0];\n upperValue = stops[currentIndex + 1][0];\n if (input === currentValue || input > currentValue && input < upperValue) { // Search complete\n return currentIndex;\n } else if (currentValue < input) {\n lowerIndex = currentIndex + 1;\n } else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n }\n }\n\n return Math.max(currentIndex - 1, 0);\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nmodule.exports = {\n createFunction,\n isFunction\n};\n","\nconst refProperties = require('./util/ref_properties');\n\nfunction stringify(obj) {\n const type = typeof obj;\n if (type === 'number' || type === 'boolean' || type === 'string' || obj === undefined || obj === null)\n return JSON.stringify(obj);\n\n if (Array.isArray(obj)) {\n let str = '[';\n for (const val of obj) {\n str += `${stringify(val)},`;\n }\n return `${str}]`;\n }\n\n const keys = Object.keys(obj).sort();\n\n let str = '{';\n for (let i = 0; i < keys.length; i++) {\n str += `${JSON.stringify(keys[i])}:${stringify(obj[keys[i]])},`;\n }\n return `${str}}`;\n}\n\nfunction getKey(layer) {\n let key = '';\n for (const k of refProperties) {\n key += `/${stringify(layer[k])}`;\n }\n return key;\n}\n\nmodule.exports = groupByLayout;\n\n/**\n * Given an array of layers, return an array of arrays of layers where all\n * layers in each group have identical layout-affecting properties. These\n * are the properties that were formerly used by explicit `ref` mechanism\n * for layers: 'type', 'source', 'source-layer', 'minzoom', 'maxzoom',\n * 'filter', and 'layout'.\n *\n * The input is not modified. The output layers are references to the\n * input layers.\n *\n * @private\n * @param {Array<Layer>} layers\n * @returns {Array<Array<Layer>>}\n */\nfunction groupByLayout(layers) {\n const groups = {};\n\n for (let i = 0; i < layers.length; i++) {\n const k = getKey(layers[i]);\n let group = groups[k];\n if (!group) {\n group = groups[k] = [];\n }\n group.push(layers[i]);\n }\n\n const result = [];\n\n for (const k in groups) {\n result.push(groups[k]);\n }\n\n return result;\n}\n","// (c) Dean McNamee <dean@gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"rebeccapurple\": [102,51,153,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","/**\n * lodash 3.0.7 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\nvar isArray = require('lodash.isarray'),\n isTypedArray = require('lodash.istypedarray'),\n keys = require('lodash.keys');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * A specialized version of `_.some` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.isEqual` without support for `this` binding\n * `customizer` functions.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing objects.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA=[]] Tracks traversed `value` objects.\n * @param {Array} [stackB=[]] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = objToString.call(object);\n if (objTag == argsTag) {\n objTag = objectTag;\n } else if (objTag != objectTag) {\n objIsArr = isTypedArray(object);\n }\n }\n if (!othIsArr) {\n othTag = objToString.call(other);\n if (othTag == argsTag) {\n othTag = objectTag;\n } else if (othTag != objectTag) {\n othIsArr = isTypedArray(other);\n }\n }\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && !(objIsArr || objIsObj)) {\n return equalByTag(object, other, objTag);\n }\n if (!isLoose) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);\n }\n }\n if (!isSameTag) {\n return false;\n }\n // Assume cyclic values are equal.\n // For more information on detecting circular references see https://es5.github.io/#JO.\n stackA || (stackA = []);\n stackB || (stackB = []);\n\n var length = stackA.length;\n while (length--) {\n if (stackA[length] == object) {\n return stackB[length] == other;\n }\n }\n // Add `object` and `other` to the stack of traversed objects.\n stackA.push(object);\n stackB.push(other);\n\n var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);\n\n stackA.pop();\n stackB.pop();\n\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing arrays.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var index = -1,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isLoose && othLength > arrLength)) {\n return false;\n }\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index],\n result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;\n\n if (result !== undefined) {\n if (result) {\n continue;\n }\n return false;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (isLoose) {\n if (!arraySome(other, function(othValue) {\n return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);\n })) {\n return false;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} value The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag) {\n switch (tag) {\n case boolTag:\n case dateTag:\n // Coerce dates and booleans to numbers, dates to milliseconds and booleans\n // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.\n return +object == +other;\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case numberTag:\n // Treat `NaN` vs. `NaN` as equal.\n return (object != +object)\n ? other != +other\n : object == +other;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings primitives and string\n // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.\n return object == (other + '');\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparing values.\n * @param {boolean} [isLoose] Specify performing partial comparisons.\n * @param {Array} [stackA] Tracks traversed `value` objects.\n * @param {Array} [stackB] Tracks traversed `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\n var objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isLoose) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n var skipCtor = isLoose;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key],\n result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;\n\n // Recursively compare objects (susceptible to call stack limits).\n if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {\n return false;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (!skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = baseIsEqual;\n","/**\n * lodash 3.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\n/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = bindCallback;\n","/**\n * lodash 3.9.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 equivalents which return 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && reIsHostCtor.test(value);\n}\n\nmodule.exports = getNative;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isArguments;\n","/**\n * lodash 3.0.4 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n funcTag = '[object Function]';\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 equivalents which return 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && reIsHostCtor.test(value);\n}\n\nmodule.exports = isArray;\n","/**\n * lodash 3.0.4 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\nvar baseIsEqual = require('lodash._baseisequal'),\n bindCallback = require('lodash._bindcallback');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent. If `customizer` is provided it is invoked to compare values.\n * If `customizer` returns `undefined` comparisons are handled by the method\n * instead. The `customizer` is bound to `thisArg` and invoked with three\n * arguments: (value, other [, index|key]).\n *\n * **Note:** This method supports comparing arrays, booleans, `Date` objects,\n * numbers, `Object` objects, regexes, and strings. Objects are compared by\n * their own, not inherited, enumerable properties. Functions and DOM nodes\n * are **not** supported. Provide a customizer function to extend support\n * for comparing other values.\n *\n * @static\n * @memberOf _\n * @alias eq\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize value comparisons.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'fred' };\n *\n * object == other;\n * // => false\n *\n * _.isEqual(object, other);\n * // => true\n *\n * // using a customizer callback\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqual(array, other, function(value, other) {\n * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {\n * return true;\n * }\n * });\n * // => true\n */\nfunction isEqual(value, other, customizer, thisArg) {\n customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, customizer) : !!result;\n}\n\nmodule.exports = isEqual;\n","/**\n * lodash 3.0.6 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length,\n * else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified,\n * else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n","/**\n * lodash 3.1.2 (Custom Build) <https://lodash.com/>\n * Build: `lodash modern modularize exports=\"npm\" -o ./`\n * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\nvar getNative = require('lodash._getnative'),\n isArguments = require('lodash.isarguments'),\n isArray = require('lodash.isarray');\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object != 'function' && isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n isProto = typeof Ctor == 'function' && Ctor.prototype === object,\n result = Array(length),\n skipIndexes = length > 0;\n\n while (++index < length) {\n result[index] = (index + '');\n }\n for (var key in object) {\n if (!(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = keys;\n","\nmodule.exports = require('./v8.json');\n","// \n\nconst {parseCSSColor} = require('csscolorparser');\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n */\nclass Color {\n \n \n \n \n\n constructor(r , g , b , a = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n \n \n \n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input ) {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString() {\n const transformRgb = (value ) => Math.round(value * 255 / this.a);\n const rgb = [this.r, this.g, this.b].map(transformRgb);\n return `rgba(${rgb.concat(this.a).join(',')})`;\n }\n}\n\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\n\nmodule.exports = Color;\n","// \n\nconst Color = require('./color');\nconst interpolateNumber = require('./interpolate').number;\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor ) {\n const b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor ) {\n let y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Color(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from , to , t ) {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor ) {\n const {l, a, b} = rgbToLab(rgbColor);\n const h = Math.atan2(b, a) * rad2deg;\n return {\n h: h < 0 ? h + 360 : h,\n c: Math.sqrt(a * a + b * b),\n l: l,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor ) {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l: l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a , b , t ) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from , to , t ) {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nmodule.exports = {\n lab: {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n },\n hcl: {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n }\n};\n","\nmodule.exports = function (output, ...inputs) {\n for (const input of inputs) {\n for (const k in input) {\n output[k] = input[k];\n }\n }\n return output;\n};\n","\nmodule.exports = function getType(val) {\n if (val instanceof Number) {\n return 'number';\n } else if (val instanceof String) {\n return 'string';\n } else if (val instanceof Boolean) {\n return 'boolean';\n } else if (Array.isArray(val)) {\n return 'array';\n } else if (val === null) {\n return 'null';\n } else {\n return typeof val;\n }\n};\n","// \n\nconst Color = require('./color');\n\nmodule.exports = {\n number,\n color,\n array\n};\n\nfunction number(a , b , t ) {\n return (a * (1 - t)) + (b * t);\n}\n\nfunction color(from , to , t ) {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nfunction array(from , to , t ) {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","\nmodule.exports = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// \n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n */\n \n \n \n\nfunction success (value ) {\n return { result: 'success', value };\n}\n\nfunction error (value ) {\n return { result: 'error', value };\n}\n\nmodule.exports = {\n success,\n error\n};\n","\n// Turn jsonlint-lines-primitives objects into primitive objects\nfunction unbundle(value) {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nfunction deepUnbundle(value) {\n if (Array.isArray(value)) {\n return value.map(deepUnbundle);\n }\n return unbundle(value);\n}\n\nmodule.exports = unbundle;\nmodule.exports.deep = deepUnbundle;\n","\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst extend = require('../util/extend');\nconst unbundle = require('../util/unbundle_jsonlint');\nconst {isExpression} = require('../expression');\nconst {isFunction} = require('../function');\n\n// Main recursive validation function. Tracks:\n//\n// - key: string representing location of validation in style tree. Used only\n// for more informative error reporting.\n// - value: current value from style being evaluated. May be anything from a\n// high level object that needs to be descended into deeper or a simple\n// scalar value.\n// - valueSpec: current spec being evaluated. Tracks value.\n\nmodule.exports = function validate(options) {\n\n const validateFunction = require('./validate_function');\n const validateExpression = require('./validate_expression');\n const validateObject = require('./validate_object');\n const VALIDATORS = {\n '*': function() {\n return [];\n },\n 'array': require('./validate_array'),\n 'boolean': require('./validate_boolean'),\n 'number': require('./validate_number'),\n 'color': require('./validate_color'),\n 'constants': require('./validate_constants'),\n 'enum': require('./validate_enum'),\n 'filter': require('./validate_filter'),\n 'function': require('./validate_function'),\n 'layer': require('./validate_layer'),\n 'object': require('./validate_object'),\n 'source': require('./validate_source'),\n 'light': require('./validate_light'),\n 'string': require('./validate_string')\n };\n\n const value = options.value;\n const valueSpec = options.valueSpec;\n const key = options.key;\n const styleSpec = options.styleSpec;\n const style = options.style;\n\n if (getType(value) === 'string' && value[0] === '@') {\n if (styleSpec.$version > 7) {\n return [new ValidationError(key, value, 'constants have been deprecated as of v8')];\n }\n if (!(value in style.constants)) {\n return [new ValidationError(key, value, 'constant \"%s\" not found', value)];\n }\n options = extend({}, options, { value: style.constants[value] });\n }\n\n if (valueSpec.function && isFunction(unbundle(value))) {\n return validateFunction(options);\n\n } else if (valueSpec.function && isExpression(unbundle.deep(value))) {\n return validateExpression(options);\n\n } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n return VALIDATORS[valueSpec.type](options);\n\n } else {\n return validateObject(extend({}, options, {\n valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec\n }));\n }\n};\n","\nconst getType = require('../util/get_type');\nconst validate = require('./validate');\nconst ValidationError = require('../error/validation_error');\n\nmodule.exports = function validateArray(options) {\n const array = options.value;\n const arraySpec = options.valueSpec;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const key = options.key;\n const validateArrayElement = options.arrayElementValidator || validate;\n\n if (getType(array) !== 'array') {\n return [new ValidationError(key, array, 'array expected, %s found', getType(array))];\n }\n\n if (arraySpec.length && array.length !== arraySpec.length) {\n return [new ValidationError(key, array, 'array length %d expected, length %d found', arraySpec.length, array.length)];\n }\n\n if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n return [new ValidationError(key, array, 'array length at least %d expected, length %d found', arraySpec['min-length'], array.length)];\n }\n\n let arrayElementSpec = {\n \"type\": arraySpec.value\n };\n\n if (styleSpec.$version < 7) {\n arrayElementSpec.function = arraySpec.function;\n }\n\n if (getType(arraySpec.value) === 'object') {\n arrayElementSpec = arraySpec.value;\n }\n\n let errors = [];\n for (let i = 0; i < array.length; i++) {\n errors = errors.concat(validateArrayElement({\n array: array,\n arrayIndex: i,\n value: array[i],\n valueSpec: arrayElementSpec,\n style: style,\n styleSpec: styleSpec,\n key: `${key}[${i}]`\n }));\n }\n return errors;\n};\n","\nconst getType = require('../util/get_type');\nconst ValidationError = require('../error/validation_error');\n\nmodule.exports = function validateBoolean(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'boolean') {\n return [new ValidationError(key, value, 'boolean expected, %s found', type)];\n }\n\n return [];\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst parseCSSColor = require('csscolorparser').parseCSSColor;\n\nmodule.exports = function validateColor(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, 'color expected, %s found', type)];\n }\n\n if (parseCSSColor(value) === null) {\n return [new ValidationError(key, value, 'color expected, \"%s\" found', value)];\n }\n\n return [];\n};\n","\nconst ValidationError = require('../error/validation_error');\n\nmodule.exports = function validateConstants(options) {\n const key = options.key;\n const constants = options.value;\n\n if (constants) {\n return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n } else {\n return [];\n }\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst unbundle = require('../util/unbundle_jsonlint');\n\nmodule.exports = function validateEnum(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n const errors = [];\n\n if (Array.isArray(valueSpec.values)) { // <=v7\n if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, 'expected one of [%s], %s found', valueSpec.values.join(', '), JSON.stringify(value)));\n }\n } else { // >=v8\n if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, 'expected one of [%s], %s found', Object.keys(valueSpec.values).join(', '), JSON.stringify(value)));\n }\n }\n return errors;\n};\n","// \n\nconst ValidationError = require('../error/validation_error');\nconst {createExpression, createPropertyExpression} = require('../expression');\nconst unbundle = require('../util/unbundle_jsonlint');\n\nmodule.exports = function validateExpression(options ) {\n const expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(unbundle.deep(options.value), options.valueSpec);\n if (expression.result === 'error') {\n return expression.value.map((error) => {\n return new ValidationError(`${options.key}${error.key}`, options.value, error.message);\n });\n }\n\n if (options.expressionContext === 'property' && options.propertyKey === 'text-font' &&\n (expression.value )._styleExpression.expression.possibleOutputs().indexOf(undefined) !== -1) {\n return [new ValidationError(options.key, options.value, 'Invalid data expression for \"text-font\". Output values must be contained as literals within the expression.')];\n }\n\n return [];\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst validateExpression = require('./validate_expression');\nconst validateEnum = require('./validate_enum');\nconst getType = require('../util/get_type');\nconst unbundle = require('../util/unbundle_jsonlint');\nconst extend = require('../util/extend');\nconst {isExpressionFilter} = require('../feature_filter');\n\nmodule.exports = function validateFilter(options) {\n if (isExpressionFilter(unbundle.deep(options.value))) {\n return validateExpression(extend({}, options, {\n expressionContext: 'filter',\n valueSpec: { value: 'boolean' }\n }));\n } else {\n return validateNonExpressionFilter(options);\n }\n};\n\nfunction validateNonExpressionFilter(options) {\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, 'array expected, %s found', getType(value))];\n }\n\n const styleSpec = options.styleSpec;\n let type;\n\n let errors = [];\n\n if (value.length < 1) {\n return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n }\n\n errors = errors.concat(validateEnum({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: styleSpec.filter_operator,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n\n switch (unbundle(value[0])) {\n case '<':\n case '<=':\n case '>':\n case '>=':\n if (value.length >= 2 && unbundle(value[1]) === '$type') {\n errors.push(new ValidationError(key, value, '\"$type\" cannot be use with operator \"%s\"', value[0]));\n }\n /* falls through */\n case '==':\n case '!=':\n if (value.length !== 3) {\n errors.push(new ValidationError(key, value, 'filter array for operator \"%s\" must have 3 elements', value[0]));\n }\n /* falls through */\n case 'in':\n case '!in':\n if (value.length >= 2) {\n type = getType(value[1]);\n if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], 'string expected, %s found', type));\n }\n }\n for (let i = 2; i < value.length; i++) {\n type = getType(value[i]);\n if (unbundle(value[1]) === '$type') {\n errors = errors.concat(validateEnum({\n key: `${key}[${i}]`,\n value: value[i],\n valueSpec: styleSpec.geometry_type,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n errors.push(new ValidationError(`${key}[${i}]`, value[i], 'string, number, or boolean expected, %s found', type));\n }\n }\n break;\n\n case 'any':\n case 'all':\n case 'none':\n for (let i = 1; i < value.length; i++) {\n errors = errors.concat(validateNonExpressionFilter({\n key: `${key}[${i}]`,\n value: value[i],\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n break;\n\n case 'has':\n case '!has':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, 'filter array for \"%s\" operator must have 2 elements', value[0]));\n } else if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], 'string expected, %s found', type));\n }\n break;\n\n }\n\n return errors;\n}\n","\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst validate = require('./validate');\nconst validateObject = require('./validate_object');\nconst validateArray = require('./validate_array');\nconst validateNumber = require('./validate_number');\nconst unbundle = require('../util/unbundle_jsonlint');\n\nmodule.exports = function validateFunction(options) {\n const functionValueSpec = options.valueSpec;\n const functionType = unbundle(options.value.type);\n let stopKeyType;\n let stopDomainValues = {};\n let previousStopDomainValue;\n let previousStopDomainZoom;\n\n const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n const isPropertyFunction = !isZoomFunction;\n const isZoomAndPropertyFunction =\n getType(options.value.stops) === 'array' &&\n getType(options.value.stops[0]) === 'array' &&\n getType(options.value.stops[0][0]) === 'object';\n\n const errors = validateObject({\n key: options.key,\n value: options.value,\n valueSpec: options.styleSpec.function,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n stops: validateFunctionStops,\n default: validateFunctionDefault\n }\n });\n\n if (functionType === 'identity' && isZoomFunction) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n }\n\n if (functionType !== 'identity' && !options.value.stops) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n }\n\n if (functionType === 'exponential' && options.valueSpec['function'] === 'piecewise-constant') {\n errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n }\n\n if (options.styleSpec.$version >= 8) {\n if (isPropertyFunction && !options.valueSpec['property-function']) {\n errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n } else if (isZoomFunction && !options.valueSpec['zoom-function'] && options.objectKey !== 'heatmap-color') {\n errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n }\n }\n\n if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n }\n\n return errors;\n\n function validateFunctionStops(options) {\n if (functionType === 'identity') {\n return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n }\n\n let errors = [];\n const value = options.value;\n\n errors = errors.concat(validateArray({\n key: options.key,\n value: value,\n valueSpec: options.valueSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n arrayElementValidator: validateFunctionStop\n }));\n\n if (getType(value) === 'array' && value.length === 0) {\n errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n }\n\n return errors;\n }\n\n function validateFunctionStop(options) {\n let errors = [];\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, 'array expected, %s found', getType(value))];\n }\n\n if (value.length !== 2) {\n return [new ValidationError(key, value, 'array length %d expected, length %d found', 2, value.length)];\n }\n\n if (isZoomAndPropertyFunction) {\n if (getType(value[0]) !== 'object') {\n return [new ValidationError(key, value, 'object expected, %s found', getType(value[0]))];\n }\n if (value[0].zoom === undefined) {\n return [new ValidationError(key, value, 'object stop key must have zoom')];\n }\n if (value[0].value === undefined) {\n return [new ValidationError(key, value, 'object stop key must have value')];\n }\n if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n }\n if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n previousStopDomainZoom = unbundle(value[0].zoom);\n previousStopDomainValue = undefined;\n stopDomainValues = {};\n }\n errors = errors.concat(validateObject({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: { zoom: {} },\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: { zoom: validateNumber, value: validateStopDomainValue }\n }));\n } else {\n errors = errors.concat(validateStopDomainValue({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: {},\n style: options.style,\n styleSpec: options.styleSpec\n }, value));\n }\n\n return errors.concat(validate({\n key: `${key}[1]`,\n value: value[1],\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n\n function validateStopDomainValue(options, stop) {\n const type = getType(options.value);\n const value = unbundle(options.value);\n\n const reportValue = options.value !== null ? options.value : stop;\n\n if (!stopKeyType) {\n stopKeyType = type;\n } else if (type !== stopKeyType) {\n return [new ValidationError(options.key, reportValue, '%s stop domain type must match previous stop domain type %s', type, stopKeyType)];\n }\n\n if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n }\n\n if (type !== 'number' && functionType !== 'categorical') {\n let message = 'number expected, %s found';\n if (functionValueSpec['property-function'] && functionType === undefined) {\n message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n }\n return [new ValidationError(options.key, reportValue, message, type)];\n }\n\n if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n return [new ValidationError(options.key, reportValue, 'integer expected, found %s', value)];\n }\n\n if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n } else {\n previousStopDomainValue = value;\n }\n\n if (functionType === 'categorical' && value in stopDomainValues) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n } else {\n stopDomainValues[value] = true;\n }\n\n return [];\n }\n\n function validateFunctionDefault(options) {\n return validate({\n key: options.key,\n value: options.value,\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n });\n }\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst validateString = require('./validate_string');\n\nmodule.exports = function(options) {\n const value = options.value;\n const key = options.key;\n\n const errors = validateString(options);\n if (errors.length) return errors;\n\n if (value.indexOf('{fontstack}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n }\n\n if (value.indexOf('{range}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n }\n\n return errors;\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst unbundle = require('../util/unbundle_jsonlint');\nconst validateObject = require('./validate_object');\nconst validateFilter = require('./validate_filter');\nconst validatePaintProperty = require('./validate_paint_property');\nconst validateLayoutProperty = require('./validate_layout_property');\nconst validateSpec = require('./validate');\nconst extend = require('../util/extend');\n\nmodule.exports = function validateLayer(options) {\n let errors = [];\n\n const layer = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n\n if (!layer.type && !layer.ref) {\n errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n }\n let type = unbundle(layer.type);\n const ref = unbundle(layer.ref);\n\n if (layer.id) {\n const layerId = unbundle(layer.id);\n for (let i = 0; i < options.arrayIndex; i++) {\n const otherLayer = style.layers[i];\n if (unbundle(otherLayer.id) === layerId) {\n errors.push(new ValidationError(key, layer.id, 'duplicate layer id \"%s\", previously used at line %d', layer.id, otherLayer.id.__line__));\n }\n }\n }\n\n if ('ref' in layer) {\n ['type', 'source', 'source-layer', 'filter', 'layout'].forEach((p) => {\n if (p in layer) {\n errors.push(new ValidationError(key, layer[p], '\"%s\" is prohibited for ref layers', p));\n }\n });\n\n let parent;\n\n style.layers.forEach((layer) => {\n if (unbundle(layer.id) === ref) parent = layer;\n });\n\n if (!parent) {\n errors.push(new ValidationError(key, layer.ref, 'ref layer \"%s\" not found', ref));\n } else if (parent.ref) {\n errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n } else {\n type = unbundle(parent.type);\n }\n } else if (type !== 'background') {\n if (!layer.source) {\n errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n } else {\n const source = style.sources && style.sources[layer.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, layer.source, 'source \"%s\" not found', layer.source));\n } else if (sourceType === 'vector' && type === 'raster') {\n errors.push(new ValidationError(key, layer.source, 'layer \"%s\" requires a raster source', layer.id));\n } else if (sourceType === 'raster' && type !== 'raster') {\n errors.push(new ValidationError(key, layer.source, 'layer \"%s\" requires a vector source', layer.id));\n } else if (sourceType === 'vector' && !layer['source-layer']) {\n errors.push(new ValidationError(key, layer, 'layer \"%s\" must specify a \"source-layer\"', layer.id));\n } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.', layer.id));\n }\n }\n }\n\n errors = errors.concat(validateObject({\n key: key,\n value: layer,\n valueSpec: styleSpec.layer,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function() {\n return [];\n },\n // We don't want to enforce the spec's `\"requires\": true` for backward compatibility with refs;\n // the actual requirement is validated above. See https://github.com/mapbox/mapbox-gl-js/issues/5772.\n type: function() {\n return validateSpec({\n key: `${key}.type`,\n value: layer.type,\n valueSpec: styleSpec.layer.type,\n style: options.style,\n styleSpec: options.styleSpec,\n object: layer,\n objectKey: 'type'\n });\n },\n filter: validateFilter,\n layout: function(options) {\n return validateObject({\n layer: layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function(options) {\n return validateLayoutProperty(extend({layerType: type}, options));\n }\n }\n });\n },\n paint: function(options) {\n return validateObject({\n layer: layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*': function(options) {\n return validatePaintProperty(extend({layerType: type}, options));\n }\n }\n });\n }\n }\n }));\n\n return errors;\n};\n","\nconst validateProperty = require('./validate_property');\n\nmodule.exports = function validateLayoutProperty(options) {\n return validateProperty(options, 'layout');\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst validate = require('./validate');\n\nmodule.exports = function validateLight(options) {\n const light = options.value;\n const styleSpec = options.styleSpec;\n const lightSpec = styleSpec.light;\n const style = options.style;\n\n let errors = [];\n\n const rootType = getType(light);\n if (light === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('light', light, 'object expected, %s found', rootType)]);\n return errors;\n }\n\n for (const key in light) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key: key,\n value: light[key],\n valueSpec: styleSpec.transition,\n style: style,\n styleSpec: styleSpec\n }));\n } else if (lightSpec[key]) {\n errors = errors.concat(validate({\n key: key,\n value: light[key],\n valueSpec: lightSpec[key],\n style: style,\n styleSpec: styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, light[key], 'unknown property \"%s\"', key)]);\n }\n }\n\n return errors;\n};\n","\nconst getType = require('../util/get_type');\nconst ValidationError = require('../error/validation_error');\n\nmodule.exports = function validateNumber(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n const type = getType(value);\n\n if (type !== 'number') {\n return [new ValidationError(key, value, 'number expected, %s found', type)];\n }\n\n if ('minimum' in valueSpec && value < valueSpec.minimum) {\n return [new ValidationError(key, value, '%s is less than the minimum value %s', value, valueSpec.minimum)];\n }\n\n if ('maximum' in valueSpec && value > valueSpec.maximum) {\n return [new ValidationError(key, value, '%s is greater than the maximum value %s', value, valueSpec.maximum)];\n }\n\n return [];\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst validateSpec = require('./validate');\n\nmodule.exports = function validateObject(options) {\n const key = options.key;\n const object = options.value;\n const elementSpecs = options.valueSpec || {};\n const elementValidators = options.objectElementValidators || {};\n const style = options.style;\n const styleSpec = options.styleSpec;\n let errors = [];\n\n const type = getType(object);\n if (type !== 'object') {\n return [new ValidationError(key, object, 'object expected, %s found', type)];\n }\n\n for (const objectKey in object) {\n const elementSpecKey = objectKey.split('.')[0]; // treat 'paint.*' as 'paint'\n const elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n\n let validateElement;\n if (elementValidators[elementSpecKey]) {\n validateElement = elementValidators[elementSpecKey];\n } else if (elementSpecs[elementSpecKey]) {\n validateElement = validateSpec;\n } else if (elementValidators['*']) {\n validateElement = elementValidators['*'];\n } else if (elementSpecs['*']) {\n validateElement = validateSpec;\n } else {\n errors.push(new ValidationError(key, object[objectKey], 'unknown property \"%s\"', objectKey));\n continue;\n }\n\n errors = errors.concat(validateElement({\n key: (key ? `${key}.` : key) + objectKey,\n value: object[objectKey],\n valueSpec: elementSpec,\n style: style,\n styleSpec: styleSpec,\n object: object,\n objectKey: objectKey\n }, object));\n }\n\n for (const elementSpecKey in elementSpecs) {\n // Don't check `required` when there's a custom validator for that property.\n if (elementValidators[elementSpecKey]) {\n continue;\n }\n\n if (elementSpecs[elementSpecKey].required && elementSpecs[elementSpecKey]['default'] === undefined && object[elementSpecKey] === undefined) {\n errors.push(new ValidationError(key, object, 'missing required property \"%s\"', elementSpecKey));\n }\n }\n\n return errors;\n};\n","\nconst validateProperty = require('./validate_property');\n\nmodule.exports = function validatePaintProperty(options) {\n return validateProperty(options, 'paint');\n};\n","\nconst validate = require('./validate');\nconst ValidationError = require('../error/validation_error');\nconst getType = require('../util/get_type');\nconst {isFunction} = require('../function');\nconst unbundle = require('../util/unbundle_jsonlint');\n\nmodule.exports = function validateProperty(options, propertyType) {\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const value = options.value;\n const propertyKey = options.objectKey;\n const layerSpec = styleSpec[`${propertyType}_${options.layerType}`];\n\n if (!layerSpec) return [];\n\n const transitionMatch = propertyKey.match(/^(.*)-transition$/);\n if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n return validate({\n key: key,\n value: value,\n valueSpec: styleSpec.transition,\n style: style,\n styleSpec: styleSpec\n });\n }\n\n const valueSpec = options.valueSpec || layerSpec[propertyKey];\n if (!valueSpec) {\n return [new ValidationError(key, value, 'unknown property \"%s\"', propertyKey)];\n }\n\n let tokenMatch;\n if (getType(value) === 'string' && valueSpec['property-function'] && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n return [new ValidationError(\n key, value,\n '\"%s\" does not support interpolation syntax\\n' +\n 'Use an identity property function instead: `{ \"type\": \"identity\", \"property\": %s` }`.',\n propertyKey, JSON.stringify(tokenMatch[1])\n )];\n }\n\n const errors = [];\n\n if (options.layerType === 'symbol') {\n if (propertyKey === 'text-field' && style && !style.glyphs) {\n errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n }\n if (propertyKey === 'text-font' && isFunction(unbundle.deep(value)) && unbundle(value.type) === 'identity') {\n errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n }\n }\n\n return errors.concat(validate({\n key: options.key,\n value: value,\n valueSpec: valueSpec,\n style: style,\n styleSpec: styleSpec,\n expressionContext: 'property',\n propertyKey\n }));\n};\n","\nconst ValidationError = require('../error/validation_error');\nconst unbundle = require('../util/unbundle_jsonlint');\nconst validateObject = require('./validate_object');\nconst validateEnum = require('./validate_enum');\n\nmodule.exports = function validateSource(options) {\n const value = options.value;\n const key = options.key;\n const styleSpec = options.styleSpec;\n const style = options.style;\n\n if (!value.type) {\n return [new ValidationError(key, value, '\"type\" is required')];\n }\n\n const type = unbundle(value.type);\n let errors = [];\n\n switch (type) {\n case 'vector':\n case 'raster':\n case 'raster-dem':\n errors = errors.concat(validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec[`source_${type.replace('-', '_')}`],\n style: options.style,\n styleSpec: styleSpec\n }));\n if ('url' in value) {\n for (const prop in value) {\n if (['type', 'url', 'tileSize'].indexOf(prop) < 0) {\n errors.push(new ValidationError(`${key}.${prop}`, value[prop], 'a source with a \"url\" property may not include a \"%s\" property', prop));\n }\n }\n }\n return errors;\n\n case 'geojson':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_geojson,\n style: style,\n styleSpec: styleSpec\n });\n\n case 'video':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_video,\n style: style,\n styleSpec: styleSpec\n });\n\n case 'image':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_image,\n style: style,\n styleSpec: styleSpec\n });\n\n case 'canvas':\n return validateObject({\n key: key,\n value: value,\n valueSpec: styleSpec.source_canvas,\n style: style,\n styleSpec: styleSpec\n });\n\n default:\n return validateEnum({\n key: `${key}.type`,\n value: value.type,\n valueSpec: {values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image', 'canvas']},\n style: style,\n styleSpec: styleSpec\n });\n }\n};\n","\nconst getType = require('../util/get_type');\nconst ValidationError = require('../error/validation_error');\n\nmodule.exports = function validateString(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, 'string expected, %s found', type)];\n }\n\n return [];\n};\n","\nconst validateConstants = require('./validate/validate_constants');\nconst validate = require('./validate/validate');\nconst latestStyleSpec = require('./reference/latest');\nconst validateGlyphsURL = require('./validate/validate_glyphs_url');\n\n/**\n * Validate a Mapbox GL style against the style specification. This entrypoint,\n * `mapbox-gl-style-spec/lib/validate_style.min`, is designed to produce as\n * small a browserify bundle as possible by omitting unnecessary functionality\n * and legacy style specifications.\n *\n * @private\n * @param {Object} style The style to be validated.\n * @param {Object} [styleSpec] The style specification to validate against.\n * If omitted, the latest style spec is used.\n * @returns {Array<ValidationError>}\n * @example\n * var validate = require('mapbox-gl-style-spec/lib/validate_style.min');\n * var errors = validate(style);\n */\nfunction validateStyleMin(style, styleSpec) {\n styleSpec = styleSpec || latestStyleSpec;\n\n let errors = [];\n\n errors = errors.concat(validate({\n key: '',\n value: style,\n valueSpec: styleSpec.$root,\n styleSpec: styleSpec,\n style: style,\n objectElementValidators: {\n glyphs: validateGlyphsURL,\n '*': function() {\n return [];\n }\n }\n }));\n\n if (style.constants) {\n errors = errors.concat(validateConstants({\n key: 'constants',\n value: style.constants,\n style: style,\n styleSpec: styleSpec\n }));\n }\n\n return sortErrors(errors);\n}\n\nvalidateStyleMin.source = wrapCleanErrors(require('./validate/validate_source'));\nvalidateStyleMin.light = wrapCleanErrors(require('./validate/validate_light'));\nvalidateStyleMin.layer = wrapCleanErrors(require('./validate/validate_layer'));\nvalidateStyleMin.filter = wrapCleanErrors(require('./validate/validate_filter'));\nvalidateStyleMin.paintProperty = wrapCleanErrors(require('./validate/validate_paint_property'));\nvalidateStyleMin.layoutProperty = wrapCleanErrors(require('./validate/validate_layout_property'));\n\nfunction sortErrors(errors) {\n return [].concat(errors).sort((a, b) => {\n return a.line - b.line;\n });\n}\n\nfunction wrapCleanErrors(inner) {\n return function() {\n return sortErrors(inner.apply(this, arguments));\n };\n}\n\nmodule.exports = validateStyleMin;\n","// \n\nconst ZoomHistory = require('./zoom_history');\n\nclass EvaluationParameters {\n \n \n \n \n \n\n constructor(zoom , options ) {\n this.zoom = zoom;\n\n if (options) {\n this.now = options.now;\n this.fadeDuration = options.fadeDuration;\n this.zoomHistory = options.zoomHistory;\n this.transition = options.transition;\n } else {\n this.now = 0;\n this.fadeDuration = 0;\n this.zoomHistory = new ZoomHistory();\n this.transition = {};\n }\n }\n\n crossFadingFactor() {\n if (this.fadeDuration === 0) {\n return 1;\n } else {\n return Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);\n }\n }\n}\n\nmodule.exports = EvaluationParameters;\n","// \n\nconst styleSpec = require('../style-spec/reference/latest');\nconst util = require('../util/util');\nconst Evented = require('../util/evented');\nconst validateStyle = require('./validate_style');\nconst {sphericalToCartesian} = require('../util/util');\nconst Color = require('../style-spec/util/color');\nconst interpolate = require('../style-spec/util/interpolate');\n\n \n \n\nconst {\n Properties,\n Transitionable,\n Transitioning,\n PossiblyEvaluated,\n DataConstantProperty\n} = require('./properties');\n\n \n \n \n \n \n\n \n \n \n \n \n\nclass LightPositionProperty {\n \n\n constructor() {\n this.specification = styleSpec.light.position;\n }\n\n possiblyEvaluate(value , parameters ) {\n return sphericalToCartesian(value.expression.evaluate(parameters));\n }\n\n interpolate(a , b , t ) {\n return {\n x: interpolate.number(a.x, b.x, t),\n y: interpolate.number(a.y, b.y, t),\n z: interpolate.number(a.z, b.z, t),\n };\n }\n}\n\n \n \n \n \n \n \n\nconst properties = new Properties({\n \"anchor\": new DataConstantProperty(styleSpec.light.anchor),\n \"position\": new LightPositionProperty(),\n \"color\": new DataConstantProperty(styleSpec.light.color),\n \"intensity\": new DataConstantProperty(styleSpec.light.intensity),\n});\n\nconst TRANSITION_SUFFIX = '-transition';\n\n/*\n * Represents the light used to light extruded features.\n */\nclass Light extends Evented {\n \n \n \n\n constructor(lightOptions ) {\n super();\n this._transitionable = new Transitionable(properties);\n this.setLight(lightOptions);\n this._transitioning = this._transitionable.untransitioned();\n }\n\n getLight() {\n return this._transitionable.serialize();\n }\n\n setLight(options ) {\n if (this._validate(validateStyle.light, options)) {\n return;\n }\n\n for (const name in options) {\n const value = options[name];\n if (util.endsWith(name, TRANSITION_SUFFIX)) {\n this._transitionable.setTransition(name.slice(0, -TRANSITION_SUFFIX.length), value);\n } else {\n this._transitionable.setValue(name, value);\n }\n }\n }\n\n updateTransitions(parameters ) {\n this._transitioning = this._transitionable.transitioned(parameters, this._transitioning);\n }\n\n hasTransition() {\n return this._transitioning.hasTransition();\n }\n\n recalculate(parameters ) {\n this.properties = this._transitioning.possiblyEvaluate(parameters);\n }\n\n _validate(validate, value ) {\n return validateStyle.emitErrors(this, validate.call(validateStyle, util.extend({\n value: value,\n // Workaround for https://github.com/mapbox/mapbox-gl-js/issues/2407\n style: {glyphs: true, sprite: true},\n styleSpec: styleSpec\n })));\n }\n}\n\nmodule.exports = Light;\n","// \n\nconst {normalizeGlyphsURL} = require('../util/mapbox');\nconst ajax = require('../util/ajax');\nconst parseGlyphPBF = require('./parse_glyph_pbf');\n\n \n \n \n\nmodule.exports = function (fontstack ,\n range ,\n urlTemplate ,\n requestTransform ,\n callback ) {\n const begin = range * 256;\n const end = begin + 255;\n\n const request = requestTransform(\n normalizeGlyphsURL(urlTemplate)\n .replace('{fontstack}', fontstack)\n .replace('{range}', `${begin}-${end}`),\n ajax.ResourceType.Glyphs);\n\n ajax.getArrayBuffer(request, (err, response) => {\n if (err) {\n callback(err);\n } else if (response) {\n const glyphs = {};\n\n for (const glyph of parseGlyphPBF(response.data)) {\n glyphs[glyph.id] = glyph;\n }\n\n callback(null, glyphs);\n }\n });\n};\n","// \n\nconst ajax = require('../util/ajax');\nconst browser = require('../util/browser');\nconst {normalizeSpriteURL} = require('../util/mapbox');\nconst {RGBAImage} = require('../util/image');\n\n \n \n \n\nmodule.exports = function(baseURL ,\n transformRequestCallback ,\n callback ) {\n let json , image, error;\n const format = browser.devicePixelRatio > 1 ? '@2x' : '';\n\n ajax.getJSON(transformRequestCallback(normalizeSpriteURL(baseURL, format, '.json'), ajax.ResourceType.SpriteJSON), (err, data) => {\n if (!error) {\n error = err;\n json = data;\n maybeComplete();\n }\n });\n\n ajax.getImage(transformRequestCallback(normalizeSpriteURL(baseURL, format, '.png'), ajax.ResourceType.SpriteImage), (err, img) => {\n if (!error) {\n error = err;\n image = img;\n maybeComplete();\n }\n });\n\n function maybeComplete() {\n if (error) {\n callback(error);\n } else if (json && image) {\n const imageData = browser.getImageData(image);\n const result = {};\n\n for (const id in json) {\n const {width, height, x, y, sdf, pixelRatio} = json[id];\n const data = new RGBAImage({width, height});\n RGBAImage.copy(imageData, data, {x, y}, {x: 0, y: 0}, {width, height});\n result[id] = {data, pixelRatio, sdf};\n }\n\n callback(null, result);\n }\n }\n};\n","// \n\nconst {AlphaImage} = require('../util/image');\nconst Protobuf = require('pbf');\nconst border = 3;\n\n \n\nfunction readFontstacks(tag , glyphs , pbf ) {\n if (tag === 1) {\n pbf.readMessage(readFontstack, glyphs);\n }\n}\n\nfunction readFontstack(tag , glyphs , pbf ) {\n if (tag === 3) {\n const {id, bitmap, width, height, left, top, advance} = pbf.readMessage(readGlyph, {});\n glyphs.push({\n id,\n bitmap: new AlphaImage({\n width: width + 2 * border,\n height: height + 2 * border\n }, bitmap),\n metrics: {width, height, left, top, advance}\n });\n }\n}\n\nfunction readGlyph(tag , glyph , pbf ) {\n if (tag === 1) glyph.id = pbf.readVarint();\n else if (tag === 2) glyph.bitmap = pbf.readBytes();\n else if (tag === 3) glyph.width = pbf.readVarint();\n else if (tag === 4) glyph.height = pbf.readVarint();\n else if (tag === 5) glyph.left = pbf.readSVarint();\n else if (tag === 6) glyph.top = pbf.readSVarint();\n else if (tag === 7) glyph.advance = pbf.readVarint();\n}\n\nmodule.exports = function (data ) {\n return new Protobuf(data).readFields(readFontstacks, []);\n};\n\nmodule.exports.GLYPH_PBF_BORDER = border;\n","// \n\nconst browser = require('../util/browser');\nconst CollisionIndex = require('../symbol/collision_index');\n\n \n \n \n\nclass LayerPlacement {\n \n \n\n constructor(tileIDs ) {\n this._currentTileIndex = 0;\n this._tileIDs = tileIDs;\n }\n\n continuePlacement(sourceCache, collisionIndex, showCollisionBoxes , layer, shouldPausePlacement) {\n while (this._currentTileIndex < this._tileIDs.length) {\n const tile = sourceCache.getTileByID(this._tileIDs[this._currentTileIndex]);\n tile.placeLayer(showCollisionBoxes, collisionIndex, layer, sourceCache.id);\n\n this._currentTileIndex++;\n if (shouldPausePlacement()) {\n return true;\n }\n }\n }\n}\n\nclass Placement {\n \n \n \n \n \n \n \n \n \n\n constructor(transform , order ,\n forceFullPlacement , showCollisionBoxes , fadeDuration ,\n previousPlacement ) {\n\n this.collisionIndex = new CollisionIndex(transform.clone());\n this._currentPlacementIndex = order.length - 1;\n this._forceFullPlacement = forceFullPlacement;\n this._showCollisionBoxes = showCollisionBoxes;\n this._sourceCacheTileIDs = {};\n this._done = false;\n\n if (forceFullPlacement || !previousPlacement || fadeDuration === 0) {\n this._delayUntil = browser.now();\n } else {\n this._delayUntil = previousPlacement._delayUntil + 300;\n }\n\n if (previousPlacement) {\n this._collisionFadeTimes = previousPlacement._collisionFadeTimes;\n } else {\n this._collisionFadeTimes = {\n latestStart: 0,\n duration: fadeDuration\n };\n }\n }\n\n isDone() {\n return this._done;\n }\n\n continuePlacement(order , layers , sourceCaches ) {\n const startTime = browser.now();\n\n if (startTime < this._delayUntil) return true;\n\n const shouldPausePlacement = () => {\n const elapsedTime = browser.now() - startTime;\n return this._forceFullPlacement ? false : elapsedTime > 2;\n };\n\n while (this._currentPlacementIndex >= 0) {\n const layerId = order[this._currentPlacementIndex];\n const layer = layers[layerId];\n if (layer.type === 'symbol') {\n const sourceCache = sourceCaches[layer.source];\n\n if (!this._inProgressLayer) {\n if (!this._sourceCacheTileIDs[layer.source]) {\n this._sourceCacheTileIDs[layer.source] = sourceCache.getRenderableIds().sort((a, b) => {\n const aCoord = sourceCache.getTileByID(a).tileID;\n const bCoord = sourceCache.getTileByID(b).tileID;\n if (aCoord.isLessThan(bCoord)) {\n return -1;\n } else if (bCoord.isLessThan(aCoord)) {\n return 1;\n } else {\n return 0;\n }\n });\n }\n this._inProgressLayer = new LayerPlacement(this._sourceCacheTileIDs[layer.source]);\n }\n\n const pausePlacement = this._inProgressLayer.continuePlacement(sourceCache, this.collisionIndex, this._showCollisionBoxes, layer, shouldPausePlacement);\n\n if (pausePlacement) {\n // We didn't finish placing all layers within 2ms,\n // but we can keep rendering with a partial placement\n // We'll resume here on the next frame\n return;\n }\n\n delete this._inProgressLayer;\n }\n\n this._currentPlacementIndex--;\n }\n\n for (const id in sourceCaches) {\n sourceCaches[id].commitPlacement(this.collisionIndex, this._collisionFadeTimes);\n }\n\n this._done = true;\n\n }\n\n stillFading() {\n return browser.now() < this._collisionFadeTimes.latestStart + this._collisionFadeTimes.duration;\n }\n\n}\n\nmodule.exports = Placement;\n","// \n\nconst assert = require('assert');\nconst {clone, extend, easeCubicInOut} = require('../util/util');\nconst interpolate = require('../style-spec/util/interpolate');\nconst {normalizePropertyExpression} = require('../style-spec/expression');\nconst Color = require('../style-spec/util/color');\nconst {register} = require('../util/web_worker_transfer');\n\n \n \n \n\n \n \n \n \n \n \n \n\n \n\n/**\n * Implements a number of classes that define state and behavior for paint and layout properties, most\n * importantly their respective evaluation chains:\n *\n * Transitionable paint property value\n * → Transitioning paint property value\n * → Possibly evaluated paint property value\n * → Fully evaluated paint property value\n *\n * Layout property value\n * → Possibly evaluated layout property value\n * → Fully evaluated layout property value\n *\n * @module\n * @private\n */\n\n/**\n * Implementations of the `Property` interface:\n *\n * * Hold metadata about a property that's independent of any specific value: stuff like the type of the value,\n * the default value, etc. This comes from the style specification JSON.\n * * Define behavior that needs to be polymorphic across different properties: \"possibly evaluating\"\n * an input value (see below), and interpolating between two possibly-evaluted values.\n *\n * The type `T` is the fully-evaluated value type (e.g. `number`, `string`, `Color`).\n * The type `R` is the intermediate \"possibly evaluated\" value type. See below.\n *\n * There are two main implementations of the interface -- one for properties that allow data-driven values,\n * and one for properties that don't. There are a few \"special case\" implementations as well: one for properties\n * which cross-fade between two values rather than interpolating, one for `heatmap-color`, and one for\n * `light-position`.\n *\n * @private\n */\n \n \n \n \n \n\n/**\n * `PropertyValue` represents the value part of a property key-value unit. It's used to represent both\n * paint and layout property values, and regardless of whether or not their property supports data-driven\n * expressions.\n *\n * `PropertyValue` stores the raw input value as seen in a style or a runtime styling API call, i.e. one of the\n * following:\n *\n * * A constant value of the type appropriate for the property\n * * A function which produces a value of that type (but functions are quasi-deprecated in favor of expressions)\n * * An expression which produces a value of that type\n * * \"undefined\"/\"not present\", in which case the property is assumed to take on its default value.\n *\n * In addition to storing the original input value, `PropertyValue` also stores a normalized representation,\n * effectively treating functions as if they are expressions, and constant or default values as if they are\n * (constant) expressions.\n *\n * @private\n */\nclass PropertyValue {\n \n \n \n\n constructor(property , value ) {\n this.property = property;\n this.value = value;\n this.expression = normalizePropertyExpression(value === undefined ? property.specification.default : value, property.specification);\n }\n\n isDataDriven() {\n return this.expression.kind === 'source' || this.expression.kind === 'composite';\n }\n\n possiblyEvaluate(parameters ) {\n return this.property.possiblyEvaluate(this, parameters);\n }\n}\n\n// ------- Transitionable -------\n\n \n \n \n \n\n/**\n * Paint properties are _transitionable_: they can change in a fluid manner, interpolating or cross-fading between\n * old and new value. The duration of the transition, and the delay before it begins, is configurable.\n *\n * `TransitionablePropertyValue` is a compositional class that stores both the property value and that transition\n * configuration.\n *\n * A `TransitionablePropertyValue` can calculate the next step in the evaluation chain for paint property values:\n * `TransitioningPropertyValue`.\n *\n * @private\n */\nclass TransitionablePropertyValue {\n \n \n \n\n constructor(property ) {\n this.property = property;\n this.value = new PropertyValue(property, undefined);\n }\n\n transitioned(parameters ,\n prior ) {\n return new TransitioningPropertyValue(this.property, this.value, prior, // eslint-disable-line no-use-before-define\n extend({}, parameters.transition, this.transition), parameters.now);\n }\n\n untransitioned() {\n return new TransitioningPropertyValue(this.property, this.value, null, {}, 0); // eslint-disable-line no-use-before-define\n }\n}\n\n/**\n * A helper type: given an object type `Properties` whose values are each of type `Property<T, R>`, it calculates\n * an object type with the same keys and values of type `TransitionablePropertyValue<T, R>`.\n *\n * @private\n */\n \n \n\n/**\n * `Transitionable` stores a map of all (property name, `TransitionablePropertyValue`) pairs for paint properties of a\n * given layer type. It can calculate the `TransitioningPropertyValue`s for all of them at once, producing a\n * `Transitioning` instance for the same set of properties.\n *\n * @private\n */\nclass Transitionable {\n \n \n\n constructor(properties ) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultTransitionablePropertyValues) );\n }\n\n getValue (name ) {\n return clone(this._values[name].value.value);\n }\n\n setValue (name , value ) {\n if (!this._values.hasOwnProperty(name)) {\n this._values[name] = new TransitionablePropertyValue(this._values[name].property);\n }\n // Note that we do not _remove_ an own property in the case where a value is being reset\n // to the default: the transition might still be non-default.\n this._values[name].value = new PropertyValue(this._values[name].property, value === null ? undefined : clone(value));\n }\n\n getTransition (name ) {\n return clone(this._values[name].transition);\n }\n\n setTransition (name , value ) {\n if (!this._values.hasOwnProperty(name)) {\n this._values[name] = new TransitionablePropertyValue(this._values[name].property);\n }\n this._values[name].transition = clone(value) || undefined;\n }\n\n serialize() {\n const result = {};\n for (const property of Object.keys(this._values)) {\n const value = this.getValue(property);\n if (value !== undefined) {\n result[property] = value;\n }\n\n const transition = this.getTransition(property);\n if (transition !== undefined) {\n result[`${property}-transition`] = transition;\n }\n }\n return result;\n }\n\n transitioned(parameters , prior ) {\n const result = new Transitioning(this._properties); // eslint-disable-line no-use-before-define\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].transitioned(parameters, prior._values[property]);\n }\n return result;\n }\n\n untransitioned() {\n const result = new Transitioning(this._properties); // eslint-disable-line no-use-before-define\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].untransitioned();\n }\n return result;\n }\n}\n\n// ------- Transitioning -------\n\n/**\n * `TransitioningPropertyValue` implements the first of two intermediate steps in the evaluation chain of a paint\n * property value. In this step, transitions between old and new values are handled: as long as the transition is in\n * progress, `TransitioningPropertyValue` maintains a reference to the prior value, and interpolates between it and\n * the new value based on the current time and the configured transition duration and delay. The product is the next\n * step in the evaluation chain: the \"possibly evaluated\" result type `R`. See below for more on this concept.\n *\n * @private\n */\nclass TransitioningPropertyValue {\n \n \n \n \n \n\n constructor(property ,\n value ,\n prior ,\n transition ,\n now ) {\n this.property = property;\n this.value = value;\n this.begin = now + transition.delay || 0;\n this.end = this.begin + transition.duration || 0;\n if (property.specification.transition && (transition.delay || transition.duration)) {\n this.prior = prior;\n }\n }\n\n possiblyEvaluate(parameters ) {\n const now = parameters.now || 0;\n const finalValue = this.value.possiblyEvaluate(parameters);\n const prior = this.prior;\n if (!prior) {\n // No prior value.\n return finalValue;\n } else if (now > this.end) {\n // Transition from prior value is now complete.\n this.prior = null;\n return finalValue;\n } else if (this.value.isDataDriven()) {\n // Transitions to data-driven properties are not supported.\n // We snap immediately to the data-driven value so that, when we perform layout,\n // we see the data-driven function and can use it to populate vertex buffers.\n this.prior = null;\n return finalValue;\n } else if (now < this.begin) {\n // Transition hasn't started yet.\n return prior.possiblyEvaluate(parameters);\n } else {\n // Interpolate between recursively-calculated prior value and final.\n const t = (now - this.begin) / (this.end - this.begin);\n return this.property.interpolate(prior.possiblyEvaluate(parameters), finalValue, easeCubicInOut(t));\n }\n }\n}\n\n/**\n * A helper type: given an object type `Properties` whose values are each of type `Property<T, R>`, it calculates\n * an object type with the same keys and values of type `TransitioningPropertyValue<T, R>`.\n *\n * @private\n */\n \n \n\n/**\n * `Transitioning` stores a map of all (property name, `TransitioningPropertyValue`) pairs for paint properties of a\n * given layer type. It can calculate the possibly-evaluated values for all of them at once, producing a\n * `PossiblyEvaluated` instance for the same set of properties.\n *\n * @private\n */\nclass Transitioning {\n \n \n\n constructor(properties ) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultTransitioningPropertyValues) );\n }\n\n possiblyEvaluate(parameters ) {\n const result = new PossiblyEvaluated(this._properties); // eslint-disable-line no-use-before-define\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].possiblyEvaluate(parameters);\n }\n return result;\n }\n\n hasTransition() {\n for (const property of Object.keys(this._values)) {\n if (this._values[property].prior) {\n return true;\n }\n }\n return false;\n }\n}\n\n// ------- Layout -------\n\n/**\n * A helper type: given an object type `Properties` whose values are each of type `Property<T, R>`, it calculates\n * an object type with the same keys and values of type `PropertyValue<T, R>`.\n *\n * @private\n */\n \n \n\n/**\n * Because layout properties are not transitionable, they have a simpler representation and evaluation chain than\n * paint properties: `PropertyValue`s are possibly evaluated, producing possibly evaluated values, which are then\n * fully evaluated.\n *\n * `Layout` stores a map of all (property name, `PropertyValue`) pairs for layout properties of a\n * given layer type. It can calculate the possibly-evaluated values for all of them at once, producing a\n * `PossiblyEvaluated` instance for the same set of properties.\n *\n * @private\n */\nclass Layout {\n \n \n\n constructor(properties ) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultPropertyValues) );\n }\n\n getValue (name ) {\n return clone(this._values[name].value);\n }\n\n setValue (name , value ) {\n this._values[name] = new PropertyValue(this._values[name].property, value === null ? undefined : clone(value));\n }\n\n serialize() {\n const result = {};\n for (const property of Object.keys(this._values)) {\n const value = this.getValue(property);\n if (value !== undefined) {\n result[property] = value;\n }\n }\n return result;\n }\n\n possiblyEvaluate(parameters ) {\n const result = new PossiblyEvaluated(this._properties); // eslint-disable-line no-use-before-define\n for (const property of Object.keys(this._values)) {\n result._values[property] = this._values[property].possiblyEvaluate(parameters);\n }\n return result;\n }\n}\n\n// ------- PossiblyEvaluated -------\n\n/**\n * \"Possibly evaluated value\" is an intermediate stage in the evaluation chain for both paint and layout property\n * values. The purpose of this stage is to optimize away unnecessary recalculations for data-driven properties. Code\n * which uses data-driven property values must assume that the value is dependent on feature data, and request that it\n * be evaluated for each feature. But when that property value is in fact a constant or camera function, the calculation\n * will not actually depend on the feature, and we can benefit from returning the prior result of having done the\n * evaluation once, ahead of time, in an intermediate step whose inputs are just the value and \"global\" parameters\n * such as current zoom level.\n *\n * `PossiblyEvaluatedValue` represents the three possible outcomes of this step: if the input value was a constant or\n * camera expression, then the \"possibly evaluated\" result is a constant value. Otherwise, the input value was either\n * a source or composite expression, and we must defer final evaluation until supplied a feature. We separate\n * the source and composite cases because they are handled differently when generating GL attributes, buffers, and\n * uniforms.\n *\n * Note that `PossiblyEvaluatedValue` (and `PossiblyEvaluatedPropertyValue`, below) are _not_ used for properties that\n * do not allow data-driven values. For such properties, we know that the \"possibly evaluated\" result is always a constant\n * scalar value. See below.\n *\n * @private\n */\n \n \n \n \n\n/**\n * `PossiblyEvaluatedPropertyValue` is used for data-driven paint and layout property values. It holds a\n * `PossiblyEvaluatedValue` and the `GlobalProperties` that were used to generate it. You're not allowed to supply\n * a different set of `GlobalProperties` when performing the final evaluation because they would be ignored in the\n * case where the input value was a constant or camera function.\n *\n * @private\n */\nclass PossiblyEvaluatedPropertyValue {\n \n \n \n\n constructor(property , value , globals ) {\n this.property = property;\n this.value = value;\n this.globals = globals;\n }\n\n isConstant() {\n return this.value.kind === 'constant';\n }\n\n constantOr(value ) {\n if (this.value.kind === 'constant') {\n return this.value.value;\n } else {\n return value;\n }\n }\n\n evaluate(feature ) {\n return this.property.evaluate(this.value, this.globals, feature);\n }\n}\n\n/**\n * A helper type: given an object type `Properties` whose values are each of type `Property<T, R>`, it calculates\n * an object type with the same keys, and values of type `R`.\n *\n * For properties that don't allow data-driven values, `R` is a scalar type such as `number`, `string`, or `Color`.\n * For data-driven properties, it is `PossiblyEvaluatedPropertyValue`. Critically, the type definitions are set up\n * in a way that allows flow to know which of these two cases applies for any given property name, and if you attempt\n * to use a `PossiblyEvaluatedPropertyValue` as if it was a scalar, or vice versa, you will get a type error. (However,\n * there's at least one case in which flow fails to produce a type error that you should be aware of: in a context such\n * as `layer.paint.get('foo-opacity') === 0`, if `foo-opacity` is data-driven, than the left-hand side is of type\n * `PossiblyEvaluatedPropertyValue<number>`, but flow will not complain about comparing this to a number using `===`.\n * See https://github.com/facebook/flow/issues/2359.)\n *\n * There's also a third, special case possiblity for `R`: for cross-faded properties, it's `?CrossFaded<T>`.\n *\n * @private\n */\n \n \n\n/**\n * `PossiblyEvaluated` stores a map of all (property name, `R`) pairs for paint or layout properties of a\n * given layer type.\n */\nclass PossiblyEvaluated {\n \n \n\n constructor(properties ) {\n this._properties = properties;\n this._values = (Object.create(properties.defaultPossiblyEvaluatedValues) );\n }\n\n get (name ) {\n return this._values[name];\n }\n}\n\n/**\n * An implementation of `Property` for properties that do not permit data-driven (source or composite) expressions.\n * This restriction allows us to declare statically that the result of possibly evaluating this kind of property\n * is in fact always the scalar type `T`, and can be used without further evaluating the value on a per-feature basis.\n *\n * @private\n */\nclass DataConstantProperty {\n \n\n constructor(specification ) {\n this.specification = specification;\n }\n\n possiblyEvaluate(value , parameters ) {\n assert(!value.isDataDriven());\n return value.expression.evaluate(parameters);\n }\n\n interpolate(a , b , t ) {\n const interp = (interpolate )[this.specification.type];\n if (interp) {\n return interp(a, b, t);\n } else {\n return a;\n }\n }\n}\n\n/**\n * An implementation of `Property` for properties that permit data-driven (source or composite) expressions.\n * The result of possibly evaluating this kind of property is `PossiblyEvaluatedPropertyValue<T>`; obtaining\n * a scalar value `T` requires further evaluation on a per-feature basis.\n *\n * @private\n */\nclass DataDrivenProperty {\n \n\n constructor(specification ) {\n this.specification = specification;\n }\n\n possiblyEvaluate(value , parameters ) {\n if (value.expression.kind === 'constant' || value.expression.kind === 'camera') {\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: value.expression.evaluate(parameters)}, parameters);\n } else {\n return new PossiblyEvaluatedPropertyValue(this, value.expression, parameters);\n }\n }\n\n interpolate(a ,\n b ,\n t ) {\n // If either possibly-evaluated value is non-constant, give up: we aren't able to interpolate data-driven values.\n if (a.value.kind !== 'constant' || b.value.kind !== 'constant') {\n return a;\n }\n\n // Special case hack solely for fill-outline-color.\n if (a.value.value === undefined || a.value.value === undefined)\n return (undefined );\n\n const interp = (interpolate )[this.specification.type];\n if (interp) {\n return new PossiblyEvaluatedPropertyValue(this, {kind: 'constant', value: interp(a.value.value, b.value.value, t)}, a.globals);\n } else {\n return a;\n }\n }\n\n evaluate(value , globals , feature ) {\n if (value.kind === 'constant') {\n return value.value;\n } else {\n return value.evaluate(globals, feature);\n }\n }\n}\n\n/**\n * An implementation of `Property` for `*-pattern` and `line-dasharray`, which are transitioned by cross-fading\n * rather than interpolation.\n *\n * @private\n */\nclass CrossFadedProperty {\n \n\n constructor(specification ) {\n this.specification = specification;\n }\n\n possiblyEvaluate(value , parameters ) {\n if (value.value === undefined) {\n return undefined;\n } else if (value.expression.kind === 'constant') {\n const constant = value.expression.evaluate(parameters);\n return this._calculate(constant, constant, constant, parameters);\n } else {\n assert(!value.isDataDriven());\n return this._calculate(\n value.expression.evaluate({zoom: parameters.zoom - 1.0}),\n value.expression.evaluate({zoom: parameters.zoom}),\n value.expression.evaluate({zoom: parameters.zoom + 1.0}),\n parameters);\n }\n }\n\n _calculate(min , mid , max , parameters ) {\n const z = parameters.zoom;\n const fraction = z - Math.floor(z);\n const t = parameters.crossFadingFactor();\n return z > parameters.zoomHistory.lastIntegerZoom ?\n { from: min, to: mid, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } :\n { from: max, to: mid, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction };\n }\n\n interpolate(a ) {\n return a;\n }\n}\n\n/**\n * An implementation of `Property` for `heatmap-color`. Evaluation and interpolation are no-ops: the real\n * evaluation happens in HeatmapStyleLayer.\n *\n * @private\n */\nclass HeatmapColorProperty {\n \n\n constructor(specification ) {\n this.specification = specification;\n }\n\n possiblyEvaluate() {}\n interpolate() {}\n}\n\n/**\n * `Properties` holds objects containing default values for the layout or paint property set of a given\n * layer type. These objects are immutable, and they are used as the prototypes for the `_values` members of\n * `Transitionable`, `Transitioning`, `Layout`, and `PossiblyEvaluated`. This allows these classes to avoid\n * doing work in the common case where a property has no explicit value set and should be considered to take\n * on the default value: using `for (const property of Object.keys(this._values))`, they can iterate over\n * only the _own_ properties of `_values`, skipping repeated calculation of transitions and possible/final\n * evaluations for defaults, the result of which will always be the same.\n *\n * @private\n */\nclass Properties {\n \n \n \n \n \n\n constructor(properties ) {\n this.properties = properties;\n this.defaultPropertyValues = ({} );\n this.defaultTransitionablePropertyValues = ({} );\n this.defaultTransitioningPropertyValues = ({} );\n this.defaultPossiblyEvaluatedValues = ({} );\n\n for (const property in properties) {\n const prop = properties[property];\n const defaultPropertyValue = this.defaultPropertyValues[property] =\n new PropertyValue(prop, undefined);\n const defaultTransitionablePropertyValue = this.defaultTransitionablePropertyValues[property] =\n new TransitionablePropertyValue(prop);\n this.defaultTransitioningPropertyValues[property] =\n defaultTransitionablePropertyValue.untransitioned();\n this.defaultPossiblyEvaluatedValues[property] =\n defaultPropertyValue.possiblyEvaluate(({} ));\n }\n }\n}\n\nregister('DataDrivenProperty', DataDrivenProperty);\nregister('DataConstantProperty', DataConstantProperty);\nregister('CrossFadedProperty', CrossFadedProperty);\nregister('HeatmapColorProperty', HeatmapColorProperty);\n\nmodule.exports = {\n PropertyValue,\n Transitionable,\n Transitioning,\n Layout,\n PossiblyEvaluatedPropertyValue,\n PossiblyEvaluated,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty,\n Properties\n};\n","// \n\nconst Point = require('@mapbox/point-geometry');\n\n \n \n \n \n\nfunction getMaximumPaintValue(property , layer , bucket ) {\n const value = ((layer.paint ).get(property) ).value;\n if (value.kind === 'constant') {\n return value.value;\n } else {\n const binders = bucket.programConfigurations.get(layer.id).binders;\n return binders[property].statistics.max;\n }\n}\n\nfunction translateDistance(translate ) {\n return Math.sqrt(translate[0] * translate[0] + translate[1] * translate[1]);\n}\n\nfunction translate(queryGeometry ,\n translate ,\n translateAnchor ,\n bearing ,\n pixelsToTileUnits ) {\n if (!translate[0] && !translate[1]) {\n return queryGeometry;\n }\n\n const pt = Point.convert(translate);\n\n if (translateAnchor === \"viewport\") {\n pt._rotate(-bearing);\n }\n\n const translated = [];\n for (let i = 0; i < queryGeometry.length; i++) {\n const ring = queryGeometry[i];\n const translatedRing = [];\n for (let k = 0; k < ring.length; k++) {\n translatedRing.push(ring[k].sub(pt._mult(pixelsToTileUnits)));\n }\n translated.push(translatedRing);\n }\n return translated;\n}\n\nmodule.exports = {\n getMaximumPaintValue,\n translateDistance,\n translate\n};\n","// \n\nconst assert = require('assert');\nconst Evented = require('../util/evented');\nconst StyleLayer = require('./style_layer');\nconst loadSprite = require('./load_sprite');\nconst ImageManager = require('../render/image_manager');\nconst GlyphManager = require('../render/glyph_manager');\nconst Light = require('./light');\nconst LineAtlas = require('../render/line_atlas');\nconst util = require('../util/util');\nconst ajax = require('../util/ajax');\nconst mapbox = require('../util/mapbox');\nconst browser = require('../util/browser');\nconst Dispatcher = require('../util/dispatcher');\nconst validateStyle = require('./validate_style');\nconst getSourceType = require('../source/source').getType;\nconst setSourceType = require('../source/source').setType;\nconst QueryFeatures = require('../source/query_features');\nconst SourceCache = require('../source/source_cache');\nconst GeoJSONSource = require('../source/geojson_source');\nconst styleSpec = require('../style-spec/reference/latest');\nconst getWorkerPool = require('../util/global_worker_pool');\nconst deref = require('../style-spec/deref');\nconst diff = require('../style-spec/diff');\nconst rtlTextPlugin = require('../source/rtl_text_plugin');\nconst Placement = require('./placement');\nconst ZoomHistory = require('./zoom_history');\n\n \n \n \n \n \n \n \n \n\nconst supportedDiffOperations = util.pick(diff.operations, [\n 'addLayer',\n 'removeLayer',\n 'setPaintProperty',\n 'setLayoutProperty',\n 'setFilter',\n 'addSource',\n 'removeSource',\n 'setLayerZoomRange',\n 'setLight',\n 'setTransition',\n 'setGeoJSONSourceData'\n // 'setGlyphs',\n // 'setSprite',\n]);\n\nconst ignoredDiffOperations = util.pick(diff.operations, [\n 'setCenter',\n 'setZoom',\n 'setBearing',\n 'setPitch'\n]);\n\n \n \n \n \n\n/**\n * @private\n */\nclass Style extends Evented {\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n constructor(map , options = {}) {\n super();\n\n this.map = map;\n this.dispatcher = new Dispatcher(getWorkerPool(), this);\n this.imageManager = new ImageManager();\n this.glyphManager = new GlyphManager(map._transformRequest, options.localIdeographFontFamily);\n this.lineAtlas = new LineAtlas(256, 512);\n\n this._layers = {};\n this._order = [];\n this.sourceCaches = {};\n this.zoomHistory = new ZoomHistory();\n this._loaded = false;\n\n this._resetUpdates();\n\n const self = this;\n this._rtlTextPluginCallback = rtlTextPlugin.registerForPluginAvailability((args) => {\n self.dispatcher.broadcast('loadRTLTextPlugin', args.pluginBlobURL, args.errorCallback);\n for (const id in self.sourceCaches) {\n self.sourceCaches[id].reload(); // Should be a no-op if the plugin loads before any tiles load\n }\n });\n\n this.on('data', (event) => {\n if (event.dataType !== 'source' || event.sourceDataType !== 'metadata') {\n return;\n }\n\n const sourceCache = this.sourceCaches[event.sourceId];\n if (!sourceCache) {\n return;\n }\n\n const source = sourceCache.getSource();\n if (!source || !source.vectorLayerIds) {\n return;\n }\n\n for (const layerId in this._layers) {\n const layer = this._layers[layerId];\n if (layer.source === source.id) {\n this._validateLayer(layer);\n }\n }\n });\n }\n\n loadURL(url , options \n \n \n = {}) {\n this.fire('dataloading', {dataType: 'style'});\n\n const validate = typeof options.validate === 'boolean' ?\n options.validate : !mapbox.isMapboxURL(url);\n\n url = mapbox.normalizeStyleURL(url, options.accessToken);\n const request = this.map._transformRequest(url, ajax.ResourceType.Style);\n\n ajax.getJSON(request, (error, json) => {\n if (error) {\n this.fire('error', {error});\n } else if (json) {\n this._load((json ), validate);\n }\n });\n }\n\n loadJSON(json , options \n \n = {}) {\n this.fire('dataloading', {dataType: 'style'});\n\n browser.frame(() => {\n this._load(json, options.validate !== false);\n });\n }\n\n _load(json , validate ) {\n if (validate && validateStyle.emitErrors(this, validateStyle(json))) {\n return;\n }\n\n this._loaded = true;\n this.stylesheet = json;\n\n for (const id in json.sources) {\n this.addSource(id, json.sources[id], {validate: false});\n }\n\n if (json.sprite) {\n loadSprite(json.sprite, this.map._transformRequest, (err, images) => {\n if (err) {\n this.fire('error', err);\n } else if (images) {\n for (const id in images) {\n this.imageManager.addImage(id, images[id]);\n }\n }\n\n this.imageManager.setLoaded(true);\n this.fire('data', {dataType: 'style'});\n });\n } else {\n this.imageManager.setLoaded(true);\n }\n\n this.glyphManager.setURL(json.glyphs);\n\n const layers = deref(this.stylesheet.layers);\n\n this._order = layers.map((layer) => layer.id);\n\n this._layers = {};\n for (let layer of layers) {\n layer = StyleLayer.create(layer);\n layer.setEventedParent(this, {layer: {id: layer.id}});\n this._layers[layer.id] = layer;\n }\n\n this.dispatcher.broadcast('setLayers', this._serializeLayers(this._order));\n\n this.light = new Light(this.stylesheet.light);\n\n this.fire('data', {dataType: 'style'});\n this.fire('style.load');\n }\n\n _validateLayer(layer ) {\n const sourceCache = this.sourceCaches[layer.source];\n if (!sourceCache) {\n return;\n }\n\n const sourceLayer = layer.sourceLayer;\n if (!sourceLayer) {\n return;\n }\n\n const source = sourceCache.getSource();\n if (source.type === 'geojson' || (source.vectorLayerIds && source.vectorLayerIds.indexOf(sourceLayer) === -1)) {\n this.fire('error', {\n error: new Error(\n `Source layer \"${sourceLayer}\" ` +\n `does not exist on source \"${source.id}\" ` +\n `as specified by style layer \"${layer.id}\"`\n )\n });\n }\n }\n\n loaded() {\n if (!this._loaded)\n return false;\n\n if (Object.keys(this._updatedSources).length)\n return false;\n\n for (const id in this.sourceCaches)\n if (!this.sourceCaches[id].loaded())\n return false;\n\n if (!this.imageManager.isLoaded())\n return false;\n\n return true;\n }\n\n _serializeLayers(ids ) {\n return ids.map((id) => this._layers[id].serialize());\n }\n\n hasTransitions() {\n if (this.light && this.light.hasTransition()) {\n return true;\n }\n\n for (const id in this.sourceCaches) {\n if (this.sourceCaches[id].hasTransition()) {\n return true;\n }\n }\n\n for (const id in this._layers) {\n if (this._layers[id].hasTransition()) {\n return true;\n }\n }\n\n return false;\n }\n\n _checkLoaded() {\n if (!this._loaded) {\n throw new Error('Style is not done loading');\n }\n }\n\n /**\n * Apply queued style updates in a batch and recalculate zoom-dependent paint properties.\n */\n update(parameters ) {\n if (!this._loaded) {\n return;\n }\n\n if (this._changed) {\n const updatedIds = Object.keys(this._updatedLayers);\n const removedIds = Object.keys(this._removedLayers);\n\n if (updatedIds.length || removedIds.length) {\n this._updateWorkerLayers(updatedIds, removedIds);\n }\n for (const id in this._updatedSources) {\n const action = this._updatedSources[id];\n assert(action === 'reload' || action === 'clear');\n if (action === 'reload') {\n this._reloadSource(id);\n } else if (action === 'clear') {\n this._clearSource(id);\n }\n }\n\n for (const id in this._updatedPaintProps) {\n this._layers[id].updateTransitions(parameters);\n }\n\n this.light.updateTransitions(parameters);\n\n this._resetUpdates();\n\n this.fire('data', {dataType: 'style'});\n }\n\n for (const sourceId in this.sourceCaches) {\n this.sourceCaches[sourceId].used = false;\n }\n\n for (const layerId of this._order) {\n const layer = this._layers[layerId];\n\n layer.recalculate(parameters);\n if (!layer.isHidden(parameters.zoom) && layer.source) {\n this.sourceCaches[layer.source].used = true;\n }\n }\n\n this.light.recalculate(parameters);\n this.z = parameters.zoom;\n }\n\n _updateWorkerLayers(updatedIds , removedIds ) {\n this.dispatcher.broadcast('updateLayers', {\n layers: this._serializeLayers(updatedIds),\n removedIds: removedIds\n });\n }\n\n _resetUpdates() {\n this._changed = false;\n\n this._updatedLayers = {};\n this._removedLayers = {};\n\n this._updatedSources = {};\n this._updatedPaintProps = {};\n }\n\n /**\n * Update this style's state to match the given style JSON, performing only\n * the necessary mutations.\n *\n * May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec\n * diff algorithm produces an operation that is not supported.\n *\n * @returns {boolean} true if any changes were made; false otherwise\n * @private\n */\n setState(nextState ) {\n this._checkLoaded();\n\n if (validateStyle.emitErrors(this, validateStyle(nextState))) return false;\n\n nextState = util.clone(nextState);\n nextState.layers = deref(nextState.layers);\n\n const changes = diff(this.serialize(), nextState)\n .filter(op => !(op.command in ignoredDiffOperations));\n\n if (changes.length === 0) {\n return false;\n }\n\n const unimplementedOps = changes.filter(op => !(op.command in supportedDiffOperations));\n if (unimplementedOps.length > 0) {\n throw new Error(`Unimplemented: ${unimplementedOps.map(op => op.command).join(', ')}.`);\n }\n\n changes.forEach((op) => {\n if (op.command === 'setTransition') {\n // `transition` is always read directly off of\n // `this.stylesheet`, which we update below\n return;\n }\n (this )[op.command].apply(this, op.args);\n });\n\n this.stylesheet = nextState;\n\n return true;\n }\n\n addImage(id , image ) {\n if (this.getImage(id)) {\n return this.fire('error', {error: new Error('An image with this name already exists.')});\n }\n this.imageManager.addImage(id, image);\n this.fire('data', {dataType: 'style'});\n }\n\n getImage(id ) {\n return this.imageManager.getImage(id);\n }\n\n removeImage(id ) {\n if (!this.getImage(id)) {\n return this.fire('error', {error: new Error('No image with this name exists.')});\n }\n this.imageManager.removeImage(id);\n this.fire('data', {dataType: 'style'});\n }\n\n addSource(id , source , options ) {\n this._checkLoaded();\n\n if (this.sourceCaches[id] !== undefined) {\n throw new Error('There is already a source with this ID');\n }\n\n if (!source.type) {\n throw new Error(`The type property must be defined, but the only the following properties were given: ${Object.keys(source).join(', ')}.`);\n }\n\n const builtIns = ['vector', 'raster', 'geojson', 'video', 'image', 'canvas'];\n const shouldValidate = builtIns.indexOf(source.type) >= 0;\n if (shouldValidate && this._validate(validateStyle.source, `sources.${id}`, source, null, options)) return;\n\n const sourceCache = this.sourceCaches[id] = new SourceCache(id, source, this.dispatcher);\n sourceCache.style = this;\n sourceCache.setEventedParent(this, () => ({\n isSourceLoaded: this.loaded(),\n source: sourceCache.serialize(),\n sourceId: id\n }));\n\n sourceCache.onAdd(this.map);\n this._changed = true;\n }\n\n /**\n * Remove a source from this stylesheet, given its id.\n * @param {string} id id of the source to remove\n * @throws {Error} if no source is found with the given ID\n */\n removeSource(id ) {\n this._checkLoaded();\n\n if (this.sourceCaches[id] === undefined) {\n throw new Error('There is no source with this ID');\n }\n for (const layerId in this._layers) {\n if (this._layers[layerId].source === id) {\n return this.fire('error', {error: new Error(`Source \"${id}\" cannot be removed while layer \"${layerId}\" is using it.`)});\n }\n }\n\n const sourceCache = this.sourceCaches[id];\n delete this.sourceCaches[id];\n delete this._updatedSources[id];\n sourceCache.fire('data', {sourceDataType: 'metadata', dataType:'source', sourceId: id});\n sourceCache.setEventedParent(null);\n sourceCache.clearTiles();\n\n if (sourceCache.onRemove) sourceCache.onRemove(this.map);\n this._changed = true;\n }\n\n /**\n * Set the data of a GeoJSON source, given its id.\n * @param {string} id id of the source\n * @param {GeoJSON|string} data GeoJSON source\n */\n setGeoJSONSourceData(id , data ) {\n this._checkLoaded();\n\n assert(this.sourceCaches[id] !== undefined, 'There is no source with this ID');\n const geojsonSource = (this.sourceCaches[id].getSource() );\n assert(geojsonSource.type === 'geojson');\n\n geojsonSource.setData(data);\n this._changed = true;\n }\n\n /**\n * Get a source by id.\n * @param {string} id id of the desired source\n * @returns {Object} source\n */\n getSource(id ) {\n return this.sourceCaches[id] && this.sourceCaches[id].getSource();\n }\n\n /**\n * Add a layer to the map style. The layer will be inserted before the layer with\n * ID `before`, or appended if `before` is omitted.\n * @param {string} before ID of an existing layer to insert before\n */\n addLayer(layerObject , before , options ) {\n this._checkLoaded();\n\n const id = layerObject.id;\n\n if (typeof layerObject.source === 'object') {\n this.addSource(id, layerObject.source);\n layerObject = util.clone(layerObject);\n layerObject = (util.extend(layerObject, {source: id}) );\n }\n\n // this layer is not in the style.layers array, so we pass an impossible array index\n if (this._validate(validateStyle.layer,\n `layers.${id}`, layerObject, {arrayIndex: -1}, options)) return;\n\n const layer = StyleLayer.create(layerObject);\n this._validateLayer(layer);\n\n layer.setEventedParent(this, {layer: {id: id}});\n\n\n const index = before ? this._order.indexOf(before) : this._order.length;\n if (before && index === -1) {\n this.fire('error', { error: new Error(`Layer with id \"${before}\" does not exist on this map.`)});\n return;\n }\n\n this._order.splice(index, 0, id);\n this._layerOrderChanged = true;\n\n this._layers[id] = layer;\n\n if (this._removedLayers[id] && layer.source) {\n // If, in the current batch, we have already removed this layer\n // and we are now re-adding it with a different `type`, then we\n // need to clear (rather than just reload) the underyling source's\n // tiles. Otherwise, tiles marked 'reloading' will have buckets /\n // buffers that are set up for the _previous_ version of this\n // layer, causing, e.g.:\n // https://github.com/mapbox/mapbox-gl-js/issues/3633\n const removed = this._removedLayers[id];\n delete this._removedLayers[id];\n if (removed.type !== layer.type) {\n this._updatedSources[layer.source] = 'clear';\n } else {\n this._updatedSources[layer.source] = 'reload';\n this.sourceCaches[layer.source].pause();\n }\n }\n this._updateLayer(layer);\n }\n\n /**\n * Moves a layer to a different z-position. The layer will be inserted before the layer with\n * ID `before`, or appended if `before` is omitted.\n * @param {string} id ID of the layer to move\n * @param {string} before ID of an existing layer to insert before\n */\n moveLayer(id , before ) {\n this._checkLoaded();\n this._changed = true;\n\n const layer = this._layers[id];\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${id}' does not exist in ` +\n `the map's style and cannot be moved.`\n )\n });\n return;\n }\n\n const index = this._order.indexOf(id);\n this._order.splice(index, 1);\n\n const newIndex = before ? this._order.indexOf(before) : this._order.length;\n if (before && newIndex === -1) {\n this.fire('error', { error: new Error(`Layer with id \"${before}\" does not exist on this map.`)});\n return;\n }\n this._order.splice(newIndex, 0, id);\n\n this._layerOrderChanged = true;\n }\n\n /**\n * Remove the layer with the given id from the style.\n *\n * If no such layer exists, an `error` event is fired.\n *\n * @param {string} id id of the layer to remove\n * @fires error\n */\n removeLayer(id ) {\n this._checkLoaded();\n\n const layer = this._layers[id];\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${id}' does not exist in ` +\n `the map's style and cannot be removed.`\n )\n });\n return;\n }\n\n layer.setEventedParent(null);\n\n const index = this._order.indexOf(id);\n this._order.splice(index, 1);\n\n this._layerOrderChanged = true;\n this._changed = true;\n this._removedLayers[id] = layer;\n delete this._layers[id];\n delete this._updatedLayers[id];\n delete this._updatedPaintProps[id];\n }\n\n /**\n * Return the style layer object with the given `id`.\n *\n * @param {string} id - id of the desired layer\n * @returns {?Object} a layer, if one with the given `id` exists\n */\n getLayer(id ) {\n return this._layers[id];\n }\n\n setLayerZoomRange(layerId , minzoom , maxzoom ) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${layerId}' does not exist in ` +\n `the map's style and cannot have zoom extent.`\n )\n });\n return;\n }\n\n if (layer.minzoom === minzoom && layer.maxzoom === maxzoom) return;\n\n if (minzoom != null) {\n layer.minzoom = minzoom;\n }\n if (maxzoom != null) {\n layer.maxzoom = maxzoom;\n }\n this._updateLayer(layer);\n }\n\n setFilter(layerId , filter ) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${layerId}' does not exist in ` +\n `the map's style and cannot be filtered.`\n )\n });\n return;\n }\n\n if (util.deepEqual(layer.filter, filter)) {\n return;\n }\n\n if (filter === null || filter === undefined) {\n layer.filter = undefined;\n this._updateLayer(layer);\n return;\n }\n\n if (this._validate(validateStyle.filter, `layers.${layer.id}.filter`, filter)) {\n return;\n }\n\n layer.filter = util.clone(filter);\n this._updateLayer(layer);\n }\n\n /**\n * Get a layer's filter object\n * @param {string} layer the layer to inspect\n * @returns {*} the layer's filter, if any\n */\n getFilter(layer ) {\n return util.clone(this.getLayer(layer).filter);\n }\n\n setLayoutProperty(layerId , name , value ) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${layerId}' does not exist in ` +\n `the map's style and cannot be styled.`\n )\n });\n return;\n }\n\n if (util.deepEqual(layer.getLayoutProperty(name), value)) return;\n\n layer.setLayoutProperty(name, value);\n this._updateLayer(layer);\n }\n\n /**\n * Get a layout property's value from a given layer\n * @param {string} layer the layer to inspect\n * @param {string} name the name of the layout property\n * @returns {*} the property value\n */\n getLayoutProperty(layer , name ) {\n return this.getLayer(layer).getLayoutProperty(name);\n }\n\n setPaintProperty(layerId , name , value ) {\n this._checkLoaded();\n\n const layer = this.getLayer(layerId);\n if (!layer) {\n this.fire('error', {\n error: new Error(\n `The layer '${layerId}' does not exist in ` +\n `the map's style and cannot be styled.`\n )\n });\n return;\n }\n\n if (util.deepEqual(layer.getPaintProperty(name), value)) return;\n\n const wasDataDriven = layer._transitionablePaint._values[name].value.isDataDriven();\n layer.setPaintProperty(name, value);\n const isDataDriven = layer._transitionablePaint._values[name].value.isDataDriven();\n\n if (isDataDriven || wasDataDriven) {\n this._updateLayer(layer);\n }\n\n this._changed = true;\n this._updatedPaintProps[layerId] = true;\n }\n\n getPaintProperty(layer , name ) {\n return this.getLayer(layer).getPaintProperty(name);\n }\n\n getTransition() {\n return util.extend({ duration: 300, delay: 0 },\n this.stylesheet && this.stylesheet.transition);\n }\n\n serialize() {\n return util.filterObject({\n version: this.stylesheet.version,\n name: this.stylesheet.name,\n metadata: this.stylesheet.metadata,\n light: this.stylesheet.light,\n center: this.stylesheet.center,\n zoom: this.stylesheet.zoom,\n bearing: this.stylesheet.bearing,\n pitch: this.stylesheet.pitch,\n sprite: this.stylesheet.sprite,\n glyphs: this.stylesheet.glyphs,\n transition: this.stylesheet.transition,\n sources: util.mapObject(this.sourceCaches, (source) => source.serialize()),\n layers: this._order.map((id) => this._layers[id].serialize())\n }, (value) => { return value !== undefined; });\n }\n\n _updateLayer(layer ) {\n this._updatedLayers[layer.id] = true;\n if (layer.source && !this._updatedSources[layer.source]) {\n this._updatedSources[layer.source] = 'reload';\n this.sourceCaches[layer.source].pause();\n }\n this._changed = true;\n }\n\n _flattenRenderedFeatures(sourceResults ) {\n const features = [];\n for (let l = this._order.length - 1; l >= 0; l--) {\n const layerId = this._order[l];\n for (const sourceResult of sourceResults) {\n const layerFeatures = sourceResult[layerId];\n if (layerFeatures) {\n for (const feature of layerFeatures) {\n features.push(feature);\n }\n }\n }\n }\n return features;\n }\n\n queryRenderedFeatures(queryGeometry , params , zoom , bearing ) {\n if (params && params.filter) {\n this._validate(validateStyle.filter, 'queryRenderedFeatures.filter', params.filter);\n }\n\n const includedSources = {};\n if (params && params.layers) {\n if (!Array.isArray(params.layers)) {\n this.fire('error', {error: 'parameters.layers must be an Array.'});\n return [];\n }\n for (const layerId of params.layers) {\n const layer = this._layers[layerId];\n if (!layer) {\n // this layer is not in the style.layers array\n this.fire('error', {error: `The layer '${layerId}' does not exist ` +\n `in the map's style and cannot be queried for features.`});\n return [];\n }\n includedSources[layer.source] = true;\n }\n }\n\n const sourceResults = [];\n for (const id in this.sourceCaches) {\n if (params.layers && !includedSources[id]) continue;\n const results = QueryFeatures.rendered(this.sourceCaches[id], this._layers, queryGeometry, params, zoom, bearing);\n sourceResults.push(results);\n }\n return this._flattenRenderedFeatures(sourceResults);\n }\n\n querySourceFeatures(sourceID , params ) {\n if (params && params.filter) {\n this._validate(validateStyle.filter, 'querySourceFeatures.filter', params.filter);\n }\n const sourceCache = this.sourceCaches[sourceID];\n return sourceCache ? QueryFeatures.source(sourceCache, params) : [];\n }\n\n addSourceType(name , SourceType , callback ) {\n if (getSourceType(name)) {\n return callback(new Error(`A source type called \"${name}\" already exists.`));\n }\n\n setSourceType(name, SourceType);\n\n if (!SourceType.workerSourceURL) {\n return callback(null, null);\n }\n\n this.dispatcher.broadcast('loadWorkerSource', {\n name: name,\n url: SourceType.workerSourceURL\n }, callback);\n }\n\n getLight() {\n return this.light.getLight();\n }\n\n setLight(lightOptions ) {\n this._checkLoaded();\n\n const light = this.light.getLight();\n let _update = false;\n for (const key in lightOptions) {\n if (!util.deepEqual(lightOptions[key], light[key])) {\n _update = true;\n break;\n }\n }\n if (!_update) return;\n\n const transition = util.extend({\n duration: 300,\n delay: 0\n }, this.stylesheet.transition);\n\n this.light.setLight(lightOptions);\n this.light.updateTransitions(transition);\n }\n\n _validate(validate , key , value , props , options ) {\n if (options && options.validate === false) {\n return false;\n }\n return validateStyle.emitErrors(this, validate.call(validateStyle, util.extend({\n key: key,\n style: this.serialize(),\n value: value,\n styleSpec: styleSpec\n }, props)));\n }\n\n _remove() {\n rtlTextPlugin.evented.off('pluginAvailable', this._rtlTextPluginCallback);\n for (const id in this.sourceCaches) {\n this.sourceCaches[id].clearTiles();\n }\n this.dispatcher.remove();\n }\n\n _clearSource(id ) {\n this.sourceCaches[id].clearTiles();\n }\n\n _reloadSource(id ) {\n this.sourceCaches[id].resume();\n this.sourceCaches[id].reload();\n }\n\n _updateSources(transform ) {\n for (const id in this.sourceCaches) {\n this.sourceCaches[id].update(transform);\n }\n }\n\n getNeedsFullPlacement() {\n // Anything that changes our \"in progress\" layer and tile indices requires us\n // to start over. When we start over, we do a full placement instead of incremental\n // to prevent starvation.\n if (this._layerOrderChanged) {\n // We need to restart placement to keep layer indices in sync.\n return true;\n }\n for (const id in this.sourceCaches) {\n if (this.sourceCaches[id].getNeedsFullPlacement()) {\n // A tile has been added or removed, we need to do a full placement\n // New tiles can't be rendered until they've finished their first placement\n return true;\n }\n }\n return false;\n }\n\n _generateCollisionBoxes() {\n for (const id in this.sourceCaches) {\n this._reloadSource(id);\n }\n }\n\n _updatePlacement(transform , showCollisionBoxes , fadeDuration ) {\n const forceFullPlacement = this.getNeedsFullPlacement();\n\n if (forceFullPlacement || !this.placement || this.placement.isDone()) {\n this.placement = new Placement(transform, this._order, forceFullPlacement, showCollisionBoxes, fadeDuration, this.placement);\n this._layerOrderChanged = false;\n }\n\n this.placement.continuePlacement(this._order, this._layers, this.sourceCaches);\n\n if (this.placement.isDone()) this.collisionIndex = this.placement.collisionIndex;\n\n // needsRender is false when we have just finished a placement that didn't change the visibility of any symbols\n const needsRerender = !this.placement.isDone() || this.placement.stillFading();\n return needsRerender;\n }\n\n // Callbacks from web workers\n\n getImages(mapId , params , callback ) {\n this.imageManager.getImages(params.icons, callback);\n }\n\n getGlyphs(mapId , params , callback ) {\n this.glyphManager.getGlyphs(params.stacks, callback);\n }\n}\n\nmodule.exports = Style;\n","// \n\n\nconst util = require('../util/util');\nconst styleSpec = require('../style-spec/reference/latest');\nconst validateStyle = require('./validate_style');\nconst Evented = require('../util/evented');\n\nconst {\n Layout,\n Transitionable,\n Transitioning,\n Properties\n} = require('./properties');\n\n \n \n \n \n \n\nconst TRANSITION_SUFFIX = '-transition';\n\nclass StyleLayer extends Evented {\n \n\n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n\n \n\n \n \n \n \n \n \n \n\n constructor(layer , properties ) {\n super();\n\n this.id = layer.id;\n this.metadata = layer.metadata;\n this.type = layer.type;\n this.minzoom = layer.minzoom;\n this.maxzoom = layer.maxzoom;\n this.visibility = 'visible';\n\n if (layer.type !== 'background') {\n this.source = layer.source;\n this.sourceLayer = layer['source-layer'];\n this.filter = layer.filter;\n }\n\n this._featureFilter = () => true;\n\n if (properties.layout) {\n this._unevaluatedLayout = new Layout(properties.layout);\n }\n\n this._transitionablePaint = new Transitionable(properties.paint);\n\n for (const property in layer.paint) {\n this.setPaintProperty(property, layer.paint[property], {validate: false});\n }\n for (const property in layer.layout) {\n this.setLayoutProperty(property, layer.layout[property], {validate: false});\n }\n\n this._transitioningPaint = this._transitionablePaint.untransitioned();\n }\n\n getLayoutProperty(name ) {\n if (name === 'visibility') {\n return this.visibility;\n }\n\n return this._unevaluatedLayout.getValue(name);\n }\n\n setLayoutProperty(name , value , options ) {\n if (value !== null && value !== undefined) {\n const key = `layers.${this.id}.layout.${name}`;\n if (this._validate(validateStyle.layoutProperty, key, name, value, options)) {\n return;\n }\n }\n\n if (name === 'visibility') {\n this.visibility = value === 'none' ? value : 'visible';\n return;\n }\n\n this._unevaluatedLayout.setValue(name, value);\n }\n\n getPaintProperty(name ) {\n if (util.endsWith(name, TRANSITION_SUFFIX)) {\n return this._transitionablePaint.getTransition(name.slice(0, -TRANSITION_SUFFIX.length));\n } else {\n return this._transitionablePaint.getValue(name);\n }\n }\n\n setPaintProperty(name , value , options ) {\n if (value !== null && value !== undefined) {\n const key = `layers.${this.id}.paint.${name}`;\n if (this._validate(validateStyle.paintProperty, key, name, value, options)) {\n return;\n }\n }\n\n if (util.endsWith(name, TRANSITION_SUFFIX)) {\n this._transitionablePaint.setTransition(name.slice(0, -TRANSITION_SUFFIX.length), (value ) || undefined);\n } else {\n this._transitionablePaint.setValue(name, value);\n }\n }\n\n isHidden(zoom ) {\n if (this.minzoom && zoom < this.minzoom) return true;\n if (this.maxzoom && zoom >= this.maxzoom) return true;\n return this.visibility === 'none';\n }\n\n updateTransitions(parameters ) {\n this._transitioningPaint = this._transitionablePaint.transitioned(parameters, this._transitioningPaint);\n }\n\n hasTransition() {\n return this._transitioningPaint.hasTransition();\n }\n\n recalculate(parameters ) {\n if (this._unevaluatedLayout) {\n (this ).layout = this._unevaluatedLayout.possiblyEvaluate(parameters);\n }\n\n (this ).paint = this._transitioningPaint.possiblyEvaluate(parameters);\n }\n\n serialize() {\n const output = {\n 'id': this.id,\n 'type': this.type,\n 'source': this.source,\n 'source-layer': this.sourceLayer,\n 'metadata': this.metadata,\n 'minzoom': this.minzoom,\n 'maxzoom': this.maxzoom,\n 'filter': this.filter,\n 'layout': this._unevaluatedLayout && this._unevaluatedLayout.serialize(),\n 'paint': this._transitionablePaint && this._transitionablePaint.serialize()\n };\n\n if (this.visibility === 'none') {\n output.layout = output.layout || {};\n output.layout.visibility = 'none';\n }\n\n return util.filterObject(output, (value, key) => {\n return value !== undefined &&\n !(key === 'layout' && !Object.keys(value).length) &&\n !(key === 'paint' && !Object.keys(value).length);\n });\n }\n\n _validate(validate , key , name , value , options ) {\n if (options && options.validate === false) {\n return false;\n }\n return validateStyle.emitErrors(this, validate.call(validateStyle, {\n key: key,\n layerType: this.type,\n objectKey: name,\n value: value,\n styleSpec: styleSpec,\n // Workaround for https://github.com/mapbox/mapbox-gl-js/issues/2407\n style: {glyphs: true, sprite: true}\n }));\n }\n\n hasOffscreenPass() {\n return false;\n }\n\n resize() {\n // noop\n }\n}\n\nmodule.exports = StyleLayer;\n\nconst subclasses = {\n 'circle': require('./style_layer/circle_style_layer'),\n 'heatmap': require('./style_layer/heatmap_style_layer'),\n 'hillshade': require('./style_layer/hillshade_style_layer'),\n 'fill': require('./style_layer/fill_style_layer'),\n 'fill-extrusion': require('./style_layer/fill_extrusion_style_layer'),\n 'line': require('./style_layer/line_style_layer'),\n 'symbol': require('./style_layer/symbol_style_layer'),\n 'background': require('./style_layer/background_style_layer'),\n 'raster': require('./style_layer/raster_style_layer')\n};\n\nStyleLayer.create = function(layer ) {\n return new subclasses[layer.type](layer);\n};\n","// \n\nconst StyleLayer = require('../style_layer');\nconst properties = require('./background_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n\nclass BackgroundStyleLayer extends StyleLayer {\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n}\n\nmodule.exports = BackgroundStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n\nconst paint = new Properties({\n \"background-color\": new DataConstantProperty(styleSpec[\"paint_background\"][\"background-color\"]),\n \"background-pattern\": new CrossFadedProperty(styleSpec[\"paint_background\"][\"background-pattern\"]),\n \"background-opacity\": new DataConstantProperty(styleSpec[\"paint_background\"][\"background-opacity\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst CircleBucket = require('../../data/bucket/circle_bucket');\nconst {multiPolygonIntersectsBufferedMultiPoint} = require('../../util/intersection_tests');\nconst {getMaximumPaintValue, translateDistance, translate} = require('../query_utils');\nconst properties = require('./circle_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n \n \n\nclass CircleStyleLayer extends StyleLayer {\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n createBucket(parameters ) {\n return new CircleBucket(parameters);\n }\n\n queryRadius(bucket ) {\n const circleBucket = (bucket );\n return getMaximumPaintValue('circle-radius', this, circleBucket) +\n getMaximumPaintValue('circle-stroke-width', this, circleBucket) +\n translateDistance(this.paint.get('circle-translate'));\n }\n\n queryIntersectsFeature(queryGeometry ,\n feature ,\n geometry ,\n zoom ,\n bearing ,\n pixelsToTileUnits ) {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('circle-translate'),\n this.paint.get('circle-translate-anchor'),\n bearing, pixelsToTileUnits);\n const radius = this.paint.get('circle-radius').evaluate(feature) * pixelsToTileUnits;\n const stroke = this.paint.get('circle-stroke-width').evaluate(feature) * pixelsToTileUnits;\n return multiPolygonIntersectsBufferedMultiPoint(translatedPolygon, geometry, radius + stroke);\n }\n}\n\nmodule.exports = CircleStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"circle-radius\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-radius\"]),\n \"circle-color\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-color\"]),\n \"circle-blur\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-blur\"]),\n \"circle-opacity\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-opacity\"]),\n \"circle-translate\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-translate\"]),\n \"circle-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-translate-anchor\"]),\n \"circle-pitch-scale\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-pitch-scale\"]),\n \"circle-pitch-alignment\": new DataConstantProperty(styleSpec[\"paint_circle\"][\"circle-pitch-alignment\"]),\n \"circle-stroke-width\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-width\"]),\n \"circle-stroke-color\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-color\"]),\n \"circle-stroke-opacity\": new DataDrivenProperty(styleSpec[\"paint_circle\"][\"circle-stroke-opacity\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst FillExtrusionBucket = require('../../data/bucket/fill_extrusion_bucket');\nconst {multiPolygonIntersectsMultiPolygon} = require('../../util/intersection_tests');\nconst {translateDistance, translate} = require('../query_utils');\nconst properties = require('./fill_extrusion_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n \n \n \n\nclass FillExtrusionStyleLayer extends StyleLayer {\n \n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n createBucket(parameters ) {\n return new FillExtrusionBucket(parameters);\n }\n\n queryRadius() {\n return translateDistance(this.paint.get('fill-extrusion-translate'));\n }\n\n queryIntersectsFeature(queryGeometry ,\n feature ,\n geometry ,\n zoom ,\n bearing ,\n pixelsToTileUnits ) {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('fill-extrusion-translate'),\n this.paint.get('fill-extrusion-translate-anchor'),\n bearing, pixelsToTileUnits);\n return multiPolygonIntersectsMultiPolygon(translatedPolygon, geometry);\n }\n\n hasOffscreenPass() {\n return this.paint.get('fill-extrusion-opacity') !== 0 && this.visibility !== 'none';\n }\n\n resize() {\n if (this.viewportFrame) {\n this.viewportFrame.destroy();\n this.viewportFrame = null;\n }\n }\n}\n\nmodule.exports = FillExtrusionStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"fill-extrusion-opacity\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\n \"fill-extrusion-color\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\n \"fill-extrusion-translate\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\n \"fill-extrusion-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\n \"fill-extrusion-pattern\": new CrossFadedProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\n \"fill-extrusion-height\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\n \"fill-extrusion-base\": new DataDrivenProperty(styleSpec[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst FillBucket = require('../../data/bucket/fill_bucket');\nconst {multiPolygonIntersectsMultiPolygon} = require('../../util/intersection_tests');\nconst {translateDistance, translate} = require('../query_utils');\nconst properties = require('./fill_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n \n \n \n\nclass FillStyleLayer extends StyleLayer {\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n recalculate(parameters ) {\n this.paint = this._transitioningPaint.possiblyEvaluate(parameters);\n\n if (this._transitionablePaint.getValue('fill-outline-color') === undefined) {\n this.paint._values['fill-outline-color'] = this.paint._values['fill-color'];\n }\n }\n\n createBucket(parameters ) {\n return new FillBucket(parameters);\n }\n\n queryRadius() {\n return translateDistance(this.paint.get('fill-translate'));\n }\n\n queryIntersectsFeature(queryGeometry ,\n feature ,\n geometry ,\n zoom ,\n bearing ,\n pixelsToTileUnits ) {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('fill-translate'),\n this.paint.get('fill-translate-anchor'),\n bearing, pixelsToTileUnits);\n return multiPolygonIntersectsMultiPolygon(translatedPolygon, geometry);\n }\n}\n\nmodule.exports = FillStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"fill-antialias\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-antialias\"]),\n \"fill-opacity\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-opacity\"]),\n \"fill-color\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-color\"]),\n \"fill-outline-color\": new DataDrivenProperty(styleSpec[\"paint_fill\"][\"fill-outline-color\"]),\n \"fill-translate\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-translate\"]),\n \"fill-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_fill\"][\"fill-translate-anchor\"]),\n \"fill-pattern\": new CrossFadedProperty(styleSpec[\"paint_fill\"][\"fill-pattern\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst HeatmapBucket = require('../../data/bucket/heatmap_bucket');\nconst RGBAImage = require('../../util/image').RGBAImage;\nconst properties = require('./heatmap_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n \n \n\nclass HeatmapStyleLayer extends StyleLayer {\n\n \n \n \n\n \n \n \n\n createBucket(options ) {\n return new HeatmapBucket(options);\n }\n\n constructor(layer ) {\n super(layer, properties);\n\n // make sure color ramp texture is generated for default heatmap color too\n this._updateColorRamp();\n }\n\n setPaintProperty(name , value , options ) {\n super.setPaintProperty(name, value, options);\n if (name === 'heatmap-color') {\n this._updateColorRamp();\n }\n }\n\n _updateColorRamp() {\n const expression = this._transitionablePaint._values['heatmap-color'].value.expression;\n const colorRampData = new Uint8Array(256 * 4);\n const len = colorRampData.length;\n for (let i = 4; i < len; i += 4) {\n const pxColor = expression.evaluate(({heatmapDensity: i / len} ));\n // the colors are being unpremultiplied because Color uses\n // premultiplied values, and the Texture class expects unpremultiplied ones\n colorRampData[i + 0] = Math.floor(pxColor.r * 255 / pxColor.a);\n colorRampData[i + 1] = Math.floor(pxColor.g * 255 / pxColor.a);\n colorRampData[i + 2] = Math.floor(pxColor.b * 255 / pxColor.a);\n colorRampData[i + 3] = Math.floor(pxColor.a * 255);\n }\n this.colorRamp = new RGBAImage({width: 256, height: 1}, colorRampData);\n this.colorRampTexture = null;\n }\n\n resize() {\n if (this.heatmapFbo) {\n this.heatmapFbo.destroy();\n this.heatmapFbo = null;\n }\n }\n\n queryRadius() {\n return 0;\n }\n\n queryIntersectsFeature() {\n return false;\n }\n\n hasOffscreenPass() {\n return this.paint.get('heatmap-opacity') !== 0 && this.visibility !== 'none';\n }\n}\n\nmodule.exports = HeatmapStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"heatmap-radius\": new DataDrivenProperty(styleSpec[\"paint_heatmap\"][\"heatmap-radius\"]),\n \"heatmap-weight\": new DataDrivenProperty(styleSpec[\"paint_heatmap\"][\"heatmap-weight\"]),\n \"heatmap-intensity\": new DataConstantProperty(styleSpec[\"paint_heatmap\"][\"heatmap-intensity\"]),\n \"heatmap-color\": new HeatmapColorProperty(styleSpec[\"paint_heatmap\"][\"heatmap-color\"]),\n \"heatmap-opacity\": new DataConstantProperty(styleSpec[\"paint_heatmap\"][\"heatmap-opacity\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst properties = require('./hillshade_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n\nclass HillshadeStyleLayer extends StyleLayer {\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n hasOffscreenPass() {\n return this.paint.get('hillshade-exaggeration') !== 0 && this.visibility !== 'none';\n }\n}\n\nmodule.exports = HillshadeStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"hillshade-illumination-direction\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-illumination-direction\"]),\n \"hillshade-illumination-anchor\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-illumination-anchor\"]),\n \"hillshade-exaggeration\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-exaggeration\"]),\n \"hillshade-shadow-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-shadow-color\"]),\n \"hillshade-highlight-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-highlight-color\"]),\n \"hillshade-accent-color\": new DataConstantProperty(styleSpec[\"paint_hillshade\"][\"hillshade-accent-color\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst Point = require('@mapbox/point-geometry');\n\nconst StyleLayer = require('../style_layer');\nconst LineBucket = require('../../data/bucket/line_bucket');\nconst {multiPolygonIntersectsBufferedMultiLine} = require('../../util/intersection_tests');\nconst {getMaximumPaintValue, translateDistance, translate} = require('../query_utils');\nconst properties = require('./line_style_layer_properties');\nconst {extend} = require('../../util/util');\nconst EvaluationParameters = require('../evaluation_parameters');\n\nconst {\n Transitionable,\n Transitioning,\n Layout,\n PossiblyEvaluated,\n DataDrivenProperty\n} = require('../properties');\n\n \n \n\nclass LineFloorwidthProperty extends DataDrivenProperty {\n \n\n possiblyEvaluate(value, parameters) {\n parameters = new EvaluationParameters(Math.floor(parameters.zoom), {\n now: parameters.now,\n fadeDuration: parameters.fadeDuration,\n zoomHistory: parameters.zoomHistory,\n transition: parameters.transition\n });\n return super.possiblyEvaluate(value, parameters);\n }\n\n evaluate(value, globals, feature) {\n globals = extend({}, globals, {zoom: Math.floor(globals.zoom)});\n return super.evaluate(value, globals, feature);\n }\n}\n\nconst lineFloorwidthProperty = new LineFloorwidthProperty(properties.paint.properties['line-width'].specification);\nlineFloorwidthProperty.useIntegerZoom = true;\n\nclass LineStyleLayer extends StyleLayer {\n \n \n\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n recalculate(parameters ) {\n super.recalculate(parameters);\n\n (this.paint._values )['line-floorwidth'] =\n lineFloorwidthProperty.possiblyEvaluate(this._transitioningPaint._values['line-width'].value, parameters);\n }\n\n createBucket(parameters ) {\n return new LineBucket(parameters);\n }\n\n queryRadius(bucket ) {\n const lineBucket = (bucket );\n const width = getLineWidth(\n getMaximumPaintValue('line-width', this, lineBucket),\n getMaximumPaintValue('line-gap-width', this, lineBucket));\n const offset = getMaximumPaintValue('line-offset', this, lineBucket);\n return width / 2 + Math.abs(offset) + translateDistance(this.paint.get('line-translate'));\n }\n\n queryIntersectsFeature(queryGeometry ,\n feature ,\n geometry ,\n zoom ,\n bearing ,\n pixelsToTileUnits ) {\n const translatedPolygon = translate(queryGeometry,\n this.paint.get('line-translate'),\n this.paint.get('line-translate-anchor'),\n bearing, pixelsToTileUnits);\n const halfWidth = pixelsToTileUnits / 2 * getLineWidth(\n this.paint.get('line-width').evaluate(feature),\n this.paint.get('line-gap-width').evaluate(feature));\n const lineOffset = this.paint.get('line-offset').evaluate(feature);\n if (lineOffset) {\n geometry = offsetLine(geometry, lineOffset * pixelsToTileUnits);\n }\n return multiPolygonIntersectsBufferedMultiLine(translatedPolygon, geometry, halfWidth);\n }\n}\n\nmodule.exports = LineStyleLayer;\n\nfunction getLineWidth(lineWidth, lineGapWidth) {\n if (lineGapWidth > 0) {\n return lineGapWidth + 2 * lineWidth;\n } else {\n return lineWidth;\n }\n}\n\nfunction offsetLine(rings, offset) {\n const newRings = [];\n const zero = new Point(0, 0);\n for (let k = 0; k < rings.length; k++) {\n const ring = rings[k];\n const newRing = [];\n for (let i = 0; i < ring.length; i++) {\n const a = ring[i - 1];\n const b = ring[i];\n const c = ring[i + 1];\n const aToB = i === 0 ? zero : b.sub(a)._unit()._perp();\n const bToC = i === ring.length - 1 ? zero : c.sub(b)._unit()._perp();\n const extrude = aToB._add(bToC)._unit();\n\n const cosHalfAngle = extrude.x * bToC.x + extrude.y * bToC.y;\n extrude._mult(1 / cosHalfAngle);\n\n newRing.push(extrude._mult(offset)._add(b));\n }\n newRings.push(newRing);\n }\n return newRings;\n}\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n \n \n \n \n \n \n\nconst layout = new Properties({\n \"line-cap\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-cap\"]),\n \"line-join\": new DataDrivenProperty(styleSpec[\"layout_line\"][\"line-join\"]),\n \"line-miter-limit\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-miter-limit\"]),\n \"line-round-limit\": new DataConstantProperty(styleSpec[\"layout_line\"][\"line-round-limit\"]),\n});\n\n \n \n \n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"line-opacity\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-opacity\"]),\n \"line-color\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-color\"]),\n \"line-translate\": new DataConstantProperty(styleSpec[\"paint_line\"][\"line-translate\"]),\n \"line-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_line\"][\"line-translate-anchor\"]),\n \"line-width\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-width\"]),\n \"line-gap-width\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-gap-width\"]),\n \"line-offset\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-offset\"]),\n \"line-blur\": new DataDrivenProperty(styleSpec[\"paint_line\"][\"line-blur\"]),\n \"line-dasharray\": new CrossFadedProperty(styleSpec[\"paint_line\"][\"line-dasharray\"]),\n \"line-pattern\": new CrossFadedProperty(styleSpec[\"paint_line\"][\"line-pattern\"]),\n});\n\nmodule.exports = { paint, layout };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst properties = require('./raster_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n PossiblyEvaluated\n} = require('../properties');\n\n \n\nclass RasterStyleLayer extends StyleLayer {\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n}\n\nmodule.exports = RasterStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n\n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"raster-opacity\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-opacity\"]),\n \"raster-hue-rotate\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-hue-rotate\"]),\n \"raster-brightness-min\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-brightness-min\"]),\n \"raster-brightness-max\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-brightness-max\"]),\n \"raster-saturation\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-saturation\"]),\n \"raster-contrast\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-contrast\"]),\n \"raster-fade-duration\": new DataConstantProperty(styleSpec[\"paint_raster\"][\"raster-fade-duration\"]),\n});\n\nmodule.exports = { paint };\n","// \n\nconst StyleLayer = require('../style_layer');\nconst SymbolBucket = require('../../data/bucket/symbol_bucket');\nconst resolveTokens = require('../../util/token');\nconst {isExpression} = require('../../style-spec/expression');\nconst assert = require('assert');\nconst properties = require('./symbol_style_layer_properties');\n\nconst {\n Transitionable,\n Transitioning,\n Layout,\n PossiblyEvaluated\n} = require('../properties');\n\n \n \n \n \n\nclass SymbolStyleLayer extends StyleLayer {\n \n \n\n \n \n \n\n constructor(layer ) {\n super(layer, properties);\n }\n\n recalculate(parameters ) {\n super.recalculate(parameters);\n\n if (this.layout.get('icon-rotation-alignment') === 'auto') {\n if (this.layout.get('symbol-placement') === 'line') {\n this.layout._values['icon-rotation-alignment'] = 'map';\n } else {\n this.layout._values['icon-rotation-alignment'] = 'viewport';\n }\n }\n\n if (this.layout.get('text-rotation-alignment') === 'auto') {\n if (this.layout.get('symbol-placement') === 'line') {\n this.layout._values['text-rotation-alignment'] = 'map';\n } else {\n this.layout._values['text-rotation-alignment'] = 'viewport';\n }\n }\n\n // If unspecified, `*-pitch-alignment` inherits `*-rotation-alignment`\n if (this.layout.get('text-pitch-alignment') === 'auto') {\n this.layout._values['text-pitch-alignment'] = this.layout.get('text-rotation-alignment');\n }\n if (this.layout.get('icon-pitch-alignment') === 'auto') {\n this.layout._values['icon-pitch-alignment'] = this.layout.get('icon-rotation-alignment');\n }\n }\n\n getValueAndResolveTokens(name , feature ) {\n const value = this.layout.get(name).evaluate(feature);\n const unevaluated = this._unevaluatedLayout._values[name];\n if (!unevaluated.isDataDriven() && !isExpression(unevaluated.value)) {\n return resolveTokens(feature.properties, value);\n }\n\n return value;\n }\n\n createBucket(parameters ) {\n return new SymbolBucket(parameters);\n }\n\n queryRadius() {\n return 0;\n }\n\n queryIntersectsFeature() {\n assert(false); // Should take a different path in FeatureIndex\n return false;\n }\n}\n\nmodule.exports = SymbolStyleLayer;\n","// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`.\n// \n/* eslint-disable */\n\nconst styleSpec = require('../../style-spec/reference/latest');\n\nconst {\n Properties,\n DataConstantProperty,\n DataDrivenProperty,\n CrossFadedProperty,\n HeatmapColorProperty\n} = require('../properties');\n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\nconst layout = new Properties({\n \"symbol-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-placement\"]),\n \"symbol-spacing\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-spacing\"]),\n \"symbol-avoid-edges\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"symbol-avoid-edges\"]),\n \"icon-allow-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-allow-overlap\"]),\n \"icon-ignore-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-ignore-placement\"]),\n \"icon-optional\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-optional\"]),\n \"icon-rotation-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-rotation-alignment\"]),\n \"icon-size\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-size\"]),\n \"icon-text-fit\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-text-fit\"]),\n \"icon-text-fit-padding\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-text-fit-padding\"]),\n \"icon-image\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-image\"]),\n \"icon-rotate\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-rotate\"]),\n \"icon-padding\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-padding\"]),\n \"icon-keep-upright\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-keep-upright\"]),\n \"icon-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-offset\"]),\n \"icon-anchor\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"icon-anchor\"]),\n \"icon-pitch-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"icon-pitch-alignment\"]),\n \"text-pitch-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-pitch-alignment\"]),\n \"text-rotation-alignment\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-rotation-alignment\"]),\n \"text-field\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-field\"]),\n \"text-font\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-font\"]),\n \"text-size\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-size\"]),\n \"text-max-width\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-max-width\"]),\n \"text-line-height\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-line-height\"]),\n \"text-letter-spacing\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-letter-spacing\"]),\n \"text-justify\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-justify\"]),\n \"text-anchor\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-anchor\"]),\n \"text-max-angle\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-max-angle\"]),\n \"text-rotate\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-rotate\"]),\n \"text-padding\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-padding\"]),\n \"text-keep-upright\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-keep-upright\"]),\n \"text-transform\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-transform\"]),\n \"text-offset\": new DataDrivenProperty(styleSpec[\"layout_symbol\"][\"text-offset\"]),\n \"text-allow-overlap\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-allow-overlap\"]),\n \"text-ignore-placement\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-ignore-placement\"]),\n \"text-optional\": new DataConstantProperty(styleSpec[\"layout_symbol\"][\"text-optional\"]),\n});\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\nconst paint = new Properties({\n \"icon-opacity\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-opacity\"]),\n \"icon-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-color\"]),\n \"icon-halo-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-color\"]),\n \"icon-halo-width\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-width\"]),\n \"icon-halo-blur\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"icon-halo-blur\"]),\n \"icon-translate\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"icon-translate\"]),\n \"icon-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"icon-translate-anchor\"]),\n \"text-opacity\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-opacity\"]),\n \"text-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-color\"]),\n \"text-halo-color\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-color\"]),\n \"text-halo-width\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-width\"]),\n \"text-halo-blur\": new DataDrivenProperty(styleSpec[\"paint_symbol\"][\"text-halo-blur\"]),\n \"text-translate\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"text-translate\"]),\n \"text-translate-anchor\": new DataConstantProperty(styleSpec[\"paint_symbol\"][\"text-translate-anchor\"]),\n});\n\nmodule.exports = { paint, layout };\n","// \n\nconst StyleLayer = require('./style_layer');\nconst util = require('../util/util');\nconst featureFilter = require('../style-spec/feature_filter');\nconst groupByLayout = require('../style-spec/group_by_layout');\n\n \n\n \n \n\nclass StyleLayerIndex {\n \n\n \n \n\n constructor(layerConfigs ) {\n if (layerConfigs) {\n this.replace(layerConfigs);\n }\n }\n\n replace(layerConfigs ) {\n this._layerConfigs = {};\n this._layers = {};\n this.update(layerConfigs, []);\n }\n\n update(layerConfigs , removedIds ) {\n for (const layerConfig of layerConfigs) {\n this._layerConfigs[layerConfig.id] = layerConfig;\n\n const layer = this._layers[layerConfig.id] = StyleLayer.create(layerConfig);\n layer._featureFilter = featureFilter(layer.filter);\n }\n for (const id of removedIds) {\n delete this._layerConfigs[id];\n delete this._layers[id];\n }\n\n this.familiesBySource = {};\n\n const groups = groupByLayout(util.values(this._layerConfigs));\n\n for (const layerConfigs of groups) {\n const layers = layerConfigs.map((layerConfig) => this._layers[layerConfig.id]);\n\n const layer = layers[0];\n if (layer.visibility === 'none') {\n continue;\n }\n\n const sourceId = layer.source || '';\n let sourceGroup = this.familiesBySource[sourceId];\n if (!sourceGroup) {\n sourceGroup = this.familiesBySource[sourceId] = {};\n }\n\n const sourceLayerId = layer.sourceLayer || '_geojsonTileLayer';\n let sourceLayerFamilies = sourceGroup[sourceLayerId];\n if (!sourceLayerFamilies) {\n sourceLayerFamilies = sourceGroup[sourceLayerId] = [];\n }\n\n sourceLayerFamilies.push(layers);\n }\n }\n}\n\nmodule.exports = StyleLayerIndex;\n","// \n\nmodule.exports = require('../style-spec/validate_style.min');\n\n \n\nmodule.exports.emitErrors = function (emitter , errors ) {\n if (errors && errors.length) {\n for (const {message} of errors) {\n emitter.fire('error', { error: new Error(message) });\n }\n return true;\n } else {\n return false;\n }\n};\n","// \n\nclass ZoomHistory {\n \n \n \n \n \n\n constructor() {\n this.first = true;\n }\n\n update(z , now ) {\n const floorZ = Math.floor(z);\n\n if (this.first) {\n this.first = false;\n this.lastIntegerZoom = floorZ;\n this.lastIntegerZoomTime = 0;\n this.lastZoom = z;\n this.lastFloorZoom = floorZ;\n return true;\n }\n\n if (this.lastFloorZoom > floorZ) {\n this.lastIntegerZoom = floorZ + 1;\n this.lastIntegerZoomTime = now;\n } else if (this.lastFloorZoom < floorZ) {\n this.lastIntegerZoom = floorZ;\n this.lastIntegerZoomTime = now;\n }\n\n if (z !== this.lastZoom) {\n this.lastZoom = z;\n this.lastFloorZoom = floorZ;\n return true;\n }\n\n return false;\n }\n}\n\nmodule.exports = ZoomHistory;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst {register} = require('../util/web_worker_transfer');\n\nclass Anchor extends Point {\n \n \n\n constructor(x , y , angle , segment ) {\n super(x, y);\n this.angle = angle;\n if (segment !== undefined) {\n this.segment = segment;\n }\n }\n\n clone() {\n return new Anchor(this.x, this.y, this.angle, this.segment);\n }\n}\n\nregister('Anchor', Anchor);\n\nmodule.exports = Anchor;\n","// \n\nmodule.exports = checkMaxAngle;\n\n \n \n\n/**\n * Labels placed around really sharp angles aren't readable. Check if any\n * part of the potential label has a combined angle that is too big.\n *\n * @param line\n * @param anchor The point on the line around which the label is anchored.\n * @param labelLength The length of the label in geometry units.\n * @param windowSize The check fails if the combined angles within a part of the line that is `windowSize` long is too big.\n * @param maxAngle The maximum combined angle that any window along the label is allowed to have.\n *\n * @returns {boolean} whether the label should be placed\n * @private\n */\nfunction checkMaxAngle(line , anchor , labelLength , windowSize , maxAngle ) {\n\n // horizontal labels always pass\n if (anchor.segment === undefined) return true;\n\n let p = anchor;\n let index = anchor.segment + 1;\n let anchorDistance = 0;\n\n // move backwards along the line to the first segment the label appears on\n while (anchorDistance > -labelLength / 2) {\n index--;\n\n // there isn't enough room for the label after the beginning of the line\n if (index < 0) return false;\n\n anchorDistance -= line[index].dist(p);\n p = line[index];\n }\n\n anchorDistance += line[index].dist(line[index + 1]);\n index++;\n\n // store recent corners and their total angle difference\n const recentCorners = [];\n let recentAngleDelta = 0;\n\n // move forwards by the length of the label and check angles along the way\n while (anchorDistance < labelLength / 2) {\n const prev = line[index - 1];\n const current = line[index];\n const next = line[index + 1];\n\n // there isn't enough room for the label before the end of the line\n if (!next) return false;\n\n let angleDelta = prev.angleTo(current) - current.angleTo(next);\n // restrict angle to -pi..pi range\n angleDelta = Math.abs(((angleDelta + 3 * Math.PI) % (Math.PI * 2)) - Math.PI);\n\n recentCorners.push({\n distance: anchorDistance,\n angleDelta: angleDelta\n });\n recentAngleDelta += angleDelta;\n\n // remove corners that are far enough away from the list of recent anchors\n while (anchorDistance - recentCorners[0].distance > windowSize) {\n recentAngleDelta -= recentCorners.shift().angleDelta;\n }\n\n // the sum of angles within the window area exceeds the maximum allowed value. check fails.\n if (recentAngleDelta > maxAngle) return false;\n\n index++;\n anchorDistance += current.dist(next);\n }\n\n // no part of the line had an angle greater than the maximum allowed. check passes.\n return true;\n}\n","// \n\nconst Point = require('@mapbox/point-geometry');\n\nmodule.exports = clipLine;\n\n/**\n * Returns the part of a multiline that intersects with the provided rectangular box.\n *\n * @param lines\n * @param x1 the left edge of the box\n * @param y1 the top edge of the box\n * @param x2 the right edge of the box\n * @param y2 the bottom edge of the box\n * @returns lines\n * @private\n */\nfunction clipLine(lines , x1 , y1 , x2 , y2 ) {\n const clippedLines = [];\n\n for (let l = 0; l < lines.length; l++) {\n const line = lines[l];\n let clippedLine;\n\n for (let i = 0; i < line.length - 1; i++) {\n let p0 = line[i];\n let p1 = line[i + 1];\n\n\n if (p0.x < x1 && p1.x < x1) {\n continue;\n } else if (p0.x < x1) {\n p0 = new Point(x1, p0.y + (p1.y - p0.y) * ((x1 - p0.x) / (p1.x - p0.x)))._round();\n } else if (p1.x < x1) {\n p1 = new Point(x1, p0.y + (p1.y - p0.y) * ((x1 - p0.x) / (p1.x - p0.x)))._round();\n }\n\n if (p0.y < y1 && p1.y < y1) {\n continue;\n } else if (p0.y < y1) {\n p0 = new Point(p0.x + (p1.x - p0.x) * ((y1 - p0.y) / (p1.y - p0.y)), y1)._round();\n } else if (p1.y < y1) {\n p1 = new Point(p0.x + (p1.x - p0.x) * ((y1 - p0.y) / (p1.y - p0.y)), y1)._round();\n }\n\n if (p0.x >= x2 && p1.x >= x2) {\n continue;\n } else if (p0.x >= x2) {\n p0 = new Point(x2, p0.y + (p1.y - p0.y) * ((x2 - p0.x) / (p1.x - p0.x)))._round();\n } else if (p1.x >= x2) {\n p1 = new Point(x2, p0.y + (p1.y - p0.y) * ((x2 - p0.x) / (p1.x - p0.x)))._round();\n }\n\n if (p0.y >= y2 && p1.y >= y2) {\n continue;\n } else if (p0.y >= y2) {\n p0 = new Point(p0.x + (p1.x - p0.x) * ((y2 - p0.y) / (p1.y - p0.y)), y2)._round();\n } else if (p1.y >= y2) {\n p1 = new Point(p0.x + (p1.x - p0.x) * ((y2 - p0.y) / (p1.y - p0.y)), y2)._round();\n }\n\n if (!clippedLine || !p0.equals(clippedLine[clippedLine.length - 1])) {\n clippedLine = [p0];\n clippedLines.push(clippedLine);\n }\n\n clippedLine.push(p1);\n }\n }\n\n return clippedLines;\n}\n","// \n\n \n \n \n\n/**\n * A CollisionFeature represents the area of the tile covered by a single label.\n * It is used with CollisionIndex to check if the label overlaps with any\n * previous labels. A CollisionFeature is mostly just a set of CollisionBox\n * objects.\n *\n * @private\n */\nclass CollisionFeature {\n \n \n\n /**\n * Create a CollisionFeature, adding its collision box data to the given collisionBoxArray in the process.\n *\n * @param line The geometry the label is placed on.\n * @param anchor The point along the line around which the label is anchored.\n * @param shaped The text or icon shaping results.\n * @param boxScale A magic number used to convert from glyph metrics units to geometry units.\n * @param padding The amount of padding to add around the label edges.\n * @param alignLine Whether the label is aligned with the line or the viewport.\n */\n constructor(collisionBoxArray ,\n line ,\n anchor ,\n featureIndex ,\n sourceLayerIndex ,\n bucketIndex ,\n shaped ,\n boxScale ,\n padding ,\n alignLine ,\n overscaling ) {\n const y1 = shaped.top * boxScale - padding;\n const y2 = shaped.bottom * boxScale + padding;\n const x1 = shaped.left * boxScale - padding;\n const x2 = shaped.right * boxScale + padding;\n\n this.boxStartIndex = collisionBoxArray.length;\n\n if (alignLine) {\n\n let height = y2 - y1;\n const length = x2 - x1;\n\n if (height > 0) {\n // set minimum box height to avoid very many small labels\n height = Math.max(10 * boxScale, height);\n\n this._addLineCollisionCircles(collisionBoxArray, line, anchor, (anchor.segment ), length, height, featureIndex, sourceLayerIndex, bucketIndex, overscaling);\n }\n\n } else {\n collisionBoxArray.emplaceBack(anchor.x, anchor.y, x1, y1, x2, y2, featureIndex, sourceLayerIndex, bucketIndex,\n 0, 0);\n }\n\n this.boxEndIndex = collisionBoxArray.length;\n }\n\n /**\n * Create a set of CollisionBox objects for a line.\n *\n * @param labelLength The length of the label in geometry units.\n * @param anchor The point along the line around which the label is anchored.\n * @param boxSize The size of the collision boxes that will be created.\n * @private\n */\n _addLineCollisionCircles(collisionBoxArray ,\n line ,\n anchor ,\n segment ,\n labelLength ,\n boxSize ,\n featureIndex ,\n sourceLayerIndex ,\n bucketIndex ,\n overscaling ) {\n const step = boxSize / 2;\n const nBoxes = Math.floor(labelLength / step);\n // We calculate line collision circles out to 300% of what would normally be our\n // max size, to allow collision detection to work on labels that expand as\n // they move into the distance\n // Vertically oriented labels in the distant field can extend past this padding\n // This is a noticeable problem in overscaled tiles where the pitch 0-based\n // symbol spacing will put labels very close together in a pitched map.\n // To reduce the cost of adding extra collision circles, we slowly increase\n // them for overscaled tiles.\n const overscalingPaddingFactor = 1 + .4 * Math.log(overscaling) / Math.LN2;\n const nPitchPaddingBoxes = Math.floor(nBoxes * overscalingPaddingFactor / 2);\n\n // offset the center of the first box by half a box so that the edge of the\n // box is at the edge of the label.\n const firstBoxOffset = -boxSize / 2;\n\n let p = anchor;\n let index = segment + 1;\n let anchorDistance = firstBoxOffset;\n const labelStartDistance = -labelLength / 2;\n const paddingStartDistance = labelStartDistance - labelLength / 4;\n // move backwards along the line to the first segment the label appears on\n do {\n index--;\n\n if (index < 0) {\n if (anchorDistance > labelStartDistance) {\n // there isn't enough room for the label after the beginning of the line\n // checkMaxAngle should have already caught this\n return;\n } else {\n // The line doesn't extend far enough back for all of our padding,\n // but we got far enough to show the label under most conditions.\n index = 0;\n break;\n }\n } else {\n anchorDistance -= line[index].dist(p);\n p = line[index];\n }\n } while (anchorDistance > paddingStartDistance);\n\n let segmentLength = line[index].dist(line[index + 1]);\n\n for (let i = -nPitchPaddingBoxes; i < nBoxes + nPitchPaddingBoxes; i++) {\n\n // the distance the box will be from the anchor\n const boxOffset = i * step;\n let boxDistanceToAnchor = labelStartDistance + boxOffset;\n\n // make the distance between pitch padding boxes bigger\n if (boxOffset < 0) boxDistanceToAnchor += boxOffset;\n if (boxOffset > labelLength) boxDistanceToAnchor += boxOffset - labelLength;\n\n if (boxDistanceToAnchor < anchorDistance) {\n // The line doesn't extend far enough back for this box, skip it\n // (This could allow for line collisions on distant tiles)\n continue;\n }\n\n // the box is not on the current segment. Move to the next segment.\n while (anchorDistance + segmentLength < boxDistanceToAnchor) {\n anchorDistance += segmentLength;\n index++;\n\n // There isn't enough room before the end of the line.\n if (index + 1 >= line.length) {\n return;\n }\n\n segmentLength = line[index].dist(line[index + 1]);\n }\n\n // the distance the box will be from the beginning of the segment\n const segmentBoxDistance = boxDistanceToAnchor - anchorDistance;\n\n const p0 = line[index];\n const p1 = line[index + 1];\n const boxAnchorPoint = p1.sub(p0)._unit()._mult(segmentBoxDistance)._add(p0)._round();\n\n // If the box is within boxSize of the anchor, force the box to be used\n // (so even 0-width labels use at least one box)\n // Otherwise, the .8 multiplication gives us a little bit of conservative\n // padding in choosing which boxes to use (see CollisionIndex#placedCollisionCircles)\n const paddedAnchorDistance = Math.abs(boxDistanceToAnchor - firstBoxOffset) < step ?\n 0 :\n (boxDistanceToAnchor - firstBoxOffset) * 0.8;\n\n collisionBoxArray.emplaceBack(boxAnchorPoint.x, boxAnchorPoint.y,\n -boxSize / 2, -boxSize / 2, boxSize / 2, boxSize / 2,\n featureIndex, sourceLayerIndex, bucketIndex,\n boxSize / 2, paddedAnchorDistance);\n }\n }\n}\n\nmodule.exports = CollisionFeature;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst intersectionTests = require('../util/intersection_tests');\n\nconst Grid = require('./grid_index');\nconst glmatrix = require('@mapbox/gl-matrix');\n\nconst mat4 = glmatrix.mat4;\n\nconst projection = require('../symbol/projection');\n\n \n \n \n \n \n \n \n \n\n// When a symbol crosses the edge that causes it to be included in\n// collision detection, it will cause changes in the symbols around\n// it. This constant specifies how many pixels to pad the edge of\n// the viewport for collision detection so that the bulk of the changes\n// occur offscreen. Making this constant greater increases label\n// stability, but it's expensive.\nconst viewportPadding = 100;\n\n/**\n * A collision index used to prevent symbols from overlapping. It keep tracks of\n * where previous symbols have been placed and is used to check if a new\n * symbol overlaps with any previously added symbols.\n *\n * There are two steps to insertion: first placeCollisionBox/Circles checks if\n * there's room for a symbol, then insertCollisionBox/Circles actually puts the\n * symbol in the index. The two step process allows paired symbols to be inserted\n * together even if they overlap.\n *\n * @private\n */\nclass CollisionIndex {\n \n \n \n \n\n constructor(\n transform ,\n grid = new Grid(transform.width + 2 * viewportPadding, transform.height + 2 * viewportPadding, 25),\n ignoredGrid = new Grid(transform.width + 2 * viewportPadding, transform.height + 2 * viewportPadding, 25)\n ) {\n this.transform = transform;\n\n this.grid = grid;\n this.ignoredGrid = ignoredGrid;\n this.pitchfactor = Math.cos(transform._pitch) * transform.cameraToCenterDistance;\n }\n\n placeCollisionBox(collisionBox , allowOverlap , textPixelRatio , posMatrix ) {\n const projectedPoint = this.projectAndGetPerspectiveRatio(posMatrix, collisionBox.anchorPointX, collisionBox.anchorPointY);\n const tileToViewport = textPixelRatio * projectedPoint.perspectiveRatio;\n const tlX = collisionBox.x1 / tileToViewport + projectedPoint.point.x;\n const tlY = collisionBox.y1 / tileToViewport + projectedPoint.point.y;\n const brX = collisionBox.x2 / tileToViewport + projectedPoint.point.x;\n const brY = collisionBox.y2 / tileToViewport + projectedPoint.point.y;\n\n if (!allowOverlap) {\n if (this.grid.hitTest(tlX, tlY, brX, brY)) {\n return [];\n }\n }\n return [tlX, tlY, brX, brY];\n }\n\n approximateTileDistance(tileDistance , lastSegmentAngle , pixelsToTileUnits , cameraToAnchorDistance , pitchWithMap ) {\n // This is a quick and dirty solution for chosing which collision circles to use (since collision circles are\n // laid out in tile units). Ideally, I think we should generate collision circles on the fly in viewport coordinates\n // at the time we do collision detection.\n // See https://github.com/mapbox/mapbox-gl-js/issues/5474\n\n // incidenceStretch is the ratio of how much y space a label takes up on a tile while drawn perpendicular to the viewport vs\n // how much space it would take up if it were drawn flat on the tile\n // Using law of sines, camera_to_anchor/sin(ground_angle) = camera_to_center/sin(incidence_angle)\n // Incidence angle 90 -> head on, sin(incidence_angle) = 1, no stretch\n // Incidence angle 1 -> very oblique, sin(incidence_angle) =~ 0, lots of stretch\n // ground_angle = u_pitch + PI/2 -> sin(ground_angle) = cos(u_pitch)\n // incidenceStretch = 1 / sin(incidenceAngle)\n\n const incidenceStretch = pitchWithMap ? 1 : cameraToAnchorDistance / this.pitchfactor;\n const lastSegmentTile = tileDistance.lastSegmentViewportDistance * pixelsToTileUnits;\n return tileDistance.prevTileDistance +\n lastSegmentTile +\n (incidenceStretch - 1) * lastSegmentTile * Math.abs(Math.sin(lastSegmentAngle));\n }\n\n placeCollisionCircles(collisionCircles ,\n allowOverlap ,\n scale ,\n textPixelRatio ,\n key ,\n symbol ,\n lineVertexArray ,\n glyphOffsetArray ,\n fontSize ,\n posMatrix ,\n labelPlaneMatrix ,\n showCollisionCircles ,\n pitchWithMap ) {\n const placedCollisionCircles = [];\n\n const projectedAnchor = this.projectAnchor(posMatrix, symbol.anchorX, symbol.anchorY);\n\n const projectionCache = {};\n const fontScale = fontSize / 24;\n const lineOffsetX = symbol.lineOffsetX * fontSize;\n const lineOffsetY = symbol.lineOffsetY * fontSize;\n\n const tileUnitAnchorPoint = new Point(symbol.anchorX, symbol.anchorY);\n // projection.project generates NDC coordinates, as opposed to the\n // pixel-based grid coordinates generated by this.projectPoint\n const labelPlaneAnchorPoint =\n projection.project(tileUnitAnchorPoint, labelPlaneMatrix).point;\n const firstAndLastGlyph = projection.placeFirstAndLastGlyph(\n fontScale,\n glyphOffsetArray,\n lineOffsetX,\n lineOffsetY,\n /*flip*/ false,\n labelPlaneAnchorPoint,\n tileUnitAnchorPoint,\n symbol,\n lineVertexArray,\n labelPlaneMatrix,\n projectionCache,\n /*return tile distance*/ true);\n\n let collisionDetected = false;\n\n const tileToViewport = projectedAnchor.perspectiveRatio * textPixelRatio;\n // equivalent to pixel_to_tile_units\n const pixelsToTileUnits = tileToViewport / scale;\n\n let firstTileDistance = 0, lastTileDistance = 0;\n if (firstAndLastGlyph) {\n firstTileDistance = this.approximateTileDistance(firstAndLastGlyph.first.tileDistance, firstAndLastGlyph.first.angle, pixelsToTileUnits, projectedAnchor.cameraDistance, pitchWithMap);\n lastTileDistance = this.approximateTileDistance(firstAndLastGlyph.last.tileDistance, firstAndLastGlyph.last.angle, pixelsToTileUnits, projectedAnchor.cameraDistance, pitchWithMap);\n }\n\n for (let k = 0; k < collisionCircles.length; k += 5) {\n const anchorPointX = collisionCircles[k];\n const anchorPointY = collisionCircles[k + 1];\n const tileUnitRadius = collisionCircles[k + 2];\n const boxSignedDistanceFromAnchor = collisionCircles[k + 3];\n if (!firstAndLastGlyph ||\n (boxSignedDistanceFromAnchor < -firstTileDistance) ||\n (boxSignedDistanceFromAnchor > lastTileDistance)) {\n // The label either doesn't fit on its line or we\n // don't need to use this circle because the label\n // doesn't extend this far. Either way, mark the circle unused.\n markCollisionCircleUsed(collisionCircles, k, false);\n continue;\n }\n\n const projectedPoint = this.projectPoint(posMatrix, anchorPointX, anchorPointY);\n const radius = tileUnitRadius / tileToViewport;\n\n const atLeastOneCirclePlaced = placedCollisionCircles.length > 0;\n if (atLeastOneCirclePlaced) {\n const dx = projectedPoint.x - placedCollisionCircles[placedCollisionCircles.length - 4];\n const dy = projectedPoint.y - placedCollisionCircles[placedCollisionCircles.length - 3];\n // The circle edges touch when the distance between their centers is 2x the radius\n // When the distance is 1x the radius, they're doubled up, and we could remove\n // every other circle while keeping them all in touch.\n // We actually start removing circles when the distance is √2x the radius:\n // thinning the number of circles as much as possible is a major performance win,\n // and the small gaps introduced don't make a very noticeable difference.\n const placedTooDensely = radius * radius * 2 > dx * dx + dy * dy;\n if (placedTooDensely) {\n const atLeastOneMoreCircle = (k + 8) < collisionCircles.length;\n if (atLeastOneMoreCircle) {\n const nextBoxDistanceToAnchor = collisionCircles[k + 8];\n if ((nextBoxDistanceToAnchor > -firstTileDistance) &&\n (nextBoxDistanceToAnchor < lastTileDistance)) {\n // Hide significantly overlapping circles, unless this is the last one we can\n // use, in which case we want to keep it in place even if it's tightly packed\n // with the one before it.\n markCollisionCircleUsed(collisionCircles, k, false);\n continue;\n }\n }\n }\n }\n const collisionBoxArrayIndex = k / 5;\n placedCollisionCircles.push(projectedPoint.x, projectedPoint.y, radius, collisionBoxArrayIndex);\n markCollisionCircleUsed(collisionCircles, k, true);\n\n if (!allowOverlap) {\n if (this.grid.hitTestCircle(projectedPoint.x, projectedPoint.y, radius)) {\n if (!showCollisionCircles) {\n return [];\n } else {\n // Don't early exit if we're showing the debug circles because we still want to calculate\n // which circles are in use\n collisionDetected = true;\n }\n }\n }\n }\n\n return collisionDetected ? [] : placedCollisionCircles;\n }\n\n /**\n * Because the geometries in the CollisionIndex are an approximation of the shape of\n * symbols on the map, we use the CollisionIndex to look up the symbol part of\n * `queryRenderedFeatures`. Non-symbol features are looked up tile-by-tile, and\n * historically collisions were handled per-tile.\n *\n * For this reason, `queryRenderedSymbols` still takes tile coordinate inputs and\n * converts them back to viewport coordinates. The change to a viewport coordinate\n * CollisionIndex means it's now possible to re-design queryRenderedSymbols to\n * run entirely in viewport coordinates, saving unnecessary conversions.\n * See https://github.com/mapbox/mapbox-gl-js/issues/5475\n *\n * @private\n */\n queryRenderedSymbols(queryGeometry , tileCoord , textPixelRatio , collisionBoxArray , sourceID ) {\n const sourceLayerFeatures = {};\n const result = [];\n\n if (queryGeometry.length === 0 || (this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0)) {\n return result;\n }\n\n const posMatrix = this.transform.calculatePosMatrix(tileCoord.toUnwrapped());\n\n const query = [];\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n for (let i = 0; i < queryGeometry.length; i++) {\n const ring = queryGeometry[i];\n for (let k = 0; k < ring.length; k++) {\n const p = this.projectPoint(posMatrix, ring[k].x, ring[k].y);\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n query.push(p);\n }\n }\n\n const tileID = tileCoord.key;\n\n const thisTileFeatures = [];\n const features = this.grid.query(minX, minY, maxX, maxY);\n for (let i = 0; i < features.length; i++) {\n if (features[i].sourceID === sourceID && features[i].tileID === tileID) {\n thisTileFeatures.push(features[i].boxIndex);\n }\n }\n const ignoredFeatures = this.ignoredGrid.query(minX, minY, maxX, maxY);\n for (let i = 0; i < ignoredFeatures.length; i++) {\n if (ignoredFeatures[i].sourceID === sourceID && ignoredFeatures[i].tileID === tileID) {\n thisTileFeatures.push(ignoredFeatures[i].boxIndex);\n }\n }\n\n for (let i = 0; i < thisTileFeatures.length; i++) {\n const blocking = collisionBoxArray.get(thisTileFeatures[i]);\n const sourceLayer = blocking.sourceLayerIndex;\n const featureIndex = blocking.featureIndex;\n const bucketIndex = blocking.bucketIndex;\n\n // Skip already seen features.\n if (sourceLayerFeatures[sourceLayer] === undefined) {\n sourceLayerFeatures[sourceLayer] = {};\n }\n if (sourceLayerFeatures[sourceLayer][featureIndex] === undefined) {\n sourceLayerFeatures[sourceLayer][featureIndex] = {};\n }\n if (sourceLayerFeatures[sourceLayer][featureIndex][bucketIndex]) {\n continue;\n }\n\n // Check if query intersects with the feature box\n // \"Collision Circles\" for line labels are treated as boxes here\n // Since there's no actual collision taking place, the circle vs. square\n // distinction doesn't matter as much, and box geometry is easier\n // to work with.\n const projectedPoint = this.projectAndGetPerspectiveRatio(posMatrix, blocking.anchorPointX, blocking.anchorPointY);\n const tileToViewport = textPixelRatio * projectedPoint.perspectiveRatio;\n const x1 = blocking.x1 / tileToViewport + projectedPoint.point.x;\n const y1 = blocking.y1 / tileToViewport + projectedPoint.point.y;\n const x2 = blocking.x2 / tileToViewport + projectedPoint.point.x;\n const y2 = blocking.y2 / tileToViewport + projectedPoint.point.y;\n const bbox = [\n new Point(x1, y1),\n new Point(x2, y1),\n new Point(x2, y2),\n new Point(x1, y2)\n ];\n if (!intersectionTests.polygonIntersectsPolygon(query, bbox)) {\n continue;\n }\n\n sourceLayerFeatures[sourceLayer][featureIndex][bucketIndex] = true;\n result.push(thisTileFeatures[i]);\n }\n\n return result;\n }\n\n insertCollisionBox(collisionBox , ignorePlacement , tileID , sourceID , boxStartIndex ) {\n const grid = ignorePlacement ? this.ignoredGrid : this.grid;\n\n const key = { tileID: tileID, sourceID: sourceID, boxIndex: boxStartIndex };\n grid.insert(key, collisionBox[0], collisionBox[1], collisionBox[2], collisionBox[3]);\n }\n\n insertCollisionCircles(collisionCircles , ignorePlacement , tileID , sourceID , boxStartIndex ) {\n const grid = ignorePlacement ? this.ignoredGrid : this.grid;\n\n for (let k = 0; k < collisionCircles.length; k += 4) {\n const key = { tileID: tileID, sourceID: sourceID, boxIndex: boxStartIndex + collisionCircles[k + 3] };\n grid.insertCircle(key, collisionCircles[k], collisionCircles[k + 1], collisionCircles[k + 2]);\n }\n }\n\n projectAnchor(posMatrix , x , y ) {\n const p = [x, y, 0, 1];\n projection.xyTransformMat4(p, p, posMatrix);\n return {\n perspectiveRatio: 0.5 + 0.5 * (p[3] / this.transform.cameraToCenterDistance),\n cameraDistance: p[3]\n };\n }\n\n projectPoint(posMatrix , x , y ) {\n const p = [x, y, 0, 1];\n projection.xyTransformMat4(p, p, posMatrix);\n return new Point(\n (((p[0] / p[3] + 1) / 2) * this.transform.width) + viewportPadding,\n (((-p[1] / p[3] + 1) / 2) * this.transform.height) + viewportPadding\n );\n }\n\n projectAndGetPerspectiveRatio(posMatrix , x , y ) {\n const p = [x, y, 0, 1];\n projection.xyTransformMat4(p, p, posMatrix);\n const a = new Point(\n (((p[0] / p[3] + 1) / 2) * this.transform.width) + viewportPadding,\n (((-p[1] / p[3] + 1) / 2) * this.transform.height) + viewportPadding\n );\n return {\n point: a,\n perspectiveRatio: 0.5 + 0.5 * (p[3] / this.transform.cameraToCenterDistance)\n };\n }\n\n}\n\nfunction markCollisionCircleUsed(collisionCircles , index , used ) {\n collisionCircles[index + 4] = used ? 1 : 0;\n}\n\nmodule.exports = CollisionIndex;\n","// \n\nconst EXTENT = require('../data/extent');\nconst OpacityState = require('./opacity_state');\nconst assert = require('assert');\n\n \n \n\n/*\n The CrossTileSymbolIndex generally works on the assumption that\n a conceptual \"unique symbol\" can be identified by the text of\n the label combined with the anchor point. The goal is to keep\n symbol opacity states (determined by collision detection animations)\n consistent as we switch tile resolutions.\n\n Whenever we add a label, we look for duplicates at lower resolution,\n and if we find one, we copy its opacity state. If we find duplicates\n at higher resolution, we mark the added label as \"blocked\".\n\n When we remove a label that's currently showing, we look for duplicates\n at higher resolution, and if we find one we copy our opacity state\n to that label.\n\n The code mostly assumes that at any given time a \"unique symbol\" will have\n one \"non-duplicate\" entry, and that the rest of the entries in the\n index will all be marked as duplicate. This is not necessarily true:\n\n (1) The code searches child/parent hierarchies for duplicates, but it\n is possible for the source to contain symbols with anchors on tile\n boundaries, where the symbol does not stay in the same hierarchy\n at all zoom levels.\n (2) A high resolution tile may contain two symbols with the same label\n but different anchor points. At lower resolution, both of those\n symbols will appear to be the same.\n\n In the cases that violate our assumptions, copying opacities between\n zoom levels won't work as expected. However, the highest resolution\n tile should always \"win\", so that after some fade flicker the right\n label will show.\n*/\n\n// Round anchor positions to roughly 4 pixel grid\nconst roundingFactor = 512 / EXTENT / 2;\n\nclass TileLayerIndex {\n \n \n \n \n \n \n \n \n\n constructor(tileID , symbolInstances ) {\n this.tileID = tileID;\n this.symbolInstances = {};\n\n for (const symbolInstance of symbolInstances) {\n const key = symbolInstance.key;\n if (!this.symbolInstances[key]) {\n this.symbolInstances[key] = [];\n }\n // This tile may have multiple symbol instances with the same key\n // Store each one along with its coordinates\n this.symbolInstances[key].push({\n instance: symbolInstance,\n coordinates: this.getScaledCoordinates(symbolInstance, tileID)\n });\n symbolInstance.isDuplicate = false;\n // If we don't pick up an opacity from our parent or child tiles\n // Reset so that symbols in cached tiles fade in the same\n // way as freshly loaded tiles\n symbolInstance.textOpacityState = new OpacityState();\n symbolInstance.iconOpacityState = new OpacityState();\n }\n }\n\n // Converts the coordinates of the input symbol instance into coordinates that be can compared\n // against other symbols in this index. Coordinates are:\n // (1) world-based (so after conversion the source tile is irrelevant)\n // (2) converted to the z-scale of this TileLayerIndex\n // (3) down-sampled by \"roundingFactor\" from tile coordinate precision in order to be\n // more tolerant of small differences between tiles.\n getScaledCoordinates(symbolInstance , childTileID ) {\n const zDifference = childTileID.canonical.z - this.tileID.canonical.z;\n const scale = roundingFactor / (1 << zDifference);\n const anchor = symbolInstance.anchor;\n return {\n x: Math.floor((childTileID.canonical.x * EXTENT + anchor.x) * scale),\n y: Math.floor((childTileID.canonical.y * EXTENT + anchor.y) * scale)\n };\n }\n\n getMatchingSymbol(childTileSymbol , childTileID ) {\n if (!this.symbolInstances[childTileSymbol.key]) {\n return;\n }\n\n const childTileSymbolCoordinates =\n this.getScaledCoordinates(childTileSymbol, childTileID);\n\n for (const thisTileSymbol of this.symbolInstances[childTileSymbol.key]) {\n // Return any symbol with the same keys whose coordinates are within 1\n // grid unit. (with a 4px grid, this covers a 12px by 12px area)\n if (Math.abs(thisTileSymbol.coordinates.x - childTileSymbolCoordinates.x) <= 1 &&\n Math.abs(thisTileSymbol.coordinates.y - childTileSymbolCoordinates.y) <= 1) {\n return thisTileSymbol.instance;\n }\n }\n }\n\n forEachSymbolInstance(fn ) {\n for (const key in this.symbolInstances) {\n const keyedSymbolInstances = this.symbolInstances[key];\n for (const symbolInstance of keyedSymbolInstances) {\n fn(symbolInstance.instance);\n }\n }\n }\n}\n\nclass CrossTileSymbolLayerIndex {\n \n\n constructor() {\n this.indexes = {};\n }\n\n addTile(tileID , symbolInstances ) {\n\n let minZoom = 25;\n let maxZoom = 0;\n for (const zoom in this.indexes) {\n minZoom = Math.min((zoom ), minZoom);\n maxZoom = Math.max((zoom ), maxZoom);\n }\n\n const tileIndex = new TileLayerIndex(tileID, symbolInstances);\n\n // make all higher-res child tiles block duplicate labels in this tile\n for (let z = maxZoom; z > tileID.overscaledZ; z--) {\n const zoomIndexes = this.indexes[z];\n for (const id in zoomIndexes) {\n const childIndex = zoomIndexes[(id )];\n if (!childIndex.tileID.isChildOf(tileID)) continue;\n // Mark labels in this tile blocked, and don't copy opacity state\n // into this tile\n this.blockLabels(childIndex, tileIndex, false);\n }\n }\n\n const oldTileIndex = this.indexes[tileID.overscaledZ] && this.indexes[tileID.overscaledZ][tileID.key];\n if (oldTileIndex) {\n // mark labels in the old version of the tile as blocked\n this.blockLabels(tileIndex, oldTileIndex, true);\n\n // remove old version of the tile\n this.removeTile(tileID);\n }\n\n // make this tile block duplicate labels in lower-res parent tiles\n for (let z = tileID.overscaledZ - 1; z >= minZoom; z--) {\n const parentCoord = tileID.scaledTo(z);\n const parentIndex = this.indexes[z] && this.indexes[z][parentCoord.key];\n if (parentIndex) {\n // Mark labels in the parent tile blocked, and copy opacity state\n // into this tile\n this.blockLabels(tileIndex, parentIndex, true);\n }\n }\n\n if (this.indexes[tileID.overscaledZ] === undefined) {\n this.indexes[tileID.overscaledZ] = {};\n }\n this.indexes[tileID.overscaledZ][tileID.key] = tileIndex;\n }\n\n removeTile(tileID ) {\n const removedIndex = this.indexes[tileID.overscaledZ][tileID.key];\n\n delete this.indexes[tileID.overscaledZ][tileID.key];\n if (Object.keys(this.indexes[tileID.overscaledZ]).length === 0) {\n delete this.indexes[tileID.overscaledZ];\n }\n\n const minZoom = Math.min(25, ...(Object.keys(this.indexes) ));\n\n for (let z = tileID.overscaledZ - 1; z >= minZoom; z--) {\n const parentCoord = tileID.scaledTo(z);\n if (!parentCoord) break; // Flow doesn't know that z >= minZoom would prevent this\n const parentIndex = this.indexes[z] && this.indexes[z][parentCoord.key];\n if (parentIndex) this.unblockLabels(removedIndex, parentIndex);\n }\n }\n\n blockLabels(childIndex , parentIndex , copyParentOpacity ) {\n childIndex.forEachSymbolInstance((symbolInstance) => {\n // only non-duplicate labels can block other labels\n if (!symbolInstance.isDuplicate) {\n\n const parentSymbolInstance = parentIndex.getMatchingSymbol(symbolInstance, childIndex.tileID);\n if (parentSymbolInstance !== undefined) {\n // if the parent label was previously non-duplicate, make it duplicate because it's now blocked\n if (!parentSymbolInstance.isDuplicate) {\n parentSymbolInstance.isDuplicate = true;\n\n // If the child label is the one being added to the index,\n // copy the parent's opacity to the child\n if (copyParentOpacity) {\n symbolInstance.textOpacityState = parentSymbolInstance.textOpacityState.clone();\n symbolInstance.iconOpacityState = parentSymbolInstance.iconOpacityState.clone();\n }\n }\n }\n }\n });\n }\n\n unblockLabels(childIndex , parentIndex ) {\n assert(childIndex.tileID.overscaledZ > parentIndex.tileID.overscaledZ);\n childIndex.forEachSymbolInstance((symbolInstance) => {\n // only non-duplicate labels were blocking other labels\n if (!symbolInstance.isDuplicate) {\n\n const parentSymbolInstance = parentIndex.getMatchingSymbol(symbolInstance, childIndex.tileID);\n if (parentSymbolInstance !== undefined) {\n // this label is now unblocked, copy its opacity state\n parentSymbolInstance.isDuplicate = false;\n parentSymbolInstance.textOpacityState = symbolInstance.textOpacityState.clone();\n parentSymbolInstance.iconOpacityState = symbolInstance.iconOpacityState.clone();\n\n // mark child as duplicate so that it doesn't unblock further tiles at lower res\n // in the remaining calls to unblockLabels before it's fully removed\n symbolInstance.isDuplicate = true;\n }\n }\n });\n }\n}\n\nclass CrossTileSymbolIndex {\n \n\n constructor() {\n this.layerIndexes = {};\n }\n\n addTileLayer(layerId , tileID , symbolInstances ) {\n let layerIndex = this.layerIndexes[layerId];\n if (layerIndex === undefined) {\n layerIndex = this.layerIndexes[layerId] = new CrossTileSymbolLayerIndex();\n }\n layerIndex.addTile(tileID, symbolInstances);\n }\n\n removeTileLayer(layerId , tileID ) {\n const layerIndex = this.layerIndexes[layerId];\n if (layerIndex !== undefined) {\n layerIndex.removeTile(tileID);\n }\n }\n}\n\nmodule.exports = CrossTileSymbolIndex;\n","// \n\nconst interpolate = require('../style-spec/util/interpolate').number;\nconst Anchor = require('../symbol/anchor');\nconst checkMaxAngle = require('./check_max_angle');\n\n \n \n\nmodule.exports = getAnchors;\n\nfunction getAnchors(line ,\n spacing ,\n maxAngle ,\n shapedText ,\n shapedIcon ,\n glyphSize ,\n boxScale ,\n overscaling ,\n tileExtent ) {\n\n // Resample a line to get anchor points for labels and check that each\n // potential label passes text-max-angle check and has enough froom to fit\n // on the line.\n\n const angleWindowSize = shapedText ?\n 3 / 5 * glyphSize * boxScale :\n 0;\n\n const labelLength = Math.max(\n shapedText ? shapedText.right - shapedText.left : 0,\n shapedIcon ? shapedIcon.right - shapedIcon.left : 0);\n\n // Is the line continued from outside the tile boundary?\n const isLineContinued = line[0].x === 0 || line[0].x === tileExtent || line[0].y === 0 || line[0].y === tileExtent;\n\n // Is the label long, relative to the spacing?\n // If so, adjust the spacing so there is always a minimum space of `spacing / 4` between label edges.\n if (spacing - labelLength * boxScale < spacing / 4) {\n spacing = labelLength * boxScale + spacing / 4;\n }\n\n // Offset the first anchor by:\n // Either half the label length plus a fixed extra offset if the line is not continued\n // Or half the spacing if the line is continued.\n\n // For non-continued lines, add a bit of fixed extra offset to avoid collisions at T intersections.\n const fixedExtraOffset = glyphSize * 2;\n\n const offset = !isLineContinued ?\n ((labelLength / 2 + fixedExtraOffset) * boxScale * overscaling) % spacing :\n (spacing / 2 * overscaling) % spacing;\n\n return resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength * boxScale, isLineContinued, false, tileExtent);\n}\n\n\nfunction resample(line, offset, spacing, angleWindowSize, maxAngle, labelLength, isLineContinued, placeAtMiddle, tileExtent) {\n\n const halfLabelLength = labelLength / 2;\n let lineLength = 0;\n for (let k = 0; k < line.length - 1; k++) {\n lineLength += line[k].dist(line[k + 1]);\n }\n\n let distance = 0,\n markedDistance = offset - spacing;\n\n let anchors = [];\n\n for (let i = 0; i < line.length - 1; i++) {\n\n const a = line[i],\n b = line[i + 1];\n\n const segmentDist = a.dist(b),\n angle = b.angleTo(a);\n\n while (markedDistance + spacing < distance + segmentDist) {\n markedDistance += spacing;\n\n const t = (markedDistance - distance) / segmentDist,\n x = interpolate(a.x, b.x, t),\n y = interpolate(a.y, b.y, t);\n\n // Check that the point is within the tile boundaries and that\n // the label would fit before the beginning and end of the line\n // if placed at this point.\n if (x >= 0 && x < tileExtent && y >= 0 && y < tileExtent &&\n markedDistance - halfLabelLength >= 0 &&\n markedDistance + halfLabelLength <= lineLength) {\n const anchor = new Anchor(x, y, angle, i);\n anchor._round();\n\n if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) {\n anchors.push(anchor);\n }\n }\n }\n\n distance += segmentDist;\n }\n\n if (!placeAtMiddle && !anchors.length && !isLineContinued) {\n // The first attempt at finding anchors at which labels can be placed failed.\n // Try again, but this time just try placing one anchor at the middle of the line.\n // This has the most effect for short lines in overscaled tiles, since the\n // initial offset used in overscaled tiles is calculated to align labels with positions in\n // parent tiles instead of placing the label as close to the beginning as possible.\n anchors = resample(line, distance / 2, spacing, angleWindowSize, maxAngle, labelLength, isLineContinued, true, tileExtent);\n }\n\n return anchors;\n}\n","// \n\n/**\n * GridIndex is a data structure for testing the intersection of\n * circles and rectangles in a 2d plane.\n * It is optimized for rapid insertion and querying.\n * GridIndex splits the plane into a set of \"cells\" and keeps track\n * of which geometries intersect with each cell. At query time,\n * full geometry comparisons are only done for items that share\n * at least one cell. As long as the geometries are relatively\n * uniformly distributed across the plane, this greatly reduces\n * the number of comparisons necessary.\n *\n * @private\n */\nclass GridIndex {\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n constructor (width , height , cellSize ) {\n const boxCells = this.boxCells = [];\n const circleCells = this.circleCells = [];\n\n // More cells -> fewer geometries to check per cell, but items tend\n // to be split across more cells.\n // Sweet spot allows most small items to fit in one cell\n this.xCellCount = Math.ceil(width / cellSize);\n this.yCellCount = Math.ceil(height / cellSize);\n\n for (let i = 0; i < this.xCellCount * this.yCellCount; i++) {\n boxCells.push([]);\n circleCells.push([]);\n }\n this.circleKeys = [];\n this.boxKeys = [];\n this.bboxes = [];\n this.circles = [];\n\n this.width = width;\n this.height = height;\n this.xScale = this.xCellCount / width;\n this.yScale = this.yCellCount / height;\n this.boxUid = 0;\n this.circleUid = 0;\n }\n\n keysLength() {\n return this.boxKeys.length + this.circleKeys.length;\n }\n\n insert(key , x1 , y1 , x2 , y2 ) {\n this._forEachCell(x1, y1, x2, y2, this._insertBoxCell, this.boxUid++);\n this.boxKeys.push(key);\n this.bboxes.push(x1);\n this.bboxes.push(y1);\n this.bboxes.push(x2);\n this.bboxes.push(y2);\n }\n\n insertCircle(key , x , y , radius ) {\n // Insert circle into grid for all cells in the circumscribing square\n // It's more than necessary (by a factor of 4/PI), but fast to insert\n this._forEachCell(x - radius, y - radius, x + radius, y + radius, this._insertCircleCell, this.circleUid++);\n this.circleKeys.push(key);\n this.circles.push(x);\n this.circles.push(y);\n this.circles.push(radius);\n }\n\n _insertBoxCell(x1 , y1 , x2 , y2 , cellIndex , uid ) {\n this.boxCells[cellIndex].push(uid);\n }\n\n _insertCircleCell(x1 , y1 , x2 , y2 , cellIndex , uid ) {\n this.circleCells[cellIndex].push(uid);\n }\n\n _query(x1 , y1 , x2 , y2 , hitTest ) {\n if (x2 < 0 || x1 > this.width || y2 < 0 || y1 > this.height) {\n return hitTest ? false : [];\n }\n let result = [];\n if (x1 <= 0 && y1 <= 0 && this.width <= x2 && this.height <= y2) {\n // We use `Array#slice` because `this.keys` may be a `Int32Array` and\n // some browsers (Safari and IE) do not support `TypedArray#slice`\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice#Browser_compatibility\n result = Array.prototype.slice.call(this.boxKeys).concat(this.circleKeys);\n } else {\n const queryArgs = {\n hitTest,\n seenUids: { box: {}, circle: {} }\n };\n this._forEachCell(x1, y1, x2, y2, this._queryCell, result, queryArgs);\n }\n return hitTest ? result.length > 0 : result;\n }\n\n _queryCircle(x , y , radius , hitTest ) {\n // Insert circle into grid for all cells in the circumscribing square\n // It's more than necessary (by a factor of 4/PI), but fast to insert\n const x1 = x - radius;\n const x2 = x + radius;\n const y1 = y - radius;\n const y2 = y + radius;\n if (x2 < 0 || x1 > this.width || y2 < 0 || y1 > this.height) {\n return hitTest ? false : [];\n }\n\n // Box query early exits if the bounding box is larger than the grid, but we don't do\n // the equivalent calculation for circle queries because early exit is less likely\n // and the calculation is more expensive\n const result = [];\n const queryArgs = {\n hitTest,\n circle: { x: x, y: y, radius: radius },\n seenUids: { box: {}, circle: {} }\n };\n this._forEachCell(x1, y1, x2, y2, this._queryCellCircle, result, queryArgs);\n return hitTest ? result.length > 0 : result;\n }\n\n query(x1 , y1 , x2 , y2 ) {\n return (this._query(x1, y1, x2, y2, false) );\n }\n\n hitTest(x1 , y1 , x2 , y2 ) {\n return (this._query(x1, y1, x2, y2, true) );\n }\n\n hitTestCircle(x , y , radius ) {\n return (this._queryCircle(x, y, radius, true) );\n }\n\n _queryCell(x1 , y1 , x2 , y2 , cellIndex , result , queryArgs ) {\n const seenUids = queryArgs.seenUids;\n const boxCell = this.boxCells[cellIndex];\n if (boxCell !== null) {\n const bboxes = this.bboxes;\n for (const boxUid of boxCell) {\n if (!seenUids.box[boxUid]) {\n seenUids.box[boxUid] = true;\n const offset = boxUid * 4;\n if ((x1 <= bboxes[offset + 2]) &&\n (y1 <= bboxes[offset + 3]) &&\n (x2 >= bboxes[offset + 0]) &&\n (y2 >= bboxes[offset + 1])) {\n if (queryArgs.hitTest) {\n result.push(true);\n return true;\n } else {\n result.push(this.boxKeys[boxUid]);\n }\n }\n }\n }\n }\n const circleCell = this.circleCells[cellIndex];\n if (circleCell !== null) {\n const circles = this.circles;\n for (const circleUid of circleCell) {\n if (!seenUids.circle[circleUid]) {\n seenUids.circle[circleUid] = true;\n const offset = circleUid * 3;\n if (this._circleAndRectCollide(\n circles[offset],\n circles[offset + 1],\n circles[offset + 2],\n x1,\n y1,\n x2,\n y2)) {\n if (queryArgs.hitTest) {\n result.push(true);\n return true;\n } else {\n result.push(this.circleKeys[circleUid]);\n }\n }\n }\n }\n }\n }\n\n _queryCellCircle(x1 , y1 , x2 , y2 , cellIndex , result , queryArgs ) {\n const circle = queryArgs.circle;\n const seenUids = queryArgs.seenUids;\n const boxCell = this.boxCells[cellIndex];\n if (boxCell !== null) {\n const bboxes = this.bboxes;\n for (const boxUid of boxCell) {\n if (!seenUids.box[boxUid]) {\n seenUids.box[boxUid] = true;\n const offset = boxUid * 4;\n if (this._circleAndRectCollide(\n circle.x,\n circle.y,\n circle.radius,\n bboxes[offset + 0],\n bboxes[offset + 1],\n bboxes[offset + 2],\n bboxes[offset + 3])) {\n result.push(true);\n return true;\n }\n }\n }\n }\n\n const circleCell = this.circleCells[cellIndex];\n if (circleCell !== null) {\n const circles = this.circles;\n for (const circleUid of circleCell) {\n if (!seenUids.circle[circleUid]) {\n seenUids.circle[circleUid] = true;\n const offset = circleUid * 3;\n if (this._circlesCollide(\n circles[offset],\n circles[offset + 1],\n circles[offset + 2],\n circle.x,\n circle.y,\n circle.radius)) {\n result.push(true);\n return true;\n }\n }\n }\n }\n }\n\n _forEachCell(x1 , y1 , x2 , y2 , fn , arg1 , arg2 ) {\n const cx1 = this._convertToXCellCoord(x1);\n const cy1 = this._convertToYCellCoord(y1);\n const cx2 = this._convertToXCellCoord(x2);\n const cy2 = this._convertToYCellCoord(y2);\n\n for (let x = cx1; x <= cx2; x++) {\n for (let y = cy1; y <= cy2; y++) {\n const cellIndex = this.xCellCount * y + x;\n if (fn.call(this, x1, y1, x2, y2, cellIndex, arg1, arg2)) return;\n }\n }\n }\n\n _convertToXCellCoord(x ) {\n return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(x * this.xScale)));\n }\n\n _convertToYCellCoord(y ) {\n return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(y * this.yScale)));\n }\n\n _circlesCollide(x1 , y1 , r1 , x2 , y2 , r2 ) {\n const dx = x2 - x1;\n const dy = y2 - y1;\n const bothRadii = r1 + r2;\n return (bothRadii * bothRadii) > (dx * dx + dy * dy);\n }\n\n _circleAndRectCollide(circleX , circleY , radius , x1 , y1 , x2 , y2 ) {\n const halfRectWidth = (x2 - x1) / 2;\n const distX = Math.abs(circleX - (x1 + halfRectWidth));\n if (distX > (halfRectWidth + radius)) {\n return false;\n }\n\n const halfRectHeight = (y2 - y1) / 2;\n const distY = Math.abs(circleY - (y1 + halfRectHeight));\n if (distY > (halfRectHeight + radius)) {\n return false;\n }\n\n if (distX <= halfRectWidth || distY <= halfRectHeight) {\n return true;\n }\n\n const dx = distX - halfRectWidth;\n const dy = distY - halfRectHeight;\n return (dx * dx + dy * dy <= (radius * radius));\n }\n}\n\nmodule.exports = GridIndex;\n","// \n\n \n\nmodule.exports = function (features ) {\n const leftIndex = {};\n const rightIndex = {};\n const mergedFeatures = [];\n let mergedIndex = 0;\n\n function add(k) {\n mergedFeatures.push(features[k]);\n mergedIndex++;\n }\n\n function mergeFromRight(leftKey , rightKey , geom) {\n const i = rightIndex[leftKey];\n delete rightIndex[leftKey];\n rightIndex[rightKey] = i;\n\n mergedFeatures[i].geometry[0].pop();\n mergedFeatures[i].geometry[0] = mergedFeatures[i].geometry[0].concat(geom[0]);\n return i;\n }\n\n function mergeFromLeft(leftKey , rightKey , geom) {\n const i = leftIndex[rightKey];\n delete leftIndex[rightKey];\n leftIndex[leftKey] = i;\n\n mergedFeatures[i].geometry[0].shift();\n mergedFeatures[i].geometry[0] = geom[0].concat(mergedFeatures[i].geometry[0]);\n return i;\n }\n\n function getKey(text, geom, onRight) {\n const point = onRight ? geom[0][geom[0].length - 1] : geom[0][0];\n return `${text}:${point.x}:${point.y}`;\n }\n\n for (let k = 0; k < features.length; k++) {\n const feature = features[k];\n const geom = feature.geometry;\n const text = feature.text;\n\n if (!text) {\n add(k);\n continue;\n }\n\n const leftKey = getKey(text, geom),\n rightKey = getKey(text, geom, true);\n\n if ((leftKey in rightIndex) && (rightKey in leftIndex) && (rightIndex[leftKey] !== leftIndex[rightKey])) {\n // found lines with the same text adjacent to both ends of the current line, merge all three\n const j = mergeFromLeft(leftKey, rightKey, geom);\n const i = mergeFromRight(leftKey, rightKey, mergedFeatures[j].geometry);\n\n delete leftIndex[leftKey];\n delete rightIndex[rightKey];\n\n rightIndex[getKey(text, mergedFeatures[i].geometry, true)] = i;\n mergedFeatures[j].geometry = (null );\n\n } else if (leftKey in rightIndex) {\n // found mergeable line adjacent to the start of the current line, merge\n mergeFromRight(leftKey, rightKey, geom);\n\n } else if (rightKey in leftIndex) {\n // found mergeable line adjacent to the end of the current line, merge\n mergeFromLeft(leftKey, rightKey, geom);\n\n } else {\n // no adjacent lines, add as a new item\n add(k);\n leftIndex[leftKey] = mergedIndex - 1;\n rightIndex[rightKey] = mergedIndex - 1;\n }\n }\n\n return mergedFeatures.filter((f) => f.geometry);\n};\n","// \n\nconst {register} = require('../util/web_worker_transfer');\n\nclass OpacityState {\n \n \n \n\n constructor() {\n this.opacity = 0;\n this.targetOpacity = 0;\n this.time = 0;\n }\n\n clone() {\n const clone = new OpacityState();\n clone.opacity = this.opacity;\n clone.targetOpacity = this.targetOpacity;\n clone.time = this.time;\n return clone;\n }\n}\n\nregister('OpacityState', OpacityState);\n\nmodule.exports = OpacityState;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst {mat4, vec4} = require('@mapbox/gl-matrix');\nconst symbolSize = require('./symbol_size');\nconst {addDynamicAttributes} = require('../data/bucket/symbol_bucket');\nconst symbolLayoutProperties = require('../style/style_layer/symbol_style_layer_properties').layout;\n\n \n \n \n \n \n \n \n \nconst WritingMode = require('../symbol/shaping').WritingMode;\n\nmodule.exports = {\n updateLineLabels,\n getLabelPlaneMatrix,\n getGlCoordMatrix,\n project,\n placeFirstAndLastGlyph,\n xyTransformMat4\n};\n\n/*\n * # Overview of coordinate spaces\n *\n * ## Tile coordinate spaces\n * Each label has an anchor. Some labels have corresponding line geometries.\n * The points for both anchors and lines are stored in tile units. Each tile has it's own\n * coordinate space going from (0, 0) at the top left to (EXTENT, EXTENT) at the bottom right.\n *\n * ## GL coordinate space\n * At the end of everything, the vertex shader needs to produce a position in GL coordinate space,\n * which is (-1, 1) at the top left and (1, -1) in the bottom right.\n *\n * ## Map pixel coordinate spaces\n * Each tile has a pixel coordinate space. It's just the tile units scaled so that one unit is\n * whatever counts as 1 pixel at the current zoom.\n * This space is used for pitch-alignment=map, rotation-alignment=map\n *\n * ## Rotated map pixel coordinate spaces\n * Like the above, but rotated so axis of the space are aligned with the viewport instead of the tile.\n * This space is used for pitch-alignment=map, rotation-alignment=viewport\n *\n * ## Viewport pixel coordinate space\n * (0, 0) is at the top left of the canvas and (pixelWidth, pixelHeight) is at the bottom right corner\n * of the canvas. This space is used for pitch-alignment=viewport\n *\n *\n * # Vertex projection\n * It goes roughly like this:\n * 1. project the anchor and line from tile units into the correct label coordinate space\n * - map pixel space pitch-alignment=map rotation-alignment=map\n * - rotated map pixel space pitch-alignment=map rotation-alignment=viewport\n * - viewport pixel space pitch-alignment=viewport rotation-alignment=*\n * 2. if the label follows a line, find the point along the line that is the correct distance from the anchor.\n * 3. add the glyph's corner offset to the point from step 3\n * 4. convert from the label coordinate space to gl coordinates\n *\n * For horizontal labels we want to do step 1 in the shader for performance reasons (no cpu work).\n * This is what `u_label_plane_matrix` is used for.\n * For labels aligned with lines we have to steps 1 and 2 on the cpu since we need access to the line geometry.\n * This is what `updateLineLabels(...)` does.\n * Since the conversion is handled on the cpu we just set `u_label_plane_matrix` to an identity matrix.\n *\n * Steps 3 and 4 are done in the shaders for all labels.\n */\n\n/*\n * Returns a matrix for converting from tile units to the correct label coordinate space.\n */\nfunction getLabelPlaneMatrix(posMatrix ,\n pitchWithMap ,\n rotateWithMap ,\n transform ,\n pixelsToTileUnits ) {\n const m = mat4.identity(new Float32Array(16));\n if (pitchWithMap) {\n mat4.identity(m);\n mat4.scale(m, m, [1 / pixelsToTileUnits, 1 / pixelsToTileUnits, 1]);\n if (!rotateWithMap) {\n mat4.rotateZ(m, m, transform.angle);\n }\n } else {\n mat4.scale(m, m, [transform.width / 2, -transform.height / 2, 1]);\n mat4.translate(m, m, [1, -1, 0]);\n mat4.multiply(m, m, posMatrix);\n }\n return m;\n}\n\n/*\n * Returns a matrix for converting from the correct label coordinate space to gl coords.\n */\nfunction getGlCoordMatrix(posMatrix ,\n pitchWithMap ,\n rotateWithMap ,\n transform ,\n pixelsToTileUnits ) {\n const m = mat4.identity(new Float32Array(16));\n if (pitchWithMap) {\n mat4.multiply(m, m, posMatrix);\n mat4.scale(m, m, [pixelsToTileUnits, pixelsToTileUnits, 1]);\n if (!rotateWithMap) {\n mat4.rotateZ(m, m, -transform.angle);\n }\n } else {\n mat4.scale(m, m, [1, -1, 1]);\n mat4.translate(m, m, [-1, -1, 0]);\n mat4.scale(m, m, [2 / transform.width, 2 / transform.height, 1]);\n }\n return m;\n}\n\nfunction project(point , matrix ) {\n const pos = [point.x, point.y, 0, 1];\n xyTransformMat4(pos, pos, matrix);\n const w = pos[3];\n return {\n point: new Point(pos[0] / w, pos[1] / w),\n signedDistanceFromCamera: w\n };\n}\n\nfunction isVisible(anchorPos ,\n clippingBuffer ) {\n const x = anchorPos[0] / anchorPos[3];\n const y = anchorPos[1] / anchorPos[3];\n const inPaddedViewport = (\n x >= -clippingBuffer[0] &&\n x <= clippingBuffer[0] &&\n y >= -clippingBuffer[1] &&\n y <= clippingBuffer[1]);\n return inPaddedViewport;\n}\n\n/*\n * Update the `dynamicLayoutVertexBuffer` for the buffer with the correct glyph positions for the current map view.\n * This is only run on labels that are aligned with lines. Horizontal labels are handled entirely in the shader.\n */\nfunction updateLineLabels(bucket ,\n posMatrix ,\n painter ,\n isText ,\n labelPlaneMatrix ,\n glCoordMatrix ,\n pitchWithMap ,\n keepUpright ) {\n\n const sizeData = isText ? bucket.textSizeData : bucket.iconSizeData;\n const partiallyEvaluatedSize = symbolSize.evaluateSizeForZoom(sizeData, painter.transform.zoom,\n symbolLayoutProperties.properties[isText ? 'text-size' : 'icon-size']);\n\n const clippingBuffer = [256 / painter.width * 2 + 1, 256 / painter.height * 2 + 1];\n\n const dynamicLayoutVertexArray = isText ?\n bucket.text.dynamicLayoutVertexArray :\n bucket.icon.dynamicLayoutVertexArray;\n dynamicLayoutVertexArray.clear();\n\n const lineVertexArray = bucket.lineVertexArray;\n const placedSymbols = isText ? bucket.placedGlyphArray : bucket.placedIconArray;\n\n const aspectRatio = painter.transform.width / painter.transform.height;\n\n let useVertical = false;\n\n for (let s = 0; s < placedSymbols.length; s++) {\n const symbol = placedSymbols.get(s);\n // Don't do calculations for vertical glyphs unless the previous symbol was horizontal\n // and we determined that vertical glyphs were necessary.\n // Also don't do calculations for symbols that are collided and fully faded out\n if (symbol.hidden || symbol.writingMode === WritingMode.vertical && !useVertical) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n continue;\n }\n // Awkward... but we're counting on the paired \"vertical\" symbol coming immediately after its horizontal counterpart\n useVertical = false;\n\n const anchorPos = [symbol.anchorX, symbol.anchorY, 0, 1];\n vec4.transformMat4(anchorPos, anchorPos, posMatrix);\n\n // Don't bother calculating the correct point for invisible labels.\n if (!isVisible(anchorPos, clippingBuffer)) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n continue;\n }\n\n const cameraToAnchorDistance = anchorPos[3];\n const perspectiveRatio = 0.5 + 0.5 * (cameraToAnchorDistance / painter.transform.cameraToCenterDistance);\n\n const fontSize = symbolSize.evaluateSizeForFeature(sizeData, partiallyEvaluatedSize, symbol);\n const pitchScaledFontSize = pitchWithMap ?\n fontSize * perspectiveRatio :\n fontSize / perspectiveRatio;\n\n const tileAnchorPoint = new Point(symbol.anchorX, symbol.anchorY);\n const anchorPoint = project(tileAnchorPoint, labelPlaneMatrix).point;\n const projectionCache = {};\n\n const placeUnflipped = placeGlyphsAlongLine(symbol, pitchScaledFontSize, false /*unflipped*/, keepUpright, posMatrix, labelPlaneMatrix, glCoordMatrix,\n bucket.glyphOffsetArray, lineVertexArray, dynamicLayoutVertexArray, anchorPoint, tileAnchorPoint, projectionCache, aspectRatio);\n\n useVertical = placeUnflipped.useVertical;\n\n if (placeUnflipped.notEnoughRoom || useVertical ||\n (placeUnflipped.needsFlipping &&\n placeGlyphsAlongLine(symbol, pitchScaledFontSize, true /*flipped*/, keepUpright, posMatrix, labelPlaneMatrix, glCoordMatrix,\n bucket.glyphOffsetArray, lineVertexArray, dynamicLayoutVertexArray, anchorPoint, tileAnchorPoint, projectionCache, aspectRatio).notEnoughRoom)) {\n hideGlyphs(symbol.numGlyphs, dynamicLayoutVertexArray);\n }\n }\n\n if (isText) {\n bucket.text.dynamicLayoutVertexBuffer.updateData(dynamicLayoutVertexArray);\n } else {\n bucket.icon.dynamicLayoutVertexBuffer.updateData(dynamicLayoutVertexArray);\n }\n}\n\nfunction placeFirstAndLastGlyph(fontScale , glyphOffsetArray , lineOffsetX , lineOffsetY , flip , anchorPoint , tileAnchorPoint , symbol , lineVertexArray , labelPlaneMatrix , projectionCache , returnTileDistance ) {\n const glyphEndIndex = symbol.glyphStartIndex + symbol.numGlyphs;\n const lineStartIndex = symbol.lineStartIndex;\n const lineEndIndex = symbol.lineStartIndex + symbol.lineLength;\n\n const firstGlyphOffset = glyphOffsetArray.getoffsetX(symbol.glyphStartIndex);\n const lastGlyphOffset = glyphOffsetArray.getoffsetX(glyphEndIndex - 1);\n\n const firstPlacedGlyph = placeGlyphAlongLine(fontScale * firstGlyphOffset, lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment,\n lineStartIndex, lineEndIndex, lineVertexArray, labelPlaneMatrix, projectionCache, returnTileDistance);\n if (!firstPlacedGlyph)\n return null;\n\n const lastPlacedGlyph = placeGlyphAlongLine(fontScale * lastGlyphOffset, lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment,\n lineStartIndex, lineEndIndex, lineVertexArray, labelPlaneMatrix, projectionCache, returnTileDistance);\n if (!lastPlacedGlyph)\n return null;\n\n return { first: firstPlacedGlyph, last: lastPlacedGlyph };\n}\n\nfunction requiresOrientationChange(writingMode, firstPoint, lastPoint, aspectRatio) {\n if (writingMode === WritingMode.horizontal) {\n // On top of choosing whether to flip, choose whether to render this version of the glyphs or the alternate\n // vertical glyphs. We can't just filter out vertical glyphs in the horizontal range because the horizontal\n // and vertical versions can have slightly different projections which could lead to angles where both or\n // neither showed.\n const rise = Math.abs(lastPoint.y - firstPoint.y);\n const run = Math.abs(lastPoint.x - firstPoint.x) * aspectRatio;\n if (rise > run) {\n return { useVertical: true };\n }\n }\n\n if (writingMode === WritingMode.vertical ? firstPoint.y < lastPoint.y : firstPoint.x > lastPoint.x) {\n // Includes \"horizontalOnly\" case for labels without vertical glyphs\n return { needsFlipping: true };\n }\n\n return null;\n}\n\nfunction placeGlyphsAlongLine(symbol, fontSize, flip, keepUpright, posMatrix, labelPlaneMatrix, glCoordMatrix, glyphOffsetArray, lineVertexArray, dynamicLayoutVertexArray, anchorPoint, tileAnchorPoint, projectionCache, aspectRatio) {\n const fontScale = fontSize / 24;\n const lineOffsetX = symbol.lineOffsetX * fontSize;\n const lineOffsetY = symbol.lineOffsetY * fontSize;\n\n let placedGlyphs;\n if (symbol.numGlyphs > 1) {\n const glyphEndIndex = symbol.glyphStartIndex + symbol.numGlyphs;\n const lineStartIndex = symbol.lineStartIndex;\n const lineEndIndex = symbol.lineStartIndex + symbol.lineLength;\n\n // Place the first and the last glyph in the label first, so we can figure out\n // the overall orientation of the label and determine whether it needs to be flipped in keepUpright mode\n const firstAndLastGlyph = placeFirstAndLastGlyph(fontScale, glyphOffsetArray, lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol, lineVertexArray, labelPlaneMatrix, projectionCache, false);\n if (!firstAndLastGlyph) {\n return { notEnoughRoom: true };\n }\n const firstPoint = project(firstAndLastGlyph.first.point, glCoordMatrix).point;\n const lastPoint = project(firstAndLastGlyph.last.point, glCoordMatrix).point;\n\n if (keepUpright && !flip) {\n const orientationChange = requiresOrientationChange(symbol.writingMode, firstPoint, lastPoint, aspectRatio);\n if (orientationChange) {\n return orientationChange;\n }\n }\n\n placedGlyphs = [firstAndLastGlyph.first];\n for (let glyphIndex = symbol.glyphStartIndex + 1; glyphIndex < glyphEndIndex - 1; glyphIndex++) {\n // Since first and last glyph fit on the line, we're sure that the rest of the glyphs can be placed\n // $FlowFixMe\n placedGlyphs.push(placeGlyphAlongLine(fontScale * glyphOffsetArray.getoffsetX(glyphIndex), lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment,\n lineStartIndex, lineEndIndex, lineVertexArray, labelPlaneMatrix, projectionCache, false));\n }\n placedGlyphs.push(firstAndLastGlyph.last);\n } else {\n // Only a single glyph to place\n // So, determine whether to flip based on projected angle of the line segment it's on\n if (keepUpright && !flip) {\n const a = project(tileAnchorPoint, posMatrix).point;\n const tileVertexIndex = (symbol.lineStartIndex + symbol.segment + 1);\n // $FlowFixMe\n const tileSegmentEnd = new Point(lineVertexArray.getx(tileVertexIndex), lineVertexArray.gety(tileVertexIndex));\n const projectedVertex = project(tileSegmentEnd, posMatrix);\n // We know the anchor will be in the viewport, but the end of the line segment may be\n // behind the plane of the camera, in which case we can use a point at any arbitrary (closer)\n // point on the segment.\n const b = (projectedVertex.signedDistanceFromCamera > 0) ?\n projectedVertex.point :\n projectTruncatedLineSegment(tileAnchorPoint, tileSegmentEnd, a, 1, posMatrix);\n\n\n const orientationChange = requiresOrientationChange(symbol.writingMode, a, b, aspectRatio);\n if (orientationChange) {\n return orientationChange;\n }\n }\n // $FlowFixMe\n const singleGlyph = placeGlyphAlongLine(fontScale * glyphOffsetArray.getoffsetX(symbol.glyphStartIndex), lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment,\n symbol.lineStartIndex, symbol.lineStartIndex + symbol.lineLength, lineVertexArray, labelPlaneMatrix, projectionCache, false);\n if (!singleGlyph)\n return { notEnoughRoom: true };\n\n placedGlyphs = [singleGlyph];\n }\n\n for (const glyph of placedGlyphs) {\n addDynamicAttributes(dynamicLayoutVertexArray, glyph.point, glyph.angle);\n }\n return {};\n}\n\nfunction projectTruncatedLineSegment(previousTilePoint , currentTilePoint , previousProjectedPoint , minimumLength , projectionMatrix ) {\n // We are assuming \"previousTilePoint\" won't project to a point within one unit of the camera plane\n // If it did, that would mean our label extended all the way out from within the viewport to a (very distant)\n // point near the plane of the camera. We wouldn't be able to render the label anyway once it crossed the\n // plane of the camera.\n const projectedUnitVertex = project(previousTilePoint.add(previousTilePoint.sub(currentTilePoint)._unit()), projectionMatrix).point;\n const projectedUnitSegment = previousProjectedPoint.sub(projectedUnitVertex);\n\n return previousProjectedPoint.add(projectedUnitSegment._mult(minimumLength / projectedUnitSegment.mag()));\n}\n\nfunction placeGlyphAlongLine(offsetX ,\n lineOffsetX ,\n lineOffsetY ,\n flip ,\n anchorPoint ,\n tileAnchorPoint ,\n anchorSegment ,\n lineStartIndex ,\n lineEndIndex ,\n lineVertexArray ,\n labelPlaneMatrix ,\n projectionCache ,\n returnTileDistance ) {\n\n const combinedOffsetX = flip ?\n offsetX - lineOffsetX :\n offsetX + lineOffsetX;\n\n let dir = combinedOffsetX > 0 ? 1 : -1;\n\n let angle = 0;\n if (flip) {\n // The label needs to be flipped to keep text upright.\n // Iterate in the reverse direction.\n dir *= -1;\n angle = Math.PI;\n }\n\n if (dir < 0) angle += Math.PI;\n\n let currentIndex = dir > 0 ?\n lineStartIndex + anchorSegment :\n lineStartIndex + anchorSegment + 1;\n\n const initialIndex = currentIndex;\n let current = anchorPoint;\n let prev = anchorPoint;\n let distanceToPrev = 0;\n let currentSegmentDistance = 0;\n const absOffsetX = Math.abs(combinedOffsetX);\n\n while (distanceToPrev + currentSegmentDistance <= absOffsetX) {\n currentIndex += dir;\n\n // offset does not fit on the projected line\n if (currentIndex < lineStartIndex || currentIndex >= lineEndIndex)\n return null;\n\n prev = current;\n\n current = projectionCache[currentIndex];\n if (current === undefined) {\n const currentVertex = new Point(lineVertexArray.getx(currentIndex), lineVertexArray.gety(currentIndex));\n const projection = project(currentVertex, labelPlaneMatrix);\n if (projection.signedDistanceFromCamera > 0) {\n current = projectionCache[currentIndex] = projection.point;\n } else {\n // The vertex is behind the plane of the camera, so we can't project it\n // Instead, we'll create a vertex along the line that's far enough to include the glyph\n const previousLineVertexIndex = currentIndex - dir;\n const previousTilePoint = distanceToPrev === 0 ?\n tileAnchorPoint :\n new Point(lineVertexArray.getx(previousLineVertexIndex), lineVertexArray.gety(previousLineVertexIndex));\n // Don't cache because the new vertex might not be far enough out for future glyphs on the same segment\n current = projectTruncatedLineSegment(previousTilePoint, currentVertex, prev, absOffsetX - distanceToPrev + 1, labelPlaneMatrix);\n }\n }\n\n distanceToPrev += currentSegmentDistance;\n currentSegmentDistance = prev.dist(current);\n }\n\n // The point is on the current segment. Interpolate to find it.\n const segmentInterpolationT = (absOffsetX - distanceToPrev) / currentSegmentDistance;\n const prevToCurrent = current.sub(prev);\n const p = prevToCurrent.mult(segmentInterpolationT)._add(prev);\n\n // offset the point from the line to text-offset and icon-offset\n p._add(prevToCurrent._unit()._perp()._mult(lineOffsetY * dir));\n\n const segmentAngle = angle + Math.atan2(current.y - prev.y, current.x - prev.x);\n\n return {\n point: p,\n angle: segmentAngle,\n tileDistance: returnTileDistance ?\n {\n prevTileDistance: (currentIndex - dir) === initialIndex ? 0 : lineVertexArray.gettileUnitDistanceFromAnchor(currentIndex - dir),\n lastSegmentViewportDistance: absOffsetX - distanceToPrev\n } : null\n };\n}\n\nconst hiddenGlyphAttributes = new Float32Array([-Infinity, -Infinity, 0, -Infinity, -Infinity, 0, -Infinity, -Infinity, 0, -Infinity, -Infinity, 0]);\n\n// Hide them by moving them offscreen. We still need to add them to the buffer\n// because the dynamic buffer is paired with a static buffer that doesn't get updated.\nfunction hideGlyphs(num , dynamicLayoutVertexArray ) {\n for (let i = 0; i < num; i++) {\n const offset = dynamicLayoutVertexArray.length;\n dynamicLayoutVertexArray.resize(offset + 4);\n // Since all hidden glyphs have the same attributes, we can build up the array faster with a single call to Float32Array.set\n // for each set of four vertices, instead of calling addDynamicAttributes for each vertex.\n dynamicLayoutVertexArray.float32.set(hiddenGlyphAttributes, offset * 3);\n }\n}\n\n// For line label layout, we're not using z output and our w input is always 1\n// This custom matrix transformation ignores those components to make projection faster\nfunction xyTransformMat4(out , a , m ) {\n const x = a[0], y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n out[3] = m[3] * x + m[7] * y + m[15];\n return out;\n}\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst {GLYPH_PBF_BORDER} = require('../style/parse_glyph_pbf');\n\n \n \n \n \n \n\nmodule.exports = {\n getIconQuads,\n getGlyphQuads\n};\n\n/**\n * A textured quad for rendering a single icon or glyph.\n *\n * The zoom range the glyph can be shown is defined by minScale and maxScale.\n *\n * @param tl The offset of the top left corner from the anchor.\n * @param tr The offset of the top right corner from the anchor.\n * @param bl The offset of the bottom left corner from the anchor.\n * @param br The offset of the bottom right corner from the anchor.\n * @param tex The texture coordinates.\n *\n * @private\n */\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n/**\n * Create the quads used for rendering an icon.\n * @private\n */\nfunction getIconQuads(anchor ,\n shapedIcon ,\n layer ,\n alongLine ,\n shapedText ,\n globalProperties ,\n feature ) {\n const image = shapedIcon.image;\n const layout = layer.layout;\n\n // If you have a 10px icon that isn't perfectly aligned to the pixel grid it will cover 11 actual\n // pixels. The quad needs to be padded to account for this, otherwise they'll look slightly clipped\n // on one edge in some cases.\n const border = 1;\n\n const top = shapedIcon.top - border / image.pixelRatio;\n const left = shapedIcon.left - border / image.pixelRatio;\n const bottom = shapedIcon.bottom + border / image.pixelRatio;\n const right = shapedIcon.right + border / image.pixelRatio;\n let tl, tr, br, bl;\n\n // text-fit mode\n if (layout.get('icon-text-fit') !== 'none' && shapedText) {\n const iconWidth = (right - left),\n iconHeight = (bottom - top),\n size = layout.get('text-size').evaluate(feature) / 24,\n textLeft = shapedText.left * size,\n textRight = shapedText.right * size,\n textTop = shapedText.top * size,\n textBottom = shapedText.bottom * size,\n textWidth = textRight - textLeft,\n textHeight = textBottom - textTop,\n padT = layout.get('icon-text-fit-padding')[0],\n padR = layout.get('icon-text-fit-padding')[1],\n padB = layout.get('icon-text-fit-padding')[2],\n padL = layout.get('icon-text-fit-padding')[3],\n offsetY = layout.get('icon-text-fit') === 'width' ? (textHeight - iconHeight) * 0.5 : 0,\n offsetX = layout.get('icon-text-fit') === 'height' ? (textWidth - iconWidth) * 0.5 : 0,\n width = layout.get('icon-text-fit') === 'width' || layout.get('icon-text-fit') === 'both' ? textWidth : iconWidth,\n height = layout.get('icon-text-fit') === 'height' || layout.get('icon-text-fit') === 'both' ? textHeight : iconHeight;\n tl = new Point(textLeft + offsetX - padL, textTop + offsetY - padT);\n tr = new Point(textLeft + offsetX + padR + width, textTop + offsetY - padT);\n br = new Point(textLeft + offsetX + padR + width, textTop + offsetY + padB + height);\n bl = new Point(textLeft + offsetX - padL, textTop + offsetY + padB + height);\n // Normal icon size mode\n } else {\n tl = new Point(left, top);\n tr = new Point(right, top);\n br = new Point(right, bottom);\n bl = new Point(left, bottom);\n }\n\n const angle = layer.layout.get('icon-rotate').evaluate(feature) * Math.PI / 180;\n\n if (angle) {\n const sin = Math.sin(angle),\n cos = Math.cos(angle),\n matrix = [cos, -sin, sin, cos];\n\n tl._matMult(matrix);\n tr._matMult(matrix);\n bl._matMult(matrix);\n br._matMult(matrix);\n }\n\n // Icon quad is padded, so texture coordinates also need to be padded.\n const textureRect = {\n x: image.textureRect.x - border,\n y: image.textureRect.y - border,\n w: image.textureRect.w + border * 2,\n h: image.textureRect.h + border * 2\n };\n\n return [{tl, tr, bl, br, tex: textureRect, writingMode: undefined, glyphOffset: [0, 0]}];\n}\n\n/**\n * Create the quads used for rendering a text label.\n * @private\n */\nfunction getGlyphQuads(anchor ,\n shaping ,\n layer ,\n alongLine ,\n globalProperties ,\n feature ,\n positions ) {\n\n const oneEm = 24;\n const textRotate = layer.layout.get('text-rotate').evaluate(feature) * Math.PI / 180;\n const textOffset = layer.layout.get('text-offset').evaluate(feature).map((t)=> t * oneEm);\n\n const positionedGlyphs = shaping.positionedGlyphs;\n const quads = [];\n\n\n for (let k = 0; k < positionedGlyphs.length; k++) {\n const positionedGlyph = positionedGlyphs[k];\n const glyph = positions[positionedGlyph.glyph];\n if (!glyph) continue;\n\n const rect = glyph.rect;\n if (!rect) continue;\n\n // The rects have an addditional buffer that is not included in their size.\n const glyphPadding = 1.0;\n const rectBuffer = GLYPH_PBF_BORDER + glyphPadding;\n\n const halfAdvance = glyph.metrics.advance / 2;\n\n const glyphOffset = alongLine ?\n [positionedGlyph.x + halfAdvance, positionedGlyph.y] :\n [0, 0];\n\n const builtInOffset = alongLine ?\n [0, 0] :\n [positionedGlyph.x + halfAdvance + textOffset[0], positionedGlyph.y + textOffset[1]];\n\n\n const x1 = glyph.metrics.left - rectBuffer - halfAdvance + builtInOffset[0];\n const y1 = -glyph.metrics.top - rectBuffer + builtInOffset[1];\n const x2 = x1 + rect.w;\n const y2 = y1 + rect.h;\n\n const tl = new Point(x1, y1);\n const tr = new Point(x2, y1);\n const bl = new Point(x1, y2);\n const br = new Point(x2, y2);\n\n if (alongLine && positionedGlyph.vertical) {\n // Vertical-supporting glyphs are laid out in 24x24 point boxes (1 square em)\n // In horizontal orientation, the y values for glyphs are below the midline\n // and we use a \"yOffset\" of -17 to pull them up to the middle.\n // By rotating counter-clockwise around the point at the center of the left\n // edge of a 24x24 layout box centered below the midline, we align the center\n // of the glyphs with the horizontal midline, so the yOffset is no longer\n // necessary, but we also pull the glyph to the left along the x axis\n const center = new Point(-halfAdvance, halfAdvance);\n const verticalRotation = -Math.PI / 2;\n const xOffsetCorrection = new Point(5, 0);\n tl._rotateAround(verticalRotation, center)._add(xOffsetCorrection);\n tr._rotateAround(verticalRotation, center)._add(xOffsetCorrection);\n bl._rotateAround(verticalRotation, center)._add(xOffsetCorrection);\n br._rotateAround(verticalRotation, center)._add(xOffsetCorrection);\n }\n\n if (textRotate) {\n const sin = Math.sin(textRotate),\n cos = Math.cos(textRotate),\n matrix = [cos, -sin, sin, cos];\n\n tl._matMult(matrix);\n tr._matMult(matrix);\n bl._matMult(matrix);\n br._matMult(matrix);\n }\n\n quads.push({tl, tr, bl, br, tex: rect, writingMode: shaping.writingMode, glyphOffset});\n }\n\n return quads;\n}\n","// \n\nconst scriptDetection = require('../util/script_detection');\nconst verticalizePunctuation = require('../util/verticalize_punctuation');\nconst rtlTextPlugin = require('../source/rtl_text_plugin');\n\n \n \n\nconst WritingMode = {\n horizontal: 1,\n vertical: 2,\n horizontalOnly: 3\n};\n\nmodule.exports = {\n shapeText,\n shapeIcon,\n WritingMode\n};\n\n// The position of a glyph relative to the text's anchor point.\n \n \n \n \n \n \n\n// A collection of positioned glyphs and some metadata\n \n \n \n \n \n \n \n \n\n \n \n\nfunction breakLines(text , lineBreakPoints ) {\n const lines = [];\n let start = 0;\n for (const lineBreak of lineBreakPoints) {\n lines.push(text.substring(start, lineBreak));\n start = lineBreak;\n }\n\n if (start < text.length) {\n lines.push(text.substring(start, text.length));\n }\n return lines;\n}\n\nfunction shapeText(text ,\n glyphs ,\n maxWidth ,\n lineHeight ,\n textAnchor ,\n textJustify ,\n spacing ,\n translate ,\n verticalHeight ,\n writingMode ) {\n let logicalInput = text.trim();\n if (writingMode === WritingMode.vertical) {\n logicalInput = verticalizePunctuation(logicalInput);\n }\n\n const positionedGlyphs = [];\n const shaping = {\n positionedGlyphs,\n text: logicalInput,\n top: translate[1],\n bottom: translate[1],\n left: translate[0],\n right: translate[0],\n writingMode\n };\n\n let lines ;\n\n const {processBidirectionalText} = rtlTextPlugin;\n if (processBidirectionalText) {\n lines = processBidirectionalText(logicalInput, determineLineBreaks(logicalInput, spacing, maxWidth, glyphs));\n } else {\n lines = breakLines(logicalInput, determineLineBreaks(logicalInput, spacing, maxWidth, glyphs));\n }\n\n shapeLines(shaping, glyphs, lines, lineHeight, textAnchor, textJustify, writingMode, spacing, verticalHeight);\n\n if (!positionedGlyphs.length)\n return false;\n\n return shaping;\n}\n\nconst whitespace = {\n [0x09]: true, // tab\n [0x0a]: true, // newline\n [0x0b]: true, // vertical tab\n [0x0c]: true, // form feed\n [0x0d]: true, // carriage return\n [0x20]: true, // space\n};\n\nconst breakable = {\n [0x0a]: true, // newline\n [0x20]: true, // space\n [0x26]: true, // ampersand\n [0x28]: true, // left parenthesis\n [0x29]: true, // right parenthesis\n [0x2b]: true, // plus sign\n [0x2d]: true, // hyphen-minus\n [0x2f]: true, // solidus\n [0xad]: true, // soft hyphen\n [0xb7]: true, // middle dot\n [0x200b]: true, // zero-width space\n [0x2010]: true, // hyphen\n [0x2013]: true, // en dash\n [0x2027]: true // interpunct\n // Many other characters may be reasonable breakpoints\n // Consider \"neutral orientation\" characters at scriptDetection.charHasNeutralVerticalOrientation\n // See https://github.com/mapbox/mapbox-gl-js/issues/3658\n};\n\nfunction determineAverageLineWidth(logicalInput ,\n spacing ,\n maxWidth ,\n glyphs ) {\n let totalWidth = 0;\n\n for (let index = 0; index < logicalInput.length; index++) {\n const glyph = glyphs[logicalInput.charCodeAt(index)];\n if (!glyph)\n continue;\n totalWidth += glyph.metrics.advance + spacing;\n }\n\n const lineCount = Math.max(1, Math.ceil(totalWidth / maxWidth));\n return totalWidth / lineCount;\n}\n\nfunction calculateBadness(lineWidth ,\n targetWidth ,\n penalty ,\n isLastBreak ) {\n const raggedness = Math.pow(lineWidth - targetWidth, 2);\n if (isLastBreak) {\n // Favor finals lines shorter than average over longer than average\n if (lineWidth < targetWidth) {\n return raggedness / 2;\n } else {\n return raggedness * 2;\n }\n }\n\n return raggedness + Math.abs(penalty) * penalty;\n}\n\nfunction calculatePenalty(codePoint , nextCodePoint ) {\n let penalty = 0;\n // Force break on newline\n if (codePoint === 0x0a) {\n penalty -= 10000;\n }\n // Penalize open parenthesis at end of line\n if (codePoint === 0x28 || codePoint === 0xff08) {\n penalty += 50;\n }\n\n // Penalize close parenthesis at beginning of line\n if (nextCodePoint === 0x29 || nextCodePoint === 0xff09) {\n penalty += 50;\n }\n return penalty;\n}\n\n \n \n \n \n \n \n\nfunction evaluateBreak(breakIndex ,\n breakX ,\n targetWidth ,\n potentialBreaks ,\n penalty ,\n isLastBreak ) {\n // We could skip evaluating breaks where the line length (breakX - priorBreak.x) > maxWidth\n // ...but in fact we allow lines longer than maxWidth (if there's no break points)\n // ...and when targetWidth and maxWidth are close, strictly enforcing maxWidth can give\n // more lopsided results.\n\n let bestPriorBreak = null;\n let bestBreakBadness = calculateBadness(breakX, targetWidth, penalty, isLastBreak);\n\n for (const potentialBreak of potentialBreaks) {\n const lineWidth = breakX - potentialBreak.x;\n const breakBadness =\n calculateBadness(lineWidth, targetWidth, penalty, isLastBreak) + potentialBreak.badness;\n if (breakBadness <= bestBreakBadness) {\n bestPriorBreak = potentialBreak;\n bestBreakBadness = breakBadness;\n }\n }\n\n return {\n index: breakIndex,\n x: breakX,\n priorBreak: bestPriorBreak,\n badness: bestBreakBadness\n };\n}\n\nfunction leastBadBreaks(lastLineBreak ) {\n if (!lastLineBreak) {\n return [];\n }\n return leastBadBreaks(lastLineBreak.priorBreak).concat(lastLineBreak.index);\n}\n\nfunction determineLineBreaks(logicalInput ,\n spacing ,\n maxWidth ,\n glyphs ) {\n if (!maxWidth)\n return [];\n\n if (!logicalInput)\n return [];\n\n const potentialLineBreaks = [];\n const targetWidth = determineAverageLineWidth(logicalInput, spacing, maxWidth, glyphs);\n\n let currentX = 0;\n\n for (let i = 0; i < logicalInput.length; i++) {\n const codePoint = logicalInput.charCodeAt(i);\n const glyph = glyphs[codePoint];\n\n if (glyph && !whitespace[codePoint])\n currentX += glyph.metrics.advance + spacing;\n\n // Ideographic characters, spaces, and word-breaking punctuation that often appear without\n // surrounding spaces.\n if ((i < logicalInput.length - 1) &&\n (breakable[codePoint] ||\n scriptDetection.charAllowsIdeographicBreaking(codePoint))) {\n\n potentialLineBreaks.push(\n evaluateBreak(\n i + 1,\n currentX,\n targetWidth,\n potentialLineBreaks,\n calculatePenalty(codePoint, logicalInput.charCodeAt(i + 1)),\n false));\n }\n }\n\n return leastBadBreaks(\n evaluateBreak(\n logicalInput.length,\n currentX,\n targetWidth,\n potentialLineBreaks,\n 0,\n true));\n}\n\nfunction getAnchorAlignment(anchor ) {\n let horizontalAlign = 0.5, verticalAlign = 0.5;\n\n switch (anchor) {\n case 'right':\n case 'top-right':\n case 'bottom-right':\n horizontalAlign = 1;\n break;\n case 'left':\n case 'top-left':\n case 'bottom-left':\n horizontalAlign = 0;\n break;\n }\n\n switch (anchor) {\n case 'bottom':\n case 'bottom-right':\n case 'bottom-left':\n verticalAlign = 1;\n break;\n case 'top':\n case 'top-right':\n case 'top-left':\n verticalAlign = 0;\n break;\n }\n\n return { horizontalAlign, verticalAlign };\n}\n\nfunction shapeLines(shaping ,\n glyphs ,\n lines ,\n lineHeight ,\n textAnchor ,\n textJustify ,\n writingMode ,\n spacing ,\n verticalHeight ) {\n // the y offset *should* be part of the font metadata\n const yOffset = -17;\n\n let x = 0;\n let y = yOffset;\n\n let maxLineLength = 0;\n const positionedGlyphs = shaping.positionedGlyphs;\n\n const justify =\n textJustify === 'right' ? 1 :\n textJustify === 'left' ? 0 : 0.5;\n\n for (let line of lines) {\n line = line.trim();\n\n if (!line.length) {\n y += lineHeight; // Still need a line feed after empty line\n continue;\n }\n\n const lineStartIndex = positionedGlyphs.length;\n for (let i = 0; i < line.length; i++) {\n const codePoint = line.charCodeAt(i);\n const glyph = glyphs[codePoint];\n\n if (!glyph) continue;\n\n if (!scriptDetection.charHasUprightVerticalOrientation(codePoint) || writingMode === WritingMode.horizontal) {\n positionedGlyphs.push({glyph: codePoint, x, y, vertical: false});\n x += glyph.metrics.advance + spacing;\n } else {\n positionedGlyphs.push({glyph: codePoint, x, y: 0, vertical: true});\n x += verticalHeight + spacing;\n }\n }\n\n // Only justify if we placed at least one glyph\n if (positionedGlyphs.length !== lineStartIndex) {\n const lineLength = x - spacing;\n maxLineLength = Math.max(lineLength, maxLineLength);\n\n justifyLine(positionedGlyphs, glyphs, lineStartIndex, positionedGlyphs.length - 1, justify);\n }\n\n x = 0;\n y += lineHeight;\n }\n\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(textAnchor);\n align(positionedGlyphs, justify, horizontalAlign, verticalAlign, maxLineLength, lineHeight, lines.length);\n\n // Calculate the bounding box\n const height = lines.length * lineHeight;\n\n shaping.top += -verticalAlign * height;\n shaping.bottom = shaping.top + height;\n shaping.left += -horizontalAlign * maxLineLength;\n shaping.right = shaping.left + maxLineLength;\n}\n\n// justify right = 1, left = 0, center = 0.5\nfunction justifyLine(positionedGlyphs ,\n glyphs ,\n start ,\n end ,\n justify ) {\n if (!justify)\n return;\n\n const glyph = glyphs[positionedGlyphs[end].glyph];\n if (glyph) {\n const lastAdvance = glyph.metrics.advance;\n const lineIndent = (positionedGlyphs[end].x + lastAdvance) * justify;\n\n for (let j = start; j <= end; j++) {\n positionedGlyphs[j].x -= lineIndent;\n }\n }\n}\n\nfunction align(positionedGlyphs ,\n justify ,\n horizontalAlign ,\n verticalAlign ,\n maxLineLength ,\n lineHeight ,\n lineCount ) {\n const shiftX = (justify - horizontalAlign) * maxLineLength;\n const shiftY = (-verticalAlign * lineCount + 0.5) * lineHeight;\n\n for (let j = 0; j < positionedGlyphs.length; j++) {\n positionedGlyphs[j].x += shiftX;\n positionedGlyphs[j].y += shiftY;\n }\n}\n\n \n \n \n \n \n \n \n\nfunction shapeIcon(image , iconOffset , iconAnchor ) {\n const {horizontalAlign, verticalAlign} = getAnchorAlignment(iconAnchor);\n const dx = iconOffset[0];\n const dy = iconOffset[1];\n const x1 = dx - image.displaySize[0] * horizontalAlign;\n const x2 = x1 + image.displaySize[0];\n const y1 = dy - image.displaySize[1] * verticalAlign;\n const y2 = y1 + image.displaySize[1];\n return {image, top: y1, bottom: y2, left: x1, right: x2};\n}\n","// \n\nconst Anchor = require('./anchor');\nconst getAnchors = require('./get_anchors');\nconst clipLine = require('./clip_line');\nconst OpacityState = require('./opacity_state');\nconst {shapeText, shapeIcon, WritingMode} = require('./shaping');\nconst {getGlyphQuads, getIconQuads} = require('./quads');\nconst CollisionFeature = require('./collision_feature');\nconst util = require('../util/util');\nconst scriptDetection = require('../util/script_detection');\nconst findPoleOfInaccessibility = require('../util/find_pole_of_inaccessibility');\nconst classifyRings = require('../util/classify_rings');\nconst EXTENT = require('../data/extent');\nconst SymbolBucket = require('../data/bucket/symbol_bucket');\nconst EvaluationParameters = require('../style/evaluation_parameters');\n\n \n \n \n \n \n \n \n \n \n\nconst Point = require('@mapbox/point-geometry');\n\nmodule.exports = {\n performSymbolLayout\n};\n\n// The symbol layout process needs `text-size` evaluated at up to five different zoom levels, and\n// `icon-size` at up to three:\n//\n// 1. `text-size` at the zoom level of the bucket. Used to calculate a per-feature size for source `text-size`\n// expressions, and to calculate the box dimensions for icon-text-fit.\n// 2. `icon-size` at the zoom level of the bucket. Used to calculate a per-feature size for source `icon-size`\n// expressions.\n// 3. `text-size` and `icon-size` at the zoom level of the bucket, plus one. Used to calculate collision boxes.\n// 4. `text-size` at zoom level 18. Used for something line-symbol-placement-related.\n// 5. For composite `*-size` expressions: two zoom levels of curve stops that \"cover\" the zoom level of the\n// bucket. These go into a vertex buffer and are used by the shader to interpolate the size at render time.\n//\n// (1) and (2) are stored in `bucket.layers[0].layout`. The remainder are below.\n//\n \n \n \n \n \n \n \n\nfunction performSymbolLayout(bucket ,\n glyphMap ,\n glyphPositions ,\n imageMap ,\n imagePositions ,\n showCollisionBoxes ) {\n bucket.createArrays();\n bucket.symbolInstances = [];\n\n const tileSize = 512 * bucket.overscaling;\n bucket.tilePixelRatio = EXTENT / tileSize;\n bucket.compareText = {};\n bucket.iconsNeedLinear = false;\n\n const layout = bucket.layers[0].layout;\n const unevaluatedLayoutValues = bucket.layers[0]._unevaluatedLayout._values;\n\n const sizes = {};\n\n if (bucket.textSizeData.functionType === 'composite') {\n const {min, max} = bucket.textSizeData.zoomRange;\n sizes.compositeTextSizes = [\n unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(min)),\n unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(max))\n ];\n }\n\n if (bucket.iconSizeData.functionType === 'composite') {\n const {min, max} = bucket.iconSizeData.zoomRange;\n sizes.compositeIconSizes = [\n unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(min)),\n unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(max))\n ];\n }\n\n sizes.layoutTextSize = unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(bucket.zoom + 1));\n sizes.layoutIconSize = unevaluatedLayoutValues['icon-size'].possiblyEvaluate(new EvaluationParameters(bucket.zoom + 1));\n sizes.textMaxSize = unevaluatedLayoutValues['text-size'].possiblyEvaluate(new EvaluationParameters(18));\n\n const oneEm = 24;\n const lineHeight = layout.get('text-line-height') * oneEm;\n const textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') === 'line';\n const keepUpright = layout.get('text-keep-upright');\n\n\n for (const feature of bucket.features) {\n const fontstack = layout.get('text-font').evaluate(feature).join(',');\n const glyphs = glyphMap[fontstack] || {};\n const glyphPositionMap = glyphPositions[fontstack] || {};\n\n const shapedTextOrientations = {};\n const text = feature.text;\n if (text) {\n const allowsVerticalWritingMode = scriptDetection.allowsVerticalWritingMode(text);\n const textOffset = (layout.get('text-offset').evaluate(feature).map((t)=> t * oneEm) );\n const spacing = layout.get('text-letter-spacing').evaluate(feature) * oneEm;\n const spacingIfAllowed = scriptDetection.allowsLetterSpacing(text) ? spacing : 0;\n const textAnchor = layout.get('text-anchor').evaluate(feature);\n const textJustify = layout.get('text-justify').evaluate(feature);\n const maxWidth = layout.get('symbol-placement') !== 'line' ?\n layout.get('text-max-width').evaluate(feature) * oneEm :\n 0;\n\n shapedTextOrientations.horizontal = shapeText(text, glyphs, maxWidth, lineHeight, textAnchor, textJustify, spacingIfAllowed, textOffset, oneEm, WritingMode.horizontal);\n if (allowsVerticalWritingMode && textAlongLine && keepUpright) {\n shapedTextOrientations.vertical = shapeText(text, glyphs, maxWidth, lineHeight, textAnchor, textJustify, spacingIfAllowed, textOffset, oneEm, WritingMode.vertical);\n }\n }\n\n let shapedIcon;\n if (feature.icon) {\n const image = imageMap[feature.icon];\n if (image) {\n shapedIcon = shapeIcon(\n imagePositions[feature.icon],\n layout.get('icon-offset').evaluate(feature),\n layout.get('icon-anchor').evaluate(feature));\n if (bucket.sdfIcons === undefined) {\n bucket.sdfIcons = image.sdf;\n } else if (bucket.sdfIcons !== image.sdf) {\n util.warnOnce('Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer');\n }\n if (image.pixelRatio !== bucket.pixelRatio) {\n bucket.iconsNeedLinear = true;\n } else if (layout.get('icon-rotate').constantOr(1) !== 0) {\n bucket.iconsNeedLinear = true;\n }\n }\n }\n\n if (shapedTextOrientations.horizontal || shapedIcon) {\n addFeature(bucket, feature, shapedTextOrientations, shapedIcon, glyphPositionMap, sizes);\n }\n }\n\n if (showCollisionBoxes) {\n bucket.generateCollisionDebugBuffers();\n }\n}\n\n\n/**\n * Given a feature and its shaped text and icon data, add a 'symbol\n * instance' for each _possible_ placement of the symbol feature.\n * (At render timePlaceSymbols#place() selects which of these instances to\n * show or hide based on collisions with symbols in other layers.)\n * @private\n */\nfunction addFeature(bucket ,\n feature ,\n shapedTextOrientations ,\n shapedIcon ,\n glyphPositionMap ,\n sizes ) {\n const layoutTextSize = sizes.layoutTextSize.evaluate(feature);\n const layoutIconSize = sizes.layoutIconSize.evaluate(feature);\n\n // To reduce the number of labels that jump around when zooming we need\n // to use a text-size value that is the same for all zoom levels.\n // bucket calculates text-size at a high zoom level so that all tiles can\n // use the same value when calculating anchor positions.\n let textMaxSize = sizes.textMaxSize.evaluate(feature);\n if (textMaxSize === undefined) {\n textMaxSize = layoutTextSize;\n }\n\n const layout = bucket.layers[0].layout;\n const textOffset = layout.get('text-offset').evaluate(feature);\n const iconOffset = layout.get('icon-offset').evaluate(feature);\n\n const glyphSize = 24,\n fontScale = layoutTextSize / glyphSize,\n textBoxScale = bucket.tilePixelRatio * fontScale,\n textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize,\n iconBoxScale = bucket.tilePixelRatio * layoutIconSize,\n symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'),\n textPadding = layout.get('text-padding') * bucket.tilePixelRatio,\n iconPadding = layout.get('icon-padding') * bucket.tilePixelRatio,\n textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI,\n textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') === 'line',\n iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') === 'line',\n symbolPlacement = layout.get('symbol-placement'),\n textRepeatDistance = symbolMinDistance / 2;\n\n const addSymbolAtAnchor = (line, anchor) => {\n if (anchor.x < 0 || anchor.x >= EXTENT || anchor.y < 0 || anchor.y >= EXTENT) {\n // Symbol layers are drawn across tile boundaries, We filter out symbols\n // outside our tile boundaries (which may be included in vector tile buffers)\n // to prevent double-drawing symbols.\n return;\n }\n\n bucket.symbolInstances.push(addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, bucket.layers[0],\n bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index,\n textBoxScale, textPadding, textAlongLine, textOffset,\n iconBoxScale, iconPadding, iconAlongLine, iconOffset,\n {zoom: bucket.zoom}, feature, glyphPositionMap, sizes));\n };\n\n if (symbolPlacement === 'line') {\n for (const line of clipLine(feature.geometry, 0, 0, EXTENT, EXTENT)) {\n const anchors = getAnchors(\n line,\n symbolMinDistance,\n textMaxAngle,\n shapedTextOrientations.vertical || shapedTextOrientations.horizontal,\n shapedIcon,\n glyphSize,\n textMaxBoxScale,\n bucket.overscaling,\n EXTENT\n );\n for (const anchor of anchors) {\n const shapedText = shapedTextOrientations.horizontal;\n if (!shapedText || !anchorIsTooClose(bucket, shapedText.text, textRepeatDistance, anchor)) {\n addSymbolAtAnchor(line, anchor);\n }\n }\n }\n } else if (feature.type === 'Polygon') {\n for (const polygon of classifyRings(feature.geometry, 0)) {\n // 16 here represents 2 pixels\n const poi = findPoleOfInaccessibility(polygon, 16);\n addSymbolAtAnchor(polygon[0], new Anchor(poi.x, poi.y, 0));\n }\n } else if (feature.type === 'LineString') {\n // https://github.com/mapbox/mapbox-gl-js/issues/3808\n for (const line of feature.geometry) {\n addSymbolAtAnchor(line, new Anchor(line[0].x, line[0].y, 0));\n }\n } else if (feature.type === 'Point') {\n for (const points of feature.geometry) {\n for (const point of points) {\n addSymbolAtAnchor([point], new Anchor(point.x, point.y, 0));\n }\n }\n }\n}\n\nfunction addTextVertices(bucket ,\n anchor ,\n shapedText ,\n layer ,\n textAlongLine ,\n globalProperties ,\n feature ,\n textOffset ,\n lineArray ,\n writingMode ,\n placedTextSymbolIndices ,\n glyphPositionMap ,\n sizes ) {\n const glyphQuads = getGlyphQuads(anchor, shapedText,\n layer, textAlongLine, globalProperties, feature, glyphPositionMap);\n\n const sizeData = bucket.textSizeData;\n let textSizeData = null;\n\n if (sizeData.functionType === 'source') {\n textSizeData = [\n 10 * layer.layout.get('text-size').evaluate(feature)\n ];\n } else if (sizeData.functionType === 'composite') {\n textSizeData = [\n 10 * sizes.compositeTextSizes[0].evaluate(feature),\n 10 * sizes.compositeTextSizes[1].evaluate(feature)\n ];\n }\n\n bucket.addSymbols(\n bucket.text,\n glyphQuads,\n textSizeData,\n textOffset,\n textAlongLine,\n feature,\n writingMode,\n anchor,\n lineArray.lineStartIndex,\n lineArray.lineLength,\n bucket.placedGlyphArray);\n\n // The placedGlyphArray is used at render time in drawTileSymbols\n // These indices allow access to the array at collision detection time\n placedTextSymbolIndices.push(bucket.placedGlyphArray.length - 1);\n\n return glyphQuads.length * 4;\n}\n\n\n/**\n * Add a single label & icon placement.\n *\n * @private\n */\nfunction addSymbol(bucket ,\n anchor ,\n line ,\n shapedTextOrientations ,\n shapedIcon ,\n layer ,\n collisionBoxArray ,\n featureIndex ,\n sourceLayerIndex ,\n bucketIndex ,\n textBoxScale ,\n textPadding ,\n textAlongLine ,\n textOffset ,\n iconBoxScale ,\n iconPadding ,\n iconAlongLine ,\n iconOffset ,\n globalProperties ,\n feature ,\n glyphPositionMap ,\n sizes ) {\n const lineArray = bucket.addToLineVertexArray(anchor, line);\n\n let textCollisionFeature, iconCollisionFeature;\n\n let numIconVertices = 0;\n let numGlyphVertices = 0;\n let numVerticalGlyphVertices = 0;\n const key = shapedTextOrientations.horizontal ? shapedTextOrientations.horizontal.text : '';\n const placedTextSymbolIndices = [];\n if (shapedTextOrientations.horizontal) {\n // As a collision approximation, we can use either the vertical or the horizontal version of the feature\n // We're counting on the two versions having similar dimensions\n textCollisionFeature = new CollisionFeature(collisionBoxArray, line, anchor, featureIndex, sourceLayerIndex, bucketIndex, shapedTextOrientations.horizontal, textBoxScale, textPadding, textAlongLine, bucket.overscaling);\n numGlyphVertices += addTextVertices(bucket, anchor, shapedTextOrientations.horizontal, layer, textAlongLine, globalProperties, feature, textOffset, lineArray, shapedTextOrientations.vertical ? WritingMode.horizontal : WritingMode.horizontalOnly, placedTextSymbolIndices, glyphPositionMap, sizes);\n\n if (shapedTextOrientations.vertical) {\n numVerticalGlyphVertices += addTextVertices(bucket, anchor, shapedTextOrientations.vertical, layer, textAlongLine, globalProperties, feature, textOffset, lineArray, WritingMode.vertical, placedTextSymbolIndices, glyphPositionMap, sizes);\n }\n }\n\n const textBoxStartIndex = textCollisionFeature ? textCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const textBoxEndIndex = textCollisionFeature ? textCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n if (shapedIcon) {\n const iconQuads = getIconQuads(anchor, shapedIcon, layer,\n iconAlongLine, shapedTextOrientations.horizontal,\n globalProperties, feature);\n iconCollisionFeature = new CollisionFeature(collisionBoxArray, line, anchor, featureIndex, sourceLayerIndex, bucketIndex, shapedIcon, iconBoxScale, iconPadding, /*align boxes to line*/false, bucket.overscaling);\n\n numIconVertices = iconQuads.length * 4;\n\n const sizeData = bucket.iconSizeData;\n let iconSizeData = null;\n\n if (sizeData.functionType === 'source') {\n iconSizeData = [\n 10 * layer.layout.get('icon-size').evaluate(feature)\n ];\n } else if (sizeData.functionType === 'composite') {\n iconSizeData = [\n 10 * sizes.compositeIconSizes[0].evaluate(feature),\n 10 * sizes.compositeIconSizes[1].evaluate(feature)\n ];\n }\n\n bucket.addSymbols(\n bucket.icon,\n iconQuads,\n iconSizeData,\n iconOffset,\n iconAlongLine,\n feature,\n false,\n anchor,\n lineArray.lineStartIndex,\n lineArray.lineLength,\n bucket.placedIconArray);\n }\n\n const iconBoxStartIndex = iconCollisionFeature ? iconCollisionFeature.boxStartIndex : bucket.collisionBoxArray.length;\n const iconBoxEndIndex = iconCollisionFeature ? iconCollisionFeature.boxEndIndex : bucket.collisionBoxArray.length;\n\n if (bucket.glyphOffsetArray.length >= SymbolBucket.MAX_GLYPHS) util.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");\n\n const textOpacityState = new OpacityState();\n const iconOpacityState = new OpacityState();\n\n return {\n key,\n textBoxStartIndex,\n textBoxEndIndex,\n iconBoxStartIndex,\n iconBoxEndIndex,\n textOffset,\n iconOffset,\n anchor,\n line,\n featureIndex,\n feature,\n numGlyphVertices,\n numVerticalGlyphVertices,\n numIconVertices,\n textOpacityState,\n iconOpacityState,\n isDuplicate: false,\n placedTextSymbolIndices\n };\n}\n\nfunction anchorIsTooClose(bucket , text , repeatDistance , anchor ) {\n const compareText = bucket.compareText;\n if (!(text in compareText)) {\n compareText[text] = [];\n } else {\n const otherAnchors = compareText[text];\n for (let k = otherAnchors.length - 1; k >= 0; k--) {\n if (anchor.dist(otherAnchors[k]) < repeatDistance) {\n // If it's within repeatDistance of one anchor, stop looking\n return true;\n }\n }\n }\n // If anchor is not within repeatDistance of any other anchor, add to array\n compareText[text].push(anchor);\n return false;\n}\n","// \n\nconst symbolSize = require('./symbol_size');\nconst symbolLayoutProperties = require('../style/style_layer/symbol_style_layer_properties').layout;\nconst browser = require('../util/browser');\nconst mat4 = require('@mapbox/gl-matrix').mat4;\n\n \n \n \n \n\nmodule.exports = {\n updateOpacities: updateOpacities,\n performSymbolPlacement: performSymbolPlacement\n};\n\nfunction updateOpacity(symbolInstance , opacityState , targetOpacity , opacityUpdateTime , collisionFadeTimes , instant ) {\n if (symbolInstance.isDuplicate) {\n opacityState.opacity = 0;\n opacityState.targetOpacity = 0;\n } else {\n if (opacityState.targetOpacity !== targetOpacity) {\n collisionFadeTimes.latestStart = opacityUpdateTime;\n }\n const increment = collisionFadeTimes.duration ? ((opacityUpdateTime - opacityState.time) / collisionFadeTimes.duration) : 1;\n opacityState.opacity = instant ?\n targetOpacity :\n Math.max(0, Math.min(1, opacityState.opacity + (opacityState.targetOpacity === 1 ? increment : -increment)));\n opacityState.targetOpacity = targetOpacity;\n opacityState.time = opacityUpdateTime;\n }\n}\n\nconst shift25 = Math.pow(2, 25);\nconst shift24 = Math.pow(2, 24);\nconst shift17 = Math.pow(2, 17);\nconst shift16 = Math.pow(2, 16);\nconst shift9 = Math.pow(2, 9);\nconst shift8 = Math.pow(2, 8);\nconst shift1 = Math.pow(2, 1);\n\n// All four vertices for a glyph will have the same opacity state\n// So we pack the opacity into a uint8, and then repeat it four times\n// to make a single uint32 that we can upload for each glyph in the\n// label.\nfunction packOpacity(opacityState ) {\n if (opacityState.opacity === 0 && opacityState.targetOpacity === 0) {\n return 0;\n } else if (opacityState.opacity === 1 && opacityState.targetOpacity === 1) {\n return 4294967295;\n }\n const targetBit = opacityState.targetOpacity === 1 ? 1 : 0;\n const opacityBits = Math.floor(opacityState.opacity * 127);\n return opacityBits * shift25 + targetBit * shift24 +\n opacityBits * shift17 + targetBit * shift16 +\n opacityBits * shift9 + targetBit * shift8 +\n opacityBits * shift1 + targetBit;\n}\n\nfunction updateOpacities(bucket , collisionFadeTimes , instant ) {\n const glyphOpacityArray = bucket.text && bucket.text.opacityVertexArray;\n const iconOpacityArray = bucket.icon && bucket.icon.opacityVertexArray;\n if (glyphOpacityArray) glyphOpacityArray.clear();\n if (iconOpacityArray) iconOpacityArray.clear();\n\n bucket.fadeStartTime = browser.now();\n\n for (const symbolInstance of bucket.symbolInstances) {\n\n const hasText = !(symbolInstance.textBoxStartIndex === symbolInstance.textBoxEndIndex);\n const hasIcon = !(symbolInstance.iconBoxStartIndex === symbolInstance.iconBoxEndIndex);\n\n if (!hasText && !hasIcon) continue;\n\n if (hasText) {\n const targetOpacity = symbolInstance.placedText ? 1.0 : 0.0;\n const opacityState = symbolInstance.textOpacityState;\n const initialHidden = opacityState.opacity === 0 && opacityState.targetOpacity === 0;\n updateOpacity(symbolInstance, opacityState, targetOpacity, bucket.fadeStartTime, collisionFadeTimes, instant);\n const nowHidden = opacityState.opacity === 0 && opacityState.targetOpacity === 0;\n if (initialHidden !== nowHidden) {\n for (const placedTextSymbolIndex of symbolInstance.placedTextSymbolIndices) {\n const placedSymbol = (bucket.placedGlyphArray.get(placedTextSymbolIndex) );\n // If this label is completely faded, mark it so that we don't have to calculate\n // its position at render time\n placedSymbol.hidden = nowHidden;\n }\n }\n\n // Vertical text fades in/out on collision the same way as corresponding\n // horizontal text. Switch between vertical/horizontal should be instantaneous\n const opacityEntryCount = (symbolInstance.numGlyphVertices + symbolInstance.numVerticalGlyphVertices) / 4;\n const packedOpacity = packOpacity(opacityState);\n for (let i = 0; i < opacityEntryCount; i++) {\n glyphOpacityArray.emplaceBack(packedOpacity);\n }\n }\n\n if (hasIcon) {\n const targetOpacity = symbolInstance.placedIcon ? 1.0 : 0.0;\n const opacityState = symbolInstance.iconOpacityState;\n updateOpacity(symbolInstance, opacityState, targetOpacity, bucket.fadeStartTime, collisionFadeTimes, instant);\n const opacityEntryCount = symbolInstance.numIconVertices / 4;\n const packedOpacity = packOpacity(opacityState);\n for (let i = 0; i < opacityEntryCount; i++) {\n iconOpacityArray.emplaceBack(packedOpacity);\n }\n }\n\n }\n\n if (glyphOpacityArray && bucket.text.opacityVertexBuffer) {\n bucket.text.opacityVertexBuffer.updateData(glyphOpacityArray);\n }\n if (iconOpacityArray && bucket.icon.opacityVertexBuffer) {\n bucket.icon.opacityVertexBuffer.updateData(iconOpacityArray);\n }\n}\n\n\nfunction updateCollisionBox(collisionVertexArray , placed ) {\n collisionVertexArray.emplaceBack(placed ? 1 : 0, 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, 0);\n}\n\nfunction updateCollisionCircles(collisionVertexArray , collisionCircles , placed , isDuplicate ) {\n for (let k = 0; k < collisionCircles.length; k += 5) {\n const notUsed = isDuplicate || (collisionCircles[k + 4] === 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0);\n collisionVertexArray.emplaceBack(placed ? 1 : 0, notUsed ? 1 : 0);\n }\n}\n\nfunction performSymbolPlacement(bucket , collisionIndex , showCollisionBoxes , zoom , textPixelRatio , posMatrix , labelPlaneMatrix , tileID , sourceID , collisionBoxArray ) {\n const layer = bucket.layers[0];\n const layout = layer.layout;\n\n const scale = Math.pow(2, zoom - bucket.zoom);\n\n let collisionDebugBoxArray, collisionDebugCircleArray;\n if (showCollisionBoxes) {\n if (bucket.collisionBox && bucket.collisionBox.collisionVertexArray && bucket.collisionBox.collisionVertexArray.length) {\n collisionDebugBoxArray = bucket.collisionBox.collisionVertexArray;\n collisionDebugBoxArray.clear();\n }\n\n if (bucket.collisionCircle && bucket.collisionCircle.collisionVertexArray && bucket.collisionCircle.collisionVertexArray.length) {\n collisionDebugCircleArray = bucket.collisionCircle.collisionVertexArray;\n collisionDebugCircleArray.clear();\n }\n }\n\n const partiallyEvaluatedTextSize = symbolSize.evaluateSizeForZoom(bucket.textSizeData, collisionIndex.transform.zoom,\n symbolLayoutProperties.properties['text-size']);\n const pitchWithMap = layout.get('text-pitch-alignment') === 'map';\n\n for (const symbolInstance of bucket.symbolInstances) {\n\n const hasText = !(symbolInstance.textBoxStartIndex === symbolInstance.textBoxEndIndex);\n const hasIcon = !(symbolInstance.iconBoxStartIndex === symbolInstance.iconBoxEndIndex);\n\n const iconWithoutText = layout.get('text-optional') || !hasText,\n textWithoutIcon = layout.get('icon-optional') || !hasIcon;\n\n if (!symbolInstance.collisionArrays) {\n symbolInstance.collisionArrays = bucket.deserializeCollisionBoxes(collisionBoxArray, symbolInstance.textBoxStartIndex, symbolInstance.textBoxEndIndex, symbolInstance.iconBoxStartIndex, symbolInstance.iconBoxEndIndex);\n }\n\n let placedGlyphBox = [];\n let placedIconBox = [];\n let placedGlyphCircles = [];\n let placedCircles = false;\n if (!symbolInstance.isDuplicate) {\n // isDuplicate -> Although we're rendering this tile, this symbol is also present in\n // a child tile that will be rendered on top. Don't place this symbol, so that\n // there's room in the CollisionIndex for the child symbol.\n\n // Symbols that are in the parent but not the child will keep getting rendered\n // (and potentially colliding out child symbols) until the parent tile is removed.\n // It might be better to filter out all the parent symbols so that the child tile\n // starts rendering as close as possible to its final state?\n if (symbolInstance.collisionArrays.textBox) {\n placedGlyphBox = collisionIndex.placeCollisionBox(symbolInstance.collisionArrays.textBox,\n layout.get('text-allow-overlap'), textPixelRatio, posMatrix);\n }\n\n if (symbolInstance.collisionArrays.iconBox) {\n placedIconBox = collisionIndex.placeCollisionBox(symbolInstance.collisionArrays.iconBox,\n layout.get('icon-allow-overlap'), textPixelRatio, posMatrix);\n }\n\n const textCircles = symbolInstance.collisionArrays.textCircles;\n if (textCircles) {\n const placedSymbol = (bucket.placedGlyphArray.get(symbolInstance.placedTextSymbolIndices[0]) );\n const fontSize = symbolSize.evaluateSizeForFeature(bucket.textSizeData, partiallyEvaluatedTextSize, placedSymbol);\n placedGlyphCircles = collisionIndex.placeCollisionCircles(textCircles,\n layout.get('text-allow-overlap'),\n scale,\n textPixelRatio,\n symbolInstance.key,\n placedSymbol,\n bucket.lineVertexArray,\n bucket.glyphOffsetArray,\n fontSize,\n posMatrix,\n labelPlaneMatrix,\n showCollisionBoxes,\n pitchWithMap);\n // If text-allow-overlap is set, force \"placedCircles\" to true\n // In theory there should always be at least one circle placed\n // in this case, but for now quirks in text-anchor\n // and text-offset may prevent that from being true.\n placedCircles = layout.get('text-allow-overlap') || placedGlyphCircles.length > 0;\n }\n }\n\n let placeGlyph = placedGlyphBox.length > 0 || placedCircles;\n let placeIcon = placedIconBox.length > 0;\n\n // Combine the scales for icons and text.\n if (!iconWithoutText && !textWithoutIcon) {\n placeIcon = placeGlyph = placeIcon && placeGlyph;\n } else if (!textWithoutIcon) {\n placeGlyph = placeIcon && placeGlyph;\n } else if (!iconWithoutText) {\n placeIcon = placeIcon && placeGlyph;\n }\n\n symbolInstance.placedText = placeGlyph;\n symbolInstance.placedIcon = placeIcon;\n\n if (symbolInstance.collisionArrays.textBox) {\n if (collisionDebugBoxArray) {\n updateCollisionBox(collisionDebugBoxArray, placeGlyph);\n }\n if (placeGlyph) {\n collisionIndex.insertCollisionBox(placedGlyphBox, layout.get('text-ignore-placement'), tileID, sourceID, symbolInstance.textBoxStartIndex);\n }\n }\n if (symbolInstance.collisionArrays.iconBox) {\n if (collisionDebugBoxArray) {\n updateCollisionBox(collisionDebugBoxArray, placeIcon);\n }\n if (placeIcon) {\n collisionIndex.insertCollisionBox(placedIconBox, layout.get('icon-ignore-placement'), tileID, sourceID, symbolInstance.iconBoxStartIndex);\n }\n }\n if (symbolInstance.collisionArrays.textCircles) {\n if (collisionDebugCircleArray) {\n updateCollisionCircles(collisionDebugCircleArray, symbolInstance.collisionArrays.textCircles, placeGlyph, symbolInstance.isDuplicate);\n }\n if (placeGlyph) {\n collisionIndex.insertCollisionCircles(placedGlyphCircles, layout.get('text-ignore-placement'), tileID, sourceID, symbolInstance.textBoxStartIndex);\n }\n }\n\n }\n\n // If the buffer hasn't been uploaded for the first time yet, we don't need to call updateData since it will happen at upload time\n if (collisionDebugBoxArray && bucket.collisionBox.collisionVertexBuffer)\n bucket.collisionBox.collisionVertexBuffer.updateData(collisionDebugBoxArray);\n if (collisionDebugCircleArray && bucket.collisionCircle.collisionVertexBuffer)\n bucket.collisionCircle.collisionVertexBuffer.updateData(collisionDebugCircleArray);\n}\n","// \n\nconst {normalizePropertyExpression} = require('../style-spec/expression');\nconst interpolate = require('../style-spec/util/interpolate');\nconst util = require('../util/util');\n\n \n \n\nmodule.exports = {\n getSizeData,\n evaluateSizeForFeature,\n evaluateSizeForZoom\n};\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n// For {text,icon}-size, get the bucket-level data that will be needed by\n// the painter to set symbol-size-related uniforms\nfunction getSizeData(tileZoom , value ) {\n const {expression} = value;\n if (expression.kind === 'constant') {\n return {\n functionType: 'constant',\n layoutSize: expression.evaluate({zoom: tileZoom + 1})\n };\n } else if (expression.kind === 'source') {\n return {\n functionType: 'source'\n };\n } else {\n // calculate covering zoom stops for zoom-dependent values\n const levels = expression.zoomStops;\n\n let lower = 0;\n while (lower < levels.length && levels[lower] <= tileZoom) lower++;\n lower = Math.max(0, lower - 1);\n let upper = lower;\n while (upper < levels.length && levels[upper] < tileZoom + 1) upper++;\n upper = Math.min(levels.length - 1, upper);\n\n const zoomRange = {\n min: levels[lower],\n max: levels[upper]\n };\n\n // We'd like to be able to use CameraExpression or CompositeExpression in these\n // return types rather than ExpressionSpecification, but the former are not\n // transferrable across Web Worker boundaries.\n if (expression.kind === 'composite') {\n return {\n functionType: 'composite',\n zoomRange,\n propertyValue: (value.value )\n };\n } else {\n // for camera functions, also save off the function values\n // evaluated at the covering zoom levels\n return {\n functionType: 'camera',\n layoutSize: expression.evaluate({zoom: tileZoom + 1}),\n zoomRange,\n sizeRange: {\n min: expression.evaluate({zoom: zoomRange.min}),\n max: expression.evaluate({zoom: zoomRange.max})\n },\n propertyValue: (value.value )\n };\n }\n }\n}\n\nfunction evaluateSizeForFeature(sizeData ,\n partiallyEvaluatedSize ,\n symbol ) {\n const part = partiallyEvaluatedSize;\n if (sizeData.functionType === 'source') {\n return symbol.lowerSize / 10;\n } else if (sizeData.functionType === 'composite') {\n return interpolate.number(symbol.lowerSize / 10, symbol.upperSize / 10, part.uSizeT);\n } else {\n return part.uSize;\n }\n}\n\nfunction evaluateSizeForZoom(sizeData , currentZoom , property ) {\n if (sizeData.functionType === 'constant') {\n return {\n uSizeT: 0,\n uSize: sizeData.layoutSize\n };\n } else if (sizeData.functionType === 'source') {\n return {\n uSizeT: 0,\n uSize: 0\n };\n } else if (sizeData.functionType === 'camera') {\n const {propertyValue, zoomRange, sizeRange} = sizeData;\n const expression = ((normalizePropertyExpression(propertyValue, property.specification) ) );\n\n // Even though we could get the exact value of the camera function\n // at z = tr.zoom, we intentionally do not: instead, we interpolate\n // between the camera function values at a pair of zoom stops covering\n // [tileZoom, tileZoom + 1] in order to be consistent with this\n // restriction on composite functions\n const t = util.clamp(\n expression.interpolationFactor(currentZoom, zoomRange.min, zoomRange.max),\n 0, 1);\n\n return {\n uSizeT: 0,\n uSize: sizeRange.min + t * (sizeRange.max - sizeRange.min)\n };\n } else {\n const {propertyValue, zoomRange} = sizeData;\n const expression = ((normalizePropertyExpression(propertyValue, property.specification) ) );\n\n return {\n uSizeT: util.clamp(expression.interpolationFactor(currentZoom, zoomRange.min, zoomRange.max), 0, 1),\n uSize: 0\n };\n }\n}\n","// \n\nconst rtlTextPlugin = require('../source/rtl_text_plugin');\n\n \n \n\nmodule.exports = function(text , layer , feature ) {\n const transform = layer.layout.get('text-transform').evaluate(feature);\n if (transform === 'uppercase') {\n text = text.toLocaleUpperCase();\n } else if (transform === 'lowercase') {\n text = text.toLocaleLowerCase();\n }\n\n if (rtlTextPlugin.applyArabicShaping) {\n text = rtlTextPlugin.applyArabicShaping(text);\n }\n\n return text;\n};\n","// \n\nconst DOM = require('../util/dom');\nconst Point = require('@mapbox/point-geometry');\n\n \n\nconst handlers = {\n scrollZoom: require('./handler/scroll_zoom'),\n boxZoom: require('./handler/box_zoom'),\n dragRotate: require('./handler/drag_rotate'),\n dragPan: require('./handler/drag_pan'),\n keyboard: require('./handler/keyboard'),\n doubleClickZoom: require('./handler/dblclick_zoom'),\n touchZoomRotate: require('./handler/touch_zoom_rotate')\n};\n\nmodule.exports = function bindHandlers(map , options ) {\n const el = map.getCanvasContainer();\n let contextMenuEvent = null;\n let mouseDown = false;\n let startPos = null;\n let tapped = null;\n\n for (const name in handlers) {\n (map )[name] = new handlers[name](map, options);\n if (options.interactive && options[name]) {\n (map )[name].enable(options[name]);\n }\n }\n\n el.addEventListener('mouseout', onMouseOut, false);\n el.addEventListener('mousedown', onMouseDown, false);\n el.addEventListener('mouseup', onMouseUp, false);\n el.addEventListener('mousemove', onMouseMove, false);\n el.addEventListener('touchstart', onTouchStart, false);\n el.addEventListener('touchend', onTouchEnd, false);\n el.addEventListener('touchmove', onTouchMove, false);\n el.addEventListener('touchcancel', onTouchCancel, false);\n el.addEventListener('click', onClick, false);\n el.addEventListener('dblclick', onDblClick, false);\n el.addEventListener('contextmenu', onContextMenu, false);\n\n function onMouseOut(e ) {\n fireMouseEvent('mouseout', e);\n }\n\n function onMouseDown(e ) {\n if (!map.doubleClickZoom.isActive()) {\n map.stop();\n }\n\n startPos = DOM.mousePos(el, e);\n fireMouseEvent('mousedown', e);\n\n mouseDown = true;\n }\n\n function onMouseUp(e ) {\n const rotating = map.dragRotate && map.dragRotate.isActive();\n\n if (contextMenuEvent && !rotating) {\n // This will be the case for Mac\n fireMouseEvent('contextmenu', contextMenuEvent);\n }\n\n contextMenuEvent = null;\n mouseDown = false;\n fireMouseEvent('mouseup', e);\n }\n\n function onMouseMove(e ) {\n if (map.dragPan && map.dragPan.isActive()) return;\n if (map.dragRotate && map.dragRotate.isActive()) return;\n\n let target = e.toElement || e.target;\n while (target && target !== el) target = target.parentNode;\n if (target !== el) return;\n\n fireMouseEvent('mousemove', e);\n }\n\n function onTouchStart(e ) {\n map.stop();\n fireTouchEvent('touchstart', e);\n\n if (!e.touches || e.touches.length > 1) return;\n\n if (!tapped) {\n tapped = setTimeout(onTouchTimeout, 300);\n\n } else {\n clearTimeout(tapped);\n tapped = null;\n fireMouseEvent('dblclick', e);\n }\n }\n\n function onTouchMove(e ) {\n fireTouchEvent('touchmove', e);\n }\n\n function onTouchEnd(e ) {\n fireTouchEvent('touchend', e);\n }\n\n function onTouchCancel(e ) {\n fireTouchEvent('touchcancel', e);\n }\n\n function onTouchTimeout() {\n tapped = null;\n }\n\n function onClick(e ) {\n const pos = DOM.mousePos(el, e);\n\n if (pos.equals((startPos ))) {\n fireMouseEvent('click', e);\n }\n }\n\n function onDblClick(e ) {\n fireMouseEvent('dblclick', e);\n e.preventDefault();\n }\n\n function onContextMenu(e ) {\n const rotating = map.dragRotate && map.dragRotate.isActive();\n if (!mouseDown && !rotating) {\n // Windows: contextmenu fired on mouseup, so fire event now\n fireMouseEvent('contextmenu', e);\n } else if (mouseDown) {\n // Mac: contextmenu fired on mousedown; we save it until mouseup for consistency's sake\n contextMenuEvent = e;\n }\n\n e.preventDefault();\n }\n\n function fireMouseEvent(type, e) {\n const pos = DOM.mousePos(el, e);\n\n return map.fire(type, {\n lngLat: map.unproject(pos),\n point: pos,\n originalEvent: e\n });\n }\n\n function fireTouchEvent(type, e) {\n const touches = DOM.touchPos(el, e);\n const singular = touches.reduce((prev, curr, i, arr) => {\n return prev.add(curr.div(arr.length));\n }, new Point(0, 0));\n\n return map.fire(type, {\n lngLat: map.unproject(singular),\n point: singular,\n lngLats: touches.map((t) => { return map.unproject(t); }, this),\n points: touches,\n originalEvent: e\n });\n }\n};\n","// \n\nconst util = require('../util/util');\nconst interpolate = require('../style-spec/util/interpolate').number;\nconst browser = require('../util/browser');\nconst LngLat = require('../geo/lng_lat');\nconst LngLatBounds = require('../geo/lng_lat_bounds');\nconst Point = require('@mapbox/point-geometry');\nconst Evented = require('../util/evented');\n\n \n \n \n\n/**\n * Options common to {@link Map#jumpTo}, {@link Map#easeTo}, and {@link Map#flyTo}, controlling the desired location,\n * zoom, bearing, and pitch of the camera. All properties are optional, and when a property is omitted, the current\n * camera value for that property will remain unchanged.\n *\n * @typedef {Object} CameraOptions\n * @property {LngLatLike} center The desired center.\n * @property {number} zoom The desired zoom level.\n * @property {number} bearing The desired bearing, in degrees. The bearing is the compass direction that\n * is \"up\"; for example, a bearing of 90° orients the map so that east is up.\n * @property {number} pitch The desired pitch, in degrees.\n * @property {LngLatLike} around If `zoom` is specified, `around` determines the point around which the zoom is centered.\n */\n \n \n \n \n \n \n \n\n/**\n * Options common to map movement methods that involve animation, such as {@link Map#panBy} and\n * {@link Map#easeTo}, controlling the duration and easing function of the animation. All properties\n * are optional.\n *\n * @typedef {Object} AnimationOptions\n * @property {number} duration The animation's duration, measured in milliseconds.\n * @property {Function} easing A function taking a time in the range 0..1 and returning a number where 0 is\n * the initial state and 1 is the final state.\n * @property {PointLike} offset of the target center relative to real map container center at the end of animation.\n * @property {boolean} animate If `false`, no animation will occur.\n */\n \n \n \n \n \n \n\n/**\n * Options for setting padding on a call to {@link Map#fitBounds}. All properties of this object must be\n * non-negative integers.\n *\n * @typedef {Object} PaddingOptions\n * @property {number} top Padding in pixels from the top of the map canvas.\n * @property {number} bottom Padding in pixels from the bottom of the map canvas.\n * @property {number} left Padding in pixels from the left of the map canvas.\n * @property {number} right Padding in pixels from the right of the map canvas.\n */\n\nclass Camera extends Evented {\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n constructor(transform , options ) {\n super();\n this.moving = false;\n this.transform = transform;\n this._bearingSnap = options.bearingSnap;\n }\n\n /**\n * Returns the map's geographical centerpoint.\n *\n * @memberof Map#\n * @returns The map's geographical centerpoint.\n */\n getCenter() { return this.transform.center; }\n\n /**\n * Sets the map's geographical centerpoint. Equivalent to `jumpTo({center: center})`.\n *\n * @memberof Map#\n * @param center The centerpoint to set.\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n * @example\n * map.setCenter([-74, 38]);\n * @see [Move symbol with the keyboard](https://www.mapbox.com/mapbox-gl-js/example/rotating-controllable-marker/)\n */\n setCenter(center , eventData ) {\n return this.jumpTo({center: center}, eventData);\n }\n\n /**\n * Pans the map by the specified offest.\n *\n * @memberof Map#\n * @param offset `x` and `y` coordinates by which to pan the map.\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n * @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)\n */\n panBy(offset , options , eventData ) {\n offset = Point.convert(offset).mult(-1);\n return this.panTo(this.transform.center, util.extend({offset}, options), eventData);\n }\n\n /**\n * Pans the map to the specified location, with an animated transition.\n *\n * @memberof Map#\n * @param lnglat The location to pan the map to.\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n */\n panTo(lnglat , options , eventData ) {\n return this.easeTo(util.extend({\n center: lnglat\n }, options), eventData);\n }\n\n /**\n * Returns the map's current zoom level.\n *\n * @memberof Map#\n * @returns The map's current zoom level.\n */\n getZoom() { return this.transform.zoom; }\n\n /**\n * Sets the map's zoom level. Equivalent to `jumpTo({zoom: zoom})`.\n *\n * @memberof Map#\n * @param zoom The zoom level to set (0-20).\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires move\n * @fires zoom\n * @fires moveend\n * @fires zoomend\n * @returns {Map} `this`\n * @example\n * // zoom the map to 5\n * map.setZoom(5);\n */\n setZoom(zoom , eventData ) {\n this.jumpTo({zoom: zoom}, eventData);\n return this;\n }\n\n /**\n * Zooms the map to the specified zoom level, with an animated transition.\n *\n * @memberof Map#\n * @param zoom The zoom level to transition to.\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires move\n * @fires zoom\n * @fires moveend\n * @fires zoomend\n * @returns {Map} `this`\n */\n zoomTo(zoom , options , eventData ) {\n return this.easeTo(util.extend({\n zoom: zoom\n }, options), eventData);\n }\n\n /**\n * Increases the map's zoom level by 1.\n *\n * @memberof Map#\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires move\n * @fires zoom\n * @fires moveend\n * @fires zoomend\n * @returns {Map} `this`\n */\n zoomIn(options , eventData ) {\n this.zoomTo(this.getZoom() + 1, options, eventData);\n return this;\n }\n\n /**\n * Decreases the map's zoom level by 1.\n *\n * @memberof Map#\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires move\n * @fires zoom\n * @fires moveend\n * @fires zoomend\n * @returns {Map} `this`\n */\n zoomOut(options , eventData ) {\n this.zoomTo(this.getZoom() - 1, options, eventData);\n return this;\n }\n\n /**\n * Returns the map's current bearing. The bearing is the compass direction that is \\\"up\\\"; for example, a bearing\n * of 90° orients the map so that east is up.\n *\n * @memberof Map#\n * @returns The map's current bearing.\n * @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)\n */\n getBearing() { return this.transform.bearing; }\n\n /**\n * Sets the map's bearing (rotation). The bearing is the compass direction that is \\\"up\\\"; for example, a bearing\n * of 90° orients the map so that east is up.\n *\n * Equivalent to `jumpTo({bearing: bearing})`.\n *\n * @memberof Map#\n * @param bearing The desired bearing.\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n * @example\n * // rotate the map to 90 degrees\n * map.setBearing(90);\n */\n setBearing(bearing , eventData ) {\n this.jumpTo({bearing: bearing}, eventData);\n return this;\n }\n\n /**\n * Rotates the map to the specified bearing, with an animated transition. The bearing is the compass direction\n * that is \\\"up\\\"; for example, a bearing of 90° orients the map so that east is up.\n *\n * @memberof Map#\n * @param bearing The desired bearing.\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n */\n rotateTo(bearing , options , eventData ) {\n return this.easeTo(util.extend({\n bearing: bearing\n }, options), eventData);\n }\n\n /**\n * Rotates the map so that north is up (0° bearing), with an animated transition.\n *\n * @memberof Map#\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n */\n resetNorth(options , eventData ) {\n this.rotateTo(0, util.extend({duration: 1000}, options), eventData);\n return this;\n }\n\n /**\n * Snaps the map so that north is up (0° bearing), if the current bearing is close enough to it (i.e. within the\n * `bearingSnap` threshold).\n *\n * @memberof Map#\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n */\n snapToNorth(options , eventData ) {\n if (Math.abs(this.getBearing()) < this._bearingSnap) {\n return this.resetNorth(options, eventData);\n }\n return this;\n }\n\n /**\n * Returns the map's current pitch (tilt).\n *\n * @memberof Map#\n * @returns The map's current pitch, measured in degrees away from the plane of the screen.\n */\n getPitch() { return this.transform.pitch; }\n\n /**\n * Sets the map's pitch (tilt). Equivalent to `jumpTo({pitch: pitch})`.\n *\n * @memberof Map#\n * @param pitch The pitch to set, measured in degrees away from the plane of the screen (0-60).\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires pitchstart\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n */\n setPitch(pitch , eventData ) {\n this.jumpTo({pitch: pitch}, eventData);\n return this;\n }\n\n\n /**\n * Pans and zooms the map to contain its visible area within the specified geographical bounds.\n * This function will also reset the map's bearing to 0 if bearing is nonzero.\n *\n * @memberof Map#\n * @param bounds Center these bounds in the viewport and use the highest\n * zoom level up to and including `Map#getMaxZoom()` that fits them in the viewport.\n * @param options\n * @param {number | PaddingOptions} [options.padding] The amount of padding in pixels to add to the given bounds.\n * @param {boolean} [options.linear=false] If `true`, the map transitions using\n * {@link Map#easeTo}. If `false`, the map transitions using {@link Map#flyTo}. See\n * those functions and {@link AnimationOptions} for information about options available.\n * @param {Function} [options.easing] An easing function for the animated transition. See {@link AnimationOptions}.\n * @param {PointLike} [options.offset=[0, 0]] The center of the given bounds relative to the map's center, measured in pixels.\n * @param {number} [options.maxZoom] The maximum zoom level to allow when the map view transitions to the specified bounds.\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires moveend\n * @returns {Map} `this`\n\t * @example\n * var bbox = [[-79, 43], [-73, 45]];\n * map.fitBounds(bbox, {\n * padding: {top: 10, bottom:25, left: 15, right: 5}\n * });\n * @see [Fit a map to a bounding box](https://www.mapbox.com/mapbox-gl-js/example/fitbounds/)\n */\n fitBounds(bounds , options , eventData ) {\n\n options = util.extend({\n padding: {\n top: 0,\n bottom: 0,\n right: 0,\n left: 0\n },\n offset: [0, 0],\n maxZoom: this.transform.maxZoom\n }, options);\n\n if (typeof options.padding === 'number') {\n const p = options.padding;\n options.padding = {\n top: p,\n bottom: p,\n right: p,\n left: p\n };\n }\n if (!util.deepEqual(Object.keys(options.padding).sort((a, b) => {\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n }), [\"bottom\", \"left\", \"right\", \"top\"])) {\n util.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\");\n return this;\n }\n\n bounds = LngLatBounds.convert(bounds);\n\n // we separate the passed padding option into two parts, the part that does not affect the map's center\n // (lateral and vertical padding), and the part that does (paddingOffset). We add the padding offset\n // to the options `offset` object where it can alter the map's center in the subsequent calls to\n // `easeTo` and `flyTo`.\n const paddingOffset = [(options.padding.left - options.padding.right) / 2, (options.padding.top - options.padding.bottom) / 2],\n lateralPadding = Math.min(options.padding.right, options.padding.left),\n verticalPadding = Math.min(options.padding.top, options.padding.bottom);\n options.offset = [options.offset[0] + paddingOffset[0], options.offset[1] + paddingOffset[1]];\n\n const offset = Point.convert(options.offset),\n tr = this.transform,\n nw = tr.project(bounds.getNorthWest()),\n se = tr.project(bounds.getSouthEast()),\n size = se.sub(nw),\n scaleX = (tr.width - lateralPadding * 2 - Math.abs(offset.x) * 2) / size.x,\n scaleY = (tr.height - verticalPadding * 2 - Math.abs(offset.y) * 2) / size.y;\n\n if (scaleY < 0 || scaleX < 0) {\n util.warnOnce('Map cannot fit within canvas with the given bounds, padding, and/or offset.');\n return this;\n }\n\n options.center = tr.unproject(nw.add(se).div(2));\n options.zoom = Math.min(tr.scaleZoom(tr.scale * Math.min(scaleX, scaleY)), options.maxZoom);\n options.bearing = 0;\n\n return options.linear ?\n this.easeTo(options, eventData) :\n this.flyTo(options, eventData);\n }\n\n /**\n * Changes any combination of center, zoom, bearing, and pitch, without\n * an animated transition. The map will retain its current values for any\n * details not specified in `options`.\n *\n * @memberof Map#\n * @param options\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires pitchstart\n * @fires rotate\n * @fires move\n * @fires zoom\n * @fires pitch\n * @fires moveend\n * @fires zoomend\n * @fires pitchend\n * @returns {Map} `this`\n */\n jumpTo(options , eventData ) {\n this.stop();\n\n const tr = this.transform;\n let zoomChanged = false,\n bearingChanged = false,\n pitchChanged = false;\n\n if ('zoom' in options && tr.zoom !== +options.zoom) {\n zoomChanged = true;\n tr.zoom = +options.zoom;\n }\n\n if (options.center !== undefined) {\n tr.center = LngLat.convert(options.center);\n }\n\n if ('bearing' in options && tr.bearing !== +options.bearing) {\n bearingChanged = true;\n tr.bearing = +options.bearing;\n }\n\n if ('pitch' in options && tr.pitch !== +options.pitch) {\n pitchChanged = true;\n tr.pitch = +options.pitch;\n }\n\n this.fire('movestart', eventData)\n .fire('move', eventData);\n\n if (zoomChanged) {\n this.fire('zoomstart', eventData)\n .fire('zoom', eventData)\n .fire('zoomend', eventData);\n }\n\n if (bearingChanged) {\n this.fire('rotate', eventData);\n }\n\n if (pitchChanged) {\n this.fire('pitchstart', eventData)\n .fire('pitch', eventData)\n .fire('pitchend', eventData);\n }\n\n return this.fire('moveend', eventData);\n }\n\n /**\n * Changes any combination of center, zoom, bearing, and pitch, with an animated transition\n * between old and new values. The map will retain its current values for any\n * details not specified in `options`.\n *\n * @memberof Map#\n * @param options Options describing the destination and animation of the transition.\n * Accepts {@link CameraOptions} and {@link AnimationOptions}.\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires pitchstart\n * @fires rotate\n * @fires move\n * @fires zoom\n * @fires pitch\n * @fires moveend\n * @fires zoomend\n * @fires pitchend\n * @returns {Map} `this`\n * @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)\n */\n easeTo(options , eventData ) {\n this.stop();\n\n options = util.extend({\n offset: [0, 0],\n duration: 500,\n easing: util.ease\n }, options);\n\n if (options.animate === false) options.duration = 0;\n\n if (options.smoothEasing && options.duration !== 0) {\n options.easing = this._smoothOutEasing(options.duration);\n }\n\n const tr = this.transform,\n startZoom = this.getZoom(),\n startBearing = this.getBearing(),\n startPitch = this.getPitch(),\n\n zoom = 'zoom' in options ? +options.zoom : startZoom,\n bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing,\n pitch = 'pitch' in options ? +options.pitch : startPitch;\n\n const pointAtOffset = tr.centerPoint.add(Point.convert(options.offset));\n const locationAtOffset = tr.pointLocation(pointAtOffset);\n const center = LngLat.convert(options.center || locationAtOffset);\n this._normalizeCenter(center);\n\n const from = tr.project(locationAtOffset);\n const delta = tr.project(center).sub(from);\n const finalScale = tr.zoomScale(zoom - startZoom);\n\n let around, aroundPoint;\n\n if (options.around) {\n around = LngLat.convert(options.around);\n aroundPoint = tr.locationPoint(around);\n }\n\n this.zooming = (zoom !== startZoom);\n this.rotating = (startBearing !== bearing);\n this.pitching = (pitch !== startPitch);\n\n this._prepareEase(eventData, options.noMoveStart);\n\n clearTimeout(this._onEaseEnd);\n\n this._ease((k) => {\n if (this.zooming) {\n tr.zoom = interpolate(startZoom, zoom, k);\n }\n if (this.rotating) {\n tr.bearing = interpolate(startBearing, bearing, k);\n }\n if (this.pitching) {\n tr.pitch = interpolate(startPitch, pitch, k);\n }\n\n if (around) {\n tr.setLocationAtPoint(around, aroundPoint);\n } else {\n const scale = tr.zoomScale(tr.zoom - startZoom);\n const base = zoom > startZoom ?\n Math.min(2, finalScale) :\n Math.max(0.5, finalScale);\n const speedup = Math.pow(base, 1 - k);\n const newCenter = tr.unproject(from.add(delta.mult(k * speedup)).mult(scale));\n tr.setLocationAtPoint(tr.renderWorldCopies ? newCenter.wrap() : newCenter, pointAtOffset);\n }\n\n this._fireMoveEvents(eventData);\n\n }, () => {\n if (options.delayEndEvents) {\n this._onEaseEnd = setTimeout(() => this._easeToEnd(eventData), options.delayEndEvents);\n } else {\n this._easeToEnd(eventData);\n }\n }, options);\n\n return this;\n }\n\n _prepareEase(eventData , noMoveStart ) {\n this.moving = true;\n\n if (!noMoveStart) {\n this.fire('movestart', eventData);\n }\n if (this.zooming) {\n this.fire('zoomstart', eventData);\n }\n if (this.pitching) {\n this.fire('pitchstart', eventData);\n }\n }\n\n _fireMoveEvents(eventData ) {\n this.fire('move', eventData);\n if (this.zooming) {\n this.fire('zoom', eventData);\n }\n if (this.rotating) {\n this.fire('rotate', eventData);\n }\n if (this.pitching) {\n this.fire('pitch', eventData);\n }\n }\n\n _easeToEnd(eventData ) {\n const wasZooming = this.zooming;\n const wasPitching = this.pitching;\n this.moving = false;\n this.zooming = false;\n this.rotating = false;\n this.pitching = false;\n\n if (wasZooming) {\n this.fire('zoomend', eventData);\n }\n if (wasPitching) {\n this.fire('pitchend', eventData);\n }\n this.fire('moveend', eventData);\n }\n\n /**\n * Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that\n * evokes flight. The animation seamlessly incorporates zooming and panning to help\n * the user maintain her bearings even after traversing a great distance.\n *\n * @memberof Map#\n * @param {Object} options Options describing the destination and animation of the transition.\n * Accepts {@link CameraOptions}, {@link AnimationOptions},\n * and the following additional options.\n * @param {number} [options.curve=1.42] The zooming \"curve\" that will occur along the\n * flight path. A high value maximizes zooming for an exaggerated animation, while a low\n * value minimizes zooming for an effect closer to {@link Map#easeTo}. 1.42 is the average\n * value selected by participants in the user study discussed in\n * [van Wijk (2003)](https://www.win.tue.nl/~vanwijk/zoompan.pdf). A value of\n * `Math.pow(6, 0.25)` would be equivalent to the root mean squared average velocity. A\n * value of 1 would produce a circular motion.\n * @param {number} [options.minZoom] The zero-based zoom level at the peak of the flight path. If\n * `options.curve` is specified, this option is ignored.\n * @param {number} [options.speed=1.2] The average speed of the animation defined in relation to\n * `options.curve`. A speed of 1.2 means that the map appears to move along the flight path\n * by 1.2 times `options.curve` screenfuls every second. A _screenful_ is the map's visible span.\n * It does not correspond to a fixed physical distance, but varies by zoom level.\n * @param {number} [options.screenSpeed] The average speed of the animation measured in screenfuls\n * per second, assuming a linear timing curve. If `options.speed` is specified, this option is ignored.\n * @param {number} [options.maxDuration] The animation's maximum duration, measured in milliseconds.\n * If duration exceeds maximum duration, it resets to 0.\n * @param eventData Additional properties to be added to event objects of events triggered by this method.\n * @fires movestart\n * @fires zoomstart\n * @fires pitchstart\n * @fires move\n * @fires zoom\n * @fires rotate\n * @fires pitch\n * @fires moveend\n * @fires zoomend\n * @fires pitchend\n * @returns {Map} `this`\n * @example\n * // fly with default options to null island\n * map.flyTo({center: [0, 0], zoom: 9});\n * // using flyTo options\n * map.flyTo({\n * center: [0, 0],\n * zoom: 9,\n * speed: 0.2,\n * curve: 1,\n * easing(t) {\n * return t;\n * }\n * });\n * @see [Fly to a location](https://www.mapbox.com/mapbox-gl-js/example/flyto/)\n * @see [Slowly fly to a location](https://www.mapbox.com/mapbox-gl-js/example/flyto-options/)\n * @see [Fly to a location based on scroll position](https://www.mapbox.com/mapbox-gl-js/example/scroll-fly-to/)\n */\n flyTo(options, eventData ) {\n // This method implements an “optimal path” animation, as detailed in:\n //\n // Van Wijk, Jarke J.; Nuij, Wim A. A. “Smooth and efficient zooming and panning.” INFOVIS\n // 03. pp. 1522. <https://www.win.tue.nl/~vanwijk/zoompan.pdf#page=5>.\n //\n // Where applicable, local variable documentation begins with the associated variable or\n // function in van Wijk (2003).\n\n this.stop();\n\n options = util.extend({\n offset: [0, 0],\n speed: 1.2,\n curve: 1.42,\n easing: util.ease\n }, options);\n\n const tr = this.transform,\n startZoom = this.getZoom(),\n startBearing = this.getBearing(),\n startPitch = this.getPitch();\n\n const zoom = 'zoom' in options ? util.clamp(+options.zoom, tr.minZoom, tr.maxZoom) : startZoom;\n const bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing;\n const pitch = 'pitch' in options ? +options.pitch : startPitch;\n\n const scale = tr.zoomScale(zoom - startZoom);\n const pointAtOffset = tr.centerPoint.add(Point.convert(options.offset));\n const locationAtOffset = tr.pointLocation(pointAtOffset);\n const center = LngLat.convert(options.center || locationAtOffset);\n this._normalizeCenter(center);\n\n const from = tr.project(locationAtOffset);\n const delta = tr.project(center).sub(from);\n\n let rho = options.curve;\n\n // w₀: Initial visible span, measured in pixels at the initial scale.\n const w0 = Math.max(tr.width, tr.height),\n // w₁: Final visible span, measured in pixels with respect to the initial scale.\n w1 = w0 / scale,\n // Length of the flight path as projected onto the ground plane, measured in pixels from\n // the world image origin at the initial scale.\n u1 = delta.mag();\n\n if ('minZoom' in options) {\n const minZoom = util.clamp(Math.min(options.minZoom, startZoom, zoom), tr.minZoom, tr.maxZoom);\n // w<sub>m</sub>: Maximum visible span, measured in pixels with respect to the initial\n // scale.\n const wMax = w0 / tr.zoomScale(minZoom - startZoom);\n rho = Math.sqrt(wMax / u1 * 2);\n }\n\n // ρ²\n const rho2 = rho * rho;\n\n /**\n * rᵢ: Returns the zoom-out factor at one end of the animation.\n *\n * @param i 0 for the ascent or 1 for the descent.\n * @private\n */\n function r(i) {\n const b = (w1 * w1 - w0 * w0 + (i ? -1 : 1) * rho2 * rho2 * u1 * u1) / (2 * (i ? w1 : w0) * rho2 * u1);\n return Math.log(Math.sqrt(b * b + 1) - b);\n }\n\n function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\n function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\n function tanh(n) { return sinh(n) / cosh(n); }\n\n // r₀: Zoom-out factor during ascent.\n const r0 = r(0);\n\n // w(s): Returns the visible span on the ground, measured in pixels with respect to the\n // initial scale. Assumes an angular field of view of 2 arctan ½ ≈ 53°.\n let w = function (s) {\n return (cosh(r0) / cosh(r0 + rho * s));\n };\n\n // u(s): Returns the distance along the flight path as projected onto the ground plane,\n // measured in pixels from the world image origin at the initial scale.\n let u = function (s) {\n return w0 * ((cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2) / u1;\n };\n\n // S: Total length of the flight path, measured in ρ-screenfuls.\n let S = (r(1) - r0) / rho;\n\n // When u₀ = u₁, the optimal path doesnt require both ascent and descent.\n if (Math.abs(u1) < 0.000001 || !isFinite(S)) {\n // Perform a more or less instantaneous transition if the path is too short.\n if (Math.abs(w0 - w1) < 0.000001) return this.easeTo(options, eventData);\n\n const k = w1 < w0 ? -1 : 1;\n S = Math.abs(Math.log(w1 / w0)) / rho;\n\n u = function() { return 0; };\n w = function(s) { return Math.exp(k * rho * s); };\n }\n\n if ('duration' in options) {\n options.duration = +options.duration;\n } else {\n const V = 'screenSpeed' in options ? +options.screenSpeed / rho : +options.speed;\n options.duration = 1000 * S / V;\n }\n\n if (options.maxDuration && options.duration > options.maxDuration) {\n options.duration = 0;\n }\n\n this.zooming = true;\n this.rotating = (startBearing !== bearing);\n this.pitching = (pitch !== startPitch);\n\n this._prepareEase(eventData, false);\n\n this._ease((k) => {\n // s: The distance traveled along the flight path, measured in ρ-screenfuls.\n const s = k * S;\n const scale = 1 / w(s);\n tr.zoom = startZoom + tr.scaleZoom(scale);\n\n if (this.rotating) {\n tr.bearing = interpolate(startBearing, bearing, k);\n }\n if (this.pitching) {\n tr.pitch = interpolate(startPitch, pitch, k);\n }\n\n const newCenter = tr.unproject(from.add(delta.mult(u(s))).mult(scale));\n tr.setLocationAtPoint(tr.renderWorldCopies ? newCenter.wrap() : newCenter, pointAtOffset);\n\n this._fireMoveEvents(eventData);\n\n }, () => this._easeToEnd(eventData), options);\n\n return this;\n }\n\n isEasing() {\n return !!this._easeFn;\n }\n\n /**\n * Returns a Boolean indicating whether the camera is moving.\n *\n * @memberof Map#\n * @returns A Boolean indicating whether the camera is moving.\n */\n isMoving() {\n return this.moving;\n }\n\n /**\n * Stops any animated transition underway.\n *\n * @memberof Map#\n * @returns {Map} `this`\n */\n stop() {\n if (this._easeFn) {\n this._finishEase();\n }\n return this;\n }\n\n _ease(frame ,\n finish ,\n options ) {\n if (options.animate === false || options.duration === 0) {\n frame(1);\n finish();\n } else {\n this._easeStart = browser.now();\n this._easeFn = frame;\n this._finishFn = finish;\n this._easeOptions = options;\n this._update();\n }\n }\n\n _updateEase() {\n const t = Math.min((browser.now() - this._easeStart) / this._easeOptions.duration, 1);\n this._easeFn(this._easeOptions.easing(t));\n if (t === 1) {\n this._finishEase();\n }\n }\n\n _finishEase() {\n delete this._easeFn;\n // The finish function might emit events which trigger new eases, which\n // set a new _finishFn. Ensure we don't delete it unintentionally.\n const finish = this._finishFn;\n delete this._finishFn;\n finish.call(this);\n }\n\n // convert bearing so that it's numerically close to the current one so that it interpolates properly\n _normalizeBearing(bearing , currentBearing ) {\n bearing = util.wrap(bearing, -180, 180);\n const diff = Math.abs(bearing - currentBearing);\n if (Math.abs(bearing - 360 - currentBearing) < diff) bearing -= 360;\n if (Math.abs(bearing + 360 - currentBearing) < diff) bearing += 360;\n return bearing;\n }\n\n // If a path crossing the antimeridian would be shorter, extend the final coordinate so that\n // interpolating between the two endpoints will cross it.\n _normalizeCenter(center ) {\n const tr = this.transform;\n if (!tr.renderWorldCopies || tr.lngRange) return;\n\n const delta = center.lng - tr.center.lng;\n center.lng +=\n delta > 180 ? -360 :\n delta < -180 ? 360 : 0;\n }\n\n // only used on mouse-wheel zoom to smooth out animation\n _smoothOutEasing(duration ) {\n let easing = util.ease;\n\n if (this._prevEase) {\n const ease = this._prevEase,\n t = (browser.now() - ease.start) / ease.duration,\n speed = ease.easing(t + 0.01) - ease.easing(t),\n\n // Quick hack to make new bezier that is continuous with last\n x = 0.27 / Math.sqrt(speed * speed + 0.0001) * 0.01,\n y = Math.sqrt(0.27 * 0.27 - x * x);\n\n easing = util.bezier(x, y, 0.25, 1);\n }\n\n this._prevEase = {\n start: (new Date()).getTime(),\n duration: duration,\n easing: easing\n };\n\n return easing;\n }\n}\n\nmodule.exports = Camera;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst config = require('../../util/config');\n\n \n\n/**\n * An `AttributionControl` control presents the map's [attribution information](https://www.mapbox.com/help/attribution/).\n *\n * @implements {IControl}\n * @param {Object} [options]\n * @param {boolean} [options.compact] If `true` force a compact attribution that shows the full attribution on mouse hover, or if `false` force the full attribution control. The default is a responsive attribution that collapses when the map is less than 640 pixels wide.\n * @example\n * var map = new mapboxgl.Map({attributionControl: false})\n * .addControl(new mapboxgl.AttributionControl({\n * compact: true\n * }));\n */\nclass AttributionControl {\n \n \n \n \n \n \n\n constructor(options ) {\n this.options = options;\n\n util.bindAll([\n '_updateEditLink',\n '_updateData',\n '_updateCompact'\n ], this);\n }\n\n getDefaultPosition() {\n return 'bottom-right';\n }\n\n onAdd(map ) {\n const compact = this.options && this.options.compact;\n\n this._map = map;\n this._container = DOM.create('div', 'mapboxgl-ctrl mapboxgl-ctrl-attrib');\n\n if (compact) {\n this._container.classList.add('mapboxgl-compact');\n }\n\n this._updateAttributions();\n this._updateEditLink();\n\n this._map.on('sourcedata', this._updateData);\n this._map.on('moveend', this._updateEditLink);\n\n if (compact === undefined) {\n this._map.on('resize', this._updateCompact);\n this._updateCompact();\n }\n\n return this._container;\n }\n\n onRemove() {\n DOM.remove(this._container);\n\n this._map.off('sourcedata', this._updateData);\n this._map.off('moveend', this._updateEditLink);\n this._map.off('resize', this._updateCompact);\n\n this._map = (undefined );\n }\n\n _updateEditLink() {\n let editLink = this._editLink;\n if (!editLink) {\n editLink = this._editLink = (this._container.querySelector('.mapbox-improve-map') );\n }\n\n const params = [\n {key: \"owner\", value: this.styleOwner},\n {key: \"id\", value: this.styleId},\n {key: \"access_token\", value: config.ACCESS_TOKEN}\n ];\n\n if (editLink) {\n const paramString = params.reduce((acc, next, i) => {\n if (next.value) {\n acc += `${next.key}=${next.value}${i < params.length - 1 ? '&' : ''}`;\n }\n return acc;\n }, `?`);\n editLink.href = `https://www.mapbox.com/feedback/${paramString}${this._map._hash ? this._map._hash.getHashString(true) : ''}`;\n }\n }\n\n _updateData(e ) {\n if (e && e.sourceDataType === 'metadata') {\n this._updateAttributions();\n this._updateEditLink();\n }\n }\n\n _updateAttributions() {\n if (!this._map.style) return;\n let attributions = [];\n\n if (this._map.style.stylesheet) {\n const stylesheet = this._map.style.stylesheet;\n this.styleOwner = stylesheet.owner;\n this.styleId = stylesheet.id;\n }\n\n const sourceCaches = this._map.style.sourceCaches;\n for (const id in sourceCaches) {\n const source = sourceCaches[id].getSource();\n if (source.attribution && attributions.indexOf(source.attribution) < 0) {\n attributions.push(source.attribution);\n }\n }\n\n // remove any entries that are substrings of another entry.\n // first sort by length so that substrings come first\n attributions.sort((a, b) => a.length - b.length);\n attributions = attributions.filter((attrib, i) => {\n for (let j = i + 1; j < attributions.length; j++) {\n if (attributions[j].indexOf(attrib) >= 0) { return false; }\n }\n return true;\n });\n this._container.innerHTML = attributions.join(' | ');\n // remove old DOM node from _editLink\n this._editLink = null;\n }\n\n _updateCompact() {\n if (this._map.getCanvasContainer().offsetWidth <= 640) {\n this._container.classList.add('mapboxgl-compact');\n } else {\n this._container.classList.remove('mapboxgl-compact');\n }\n }\n\n}\n\nmodule.exports = AttributionControl;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst window = require('../../util/window');\n\n \n\n/**\n * A `FullscreenControl` control contains a button for toggling the map in and out of fullscreen mode.\n *\n * @implements {IControl}\n * @example\n * map.addControl(new mapboxgl.FullscreenControl());\n * @see [View a fullscreen map](https://www.mapbox.com/mapbox-gl-js/example/fullscreen/)\n */\n\nclass FullscreenControl {\n \n \n \n \n \n \n \n\n constructor() {\n this._fullscreen = false;\n util.bindAll([\n '_onClickFullscreen',\n '_changeIcon'\n ], this);\n if ('onfullscreenchange' in window.document) {\n this._fullscreenchange = 'fullscreenchange';\n } else if ('onmozfullscreenchange' in window.document) {\n this._fullscreenchange = 'mozfullscreenchange';\n } else if ('onwebkitfullscreenchange' in window.document) {\n this._fullscreenchange = 'webkitfullscreenchange';\n } else if ('onmsfullscreenchange' in window.document) {\n this._fullscreenchange = 'MSFullscreenChange';\n }\n this._className = 'mapboxgl-ctrl';\n }\n\n onAdd(map ) {\n this._map = map;\n this._mapContainer = this._map.getContainer();\n this._container = DOM.create('div', `${this._className} mapboxgl-ctrl-group`);\n if (this._checkFullscreenSupport()) {\n this._setupUI();\n } else {\n this._container.style.display = 'none';\n util.warnOnce('This device does not support fullscreen mode.');\n }\n return this._container;\n }\n\n onRemove() {\n DOM.remove(this._container);\n this._map = (null );\n window.document.removeEventListener(this._fullscreenchange, this._changeIcon);\n }\n\n _checkFullscreenSupport() {\n return !!(\n window.document.fullscreenEnabled ||\n (window.document ).mozFullScreenEnabled ||\n (window.document ).msFullscreenEnabled ||\n (window.document ).webkitFullscreenEnabled\n );\n }\n\n _setupUI() {\n const button = this._fullscreenButton = DOM.create('button', (`${this._className}-icon ${this._className}-fullscreen`), this._container);\n button.setAttribute(\"aria-label\", \"Toggle fullscreen\");\n button.type = 'button';\n this._fullscreenButton.addEventListener('click', this._onClickFullscreen);\n window.document.addEventListener(this._fullscreenchange, this._changeIcon);\n }\n\n _isFullscreen() {\n return this._fullscreen;\n }\n\n _changeIcon() {\n const fullscreenElement =\n window.document.fullscreenElement ||\n (window.document ).mozFullScreenElement ||\n (window.document ).webkitFullscreenElement ||\n (window.document ).msFullscreenElement;\n\n if ((fullscreenElement === this._mapContainer) !== this._fullscreen) {\n this._fullscreen = !this._fullscreen;\n this._fullscreenButton.classList.toggle(`${this._className}-shrink`);\n this._fullscreenButton.classList.toggle(`${this._className}-fullscreen`);\n }\n }\n\n _onClickFullscreen() {\n if (this._isFullscreen()) {\n if (window.document.exitFullscreen) {\n (window.document ).exitFullscreen();\n } else if (window.document.mozCancelFullScreen) {\n (window.document ).mozCancelFullScreen();\n } else if (window.document.msExitFullscreen) {\n (window.document ).msExitFullscreen();\n } else if (window.document.webkitCancelFullScreen) {\n (window.document ).webkitCancelFullScreen();\n }\n } else if (this._mapContainer.requestFullscreen) {\n this._mapContainer.requestFullscreen();\n } else if (this._mapContainer.mozRequestFullScreen) {\n (this._mapContainer ).mozRequestFullScreen();\n } else if (this._mapContainer.msRequestFullscreen) {\n (this._mapContainer ).msRequestFullscreen();\n } else if (this._mapContainer.webkitRequestFullscreen) {\n (this._mapContainer ).webkitRequestFullscreen();\n }\n }\n}\n\nmodule.exports = FullscreenControl;\n","// \n\nconst Evented = require('../../util/evented');\nconst DOM = require('../../util/dom');\nconst window = require('../../util/window');\nconst util = require('../../util/util');\nconst assert = require('assert');\nconst LngLat = require('../../geo/lng_lat');\nconst Marker = require('../marker');\n\n \n\nconst defaultOptions = {\n positionOptions: {\n enableHighAccuracy: false,\n timeout: 6000 /* 6 sec */\n },\n fitBoundsOptions: {\n maxZoom: 15\n },\n trackUserLocation: false,\n showUserLocation: true\n};\nconst className = 'mapboxgl-ctrl';\n\nlet supportsGeolocation;\n\nfunction checkGeolocationSupport(callback) {\n if (supportsGeolocation !== undefined) {\n callback(supportsGeolocation);\n\n } else if (window.navigator.permissions !== undefined) {\n // navigator.permissions has incomplete browser support\n // http://caniuse.com/#feat=permissions-api\n // Test for the case where a browser disables Geolocation because of an\n // insecure origin\n window.navigator.permissions.query({ name: 'geolocation' }).then((p) => {\n supportsGeolocation = p.state !== 'denied';\n callback(supportsGeolocation);\n });\n\n } else {\n supportsGeolocation = !!window.navigator.geolocation;\n callback(supportsGeolocation);\n }\n}\n\n/**\n * A `GeolocateControl` control provides a button that uses the browser's geolocation\n * API to locate the user on the map.\n *\n * Not all browsers support geolocation,\n * and some users may disable the feature. Geolocation support for modern\n * browsers including Chrome requires sites to be served over HTTPS. If\n * geolocation support is not available, the GeolocateControl will not\n * be visible.\n *\n * The zoom level applied will depend on the accuracy of the geolocation provided by the device.\n *\n * The GeolocateControl has two modes. If `trackUserLocation` is `false` (default) the control acts as a button, which when pressed will set the map's camera to target the user location. If the user moves, the map won't update. This is most suited for the desktop. If `trackUserLocation` is `true` the control acts as a toggle button that when active the user's location is actively monitored for changes. In this mode the GeolocateControl has three states:\n * * active - the map's camera automatically updates as the user's location changes, keeping the location dot in the center.\n * * passive - the user's location dot automatically updates, but the map's camera does not.\n * * disabled\n *\n * @implements {IControl}\n * @param {Object} [options]\n * @param {Object} [options.positionOptions={enableHighAccuracy: false, timeout: 6000}] A Geolocation API [PositionOptions](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions) object.\n * @param {Object} [options.fitBoundsOptions={maxZoom: 15}] A [`fitBounds`](#Map#fitBounds) options object to use when the map is panned and zoomed to the user's location. The default is to use a `maxZoom` of 15 to limit how far the map will zoom in for very accurate locations.\n * @param {Object} [options.trackUserLocation=false] If `true` the Geolocate Control becomes a toggle button and when active the map will receive updates to the user's location as it changes.\n * @param {Object} [options.showUserLocation=true] By default a dot will be shown on the map at the user's location. Set to `false` to disable.\n *\n * @example\n * map.addControl(new mapboxgl.GeolocateControl({\n * positionOptions: {\n * enableHighAccuracy: true\n * },\n * trackUserLocation: true\n * }));\n */\nclass GeolocateControl extends Evented {\n \n \n \n \n \n \n \n \n \n \n\n constructor(options ) {\n super();\n this.options = util.extend({}, defaultOptions, options);\n\n util.bindAll([\n '_onSuccess',\n '_onError',\n '_finish',\n '_setupUI',\n '_updateCamera',\n '_updateMarker',\n '_onClickGeolocate'\n ], this);\n }\n\n onAdd(map ) {\n this._map = map;\n this._container = DOM.create('div', `${className} ${className}-group`);\n checkGeolocationSupport(this._setupUI);\n return this._container;\n }\n\n onRemove() {\n // clear the geolocation watch if exists\n if (this._geolocationWatchID !== undefined) {\n window.navigator.geolocation.clearWatch(this._geolocationWatchID);\n this._geolocationWatchID = (undefined );\n }\n\n // clear the marker from the map\n if (this.options.showUserLocation) {\n this._userLocationDotMarker.remove();\n }\n\n DOM.remove(this._container);\n this._map = (undefined );\n }\n\n _onSuccess(position ) {\n if (this.options.trackUserLocation) {\n // keep a record of the position so that if the state is BACKGROUND and the user\n // clicks the button, we can move to ACTIVE_LOCK immediately without waiting for\n // watchPosition to trigger _onSuccess\n this._lastKnownPosition = position;\n\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n case 'ACTIVE_LOCK':\n case 'ACTIVE_ERROR':\n this._watchState = 'ACTIVE_LOCK';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active');\n break;\n case 'BACKGROUND':\n case 'BACKGROUND_ERROR':\n this._watchState = 'BACKGROUND';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background-error');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-background');\n break;\n default:\n assert(false, `Unexpected watchState ${this._watchState}`);\n }\n }\n\n // if showUserLocation and the watch state isn't off then update the marker location\n if (this.options.showUserLocation && this._watchState !== 'OFF') {\n this._updateMarker(position);\n }\n\n // if in normal mode (not watch mode), or if in watch mode and the state is active watch\n // then update the camera\n if (!this.options.trackUserLocation || this._watchState === 'ACTIVE_LOCK') {\n this._updateCamera(position);\n }\n\n if (this.options.showUserLocation) {\n this._dotElement.classList.remove('mapboxgl-user-location-dot-stale');\n }\n\n this.fire('geolocate', position);\n this._finish();\n }\n\n _updateCamera(position ) {\n const center = new LngLat(position.coords.longitude, position.coords.latitude);\n const radius = position.coords.accuracy;\n\n this._map.fitBounds(center.toBounds(radius), this.options.fitBoundsOptions, {\n geolocateSource: true // tag this camera change so it won't cause the control to change to background state\n });\n }\n\n _updateMarker(position ) {\n if (position) {\n this._userLocationDotMarker.setLngLat([position.coords.longitude, position.coords.latitude]).addTo(this._map);\n } else {\n this._userLocationDotMarker.remove();\n }\n }\n\n _onError(error ) {\n if (this.options.trackUserLocation) {\n if (error.code === 1) {\n // PERMISSION_DENIED\n this._watchState = 'OFF';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background-error');\n\n if (this._geolocationWatchID !== undefined) {\n this._clearWatch();\n }\n } else {\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n this._watchState = 'ACTIVE_ERROR';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active-error');\n break;\n case 'ACTIVE_LOCK':\n this._watchState = 'ACTIVE_ERROR';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n // turn marker grey\n break;\n case 'BACKGROUND':\n this._watchState = 'BACKGROUND_ERROR';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-background-error');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n // turn marker grey\n break;\n case 'ACTIVE_ERROR':\n break;\n default:\n assert(false, `Unexpected watchState ${this._watchState}`);\n }\n }\n }\n\n if (this._watchState !== 'OFF' && this.options.showUserLocation) {\n this._dotElement.classList.add('mapboxgl-user-location-dot-stale');\n }\n\n this.fire('error', error);\n\n this._finish();\n }\n\n _finish() {\n if (this._timeoutId) { clearTimeout(this._timeoutId); }\n this._timeoutId = undefined;\n }\n\n _setupUI(supported ) {\n if (supported === false) return;\n this._container.addEventListener('contextmenu', (e ) => e.preventDefault());\n this._geolocateButton = DOM.create('button',\n `${className}-icon ${className}-geolocate`,\n this._container);\n this._geolocateButton.type = 'button';\n this._geolocateButton.setAttribute('aria-label', 'Geolocate');\n\n if (this.options.trackUserLocation) {\n this._geolocateButton.setAttribute('aria-pressed', 'false');\n this._watchState = 'OFF';\n }\n\n // when showUserLocation is enabled, keep the Geolocate button disabled until the device location marker is setup on the map\n if (this.options.showUserLocation) {\n this._dotElement = DOM.create('div', 'mapboxgl-user-location-dot');\n\n this._userLocationDotMarker = new Marker(this._dotElement);\n\n if (this.options.trackUserLocation) this._watchState = 'OFF';\n }\n\n this._geolocateButton.addEventListener('click',\n this._onClickGeolocate.bind(this));\n\n // when the camera is changed (and it's not as a result of the Geolocation Control) change\n // the watch mode to background watch, so that the marker is updated but not the camera.\n if (this.options.trackUserLocation) {\n this._map.on('movestart', (event) => {\n if (!event.geolocateSource && this._watchState === 'ACTIVE_LOCK') {\n this._watchState = 'BACKGROUND';\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active');\n\n this.fire('trackuserlocationend');\n }\n });\n }\n }\n\n _onClickGeolocate() {\n if (this.options.trackUserLocation) {\n // update watchState and do any outgoing state cleanup\n switch (this._watchState) {\n case 'OFF':\n // turn on the Geolocate Control\n this._watchState = 'WAITING_ACTIVE';\n\n this.fire('trackuserlocationstart');\n break;\n case 'WAITING_ACTIVE':\n case 'ACTIVE_LOCK':\n case 'ACTIVE_ERROR':\n case 'BACKGROUND_ERROR':\n // turn off the Geolocate Control\n this._watchState = 'OFF';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-active-error');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background');\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background-error');\n\n this.fire('trackuserlocationend');\n break;\n case 'BACKGROUND':\n this._watchState = 'ACTIVE_LOCK';\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-background');\n // set camera to last known location\n if (this._lastKnownPosition) this._updateCamera(this._lastKnownPosition);\n\n this.fire('trackuserlocationstart');\n break;\n default:\n assert(false, `Unexpected watchState ${this._watchState}`);\n }\n\n // incoming state setup\n switch (this._watchState) {\n case 'WAITING_ACTIVE':\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active');\n break;\n case 'ACTIVE_LOCK':\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active');\n break;\n case 'ACTIVE_ERROR':\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-active-error');\n break;\n case 'BACKGROUND':\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-background');\n break;\n case 'BACKGROUND_ERROR':\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-background-error');\n break;\n case 'OFF':\n break;\n default:\n assert(false, `Unexpected watchState ${this._watchState}`);\n }\n\n // manage geolocation.watchPosition / geolocation.clearWatch\n if (this._watchState === 'OFF' && this._geolocationWatchID !== undefined) {\n // clear watchPosition as we've changed to an OFF state\n this._clearWatch();\n } else if (this._geolocationWatchID === undefined) {\n // enable watchPosition since watchState is not OFF and there is no watchPosition already running\n\n this._geolocateButton.classList.add('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.setAttribute('aria-pressed', 'true');\n\n this._geolocationWatchID = window.navigator.geolocation.watchPosition(\n this._onSuccess, this._onError, this.options.positionOptions);\n }\n } else {\n window.navigator.geolocation.getCurrentPosition(\n this._onSuccess, this._onError, this.options.positionOptions);\n\n // This timeout ensures that we still call finish() even if\n // the user declines to share their location in Firefox\n this._timeoutId = setTimeout(this._finish, 10000 /* 10sec */);\n }\n }\n\n _clearWatch() {\n window.navigator.geolocation.clearWatch(this._geolocationWatchID);\n\n this._geolocationWatchID = (undefined );\n this._geolocateButton.classList.remove('mapboxgl-ctrl-geolocate-waiting');\n this._geolocateButton.setAttribute('aria-pressed', 'false');\n\n if (this.options.showUserLocation) {\n this._updateMarker(null);\n }\n }\n}\n\nmodule.exports = GeolocateControl;\n\n/* Geolocate Control Watch States\n * This is the private state of the control.\n *\n * OFF\n * off/inactive\n * WAITING_ACTIVE\n * Geolocate Control was clicked but still waiting for Geolocation API response with user location\n * ACTIVE_LOCK\n * Showing the user location as a dot AND tracking the camera to be fixed to their location. If their location changes the map moves to follow.\n * ACTIVE_ERROR\n * There was en error from the Geolocation API while trying to show and track the user location.\n * BACKGROUND\n * Showing the user location as a dot but the camera doesn't follow their location as it changes.\n * BACKGROUND_ERROR\n * There was an error from the Geolocation API while trying to show (but not track) the user location.\n */\n\n\n/**\n * Fired on each Geolocation API position update which returned as success.\n *\n * @event geolocate\n * @memberof GeolocateControl\n * @instance\n * @property {Position} data The returned [Position](https://developer.mozilla.org/en-US/docs/Web/API/Position) object from the callback in [Geolocation.getCurrentPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) or [Geolocation.watchPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition).\n *\n */\n\n/**\n * Fired on each Geolocation API position update which returned as an error.\n *\n * @event error\n * @memberof GeolocateControl\n * @instance\n * @property {PositionError} data The returned [PositionError](https://developer.mozilla.org/en-US/docs/Web/API/PositionError) object from the callback in [Geolocation.getCurrentPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) or [Geolocation.watchPosition()](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition).\n *\n */\n\n/**\n * Fired when the Geolocate Control changes to the active lock state, which happens either upon first obtaining a successful Geolocation API position for the user (a geolocate event will follow), or the user clicks the geolocate button when in the background state which uses the last known position to recenter the map and enter active lock state (no geolocate event will follow unless the users's location changes).\n *\n * @event trackuserlocationstart\n * @memberof GeolocateControl\n * @instance\n *\n */\n\n/**\n * Fired when the Geolocate Control changes to the background state, which happens when a user changes the camera during an active position lock. This only applies when trackUserLocation is true. In the background state, the dot on the map will update with location updates but the camera will not.\n *\n * @event trackuserlocationend\n * @memberof GeolocateControl\n * @instance\n *\n */\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\n\n \n\n/**\n * A `LogoControl` is a control that adds the Mapbox watermark\n * to the map as required by the [terms of service](https://www.mapbox.com/tos/) for Mapbox\n * vector tiles and core styles.\n *\n * @implements {IControl}\n * @private\n**/\n\nclass LogoControl {\n \n \n\n constructor() {\n util.bindAll(['_updateLogo'], this);\n }\n\n onAdd(map ) {\n this._map = map;\n this._container = DOM.create('div', 'mapboxgl-ctrl');\n const anchor = DOM.create('a', 'mapboxgl-ctrl-logo');\n anchor.target = \"_blank\";\n anchor.href = \"https://www.mapbox.com/\";\n anchor.setAttribute(\"aria-label\", \"Mapbox logo\");\n this._container.appendChild(anchor);\n this._container.style.display = 'none';\n\n this._map.on('sourcedata', this._updateLogo);\n this._updateLogo();\n return this._container;\n }\n\n onRemove() {\n DOM.remove(this._container);\n this._map.off('sourcedata', this._updateLogo);\n }\n\n getDefaultPosition() {\n return 'bottom-left';\n }\n\n _updateLogo(e ) {\n if (!e || e.sourceDataType === 'metadata') {\n this._container.style.display = this._logoRequired() ? 'block' : 'none';\n }\n }\n\n _logoRequired() {\n if (!this._map.style) return;\n\n const sourceCaches = this._map.style.sourceCaches;\n for (const id in sourceCaches) {\n const source = sourceCaches[id].getSource();\n if (source.mapbox_logo) {\n return true;\n }\n }\n\n return false;\n }\n\n}\n\n\nmodule.exports = LogoControl;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst DragRotateHandler = require('../handler/drag_rotate');\n\n \n\n/**\n * A `NavigationControl` control contains zoom buttons and a compass.\n *\n * @implements {IControl}\n * @example\n * var nav = new mapboxgl.NavigationControl();\n * map.addControl(nav, 'top-left');\n * @see [Display map navigation controls](https://www.mapbox.com/mapbox-gl-js/example/navigation/)\n * @see [Add a third party vector tile source](https://www.mapbox.com/mapbox-gl-js/example/third-party/)\n */\nclass NavigationControl {\n \n \n \n \n \n \n \n\n constructor() {\n util.bindAll([\n '_rotateCompassArrow'\n ], this);\n\n this._container = DOM.create('div', 'mapboxgl-ctrl mapboxgl-ctrl-group');\n this._container.addEventListener('contextmenu', (e) => e.preventDefault());\n\n this._zoomInButton = this._createButton('mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in', 'Zoom In', () => this._map.zoomIn());\n this._zoomOutButton = this._createButton('mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out', 'Zoom Out', () => this._map.zoomOut());\n this._compass = this._createButton('mapboxgl-ctrl-icon mapboxgl-ctrl-compass', 'Reset North', () => this._map.resetNorth());\n this._compassArrow = DOM.create('span', 'mapboxgl-ctrl-compass-arrow', this._compass);\n }\n\n _rotateCompassArrow() {\n const rotate = `rotate(${this._map.transform.angle * (180 / Math.PI)}deg)`;\n this._compassArrow.style.transform = rotate;\n }\n\n onAdd(map ) {\n this._map = map;\n this._map.on('rotate', this._rotateCompassArrow);\n this._rotateCompassArrow();\n this._handler = new DragRotateHandler(map, {button: 'left', element: this._compass});\n this._handler.enable();\n return this._container;\n }\n\n onRemove() {\n DOM.remove(this._container);\n this._map.off('rotate', this._rotateCompassArrow);\n delete this._map;\n\n this._handler.disable();\n delete this._handler;\n }\n\n _createButton(className , ariaLabel , fn ) {\n const a = DOM.create('button', className, this._container);\n a.type = 'button';\n a.setAttribute('aria-label', ariaLabel);\n a.addEventListener('click', fn);\n return a;\n }\n}\n\nmodule.exports = NavigationControl;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\n\n \n\n/**\n * A `ScaleControl` control displays the ratio of a distance on the map to the corresponding distance on the ground.\n *\n * @implements {IControl}\n * @param {Object} [options]\n * @param {number} [options.maxWidth='100'] The maximum length of the scale control in pixels.\n * @param {string} [options.unit='metric'] Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).\n * @example\n * map.addControl(new mapboxgl.ScaleControl({\n * maxWidth: 80,\n * unit: 'imperial'\n * }));\n */\nclass ScaleControl {\n \n \n \n\n constructor(options ) {\n this.options = options;\n\n util.bindAll([\n '_onMove'\n ], this);\n }\n\n getDefaultPosition() {\n return 'bottom-left';\n }\n\n _onMove() {\n updateScale(this._map, this._container, this.options);\n }\n\n onAdd(map ) {\n this._map = map;\n this._container = DOM.create('div', 'mapboxgl-ctrl mapboxgl-ctrl-scale', map.getContainer());\n\n this._map.on('move', this._onMove);\n this._onMove();\n\n return this._container;\n }\n\n onRemove() {\n DOM.remove(this._container);\n this._map.off('move', this._onMove);\n this._map = (undefined );\n }\n}\n\nmodule.exports = ScaleControl;\n\nfunction updateScale(map, container, options) {\n // A horizontal scale is imagined to be present at center of the map\n // container with maximum length (Default) as 100px.\n // Using spherical law of cosines approximation, the real distance is\n // found between the two coordinates.\n const maxWidth = options && options.maxWidth || 100;\n\n const y = map._container.clientHeight / 2;\n const maxMeters = getDistance(map.unproject([0, y]), map.unproject([maxWidth, y]));\n // The real distance corresponding to 100px scale length is rounded off to\n // near pretty number and the scale length for the same is found out.\n // Default unit of the scale is based on User's locale.\n if (options && options.unit === 'imperial') {\n const maxFeet = 3.2808 * maxMeters;\n if (maxFeet > 5280) {\n const maxMiles = maxFeet / 5280;\n setScale(container, maxWidth, maxMiles, 'mi');\n } else {\n setScale(container, maxWidth, maxFeet, 'ft');\n }\n } else if (options && options.unit === 'nautical') {\n const maxNauticals = maxMeters / 1852;\n setScale(container, maxWidth, maxNauticals, 'nm');\n } else {\n setScale(container, maxWidth, maxMeters, 'm');\n }\n}\n\nfunction setScale(container, maxWidth, maxDistance, unit) {\n let distance = getRoundNum(maxDistance);\n const ratio = distance / maxDistance;\n\n if (unit === 'm' && distance >= 1000) {\n distance = distance / 1000;\n unit = 'km';\n }\n\n container.style.width = `${maxWidth * ratio}px`;\n container.innerHTML = distance + unit;\n}\n\nfunction getDistance(latlng1, latlng2) {\n // Uses spherical law of cosines approximation.\n const R = 6371000;\n\n const rad = Math.PI / 180,\n lat1 = latlng1.lat * rad,\n lat2 = latlng2.lat * rad,\n a = Math.sin(lat1) * Math.sin(lat2) +\n Math.cos(lat1) * Math.cos(lat2) * Math.cos((latlng2.lng - latlng1.lng) * rad);\n\n const maxMeters = R * Math.acos(Math.min(a, 1));\n return maxMeters;\n\n}\n\nfunction getRoundNum(num) {\n const pow10 = Math.pow(10, (`${Math.floor(num)}`).length - 1);\n let d = num / pow10;\n\n d = d >= 10 ? 10 :\n d >= 5 ? 5 :\n d >= 3 ? 3 :\n d >= 2 ? 2 : 1;\n\n return pow10 * d;\n}\n","// \n\nconst DOM = require('../../util/dom');\nconst LngLatBounds = require('../../geo/lng_lat_bounds');\nconst util = require('../../util/util');\nconst window = require('../../util/window');\n\n \n\n/**\n * The `BoxZoomHandler` allows the user to zoom the map to fit within a bounding box.\n * The bounding box is defined by clicking and holding `shift` while dragging the cursor.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass BoxZoomHandler {\n \n \n \n \n \n \n \n\n constructor(map ) {\n this._map = map;\n this._el = map.getCanvasContainer();\n this._container = map.getContainer();\n\n util.bindAll([\n '_onMouseDown',\n '_onMouseMove',\n '_onMouseUp',\n '_onKeyDown'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"box zoom\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"box zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"box zoom\" interaction is active, i.e. currently being used.\n *\n * @returns {boolean} `true` if the \"box zoom\" interaction is active.\n */\n isActive() {\n return !!this._active;\n }\n\n /**\n * Enables the \"box zoom\" interaction.\n *\n * @example\n * map.boxZoom.enable();\n */\n enable() {\n if (this.isEnabled()) return;\n\n // the event listeners for the DragPanHandler have to fire _after_ the event listener for BoxZoomHandler in order,\n // for the DragPanHandler's check on map.boxZoom.isActive() to tell whether or not to ignore a keydown event\n // so this makes sure the firing order is preserved if the BoxZoomHandler is enabled after the DragPanHandler.\n if (this._map.dragPan) this._map.dragPan.disable();\n this._el.addEventListener('mousedown', this._onMouseDown, false);\n if (this._map.dragPan) this._map.dragPan.enable();\n\n this._enabled = true;\n }\n\n /**\n * Disables the \"box zoom\" interaction.\n *\n * @example\n * map.boxZoom.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.removeEventListener('mousedown', this._onMouseDown);\n this._enabled = false;\n }\n\n _onMouseDown(e ) {\n if (!(e.shiftKey && e.button === 0)) return;\n\n window.document.addEventListener('mousemove', this._onMouseMove, false);\n window.document.addEventListener('keydown', this._onKeyDown, false);\n window.document.addEventListener('mouseup', this._onMouseUp, false);\n\n DOM.disableDrag();\n this._startPos = DOM.mousePos(this._el, e);\n this._active = true;\n }\n\n _onMouseMove(e ) {\n const p0 = this._startPos,\n p1 = DOM.mousePos(this._el, e);\n\n if (!this._box) {\n this._box = DOM.create('div', 'mapboxgl-boxzoom', this._container);\n this._container.classList.add('mapboxgl-crosshair');\n this._fireEvent('boxzoomstart', e);\n }\n\n const minX = Math.min(p0.x, p1.x),\n maxX = Math.max(p0.x, p1.x),\n minY = Math.min(p0.y, p1.y),\n maxY = Math.max(p0.y, p1.y);\n\n DOM.setTransform(this._box, `translate(${minX}px,${minY}px)`);\n\n this._box.style.width = `${maxX - minX}px`;\n this._box.style.height = `${maxY - minY}px`;\n }\n\n _onMouseUp(e ) {\n if (e.button !== 0) return;\n\n const p0 = this._startPos,\n p1 = DOM.mousePos(this._el, e),\n bounds = new LngLatBounds()\n .extend(this._map.unproject(p0))\n .extend(this._map.unproject(p1));\n\n this._finish();\n\n if (p0.x === p1.x && p0.y === p1.y) {\n this._fireEvent('boxzoomcancel', e);\n } else {\n this._map\n .fitBounds(bounds, {linear: true})\n .fire('boxzoomend', { originalEvent: e, boxZoomBounds: bounds });\n }\n }\n\n _onKeyDown(e ) {\n if (e.keyCode === 27) {\n this._finish();\n this._fireEvent('boxzoomcancel', e);\n }\n }\n\n _finish() {\n this._active = false;\n\n window.document.removeEventListener('mousemove', this._onMouseMove, false);\n window.document.removeEventListener('keydown', this._onKeyDown, false);\n window.document.removeEventListener('mouseup', this._onMouseUp, false);\n\n this._container.classList.remove('mapboxgl-crosshair');\n\n if (this._box) {\n DOM.remove(this._box);\n this._box = (null );\n }\n\n DOM.enableDrag();\n }\n\n _fireEvent(type , e ) {\n return this._map.fire(type, { originalEvent: e });\n }\n}\n\nmodule.exports = BoxZoomHandler;\n","// \n\nconst util = require('../../util/util');\n\n \n\n/**\n * The `DoubleClickZoomHandler` allows the user to zoom the map at a point by\n * double clicking.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass DoubleClickZoomHandler {\n \n \n \n\n constructor(map ) {\n this._map = map;\n\n util.bindAll([\n '_onDblClick',\n '_onZoomEnd'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"double click to zoom\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"double click to zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"double click to zoom\" interaction is active, i.e. currently being used.\n *\n * @returns {boolean} `true` if the \"double click to zoom\" interaction is active.\n */\n isActive() {\n return !!this._active;\n }\n\n /**\n * Enables the \"double click to zoom\" interaction.\n *\n * @example\n * map.doubleClickZoom.enable();\n */\n enable() {\n if (this.isEnabled()) return;\n this._map.on('dblclick', this._onDblClick);\n this._enabled = true;\n }\n\n /**\n * Disables the \"double click to zoom\" interaction.\n *\n * @example\n * map.doubleClickZoom.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._map.off('dblclick', this._onDblClick);\n this._enabled = false;\n }\n\n _onDblClick(e ) {\n this._active = true;\n this._map.on('zoomend', this._onZoomEnd);\n this._map.zoomTo(\n this._map.getZoom() + (e.originalEvent.shiftKey ? -1 : 1),\n {around: e.lngLat},\n e\n );\n }\n\n _onZoomEnd() {\n this._active = false;\n this._map.off('zoomend', this._onZoomEnd);\n }\n}\n\nmodule.exports = DoubleClickZoomHandler;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst window = require('../../util/window');\nconst browser = require('../../util/browser');\n\n \n \n\nconst inertiaLinearity = 0.3,\n inertiaEasing = util.bezier(0, 0, inertiaLinearity, 1),\n inertiaMaxSpeed = 1400, // px/s\n inertiaDeceleration = 2500; // px/s^2\n\n/**\n * The `DragPanHandler` allows the user to pan the map by clicking and dragging\n * the cursor.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass DragPanHandler {\n \n \n \n \n \n \n \n\n constructor(map ) {\n this._map = map;\n this._el = map.getCanvasContainer();\n\n util.bindAll([\n '_onDown',\n '_onMove',\n '_onUp',\n '_onTouchEnd',\n '_onMouseUp'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pan\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"drag to pan\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to pan\" interaction is active, i.e. currently being used.\n *\n * @returns {boolean} `true` if the \"drag to pan\" interaction is active.\n */\n isActive() {\n return !!this._active;\n }\n\n /**\n * Enables the \"drag to pan\" interaction.\n *\n * @example\n * map.dragPan.enable();\n */\n enable() {\n if (this.isEnabled()) return;\n this._el.classList.add('mapboxgl-touch-drag-pan');\n this._el.addEventListener('mousedown', this._onDown);\n this._el.addEventListener('touchstart', this._onDown);\n this._enabled = true;\n }\n\n /**\n * Disables the \"drag to pan\" interaction.\n *\n * @example\n * map.dragPan.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.classList.remove('mapboxgl-touch-drag-pan');\n this._el.removeEventListener('mousedown', this._onDown);\n this._el.removeEventListener('touchstart', this._onDown);\n this._enabled = false;\n }\n\n _onDown(e ) {\n if (this._ignoreEvent(e)) return;\n if (this.isActive()) return;\n\n if (e.touches) {\n window.document.addEventListener('touchmove', this._onMove);\n window.document.addEventListener('touchend', this._onTouchEnd);\n } else {\n window.document.addEventListener('mousemove', this._onMove);\n window.document.addEventListener('mouseup', this._onMouseUp);\n }\n /* Deactivate DragPan when the window looses focus. Otherwise if a mouseup occurs when the window isn't in focus, DragPan will still be active even though the mouse is no longer pressed. */\n window.addEventListener('blur', this._onMouseUp);\n\n this._active = false;\n this._startPos = this._pos = DOM.mousePos(this._el, e);\n this._inertia = [[browser.now(), this._pos]];\n }\n\n _onMove(e ) {\n if (this._ignoreEvent(e)) return;\n\n if (!this.isActive()) {\n this._active = true;\n this._map.moving = true;\n this._fireEvent('dragstart', e);\n this._fireEvent('movestart', e);\n }\n\n const pos = DOM.mousePos(this._el, e),\n map = this._map;\n\n map.stop();\n this._drainInertiaBuffer();\n this._inertia.push([browser.now(), pos]);\n\n map.transform.setLocationAtPoint(map.transform.pointLocation(this._pos), pos);\n\n this._fireEvent('drag', e);\n this._fireEvent('move', e);\n\n this._pos = pos;\n\n e.preventDefault();\n }\n\n _onUp(e ) {\n if (!this.isActive()) return;\n\n this._active = false;\n this._fireEvent('dragend', e);\n this._drainInertiaBuffer();\n\n const finish = () => {\n this._map.moving = false;\n this._fireEvent('moveend', e);\n };\n\n const inertia = this._inertia;\n if (inertia.length < 2) {\n finish();\n return;\n }\n\n const last = inertia[inertia.length - 1],\n first = inertia[0],\n flingOffset = last[1].sub(first[1]),\n flingDuration = (last[0] - first[0]) / 1000;\n\n if (flingDuration === 0 || last[1].equals(first[1])) {\n finish();\n return;\n }\n\n // calculate px/s velocity & adjust for increased initial animation speed when easing out\n const velocity = flingOffset.mult(inertiaLinearity / flingDuration);\n let speed = velocity.mag(); // px/s\n\n if (speed > inertiaMaxSpeed) {\n speed = inertiaMaxSpeed;\n velocity._unit()._mult(speed);\n }\n\n const duration = speed / (inertiaDeceleration * inertiaLinearity),\n offset = velocity.mult(-duration / 2);\n\n this._map.panBy(offset, {\n duration: duration * 1000,\n easing: inertiaEasing,\n noMoveStart: true\n }, { originalEvent: e });\n }\n\n _onMouseUp(e ) {\n if (this._ignoreEvent(e)) return;\n this._onUp(e);\n window.document.removeEventListener('mousemove', this._onMove);\n window.document.removeEventListener('mouseup', this._onMouseUp);\n window.removeEventListener('blur', this._onMouseUp);\n }\n\n _onTouchEnd(e ) {\n if (this._ignoreEvent(e)) return;\n this._onUp(e);\n window.document.removeEventListener('touchmove', this._onMove);\n window.document.removeEventListener('touchend', this._onTouchEnd);\n }\n\n _fireEvent(type , e ) {\n return this._map.fire(type, { originalEvent: e });\n }\n\n _ignoreEvent(e ) {\n const map = this._map;\n\n if (map.boxZoom && map.boxZoom.isActive()) return true;\n if (map.dragRotate && map.dragRotate.isActive()) return true;\n if (e.touches) {\n return (e.touches.length > 1);\n } else {\n if (e.ctrlKey) return true;\n return e.type !== 'mousemove' && e.button && e.button !== 0; // left button\n }\n }\n\n _drainInertiaBuffer() {\n const inertia = this._inertia,\n now = browser.now(),\n cutoff = 160; // msec\n\n while (inertia.length > 0 && now - inertia[0][0] > cutoff) inertia.shift();\n }\n}\n\nmodule.exports = DragPanHandler;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst window = require('../../util/window');\nconst browser = require('../../util/browser');\n\n \n \n\nconst inertiaLinearity = 0.25,\n inertiaEasing = util.bezier(0, 0, inertiaLinearity, 1),\n inertiaMaxSpeed = 180, // deg/s\n inertiaDeceleration = 720; // deg/s^2\n\n/**\n * The `DragRotateHandler` allows the user to rotate the map by clicking and\n * dragging the cursor while holding the right mouse button or `ctrl` key.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n * @param {Object} [options]\n * @param {number} [options.bearingSnap] The threshold, measured in degrees, that determines when the map's\n * bearing will snap to north.\n * @param {bool} [options.pitchWithRotate=true] Control the map pitch in addition to the bearing\n */\nclass DragRotateHandler {\n \n \n \n \n \n \n \n \n \n \n \n\n constructor(map , options \n \n \n \n \n ) {\n this._map = map;\n this._el = options.element || map.getCanvasContainer();\n this._button = options.button || 'right';\n this._bearingSnap = options.bearingSnap || 0;\n this._pitchWithRotate = options.pitchWithRotate !== false;\n\n util.bindAll([\n '_onDown',\n '_onMove',\n '_onUp'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to rotate\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"drag to rotate\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Returns a Boolean indicating whether the \"drag to rotate\" interaction is active, i.e. currently being used.\n *\n * @returns {boolean} `true` if the \"drag to rotate\" interaction is active.\n */\n isActive() {\n return !!this._active;\n }\n\n /**\n * Enables the \"drag to rotate\" interaction.\n *\n * @example\n * map.dragRotate.enable();\n */\n enable() {\n if (this.isEnabled()) return;\n this._el.addEventListener('mousedown', this._onDown);\n this._enabled = true;\n }\n\n /**\n * Disables the \"drag to rotate\" interaction.\n *\n * @example\n * map.dragRotate.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.removeEventListener('mousedown', this._onDown);\n this._enabled = false;\n }\n\n _onDown(e ) {\n if (this._map.boxZoom && this._map.boxZoom.isActive()) return;\n if (this._map.dragPan && this._map.dragPan.isActive()) return;\n if (this.isActive()) return;\n\n if (this._button === 'right') {\n const button = (e.ctrlKey ? 0 : 2); // ? ctrl+left button : right button\n let eventButton = e.button;\n if (typeof window.InstallTrigger !== 'undefined' && e.button === 2 && e.ctrlKey &&\n window.navigator.platform.toUpperCase().indexOf('MAC') >= 0) {\n // Fix for https://github.com/mapbox/mapbox-gl-js/issues/3131:\n // Firefox (detected by InstallTrigger) on Mac determines e.button = 2 when\n // using Control + left click\n eventButton = 0;\n }\n if (eventButton !== button) return;\n } else {\n if (e.ctrlKey || e.button !== 0) return;\n }\n\n DOM.disableDrag();\n\n window.document.addEventListener('mousemove', this._onMove, {capture: true});\n window.document.addEventListener('mouseup', this._onUp);\n /* Deactivate DragRotate when the window looses focus. Otherwise if a mouseup occurs when the window isn't in focus, DragRotate will still be active even though the mouse is no longer pressed. */\n window.addEventListener('blur', this._onUp);\n\n this._active = false;\n this._inertia = [[browser.now(), this._map.getBearing()]];\n this._startPos = this._pos = DOM.mousePos(this._el, e);\n this._center = this._map.transform.centerPoint; // Center of rotation\n\n e.preventDefault();\n }\n\n _onMove(e ) {\n if (!this.isActive()) {\n this._active = true;\n this._map.moving = true;\n this._fireEvent('rotatestart', e);\n this._fireEvent('movestart', e);\n if (this._pitchWithRotate) {\n this._fireEvent('pitchstart', e);\n }\n }\n\n const map = this._map;\n map.stop();\n\n const p1 = this._pos,\n p2 = DOM.mousePos(this._el, e),\n bearingDiff = (p1.x - p2.x) * 0.8,\n pitchDiff = (p1.y - p2.y) * -0.5,\n bearing = map.getBearing() - bearingDiff,\n pitch = map.getPitch() - pitchDiff,\n inertia = this._inertia,\n last = inertia[inertia.length - 1];\n\n this._drainInertiaBuffer();\n inertia.push([browser.now(), map._normalizeBearing(bearing, last[1])]);\n\n map.transform.bearing = bearing;\n if (this._pitchWithRotate) {\n this._fireEvent('pitch', e);\n map.transform.pitch = pitch;\n }\n\n this._fireEvent('rotate', e);\n this._fireEvent('move', e);\n\n this._pos = p2;\n }\n\n _onUp(e ) {\n window.document.removeEventListener('mousemove', this._onMove, {capture: true});\n window.document.removeEventListener('mouseup', this._onUp);\n window.removeEventListener('blur', this._onUp);\n\n DOM.enableDrag();\n\n if (!this.isActive()) return;\n\n this._active = false;\n this._fireEvent('rotateend', e);\n this._drainInertiaBuffer();\n\n const map = this._map,\n mapBearing = map.getBearing(),\n inertia = this._inertia;\n\n const finish = () => {\n if (Math.abs(mapBearing) < this._bearingSnap) {\n map.resetNorth({noMoveStart: true}, { originalEvent: e });\n } else {\n this._map.moving = false;\n this._fireEvent('moveend', e);\n }\n if (this._pitchWithRotate) this._fireEvent('pitchend', e);\n };\n\n if (inertia.length < 2) {\n finish();\n return;\n }\n\n const first = inertia[0],\n last = inertia[inertia.length - 1],\n previous = inertia[inertia.length - 2];\n let bearing = map._normalizeBearing(mapBearing, previous[1]);\n const flingDiff = last[1] - first[1],\n sign = flingDiff < 0 ? -1 : 1,\n flingDuration = (last[0] - first[0]) / 1000;\n\n if (flingDiff === 0 || flingDuration === 0) {\n finish();\n return;\n }\n\n let speed = Math.abs(flingDiff * (inertiaLinearity / flingDuration)); // deg/s\n if (speed > inertiaMaxSpeed) {\n speed = inertiaMaxSpeed;\n }\n\n const duration = speed / (inertiaDeceleration * inertiaLinearity),\n offset = sign * speed * (duration / 2);\n\n bearing += offset;\n\n if (Math.abs(map._normalizeBearing(bearing, 0)) < this._bearingSnap) {\n bearing = map._normalizeBearing(0, bearing);\n }\n\n map.rotateTo(bearing, {\n duration: duration * 1000,\n easing: inertiaEasing,\n noMoveStart: true\n }, { originalEvent: e });\n }\n\n _fireEvent(type , e ) {\n return this._map.fire(type, { originalEvent: e });\n }\n\n _drainInertiaBuffer() {\n const inertia = this._inertia,\n now = browser.now(),\n cutoff = 160; //msec\n\n while (inertia.length > 0 && now - inertia[0][0] > cutoff)\n inertia.shift();\n }\n}\n\nmodule.exports = DragRotateHandler;\n","// \n\nconst util = require('../../util/util');\n\n \n\nconst panStep = 100,\n bearingStep = 15,\n pitchStep = 10;\n\n/**\n * The `KeyboardHandler` allows the user to zoom, rotate, and pan the map using\n * the following keyboard shortcuts:\n *\n * - `=` / `+`: Increase the zoom level by 1.\n * - `Shift-=` / `Shift-+`: Increase the zoom level by 2.\n * - `-`: Decrease the zoom level by 1.\n * - `Shift--`: Decrease the zoom level by 2.\n * - Arrow keys: Pan by 100 pixels.\n * - `Shift+⇢`: Increase the rotation by 15 degrees.\n * - `Shift+⇠`: Decrease the rotation by 15 degrees.\n * - `Shift+⇡`: Increase the pitch by 10 degrees.\n * - `Shift+⇣`: Decrease the pitch by 10 degrees.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass KeyboardHandler {\n \n \n \n\n constructor(map ) {\n this._map = map;\n this._el = map.getCanvasContainer();\n\n util.bindAll([\n '_onKeyDown'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether keyboard interaction is enabled.\n *\n * @returns {boolean} `true` if keyboard interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Enables keyboard interaction.\n *\n * @example\n * map.keyboard.enable();\n */\n enable() {\n if (this.isEnabled()) return;\n this._el.addEventListener('keydown', this._onKeyDown, false);\n this._enabled = true;\n }\n\n /**\n * Disables keyboard interaction.\n *\n * @example\n * map.keyboard.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.removeEventListener('keydown', this._onKeyDown);\n this._enabled = false;\n }\n\n _onKeyDown(e ) {\n if (e.altKey || e.ctrlKey || e.metaKey) return;\n\n let zoomDir = 0;\n let bearingDir = 0;\n let pitchDir = 0;\n let xDir = 0;\n let yDir = 0;\n\n switch (e.keyCode) {\n case 61:\n case 107:\n case 171:\n case 187:\n zoomDir = 1;\n break;\n\n case 189:\n case 109:\n case 173:\n zoomDir = -1;\n break;\n\n case 37:\n if (e.shiftKey) {\n bearingDir = -1;\n } else {\n e.preventDefault();\n xDir = -1;\n }\n break;\n\n case 39:\n if (e.shiftKey) {\n bearingDir = 1;\n } else {\n e.preventDefault();\n xDir = 1;\n }\n break;\n\n case 38:\n if (e.shiftKey) {\n pitchDir = 1;\n } else {\n e.preventDefault();\n yDir = -1;\n }\n break;\n\n case 40:\n if (e.shiftKey) {\n pitchDir = -1;\n } else {\n yDir = 1;\n e.preventDefault();\n }\n break;\n\n default:\n return;\n }\n\n const map = this._map;\n const zoom = map.getZoom();\n\n const easeOptions = {\n duration: 300,\n delayEndEvents: 500,\n easing: easeOut,\n\n zoom: zoomDir ? Math.round(zoom) + zoomDir * (e.shiftKey ? 2 : 1) : zoom,\n bearing: map.getBearing() + bearingDir * bearingStep,\n pitch: map.getPitch() + pitchDir * pitchStep,\n offset: [-xDir * panStep, -yDir * panStep],\n center: map.getCenter()\n };\n\n map.easeTo(easeOptions, {originalEvent: e});\n }\n}\n\nfunction easeOut(t) {\n return t * (2 - t);\n}\n\nmodule.exports = KeyboardHandler;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst browser = require('../../util/browser');\nconst window = require('../../util/window');\n\n \n \n\nconst ua = window.navigator.userAgent.toLowerCase(),\n firefox = ua.indexOf('firefox') !== -1,\n safari = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') === -1;\n\n/**\n * The `ScrollZoomHandler` allows the user to zoom the map by scrolling.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass ScrollZoomHandler {\n \n \n \n \n \n \n \n \n \n\n constructor(map ) {\n this._map = map;\n this._el = map.getCanvasContainer();\n\n util.bindAll([\n '_onWheel',\n '_onTimeout'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"scroll to zoom\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"scroll to zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Enables the \"scroll to zoom\" interaction.\n *\n * @param {Object} [options]\n * @param {string} [options.around] If \"center\" is passed, map will zoom around center of map\n *\n * @example\n * map.scrollZoom.enable();\n * @example\n * map.scrollZoom.enable({ around: 'center' })\n */\n enable(options ) {\n if (this.isEnabled()) return;\n this._el.addEventListener('wheel', this._onWheel, false);\n this._el.addEventListener('mousewheel', this._onWheel, false);\n this._enabled = true;\n this._aroundCenter = options && options.around === 'center';\n }\n\n /**\n * Disables the \"scroll to zoom\" interaction.\n *\n * @example\n * map.scrollZoom.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.removeEventListener('wheel', this._onWheel);\n this._el.removeEventListener('mousewheel', this._onWheel);\n this._enabled = false;\n }\n\n _onWheel(e ) {\n let value = 0;\n\n if (e.type === 'wheel') {\n value = e.deltaY;\n // Firefox doubles the values on retina screens...\n // Remove `any` casts when https://github.com/facebook/flow/issues/4879 is fixed.\n if (firefox && e.deltaMode === (window.WheelEvent ).DOM_DELTA_PIXEL) value /= browser.devicePixelRatio;\n if (e.deltaMode === (window.WheelEvent ).DOM_DELTA_LINE) value *= 40;\n\n } else if (e.type === 'mousewheel') {\n value = -e.wheelDeltaY;\n if (safari) value = value / 3;\n }\n\n const now = browser.now(),\n timeDelta = now - (this._time || 0);\n\n this._pos = DOM.mousePos(this._el, e);\n this._time = now;\n\n if (value !== 0 && (value % 4.000244140625) === 0) {\n // This one is definitely a mouse wheel event.\n this._type = 'wheel';\n\n } else if (value !== 0 && Math.abs(value) < 4) {\n // This one is definitely a trackpad event because it is so small.\n this._type = 'trackpad';\n\n } else if (timeDelta > 400) {\n // This is likely a new scroll action.\n this._type = null;\n this._lastValue = value;\n\n // Start a timeout in case this was a singular event, and dely it by up to 40ms.\n this._timeout = setTimeout(this._onTimeout, 40);\n\n } else if (!this._type) {\n // This is a repeating event, but we don't know the type of event just yet.\n // If the delta per time is small, we assume it's a fast trackpad; otherwise we switch into wheel mode.\n this._type = (Math.abs(timeDelta * value) < 200) ? 'trackpad' : 'wheel';\n\n // Make sure our delayed event isn't fired again, because we accumulate\n // the previous event (which was less than 40ms ago) into this event.\n if (this._timeout) {\n clearTimeout(this._timeout);\n this._timeout = null;\n value += this._lastValue;\n }\n }\n\n // Slow down zoom if shift key is held for more precise zooming\n if (e.shiftKey && value) value = value / 4;\n\n // Only fire the callback if we actually know what type of scrolling device the user uses.\n if (this._type) this._zoom(-value, e);\n\n e.preventDefault();\n }\n\n _onTimeout() {\n this._type = 'wheel';\n this._zoom(-this._lastValue);\n }\n\n _zoom(delta , e ) {\n if (delta === 0) return;\n const map = this._map;\n\n // Scale by sigmoid of scroll wheel delta.\n let scale = 2 / (1 + Math.exp(-Math.abs(delta / 100)));\n if (delta < 0 && scale !== 0) scale = 1 / scale;\n\n const fromScale = map.ease ? (map.ease ).to : map.transform.scale,\n targetZoom = map.transform.scaleZoom(fromScale * scale);\n\n map.zoomTo(targetZoom, {\n duration: this._type === 'wheel' ? 200 : 0,\n around: this._aroundCenter ? map.getCenter() : map.unproject(this._pos),\n delayEndEvents: 200,\n smoothEasing: true\n }, { originalEvent: e });\n }\n}\n\nmodule.exports = ScrollZoomHandler;\n","// \n\nconst DOM = require('../../util/dom');\nconst util = require('../../util/util');\nconst window = require('../../util/window');\nconst browser = require('../../util/browser');\n\n \n \n\nconst inertiaLinearity = 0.15,\n inertiaEasing = util.bezier(0, 0, inertiaLinearity, 1),\n inertiaDeceleration = 12, // scale / s^2\n inertiaMaxSpeed = 2.5, // scale / s\n significantScaleThreshold = 0.15,\n significantRotateThreshold = 10;\n\n/**\n * The `TouchZoomRotateHandler` allows the user to zoom and rotate the map by\n * pinching on a touchscreen.\n *\n * @param {Map} map The Mapbox GL JS map to add the handler to.\n */\nclass TouchZoomRotateHandler {\n \n \n \n \n \n \n \n \n \n \n\n constructor(map ) {\n this._map = map;\n this._el = map.getCanvasContainer();\n\n util.bindAll([\n '_onStart',\n '_onMove',\n '_onEnd'\n ], this);\n }\n\n /**\n * Returns a Boolean indicating whether the \"pinch to rotate and zoom\" interaction is enabled.\n *\n * @returns {boolean} `true` if the \"pinch to rotate and zoom\" interaction is enabled.\n */\n isEnabled() {\n return !!this._enabled;\n }\n\n /**\n * Enables the \"pinch to rotate and zoom\" interaction.\n *\n * @param {Object} [options]\n * @param {string} [options.around] If \"center\" is passed, map will zoom around the center\n *\n * @example\n * map.touchZoomRotate.enable();\n * @example\n * map.touchZoomRotate.enable({ around: 'center' });\n */\n enable(options ) {\n if (this.isEnabled()) return;\n this._el.classList.add('mapboxgl-touch-zoom-rotate');\n this._el.addEventListener('touchstart', this._onStart, false);\n this._enabled = true;\n this._aroundCenter = options && options.around === 'center';\n }\n\n /**\n * Disables the \"pinch to rotate and zoom\" interaction.\n *\n * @example\n * map.touchZoomRotate.disable();\n */\n disable() {\n if (!this.isEnabled()) return;\n this._el.classList.remove('mapboxgl-touch-zoom-rotate');\n this._el.removeEventListener('touchstart', this._onStart);\n this._enabled = false;\n }\n\n /**\n * Disables the \"pinch to rotate\" interaction, leaving the \"pinch to zoom\"\n * interaction enabled.\n *\n * @example\n * map.touchZoomRotate.disableRotation();\n */\n disableRotation() {\n this._rotationDisabled = true;\n }\n\n /**\n * Enables the \"pinch to rotate\" interaction.\n *\n * @example\n * map.touchZoomRotate.enable();\n * map.touchZoomRotate.enableRotation();\n */\n enableRotation() {\n this._rotationDisabled = false;\n }\n\n _onStart(e ) {\n if (e.touches.length !== 2) return;\n\n const p0 = DOM.mousePos(this._el, e.touches[0]),\n p1 = DOM.mousePos(this._el, e.touches[1]);\n\n this._startVec = p0.sub(p1);\n this._startScale = this._map.transform.scale;\n this._startBearing = this._map.transform.bearing;\n this._gestureIntent = undefined;\n this._inertia = [];\n\n window.document.addEventListener('touchmove', this._onMove, false);\n window.document.addEventListener('touchend', this._onEnd, false);\n }\n\n _onMove(e ) {\n if (e.touches.length !== 2) return;\n\n const p0 = DOM.mousePos(this._el, e.touches[0]),\n p1 = DOM.mousePos(this._el, e.touches[1]),\n p = p0.add(p1).div(2),\n vec = p0.sub(p1),\n scale = vec.mag() / this._startVec.mag(),\n bearing = this._rotationDisabled ? 0 : vec.angleWith(this._startVec) * 180 / Math.PI,\n map = this._map;\n\n // Determine 'intent' by whichever threshold is surpassed first,\n // then keep that state for the duration of this gesture.\n if (!this._gestureIntent) {\n const scalingSignificantly = (Math.abs(1 - scale) > significantScaleThreshold),\n rotatingSignificantly = (Math.abs(bearing) > significantRotateThreshold);\n\n if (rotatingSignificantly) {\n this._gestureIntent = 'rotate';\n } else if (scalingSignificantly) {\n this._gestureIntent = 'zoom';\n }\n\n if (this._gestureIntent) {\n this._startVec = vec;\n this._startScale = map.transform.scale;\n this._startBearing = map.transform.bearing;\n }\n\n } else {\n const param = { duration: 0, around: map.unproject(p) };\n\n if (this._gestureIntent === 'rotate') {\n param.bearing = this._startBearing + bearing;\n }\n if (this._gestureIntent === 'zoom' || this._gestureIntent === 'rotate') {\n param.zoom = map.transform.scaleZoom(this._startScale * scale);\n }\n\n map.stop();\n this._drainInertiaBuffer();\n this._inertia.push([browser.now(), scale, p]);\n\n map.easeTo(param, { originalEvent: e });\n }\n\n e.preventDefault();\n }\n\n _onEnd(e ) {\n window.document.removeEventListener('touchmove', this._onMove);\n window.document.removeEventListener('touchend', this._onEnd);\n this._drainInertiaBuffer();\n\n const inertia = this._inertia,\n map = this._map;\n\n if (inertia.length < 2) {\n map.snapToNorth({}, { originalEvent: e });\n return;\n }\n\n const last = inertia[inertia.length - 1],\n first = inertia[0],\n lastScale = map.transform.scaleZoom(this._startScale * last[1]),\n firstScale = map.transform.scaleZoom(this._startScale * first[1]),\n scaleOffset = lastScale - firstScale,\n scaleDuration = (last[0] - first[0]) / 1000,\n p = last[2];\n\n if (scaleDuration === 0 || lastScale === firstScale) {\n map.snapToNorth({}, { originalEvent: e });\n return;\n }\n\n // calculate scale/s speed and adjust for increased initial animation speed when easing\n let speed = scaleOffset * inertiaLinearity / scaleDuration; // scale/s\n\n if (Math.abs(speed) > inertiaMaxSpeed) {\n if (speed > 0) {\n speed = inertiaMaxSpeed;\n } else {\n speed = -inertiaMaxSpeed;\n }\n }\n\n const duration = Math.abs(speed / (inertiaDeceleration * inertiaLinearity)) * 1000;\n let targetScale = lastScale + speed * duration / 2000;\n\n if (targetScale < 0) {\n targetScale = 0;\n }\n\n map.easeTo({\n zoom: targetScale,\n duration: duration,\n easing: inertiaEasing,\n around: this._aroundCenter ? map.getCenter() : map.unproject(p)\n }, { originalEvent: e });\n }\n\n _drainInertiaBuffer() {\n const inertia = this._inertia,\n now = browser.now(),\n cutoff = 160; // msec\n\n while (inertia.length > 2 && now - inertia[0][0] > cutoff) inertia.shift();\n }\n}\n\nmodule.exports = TouchZoomRotateHandler;\n","// \n\nconst util = require('../util/util');\nconst window = require('../util/window');\nconst throttle = require('../util/throttle');\n\n \n\n/*\n * Adds the map's position to its page's location hash.\n * Passed as an option to the map object.\n *\n * @returns {Hash} `this`\n */\nclass Hash {\n \n \n\n constructor() {\n util.bindAll([\n '_onHashChange',\n '_updateHash'\n ], this);\n\n // Mobile Safari doesn't allow updating the hash more than 100 times per 30 seconds.\n this._updateHash = throttle(this._updateHashUnthrottled.bind(this), 30 * 1000 / 100);\n }\n\n /*\n * Map element to listen for coordinate changes\n *\n * @param {Object} map\n * @returns {Hash} `this`\n */\n addTo(map ) {\n this._map = map;\n window.addEventListener('hashchange', this._onHashChange, false);\n this._map.on('moveend', this._updateHash);\n return this;\n }\n\n /*\n * Removes hash\n *\n * @returns {Popup} `this`\n */\n remove() {\n window.removeEventListener('hashchange', this._onHashChange, false);\n this._map.off('moveend', this._updateHash);\n delete this._map;\n return this;\n }\n\n getHashString(mapFeedback ) {\n const center = this._map.getCenter(),\n zoom = Math.round(this._map.getZoom() * 100) / 100,\n // derived from equation: 512px * 2^z / 360 / 10^d < 0.5px\n precision = Math.ceil((zoom * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10),\n m = Math.pow(10, precision),\n lng = Math.round(center.lng * m) / m,\n lat = Math.round(center.lat * m) / m,\n bearing = this._map.getBearing(),\n pitch = this._map.getPitch();\n let hash = '';\n if (mapFeedback) {\n // new map feedback site has some constraints that don't allow\n // us to use the same hash format as we do for the Map hash option.\n hash += `#/${lng}/${lat}/${zoom}`;\n } else {\n hash += `#${zoom}/${lat}/${lng}`;\n }\n\n if (bearing || pitch) hash += (`/${Math.round(bearing * 10) / 10}`);\n if (pitch) hash += (`/${Math.round(pitch)}`);\n return hash;\n }\n\n _onHashChange() {\n const loc = window.location.hash.replace('#', '').split('/');\n if (loc.length >= 3) {\n this._map.jumpTo({\n center: [+loc[2], +loc[1]],\n zoom: +loc[0],\n bearing: +(loc[3] || 0),\n pitch: +(loc[4] || 0)\n });\n return true;\n }\n return false;\n }\n\n _updateHashUnthrottled() {\n const hash = this.getHashString();\n window.history.replaceState('', '', hash);\n }\n\n}\n\nmodule.exports = Hash;\n","// \n\nconst util = require('../util/util');\nconst browser = require('../util/browser');\nconst window = require('../util/window');\nconst {HTMLImageElement, HTMLElement} = require('../util/window');\nconst DOM = require('../util/dom');\nconst ajax = require('../util/ajax');\n\nconst Style = require('../style/style');\nconst EvaluationParameters = require('../style/evaluation_parameters');\nconst Painter = require('../render/painter');\n\nconst Transform = require('../geo/transform');\nconst Hash = require('./hash');\n\nconst bindHandlers = require('./bind_handlers');\n\nconst Camera = require('./camera');\nconst LngLat = require('../geo/lng_lat');\nconst LngLatBounds = require('../geo/lng_lat_bounds');\nconst Point = require('@mapbox/point-geometry');\nconst AttributionControl = require('./control/attribution_control');\nconst LogoControl = require('./control/logo_control');\nconst isSupported = require('@mapbox/mapbox-gl-supported');\nconst {RGBAImage} = require('../util/image');\n\nrequire('./events'); // Pull in for documentation.js\n\n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n\n/* eslint-disable no-use-before-define */\n \n \n \n\n \n \n/* eslint-enable no-use-before-define */\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\nconst defaultMinZoom = 0;\nconst defaultMaxZoom = 22;\nconst defaultOptions = {\n center: [0, 0],\n zoom: 0,\n bearing: 0,\n pitch: 0,\n\n minZoom: defaultMinZoom,\n maxZoom: defaultMaxZoom,\n\n interactive: true,\n\n scrollZoom: true,\n boxZoom: true,\n dragRotate: true,\n dragPan: true,\n keyboard: true,\n doubleClickZoom: true,\n touchZoomRotate: true,\n\n bearingSnap: 7,\n\n hash: false,\n\n attributionControl: true,\n\n failIfMajorPerformanceCaveat: false,\n preserveDrawingBuffer: false,\n\n trackResize: true,\n\n renderWorldCopies: true,\n\n refreshExpiredTiles: true,\n\n maxTileCacheSize: null,\n\n transformRequest: null,\n fadeDuration: 300\n};\n\n/**\n * The `Map` object represents the map on your page. It exposes methods\n * and properties that enable you to programmatically change the map,\n * and fires events as users interact with it.\n *\n * You create a `Map` by specifying a `container` and other options.\n * Then Mapbox GL JS initializes the map on the page and returns your `Map`\n * object.\n *\n * @extends Evented\n * @param {Object} options\n * @param {HTMLElement|string} options.container The HTML element in which Mapbox GL JS will render the map, or the element's string `id`. The specified element must have no children.\n * @param {number} [options.minZoom=0] The minimum zoom level of the map (0-24).\n * @param {number} [options.maxZoom=22] The maximum zoom level of the map (0-24).\n * @param {Object|string} [options.style] The map's Mapbox style. This must be an a JSON object conforming to\n * the schema described in the [Mapbox Style Specification](https://mapbox.com/mapbox-gl-style-spec/), or a URL to\n * such JSON.\n *\n * To load a style from the Mapbox API, you can use a URL of the form `mapbox://styles/:owner/:style`,\n * where `:owner` is your Mapbox account name and `:style` is the style ID. Or you can use one of the following\n * [the predefined Mapbox styles](https://www.mapbox.com/maps/):\n *\n * * `mapbox://styles/mapbox/streets-v9`\n * * `mapbox://styles/mapbox/outdoors-v9`\n * * `mapbox://styles/mapbox/light-v9`\n * * `mapbox://styles/mapbox/dark-v9`\n * * `mapbox://styles/mapbox/satellite-v9`\n * * `mapbox://styles/mapbox/satellite-streets-v9`\n *\n * Tilesets hosted with Mapbox can be style-optimized if you append `?optimize=true` to the end of your style URL, like `mapbox://styles/mapbox/streets-v9?optimize=true`.\n * Learn more about style-optimized vector tiles in our [API documentation](https://www.mapbox.com/api-documentation/#retrieve-tiles).\n *\n * @param {boolean} [options.hash=false] If `true`, the map's position (zoom, center latitude, center longitude, bearing, and pitch) will be synced with the hash fragment of the page's URL.\n * For example, `http://path/to/my/page.html#2.59/39.26/53.07/-24.1/60`.\n * @param {boolean} [options.interactive=true] If `false`, no mouse, touch, or keyboard listeners will be attached to the map, so it will not respond to interaction.\n * @param {number} [options.bearingSnap=7] The threshold, measured in degrees, that determines when the map's\n * bearing will snap to north. For example, with a `bearingSnap` of 7, if the user rotates\n * the map within 7 degrees of north, the map will automatically snap to exact north.\n * @param {boolean} [options.pitchWithRotate=true] If `false`, the map's pitch (tilt) control with \"drag to rotate\" interaction will be disabled.\n * @param {boolean} [options.attributionControl=true] If `true`, an {@link AttributionControl} will be added to the map.\n * @param {string} [options.logoPosition='bottom-left'] A string representing the position of the Mapbox wordmark on the map. Valid options are `top-left`,`top-right`, `bottom-left`, `bottom-right`.\n * @param {boolean} [options.failIfMajorPerformanceCaveat=false] If `true`, map creation will fail if the performance of Mapbox\n * GL JS would be dramatically worse than expected (i.e. a software renderer would be used).\n * @param {boolean} [options.preserveDrawingBuffer=false] If `true`, the map's canvas can be exported to a PNG using `map.getCanvas().toDataURL()`. This is `false` by default as a performance optimization.\n * @param {boolean} [options.refreshExpiredTiles=true] If `false`, the map won't attempt to re-request tiles once they expire per their HTTP `cacheControl`/`expires` headers.\n * @param {LngLatBoundsLike} [options.maxBounds] If set, the map will be constrained to the given bounds.\n * @param {boolean|Object} [options.scrollZoom=true] If `true`, the \"scroll to zoom\" interaction is enabled. An `Object` value is passed as options to {@link ScrollZoomHandler#enable}.\n * @param {boolean} [options.boxZoom=true] If `true`, the \"box zoom\" interaction is enabled (see {@link BoxZoomHandler}).\n * @param {boolean} [options.dragRotate=true] If `true`, the \"drag to rotate\" interaction is enabled (see {@link DragRotateHandler}).\n * @param {boolean} [options.dragPan=true] If `true`, the \"drag to pan\" interaction is enabled (see {@link DragPanHandler}).\n * @param {boolean} [options.keyboard=true] If `true`, keyboard shortcuts are enabled (see {@link KeyboardHandler}).\n * @param {boolean} [options.doubleClickZoom=true] If `true`, the \"double click to zoom\" interaction is enabled (see {@link DoubleClickZoomHandler}).\n * @param {boolean|Object} [options.touchZoomRotate=true] If `true`, the \"pinch to rotate and zoom\" interaction is enabled. An `Object` value is passed as options to {@link TouchZoomRotateHandler#enable}.\n * @param {boolean} [options.trackResize=true] If `true`, the map will automatically resize when the browser window resizes.\n * @param {LngLatLike} [options.center=[0, 0]] The inital geographical centerpoint of the map. If `center` is not specified in the constructor options, Mapbox GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `[0, 0]` Note: Mapbox GL uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON.\n * @param {number} [options.zoom=0] The initial zoom level of the map. If `zoom` is not specified in the constructor options, Mapbox GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @param {number} [options.bearing=0] The initial bearing (rotation) of the map, measured in degrees counter-clockwise from north. If `bearing` is not specified in the constructor options, Mapbox GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @param {number} [options.pitch=0] The initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-60). If `pitch` is not specified in the constructor options, Mapbox GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.\n * @param {boolean} [options.renderWorldCopies=true] If `true`, multiple copies of the world will be rendered, when zoomed out.\n * @param {number} [options.maxTileCacheSize=null] The maxiumum number of tiles stored in the tile cache for a given source. If omitted, the cache will be dynamically sized based on the current viewport.\n * @param {string} [options.localIdeographFontFamily=null] If specified, defines a CSS font-family\n * for locally overriding generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges.\n * In these ranges, font settings from the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold).\n * The purpose of this option is to avoid bandwidth-intensive glyph server requests. (see [Use locally generated ideographs](https://www.mapbox.com/mapbox-gl-js/example/local-ideographs))\n * @param {RequestTransformFunction} [options.transformRequest=null] A callback run before the Map makes a request for an external URL. The callback can be used to modify the url, set headers, or set the credentials property for cross-origin requests.\n * Expected to return an object with a `url` property and optionally `headers` and `credentials` properties.\n * @example\n * var map = new mapboxgl.Map({\n * container: 'map',\n * center: [-122.420679, 37.772537],\n * zoom: 13,\n * style: style_object,\n * hash: true,\n * transformRequest: (url, resourceType)=> {\n * if(resourceType == 'Source' && url.startsWith('http://myHost') {\n * return {\n * url: url.replace('http', 'https'),\n * headers: { 'my-custom-header': true},\n * credentials: 'include' // Include cookies for cross-origin requests\n * }\n * }\n * }\n * });\n * @see [Display a map](https://www.mapbox.com/mapbox-gl-js/examples/)\n */\nclass Map extends Camera {\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n constructor(options ) {\n options = util.extend({}, defaultOptions, options);\n\n if (options.minZoom != null && options.maxZoom != null && options.minZoom > options.maxZoom) {\n throw new Error(`maxZoom must be greater than minZoom`);\n }\n\n const transform = new Transform(options.minZoom, options.maxZoom, options.renderWorldCopies);\n super(transform, options);\n\n this._interactive = options.interactive;\n this._maxTileCacheSize = options.maxTileCacheSize;\n this._failIfMajorPerformanceCaveat = options.failIfMajorPerformanceCaveat;\n this._preserveDrawingBuffer = options.preserveDrawingBuffer;\n this._trackResize = options.trackResize;\n this._bearingSnap = options.bearingSnap;\n this._refreshExpiredTiles = options.refreshExpiredTiles;\n this._fadeDuration = options.fadeDuration;\n this._crossFadingFactor = 1;\n\n const transformRequestFn = options.transformRequest;\n this._transformRequest = transformRequestFn ? (url, type) => transformRequestFn(url, type) || ({ url }) : (url) => ({ url });\n\n if (typeof options.container === 'string') {\n const container = window.document.getElementById(options.container);\n if (!container) {\n throw new Error(`Container '${options.container}' not found.`);\n } else {\n this._container = container;\n }\n } else if (options.container instanceof HTMLElement) {\n this._container = options.container;\n } else {\n throw new Error(`Invalid type: 'container' must be a String or HTMLElement.`);\n }\n\n if (options.maxBounds) {\n this.setMaxBounds(options.maxBounds);\n }\n\n util.bindAll([\n '_onWindowOnline',\n '_onWindowResize',\n '_contextLost',\n '_contextRestored',\n '_update',\n '_render',\n '_onData',\n '_onDataLoading'\n ], this);\n\n this._setupContainer();\n this._setupPainter();\n\n this.on('move', this._update.bind(this, false));\n this.on('zoom', this._update.bind(this, true));\n this.on('move', () => {\n this._rerender();\n });\n\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this._onWindowOnline, false);\n window.addEventListener('resize', this._onWindowResize, false);\n }\n\n bindHandlers(this, options);\n\n this._hash = options.hash && (new Hash()).addTo(this);\n // don't set position from options if set through hash\n if (!this._hash || !this._hash._onHashChange()) {\n this.jumpTo({\n center: options.center,\n zoom: options.zoom,\n bearing: options.bearing,\n pitch: options.pitch\n });\n }\n\n this.resize();\n\n if (options.style) this.setStyle(options.style, { localIdeographFontFamily: options.localIdeographFontFamily });\n\n if (options.attributionControl) this.addControl(new AttributionControl());\n this.addControl(new LogoControl(), options.logoPosition);\n\n this.on('style.load', function() {\n if (this.transform.unmodified) {\n this.jumpTo(this.style.stylesheet);\n }\n });\n\n this.on('data', this._onData);\n this.on('dataloading', this._onDataLoading);\n }\n\n /**\n * Adds a {@link IControl} to the map, calling `control.onAdd(this)`.\n *\n * @param {IControl} control The {@link IControl} to add.\n * @param {string} [position] position on the map to which the control will be added.\n * Valid values are `'top-left'`, `'top-right'`, `'bottom-left'`, and `'bottom-right'`. Defaults to `'top-right'`.\n * @returns {Map} `this`\n * @see [Display map navigation controls](https://www.mapbox.com/mapbox-gl-js/example/navigation/)\n */\n addControl(control , position ) {\n if (position === undefined && control.getDefaultPosition) {\n position = control.getDefaultPosition();\n }\n if (position === undefined) {\n position = 'top-right';\n }\n const controlElement = control.onAdd(this);\n const positionContainer = this._controlPositions[position];\n if (position.indexOf('bottom') !== -1) {\n positionContainer.insertBefore(controlElement, positionContainer.firstChild);\n } else {\n positionContainer.appendChild(controlElement);\n }\n return this;\n }\n\n /**\n * Removes the control from the map.\n *\n * @param {IControl} control The {@link IControl} to remove.\n * @returns {Map} `this`\n */\n removeControl(control ) {\n control.onRemove(this);\n return this;\n }\n\n /**\n * Resizes the map according to the dimensions of its\n * `container` element.\n *\n * This method must be called after the map's `container` is resized by another script,\n * or when the map is shown after being initially hidden with CSS.\n *\n * @returns {Map} `this`\n */\n resize() {\n const dimensions = this._containerDimensions();\n const width = dimensions[0];\n const height = dimensions[1];\n\n this._resizeCanvas(width, height);\n this.transform.resize(width, height);\n this.painter.resize(width, height);\n\n return this\n .fire('movestart')\n .fire('move')\n .fire('resize')\n .fire('moveend');\n }\n\n /**\n * Returns the map's geographical bounds.\n *\n * @returns {LngLatBounds} The map's geographical bounds.\n */\n getBounds() {\n const bounds = new LngLatBounds(\n this.transform.pointLocation(new Point(0, this.transform.height)),\n this.transform.pointLocation(new Point(this.transform.width, 0)));\n\n if (this.transform.angle || this.transform.pitch) {\n bounds.extend(this.transform.pointLocation(new Point(this.transform.size.x, 0)));\n bounds.extend(this.transform.pointLocation(new Point(0, this.transform.size.y)));\n }\n\n return bounds;\n }\n\n /**\n * Gets the map's geographical bounds.\n *\n * Returns the LngLatBounds by which pan and zoom operations on the map are constrained.\n *\n * @returns {LngLatBounds | null} The maximum bounds the map is constrained to, or `null` if none set.\n */\n getMaxBounds () {\n if (this.transform.latRange && this.transform.latRange.length === 2 &&\n this.transform.lngRange && this.transform.lngRange.length === 2) {\n return new LngLatBounds([this.transform.lngRange[0], this.transform.latRange[0]],\n [this.transform.lngRange[1], this.transform.latRange[1]]);\n } else {\n return null;\n }\n }\n\n /**\n * Sets or clears the map's geographical bounds.\n *\n * Pan and zoom operations are constrained within these bounds.\n * If a pan or zoom is performed that would\n * display regions outside these bounds, the map will\n * instead display a position and zoom level\n * as close as possible to the operation's request while still\n * remaining within the bounds.\n *\n * @param {LngLatBoundsLike | null | undefined} lnglatbounds The maximum bounds to set. If `null` or `undefined` is provided, the function removes the map's maximum bounds.\n * @returns {Map} `this`\n */\n setMaxBounds(lnglatbounds ) {\n if (lnglatbounds) {\n const b = LngLatBounds.convert(lnglatbounds);\n this.transform.lngRange = [b.getWest(), b.getEast()];\n this.transform.latRange = [b.getSouth(), b.getNorth()];\n this.transform._constrain();\n this._update();\n } else if (lnglatbounds === null || lnglatbounds === undefined) {\n this.transform.lngRange = null;\n this.transform.latRange = null;\n this._update();\n }\n return this;\n\n }\n\n /**\n * Sets or clears the map's minimum zoom level.\n * If the map's current zoom level is lower than the new minimum,\n * the map will zoom to the new minimum.\n *\n * @param {number | null | undefined} minZoom The minimum zoom level to set (0-24).\n * If `null` or `undefined` is provided, the function removes the current minimum zoom (i.e. sets it to 0).\n * @returns {Map} `this`\n */\n setMinZoom(minZoom ) {\n\n minZoom = minZoom === null || minZoom === undefined ? defaultMinZoom : minZoom;\n\n if (minZoom >= defaultMinZoom && minZoom <= this.transform.maxZoom) {\n this.transform.minZoom = minZoom;\n this._update();\n\n if (this.getZoom() < minZoom) this.setZoom(minZoom);\n\n return this;\n\n } else throw new Error(`minZoom must be between ${defaultMinZoom} and the current maxZoom, inclusive`);\n }\n\n /**\n * Returns the map's minimum allowable zoom level.\n *\n * @returns {number} minZoom\n */\n getMinZoom() { return this.transform.minZoom; }\n\n /**\n * Sets or clears the map's maximum zoom level.\n * If the map's current zoom level is higher than the new maximum,\n * the map will zoom to the new maximum.\n *\n * @param {number | null | undefined} maxZoom The maximum zoom level to set.\n * If `null` or `undefined` is provided, the function removes the current maximum zoom (sets it to 22).\n * @returns {Map} `this`\n */\n setMaxZoom(maxZoom ) {\n\n maxZoom = maxZoom === null || maxZoom === undefined ? defaultMaxZoom : maxZoom;\n\n if (maxZoom >= this.transform.minZoom) {\n this.transform.maxZoom = maxZoom;\n this._update();\n\n if (this.getZoom() > maxZoom) this.setZoom(maxZoom);\n\n return this;\n\n } else throw new Error(`maxZoom must be greater than the current minZoom`);\n }\n\n /**\n * Returns the map's maximum allowable zoom level.\n *\n * @returns {number} maxZoom\n */\n getMaxZoom() { return this.transform.maxZoom; }\n\n /**\n * Returns a {@link Point} representing pixel coordinates, relative to the map's `container`,\n * that correspond to the specified geographical location.\n *\n * @param {LngLatLike} lnglat The geographical location to project.\n * @returns {Point} The {@link Point} corresponding to `lnglat`, relative to the map's `container`.\n */\n project(lnglat ) {\n return this.transform.locationPoint(LngLat.convert(lnglat));\n }\n\n /**\n * Returns a {@link LngLat} representing geographical coordinates that correspond\n * to the specified pixel coordinates.\n *\n * @param {PointLike} point The pixel coordinates to unproject.\n * @returns {LngLat} The {@link LngLat} corresponding to `point`.\n * @see [Show polygon information on click](https://www.mapbox.com/mapbox-gl-js/example/polygon-popup-on-click/)\n */\n unproject(point ) {\n return this.transform.pointLocation(Point.convert(point));\n }\n\n /**\n * Adds a listener for events of a specified type.\n *\n * @method\n * @name on\n * @memberof Map\n * @instance\n * @param {string} type The event type to add a listen for.\n * @param {Function} listener The function to be called when the event is fired.\n * The listener function is called with the data object passed to `fire`,\n * extended with `target` and `type` properties.\n * @returns {Map} `this`\n */\n\n /**\n * Adds a listener for events of a specified type occurring on features in a specified style layer.\n *\n * @param {string} type The event type to listen for; one of `'mousedown'`, `'mouseup'`, `'click'`, `'dblclick'`,\n * `'mousemove'`, `'mouseenter'`, `'mouseleave'`, `'mouseover'`, `'mouseout'`, `'contextmenu'`, `'touchstart'`,\n * `'touchend'`, or `'touchcancel'`. `mouseenter` and `mouseover` events are triggered when the cursor enters\n * a visible portion of the specified layer from outside that layer or outside the map canvas. `mouseleave`\n * and `mouseout` events are triggered when the cursor leaves a visible portion of the specified layer, or leaves\n * the map canvas.\n * @param {string} layer The ID of a style layer. Only events whose location is within a visible\n * feature in this layer will trigger the listener. The event will have a `features` property containing\n * an array of the matching features.\n * @param {Function} listener The function to be called when the event is fired.\n * @returns {Map} `this`\n */\n on(type , layer , listener ) {\n if (listener === undefined) {\n return super.on(type, layer);\n }\n\n const delegatedListener = (() => {\n if (type === 'mouseenter' || type === 'mouseover') {\n let mousein = false;\n const mousemove = (e) => {\n const features = this.getLayer(layer) ? this.queryRenderedFeatures(e.point, {layers: [layer]}) : [];\n if (!features.length) {\n mousein = false;\n } else if (!mousein) {\n mousein = true;\n listener.call(this, util.extend({features}, e, {type}));\n }\n };\n const mouseout = () => {\n mousein = false;\n };\n return {layer, listener, delegates: {mousemove, mouseout}};\n } else if (type === 'mouseleave' || type === 'mouseout') {\n let mousein = false;\n const mousemove = (e) => {\n const features = this.getLayer(layer) ? this.queryRenderedFeatures(e.point, {layers: [layer]}) : [];\n if (features.length) {\n mousein = true;\n } else if (mousein) {\n mousein = false;\n listener.call(this, util.extend({}, e, {type}));\n }\n };\n const mouseout = (e) => {\n if (mousein) {\n mousein = false;\n listener.call(this, util.extend({}, e, {type}));\n }\n };\n return {layer, listener, delegates: {mousemove, mouseout}};\n } else {\n const delegate = (e) => {\n const features = this.getLayer(layer) ? this.queryRenderedFeatures(e.point, {layers: [layer]}) : [];\n if (features.length) {\n listener.call(this, util.extend({features}, e));\n }\n };\n return {layer, listener, delegates: {[type]: delegate}};\n }\n })();\n\n this._delegatedListeners = this._delegatedListeners || {};\n this._delegatedListeners[type] = this._delegatedListeners[type] || [];\n this._delegatedListeners[type].push(delegatedListener);\n\n for (const event in delegatedListener.delegates) {\n this.on((event ), delegatedListener.delegates[event]);\n }\n\n return this;\n }\n\n /**\n * Removes an event listener previously added with `Map#on`.\n *\n * @method\n * @name off\n * @memberof Map\n * @instance\n * @param {string} type The event type previously used to install the listener.\n * @param {Function} listener The function previously installed as a listener.\n * @returns {Map} `this`\n */\n\n /**\n * Removes an event listener for layer-specific events previously added with `Map#on`.\n *\n * @param {string} type The event type previously used to install the listener.\n * @param {string} layer The layer ID previously used to install the listener.\n * @param {Function} listener The function previously installed as a listener.\n * @returns {Map} `this`\n */\n off(type , layer , listener ) {\n if (listener === undefined) {\n return super.off(type, layer);\n }\n\n if (this._delegatedListeners && this._delegatedListeners[type]) {\n const listeners = this._delegatedListeners[type];\n for (let i = 0; i < listeners.length; i++) {\n const delegatedListener = listeners[i];\n if (delegatedListener.layer === layer && delegatedListener.listener === listener) {\n for (const event in delegatedListener.delegates) {\n this.off((event ), delegatedListener.delegates[event]);\n }\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n\n return this;\n }\n\n /**\n * Returns an array of [GeoJSON](http://geojson.org/)\n * [Feature objects](http://geojson.org/geojson-spec.html#feature-objects)\n * representing visible features that satisfy the query parameters.\n *\n * @param {PointLike|Array<PointLike>} [geometry] - The geometry of the query region:\n * either a single point or southwest and northeast points describing a bounding box.\n * Omitting this parameter (i.e. calling {@link Map#queryRenderedFeatures} with zero arguments,\n * or with only a `options` argument) is equivalent to passing a bounding box encompassing the entire\n * map viewport.\n * @param {Object} [options]\n * @param {Array<string>} [options.layers] An array of style layer IDs for the query to inspect.\n * Only features within these layers will be returned. If this parameter is undefined, all layers will be checked.\n * @param {Array} [options.filter] A [filter](https://www.mapbox.com/mapbox-gl-style-spec/#types-filter)\n * to limit query results.\n *\n * @returns {Array<Object>} An array of [GeoJSON](http://geojson.org/)\n * [feature objects](http://geojson.org/geojson-spec.html#feature-objects).\n *\n * The `properties` value of each returned feature object contains the properties of its source feature. For GeoJSON sources, only\n * string and numeric property values are supported (i.e. `null`, `Array`, and `Object` values are not supported).\n *\n * Each feature includes a top-level `layer` property whose value is an object representing the style layer to\n * which the feature belongs. Layout and paint properties in this object contain values which are fully evaluated\n * for the given zoom level and feature.\n *\n * Features from layers whose `visibility` property is `\"none\"`, or from layers whose zoom range excludes the\n * current zoom level are not included. Symbol features that have been hidden due to text or icon collision are\n * not included. Features from all other layers are included, including features that may have no visible\n * contribution to the rendered result; for example, because the layer's opacity or color alpha component is set to\n * 0.\n *\n * The topmost rendered feature appears first in the returned array, and subsequent features are sorted by\n * descending z-order. Features that are rendered multiple times (due to wrapping across the antimeridian at low\n * zoom levels) are returned only once (though subject to the following caveat).\n *\n * Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature\n * geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple\n * times in query results. For example, suppose there is a highway running through the bounding rectangle of a query.\n * The results of the query will be those parts of the highway that lie within the map tiles covering the bounding\n * rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile\n * will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple\n * tiles due to tile buffering.\n *\n * @example\n * // Find all features at a point\n * var features = map.queryRenderedFeatures(\n * [20, 35],\n * { layers: ['my-layer-name'] }\n * );\n *\n * @example\n * // Find all features within a static bounding box\n * var features = map.queryRenderedFeatures(\n * [[10, 20], [30, 50]],\n * { layers: ['my-layer-name'] }\n * );\n *\n * @example\n * // Find all features within a bounding box around a point\n * var width = 10;\n * var height = 20;\n * var features = map.queryRenderedFeatures([\n * [point.x - width / 2, point.y - height / 2],\n * [point.x + width / 2, point.y + height / 2]\n * ], { layers: ['my-layer-name'] });\n *\n * @example\n * // Query all rendered features from a single layer\n * var features = map.queryRenderedFeatures({ layers: ['my-layer-name'] });\n * @see [Get features under the mouse pointer](https://www.mapbox.com/mapbox-gl-js/example/queryrenderedfeatures/)\n * @see [Highlight features within a bounding box](https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/)\n * @see [Center the map on a clicked symbol](https://www.mapbox.com/mapbox-gl-js/example/center-on-symbol/)\n */\n queryRenderedFeatures(geometry , options ) {\n // The first parameter can be omitted entirely, making this effectively an overloaded method\n // with two signatures:\n //\n // queryRenderedFeatures(geometry: PointLike | [PointLike, PointLike], options?: Object)\n // queryRenderedFeatures(options?: Object)\n //\n // There no way to express that in a way that's compatible with both flow and documentation.js.\n // Related: https://github.com/facebook/flow/issues/1556\n if (arguments.length === 2) {\n geometry = arguments[0];\n options = arguments[1];\n } else if (arguments.length === 1 && isPointLike(arguments[0])) {\n geometry = arguments[0];\n options = {};\n } else if (arguments.length === 1) {\n geometry = undefined;\n options = arguments[0];\n } else {\n geometry = undefined;\n options = {};\n }\n\n if (!this.style) {\n return [];\n }\n\n return this.style.queryRenderedFeatures(\n this._makeQueryGeometry(geometry),\n options,\n this.transform.zoom,\n this.transform.angle\n );\n\n function isPointLike(input) {\n return input instanceof Point || Array.isArray(input);\n }\n }\n\n _makeQueryGeometry(pointOrBox ) {\n if (pointOrBox === undefined) {\n // bounds was omitted: use full viewport\n pointOrBox = [\n Point.convert([0, 0]),\n Point.convert([this.transform.width, this.transform.height])\n ];\n }\n\n let queryGeometry;\n\n if (pointOrBox instanceof Point || typeof pointOrBox[0] === 'number') {\n const point = Point.convert(pointOrBox);\n queryGeometry = [point];\n } else {\n const box = [Point.convert(pointOrBox[0]), Point.convert(pointOrBox[1])];\n queryGeometry = [\n box[0],\n new Point(box[1].x, box[0].y),\n box[1],\n new Point(box[0].x, box[1].y),\n box[0]\n ];\n }\n\n queryGeometry = queryGeometry.map((p) => {\n return this.transform.pointCoordinate(p);\n });\n\n return queryGeometry;\n }\n\n /**\n * Returns an array of [GeoJSON](http://geojson.org/)\n * [Feature objects](http://geojson.org/geojson-spec.html#feature-objects)\n * representing features within the specified vector tile or GeoJSON source that satisfy the query parameters.\n *\n * @param {string} sourceID The ID of the vector tile or GeoJSON source to query.\n * @param {Object} [parameters]\n * @param {string} [parameters.sourceLayer] The name of the vector tile layer to query. *For vector tile\n * sources, this parameter is required.* For GeoJSON sources, it is ignored.\n * @param {Array} [parameters.filter] A [filter](https://www.mapbox.com/mapbox-gl-style-spec/#types-filter)\n * to limit query results.\n *\n * @returns {Array<Object>} An array of [GeoJSON](http://geojson.org/)\n * [Feature objects](http://geojson.org/geojson-spec.html#feature-objects).\n *\n * In contrast to {@link Map#queryRenderedFeatures}, this function\n * returns all features matching the query parameters,\n * whether or not they are rendered by the current style (i.e. visible). The domain of the query includes all currently-loaded\n * vector tiles and GeoJSON source tiles: this function does not check tiles outside the currently\n * visible viewport.\n *\n * Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature\n * geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple\n * times in query results. For example, suppose there is a highway running through the bounding rectangle of a query.\n * The results of the query will be those parts of the highway that lie within the map tiles covering the bounding\n * rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile\n * will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple\n * tiles due to tile buffering.\n * @see [Filter features within map view](https://www.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/)\n * @see [Highlight features containing similar data](https://www.mapbox.com/mapbox-gl-js/example/query-similar-features/)\n */\n querySourceFeatures(sourceID , parameters ) {\n return this.style.querySourceFeatures(sourceID, parameters);\n }\n\n /**\n * Updates the map's Mapbox style object with a new value. If the given\n * value is style JSON object, compares it against the the map's current\n * state and perform only the changes necessary to make the map style match\n * the desired state.\n *\n * @param style A JSON object conforming to the schema described in the\n * [Mapbox Style Specification](https://mapbox.com/mapbox-gl-style-spec/), or a URL to such JSON.\n * @param {Object} [options]\n * @param {boolean} [options.diff=true] If false, force a 'full' update, removing the current style\n * and adding building the given one instead of attempting a diff-based update.\n * @param {string} [options.localIdeographFontFamily=null] If non-null, defines a css font-family\n * for locally overriding generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables'\n * ranges. Forces a full update.\n * @returns {Map} `this`\n * @see [Change a map's style](https://www.mapbox.com/mapbox-gl-js/example/setstyle/)\n */\n setStyle(style , options ) {\n const shouldTryDiff = (!options || (options.diff !== false && !options.localIdeographFontFamily)) && this.style;\n if (shouldTryDiff && style && typeof style === 'object') {\n try {\n if (this.style.setState(style)) {\n this._update(true);\n }\n return this;\n } catch (e) {\n util.warnOnce(`Unable to perform style diff: ${e.message || e.error || e}. Rebuilding the style from scratch.`);\n }\n }\n\n if (this.style) {\n this.style.setEventedParent(null);\n this.style._remove();\n }\n\n if (!style) {\n delete this.style;\n return this;\n } else {\n this.style = new Style(this, options || {});\n }\n\n this.style.setEventedParent(this, {style: this.style});\n\n if (typeof style === 'string') {\n this.style.loadURL(style);\n } else {\n this.style.loadJSON(style);\n }\n\n return this;\n }\n\n /**\n * Returns the map's Mapbox style object, which can be used to recreate the map's style.\n *\n * @returns {Object} The map's style object.\n */\n getStyle() {\n if (this.style) {\n return this.style.serialize();\n }\n }\n\n /**\n * Returns a Boolean indicating whether the map's style is fully loaded.\n *\n * @returns {boolean} A Boolean indicating whether the style is fully loaded.\n */\n isStyleLoaded() {\n if (!this.style) return util.warnOnce('There is no style added to the map.');\n return this.style.loaded();\n }\n\n /**\n * Adds a source to the map's style.\n *\n * @param {string} id The ID of the source to add. Must not conflict with existing sources.\n * @param {Object} source The source object, conforming to the\n * Mapbox Style Specification's [source definition](https://www.mapbox.com/mapbox-gl-style-spec/#sources).\n * @fires source.add\n * @returns {Map} `this`\n * @see [Draw GeoJSON points](https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/)\n * @see [Style circles using data-driven styling](https://www.mapbox.com/mapbox-gl-js/example/data-driven-circle-colors/)\n * @see [Set a point after Geocoder result](https://www.mapbox.com/mapbox-gl-js/example/point-from-geocoder-result/)\n */\n addSource(id , source ) {\n this.style.addSource(id, source);\n this._update(true);\n return this;\n }\n\n /**\n * Returns a Boolean indicating whether the source is loaded.\n *\n * @param {string} id The ID of the source to be checked.\n * @returns {boolean} A Boolean indicating whether the source is loaded.\n */\n isSourceLoaded(id ) {\n const source = this.style && this.style.sourceCaches[id];\n if (source === undefined) {\n this.fire('error', {\n error: new Error(`There is no source with ID '${id}'`)\n });\n return;\n }\n return source.loaded();\n }\n\n /**\n * Returns a Boolean indicating whether all tiles in the viewport from all sources on\n * the style are loaded.\n *\n * @returns {boolean} A Boolean indicating whether all tiles are loaded.\n */\n\n areTilesLoaded() {\n const sources = this.style && this.style.sourceCaches;\n for (const id in sources) {\n const source = sources[id];\n const tiles = source._tiles;\n for (const t in tiles) {\n const tile = tiles[t];\n if (!(tile.state === 'loaded' || tile.state === 'errored')) return false;\n }\n }\n return true;\n }\n\n /**\n * Adds a [custom source type](#Custom Sources), making it available for use with\n * {@link Map#addSource}.\n * @private\n * @param {string} name The name of the source type; source definition objects use this name in the `{type: ...}` field.\n * @param {Function} SourceType A {@link Source} constructor.\n * @param {Function} callback Called when the source type is ready or with an error argument if there is an error.\n */\n addSourceType(name , SourceType , callback ) {\n return this.style.addSourceType(name, SourceType, callback);\n }\n\n /**\n * Removes a source from the map's style.\n *\n * @param {string} id The ID of the source to remove.\n * @returns {Map} `this`\n */\n removeSource(id ) {\n this.style.removeSource(id);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the source with the specified ID in the map's style.\n *\n * @param {string} id The ID of the source to get.\n * @returns {?Object} The style source with the specified ID, or `undefined`\n * if the ID corresponds to no existing sources.\n * @see [Create a draggable point](https://www.mapbox.com/mapbox-gl-js/example/drag-a-point/)\n * @see [Animate a point](https://www.mapbox.com/mapbox-gl-js/example/animate-point-along-line/)\n * @see [Add live realtime data](https://www.mapbox.com/mapbox-gl-js/example/live-geojson/)\n */\n getSource(id ) {\n return this.style.getSource(id);\n }\n\n /**\n * Add an image to the style. This image can be used in `icon-image`,\n * `background-pattern`, `fill-pattern`, and `line-pattern`. An\n * {@link Map#error} event will be fired if there is not enough space in the\n * sprite to add this image.\n *\n * @see [Add an icon to the map](https://www.mapbox.com/mapbox-gl-js/example/add-image/)\n * @see [Add a generated icon to the map](https://www.mapbox.com/mapbox-gl-js/example/add-image-generated/)\n * @param id The ID of the image.\n * @param image The image as an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data`\n * properties with the same format as `ImageData`.\n * @param options\n * @param options.pixelRatio The ratio of pixels in the image to physical pixels on the screen\n * @param options.sdf Whether the image should be interpreted as an SDF image\n */\n addImage(id ,\n image ,\n {pixelRatio = 1, sdf = false} = {}) {\n if (image instanceof HTMLImageElement) {\n const {width, height, data} = browser.getImageData(image);\n this.style.addImage(id, { data: new RGBAImage({width, height}, data), pixelRatio, sdf });\n } else if (image.width === undefined || image.height === undefined) {\n return this.fire('error', {error: new Error(\n 'Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, ' +\n 'or object with `width`, `height`, and `data` properties with the same format as `ImageData`')});\n } else {\n const {width, height, data} = image;\n this.style.addImage(id, { data: new RGBAImage({width, height}, data.slice(0)), pixelRatio, sdf });\n }\n }\n\n /**\n * Define wether the image has been added or not\n *\n * @param id The ID of the image.\n */\n hasImage(id ) {\n if (!id) {\n this.fire('error', {\n error: new Error('Missing required image id')\n });\n return false;\n }\n\n return !!this.style.getImage(id);\n }\n\n /**\n * Remove an image from the style (such as one used by `icon-image` or `background-pattern`).\n *\n * @param id The ID of the image.\n */\n removeImage(id ) {\n this.style.removeImage(id);\n }\n\n /**\n * Load an image from an external URL for use with `Map#addImage`. External\n * domains must support [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS).\n *\n * @param {string} url The URL of the image file. Image file must be in png, webp, or jpg format.\n * @param {Function} callback Expecting `callback(error, data)`. Called when the image has loaded or with an error argument if there is an error.\n * @see [Add an icon to the map](https://www.mapbox.com/mapbox-gl-js/example/add-image/)\n */\n loadImage(url , callback ) {\n ajax.getImage(this._transformRequest(url, ajax.ResourceType.Image), callback);\n }\n\n /**\n * Adds a [Mapbox style layer](https://www.mapbox.com/mapbox-gl-style-spec/#layers)\n * to the map's style.\n *\n * A layer defines styling for data from a specified source.\n *\n * @param {Object} layer The style layer to add, conforming to the Mapbox Style Specification's\n * [layer definition](https://www.mapbox.com/mapbox-gl-style-spec/#layers).\n * @param {string} [before] The ID of an existing layer to insert the new layer before.\n * If this argument is omitted, the layer will be appended to the end of the layers array.\n * @returns {Map} `this`\n * @see [Create and style clusters](https://www.mapbox.com/mapbox-gl-js/example/cluster/)\n * @see [Add a vector tile source](https://www.mapbox.com/mapbox-gl-js/example/vector-source/)\n * @see [Add a WMS source](https://www.mapbox.com/mapbox-gl-js/example/wms/)\n */\n addLayer(layer , before ) {\n this.style.addLayer(layer, before);\n this._update(true);\n return this;\n }\n\n /**\n * Moves a layer to a different z-position.\n *\n * @param {string} id The ID of the layer to move.\n * @param {string} [beforeId] The ID of an existing layer to insert the new layer before.\n * If this argument is omitted, the layer will be appended to the end of the layers array.\n * @returns {Map} `this`\n */\n moveLayer(id , beforeId ) {\n this.style.moveLayer(id, beforeId);\n this._update(true);\n return this;\n }\n\n /**\n * Removes the layer with the given id from the map's style.\n *\n * If no such layer exists, an `error` event is fired.\n *\n * @param {string} id id of the layer to remove\n * @fires error\n */\n removeLayer(id ) {\n this.style.removeLayer(id);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the layer with the specified ID in the map's style.\n *\n * @param {string} id The ID of the layer to get.\n * @returns {?Object} The layer with the specified ID, or `undefined`\n * if the ID corresponds to no existing layers.\n * @see [Filter symbols by toggling a list](https://www.mapbox.com/mapbox-gl-js/example/filter-markers/)\n * @see [Filter symbols by text input](https://www.mapbox.com/mapbox-gl-js/example/filter-markers-by-input/)\n */\n getLayer(id ) {\n return this.style.getLayer(id);\n }\n\n /**\n * Sets the filter for the specified style layer.\n *\n * @param {string} layer The ID of the layer to which the filter will be applied.\n * @param {Array | null | undefined} filter The filter, conforming to the Mapbox Style Specification's\n * [filter definition](https://www.mapbox.com/mapbox-gl-style-spec/#types-filter). If `null` or `undefined` is provided, the function removes any existing filter from the layer.\n * @returns {Map} `this`\n * @example\n * map.setFilter('my-layer', ['==', 'name', 'USA']);\n * @see [Filter features within map view](https://www.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/)\n * @see [Highlight features containing similar data](https://www.mapbox.com/mapbox-gl-js/example/query-similar-features/)\n * @see [Create a timeline animation](https://www.mapbox.com/mapbox-gl-js/example/timeline-animation/)\n */\n setFilter(layer , filter ) {\n this.style.setFilter(layer, filter);\n this._update(true);\n return this;\n }\n\n /**\n * Sets the zoom extent for the specified style layer.\n *\n * @param {string} layerId The ID of the layer to which the zoom extent will be applied.\n * @param {number} minzoom The minimum zoom to set (0-24).\n * @param {number} maxzoom The maximum zoom to set (0-24).\n * @returns {Map} `this`\n * @example\n * map.setLayerZoomRange('my-layer', 2, 5);\n */\n setLayerZoomRange(layerId , minzoom , maxzoom ) {\n this.style.setLayerZoomRange(layerId, minzoom, maxzoom);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the filter applied to the specified style layer.\n *\n * @param {string} layer The ID of the style layer whose filter to get.\n * @returns {Array} The layer's filter.\n */\n getFilter(layer ) {\n return this.style.getFilter(layer);\n }\n\n /**\n * Sets the value of a paint property in the specified style layer.\n *\n * @param {string} layer The ID of the layer to set the paint property in.\n * @param {string} name The name of the paint property to set.\n * @param {*} value The value of the paint propery to set.\n * Must be of a type appropriate for the property, as defined in the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/).\n * @returns {Map} `this`\n * @example\n * map.setPaintProperty('my-layer', 'fill-color', '#faafee');\n * @see [Change a layer's color with buttons](https://www.mapbox.com/mapbox-gl-js/example/color-switcher/)\n * @see [Adjust a layer's opacity](https://www.mapbox.com/mapbox-gl-js/example/adjust-layer-opacity/)\n * @see [Create a draggable point](https://www.mapbox.com/mapbox-gl-js/example/drag-a-point/)\n */\n setPaintProperty(layer , name , value ) {\n this.style.setPaintProperty(layer, name, value);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the value of a paint property in the specified style layer.\n *\n * @param {string} layer The ID of the layer to get the paint property from.\n * @param {string} name The name of a paint property to get.\n * @returns {*} The value of the specified paint property.\n */\n getPaintProperty(layer , name ) {\n return this.style.getPaintProperty(layer, name);\n }\n\n /**\n * Sets the value of a layout property in the specified style layer.\n *\n * @param {string} layer The ID of the layer to set the layout property in.\n * @param {string} name The name of the layout property to set.\n * @param {*} value The value of the layout propery. Must be of a type appropriate for the property, as defined in the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/).\n * @returns {Map} `this`\n * @example\n * map.setLayoutProperty('my-layer', 'visibility', 'none');\n */\n setLayoutProperty(layer , name , value ) {\n this.style.setLayoutProperty(layer, name, value);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the value of a layout property in the specified style layer.\n *\n * @param {string} layer The ID of the layer to get the layout property from.\n * @param {string} name The name of the layout property to get.\n * @returns {*} The value of the specified layout property.\n */\n getLayoutProperty(layer , name ) {\n return this.style.getLayoutProperty(layer, name);\n }\n\n /**\n * Sets the any combination of light values.\n *\n * @param light Light properties to set. Must conform to the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/).\n * @returns {Map} `this`\n */\n setLight(light ) {\n this.style.setLight(light);\n this._update(true);\n return this;\n }\n\n /**\n * Returns the value of the light object.\n *\n * @returns {Object} light Light properties of the style.\n */\n getLight() {\n return this.style.getLight();\n }\n\n /**\n * Returns the map's containing HTML element.\n *\n * @returns {HTMLElement} The map's container.\n */\n getContainer() {\n return this._container;\n }\n\n /**\n * Returns the HTML element containing the map's `<canvas>` element.\n *\n * If you want to add non-GL overlays to the map, you should append them to this element.\n *\n * This is the element to which event bindings for map interactivity (such as panning and zooming) are\n * attached. It will receive bubbled events from child elements such as the `<canvas>`, but not from\n * map controls.\n *\n * @returns {HTMLElement} The container of the map's `<canvas>`.\n * @see [Create a draggable point](https://www.mapbox.com/mapbox-gl-js/example/drag-a-point/)\n * @see [Highlight features within a bounding box](https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/)\n */\n getCanvasContainer() {\n return this._canvasContainer;\n }\n\n /**\n * Returns the map's `<canvas>` element.\n *\n * @returns {HTMLCanvasElement} The map's `<canvas>` element.\n * @see [Measure distances](https://www.mapbox.com/mapbox-gl-js/example/measure/)\n * @see [Display a popup on hover](https://www.mapbox.com/mapbox-gl-js/example/popup-on-hover/)\n * @see [Center the map on a clicked symbol](https://www.mapbox.com/mapbox-gl-js/example/center-on-symbol/)\n */\n getCanvas() {\n return this._canvas;\n }\n\n _containerDimensions() {\n let width = 0;\n let height = 0;\n\n if (this._container) {\n width = this._container.offsetWidth || 400;\n height = this._container.offsetHeight || 300;\n }\n\n return [width, height];\n }\n\n _setupContainer() {\n const container = this._container;\n container.classList.add('mapboxgl-map');\n\n const missingCSSContainer = this._missingCSSContainer = DOM.create('div', 'mapboxgl-missing-css', container);\n missingCSSContainer.innerHTML = 'Missing Mapbox GL JS CSS';\n\n const canvasContainer = this._canvasContainer = DOM.create('div', 'mapboxgl-canvas-container', container);\n if (this._interactive) {\n canvasContainer.classList.add('mapboxgl-interactive');\n }\n\n this._canvas = DOM.create('canvas', 'mapboxgl-canvas', canvasContainer);\n this._canvas.style.position = 'absolute';\n this._canvas.addEventListener('webglcontextlost', this._contextLost, false);\n this._canvas.addEventListener('webglcontextrestored', this._contextRestored, false);\n this._canvas.setAttribute('tabindex', '0');\n this._canvas.setAttribute('aria-label', 'Map');\n\n const dimensions = this._containerDimensions();\n this._resizeCanvas(dimensions[0], dimensions[1]);\n\n const controlContainer = this._controlContainer = DOM.create('div', 'mapboxgl-control-container', container);\n const positions = this._controlPositions = {};\n ['top-left', 'top-right', 'bottom-left', 'bottom-right'].forEach((positionName) => {\n positions[positionName] = DOM.create('div', `mapboxgl-ctrl-${positionName}`, controlContainer);\n });\n }\n\n _resizeCanvas(width , height ) {\n const pixelRatio = window.devicePixelRatio || 1;\n\n // Request the required canvas size taking the pixelratio into account.\n this._canvas.width = pixelRatio * width;\n this._canvas.height = pixelRatio * height;\n\n // Maintain the same canvas size, potentially downscaling it for HiDPI displays\n this._canvas.style.width = `${width}px`;\n this._canvas.style.height = `${height}px`;\n }\n\n _setupPainter() {\n const attributes = util.extend({\n failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat,\n preserveDrawingBuffer: this._preserveDrawingBuffer\n }, isSupported.webGLContextAttributes);\n\n const gl = this._canvas.getContext('webgl', attributes) ||\n this._canvas.getContext('experimental-webgl', attributes);\n\n if (!gl) {\n this.fire('error', { error: new Error('Failed to initialize WebGL') });\n return;\n }\n\n this.painter = new Painter(gl, this.transform);\n }\n\n _contextLost(event ) {\n event.preventDefault();\n if (this._frameId) {\n browser.cancelFrame(this._frameId);\n this._frameId = null;\n }\n this.fire('webglcontextlost', {originalEvent: event});\n }\n\n _contextRestored(event ) {\n this._setupPainter();\n this.resize();\n this._update();\n this.fire('webglcontextrestored', {originalEvent: event});\n }\n\n /**\n * Returns a Boolean indicating whether the map is fully loaded.\n *\n * Returns `false` if the style is not yet fully loaded,\n * or if there has been a change to the sources or style that\n * has not yet fully loaded.\n *\n * @returns {boolean} A Boolean indicating whether the map is fully loaded.\n */\n loaded() {\n if (this._styleDirty || this._sourcesDirty)\n return false;\n if (!this.style || !this.style.loaded())\n return false;\n return true;\n }\n\n /**\n * Update this map's style and sources, and re-render the map.\n *\n * @param {boolean} updateStyle mark the map's style for reprocessing as\n * well as its sources\n * @returns {Map} this\n * @private\n */\n _update(updateStyle ) {\n if (!this.style) return;\n\n this._styleDirty = this._styleDirty || updateStyle;\n this._sourcesDirty = true;\n\n this._rerender();\n }\n\n /**\n * Call when a (re-)render of the map is required:\n * - The style has changed (`setPaintProperty()`, etc.)\n * - Source data has changed (e.g. tiles have finished loading)\n * - The map has is moving (or just finished moving)\n * - A transition is in progress\n *\n * @returns {Map} this\n * @private\n */\n _render() {\n if (this.isEasing()) {\n this._updateEase();\n }\n\n let crossFading = false;\n\n // If the style has changed, the map is being zoomed, or a transition or fade is in progress:\n // - Apply style changes (in a batch)\n // - Recalculate paint properties.\n if (this.style && this._styleDirty) {\n this._styleDirty = false;\n\n const zoom = this.transform.zoom;\n const now = browser.now();\n this.style.zoomHistory.update(zoom, now);\n\n const parameters = new EvaluationParameters(zoom, {\n now,\n fadeDuration: this._fadeDuration,\n zoomHistory: this.style.zoomHistory,\n transition: util.extend({ duration: 300, delay: 0 }, this.style.stylesheet.transition)\n });\n\n const factor = parameters.crossFadingFactor();\n if (factor !== 1 || factor !== this._crossFadingFactor) {\n crossFading = true;\n this._crossFadingFactor = factor;\n }\n\n this.style.update(parameters);\n }\n\n // If we are in _render for any reason other than an in-progress paint\n // transition, update source caches to check for and load any tiles we\n // need for the current transform\n if (this.style && this._sourcesDirty) {\n this._sourcesDirty = false;\n this.style._updateSources(this.transform);\n }\n\n this._placementDirty = this.style && this.style._updatePlacement(this.painter.transform, this.showCollisionBoxes, this._fadeDuration);\n\n // Actually draw\n this.painter.render(this.style, {\n showTileBoundaries: this.showTileBoundaries,\n showOverdrawInspector: this._showOverdrawInspector,\n rotating: this.rotating,\n zooming: this.zooming,\n fadeDuration: this._fadeDuration\n });\n\n this.fire('render');\n\n if (this.loaded() && !this._loaded) {\n this._loaded = true;\n this.fire('load');\n }\n\n if (this.style && (this.style.hasTransitions() || crossFading)) {\n this._styleDirty = true;\n }\n\n // Schedule another render frame if it's needed.\n //\n // Even though `_styleDirty` and `_sourcesDirty` are reset in this\n // method, synchronous events fired during Style#update or\n // Style#_updateSources could have caused them to be set again.\n if (this._sourcesDirty || this._repaint || this._styleDirty || this._placementDirty || this.isEasing()) {\n this._rerender();\n }\n\n return this;\n }\n\n /**\n * Clean up and release all internal resources associated with this map.\n *\n * This includes DOM elements, event bindings, web workers, and WebGL resources.\n *\n * Use this method when you are done using the map and wish to ensure that it no\n * longer consumes browser resources. Afterwards, you must not call any other\n * methods on the map.\n */\n remove() {\n if (this._hash) this._hash.remove();\n browser.cancelFrame(this._frameId);\n this._frameId = null;\n this.setStyle(null);\n if (typeof window !== 'undefined') {\n window.removeEventListener('resize', this._onWindowResize, false);\n window.removeEventListener('online', this._onWindowOnline, false);\n }\n const extension = this.painter.context.gl.getExtension('WEBGL_lose_context');\n if (extension) extension.loseContext();\n removeNode(this._canvasContainer);\n removeNode(this._controlContainer);\n removeNode(this._missingCSSContainer);\n this._container.classList.remove('mapboxgl-map');\n this.fire('remove');\n }\n\n _rerender() {\n if (this.style && !this._frameId) {\n this._frameId = browser.frame(() => {\n this._frameId = null;\n this._render();\n });\n }\n }\n\n _onWindowOnline() {\n this._update();\n }\n\n _onWindowResize() {\n if (this._trackResize) {\n this.stop().resize()._update();\n }\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will render an outline\n * around each tile. These tile boundaries are useful for debugging.\n *\n * @name showTileBoundaries\n * @type {boolean}\n * @instance\n * @memberof Map\n */\n get showTileBoundaries() { return !!this._showTileBoundaries; }\n set showTileBoundaries(value ) {\n if (this._showTileBoundaries === value) return;\n this._showTileBoundaries = value;\n this._update();\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will render boxes\n * around all symbols in the data source, revealing which symbols\n * were rendered or which were hidden due to collisions.\n * This information is useful for debugging.\n *\n * @name showCollisionBoxes\n * @type {boolean}\n * @instance\n * @memberof Map\n */\n get showCollisionBoxes() { return !!this._showCollisionBoxes; }\n set showCollisionBoxes(value ) {\n if (this._showCollisionBoxes === value) return;\n this._showCollisionBoxes = value;\n if (value) {\n // When we turn collision boxes on we have to generate them for existing tiles\n // When we turn them off, there's no cost to leaving existing boxes in place\n this.style._generateCollisionBoxes();\n } else {\n // Otherwise, call an update to remove collision boxes\n this._update();\n }\n }\n\n /*\n * Gets and sets a Boolean indicating whether the map should color-code\n * each fragment to show how many times it has been shaded.\n * White fragments have been shaded 8 or more times.\n * Black fragments have been shaded 0 times.\n * This information is useful for debugging.\n *\n * @name showOverdraw\n * @type {boolean}\n * @instance\n * @memberof Map\n */\n get showOverdrawInspector() { return !!this._showOverdrawInspector; }\n set showOverdrawInspector(value ) {\n if (this._showOverdrawInspector === value) return;\n this._showOverdrawInspector = value;\n this._update();\n }\n\n /**\n * Gets and sets a Boolean indicating whether the map will\n * continuously repaint. This information is useful for analyzing performance.\n *\n * @name repaint\n * @type {boolean}\n * @instance\n * @memberof Map\n */\n get repaint() { return !!this._repaint; }\n set repaint(value ) { this._repaint = value; this._update(); }\n\n // show vertices\n get vertices() { return !!this._vertices; }\n set vertices(value ) { this._vertices = value; this._update(); }\n\n _onData(event ) {\n this._update(event.dataType === 'style');\n this.fire(`${event.dataType}data`, event);\n }\n\n _onDataLoading(event ) {\n this.fire(`${event.dataType}dataloading`, event);\n }\n}\n\nmodule.exports = Map;\n\nfunction removeNode(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\n\n/**\n * Interface for interactive controls added to the map. This is an\n * specification for implementers to model: it is not\n * an exported method or class.\n *\n * Controls must implement `onAdd` and `onRemove`, and must own an\n * element, which is often a `div` element. To use Mapbox GL JS's\n * default control styling, add the `mapboxgl-ctrl` class to your control's\n * node.\n *\n * @interface IControl\n * @example\n * // Control implemented as ES6 class\n * class HelloWorldControl {\n * onAdd(map) {\n * this._map = map;\n * this._container = document.createElement('div');\n * this._container.className = 'mapboxgl-ctrl';\n * this._container.textContent = 'Hello, world';\n * return this._container;\n * }\n *\n * onRemove() {\n * this._container.parentNode.removeChild(this._container);\n * this._map = undefined;\n * }\n * }\n *\n * // Control implemented as ES5 prototypical class\n * function HelloWorldControl() { }\n *\n * HelloWorldControl.prototype.onAdd = function(map) {\n * this._map = map;\n * this._container = document.createElement('div');\n * this._container.className = 'mapboxgl-ctrl';\n * this._container.textContent = 'Hello, world';\n * return this._container;\n * };\n *\n * HelloWorldControl.prototype.onRemove = function () {\n * this._container.parentNode.removeChild(this._container);\n * this._map = undefined;\n * };\n */\n\n/**\n * Register a control on the map and give it a chance to register event listeners\n * and resources. This method is called by {@link Map#addControl}\n * internally.\n *\n * @function\n * @memberof IControl\n * @instance\n * @name onAdd\n * @param {Map} map the Map this control will be added to\n * @returns {HTMLElement} The control's container element. This should\n * be created by the control and returned by onAdd without being attached\n * to the DOM: the map will insert the control's element into the DOM\n * as necessary.\n */\n\n/**\n * Unregister a control on the map and give it a chance to detach event listeners\n * and resources. This method is called by {@link Map#removeControl}\n * internally.\n *\n * @function\n * @memberof IControl\n * @instance\n * @name onRemove\n * @param {Map} map the Map this control will be removed from\n * @returns {undefined} there is no required return value for this method\n */\n\n/**\n * Optionally provide a default position for this control. If this method\n * is implemented and {@link Map#addControl} is called without the `position`\n * parameter, the value returned by getDefaultPosition will be used as the\n * control's position.\n *\n * @function\n * @memberof IControl\n * @instance\n * @name getDefaultPosition\n * @returns {string} a control position, one of the values valid in addControl.\n */\n\n/**\n * A [`Point` geometry](https://github.com/mapbox/point-geometry) object, which has\n * `x` and `y` properties representing screen coordinates in pixels.\n *\n * @typedef {Object} Point\n */\n\n/**\n * A {@link Point} or an array of two numbers representing `x` and `y` screen coordinates in pixels.\n *\n * @typedef {(Point | Array<number>)} PointLike\n */\n","// \n\nconst DOM = require('../util/dom');\nconst LngLat = require('../geo/lng_lat');\nconst Point = require('@mapbox/point-geometry');\nconst smartWrap = require('../util/smart_wrap');\nconst {bindAll} = require('../util/util');\n\n \n \n \n \n\n/**\n * Creates a marker component\n * @param element DOM element to use as a marker. If left unspecified a default SVG will be created as the DOM element to use.\n * @param options\n * @param options.offset The offset in pixels as a {@link PointLike} object to apply relative to the element's center. Negatives indicate left and up.\n * @example\n * var marker = new mapboxgl.Marker()\n * .setLngLat([30.5, 50.5])\n * .addTo(map);\n * @see [Add custom icons with Markers](https://www.mapbox.com/mapbox-gl-js/example/custom-marker-icons/)\n */\nclass Marker {\n \n \n \n \n \n \n\n constructor(element , options ) {\n this._offset = Point.convert(options && options.offset || [0, 0]);\n\n bindAll(['_update', '_onMapClick'], this);\n\n if (!element) {\n element = DOM.create('div');\n\n // create default map marker SVG\n const svg = DOM.createNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttributeNS(null, 'height', '41px');\n svg.setAttributeNS(null, 'width', '27px');\n svg.setAttributeNS(null, 'viewBox', '0 0 27 41');\n\n const markerLarge = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n markerLarge.setAttributeNS(null, 'stroke', 'none');\n markerLarge.setAttributeNS(null, 'stroke-width', '1');\n markerLarge.setAttributeNS(null, 'fill', 'none');\n markerLarge.setAttributeNS(null, 'fill-rule', 'evenodd');\n\n const page1 = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n page1.setAttributeNS(null, 'fill-rule', 'nonzero');\n\n const shadow = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n shadow.setAttributeNS(null, 'transform', 'translate(3.0, 29.0)');\n shadow.setAttributeNS(null, 'fill', '#000000');\n\n const ellipses = [\n {'rx': '10.5', 'ry': '5.25002273'},\n {'rx': '10.5', 'ry': '5.25002273'},\n {'rx': '9.5', 'ry': '4.77275007'},\n {'rx': '8.5', 'ry': '4.29549936'},\n {'rx': '7.5', 'ry': '3.81822308'},\n {'rx': '6.5', 'ry': '3.34094679'},\n {'rx': '5.5', 'ry': '2.86367051'},\n {'rx': '4.5', 'ry': '2.38636864'}\n ];\n\n for (const data of ellipses) {\n const ellipse = DOM.createNS('http://www.w3.org/2000/svg', 'ellipse');\n ellipse.setAttributeNS(null, 'opacity', '0.04');\n ellipse.setAttributeNS(null, 'cx', '10.5');\n ellipse.setAttributeNS(null, 'cy', '5.80029008');\n ellipse.setAttributeNS(null, 'rx', data['rx']);\n ellipse.setAttributeNS(null, 'ry', data['ry']);\n shadow.appendChild(ellipse);\n }\n\n const background = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n background.setAttributeNS(null, 'fill', '#3FB1CE');\n\n const bgPath = DOM.createNS('http://www.w3.org/2000/svg', 'path');\n bgPath.setAttributeNS(null, 'd', 'M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z');\n\n background.appendChild(bgPath);\n\n const border = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n border.setAttributeNS(null, 'opacity', '0.25');\n border.setAttributeNS(null, 'fill', '#000000');\n\n const borderPath = DOM.createNS('http://www.w3.org/2000/svg', 'path');\n borderPath.setAttributeNS(null, 'd', 'M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z');\n\n border.appendChild(borderPath);\n\n const maki = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n maki.setAttributeNS(null, 'transform', 'translate(6.0, 7.0)');\n maki.setAttributeNS(null, 'fill', '#FFFFFF');\n\n const circleContainer = DOM.createNS('http://www.w3.org/2000/svg', 'g');\n circleContainer.setAttributeNS(null, 'transform', 'translate(8.0, 8.0)');\n\n const circle1 = DOM.createNS('http://www.w3.org/2000/svg', 'circle');\n circle1.setAttributeNS(null, 'fill', '#000000');\n circle1.setAttributeNS(null, 'opacity', '0.25');\n circle1.setAttributeNS(null, 'cx', '5.5');\n circle1.setAttributeNS(null, 'cy', '5.5');\n circle1.setAttributeNS(null, 'r', '5.4999962');\n\n const circle2 = DOM.createNS('http://www.w3.org/2000/svg', 'circle');\n circle2.setAttributeNS(null, 'fill', '#FFFFFF');\n circle2.setAttributeNS(null, 'cx', '5.5');\n circle2.setAttributeNS(null, 'cy', '5.5');\n circle2.setAttributeNS(null, 'r', '5.4999962');\n\n circleContainer.appendChild(circle1);\n circleContainer.appendChild(circle2);\n\n page1.appendChild(shadow);\n page1.appendChild(background);\n page1.appendChild(border);\n page1.appendChild(maki);\n page1.appendChild(circleContainer);\n\n svg.appendChild(page1);\n\n element.appendChild(svg);\n }\n\n element.classList.add('mapboxgl-marker');\n this._element = element;\n\n this._popup = null;\n }\n\n /**\n * Attaches the marker to a map\n * @param {Map} map\n * @returns {Marker} `this`\n */\n addTo(map ) {\n this.remove();\n this._map = map;\n map.getCanvasContainer().appendChild(this._element);\n map.on('move', this._update);\n map.on('moveend', this._update);\n this._update();\n\n // If we attached the `click` listener to the marker element, the popup\n // would close once the event propogated to `map` due to the\n // `Popup#_onClickClose` listener.\n this._map.on('click', this._onMapClick);\n\n return this;\n }\n\n /**\n * Removes the marker from a map\n * @example\n * var marker = new mapboxgl.Marker().addTo(map);\n * marker.remove();\n * @returns {Marker} `this`\n */\n remove() {\n if (this._map) {\n this._map.off('click', this._onMapClick);\n this._map.off('move', this._update);\n this._map.off('moveend', this._update);\n delete this._map;\n }\n DOM.remove(this._element);\n if (this._popup) this._popup.remove();\n return this;\n }\n\n /**\n * Get the marker's geographical location.\n *\n * The longitude of the result may differ by a multiple of 360 degrees from the longitude previously\n * set by `setLngLat` because `Marker` wraps the anchor longitude across copies of the world to keep\n * the marker on screen.\n *\n * @returns {LngLat}\n */\n getLngLat() {\n return this._lngLat;\n }\n\n /**\n * Set the marker's geographical position and move it.\n * @returns {Marker} `this`\n */\n setLngLat(lnglat ) {\n this._lngLat = LngLat.convert(lnglat);\n this._pos = null;\n if (this._popup) this._popup.setLngLat(this._lngLat);\n this._update();\n return this;\n }\n\n /**\n * Returns the `Marker`'s HTML element.\n * @returns {HTMLElement} element\n */\n getElement() {\n return this._element;\n }\n\n /**\n * Binds a Popup to the Marker\n * @param popup an instance of the `Popup` class. If undefined or null, any popup\n * set on this `Marker` instance is unset\n * @returns {Marker} `this`\n */\n setPopup(popup ) {\n if (this._popup) {\n this._popup.remove();\n this._popup = null;\n }\n\n if (popup) {\n if (!('offset' in popup.options)) {\n popup.options.offset = this._offset;\n }\n this._popup = popup;\n if (this._lngLat) this._popup.setLngLat(this._lngLat);\n }\n\n return this;\n }\n\n _onMapClick(event ) {\n const targetElement = event.originalEvent.target;\n const element = this._element;\n\n if (this._popup && (targetElement === element || element.contains((targetElement )))) {\n this.togglePopup();\n }\n }\n\n /**\n * Returns the Popup instance that is bound to the Marker\n * @returns {Popup} popup\n */\n getPopup() {\n return this._popup;\n }\n\n /**\n * Opens or closes the bound popup, depending on the current state\n * @returns {Marker} `this`\n */\n togglePopup() {\n const popup = this._popup;\n\n if (!popup) return this;\n else if (popup.isOpen()) popup.remove();\n else popup.addTo(this._map);\n return this;\n }\n\n _update(e ) {\n if (!this._map) return;\n\n if (this._map.transform.renderWorldCopies) {\n this._lngLat = smartWrap(this._lngLat, this._pos, this._map.transform);\n }\n\n this._pos = this._map.project(this._lngLat)._add(this._offset);\n\n // because rounding the coordinates at every `move` event causes stuttered zooming\n // we only round them when _update is called with `moveend` or when its called with\n // no arguments (when the Marker is initialized or Marker#setLngLat is invoked).\n if (!e || e.type === \"moveend\") {\n this._pos = this._pos.round();\n }\n\n DOM.setTransform(this._element, `translate(-50%, -50%) translate(${this._pos.x}px, ${this._pos.y}px)`);\n }\n\n /**\n * Get the marker's offset.\n * @returns {Point}\n */\n getOffset() {\n return this._offset;\n }\n\n /**\n * Sets the offset of the marker\n * @param {PointLike} offset The offset in pixels as a {@link PointLike} object to apply relative to the element's center. Negatives indicate left and up.\n * @returns {Marker} `this`\n */\n setOffset(offset ) {\n this._offset = Point.convert(offset);\n this._update();\n return this;\n }\n}\n\nmodule.exports = Marker;\n","// \n\nconst util = require('../util/util');\nconst Evented = require('../util/evented');\nconst DOM = require('../util/dom');\nconst LngLat = require('../geo/lng_lat');\nconst Point = require('@mapbox/point-geometry');\nconst window = require('../util/window');\nconst smartWrap = require('../util/smart_wrap');\n\n \n \n\nconst defaultOptions = {\n closeButton: true,\n closeOnClick: true\n};\n\n \n \n\n \n \n \n \n \n \n\n/**\n * A popup component.\n *\n * @param {Object} [options]\n * @param {boolean} [options.closeButton=true] If `true`, a close button will appear in the\n * top right corner of the popup.\n * @param {boolean} [options.closeOnClick=true] If `true`, the popup will closed when the\n * map is clicked.\n * @param {string} [options.anchor] - A string indicating the popup's location relative to\n * the coordinate set via {@link Popup#setLngLat}.\n * Options are `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-left'`,\n * `'top-right'`, `'bottom-left'`, and `'bottom-right'`. If unset the anchor will be\n * dynamically set to ensure the popup falls within the map container with a preference\n * for `'bottom'`.\n * @param {number|PointLike|Object} [options.offset] -\n * A pixel offset applied to the popup's location specified as:\n * - a single number specifying a distance from the popup's location\n * - a {@link PointLike} specifying a constant offset\n * - an object of {@link Point}s specifing an offset for each anchor position\n * Negative offsets indicate left and up.\n * @example\n * var markerHeight = 50, markerRadius = 10, linearOffset = 25;\n * var popupOffsets = {\n * 'top': [0, 0],\n * 'top-left': [0,0],\n * 'top-right': [0,0],\n * 'bottom': [0, -markerHeight],\n * 'bottom-left': [linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n * 'bottom-right': [-linearOffset, (markerHeight - markerRadius + linearOffset) * -1],\n * 'left': [markerRadius, (markerHeight - markerRadius) * -1],\n * 'right': [-markerRadius, (markerHeight - markerRadius) * -1]\n * };\n * var popup = new mapboxgl.Popup({offset:popupOffsets})\n * .setLngLat(e.lngLat)\n * .setHTML(\"<h1>Hello World!</h1>\")\n * .addTo(map);\n * @see [Display a popup](https://www.mapbox.com/mapbox-gl-js/example/popup/)\n * @see [Display a popup on hover](https://www.mapbox.com/mapbox-gl-js/example/popup-on-hover/)\n * @see [Display a popup on click](https://www.mapbox.com/mapbox-gl-js/example/popup-on-click/)\n */\nclass Popup extends Evented {\n \n \n \n \n \n \n \n \n\n constructor(options ) {\n super();\n this.options = util.extend(Object.create(defaultOptions), options);\n util.bindAll(['_update', '_onClickClose'], this);\n }\n\n /**\n * Adds the popup to a map.\n *\n * @param {Map} map The Mapbox GL JS map to add the popup to.\n * @returns {Popup} `this`\n */\n addTo(map ) {\n this._map = map;\n this._map.on('move', this._update);\n if (this.options.closeOnClick) {\n this._map.on('click', this._onClickClose);\n }\n this._update();\n return this;\n }\n\n /**\n * @returns {boolean} `true` if the popup is open, `false` if it is closed.\n */\n isOpen() {\n return !!this._map;\n }\n\n /**\n * Removes the popup from the map it has been added to.\n *\n * @example\n * var popup = new mapboxgl.Popup().addTo(map);\n * popup.remove();\n * @returns {Popup} `this`\n */\n remove() {\n if (this._content) {\n DOM.remove(this._content);\n }\n\n if (this._container) {\n DOM.remove(this._container);\n delete this._container;\n }\n\n if (this._map) {\n this._map.off('move', this._update);\n this._map.off('click', this._onClickClose);\n delete this._map;\n }\n\n /**\n * Fired when the popup is closed manually or programatically.\n *\n * @event close\n * @memberof Popup\n * @instance\n * @type {Object}\n * @property {Popup} popup object that was closed\n */\n this.fire('close');\n\n return this;\n }\n\n /**\n * Returns the geographical location of the popup's anchor.\n *\n * The longitude of the result may differ by a multiple of 360 degrees from the longitude previously\n * set by `setLngLat` because `Popup` wraps the anchor longitude across copies of the world to keep\n * the popup on screen.\n *\n * @returns {LngLat} The geographical location of the popup's anchor.\n */\n getLngLat() {\n return this._lngLat;\n }\n\n /**\n * Sets the geographical location of the popup's anchor, and moves the popup to it.\n *\n * @param lnglat The geographical location to set as the popup's anchor.\n * @returns {Popup} `this`\n */\n setLngLat(lnglat ) {\n this._lngLat = LngLat.convert(lnglat);\n this._pos = null;\n this._update();\n return this;\n }\n\n /**\n * Sets the popup's content to a string of text.\n *\n * This function creates a [Text](https://developer.mozilla.org/en-US/docs/Web/API/Text) node in the DOM,\n * so it cannot insert raw HTML. Use this method for security against XSS\n * if the popup content is user-provided.\n *\n * @param text Textual content for the popup.\n * @returns {Popup} `this`\n * @example\n * var popup = new mapboxgl.Popup()\n * .setLngLat(e.lngLat)\n * .setText('Hello, world!')\n * .addTo(map);\n */\n setText(text ) {\n return this.setDOMContent(window.document.createTextNode(text));\n }\n\n /**\n * Sets the popup's content to the HTML provided as a string.\n *\n * This method does not perform HTML filtering or sanitization, and must be\n * used only with trusted content. Consider {@link Popup#setText} if\n * the content is an untrusted text string.\n *\n * @param html A string representing HTML content for the popup.\n * @returns {Popup} `this`\n */\n setHTML(html ) {\n const frag = window.document.createDocumentFragment();\n const temp = window.document.createElement('body');\n let child;\n temp.innerHTML = html;\n while (true) {\n child = temp.firstChild;\n if (!child) break;\n frag.appendChild(child);\n }\n\n return this.setDOMContent(frag);\n }\n\n /**\n * Sets the popup's content to the element provided as a DOM node.\n *\n * @param htmlNode A DOM node to be used as content for the popup.\n * @returns {Popup} `this`\n * @example\n * // create an element with the popup content\n * var div = window.document.createElement('div');\n * div.innerHTML = 'Hello, world!';\n * var popup = new mapboxgl.Popup()\n * .setLngLat(e.lngLat)\n * .setDOMContent(div)\n * .addTo(map);\n */\n setDOMContent(htmlNode ) {\n this._createContent();\n this._content.appendChild(htmlNode);\n this._update();\n return this;\n }\n\n _createContent() {\n if (this._content) {\n DOM.remove(this._content);\n }\n\n this._content = DOM.create('div', 'mapboxgl-popup-content', this._container);\n\n if (this.options.closeButton) {\n this._closeButton = DOM.create('button', 'mapboxgl-popup-close-button', this._content);\n this._closeButton.type = 'button';\n this._closeButton.setAttribute('aria-label', 'Close popup');\n this._closeButton.innerHTML = '&#215;';\n this._closeButton.addEventListener('click', this._onClickClose);\n }\n }\n\n _update() {\n if (!this._map || !this._lngLat || !this._content) { return; }\n\n if (!this._container) {\n this._container = DOM.create('div', 'mapboxgl-popup', this._map.getContainer());\n this._tip = DOM.create('div', 'mapboxgl-popup-tip', this._container);\n this._container.appendChild(this._content);\n }\n\n if (this._map.transform.renderWorldCopies) {\n this._lngLat = smartWrap(this._lngLat, this._pos, this._map.transform);\n }\n\n const pos = this._pos = this._map.project(this._lngLat);\n\n let anchor = this.options.anchor;\n const offset = normalizeOffset(this.options.offset);\n\n if (!anchor) {\n const width = this._container.offsetWidth,\n height = this._container.offsetHeight;\n\n if (pos.y + offset.bottom.y < height) {\n anchor = ['top'];\n } else if (pos.y > this._map.transform.height - height) {\n anchor = ['bottom'];\n } else {\n anchor = [];\n }\n\n if (pos.x < width / 2) {\n anchor.push('left');\n } else if (pos.x > this._map.transform.width - width / 2) {\n anchor.push('right');\n }\n\n if (anchor.length === 0) {\n anchor = 'bottom';\n } else {\n anchor = anchor.join('-');\n }\n }\n\n const offsetedPos = pos.add(offset[anchor]).round();\n\n const anchorTranslate = {\n 'top': 'translate(-50%,0)',\n 'top-left': 'translate(0,0)',\n 'top-right': 'translate(-100%,0)',\n 'bottom': 'translate(-50%,-100%)',\n 'bottom-left': 'translate(0,-100%)',\n 'bottom-right': 'translate(-100%,-100%)',\n 'left': 'translate(0,-50%)',\n 'right': 'translate(-100%,-50%)'\n };\n\n const classList = this._container.classList;\n for (const key in anchorTranslate) {\n classList.remove(`mapboxgl-popup-anchor-${key}`);\n }\n classList.add(`mapboxgl-popup-anchor-${anchor}`);\n\n DOM.setTransform(this._container, `${anchorTranslate[anchor]} translate(${offsetedPos.x}px,${offsetedPos.y}px)`);\n }\n\n _onClickClose() {\n this.remove();\n }\n}\n\nfunction normalizeOffset(offset ) {\n if (!offset) {\n return normalizeOffset(new Point(0, 0));\n\n } else if (typeof offset === 'number') {\n // input specifies a radius from which to calculate offsets at all positions\n const cornerOffset = Math.round(Math.sqrt(0.5 * Math.pow(offset, 2)));\n return {\n 'top': new Point(0, offset),\n 'top-left': new Point(cornerOffset, cornerOffset),\n 'top-right': new Point(-cornerOffset, cornerOffset),\n 'bottom': new Point(0, -offset),\n 'bottom-left': new Point(cornerOffset, -cornerOffset),\n 'bottom-right': new Point(-cornerOffset, -cornerOffset),\n 'left': new Point(offset, 0),\n 'right': new Point(-offset, 0)\n };\n\n } else if (offset instanceof Point || Array.isArray(offset)) {\n // input specifies a single offset to be applied to all positions\n const convertedOffset = Point.convert(offset);\n return {\n 'top': convertedOffset,\n 'top-left': convertedOffset,\n 'top-right': convertedOffset,\n 'bottom': convertedOffset,\n 'bottom-left': convertedOffset,\n 'bottom-right': convertedOffset,\n 'left': convertedOffset,\n 'right': convertedOffset\n };\n\n } else {\n // input specifies an offset per position\n return {\n 'top': Point.convert(offset['top'] || [0, 0]),\n 'top-left': Point.convert(offset['top-left'] || [0, 0]),\n 'top-right': Point.convert(offset['top-right'] || [0, 0]),\n 'bottom': Point.convert(offset['bottom'] || [0, 0]),\n 'bottom-left': Point.convert(offset['bottom-left'] || [0, 0]),\n 'bottom-right': Point.convert(offset['bottom-right'] || [0, 0]),\n 'left': Point.convert(offset['left'] || [0, 0]),\n 'right': Point.convert(offset['right'] || [0, 0])\n };\n }\n}\n\nmodule.exports = Popup;\n","// \n\nconst util = require('./util');\nconst {serialize, deserialize} = require('./web_worker_transfer');\n\n \n\n/**\n * An implementation of the [Actor design pattern](http://en.wikipedia.org/wiki/Actor_model)\n * that maintains the relationship between asynchronous tasks and the objects\n * that spin them off - in this case, tasks like parsing parts of styles,\n * owned by the styles\n *\n * @param {WebWorker} target\n * @param {WebWorker} parent\n * @param {string|number} mapId A unique identifier for the Map instance using this Actor.\n * @private\n */\nclass Actor {\n \n \n \n \n \n \n\n constructor(target , parent , mapId ) {\n this.target = target;\n this.parent = parent;\n this.mapId = mapId;\n this.callbacks = {};\n this.callbackID = 0;\n util.bindAll(['receive'], this);\n this.target.addEventListener('message', this.receive, false);\n }\n\n /**\n * Sends a message from a main-thread map to a Worker or from a Worker back to\n * a main-thread map instance.\n *\n * @param type The name of the target method to invoke or '[source-type].name' for a method on a WorkerSource.\n * @param targetMapId A particular mapId to which to send this message.\n * @private\n */\n send(type , data , callback , targetMapId ) {\n const id = callback ? `${this.mapId}:${this.callbackID++}` : null;\n if (callback) this.callbacks[id] = callback;\n const buffers = [];\n this.target.postMessage({\n targetMapId: targetMapId,\n sourceMapId: this.mapId,\n type: type,\n id: String(id),\n data: serialize(data, buffers)\n }, buffers);\n }\n\n receive(message ) {\n const data = message.data,\n id = data.id;\n let callback;\n\n if (data.targetMapId && this.mapId !== data.targetMapId)\n return;\n\n const done = (err, data) => {\n const buffers = [];\n this.target.postMessage({\n sourceMapId: this.mapId,\n type: '<response>',\n id: String(id),\n error: err ? String(err) : null,\n data: serialize(data, buffers)\n }, buffers);\n };\n\n if (data.type === '<response>') {\n callback = this.callbacks[data.id];\n delete this.callbacks[data.id];\n if (callback && data.error) {\n callback(new Error(data.error));\n } else if (callback) {\n callback(null, deserialize(data.data));\n }\n } else if (typeof data.id !== 'undefined' && this.parent[data.type]) {\n // data.type == 'loadTile', 'removeTile', etc.\n this.parent[data.type](data.sourceMapId, deserialize(data.data), done);\n } else if (typeof data.id !== 'undefined' && this.parent.getWorkerSource) {\n // data.type == sourcetype.method\n const keys = data.type.split('.');\n const workerSource = (this.parent ).getWorkerSource(data.sourceMapId, keys[0]);\n workerSource[keys[1]](deserialize(data.data), done);\n } else {\n this.parent[data.type](deserialize(data.data));\n }\n }\n\n remove() {\n this.target.removeEventListener('message', this.receive, false);\n }\n}\n\nmodule.exports = Actor;\n","// \n\nconst window = require('./window');\n\n \n\n/**\n * The type of a resource.\n * @private\n * @readonly\n * @enum {string}\n */\nconst ResourceType = {\n Unknown: 'Unknown',\n Style: 'Style',\n Source: 'Source',\n Tile: 'Tile',\n Glyphs: 'Glyphs',\n SpriteImage: 'SpriteImage',\n SpriteJSON: 'SpriteJSON',\n Image: 'Image'\n};\nexports.ResourceType = ResourceType;\n\nif (typeof Object.freeze == 'function') {\n Object.freeze(ResourceType);\n}\n\n/**\n * A `RequestParameters` object to be returned from Map.options.transformRequest callbacks.\n * @typedef {Object} RequestParameters\n * @property {string} url The URL to be requested.\n * @property {Object} headers The headers to be sent with the request.\n * @property {string} credentials `'same-origin'|'include'` Use 'include' to send cookies with cross-origin requests.\n */\n \n \n \n \n \n\nclass AJAXError extends Error {\n \n constructor(message , status ) {\n super(message);\n this.status = status;\n }\n}\n\nfunction makeRequest(requestParameters ) {\n const xhr = new window.XMLHttpRequest();\n\n xhr.open('GET', requestParameters.url, true);\n for (const k in requestParameters.headers) {\n xhr.setRequestHeader(k, requestParameters.headers[k]);\n }\n xhr.withCredentials = requestParameters.credentials === 'include';\n return xhr;\n}\n\nexports.getJSON = function(requestParameters , callback ) {\n const xhr = makeRequest(requestParameters);\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.onerror = function() {\n callback(new Error(xhr.statusText));\n };\n xhr.onload = function() {\n if (xhr.status >= 200 && xhr.status < 300 && xhr.response) {\n let data;\n try {\n data = JSON.parse(xhr.response);\n } catch (err) {\n return callback(err);\n }\n callback(null, data);\n } else {\n callback(new AJAXError(xhr.statusText, xhr.status));\n }\n };\n xhr.send();\n return xhr;\n};\n\nexports.getArrayBuffer = function(requestParameters , callback ) {\n const xhr = makeRequest(requestParameters);\n xhr.responseType = 'arraybuffer';\n xhr.onerror = function() {\n callback(new Error(xhr.statusText));\n };\n xhr.onload = function() {\n const response = xhr.response;\n if (response.byteLength === 0 && xhr.status === 200) {\n return callback(new Error('http status 200 returned without content.'));\n }\n if (xhr.status >= 200 && xhr.status < 300 && xhr.response) {\n callback(null, {\n data: response,\n cacheControl: xhr.getResponseHeader('Cache-Control'),\n expires: xhr.getResponseHeader('Expires')\n });\n } else {\n callback(new AJAXError(xhr.statusText, xhr.status));\n }\n };\n xhr.send();\n return xhr;\n};\n\nfunction sameOrigin(url) {\n const a = window.document.createElement('a');\n a.href = url;\n return a.protocol === window.document.location.protocol && a.host === window.document.location.host;\n}\n\nconst transparentPngUrl = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=';\n\nexports.getImage = function(requestParameters , callback ) {\n // request the image with XHR to work around caching issues\n // see https://github.com/mapbox/mapbox-gl-js/issues/1470\n return exports.getArrayBuffer(requestParameters, (err, imgData) => {\n if (err) {\n callback(err);\n } else if (imgData) {\n const img = new window.Image();\n const URL = window.URL || window.webkitURL;\n img.onload = () => {\n callback(null, img);\n URL.revokeObjectURL(img.src);\n };\n const blob = new window.Blob([new Uint8Array(imgData.data)], { type: 'image/png' });\n (img ).cacheControl = imgData.cacheControl;\n (img ).expires = imgData.expires;\n img.src = imgData.data.byteLength ? URL.createObjectURL(blob) : transparentPngUrl;\n }\n });\n};\n\nexports.getVideo = function(urls , callback ) {\n const video = window.document.createElement('video');\n video.onloadstart = function() {\n callback(null, video);\n };\n for (let i = 0; i < urls.length; i++) {\n const s = window.document.createElement('source');\n if (!sameOrigin(urls[i])) {\n video.crossOrigin = 'Anonymous';\n }\n s.src = urls[i];\n video.appendChild(s);\n }\n return video;\n};\n","// \n\nconst window = require('./window');\n\nconst now = window.performance && window.performance.now ?\n window.performance.now.bind(window.performance) :\n Date.now.bind(Date);\n\nconst frame = window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.msRequestAnimationFrame;\n\nconst cancel = window.cancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n window.msCancelAnimationFrame;\n\n/**\n * @private\n */\nmodule.exports = {\n /**\n * Provides a function that outputs milliseconds: either performance.now()\n * or a fallback to Date.now()\n */\n now,\n\n frame(fn ) {\n return frame(fn);\n },\n\n cancelFrame(id ) {\n return cancel(id);\n },\n\n getImageData(img ) {\n const canvas = window.document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) {\n throw new Error('failed to create canvas 2d context');\n }\n canvas.width = img.width;\n canvas.height = img.height;\n context.drawImage(img, 0, 0, img.width, img.height);\n return context.getImageData(0, 0, img.width, img.height);\n },\n\n hardwareConcurrency: window.navigator.hardwareConcurrency || 4,\n\n get devicePixelRatio() { return window.devicePixelRatio; },\n\n supportsWebp: false\n};\n\nconst webpImgTest = window.document.createElement('img');\nwebpImgTest.onload = function() {\n module.exports.supportsWebp = true;\n};\nwebpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=';\n","// \n\nconst WebWorkify = require('webworkify');\nconst window = require('../window');\nconst workerURL = window.URL.createObjectURL(new WebWorkify(require('../../source/worker'), {bare: true}));\n\n \n\nmodule.exports = function () {\n return (new window.Worker(workerURL) );\n};\n","// \n\n/* eslint-env browser */\nmodule.exports = (self );\n","// \n\nconst quickselect = require('quickselect');\nconst calculateSignedArea = require('./util').calculateSignedArea;\n\n \n\n// classifies an array of rings into polygons with outer rings and holes\nmodule.exports = function classifyRings(rings , maxRings ) {\n const len = rings.length;\n\n if (len <= 1) return [rings];\n\n const polygons = [];\n let polygon,\n ccw;\n\n for (let i = 0; i < len; i++) {\n const area = calculateSignedArea(rings[i]);\n if (area === 0) continue;\n\n (rings[i] ).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 = [rings[i]];\n\n } else {\n (polygon ).push(rings[i]);\n }\n }\n if (polygon) polygons.push(polygon);\n\n // Earcut performance degrages 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(a, b) {\n return b.area - a.area;\n}\n","// \n\n \n \n \n \n \n\nconst config = {\n API_URL: 'https://api.mapbox.com',\n REQUIRE_ACCESS_TOKEN: true,\n ACCESS_TOKEN: null\n};\n\nmodule.exports = config;\n","// \n\nconst assert = require('assert');\n\nclass DictionaryCoder {\n \n \n\n constructor(strings ) {\n this._stringToNumber = {};\n this._numberToString = [];\n for (let i = 0; i < strings.length; i++) {\n const string = strings[i];\n this._stringToNumber[string] = i;\n this._numberToString[i] = string;\n }\n }\n\n encode(string ) {\n assert(string in this._stringToNumber);\n return this._stringToNumber[string];\n }\n\n decode(n ) {\n assert(n < this._numberToString.length);\n return this._numberToString[n];\n }\n}\n\nmodule.exports = DictionaryCoder;\n","// \n\nconst util = require('./util');\nconst Actor = require('./actor');\n\n \n\n/**\n * Responsible for sending messages from a {@link Source} to an associated\n * {@link WorkerSource}.\n *\n * @interface Dispatcher\n * @private\n */\nclass Dispatcher {\n \n \n \n \n\n constructor(workerPool , parent ) {\n this.workerPool = workerPool;\n this.actors = [];\n this.currentActor = 0;\n this.id = util.uniqueId();\n const workers = this.workerPool.acquire(this.id);\n for (let i = 0; i < workers.length; i++) {\n const worker = workers[i];\n const actor = new Actor(worker, parent, this.id);\n actor.name = `Worker ${i}`;\n this.actors.push(actor);\n }\n }\n\n /**\n * Broadcast a message to all Workers.\n */\n broadcast(type , data , cb ) {\n cb = cb || function () {};\n util.asyncAll(this.actors, (actor, done) => {\n actor.send(type, data, done);\n }, cb);\n }\n\n /**\n * Send a message to a Worker.\n * @param targetID The ID of the Worker to which to send this message. Omit to allow the dispatcher to choose.\n * @returns The ID of the worker to which the message was sent.\n */\n send(type , data , callback , targetID ) {\n if (typeof targetID !== 'number' || isNaN(targetID)) {\n // Use round robin to send requests to web workers.\n targetID = this.currentActor = (this.currentActor + 1) % this.actors.length;\n }\n\n this.actors[targetID].send(type, data, callback);\n return targetID;\n }\n\n remove() {\n this.actors.forEach((actor) => { actor.remove(); });\n this.actors = [];\n this.workerPool.release(this.id);\n }\n}\n\nmodule.exports = Dispatcher;\n","// \n\nconst Point = require('@mapbox/point-geometry');\nconst window = require('./window');\n\nexports.create = function (tagName , className , container ) {\n const el = window.document.createElement(tagName);\n if (className) el.className = className;\n if (container) container.appendChild(el);\n return el;\n};\n\nexports.createNS = function (namespaceURI , tagName ) {\n const el = window.document.createElementNS(namespaceURI, tagName);\n return el;\n};\n\nconst docStyle = (window.document.documentElement ).style;\n\nfunction testProp(props) {\n for (let i = 0; i < props.length; i++) {\n if (props[i] in docStyle) {\n return props[i];\n }\n }\n return props[0];\n}\n\nconst selectProp = testProp(['userSelect', 'MozUserSelect', 'WebkitUserSelect', 'msUserSelect']);\nlet userSelect;\nexports.disableDrag = function () {\n if (selectProp) {\n userSelect = docStyle[selectProp];\n docStyle[selectProp] = 'none';\n }\n};\nexports.enableDrag = function () {\n if (selectProp) {\n docStyle[selectProp] = userSelect;\n }\n};\n\nconst transformProp = testProp(['transform', 'WebkitTransform']);\nexports.setTransform = function(el , value ) {\n (el.style )[transformProp] = value;\n};\n\n// Suppress the next click, but only if it's immediate.\nconst suppressClick = function (e) {\n e.preventDefault();\n e.stopPropagation();\n window.removeEventListener('click', suppressClick, true);\n};\n\nexports.suppressClick = function() {\n window.addEventListener('click', suppressClick, true);\n window.setTimeout(() => {\n window.removeEventListener('click', suppressClick, true);\n }, 0);\n};\n\nexports.mousePos = function (el , e ) {\n const rect = el.getBoundingClientRect();\n e = e.touches ? e.touches[0] : e;\n return new Point(\n e.clientX - rect.left - el.clientLeft,\n e.clientY - rect.top - el.clientTop\n );\n};\n\nexports.touchPos = function (el , e ) {\n const rect = el.getBoundingClientRect(),\n points = [];\n const touches = (e.type === 'touchend') ? e.changedTouches : e.touches;\n for (let i = 0; i < touches.length; i++) {\n points.push(new Point(\n touches[i].clientX - rect.left - el.clientLeft,\n touches[i].clientY - rect.top - el.clientTop\n ));\n }\n return points;\n};\n\nexports.remove = function(node ) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n};\n","// \n\nconst util = require('./util');\n\n \n \n\nfunction _addEventListener(type , listener , listenerList ) {\n listenerList[type] = listenerList[type] || [];\n listenerList[type].push(listener);\n}\n\nfunction _removeEventListener(type , listener , listenerList ) {\n if (listenerList && listenerList[type]) {\n const index = listenerList[type].indexOf(listener);\n if (index !== -1) {\n listenerList[type].splice(index, 1);\n }\n }\n}\n\n/**\n * Methods mixed in to other classes for event capabilities.\n *\n * @mixin Evented\n */\nclass Evented {\n \n \n \n \n\n /**\n * Adds a listener to a specified event type.\n *\n * @param {string} type The event type to add a listen for.\n * @param {Function} listener The function to be called when the event is fired.\n * The listener function is called with the data object passed to `fire`,\n * extended with `target` and `type` properties.\n * @returns {Object} `this`\n */\n on(type , listener ) {\n this._listeners = this._listeners || {};\n _addEventListener(type, listener, this._listeners);\n\n return this;\n }\n\n /**\n * Removes a previously registered event listener.\n *\n * @param {string} type The event type to remove listeners for.\n * @param {Function} listener The listener function to remove.\n * @returns {Object} `this`\n */\n off(type , listener ) {\n _removeEventListener(type, listener, this._listeners);\n _removeEventListener(type, listener, this._oneTimeListeners);\n\n return this;\n }\n\n /**\n * Adds a listener that will be called only once to a specified event type.\n *\n * The listener will be called first time the event fires after the listener is registered.\n *\n * @param {string} type The event type to listen for.\n * @param {Function} listener The function to be called when the event is fired the first time.\n * @returns {Object} `this`\n */\n once(type , listener ) {\n this._oneTimeListeners = this._oneTimeListeners || {};\n _addEventListener(type, listener, this._oneTimeListeners);\n\n return this;\n }\n\n /**\n * Fires an event of the specified type.\n *\n * @param {string} type The type of event to fire.\n * @param {Object} [data] Data to be passed to any listeners.\n * @returns {Object} `this`\n */\n fire(type , data ) {\n if (this.listens(type)) {\n data = util.extend({}, data, {type: type, target: this});\n\n // make sure adding or removing listeners inside other listeners won't cause an infinite loop\n const listeners = this._listeners && this._listeners[type] ? this._listeners[type].slice() : [];\n for (const listener of listeners) {\n listener.call(this, data);\n }\n\n const oneTimeListeners = this._oneTimeListeners && this._oneTimeListeners[type] ? this._oneTimeListeners[type].slice() : [];\n for (const listener of oneTimeListeners) {\n _removeEventListener(type, listener, this._oneTimeListeners);\n listener.call(this, data);\n }\n\n if (this._eventedParent) {\n this._eventedParent.fire(type, util.extend({}, data, typeof this._eventedParentData === 'function' ? this._eventedParentData() : this._eventedParentData));\n }\n\n // To ensure that no error events are dropped, print them to the\n // console if they have no listeners.\n } else if (util.endsWith(type, 'error')) {\n console.error((data && data.error) || data || 'Empty error event');\n }\n\n return this;\n }\n\n /**\n * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.\n *\n * @param {string} type The event type\n * @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise\n */\n listens(type ) {\n return (\n (this._listeners && this._listeners[type] && this._listeners[type].length > 0) ||\n (this._oneTimeListeners && this._oneTimeListeners[type] && this._oneTimeListeners[type].length > 0) ||\n (this._eventedParent && this._eventedParent.listens(type))\n );\n }\n\n /**\n * Bubble all events fired by this instance of Evented to this parent instance of Evented.\n *\n * @private\n * @returns {Object} `this`\n */\n setEventedParent(parent , data ) {\n this._eventedParent = parent;\n this._eventedParentData = data;\n\n return this;\n }\n}\n\nmodule.exports = Evented;\n","// \n\nconst Queue = require('tinyqueue');\nconst Point = require('@mapbox/point-geometry');\nconst distToSegmentSquared = require('./intersection_tests').distToSegmentSquared;\n\n/**\n * Finds an approximation of a polygon's Pole Of Inaccessibiliy https://en.wikipedia.org/wiki/Pole_of_inaccessibility\n * This is a copy of http://github.com/mapbox/polylabel adapted to use Points\n *\n * @param polygonRings first item in array is the outer ring followed optionally by the list of holes, should be an element of the result of util/classify_rings\n * @param precision Specified in input coordinate units. If 0 returns after first run, if > 0 repeatedly narrows the search space until the radius of the area searched for the best pole is less than precision\n * @param debug Print some statistics to the console during execution\n * @returns Pole of Inaccessibiliy.\n * @private\n */\nmodule.exports = function (polygonRings , precision = 1, debug = false) {\n // find the bounding box of the outer ring\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n const outerRing = polygonRings[0];\n for (let i = 0; i < outerRing.length; i++) {\n const p = outerRing[i];\n if (!i || p.x < minX) minX = p.x;\n if (!i || p.y < minY) minY = p.y;\n if (!i || p.x > maxX) maxX = p.x;\n if (!i || p.y > maxY) maxY = p.y;\n }\n\n const width = maxX - minX;\n const height = maxY - minY;\n const cellSize = Math.min(width, height);\n let h = cellSize / 2;\n\n // a priority queue of cells in order of their \"potential\" (max distance to polygon)\n const cellQueue = new Queue(null, compareMax);\n\n if (cellSize === 0) return new Point(minX, minY);\n\n // cover polygon with initial cells\n for (let x = minX; x < maxX; x += cellSize) {\n for (let y = minY; y < maxY; y += cellSize) {\n cellQueue.push(new Cell(x + h, y + h, h, polygonRings));\n }\n }\n\n // take centroid as the first best guess\n let bestCell = getCentroidCell(polygonRings);\n let numProbes = cellQueue.length;\n\n while (cellQueue.length) {\n // pick the most promising cell from the queue\n const cell = cellQueue.pop();\n\n // update the best cell if we found a better one\n if (cell.d > bestCell.d || !bestCell.d) {\n bestCell = cell;\n if (debug) console.log('found best %d after %d probes', Math.round(1e4 * cell.d) / 1e4, numProbes);\n }\n\n // do not drill down further if there's no chance of a better solution\n if (cell.max - bestCell.d <= precision) continue;\n\n // split the cell into four cells\n h = cell.h / 2;\n cellQueue.push(new Cell(cell.p.x - h, cell.p.y - h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x + h, cell.p.y - h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x - h, cell.p.y + h, h, polygonRings));\n cellQueue.push(new Cell(cell.p.x + h, cell.p.y + h, h, polygonRings));\n numProbes += 4;\n }\n\n if (debug) {\n console.log(`num probes: ${numProbes}`);\n console.log(`best distance: ${bestCell.d}`);\n }\n\n return bestCell.p;\n};\n\nfunction compareMax(a, b) {\n return b.max - a.max;\n}\n\nfunction Cell(x, y, h, polygon) {\n this.p = new Point(x, y);\n this.h = h; // half the cell size\n this.d = pointToPolygonDist(this.p, polygon); // distance from cell center to polygon\n this.max = this.d + this.h * Math.SQRT2; // max distance to polygon within a cell\n}\n\n// signed distance from point to polygon outline (negative if point is outside)\nfunction pointToPolygonDist(p, polygon) {\n let inside = false;\n let minDistSq = Infinity;\n\n for (let k = 0; k < polygon.length; k++) {\n const ring = polygon[k];\n\n for (let i = 0, len = ring.length, j = len - 1; i < len; j = i++) {\n const a = ring[i];\n const b = ring[j];\n\n if ((a.y > p.y !== b.y > p.y) &&\n (p.x < (b.x - a.x) * (p.y - a.y) / (b.y - a.y) + a.x)) inside = !inside;\n\n minDistSq = Math.min(minDistSq, distToSegmentSquared(p, a, b));\n }\n }\n\n return (inside ? 1 : -1) * Math.sqrt(minDistSq);\n}\n\n// get polygon centroid\nfunction getCentroidCell(polygon) {\n let area = 0;\n let x = 0;\n let y = 0;\n const points = polygon[0];\n for (let i = 0, len = points.length, j = len - 1; i < len; j = i++) {\n const a = points[i];\n const b = points[j];\n const f = a.x * b.y - b.x * a.y;\n x += (a.x + b.x) * f;\n y += (a.y + b.y) * f;\n area += f * 3;\n }\n return new Cell(x / area, y / area, 0, polygon);\n}\n","// \n\nconst WorkerPool = require('./worker_pool');\n\nlet globalWorkerPool;\n\n/**\n * Creates (if necessary) and returns the single, global WorkerPool instance\n * to be shared across each Map\n * @private\n */\nmodule.exports = function getGlobalWorkerPool () {\n if (!globalWorkerPool) {\n globalWorkerPool = new WorkerPool();\n }\n return globalWorkerPool;\n};\n","// \n\nconst assert = require('assert');\nconst {register} = require('./web_worker_transfer');\n\n \n \n \n \n\n \n \n \n \n\nfunction createImage(image , {width, height} , channels , data ) {\n if (!data) {\n data = new Uint8Array(width * height * channels);\n } else if (data.length !== width * height * channels) {\n throw new RangeError('mismatched image size');\n }\n image.width = width;\n image.height = height;\n image.data = data;\n return image;\n}\n\nfunction resizeImage(image , {width, height} , channels ) {\n if (width === image.width && height === image.height) {\n return;\n }\n\n const newImage = createImage({}, {width, height}, channels);\n\n copyImage(image, newImage, {x: 0, y: 0}, {x: 0, y: 0}, {\n width: Math.min(image.width, width),\n height: Math.min(image.height, height)\n }, channels);\n\n image.width = width;\n image.height = height;\n image.data = newImage.data;\n}\n\nfunction copyImage(srcImg , dstImg , srcPt , dstPt , size , channels ) {\n if (size.width === 0 || size.height === 0) {\n return dstImg;\n }\n\n if (size.width > srcImg.width ||\n size.height > srcImg.height ||\n srcPt.x > srcImg.width - size.width ||\n srcPt.y > srcImg.height - size.height) {\n throw new RangeError('out of range source coordinates for image copy');\n }\n\n if (size.width > dstImg.width ||\n size.height > dstImg.height ||\n dstPt.x > dstImg.width - size.width ||\n dstPt.y > dstImg.height - size.height) {\n throw new RangeError('out of range destination coordinates for image copy');\n }\n\n const srcData = srcImg.data;\n const dstData = dstImg.data;\n\n assert(srcData !== dstData);\n\n for (let y = 0; y < size.height; y++) {\n const srcOffset = ((srcPt.y + y) * srcImg.width + srcPt.x) * channels;\n const dstOffset = ((dstPt.y + y) * dstImg.width + dstPt.x) * channels;\n for (let i = 0; i < size.width * channels; i++) {\n dstData[dstOffset + i] = srcData[srcOffset + i];\n }\n }\n\n return dstImg;\n}\n\nclass AlphaImage {\n \n \n \n\n constructor(size , data ) {\n createImage(this, size, 1, data);\n }\n\n resize(size ) {\n resizeImage(this, size, 1);\n }\n\n clone() {\n return new AlphaImage({width: this.width, height: this.height}, new Uint8Array(this.data));\n }\n\n static copy(srcImg , dstImg , srcPt , dstPt , size ) {\n copyImage(srcImg, dstImg, srcPt, dstPt, size, 1);\n }\n}\n\n// Not premultiplied, because ImageData is not premultiplied.\n// UNPACK_PREMULTIPLY_ALPHA_WEBGL must be used when uploading to a texture.\nclass RGBAImage {\n \n \n \n\n constructor(size , data ) {\n createImage(this, size, 4, data);\n }\n\n resize(size ) {\n resizeImage(this, size, 4);\n }\n\n clone() {\n return new RGBAImage({width: this.width, height: this.height}, new Uint8Array(this.data));\n }\n\n static copy(srcImg , dstImg , srcPt , dstPt , size ) {\n copyImage(srcImg, dstImg, srcPt, dstPt, size, 4);\n }\n}\n\nregister('AlphaImage', AlphaImage);\nregister('RGBAImage', RGBAImage);\n\nmodule.exports = {\n AlphaImage,\n RGBAImage\n};\n","// \n\nconst {isCounterClockwise} = require('./util');\n\n \n\nmodule.exports = {\n multiPolygonIntersectsBufferedMultiPoint,\n multiPolygonIntersectsMultiPolygon,\n multiPolygonIntersectsBufferedMultiLine,\n polygonIntersectsPolygon,\n distToSegmentSquared\n};\n\n \n \n \n \n \n\nfunction polygonIntersectsPolygon(polygonA , polygonB ) {\n for (let i = 0; i < polygonA.length; i++) {\n if (polygonContainsPoint(polygonB, polygonA[i])) return true;\n }\n\n for (let i = 0; i < polygonB.length; i++) {\n if (polygonContainsPoint(polygonA, polygonB[i])) return true;\n }\n\n if (lineIntersectsLine(polygonA, polygonB)) return true;\n\n return false;\n}\n\nfunction multiPolygonIntersectsBufferedMultiPoint(multiPolygon , rings , radius ) {\n for (let j = 0; j < multiPolygon.length; j++) {\n const polygon = multiPolygon[j];\n for (let i = 0; i < rings.length; i++) {\n const ring = rings[i];\n for (let k = 0; k < ring.length; k++) {\n const point = ring[k];\n if (polygonContainsPoint(polygon, point)) return true;\n if (pointIntersectsBufferedLine(point, polygon, radius)) return true;\n }\n }\n }\n return false;\n}\n\nfunction multiPolygonIntersectsMultiPolygon(multiPolygonA , multiPolygonB ) {\n\n if (multiPolygonA.length === 1 && multiPolygonA[0].length === 1) {\n return multiPolygonContainsPoint(multiPolygonB, multiPolygonA[0][0]);\n }\n\n for (let m = 0; m < multiPolygonB.length; m++) {\n const ring = multiPolygonB[m];\n for (let n = 0; n < ring.length; n++) {\n if (multiPolygonContainsPoint(multiPolygonA, ring[n])) return true;\n }\n }\n\n for (let j = 0; j < multiPolygonA.length; j++) {\n const polygon = multiPolygonA[j];\n for (let i = 0; i < polygon.length; i++) {\n if (multiPolygonContainsPoint(multiPolygonB, polygon[i])) return true;\n }\n\n for (let k = 0; k < multiPolygonB.length; k++) {\n if (lineIntersectsLine(polygon, multiPolygonB[k])) return true;\n }\n }\n\n return false;\n}\n\nfunction multiPolygonIntersectsBufferedMultiLine(multiPolygon , multiLine , radius ) {\n for (let i = 0; i < multiLine.length; i++) {\n const line = multiLine[i];\n\n for (let j = 0; j < multiPolygon.length; j++) {\n const polygon = multiPolygon[j];\n\n if (polygon.length >= 3) {\n for (let k = 0; k < line.length; k++) {\n if (polygonContainsPoint(polygon, line[k])) return true;\n }\n }\n\n if (lineIntersectsBufferedLine(polygon, line, radius)) return true;\n }\n }\n return false;\n}\n\nfunction lineIntersectsBufferedLine(lineA , lineB , radius ) {\n\n if (lineA.length > 1) {\n if (lineIntersectsLine(lineA, lineB)) return true;\n\n // Check whether any point in either line is within radius of the other line\n for (let j = 0; j < lineB.length; j++) {\n if (pointIntersectsBufferedLine(lineB[j], lineA, radius)) return true;\n }\n }\n\n for (let k = 0; k < lineA.length; k++) {\n if (pointIntersectsBufferedLine(lineA[k], lineB, radius)) return true;\n }\n\n return false;\n}\n\nfunction lineIntersectsLine(lineA , lineB ) {\n if (lineA.length === 0 || lineB.length === 0) return false;\n for (let i = 0; i < lineA.length - 1; i++) {\n const a0 = lineA[i];\n const a1 = lineA[i + 1];\n for (let j = 0; j < lineB.length - 1; j++) {\n const b0 = lineB[j];\n const b1 = lineB[j + 1];\n if (lineSegmentIntersectsLineSegment(a0, a1, b0, b1)) return true;\n }\n }\n return false;\n}\n\nfunction lineSegmentIntersectsLineSegment(a0 , a1 , b0 , b1 ) {\n return isCounterClockwise(a0, b0, b1) !== isCounterClockwise(a1, b0, b1) &&\n isCounterClockwise(a0, a1, b0) !== isCounterClockwise(a0, a1, b1);\n}\n\nfunction pointIntersectsBufferedLine(p , line , radius ) {\n const radiusSquared = radius * radius;\n\n if (line.length === 1) return p.distSqr(line[0]) < radiusSquared;\n\n for (let i = 1; i < line.length; i++) {\n // Find line segments that have a distance <= radius^2 to p\n // In that case, we treat the line as \"containing point p\".\n const v = line[i - 1], w = line[i];\n if (distToSegmentSquared(p, v, w) < radiusSquared) return true;\n }\n return false;\n}\n\n// Code from http://stackoverflow.com/a/1501725/331379.\nfunction distToSegmentSquared(p , v , w ) {\n const l2 = v.distSqr(w);\n if (l2 === 0) return p.distSqr(v);\n const t = ((p.x - v.x) * (w.x - v.x) + (p.y - v.y) * (w.y - v.y)) / l2;\n if (t < 0) return p.distSqr(v);\n if (t > 1) return p.distSqr(w);\n return p.distSqr(w.sub(v)._mult(t)._add(v));\n}\n\n// point in polygon ray casting algorithm\nfunction multiPolygonContainsPoint(rings , p ) {\n let c = false,\n ring, p1, p2;\n\n for (let k = 0; k < rings.length; k++) {\n ring = rings[k];\n for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n c = !c;\n }\n }\n }\n return c;\n}\n\nfunction polygonContainsPoint(ring , p ) {\n let c = false;\n for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n const p1 = ring[i];\n const p2 = ring[j];\n if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n c = !c;\n }\n }\n return c;\n}\n","// \n\n// The following table comes from <http://www.unicode.org/Public/10.0.0/ucd/Blocks.txt>.\n// Keep it synchronized with <http://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt>.\n\n \n\nconst unicodeBlockLookup = {\n // 'Basic Latin': (char) => char >= 0x0000 && char <= 0x007F,\n 'Latin-1 Supplement': (char) => char >= 0x0080 && char <= 0x00FF,\n // 'Latin Extended-A': (char) => char >= 0x0100 && char <= 0x017F,\n // 'Latin Extended-B': (char) => char >= 0x0180 && char <= 0x024F,\n // 'IPA Extensions': (char) => char >= 0x0250 && char <= 0x02AF,\n // 'Spacing Modifier Letters': (char) => char >= 0x02B0 && char <= 0x02FF,\n // 'Combining Diacritical Marks': (char) => char >= 0x0300 && char <= 0x036F,\n // 'Greek and Coptic': (char) => char >= 0x0370 && char <= 0x03FF,\n // 'Cyrillic': (char) => char >= 0x0400 && char <= 0x04FF,\n // 'Cyrillic Supplement': (char) => char >= 0x0500 && char <= 0x052F,\n // 'Armenian': (char) => char >= 0x0530 && char <= 0x058F,\n //'Hebrew': (char) => char >= 0x0590 && char <= 0x05FF,\n 'Arabic': (char) => char >= 0x0600 && char <= 0x06FF,\n //'Syriac': (char) => char >= 0x0700 && char <= 0x074F,\n 'Arabic Supplement': (char) => char >= 0x0750 && char <= 0x077F,\n // 'Thaana': (char) => char >= 0x0780 && char <= 0x07BF,\n // 'NKo': (char) => char >= 0x07C0 && char <= 0x07FF,\n // 'Samaritan': (char) => char >= 0x0800 && char <= 0x083F,\n // 'Mandaic': (char) => char >= 0x0840 && char <= 0x085F,\n // 'Syriac Supplement': (char) => char >= 0x0860 && char <= 0x086F,\n 'Arabic Extended-A': (char) => char >= 0x08A0 && char <= 0x08FF,\n // 'Devanagari': (char) => char >= 0x0900 && char <= 0x097F,\n // 'Bengali': (char) => char >= 0x0980 && char <= 0x09FF,\n // 'Gurmukhi': (char) => char >= 0x0A00 && char <= 0x0A7F,\n // 'Gujarati': (char) => char >= 0x0A80 && char <= 0x0AFF,\n // 'Oriya': (char) => char >= 0x0B00 && char <= 0x0B7F,\n // 'Tamil': (char) => char >= 0x0B80 && char <= 0x0BFF,\n // 'Telugu': (char) => char >= 0x0C00 && char <= 0x0C7F,\n // 'Kannada': (char) => char >= 0x0C80 && char <= 0x0CFF,\n // 'Malayalam': (char) => char >= 0x0D00 && char <= 0x0D7F,\n // 'Sinhala': (char) => char >= 0x0D80 && char <= 0x0DFF,\n // 'Thai': (char) => char >= 0x0E00 && char <= 0x0E7F,\n // 'Lao': (char) => char >= 0x0E80 && char <= 0x0EFF,\n // 'Tibetan': (char) => char >= 0x0F00 && char <= 0x0FFF,\n // 'Myanmar': (char) => char >= 0x1000 && char <= 0x109F,\n // 'Georgian': (char) => char >= 0x10A0 && char <= 0x10FF,\n 'Hangul Jamo': (char) => char >= 0x1100 && char <= 0x11FF,\n // 'Ethiopic': (char) => char >= 0x1200 && char <= 0x137F,\n // 'Ethiopic Supplement': (char) => char >= 0x1380 && char <= 0x139F,\n // 'Cherokee': (char) => char >= 0x13A0 && char <= 0x13FF,\n 'Unified Canadian Aboriginal Syllabics': (char) => char >= 0x1400 && char <= 0x167F,\n // 'Ogham': (char) => char >= 0x1680 && char <= 0x169F,\n // 'Runic': (char) => char >= 0x16A0 && char <= 0x16FF,\n // 'Tagalog': (char) => char >= 0x1700 && char <= 0x171F,\n // 'Hanunoo': (char) => char >= 0x1720 && char <= 0x173F,\n // 'Buhid': (char) => char >= 0x1740 && char <= 0x175F,\n // 'Tagbanwa': (char) => char >= 0x1760 && char <= 0x177F,\n // 'Khmer': (char) => char >= 0x1780 && char <= 0x17FF,\n // 'Mongolian': (char) => char >= 0x1800 && char <= 0x18AF,\n 'Unified Canadian Aboriginal Syllabics Extended': (char) => char >= 0x18B0 && char <= 0x18FF,\n // 'Limbu': (char) => char >= 0x1900 && char <= 0x194F,\n // 'Tai Le': (char) => char >= 0x1950 && char <= 0x197F,\n // 'New Tai Lue': (char) => char >= 0x1980 && char <= 0x19DF,\n // 'Khmer Symbols': (char) => char >= 0x19E0 && char <= 0x19FF,\n // 'Buginese': (char) => char >= 0x1A00 && char <= 0x1A1F,\n // 'Tai Tham': (char) => char >= 0x1A20 && char <= 0x1AAF,\n // 'Combining Diacritical Marks Extended': (char) => char >= 0x1AB0 && char <= 0x1AFF,\n // 'Balinese': (char) => char >= 0x1B00 && char <= 0x1B7F,\n // 'Sundanese': (char) => char >= 0x1B80 && char <= 0x1BBF,\n // 'Batak': (char) => char >= 0x1BC0 && char <= 0x1BFF,\n // 'Lepcha': (char) => char >= 0x1C00 && char <= 0x1C4F,\n // 'Ol Chiki': (char) => char >= 0x1C50 && char <= 0x1C7F,\n // 'Cyrillic Extended-C': (char) => char >= 0x1C80 && char <= 0x1C8F,\n // 'Sundanese Supplement': (char) => char >= 0x1CC0 && char <= 0x1CCF,\n // 'Vedic Extensions': (char) => char >= 0x1CD0 && char <= 0x1CFF,\n // 'Phonetic Extensions': (char) => char >= 0x1D00 && char <= 0x1D7F,\n // 'Phonetic Extensions Supplement': (char) => char >= 0x1D80 && char <= 0x1DBF,\n // 'Combining Diacritical Marks Supplement': (char) => char >= 0x1DC0 && char <= 0x1DFF,\n // 'Latin Extended Additional': (char) => char >= 0x1E00 && char <= 0x1EFF,\n // 'Greek Extended': (char) => char >= 0x1F00 && char <= 0x1FFF,\n 'General Punctuation': (char) => char >= 0x2000 && char <= 0x206F,\n // 'Superscripts and Subscripts': (char) => char >= 0x2070 && char <= 0x209F,\n // 'Currency Symbols': (char) => char >= 0x20A0 && char <= 0x20CF,\n // 'Combining Diacritical Marks for Symbols': (char) => char >= 0x20D0 && char <= 0x20FF,\n 'Letterlike Symbols': (char) => char >= 0x2100 && char <= 0x214F,\n 'Number Forms': (char) => char >= 0x2150 && char <= 0x218F,\n // 'Arrows': (char) => char >= 0x2190 && char <= 0x21FF,\n // 'Mathematical Operators': (char) => char >= 0x2200 && char <= 0x22FF,\n 'Miscellaneous Technical': (char) => char >= 0x2300 && char <= 0x23FF,\n 'Control Pictures': (char) => char >= 0x2400 && char <= 0x243F,\n 'Optical Character Recognition': (char) => char >= 0x2440 && char <= 0x245F,\n 'Enclosed Alphanumerics': (char) => char >= 0x2460 && char <= 0x24FF,\n // 'Box Drawing': (char) => char >= 0x2500 && char <= 0x257F,\n // 'Block Elements': (char) => char >= 0x2580 && char <= 0x259F,\n 'Geometric Shapes': (char) => char >= 0x25A0 && char <= 0x25FF,\n 'Miscellaneous Symbols': (char) => char >= 0x2600 && char <= 0x26FF,\n // 'Dingbats': (char) => char >= 0x2700 && char <= 0x27BF,\n // 'Miscellaneous Mathematical Symbols-A': (char) => char >= 0x27C0 && char <= 0x27EF,\n // 'Supplemental Arrows-A': (char) => char >= 0x27F0 && char <= 0x27FF,\n // 'Braille Patterns': (char) => char >= 0x2800 && char <= 0x28FF,\n // 'Supplemental Arrows-B': (char) => char >= 0x2900 && char <= 0x297F,\n // 'Miscellaneous Mathematical Symbols-B': (char) => char >= 0x2980 && char <= 0x29FF,\n // 'Supplemental Mathematical Operators': (char) => char >= 0x2A00 && char <= 0x2AFF,\n 'Miscellaneous Symbols and Arrows': (char) => char >= 0x2B00 && char <= 0x2BFF,\n // 'Glagolitic': (char) => char >= 0x2C00 && char <= 0x2C5F,\n // 'Latin Extended-C': (char) => char >= 0x2C60 && char <= 0x2C7F,\n // 'Coptic': (char) => char >= 0x2C80 && char <= 0x2CFF,\n // 'Georgian Supplement': (char) => char >= 0x2D00 && char <= 0x2D2F,\n // 'Tifinagh': (char) => char >= 0x2D30 && char <= 0x2D7F,\n // 'Ethiopic Extended': (char) => char >= 0x2D80 && char <= 0x2DDF,\n // 'Cyrillic Extended-A': (char) => char >= 0x2DE0 && char <= 0x2DFF,\n // 'Supplemental Punctuation': (char) => char >= 0x2E00 && char <= 0x2E7F,\n 'CJK Radicals Supplement': (char) => char >= 0x2E80 && char <= 0x2EFF,\n 'Kangxi Radicals': (char) => char >= 0x2F00 && char <= 0x2FDF,\n 'Ideographic Description Characters': (char) => char >= 0x2FF0 && char <= 0x2FFF,\n 'CJK Symbols and Punctuation': (char) => char >= 0x3000 && char <= 0x303F,\n 'Hiragana': (char) => char >= 0x3040 && char <= 0x309F,\n 'Katakana': (char) => char >= 0x30A0 && char <= 0x30FF,\n 'Bopomofo': (char) => char >= 0x3100 && char <= 0x312F,\n 'Hangul Compatibility Jamo': (char) => char >= 0x3130 && char <= 0x318F,\n 'Kanbun': (char) => char >= 0x3190 && char <= 0x319F,\n 'Bopomofo Extended': (char) => char >= 0x31A0 && char <= 0x31BF,\n 'CJK Strokes': (char) => char >= 0x31C0 && char <= 0x31EF,\n 'Katakana Phonetic Extensions': (char) => char >= 0x31F0 && char <= 0x31FF,\n 'Enclosed CJK Letters and Months': (char) => char >= 0x3200 && char <= 0x32FF,\n 'CJK Compatibility': (char) => char >= 0x3300 && char <= 0x33FF,\n 'CJK Unified Ideographs Extension A': (char) => char >= 0x3400 && char <= 0x4DBF,\n 'Yijing Hexagram Symbols': (char) => char >= 0x4DC0 && char <= 0x4DFF,\n 'CJK Unified Ideographs': (char) => char >= 0x4E00 && char <= 0x9FFF,\n 'Yi Syllables': (char) => char >= 0xA000 && char <= 0xA48F,\n 'Yi Radicals': (char) => char >= 0xA490 && char <= 0xA4CF,\n // 'Lisu': (char) => char >= 0xA4D0 && char <= 0xA4FF,\n // 'Vai': (char) => char >= 0xA500 && char <= 0xA63F,\n // 'Cyrillic Extended-B': (char) => char >= 0xA640 && char <= 0xA69F,\n // 'Bamum': (char) => char >= 0xA6A0 && char <= 0xA6FF,\n // 'Modifier Tone Letters': (char) => char >= 0xA700 && char <= 0xA71F,\n // 'Latin Extended-D': (char) => char >= 0xA720 && char <= 0xA7FF,\n // 'Syloti Nagri': (char) => char >= 0xA800 && char <= 0xA82F,\n // 'Common Indic Number Forms': (char) => char >= 0xA830 && char <= 0xA83F,\n // 'Phags-pa': (char) => char >= 0xA840 && char <= 0xA87F,\n // 'Saurashtra': (char) => char >= 0xA880 && char <= 0xA8DF,\n // 'Devanagari Extended': (char) => char >= 0xA8E0 && char <= 0xA8FF,\n // 'Kayah Li': (char) => char >= 0xA900 && char <= 0xA92F,\n // 'Rejang': (char) => char >= 0xA930 && char <= 0xA95F,\n 'Hangul Jamo Extended-A': (char) => char >= 0xA960 && char <= 0xA97F,\n // 'Javanese': (char) => char >= 0xA980 && char <= 0xA9DF,\n // 'Myanmar Extended-B': (char) => char >= 0xA9E0 && char <= 0xA9FF,\n // 'Cham': (char) => char >= 0xAA00 && char <= 0xAA5F,\n // 'Myanmar Extended-A': (char) => char >= 0xAA60 && char <= 0xAA7F,\n // 'Tai Viet': (char) => char >= 0xAA80 && char <= 0xAADF,\n // 'Meetei Mayek Extensions': (char) => char >= 0xAAE0 && char <= 0xAAFF,\n // 'Ethiopic Extended-A': (char) => char >= 0xAB00 && char <= 0xAB2F,\n // 'Latin Extended-E': (char) => char >= 0xAB30 && char <= 0xAB6F,\n // 'Cherokee Supplement': (char) => char >= 0xAB70 && char <= 0xABBF,\n // 'Meetei Mayek': (char) => char >= 0xABC0 && char <= 0xABFF,\n 'Hangul Syllables': (char) => char >= 0xAC00 && char <= 0xD7AF,\n 'Hangul Jamo Extended-B': (char) => char >= 0xD7B0 && char <= 0xD7FF,\n // 'High Surrogates': (char) => char >= 0xD800 && char <= 0xDB7F,\n // 'High Private Use Surrogates': (char) => char >= 0xDB80 && char <= 0xDBFF,\n // 'Low Surrogates': (char) => char >= 0xDC00 && char <= 0xDFFF,\n 'Private Use Area': (char) => char >= 0xE000 && char <= 0xF8FF,\n 'CJK Compatibility Ideographs': (char) => char >= 0xF900 && char <= 0xFAFF,\n // 'Alphabetic Presentation Forms': (char) => char >= 0xFB00 && char <= 0xFB4F,\n 'Arabic Presentation Forms-A': (char) => char >= 0xFB50 && char <= 0xFDFF,\n // 'Variation Selectors': (char) => char >= 0xFE00 && char <= 0xFE0F,\n 'Vertical Forms': (char) => char >= 0xFE10 && char <= 0xFE1F,\n // 'Combining Half Marks': (char) => char >= 0xFE20 && char <= 0xFE2F,\n 'CJK Compatibility Forms': (char) => char >= 0xFE30 && char <= 0xFE4F,\n 'Small Form Variants': (char) => char >= 0xFE50 && char <= 0xFE6F,\n 'Arabic Presentation Forms-B': (char) => char >= 0xFE70 && char <= 0xFEFF,\n 'Halfwidth and Fullwidth Forms': (char) => char >= 0xFF00 && char <= 0xFFEF\n // 'Specials': (char) => char >= 0xFFF0 && char <= 0xFFFF,\n // 'Linear B Syllabary': (char) => char >= 0x10000 && char <= 0x1007F,\n // 'Linear B Ideograms': (char) => char >= 0x10080 && char <= 0x100FF,\n // 'Aegean Numbers': (char) => char >= 0x10100 && char <= 0x1013F,\n // 'Ancient Greek Numbers': (char) => char >= 0x10140 && char <= 0x1018F,\n // 'Ancient Symbols': (char) => char >= 0x10190 && char <= 0x101CF,\n // 'Phaistos Disc': (char) => char >= 0x101D0 && char <= 0x101FF,\n // 'Lycian': (char) => char >= 0x10280 && char <= 0x1029F,\n // 'Carian': (char) => char >= 0x102A0 && char <= 0x102DF,\n // 'Coptic Epact Numbers': (char) => char >= 0x102E0 && char <= 0x102FF,\n // 'Old Italic': (char) => char >= 0x10300 && char <= 0x1032F,\n // 'Gothic': (char) => char >= 0x10330 && char <= 0x1034F,\n // 'Old Permic': (char) => char >= 0x10350 && char <= 0x1037F,\n // 'Ugaritic': (char) => char >= 0x10380 && char <= 0x1039F,\n // 'Old Persian': (char) => char >= 0x103A0 && char <= 0x103DF,\n // 'Deseret': (char) => char >= 0x10400 && char <= 0x1044F,\n // 'Shavian': (char) => char >= 0x10450 && char <= 0x1047F,\n // 'Osmanya': (char) => char >= 0x10480 && char <= 0x104AF,\n // 'Osage': (char) => char >= 0x104B0 && char <= 0x104FF,\n // 'Elbasan': (char) => char >= 0x10500 && char <= 0x1052F,\n // 'Caucasian Albanian': (char) => char >= 0x10530 && char <= 0x1056F,\n // 'Linear A': (char) => char >= 0x10600 && char <= 0x1077F,\n // 'Cypriot Syllabary': (char) => char >= 0x10800 && char <= 0x1083F,\n // 'Imperial Aramaic': (char) => char >= 0x10840 && char <= 0x1085F,\n // 'Palmyrene': (char) => char >= 0x10860 && char <= 0x1087F,\n // 'Nabataean': (char) => char >= 0x10880 && char <= 0x108AF,\n // 'Hatran': (char) => char >= 0x108E0 && char <= 0x108FF,\n // 'Phoenician': (char) => char >= 0x10900 && char <= 0x1091F,\n // 'Lydian': (char) => char >= 0x10920 && char <= 0x1093F,\n // 'Meroitic Hieroglyphs': (char) => char >= 0x10980 && char <= 0x1099F,\n // 'Meroitic Cursive': (char) => char >= 0x109A0 && char <= 0x109FF,\n // 'Kharoshthi': (char) => char >= 0x10A00 && char <= 0x10A5F,\n // 'Old South Arabian': (char) => char >= 0x10A60 && char <= 0x10A7F,\n // 'Old North Arabian': (char) => char >= 0x10A80 && char <= 0x10A9F,\n // 'Manichaean': (char) => char >= 0x10AC0 && char <= 0x10AFF,\n // 'Avestan': (char) => char >= 0x10B00 && char <= 0x10B3F,\n // 'Inscriptional Parthian': (char) => char >= 0x10B40 && char <= 0x10B5F,\n // 'Inscriptional Pahlavi': (char) => char >= 0x10B60 && char <= 0x10B7F,\n // 'Psalter Pahlavi': (char) => char >= 0x10B80 && char <= 0x10BAF,\n // 'Old Turkic': (char) => char >= 0x10C00 && char <= 0x10C4F,\n // 'Old Hungarian': (char) => char >= 0x10C80 && char <= 0x10CFF,\n // 'Rumi Numeral Symbols': (char) => char >= 0x10E60 && char <= 0x10E7F,\n // 'Brahmi': (char) => char >= 0x11000 && char <= 0x1107F,\n // 'Kaithi': (char) => char >= 0x11080 && char <= 0x110CF,\n // 'Sora Sompeng': (char) => char >= 0x110D0 && char <= 0x110FF,\n // 'Chakma': (char) => char >= 0x11100 && char <= 0x1114F,\n // 'Mahajani': (char) => char >= 0x11150 && char <= 0x1117F,\n // 'Sharada': (char) => char >= 0x11180 && char <= 0x111DF,\n // 'Sinhala Archaic Numbers': (char) => char >= 0x111E0 && char <= 0x111FF,\n // 'Khojki': (char) => char >= 0x11200 && char <= 0x1124F,\n // 'Multani': (char) => char >= 0x11280 && char <= 0x112AF,\n // 'Khudawadi': (char) => char >= 0x112B0 && char <= 0x112FF,\n // 'Grantha': (char) => char >= 0x11300 && char <= 0x1137F,\n // 'Newa': (char) => char >= 0x11400 && char <= 0x1147F,\n // 'Tirhuta': (char) => char >= 0x11480 && char <= 0x114DF,\n // 'Siddham': (char) => char >= 0x11580 && char <= 0x115FF,\n // 'Modi': (char) => char >= 0x11600 && char <= 0x1165F,\n // 'Mongolian Supplement': (char) => char >= 0x11660 && char <= 0x1167F,\n // 'Takri': (char) => char >= 0x11680 && char <= 0x116CF,\n // 'Ahom': (char) => char >= 0x11700 && char <= 0x1173F,\n // 'Warang Citi': (char) => char >= 0x118A0 && char <= 0x118FF,\n // 'Zanabazar Square': (char) => char >= 0x11A00 && char <= 0x11A4F,\n // 'Soyombo': (char) => char >= 0x11A50 && char <= 0x11AAF,\n // 'Pau Cin Hau': (char) => char >= 0x11AC0 && char <= 0x11AFF,\n // 'Bhaiksuki': (char) => char >= 0x11C00 && char <= 0x11C6F,\n // 'Marchen': (char) => char >= 0x11C70 && char <= 0x11CBF,\n // 'Masaram Gondi': (char) => char >= 0x11D00 && char <= 0x11D5F,\n // 'Cuneiform': (char) => char >= 0x12000 && char <= 0x123FF,\n // 'Cuneiform Numbers and Punctuation': (char) => char >= 0x12400 && char <= 0x1247F,\n // 'Early Dynastic Cuneiform': (char) => char >= 0x12480 && char <= 0x1254F,\n // 'Egyptian Hieroglyphs': (char) => char >= 0x13000 && char <= 0x1342F,\n // 'Anatolian Hieroglyphs': (char) => char >= 0x14400 && char <= 0x1467F,\n // 'Bamum Supplement': (char) => char >= 0x16800 && char <= 0x16A3F,\n // 'Mro': (char) => char >= 0x16A40 && char <= 0x16A6F,\n // 'Bassa Vah': (char) => char >= 0x16AD0 && char <= 0x16AFF,\n // 'Pahawh Hmong': (char) => char >= 0x16B00 && char <= 0x16B8F,\n // 'Miao': (char) => char >= 0x16F00 && char <= 0x16F9F,\n // 'Ideographic Symbols and Punctuation': (char) => char >= 0x16FE0 && char <= 0x16FFF,\n // 'Tangut': (char) => char >= 0x17000 && char <= 0x187FF,\n // 'Tangut Components': (char) => char >= 0x18800 && char <= 0x18AFF,\n // 'Kana Supplement': (char) => char >= 0x1B000 && char <= 0x1B0FF,\n // 'Kana Extended-A': (char) => char >= 0x1B100 && char <= 0x1B12F,\n // 'Nushu': (char) => char >= 0x1B170 && char <= 0x1B2FF,\n // 'Duployan': (char) => char >= 0x1BC00 && char <= 0x1BC9F,\n // 'Shorthand Format Controls': (char) => char >= 0x1BCA0 && char <= 0x1BCAF,\n // 'Byzantine Musical Symbols': (char) => char >= 0x1D000 && char <= 0x1D0FF,\n // 'Musical Symbols': (char) => char >= 0x1D100 && char <= 0x1D1FF,\n // 'Ancient Greek Musical Notation': (char) => char >= 0x1D200 && char <= 0x1D24F,\n // 'Tai Xuan Jing Symbols': (char) => char >= 0x1D300 && char <= 0x1D35F,\n // 'Counting Rod Numerals': (char) => char >= 0x1D360 && char <= 0x1D37F,\n // 'Mathematical Alphanumeric Symbols': (char) => char >= 0x1D400 && char <= 0x1D7FF,\n // 'Sutton SignWriting': (char) => char >= 0x1D800 && char <= 0x1DAAF,\n // 'Glagolitic Supplement': (char) => char >= 0x1E000 && char <= 0x1E02F,\n // 'Mende Kikakui': (char) => char >= 0x1E800 && char <= 0x1E8DF,\n // 'Adlam': (char) => char >= 0x1E900 && char <= 0x1E95F,\n // 'Arabic Mathematical Alphabetic Symbols': (char) => char >= 0x1EE00 && char <= 0x1EEFF,\n // 'Mahjong Tiles': (char) => char >= 0x1F000 && char <= 0x1F02F,\n // 'Domino Tiles': (char) => char >= 0x1F030 && char <= 0x1F09F,\n // 'Playing Cards': (char) => char >= 0x1F0A0 && char <= 0x1F0FF,\n // 'Enclosed Alphanumeric Supplement': (char) => char >= 0x1F100 && char <= 0x1F1FF,\n // 'Enclosed Ideographic Supplement': (char) => char >= 0x1F200 && char <= 0x1F2FF,\n // 'Miscellaneous Symbols and Pictographs': (char) => char >= 0x1F300 && char <= 0x1F5FF,\n // 'Emoticons': (char) => char >= 0x1F600 && char <= 0x1F64F,\n // 'Ornamental Dingbats': (char) => char >= 0x1F650 && char <= 0x1F67F,\n // 'Transport and Map Symbols': (char) => char >= 0x1F680 && char <= 0x1F6FF,\n // 'Alchemical Symbols': (char) => char >= 0x1F700 && char <= 0x1F77F,\n // 'Geometric Shapes Extended': (char) => char >= 0x1F780 && char <= 0x1F7FF,\n // 'Supplemental Arrows-C': (char) => char >= 0x1F800 && char <= 0x1F8FF,\n // 'Supplemental Symbols and Pictographs': (char) => char >= 0x1F900 && char <= 0x1F9FF,\n // 'CJK Unified Ideographs Extension B': (char) => char >= 0x20000 && char <= 0x2A6DF,\n // 'CJK Unified Ideographs Extension C': (char) => char >= 0x2A700 && char <= 0x2B73F,\n // 'CJK Unified Ideographs Extension D': (char) => char >= 0x2B740 && char <= 0x2B81F,\n // 'CJK Unified Ideographs Extension E': (char) => char >= 0x2B820 && char <= 0x2CEAF,\n // 'CJK Unified Ideographs Extension F': (char) => char >= 0x2CEB0 && char <= 0x2EBEF,\n // 'CJK Compatibility Ideographs Supplement': (char) => char >= 0x2F800 && char <= 0x2FA1F,\n // 'Tags': (char) => char >= 0xE0000 && char <= 0xE007F,\n // 'Variation Selectors Supplement': (char) => char >= 0xE0100 && char <= 0xE01EF,\n // 'Supplementary Private Use Area-A': (char) => char >= 0xF0000 && char <= 0xFFFFF,\n // 'Supplementary Private Use Area-B': (char) => char >= 0x100000 && char <= 0x10FFFF,\n};\n\nmodule.exports = unicodeBlockLookup;\n","// \n\n/**\n * A [least-recently-used cache](http://en.wikipedia.org/wiki/Cache_algorithms)\n * with hash lookup made possible by keeping a list of keys in parallel to\n * an array of dictionary of values\n *\n * @private\n */\nclass LRUCache {\n \n \n \n \n /**\n * @param {number} max number of permitted values\n * @param {Function} onRemove callback called with items when they expire\n */\n constructor(max , onRemove ) {\n this.max = max;\n this.onRemove = onRemove;\n this.reset();\n }\n\n /**\n * Clear the cache\n *\n * @returns {LRUCache} this cache\n * @private\n */\n reset() {\n for (const key in this.data) {\n this.onRemove(this.data[key]);\n }\n\n this.data = {};\n this.order = [];\n\n return this;\n }\n\n /**\n * Add a key, value combination to the cache, trimming its size if this pushes\n * it over max length.\n *\n * @param {string} key lookup key for the item\n * @param {*} data any value\n *\n * @returns {LRUCache} this cache\n * @private\n */\n add(key , data ) {\n\n if (this.has(key)) {\n this.order.splice(this.order.indexOf(key), 1);\n this.data[key] = data;\n this.order.push(key);\n\n } else {\n this.data[key] = data;\n this.order.push(key);\n\n if (this.order.length > this.max) {\n const removedData = this.getAndRemove(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n }\n\n return this;\n }\n\n /**\n * Determine whether the value attached to `key` is present\n *\n * @param {string} key the key to be looked-up\n * @returns {boolean} whether the cache has this value\n * @private\n */\n has(key ) {\n return key in this.data;\n }\n\n /**\n * List all keys in the cache\n *\n * @returns {Array<string>} an array of keys in this cache.\n * @private\n */\n keys() {\n return this.order;\n }\n\n /**\n * Get the value attached to a specific key and remove data from cache.\n * If the key is not found, returns `null`\n *\n * @param {string} key the key to look up\n * @returns {*} the data, or null if it isn't found\n * @private\n */\n getAndRemove(key ) {\n if (!this.has(key)) { return null; }\n\n const data = this.data[key];\n\n delete this.data[key];\n this.order.splice(this.order.indexOf(key), 1);\n\n return data;\n }\n\n /**\n * Get the value attached to a specific key without removing data\n * from the cache. If the key is not found, returns `null`\n *\n * @param {string} key the key to look up\n * @returns {*} the data, or null if it isn't found\n * @private\n */\n get(key ) {\n if (!this.has(key)) { return null; }\n\n const data = this.data[key];\n return data;\n }\n\n /**\n * Remove a key/value combination from the cache.\n *\n * @param {string} key the key for the pair to delete\n * @returns {LRUCache} this cache\n * @private\n */\n remove(key ) {\n if (!this.has(key)) { return this; }\n\n const data = this.data[key];\n delete this.data[key];\n this.onRemove(data);\n this.order.splice(this.order.indexOf(key), 1);\n\n return this;\n }\n\n /**\n * Change the max size of the cache.\n *\n * @param {number} max the max size of the cache\n * @returns {LRUCache} this cache\n * @private\n */\n setMaxSize(max ) {\n this.max = max;\n\n while (this.order.length > this.max) {\n const removedData = this.getAndRemove(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n\n return this;\n }\n}\n\nmodule.exports = LRUCache;\n","// \n\nconst config = require('./config');\nconst browser = require('./browser');\n\nconst help = 'See https://www.mapbox.com/api-documentation/#access-tokens';\n\n \n \n \n \n \n \n\nfunction makeAPIURL(urlObject , accessToken ) {\n const apiUrlObject = parseUrl(config.API_URL);\n urlObject.protocol = apiUrlObject.protocol;\n urlObject.authority = apiUrlObject.authority;\n\n if (apiUrlObject.path !== '/') {\n urlObject.path = `${apiUrlObject.path}${urlObject.path}`;\n }\n\n if (!config.REQUIRE_ACCESS_TOKEN) return formatUrl(urlObject);\n\n accessToken = accessToken || config.ACCESS_TOKEN;\n if (!accessToken)\n throw new Error(`An API access token is required to use Mapbox GL. ${help}`);\n if (accessToken[0] === 's')\n throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${help}`);\n\n urlObject.params.push(`access_token=${accessToken}`);\n return formatUrl(urlObject);\n}\n\nfunction isMapboxURL(url ) {\n return url.indexOf('mapbox:') === 0;\n}\n\nexports.isMapboxURL = isMapboxURL;\n\nexports.normalizeStyleURL = function(url , accessToken ) {\n if (!isMapboxURL(url)) return url;\n const urlObject = parseUrl(url);\n urlObject.path = `/styles/v1${urlObject.path}`;\n return makeAPIURL(urlObject, accessToken);\n};\n\nexports.normalizeGlyphsURL = function(url , accessToken ) {\n if (!isMapboxURL(url)) return url;\n const urlObject = parseUrl(url);\n urlObject.path = `/fonts/v1${urlObject.path}`;\n return makeAPIURL(urlObject, accessToken);\n};\n\nexports.normalizeSourceURL = function(url , accessToken ) {\n if (!isMapboxURL(url)) return url;\n const urlObject = parseUrl(url);\n urlObject.path = `/v4/${urlObject.authority}.json`;\n // TileJSON requests need a secure flag appended to their URLs so\n // that the server knows to send SSL-ified resource references.\n urlObject.params.push('secure');\n return makeAPIURL(urlObject, accessToken);\n};\n\nexports.normalizeSpriteURL = function(url , format , extension , accessToken ) {\n const urlObject = parseUrl(url);\n if (!isMapboxURL(url)) {\n urlObject.path += `${format}${extension}`;\n return formatUrl(urlObject);\n }\n urlObject.path = `/styles/v1${urlObject.path}/sprite${format}${extension}`;\n return makeAPIURL(urlObject, accessToken);\n};\n\nconst imageExtensionRe = /(\\.(png|jpg)\\d*)(?=$)/;\n\nexports.normalizeTileURL = function(tileURL , sourceURL , tileSize ) {\n if (!sourceURL || !isMapboxURL(sourceURL)) return tileURL;\n\n const urlObject = parseUrl(tileURL);\n\n // The v4 mapbox tile API supports 512x512 image tiles only when @2x\n // is appended to the tile URL. If `tileSize: 512` is specified for\n // a Mapbox raster source force the @2x suffix even if a non hidpi device.\n const suffix = browser.devicePixelRatio >= 2 || tileSize === 512 ? '@2x' : '';\n const extension = browser.supportsWebp ? '.webp' : '$1';\n urlObject.path = urlObject.path.replace(imageExtensionRe, `${suffix}${extension}`);\n\n replaceTempAccessToken(urlObject.params);\n return formatUrl(urlObject);\n};\n\nfunction replaceTempAccessToken(params ) {\n for (let i = 0; i < params.length; i++) {\n if (params[i].indexOf('access_token=tk.') === 0) {\n params[i] = `access_token=${config.ACCESS_TOKEN || ''}`;\n }\n }\n}\n\nconst urlRe = /^(\\w+):\\/\\/([^/?]*)(\\/[^?]+)?\\??(.+)?/;\n\nfunction parseUrl(url ) {\n const parts = url.match(urlRe);\n if (!parts) {\n throw new Error('Unable to parse URL object');\n }\n return {\n protocol: parts[1],\n authority: parts[2],\n path: parts[3] || '/',\n params: parts[4] ? parts[4].split('&') : []\n };\n}\n\nfunction formatUrl(obj ) {\n const params = obj.params.length ? `?${obj.params.join('&')}` : '';\n return `${obj.protocol}://${obj.authority}${obj.path}${params}`;\n}\n","// \n\n/* eslint-disable new-cap */\n\nconst isChar = require('./is_char_in_unicode_block');\n\nmodule.exports.allowsIdeographicBreaking = function(chars ) {\n for (const char of chars) {\n if (!exports.charAllowsIdeographicBreaking(char.charCodeAt(0))) return false;\n }\n return true;\n};\n\nmodule.exports.allowsVerticalWritingMode = function(chars ) {\n for (const char of chars) {\n if (exports.charHasUprightVerticalOrientation(char.charCodeAt(0))) return true;\n }\n return false;\n};\n\nmodule.exports.allowsLetterSpacing = function(chars ) {\n for (const char of chars) {\n if (!exports.charAllowsLetterSpacing(char.charCodeAt(0))) return false;\n }\n return true;\n};\n\nmodule.exports.charAllowsLetterSpacing = function(char ) {\n if (isChar['Arabic'](char)) return false;\n if (isChar['Arabic Supplement'](char)) return false;\n if (isChar['Arabic Extended-A'](char)) return false;\n if (isChar['Arabic Presentation Forms-A'](char)) return false;\n if (isChar['Arabic Presentation Forms-B'](char)) return false;\n\n return true;\n};\n\nmodule.exports.charAllowsIdeographicBreaking = function(char ) {\n // Return early for characters outside all ideographic ranges.\n if (char < 0x2E80) return false;\n\n if (isChar['Bopomofo Extended'](char)) return true;\n if (isChar['Bopomofo'](char)) return true;\n if (isChar['CJK Compatibility Forms'](char)) return true;\n if (isChar['CJK Compatibility Ideographs'](char)) return true;\n if (isChar['CJK Compatibility'](char)) return true;\n if (isChar['CJK Radicals Supplement'](char)) return true;\n if (isChar['CJK Strokes'](char)) return true;\n if (isChar['CJK Symbols and Punctuation'](char)) return true;\n if (isChar['CJK Unified Ideographs Extension A'](char)) return true;\n if (isChar['CJK Unified Ideographs'](char)) return true;\n if (isChar['Enclosed CJK Letters and Months'](char)) return true;\n if (isChar['Halfwidth and Fullwidth Forms'](char)) return true;\n if (isChar['Hiragana'](char)) return true;\n if (isChar['Ideographic Description Characters'](char)) return true;\n if (isChar['Kangxi Radicals'](char)) return true;\n if (isChar['Katakana Phonetic Extensions'](char)) return true;\n if (isChar['Katakana'](char)) return true;\n if (isChar['Vertical Forms'](char)) return true;\n if (isChar['Yi Radicals'](char)) return true;\n if (isChar['Yi Syllables'](char)) return true;\n\n return false;\n};\n\n// The following logic comes from\n// <http://www.unicode.org/Public/vertical/revision-17/VerticalOrientation-17.txt>.\n// The data file denotes with “U” or “Tu” any codepoint that may be drawn\n// upright in vertical text but does not distinguish between upright and\n// “neutral” characters.\n\n// Blocks in the Unicode supplementary planes are excluded from this module due\n// to <https://github.com/mapbox/mapbox-gl/issues/29>.\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * upright orientation.\n *\n * A character has upright orientation if it is drawn upright (unrotated)\n * whether the line is oriented horizontally or vertically, even if both\n * adjacent characters can be rotated. For example, a Chinese character is\n * always drawn upright. An uprightly oriented character causes an adjacent\n * “neutral” character to be drawn upright as well.\n */\nexports.charHasUprightVerticalOrientation = function(char ) {\n if (char === 0x02EA /* modifier letter yin departing tone mark */ ||\n char === 0x02EB /* modifier letter yang departing tone mark */) {\n return true;\n }\n\n // Return early for characters outside all ranges whose characters remain\n // upright in vertical writing mode.\n if (char < 0x1100) return false;\n\n if (isChar['Bopomofo Extended'](char)) return true;\n if (isChar['Bopomofo'](char)) return true;\n if (isChar['CJK Compatibility Forms'](char)) {\n if (!(char >= 0xFE49 /* dashed overline */ && char <= 0xFE4F /* wavy low line */)) {\n return true;\n }\n }\n if (isChar['CJK Compatibility Ideographs'](char)) return true;\n if (isChar['CJK Compatibility'](char)) return true;\n if (isChar['CJK Radicals Supplement'](char)) return true;\n if (isChar['CJK Strokes'](char)) return true;\n if (isChar['CJK Symbols and Punctuation'](char)) {\n if (!(char >= 0x3008 /* left angle bracket */ && char <= 0x3011 /* right black lenticular bracket */) &&\n !(char >= 0x3014 /* left tortoise shell bracket */ && char <= 0x301F /* low double prime quotation mark */) &&\n char !== 0x3030 /* wavy dash */) {\n return true;\n }\n }\n if (isChar['CJK Unified Ideographs Extension A'](char)) return true;\n if (isChar['CJK Unified Ideographs'](char)) return true;\n if (isChar['Enclosed CJK Letters and Months'](char)) return true;\n if (isChar['Hangul Compatibility Jamo'](char)) return true;\n if (isChar['Hangul Jamo Extended-A'](char)) return true;\n if (isChar['Hangul Jamo Extended-B'](char)) return true;\n if (isChar['Hangul Jamo'](char)) return true;\n if (isChar['Hangul Syllables'](char)) return true;\n if (isChar['Hiragana'](char)) return true;\n if (isChar['Ideographic Description Characters'](char)) return true;\n if (isChar['Kanbun'](char)) return true;\n if (isChar['Kangxi Radicals'](char)) return true;\n if (isChar['Katakana Phonetic Extensions'](char)) return true;\n if (isChar['Katakana'](char)) {\n if (char !== 0x30FC /* katakana-hiragana prolonged sound mark */) {\n return true;\n }\n }\n if (isChar['Halfwidth and Fullwidth Forms'](char)) {\n if (char !== 0xFF08 /* fullwidth left parenthesis */ &&\n char !== 0xFF09 /* fullwidth right parenthesis */ &&\n char !== 0xFF0D /* fullwidth hyphen-minus */ &&\n !(char >= 0xFF1A /* fullwidth colon */ && char <= 0xFF1E /* fullwidth greater-than sign */) &&\n char !== 0xFF3B /* fullwidth left square bracket */ &&\n char !== 0xFF3D /* fullwidth right square bracket */ &&\n char !== 0xFF3F /* fullwidth low line */ &&\n !(char >= 0xFF5B /* fullwidth left curly bracket */ && char <= 0xFFDF) &&\n char !== 0xFFE3 /* fullwidth macron */ &&\n !(char >= 0xFFE8 /* halfwidth forms light vertical */ && char <= 0xFFEF)) {\n return true;\n }\n }\n if (isChar['Small Form Variants'](char)) {\n if (!(char >= 0xFE58 /* small em dash */ && char <= 0xFE5E /* small right tortoise shell bracket */) &&\n !(char >= 0xFE63 /* small hyphen-minus */ && char <= 0xFE66 /* small equals sign */)) {\n return true;\n }\n }\n if (isChar['Unified Canadian Aboriginal Syllabics'](char)) return true;\n if (isChar['Unified Canadian Aboriginal Syllabics Extended'](char)) return true;\n if (isChar['Vertical Forms'](char)) return true;\n if (isChar['Yijing Hexagram Symbols'](char)) return true;\n if (isChar['Yi Syllables'](char)) return true;\n if (isChar['Yi Radicals'](char)) return true;\n\n return false;\n};\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * neutral orientation.\n *\n * A character has neutral orientation if it may be drawn rotated or unrotated\n * when the line is oriented vertically, depending on the orientation of the\n * adjacent characters. For example, along a verticlly oriented line, the vulgar\n * fraction ½ is drawn upright among Chinese characters but rotated among Latin\n * letters. A neutrally oriented character does not influence whether an\n * adjacent character is drawn upright or rotated.\n */\nexports.charHasNeutralVerticalOrientation = function(char ) {\n if (isChar['Latin-1 Supplement'](char)) {\n if (char === 0x00A7 /* section sign */ ||\n char === 0x00A9 /* copyright sign */ ||\n char === 0x00AE /* registered sign */ ||\n char === 0x00B1 /* plus-minus sign */ ||\n char === 0x00BC /* vulgar fraction one quarter */ ||\n char === 0x00BD /* vulgar fraction one half */ ||\n char === 0x00BE /* vulgar fraction three quarters */ ||\n char === 0x00D7 /* multiplication sign */ ||\n char === 0x00F7 /* division sign */) {\n return true;\n }\n }\n if (isChar['General Punctuation'](char)) {\n if (char === 0x2016 /* double vertical line */ ||\n char === 0x2020 /* dagger */ ||\n char === 0x2021 /* double dagger */ ||\n char === 0x2030 /* per mille sign */ ||\n char === 0x2031 /* per ten thousand sign */ ||\n char === 0x203B /* reference mark */ ||\n char === 0x203C /* double exclamation mark */ ||\n char === 0x2042 /* asterism */ ||\n char === 0x2047 /* double question mark */ ||\n char === 0x2048 /* question exclamation mark */ ||\n char === 0x2049 /* exclamation question mark */ ||\n char === 0x2051 /* two asterisks aligned vertically */) {\n return true;\n }\n }\n if (isChar['Letterlike Symbols'](char)) return true;\n if (isChar['Number Forms'](char)) return true;\n if (isChar['Miscellaneous Technical'](char)) {\n if ((char >= 0x2300 /* diameter sign */ && char <= 0x2307 /* wavy line */) ||\n (char >= 0x230C /* bottom right crop */ && char <= 0x231F /* bottom right corner */) ||\n (char >= 0x2324 /* up arrowhead between two horizontal bars */ && char <= 0x2328 /* keyboard */) ||\n char === 0x232B /* erase to the left */ ||\n (char >= 0x237D /* shouldered open box */ && char <= 0x239A /* clear screen symbol */) ||\n (char >= 0x23BE /* dentistry symbol light vertical and top right */ && char <= 0x23CD /* square foot */) ||\n char === 0x23CF /* eject symbol */ ||\n (char >= 0x23D1 /* metrical breve */ && char <= 0x23DB /* fuse */) ||\n (char >= 0x23E2 /* white trapezium */ && char <= 0x23FF)) {\n return true;\n }\n }\n if (isChar['Control Pictures'](char) && char !== 0x2423 /* open box */) return true;\n if (isChar['Optical Character Recognition'](char)) return true;\n if (isChar['Enclosed Alphanumerics'](char)) return true;\n if (isChar['Geometric Shapes'](char)) return true;\n if (isChar['Miscellaneous Symbols'](char)) {\n if (!(char >= 0x261A /* black left pointing index */ && char <= 0x261F /* white down pointing index */)) {\n return true;\n }\n }\n if (isChar['Miscellaneous Symbols and Arrows'](char)) {\n if ((char >= 0x2B12 /* square with top half black */ && char <= 0x2B2F /* white vertical ellipse */) ||\n (char >= 0x2B50 /* white medium star */ && char <= 0x2B59 /* heavy circled saltire */) ||\n (char >= 0x2BB8 /* upwards white arrow from bar with horizontal bar */ && char <= 0x2BEB)) {\n return true;\n }\n }\n if (isChar['CJK Symbols and Punctuation'](char)) return true;\n if (isChar['Katakana'](char)) return true;\n if (isChar['Private Use Area'](char)) return true;\n if (isChar['CJK Compatibility Forms'](char)) return true;\n if (isChar['Small Form Variants'](char)) return true;\n if (isChar['Halfwidth and Fullwidth Forms'](char)) return true;\n\n if (char === 0x221E /* infinity */ ||\n char === 0x2234 /* therefore */ ||\n char === 0x2235 /* because */ ||\n (char >= 0x2700 /* black safety scissors */ && char <= 0x2767 /* rotated floral heart bullet */) ||\n (char >= 0x2776 /* dingbat negative circled digit one */ && char <= 0x2793 /* dingbat negative circled sans-serif number ten */) ||\n char === 0xFFFC /* object replacement character */ ||\n char === 0xFFFD /* replacement character */) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Returns true if the given Unicode codepoint identifies a character with\n * rotated orientation.\n *\n * A character has rotated orientation if it is drawn rotated when the line is\n * oriented vertically, even if both adjacent characters are upright. For\n * example, a Latin letter is drawn rotated along a vertical line. A rotated\n * character causes an adjacent “neutral” character to be drawn rotated as well.\n */\nexports.charHasRotatedVerticalOrientation = function(char ) {\n return !(exports.charHasUprightVerticalOrientation(char) ||\n exports.charHasNeutralVerticalOrientation(char));\n};\n","// \n\nconst LngLat = require('../geo/lng_lat');\n\n \n \n\n/**\n * Given a LngLat, prior projected position, and a transform, return a new LngLat shifted\n * n × 360° east or west for some n ≥ 0 such that:\n *\n * * the projected location of the result is on screen, if possible, and secondarily:\n * * the difference between the projected location of the result and the prior position\n * is minimized.\n *\n * The object is to preserve perceived object constancy for Popups and Markers as much as\n * possible; they should avoid shifting large distances across the screen, even when the\n * map center changes by ±360° due to automatic wrapping, and when about to go off screen,\n * should wrap just enough to avoid doing so.\n *\n * @private\n */\nmodule.exports = function(lngLat , priorPos , transform ) {\n lngLat = new LngLat(lngLat.lng, lngLat.lat);\n\n // First, try shifting one world in either direction, and see if either is closer to the\n // prior position. This preserves object constancy when the map center is auto-wrapped\n // during animations.\n if (priorPos) {\n const left = new LngLat(lngLat.lng - 360, lngLat.lat);\n const right = new LngLat(lngLat.lng + 360, lngLat.lat);\n const delta = transform.locationPoint(lngLat).distSqr(priorPos);\n if (transform.locationPoint(left).distSqr(priorPos) < delta) {\n lngLat = left;\n } else if (transform.locationPoint(right).distSqr(priorPos) < delta) {\n lngLat = right;\n }\n }\n\n // Second, wrap toward the center until the new position is on screen, or we can't get\n // any closer.\n while (Math.abs(lngLat.lng - transform.center.lng) > 180) {\n const pos = transform.locationPoint(lngLat);\n if (pos.x >= 0 && pos.y >= 0 && pos.x <= transform.width && pos.y <= transform.height) {\n break;\n }\n if (lngLat.lng > transform.center.lng) {\n lngLat.lng -= 360;\n } else {\n lngLat.lng += 360;\n }\n }\n\n return lngLat;\n};\n","// \n\n// Note: all \"sizes\" are measured in bytes\n\nconst assert = require('assert');\n\n \n\nconst viewTypes = {\n 'Int8': Int8Array,\n 'Uint8': Uint8Array,\n 'Int16': Int16Array,\n 'Uint16': Uint16Array,\n 'Int32': Int32Array,\n 'Uint32': Uint32Array,\n 'Float32': Float32Array\n};\n\n \n\n/**\n * @private\n */\nclass Struct {\n \n \n \n \n \n\n // The following properties are defined on the prototype of sub classes.\n \n\n /**\n * @param {StructArray} structArray The StructArray the struct is stored in\n * @param {number} index The index of the struct in the StructArray.\n * @private\n */\n constructor(structArray , index ) {\n (this )._structArray = structArray;\n this._pos1 = index * this.size;\n this._pos2 = this._pos1 / 2;\n this._pos4 = this._pos1 / 4;\n this._pos8 = this._pos1 / 8;\n }\n}\n\nconst DEFAULT_CAPACITY = 128;\nconst RESIZE_MULTIPLIER = 5;\n\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n\n/**\n * `StructArray` provides an abstraction over `ArrayBuffer` and `TypedArray`\n * making it behave like an array of typed structs.\n *\n * Conceptually, a StructArray is comprised of elements, i.e., instances of its\n * associated struct type. Each particular struct type, together with an\n * alignment size, determines the memory layout of a StructArray whose elements\n * are of that type. Thus, for each such layout that we need, we have\n * a corrseponding StructArrayLayout class, inheriting from StructArray and\n * implementing `emplaceBack()` and `_refreshViews()`.\n *\n * In some cases, where we need to access particular elements of a StructArray,\n * we implement a more specific subclass that inherits from one of the\n * StructArrayLayouts and adds a `get(i): T` accessor that returns a structured\n * object whose properties are proxies into the underlying memory space for the\n * i-th element. This affords the convience of working with (seemingly) plain\n * Javascript objects without the overhead of serializing/deserializing them\n * into ArrayBuffers for efficient web worker transfer.\n *\n * @private\n */\nclass StructArray {\n \n \n \n \n \n\n // The following properties are defined on the prototype.\n \n \n \n\n constructor() {\n this.isTransferred = false;\n this.capacity = -1;\n this.resize(0);\n }\n\n /**\n * Serialize a StructArray instance. Serializes both the raw data and the\n * metadata needed to reconstruct the StructArray base class during\n * deserialization.\n */\n static serialize(array , transferables ) {\n assert(!array.isTransferred);\n\n array._trim();\n\n if (transferables) {\n array.isTransferred = true;\n transferables.push(array.arrayBuffer);\n }\n\n return {\n length: array.length,\n arrayBuffer: array.arrayBuffer,\n };\n }\n\n static deserialize(input ) {\n const structArray = Object.create(this.prototype);\n structArray.arrayBuffer = input.arrayBuffer;\n structArray.length = input.length;\n structArray.capacity = input.arrayBuffer.byteLength / structArray.bytesPerElement;\n structArray._refreshViews();\n return structArray;\n }\n\n /**\n * Resize the array to discard unused capacity.\n */\n _trim() {\n if (this.length !== this.capacity) {\n this.capacity = this.length;\n this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement);\n this._refreshViews();\n }\n }\n\n /**\n * Resets the the length of the array to 0 without de-allocating capcacity.\n */\n clear() {\n this.length = 0;\n }\n\n /**\n * Resize the array.\n * If `n` is greater than the current length then additional elements with undefined values are added.\n * If `n` is less than the current length then the array will be reduced to the first `n` elements.\n * @param {number} n The new size of the array.\n */\n resize(n ) {\n assert(!this.isTransferred);\n this.reserve(n);\n this.length = n;\n }\n\n /**\n * Indicate a planned increase in size, so that any necessary allocation may\n * be done once, ahead of time.\n * @param {number} n The expected size of the array.\n */\n reserve(n ) {\n if (n > this.capacity) {\n this.capacity = Math.max(n, Math.floor(this.capacity * RESIZE_MULTIPLIER), DEFAULT_CAPACITY);\n this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);\n\n const oldUint8Array = this.uint8;\n this._refreshViews();\n if (oldUint8Array) this.uint8.set(oldUint8Array);\n }\n }\n\n /**\n * Create TypedArray views for the current ArrayBuffer.\n */\n _refreshViews() {\n throw new Error('_refreshViews() must be implemented by each concrete StructArray layout');\n }\n}\n\n/**\n * Given a list of member fields, create a full StructArrayLayout, in\n * particular calculating the correct byte offset for each field. This data\n * is used at build time to generate StructArrayLayout_*#emplaceBack() and\n * other accessors, and at runtime for binding vertex buffer attributes.\n *\n * @private\n */\nfunction createLayout(\n members ,\n alignment = 1\n) {\n\n let offset = 0;\n let maxSize = 0;\n const layoutMembers = members.map((member) => {\n assert(member.name.length);\n const typeSize = sizeOf(member.type);\n const memberOffset = offset = align(offset, Math.max(alignment, typeSize));\n const components = member.components || 1;\n\n maxSize = Math.max(maxSize, typeSize);\n offset += typeSize * components;\n\n return {\n name: member.name,\n type: member.type,\n components: components,\n offset: memberOffset,\n };\n });\n\n const size = align(offset, Math.max(maxSize, alignment));\n\n return {\n members: layoutMembers,\n size,\n alignment\n };\n}\n\nfunction sizeOf(type ) {\n return viewTypes[type].BYTES_PER_ELEMENT;\n}\n\nfunction align(offset , size ) {\n return Math.ceil(offset / size) * size;\n}\n\nmodule.exports.StructArray = StructArray;\nmodule.exports.Struct = Struct;\nmodule.exports.viewTypes = viewTypes;\nmodule.exports.createLayout = createLayout;\n","// \n\n/**\n * Throttle the given function to run at most every `period` milliseconds.\n */\nmodule.exports = function throttle(fn , time ) {\n let pending = false;\n let timerId = 0;\n\n const later = () => {\n timerId = 0;\n if (pending) {\n fn();\n timerId = setTimeout(later, time);\n pending = false;\n }\n };\n\n return () => {\n pending = true;\n if (!timerId) {\n later();\n }\n return timerId;\n };\n};\n","// \n\nconst Coordinate = require('../geo/coordinate');\nconst {OverscaledTileID} = require('../source/tile_id');\n\nmodule.exports = tileCover;\n\nfunction tileCover(z , bounds ,\n actualZ , renderWorldCopies ) {\n if (renderWorldCopies === undefined) {\n renderWorldCopies = true;\n }\n const tiles = 1 << z;\n const t = {};\n\n function scanLine(x0, x1, y) {\n let x, w, wx, coord;\n if (y >= 0 && y <= tiles) {\n for (x = x0; x < x1; x++) {\n w = Math.floor(x / tiles);\n wx = (x % tiles + tiles) % tiles;\n if (w === 0 || renderWorldCopies === true) {\n coord = new OverscaledTileID(actualZ, w, z, wx, y);\n t[coord.key] = coord;\n }\n }\n }\n }\n\n // Divide the screen up in two triangles and scan each of them:\n // +---/\n // | / |\n // /---+\n scanTriangle(bounds[0], bounds[1], bounds[2], 0, tiles, scanLine);\n scanTriangle(bounds[2], bounds[3], bounds[0], 0, tiles, scanLine);\n\n return Object.keys(t).map((id) => {\n return t[id];\n });\n}\n\n\n// Taken from polymaps src/Layer.js\n// https://github.com/simplegeo/polymaps/blob/master/src/Layer.js#L333-L383\n\nfunction edge(a , b ) {\n if (a.row > b.row) { const t = a; a = b; b = t; }\n return {\n x0: a.column,\n y0: a.row,\n x1: b.column,\n y1: b.row,\n dx: b.column - a.column,\n dy: b.row - a.row\n };\n}\n\nfunction scanSpans(e0, e1, ymin, ymax, scanLine) {\n const y0 = Math.max(ymin, Math.floor(e1.y0));\n const y1 = Math.min(ymax, Math.ceil(e1.y1));\n\n // sort edges by x-coordinate\n if ((e0.x0 === e1.x0 && e0.y0 === e1.y0) ?\n (e0.x0 + e1.dy / e0.dy * e0.dx < e1.x1) :\n (e0.x1 - e1.dy / e0.dy * e0.dx < e1.x0)) {\n const t = e0; e0 = e1; e1 = t;\n }\n\n // scan lines!\n const m0 = e0.dx / e0.dy;\n const m1 = e1.dx / e1.dy;\n const d0 = e0.dx > 0; // use y + 1 to compute x0\n const d1 = e1.dx < 0; // use y + 1 to compute x1\n for (let y = y0; y < y1; y++) {\n const x0 = m0 * Math.max(0, Math.min(e0.dy, y + d0 - e0.y0)) + e0.x0;\n const x1 = m1 * Math.max(0, Math.min(e1.dy, y + d1 - e1.y0)) + e1.x0;\n scanLine(Math.floor(x1), Math.ceil(x0), y);\n }\n}\n\nfunction scanTriangle(a , b , c , ymin, ymax, scanLine) {\n let ab = edge(a, b),\n bc = edge(b, c),\n ca = edge(c, a);\n\n let t;\n\n // sort edges by y-length\n if (ab.dy > bc.dy) { t = ab; ab = bc; bc = t; }\n if (ab.dy > ca.dy) { t = ab; ab = ca; ca = t; }\n if (bc.dy > ca.dy) { t = bc; bc = ca; ca = t; }\n\n // scan span! scan span!\n if (ab.dy) scanSpans(ca, ab, ymin, ymax, scanLine);\n if (bc.dy) scanSpans(ca, bc, ymin, ymax, scanLine);\n}\n\n","// \n\nmodule.exports = resolveTokens;\n\n/**\n * Replace tokens in a string template with values in an object\n *\n * @param properties a key/value relationship between tokens and replacements\n * @param text the template string\n * @returns the template with tokens replaced\n * @private\n */\nfunction resolveTokens(properties , text ) {\n return text.replace(/{([^{}]+)}/g, (match, key ) => {\n return key in properties ? String(properties[key]) : '';\n });\n}\n","// \n\nconst UnitBezier = require('@mapbox/unitbezier');\nconst Coordinate = require('../geo/coordinate');\nconst Point = require('@mapbox/point-geometry');\n\n \n\n/**\n * @module util\n * @private\n */\n\n/**\n * Given a value `t` that varies between 0 and 1, return\n * an interpolation function that eases between 0 and 1 in a pleasing\n * cubic in-out fashion.\n *\n * @private\n */\nexports.easeCubicInOut = function(t ) {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n const t2 = t * t,\n t3 = t2 * t;\n return 4 * (t < 0.5 ? t3 : 3 * (t - t2) + t3 - 0.75);\n};\n\n/**\n * Given given (x, y), (x1, y1) control points for a bezier curve,\n * return a function that interpolates along that curve.\n *\n * @param p1x control point 1 x coordinate\n * @param p1y control point 1 y coordinate\n * @param p2x control point 2 x coordinate\n * @param p2y control point 2 y coordinate\n * @private\n */\nexports.bezier = function(p1x , p1y , p2x , p2y ) {\n const bezier = new UnitBezier(p1x, p1y, p2x, p2y);\n return function(t ) {\n return bezier.solve(t);\n };\n};\n\n/**\n * A default bezier-curve powered easing function with\n * control points (0.25, 0.1) and (0.25, 1)\n *\n * @private\n */\nexports.ease = exports.bezier(0.25, 0.1, 0.25, 1);\n\n/**\n * constrain n to the given range via min + max\n *\n * @param n value\n * @param min the minimum value to be returned\n * @param max the maximum value to be returned\n * @returns the clamped value\n * @private\n */\nexports.clamp = function (n , min , max ) {\n return Math.min(max, Math.max(min, n));\n};\n\n/**\n * constrain n to the given range, excluding the minimum, via modular arithmetic\n *\n * @param n value\n * @param min the minimum value to be returned, exclusive\n * @param max the maximum value to be returned, inclusive\n * @returns constrained number\n * @private\n */\nexports.wrap = function (n , min , max ) {\n const d = max - min;\n const w = ((n - min) % d + d) % d + min;\n return (w === min) ? max : w;\n};\n\n/*\n * Call an asynchronous function on an array of arguments,\n * calling `callback` with the completed results of all calls.\n *\n * @param array input to each call of the async function.\n * @param fn an async function with signature (data, callback)\n * @param callback a callback run after all async work is done.\n * called with an array, containing the results of each async call.\n * @private\n */\nexports.asyncAll = function (\n array ,\n fn ,\n callback \n) {\n if (!array.length) { return callback(null, []); }\n let remaining = array.length;\n const results = new Array(array.length);\n let error = null;\n array.forEach((item, i) => {\n fn(item, (err, result) => {\n if (err) error = err;\n results[i] = ((result ) ); // https://github.com/facebook/flow/issues/2123\n if (--remaining === 0) callback(error, results);\n });\n });\n};\n\n/*\n * Polyfill for Object.values. Not fully spec compliant, but we don't\n * need it to be.\n *\n * @private\n */\nexports.values = function (obj ) {\n const result = [];\n for (const k in obj) {\n result.push(obj[k]);\n }\n return result;\n};\n\n/*\n * Compute the difference between the keys in one object and the keys\n * in another object.\n *\n * @returns keys difference\n * @private\n */\nexports.keysDifference = function (obj , other ) {\n const difference = [];\n for (const i in obj) {\n if (!(i in other)) {\n difference.push(i);\n }\n }\n return difference;\n};\n\n/**\n * Given a destination object and optionally many source objects,\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param dest destination object\n * @param sources sources from which properties are pulled\n * @private\n */\nexports.extend = function (dest , ...sources ) {\n for (const src of sources) {\n for (const k in src) {\n dest[k] = src[k];\n }\n }\n return dest;\n};\n\n/**\n * Given an object and a number of properties as strings, return version\n * of that object with only those properties.\n *\n * @param src the object\n * @param properties an array of property names chosen\n * to appear on the resulting object.\n * @returns object with limited properties.\n * @example\n * var foo = { name: 'Charlie', age: 10 };\n * var justName = pick(foo, ['name']);\n * // justName = { name: 'Charlie' }\n * @private\n */\nexports.pick = function (src , properties ) {\n const result = {};\n for (let i = 0; i < properties.length; i++) {\n const k = properties[i];\n if (k in src) {\n result[k] = src[k];\n }\n }\n return result;\n};\n\nlet id = 1;\n\n/**\n * Return a unique numeric id, starting at 1 and incrementing with\n * each call.\n *\n * @returns unique numeric id.\n * @private\n */\nexports.uniqueId = function () {\n return id++;\n};\n\n/**\n * Given an array of member function names as strings, replace all of them\n * with bound versions that will always refer to `context` as `this`. This\n * is useful for classes where otherwise event bindings would reassign\n * `this` to the evented object or some other value: this lets you ensure\n * the `this` value always.\n *\n * @param fns list of member function names\n * @param context the context value\n * @example\n * function MyClass() {\n * bindAll(['ontimer'], this);\n * this.name = 'Tom';\n * }\n * MyClass.prototype.ontimer = function() {\n * alert(this.name);\n * };\n * var myClass = new MyClass();\n * setTimeout(myClass.ontimer, 100);\n * @private\n */\nexports.bindAll = function(fns , context ) {\n fns.forEach((fn) => {\n if (!context[fn]) { return; }\n context[fn] = context[fn].bind(context);\n });\n};\n\n/**\n * Given a list of coordinates, get their center as a coordinate.\n *\n * @returns centerpoint\n * @private\n */\nexports.getCoordinatesCenter = function(coords ) {\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < coords.length; i++) {\n minX = Math.min(minX, coords[i].column);\n minY = Math.min(minY, coords[i].row);\n maxX = Math.max(maxX, coords[i].column);\n maxY = Math.max(maxY, coords[i].row);\n }\n\n const dx = maxX - minX;\n const dy = maxY - minY;\n const dMax = Math.max(dx, dy);\n const zoom = Math.max(0, Math.floor(-Math.log(dMax) / Math.LN2));\n return new Coordinate((minX + maxX) / 2, (minY + maxY) / 2, 0)\n .zoomTo(zoom);\n};\n\n/**\n * Determine if a string ends with a particular substring\n *\n * @private\n */\nexports.endsWith = function(string , suffix ) {\n return string.indexOf(suffix, string.length - suffix.length) !== -1;\n};\n\n/**\n * Create an object by mapping all the values of an existing object while\n * preserving their keys.\n *\n * @private\n */\nexports.mapObject = function(input , iterator , context ) {\n const output = {};\n for (const key in input) {\n output[key] = iterator.call(context || this, input[key], key, input);\n }\n return output;\n};\n\n/**\n * Create an object by filtering out values of an existing object.\n *\n * @private\n */\nexports.filterObject = function(input , iterator , context ) {\n const output = {};\n for (const key in input) {\n if (iterator.call(context || this, input[key], key, input)) {\n output[key] = input[key];\n }\n }\n return output;\n};\n\n/**\n * Deeply compares two object literals.\n *\n * @private\n */\nexports.deepEqual = function(a , b ) {\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (!exports.deepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n if (typeof a === 'object' && a !== null && b !== null) {\n if (!(typeof b === 'object')) return false;\n const keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) return false;\n for (const key in a) {\n if (!exports.deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n return a === b;\n};\n\n/**\n * Deeply clones two objects.\n *\n * @private\n */\nexports.clone = function (input ) {\n if (Array.isArray(input)) {\n return input.map(exports.clone);\n } else if (typeof input === 'object' && input) {\n return ((exports.mapObject(input, exports.clone) ) );\n } else {\n return input;\n }\n};\n\n/**\n * Check if two arrays have at least one common element.\n *\n * @private\n */\nexports.arraysIntersect = function (a , b ) {\n for (let l = 0; l < a.length; l++) {\n if (b.indexOf(a[l]) >= 0) return true;\n }\n return false;\n};\n\n/**\n * Print a warning message to the console and ensure duplicate warning messages\n * are not printed.\n *\n * @private\n */\nconst warnOnceHistory = {};\nexports.warnOnce = function(message ) {\n if (!warnOnceHistory[message]) {\n // console isn't defined in some WebWorkers, see #2558\n if (typeof console !== \"undefined\") console.warn(message);\n warnOnceHistory[message] = true;\n }\n};\n\n/**\n * Indicates if the provided Points are in a counter clockwise (true) or clockwise (false) order\n *\n * @returns true for a counter clockwise set of points\n */\n// http://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/\nexports.isCounterClockwise = function(a , b , c ) {\n return (c.y - a.y) * (b.x - a.x) > (b.y - a.y) * (c.x - a.x);\n};\n\n/**\n * Returns the signed area for the polygon ring. Postive areas are exterior rings and\n * have a clockwise winding. Negative areas are interior rings and have a counter clockwise\n * ordering.\n *\n * @param ring Exterior or interior ring\n */\nexports.calculateSignedArea = function(ring ) {\n let sum = 0;\n for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n};\n\n/**\n * Detects closed polygons, first + last point are equal\n *\n * @param points array of points\n * @return true if the points are a closed polygon\n */\nexports.isClosedPolygon = function(points ) {\n // If it is 2 points that are the same then it is a point\n // If it is 3 points with start and end the same then it is a line\n if (points.length < 4)\n return false;\n\n const p1 = points[0];\n const p2 = points[points.length - 1];\n\n if (Math.abs(p1.x - p2.x) > 0 ||\n Math.abs(p1.y - p2.y) > 0) {\n return false;\n }\n\n // polygon simplification can produce polygons with zero area and more than 3 points\n return (Math.abs(exports.calculateSignedArea(points)) > 0.01);\n};\n\n/**\n * Converts spherical coordinates to cartesian coordinates.\n *\n * @param spherical Spherical coordinates, in [radial, azimuthal, polar]\n * @return cartesian coordinates in [x, y, z]\n */\n\nexports.sphericalToCartesian = function([r, azimuthal, polar] ) {\n // We abstract \"north\"/\"up\" (compass-wise) to be 0° when really this is 90° (π/2):\n // correct for that here\n azimuthal += 90;\n\n // Convert azimuthal and polar angles to radians\n azimuthal *= Math.PI / 180;\n polar *= Math.PI / 180;\n\n return {\n x: r * Math.cos(azimuthal) * Math.sin(polar),\n y: r * Math.sin(azimuthal) * Math.sin(polar),\n z: r * Math.cos(polar)\n };\n};\n\n/**\n * Parses data from 'Cache-Control' headers.\n *\n * @param cacheControl Value of 'Cache-Control' header\n * @return object containing parsed header info.\n */\n\nexports.parseCacheControl = function(cacheControl ) {\n // Taken from [Wreck](https://github.com/hapijs/wreck)\n const re = /(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g;\n\n const header = {};\n cacheControl.replace(re, ($0, $1, $2, $3) => {\n const value = $2 || $3;\n header[$1] = value ? value.toLowerCase() : true;\n return '';\n });\n\n if (header['max-age']) {\n const maxAge = parseInt(header['max-age'], 10);\n if (isNaN(maxAge)) delete header['max-age'];\n else header['max-age'] = maxAge;\n }\n\n return header;\n};\n","// \n\nclass Feature {\n \n \n \n \n\n \n\n constructor(vectorTileFeature , z , x , y ) {\n this.type = 'Feature';\n\n this._vectorTileFeature = vectorTileFeature;\n (vectorTileFeature )._z = z;\n (vectorTileFeature )._x = x;\n (vectorTileFeature )._y = y;\n\n this.properties = vectorTileFeature.properties;\n\n if (vectorTileFeature.id != null) {\n this.id = vectorTileFeature.id;\n }\n }\n\n get geometry() {\n if (this._geometry === undefined) {\n this._geometry = this._vectorTileFeature.toGeoJSON(\n (this._vectorTileFeature )._x,\n (this._vectorTileFeature )._y,\n (this._vectorTileFeature )._z).geometry;\n }\n return this._geometry;\n }\n\n set geometry(g ) {\n this._geometry = g;\n }\n\n toJSON() {\n const json = {\n geometry: this.geometry\n };\n for (const i in this) {\n if (i === '_geometry' || i === '_vectorTileFeature') continue;\n json[i] = (this )[i];\n }\n return json;\n }\n}\n\nmodule.exports = Feature;\n","// \n\nconst scriptDetection = require('./script_detection');\n\nmodule.exports = function verticalizePunctuation(input ) {\n let output = '';\n\n for (let i = 0; i < input.length; i++) {\n const nextCharCode = input.charCodeAt(i + 1) || null;\n const prevCharCode = input.charCodeAt(i - 1) || null;\n\n const canReplacePunctuation = (\n (!nextCharCode || !scriptDetection.charHasRotatedVerticalOrientation(nextCharCode) || module.exports.lookup[input[i + 1]]) &&\n (!prevCharCode || !scriptDetection.charHasRotatedVerticalOrientation(prevCharCode) || module.exports.lookup[input[i - 1]])\n );\n\n if (canReplacePunctuation && module.exports.lookup[input[i]]) {\n output += module.exports.lookup[input[i]];\n } else {\n output += input[i];\n }\n }\n\n return output;\n};\n\nmodule.exports.lookup = {\n '!': '︕',\n '#': '',\n '$': '',\n '%': '',\n '&': '',\n '(': '︵',\n ')': '︶',\n '*': '',\n '+': '',\n ',': '︐',\n '-': '︲',\n '.': '・',\n '/': '',\n ':': '︓',\n ';': '︔',\n '<': '︿',\n '=': '',\n '>': '﹀',\n '?': '︖',\n '@': '',\n '[': '﹇',\n '\\\\': '',\n ']': '﹈',\n '^': '',\n '_': '︳',\n '`': '',\n '{': '︷',\n '|': '―',\n '}': '︸',\n '~': '',\n '¢': '¢',\n '£': '£',\n '¥': '¥',\n '¦': '¦',\n '¬': '¬',\n '¯': ' ̄',\n '': '︲',\n '—': '︱',\n '': '﹃',\n '': '﹄',\n '“': '﹁',\n '”': '﹂',\n '…': '︙',\n '‧': '・',\n '₩': '₩',\n '、': '︑',\n '。': '︒',\n '〈': '︿',\n '〉': '﹀',\n '《': '︽',\n '》': '︾',\n '「': '﹁',\n '」': '﹂',\n '『': '﹃',\n '』': '﹄',\n '【': '︻',\n '】': '︼',\n '': '︹',\n '': '︺',\n '〖': '︗',\n '〗': '︘',\n '': '︕',\n '': '︵',\n '': '︶',\n '': '︐',\n '': '︲',\n '': '・',\n '': '︓',\n '': '︔',\n '': '︿',\n '': '﹀',\n '': '︖',\n '': '﹇',\n '': '﹈',\n '_': '︳',\n '': '︷',\n '': '―',\n '': '︸',\n '⦅': '︵',\n '⦆': '︶',\n '。': '︒',\n '「': '﹁',\n '」': '﹂'\n};\n","// \n\nconst assert = require('assert');\n\nconst Grid = require('grid-index');\nconst Color = require('../style-spec/util/color');\nconst {\n StylePropertyFunction,\n StyleExpression,\n StyleExpressionWithErrorHandling,\n ZoomDependentExpression,\n ZoomConstantExpression\n} = require('../style-spec/expression');\nconst {CompoundExpression} = require('../style-spec/expression/compound_expression');\nconst expressions = require('../style-spec/expression/definitions');\nconst {ImageData} = require('./window');\n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n\nconst registry = {};\n\n/**\n * Register the given class as serializable.\n *\n * @param options\n * @param options.omit List of properties to omit from serialization (e.g., cached/computed properties)\n * @param options.shallow List of properties that should be serialized by a simple shallow copy, rather than by a recursive call to serialize().\n *\n * @private\n */\nfunction register (name , klass , options = {}) {\n assert(!registry[name], `${name} is already registered.`);\n (Object.defineProperty )(klass, '_classRegistryKey', {\n value: name,\n writeable: false\n });\n registry[name] = {\n klass,\n omit: options.omit || [],\n shallow: options.shallow || []\n };\n}\n\nregister('Object', Object);\n\nGrid.serialize = function serializeGrid(grid , transferables ) {\n const ab = grid.toArrayBuffer();\n if (transferables) {\n transferables.push(ab);\n }\n return ab;\n};\n\nGrid.deserialize = function deserializeGrid(serialized ) {\n return new Grid(serialized);\n};\nregister('Grid', Grid);\n\nregister('Color', Color);\n\nregister('StylePropertyFunction', StylePropertyFunction);\nregister('StyleExpression', StyleExpression, {omit: ['_evaluator']});\nregister(\n 'StyleExpressionWithErrorHandling',\n StyleExpressionWithErrorHandling,\n {omit: ['_evaluator']}\n);\nregister('ZoomDependentExpression', ZoomDependentExpression);\nregister('ZoomConstantExpression', ZoomConstantExpression);\nregister('CompoundExpression', CompoundExpression, {omit: ['_evaluate']});\nfor (const name in expressions) {\n if (expressions[name]._classRegistryKey) continue;\n register(`Expression_${name}`, expressions[name]);\n}\n\n/**\n * Serialize the given object for transfer to or from a web worker.\n *\n * For non-builtin types, recursively serialize each property (possibly\n * omitting certain properties - see register()), and package the result along\n * with the constructor's `name` so that the appropriate constructor can be\n * looked up in `deserialize()`.\n *\n * If a `transferables` array is provided, add any transferable objects (i.e.,\n * any ArrayBuffers or ArrayBuffer views) to the list. (If a copy is needed,\n * this should happen in the client code, before using serialize().)\n */\nfunction serialize(input , transferables ) {\n if (input === null ||\n input === undefined ||\n typeof input === 'boolean' ||\n typeof input === 'number' ||\n typeof input === 'string' ||\n input instanceof Boolean ||\n input instanceof Number ||\n input instanceof String ||\n input instanceof Date ||\n input instanceof RegExp) {\n return input;\n }\n\n if (input instanceof ArrayBuffer) {\n if (transferables) {\n transferables.push(input);\n }\n return input;\n }\n\n if (ArrayBuffer.isView(input)) {\n const view = (input );\n if (transferables) {\n transferables.push(view.buffer);\n }\n return view;\n }\n\n if (input instanceof ImageData) {\n if (transferables) {\n transferables.push(input.data.buffer);\n }\n return input;\n }\n\n if (Array.isArray(input)) {\n const serialized = [];\n for (const item of input) {\n serialized.push(serialize(item, transferables));\n }\n return serialized;\n }\n\n if (typeof input === 'object') {\n const klass = (input.constructor );\n const name = klass._classRegistryKey;\n if (!name) {\n throw new Error(`can't serialize object of unregistered class`);\n }\n assert(registry[name]);\n\n const properties = {};\n\n if (klass.serialize) {\n // (Temporary workaround) allow a class to provide static\n // `serialize()` and `deserialize()` methods to bypass the generic\n // approach.\n // This temporary workaround lets us use the generic serialization\n // approach for objects whose members include instances of dynamic\n // StructArray types. Once we refactor StructArray to be static,\n // we can remove this complexity.\n properties._serialized = (klass.serialize )(input, transferables);\n } else {\n for (const key in input) {\n // any cast due to https://github.com/facebook/flow/issues/5393\n if (!(input ).hasOwnProperty(key)) continue;\n if (registry[name].omit.indexOf(key) >= 0) continue;\n const property = (input )[key];\n properties[key] = registry[name].shallow.indexOf(key) >= 0 ?\n property :\n serialize(property, transferables);\n }\n }\n\n return {name, properties};\n }\n\n throw new Error(`can't serialize object of type ${typeof input}`);\n}\n\nfunction deserialize(input ) {\n if (input === null ||\n input === undefined ||\n typeof input === 'boolean' ||\n typeof input === 'number' ||\n typeof input === 'string' ||\n input instanceof Boolean ||\n input instanceof Number ||\n input instanceof String ||\n input instanceof Date ||\n input instanceof RegExp ||\n input instanceof ArrayBuffer ||\n ArrayBuffer.isView(input) ||\n input instanceof ImageData) {\n return input;\n }\n\n if (Array.isArray(input)) {\n return input.map((i) => deserialize(i));\n }\n\n if (typeof input === 'object') {\n const {name, properties} = (input );\n if (!name) {\n throw new Error(`can't deserialize object of anonymous class`);\n }\n\n const {klass} = registry[name];\n if (!klass) {\n throw new Error(`can't deserialize unregistered class ${name}`);\n }\n\n if (klass.deserialize) {\n return (klass.deserialize )(properties._serialized);\n }\n\n const result = Object.create(klass.prototype);\n\n for (const key of Object.keys(properties)) {\n result[key] = registry[name].shallow.indexOf(key) >= 0 ?\n properties[key] : deserialize(properties[key]);\n }\n\n return result;\n }\n\n throw new Error(`can't deserialize object of type ${typeof input}`);\n}\n\nmodule.exports = {\n register,\n serialize,\n deserialize\n};\n","// \n\nconst assert = require('assert');\nconst WebWorker = require('./web_worker');\n\n \n\n/**\n * Constructs a worker pool.\n * @private\n */\nclass WorkerPool {\n \n \n\n constructor() {\n this.active = {};\n }\n\n acquire(mapId ) {\n if (!this.workers) {\n // Lazily look up the value of mapboxgl.workerCount. This allows\n // client code a chance to set it while circumventing cyclic\n // dependency problems\n const workerCount = require('../').workerCount;\n assert(typeof workerCount === 'number' && workerCount < Infinity);\n\n this.workers = [];\n while (this.workers.length < workerCount) {\n this.workers.push(new WebWorker());\n }\n }\n\n this.active[mapId] = true;\n return this.workers.slice();\n }\n\n release(mapId ) {\n delete this.active[mapId];\n if (Object.keys(this.active).length === 0) {\n this.workers.forEach((w) => {\n w.terminate();\n });\n this.workers = (null );\n }\n }\n}\n\nmodule.exports = WorkerPool;\n"]}