@maptec/maptec-js 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Maptec.esm.js ADDED
@@ -0,0 +1 @@
1
+ var t={},e={};function i(i,r,o){if(e[i]=o,"index"===i){var n="var sharedModule = {}; ("+e.shared+")(sharedModule); ("+e.worker+")(sharedModule);",s={};return e.shared(s),e.index(t,s),"undefined"!=typeof window&&((t.default||t).workerUrl=window.URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),t}}function r(t,e){return t-=302,o()[t]}function o(){const t=["_unit","_onMapScroll","top-fill-color","extTextureFilterAnisotropic","resetRequestQueue","subdivisionGranularity","tileID",'": apitiles url-type requires "url-layer" to be configured.',"reduce","sortFeatures","ceil","collisionVertexBuffer","BLEND","onAdd","fill-pattern","CircleOverlayType","getProjectionData","_endTime","_touches","clearCache","_eventsInProgress","attachShader","_setViewAnimation","polygonOverlayOutlinePattern","circle-stroke-opacity","exaggeration","#2196f3","sideOpacity","5961925vUUxHD","maptec-crosshair","_layers","_interactiveBindings","invalid distance","inverseProjectionMatrix","_defaultPrevented","_coordsTextureSize","escape","u_coord_matrix",'" has invalid "content" value',"textSize","placedIconSymbolIndex","role","_mouseRoll","u_is_variable_anchor","lineGradientSDF","pauseablePlacement","pointerup","mult","offsets","sourceDataType","_polygonStyle","parse","roll","_bucketParts",'Image "',"_onDrag","_zoomInButton","_collectResourceTiming","_getPointAtProgress","zoomDiff","Invalid type: 'container' must be a String or HTMLElement.","isFinite","grab","_sourceErrored","getRootDirectory","getTerrain","symbolIconImage","_setMap","setClusterOptions","mouseout","boundLayoutVertexBuffer","_interactionLayerIdsForDelegation","RENDERBUFFER","maptec-ctrl-icon","u_pattern_size_a","cos","u_translate","atlasInterpolation","_applyUpdatedTransform","onComplete","_pixelMatrix3D","_attachMapLayerPointerForwarding","u_color_stops","isEnabled","toggle","allPointsOccluded","EXT_texture_filter_anisotropic","_applyClusterCountLayerStyle","verticalPlacedTextSymbolIndex","spriteData","getDefaultPosition","getNorthEast","clusterPointCountTextSize","deserialize","_contextMenuEvent","needsRenderFrame","_hasInvalidDimensions","handleEvent","CircleOverlay is not attached to a map.","hasTransitions","handleEaseTo","refreshTiles","markUsedOrientation",'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance',"_clearSource","_fillLayerId","_box","getIds","u_depth","_handlers","gradientExpression","_addPolygonOutlineSolidLayer","textSizeData","sources","symbolStyle","timeAdded","solid","findKeyframes","projection","touchAction","dataDiff","u_extrude_scale","max-age","_mousePan","setConstantPatternPositionsForProperty","_gradient","layers.","justify-content:center","last","getDefault","viewport","updateTransitions","stroke-width","getLayoutProperty","circle-translate","_steps","currentProjection","location","_cachedFrustum","_glowRadius","LEQUAL","-prism-overlay","rasterBoundsBufferPosOnly","LineString","currentStencilSource","请求超时(","rightJustifiedTextSymbolIndex",'Cannot move layer "',"createVertexArray","ZERO","currentHelper","_layerOrderChanged","4.5","keys","paint","getCoordsTexture","_firstTwoTouches","touchend","fillColor","setEventedParent","_rotationMatrix","u_aspect_ratio","setMinZoom","DecompressionStream"," but this library supports up to spec version 3","_startPos","u_projection_fallback_matrix","fixedUniforms","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}","_zoomDataLayers","createShader","_loadTile","validateStyle","_lineLayerSolidId","endEulerAngles","Maximum directory depth exceeded","_createObject","getPoint","fadingDirection","wrap","_styleImageMissingHandler","_showOverdrawInspector","bearingDelta","in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","_viewProjMatrix","_texHeight","_stop","create","_applyClusterOptionsToGeoJSONSource","removeLayer","text-align:center","boundProgram","textRadialOffset","clearKeyframes","Program failed to link: ","count","_finishLoading","AttributionControl.","lineWidth","_releaseSymbolFadeTiles","usedForTerrain","getRayDirectionFromPixel","changedTouches","qualityFactor","ReadWrite","active","getNorthWest","topOpacity","_trackPointer","unprojectScreenPoint","getLocation","loop","_maximumWeight","_prepareElevation","uses","first","scale","online","_emptyDepthTexture","glyphAtlasTexture","_fitInternal","mainMatrix","_elevation","setFeatureState","gradient must contain at least 2 density stops","sessionToken","close","getPitchedTextCorrection","tMin","dblclick","fromAabb","getClusterLeaves","customAttribution","u_top_opacity","_playing","mapEvent","projectTileCoordinates","_hoverStyle",'Cannot set the zoom range of non-existing layer "',"hasTransition","setPadding","DEPTH_STENCIL_ATTACHMENT","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c\n);}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\n#ifdef GLOBE\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\n#endif\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;","removeSource","_clusterRadiusPixels","glowRadius","#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\n#pragma maptec: define highp vec4 fill_color\n#pragma maptec: define highp vec4 halo_color\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float halo_width\n#pragma maptec: define lowp float halo_blur\nvoid main() {\n#pragma maptec: initialize highp vec4 fill_color\n#pragma maptec: initialize highp vec4 halo_color\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float halo_width\n#pragma maptec: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","boundDynamicVertexBuffer3","WebGL 2.0","_overlayManager","identifier","visualizeRoll","unmodified","u_size_t",'": GeoJSON data is not compatible with updateData',"AnimationKeyFrameTrack","colorRamp","_updatedSources","_perp","_updateLayoutProperty","backfilled","transformRequest","6EXSVLL","Feature","_tileJSONRequest","_ignoreContextMenu","_radius","u_crossfade_from","_moved","_cumulativeLengths","case","_validate","Source","initializeTileState","prelude","layout","registerMessageHandler","_coordsAscendingStr","dashEntry","u_texsize","maxLon","config","wrapped","_mercatorMatrix","removeCustomLayer","CooperativeGesturesHandler.MacHelpText","mouseenter","strokeWeight","maybeDrawDepthAndCoords","handleJumpToCenterZoom","boxzoomcancel","oneFingerTouchMoveStateManager","pixels","ZoomIn","pointCoordinate","_updateElevation","collisionCircleArrays","queryRadius","_styleDirty","_update","writingMode","_pushDataToSource","_availableImages","setVerticalFieldOfView","projections","paddedLength","_transformRequestFn","_innerShadowWidth","gridRightBoundary","ZoomOut","主机域名 :","_clusterCountLayerPaint","_maxTileCacheSize","_tileMeshCache","geometry","glyphHeight","itemSize","unloadTile","_compassIcon","_clusterCirclePaintProperties","minPitch must be greater than or equal to 0","_render","u_radar_type","_pitchWithRotate","split","_restoreDataAfterHoverStyle","pointermove","right","setVertexAttribPointers","pmtiles","wasRequested","LN10","z-index:9999","strokeOpacity","translate(-50%,-100%)","fbo","_stacks","getOverlays","createVertexBuffer","boundVertexOffset","circle-color","loadJSON","u_lightcolor","_source","gradient keys must be numbers between 0 and 1","_hash","_overviewDragStartLngLat","textBaseline","_doGetPlaceDetails","contextmenu","horizontalOnly","drawSideSurface","stencilTest","primitiveLength","querySourceFeatures","fullscreenstart","setRenderWorldCopies","_apply","allowVariableZoom","pointerEvents","lineOffsetY","places","u_color_ramp_size","updateCacheSize","Reset bearing to north","startMove","setCircleStyle","pointCluster","endsWith","pass","_spriteRequest","_forceFullPlacement","clippingMask","_mainDragStartCenter","userImage","' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.","_opacityTimeout","_distance","_swipeTouch","cullFace","getLayer","_ensureDirectionImage","getFastPathSimpleProjectionMatrix","terrainRttPosMatrix32f","sourceLayerIndex","div","_normalizeAltitude","removeBucketCrossTileIDs","buf","_globalState","REPLACE","Attempting to run(), but is already running.","PlaceSearch.search 参数无法识别。请使用 search(keyword, callback) 或 search(keyword, options, callback)。","beginPath","_content","getScaledCoordinates","linear","_sideOpacity","sideColor","parentNode","segment","bearingInRadians","glyphAtlasImage","_createDelegatedListener","rgba(0, 0, 0, 0)","maxGroupID","_inViewTiles","Toggle attribution","maptec-ctrl maptec-ctrl-group","_createButton","keyCode","_getLanguage","_rttTiles","maptec-ctrl-zoom-in","_version","_removeClusterCountLayerIfPresent","_clickZoom","#333333","EQUAL","_applyPixelCirclePaint","lineLength","u_ratio","amount","calculateFogBlendOpacity","_trim","Unable to perform style diff: ","_updateAltitude","hash","setConstrainOverride","_reloadSource","simpleSegment","transformStyle","svg","set","Style","maximumWeight","mousePos","_renderableTilesKeys","dependencies","6.5","insert","_handleStyleImageMissing","_updateVisibility","visibility","getContext","_rollInRadians","mark","_symbolStyleFieldSetExplicitlyByApi","#FFFFFF","ARRAY_BUFFER","directionImageGap","_createPrismGeoJSON","tileManager","_isSameTouchEvent","_strokeGradient","placeId","initDebugOverlayCanvas","5820750dKwAPg","_normalizeCenterItems","lang","centerAltitude","textJustify","texture","_fontStyle","_getMesh","redFactor","_popup","SCISSOR_TEST","_setButtonTitle","polygon-overlay-","_fboDepthTexture","_setLayerPaint","deleteRenderbuffer","bottom","_symbolsByKey","distanceFromAnchor","sendAsync","maxzoom","页面地址 :","_realTime","u_matrix","startsWith","disable","fadingRole","glowColor","bufferData","serialize","opacityVertexArray","_controls","_effectGradient","_pitching","string","zoomAdjustment","circle-overlay","flyTo","useSubdivision","transformBbox","panDelta","/reverse","box","cullFaceSide","depthRange","group","setMinPitch","_replacePopupBody","screenPointToLocation","_easing",'" already exists.',"maptec-marker","getMatrixForModel"," u_","setProjection","_linePaintPropertiesDashed","pixelsToGLUnits","useGlobalPatternAtlas","depthAtPoint","getPaintProperty","data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=","line-gradient","abortController","roundZoom","_toggleAttribution","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}","possiblyEvaluate","_flatPos","rootDirectoryLength","display:flex","abortTile","_pixelMatrix","UNSIGNED_SHORT","headerData","interpolatePadding","#define TERRAIN3D;","workerCount","_mapId","_zoomOut","_posMatrixCache","open","_afterImageUpdated","reloading","getTerrainCoords","hillshade-illumination-anchor","unloaded","tileUnitsToMeters","circleStrokeOpacity","circleRadius","to-string","$clipping","bucket.bucketInstanceId should be 0","setRTLTextPlugin","_applyDiffToSource","MultiLineString","listener","units","translate(-100%,-100%)","defines","GREATER","stateDependentLayerIds","rotationAlignment","recalculate",'Cannot add layer "',"from","strokeWidth","readImageNow","tracks","KEEP","INFINITE","_polygonOutlineSolidLayerId","indexBuffer","maptec_preloaded_worker_pool","easeFunc","move","_cachedMesh","fadeOpacity","line-opacity","CircleOverlay","expires","_updateAttributions","anchor","framebuffer","getCameraQueryGeometry","polylineOverlaySDF","isOverscaled","glyphManager","getTilePoint","currentTransform","鉴权结果 :","lineMetrics","is3D","collisionVertexArray","CameraOrbitKeyFrameTrack","/tile/info","_currentlyRunning","always","runLength","cumulativeLengths","terminate","horizontal","_isLngLatPoint","basic","_canvas","framebufferRenderbuffer","box-sizing:border-box","removeFeatureState","_lineStyle","_getTerrainElevationFunc","clientY","href","projectPathToScreenSpace","iconsNeedLinear","GDA","isPaddingEqual","content","u_lightpos","getTransition","_positions","placements","invalid UTF-8 data","routes","lng","maptec-popup-content","getId","u_terrain_dim","_resizeTransform","tileAnchorPoint","useSlerp","No free RenderPool available, call freeAllObjects() required!","POST","cannot calculate elevation if elevation maxzoom > source.maxzoom","metaKey","closeOnClick","_overviewMapEventHandlers","setCenterAltitude","_originalPositions","WebkitTransform","u_direction_gap","featureIndex","getElement","setSky","_fillOpacity","acos","onmozfullscreenchange","HALF_FLOAT","heatmap","tileSize","calculateFogMatrix is not supported on globe projection.","_updatePolyline","u_tl_parent","lineVertexArray","in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;\n#pragma maptec: define highp vec4 fill_color\n#pragma maptec: define highp vec4 halo_color\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float halo_width\n#pragma maptec: define lowp float halo_blur\nvoid main() {\n#pragma maptec: initialize highp vec4 fill_color\n#pragma maptec: initialize highp vec4 halo_color\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float halo_width\n#pragma maptec: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}","Unknown projection name: ","u_pitched_scale","captureStackTrace","_centers","imageAtlas","projectionMatrix","px ","atlasTexture","_startTimestamp","_onWindowOnline","maxX","forEach","_firePreventable","_normalizePlace","_updatePrism","icon","onmsfullscreenchange","_updatePaintProperty","_readbackQueue","_applyKeyframeValue","_radarAnimationFrameId","Windows","freeAllObjects","Length of new data is ","now","endTime","projectAndGetPerspectiveRatio","no-store","color-relief","mouseup","disableDrag","depthAttachment","_clusterIconSymbolPaintProperties","u_image1","Incoming","_tileZoom","translucent","_emptyDemTexture","_texFormat","#000000","_calculateTransform","_delegatedListeners","_map","message","5.80029008","vec4","holdingForSymbolFade","_container","getOverlayById","FeatureCollection","u_sun_pos","shaderDefine","touchRotate","removeEventListener","canonical","_applyOpacityUpdate","_circleAndRectCollide","Invalid argument to map.removeOverlay(). Argument must be a valid overlay with _remove method.","getObjectForId","_projectionMatrix","symbolIcon","sourcedata","_contextRestored","circle-radar-wave-count","_cachePrevious","getGranularityForZoomLevel","clearTiles","binderUniforms","subarray","latRange","data:","styleId","viewportSegments","circle-overlay-blur-color","crossSourceCollisions","size","_clusterCountLayerId","parentTileOpacity","hillshade-method","_generateOrbitKeyframes","_state","_invViewProjMatrix","getElevation","_rotating","icon-allow-overlap","SpriteJSON","hasAttribute","extend","circle-radar-radius","isZooming","_t;\nin ","cancelled","layerIndexes","strokeGradient stops must be sorted by progress ascending","pitch","_renderWorldCopies","broadcast","saveTileTexture","expired","constructor","uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","_terrainMovement","#ffffff","bindTexture","removeClassName","tileCoords","opacityVertexBuffer","-source","transformProp","cooperativeGestures","displaySize","never","rotateZ(","u_has_top_pattern","_easeId","overscaledZ","-polygon-outline-solid","interactive","cursor","metric","queryPadding","aria-hidden","u_fill_translate","preventDefault","releaseSymbolFadeTiles","requests","circleColor","_pbo","_updateTilesForChangedGlyphs","fill-antialias","depth","_tapTime","_opacityWhenCovered","_isDelayComplete","setMaxZoom","_unevaluatedLayout","collisionIndex","justReloaded","isLocationOccluded","fallbackMatrix","isRotating","symbolFadeHoldUntil","solveVectorScale","_changedImages","testSupport","_getShouldReloadTileOptions","Integer expected for option 'clusterMaxZoom': provided value \"","screenBottomBoundary","touchPos","apply","createTexture","BYTE","setExpiryData","dem","_isWithinTileRanges","5.4999962","fromCodePoint","TEXTURE_WRAP_S","getMaxBounds","createFramebuffer","clusterPointCountTextHaloColor","translate(8.0, 8.0)","stencil","predicate","_isDragging","length",'Source "',"crossOrigin","addKeyframe","reparseOverscaled","layerIds","skipFade","rgb(250, 50, 56)","dynamicLayoutVertexArray","findTileInCaches","Not implemented.","maxBounds","promoteId",'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.',"isMoving","redraw","u_texture","abort","retainedQueryData","_computeClippingPlane","enableVertexAttribArray","Disable globe","__esModule","hasTextData","step","_element","prototype","blendEquation","notifyGestureBlocked","_updateZoomRange","getPixelRatio","_eventButton","true","blend","resetNorth","attributionPosition","icon-overlap","userAgent","Failed to load PMTiles metadata","patternsLoaded","pending","RGBA16F_EXT","vertical-perspective","getUnpackVector","hasVisibleVertices","isOpen","_circleLayerId","tiles","backfillBorder","off","Geocode.getAddress 需要提供 location。","CircleOverlay must be added through OverlayManager.","circles","placeLayerBucketPart",";\n#endif\n","atmosphere-blend"," instead of ","u_direction_width","COLOR_BUFFER_BIT","firstChild","unregisterMessageHandler","_smoothOutEasing","_createGeographicCircleResources","generateId","SERVER_URL","_swipePoint","_overridePixelRatio","planes","dynamicLayoutVertexBuffer","padding","The feature id parameter must be provided.","click",", points ","bucket.text.opacityVertexArray.length (= ","placeCollisionCircles","_resetUpdates","convert","region","No pending worker updates for GeoJSONSource ","_urlType","../","fullyVisible","light"," translate(","measureText","getFramebuffer","getLight","_objects","vertices","minPitch","_resetTileReloadTimers","locationBias","getMercatorTileCoordinates","_updateManagedVisibility","beginFrame","style","addLayer","minimumWeight","Geocode.getAddress 参数无法识别。请使用 getAddress(lnglat, callback) 或 getAddress(lnglat, options, callback)。","vertexShaderPreludeCode","_outOfViewCache","tileMercatorCoords","_isValidHash","fromPoints","bindRenderbuffer","aria-disabled","copy","setDependencies","components","line-direction-custom-image","_crossFadingFactor","_mapEventHandlers","_globeness","margin-bottom:16px","calculatePosMatrix","workerPool","closeButton","dragPan","clickTolerance","toArray","GeometryCollection","_overviewMap","clickZoom","commitTime","_lastWheelEvent","symbol","intensity","fadeEndTime","pixelsPerMeter","polygon-overlay","MapTouchEvent","getProgramInfoLog","opaquePassCutoff","_recentlyUsed","setSouthWest","8px","\n ","Driving","_listeners","glyphOffsetArray","_frameId","MultiPoint","_fbo","some","polyline-overlay","_elevationCenter","webglcontextlost","clearStencil","Base",'id "',"Container '","setGlobalStateProperty","suppressClickInternal","triggerRepaint","showTileBoundaries","u_gamma_scale","clientTop","high-performance","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;v_linesofar=a_linesofar;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}","addImage","clipSpaceToPixelsMatrix","getClusterChildren","stretchY","sync","_symbolPaintProperties","The feature is not a cluster: properties.cluster_id is not numeric.","setElevation","getCenter","bearing","setLayoutProperty","_convertToYCellCoord","RMT","\nuniform lowp float u_","UNSIGNED_INT","getGlobalState","getCircleRadiusCorrection","collisionBoxArray","isConstant","isStyleLoaded","Disable terrain","Framebuffer is not complete","panStep","keydown","animation","_createSinglePixelCircleLayer","_removedLayers","iconIgnorePlacement","setTransitionState","min","in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","zoomDataLayers","_executeRelevantHandler","calculateCenterFromCameraLngLatAlt","_addTerrainIdealTiles","uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;uniform highp vec4 u_blur_color;uniform mediump float u_radar_radius;uniform mediump float u_radar_width;in vec2 a_pos;out vec4 v_data;out float v_visibility;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define mediump float radius\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define highp vec4 stroke_color\n#pragma maptec: define mediump float stroke_width\n#pragma maptec: define lowp float stroke_opacity\n#pragma maptec: define mediump float body_radius\n#pragma maptec: define mediump float in_shadow_width\n#pragma maptec: define mediump float radar_enabled\nvoid main(void) {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize mediump float radius\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize highp vec4 stroke_color\n#pragma maptec: initialize mediump float stroke_width\n#pragma maptec: initialize lowp float stroke_opacity\n#pragma maptec: initialize mediump float body_radius\n#pragma maptec: initialize mediump float in_shadow_width\n#pragma maptec: initialize mediump float radar_enabled\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));mediump float circle_outer_extent=(body_radius > 0.0) ? radius : (radius+stroke_width);mediump float radar_extent=radar_enabled > 0.5 ? max(u_radar_radius+u_radar_width*1.6,circle_outer_extent) : circle_outer_extent;mediump float quad_extent=max(circle_outer_extent,radar_extent);if (u_pitch_with_map) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=quad_extent;corner_position+=extrude*u_extrude_scale*quad_extent;} else {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_position+=extrude*u_extrude_scale*quad_extent*(projected_center.w/u_camera_to_center_distance);angle_scale*=quad_extent*(projected_center.w/u_camera_to_center_distance);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*quad_extent*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*quad_extent*u_extrude_scale*gl_Position.w;}}float antialiasblur=1.0/u_device_pixel_ratio;v_data=vec4(extrude.x,extrude.y,antialiasblur,quad_extent);}","getBucket","stencilFunc","getCurrentTime","rasterBoundsBuffer","placedOrientation","calculateFogMatrix","zoomOut","loadEmpty","createElementNS","textHaloColor","transparent","topPattern","maxY","textHaloWidth","intersects","log","boxCells","prevPlacement","drawTopSurface","TEXTURE3","_onMapClick","_position","u_pattern_br_b","hasTopPattern","element","_applyLineStyleToLineLayers","canvas","touchPitch","internalCompression","texParameterf",'" does not exist on source "',"bold 36px Open Sans, sans-serif","isDone","symbolInstances","points","_toApiLocationArea","Missing UI string '","cloneImages","isPossiblyDangerous","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}","RTLPluginLoaded","blueFactor","layoutVertexBuffer2","start","getTile","u_crossfade_to","tileType","line-dasharray","[contenteditable]:not([contenteditable='false'])","entries","raster","autoCalculateNearFarZ","_placementDirty","abs","MSFullscreenChange","color","_isOneFingerTouch","polygonStyle","collisionGroupID","_buildQueryString","fitBounds","_showAuthErrorOverlay","_onOverviewPointerMove"," and ","generateBorders","_lineLayerDashedId","colorModeForRenderPass","locationType","renderLayer","tileManagers","_inactiveColor","setGlyphs","in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define highp vec4 outline_color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 outline_color\n#pragma maptec: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","_validateStyle","uploaded","_terrainDataCallback","toLngLat","recalculateEndTime","fill-outline-color","releaseManagedResources","u_is_along_line","You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.","to-number","RGBA16F","rgb(50, 250, 56)","WORKER_URL","leftJustifiedTextSymbolIndex","enabled","clusterPointCountTextAllowOverlap","_inertia","text-translate-anchor","maxZoom","uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","_fullscreenchange","strokeGradient.progress must be a number between 0 and 1","_center","isPatternMissing","pool","_refreshExpiredTiles","position:absolute","_aroundPoint","context","relative","statusMessage","_directionImageGap","_loadStyleRequest","any","_onCanvasPointerEnter","_polygonStyleFieldSetExplicitlyByApi","toJSON","painter","getMetadata","_renderFrameCallback","_resultBuffer","stampObject","fromInvProjectionMatrix","viewportBuffer","setLocationAtPoint","deleteShader","meterInMercatorCoordinateUnits","_toApiLatLng","getExtension","The number of touches and points are not equal - touches ","isPointOnMapSurface","getHeader","getAttribute","layoutVertexBuffer","background-pattern","sub","_currentIteration","_addLineSolidLayer","textVariableAnchor","viewState","centerPoint","line-translate","Jpeg","handleFlyTo","absOffsetX","_addLineDashedLayer","isSurfacePointOnScreen","position","useGlobeRendering","Map.flyTo: CircleOverlay 的 unit 为 pixels 时无法换算为经纬度范围,请使用 meters。","getAll","shiftKey","_onOverviewPointerUp","text-optional","_onOverviewPointerCancel","_lastPoints","utf-8","_currentTileIndex","coordinates","accept","u_pitch","borderRadius","_strokeWeight","pitchWithMap","occluded","_calculatePosition","_autoCalculateNearFarZ","36px","centers","u_camera_to_center_distance","loadTile","associatedIconIndex","sqrt","u_scale","u_exaggeration","fadeDuration","locationOccludedOpacity","boundPaintVertexBuffers","opacities","draw","getSource","stencilConfigForOverlapTwoPass","shadowRoot","appendChild","vector","query","当前运行环境不支持 fetch,无法完成鉴权请求。","storeCollisionData","getGlyphs","getSouth","maxPitchScaleFactor","include","No actors found","u_zoom","_maxCanvasSize","maptec-map","_iteration","getMinMaxElevation","_hadAnyChanges","snapToNorth","rotateTo",'", cannot refresh tile',"Enter","u_is_globe_mode","ToggleAttribution","rollDelta","_minimumWeight","nextStencilID","_fireEvent","combined","u_time","_ensureClusterFeatureArgument","getElementById","_move","getBoundingClientRect","_sourcesDirty","setDOMContent","AbortError","xCellCount","rasterBoundsSegmentsPosOnly","getTileTexture","reloadTilesForDependencies","_flattenAndSortRenderedFeatures","render","_startVector","_shouldBePrevented","_startTimeMilliseconds","cluster_id","circle-overlay-in-shadow-width","vecSouth","_validateLayer","value","emplace","search","setConstantPatternPositions","maptec-compact","getUniforms","nautical","_callbacks","freeRtt","u_horizon_normal","jsonMetadataOffset","_transitionable","textBoxScale","reason","geojson-overlay-","addSource","/directions","shiftedAnchor","_containerDimensions","updatedImages","uid","_distanceToCenterFromAltElevationPitch","_clusterPointCountTextSize","getTerrainMesh","finished","getMeshFromTileID","_resourceContext","cameraPosition","_errorQueryLatitudeDegrees","_isClusteringActive","vec2","u_rotate_symbol","_fullyLoaded",'" cannot be removed while layer "',"Webp","commit","_loaded",".avif","getLoopedTime","getProjection","zoomTo","setSourceData","_cachedRenderContext","duration","circleOverlay","truck","deserializeCollisionBoxes","DEPTH_ATTACHMENT","clusterIconAllowOverlap","tilesIn","width","_syncRadarAnimationLoop","metrics","readPixels","u_device_pixel_ratio","maptec-boxzoom","Int16","_applyChanges","fire","easeInOut","_tileSize","isIdRenderable","3.34094679","_createManagedGeoJSONSource","_getCurrentHash","maptec-interactive","strokeColor","insertCircle","getStyle","_fillColor","record","_interactionLayerIds","_rotatePitchHandler","get","_strokeColor","_cache","iteration","setPaintProperty","-heatmap-layer","_doSuggest","_imageQueueHandle","intersectsPlane","address","_directionImageId","ALWAYS","line-direction-image","_applyLineLayoutToLineLayers","resume","tinySDF","removeOverlay","_strokeJoin","setLayerProperty","rootDirectoryOffset","_errorCorrectionUsable","_applyPaint","_removeHash","hardwareConcurrency","circleKeys","resourceTiming","_clusterIconLayerId","ALPHA","calculateTileZoom","fill","_frameRequest","mousedown","scroll","setValue","_clusterFillColor","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}",".mvt","areTilesLoaded","/nearby","_isPolygonDefinition","updatePaintBuffers","outerGlow","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}","_hasPendingWorkerUpdate","bearingSnap","GeoJSON data is required","_currentPartIndex","cancelPendingTileRequestsWhileZooming","top-fill-pattern","_projectSurfacePointToScreen","setLayerZoomRange","getImageCanvasContext","textAnchor","constantOr","clear","in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}","supported","_setTileReloadTimer","extTextureFilterAnisotropicMax","mapbox://","u_pixel_coord_upper","fill-extrusion-translate-anchor","setAttribute","_onFullscreenChange","_applyDefaultStyle","horizon-fog-blend","abandoned","u_projection_transition","_updateCount","_getTerrainCoordsForTileRanges","recalculateZoomAndCenter"," 小于最小俯仰角 0°,已限制为 0°","moveLayer","crossTileID","_opacity","getSourceTile","expandBy","texSubImage2D","needsTerrainPrepare","crossTileIDs","COMPILE_STATUS","clientX","pruneUnusedLayers","backCCW","lineAtlas","hypot","' not found.","getPixelScale","-heatmap-source","#1976d2","boolean","positions","version","transformCameraUpdate","clusterMinPoints","glyphLeft","overviewBox_","migrateProjection","_createLayers","OES_vertex_array_object","strokeGradient","getAllTiles","There is no tile manager with ID '","\n#ifndef HAS_UNIFORM_u_"," already exists.","terrainData","_updateZoomButtons","maptec-track-pointer","useProgram","vector_layers","pixelStoreUnpackPremultiplyAlpha","#ifdef GL_ES\nprecision highp float;\n#endif\nin vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to Maptec Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}","slice","_applyPaintToLayerIfPresent","_ensureClusterLeavesLimitAndOffsetAreValid","primitiveOffset","_updateWorkerData","bindBuffer","_scale","gestureBeginsVertically","bindElementBuffer","side-fill-pattern","_applyVisibilityToOverlayLayers","clearColor","findIndex","_handlersById","_topColor","mouseButton","enable","Location not available","toLowerCase","waveCount","_buildHeaders","fill-extrusion","types","_isNameSymbolLayer","icon-pitch-alignment","u_image","setDefault","mercatorMatrix","SQRT2","repaint","clusterPointCountTextOffset","ref","rotationMatrix","_getRegion","_dataBeforeHoverStyleApplied","tileExtentMesh","onRemove","properties","/{z}/{x}/{y}","_renderErrorTexture","gridBottomBoundary","mousemove","hasSymbolBuckets","u_projection_tile_mercator_coords","访问密钥 :","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}","transitionState","numTouches","transformLightDirection","buttons","_rotateLeft","targetCenter","fillStyle","selfFading","_setInitialValues","xlink:href","Last placement time for previous placement is not defined","directionImage","_northEast","textFeatureIndex","_currentControlMap","circle-opacity","_zoomIn","setSprite","depthTest","isValidStartEvent","_sum","text-field","button","PrismOverlay","addRegularDash","onload","createRenderbuffer","minZoom","intersectionZ","_load","Custom layer with id '"," => ","anchorX","pixelStoreUnpackFlipY","_onEaseFrame","_minElevationForCurrentTile","dirty","GeoJSONOverlay","_timers","_createCanvas","layers","stateChanges","custom","_measuredError","zooming","visualizePitch","numTaps","textCollisionBox","unsubscribe","heading","bboxes","keyboard","video","_errorMeasurementLastChangeTime","splice","toUpperCase","workers","altitude","LINEAR","_clusterCountSymbolLayoutProperties","pointercancel","_fullscreenTriangle","easeTo","options","ellipse","freezeElevation","high","requestManager","updateData","26883981kaPNNL","_updateTilesForChangedImages","f64","_mercatorProjection","getGlyphsUrl","fromLngLat","{range}","updateImage","actors","Failed to read response stream","_lineStrokePaintProperties","Style is not done loading.","bottom-left","_circleStyle","_cleared","_zooming","_constraining","cacheControl","_distances","_drawGlyph","_mouseRotate","uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","farZ","workerOptions","sort","every","getImageData","setErrorQueryLatitudeDegrees","_requestManager","_readbackWaitFrames","fetchRange","numIconVertices","coordsIndex","The feature is not a cluster.","handleWrapJump","lastTap","elevation","_nearZ","_clusterStrokeColor","uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 outline_color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 outline_color\n#pragma maptec: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}","text-font","_draggable","_normalizeQueryRenderedFeaturesOverlayOption","isOccluded","Worker ","loading","_stopRadarAnimationLoop","FullscreenControl","Event","webkitRequestFullscreen","_lastWheelEventTime","offTemp","_createPolygonGeoJSON","getPattern","easeId","maxDuration","/search/","_touchRotate","_bypassKey","projectionData","_valid","PolylineKeyFrameTrack","_timeline","_propertiesForDataItem","_touchPan","textOffset1","createNS","_depthTest","layer-type","sin","anchorY","u_tileratio","uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}","rgb(50, 50, 256)","_rotateOffset","getImages","cannot load terrain, because there exists no source with ID: ","getInt32","4.29549936","atlasImage","rotate","DEPTH_COMPONENT16","_addFillLayer","_pixelPerMeter","aria-label","dataloading","exitFullscreen","styleOwner","_setupPainter","setPolygonStyle","_getUIString","passive","u_blur_color","webkitCancelFullScreen","define","markUsedJustification","suppressClick","getPerspectiveRatio","projectionCache","clusterStrokeColor","arrayBuffer","LngLatBounds(","LngLatBounds.fromMapOverlays: 未能从覆盖物得到任何经纬度,请检查路径是否为空或覆盖物是否有效。","circleUid","font-size:36px","_effectWaveCount","loadImage","_errorMeasurementLastValue","UNPACK_FLIP_Y_WEBGL","Unable to compute style diff:","_onMove","_resetBearing","_renderTaskQueue","patterns","_invProjMatrix","6394584oJYigZ","_implementation","_rotationDisabled","Window","240px","trackpad","lineGradient","exports","dashes","_mousedownPos","_finalizeElevation","cacheKey","u_is_size_zoom_constant","_lastReadbackFrame","bytes=0-","clusterFillColor","createTextNode","tile","targetTouches","u_pattern_br_a","_addCircleLayer","_convertToCoordinates","pitchInRadians","deg)","Easing around a point is not supported under globe projection.","setBearing","mouseRotate","name","indexes","centerJustifiedTextSymbolIndex","offset","isHidden","_elevationFreeze","frameAsync","_verticalPerspectiveCameraHelper","PolygonOverlay","hasTextCollisionBoxData","CircleOverlay clustering is not enabled.","_controlContainer","u_is_size_feature_constant","webglcontextrestored","uint16","imageManager","geojson","toScale","nonzero","maxZoom must be greater than or equal to minZoom","addControl","Content-Length","_changed","ranges","acquire","dynamicDraw","mode","source","405623RxADvL","_addDefaultKeyframes","mag","_queryCell","_sortAcrossTiles","transform","layoutVertexArray","_showClusterPointCount","inUse","u_is_text","_innerShadowOpacity","endMove","u_lineatlas_width","u_side_opacity","alphabetic","maptec-ctrl-compass-icon-inner","innerHTML","_createCircleFeatureCollection"," 超过最大俯仰角上限 85°,已限制为 85°","src","_updateHash","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}","getHashString","pinchAround","\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}","translate(-50%,-50%)","_texType","&nbsp;","selectProp","_zoomLevelsToOverscale","_getOverlappingTileRanges","image","interpolate","compileShader","getBounds","5.25002273","ignoredGrid","unbindVAO","prism-overlay","#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","minPitch must be between 0 and the current maxPitch, inclusive","_globeViewProjMatrixNoCorrectionInverted","UNSIGNED_BYTE","_onHashChange","getViewportMatrix","_path","u_projection_clipping_plane","setFilter","html",", which is !== 'geojson",'GeoJSONSource "',"stillRecent","mouseleave","The first argument must be a GeoJSON Feature object.","setNorthEast","_isFullscreen","stop","addClassName","textAllowOverlap","_verticalPerspectiveProjection","deleteBuffer","flat","easing","startTime","u_coords_top","_helper","gety","usedCrossTileIDs","_centerClampedToGround","isLoaded","concat","u_pattern_size_b"," after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.","mask","strokeGradient must be an array with at least 2 stops","drag","depthRangeFor3D","stylesheet","map","bufferSubData","renderTime","update","_glowColor","_pixelCirclePaintProperties","setConstantDashPositions","u_pixel_extrude_scale","lineTo","_tapZoom","blue","_minPitch","errored","enableRotation","_active","centerClampedToGround","aabb","numGlyphs","dragMove","_innerShadow","u_translation","Map","depthMask","_removeOwnedDirectionImage","movestart","viewport-y","getTileByID","debugBuffer","vehicleSpec","distanceX","stale","lineStartIndex","isSDF","populateCache","directionColor","_requestRenderFrame","_el","getPlaceDetails","line-progress","_offset","_rtlPluginLoaded","_clusterPointCountTextColor","SVG image decoding requires the Image constructor (main-thread loading).","avoid","meshSize","placeable","stroke","_applyLayoutToLayerIfPresent","texParameteri","enableAttributes","patternPositions","_width","center","_applyClusterCountSymbolLayerStyle","fill-opacity","untransitioned","_boundingVolumeCache","/places/","metadata","_speed","pixelStoreUnpack","code","url-type","_showTileBoundaries","panTo","u_globe_position","timeStamp","symbolFadeFinished","clusterStrokeWidth","featureSortOrder","canvasContextAttributes","cssText","sourceLayer","The source '","pause","_ease","mustReload","_interactive","pos","text-pitch-alignment","defaultPrevented","u_atmosphere_blend","_globeViewProjMatrix32f","_serializedAllLayers","terrainUniforms","extendToSouthPole","_duration","values","disabled","innerShadowColor","0 0 ","_meshCache","dashPositions","departureTime","fromCenterSizeAngles","$debug","hasImage","u_terrain_exaggeration","API_KEY","_altitude","attribution","GeoJSONOverlay clustering is not enabled.","colorMask","_glyphsDidChange","cameraHelper","fov","_data","fillPattern","play","u_is_halo","chromeWindowsNoCache","getDirectory","maptec-cooperative-gesture-screen","currentLayer","hasDependency","_errorCorrectionPreviousValue","strokeDasharray","rotateOffset","getUint8","boundDynamicVertexBuffer","toggleClassName","_edgeInsets","text-radial-offset","_featureProperties","_strokeLayerId","minzoom","fitScreenCoordinates","opaque","_pixelMatrixInverse","end","_addDragHandler","sdfIcons","isBypassed","setRoll","_dataHandler","maxBucketInstanceId","translate(3.0, 29.0)","index","_applyGeoFillPaint","fill-extrusion-vertical-gradient","grid","NavigationControl.","hasRenderableParent",".webp","Polygon","_directionColor","collectResourceTiming","shouldReloadTile","LogoControl.Title","readBuffer","release","boxzoomend","placeCollisionBox","_paused","_sideColor","touchstart","hasValue","_getClusterMaxZoom","rawTileData","hasControl","_sidePattern","mousePan","uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}","docStyle","_request","onerror","headers","textarea:not([disabled])","maptec-ctrl-shrink","getBucketParts","getFilter","_getStyleAndImages",'" rounded to "',"getScale","deleteVertexArray","clean","pitchStep","togglePopup","pitchFactor","getSouthEast","gl_FragColor","_applyPolygonStyleToPolygonLayers","unblended","hasPolygon","json","debugSegments","_polyline","drawingBufferHeight","uniform highp float u_intensity;in vec2 v_extrude;\n#pragma maptec: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma maptec: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","rotating","expirationTime","_isRingDefinition","object","translate(0,0)","_lastExpectedZoom","showClusterPointCount","vectorLayerIds","styleimagemissing","numAttributes","maptec-ctrl-zoom-out",'Cannot style non-existing layer "',"getClippingPlane","Etag","_createManagedResources","geometries","latestFeatureIndex","useGlobeControls","drawingBufferWidth","demTexture","startEulerAngles","uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","_polygonOutlineDashedLayerId","assign","key","circle-radar-enabled","reject","staticUniforms","CONSTANT_COLOR","updateable","getShaderParameter","_updatePatternAtlas","_drainInertiaBuffer","_updatingCamera","once","uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;uniform float u_draw_top_surface;uniform float u_draw_side_surface;in vec4 v_color;in vec4 v_lighting;in vec2 v_pos_a;in vec2 v_pos_b;in float v_use_pattern;in float v_is_top_surface;\n#pragma maptec: define mediump vec4 top_pattern_from\n#pragma maptec: define mediump vec4 top_pattern_to\n#pragma maptec: define mediump vec4 side_pattern_from\n#pragma maptec: define mediump vec4 side_pattern_to\nvoid main() {\n#pragma maptec: initialize mediump vec4 top_pattern_from\n#pragma maptec: initialize mediump vec4 top_pattern_to\n#pragma maptec: initialize mediump vec4 side_pattern_from\n#pragma maptec: initialize mediump vec4 side_pattern_to\nif ((v_is_top_surface > 0.5 && u_draw_top_surface < 0.5) ||\n(v_is_top_surface <=0.5 && u_draw_side_surface < 0.5)) {discard;}if (v_use_pattern > 0.5) {vec4 patternFrom=v_is_top_surface > 0.5 ? top_pattern_from : side_pattern_from;vec4 patternTo=v_is_top_surface > 0.5 ? top_pattern_to : side_pattern_to;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(patternFrom.xy/u_texsize,patternFrom.zw/u_texsize,imagecoord);vec4 colorOne=texture(u_image,pos);vec2 imagecoordB=mod(v_pos_b,1.0);vec2 posTwo=mix(patternTo.xy/u_texsize,patternTo.zw/u_texsize,imagecoordB);vec4 colorTwo=texture(u_image,posTwo);fragColor=mix(colorOne,colorTwo,u_fade)*v_lighting;} else {fragColor=v_color;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","line-direction-gap","paint.","paused","_directionImageCustom","_tileClippingMaskIDs","_createGeoStrokeLineLayer","keyframes","tileExtentBuffer","max","collisionBoxArrays","Png"," locally instead. ","minElevationForCurrentTile","Circle","needsHillshadePrepare","_currentPlacementIndex","_cameraToCenterDistance","etag","line-translate-anchor","minX","getCanvas","singleTap","_calculateDistance","vector tile sources must have a tileSize of 512","_renderTilesDepthBuffer","_unloadTile","strokeStyle","_frozenAt","_calcMatrices","_updateData","_requestedCameraState","white","_tap","_prevType","_ownsDirectionImage","success","reset","debugOverlayTexture","setStyle","container","isEmpty","getLayoutAffectingGlobalStateRefs","_vector","polylineOverlayArrow","unwrapTo","optionsChanged","_locale","_forEachCell","scaledTo","block","aborted","setSubpixelPositioning","vector_datas","_points","_updateStyle","replaceState","_applyGeoStrokePaint","_screenPosition","_decodePolyline","unit","reloadPromise","fadeMix","pathname","#b8b8b8","name:","hitTestCircle","bind","maxTileCacheZoomLevels","side-fill-opacity","_aroundCenter","_southWest","_convertPoint","1.0.1","setURL","jas-ctrl-eye maptec-ctrl","POSITIVE_INFINITY","time","maptec-ctrl-compass","distanceY","setTiles","emplaceBack","f32","clusterPointCountTextFont","_onUp","easeIn","granularity","fill-translate","generate","extrusion-height","_enableDrawRoute","heatmap-intensity","u_highlights","needsFlipping","deltaY","_isPlaying","_requestFullscreen","_lastOverviewBoxCoords","TEXTURE_MAX_ANISOTROPY_EXT","bindVertexBuffer","bucketsInCurrentPlacement","circleOpacity","maxTextureSize","cameraForBoxAndBearing","TEXTURE_MIN_FILTER","strokeGradient.color must be a non-empty string","out highp vec4 fragColor;","getCameraFrustum","iconSizeData","noSubdivision","_controlPositions","_mousePitch","u_horizon_color","Zoom out","Enable globe","neighboringTiles","circle-translate-anchor","isTileClipped","_removeDelegatedListener","Map.flyTo: target 必须是 LngLatLike、CircleOverlay、PolylineOverlay 或 PolygonOverlay。","_round","lngLatToCameraDepth","numHorizontalGlyphVertices","gradientVersion","hasSidePattern","_compassIconInner","float","leafLimit must be a finite number.","overrideNearFarZ","_defaultMarker","maxTileXWrapped","atan2","tabindex","_closeButton","current","status","_originalTabIndex","_applyPointLayerFiltersAndClusterCountLayer","_clusterMaxZoom","latestRawTileData","u_scale_with_map","draggable","_caseByCluster","contains","cache","toString","decompress","_updateSources","_fovInRadians","_lastValue","_isCompleted","maxTileCacheSize","setActiveRoute","boxKeys","u_projection_matrix","contentTypeJson","insertCollisionCircles","FRAMEBUFFER","Avif","textAnchorOffsets","catch","onStart","VERTEX_SHADER","rttCoords","unexpected EOF","HALF_FLOAT_OES","addBucket","collisionDetected","RGB16F","compact","_addSymbolLayer","push","_focusFirstElement","tileBorderIndexBuffer","u_vertical_gradient","_isUpdatingWorker","getEast","symbol-z-order","createBuffer","STENCIL_BUFFER_BIT","_syncToMap","_elevationStart","_pointCirclePaintProperties","setMaxSize","_mult","latitude","adjustAntiMeridian","tileBounds","ctrlKey","userSelect","_circleStyleFieldSetExplicitlyByApi","loadGlyphRange","maptec-ctrl maptec-ctrl-scale","_strokeDasharray","cluster","freshBind","logoPosition","_diffStyle","stencilClearMode","u_top_uv_tile_origin_meters","getTileBoundingVolume","' does not exist in the map's style.","program","coordinatePoint","getTime","_panStep","prepareNextFrame","maptec-attrib-empty","_padding","globalState","undefined","destroy","renderWorldCopies","segments","sortKey","noInertia","display","globe","projectionMercator","removeAttribute","blob:","_createCircleFeature","u_size","left","_lazyInitEmptyStyle","heatmapFbos","_tileTextures","_firstTouch","terrainFacilitator","_order","setCustomLayerDefaults","TEXTURE_MAG_FILTER","176xRJwxp","Unable to load glyph range ","_layerPointerSubscriptions","_lineLayerId","mercator","lineClipsArray","_startDistance","xScale","getWrap","unloadVectorData",".png","The sourceLayer parameter must be provided for vector source types.","signal","_delayStartTime","getCameraAltitude","constrainInternal","debugOverlayCanvas","_decodeChunk","anyProjectionOccluded","dist","seekable","filter","mousemoveWindow","oblique","_saveDelegatedListener","setSourceProperty","symbolFadeChange","overlayManager","distSqr","previousVertex","_fullscreen","expiredRequestCount","_onClose","getCameraLngLat","track_","_minzoom","localIdeographFontFamily","_type","setGlobalState","translate(-50%, -52%) scaleY(","_bindFramebuffer","_updateCompactMinimize","needGeometry","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","clusterPointCountTextHaloWidth","font-weight:bold","_updatedLayers","_previousActiveHandlers","VERSION","centerLon","symbolInstanceStart","Replace","mergeHandlerResult","_circlesCollide","calculateCameraOptionsFromCameraLngLatAltRotation","run","screenSpeed","minLat","POPULARITY","_remove","range","images","_charUsesLocalIdeographFontFamily","rollInRadians","textHaloBlur","span","loseContext","moveend","raster-resampling","history","scrollTop","queryRenderedFeatures","drawElements","zoomAtLastRecencyCheck","tapZoom","icon-optional","CCW","u_lightpos_globe","tileId","timeout","_id",", which doesn't match current length of ","acceptJson","bounds","minLon","_handleFullscreenChange","_fillPaintProperties","msFullscreenElement","setMaxBounds","offscreen","matrix","setPitch","speed","u_fog_color","circle-pitch-scale","maptec-touch-drag-pan","isFull","handleMapControlsPan","direction","_renderTileClippingMasks","_apiUrl","vao","dragstart","(a_","_moveStateManager","isDash","_getAndCacheGlyphsPromise","u_buffer_scale","getRenderableIds","_addLayers","shift","circleArray","Map.flyTo: 无法从 target 中计算有效经纬度范围。","_currentTime","ReadOnly","_resizeInternal","defaultConstrain","transformConstrain","verticalPlacedIconSymbolIndex","transition","_applyCircleStyleToCircleLayer","frameNumberIssued","aroundPoint","getData","_queryCellCircle","crossTileSymbolIndex","INT","maptec-popup-track-pointer","highlightColor","font-size:14px","KeyboardHandler","xyz","loadVectorData","https://","textOffset","_bearingInRadians","collisionGroups","attemptAnchorPlacement","SpriteImage","不能添加已销毁的信息窗体。请创建新的 Popup 实例。","_detachMapLayerPointerForwarding","u_height_factor","fromScale","setFov","_delta","transitioned","_polygonOutlineStrokePaintProperties","line","_delay","centroid","鉴权信息","_rotate","uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_top_opacity;uniform lowp float u_side_opacity;uniform float u_height_factor;uniform vec3 u_scale;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_top_uv_tile_units_to_meters;uniform vec2 u_top_uv_tile_origin_meters;uniform float u_has_top_pattern;uniform float u_has_side_pattern;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\nout vec4 v_color;out vec4 v_lighting;out vec2 v_pos_a;out vec2 v_pos_b;out float v_use_pattern;out float v_is_top_surface;\n#pragma maptec: define highp float base\n#pragma maptec: define highp float height\n#pragma maptec: define highp vec4 top_color\n#pragma maptec: define highp vec4 side_color\n#pragma maptec: define mediump vec4 top_pattern_from\n#pragma maptec: define mediump vec4 top_pattern_to\n#pragma maptec: define lowp float top_pixel_ratio_from\n#pragma maptec: define lowp float top_pixel_ratio_to\n#pragma maptec: define mediump vec4 side_pattern_from\n#pragma maptec: define mediump vec4 side_pattern_to\n#pragma maptec: define lowp float side_pixel_ratio_from\n#pragma maptec: define lowp float side_pixel_ratio_to\nvoid setPatternPositions(vec3 normal,float baseValue,float heightValue,vec4 patternFrom,vec4 patternTo,float pixelRatioFrom,float pixelRatioTo\n) {float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? heightValue : baseValue;vec2 patternTlA=patternFrom.xy;vec2 patternBrA=patternFrom.zw;vec2 patternTlB=patternTo.xy;vec2 patternBrB=patternTo.zw;vec2 displaySizeA=(patternBrA-patternTlA)/pixelRatioFrom;vec2 displaySizeB=(patternBrB-patternTlB)/pixelRatioTo;if (abs(normal.z) >=512.0) {vec2 topPatternPosition=a_pos*u_top_uv_tile_units_to_meters;v_pos_a=(mod(u_top_uv_tile_origin_meters,displaySizeA)+topPatternPosition)/displaySizeA;v_pos_b=(mod(u_top_uv_tile_origin_meters,displaySizeB)+topPatternPosition)/displaySizeB;} else {vec2 sidePatternPosition=vec2(a_normal_ed.w,elevation);v_pos_a=sidePatternPosition/displaySizeA;v_pos_b=sidePatternPosition/displaySizeB;}}void main() {\n#pragma maptec: initialize highp float base\n#pragma maptec: initialize highp float height\n#pragma maptec: initialize highp vec4 top_color\n#pragma maptec: initialize highp vec4 side_color\n#pragma maptec: initialize mediump vec4 top_pattern_from\n#pragma maptec: initialize mediump vec4 top_pattern_to\n#pragma maptec: initialize lowp float top_pixel_ratio_from\n#pragma maptec: initialize lowp float top_pixel_ratio_to\n#pragma maptec: initialize mediump vec4 side_pattern_from\n#pragma maptec: initialize mediump vec4 side_pattern_to\n#pragma maptec: initialize lowp float side_pixel_ratio_from\n#pragma maptec: initialize lowp float side_pixel_ratio_to\nvec3 normal=a_normal_ed.xyz;bool isTopSurface=abs(normal.z) >=512.0;vec4 color=isTopSurface ? top_color : side_color;float surfaceOpacity=isTopSurface ? u_top_opacity : u_side_opacity;float usePattern=isTopSurface ? u_has_top_pattern : u_has_side_pattern;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nv_color=vec4(0.0,0.0,0.0,1.0);v_lighting=vec4(0.0,0.0,0.0,1.0);v_use_pattern=usePattern;v_is_top_surface=isTopSurface ? 1.0 : 0.0;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=0.0;if(abs(normal.z) < 512.0){vec2 sideLightDirection=u_lightpos.xy/max(length(u_lightpos.xy),0.0001);float sideDirectional=dot(normalize(normalForLighting.xy),sideLightDirection)*0.5+0.5;directional=0.55+0.35*clamp(sideDirectional,0.0,1.0);} else {directional=0.63+0.3*clamp(dot(normalForLighting,u_lightpos)/2.0+0.5,0.0,1.0);}\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\nfloat lightingRatio=clamp((directional-0.55)/0.35,0.0,1.0);directional=0.62+0.33*smoothstep(0.0,1.0,lightingRatio);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=surfaceOpacity;v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=surfaceOpacity;if (usePattern > 0.5) {if (isTopSurface) {setPatternPositions(normal,base,height,top_pattern_from,top_pattern_to,top_pixel_ratio_from,top_pixel_ratio_to);} else {setPatternPositions(normal,base,height,side_pattern_from,side_pattern_to,side_pixel_ratio_from,side_pixel_ratio_to);}} else {v_pos_a=vec2(0.0);v_pos_b=vec2(0.0);}}","GeoJSONOverlay is not attached to a map or source is missing.","_showDirection","allowVerticalPlacement","_intensity","join","number","colorAttachment","frontFace","getAllIds","_updateOverviewBox","_pixelsToGLUnits","_cleanUpRasterTiles","TEXTURE_2D","&#215;","animate","uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","isRenderingGlobe","glyphs",'The first argument must be a GeoJSON Feature with type "Feature".',"_addDefaultHandlers","TRIANGLES","GeoJSON data must be an object","strokeCap","verticalIconBox","setAttributeNS","_blockedByActive","-overlay-stroke","overscaleFactor","CLAMP_TO_EDGE","_color","clusterIconSize","_transitioning","warn","clusterMaxZoom","_tiles","locationLimit","getx"," = u_","vertexAttribPointer","className","maptec-control-container","wheel","apitiles","_createCloseButton","The layer '","asin","raster-hue-rotate","_getClusterIdentifierFromClusterFeature","source.canvas","autoRotate","touchcancel","setMaxPitch","stretchX","bindFramebuffer","SVG failed to decode","lineOffsetX","_subpixelPositioning","equals","getClickTolerance","u_spin_weights","getProgramParameter","u_direction_opacity","remove","circleStrokeWidth","elevationCenter","setGeoJSONSourceData","screenRightBoundary","dataType","angle","fillOutlinePattern","placedOrientations","perspectiveRatioCutoff","keysLength","_isPixelCircle","getMeshFrameDelta","text-variable-anchor-offset","bytesPerElement","uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}","_firstMove","_updateRotation","_triggerRenderFrame","handleMapControlsRollPitchBearingZoom","polygonOverlayOutline","iconBox","getLesserNonNegativeNonNull","removeOverlayById","_convertRing","_doSearchNearby","_innerShadowColor","Geocode.getLocation 参数无法识别。请使用 getLocation(address, callback) 或 getLocation(address, options, callback)。","scheme","RGB16F_EXT","clone","_pointClusterOptions","rotateX(0deg)","u_world","operations","prepare","overlays","isValidEndEvent","resultLimit","_context","u_in_shadow_opacity","yCellCount","#e91e63","-circle","_getOverscaledTileIDFromLngLatZoom","handleWindowEvent","bucketInstanceId","in vec2 a_pos;in vec2 a_normal;in float a_distance;in vec2 a_direction;uniform vec2 u_translation;uniform mediump float u_ratio;out highp float v_distance;out highp float v_flag;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\nvoid main() {\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\nfloat cosValue=dot(a_normal,a_direction);float sinValue=cross(vec3(normalize(a_normal),0.0),vec3(a_direction,0.0)).z;sinValue=step(0.0,sinValue);v_distance=a_distance*u_ratio+(cosValue*width*0.5);v_flag=sinValue;offset=-1.0*offset;vec2 lineOffset=offset*a_normal/u_ratio;float adjustedThickness=projectLineThickness(a_pos.y);gl_Position=projectTile(a_pos+u_translation+lineOffset*adjustedThickness+a_normal*width/u_ratio*0.5*adjustedThickness);\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}","_handleMapControls","pitchedLabelPlaneMatrix","px) ","getDEMElevation","currentTime","{fontstack}","fill-color","moving","delete","gradient","_afterEase","_contextLost","progress","MapMouseEvent","TEXTURE1","then","u_pattern_tl_a","toUnwrapped","setCrossFadeLogic","perspectiveRatio","raster-opacity","_rasterFadeDuration","setMinElevationForCurrentTile","getDepthModeFor3D","overlapMode","mix","dashed","_serializedLayers","isArray","baseShift","isInteger","Expected Source id to be ","clusterPointCountTextColor","mouseover","gridOuter","_pitchStep","_rotationAlignment","_validateStretch","callbackDispatchedThisFrame","_pixelsToTileUnits","gradients","_done","arrowIndexBuffer","-polygon-overlay-stroke","ONE","symbolInstanceEnd",'missing required property "canvas"',"msExitFullscreen","prefersReducedMotion","_effectDuration","addEventListener","freeObject","Driving.search 参数无法识别,请使用 search(origin, destination, callback) 或 search(origin, destination, options, callback)。","buckets","_requestImport","_lineLayoutProperties","title",'An image named "',"clusterRadiusPixels","isGlobeRendering","getWest","floor","_pendingWorkerUpdate","addOverlay","_reloadTile","u_dimension","u_mix","uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\n#define PI 3.141592653589793\n#define STANDARD 0\n#define COMBINED 1\n#define IGOR 2\n#define MULTIDIRECTIONAL 3\n#define BASIC 4\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","setZoom","_globeLatitudeErrorCorrectionRadians","_fontWeight","_clusterIconLayerInsertBeforeId","getMetadataAttempt","sidePattern","touchZoom","_calculateNearFarZIfNeeded","9.5","disconnect","getLoadedTile","constrainOverride","isActive","topColor","isNaN","text-justify","heatmap-opacity","_polylines","dim","clusterPointCountTextHaloBlur",'" does not exist.',"innerShadowWidth","parent","anchorPointY","background-color","suggest","header","_startTime","frame","maxLat","createElement","variableOffsets","clearRect","encoding","hasOwnProperty","u_in_shadow_color","focus",'There is no source with ID "',"latestEncoding"," a_","zoomHistory","0.2","raster-fade-duration","_outerGlow","text-padding","tileZoom","_updated","blendFunc","dragRotate","sign","_autoRotate","setRasterFadeDuration","clusterRangeRadius","findMatches","setCoordinates","actor","_createPixelCircleResources","_options","experimentalZoomLevelsToOverscale","line-width","hasLayer","trim","scrollZoom","function","Mvt","easeOut","_syncOverlayLayersToData","-cluster-count","depthFunc","failedToCreate","invalid length/literal","createIndexBuffer","LINES","bitmap","_updateTitle","inactive","translate(-50%, -52%)","type","_enableCluster","maptec-ctrl-compass-only","_spritesImagesIds","_getPolygonDefinitions","Mac","deg) rotateX(","symbolText","indices","isEasing","features","_getTransformForUpdate","stringify","_finishTimeout","_pitchAlignment","setUniforms","text","_convertToXCellCoord","touchZoomRotate","zoomRange","clusterIconIgnorePlacement","Tile","_lastTime","fovInRadians","jumpTo","color:#666","applyGlobeMatrix","circleStrokeColor","boxZoom","_hoverFeatureIdentifierSet","waypoints","FUNC_ADD","Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.","auto","_canvasContainer","text-variable-anchor","resize","ms)","bindVertexArrayOES","_addTile","sourceIds","_isDraggingInOverview","maptec-compact-show","geometry-type","line-pattern","_overlays","top-left","_lineStyleFieldSetExplicitlyByApi","validateBounds","maxPitch must be greater than the current minPitch","_query","u_units_to_pixels","uniformValues","_pointerdownPos","ScaleControl.Meters","_add","showZoom","buffer","latitudeErrorCorrectionRadians","screenPointToMercatorCoordinate","iconSize","lineDash","_rotation","LngLatBounds.fromMapOverlays: 数组不能为空。","Invalid argument to map.addOverlay().","resolve","placed","stencilMask","GCC","getDepthModeForSublayer","attributes","pitchstart","apitiles://","getOrCreateFreeObject","_rolling","uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","clusterPointCountTextAnchor","lineStyle","cameraToCenterDistance","has","_clusterRangeRadius","rotation","overviewBoxColor","description","lastPlacementChangeTime","args","hasIconData","u_ele_delta","maptec-mobile-message","getFeatureState","resetNorthPitch","select:not([disabled])","depthEpsilon","/suggest","sanitize","onUpdate","resolveURL","_boundingVolumeFactory","complete","_removed","ctx","points must be an array of HeatmapOverlayPoint","feature","indexOf","Authorization","SHORT","pan","texImage2D","u_top_uv_tile_units_to_meters","_directionImage","availableImages","translation","_height","awaitingQuery","_onTimeout","bindAttribLocation","iconOptional","clusterIconImage","_applyGlobalStateChanges","getCanvasContainer","_overviewBoxSourceId","COLOR_ATTACHMENT0","_createPointFeatureCollection","getCameraPoint",'Layer "',"delegates","_shouldReloadOnResume","Could not load glyph range. range: ","0.25","_t);\n#else\n ","NEGATIVE_INFINITY","getCenterClampedToGround","pow","deferred","rootDirectory","centerOffset","getMinTileElevationForLngLatZoom","width:80px","innerShadowOpacity","_strokeCap","around","signedDistanceFromCamera","add","(非浏览器环境)","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}","getRenderableTiles","offsetWidth","collisionArrays","urls","clusterHideCircleForClusters","polylineOverlayPattern","_geoStrokeLayerNeeded","_activateOnStart","keypress","vertexSource","_texWidth","top-fill-opacity","opacity","isInsideGrid","STATIC_DRAW","placement","_fogMatrixCacheF32","未知错误","delay","_syncGeoJSON",'missing required property "coordinates"',"iconsInText","_serializeByIds","_layerId",") and new image (","_dragBoxDelta","setTransform","isValidMoveEvent","addTo","u_pitch_with_map","line-color","_onEaseEnd","_inertiaBuffer","defaultInterpolation","_fboCoordsTexture","reload","point","renderPass","innerShadow","_cameraForBoxAndBearing","./shared","_syncState","raster-dem",'" before non-existing layer "',"querySelector","dataabort","classList","_attribHTML","_setStyle","clientWidth","showCompass","getAddress","numSublayers","getActor","placedSymbolArray","_emptyDemMatrix","locationToScreenPoint","_dragBoxStartCoords","imageAtlasTexture","u_color","TEXTURE0","MultiPolygon",'Cannot remove non-existing layer "',"upload","target","geojsonSource.type is ","_crossSourceCollisions","_onOverviewPointerDown","316253TafZxk","dataZoom","resultType","_cameraPosition","_abortTile","_globeViewProjMatrixNoCorrection","nearZ","url","setSelfFadeLogic","extendToNorthPole","_fogMatrix","line-direction-color","_targetZoom","_maxFadingAncestorLevels","_localIdeographFontFamily","requested url ","mouseRoll","msRequestFullscreen","_topPattern","document","pointerdown","verticalTextBox","removeAll","Invalid argument to map.removeOverlay(). Argument must be a valid overlay.","continuePlacement","currentActor","_strokeWidth","_loadSprite","reverse","distanceToTile2d","clearDepth","invalid block type","LINEAR_MIPMAP_NEAREST","setDepthMode","Map feedback","bottom-right","_emptyDemUnpack","_getTitle","removeThrottleControl","getClusterExpansionZoom","fireUpdate","clusterPointCountTextOpacity","maxWidth","_onMouseMove","showDirection","updateGPUdependent","getPixels","observe","normal","test","naturalWidth","_generateCollisionBoxes","queued","maptec-popup","_queryRenderedFeatureLayerIds","resetFadeLogic","_sourceId","call","getState","requested","same overlay instance","getSouthWest","_maxPitch","_hashName","allowWorldCopies","keyboardHandler","setData","insertCollisionBox","setLoaded","_showPadding","dragEnd","pitchDelta","getCoveringTilesDetailsProvider","radius must be greater than or equal to 1","_pixelsToClipSpaceMatrix","point_count","Marker","maxZoom must be greater than the current minZoom","icon-size","icon-translate-anchor","Could not load image. Please make sure to use a supported image type such as PNG, JPEG, or SVG.","stepInterpolant","getCrossfadeParameters","programConfigurations","hasPoint","icon-rotation-alignment","diff","iconAllowOverlap","setColorMode","_setElementTitle","_updateOpacity","_polygonOutlinePaintPropertiesDashed","linkProgram","deletedStates","u_lineatlas_height","bytes */","setTransformRequest","_delayContextMenu","_feature","_coveringTilesDetailsProvider","_start","_alignedPosMatrixCache","coalesce","data","_easeOptions","in vec3 v_data;in float v_visibility;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define mediump float radius\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define highp vec4 stroke_color\n#pragma maptec: define mediump float stroke_width\n#pragma maptec: define lowp float stroke_opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize mediump float radius\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize highp vec4 stroke_color\n#pragma maptec: initialize mediump float stroke_width\n#pragma maptec: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","load","boundDynamicVertexBuffer2","pixelRatio","showCollisionBoxes","getLayersOrder","renderToTexture","loadURL","_easeFrameId","projectionGlobe","_applyHoverStyleToFeatureCollection","numVerticalGlyphVertices","_doSearch","#4caf50","useRuntimeCollisionCircles","_mode","cooperativegestureprevented","shaderPreludeCode","_tapDragZoom","Parent","hostname","kind","u_terrain_unpack","_showCollisionBoxes","_trackResize","getProjectionDataForCustomLayer","NEAREST","getCrossTileIDsLists","listImages","_getBounds","_rollEnabled","attribute ","pixelStorei","pageSize","maptec-canvas","renderFrame","_prevLng","_getImagesForIds","stencilModeFor3D","deleteVertexArrayOES","_updateWorkerLayers","maptec-ctrl-attrib-button","_validateContent","deg) rotateZ(","strokeJoin","border","_constrainOverride","arrowLayoutVertexBuffer","_clearMatrixCaches","_lastPos","_editLink","setTransformConstrain","stencilModeForClipping","_rotateCompassArrow","path","data:image/svg","state","_setupUI","_compact","getRTLTextPluginStatus","align-items:center","_addTo","_updateCompact","font","atlasTextureIcon","getDash","_endTimeMilliseconds","sky","_updatedPaintProps","setLight","modelViewProjectionMatrix","_timeout","_handler","touchmove","getUint32","popup","stencilOp","match","u_unpack","clearNearFarZOverride","textOpacity","height:80px","terrainDepth","application/json","sans-serif","_prevEase","_clearTileReloadTimer","text-allow-overlap","uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","_isMultiRing","glyphAdvance","_latRange","maptec-pseudo-fullscreen","_setProjectionInternal","_strokeOpacity","#C8C8C8","setDirty","_syncClusterSourceOptions","lastTime","getSky","layer","_zoomOutButton","pixelsToClipSpaceMatrix","webkitFullscreenElement","_renderableLayerIds","getDashRanges","static","fill-translate-anchor","textFitHeight","showPadding","u_radar_gradient","_touchZoom","_sourceTileCache","setTransition","idle","circle","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}","hoverStyle","float32","credentials","isPreloaded","icon-keep-upright",'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif',"_addClusterCountLayer","u_pixel_coord_lower","centerLat","_canvasContextAttributes","_tryReadback","a_pos3d","rank","unavailable","_errorMeasurement","rasterBoundsSegments","getNorth","Close popup","setCullFace","maptec-auth-error-overlay","-polygon-outline-dashed","error","overLimit","_moving","substring","_updateLayer","terrain","_unmodified","_renderableTiles","setTerrain","Find my location","debug","atan","setLineStyle","stride","cutoff","request","validate","pitchAlignment","text-rotation-alignment","icon-text-fit","_removeClusterIconLayerIfPresent","stream finished","lngRange","isDestroyed","pageToken","icon-translate","_topOpacity","lerp","getVisibleCoordinates","alphaBlended","_farZ","5.5","southwest","testProp","_easeStart","_verticalPerspectiveTransform","_fireEvents","styledata","handlePanInertia","opaquePassEnabledForLayer","_tapPoint","fitBoundsOptions","height","uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}","setUnit","_coordsAscending","coord","overviewPolyline","_visible","Invalid overlay. Overlay must provide _addTo or addTo method.","round","documentElement","_mercatorTransform","raster-brightness-max","_clusterCountLayerLayout","setOptions","exp","setStale","timeline","playing","_complete","setCenter","_currentTouchCount","u_radar_color","removeImage","getRoll","find","minElevation","blockableMapEvent","hasTile","tapDragZoom","_loop","getoffsetX","GET","_createGeoFillLayer","default","getTileById","nextRow","_getPointCircleLayerFilter","vertexBuffer","pointerId","none","clientLeft","_symbolLayerId","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}","textColor","_innerContainer","seek","rtt","fenceSync","_lastTilesetChange","_createPolylineGeoJSON","source-layer","_getMapId","coords","_pitchInRadians","vertical","_maxZoom","/keys/validate/simple","loaded","numVerticalIconVertices","_tr","_maxzoom","circleCells","_queue","stopPropagation","members","TEXTURE_WRAP_T","_demMatrixCache","maptec-cooperative-gestures","finally","u_opacity","_getGeoJSONSourceOrNull","style.load","pitching","_sourceLoaded","FullscreenControl.Exit","assignEvents","pop","_lngRange","_enabled","interpolation","clusterRadius","wrappedTileID","_moveFunction","_urlLayer","pmtiles://","_destroyed","_fireMoveEvents","requestors","_hasGeoStrokeLayer","_globeProjMatrixInverted","invalid zlib data: ","_seenCrossTileIDs","line-cap","maptec-ctrl-attrib-inner","_fullscreenButton","_polygonOutlinePaintPropertiesSolid","_updatePolygon","getElevationForLngLatZoom","patchUpdatedImages","gradient keys must be sorted ascending","OES_texture_half_float","There is no source with this ID=","GeoJSON data must be a valid GeoJSON root object (FeatureCollection, Feature, Geometry, or GeometryCollection)","Missing content-length on 416 response","textBox","getImage","fillText","offsetAsPoint","setBaseState","getParameter","side-fill-color","sources.","mouseMoveStateManager","longitude","circle-stroke-width","_alignedProjMatrix","_compass","margin","all","weight","Source service error: ","visible","_coordsTexture","deleteProgram","stamp","_repaint","fadingParentID","essential","glyphStartIndex","charCode","_minZoom",".maptec-ctrl-logo","Expires","dispatcher","removeKeyframe","maptec-ctrl-logo","top","_clickTolerance","maxPitch","_changes","u_fade","PIXEL_PACK_BUFFER","-overlay-fill","cachedAnchorPoint","name_","iconCollisionBox","getStencilConfigForOverlapAndUpdateStencilID","zoomDelta","getContainer","updateBucketOpacities","bindVertexArray","cameraForBounds","func","activeTexture","_cancelRenderFrame","Image","shaderVariantName","language","hitTest","uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","_normalizeBearing","pitchend","body","includes","jsonMetadataLength","numActive","superclusterOptions","fillOpacity","in vec4 v_data;in float v_visibility;uniform highp vec4 u_blur_color;uniform highp vec4 u_in_shadow_color;uniform mediump float u_in_shadow_opacity;uniform highp float u_time;uniform mediump float u_radar_type;uniform highp vec4 u_radar_color;uniform mediump float u_radar_opacity;uniform mediump float u_radar_radius;uniform mediump float u_radar_width;uniform mediump float u_radar_duration;uniform mediump float u_radar_wave_count;uniform mediump float u_radar_gradient;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define mediump float radius\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define highp vec4 stroke_color\n#pragma maptec: define mediump float stroke_width\n#pragma maptec: define lowp float stroke_opacity\n#pragma maptec: define mediump float body_radius\n#pragma maptec: define mediump float in_shadow_width\n#pragma maptec: define mediump float radar_enabled\nconst float CIRCLE_OVERLAY_PI=3.14159265359;mat2 radarRotationMatrix(float angle) {return mat2(cos(angle),-sin(angle),sin(angle),cos(angle));}float radarLineAlpha(vec2 scanCoordinate,float angle,float radiusValue,float width) {vec2 rotatedCoordinate=scanCoordinate*radarRotationMatrix(-angle);return length(rotatedCoordinate) < radiusValue && rotatedCoordinate.x > 0.0\n? smoothstep(width,0.0,abs(rotatedCoordinate.y)): 0.0;}float radarSectorAlpha(vec2 scanCoordinate,float radiusValue,float endAngle,float angleOffset) {float distanceToCenter=length(scanCoordinate);if (distanceToCenter <=0.0) return 0.0;float cosineValue=scanCoordinate.y/distanceToCenter;float angle=acos(cosineValue);if (scanCoordinate.x < 0.0) angle=2.0*CIRCLE_OVERLAY_PI-angle;angle-=angleOffset;angle=mod(angle,2.0*CIRCLE_OVERLAY_PI);if (angle < 0.0) angle+=2.0*CIRCLE_OVERLAY_PI;float percent=angle/endAngle;return distanceToCenter < radiusValue && angle < endAngle ? percent : 0.0;}void main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize mediump float radius\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize highp vec4 stroke_color\n#pragma maptec: initialize mediump float stroke_width\n#pragma maptec: initialize lowp float stroke_opacity\n#pragma maptec: initialize mediump float body_radius\n#pragma maptec: initialize mediump float in_shadow_width\n#pragma maptec: initialize mediump float radar_enabled\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);bool has_stroke=stroke_width > 0.01;bool has_body_radius=body_radius > 0.0;mediump float circle_outer_extent=has_body_radius ? radius : (radius+stroke_width);mediump float quad_extent=max(v_data.w,circle_outer_extent);mediump float pixel_distance=extrude_length*quad_extent;float circle_extrude_length=pixel_distance/max(circle_outer_extent,0.001);lowp float antialiasblur=v_data.z/max(circle_outer_extent,0.001);float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,circle_extrude_length-1.0);mediump float outer_extent=circle_outer_extent;mediump float body_radius_eff=has_body_radius ? body_radius : radius;mediump float body_t=(has_body_radius || has_stroke) ? (body_radius_eff/outer_extent) : 2.0;mediump float stroke_outer_t=(body_radius_eff+stroke_width)/outer_extent;mediump float blur_inner_t=has_stroke ? stroke_outer_t : body_t;float body_to_next_t=smoothstep(antialiased_blur,0.0,circle_extrude_length-body_t);float stroke_to_blur_t=smoothstep(antialiased_blur,0.0,circle_extrude_length-stroke_outer_t);mediump float in_shadow_width_value=max(in_shadow_width,0.0);bool has_in_shadow=in_shadow_width_value > 0.01;mediump float in_shadow_inner_t=max(body_radius_eff-in_shadow_width_value,0.0)/outer_extent;mediump float in_shadow_outer_t=body_radius_eff/outer_extent;mediump float in_shadow_alpha=has_in_shadow\n? smoothstep(in_shadow_inner_t,in_shadow_outer_t,circle_extrude_length): 0.0;highp vec4 base_body_fill=color*opacity;highp vec4 in_shadow_fill=vec4(u_in_shadow_color.rgb*opacity,opacity);highp vec4 body_fill=mix(base_body_fill,in_shadow_fill,in_shadow_alpha*u_in_shadow_opacity);highp vec4 stroke_fill=stroke_color*stroke_opacity;float blur_factor=clamp((circle_extrude_length-blur_inner_t)/max(1.0-blur_inner_t,0.001),0.0,1.0);float blur_alpha=has_body_radius ? (1.0-blur_factor)*u_blur_color.a : 0.0;highp vec4 blur_fill=vec4(u_blur_color.rgb*blur_alpha,blur_alpha);highp vec4 next_fill=has_stroke ? stroke_fill : blur_fill;highp vec4 mid=mix(body_fill,next_fill,body_to_next_t);if (has_stroke && has_body_radius) {mid=mix(mid,blur_fill,stroke_to_blur_t);}highp vec4 composed_fill=mid*opacity_t;bool has_radar=radar_enabled > 0.5 && u_radar_radius > 0.0 && u_radar_width > 0.0 && u_radar_opacity > 0.0;if (has_radar) {float radar_progress=fract(u_time/max(u_radar_duration,1.0));float radar_alpha=0.0;float fill_clip=1.0-smoothstep(u_radar_radius-max(v_data.z,1.0),u_radar_radius,pixel_distance);if (u_radar_type < 1.5) {float gradient_power=1.0+10.0*(1.0-clamp(u_radar_gradient,0.0,1.0));float normalized_distance=pixel_distance/max(u_radar_radius*2.0,1.0);float wave_distance_interval=0.5/u_radar_wave_count;float strength=0.0;for (int wave_index=0; wave_index <=int(u_radar_wave_count); wave_index++) {float distance_from_wave_front=wave_distance_interval*float(wave_index)-normalized_distance+radar_progress/u_radar_wave_count;if (distance_from_wave_front > 0.0) {if (distance_from_wave_front < wave_distance_interval) {strength=1.0-distance_from_wave_front/wave_distance_interval;} else if (distance_from_wave_front-wave_distance_interval < wave_distance_interval) {strength=1.0-abs(1.0-distance_from_wave_front/wave_distance_interval);}radar_alpha=pow(strength,gradient_power);}}} else {vec2 scan_coordinate=extrude*(quad_extent/max(u_radar_radius*2.0,1.0));float scan_angle=u_time/max(u_radar_duration,1.0);float scan_line=radarLineAlpha(scan_coordinate,-scan_angle,0.5,0.005);float sector_end_angle=CIRCLE_OVERLAY_PI/2.5;float sector_offset=scan_angle+CIRCLE_OVERLAY_PI/2.0-CIRCLE_OVERLAY_PI/2.5;float scan_sector=radarSectorAlpha(scan_coordinate,0.5,sector_end_angle,sector_offset);radar_alpha=scan_line*(1.0-scan_sector)+scan_sector;}radar_alpha*=fill_clip;radar_alpha*=u_radar_opacity*(u_radar_type < 1.5 ? 1.0 : u_radar_color.a);highp vec4 radar_fill=vec4(u_radar_color.rgb*radar_alpha,radar_alpha);composed_fill=composed_fill+radar_fill*(1.0-composed_fill.a);}fragColor=v_visibility*composed_fill;const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","icons","uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","defineProperty"," = unpack_mix_","radius","projectionErrorMeasurement","#define GLOBE","boxUid","sky-color","-line-string-solid","originalEvent","uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}","SERVER_VERSION","capture","screenPointToMercatorCoordinateAtZ","148809nOhSgK","RGBA",'" has invalid "stretchX" value',"u_intensity","gridInner","_getClampedPixelRatio","-dir-image","literal","_symbolStyle","setSymbolHoldDuration","Hold ⌘ and scroll wheel to zoom the map","_updatePatternProperty","_maxTileCacheZoomLevels","line-depth-test","WEBGL_lose_context","_cachedClippingPlane","handlers","_clusterStrokeWidth","applyConstrain","replace",". Rebuilding the style from scratch.","prismOverlay","isContextLost","no stream handler","isChildOf","_interpolation","_updateDiff","fragmentSource","writingModes","_language","getTerrainData","_lostContextStyle","parseFromString","deleteTexture","quadTriangleIndexBuffer","dragStart","sprite","unproject","updateState","lnglat","worldSize","destruct","_insertCircleCell","rotate(","http://www.w3.org/2000/svg","zoom","There is no source with this ID","doubleClickZoom","_minDiameter","prepareForRender","_checkLoaded","buffers","getVisibleUnwrappedCoordinates","_wheelZoomRate","_region","subpixelPositioning","used","Content-Type","_bearingSnap","hasData"];return(o=function(){return t})()}i("shared",0,(function(t){function e(t,e,i,r){return new(i||(i=Promise))((function(o,n){function s(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((r=r.apply(t,e||[])).next())}))}function i(t,e){this.x=t,this.y=e}function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(){return null==Xa&&(Xa="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),Xa}function n(){if(null==Ya&&(Ya=!1,o())){const t=5,e=new OffscreenCanvas(t,t).getContext("2d",{willReadFrequently:!0});if(e){for(let i=0;i<t*t;i++){const r=4*i;e.fillStyle="rgb("+r+","+(r+1)+","+(r+2)+")",e.fillRect(i%t,Math.floor(i/t),1,1)}const i=e.getImageData(0,0,t,t).data;for(let e=0;e<t*t*4;e++)if(e%4!=3&&i[e]!==e){Ya=!0;break}}}return Ya||!1}function s(){var t=new ra(9);return ra!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function a(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function l(){var t=new ra(3);return ra!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function c(t){var e=t[0],i=t[1],r=t[2];return Math.sqrt(e*e+i*i+r*r)}function h(t,e,i){var r=new ra(3);return r[0]=t,r[1]=e,r[2]=i,r}function u(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function d(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function p(t,e,i){var r=e[0],o=e[1],n=e[2],s=i[0],a=i[1],l=i[2];return t[0]=o*l-n*a,t[1]=n*s-r*l,t[2]=r*a-o*s,t}function f(t,e,i){var r=e[0],o=e[1],n=e[2],s=e[3];return t[0]=i[0]*r+i[4]*o+i[8]*n+i[12]*s,t[1]=i[1]*r+i[5]*o+i[9]*n+i[13]*s,t[2]=i[2]*r+i[6]*o+i[10]*n+i[14]*s,t[3]=i[3]*r+i[7]*o+i[11]*n+i[15]*s,t}function m(){var t=new ra(4);return ra!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function _(t,e,i,r){var o,n,s,a,l,c,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oa,u=Math.PI/360;switch(e*=u,r*=u,i*=u,o=Math.sin(e),n=Math.cos(e),s=Math.sin(i),a=Math.cos(i),l=Math.sin(r),c=Math.cos(r),h){case"xyz":t[0]=o*a*c+n*s*l,t[1]=n*s*c-o*a*l,t[2]=n*a*l+o*s*c,t[3]=n*a*c-o*s*l;break;case"xzy":t[0]=o*a*c-n*s*l,t[1]=n*s*c-o*a*l,t[2]=n*a*l+o*s*c,t[3]=n*a*c+o*s*l;break;case"yxz":t[0]=o*a*c+n*s*l,t[1]=n*s*c-o*a*l,t[2]=n*a*l-o*s*c,t[3]=n*a*c+o*s*l;break;case"yzx":t[0]=o*a*c+n*s*l,t[1]=n*s*c+o*a*l,t[2]=n*a*l-o*s*c,t[3]=n*a*c-o*s*l;break;case"zxy":t[0]=o*a*c-n*s*l,t[1]=n*s*c+o*a*l,t[2]=n*a*l+o*s*c,t[3]=n*a*c-o*s*l;break;case"zyx":t[0]=o*a*c-n*s*l,t[1]=n*s*c+o*a*l,t[2]=n*a*l-o*s*c,t[3]=n*a*c+o*s*l;break;default:throw new Error("Unknown angle order "+h)}return t}function y(){var t=new ra(2);return ra!=Float32Array&&(t[0]=0,t[1]=0),t}function g(t,e){var i=new ra(2);return i[0]=t,i[1]=e,i}function v(t,e,i){return e*(Ja/(t.tileSize*Math.pow(2,i-t.tileID.overscaledZ)))}function x(t,e){return(t%e+e)%e}function b(t,e,i){return t*(1-i)+e*i}function w(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function T(t,e,i,r){const o=new ea(t,e,i,r);return t=>o.solve(t)}function S(t,e,i){return Math.min(i,Math.max(e,t))}function P(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function I(t,...e){for(const i of e)for(const e in i)t[e]=i[e];return t}function C(t,e,i){const r={};for(const i in t)r[i]=e.call(this,t[i],i,t);return r}function M(t,e,i){const r={};for(const i in t)e.call(this,t[i],i,t)&&(r[i]=t[i]);return r}function A(t){return Array.isArray(t)?t.map(A):"object"==typeof t&&t?C(t,A):t}function k(t){Qa[t]||("undefined"!=typeof console&&console.warn(t),Qa[t]=!0)}function E(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function z(t){return"undefined"!=typeof WorkerGlobalScope&&void 0!==t&&t instanceof WorkerGlobalScope}function D(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}function L(t,i,r,o,n){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const e=new VideoFrame(t,{timestamp:0});try{const s=null==e?void 0:e.format;if(!s||!s.startsWith("BGR")&&!s.startsWith("RGB"))throw new Error("Unrecognized format "+s);const a=s.startsWith("BGR"),l=new Uint8ClampedArray(o*n*4);if(yield e.copyTo(l,function(t,e,i,r,o){const n=4*Math.max(-e,0),s=(Math.max(0,i)-i)*r*4+n,a=4*r,l=Math.max(0,e),c=Math.max(0,i);return{rect:{x:l,y:c,width:Math.min(t.width,e+r)-l,height:Math.min(t.height,i+o)-c},layout:[{offset:s,stride:a}]}}(t,i,r,o,n)),a)for(let t=0;t<l.length;t+=4){const e=l[t];l[t]=l[t+2],l[t+2]=e}return l}finally{e.close()}}))}function O(t,e,i,r){return t.addEventListener(e,i,r),{unsubscribe:()=>{t.removeEventListener(e,i,r)}}}function R(t){return t*Math.PI/180}function F(t){return t/Math.PI*180}function j(t){return t.name===al}function B(t){return sl.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function V(t,e){sl.REGISTERED_PROTOCOLS[t]=e}function N(t){if(!t||t.indexOf("://")<=0||0===t.indexOf("data:image/")||0===t.indexOf("blob:"))return!0;const e=new URL(t),i=window.location;return e.protocol===i.protocol&&e.host===i.host}function G(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function U(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);-1!==r&&i[t].splice(r,1)}}function q(t,...e){for(const i of e)for(const e in i)t[e]=i[e];return t}function Z(t,e){return{kind:"array",itemType:t,N:e}}function W(t){if("array"===t.kind){const e=W(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}function H(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!H(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of Dl)if(!H(t,e))return null}return"Expected "+W(t)+" but found "+W(e)+" instead."}function X(t,e){return e.some((e=>e.kind===t.kind))}function Y(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}function J(t,e){return"array"===t.kind&&"array"===e.kind?t.itemType.kind===e.itemType.kind&&"number"==typeof t.N:t.kind===e.kind}function K(t){return(t%=360)<0&&(t+=360),t}function $([t,e,i,r]){let o,n;const s=tt((.2225045*(t=Q(t))+.7168786*(e=Q(e))+.0606169*(i=Q(i)))/1);t===e&&e===i?o=n=s:(o=tt((.4360747*t+.3850649*e+.1430804*i)/Ll),n=tt((.0139322*t+.0971045*e+.7141733*i)/Ol));const a=116*s-16;return[a<0?0:a,500*(o-s),200*(s-n),r]}function Q(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tt(t){return t>Bl?Math.pow(t,1/3):t/jl+Rl}function et([t,e,i,r]){let o=(t+16)/116,n=isNaN(e)?o:o+e/500,s=isNaN(i)?o:o-i/200;return o=1*rt(o),n=Ll*rt(n),s=Ol*rt(s),[it(3.1338561*n-1.6168667*o-.4906146*s),it(-.9787684*n+1.9161415*o+.033454*s),it(.0719453*n-.2289914*o+1.4052427*s),r]}function it(t){return(t=t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055)<0?0:t>1?1:t}function rt(t){return t>Fl?t*t*t:jl*(t-Rl)}function ot(t,e){return Gl(t,e)?t[e]:void 0}function nt(t){return parseInt(t.padEnd(2,t),16)/255}function st(t,e){return at(e?t/100:t,0,1)}function at(t,e,i){return Math.min(Math.max(e,t),i)}function lt(t){return!t.some(Number.isNaN)}function ct(t,e,i){return t+i*(e-t)}function ht(t,e,i){return t.map(((t,r)=>ct(t,e[r],i)))}function ut(t,e,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,e,i,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,i,r]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function dt(t){if(null===t||"string"==typeof t||"boolean"==typeof t||"number"==typeof t||t instanceof ic||t instanceof ql||t instanceof Zl||t instanceof Xl||t instanceof Yl||t instanceof Jl||t instanceof Kl||t instanceof tc||t instanceof ec)return!0;if(Array.isArray(t)){for(const e of t)if(!dt(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!dt(t[e]))return!1;return!0}return!1}function pt(t){if(null===t)return gl;if("string"==typeof t)return xl;if("boolean"==typeof t)return bl;if("number"==typeof t)return vl;if(t instanceof ql)return wl;if(t instanceof ic)return Tl;if(t instanceof Zl)return Il;if(t instanceof Xl)return Cl;if(t instanceof Yl)return Ml;if(t instanceof Jl)return kl;if(t instanceof Kl)return Al;if(t instanceof tc)return zl;if(t instanceof ec)return El;if(Array.isArray(t)){const e=t.length;let i;for(const e of t){const t=pt(e);if(i){if(i===t)continue;i=Pl;break}i=t}return Z(i||Pl,e)}return Sl}function ft(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof ql||t instanceof ic||t instanceof Xl||t instanceof Yl||t instanceof Jl||t instanceof Kl||t instanceof tc||t instanceof ec?t.toString():JSON.stringify(t)}function mt(t,e){const i=t.length-1;let r,o,n=0,s=i,a=0;for(;n<=s;)if(a=Math.floor((n+s)/2),r=t[a],o=t[a+1],r<=e){if(a===i||e<o)return a;n=a+1}else{if(!(r>e))throw new $l("Input is not a number.");s=a-1}return 0}function _t(t,e,i,r){const o=r-i,n=t-i;return 0===o?0:1===e?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}function yt(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function gt(t,e,i,r){return 0===r.compare(e,i)}function vt(t,e,i){const r="=="!==t&&"!="!==t;return class o{constructor(t,e,i){this.type=bl,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let n=e.parse(t[1],1,Pl);if(!n)return null;if(!yt(i,n.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+W(n.type)+"'.");let s=e.parse(t[2],2,Pl);if(!s)return null;if(!yt(i,s.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+W(s.type)+"'.");if(n.type.kind!==s.type.kind&&"value"!==n.type.kind&&"value"!==s.type.kind)return e.error("Cannot compare types '"+W(n.type)+"' and '"+W(s.type)+"'.");r&&("value"===n.type.kind&&"value"!==s.type.kind?n=new nc(s.type,[n]):"value"!==n.type.kind&&"value"===s.type.kind&&(s=new nc(n.type,[s])));let a=null;if(4===t.length){if("string"!==n.type.kind&&"string"!==s.type.kind&&"value"!==n.type.kind&&"value"!==s.type.kind)return e.error("Cannot use collator to compare non-string types.");if(a=e.parse(t[3],3,Il),!a)return null}return new o(n,s,a)}evaluate(o){const n=this.lhs.evaluate(o),s=this.rhs.evaluate(o);if(r&&this.hasUntypedArgument){const e=pt(n),i=pt(s);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new $l('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+e.kind+", "+i.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){const t=pt(n),i=pt(s);if("string"!==t.kind||"string"!==i.kind)return e(o,n,s)}return this.collator?i(o,n,s,this.collator.evaluate(o)):e(o,n,s)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}}}function xt(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*Lc),Math.round(r*o*Lc)]}function bt(t,e){const i=Math.pow(2,e.z);return[(o=(t[0]/Lc+e.x)/i,360*o-180),(r=(t[1]/Lc+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function wt(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Tt(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function St(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],s=t[1]-i[1];return r*s-n*o==0&&r*n<=0&&o*s<=0}function Pt(t,e,i,r){return 0!=(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]&&!(!Et(t,e,i,r)||!Et(i,r,t,e));var o,n}function It(t,e,i){for(const r of i)for(let i=0;i<r.length-1;++i)if(Pt(t,e,r[i],r[i+1]))return!0;return!1}function Ct(t,e,i=!1){let r=!1;for(const a of e)for(let e=0;e<a.length-1;e++){if(St(t,a[e],a[e+1]))return i;(n=a[e])[1]>(o=t)[1]!=(s=a[e+1])[1]>o[1]&&o[0]<(s[0]-n[0])*(o[1]-n[1])/(s[1]-n[1])+n[0]&&(r=!r)}var o,n,s;return r}function Mt(t,e){for(const i of e)if(Ct(t,i))return!0;return!1}function At(t,e){for(const i of t)if(!Ct(i,e))return!1;for(let i=0;i<t.length-1;++i)if(It(t[i],t[i+1],e))return!1;return!0}function kt(t,e){for(const i of e)if(At(t,i))return!0;return!1}function Et(t,e,i,r){const o=r[0]-i[0],n=r[1]-i[1],s=(t[0]-i[0])*n-o*(t[1]-i[1]),a=(e[0]-i[0])*n-o*(e[1]-i[1]);return s>0&&a<0||s<0&&a>0}function zt(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=[];for(let r=0;r<t[o].length;r++){const s=xt(t[o][r],i);wt(e,s),n.push(s)}r.push(n)}return r}function Dt(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=zt(t[o],e,i);r.push(n)}return r}function Lt(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){const e=.5*r;let o=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===o&&(o=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=o}wt(e,t)}function Ot(t,e,i,r){const o=Math.pow(2,r.z)*Lc,n=[r.x*Lc,r.y*Lc],s=[];for(const r of t)for(const t of r){const r=[t.x+n[0],t.y+n[1]];Lt(r,e,i,o),s.push(r)}return s}function Rt(t,e,i,r){const o=Math.pow(2,r.z)*Lc,n=[r.x*Lc,r.y*Lc],s=[];for(const i of t){const t=[];for(const r of i){const i=[r.x+n[0],r.y+n[1]];wt(e,i),t.push(i)}s.push(t)}if(e[2]-e[0]<=o/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const t of s)for(const r of t)Lt(r,e,i,o)}var a;return s}function Ft(t,e,i=0,r=t.length-1,o=Bt){for(;r>i;){if(r-i>600){const n=r-i+1,s=e-i+1,a=Math.log(n),l=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*l*(n-l)/n)*(s-n/2<0?-1:1);Ft(t,e,Math.max(i,Math.floor(e-s*l/n+c)),Math.min(r,Math.floor(e+(n-s)*l/n+c)),o)}const n=t[e];let s=i,a=r;for(jt(t,i,e),o(t[r],n)>0&&jt(t,i,r);s<a;){for(jt(t,s,a),s++,a--;o(t[s],n)<0;)s++;for(;o(t[a],n)>0;)a--}0===o(t[i],n)?jt(t,i,a):(a++,jt(t,a,r)),a<=e&&(i=a+1),e<=a&&(r=a-1)}}function jt(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function Bt(t,e){return t<e?-1:t>e?1:0}function Vt(t,e){if(t.length<=1)return[t];const i=[];let r,o;for(const e of t){const t=Gt(e);0!==t&&(e.area=Math.abs(t),void 0===o&&(o=t<0),o===t<0?(r&&i.push(r),r=[e]):r.push(e))}if(r&&i.push(r),e>1)for(let t=0;t<i.length;t++)i[t].length<=e||(Ft(i[t],e,1,i[t].length-1,Nt),i[t]=i[t].slice(0,e));return i}function Nt(t,e){return e.area-t.area}function Gt(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function Ut(t,e){return e[0]-t[0]}function qt(t){return t[1]-t[0]+1}function Zt(t,e){return t[1]>=t[0]&&t[1]<e}function Wt(t,e){if(t[0]>t[1])return[null,null];const i=qt(t);if(e){if(2===i)return[t,null];const e=Math.floor(i/2);return[[t[0],t[0]+e],[t[0]+e,t[1]]]}if(1===i)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}function Ht(t,e){if(!Zt(e,t.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let r=e[0];r<=e[1];++r)wt(i,t[r]);return i}function Xt(t){const e=[1/0,1/0,-1/0,-1/0];for(const i of t)for(const t of i)wt(e,t);return e}function Yt(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Jt(t,e,i){if(!Yt(t)||!Yt(e))return NaN;let r=0,o=0;return t[2]<e[0]&&(r=e[0]-t[2]),t[0]>e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]<e[1]&&(o=e[1]-t[3]),i.distance([0,0],[r,o])}function Kt(t,e,i){const r=i.pointOnLine(e,t);return i.distance(t,r.point)}function $t(t,e,i,r,o){const n=Math.min(Kt(t,[i,r],o),Kt(e,[i,r],o)),s=Math.min(Kt(i,[t,e],o),Kt(r,[t,e],o));return Math.min(n,s)}function Qt(t,e,i,r,o){if(!Zt(e,t.length)||!Zt(r,i.length))return 1/0;let n=1/0;for(let s=e[0];s<e[1];++s){const e=t[s],a=t[s+1];for(let t=r[0];t<r[1];++t){const r=i[t],s=i[t+1];if(Pt(e,a,r,s))return 0;n=Math.min(n,$t(e,a,r,s,o))}}return n}function te(t,e,i,r,o){if(!Zt(e,t.length)||!Zt(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<=e[1];++s)for(let e=r[0];e<=r[1];++e)if(n=Math.min(n,o.distance(t[s],i[e])),0===n)return n;return n}function ee(t,e,i){if(Ct(t,e,!0))return 0;let r=1/0;for(const o of e){const e=o[0],n=o[o.length-1];if(e!==n&&(r=Math.min(r,Kt(t,[n,e],i)),0===r))return r;const s=i.pointOnLine(o,t);if(r=Math.min(r,i.distance(t,s.point)),0===r)return r}return r}function ie(t,e,i,r){if(!Zt(e,t.length))return NaN;for(let r=e[0];r<=e[1];++r)if(Ct(t[r],i,!0))return 0;let o=1/0;for(let n=e[0];n<e[1];++n){const e=t[n],s=t[n+1];for(const t of i)for(let i=0,n=t.length,a=n-1;i<n;a=i++){const n=t[a],l=t[i];if(Pt(e,s,n,l))return 0;o=Math.min(o,$t(e,s,n,l,r))}}return o}function re(t,e){for(const i of t)for(const t of i)if(Ct(t,e,!0))return!0;return!1}function oe(t,e,i,r=1/0){const o=Xt(t),n=Xt(e);if(r!==1/0&&Jt(o,n,i)>=r)return r;if(Tt(o,n)){if(re(t,e))return 0}else if(re(e,t))return 0;let s=1/0;for(const r of t)for(let t=0,o=r.length,n=o-1;t<o;n=t++){const o=r[n],a=r[t];for(const t of e)for(let e=0,r=t.length,n=r-1;e<r;n=e++){const r=t[n],l=t[e];if(Pt(o,a,r,l))return 0;s=Math.min(s,$t(o,a,r,l,i))}}return s}function ne(t,e,i,r,o,n){if(!n)return;const s=Jt(Ht(r,n),o,i);s<e&&t.push([s,n,[0,0]])}function se(t,e,i,r,o,n,s){if(!n||!s)return;const a=Jt(Ht(r,n),Ht(o,s),i);a<e&&t.push([a,n,s])}function ae(t,e,i,r,o=1/0){let n=Math.min(r.distance(t[0],i[0][0]),o);if(0===n)return n;const s=new Rc([[0,[0,t.length-1],[0,0]]],Ut),a=Xt(i);for(;s.length>0;){const o=s.pop();if(o[0]>=n)continue;const l=o[1],c=e?50:100;if(qt(l)<=c){if(!Zt(l,t.length))return NaN;if(e){const e=ie(t,l,i,r);if(isNaN(e)||0===e)return e;n=Math.min(n,e)}else for(let e=l[0];e<=l[1];++e){const o=ee(t[e],i,r);if(n=Math.min(n,o),0===n)return 0}}else{const i=Wt(l,e);ne(s,n,r,t,a,i[0]),ne(s,n,r,t,a,i[1])}}return n}function le(t,e,i,r,o,n=1/0){let s=Math.min(n,o.distance(t[0],i[0]));if(0===s)return s;const a=new Rc([[0,[0,t.length-1],[0,i.length-1]]],Ut);for(;a.length>0;){const n=a.pop();if(n[0]>=s)continue;const l=n[1],c=n[2],h=e?50:100,u=r?50:100;if(qt(l)<=h&&qt(c)<=u){if(!Zt(l,t.length)&&Zt(c,i.length))return NaN;let n;if(e&&r)n=Qt(t,l,i,c,o),s=Math.min(s,n);else if(e&&!r){const e=t.slice(l[0],l[1]+1);for(let t=c[0];t<=c[1];++t)if(n=Kt(i[t],e,o),s=Math.min(s,n),0===s)return s}else if(!e&&r){const e=i.slice(c[0],c[1]+1);for(let i=l[0];i<=l[1];++i)if(n=Kt(t[i],e,o),s=Math.min(s,n),0===s)return s}else n=te(t,l,i,c,o),s=Math.min(s,n)}else{const n=Wt(l,e),h=Wt(c,r);se(a,s,o,t,i,n[0],h[0]),se(a,s,o,t,i,n[0],h[1]),se(a,s,o,t,i,n[1],h[0]),se(a,s,o,t,i,n[1],h[1])}}return s}function ce(t){return"MultiPolygon"===t.type?t.coordinates.map((t=>({type:"Polygon",coordinates:t}))):"MultiLineString"===t.type?t.coordinates.map((t=>({type:"LineString",coordinates:t}))):"MultiPoint"===t.type?t.coordinates.map((t=>({type:"Point",coordinates:t}))):[t]}function he(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=ut(e,i,r,n);if(s)throw new $l(s);return new ql(e/255,i/255,r/255,n,!1)}function ue(t,e){return t in e}function de(t,e){const i=e[t];return void 0===i?null:i}function pe(t){return{type:t}}function fe(t){if(t instanceof dc)return fe(t.boundExpression);if(t instanceof Uc&&"error"===t.name)return!1;if(t instanceof Ac)return!1;if(t instanceof Oc)return!1;if(t instanceof Vc)return!1;if(t instanceof Nc)return!1;const e=t instanceof ac||t instanceof nc;let i=!0;return t.eachChild((t=>{i=e?i&&fe(t):i&&t instanceof rc})),!!i&&me(t)&&ye(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function me(t){if(t instanceof Uc){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Oc)return!1;if(t instanceof Vc)return!1;let e=!0;return t.eachChild((t=>{e&&!me(t)&&(e=!1)})),e}function _e(t){if(t instanceof Uc&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!_e(t)&&(e=!1)})),e}function ye(t,e){if(t instanceof Uc&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild((t=>{i&&!ye(t,e)&&(i=!1)})),i}function ge(t){return{result:"success",value:t}}function ve(t){return{result:"error",value:t}}function xe(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function be(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function we(t){return!!t.expression&&t.expression.interpolated}function Te(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Se(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&pt(t)===Sl}function Pe(t){return t}function Ie(t,e){const i=t.stops&&"object"==typeof t.stops[0][0],r=i||!(i||void 0!==t.property),o=t.type||(we(e)?"exponential":"interval"),n=function(t){switch(t.type){case"color":return ql.parse;case"padding":return Yl.parse;case"numberArray":return Jl.parse;case"colorArray":return Kl.parse;default:return null}}(e);if(n&&((t=q({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],n(t[1])]))),t.default=n(t.default?t.default:e.default)),t.colorSpace&&"rgb"!==(s=t.colorSpace)&&"hcl"!==s&&"lab"!==s)throw new Error('Unknown color space: "'+t.colorSpace+'"');var s;const a=function(t){switch(t){case"exponential":return ke;case"interval":return Ae;case"categorical":return Me;case"identity":return Ee;default:throw new Error('Unknown function type "'+t+'"')}}(o);let l,c;if("categorical"===o){l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];c=typeof t.stops[0][0]}if(i){const i={},r=[];for(let e=0;e<t.stops.length;e++){const o=t.stops[e],n=o[0].zoom;void 0===i[n]&&(i[n]={zoom:n,type:t.type,property:t.property,default:t.default,stops:[]},r.push(n)),i[n].stops.push([o[0].value,o[1]])}const o=[];for(const t of r)o.push([i[t].zoom,Ie(i[t],e)]);const n={name:"linear"};return{kind:"composite",interpolationType:n,interpolationFactor:xc.interpolationFactor.bind(void 0,n),zoomStops:o.map((t=>t[0])),evaluate:({zoom:i},r)=>ke({stops:o,base:t.base},e,i).evaluate(i,r)}}if(r){const i="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:i,interpolationFactor:xc.interpolationFactor.bind(void 0,i),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:i})=>a(t,e,i,l,c)}}return{kind:"source",evaluate(i,r){const o=r&&r.properties?r.properties[t.property]:void 0;return void 0===o?Ce(t.default,e.default):a(t,e,o,l,c)}}}function Ce(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Me(t,e,i,r,o){return Ce(typeof i===o?r[i]:void 0,t.default,e.default)}function Ae(t,e,i){if("number"!==Te(i))return Ce(t.default,e.default);const r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=mt(t.stops.map((t=>t[0])),i);return t.stops[o][1]}function ke(t,e,i){const r=void 0!==t.base?t.base:1;if("number"!==Te(i))return Ce(t.default,e.default);const o=t.stops.length;if(1===o)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=mt(t.stops.map((t=>t[0])),i),s=function(t,e,i,r){const o=r-i,n=t-i;return 0===o?0:1===e?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),a=t.stops[n][1],l=t.stops[n+1][1],c=bc[e.type]||Pe;return"function"==typeof a.evaluate?{evaluate(...e){const i=a.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==i&&void 0!==r)return c(i,r,s,t.colorSpace)}}:c(a,l,s,t.colorSpace)}function Ee(t,e,i){switch(e.type){case"color":i=ql.parse(i);break;case"formatted":i=Xl.fromString(i.toString());break;case"resolvedImage":i=ec.fromString(i.toString());break;case"padding":i=Yl.parse(i);break;case"colorArray":i=Kl.parse(i);break;case"numberArray":i=Jl.parse(i);break;default:Te(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0)}return Ce(i,t.default,e.default)}function ze(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Gc}function De(t,e,i){const r=new hc(Gc,fe,[],e?function(t){const e={color:wl,string:xl,number:vl,enum:xl,boolean:bl,formatted:Cl,padding:Ml,numberArray:kl,colorArray:Al,projectionDefinition:Tl,resolvedImage:El,variableAnchorOffsetCollection:zl};return"array"===t.type?Z(e[t.value]||Pl,t.length):e[t.type]}(e):void 0),o=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return o?ge(new qc(o,e,i)):ve(r.errors)}function Le(t){return void 0!==t._styleExpression}function Oe(t,e,i){const r=De(t,e,i);if("error"===r.result)return r;const o=r.value.expression,n=me(o);if(!n&&!xe(e))return ve([new _l("","data expressions not supported")]);const s=ye(o,["zoom"]);if(!s&&!be(e))return ve([new _l("","zoom expressions not supported")]);const a=Re(o);return a||s?a instanceof _l?ve([a]):a instanceof xc&&!we(e)?ve([new _l("",'"interpolate" expressions cannot be used with this property')]):ge(a?new Wc(n?"camera":"composite",r.value,a.labels,a instanceof xc?a.interpolation:void 0,i):new Zc(n?"constant":"source",r.value,i)):ve([new _l("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}function Re(t){let e=null;if(t instanceof uc)e=Re(t.result);else if(t instanceof wc){for(const i of t.args)if(e=Re(i),e)break}else(t instanceof vc||t instanceof xc)&&t.input instanceof Uc&&"zoom"===t.input.name&&(e=t);return e instanceof _l||t.eachChild((t=>{const i=Re(t);i instanceof _l?e=i:!e&&i?e=new _l("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new _l("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Fe(t,e=new Set){return t instanceof Nc&&e.add(t.key),t.eachChild((t=>{Fe(t,e)})),e}function je(t,e){const{zoom:i,heatmapDensity:r,elevation:o,lineProgress:n,isSupportedScript:s,accumulated:a}=null!=t?t:{};return{zoom:i,heatmapDensity:r,elevation:o,lineProgress:n,isSupportedScript:s,accumulated:a,globalState:e}}function Be(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Be(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function Ve(t,e){if(null==t)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Be(t)||(t=Ue(t));const i=De(t,Kc,e);if("error"===i.result)throw new Error(i.value.map((t=>t.key+": "+t.message)).join(", "));return{filter:(t,e,r)=>i.value.evaluate(t,e,{},r),needGeometry:Ge(t),getGlobalStateRefs:()=>Fe(i.value.expression)}}function Ne(t,e){return t<e?-1:t>e?1:0}function Ge(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let e=1;e<t.length;e++)if(Ge(t[e]))return!0;return!1}function Ue(t){if(!t)return!0;const e=t[0];return t.length<=1?"any"!==e:"=="===e?qe(t[1],t[2],"=="):"!="===e?He(qe(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?qe(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(Ue))):"all"===e?["all"].concat(t.slice(1).map(Ue)):"none"===e?["all"].concat(t.slice(1).map(Ue).map(He)):"in"===e?Ze(t[1],t.slice(2)):"!in"===e?He(Ze(t[1],t.slice(2))):"has"===e?We(t[1]):"!has"!==e||He(We(t[1]));var i}function qe(t,e,i){switch(t){case"$type":return["filter-type-"+i,e];case"$id":return["filter-id-"+i,e];default:return["filter-"+i,t,e]}}function Ze(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Ne)]]:["filter-in-small",t,["literal",e]]}}function We(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function He(t){return["!",t]}function Xe(t){const e=t.value;return e?[new Jc(t.key,e,"constants have been deprecated as of v8")]:[]}function Ye(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Je(t){if(Array.isArray(t))return t.map(Je);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=Je(t[i]);return e}return Ye(t)}function Ke(t){const e=t.key,i=t.value,r=t.valueSpec||{},o=t.objectElementValidators||{},n=t.style,s=t.styleSpec,a=t.validateSpec;let l=[];const c=Te(i);if("object"!==c)return[new Jc(e,i,"object expected, "+c+" found")];for(const t in i){const c=t.split(".")[0],h=ot(r,c)||r["*"];let u;if(ot(o,c))u=o[c];else if(ot(r,c)){if(void 0===i[t])continue;u=a}else if(o["*"])u=o["*"];else{if(!r["*"]){l.push(new Jc(e,i[t],'unknown property "'+t+'"'));continue}u=a}l=l.concat(u({key:(e?e+".":e)+t,value:i[t],valueSpec:h,style:n,styleSpec:s,object:i,objectKey:t,validateSpec:a},i))}for(const t in r)o[t]||r[t].required&&void 0===r[t].default&&void 0===i[t]&&l.push(new Jc(e,i,'missing required property "'+t+'"'));return l}function $e(t){const e=t.value,i=t.valueSpec,r=t.style,o=t.styleSpec,n=t.key,s=t.arrayElementValidator||t.validateSpec;if("array"!==Te(e))return[new Jc(n,e,"array expected, "+Te(e)+" found")];if(i.length&&e.length!==i.length)return[new Jc(n,e,"array length "+i.length+" expected, length "+e.length+" found")];let a={type:i.value,values:i.values};o.$version<7&&(a.function=i.function),"object"===Te(i.value)&&(a=i.value);let l=[];for(let i=0;i<e.length;i++)l=l.concat(s({array:e,arrayIndex:i,value:e[i],valueSpec:a,validateSpec:t.validateSpec,style:r,styleSpec:o,key:n+"["+i+"]"}));return l}function Qe(t){const e=t.key,i=t.value,r=t.valueSpec;let o=Te(i);return"number"===o&&i!=i&&(o="NaN"),"number"!==o?[new Jc(e,i,"number expected, "+o+" found")]:"minimum"in r&&i<r.minimum?[new Jc(e,i,i+" is less than the minimum value "+r.minimum)]:"maximum"in r&&i>r.maximum?[new Jc(e,i,i+" is greater than the maximum value "+r.maximum)]:[]}function ti(t){function e(t){let e=[];const o=t.value,n=t.key;if("array"!==Te(o))return[new Jc(n,o,"array expected, "+Te(o)+" found")];if(2!==o.length)return[new Jc(n,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Te(o[0]))return[new Jc(n,o,"object expected, "+Te(o[0])+" found")];if(void 0===o[0].zoom)return[new Jc(n,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Jc(n,o,"object stop key must have value")];if(a&&a>Ye(o[0].zoom))return[new Jc(n,o[0].zoom,"stop zoom values must appear in ascending order")];Ye(o[0].zoom)!==a&&(a=Ye(o[0].zoom),s=void 0,l={}),e=e.concat(Ke({key:n+"[0]",value:o[0],valueSpec:{zoom:{}},validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Qe,value:i}}))}else e=e.concat(i({key:n+"[0]",value:o[0],validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec},o));return ze(Je(o[1]))?e.concat([new Jc(n+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(t.validateSpec({key:n+"[1]",value:o[1],valueSpec:r,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec}))}function i(t,e){const i=Te(t.value),a=Ye(t.value),c=null!==t.value?t.value:e;if(n){if(i!==n)return[new Jc(t.key,c,i+" stop domain type must match previous stop domain type "+n)]}else n=i;if("number"!==i&&"string"!==i&&"boolean"!==i)return[new Jc(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==i&&"categorical"!==o){let e="number expected, "+i+" found";return xe(r)&&void 0===o&&(e+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Jc(t.key,c,e)]}return"categorical"!==o||"number"!==i||isFinite(a)&&Math.floor(a)===a?"categorical"!==o&&"number"===i&&void 0!==s&&a<s?[new Jc(t.key,c,"stop domain values must appear in ascending order")]:(s=a,"categorical"===o&&a in l?[new Jc(t.key,c,"stop domain values must be unique")]:(l[a]=!0,[])):[new Jc(t.key,c,"integer expected, found "+a)]}const r=t.valueSpec,o=Ye(t.value.type);let n,s,a,l={};const c="categorical"!==o&&void 0===t.value.property,h=!c,u="array"===Te(t.value.stops)&&"array"===Te(t.value.stops[0])&&"object"===Te(t.value.stops[0][0]),d=Ke({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Jc(t.key,t.value,'identity function may not have a "stops" property')];let i=[];const r=t.value;return i=i.concat($e({key:t.key,value:r,valueSpec:t.valueSpec,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),"array"===Te(r)&&0===r.length&&i.push(new Jc(t.key,r,"array must have at least one stop")),i},default:function(t){return t.validateSpec({key:t.key,value:t.value,valueSpec:r,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&c&&d.push(new Jc(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||d.push(new Jc(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!we(t.valueSpec)&&d.push(new Jc(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(h&&!xe(t.valueSpec)?d.push(new Jc(t.key,t.value,"property functions not supported")):c&&!be(t.valueSpec)&&d.push(new Jc(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||d.push(new Jc(t.key,t.value,'"property" property is required')),d}function ei(t){const e=("property"===t.expressionContext?Oe:De)(Je(t.value),t.valueSpec);if("error"===e.result)return e.value.map((e=>new Jc(""+t.key+e.key,t.value,e.message)));const i=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new Jc(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!_e(i))return[new Jc(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!_e(i))return[new Jc(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!ye(i,["zoom","feature-state"]))return[new Jc(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!me(i))return[new Jc(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ii(t){const e=t.key,i=t.value,r=Te(i);return"string"!==r?[new Jc(e,i,"color expected, "+r+" found")]:ql.parse(String(i))?[]:[new Jc(e,i,'color expected, "'+i+'" found')]}function ri(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?-1===r.values.indexOf(Ye(i))&&o.push(new Jc(e,i,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(i)+" found")):-1===Object.keys(r.values).indexOf(Ye(i))&&o.push(new Jc(e,i,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(i)+" found")),o}function oi(t){return Be(Je(t.value))?ei(q({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ni(t)}function ni(t){const e=t.value,i=t.key;if("array"!==Te(e))return[new Jc(i,e,"array expected, "+Te(e)+" found")];const r=t.styleSpec;let o,n=[];if(e.length<1)return[new Jc(i,e,"filter array must have at least 1 element")];switch(n=n.concat(ri({key:i+"[0]",value:e[0],valueSpec:r.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ye(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===Ye(e[1])&&n.push(new Jc(i,e,'"$type" cannot be use with operator "'+e[0]+'"'));case"==":case"!=":3!==e.length&&n.push(new Jc(i,e,'filter array for operator "'+e[0]+'" must have 3 elements'));case"in":case"!in":e.length>=2&&(o=Te(e[1]),"string"!==o&&n.push(new Jc(i+"[1]",e[1],"string expected, "+o+" found")));for(let s=2;s<e.length;s++)o=Te(e[s]),"$type"===Ye(e[1])?n=n.concat(ri({key:i+"["+s+"]",value:e[s],valueSpec:r.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&n.push(new Jc(i+"["+s+"]",e[s],"string, number, or boolean expected, "+o+" found"));break;case"any":case"all":case"none":for(let r=1;r<e.length;r++)n=n.concat(ni({key:i+"["+r+"]",value:e[r],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":o=Te(e[1]),2!==e.length?n.push(new Jc(i,e,'filter array for "'+e[0]+'" operator must have 2 elements')):"string"!==o&&n.push(new Jc(i+"[1]",e[1],"string expected, "+o+" found"))}return n}function si(t,e){const i=t.key,r=t.validateSpec,o=t.style,n=t.styleSpec,s=t.value,a=t.objectKey,l=n[e+"_"+t.layerType];if(!l)return[];const c=a.match(/^(.*)-transition$/);if("paint"===e&&c&&l[c[1]]&&l[c[1]].transition)return r({key:i,value:s,valueSpec:n.transition,style:o,styleSpec:n});const h=t.valueSpec||l[a];if(!h)return[new Jc(i,s,'unknown property "'+a+'"')];let u;if("string"===Te(s)&&xe(h)&&!h.tokens&&(u=/^{([^}]+)}$/.exec(s)))return[new Jc(i,s,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];const d=[];return"symbol"===t.layerType&&"text-font"===a&&Se(Je(s))&&"identity"===Ye(s.type)&&d.push(new Jc(i,s,'"text-font" does not support identity functions')),d.concat(r({key:t.key,value:s,valueSpec:h,style:o,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function ai(t){return si(t,"paint")}function li(t){return si(t,"layout")}function ci(t){let e=[];const i=t.value,r=t.key,o=t.style,n=t.styleSpec;if("object"!==Te(i))return[new Jc(r,i,"object expected, "+Te(i)+" found")];i.type||i.ref||e.push(new Jc(r,i,'either "type" or "ref" is required'));let s=Ye(i.type);const a=Ye(i.ref);if(i.id){const n=Ye(i.id);for(let s=0;s<t.arrayIndex;s++){const t=o.layers[s];Ye(t.id)===n&&e.push(new Jc(r,i.id,'duplicate layer id "'+i.id+'", previously used at line '+t.id.__line__))}}if("ref"in i){let t;["type","source","source-layer","filter","layout"].forEach((t=>{t in i&&e.push(new Jc(r,i[t],'"'+t+'" is prohibited for ref layers'))})),o.layers.forEach((e=>{Ye(e.id)===a&&(t=e)})),t?t.ref?e.push(new Jc(r,i.ref,"ref cannot reference another ref layer")):s=Ye(t.type):e.push(new Jc(r,i.ref,'ref layer "'+a+'" not found'))}else if("background"!==s)if(i.source){const t=o.sources&&o.sources[i.source],n=t&&Ye(t.type);t?"vector"===n&&"raster"===s?e.push(new Jc(r,i.source,'layer "'+i.id+'" requires a raster source')):"raster-dem"!==n&&"hillshade"===s||"raster-dem"!==n&&"color-relief"===s?e.push(new Jc(r,i.source,'layer "'+i.id+'" requires a raster-dem source')):"raster"===n&&"raster"!==s?e.push(new Jc(r,i.source,'layer "'+i.id+'" requires a vector source')):"vector"!==n||i["source-layer"]?"raster-dem"===n&&"hillshade"!==s&&"color-relief"!==s?e.push(new Jc(r,i.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"!==s||!i.paint||!i.paint["line-gradient"]||"geojson"===n&&t.lineMetrics||e.push(new Jc(r,i,'layer "'+i.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Jc(r,i,'layer "'+i.id+'" must specify a "source-layer"')):e.push(new Jc(r,i.source,'source "'+i.source+'" not found'))}else e.push(new Jc(r,i,'missing required property "source"'));return e=e.concat(Ke({key:r,value:i,valueSpec:n.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":()=>[],type:()=>t.validateSpec({key:r+".type",value:i.type,valueSpec:n.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:i,objectKey:"type"}),filter:oi,layout:t=>Ke({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>li(q({layerType:s},t))}}),paint:t=>Ke({layer:i,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*":t=>ai(q({layerType:s},t))}})}})),e}function hi(t){const e=t.value,i=t.key,r=Te(e);return"string"!==r?[new Jc(i,e,"string expected, "+r+" found")]:[]}function ui(t){const e=t.value,i=t.key,r=t.styleSpec,o=t.style,n=t.validateSpec;if(!e.type)return[new Jc(i,e,'"type" is required')];const s=Ye(e.type);let a;switch(s){case"vector":case"raster":return a=Ke({key:i,value:e,valueSpec:r["source_"+s.replace("-","_")],style:t.style,styleSpec:r,objectElementValidators:$c,validateSpec:n}),a;case"raster-dem":return a=function(t){var e;const i=null!==(e=t.sourceName)&&void 0!==e?e:"",r=t.value,o=t.styleSpec,n=o.source_raster_dem,s=t.style;let a=[];const l=Te(r);if(void 0===r)return a;if("object"!==l)return a.push(new Jc("source_raster_dem",r,"object expected, "+l+" found")),a;const c="custom"===Ye(r.encoding),h=["redFactor","greenFactor","blueFactor","baseShift"],u=t.value.encoding?'"'+t.value.encoding+'"':"Default";for(const e in r)!c&&h.includes(e)?a.push(new Jc(e,r[e],'In "'+i+'": "'+e+'" is only valid when "encoding" is set to "custom". '+u+" encoding found")):n[e]?a=a.concat(t.validateSpec({key:e,value:r[e],valueSpec:n[e],validateSpec:t.validateSpec,style:s,styleSpec:o})):a.push(new Jc(e,r[e],'unknown property "'+e+'"'));return a}({sourceName:i,value:e,style:t.style,styleSpec:r,validateSpec:n}),a;case"geojson":if(a=Ke({key:i,value:e,valueSpec:r.source_geojson,style:o,styleSpec:r,validateSpec:n,objectElementValidators:$c}),e.cluster)for(const t in e.clusterProperties){const[r,o]=e.clusterProperties[t],n="string"==typeof r?[r,["accumulated"],["get",t]]:r;a.push(...ei({key:i+"."+t+".map",value:o,expressionContext:"cluster-map"})),a.push(...ei({key:i+"."+t+".reduce",value:n,expressionContext:"cluster-reduce"}))}return a;case"video":return Ke({key:i,value:e,valueSpec:r.source_video,style:o,validateSpec:n,styleSpec:r});case"image":return Ke({key:i,value:e,valueSpec:r.source_image,style:o,validateSpec:n,styleSpec:r});case"canvas":return[new Jc(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ri({key:i+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function di(t){const e=t.value,i=t.styleSpec,r=i.light,o=t.style;let n=[];const s=Te(e);if(void 0===e)return n;if("object"!==s)return n=n.concat([new Jc("light",e,"object expected, "+s+" found")]),n;for(const s in e){const a=s.match(/^(.*)-transition$/);n=n.concat(a&&r[a[1]]&&r[a[1]].transition?t.validateSpec({key:s,value:e[s],valueSpec:i.transition,validateSpec:t.validateSpec,style:o,styleSpec:i}):r[s]?t.validateSpec({key:s,value:e[s],valueSpec:r[s],validateSpec:t.validateSpec,style:o,styleSpec:i}):[new Jc(s,e[s],'unknown property "'+s+'"')])}return n}function pi(t){const e=t.value,i=t.styleSpec,r=i.sky,o=t.style,n=Te(e);if(void 0===e)return[];if("object"!==n)return[new Jc("sky",e,"object expected, "+n+" found")];let s=[];for(const n in e)s=s.concat(r[n]?t.validateSpec({key:n,value:e[n],valueSpec:r[n],style:o,styleSpec:i}):[new Jc(n,e[n],'unknown property "'+n+'"')]);return s}function fi(t){const e=t.value,i=t.styleSpec,r=i.terrain,o=t.style;let n=[];const s=Te(e);if(void 0===e)return n;if("object"!==s)return n=n.concat([new Jc("terrain",e,"object expected, "+s+" found")]),n;for(const s in e)n=n.concat(r[s]?t.validateSpec({key:s,value:e[s],valueSpec:r[s],validateSpec:t.validateSpec,style:o,styleSpec:i}):[new Jc(s,e[s],'unknown property "'+s+'"')]);return n}function mi(t){let e=[];const i=t.value,r=t.key;if(Array.isArray(i)){const o=[],n=[];for(const s in i)i[s].id&&o.includes(i[s].id)&&e.push(new Jc(r,i,"all the sprites' ids must be unique, but "+i[s].id+" is duplicated")),o.push(i[s].id),i[s].url&&n.includes(i[s].url)&&e.push(new Jc(r,i,"all the sprites' URLs must be unique, but "+i[s].url+" is duplicated")),n.push(i[s].url),e=e.concat(Ke({key:r+"["+s+"]",value:i[s],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:t.validateSpec}));return e}return hi({key:r,value:i})}function _i(t){return Boolean(t)&&t.constructor===Object}function yi(t){return _i(t.value)?[]:[new Jc(t.key,t.value,"object expected, "+Te(t.value)+" found")]}function gi(t){const e=t.value,i=t.valueSpec,r=t.styleSpec;return t.validateSpec=gi,i.expression&&Se(Ye(e))?ti(t):i.expression&&ze(Je(e))?ei(t):i.type&&Qc[i.type]?Qc[i.type](t):Ke(q({},t,{valueSpec:i.type?r[i.type]:i}))}function vi(t){const e=t.value,i=t.key,r=hi(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new Jc(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new Jc(i,e,'"glyphs" url must include a "{range}" token'))),r}function xi(t,e=ua){let i=[];return i=i.concat(gi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:gi,objectElementValidators:{glyphs:vi,"*":()=>[]}})),t.constants&&(i=i.concat(Xe({key:"constants",value:t.constants}))),wi(i)}function bi(t){return function(e){return t(Object.assign(Object.assign({},e),{validateSpec:gi}))}}function wi(t){return[].concat(t).sort(((t,e)=>t.line-e.line))}function Ti(t){return function(...e){return wi(t.apply(this,e))}}function Si(t,e){let i=!1;if(e&&e.length)for(const r of e)t.fire(new fl(new Error(r.message))),i=!0;return i}function Pi(t,e,i={}){if(sh[t])throw new Error(t+" is already registered.");Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),sh[t]={klass:e,omit:i.omit||[],shallow:i.shallow||[]}}function Ii(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Ci(t){return t.$name||t.constructor._classRegistryKey}function Mi(t){return!function(t){if(null===t||"object"!=typeof t)return!1;const e=Ci(t);return!(!e||"Object"===e)}(t)&&(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof Blob||t instanceof Error||Ii(t)||D(t)||ArrayBuffer.isView(t)||t instanceof ImageData)}function Ai(t,e){if(Mi(t))return(Ii(t)||D(t))&&e&&e.push(t),ArrayBuffer.isView(t)&&e&&e.push(t.buffer),t instanceof ImageData&&e&&e.push(t.data.buffer),t;if(Array.isArray(t)){const i=[];for(const r of t)i.push(Ai(r,e));return i}if("object"!=typeof t)throw new Error("can't serialize object of type "+typeof t);const i=Ci(t);if(!i)throw new Error("can't serialize object of unregistered class "+t.constructor.name);if(!sh[i])throw new Error(i+" is not registered.");const{klass:r}=sh[i],o=r.serialize?r.serialize(t,e):{};if(r.serialize){if(e&&o===e[e.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const r in t){if(!t.hasOwnProperty(r))continue;if(sh[i].omit.indexOf(r)>=0)continue;const n=t[r];o[r]=sh[i].shallow.indexOf(r)>=0?n:Ai(n,e)}t instanceof Error&&(o.message=t.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==i&&(o.$name=i),o}function ki(t){if(Mi(t))return t;if(Array.isArray(t))return t.map(ki);if("object"!=typeof t)throw new Error("can't deserialize object of type "+typeof t);const e=Ci(t)||"Object";if(!sh[e])throw new Error("can't deserialize unregistered class "+e);const{klass:i}=sh[e];if(!i)throw new Error("can't deserialize unregistered class "+e);if(i.deserialize)return i.deserialize(t);const r=Object.create(i.prototype);for(const i of Object.keys(t)){if("$name"===i)continue;const o=t[i];r[i]=sh[e].shallow.indexOf(i)>=0?o:ki(o)}return r}function Ei(t){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))}function zi(t){return/\s/u.test(String.fromCodePoint(t))}function Di(t){for(const e of t)if(Ei(e.codePointAt(0)))return!0;return!1}function Li(t){for(const i of t)if(e=i.codePointAt(0),lh.test(String.fromCodePoint(e)))return!1;var e;return!0}function Oi(t){const e=t.map((t=>{try{return new RegExp("\\p{sc="+t+"}","u").source}catch(t){return null}})).filter((t=>t));return new RegExp(e.join("|"),"u")}function Ri(t){return!(Ei(t)||(e=t,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))));var e}function Fi(t){return ch.test(String.fromCodePoint(t))}function ji(t){for(const e of t)if(Fi(e.codePointAt(0)))return!0;return!1}function Bi(t){return function(t,e){for(const r of t)if(i=r.codePointAt(0),!e&&Fi(i)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(i)))return!1;var i;return!0}(t,"loaded"===hh.getRTLTextPluginStatus())}function Vi(t,e=1){let i=0,r=0;return{members:t.map((t=>{const o=kh[t.type].BYTES_PER_ELEMENT,n=i=Ni(i,Math.max(e,o)),s=t.components||1;return r=Math.max(r,o),i+=o*s,{name:t.name,type:t.type,components:s,offset:n}})),size:Ni(i,Math.max(r,e)),alignment:e}}function Ni(t,e){return Math.ceil(t/e)*e}function Gi(t,e){return 256*(t=S(Math.floor(t),0,255))+S(Math.floor(e),0,255)}function Ui(t){const e=+t;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:va(String(t))}function qi(t,e,i,r){for(;i<r;){const o=t[i+r>>1];let n=i-1,s=r+1;for(;;){do{n++}while(t[n]<o);do{s--}while(t[s]>o);if(n>=s)break;Zi(t,n,s),Zi(e,3*n,3*s),Zi(e,3*n+1,3*s+1),Zi(e,3*n+2,3*s+2)}s-i<r-s?(qi(t,e,i,s),i=s+1):(qi(t,e,s+1,r),r=s)}}function Zi(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function Wi(t){return[Gi(255*t.r,255*t.g),Gi(255*t.b,255*t.a)]}function Hi(t,e){const i={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"line-direction-image":["direction_pattern_to","direction_pattern_from","direction_pixel_ratio_to","direction_pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"top-fill-color":["top_color"],"side-fill-color":["side_color"],"top-fill-pattern":["top_pattern_to","top_pattern_from","top_pixel_ratio_to","top_pixel_ratio_from"],"side-fill-pattern":["side_pattern_to","side_pattern_from","side_pixel_ratio_to","side_pixel_ratio_from"]};if(i[t])return i[t];const r=e+"-";if(t.startsWith(r))return[t.slice(r.length).replace(/-/g,"_")];const o=t.split("-")[0];return[t.replace(o+"-","").replace(/-/g,"_")]}function Xi(t,e,i){const r={"line-pattern":{source:Pu,composite:Pu},"line-direction-image":{source:Pu,composite:Pu},"fill-pattern":{source:Pu,composite:Pu},"fill-extrusion-pattern":{source:Pu,composite:Pu},"top-fill-pattern":{source:Pu,composite:Pu},"side-fill-pattern":{source:Pu,composite:Pu},"line-dasharray":{source:Iu,composite:Iu}}[t];return r&&r[i]||{color:{source:jh,composite:iu},number:{source:Kh,composite:jh}}[e][i]}function Yi(t){const e=Ja/t.extent,i=t.loadGeometry();for(let t=0;t<i.length;t++){const r=i[t];for(let t=0;t<r.length;t++){const i=r[t],o=Math.round(i.x*e),n=Math.round(i.y*e);i.x=S(o,od,rd),i.y=S(n,od,rd),(o<i.x||o>i.x+1||n<i.y||n>i.y+1)&&k("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return i}function Ji(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Yi(t):[]}}function Ki(t,e){for(let i=0;i<t.length;i++)if(sr(e,t[i]))return!0;for(let i=0;i<e.length;i++)if(sr(t,e[i]))return!0;return!!ir(t,e)}function $i(t,e,i){return!!sr(t,e)||!!rr(e,t,i)}function Qi(t,e){if(1===t.length)return nr(e,t[0]);for(let i=0;i<e.length;i++){const r=e[i];for(let e=0;e<r.length;e++)if(sr(t,r[e]))return!0}for(let i=0;i<t.length;i++)if(nr(e,t[i]))return!0;for(let i=0;i<e.length;i++)if(ir(t,e[i]))return!0;return!1}function tr(t,e,i){for(let r=0;r<e.length;r++){const o=e[r];if(t.length>=3)for(let e=0;e<o.length;e++)if(sr(t,o[e]))return!0;if(er(t,o,i))return!0}return!1}function er(t,e,i){if(t.length>1){if(ir(t,e))return!0;for(let r=0;r<e.length;r++)if(rr(e[r],t,i))return!0}for(let r=0;r<t.length;r++)if(rr(t[r],e,i))return!0;return!1}function ir(t,e){if(0===t.length||0===e.length)return!1;for(let s=0;s<t.length-1;s++){const a=t[s],l=t[s+1];for(let t=0;t<e.length-1;t++)if(r=l,E(i=a,o=e[t],n=e[t+1])!==E(r,o,n)&&E(i,r,o)!==E(i,r,n))return!0}var i,r,o,n;return!1}function rr(t,e,i){const r=i*i;if(1===e.length)return t.distSqr(e[0])<r;for(let i=1;i<e.length;i++)if(or(t,e[i-1],e[i])<r)return!0;return!1}function or(t,e,i){const r=e.distSqr(i);if(0===r)return t.distSqr(e);const o=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/r;return t.distSqr(o<0?e:o>1?i:i.sub(e)._mult(o)._add(e))}function nr(t,e){let i,r,o,n=!1;for(let s=0;s<t.length;s++){i=t[s];for(let t=0,s=i.length-1;t<i.length;s=t++)r=i[t],o=i[s],r.y>e.y!=o.y>e.y&&e.x<(o.x-r.x)*(e.y-r.y)/(o.y-r.y)+r.x&&(n=!n)}return n}function sr(t,e){let i=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const n=t[r],s=t[o];n.y>e.y!=s.y>e.y&&e.x<(s.x-n.x)*(e.y-n.y)/(s.y-n.y)+n.x&&(i=!i)}return i}function ar(t,e,i){const r=i[0],o=i[2];if(t.x<r.x&&e.x<r.x||t.x>o.x&&e.x>o.x||t.y<r.y&&e.y<r.y||t.y>o.y&&e.y>o.y)return!1;const n=E(t,e,i[0]);return n!==E(t,e,i[1])||n!==E(t,e,i[2])||n!==E(t,e,i[3])}function lr(t,e,i){const r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function cr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function hr(t,e,r,o,n){if(!e[0]&&!e[1])return t;const s=i.convert(e)._mult(n);"viewport"===r&&s._rotate(-o);const a=[];for(let e=0;e<t.length;e++)a.push(t[e].sub(s));return a}function ur(t){const e=[];for(let i=0;i<t.length;i++){const r=t[i],o=e.at(-1);(0===i||o&&!r.equals(o))&&e.push(r)}return e}function dr(t,e){const r=[];for(let o=0;o<t.length;o++){const n=ur(t[o]),s=[];for(let t=0;t<n.length;t++){const r=n[t],o=n[t-1],a=n[t+1],l=0===t?new i(0,0):r.sub(o)._unit()._perp(),c=t===n.length-1?new i(0,0):a.sub(r)._unit()._perp(),h=l._add(c)._unit(),u=h.x*c.x+h.y*c.y;0!==u&&h._mult(1/u),s.push(h._mult(e)._add(r))}r.push(s)}return r}function pr({queryGeometry:t,size:e},i){return $i(t,i,e)}function fr({queryGeometry:t,size:e,transform:i,unwrappedTileID:r,getElevation:o},n){return $i(t,n,e*(i.projectTileCoordinates(n.x,n.y,r,o).signedDistanceFromCamera/i.cameraToCenterDistance))}function mr({queryGeometry:t,size:e,transform:i,unwrappedTileID:r,getElevation:o},n){const s=i.projectTileCoordinates(n.x,n.y,r,o).signedDistanceFromCamera,a=e*(i.cameraToCenterDistance/s);return $i(t,gr(n,i,r,o),a)}function _r({queryGeometry:t,size:e,transform:i,unwrappedTileID:r,getElevation:o},n){return $i(t,gr(n,i,r,o),e)}function yr({queryGeometry:t,size:e,transform:i,unwrappedTileID:r,getElevation:o,pitchAlignment:n="map",pitchScale:s="map"},a){const l="map"===n?"map"===s?pr:fr:"map"===s?mr:_r,c={queryGeometry:t,size:e,transform:i,unwrappedTileID:r,getElevation:o};for(const t of a)for(const e of t)if(l(c,e))return!0;return!1}function gr(t,e,r,o){const n=e.projectTileCoordinates(t.x,t.y,r,o).point;return new i((.5*n.x+.5)*e.width,(.5*-n.y+.5)*e.height)}function vr(t,e,i,r){return t.map((t=>gr(t,e,i,r)))}function xr(t){return!fd.has(t)}function br(t,{width:e,height:i},r,o){if(o){if(o instanceof Uint8ClampedArray)o=new Uint8Array(o.buffer);else if(o.length!==e*i*r)throw new RangeError("mismatched image size. expected: "+o.length+" but got: "+e*i*r)}else o=new Uint8Array(e*i*r);return t.width=e,t.height=i,t.data=o,t}function wr(t,{width:e,height:i},r){if(e===t.width&&i===t.height)return;const o=br({},{width:e,height:i},r);Tr(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,i)},r),t.width=e,t.height=i,t.data=o.data}function Tr(t,e,i,r,o,n){if(0===o.width||0===o.height)return e;if(o.width>t.width||o.height>t.height||i.x>t.width-o.width||i.y>t.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>e.width||o.height>e.height||r.x>e.width-o.width||r.y>e.height-o.height)throw new RangeError("out of range destination coordinates for image copy");const s=t.data,a=e.data;if(s===a)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l<o.height;l++){const c=((i.y+l)*t.width+i.x)*n,h=((r.y+l)*e.width+r.x)*n;for(let t=0;t<o.width*n;t++)a[h+t]=s[c+t]}return e}function Sr(t){const e={},i=t.resolution||256,r=t.clips?t.clips.length:1,o=t.image||new bd({width:i,height:r});if(Math.log(i)/Math.LN2%1!=0)throw new Error("width is not a power of 2 - "+i);const n=(r,n,s)=>{e[t.evaluationKey]=s;const a=t.expression.evaluate(e);o.setPixel(r/4/i,n/4,a)};if(t.clips)for(let e=0,o=0;e<r;++e,o+=4*i)for(let r=0,s=0;r<i;r++,s+=4){const a=r/(i-1),{start:l,end:c}=t.clips[e];n(o,s,l*(1-a)+c*a)}else for(let t=0,e=0;t<i;t++,e+=4)n(0,e,t/(i-1));return o}function Pr(t,e){const i=e[0],r=e[1],o=e[2],n=e[3],s=Math.min(i,r,o),a=Math.round((t+n)/s);return{r:Math.floor(a*s/i)%256,g:Math.floor(a*s/r)%256,b:Math.floor(a*s/o)%256}}function Ir(t,e,i){const r=i.patternDependencies;let o=!1;for(const i of e){const e=i.paint.get(t+"-pattern");e.isConstant()||(o=!0);const n=e.constantOr(null);n&&(o=!0,r[n.to]=!0,r[n.from]=!0)}return o}function Cr(t,e,i,r,o){const{zoom:n}=r,s=o.patternDependencies;for(const r of e){const e=r.paint.get(t+"-pattern").value;if("constant"!==e.kind){let t=e.evaluate({zoom:n-1},i,{},o.availableImages),a=e.evaluate({zoom:n},i,{},o.availableImages),l=e.evaluate({zoom:n+1},i,{},o.availableImages);t=t&&t.name?t.name:t,a=a&&a.name?a.name:a,l=l&&l.name?l.name:l,s[t]=!0,s[a]=!0,s[l]=!0,i.patterns[r.id]={min:t,mid:a,max:l}}}return i}function Mr(t){return!t.isConstant()||null!=t.constantOr(null)}function Ar(t){for(const e of t)for(const t of zd){const i=e.paint.get(t);if(Mr(i)&&!i.isConstant())return!0}return!1}function kr(t,e,i,r){const{zoom:o}=i,n=r.patternDependencies;for(const i of t)for(const t of zd){const s=i.paint.get(t).value;if("constant"!==s.kind){let a=s.evaluate({zoom:o-1},e,{},r.availableImages),l=s.evaluate({zoom:o},e,{},r.availableImages),c=s.evaluate({zoom:o+1},e,{},r.availableImages);a=a&&a.name?a.name:a,l=l&&l.name?l.name:l,c=c&&c.name?c.name:c,n[a]=!0,n[l]=!0,n[c]=!0,e.patterns[i.id+":"+t]={min:a,mid:l,max:c}}}return e}function Er(t,e,i,r,o){let n;if(o===function(t,e,i,r){let o=0;for(let n=e,s=i-r;n<i;n+=r)o+=(t[s]-t[n])*(t[n+1]+t[s+1]),s=n;return o}(t,e,i,r)>0)for(let o=e;o<i;o+=r)n=Kr(o/r|0,t[o],t[o+1],n);else for(let o=i-r;o>=e;o-=r)n=Kr(o/r|0,t[o],t[o+1],n);return n&&Zr(n,n.next)&&($r(n),n=n.next),n}function zr(t,e){if(!t)return t;e||(e=t);let i,r=t;do{if(i=!1,r.steiner||!Zr(r,r.next)&&0!==qr(r.prev,r,r.next))r=r.next;else{if($r(r),r=e=r.prev,r===r.next)break;i=!0}}while(i||r!==e);return e}function Dr(t,e,i,r,o,n,s){if(!t)return;!s&&n&&function(t,e,i,r){let o=t;do{0===o.z&&(o.z=Vr(o.x,o.y,e,i,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){let e,i=1;do{let r,o=t;t=null;let n=null;for(e=0;o;){e++;let s=o,a=0;for(let t=0;t<i&&(a++,s=s.nextZ,s);t++);let l=i;for(;a>0||l>0&&s;)0!==a&&(0===l||!s||o.z<=s.z)?(r=o,o=o.nextZ,a--):(r=s,s=s.nextZ,l--),n?n.nextZ=r:t=r,r.prevZ=n,n=r;o=s}n.nextZ=null,i*=2}while(e>1)}(o)}(t,r,o,n);let a=t;for(;t.prev!==t.next;){const l=t.prev,c=t.next;if(n?Or(t,r,o,n):Lr(t))e.push(l.i,t.i,c.i),$r(t),t=c.next,a=c.next;else if((t=c)===a){s?1===s?Dr(t=Rr(zr(t),e),e,i,r,o,n,2):2===s&&Fr(t,e,i,r,o,n):Dr(zr(t),e,i,r,o,n,1);break}}}function Lr(t){const e=t.prev,i=t,r=t.next;if(qr(e,i,r)>=0)return!1;const o=e.x,n=i.x,s=r.x,a=e.y,l=i.y,c=r.y,h=Math.min(o,n,s),u=Math.min(a,l,c),d=Math.max(o,n,s),p=Math.max(a,l,c);let f=r.next;for(;f!==e;){if(f.x>=h&&f.x<=d&&f.y>=u&&f.y<=p&&Ur(o,a,n,l,s,c,f.x,f.y)&&qr(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Or(t,e,i,r){const o=t.prev,n=t,s=t.next;if(qr(o,n,s)>=0)return!1;const a=o.x,l=n.x,c=s.x,h=o.y,u=n.y,d=s.y,p=Math.min(a,l,c),f=Math.min(h,u,d),m=Math.max(a,l,c),_=Math.max(h,u,d),y=Vr(p,f,e,i,r),g=Vr(m,_,e,i,r);let v=t.prevZ,x=t.nextZ;for(;v&&v.z>=y&&x&&x.z<=g;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=_&&v!==o&&v!==s&&Ur(a,h,l,u,c,d,v.x,v.y)&&qr(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=_&&x!==o&&x!==s&&Ur(a,h,l,u,c,d,x.x,x.y)&&qr(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;v&&v.z>=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=_&&v!==o&&v!==s&&Ur(a,h,l,u,c,d,v.x,v.y)&&qr(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=g;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=_&&x!==o&&x!==s&&Ur(a,h,l,u,c,d,x.x,x.y)&&qr(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Rr(t,e){let i=t;do{const r=i.prev,o=i.next.next;!Zr(r,o)&&Wr(r,i,i.next,o)&&Yr(r,o)&&Yr(o,r)&&(e.push(r.i,i.i,o.i),$r(i),$r(i.next),i=t=o),i=i.next}while(i!==t);return zr(i)}function Fr(t,e,i,r,o,n){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&(a=s).next.i!==(l=t).i&&a.prev.i!==l.i&&!function(t,e){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Wr(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(a,l)&&(Yr(a,l)&&Yr(l,a)&&function(t,e){let i=t,r=!1;const o=(t.x+e.x)/2,n=(t.y+e.y)/2;do{i.y>n!=i.next.y>n&&i.next.y!==i.y&&o<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}(a,l)&&(qr(a.prev,a,l.prev)||qr(a,l.prev,l))||Zr(a,l)&&qr(a.prev,a,a.next)>0&&qr(l.prev,l,l.next)>0)){let a=Jr(s,t);return s=zr(s,s.next),a=zr(a,a.next),Dr(s,e,i,r,o,n,0),void Dr(a,e,i,r,o,n,0)}t=t.next}s=s.next}while(s!==t);var a,l}function jr(t,e){let i=t.x-e.x;return 0===i&&(i=t.y-e.y,0===i)&&(i=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)),i}function Br(t,e){const i=function(t,e){let i=e;const r=t.x,o=t.y;let n,s=-1/0;if(Zr(t,i))return i;do{if(Zr(t,i.next))return i.next;if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){const t=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=r&&t>s&&(s=t,n=i.x<i.next.x?i:i.next,t===r))return n}i=i.next}while(i!==e);if(!n)return null;const a=n,l=n.x,c=n.y;let h=1/0;i=n;do{if(r>=i.x&&i.x>=l&&r!==i.x&&Gr(o<c?r:s,o,l,c,o<c?s:r,o,i.x,i.y)){const e=Math.abs(o-i.y)/(r-i.x);Yr(i,t)&&(e<h||e===h&&(i.x>n.x||i.x===n.x&&qr((u=n).prev,u,(d=i).prev)<0&&qr(d.next,u,u.next)<0))&&(n=i,h=e)}i=i.next}while(i!==a);var u,d;return n}(t,e);if(!i)return e;const r=Jr(i,t);return zr(r,r.next),zr(i,i.next)}function Vr(t,e,i,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Nr(t){let e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function Gr(t,e,i,r,o,n,s,a){return(o-s)*(e-a)>=(t-s)*(n-a)&&(t-s)*(r-a)>=(i-s)*(e-a)&&(i-s)*(n-a)>=(o-s)*(r-a)}function Ur(t,e,i,r,o,n,s,a){return!(t===s&&e===a)&&Gr(t,e,i,r,o,n,s,a)}function qr(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Zr(t,e){return t.x===e.x&&t.y===e.y}function Wr(t,e,i,r){const o=Xr(qr(t,e,i)),n=Xr(qr(t,e,r)),s=Xr(qr(i,r,t)),a=Xr(qr(i,r,e));return o!==n&&s!==a||!(0!==o||!Hr(t,i,e))||!(0!==n||!Hr(t,r,e))||!(0!==s||!Hr(i,t,r))||!(0!==a||!Hr(i,e,r))}function Hr(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function Xr(t){return t>0?1:t<0?-1:0}function Yr(t,e){return qr(t.prev,t,t.next)<0?qr(t,e,t.next)>=0&&qr(t,t.prev,e)>=0:qr(t,e,t.prev)<0||qr(t,t.next,e)<0}function Jr(t,e){const i=Qr(t.i,t.x,t.y),r=Qr(e.i,e.x,e.y),o=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,r.next=i,i.prev=r,n.next=r,r.prev=n,r}function Kr(t,e,i,r){const o=Qr(t,e,i);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function $r(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Qr(t,e,i){return{i:t,x:e,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function to(t,e,i,r=!0){return new Fd(i,e).subdividePolygonInternal(t,r)}function eo(t,e,r=!1){if(!t||t.length<1)return[];if(t.length<2)return[];const o=t[0],n=t[t.length-1],s=r&&(o.x!==n.x||o.y!==n.y);if(e<2)return s?[...t,t[0]]:[...t];const a=Math.floor(Ja/e),l=[];l.push(new i(t[0].x,t[0].y));const c=t.length,h=s?c:c-1;for(let e=0;e<h;e++){const r=t[e],o=e<c-1?t[e+1]:t[0],n=r.x,s=r.y,h=o.x,u=o.y,d=n!==h,p=s!==u;if(!d&&!p)continue;const f=h-n,m=u-s,_=Math.abs(f),y=Math.abs(m);let g=n,v=s;for(;;){const t=f>0?(Math.floor(g/a)+1)*a:(Math.ceil(g/a)-1)*a,e=m>0?(Math.floor(v/a)+1)*a:(Math.ceil(v/a)-1)*a,r=Math.abs(g-t),o=Math.abs(v-e),n=Math.abs(g-h),s=Math.abs(v-u),c=d?r/_:Number.POSITIVE_INFINITY,x=p?o/y:Number.POSITIVE_INFINITY;if((n<=r||!d)&&(s<=o||!p))break;if(c<x&&d||!p){g=t,v+=m*c;const e=new i(g,Math.round(v));l[l.length-1].x===e.x&&l[l.length-1].y===e.y||l.push(e)}else{g+=f*x,v=e;const t=new i(Math.round(g),v);l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}const x=new i(h,u);l[l.length-1].x===x.x&&l[l.length-1].y===x.y||l.push(x)}return l}function io(t,e,i){if(0===e.length)throw new Error("Subdivision vertex ring is empty.");let r=0,o=t[2*e[0]];for(let i=1;i<e.length;i++){const n=t[2*e[i]];n<o&&(o=n,r=i)}const n=e.length;let s=r,a=(s+1)%n;for(;;){const r=s-1>=0?s-1:n-1,o=(a+1)%n,l=t[2*e[r]],c=t[2*e[o]],h=t[2*e[s]],u=t[2*e[s]+1],d=t[2*e[a]+1];let p=!1;if(l<c)p=!0;else if(l>c)p=!1;else{const i=d-u,n=-(t[2*e[a]]-h),s=u<d?1:-1;((l-h)*i+(t[2*e[r]+1]-u)*n)*s>((c-h)*i+(t[2*e[o]+1]-u)*n)*s&&(p=!0)}if(p){const t=e[r],o=e[s],l=e[a];t!==o&&t!==l&&o!==l&&i.push(l,o,t),s--,s<0&&(s=n-1)}else{const t=e[o],r=e[s],l=e[a];t!==r&&t!==l&&r!==l&&i.push(l,r,t),a++,a>=n&&(a=0)}if(r===o)break}}function ro(t,e,i,r,o,n,s,a,l){const c=o.length/2,h=s&&a&&l;if(c<Ru.MAX_VERTEX_ARRAY_LENGTH){const u=e.prepareSegment(c,i,r),d=u.vertexLength;for(let t=0;t<n.length;t+=3)r.emplaceBack(d+n[t],d+n[t+1],d+n[t+2]);let p,f;u.vertexLength+=c,u.primitiveLength+=n.length/3,h&&(f=s.prepareSegment(c,i,a),p=f.vertexLength,f.vertexLength+=c);for(let e=0;e<o.length;e+=2)t(o[e],o[e+1]);if(h)for(let t=0;t<l.length;t++){const e=l[t];for(let t=1;t<e.length;t+=2)a.emplaceBack(p+e[t-1],p+e[t]);f.primitiveLength+=e.length/2}}else!function(t,e,i,r,o,n){const s=[];for(let t=0;t<r.length/2;t++)s.push(-1);const a={count:0};let l=0,c=t.getOrCreateLatestSegment(e,i),h=c.vertexLength;for(let u=2;u<o.length;u+=3){const d=o[u-2],p=o[u-1],f=o[u];let m=s[d]<l,_=s[p]<l,y=s[f]<l;c.vertexLength+((m?1:0)+(_?1:0)+(y?1:0))>Ru.MAX_VERTEX_ARRAY_LENGTH&&(c=t.createNewSegment(e,i),l=a.count,m=!0,_=!0,y=!0,h=0);const g=oo(s,r,n,a,d,m,c),v=oo(s,r,n,a,p,_,c),x=oo(s,r,n,a,f,y,c);i.emplaceBack(h+g-l,h+v-l,h+x-l),c.primitiveLength++}}(e,i,r,o,n,t),h&&function(t,e,i,r,o,n){const s=[];for(let t=0;t<r.length/2;t++)s.push(-1);const a={count:0};let l=0,c=t.getOrCreateLatestSegment(e,i),h=c.vertexLength;for(let u=0;u<o.length;u++){const d=o[u];for(let p=1;p<o[u].length;p+=2){const o=d[p-1],u=d[p];let f=s[o]<l,m=s[u]<l;c.vertexLength+((f?1:0)+(m?1:0))>Ru.MAX_VERTEX_ARRAY_LENGTH&&(c=t.createNewSegment(e,i),l=a.count,f=!0,m=!0,h=0);const _=oo(s,r,n,a,o,f,c),y=oo(s,r,n,a,u,m,c);i.emplaceBack(h+_-l,h+y-l),c.primitiveLength++}}}(s,i,a,o,l,t),e.forceNewSegmentOnNextPrepare(),null==s||s.forceNewSegmentOnNextPrepare()}function oo(t,e,i,r,o,n,s){if(n){const n=r.count;return i(e[2*o],e[2*o+1]),t[o]=r.count,r.count++,s.vertexLength++,n}return t[o]}function no(t,e){this.x=t,this.y=e}function so(t,e,i){1===t?e.id=i.readVarint():2===t?function(t,e){const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=e._keys[t.readVarint()],r=e._values[t.readVarint()];e.properties[i]=r}}(i,e):3===t?e.type=i.readVarint():4===t&&(e._geometry=i.pos)}function ao(t){const e=t.length;if(e<=1)return[t];const i=[];let r,o;for(let n=0;n<e;n++){const e=lo(t[n]);0!==e&&(void 0===o&&(o=e<0),o===e<0?(r&&i.push(r),r=[t[n]]):r&&r.push(t[n]))}return r&&i.push(r),i}function lo(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function co(t,e,i){15===t?e.version=i.readVarint():1===t?e.name=i.readString():5===t?e.extent=i.readVarint():2===t?e._features.push(i.pos):3===t?e._keys.push(i.readString()):4===t&&e._values.push(function(t){let e=null;const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}if(null==e)throw new Error("unknown feature value");return e}(i))}function ho(t,e,i){if(3===t){const t=new $d(i,i.readVarint()+i.pos);t.length&&(e[t.name]=t)}}function uo(t,e,i,r,o,n,s,a){t.emplaceBack(e,i,2*Math.floor(r*tp)+s,o*tp*2,n*tp*2,Math.round(a))}function po(t,e){for(let i=0;i<e.length;i++){const r=e[i];i===e.length-1&&e[0].x===r.x&&e[0].y===r.y||(t.x+=r.x,t.y+=r.y,t.sampleCount++)}}function fo(t){return t.every((t=>t.x<0))||t.every((t=>t.x>Ja))||t.every((t=>t.y<0))||t.every((t=>t.y>Ja))}function mo(t,e){return t.x*e.x+t.y*e.y}function _o(t,e){if(1===t.length){let i=0;const r=e[i++];let o;for(;!o||r.equals(o);)if(o=e[i++],!o)return 1/0;for(;i<e.length;i++){const n=e[i],s=t[0],a=o.sub(r),l=n.sub(r),c=s.sub(r),h=mo(a,a),u=mo(a,l),d=mo(l,l),p=mo(c,a),f=mo(c,l),m=h*d-u*u,_=(d*p-u*f)/m,y=(h*f-u*p)/m,g=r.z*(1-_-y)+o.z*_+n.z*y;if(isFinite(g))return g}return 1/0}{let t=1/0;for(const i of e)t=Math.min(t,i.z);return t}}function yo(t){return sp*Math.cos(t*Math.PI/180)}function go(t){return(180+t)/360}function vo(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function xo(t,e){return t/yo(e)}function bo(t){return 360*t-180}function wo(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}function To(t,e){return t*yo(wo(e))}function So(t,e,i,r,o,n,s,a){t.emplaceBack(e,i,2*Math.floor(r*lp)+s,o*lp*2,n*lp*2,Math.round(a))}function Po(t,e){for(let i=0;i<e.length;i++){const r=e[i];i===e.length-1&&e[0].x===r.x&&e[0].y===r.y||(t.x+=r.x,t.y+=r.y,t.sampleCount++)}}function Io(t,e){const i=Math.pow(2,e.z);return{x:(e.x+t.x/Ja)/i,y:(e.y+t.y/Ja)/i}}function Co(t,e,i){const r=Io(t,i),o=Io(e,i),n=wo((r.y+o.y)/2),s=cp*Math.cos(n*Math.PI/180);return Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2))*s}function Mo(t){return t.every((t=>t.x<0))||t.every((t=>t.x>Ja))||t.every((t=>t.y<0))||t.every((t=>t.y>Ja))}function Ao(t,e){return e>0?e+2*t:t}function ko(t,e){return e>0?e+2*t:t}function Eo(t,e,i){return t.sections.forEach((t=>{t.text=function(t,e,i){const r=e.layout.get("text-transform").evaluate(i,{});return"uppercase"===r?t=t.toLocaleUpperCase():"lowercase"===r&&(t=t.toLocaleLowerCase()),hh.applyArabicShaping&&(t=hh.applyArabicShaping(t)),t}(t.text,e,i)})),t}function zo(t,e,i,r,o,n){if("fontStack"in e){const r=i[e.fontStack],n=r&&r[t];return n?n.metrics.advance*e.scale+o:0}{const t=r[e.imageName];return t?t.displaySize[0]*e.scale*Ea/n+o:0}}function Do(t,e,i,r){const o=Math.pow(t-e,2);return r?t<e?o/2:2*o:o+Math.abs(i)*i}function Lo(t,e,i){let r=0;return 10===t&&(r-=1e4),i&&(r+=150),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Oo(t,e,i,r,o,n){let s=null,a=Do(e,i,o,n);for(const t of r){const r=Do(e-t.x,i,o,n)+t.badness;r<=a&&(s=t,a=r)}return{index:t,x:e,priorBreak:s,badness:a}}function Ro(t){return t?Ro(t.priorBreak).concat(t.index):[]}function Fo(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function jo(t,e,i){const r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(let e=i.pos-1;e>=t;e--)i.buf[e+r]=i.buf[e]}function Bo(t,e){for(let i=0;i<t.length;i++)e.writeVarint(t[i])}function Vo(t,e){for(let i=0;i<t.length;i++)e.writeSVarint(t[i])}function No(t,e){for(let i=0;i<t.length;i++)e.writeFloat(t[i])}function Go(t,e){for(let i=0;i<t.length;i++)e.writeDouble(t[i])}function Uo(t,e){for(let i=0;i<t.length;i++)e.writeBoolean(t[i])}function qo(t,e){for(let i=0;i<t.length;i++)e.writeFixed32(t[i])}function Zo(t,e){for(let i=0;i<t.length;i++)e.writeSFixed32(t[i])}function Wo(t,e){for(let i=0;i<t.length;i++)e.writeFixed64(t[i])}function Ho(t,e){for(let i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Xo(t,e,i){1===t&&i.readMessage(Yo,e)}function Yo(t,e,i){if(3===t){const{id:t,bitmap:r,width:o,height:n,left:s,top:a,advance:l}=i.readMessage(Jo,{});e.push({id:t,bitmap:new xd({width:o+6,height:n+6},r),metrics:{width:o,height:n,left:s,top:a,advance:l}})}}function Jo(t,e,i){1===t?e.id=i.readVarint():2===t?e.bitmap=i.readBytes():3===t?e.width=i.readVarint():4===t?e.height=i.readVarint():5===t?e.left=i.readSVarint():6===t?e.top=i.readSVarint():7===t&&(e.advance=i.readVarint())}function Ko(t){let e=0,i=0;for(const r of t)e+=r.w*r.h,i=Math.max(i,r.w);t.sort(((t,e)=>e.h-t.h));const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),i),h:1/0}];let o=0,n=0;for(const e of t)for(let t=r.length-1;t>=0;t--){const i=r[t];if(!(e.w>i.w||e.h>i.h)){if(e.x=i.x,e.y=i.y,n=Math.max(n,e.y+e.h),o=Math.max(o,e.x+e.w),e.w===i.w&&e.h===i.h){const e=r.pop();e&&t<r.length&&(r[t]=e)}else e.h===i.h?(i.x+=e.w,i.w-=e.w):e.w===i.w?(i.y+=e.h,i.h-=e.h):(r.push({x:i.x+e.w,y:i.y,w:i.w-e.w,h:e.h}),i.y+=e.h,i.h-=e.h);break}}return{w:o,h:n,fill:e/(o*n)||0}}function $o(e,i,r,o,n,s,a,l,c,h,u,d,p,f,m){const _=Xp.fromFeature(e,n);let y;d===t.aC.vertical&&_.verticalizePunctuation();let g=_.determineLineBreaks(h,s,i,o,f);const{processBidirectionalText:v,processStyledBidirectionalText:x}=hh;if(v&&1===_.sections.length){y=[],g=g.map((t=>_.toCodeUnitIndex(t)));const t=v(_.toString(),g);for(const e of t){const t=[...e].map((()=>0));y.push(new Xp(e,_.sections,t))}}else if(x){y=[],g=g.map((t=>_.toCodeUnitIndex(t)));let t=0;const e=[];for(const i of _.text)e.push(...Array(i.length).fill(_.sectionIndex[t])),t++;const i=x(_.text,e,g);for(const t of i){const e=[];let i="";for(const r of t[0])e.push(t[1][i.length]),i+=r;y.push(new Xp(t[0],_.sections,e))}}else y=function(t,e){const i=[];let r=0;for(const o of e)i.push(t.substring(r,o)),r=o;return r<t.length()&&i.push(t.substring(r,t.length())),i}(_,g);const b=[],w={positionedLines:b,text:_.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:d,iconsInText:!1,verticalizable:!1};return function(e,i,r,o,n,s,a,l,c,h,u,d){let p=0,f=0,m=0,_=0;const y="right"===l?1:"left"===l?0:.5,g=Ea/d;let v=0;for(const a of n){a.trim();const n=a.getMaxScale(),l={positionedGlyphs:[],lineOffset:0};e.positionedLines[v]=l;const d=l.positionedGlyphs;let T=0;if(!a.length()){f+=s,++v;continue}const S=tn(o,a,g);let P=0;for(const s of a.text){const l=a.getSection(P),m=s.codePointAt(0),_=(x=u,b=m,w=void 0,!(c===t.aC.horizontal||!x&&!Ei(b)||x&&(zi(b)||(w=b,/\p{sc=Arab}/u.test(String.fromCodePoint(w)))))),y={glyph:m,imageName:null,x:p,y:f+ef,vertical:_,scale:1,fontStack:"",sectionIndex:a.getSectionIndex(P),metrics:null,rect:null};let v;if("fontStack"in l){if(v=rn(l,m,_,S,i,r),!v)continue;y.fontStack=l.fontStack}else{if(e.iconsInText=!0,l.scale*=g,v=on(l,_,n,S,o),!v)continue;T=Math.max(T,v.imageOffset),y.imageName=l.imageName}const{rect:I,metrics:C,baselineOffset:M}=v;y.y+=M,y.scale=l.scale,y.metrics=C,y.rect=I,d.push(y),_?(e.verticalizable=!0,p+=("imageName"in l?C.advance:Ea)*l.scale+h):p+=C.advance*l.scale+h,P++}0!==d.length&&(m=Math.max(p-h,m),nn(d,0,d.length-1,y)),p=0,l.lineOffset=Math.max(T,(n-1)*Ea);const I=s*n+T;f+=I,_=Math.max(I,_),++v}var x,b,w;const{horizontalAlign:T,verticalAlign:S}=Qo(a);(function(t,e,i,r,o,n,s,a,l){const c=(e-i)*o;let h=0;h=n!==s?-a*r-ef:-r*l*s+.5*s;for(const e of t)for(const t of e.positionedGlyphs)t.x+=c,t.y+=h})(e.positionedLines,y,T,S,m,_,s,f,n.length),e.top+=-S*f,e.bottom=e.top+f,e.left+=-T*m,e.right=e.left+m}(w,i,r,o,y,a,l,c,d,h,p,m),!function(t){for(const e of t)if(0!==e.positionedGlyphs.length)return!1;return!0}(b)&&w}function Qo(t){let e=.5,i=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:e,verticalAlign:i}}function tn(t,e,i){const r=e.getMaxScale()*Ea,{maxImageWidth:o,maxImageHeight:n}=e.getMaxImageSize(t),s=Math.max(r,n*i);return{verticalLineContentWidth:Math.max(r,o*i),horizontalLineContentHeight:s}}function en(t){switch(t){case"top":return 0;case"center":return.5;default:return 1}}function rn(t,e,i,r,o,n){const s=n[t.fontStack],a=function(t,e,i,r){if(t&&t.rect)return t;const o=e[i.fontStack],n=o&&o[r];return n?{rect:null,metrics:n.metrics}:null}(s&&s[e],o,t,e);if(null===a)return null;let l;if(i)l=r.verticalLineContentWidth-t.scale*Ea;else{const e=en(t.verticalAlign);l=(r.horizontalLineContentHeight-t.scale*Ea)*e}return{rect:a.rect,metrics:a.metrics,baselineOffset:l}}function on(t,e,i,r,o){const n=o[t.imageName];if(!n)return null;const s=n.paddedRect,a=n.displaySize,l={width:a[0],height:a[1],left:1,top:-3,advance:e?a[1]:a[0]};let c;if(e)c=r.verticalLineContentWidth-a[1]*t.scale;else{const e=en(t.verticalAlign);c=(r.horizontalLineContentHeight-a[1]*t.scale)*e}return{rect:s,metrics:l,baselineOffset:c,imageOffset:(e?a[0]:a[1])*t.scale-Ea*i}}function nn(t,e,i,r){if(0===r)return;const o=t[i],n=(t[i].x+o.metrics.advance*o.scale)*r;for(let r=e;r<=i;r++)t[r].x-=n}function sn(t,e,i){const{horizontalAlign:r,verticalAlign:o}=Qo(i),n=e[0]-t.displaySize[0]*r,s=e[1]-t.displaySize[1]*o;return{image:t,top:s,bottom:s+t.displaySize[1],left:n,right:n+t.displaySize[0]}}function an(t){var e,i;let r=t.left,o=t.top,n=t.right-r,s=t.bottom-o;const a=null!==(e=t.image.textFitWidth)&&void 0!==e?e:"stretchOrShrink",l=null!==(i=t.image.textFitHeight)&&void 0!==i?i:"stretchOrShrink",c=(t.image.content[2]-t.image.content[0])/(t.image.content[3]-t.image.content[1]);if("proportional"===l){if("stretchOnly"===a&&n/s<c||"proportional"===a){const t=Math.ceil(s*c);r*=t/n,n=t}}else if("proportional"===a&&"stretchOnly"===l&&0!==c&&n/s>c){const t=Math.ceil(n/c);o*=t/s,s=t}return{x1:r,y1:o,x2:r+n,y2:o+s}}function ln(t,e,i,r,o,n){const s=t.image;let a;if(s.content){const t=s.content,e=s.pixelRatio||1;a=[t[0]/e,t[1]/e,s.displaySize[0]-t[2]/e,s.displaySize[1]-t[3]/e]}const l=e.left*n,c=e.right*n;let h,u,d,p;"width"===i||"both"===i?(p=o[0]+l-r[3],u=o[0]+c+r[1]):(p=o[0]+(l+c-s.displaySize[0])/2,u=p+s.displaySize[0]);const f=e.top*n,m=e.bottom*n;return"height"===i||"both"===i?(h=o[1]+f-r[0],d=o[1]+m+r[2]):(h=o[1]+(f+m-s.displaySize[1])/2,d=h+s.displaySize[1]),{image:s,top:h,right:u,bottom:d,left:p,collisionPadding:a}}function cn(t,e){const{expression:i}=e;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new uh(t+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:e,interpolationType:r}=i;let o=0;for(;o<e.length&&e[o]<=t;)o++;o=Math.max(0,o-1);let n=o;for(;n<e.length&&e[n]<t+1;)n++;n=Math.min(e.length-1,n);const s=e[o],a=e[n];return"composite"===i.kind?{kind:"composite",minZoom:s,maxZoom:a,interpolationType:r}:{kind:"camera",minZoom:s,maxZoom:a,minSize:i.evaluate(new uh(s)),maxSize:i.evaluate(new uh(a)),interpolationType:r}}}function hn(t,e,i){let r="never";const o=t.get(e);return o?r=o:t.get(i)&&(r="always"),r}function un(t,e,i,r,o,n,s,a,l,c,h,u,d){const p=a?Math.min(of,Math.round(a[0])):0,f=a?Math.min(of,Math.round(a[1])):0;t.emplaceBack(e,i,Math.round(32*r),Math.round(32*o),n,s,(p<<1)+(l?1:0),f,16*c,16*h,256*u,256*d)}function dn(t,e,i){t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i),t.emplaceBack(e.x,e.y,i)}function pn(t){for(const e of t.sections)if(ji(e.text))return!0;return!1}function fn(t,e,i){var r=2*Math.PI*6378137/256/Math.pow(2,i);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}function mn(t,e,i,r,o){(t*=2)<0&&(t=-1*t-1);const n=1<<i;return(n*n*t+n*o+r).toString(36)+i.toString(36)+e.toString(36)}function _n(t,e){return e?t.properties[e]:t.id}function yn(t,e){const i={id:t.id};if(e.removeAllProperties&&(delete t.removeProperties,delete t.addOrUpdateProperties,delete e.removeProperties),e.removeProperties)for(const i of e.removeProperties){const e=t.addOrUpdateProperties.findIndex((t=>t.key===i));e>-1&&t.addOrUpdateProperties.splice(e,1)}return(t.removeAllProperties||e.removeAllProperties)&&(i.removeAllProperties=!0),(t.removeProperties||e.removeProperties)&&(i.removeProperties=[...t.removeProperties||[],...e.removeProperties||[]]),(t.addOrUpdateProperties||e.addOrUpdateProperties)&&(i.addOrUpdateProperties=[...t.addOrUpdateProperties||[],...e.addOrUpdateProperties||[]]),(t.newGeometry||e.newGeometry)&&(i.newGeometry=e.newGeometry||t.newGeometry),i}function gn(t){var e,i;if(!t)return{};const r={};return r.removeAll=t.removeAll,r.remove=new Set(t.remove||[]),r.add=new Map(null===(e=t.add)||void 0===e?void 0:e.map((t=>[t.id,t]))),r.update=new Map(null===(i=t.update)||void 0===i?void 0:i.map((t=>[t.id,t]))),r}function vn(t,e,i){const r=new Int32Array(i);let o=0,n=e.get();for(let e=0;e<r.length;e++){let e=t[n++],i=127&e;e<128||(e=t[n++],i|=(127&e)<<7,e<128||(e=t[n++],i|=(127&e)<<14,e<128||(e=t[n++],i|=(127&e)<<21,e<128||(e=t[n++],i|=(15&e)<<28)))),r[o++]=i}return e.set(n),r}function xn(t,e,i){const r=new BigInt64Array(i);for(let i=0;i<r.length;i++)r[i]=bn(t,e);return r}function bn(t,e){let i=0x0n,r=0,o=e.get();for(;o<t.length;){const e=t[o++];if(i|=BigInt(127&e)<<BigInt(r),!(128&e))break;if(r+=7,r>=64)throw new Error("Varint too long")}return e.set(o),i}function wn(t,e){let i,r;return r=t[e.get()],e.increment(),i=127&r,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<7,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<14,r<128?i:(r=t[e.get()],e.increment(),i|=(127&r)<<21,r<128?i:(r=t[e.get()],i|=(15&r)<<28,function(t,e,i){let r,o;if(o=e[i.get()],i.increment(),r=(112&o)>>4,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<3,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<10,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<17,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(127&o)<<24,o<128)return 4294967296*r+(t>>>0);if(o=e[i.get()],i.increment(),r|=(1&o)<<31,o<128)return 4294967296*r+(t>>>0);throw new Error("Expected varint not more than 10 bytes")}(i,t,e)))))}function Tn(t){return t>>>1^-(1&t)}function Sn(t){return t>>0x1n^-(0x1n&t)}function Pn(t){return t%2==1?(t+1)/-2:t/2}function In(t,e,i){if(void 0===i){i=0;for(let r=0;r<e;r++)i+=t[r]}const r=new Int32Array(i);let o=0;for(let i=0;i<e;i++){const n=t[i];r.fill(t[i+e],o,o+n),o+=n}return r}function Cn(t,e,i){if(void 0===i){i=0;for(let r=0;r<e;r++)i+=Number(t[r])}const r=new BigInt64Array(i);let o=0;for(let i=0;i<e;i++){const n=Number(t[i]);r.fill(t[i+e],o,o+n),o+=n}return r}function Mn(t,e,i){const r=new Float64Array(i);let o=0;for(let i=0;i<e;i++){const n=t[i];r.fill(t[i+e],o,o+n),o+=n}return r}function An(t){const e=t.length/4*4;let i=1;if(e>=4)for(let r=t[0];i<e-4;i+=4)r=t[i]+=r,r=t[i+1]+=r,r=t[i+2]+=r,r=t[i+3]+=r;for(;i!=t.length;)t[i]+=t[i-1],++i}function kn(t,e){const i=function(t,e){const i=t[e.get()],r=Object.values(Ra)[i>>4];let o=null;switch(r){case Ra.DATA:o=new im(Object.values(Fa)[15&i]);break;case Ra.OFFSET:o=new im(null,Object.values(ja)[15&i]);break;case Ra.LENGTH:o=new im(null,null,Object.values(Ba)[15&i])}e.increment();const n=t[e.get()],s=Object.values(La)[n>>5],a=Object.values(La)[n>>2&7],l=Object.values(Oa)[3&n];e.increment();const c=vn(t,e,2),h=c[0];return{physicalStreamType:r,logicalStreamType:o,logicalLevelTechnique1:s,logicalLevelTechnique2:a,physicalLevelTechnique:l,numValues:h,byteLength:c[1],decompressedCount:h}}(t,e);return i.logicalLevelTechnique1===La.MORTON?function(t,e,i){const r=vn(e,i,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:r[0],coordinateShift:r[1]}}(i,t,e):La.RLE!==i.logicalLevelTechnique1&&La.RLE!==i.logicalLevelTechnique2||Oa.NONE===i.physicalLevelTechnique?i:function(t,e,i){const r=vn(e,i,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:r[1],runs:r[0],numRleValues:r[1]}}(i,t,e)}function En(t,e,i){if(!e)return t;const r=e.size(),o=new(0,t.constructor)(r);let n=0;for(let s=0;s<r;s++)o[s]=e.get(s)?t[n++]:i;return o}function zn(t,e,i,r,o,n){return function(t,e,i,r,o){switch(e.logicalLevelTechnique1){case La.DELTA:if(e.logicalLevelTechnique2===La.RLE){const i=e;if(!o)return function(t,e,i){const r=new Int32Array(i);let o=0,n=0;for(let i=0;i<e;i++){const s=t[i],a=Tn(t[i+e]);for(let t=0;t<s;t++)n+=a,r[o++]=n}return r}(t,i.runs,i.numRleValues);t=In(t,i.runs,i.numRleValues)}!function(t){t[0]=Tn(t[0]);const e=t.length/4*4;let i=1;if(e>=4)for(;i<e-4;i+=4){const e=t[i+1],r=t[i+2],o=t[i+3];t[i]=Tn(t[i])+t[i-1],t[i+1]=Tn(e)+t[i],t[i+2]=Tn(r)+t[i+1],t[i+3]=Tn(o)+t[i+2]}for(;i!=t.length;++i)t[i]=Tn(t[i])+t[i-1]}(t);break;case La.RLE:n=t,s=e,t=i?function(t,e,i){if(void 0===i){i=0;for(let r=0;r<e;r++)i+=t[r]}const r=new Int32Array(i);let o=0;for(let i=0;i<e;i++){const n=t[i];let s=t[i+e];s=Tn(s),r.fill(s,o,o+n),o+=n}return r}(n,s.runs,s.numRleValues):In(n,s.runs,s.numRleValues);break;case La.MORTON:An(t);break;case La.COMPONENTWISE_DELTA:!function(t){if(t.length<2)return;t[0]=Tn(t[0]),t[1]=Tn(t[1]);const e=t.length/4*4;let i=2;if(e>=4)for(;i<e-4;i+=4){const e=t[i+1],r=t[i+2],o=t[i+3];t[i]=Tn(t[i])+t[i-2],t[i+1]=Tn(e)+t[i-1],t[i+2]=Tn(r)+t[i],t[i+3]=Tn(o)+t[i+1]}for(;i!=t.length;i+=2)t[i]=Tn(t[i])+t[i-2],t[i+1]=Tn(t[i+1])+t[i-1]}(t);break;case La.NONE:i&&function(t){for(let e=0;e<t.length;e++)t[e]=Tn(t[e])}(t);break;default:throw new Error("The specified Logical level technique is not supported: "+e.logicalLevelTechnique1)}var n,s;return o?En(t,o,0):t}(Ln(t,e,i),i,r,0,n)}function Dn(t,e,i){return function(t,e){if(e.logicalLevelTechnique1===La.DELTA&&e.logicalLevelTechnique2===La.NONE)return function(t){const e=new Int32Array(t.length+1);e[0]=0,e[1]=Tn(t[0]);let i=e[1];for(let r=2;r!=e.length;++r)i+=Tn(t[r-1]),e[r]=e[r-1]+i;return new Uint32Array(e)}(t);if(e.logicalLevelTechnique1===La.RLE&&e.logicalLevelTechnique2===La.NONE)return function(t,e,i){const r=new Int32Array(i+1);r[0]=0;let o=1,n=r[0];for(let i=0;i<e;i++){const s=t[i],a=t[i+e];for(let t=o;t<o+s;t++)r[t]=a+n,n=r[t];o+=s}return new Uint32Array(r)}(t,e.runs,e.numRleValues);if(e.logicalLevelTechnique1===La.NONE&&e.logicalLevelTechnique2===La.NONE){!function(t){let e=0;for(let i=0;i<t.length;i++)t[i]+=e,e=t[i]}(t);const i=new Uint32Array(e.numValues+1);return i[0]=0,i.set(t,1),i}if(e.logicalLevelTechnique1===La.DELTA&&e.logicalLevelTechnique2===La.RLE){const i=function(t,e,i){const r=new Int32Array(i+1);r[0]=0;let o=1,n=r[0];for(let i=0;i<e;i++){const s=t[i];let a=t[i+e];a=Tn(a);for(let t=o;t<o+s;t++)r[t]=a+n,n=r[t];o+=s}return new Uint32Array(r)}(t,e.runs,e.numRleValues);return An(i),i}throw new Error("Only delta encoding is supported for transforming length to offset streams yet.")}(Ln(t,e,i),i)}function Ln(t,e,i){const r=i.physicalLevelTechnique;if(r===Oa.FAST_PFOR)return function(){throw new Error("FastPFor is not implemented yet.")}();if(r===Oa.VARINT)return vn(t,e,i.numValues);if(r===Oa.NONE){const r=e.get();e.add(i.byteLength);const o=t.subarray(r,e.get());return new Int32Array(o)}throw new Error("Specified physicalLevelTechnique is not supported (yet).")}function On(t,e,i,r){const o=Ln(t,e,i);if(1===o.length){const t=o[0];return r?Tn(t):t}return r?Tn(o[1]):o[1]}function Rn(t,e,i){return function(t){if(2==t.length){const e=Tn(t[1]);return[e,e]}return[Tn(t[2]),Tn(t[3])]}(Ln(t,e,i))}function Fn(t,e,i){return function(t){if(2==t.length){const e=Sn(t[1]);return[e,e]}return[Sn(t[2]),Sn(t[3])]}(xn(t,e,i.numValues))}function jn(t,e,i,r,o){return function(t,e,i,r){switch(e.logicalLevelTechnique1){case La.DELTA:if(e.logicalLevelTechnique2===La.RLE){const i=e;if(!r)return function(t,e,i){const r=new BigInt64Array(i);let o=0,n=0x0n;for(let i=0;i<e;i++){const s=Number(t[i]),a=Sn(t[i+e]);for(let t=0;t<s;t++)n+=a,r[o++]=n}return r}(t,i.runs,i.numRleValues);t=Cn(t,i.runs,i.numRleValues)}!function(t){t[0]=Sn(t[0]);const e=t.length/4*4;let i=1;if(e>=4)for(;i<e-4;i+=4){const e=t[i+1],r=t[i+2],o=t[i+3];t[i]=Sn(t[i])+t[i-1],t[i+1]=Sn(e)+t[i],t[i+2]=Sn(r)+t[i+1],t[i+3]=Sn(o)+t[i+2]}for(;i!=t.length;++i)t[i]=Sn(t[i])+t[i-1]}(t);break;case La.RLE:o=t,n=e,t=i?function(t,e,i){if(void 0===i){i=0;for(let r=0;r<e;r++)i+=Number(t[r])}const r=new BigInt64Array(i);let o=0;for(let i=0;i<e;i++){const n=Number(t[i]);let s=t[i+e];s=Sn(s),r.fill(s,o,o+n),o+=n}return r}(o,n.runs,n.numRleValues):Cn(o,n.runs,n.numRleValues);break;case La.NONE:i&&function(t){for(let e=0;e<t.length;e++)t[e]=Sn(t[e])}(t);break;default:throw new Error("The specified Logical level technique is not supported: "+e.logicalLevelTechnique1)}var o,n;return r?En(t,r,0x0n):t}(xn(t,e,i.numValues),i,r,o)}function Bn(t,e,i,r){const o=xn(t,e,i.numValues);if(1===o.length){const t=o[0];return r?Sn(t):t}return r?Sn(o[1]):o[1]}function Vn(t,e,i,r){const o=t.logicalLevelTechnique1;if(o===La.RLE)return 1===t.runs?Va.CONST:Va.FLAT;if(o!==La.DELTA||t.logicalLevelTechnique2!==La.RLE)return 1===t.numValues?Va.CONST:Va.FLAT;const n=e instanceof rm?e.size():e;if(t.numRleValues!==n)return Va.FLAT;if(1===t.runs)return Va.SEQUENCE;if(2!==t.runs)return 1===t.numValues?Va.CONST:Va.FLAT;const s=r.get();let a;if(t.physicalLevelTechnique===Oa.VARINT)a=vn(i,r,4);else{const t=r.get();a=new Int32Array(i.buffer,i.byteOffset+t,4)}return r.set(s),2===a[2]&&2===a[3]?Va.SEQUENCE:1===t.numValues?Va.CONST:Va.FLAT}function Nn(t,e,i){return{x:Gn(t,e)-i,y:Gn(t>>1,e)-i}}function Gn(t,e){let i=0;for(let r=0;r<e;r++)i|=(t&1<<2*r)>>r;return i}function Un(t){const e=new Array(t.numGeometries);let i=1,r=1,o=1,n=0;const s=new am;let a=0,l=0;const c=t.mortonSettings,h=t.topologyVector,u=h.geometryOffsets,d=h.partOffsets,p=h.ringOffsets,f=t.vertexOffsets,m=t.containsPolygonGeometry(),_=t.vertexBuffer;for(let h=0;h<t.numGeometries;h++){const y=t.geometryType(h);if(y===Na.POINT){if(f&&0!==f.length)if(t.vertexBufferType===Ua.VEC_2){const t=2*f[l++],i=new no(_[t],_[t+1]);e[n++]=s.createPoint(i)}else{const t=Nn(_[f[l++]],c.numBits,c.coordinateShift),i=new no(t.x,t.y);e[n++]=s.createPoint(i)}else{const t=new no(_[a++],_[a++]);e[n++]=s.createPoint(t)}u&&o++,d&&i++,p&&r++}else if(y===Na.MULTIPOINT){const t=u[o]-u[o-1];o++;const i=new Array(t);if(f&&0!==f.length){for(let e=0;e<t;e++){const t=2*f[l++];i[e]=new no(_[t],_[t+1])}e[n++]=s.createMultiPoint(i)}else{for(let e=0;e<t;e++){const t=_[a++],r=_[a++];i[e]=new no(t,r)}e[n++]=s.createMultiPoint(i)}}else if(y===Na.LINESTRING){let h,y=0;m?(y=p[r]-p[r-1],r++):y=d[i]-d[i-1],i++,f&&0!==f.length?(h=t.vertexBufferType===Ua.VEC_2?Xn(_,f,l,y,!1):Yn(_,f,l,y,!1,c),l+=y):(h=Hn(_,a,y,!1),a+=2*y),e[n++]=s.createLineString(h),u&&o++}else if(y===Na.POLYGON){const h=d[i]-d[i-1];i++;const m=new Array(h-1);let y=p[r]-p[r-1];if(r++,f&&0!==f.length){const i=t.vertexBufferType===Ua.VEC_2?Zn(_,f,l,y):Wn(_,f,l,y,0,c);l+=y;for(let e=0;e<m.length;e++)y=p[r]-p[r-1],r++,m[e]=t.vertexBufferType===Ua.VEC_2?Zn(_,f,l,y):Wn(_,f,l,y,0,c),l+=y;e[n++]=s.createPolygon(i,m)}else{const t=qn(_,a,y);a+=2*y;for(let t=0;t<m.length;t++)y=p[r]-p[r-1],r++,m[t]=qn(_,a,y),a+=2*y;e[n++]=s.createPolygon(t,m)}u&&o++}else if(y===Na.MULTILINESTRING){const h=u[o]-u[o-1];o++;const y=new Array(h);if(f&&0!==f.length){for(let e=0;e<h;e++){let o=0;m?(o=p[r]-p[r-1],r++):o=d[i]-d[i-1],i++;const n=t.vertexBufferType===Ua.VEC_2?Xn(_,f,l,o,!1):Yn(_,f,l,o,!1,c);y[e]=n,l+=o}e[n++]=s.createMultiLineString(y)}else{for(let t=0;t<h;t++){let e=0;m?(e=p[r]-p[r-1],r++):e=d[i]-d[i-1],i++,y[t]=Hn(_,a,e,!1),a+=2*e}e[n++]=s.createMultiLineString(y)}}else{if(y!==Na.MULTIPOLYGON)throw new Error("The specified geometry type is currently not supported.");{const h=u[o]-u[o-1];o++;const m=new Array(h);let y=0;if(f&&0!==f.length){for(let e=0;e<h;e++){const o=d[i]-d[i-1];i++;const n=new Array(o-1);y=p[r]-p[r-1],r++;const a=t.vertexBufferType===Ua.VEC_2?Zn(_,f,l,y):Wn(_,f,l,y,0,c);l+=y;for(let e=0;e<n.length;e++)y=p[r]-p[r-1],r++,n[e]=t.vertexBufferType===Ua.VEC_2?Zn(_,f,l,y):Wn(_,f,l,y,0,c),l+=y;m[e]=s.createPolygon(a,n)}e[n++]=s.createMultiPolygon(m)}else{for(let t=0;t<h;t++){const e=d[i]-d[i-1];i++;const o=new Array(e-1);y=p[r]-p[r-1],r++;const n=qn(_,a,y);a+=2*y;for(let t=0;t<o.length;t++){const e=p[r]-p[r-1];r++,o[t]=qn(_,a,e),a+=2*e}m[t]=s.createPolygon(n,o)}e[n++]=s.createMultiPolygon(m)}}}}return e}function qn(t,e,i){return Hn(t,e,i,!0)}function Zn(t,e,i,r){return Xn(t,e,i,r,!0)}function Wn(t,e,i,r,o,n){return Yn(t,e,i,r,!0,n)}function Hn(t,e,i,r){const o=new Array(r?i+1:i);for(let r=0;r<2*i;r+=2)o[r/2]=new no(t[e+r],t[e+r+1]);return r&&(o[o.length-1]=o[0]),o}function Xn(t,e,i,r,o){const n=new Array(o?r+1:r);for(let o=0;o<2*r;o+=2){const r=2*e[i+o/2];n[o/2]=new no(t[r],t[r+1])}return o&&(n[n.length-1]=n[0]),n}function Yn(t,e,i,r,o,n){const s=new Array(o?r+1:r);for(let o=0;o<r;o++){const r=Nn(t[e[i+o]],n.numBits,n.coordinateShift);s[o]=new no(r.x,r.y)}return o&&(s[s.length-1]=s[0]),s}function Jn(t,e,i,r,o,n){return new dm(t,e,i,r,o,n)}function Kn(t,e,i,r,o){return new pm(t,e,i,r,o)}function $n(t,e,i,r,o){const n=kn(t,i);let s=null,a=null,l=null,c=null;if(Vn(n,r,t,i)===Va.CONST){const o=On(t,i,n,!1);let _=null,y=null,g=null,v=null;for(let r=0;r<e-1;r++){const e=kn(t,i);switch(e.physicalStreamType){case Ra.LENGTH:switch(e.logicalStreamType.lengthType){case Ba.GEOMETRIES:_=Dn(t,i,e);break;case Ba.PARTS:y=Dn(t,i,e);break;case Ba.RINGS:g=Dn(t,i,e);break;case Ba.TRIANGLES:v=Dn(t,i,e)}break;case Ra.OFFSET:switch(e.logicalStreamType.offsetType){case ja.VERTEX:s=zn(t,i,e,!1);break;case ja.INDEX:c=zn(t,i,e,!1)}break;case Ra.DATA:Fa.VERTEX===e.logicalStreamType.dictionaryType?a=zn(t,i,e,!0):(l={numBits:e.numBits,coordinateShift:e.coordinateShift},a=zn(t,i,e,!1))}}return null!==c?null!=_||null!=y?Jn(r,o,v,c,a,new sm(_,y,g)):Jn(r,o,v,c,a):null===l?(p=r,f=o,m=new sm(_,y,g),new cm(p,f,Ua.VEC_2,m,s,a)):(h=r,u=o,d=new sm(_,y,g),new cm(h,u,Ua.MORTON,d,s,a,l))}var h,u,d,p,f,m;const _=zn(t,i,n,!1);let y=null,g=null,v=null,x=null;for(let r=0;r<e-1;r++){const e=kn(t,i);switch(e.physicalStreamType){case Ra.LENGTH:switch(e.logicalStreamType.lengthType){case Ba.GEOMETRIES:y=zn(t,i,e,!1);break;case Ba.PARTS:g=zn(t,i,e,!1);break;case Ba.RINGS:v=zn(t,i,e,!1);break;case Ba.TRIANGLES:x=Dn(t,i,e)}break;case Ra.OFFSET:switch(e.logicalStreamType.offsetType){case ja.VERTEX:s=zn(t,i,e,!1);break;case ja.INDEX:c=zn(t,i,e,!1)}break;case Ra.DATA:Fa.VERTEX===e.logicalStreamType.dictionaryType?a=zn(t,i,e,!0):(l={numBits:e.numBits,coordinateShift:e.coordinateShift},a=zn(t,i,e,!1))}}let b=null,w=null,T=null;return null!==y?(b=Qn(_,y,2),null!==g&&null!==v?(w=ts(_,b,g,!1),T=function(t,e,i,r){const o=new Uint32Array(i[i.length-1]+1);let n=0;o[0]=n;let s=1,a=1,l=0;for(let c=0;c<t.length;c++){const h=t[c],u=e[c+1]-e[c];if(0!==h&&3!==h)for(let t=0;t<u;t++){const t=i[s]-i[s-1];s++;for(let e=0;e<t;e++)n=o[a++]=n+r[l++]}else for(let t=0;t<u;t++)o[a++]=++n,s++}return o}(_,b,w,v)):null!==g&&(w=function(t,e,i){const r=new Uint32Array(e[e.length-1]+1);let o=0;r[0]=o;let n=1,s=0;for(let a=0;a<t.length;a++){const l=t[a],c=e[a+1]-e[a];if(4===l||1===l)for(let t=0;t<c;t++)o=r[n++]=o+i[s++];else for(let t=0;t<c;t++)r[n++]=++o}return r}(_,b,g))):null!==g&&null!==v?(w=Qn(_,g,1),T=ts(_,w,v,!0)):null!==g&&(w=Qn(_,g,0)),null!==c&&null===w?Kn(_,x,c,a):null!==c?Kn(_,x,c,a,new sm(b,w,T)):null===l?(I=_,C=new sm(b,w,T),new hm(Ua.VEC_2,I,C,s,a)):(S=_,P=new sm(b,w,T),new hm(Ua.MORTON,S,P,s,a,l));var S,P,I,C}function Qn(t,e,i){const r=new Uint32Array(t.length+1);let o=0;r[0]=o;let n=0;for(let s=0;s<t.length;s++)o=r[s+1]=o+(t[s]>i?e[n++]:1);return r}function ts(t,e,i,r){const o=new Uint32Array(e[e.length-1]+1);let n=0;o[0]=n;let s=1,a=0;for(let l=0;l<t.length;l++){const c=t[l],h=e[l+1]-e[l];if(5===c||2===c||r&&(4===c||1===c))for(let t=0;t<h;t++)n=o[s++]=n+i[a++];else for(let t=0;t<h;t++)o[s++]=++n}return o}function es(t,e,i,r,o){const n=function(t,e,i,r){const o=new Uint8Array(e);let n=0;const s=r.get()+i;for(;n<e&&!(r.get()>=s);){const i=t[r.increment()];if(i<=127){const s=i+3,a=t[r.increment()],l=Math.min(n+s,e);o.fill(a,n,l),n=l}else{const s=256-i;for(let i=0;i<s&&n<e;i++)o[n++]=t[r.increment()]}}return r.set(s),o}(t,Math.ceil(e/8),i,r);return o?function(t,e,i){if(!i)return t;const r=i.size(),o=new rm(t,e),n=new rm(new Uint8Array(Math.ceil(r/8)),r);let s=0;for(let t=0;t<r;t++){const e=!!i.get(t)&&o.get(s++);n.set(t,e)}return n.getBuffer()}(n,e,o):n}function is(t,e,i){return i-e>=12?ym.decode(t.subarray(e,i)):function(t,e,i){let r="",o=e;for(;o<i;){const e=t[o];let n,s,a,l=null,c=e>239?4:e>223?3:e>191?2:1;if(o+c>i)break;1===c?e<128&&(l=e):2===c?(n=t[o+1],128==(192&n)&&(l=(31&e)<<6|63&n,l<=127&&(l=null))):3===c?(n=t[o+1],s=t[o+2],128==(192&n)&&128==(192&s)&&(l=(15&e)<<12|(63&n)<<6|63&s,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===c&&(n=t[o+1],s=t[o+2],a=t[o+3],128==(192&n)&&128==(192&s)&&128==(192&a)&&(l=(15&e)<<18|(63&n)<<12|(63&s)<<6|63&a,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),o+=c}return r}(t,e,i)}function rs(t){return t instanceof rm}function os(t){if("id"===t.name)return!1;if("scalarType"===t.type){const e=t.scalarType;if("physicalType"===e.type)switch(e.physicalType){case Df:case Lf:case Of:case Rf:case Ff:case jf:case Bf:case Vf:case Nf:return!1;case Gf:return!0;default:return!1}else if("logicalType"===e.type)return!1}else if("complexType"===t.type){const e=t.complexType;if("physicalType"===e.type)switch(e.physicalType){case Uf:case qf:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function ns(t,e){const i=vn(t,e,1)[0];if(0===i)return"";const r=e.get(),o=t.subarray(r,r+i);return e.add(i),wm.decode(o)}function ss(t,e){const i=vn(t,e,1)[0]>>>0,r=!!(4&i),o=!!(2&i),n=vn(t,e,1)[0]>>>0,s={};if(1&i&&(s.nullable=!0),o){const o={};if(r?(o.type="logicalType",o.logicalType=n):(o.type="physicalType",o.physicalType=n),8&i){const i=vn(t,e,1)[0]>>>0;o.children=new Array(i);for(let r=0;r<i;r++)o.children[r]=ss(t,e)}s.type="complexField",s.complexField=o}else{const t={};r?(t.type="logicalType",t.logicalType=n):(t.type="physicalType",t.physicalType=n),s.type="scalarField",s.scalarField=t}return s}function as(t,e){const i=vn(t,e,1)[0]>>>0,r=function(t){switch(t){case 0:case 1:case 2:case 3:{const e={};e.nullable=!!(1&t),e.columnScope=zf;const i={};return i.physicalType=t>1?Bf:Ff,i.type="physicalType",e.scalarType=i,e.type="scalarType",e}case 4:{const t={nullable:!1};t.columnScope=zf;const e={type:"physicalType"};return e.physicalType=Uf,t.type="complexType",t.complexType=e,t}case 30:{const t={nullable:!1};t.columnScope=zf;const e={type:"physicalType"};return e.physicalType=qf,t.type="complexType",t.complexType=e,t}default:return function(t){let e=null;switch(t){case 10:case 11:e=Df;break;case 12:case 13:e=Lf;break;case 14:case 15:e=Of;break;case 16:case 17:e=Rf;break;case 18:case 19:e=Ff;break;case 20:case 21:e=jf;break;case 22:case 23:e=Bf;break;case 24:case 25:e=Vf;break;case 26:case 27:e=Nf;break;case 28:case 29:e=Gf;break;default:return null}const i={};i.nullable=!!(1&t),i.columnScope=zf;const r={type:"physicalType"};return r.physicalType=e,i.type="scalarType",i.scalarType=r,i}(t)}}(i);if(!r)throw new Error("Unsupported column type code: "+i);if(i>=10?r.name=ns(t,e):i>=0&&i<=3?r.name="id":4===i&&(r.name="geometry"),30===i){const i=vn(t,e,1)[0]>>>0,o=r.complexType;o.children=new Array(i);for(let r=0;r<i;r++)o.children[r]=ss(t,e)}return r}function ls(t,e){const i={featureTables:[]},r={};r.name=ns(t,e);const o=vn(t,e,1)[0]>>>0,n=vn(t,e,1)[0]>>>0;r.columns=new Array(n);for(let i=0;i<n;i++)r.columns[i]=as(t,e);return i.featureTables.push(r),[i,o]}function cs(t,e,i,r,o,n,s=!1){const a=e.scalarType.physicalType,l=Vn(o,n,t,i);if(a===Ff)switch(l){case Va.FLAT:{const e=zn(t,i,o,!1);return new If(r,e,n)}case Va.SEQUENCE:{const e=Rn(t,i,o);return new Af(r,e[0],e[1],o.numRleValues)}case Va.CONST:{const e=On(t,i,o,!1);return new kf(r,e,n)}}else switch(l){case Va.FLAT:{if(s){const e=function(t,e){switch(e.logicalLevelTechnique1){case La.DELTA:return e.logicalLevelTechnique2===La.RLE&&(t=Mn(t,e.runs,e.numRleValues)),function(t){t[0]=Pn(t[0]);const e=t.length/4*4;let i=1;if(e>=4)for(;i<e-4;i+=4){const e=t[i+1],r=t[i+2],o=t[i+3];t[i]=Pn(t[i])+t[i-1],t[i+1]=Pn(e)+t[i],t[i+2]=Pn(r)+t[i+1],t[i+3]=Pn(o)+t[i+2]}for(;i!=t.length;++i)t[i]=Pn(t[i])+t[i-1]}(t),t;case La.RLE:return Mn(t,(i=e).runs,i.numRleValues);case La.NONE:return t;default:throw new Error("The specified Logical level technique is not supported: "+e.logicalLevelTechnique1)}var i}(function(t,e,i){const r=new Float64Array(i);for(let o=0;o<i;o++)r[o]=wn(t,e);return r}(t,i,(c=o).numValues),c);return new Cf(r,e,n)}const e=jn(t,i,o,!1);return new om(r,e,n)}case Va.SEQUENCE:{const e=Fn(t,i,o);return new nm(r,e[0],e[1],o.numRleValues)}case Va.CONST:{const e=Bn(t,i,o,!1);return new _m(r,e,n)}}var c;throw new Error("Vector type not supported for id column.")}function hs(t,e){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);const i={keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,us,i);const r=i.keys;for(const t of r)e.writeStringField(3,t);const o=i.values;for(const t of o)e.writeMessage(4,_s,t)}function us(t,e){if(!t.feature)return;const i=t.feature;void 0!==i.id&&e.writeVarintField(1,i.id),e.writeMessage(2,ds,t),e.writeVarintField(3,i.type),e.writeMessage(4,ms,i)}function ds(t,e){for(const i in t.feature?.properties){let r=t.feature.properties[i],o=t.keycache[i];if(null==r)continue;void 0===o&&(t.keys.push(i),o=t.keys.length-1,t.keycache[i]=o),e.writeVarint(o),"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&(r=JSON.stringify(r));const n=typeof r+":"+r;let s=t.valuecache[n];void 0===s&&(t.values.push(r),s=t.values.length-1,t.valuecache[n]=s),e.writeVarint(s)}}function ps(t,e){return(e<<3)+(7&t)}function fs(t){return t<<1^t>>31}function ms(t,e){const i=t.loadGeometry(),r=t.type;let o=0,n=0;for(const s of i){let i=1;1===r&&(i=s.length),e.writeVarint(ps(1,i));const a=3===r?s.length-1:s.length;for(let t=0;t<a;t++){1===t&&1!==r&&e.writeVarint(ps(2,a-1));const i=s[t].x-o,l=s[t].y-n;e.writeVarint(fs(i)),e.writeVarint(fs(l)),o+=i,n+=l}3===t.type&&e.writeVarint(ps(7,1))}}function _s(t,e){const i=typeof t;"string"===i?e.writeStringField(1,t):"boolean"===i?e.writeBooleanField(7,t):"number"===i&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function ys(t,e,i,r,o){return C(t,((t,n)=>{const s=e instanceof xh?e.get(n):null;return s&&s.evaluate?s.evaluate(i,r,o):s}))}function gs(t,e){return e-t}function vs(t,e,r,o,n){const s=[];for(let a=0;a<t.length;a++){const l=t[a];let c;for(let t=0;t<l.length-1;t++){let a=l[t],h=l[t+1];a.x<e&&h.x<e||(a.x<e?a=new i(e,a.y+(e-a.x)/(h.x-a.x)*(h.y-a.y))._round():h.x<e&&(h=new i(e,a.y+(e-a.x)/(h.x-a.x)*(h.y-a.y))._round()),a.y<r&&h.y<r||(a.y<r?a=new i(a.x+(r-a.y)/(h.y-a.y)*(h.x-a.x),r)._round():h.y<r&&(h=new i(a.x+(r-a.y)/(h.y-a.y)*(h.x-a.x),r)._round()),a.x>=o&&h.x>=o||(a.x>=o?a=new i(o,a.y+(o-a.x)/(h.x-a.x)*(h.y-a.y))._round():h.x>=o&&(h=new i(o,a.y+(o-a.x)/(h.x-a.x)*(h.y-a.y))._round()),a.y>=n&&h.y>=n||(a.y>=n?a=new i(a.x+(n-a.y)/(h.y-a.y)*(h.x-a.x),n)._round():h.y>=n&&(h=new i(a.x+(n-a.y)/(h.y-a.y)*(h.x-a.x),n)._round()),c&&a.equals(c[c.length-1])||(c=[a],s.push(c)),c.push(h)))))}}return s}function xs(t,e,i,r,o){switch(e){case 1:return function(t,e,i,r){const o=[];for(const n of t)for(const t of n){const n=0===r?t.x:t.y;n>=e&&n<=i&&o.push([t])}return o}(t,i,r,o);case 2:return ws(t,i,r,o,!1);case 3:return ws(t,i,r,o,!0)}return[]}function bs(t,e,r,o,n){const s=0===o?Ts:Ss;let a=[];const l=[];for(let i=0;i<t.length-1;i++){const c=t[i],h=t[i+1],u=0===o?c.x:c.y,d=0===o?h.x:h.y;let p=!1;u<e?d>e&&a.push(s(c,h,e)):u>r?d<r&&a.push(s(c,h,r)):a.push(c),d<e&&u>=e&&(a.push(s(c,h,e)),p=!0),d>r&&u<=r&&(a.push(s(c,h,r)),p=!0),!n&&p&&(l.push(a),a=[])}const c=t.length-1,h=0===o?t[c].x:t[c].y;return h>=e&&h<=r&&a.push(t[c]),n&&a.length>0&&!a[0].equals(a[a.length-1])&&a.push(new i(a[0].x,a[0].y)),a.length>0&&l.push(a),l}function ws(t,e,i,r,o){const n=[];for(const s of t){const t=bs(s,e,i,r,o);t.length>0&&n.push(...t)}return n}function Ts(t,e,r){return new i(r,t.y+(r-t.x)/(e.x-t.x)*(e.y-t.y))}function Ss(t,e,r){return new i(t.x+(r-t.y)/(e.y-t.y)*(e.x-t.x),r)}function Ps(t,e,i,r,o){if(void 0===e.segment||0===i)return!0;let n=e,s=e.segment+1,a=0;for(;a>-i/2;){if(s--,s<0)return!1;a-=t[s].dist(n),n=t[s]}a+=t[s].dist(t[s+1]),s++;const l=[];let c=0;for(;a<i/2;){const e=t[s],i=t[s+1];if(!i)return!1;let n=t[s-1].angleTo(e)-e.angleTo(i);for(n=Math.abs((n+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:a,angleDelta:n}),c+=n;a-l[0].distance>r;)c-=l.shift().angleDelta;if(c>o)return!1;s++,a+=e.dist(i)}return!0}function Is(t){let e=0;for(let i=0;i<t.length-1;i++)e+=t[i].dist(t[i+1]);return e}function Cs(t,e,i){return t?.6*e*i:0}function Ms(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function As(t,e,i,r,o,n){const s=Cs(i,o,n),a=Ms(i,r)*n;let l=0;const c=Is(t)/2;for(let i=0;i<t.length-1;i++){const r=t[i],o=t[i+1],n=r.dist(o);if(l+n>c){const h=(c-l)/n,u=bc.number(r.x,o.x,h),d=bc.number(r.y,o.y,h),p=new Am(u,d,o.angleTo(r),i);return p._round(),!s||Ps(t,p,a,s,e)?p:void 0}l+=n}}function ks(t,e,i,r,o,n,s,a,l){const c=Cs(r,n,s),h=Ms(r,o),u=h*s,d=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-u<e/4&&(e=u+e/4),Es(t,d?e/2*a%e:(h/2+2*n)*s*a%e,e,c,i,u,d,!1,l)}function Es(t,e,i,r,o,n,s,a,l){const c=n/2,h=Is(t);let u=0,d=e-i,p=[];for(let e=0;e<t.length-1;e++){const s=t[e],a=t[e+1],f=s.dist(a),m=a.angleTo(s);for(;d+i<u+f;){d+=i;const _=(d-u)/f,y=bc.number(s.x,a.x,_),g=bc.number(s.y,a.y,_);if(y>=0&&y<l&&g>=0&&g<l&&d-c>=0&&d+c<=h){const i=new Am(y,g,m,e);i._round(),r&&!Ps(t,i,n,r,o)||p.push(i)}}u+=f}return a||p.length||s||(p=Es(t,u/2,i,r,o,n,s,!0,l)),p}function zs(t,e,r,o){const n=[],s=t.image,a=s.pixelRatio,l=s.paddedRect.w-2,c=s.paddedRect.h-2;let h={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom};const u=s.stretchX||[[0,l]],d=s.stretchY||[[0,c]],p=(t,e)=>t+e[1]-e[0],f=u.reduce(p,0),m=d.reduce(p,0),_=l-f,y=c-m;let g=0,v=f,x=0,b=m,w=0,T=_,S=0,P=y;if(s.content&&o){const e=s.content,i=e[2]-e[0],r=e[3]-e[1];(s.textFitWidth||s.textFitHeight)&&(h=an(t)),g=Ds(u,0,e[0]),x=Ds(d,0,e[1]),v=Ds(u,e[0],e[2]),b=Ds(d,e[1],e[3]),w=e[0]-g,S=e[1]-x,T=i-v,P=r-b}const I=h.x1,C=h.y1,M=h.x2-I,A=h.y2-C,k=(t,o,n,l)=>{const c=Os(t.stretch-g,v,M,I),h=Rs(t.fixed-w,T,t.stretch,f),u=Os(o.stretch-x,b,A,C),d=Rs(o.fixed-S,P,o.stretch,m),p=Os(n.stretch-g,v,M,I),_=Rs(n.fixed-w,T,n.stretch,f),y=Os(l.stretch-x,b,A,C),k=Rs(l.fixed-S,P,l.stretch,m),E=new i(c,u),z=new i(p,u),D=new i(p,y),L=new i(c,y),O=new i(h/a,d/a),R=new i(_/a,k/a),F=e*Math.PI/180;if(F){const t=Math.sin(F),e=Math.cos(F),i=[e,-t,t,e];E._matMult(i),z._matMult(i),L._matMult(i),D._matMult(i)}const j=t.stretch+t.fixed,B=o.stretch+o.fixed;return{tl:E,tr:z,bl:L,br:D,tex:{x:s.paddedRect.x+1+j,y:s.paddedRect.y+1+B,w:n.stretch+n.fixed-j,h:l.stretch+l.fixed-B},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:R,minFontScaleX:T/a/M,minFontScaleY:P/a/A,isSDF:r}};if(o&&(s.stretchX||s.stretchY)){const t=Ls(u,_,f),e=Ls(d,y,m);for(let i=0;i<t.length-1;i++){const r=t[i],o=t[i+1];for(let t=0;t<e.length-1;t++)n.push(k(r,e[t],o,e[t+1]))}}else n.push(k({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:c+1}));return n}function Ds(t,e,i){let r=0;for(const o of t)r+=Math.max(e,Math.min(i,o[1]))-Math.max(e,Math.min(i,o[0]));return r}function Ls(t,e,i){const r=[{fixed:-1,stretch:0}];for(const[e,i]of t){const t=r[r.length-1];r.push({fixed:e-t.stretch,stretch:t.stretch}),r.push({fixed:e-t.stretch,stretch:t.stretch+(i-e)})}return r.push({fixed:e+1,stretch:i}),r}function Os(t,e,i,r){return t/e*i+r}function Rs(t,e,i,r){return t-e*i/r}function Fs(t,e=1,r=!1){const o=bf.fromPoints(t[0]),n=Math.min(o.width(),o.height());let s=n/2;const a=new Rc([],js),{minX:l,minY:c,maxX:h,maxY:u}=o;if(0===n)return new i(l,c);for(let e=l;e<h;e+=n)for(let i=c;i<u;i+=n)a.push(new Bs(e+s,i+s,s,t));let d=function(t){let e=0,i=0,r=0;const o=t[0];for(let t=0,n=o.length,s=n-1;t<n;s=t++){const n=o[t],a=o[s],l=n.x*a.y-a.x*n.y;i+=(n.x+a.x)*l,r+=(n.y+a.y)*l,e+=3*l}return new Bs(i/e,r/e,0,t)}(t),p=a.length;for(;a.length;){const i=a.pop();(i.d>d.d||!d.d)&&(d=i,r&&console.log("found best %d after %d probes",Math.round(1e4*i.d)/1e4,p)),i.max-d.d<=e||(s=i.h/2,a.push(new Bs(i.p.x-s,i.p.y-s,s,t)),a.push(new Bs(i.p.x+s,i.p.y-s,s,t)),a.push(new Bs(i.p.x-s,i.p.y+s,s,t)),a.push(new Bs(i.p.x+s,i.p.y+s,s,t)),p+=4)}return r&&(console.log("num probes: "+p),console.log("best distance: "+d.d)),d.p}function js(t,e){return e.max-t.max}function Bs(t,e,r,o){this.p=new i(t,e),this.h=r,this.d=function(t,e){let i=!1,r=1/0;for(let o=0;o<e.length;o++){const n=e[o];for(let e=0,o=n.length,s=o-1;e<o;s=e++){const o=n[e],a=n[s];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i),r=Math.min(r,or(t,o,a))}}return(i?1:-1)*Math.sqrt(r)}(this.p,o),this.max=this.d+this.h*Math.SQRT2}function Vs(t,e){return e[1]!==Em?function(t,e,i){let r=0,o=0;switch(e=Math.abs(e),i=Math.abs(i),t){case"top-right":case"top-left":case"top":o=i-7;break;case"bottom-right":case"bottom-left":case"bottom":o=7-i}switch(t){case"top-right":case"bottom-right":case"right":r=-e;break;case"top-left":case"bottom-left":case"left":r=e}return[r,o]}(t,e[0],e[1]):function(t,e){let i=0,r=0;e<0&&(e=0);const o=e/Math.SQRT2;switch(t){case"top-right":case"top-left":r=o-7;break;case"bottom-right":case"bottom-left":r=7-o;break;case"bottom":r=7-e;break;case"top":r=e-7}switch(t){case"top-right":case"bottom-right":i=-o;break;case"top-left":case"bottom-left":i=o;break;case"left":i=e;break;case"right":i=-e}return[i,r]}(t,e[0])}function Ns(t,e,i){var r;const o=t.layout,n=null===(r=o.get("text-variable-anchor-offset"))||void 0===r?void 0:r.evaluate(e,{},i);if(n){const t=n.values,e=[];for(let i=0;i<t.length;i+=2){const r=e[i]=t[i],o=t[i+1].map((t=>t*Ea));r.startsWith("top")?o[1]-=7:r.startsWith("bottom")&&(o[1]+=7),e[i+1]=o}return new tc(e)}const s=o.get("text-variable-anchor");if(s){let r;r=void 0!==t._unevaluatedLayout.getValue("text-radial-offset")?[o.get("text-radial-offset").evaluate(e,{},i)*Ea,Em]:o.get("text-offset").evaluate(e,{},i).map((t=>t*Ea));const n=[];for(const t of s)n.push(t,Vs(t,r));return new tc(n)}return null}function Gs(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Us(e,i,r,o,n,s,a,l,c,h,u,d){let p=s.textMaxSize.evaluate(i,{});void 0===p&&(p=a);const f=e.layers[0].layout,m=f.get("icon-offset").evaluate(i,{},u),_=Zs(r.horizontal),y=a/24,g=e.tilePixelRatio*y,v=e.tilePixelRatio*p/24,x=e.tilePixelRatio*l,b=e.tilePixelRatio*f.get("symbol-spacing"),w=f.get("text-padding")*e.tilePixelRatio,T=function(t,e,i,r=1){const o=t.get("icon-padding").evaluate(e,{},i),n=o&&o.values;return[n[0]*r,n[1]*r,n[2]*r,n[3]*r]}(f,i,u,e.tilePixelRatio),S=f.get("text-max-angle")/180*Math.PI,P="viewport"!==f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),I="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),C=f.get("symbol-placement"),M=b/2,A=f.get("icon-text-fit");let E;o&&"none"!==A&&(e.allowVerticalPlacement&&r.vertical&&(E=ln(o,r.vertical,A,f.get("icon-text-fit-padding"),m,y)),_&&(o=ln(o,_,A,f.get("icon-text-fit-padding"),m,y)));const z=u?d.line.getGranularityForZoomLevel(u.z):1,D=(l,d)=>{d.x<0||d.x>=Ja||d.y<0||d.y>=Ja||function(e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P){const I=e.addToLineVertexArray(i,r);let C,M,A,E,z=0,D=0,L=0,O=0,R=-1,F=-1;const j={};let B=va("");if(e.allowVerticalPlacement&&o.vertical){const t=l.layout.get("text-rotate").evaluate(b,{},S)+90;A=new km(c,i,h,u,d,o.vertical,p,f,m,t),a&&(E=new km(c,i,h,u,d,a,y,g,m,t))}if(n){const r=l.layout.get("icon-rotate").evaluate(b,{}),o="none"!==l.layout.get("icon-text-fit"),s=zs(n,r,T,o),p=a?zs(a,r,T,o):void 0;M=new km(c,i,h,u,d,n,y,g,!1,r),z=4*s.length;const f=e.iconSizeData;let m=null;"source"===f.kind?(m=[rf*l.layout.get("icon-size").evaluate(b,{})],m[0]>of&&k(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')):"composite"===f.kind&&(m=[rf*w.compositeIconSizes[0].evaluate(b,{},S),rf*w.compositeIconSizes[1].evaluate(b,{},S)],(m[0]>of||m[1]>of)&&k(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')),e.addSymbols(e.icon,s,m,x,v,b,t.aC.none,i,I.lineStartIndex,I.lineLength,-1,S),R=e.icon.placedSymbolArray.length-1,p&&(D=4*p.length,e.addSymbols(e.icon,p,m,x,v,b,t.aC.vertical,i,I.lineStartIndex,I.lineLength,-1,S),F=e.icon.placedSymbolArray.length-1)}const V=Object.keys(o.horizontal);for(const r of V){const n=o.horizontal[r];if(!C){B=va(n.text);const t=l.layout.get("text-rotate").evaluate(b,{},S);C=new km(c,i,h,u,d,n,p,f,m,t)}const a=1===n.positionedLines.length;if(L+=qs(e,i,n,s,l,m,b,_,I,o.vertical?t.aC.horizontal:t.aC.horizontalOnly,a?V:[r],j,R,w,S),a)break}o.vertical&&(O+=qs(e,i,o.vertical,s,l,m,b,_,I,t.aC.vertical,["vertical"],j,F,w,S));const N=C?C.boxStartIndex:e.collisionBoxArray.length,G=C?C.boxEndIndex:e.collisionBoxArray.length,U=A?A.boxStartIndex:e.collisionBoxArray.length,q=A?A.boxEndIndex:e.collisionBoxArray.length,Z=M?M.boxStartIndex:e.collisionBoxArray.length,W=M?M.boxEndIndex:e.collisionBoxArray.length,H=E?E.boxStartIndex:e.collisionBoxArray.length,X=E?E.boxEndIndex:e.collisionBoxArray.length;let Y=-1;const J=(t,e)=>t&&t.circleDiameter?Math.max(t.circleDiameter,e):e;Y=J(C,Y),Y=J(A,Y),Y=J(M,Y),Y=J(E,Y);const K=Y>-1?1:0;K&&(Y*=P/Ea),e.glyphOffsetArray.length>=lf.MAX_GLYPHS&&k("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey);const $=Ns(l,b,S),[Q,tt]=function(e,i){const r=e.length,o=null==i?void 0:i.values;if((null==o?void 0:o.length)>0)for(let i=0;i<o.length;i+=2){const r=o[i+1];e.emplaceBack(t.aS[o[i]],r[0],r[1])}return[r,e.length]}(e.textAnchorOffsets,$);e.symbolInstances.emplaceBack(i.x,i.y,j.right>=0?j.right:-1,j.center>=0?j.center:-1,j.left>=0?j.left:-1,j.vertical||-1,R,F,B,N,G,U,q,Z,W,H,X,h,L,O,z,D,K,0,p,Y,Q,tt)}(e,d,l,r,o,n,E,e.layers[0],e.collisionBoxArray,i.index,i.sourceLayerIndex,e.index,g,[w,w,w,w],P,c,x,T,I,m,i,s,h,u,a)};if("line"===C)for(const t of vs(i.geometry,0,0,Ja,Ja)){const i=eo(t,z),n=ks(i,b,S,r.vertical||_,o,24,v,e.overscaling,Ja);for(const t of n)_&&Ws(e,_.text,M,t)||D(i,t)}else if("line-center"===C){for(const t of i.geometry)if(t.length>1){const e=eo(t,z),i=As(e,S,r.vertical||_,o,24,v);i&&D(e,i)}}else if("Polygon"===i.type)for(const t of Vt(i.geometry,0)){const e=Fs(t,16);D(eo(t[0],z,!0),new Am(e.x,e.y,0))}else if("LineString"===i.type)for(const t of i.geometry){const e=eo(t,z);D(e,new Am(e[0].x,e[0].y,0))}else if("Point"===i.type)for(const t of i.geometry)for(const e of t)D([e],new Am(e.x,e.y,0))}function qs(t,e,r,o,n,s,a,l,c,h,u,d,p,f,m){const _=function(t,e,r,o,n,s,a,l){const c=o.layout.get("text-rotate").evaluate(s,{})*Math.PI/180,h=[];for(const t of e.positionedLines)for(const o of t.positionedGlyphs){if(!o.rect)continue;const s=o.rect||{};let u=4,d=!0,p=1,f=0;const m=(n||l)&&o.vertical,_=o.metrics.advance*o.scale/2;if(l&&e.verticalizable&&(f=t.lineOffset/2-(o.imageName?-(Ea-o.metrics.width*o.scale)/2:(o.scale-1)*Ea)),o.imageName){const t=a[o.imageName];d=t.sdf,p=t.pixelRatio,u=1/p}const y=n?[o.x+_,o.y]:[0,0];let g=n?[0,0]:[o.x+_+r[0],o.y+r[1]-f],v=[0,0];m&&(v=g,g=[0,0]);const x=o.metrics.isDoubleResolution?2:1,b=(o.metrics.left-u)*o.scale-_+g[0],w=(-o.metrics.top-u)*o.scale+g[1],T=b+s.w/x*o.scale/p,S=w+s.h/x*o.scale/p,P=new i(b,w),I=new i(T,w),C=new i(b,S),M=new i(T,S);if(m){const t=new i(-_,_-ef),e=-Math.PI/2,r=Ea/2-_,n=new i(22-r,-(o.imageName?r:0)),s=new i(...v);P._rotateAround(e,t)._add(n)._add(s),I._rotateAround(e,t)._add(n)._add(s),C._rotateAround(e,t)._add(n)._add(s),M._rotateAround(e,t)._add(n)._add(s)}if(c){const t=Math.sin(c),e=Math.cos(c),i=[e,-t,t,e];P._matMult(i),I._matMult(i),C._matMult(i),M._matMult(i)}const A=new i(0,0),k=new i(0,0);h.push({tl:P,tr:I,bl:C,br:M,tex:s,writingMode:e.writingMode,glyphOffset:y,sectionIndex:o.sectionIndex,isSDF:d,pixelOffsetTL:A,pixelOffsetBR:k,minFontScaleX:0,minFontScaleY:0})}return h}(0,r,l,n,s,a,o,t.allowVerticalPlacement),y=t.textSizeData;let g=null;"source"===y.kind?(g=[rf*n.layout.get("text-size").evaluate(a,{})],g[0]>of&&k(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')):"composite"===y.kind&&(g=[rf*f.compositeTextSizes[0].evaluate(a,{},m),rf*f.compositeTextSizes[1].evaluate(a,{},m)],(g[0]>of||g[1]>of)&&k(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')),t.addSymbols(t.text,_,g,l,s,a,h,e,c.lineStartIndex,c.lineLength,p,m);for(const e of u)d[e]=t.text.placedSymbolArray.length-1;return 4*_.length}function Zs(t){for(const e in t)return t[e];return null}function Ws(t,e,i,r){const o=t.compareText;if(e in o){const t=o[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])<i)return!0}else o[e]=[];return o[e].push(r),!1}function Hs(t,e,i,r,o,n){if(o-r<=i)return;const s=r+o>>1;Xs(t,e,s,r,o,n),Hs(t,e,i,r,s-1,1-n),Hs(t,e,i,s+1,o,1-n)}function Xs(t,e,i,r,o,n){for(;o>r;){if(o-r>600){const s=o-r+1,a=i-r+1,l=Math.log(s),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(s-c)/s)*(a-s/2<0?-1:1);Xs(t,e,i,Math.max(r,Math.floor(i-a*c/s+h)),Math.min(o,Math.floor(i+(s-a)*c/s+h)),n)}const s=e[2*i+n];let a=r,l=o;for(Ys(t,e,r,i),e[2*o+n]>s&&Ys(t,e,r,o);a<l;){for(Ys(t,e,a,l),a++,l--;e[2*a+n]<s;)a++;for(;e[2*l+n]>s;)l--}e[2*r+n]===s?Ys(t,e,r,l):(l++,Ys(t,e,l,o)),l<=i&&(r=l+1),i<=l&&(o=l-1)}}function Ys(t,e,i,r){Js(t,i,r),Js(e,2*i,2*r),Js(e,2*i+1,2*r+1)}function Js(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function Ks(t,e,i,r){const o=t-i,n=e-r;return o*o+n*n}var $s,Qs,ta,ea,ia,ra,oa,na,sa,aa,la,ca,ha,ua,da,pa,fa,ma,_a,ya,ga,va,xa,ba,wa,Ta,Sa,Pa,Ia,Ca,Ma,Aa,ka,Ea,za,Da,La,Oa,Ra,Fa,ja,Ba,Va,Na,Ga,Ua,qa,Za,Wa,Ha;let Xa,Ya;"function"==typeof SuppressedError&&SuppressedError,i.prototype={clone(){return new i(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){const e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){const e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){const t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){const e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround(t,e){const i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:i},i.convert=function(t){if(t instanceof i)return t;if(Array.isArray(t))return new i(+t[0],+t[1]);if(void 0!==t.x&&void 0!==t.y)return new i(+t.x,+t.y);throw new Error("Expected [x, y] or {x, y} point format")},ta=function(){function t(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}return Qs||(Qs=1,$s=t,t.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){var i,r,o,n,s,a;if(void 0===e&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(i=t,r=0;r<8;r++){if(o=this.sampleCurveX(i)-t,Math.abs(o)<e)return i;if(n=this.sampleCurveDerivativeX(i),Math.abs(n)<1e-6)break;i-=o/n}for(s=0,a=1,i=t,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-t)<e));r++)t>o?s=i:a=i,i=.5*(a-s)+s;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}}),$s}(),ea=r(ta),ia=1e-6,ra="undefined"!=typeof Float32Array?Float32Array:Array,oa="zyx",na=function(t,e,i,r,o){var n,s=1/Math.tan(e/2);return t[0]=s/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(t[10]=(o+r)*(n=1/(r-o)),t[14]=2*o*r*n):(t[10]=-1,t[14]=-2*r),t},sa=function(t,e,i,r,o,n,s){var a=1/(e-i),l=1/(r-o),c=1/(n-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+i)*a,t[13]=(o+r)*l,t[14]=(s+n)*c,t[15]=1,t},aa=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t},la=c,l(),ca=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t[3]=e[3]*i[3],t},Ha=new ra(4),ra!=Float32Array&&(Ha[0]=0,Ha[1]=0,Ha[2]=0,Ha[3]=0),l(),h(1,0,0),h(0,1,0),m(),m(),s(),ha=function(t){var e=t[0],i=t[1];return e*e+i*i},y();const Ja=8192,Ka=T(.25,.1,.25,1);let $a=1;const Qa={};let tl=null;const el="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let il,rl;const ol={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},nl={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},sl={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:"",API_KEY:void 0,SERVER_URL:"https://api.maptec.com",SERVER_VERSION:"v1"},al="AbortError";class ll extends Error{constructor(t=al){super(t instanceof Error?t.message:t),this.name=al,t instanceof Error&&t.stack&&(this.stack=t.stack)}}const cl="global-dispatcher";class hl extends Error{constructor(t,e,i,r){super("AJAXError: "+e+" ("+t+"): "+i),this.status=t,this.statusText=e,this.url=i,this.body=r}}const ul=()=>z(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,dl=function(t,i){if(/:\/\//.test(t.url)&&!/^https?:|^file:/.test(t.url)){const e=B(t.url);if(e)return e(t,i);if(z(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:cl},i)}if(!(/^file:/.test(r=t.url)||/^file:/.test(ul())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(t,i){return e(this,void 0,void 0,(function*(){const e=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:ul(),signal:i.signal});let r,o;"json"!==t.type||e.headers.has("Accept")||e.headers.set("Accept","application/json");try{r=yield fetch(e)}catch(e){if(j(e))throw e;throw new hl(0,e.message,t.url,new Blob)}if(!r.ok){const e=yield r.blob();throw new hl(r.status,r.statusText,t.url,e)}o="arrayBuffer"===t.type||"image"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text();const n=yield o;return i.signal.throwIfAborted(),{data:n,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires")}}))}(t,i);if(z(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:cl},i)}var r,o,n;return o=t,n=i,new Promise(((t,e)=>{var i;const r=new XMLHttpRequest;r.open(o.method||"GET",o.url,!0),"arrayBuffer"!==o.type&&"image"!==o.type||(r.responseType="arraybuffer");for(const t in o.headers)r.setRequestHeader(t,o.headers[t]);"json"===o.type&&(r.responseType="text",(null===(i=o.headers)||void 0===i?void 0:i.Accept)||r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===o.credentials,r.onerror=()=>{e(new Error(r.statusText))},r.onload=()=>{if(!n.signal.aborted)if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){let i=r.response;if("json"===o.type)try{i=JSON.parse(r.response)}catch(t){return void e(t)}t({data:i,cacheControl:r.getResponseHeader("Cache-Control"),expires:r.getResponseHeader("Expires")})}else{const t=new Blob([r.response],{type:r.getResponseHeader("Content-Type")});e(new hl(r.status,r.statusText,o.url,t))}},n.signal.addEventListener("abort",(()=>{r.abort(),e(new ll(n.signal.reason))})),r.send(o.body)}))};class pl{constructor(t,e={}){I(this,e),this.type=t}}class fl extends pl{constructor(t,e={}){super("error",I({error:t},e))}}class ml{on(t,e){return this._listeners=this._listeners||{},G(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return U(t,e,this._listeners),U(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},G(t,e,this._oneTimeListeners),this):new Promise((e=>this.once(t,e)))}fire(t,e){"string"==typeof t&&(t=new pl(t,e||{}));const i=t.type;if(this.listens(i)){t.target=this;const e=this._listeners&&this._listeners[i]?this._listeners[i].slice():[];for(const i of e)i.call(this,t);const r=this._oneTimeListeners&&this._oneTimeListeners[i]?this._oneTimeListeners[i].slice():[];for(const e of r)U(i,e,this._oneTimeListeners),e.call(this,t);const o=this._eventedParent;o&&(I(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),o.fire(t))}else t instanceof fl&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}class _l extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class yl{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,i]of e)this.bindings[t]=i}concat(t){return new yl(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const gl={kind:"null"},vl={kind:"number"},xl={kind:"string"},bl={kind:"boolean"},wl={kind:"color"},Tl={kind:"projectionDefinition"},Sl={kind:"object"},Pl={kind:"value"},Il={kind:"collator"},Cl={kind:"formatted"},Ml={kind:"padding"},Al={kind:"colorArray"},kl={kind:"numberArray"},El={kind:"resolvedImage"},zl={kind:"variableAnchorOffsetCollection"},Dl=[gl,vl,xl,bl,wl,Tl,Cl,Sl,Z(Pl),Ml,kl,Al,El,zl],Ll=.96422,Ol=.82521,Rl=4/29,Fl=6/29,jl=3*Fl*Fl,Bl=Fl*Fl*Fl,Vl=Math.PI/180,Nl=180/Math.PI,Gl=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Ul={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};let ql=class t{constructor(t,e,i,r=1,o=!0){this.r=t,this.g=e,this.b=i,this.a=r,o||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[t,e,i,r]))}static parse(e){if(e instanceof t)return e;if("string"!=typeof e)return;const i=function(t){if("transparent"===(t=t.toLowerCase().trim()))return[0,0,0,0];const e=ot(Ul,t);if(e){const[t,i,r]=e;return[t/255,i/255,r/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){const e=t.length<6?1:2;let i=1;return[nt(t.slice(i,i+=e)),nt(t.slice(i,i+=e)),nt(t.slice(i,i+=e)),nt(t.slice(i,i+e)||"ff")]}if(t.startsWith("rgb")){const e=t.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(e){const[t,i,r,o,n,s,a,l,c,h,u,d]=e,p=[o||" ",a||" ",h].join("");if(" "===p||" /"===p||",,"===p||",,,"===p){const t=[r,s,c].join(""),e="%%%"===t?100:""===t?255:0;if(e){const t=[at(+i/e,0,1),at(+n/e,0,1),at(+l/e,0,1),u?st(+u,d):1];if(lt(t))return t}}return}}const i=t.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){const[t,e,r,o,n,s,a,l,c]=i,h=[r||" ",n||" ",a].join("");if(" "===h||" /"===h||",,"===h||",,,"===h){const t=[+e,at(+o,0,100),at(+s,0,100),l?st(+l,c):1];if(lt(t))return function([t,e,i,r]){function o(r){const o=(r+t/30)%12,n=e*Math.min(i,1-i);return i-n*Math.max(-1,Math.min(o-3,9-o,1))}return t=K(t),e/=100,i/=100,[o(0),o(8),o(4),r]}(t)}}}(e);return i?new t(...i,!1):void 0}get rgb(){const{r:t,g:e,b:i,a:r}=this,o=r||1/0;return this.overwriteGetter("rgb",[t/o,e/o,i/o,r])}get hcl(){return this.overwriteGetter("hcl",function(t){const[e,i,r,o]=$(t),n=Math.sqrt(i*i+r*r);return[Math.round(1e4*n)?K(Math.atan2(r,i)*Nl):NaN,n,e,o]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$(this.rgb))}overwriteGetter(t,e){return Object.defineProperty(this,t,{value:e}),e}toString(){const[t,e,i,r]=this.rgb;return"rgba("+[t,e,i].map((t=>Math.round(255*t))).join(",")+","+r+")"}static interpolate(e,i,r,o="rgb"){switch(o){case"rgb":{const[o,n,s,a]=ht(e.rgb,i.rgb,r);return new t(o,n,s,a,!1)}case"hcl":{const[o,n,s,a]=e.hcl,[l,c,h,u]=i.hcl;let d,p;if(isNaN(o)||isNaN(l))isNaN(o)?isNaN(l)?d=NaN:(d=l,1!==s&&0!==s||(p=c)):(d=o,1!==h&&0!==h||(p=n));else{let t=l-o;l>o&&t>180?t-=360:l<o&&o-l>180&&(t+=360),d=o+r*t}const[f,m,_,y]=function([t,e,i,r]){return t=isNaN(t)?0:t*Vl,et([i,Math.cos(t)*e,Math.sin(t)*e,r])}([d,null!=p?p:ct(n,c,r),ct(s,h,r),ct(a,u,r)]);return new t(f,m,_,y,!1)}case"lab":{const[o,n,s,a]=et(ht(e.lab,i.lab,r));return new t(o,n,s,a,!1)}}}};ql.black=new ql(0,0,0,1),ql.white=new ql(1,1,1,1),ql.transparent=new ql(0,0,0,0),ql.red=new ql(1,0,0,1);class Zl{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Wl=["bottom","center","top"];class Hl{constructor(t,e,i,r,o,n){this.text=t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=o,this.verticalAlign=n}}class Xl{constructor(t){this.sections=t}static fromString(t){return new Xl([new Hl(t,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof Xl?t:Xl.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}}class Yl{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Yl)return t;if("number"==typeof t)return new Yl([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Yl(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i){return new Yl(ht(t.values,e.values,i))}}class Jl{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Jl)return t;if("number"==typeof t)return new Jl([t]);if(Array.isArray(t)){for(const e of t)if("number"!=typeof e)return;return new Jl(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i){return new Jl(ht(t.values,e.values,i))}}class Kl{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Kl)return t;if("string"==typeof t){const e=ql.parse(t);if(!e)return;return new Kl([e])}if(!Array.isArray(t))return;const e=[];for(const i of t){if("string"!=typeof i)return;const t=ql.parse(i);if(!t)return;e.push(t)}return new Kl(e)}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i,r="rgb"){const o=[];if(t.values.length!=e.values.length)throw new Error("colorArray: Arrays have mismatched length ("+t.values.length+" vs. "+e.values.length+"), cannot interpolate.");for(let n=0;n<t.values.length;n++)o.push(ql.interpolate(t.values[n],e.values[n],i,r));return new Kl(o)}}class $l extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const Ql=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class tc{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof tc)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let e=0;e<t.length;e+=2){const i=t[e],r=t[e+1];if("string"!=typeof i||!Ql.has(i))return;if(!Array.isArray(r)||2!==r.length||"number"!=typeof r[0]||"number"!=typeof r[1])return}return new tc(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,e,i){const r=t.values,o=e.values;if(r.length!==o.length)throw new $l("Cannot interpolate values of different length. from: "+t.toString()+", to: "+e.toString());const n=[];for(let t=0;t<r.length;t+=2){if(r[t]!==o[t])throw new $l("Cannot interpolate values containing mismatched anchors. from["+t+"]: "+r[t]+", to["+t+"]: "+o[t]);n.push(r[t]);const[e,s]=r[t+1],[a,l]=o[t+1];n.push([ct(e,a,i),ct(s,l,i)])}return new tc(n)}}class ec{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new ec({name:t,available:!1}):null}}class ic{constructor(t,e,i){this.from=t,this.to=e,this.transition=i}static interpolate(t,e,i){return new ic(t,e,i)}static parse(t){return t instanceof ic?t:Array.isArray(t)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]?new ic(t[0],t[1],t[2]):"object"==typeof t&&"string"==typeof t.from&&"string"==typeof t.to&&"number"==typeof t.transition?new ic(t.from,t.to,t.transition):"string"==typeof t?new ic(t,t,1):void 0}}class rc{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!dt(t[1]))return e.error("invalid value");const i=t[1];let r=pt(i);const o=e.expectedType;return"array"!==r.kind||0!==r.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(r=o),new rc(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const oc={string:xl,number:vl,boolean:bl,object:Sl};class nc{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i,r=1;const o=t[0];if("array"===o){let o,n;if(t.length>2){const i=t[1];if("string"!=typeof i||!(i in oc)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=oc[i],r++}else o=Pl;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);n=t[2],r++}i=Z(o,n)}else{if(!oc[o])throw new Error("Types doesn't contain name = "+o);i=oc[o]}const n=[];for(;r<t.length;r++){const i=e.parse(t[r],r,Pl);if(!i)return null;n.push(i)}return new nc(i,n)}evaluate(t){for(let e=0;e<this.args.length;e++){const i=this.args[e].evaluate(t);if(!H(this.type,pt(i)))return i;if(e===this.args.length-1)throw new $l("Expected value to be of type "+W(this.type)+", but found "+W(pt(i))+" instead.")}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const sc={"to-boolean":bl,"to-color":wl,"to-number":vl,"to-string":xl};class ac{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(!sc[i])throw new Error("Can't parse "+i+" as it is not part of the known types");if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const r=sc[i],o=[];for(let i=1;i<t.length;i++){const r=e.parse(t[i],i,Pl);if(!r)return null;o.push(r)}return new ac(r,o)}evaluate(t){switch(this.type.kind){case"boolean":return Boolean(this.args[0].evaluate(t));case"color":{let e,i;for(const r of this.args){if(e=r.evaluate(t),i=null,e instanceof ql)return e;if("string"==typeof e){const i=t.parseColor(e);if(i)return i}else if(Array.isArray(e)&&(i=e.length<3||e.length>4?"Invalid rgba value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ut(e[0],e[1],e[2],e[3]),!i))return new ql(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new $l(i||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}case"padding":{let e;for(const i of this.args){e=i.evaluate(t);const r=Yl.parse(e);if(r)return r}throw new $l("Could not parse padding from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}case"numberArray":{let e;for(const i of this.args){e=i.evaluate(t);const r=Jl.parse(e);if(r)return r}throw new $l("Could not parse numberArray from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}case"colorArray":{let e;for(const i of this.args){e=i.evaluate(t);const r=Kl.parse(e);if(r)return r}throw new $l("Could not parse colorArray from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}case"variableAnchorOffsetCollection":{let e;for(const i of this.args){e=i.evaluate(t);const r=tc.parse(e);if(r)return r}throw new $l("Could not parse variableAnchorOffsetCollection from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}case"number":{let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const r=Number(e);if(!isNaN(r))return r}throw new $l("Could not convert "+JSON.stringify(e)+" to number.")}case"formatted":return Xl.fromString(ft(this.args[0].evaluate(t)));case"resolvedImage":return ec.fromString(ft(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return ft(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const lc=["Unknown","Point","LineString","Polygon"];class cc{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?lc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache.get(t);return e||(e=ql.parse(t),this._parseColorCache.set(t,e)),e}}class hc{constructor(t,e,i=[],r,o=new yl,n=[]){this.registry=t,this.path=i,this.key=i.map((t=>"["+t+"]")).join(""),this.scope=o,this.errors=n,this.expectedType=r,this._isConstant=e}parse(t,e,i,r,o={}){return e?this.concat(e,i,r)._parse(t,o):this._parse(t,o)}_parse(t,e){function i(t,e,i){return"assert"===i?new nc(e,[t]):"coerce"===i?new ac(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;const o=this.registry[r];if(o){let r=o.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,o=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==o.kind){if("projectionDefinition"===t.kind&&["string","array"].includes(o.kind)||["color","formatted","resolvedImage"].includes(t.kind)&&["value","string"].includes(o.kind)||["padding","numberArray"].includes(t.kind)&&["value","number","array"].includes(o.kind)||"colorArray"===t.kind&&["value","string","array"].includes(o.kind)||"variableAnchorOffsetCollection"===t.kind&&["value","array"].includes(o.kind))r=i(r,t,e.typeAnnotation||"coerce");else if(this.checkSubtype(t,o))return null}else r=i(r,t,e.typeAnnotation||"assert")}if(!(r instanceof rc)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){const t=new cc;try{r=new rc(r.type,r.evaluate(t))}catch(t){return this.error(t.message),null}}return r}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")}concat(t,e,i){const r="number"==typeof t?this.path.concat(t):this.path,o=i?this.scope.concat(i):this.scope;return new hc(this.registry,this._isConstant,r,e||null,o,this.errors)}error(t,...e){const i=""+this.key+e.map((t=>"["+t+"]")).join("");this.errors.push(new _l(i,t))}checkSubtype(t,e){const i=H(t,e);return i&&this.error(i),i}}class uc{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");const i=[];for(let r=1;r<t.length-1;r+=2){const o=t[r];if("string"!=typeof o)return e.error("Expected string, but found "+typeof o+" instead.",r);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);const n=e.parse(t[r+1],r+1);if(!n)return null;i.push([o,n])}const r=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return r?new uc(i,r):null}outputDefined(){return this.result.outputDefined()}}class dc{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const i=t[1];return e.scope.has(i)?new dc(i,e.scope.get(i)):e.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class pc{constructor(t,e,i){this.type=t,this.index=e,this.input=i}static parse(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");const i=e.parse(t[1],1,vl),r=e.parse(t[2],2,Z(e.expectedType||Pl));return i&&r?new pc(r.type.itemType,i,r):null}evaluate(t){const e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new $l("Array index out of bounds: "+e+" < 0.");if(e>=i.length)throw new $l("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new $l("Array index must be an integer, but found "+e+" instead.");return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class fc{constructor(t,e){this.type=bl,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");const i=e.parse(t[1],1,Pl),r=e.parse(t[2],2,Pl);return i&&r?X(i.type,[bl,xl,vl,gl,Pl])?new fc(i,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+W(i.type)+" instead"):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!Y(e,["boolean","string","number","null"]))throw new $l("Expected first argument to be of type boolean, string, number or null, but found "+W(pt(e))+" instead.");if(!Y(i,["string","array"]))throw new $l("Expected second argument to be of type array or string, but found "+W(pt(i))+" instead.");return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class mc{constructor(t,e,i){this.type=vl,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 2 or 3 arguments, but found "+(t.length-1)+" instead.");const i=e.parse(t[1],1,Pl),r=e.parse(t[2],2,Pl);if(!i||!r)return null;if(!X(i.type,[bl,xl,vl,gl,Pl]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+W(i.type)+" instead");if(4===t.length){const o=e.parse(t[3],3,vl);return o?new mc(i,r,o):null}return new mc(i,r)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Y(e,["boolean","string","number","null"]))throw new $l("Expected first argument to be of type boolean, string, number or null, but found "+W(pt(e))+" instead.");let r;if(this.fromIndex&&(r=this.fromIndex.evaluate(t)),Y(i,["string"])){const t=i.indexOf(e,r);return-1===t?-1:[...i.slice(0,t)].length}if(Y(i,["array"]))return i.indexOf(e,r);throw new $l("Expected second argument to be of type array or string, but found "+W(pt(i))+" instead.")}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class _c{constructor(t,e,i,r,o,n){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=o,this.otherwise=n}static parse(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const o={},n=[];for(let s=2;s<t.length-1;s+=2){let a=t[s];const l=t[s+1];Array.isArray(a)||(a=[a]);const c=e.concat(s);if(0===a.length)return c.error("Expected at least one branch label.");for(const t of a){if("number"!=typeof t&&"string"!=typeof t)return c.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof t&&Math.floor(t)!==t)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,pt(t)))return null}else i=pt(t);if(void 0!==o[String(t)])return c.error("Branch labels must be unique.");o[String(t)]=n.length}const h=e.parse(l,s,r);if(!h)return null;r=r||h.type,n.push(h)}const s=e.parse(t[1],1,Pl);if(!s)return null;const a=e.parse(t[t.length-1],t.length-1,r);return a?"value"!==s.type.kind&&e.concat(1).checkSubtype(i,s.type)?null:new _c(i,r,s,o,n,a):null}evaluate(t){const e=this.input.evaluate(t);return(pt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}}class yc{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const r=[];for(let o=1;o<t.length-1;o+=2){const n=e.parse(t[o],o,bl);if(!n)return null;const s=e.parse(t[o+1],o+1,i);if(!s)return null;r.push([n,s]),i=i||s.type}const o=e.parse(t[t.length-1],t.length-1,i);if(!o)return null;if(!i)throw new Error("Can't infer output type");return new yc(i,r,o)}evaluate(t){for(const[e,i]of this.branches)if(e.evaluate(t))return i.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,i]of this.branches)t(e),t(i);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}}class gc{constructor(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 2 or 3 arguments, but found "+(t.length-1)+" instead.");const i=e.parse(t[1],1,Pl),r=e.parse(t[2],2,vl);if(!i||!r)return null;if(!X(i.type,[Z(Pl),xl,Pl]))return e.error("Expected first argument to be of type array or string, but found "+W(i.type)+" instead");if(4===t.length){const o=e.parse(t[3],3,vl);return o?new gc(i.type,i,r,o):null}return new gc(i.type,i,r)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);let r;if(this.endIndex&&(r=this.endIndex.evaluate(t)),Y(e,["string"]))return[...e].slice(i,r).join("");if(Y(e,["array"]))return e.slice(i,r);throw new $l("Expected first argument to be of type array or string, but found "+W(pt(e))+" instead.")}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}class vc{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,vl);if(!i)return null;const r=[];let o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType);for(let i=1;i<t.length;i+=2){const n=1===i?-1/0:t[i],s=t[i+1],a=i,l=i+1;if("number"!=typeof n)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(r.length&&r[r.length-1][0]>=n)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const c=e.parse(s,l,o);if(!c)return null;o=o||c.type,r.push([n,c])}return new vc(o,i,r)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const o=e.length;return r>=e[o-1]?i[o-1].evaluate(t):i[mt(e,r)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}class xc{constructor(t,e,i,r,o){this.type=t,this.operator=e,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[t,e]of o)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,i,r){let o=0;if("exponential"===t.name)o=_t(e,t.base,i,r);else if("linear"===t.name)o=_t(e,1,i,r);else if("cubic-bezier"===t.name){const n=t.controlPoints;o=new ea(n[0],n[1],n[2],n[3]).solve(_t(e,1,i,r))}return o}static parse(t,e){let[i,r,o,...n]=t;if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const t=r[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:t}}else{if("cubic-bezier"!==r[0])return e.error("Unknown interpolation type "+String(r[0]),1,0);{const t=r.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,vl),!o)return null;const s=[];let a=null;"interpolate-hcl"!==i&&"interpolate-lab"!==i||e.expectedType==Al?e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType):a=wl;for(let t=0;t<n.length;t+=2){const i=n[t],r=n[t+1],o=t+3,l=t+4;if("number"!=typeof i)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',o);if(s.length&&s[s.length-1][0]>=i)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);const c=e.parse(r,l,a);if(!c)return null;a=a||c.type,s.push([i,c])}return J(a,vl)||J(a,Tl)||J(a,wl)||J(a,Ml)||J(a,kl)||J(a,Al)||J(a,zl)||J(a,Z(vl))?new xc(a,i,r,o,s):e.error("Type "+W(a)+" is not interpolatable.")}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const o=e.length;if(r>=e[o-1])return i[o-1].evaluate(t);const n=mt(e,r),s=xc.interpolationFactor(this.interpolation,r,e[n],e[n+1]),a=i[n].evaluate(t),l=i[n+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ct(a,l,s);case"color":return ql.interpolate(a,l,s);case"padding":return Yl.interpolate(a,l,s);case"colorArray":return Kl.interpolate(a,l,s);case"numberArray":return Jl.interpolate(a,l,s);case"variableAnchorOffsetCollection":return tc.interpolate(a,l,s);case"array":return ht(a,l,s);case"projectionDefinition":return ic.interpolate(a,l,s)}case"interpolate-hcl":switch(this.type.kind){case"color":return ql.interpolate(a,l,s,"hcl");case"colorArray":return Kl.interpolate(a,l,s,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ql.interpolate(a,l,s,"lab");case"colorArray":return Kl.interpolate(a,l,s,"lab")}}}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}const bc={color:ql.interpolate,number:ct,padding:Yl.interpolate,numberArray:Jl.interpolate,colorArray:Kl.interpolate,variableAnchorOffsetCollection:tc.interpolate,array:ht};class wc{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i=null;const r=e.expectedType;r&&"value"!==r.kind&&(i=r);const o=[];for(const r of t.slice(1)){const t=e.parse(r,1+o.length,i,void 0,{typeAnnotation:"omit"});if(!t)return null;i=i||t.type,o.push(t)}if(!i)throw new Error("No output type");const n=r&&o.some((t=>H(r,t.type)));return new wc(n?Pl:i,o)}evaluate(t){let e,i=null,r=0;for(const o of this.args)if(r++,i=o.evaluate(t),i&&i instanceof ec&&!i.available&&(e||(e=i.name),i=null,r===this.args.length&&(i=e)),null!==i)break;return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Tc=vt("==",(function(t,e,i){return e===i}),gt),Sc=vt("!=",(function(t,e,i){return e!==i}),(function(t,e,i,r){return!gt(0,e,i,r)})),Pc=vt("<",(function(t,e,i){return e<i}),(function(t,e,i,r){return r.compare(e,i)<0})),Ic=vt(">",(function(t,e,i){return e>i}),(function(t,e,i,r){return r.compare(e,i)>0})),Cc=vt("<=",(function(t,e,i){return e<=i}),(function(t,e,i,r){return r.compare(e,i)<=0})),Mc=vt(">=",(function(t,e,i){return e>=i}),(function(t,e,i,r){return r.compare(e,i)>=0}));class Ac{constructor(t,e,i){this.type=Il,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");const r=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,bl);if(!r)return null;const o=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,bl);if(!o)return null;let n=null;return i.locale&&(n=e.parse(i.locale,1,xl),!n)?null:new Ac(r,o,n)}evaluate(t){return new Zl(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class kc{constructor(t,e,i,r,o){this.type=xl,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=o}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,vl);if(!i)return null;const r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");let o=null;if(r.locale&&(o=e.parse(r.locale,1,xl),!o))return null;let n=null;if(r.currency&&(n=e.parse(r.currency,1,xl),!n))return null;let s=null;if(r["min-fraction-digits"]&&(s=e.parse(r["min-fraction-digits"],1,vl),!s))return null;let a=null;return r["max-fraction-digits"]&&(a=e.parse(r["max-fraction-digits"],1,vl),!a)?null:new kc(i,o,n,s,a)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class Ec{constructor(t){this.type=Cl,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const r=[];let o=!1;for(let i=1;i<=t.length-1;++i){const n=t[i];if(o&&"object"==typeof n&&!Array.isArray(n)){o=!1;let t=null;if(n["font-scale"]&&(t=e.parse(n["font-scale"],1,vl),!t))return null;let i=null;if(n["text-font"]&&(i=e.parse(n["text-font"],1,Z(xl)),!i))return null;let s=null;if(n["text-color"]&&(s=e.parse(n["text-color"],1,wl),!s))return null;let a=null;if(n["vertical-align"]){if("string"==typeof n["vertical-align"]&&!Wl.includes(n["vertical-align"]))return e.error("'vertical-align' must be one of: 'bottom', 'center', 'top' but found '"+n["vertical-align"]+"' instead.");if(a=e.parse(n["vertical-align"],1,xl),!a)return null}const l=r[r.length-1];l.scale=t,l.font=i,l.textColor=s,l.verticalAlign=a}else{const n=e.parse(t[i],1,Pl);if(!n)return null;const s=n.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Ec(r)}evaluate(t){return new Xl(this.sections.map((e=>{const i=e.content.evaluate(t);return pt(i)===El?new Hl("",i,null,null,null,e.verticalAlign?e.verticalAlign.evaluate(t):null):new Hl(ft(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null,e.verticalAlign?e.verticalAlign.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor),e.verticalAlign&&t(e.verticalAlign)}outputDefined(){return!1}}class zc{constructor(t){this.type=El,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,xl);return i?new zc(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=ec.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}}class Dc{constructor(t){this.type=vl,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error("Expected argument of type string or array, but found "+W(i.type)+" instead."):new Dc(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return[...e].length;if(Array.isArray(e))return e.length;throw new $l("Expected value to be of type string or array, but found "+W(pt(e))+" instead.")}eachChild(t){t(this.input)}outputDefined(){return!1}}const Lc=8192;class Oc{constructor(t,e){this.type=bl,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(dt(t[1])){const e=t[1];if("FeatureCollection"===e.type){const t=[];for(const i of e.features){const{type:e,coordinates:r}=i.geometry;"Polygon"===e&&t.push(r),"MultiPolygon"===e&&t.push(...r)}if(t.length)return new Oc(e,{type:"MultiPolygon",coordinates:t})}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new Oc(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new Oc(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],o=t.canonicalID();if("Polygon"===e.type){const n=zt(e.coordinates,r,o),s=Ot(t.geometry(),i,r,o);if(!Tt(i,r))return!1;for(const t of s)if(!Ct(t,n))return!1}if("MultiPolygon"===e.type){const n=Dt(e.coordinates,r,o),s=Ot(t.geometry(),i,r,o);if(!Tt(i,r))return!1;for(const t of s)if(!Mt(t,n))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],o=t.canonicalID();if("Polygon"===e.type){const n=zt(e.coordinates,r,o),s=Rt(t.geometry(),i,r,o);if(!Tt(i,r))return!1;for(const t of s)if(!At(t,n))return!1}if("MultiPolygon"===e.type){const n=Dt(e.coordinates,r,o),s=Rt(t.geometry(),i,r,o);if(!Tt(i,r))return!1;for(const t of s)if(!kt(t,n))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Rc{constructor(t=[],e=(t,e)=>t<e?-1:t>e?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:i}=this,r=e[t];for(;t>0;){const o=t-1>>1,n=e[o];if(i(r,n)>=0)break;e[t]=n,t=o}e[t]=r}_down(t){const{data:e,compare:i}=this,r=this.length>>1,o=e[t];for(;t<r;){let r=1+(t<<1);const n=r+1;if(n<this.length&&i(e[n],e[r])<0&&(r=n),i(e[r],o)>=0)break;e[t]=e[r],t=r}e[t]=o}}const Fc=.0066943799901413165,jc=Math.PI/180;class Bc{constructor(t){const e=6378.137*jc*1e3,i=Math.cos(t*jc),r=1/(1-Fc*(1-i*i)),o=Math.sqrt(r);this.kx=e*o*i,this.ky=e*o*r*(1-Fc)}distance(t,e){const i=this.wrap(t[0]-e[0])*this.kx,r=(t[1]-e[1])*this.ky;return Math.sqrt(i*i+r*r)}pointOnLine(t,e){let i,r,o,n,s=1/0;for(let a=0;a<t.length-1;a++){let l=t[a][0],c=t[a][1],h=this.wrap(t[a+1][0]-l)*this.kx,u=(t[a+1][1]-c)*this.ky,d=0;0===h&&0===u||(d=(this.wrap(e[0]-l)*this.kx*h+(e[1]-c)*this.ky*u)/(h*h+u*u),d>1?(l=t[a+1][0],c=t[a+1][1]):d>0&&(l+=h/this.kx*d,c+=u/this.ky*d)),h=this.wrap(e[0]-l)*this.kx,u=(e[1]-c)*this.ky;const p=h*h+u*u;p<s&&(s=p,i=l,r=c,o=a,n=d)}return{point:[i,r],index:o,t:Math.max(0,Math.min(1,n))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}class Vc{constructor(t,e){this.type=vl,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error("'distance' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(dt(t[1])){const e=t[1];if("FeatureCollection"===e.type)return new Vc(e,e.features.map((t=>ce(t.geometry))).flat());if("Feature"===e.type)return new Vc(e,ce(e.geometry));if("type"in e&&"coordinates"in e)return new Vc(e,ce(e))}return e.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=t.geometry(),r=i.flat().map((e=>bt([e.x,e.y],t.canonical)));if(0===i.length)return NaN;const o=new Bc(r[0][1]);let n=1/0;for(const t of e){switch(t.type){case"Point":n=Math.min(n,le(r,!1,[t.coordinates],!1,o,n));break;case"LineString":n=Math.min(n,le(r,!1,t.coordinates,!0,o,n));break;case"Polygon":n=Math.min(n,ae(r,!1,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=t.geometry(),r=i.flat().map((e=>bt([e.x,e.y],t.canonical)));if(0===i.length)return NaN;const o=new Bc(r[0][1]);let n=1/0;for(const t of e){switch(t.type){case"Point":n=Math.min(n,le(r,!0,[t.coordinates],!1,o,n));break;case"LineString":n=Math.min(n,le(r,!0,t.coordinates,!0,o,n));break;case"Polygon":n=Math.min(n,ae(r,!0,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries);if("Polygon"===t.geometryType())return function(t,e){const i=t.geometry();if(0===i.length||0===i[0].length)return NaN;const r=Vt(i,0).map((e=>e.map((e=>e.map((e=>bt([e.x,e.y],t.canonical))))))),o=new Bc(r[0][0][0][1]);let n=1/0;for(const t of e)for(const e of r){switch(t.type){case"Point":n=Math.min(n,ae([t.coordinates],!1,e,o,n));break;case"LineString":n=Math.min(n,ae(t.coordinates,!0,e,o,n));break;case"Polygon":n=Math.min(n,oe(e,t.coordinates,o,n))}if(0===n)return n}return n}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Nc{constructor(t){this.type=Pl,this.key=t}static parse(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");const i=t[1];return null==i?e.error("Global state property must be defined."):"string"!=typeof i?e.error("Global state property must be string, but found "+typeof t[1]+" instead."):new Nc(i)}evaluate(t){var e;const i=null===(e=t.globals)||void 0===e?void 0:e.globalState;return i&&0!==Object.keys(i).length?ot(i,this.key):null}eachChild(){}outputDefined(){return!1}}const Gc={"==":Tc,"!=":Sc,">":Ic,"<":Pc,">=":Mc,"<=":Cc,array:nc,at:pc,boolean:nc,case:yc,coalesce:wc,collator:Ac,format:Ec,image:zc,in:fc,"index-of":mc,interpolate:xc,"interpolate-hcl":xc,"interpolate-lab":xc,length:Dc,let:uc,literal:rc,match:_c,number:nc,"number-format":kc,object:nc,slice:gc,step:vc,string:nc,"to-boolean":ac,"to-color":ac,"to-number":ac,"to-string":ac,var:dc,within:Oc,distance:Vc,"global-state":Nc};class Uc{constructor(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,e){const i=t[0],r=Uc.definitions[i];if(!r)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);const o=Array.isArray(r)?r[0]:r.type,n=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=n.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let a=null;for(const[r,n]of s){a=new hc(e.registry,fe,e.path,null,e.scope);const s=[];let l=!1;for(let e=1;e<t.length;e++){const i=t[e],o=Array.isArray(r)?r[e-1]:r.type,n=a.parse(i,1+s.length,o);if(!n){l=!0;break}s.push(n)}if(!l)if(Array.isArray(r)&&r.length!==s.length)a.error("Expected "+r.length+" arguments, but found "+s.length+" instead.");else{for(let t=0;t<s.length;t++){const e=Array.isArray(r)?r[t]:r.type,i=s[t];a.concat(t+1).checkSubtype(e,i.type)}if(0===a.errors.length)return new Uc(i,o,n,s)}}if(1===s.length)e.errors.push(...a.errors);else{const i=(s.length?s:n).map((([t])=>{return e=t,Array.isArray(e)?"("+e.map(W).join(", ")+")":"("+W(e.type)+"...)";var e})).join(" | "),r=[];for(let i=1;i<t.length;i++){const o=e.parse(t[i],1+r.length);if(!o)return null;r.push(W(o.type))}e.error("Expected arguments of type "+i+", but found ("+r.join(", ")+") instead.")}return null}static register(t,e){Uc.definitions=e;for(const i in e)t[i]=Uc}}Uc.register(Gc,{error:[{kind:"error"},[xl],(t,[e])=>{throw new $l(e.evaluate(t))}],typeof:[xl,[Pl],(t,[e])=>W(pt(e.evaluate(t)))],"to-rgba":[Z(vl,4),[wl],(t,[e])=>{const[i,r,o,n]=e.evaluate(t).rgb;return[255*i,255*r,255*o,n]}],rgb:[wl,[vl,vl,vl],he],rgba:[wl,[vl,vl,vl,vl],he],has:{type:bl,overloads:[[[xl],(t,[e])=>ue(e.evaluate(t),t.properties())],[[xl,Sl],(t,[e,i])=>ue(e.evaluate(t),i.evaluate(t))]]},get:{type:Pl,overloads:[[[xl],(t,[e])=>de(e.evaluate(t),t.properties())],[[xl,Sl],(t,[e,i])=>de(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Pl,[xl],(t,[e])=>de(e.evaluate(t),t.featureState||{})],properties:[Sl,[],t=>t.properties()],"geometry-type":[xl,[],t=>t.geometryType()],id:[Pl,[],t=>t.id()],zoom:[vl,[],t=>t.globals.zoom],"heatmap-density":[vl,[],t=>t.globals.heatmapDensity||0],elevation:[vl,[],t=>t.globals.elevation||0],"line-progress":[vl,[],t=>t.globals.lineProgress||0],accumulated:[Pl,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[vl,pe(vl),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[vl,pe(vl),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:vl,overloads:[[[vl,vl],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[vl],(t,[e])=>-e.evaluate(t)]]},"/":[vl,[vl,vl],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[vl,[vl,vl],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[vl,[],()=>Math.LN2],pi:[vl,[],()=>Math.PI],e:[vl,[],()=>Math.E],"^":[vl,[vl,vl],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[vl,[vl],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[vl,[vl],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[vl,[vl],(t,[e])=>Math.log(e.evaluate(t))],log2:[vl,[vl],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[vl,[vl],(t,[e])=>Math.sin(e.evaluate(t))],cos:[vl,[vl],(t,[e])=>Math.cos(e.evaluate(t))],tan:[vl,[vl],(t,[e])=>Math.tan(e.evaluate(t))],asin:[vl,[vl],(t,[e])=>Math.asin(e.evaluate(t))],acos:[vl,[vl],(t,[e])=>Math.acos(e.evaluate(t))],atan:[vl,[vl],(t,[e])=>Math.atan(e.evaluate(t))],min:[vl,pe(vl),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[vl,pe(vl),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[vl,[vl],(t,[e])=>Math.abs(e.evaluate(t))],round:[vl,[vl],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[vl,[vl],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[vl,[vl],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[bl,[xl,Pl],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[bl,[Pl],(t,[e])=>t.id()===e.value],"filter-type-==":[bl,[xl],(t,[e])=>t.geometryType()===e.value],"filter-<":[bl,[xl,Pl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[bl,[Pl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<r}],"filter->":[bl,[xl,Pl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[bl,[Pl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[bl,[xl,Pl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[bl,[Pl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[bl,[xl,Pl],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[bl,[Pl],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[bl,[Pl],(t,[e])=>e.value in t.properties()],"filter-has-id":[bl,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[bl,[Z(xl)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[bl,[Z(Pl)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[bl,[xl,Z(Pl)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[bl,[xl,Z(Pl)],(t,[e,i])=>function(t,e,i,r){for(;i<=r;){const o=i+r>>1;if(e[o]===t)return!0;e[o]>t?r=o-1:i=o+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:bl,overloads:[[[bl,bl],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[pe(bl),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:bl,overloads:[[[bl,bl],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[pe(bl),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[bl,[bl],(t,[e])=>!e.evaluate(t)],"is-supported-script":[bl,[xl],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[xl,[xl],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[xl,[xl],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[xl,pe(Pl),(t,e)=>e.map((e=>ft(e.evaluate(t)))).join("")],"resolved-locale":[xl,[Il],(t,[e])=>e.evaluate(t).resolvedLocale()]});class qc{constructor(t,e,i){this.expression=t,this._warningHistory={},this._evaluator=new cc,this._defaultValue=e?function(t){if("color"===t.type&&Se(t.default))return new ql(0,0,0,0);switch(t.type){case"color":return ql.parse(t.default)||null;case"padding":return Yl.parse(t.default)||null;case"numberArray":return Jl.parse(t.default)||null;case"colorArray":return Kl.parse(t.default)||null;case"variableAnchorOffsetCollection":return tc.parse(t.default)||null;case"projectionDefinition":return ic.parse(t.default)||null;default:return void 0===t.default?null:t.default}}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null,this._globalState=i}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=je(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,r,o,n){this._globalState&&(t=je(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new $l("Expected value to be one of "+Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")+", but found "+JSON.stringify(t)+" instead.");return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}class Zc{constructor(t,e,i){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!_e(e.expression),this.globalStateRefs=Fe(e.expression),this._globalState=i}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=je(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)}evaluate(t,e,i,r,o,n){return this._globalState&&(t=je(t,this._globalState)),this._styleExpression.evaluate(t,e,i,r,o,n)}}class Wc{constructor(t,e,i,r,o){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!_e(e.expression),this.globalStateRefs=Fe(e.expression),this.interpolationType=r,this._globalState=o}evaluateWithoutErrorHandling(t,e,i,r,o,n){return this._globalState&&(t=je(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)}evaluate(t,e,i,r,o,n){return this._globalState&&(t=je(t,this._globalState)),this._styleExpression.evaluate(t,e,i,r,o,n)}interpolationFactor(t,e,i){return this.interpolationType?xc.interpolationFactor(this.interpolationType,t,e,i):0}}class Hc{constructor(t,e){this._parameters=t,this._specification=e,q(this,Ie(this._parameters,this._specification))}static deserialize(t){return new Hc(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}const Xc={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class Yc{constructor(t,e){this._globalState=e,this.setValue(t)}evaluate(){var t;return null!==(t=this._literalValue)&&void 0!==t?t:this._compiledValue.evaluate({})}setValue(t){if(null==t||"visible"===t||"none"===t)return this._literalValue="none"===t?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);const e=De(t,Xc,this._globalState);if("error"===e.result)throw this._literalValue="visible",this._compiledValue=void 0,new Error(e.value.map((t=>t.key+": "+t.message)).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=Fe(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}ua={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",example:{"styleeditor:slimmode":!0,"styleeditor:comment":"Style generated 1677776383","styleeditor:version":"3.14.159265","example:object":{String:"one",Number:2,Boolean:!1}}},center:{type:"array",value:"number",length:2,doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},centerAltitude:{type:"number",doc:"Default map center altitude in meters above sea level. The style center altitude defines the altitude where the camera is looking at and will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:123.4,"sdk-support":{"basic functionality":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/2980",ios:"https://github.com/maplibre/maplibre-native/issues/2980"}}},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50,"sdk-support":{"0-60 degrees":{js:"0.8.0",android:"1.0.0",ios:"1.0.0"},"0-85 degrees":{js:"2.0.0",android:"https://github.com/maplibre/maplibre-native/issues/1909",ios:"https://github.com/maplibre/maplibre-native/issues/1909"},"0-180 degrees":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/1909",ios:"https://github.com/maplibre/maplibre-native/issues/1909"}}},roll:{type:"number",default:0,units:"degrees",doc:"Default roll, in degrees. The roll angle is measured counterclockwise about the camera boresight. The style roll will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:45,"sdk-support":{"basic functionality":{js:"5.0.0",android:"https://github.com/maplibre/maplibre-native/issues/2941",ios:"https://github.com/maplibre/maplibre-native/issues/2941"}}},state:{type:"state",default:{},doc:"An object used to define default values when using the [`global-state`](https://maplibre.org/maplibre-style-spec/expressions/#global-state) expression.",example:{chargerType:{default:["CCS","CHAdeMO","Type2"]},minPreferredChargingSpeed:{default:50}},"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}}},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},sky:{type:"sky",doc:"The map's sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",example:{"sky-color":"#199EF3","sky-horizon-blend":.5,"horizon-color":"#ffffff","horizon-fog-blend":.5,"fog-color":"#0000ff","fog-ground-blend":.5,"atmosphere-blend":["interpolate",["linear"],["zoom"],0,1,10,1,12,0]}},projection:{type:"projection",doc:"The projection configuration",example:{type:["interpolate",["linear"],["zoom"],10,"vertical-perspective",12,"mercator"]}},terrain:{type:"terrain",doc:"The terrain configuration.",example:{source:"raster-dem-source",exaggeration:.5}},sources:{required:!0,type:"sources",doc:"Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\n\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).",example:{"maplibre-demotiles":{type:"vector",url:"https://demotiles.maplibre.org/tiles/tiles.json"},"maplibre-tilejson":{type:"vector",url:"http://api.example.com/tilejson.json"},"maplibre-streets":{type:"vector",tiles:["http://a.example.com/tiles/{z}/{x}/{y}.pbf","http://b.example.com/tiles/{z}/{x}/{y}.pbf"],maxzoom:14},"wms-imagery":{type:"raster",tiles:["http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example"],tileSize:256}}},sprite:{type:"sprite",doc:"An array of `{id: 'my-sprite', url: 'https://example.com/sprite'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.",example:"https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format.\n\nIf this property is set, any text in the `text-field` layout property is displayed in the font stack named by the `text-font` layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.\n\nThe URL must include:\n\n - `{fontstack}` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the `text-font` property of a symbol layer. \n\n - `{range}` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.\n\nThe URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf","sdk-support":{"basic functionality":{js:"0.0.16",android:"0.1.1",ios:"0.1.0"},"omit to use local fonts":{js:"5.11.0",android:"https://github.com/maplibre/maplibre-native/issues/165",ios:"https://github.com/maplibre/maplibre-native/issues/165"}}},"font-faces":{type:"fontFaces",doc:"The `font-faces` property can be used to specify what font files to use for rendering text. Font faces contain information needed to render complex texts such as [Devanagari](https://en.wikipedia.org/wiki/Devanagari), [Khmer](https://en.wikipedia.org/wiki/Khmer_script) among many others.<h2>Unicode range</h2>The optional `unicode-range` property can be used to only use a particular font file for characters within the specified unicode range(s). Its value should be an array of strings, each indicating a start and end of a unicode range, similar to the [CSS descriptor with the same name](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). This allows specifying multiple non-consecutive unicode ranges. When not specified, the default value is `U+0-10FFFF`, meaning the font file will be used for all unicode characters.\n\nRefer to the [Unicode Character Code Charts](https://www.unicode.org/charts/) to see ranges for scripts supported by Unicode. To see what unicode code-points are available in a font, use a tool like [FontDrop](https://fontdrop.info/).\n\n<h2>Font Resolution</h2>For every name in a symbol layer’s [`text-font`](./layers.md/#text-font) array, characters are matched if they are covered one of the by the font files in the corresponding entry of the `font-faces` map. Any still-unmatched characters then fall back to the [`glyphs`](./glyphs.md) URL if provided.\n\n<h2>Supported Fonts</h2>What type of fonts are supported is implementation-defined. Unsupported fonts are ignored.",example:{"Noto Sans Regular":[{url:"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansKhmer/hinted/ttf/NotoSansKhmer-Regular.ttf","unicode-range":["U+1780-17FF"]},{url:"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansDevanagari/hinted/ttf/NotoSansDevanagari-Regular.ttf","unicode-range":["U+0900-097F"]},{url:"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMyanmar/hinted/ttf/NotoSansMyanmar-Regular.ttf","unicode-range":["U+1000-109F"]},{url:"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansEthiopic/hinted/ttf/NotoSansEthiopic-Regular.ttf","unicode-range":["U+1200-137F"]}],Unifont:"https://ftp.gnu.org/gnu/unifont/unifont-15.0.01/unifont-15.0.01.ttf"},"sdk-support":{"basic functionality":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6637",android:"11.13.0",ios:"6.18.0"}}},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`, `color-relief`.\n\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.",example:[{id:"coastline",source:"maplibre","source-layer":"countries",type:"line",paint:{"line-color":"#198EC8"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},encoding:{type:"enum",values:{mvt:{doc:"Mapbox Vector Tiles. See http://github.com/mapbox/vector-tile-spec for more info."},mlt:{doc:"MapLibre Vector Tiles. See https://github.com/maplibre/maplibre-tile-spec for more info."}},default:"mvt",doc:"The encoding used by this source. Mapbox Vector Tiles encoding is used by default.","sdk-support":{mvt:{android:"supported",ios:"supported",js:"supported"},mlt:{android:"12.1.0",ios:"6.20.0",js:"5.12.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:` and `https:`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."},custom:{doc:"Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default.","sdk-support":{"mapbox, terrarium":{js:"0.43.0",ios:"6.0.0",android:"6.0.0"},custom:{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},redFactor:{type:"number",default:1,doc:"Value that will be multiplied by the red channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},blueFactor:{type:"number",default:1,doc:"Value that will be multiplied by the blue channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},greenFactor:{type:"number",default:1,doc:"Value that will be multiplied by the green channel value when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2358",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},baseShift:{type:"number",default:0,doc:"Value that will be added to the encoding mix when decoding. Only used on custom encodings.","sdk-support":{"basic functionality":{js:"3.4.0",ios:"https://github.com/maplibre/maplibre-native/issues/2783",android:"https://github.com/maplibre/maplibre-native/issues/2783"}}},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0",js:"wontfix"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{required:!0,type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"filter",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n\n * `cluster` Is `true` if the point is a cluster \n\n * `cluster_id` A unique id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/#getclusterexpansionzoom)\n\n * `point_count` Number of original points grouped into this cluster\n\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},"circle-overlay":{doc:"A Maptec circle overlay with independent rendering and radar effects."},"polygon-overlay":{doc:"A Maptec polygon overlay with independent fill rendering."},"polyline-overlay":{doc:"A Maptec polyline overlay with independent line rendering."},"prism-overlay":{doc:"A Maptec prism overlay with independent 3D extrusion rendering and separate top/side colors."},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},"additional methods":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}}},"color-relief":{doc:"Client-side elevation coloring based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.","sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",example:{"source:comment":"Hydrology FCCODE 460 - Narrow wash"}},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_polygon-overlay","layout_line","layout_polyline-overlay","layout_circle","layout_circle-overlay","layout_heatmap","layout_fill-extrusion","layout_prism-overlay","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_polygon-overlay":{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_circle-overlay":{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_prism-overlay":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_polyline-overlay":{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image",{"!":"icon-overlap"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{doc:"The icon will be hidden if it collides with any other previously drawn symbol."},always:{doc:"The icon will be visible even if it collides with any other previously drawn symbol."},cooperative:{doc:"If the icon collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new icon is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new icon is visible."}},doc:"Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"2.1.0",android:"https://github.com/maplibre/maplibre-native/issues/251",ios:"https://github.com/maplibre/maplibre-native/issues/251"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",doc:"Size of additional area round the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"2.2.0",android:"https://github.com/maplibre/maplibre-native/issues/2754",ios:"https://github.com/maplibre/maplibre-native/issues/2754"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},"viewport-glyph":{doc:"When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0"},"`viewport-glyph` value":{js:"2.1.8",android:"https://github.com/maplibre/maplibre-native/issues/250",ios:"https://github.com/maplibre/maplibre-native/issues/250"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Fonts to use for displaying text. If the `glyphs` root property is specified, this array is joined together and interpreted as a font stack name. Otherwise, it is interpreted as a cascading fallback list of local font names.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},"local fonts":{js:"https://github.com/maplibre/maplibre-gl-js/issues/3302",android:"https://github.com/maplibre/maplibre-native/issues/165",ios:"https://github.com/maplibre/maplibre-native/issues/165"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},example:["center","left","right"],"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],doc:'To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position. \n\n The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor. \n\n When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`. \n\n ```json \n\n { "text-variable-anchor-offset": ["top", [0, 4], "left", [3,0], "bottom", [1, 1]] } \n\n ``` \n\n When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems. \n\n When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.',"sdk-support":{"basic functionality":{js:"3.3.0",ios:"6.8.0",android:"11.6.0"},"data-driven styling":{js:"3.3.0",ios:"https://github.com/maplibre/maplibre-native/issues/2358",android:"https://github.com/maplibre/maplibre-native/issues/2358"}},expression:{interpolated:!0,parameters:["zoom","feature"]},example:["top",[0,4],"left",[3,0],"bottom",[1,1]],"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field",{"!":"text-overlap"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{doc:"The text will be hidden if it collides with any other previously drawn symbol."},always:{doc:"The text will be visible even if it collides with any other previously drawn symbol."},cooperative:{doc:"If the text collides with another previously drawn symbol, the overlap mode for that symbol is checked. If the previous symbol was placed using `never` overlap mode, the new text is hidden. If the previous symbol was placed using `always` or `cooperative` overlap mode, the new text is visible."}},doc:"Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead",requires:["text-field"],"sdk-support":{"basic functionality":{js:"2.1.0",android:"https://github.com/maplibre/maplibre-native/issues/251",ios:"https://github.com/maplibre/maplibre-native/issues/251"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"},"`global state` expression":{js:"https://github.com/maplibre/maplibre-gl-js/issues/6495",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}},expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",doc:"A filter selects specific features from a layer.",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n\n* In categorical functions, when the feature value does not match any of the stop domain values.\n\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\n\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"expression_name",minimum:1,doc:'An expression defines a function that can be used for data-driven style properties or feature filters. The first element of an expression array is a string naming the expression operator, e.g. `"*"` or `"case"`. Elements that follow (if any) are the _arguments_ to the expression. Each argument is either a literal value (a string, number, boolean, or `null`), or another expression array.'},expression_name:{doc:"First element in an expression array. May be followed by a number of arguments.",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using `["var", "variable_name"]`.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)',syntax:{overloads:[{parameters:["var_name_1","var_value_1","...","var_name_n","var_value_n","expression"],"output-type":"any"}],parameters:[{name:"var_name_i",type:"string literal",doc:"The name of the i-th variable."},{name:"var_value_i",type:"any",doc:"The value of the i-th variable."},{name:"expression",type:"any",doc:"The expression within which the named variables can be referenced."}]},example:["let","someNumber",500,["interpolate",["linear"],["var","someNumber"],274,"#edf8e9",1551,"#006d2c"]],group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},var:{doc:"References variable bound using `let`.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",syntax:{overloads:[{parameters:["var_name"],"output-type":"any"}],parameters:[{name:"var_name",type:"string literal",doc:"The name of the variable bound using `let`."}]},example:["var","density"],group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},literal:{doc:"Provides a literal array or object value.\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)",syntax:{overloads:[{parameters:["json_object"],"output-type":"object"},{parameters:["json_array"],"output-type":"array"}],parameters:[{name:"json_object",type:"JSON object"},{name:"json_array",type:"JSON array"}]},example:["literal",["DIN Offc Pro Italic","Arial Unicode MS Regular"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type or length, then this assertion will cause the whole expression to be aborted.",syntax:{overloads:[{parameters:["value"],"output-type":"array"},{parameters:["type","value"],"output-type":"array<type>"},{parameters:["type","length","value"],"output-type":"array<type, length>"}],parameters:[{name:"value",type:"any"},{name:"type",type:["string","number","boolean"],doc:"The asserted type of the input array."},{name:"length",type:"number literal",doc:"The asserted length of the input array."}]},example:["array","string",3,["literal",["a","b","c"]]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},at:{doc:"Retrieves an item from an array.",syntax:{overloads:[{parameters:["index","array"],"output-type":"T"}],parameters:[{name:"index",type:"number",doc:"The index into `array`."},{name:"array",type:"array<T>",doc:"The array of items to retrieve the specified item from."}]},example:["at",1,["literal",["a","b","c"]]],group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.\n\n - [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure-distances/)",syntax:{overloads:[{parameters:["item","array"],"output-type":"boolean"},{parameters:["substring","string"],"output-type":"boolean"}],parameters:[{name:"item",type:"T",doc:"The needle to search for within `array`."},{name:"array",type:"array<T>",doc:"The haystack through which to search for `item`."},{name:"substring",type:"string",doc:"The needle to search for within `string`."},{name:"string",type:"string",doc:"The haystack through which to search for `substring`."}]},example:["in","$type","Point"],group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search. In a string, a UTF-16 surrogate pair counts as a single position.",syntax:{overloads:[{parameters:["item","array","from_index?"],"output-type":"number"},{parameters:["substring","string","from_index?"],"output-type":"number"}],parameters:[{name:"item",type:"T",doc:"The needle to search for within `array`."},{name:"array",type:"array<T>",doc:"The haystack through which to search for `item`."},{name:"substring",type:"string",doc:"The needle to search for within `string`."},{name:"string",type:"string",doc:"The haystack through which to search for `substring`."},{name:"from_index",type:"number",doc:"The index from where to begin the search."}]},example:["index-of","foo",["baz","bar","hello","foo","world"]],group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.3.0",ios:"6.0.0"}}},slice:{doc:"Returns a subarray from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index. In a string, a UTF-16 surrogate pair counts as a single position.",syntax:{overloads:[{parameters:["array","start_index","end_index?"],"output-type":"array<T>"},{parameters:["string","start_index","end_index?"],"output-type":"string"}],parameters:[{name:"array",type:"array<T>",doc:"The original array from which to extract the subarray."},{name:"string",type:"string",doc:"The original string from which to extract the substring."},{name:"start_index",type:"number",doc:"The inclusive index from which `slice` extracts items or characters from the subarray or substring."},{name:"end_index",type:"number",doc:"The non-inclusive index up to which `slice` extracts items or characters from the subarray or substring."}]},example:["slice",["get","name"],0,3],group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0",android:"10.3.0",ios:"6.0.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["condition_1","output_1","...","condition_n","output_n","fallback"],"output-type":"any"}],parameters:[{name:"condition_i",type:"boolean"},{name:"output_i",type:"any"},{name:"fallback",type:"any",doc:"The result when no condition evaluates to true."}]},example:["case",["boolean",["feature-state","hover"],!1],1,.5],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `["get", "building_type"]`). Each label must be either:\n\n - a single literal value; or\n\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `["c", "b"]`). The input matches if any of the values in the array matches, similar to the `"in"` operator.\n\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.',syntax:{overloads:[{parameters:["input","label_1","output_1","...","label_n","output_n","fallback"],"output-type":"any"}],parameters:[{name:"input",type:["string","number"],doc:"Any expression."},{name:"label_i",type:["string literal","number literal","array<string literal>","array<number literal>"],doc:"The i-th literal value or array of literal values to match the input against."},{name:"output_i",type:"any",doc:"The result when the i-th label is the first label to match the input."},{name:"fallback",type:"any",doc:"The result when no label matches the input."}]},example:["match",["get","building_type"],"residential","#f00","commercial","#0f0","#000"],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)",syntax:{overloads:[{parameters:["expression_1","...","expression_n"],"output-type":"any"}],parameters:[{name:"expression_i",type:"any"}]},example:["coalesce",["image",["concat",["get","icon"],"_15"]],["image","marker_15"]],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order.\n\nReturns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)',syntax:{overloads:[{parameters:["input","output_0","stop_input_1","stop_output_1","...","stop_input_n","stop_output_n"],"output-type":"any"}],parameters:[{name:"input",type:"number",doc:"Any numeric expression."},{name:"output_0",type:"any",doc:"The result when the `input` is less than the first stop."},{name:"stop_input_i",type:"number literal",doc:"The value of the i-th stop against which the `input` is compared."},{name:"stop_output_i",type:"any",doc:"The result when the i-th stop is the last stop less than the `input`."}]},example:["step",["get","point_count"],20,100,30,750,40],group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, `color`, `array<color>`, or `projection`.\n\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\n\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\n\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)',syntax:{overloads:[{parameters:["interpolation_type","input","stop_input_1","stop_output_1","...","stop_input_n","stop_output_n"],"output-type":["number","array<number>","color","array<color>","projection"]}],parameters:[{name:"interpolation_type",type:"interpolation",doc:"The interpolation type."},{name:"input",type:"number",doc:"Any numeric expression."},{name:"stop_input_i",type:"number literal",doc:"The value of the i-th stop against which the `input` is compared."},{name:"stop_output_i",type:["number","array<number>","color","array<color>","projection"],doc:"The output value corresponding to the i-th stop."}]},example:["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]],group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color` or `array<color>`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',syntax:{overloads:[{parameters:["interpolation_type","input","stop_input_1","stop_output_1","...","stop_input_n","stop_output_n"],"output-type":["color","array<color>"]}],parameters:[{name:"interpolation_type",type:"interpolation",doc:"The interpolation type."},{name:"input",type:"number"},{name:"stop_input_i",type:"number literal"},{name:"stop_output_i",type:["color","array<color>"]}]},example:["interpolate-hcl",["linear"],["zoom"],15,"#f00",15.05,"#00f"],group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color` or `array<color>`, and the interpolation is performed in the CIELAB color space.',syntax:{overloads:[{parameters:["interpolation_type","input","stop_input_1","stop_output_1","...","stop_input_n","stop_output_n"],"output-type":["color","array<color>"]}],parameters:[{name:"interpolation_type",type:"interpolation",doc:"The interpolation type."},{name:"input",type:"number"},{name:"stop_input_i",type:"number literal"},{name:"stop_output_i",type:["color","array<color>"]}]},example:["interpolate-lab",["linear"],["zoom"],15,"#f00",15.05,"#00f"],group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"}}},ln2:{doc:"Returns the mathematical constant ln(2).",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["ln2"],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},pi:{doc:"Returns the mathematical constant pi.",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["pi"],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},e:{doc:"Returns the mathematical constant e.",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["e"],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",syntax:{overloads:[{parameters:["value"],"output-type":"string"}],parameters:[{name:"value",type:"any"}]},example:["typeof",["get","name"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"string"}],parameters:[{name:"value_i",type:"any"}]},example:["string",["get","name"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"number"}],parameters:[{name:"value_i",type:"any"}]},example:["number",["get","population"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)",syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"boolean"}],parameters:[{name:"value_i",type:"any"}]},example:["boolean",["feature-state","hover"],!1],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"object"}],parameters:[{name:"value_i",type:"any"}]},example:["object",["get","some-property"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. Use `resolved-locale` to test the results of locale fallback behavior.",syntax:{overloads:[{parameters:["options"],"output-type":"collator"}],parameters:[{name:"options",type:{"case-sensitive":{type:"boolean",default:!1,example:!0,doc:"If characters of different case-ness are considered different"},"diacritic-sensitive":{type:"boolean",default:!1,example:!0,doc:"If characters with different diacritics are considered different"},locale:{type:"string",example:"en",doc:"IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale."}}}]},example:["collator",{"case-sensitive":!0,"diacritic-sensitive":!0,locale:"fr"}],group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},format:{doc:"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#image) expression. Strings may be followed by a style override object.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)",syntax:{overloads:[{parameters:["input_1","style_overrides_1?","...","input_n","style_overrides_n?"],"output-type":"formatted"}],parameters:[{name:"input_i",type:["string","image"]},{name:"style_overrides_i",type:{"text-font":{type:"string",doc:"Overrides the font stack specified by the root layout property.",example:"Arial Unicode MS Regular"},"text-color":{type:"color",doc:"Overrides the color specified by the root paint property.",example:"#333"},"font-scale":{type:"number",doc:"Applies a scaling factor on `text-size` as specified by the root layout property.",example:1.2},"vertical-align":{type:"enum",doc:"Aligns a vertical text section or image in relation to the row it belongs to. Refer to [the design proposal](https://github.com/maplibre/maplibre-style-spec/issues/832) for more details.",default:"bottom",example:"bottom",values:{bottom:{doc:"align the bottom of this section with the bottom of other sections.\n![Visual representation of bottom alignment](https://github.com/user-attachments/assets/0474a2fd-a4b2-417c-9187-7a13a28695bc)"},center:{doc:"align the center of this section with the center of other sections.\n![Visual representation of center alignment](https://github.com/user-attachments/assets/92237455-be6d-4c5d-b8f6-8127effc1950)"},top:{doc:"align the top of this section with the top of other sections.\n![Visual representation of top alignment](https://github.com/user-attachments/assets/45dccb28-d977-4abb-a006-4ea9792b7c53)"}}}}}]},example:["format",["upcase",["get","FacilityName"]],{"font-scale":.8},"\n\n",{},["downcase",["get","Comments"]],{"font-scale":.6,"vertical-align":"center"}],group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0"},"vertical-align":{js:"5.1.0",android:"https://github.com/maplibre/maplibre-native/issues/3055",ios:"https://github.com/maplibre/maplibre-native/issues/3055"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/use-a-fallback-image/)",syntax:{overloads:[{parameters:["image_name"],"output-type":"image"}],parameters:[{name:"image_name",type:"string"}]},example:["image","marker_15"],group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0"}}},"global-state":{doc:"Retrieves a property value from global state that can be set with platform-specific APIs. Defaults can be provided using the [`state`](https://maplibre.org/maplibre-style-spec/root/#state) root property. Returns `null` if no value nor default value is set for the retrieved property.",group:"Lookup",syntax:{overloads:[{parameters:["property_name"],"output-type":"any"}],parameters:[{name:"property_name",type:"string literal",doc:"The name of the global state property to retrieve."}]},example:["global-state","someProperty"],"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3302",ios:"https://github.com/maplibre/maplibre-native/issues/3302"}}},"number-format":{doc:"Converts the input number into a string representation using the provided format_options.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["input","format_options"],"output-type":"string"}],parameters:[{name:"input",type:"number",doc:"number to format"},{name:"format_options",type:{locale:{type:"string",example:"en",doc:"Specifies the locale to use, as a BCP 47 language tag"},currency:{type:"string",example:"USD",doc:"An ISO 4217 code to use for currency-style formatting"},"min-fraction-digits":{type:"number",example:1,doc:"Minimum number of fractional digits to include"},"max-fraction-digits":{type:"number",example:2,doc:"Maximum number of fractional digits to include"}},doc:"Format options for the number"}]},example:["number-format",["get","mag"],{"min-fraction-digits":1,"max-fraction-digits":1}],group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"supported"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)',syntax:{overloads:[{parameters:["value"],"output-type":"string"}],parameters:[{name:"value",type:"any"}]},example:["to-string",["get","mag"]],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"number"}],parameters:[{name:"value_i",type:"any"}]},example:["to-number","someProperty"],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when the input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",syntax:{overloads:[{parameters:["value"],"output-type":"boolean"}],parameters:[{name:"value",type:"any"}]},example:["to-boolean","someProperty"],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",syntax:{overloads:[{parameters:["color"],"output-type":"array"}],parameters:[{name:"color",type:"color"}]},example:["to-rgba","#ff0000"],group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",syntax:{overloads:[{parameters:["value_1","...","value_n"],"output-type":"color"}],parameters:[{name:"value_i",type:"any"}]},example:["to-color","#edf8e9"],group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",syntax:{overloads:[{parameters:["red","green","blue"],"output-type":"color"}],parameters:[{name:"red",type:"number"},{name:"green",type:"number"},{name:"blue",type:"number"}]},example:["rgb",255,0,0],group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between zero and one. If any component is out of range, the expression is an error.",syntax:{overloads:[{parameters:["red","green","blue","alpha"],"output-type":"color"}],parameters:[{name:"red",type:"number"},{name:"green",type:"number"},{name:"blue",type:"number"},{name:"alpha",type:"number"}]},example:["rgba",255,0,0,1],group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)\n\n - [Extrude polygons for 3D indoor mapping](https://maplibre.org/maplibre-gl-js/docs/examples/extrude-polygons-for-3d-indoor-mapping/)",syntax:{overloads:[{parameters:["property_name","object?"],"output-type":"any"}],parameters:[{name:"property_name",type:"string",doc:"The name of the property to retrieve the value of."},{name:"object",type:"object",doc:"The object to retrieve the value from."}]},example:["get","someProperty"],group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},has:{doc:"Tests for the presence of a property value in the current feature's properties, or from another object if a second argument is provided.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)",syntax:{overloads:[{parameters:["property_name","object?"],"output-type":"boolean"}],parameters:[{name:"property_name",type:"string",doc:"The name of the property to test for the presence of."},{name:"object",type:"object",doc:"The object in which to test for the presence of the `property_name` property."}]},example:["has","someProperty"],group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},length:{doc:"Gets the length of an array or string. In a string, a UTF-16 surrogate pair counts as a single position.",syntax:{overloads:[{parameters:["array_or_string"],"output-type":"number"}],parameters:[{name:"array_or_string",type:["array","string"]}]},example:["length",["get","myArray"]],group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',syntax:{overloads:[{parameters:[],"output-type":"object"}]},example:["properties"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-hover-effect/)",syntax:{overloads:[{parameters:["property_name"],"output-type":"any"}],parameters:[{name:"property_name",type:"string"}]},example:["feature-state","hover"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0",ios:"https://github.com/maplibre/maplibre-native/issues/1698",android:"https://github.com/maplibre/maplibre-native/issues/1698"}}},"geometry-type":{doc:"Returns the feature's simple geometry type: `Point`, `LineString`, or `Polygon`. `MultiPoint`, `MultiLineString`, and `MultiPolygon` are returned as `Point`, `LineString`, and `Polygon`, respectively.",syntax:{overloads:[{parameters:[],"output-type":"string"}]},example:["==",["geometry-type"],"Polygon"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},id:{doc:"Gets the feature's id, if it has one.",syntax:{overloads:[{parameters:[],"output-type":"any"}]},example:["id"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]],group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["heatmap-density"],group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},elevation:{doc:"Gets the elevation of a pixel (in meters above the vertical datum reference of the `raster-dem` tiles) from a `raster-dem` source. Can only be used in the `color-relief-color` property of a `color-relief` layer.",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["elevation"],group:"Color Relief","sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",syntax:{overloads:[{parameters:[],"output-type":"number"}]},example:["line-progress"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",syntax:{overloads:[{parameters:[],"output-type":"any"}]},example:["accumulated"],group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",ios:"supported",android:"supported"}}},"+":{doc:"Returns the sum of the inputs.",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"number"}],parameters:[{name:"input_i",type:"number"}]},example:["+",2,3],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"*":{doc:"Returns the product of the inputs.",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"number"}],parameters:[{name:"input_i",type:"number"}]},example:["*",2,3],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",syntax:{overloads:[{parameters:["input_1","input_2"],"output-type":"number"},{parameters:["single_input"],"output-type":"number"}],parameters:[{name:"input_1",type:"number",doc:"The number from which to subtract `input_2`."},{name:"input_2",type:"number",doc:"The number to subtract from `input_1`."},{name:"single_input",type:"number",doc:"The number to subtract from 0."}]},example:["-",10],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",syntax:{overloads:[{parameters:["input_1","input_2"],"output-type":"number"}],parameters:[{name:"input_1",type:"number",doc:"The dividend."},{name:"input_2",type:"number",doc:"The divisor."}]},example:["/",["get","population"],["get","sq-km"]],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",syntax:{overloads:[{parameters:["input_1","input_2"],"output-type":"number"}],parameters:[{name:"input_1",type:"number",doc:"The dividend."},{name:"input_2",type:"number",doc:"The divisor."}]},example:["%",10,3],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",syntax:{overloads:[{parameters:["input_1","input_2"],"output-type":"number"}],parameters:[{name:"input_1",type:"number",doc:"The base."},{name:"input_2",type:"number",doc:"The exponent."}]},example:["^",2,3],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},sqrt:{doc:"Returns the square root of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number",doc:"The radicand."}]},example:["sqrt",9],group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["log10",8],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},ln:{doc:"Returns the natural logarithm of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["ln",8],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["log2",8],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},sin:{doc:"Returns the sine of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["sin",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},cos:{doc:"Returns the cosine of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["cos",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},tan:{doc:"Returns the tangent of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["tan",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},asin:{doc:"Returns the arcsine of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["asin",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},acos:{doc:"Returns the arccosine of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["acos",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},atan:{doc:"Returns the arctangent of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["atan",1],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},min:{doc:"Returns the minimum value of the inputs.",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"number"}],parameters:[{name:"input_i",type:"number"}]},example:["min",1,2],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},max:{doc:"Returns the maximum value of the inputs.",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"number"}],parameters:[{name:"input_i",type:"number"}]},example:["max",1,2],group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["round",1.5],group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0"}}},abs:{doc:"Returns the absolute value of the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["abs",-1.5],group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["ceil",1.5],group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",syntax:{overloads:[{parameters:["input"],"output-type":"number"}],parameters:[{name:"input",type:"number"}]},example:["floor",1.5],group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",syntax:{overloads:[{parameters:["geojson"],"output-type":"number"}],parameters:[{name:"geojson",type:"GeoJSON object"}]},example:["distance",{type:"Point",coordinates:[0,0]}],group:"Math","sdk-support":{"basic functionality":{js:"4.2.0",android:"9.2.0",ios:"5.9.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Add multiple geometries from one GeoJSON source](https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/)\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\n\n - [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/display-buildings-in-3d/)\n\n - [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-symbols-by-toggling-a-list/)",syntax:{overloads:[{parameters:["input_1","input_2","collator?"],"output-type":"boolean"}],parameters:[{name:"input_1",type:"any"},{name:"input_2",type:"any"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:["==","$type","Polygon"],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["input_1","input_2","collator?"],"output-type":"boolean"}],parameters:[{name:"input_1",type:"any"},{name:"input_2",type:"any"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:["!=","cluster",!0],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",syntax:{overloads:[{parameters:["string_1","string_2","collator?"],"output-type":"boolean"},{parameters:["number_1","number_2","collator?"],"output-type":"boolean"}],parameters:[{name:"string_i",type:"string"},{name:"number_i",type:"number"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:[">",["get","mag"],2],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["string_1","string_2","collator?"],"output-type":"boolean"},{parameters:["number_1","number_2","collator?"],"output-type":"boolean"}],parameters:[{name:"string_i",type:"string"},{name:"number_i",type:"number"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:["<",["get","mag"],2],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["string_1","string_2","collator?"],"output-type":"boolean"},{parameters:["number_1","number_2","collator?"],"output-type":"boolean"}],parameters:[{name:"string_i",type:"string"},{name:"number_i",type:"number"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:[">=",["get","mag"],6],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",syntax:{overloads:[{parameters:["string_1","string_2","collator?"],"output-type":"boolean"},{parameters:["number_1","number_2","collator?"],"output-type":"boolean"}],parameters:[{name:"string_i",type:"string"},{name:"number_i",type:"number"},{name:"collator",type:"collator",doc:"Options for locale-dependent comparison."}]},example:["<=",["get","mag"],6],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/display-html-clusters-with-custom-properties/)",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"boolean"}],parameters:[{name:"input_i",type:"boolean"}]},example:["all",[">=",["get","mag"],4],["<",["get","mag"],5]],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"boolean"}],parameters:[{name:"input_i",type:"boolean"}]},example:["any",[">=",["get","mag"],4],["<",["get","mag"],5]],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/create-and-style-clusters/)",syntax:{overloads:[{parameters:["input"],"output-type":"boolean"}],parameters:[{name:"input",type:"boolean"}]},example:["!",["has","point_count"]],group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",syntax:{overloads:[{parameters:["geojson"],"output-type":"boolean"}],parameters:[{name:"geojson",type:"GeoJSON object"}]},example:["within",{type:"Polygon",coordinates:[[[0,0],[0,5],[5,5],[5,0],[0,0]]]}],group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).",syntax:{overloads:[{parameters:["input"],"output-type":"boolean"}],parameters:[{name:"input",type:"string"}]},example:["is-supported-script","दिल्ली"],group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0",ios:"supported"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)",syntax:{overloads:[{parameters:["input"],"output-type":"string"}],parameters:[{name:"input",type:"string"}]},example:["upcase",["get","name"]],group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)",syntax:{overloads:[{parameters:["input"],"output-type":"string"}],parameters:[{name:"input",type:"string"}]},example:["downcase",["get","name"]],group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\n\n - [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-a-generated-icon-to-the-map/)\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/create-a-time-slider/)\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)\n\n - [Variable label placement](https://maplibre.org/maplibre-gl-js/docs/examples/variable-label-placement/)",syntax:{overloads:[{parameters:["input_1","...","input_n"],"output-type":"string"}],parameters:[{name:"input_i",type:"any"}]},example:["concat","square-rgb-",["get","color"]],group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",syntax:{overloads:[{parameters:["collator"],"output-type":"string"}],parameters:[{name:"collator",type:"collator"}]},example:["resolved-locale",["collator",{"case-sensitive":!0,"diacritic-sensitive":!1,locale:"de"}]],group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0"}}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}}}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the sky."},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color at the horizon."},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The base color for the fog. Requires 3D terrain."},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog over the 3D terrain. Where 0 is the map center and 1 is the horizon."},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the fog color and the horizon color. Where 0 is using the horizon color only and 1 is using the fog color only."},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the sky color and the horizon color. Where 1 is blending the color at the middle of the sky and 0 is not blending at all and using the sky color only."},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection."}},terrain:{source:{type:"string",doc:"The source for the terrain data.",required:!0,"sdk-support":{"basic functionality":{js:"2.2.0",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}},exaggeration:{type:"number",minimum:0,doc:"The exaggeration of the terrain - how high it will look.",default:1,"sdk-support":{"basic functionality":{js:"2.2.0",ios:"https://github.com/maplibre/maplibre-native/issues/252",android:"https://github.com/maplibre/maplibre-native/issues/252"}}}},projection:{type:{type:"projectionDefinition",doc:"The projection definition type. Can be specified as a string, a transition state, or an expression.",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_polygon-overlay","paint_line","paint_polyline-overlay","paint_circle","paint_circle-overlay","paint_heatmap","paint_fill-extrusion","paint_prism-overlay","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],"paint_polygon-overlay":{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",android:"7.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_prism-overlay":{"top-fill-color":{type:"color",default:"#EAE9E9",doc:"The fill color of the prism top surface. Used when `top-fill-pattern` is not set.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"top-fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the prism top surface.",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"top-fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for the prism top surface. When set, takes priority over `top-fill-color`.",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"side-fill-color":{type:"color",default:"#C8C8C8",doc:"The fill color of the prism side surfaces. Used when `side-fill-pattern` is not set.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"side-fill-opacity":{type:"number",default:.85,minimum:0,maximum:1,doc:"The opacity of the prism side surfaces.",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"side-fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for the prism side surfaces. When set, takes priority over `side-fill-color`.",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the prism.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The base height of the prism extrusion. Must be less than or equal to `extrusion-height`.",transition:!0,requires:["extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the prism side surfaces.",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_polyline-overlay":{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:'Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. GeoJSON sources with `lineMetrics: true` specified won\'t render dashed lines to the expected scale. Zoom-dependent expressions will be evaluated only at integer zoom levels. The only way to create an array value is using `["literal", [...]]`; arrays cannot be read from or derived from feature properties.',minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"5.8.0",ios:"https://github.com/maplibre/maplibre-native/issues/744",android:"https://github.com/maplibre/maplibre-native/issues/744"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-direction-image":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing polyline overlay direction arrows.",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-direction-color":{type:"color",default:"white",transition:!0,doc:"The color used to tint the built-in polyline overlay direction arrow image.",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-direction-opacity":{type:"number",default:0,minimum:0,maximum:1,transition:!0,doc:"The opacity of polyline overlay direction arrows.",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-direction-gap":{type:"number",default:1,minimum:.1,transition:!0,units:"icon widths",doc:"The repeat interval of polyline overlay direction arrows, measured in scaled arrow icon widths.",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-direction-custom-image":{type:"number",default:0,minimum:0,maximum:1,transition:!1,doc:"Whether the polyline overlay direction arrow image should use its own colors instead of being tinted.",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-depth-test":{type:"boolean",default:!0,transition:!1,doc:"Whether the polyline overlay should be depth-tested against 3D geometry such as fill-extrusion buildings.",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:'Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. GeoJSON sources with `lineMetrics: true` specified won\'t render dashed lines to the expected scale. Zoom-dependent expressions will be evaluated only at integer zoom levels. The only way to create an array value is using `["literal", [...]]`; arrays cannot be read from or derived from feature properties.',minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"5.8.0",ios:"https://github.com/maplibre/maplibre-native/issues/744",android:"https://github.com/maplibre/maplibre-native/issues/744"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle-overlay":{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-overlay-body-radius":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-overlay-blur-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-overlay-in-shadow-width":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-overlay-in-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-overlay-in-shadow-opacity":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-enabled":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-radar-type":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-opacity":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-radius":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-width":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-duration":{type:"number",default:1800,minimum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-wave-count":{type:"number",default:0,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-radar-gradient":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline. \n\nThe unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added, or when a video is started or its coordinates are updated.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,doc:"The direction of the light source(s) used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,doc:"The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!1,"sdk-support":{"basic functionality":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",doc:"The shading color of areas that face away from the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"},multidirectional:{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{doc:"The legacy hillshade method."},basic:{doc:"Basic hillshade. Uses a simple physics model where the reflected light intensity is proportional to the cosine of the angle between the incident light and the surface normal. Similar to GDAL's `gdaldem` default algorithm."},combined:{doc:"Hillshade algorithm whose intensity scales with slope. Similar to GDAL's `gdaldem` with `-combined` option."},igor:{doc:"Hillshade algorithm which tries to minimize effects on other map features beneath. Similar to GDAL's `gdaldem` with `-igor` option."},multidirectional:{doc:"Hillshade with multiple illumination directions. Uses the basic hillshade model with multiple independent light sources."}},default:"standard",doc:"The hillshade algorithm to use, one of `standard`, `basic`, `combined`, `igor`, or `multidirectional`. ![image](assets/hillshade_methods.png)","sdk-support":{"basic functionality":{js:"5.5.0",android:"https://github.com/maplibre/maplibre-native/issues/3396",ios:"https://github.com/maplibre/maplibre-native/issues/3396"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the color-relief will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",doc:'Defines the color of each pixel based on its elevation. Should be an expression that uses `["elevation"]` as input.',example:["interpolate",["linear"],["elevation"],0,"black",8849,"white"],transition:!1,"sdk-support":{"basic functionality":{js:"5.6.0",android:"https://github.com/maplibre/maplibre-native/issues/3408",ios:"https://github.com/maplibre/maplibre-native/issues/3408"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},interpolation:{type:"array",value:"interpolation_name",minimum:1,doc:'An interpolation defines how to transition between items. The first element of an interpolation array is a string naming the interpolation operator, e.g. `"linear"` or `"exponential"`. Elements that follow (if any) are the _arguments_ to the interpolation.'},interpolation_name:{doc:"First element in an interpolation array. May be followed by a number of arguments.",type:"enum",values:{linear:{doc:"Interpolates linearly between the pair of stops just less than and just greater than the input",syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]},example:["linear"],"sdk-support":{interpolate:{js:"0.42.0",android:"6.0.0",ios:"4.0.0"},"interpolate-hcl":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"},"interpolate-lab":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"}}},exponential:{doc:"Interpolates exponentially between the stops just less than and just greater than the input.",syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal",doc:"rate at which the output increases in `f(x) = x^r`. Values higher than 1 increase, close to one behaves linearly, and below one decrease."}]},example:["exponential",2],"sdk-support":{interpolate:{js:"0.42.0",android:"6.0.0",ios:"4.0.0"},"interpolate-hcl":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"},"interpolate-lab":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"}}},"cubic-bezier":{doc:"Interpolates using the cubic bézier curve defined by the given control points.",syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal",doc:"X-coordinate of the first control point. Must be between zero and one for a valid monotonic easing curve. Controls how quickly the curve speeds up at the beginning."},{name:"y1",type:"number literal",doc:"Y-coordinate of the first control point. Typically between zero and one, but may exceed this range for overshoot effects. Influences the starting slope of the curve."},{name:"x2",type:"number literal",doc:"X-coordinate of the second control point. Must be between zero and one for a valid monotonic easing curve. Controls when the curve begins to decelerate toward the end."},{name:"y2",type:"number literal",doc:"Y-coordinate of the second control point. Typically between zero and one, but may exceed this range for overshoot effects. Influences the ending slope of the curve."}]},example:["cubic-bezier",2,3,2,3],"sdk-support":{interpolate:{js:"0.42.0",android:"6.0.0",ios:"4.0.0"},"interpolate-hcl":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"},"interpolate-lab":{js:"0.49.0",ios:"https://github.com/maplibre/maplibre-native/issues/2784",android:"https://github.com/maplibre/maplibre-native/issues/2784"}}}}}};class Jc{constructor(t,e,i,r){this.message=(t?t+": ":"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)}}const Kc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},$c={promoteId:function({key:t,value:e}){if("string"===Te(e))return hi({key:t,value:e});{const i=[];for(const r in e)i.push(...hi({key:t+"."+r,value:e[r]}));return i}}},Qc={"*":()=>[],array:$e,boolean:function(t){const e=t.value,i=t.key,r=Te(e);return"boolean"!==r?[new Jc(i,e,"boolean expected, "+r+" found")]:[]},number:Qe,color:ii,constants:Xe,enum:ri,filter:oi,function:ti,layer:ci,object:Ke,source:ui,light:di,sky:pi,terrain:fi,projection:function(t){const e=t.value,i=t.styleSpec,r=i.projection,o=t.style,n=Te(e);if(void 0===e)return[];if("object"!==n)return[new Jc("projection",e,"object expected, "+n+" found")];let s=[];for(const n in e)s=s.concat(r[n]?t.validateSpec({key:n,value:e[n],valueSpec:r[n],style:o,styleSpec:i}):[new Jc(n,e[n],'unknown property "'+n+'"')]);return s},projectionDefinition:function(t){const e=t.key;let i=t.value;i=i instanceof String?i.valueOf():i;const r=Te(i);return"array"!==r||(o=i,Array.isArray(o)&&3===o.length&&"string"==typeof o[0]&&"string"==typeof o[1]&&"number"==typeof o[2])||["interpolate","step","literal"].includes(i[0])?["array","string"].includes(r)?[]:[new Jc(e,i,'projection expected, invalid type "'+r+'" found')]:[new Jc(e,i,"projection expected, invalid array "+JSON.stringify(i)+" found")];var o},string:hi,formatted:function(t){return 0===hi(t).length?[]:ei(t)},resolvedImage:function(t){return 0===hi(t).length?[]:ei(t)},padding:function(t){const e=t.key,i=t.value;if("array"===Te(i)){if(i.length<1||i.length>4)return[new Jc(e,i,"padding requires 1 to 4 values; "+i.length+" values found")];const r={type:"number"};let o=[];for(let n=0;n<i.length;n++)o=o.concat(t.validateSpec({key:e+"["+n+"]",value:i[n],validateSpec:t.validateSpec,valueSpec:r}));return o}return Qe({key:e,value:i,valueSpec:{}})},numberArray:function(t){const e=t.key,i=t.value;if("array"===Te(i)){const r={type:"number"};if(i.length<1)return[new Jc(e,i,"array length at least 1 expected, length 0 found")];let o=[];for(let n=0;n<i.length;n++)o=o.concat(t.validateSpec({key:e+"["+n+"]",value:i[n],validateSpec:t.validateSpec,valueSpec:r}));return o}return Qe({key:e,value:i,valueSpec:{}})},colorArray:function(t){const e=t.key,i=t.value;if("array"===Te(i)){if(i.length<1)return[new Jc(e,i,"array length at least 1 expected, length 0 found")];let t=[];for(let r=0;r<i.length;r++)t=t.concat(ii({key:e+"["+r+"]",value:i[r]}));return t}return ii({key:e,value:i})},variableAnchorOffsetCollection:function(t){const e=t.key,i=t.value,r=Te(i),o=t.styleSpec;if("array"!==r||i.length<1||i.length%2!=0)return[new Jc(e,i,"variableAnchorOffsetCollection requires a non-empty array of even length")];let n=[];for(let r=0;r<i.length;r+=2)n=n.concat(ri({key:e+"["+r+"]",value:i[r],valueSpec:o.layout_symbol["text-anchor"]})),n=n.concat($e({key:e+"["+(r+1)+"]",value:i[r+1],valueSpec:{length:2,value:"number"},validateSpec:t.validateSpec,style:t.style,styleSpec:o}));return n},sprite:mi,state:yi,fontFaces:function(t){const e=t.key,i=t.value,r=t.validateSpec,o=t.styleSpec,n=t.style;if(!_i(i))return[new Jc(e,i,"object expected, "+Te(i)+" found")];const s=[];for(const t in i){const a=i[t],l=Te(a);if("string"===l)s.push(...hi({key:e+"."+t,value:a}));else if("array"===l){const i={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(const[l,c]of a.entries())s.push(...Ke({key:e+"."+t+"["+l+"]",value:c,valueSpec:i,styleSpec:o,style:n,validateSpec:r}))}else s.push(new Jc(e+"."+t,a,"string or array expected, "+l+" found"))}return s}};xi.source=Ti(bi(ui)),xi.sprite=Ti(bi(mi)),xi.glyphs=Ti(bi(vi)),xi.light=Ti(bi(di)),xi.sky=Ti(bi(pi)),xi.terrain=Ti(bi(fi)),xi.state=Ti(bi(yi)),xi.layer=Ti(bi(ci)),xi.filter=Ti(bi(oi)),xi.paintProperty=Ti(bi(ai)),xi.layoutProperty=Ti(bi(li));const th=xi,eh=th.light,ih=th.sky,rh=th.paintProperty,oh=th.layoutProperty;class nh{constructor(t,e,i){const r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const o=new Int32Array(this.arrayBuffer);t=o[0],this.d=(e=o[1])+2*(i=o[2]);for(let t=0;t<this.d*this.d;t++){const e=o[3+t],i=o[3+t+1];r.push(e===i?null:o.subarray(e,i))}const n=o[3+r.length+1];this.keys=o.subarray(o[3+r.length],n),this.bboxes=o.subarray(n),this.insert=this._insertReadonly}else{this.d=e+2*i;for(let t=0;t<this.d*this.d;t++)r.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=i,this.scale=e/t,this.uid=0;const o=i/e*t;this.min=-o,this.max=t+o}insert(t,e,i,r,o){this._forEachCell(e,i,r,o,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(o)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,e,i,r,o,n){this.cells[o].push(n)}query(t,e,i,r,o){const n=this.min,s=this.max;if(t<=n&&e<=n&&s<=i&&s<=r&&!o)return Array.prototype.slice.call(this.keys);{const n=[];return this._forEachCell(t,e,i,r,this._queryCell,n,{},o),n}}_queryCell(t,e,i,r,o,n,s,a){const l=this.cells[o];if(null!==l){const o=this.keys,c=this.bboxes;for(let h=0;h<l.length;h++){const u=l[h];if(void 0===s[u]){const l=4*u;(a?a(c[l+0],c[l+1],c[l+2],c[l+3]):t<=c[l+2]&&e<=c[l+3]&&i>=c[l+0]&&r>=c[l+1])?(s[u]=!0,n.push(o[u])):s[u]=!1}}}}_forEachCell(t,e,i,r,o,n,s,a){const l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),h=this._convertToCellCoord(i),u=this._convertToCellCoord(r);for(let d=l;d<=h;d++)for(let l=c;l<=u;l++){const c=this.d*l+d;if((!a||a(this._convertFromCellCoord(d),this._convertFromCellCoord(l),this._convertFromCellCoord(d+1),this._convertFromCellCoord(l+1)))&&o.call(this,t,e,i,r,c,n,s,a))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,e=3+this.cells.length+1+1;let i=0;for(let t=0;t<this.cells.length;t++)i+=this.cells[t].length;const r=new Int32Array(e+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;let o=e;for(let e=0;e<t.length;e++){const i=t[e];r[3+e]=o,r.set(i,o),o+=i.length}return r[3+t.length]=o,r.set(this.keys,o),o+=this.keys.length,r[3+t.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer}static serialize(t,e){const i=t.toArrayBuffer();return e&&e.push(i),{buffer:i}}static deserialize(t){return new nh(t.buffer)}}const sh={};Pi("Object",Object),Pi("Set",Set),Pi("TransferableGridIndex",nh),Pi("Color",ql),Pi("Error",Error),Pi("AJAXError",hl),Pi("ResolvedImage",ec),Pi("StylePropertyFunction",Hc),Pi("StyleExpression",qc,{omit:["_evaluator"]}),Pi("ZoomDependentExpression",Wc),Pi("ZoomConstantExpression",Zc),Pi("CompoundExpression",Uc,{omit:["_evaluate"]});for(const t in Gc)Gc[t]._classRegistryKey||Pi("Expression_"+t,Gc[t]);class ah{constructor(){this.first=!0}update(t,e){const i=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=i,!0))}}const lh=Oi(["Arab","Dupl","Mong","Ougr","Syrc"]),ch=Oi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]),hh=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(hh.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,i){return e(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if("loading"!==t.pluginStatus)return this.setState(t),t;const e=t.pluginURL,r=new Promise((t=>{this.loadScriptResolve=t}));i(e);const o=new Promise((t=>setTimeout((()=>t()),this.TIMEOUT)));if(yield Promise.race([r,o]),this.isParsed()){const t={pluginStatus:"loaded",pluginURL:e};return this.setState(t),t}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error("RTL Text Plugin failed to import scripts from "+e)}))}};class uh{constructor(t,e){this.isSupportedScript=Bi,this.zoom=t,e?(this.now=e.now||0,this.fadeDuration=e.fadeDuration||0,this.zoomHistory=e.zoomHistory||new ah,this.transition=e.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ah,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),i=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*e}}}const dh="-transition";class ph{constructor(t,e,i){this.property=t,this.value=e,this.expression=function(t,e,i){if(Se(t))return new Hc(t,e);if(ze(t)){const r=Oe(t,e,i);if("error"===r.result)throw new Error(r.value.map((t=>t.key+": "+t.message)).join(", "));return r.value}{let i=t;return"color"===e.type&&"string"==typeof t?i=ql.parse(t):"padding"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"numberArray"!==e.type||"number"!=typeof t&&!Array.isArray(t)?"colorArray"!==e.type||"string"!=typeof t&&!Array.isArray(t)?"variableAnchorOffsetCollection"===e.type&&Array.isArray(t)?i=tc.parse(t):"projectionDefinition"===e.type&&"string"==typeof t&&(i=ic.parse(t)):i=Kl.parse(t):i=Jl.parse(t):i=Yl.parse(t),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>i}}}(void 0===e?t.specification.default:e,t.specification,i)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)}}class fh{constructor(t,e){this.property=t,this.value=new ph(t,void 0,e)}transitioned(t,e){return new _h(this.property,this.value,e,I({},t.transition,this.transition),t.now)}untransitioned(){return new _h(this.property,this.value,null,{},0)}}class mh{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=e}getValue(t){return A(this._values[t].value.value)}setValue(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new fh(this._values[t].property,this._globalState)),this._values[t].value=new ph(this._values[t].property,null===e?void 0:A(e),this._globalState)}getTransition(t){return A(this._values[t].transition)}setTransition(t,e){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new fh(this._values[t].property,this._globalState)),this._values[t].transition=A(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const i=this.getValue(e);void 0!==i&&(t[e]=i);const r=this.getTransition(e);void 0!==r&&(t[""+e+dh]=r)}return t}transitioned(t,e){const i=new yh(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].transitioned(t,e._values[r]);return i}untransitioned(){const t=new yh(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class _h{constructor(t,e,i,r,o){this.property=t,this.value=e,this.begin=o+r.delay||0,this.end=this.begin+r.duration||0,t.specification.transition&&(r.delay||r.duration)&&(this.prior=i)}possiblyEvaluate(t,e,i){const r=t.now||0,o=this.value.possiblyEvaluate(t,e,i),n=this.prior;if(n){if(r>this.end)return this.prior=null,o;if(this.value.isDataDriven())return this.prior=null,o;if(r<this.begin)return n.possiblyEvaluate(t,e,i);{const s=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(t,e,i),o,w(s))}}return o}}class yh{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,e,i){const r=new xh(this._properties);for(const o of Object.keys(this._values))r._values[o]=this._values[o].possiblyEvaluate(t,e,i);return r}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class gh{constructor(t,e){this._properties=t,this._values=Object.create(t.defaultPropertyValues),this._globalState=e}hasValue(t){return void 0!==this._values[t].value}getValue(t){return A(this._values[t].value)}setValue(t,e){this._values[t]=new ph(this._values[t].property,null===e?void 0:A(e),this._globalState)}serialize(){const t={};for(const e of Object.keys(this._values)){const i=this.getValue(e);void 0!==i&&(t[e]=i)}return t}possiblyEvaluate(t,e,i){const r=new xh(this._properties);for(const o of Object.keys(this._values))r._values[o]=this._values[o].possiblyEvaluate(t,e,i);return r}}class vh{constructor(t,e,i){this.property=t,this.value=e,this.parameters=i}isConstant(){return"constant"===this.value.kind}constantOr(t){return"constant"===this.value.kind?this.value.value:t}evaluate(t,e,i,r){return this.property.evaluate(this.value,this.parameters,t,e,i,r)}}class xh{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class bh{constructor(t){this.specification=t}possiblyEvaluate(t,e){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(e)}interpolate(t,e,i){const r=bc[this.specification.type];return r?r(t,e,i):t}}class wh{constructor(t,e){this.specification=t,this.overrides=e}possiblyEvaluate(t,e,i,r){return new vh(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},i,r)}:t.expression,e)}interpolate(t,e,i){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new vh(this,{kind:"constant",value:void 0},t.parameters);const r=bc[this.specification.type];if(r){const o=r(t.value.value,e.value.value,i);return new vh(this,{kind:"constant",value:o},t.parameters)}return t}evaluate(t,e,i,r,o,n){return"constant"===t.kind?t.value:t.evaluate(e,i,r,o,n)}}class Th extends wh{possiblyEvaluate(t,e,i,r){if(void 0===t.value)return new vh(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){const o=t.expression.evaluate(e,null,{},i,r),n="resolvedImage"===t.property.specification.type&&"string"!=typeof o?o.name:o,s=this._calculate(n,n,n,e);return new vh(this,{kind:"constant",value:s},e)}if("camera"===t.expression.kind){const i=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new vh(this,{kind:"constant",value:i},e)}return new vh(this,t.expression,e)}evaluate(t,e,i,r,o,n){if("source"===t.kind){const s=t.evaluate(e,i,r,o,n);return this._calculate(s,s,s,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},i,r),t.evaluate({zoom:Math.floor(e.zoom)},i,r),t.evaluate({zoom:Math.floor(e.zoom)+1},i,r),e):t.value}_calculate(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}}interpolate(t){return t}}class Sh{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){if(void 0!==t.value){if("constant"===t.expression.kind){const o=t.expression.evaluate(e,null,{},i,r);return this._calculate(o,o,o,e)}return this._calculate(t.expression.evaluate(new uh(Math.floor(e.zoom-1),e)),t.expression.evaluate(new uh(Math.floor(e.zoom),e)),t.expression.evaluate(new uh(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}}interpolate(t){return t}}class Ph{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)}interpolate(){return!1}}class Ih{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const e in t){const i=t[e];i.specification.overridable&&this.overridableProperties.push(e);const r=this.defaultPropertyValues[e]=new ph(i,void 0,void 0),o=this.defaultTransitionablePropertyValues[e]=new fh(i,void 0);this.defaultTransitioningPropertyValues[e]=o.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=r.possiblyEvaluate({})}}}Pi("DataDrivenProperty",wh),Pi("DataConstantProperty",bh),Pi("CrossFadedDataDrivenProperty",Th),Pi("CrossFadedProperty",Sh),Pi("ColorRampProperty",Ph);class Ch extends ml{constructor(t,e,i){if(super(),this.id=t.id,this.type=t.type,this._globalState=i,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=new Yc(this.visibility,i),"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=Ve(t.filter,i)),e.layout&&(this._unevaluatedLayout=new gh(e.layout,i)),e.paint)){this._transitionablePaint=new mh(e.paint,i);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xh(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=Ve(t,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;for(const e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(const e in this._unevaluatedLayout._values){const i=this._unevaluatedLayout._values[e];for(const e of i.getGlobalStateRefs())t.add(e)}for(const e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var t;const e=new globalThis.Map;if(this._transitionablePaint)for(const i in this._transitionablePaint._values){const r=this._transitionablePaint._values[i].value;for(const o of r.getGlobalStateRefs()){const n=null!==(t=e.get(o))&&void 0!==t?t:[];n.push({name:i,value:r.value}),e.set(o,n)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,i={}){if(null==e||!this._validate(oh,"layers."+this.id+".layout."+t,t,e,i))return"visibility"===t?(this.visibility=e,this._visibilityExpression.setValue(e),void this.recalculateVisibility()):void this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){return t.endsWith(dh)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,i={}){if(null!=e&&this._validate(rh,"layers."+this.id+".paint."+t,t,e,i))return!1;if(t.endsWith(dh))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{const i=this._transitionablePaint._values[t],r="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),n=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(t,n,s)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,i){return!1}isHidden(t=this.minzoom,e=!1){return!!(this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){const t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),M(t,((t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)))}_validate(t,e,i,r,o={}){return(!o||!1!==o.validate)&&Si(this,t.call(th,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:ua,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof vh&&xe(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}}let Mh;da={get paint(){return Mh=Mh||new Ih({"raster-opacity":new bh(ua.paint_raster["raster-opacity"]),"raster-hue-rotate":new bh(ua.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new bh(ua.paint_raster["raster-brightness-min"]),"raster-brightness-max":new bh(ua.paint_raster["raster-brightness-max"]),"raster-saturation":new bh(ua.paint_raster["raster-saturation"]),"raster-contrast":new bh(ua.paint_raster["raster-contrast"]),"raster-resampling":new bh(ua.paint_raster["raster-resampling"]),"raster-fade-duration":new bh(ua.paint_raster["raster-fade-duration"])})}};class Ah extends Ch{constructor(t,e){super(t,da,e)}}const kh={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Eh{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class zh{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}class Dh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.int16[r+0]=e,this.int16[r+1]=i,t}}Dh.prototype.bytesPerElement=4,Pi("StructArrayLayout2i4",Dh);class Lh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.int16[o+0]=e,this.int16[o+1]=i,this.int16[o+2]=r,t}}Lh.prototype.bytesPerElement=6,Pi("StructArrayLayout3i6",Lh);class Oh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r)}emplace(t,e,i,r,o){const n=4*t;return this.int16[n+0]=e,this.int16[n+1]=i,this.int16[n+2]=r,this.int16[n+3]=o,t}}Oh.prototype.bytesPerElement=8,Pi("StructArrayLayout4i8",Oh);class Rh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,s){const a=6*t;return this.int16[a+0]=e,this.int16[a+1]=i,this.int16[a+2]=r,this.int16[a+3]=o,this.int16[a+4]=n,this.int16[a+5]=s,t}}Rh.prototype.bytesPerElement=12,Pi("StructArrayLayout2i4i12",Rh);class Fh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,s){const a=4*t,l=8*t;return this.int16[a+0]=e,this.int16[a+1]=i,this.uint8[l+4]=r,this.uint8[l+5]=o,this.uint8[l+6]=n,this.uint8[l+7]=s,t}}Fh.prototype.bytesPerElement=8,Pi("StructArrayLayout2i4ub8",Fh);class jh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.float32[r+0]=e,this.float32[r+1]=i,t}}jh.prototype.bytesPerElement=8,Pi("StructArrayLayout2f8",jh);class Bh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a,l,c){const h=this.length;return this.resize(h+1),this.emplace(h,t,e,i,r,o,n,s,a,l,c)}emplace(t,e,i,r,o,n,s,a,l,c,h){const u=10*t;return this.uint16[u+0]=e,this.uint16[u+1]=i,this.uint16[u+2]=r,this.uint16[u+3]=o,this.uint16[u+4]=n,this.uint16[u+5]=s,this.uint16[u+6]=a,this.uint16[u+7]=l,this.uint16[u+8]=c,this.uint16[u+9]=h,t}}Bh.prototype.bytesPerElement=20,Pi("StructArrayLayout10ui20",Bh);class Vh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,i,r,o,n,s,a)}emplace(t,e,i,r,o,n,s,a,l){const c=8*t;return this.uint16[c+0]=e,this.uint16[c+1]=i,this.uint16[c+2]=r,this.uint16[c+3]=o,this.uint16[c+4]=n,this.uint16[c+5]=s,this.uint16[c+6]=a,this.uint16[c+7]=l,t}}Vh.prototype.bytesPerElement=16,Pi("StructArrayLayout8ui16",Vh);class Nh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a,l,c,h,u){const d=this.length;return this.resize(d+1),this.emplace(d,t,e,i,r,o,n,s,a,l,c,h,u)}emplace(t,e,i,r,o,n,s,a,l,c,h,u,d){const p=12*t;return this.int16[p+0]=e,this.int16[p+1]=i,this.int16[p+2]=r,this.int16[p+3]=o,this.uint16[p+4]=n,this.uint16[p+5]=s,this.uint16[p+6]=a,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=h,this.int16[p+10]=u,this.int16[p+11]=d,t}}Nh.prototype.bytesPerElement=24,Pi("StructArrayLayout4i4ui4i24",Nh);class Gh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.float32[o+0]=e,this.float32[o+1]=i,this.float32[o+2]=r,t}}Gh.prototype.bytesPerElement=12,Pi("StructArrayLayout3f12",Gh);class Uh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint32[1*t+0]=e,t}}Uh.prototype.bytesPerElement=4,Pi("StructArrayLayout1ul4",Uh);class qh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a,l){const c=this.length;return this.resize(c+1),this.emplace(c,t,e,i,r,o,n,s,a,l)}emplace(t,e,i,r,o,n,s,a,l,c){const h=10*t,u=5*t;return this.int16[h+0]=e,this.int16[h+1]=i,this.int16[h+2]=r,this.int16[h+3]=o,this.int16[h+4]=n,this.int16[h+5]=s,this.uint32[u+3]=a,this.uint16[h+8]=l,this.uint16[h+9]=c,t}}qh.prototype.bytesPerElement=20,Pi("StructArrayLayout6i1ul2ui20",qh);class Zh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,s){const a=6*t;return this.int16[a+0]=e,this.int16[a+1]=i,this.int16[a+2]=r,this.int16[a+3]=o,this.int16[a+4]=n,this.int16[a+5]=s,t}}Zh.prototype.bytesPerElement=12,Pi("StructArrayLayout2i2i2i12",Zh);class Wh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r,o)}emplace(t,e,i,r,o,n){const s=4*t,a=8*t;return this.float32[s+0]=e,this.float32[s+1]=i,this.float32[s+2]=r,this.int16[a+6]=o,this.int16[a+7]=n,t}}Wh.prototype.bytesPerElement=16,Pi("StructArrayLayout2f1f2i16",Wh);class Hh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,o,n)}emplace(t,e,i,r,o,n,s){const a=16*t,l=4*t,c=8*t;return this.uint8[a+0]=e,this.uint8[a+1]=i,this.float32[l+1]=r,this.float32[l+2]=o,this.int16[c+6]=n,this.int16[c+7]=s,t}}Hh.prototype.bytesPerElement=16,Pi("StructArrayLayout2ub2f2i16",Hh);class Xh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.uint16[o+0]=e,this.uint16[o+1]=i,this.uint16[o+2]=r,t}}Xh.prototype.bytesPerElement=6,Pi("StructArrayLayout3ui6",Xh);class Yh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_){const y=this.length;return this.resize(y+1),this.emplace(y,t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_)}emplace(t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y){const g=24*t,v=12*t,x=48*t;return this.int16[g+0]=e,this.int16[g+1]=i,this.uint16[g+2]=r,this.uint16[g+3]=o,this.uint32[v+2]=n,this.uint32[v+3]=s,this.uint32[v+4]=a,this.uint16[g+10]=l,this.uint16[g+11]=c,this.uint16[g+12]=h,this.float32[v+7]=u,this.float32[v+8]=d,this.uint8[x+36]=p,this.uint8[x+37]=f,this.uint8[x+38]=m,this.uint32[v+10]=_,this.int16[g+22]=y,t}}Yh.prototype.bytesPerElement=48,Pi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Yh);class Jh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C){const M=this.length;return this.resize(M+1),this.emplace(M,t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C)}emplace(t,e,i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C,M){const A=32*t,k=16*t;return this.int16[A+0]=e,this.int16[A+1]=i,this.int16[A+2]=r,this.int16[A+3]=o,this.int16[A+4]=n,this.int16[A+5]=s,this.int16[A+6]=a,this.int16[A+7]=l,this.uint16[A+8]=c,this.uint16[A+9]=h,this.uint16[A+10]=u,this.uint16[A+11]=d,this.uint16[A+12]=p,this.uint16[A+13]=f,this.uint16[A+14]=m,this.uint16[A+15]=_,this.uint16[A+16]=y,this.uint16[A+17]=g,this.uint16[A+18]=v,this.uint16[A+19]=x,this.uint16[A+20]=b,this.uint16[A+21]=w,this.uint16[A+22]=T,this.uint32[k+12]=S,this.float32[k+13]=P,this.float32[k+14]=I,this.uint16[A+30]=C,this.uint16[A+31]=M,t}}Jh.prototype.bytesPerElement=64,Pi("StructArrayLayout8i15ui1ul2f2ui64",Jh);class Kh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.float32[1*t+0]=e,t}}Kh.prototype.bytesPerElement=4,Pi("StructArrayLayout1f4",Kh);class $h extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=3*t;return this.uint16[6*t+0]=e,this.float32[o+1]=i,this.float32[o+2]=r,t}}$h.prototype.bytesPerElement=12,Pi("StructArrayLayout1ui2f12",$h);class Qh extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const o=4*t;return this.uint32[2*t+0]=e,this.uint16[o+2]=i,this.uint16[o+3]=r,t}}Qh.prototype.bytesPerElement=8,Pi("StructArrayLayout1ul2ui8",Qh);class tu extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=i,t}}tu.prototype.bytesPerElement=4,Pi("StructArrayLayout2ui4",tu);class eu extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){return this.uint16[1*t+0]=e,t}}eu.prototype.bytesPerElement=2,Pi("StructArrayLayout1ui2",eu);class iu extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r)}emplace(t,e,i,r,o){const n=4*t;return this.float32[n+0]=e,this.float32[n+1]=i,this.float32[n+2]=r,this.float32[n+3]=o,t}}iu.prototype.bytesPerElement=16,Pi("StructArrayLayout4f16",iu);class ru extends Eh{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new i(this.anchorPointX,this.anchorPointY)}}ru.prototype.size=20;class ou extends qh{get(t){return new ru(this,t)}}Pi("CollisionBoxArray",ou);class nu extends Eh{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}nu.prototype.size=48;class su extends Yh{get(t){return new nu(this,t)}}Pi("PlacedSymbolArray",su);class au extends Eh{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}au.prototype.size=64;class lu extends Jh{get(t){return new au(this,t)}}Pi("SymbolInstanceArray",lu);class cu extends Kh{getoffsetX(t){return this.float32[1*t+0]}}Pi("GlyphOffsetArray",cu);class hu extends Lh{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}Pi("SymbolLineVertexArray",hu);class uu extends Eh{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}uu.prototype.size=12;class du extends $h{get(t){return new uu(this,t)}}Pi("TextAnchorOffsetArray",du);class pu extends Eh{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}pu.prototype.size=8;class fu extends Qh{get(t){return new pu(this,t)}}Pi("FeatureIndexArray",fu);class mu extends Dh{}class _u extends Dh{}class yu extends Dh{}class gu extends Dh{}class vu extends Dh{}class xu extends Rh{}class bu extends Fh{}class wu extends jh{}class Tu extends Fh{}class Su extends jh{}class Pu extends Bh{}class Iu extends Vh{}class Cu extends Nh{}class Mu extends Gh{}class Au extends Uh{}class ku extends Zh{}class Eu extends Hh{}class zu extends Xh{}class Du extends tu{}const Lu=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ou}=Lu;class Ru{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,e,i,r){const o=this.segments[this.segments.length-1];return t>Ru.MAX_VERTEX_ARRAY_LENGTH&&k("Max vertices per segment is "+Ru.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t+". Consider using the `fillLargeMeshArrays` function if you require meshes with more than "+Ru.MAX_VERTEX_ARRAY_LENGTH+" vertices."),this._forceNewSegmentOnNextPrepare||!o||o.vertexLength+t>Ru.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==r?this.createNewSegment(e,i,r):o}createNewSegment(t,e,i){const r={vertexOffset:t.length,primitiveOffset:e.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==i&&(r.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(r),r}getOrCreateLatestSegment(t,e,i){return this.prepareSegment(0,t,e,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,i,r){return new Ru([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])}}Ru.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Pi("SegmentVector",Ru);const Fu=Vi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),ju=Vi([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var Bu,Vu;pa={exports:{}},fa={exports:{}},_a={exports:{}},ga||(ga=1,ma||(ma=1,fa.exports=function(t,e){var i,r,o,n,s,a,l,c;for(r=t.length-(i=3&t.length),o=e,s=3432918353,a=461845907,c=0;c<r;)l=255&t.charCodeAt(c)|(255&t.charCodeAt(++c))<<8|(255&t.charCodeAt(++c))<<16|(255&t.charCodeAt(++c))<<24,++c,o=27492+(65535&(n=5*(65535&(o=(o^=l=(65535&(l=(l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<15|l>>>17))*a+(((l>>>16)*a&65535)<<16)&4294967295}return o^=t.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0}),Bu=fa.exports,ya||(ya=1,_a.exports=function(t,e){for(var i,r=t.length,o=e^r,n=0;r>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+((1540483477*(i>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),r-=4,++n;switch(r){case 3:o^=(255&t.charCodeAt(n+2))<<16;case 2:o^=(255&t.charCodeAt(n+1))<<8;case 1:o=1540483477*(65535&(o^=255&t.charCodeAt(n)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0}),Vu=_a.exports,pa.exports=Bu,pa.exports.murmur3=Bu,pa.exports.murmur2=Vu),va=r(pa.exports);class Nu{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,e,i,r){this.ids.push(Ui(t)),this.positions.push(e,i,r)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const e=Ui(t);let i=0,r=this.ids.length-1;for(;i<r;){const t=i+r>>1;this.ids[t]>=e?r=t:i=t+1}const o=[];for(;this.ids[i]===e;)o.push({index:this.positions[3*i],start:this.positions[3*i+1],end:this.positions[3*i+2]}),i++;return o}static serialize(t,e){const i=new Float64Array(t.ids),r=new Uint32Array(t.positions);return qi(i,r,0,i.length-1),e&&e.push(i.buffer,r.buffer),{ids:i,positions:r}}static deserialize(t){const e=new Nu;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}Pi("FeaturePositionMap",Nu);class Gu{get rgb(){return[this.r,this.g,this.b,this.a]}get hcl(){return[0,0,0,this.a]}get lab(){return[0,0,0,this.a]}constructor(t,e,i,r=1){this.r=t,this.g=e,this.b=i,this.a=r,this.overwriteGetter=void 0}static parse(t){if(t.startsWith("#")){const e=t.slice(1);let i,r,o,n=1;if(3===e.length)i=parseInt(e[0]+e[0],16)/255,r=parseInt(e[1]+e[1],16)/255,o=parseInt(e[2]+e[2],16)/255;else if(6===e.length)i=parseInt(e.slice(0,2),16)/255,r=parseInt(e.slice(2,4),16)/255,o=parseInt(e.slice(4,6),16)/255;else{if(8!==e.length)return Gu.transparent;i=parseInt(e.slice(0,2),16)/255,r=parseInt(e.slice(2,4),16)/255,o=parseInt(e.slice(4,6),16)/255,n=parseInt(e.slice(6,8),16)/255}return new Gu(i,r,o,n)}const e=t.match(/rgba?\(([^)]+)\)/);if(e){const t=e[1].split(",").map((t=>parseFloat(t.trim())));if(t.length>=3)return new Gu(t[0]/255,t[1]/255,t[2]/255,void 0!==t[3]?t[3]:1)}return Gu.transparent}toString(){return"rgba("+Math.round(255*this.r)+", "+Math.round(255*this.g)+", "+Math.round(255*this.b)+", "+this.a+")"}}Gu.transparent=new Gu(0,0,0,0),Gu.black=new Gu(0,0,0,1),Gu.white=new Gu(1,1,1,1),Gu.red=new Gu(1,0,0,1);class Uu{constructor(t,e){this.gl=t.gl,this.location=e}}class qu extends Uu{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class Zu extends Uu{constructor(t,e){super(t,e),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class Wu extends Uu{constructor(t,e){super(t,e),this.current=Gu.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const Hu=new Float32Array(16);class Xu{constructor(t,e,i){this.value=t,this.uniformNames=e.map((t=>"u_"+t)),this.type=i}setUniform(t,e,i){t.set(i.constantOr(this.value))}getBinding(t,e,i){return"color"===this.type?new Wu(t,e):new qu(t,e)}}class Yu{constructor(t,e){this.uniformNames=e.map((t=>"u_"+t)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,i,r){let o=null;"u_pattern_to"===r||"u_top_pattern_to"===r||"u_side_pattern_to"===r||"u_direction_pattern_to"===r?o=this.patternTo:"u_pattern_from"===r||"u_top_pattern_from"===r||"u_side_pattern_from"===r||"u_direction_pattern_from"===r?o=this.patternFrom:"u_dasharray_to"===r?o=this.dashTo:"u_dasharray_from"===r?o=this.dashFrom:"u_pixel_ratio_to"===r||"u_top_pixel_ratio_to"===r||"u_side_pixel_ratio_to"===r||"u_direction_pixel_ratio_to"===r?o=this.pixelRatioTo:"u_pixel_ratio_from"!==r&&"u_top_pixel_ratio_from"!==r&&"u_side_pixel_ratio_from"!==r&&"u_direction_pixel_ratio_from"!==r||(o=this.pixelRatioFrom),null!==o&&t.set(o)}getBinding(t,e,i){return"u_pattern_to"===i||"u_pattern_from"===i||"u_top_pattern_to"===i||"u_top_pattern_from"===i||"u_side_pattern_to"===i||"u_side_pattern_from"===i||"u_direction_pattern_to"===i||"u_direction_pattern_from"===i||"u_dasharray_to"===i||"u_dasharray_from"===i?new Zu(t,e):new qu(t,e)}}class Ju{constructor(t,e,i,r){this.expression=t,this.type=i,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:"a_"+t,type:"Float32",components:"color"===i?2:1,offset:0}))),this.paintVertexArray=new r}populatePaintArray(t,e,i){const r=this.paintVertexArray.length,o=this.expression.evaluate(new uh(0,i),e,{},i.canonical,[],i.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(r,t,o)}updatePaintArray(t,e,i,r,o){const n=this.expression.evaluate(new uh(0,o),i,r);this._setPaintValue(t,e,n)}_setPaintValue(t,e,i){if("color"===this.type){const r=Wi(i);for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,r[0],r[1])}else{for(let r=t;r<e;r++)this.paintVertexArray.emplace(r,i);this.maxValue=Math.max(this.maxValue,Math.abs(i))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ku{constructor(t,e,i,r,o,n){this.expression=t,this.uniformNames=e.map((t=>"u_"+t+"_t")),this.type=i,this.useIntegerZoom=r,this.zoom=o,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:"a_"+t,type:"Float32",components:"color"===i?4:2,offset:0}))),this.paintVertexArray=new n}populatePaintArray(t,e,i){const r=this.expression.evaluate(new uh(this.zoom,i),e,{},i.canonical,[],i.formattedSection),o=this.expression.evaluate(new uh(this.zoom+1,i),e,{},i.canonical,[],i.formattedSection),n=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(n,t,r,o)}updatePaintArray(t,e,i,r,o){const n=this.expression.evaluate(new uh(this.zoom,o),i,r),s=this.expression.evaluate(new uh(this.zoom+1,o),i,r);this._setPaintValue(t,e,n,s)}_setPaintValue(t,e,i,r){if("color"===this.type){const o=Wi(i),n=Wi(r);for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,o[0],o[1],n[0],n[1])}else{for(let o=t;o<e;o++)this.paintVertexArray.emplace(o,i,r);this.maxValue=Math.max(this.maxValue,Math.abs(i),Math.abs(r))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,e){const i=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,r=S(this.expression.interpolationFactor(i,this.zoom,this.zoom+1),0,1);t.set(r)}getBinding(t,e,i){return new qu(t,e)}}class $u{constructor(t,e,i,r,o,n){this.expression=t,this.type=e,this.useIntegerZoom=i,this.zoom=r,this.patternStorageKey=n,this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o}populatePaintArray(t,e,i){const r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(r,t,this.getPositionIds(e),i)}updatePaintArray(t,e,i,r,o){this._setPaintValues(t,e,this.getPositionIds(i),o)}_setPaintValues(t,e,i,r){const o=this.getPositions(r);if(!o||!i)return;const n=o[i.min],s=o[i.mid],a=o[i.max];if(n&&s&&a)for(let i=t;i<e;i++)this.emplace(this.zoomInPaintVertexArray,i,s,n),this.emplace(this.zoomOutPaintVertexArray,i,s,a)}upload(t){if(this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer){const e=this.getVertexAttributes();this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,e,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,e,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Qu extends $u{getPositions(t){return t.imagePositions}getPositionIds(t){return t.patterns&&t.patterns[this.patternStorageKey]}getVertexAttributes(){return Fu.members}emplace(t,e,i,r){t.emplace(e,i.tlbr[0],i.tlbr[1],i.tlbr[2],i.tlbr[3],r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],i.pixelRatio,r.pixelRatio)}}class td extends $u{getPositions(t){return t.dashPositions}getPositionIds(t){return t.dashes&&t.dashes[this.patternStorageKey]}getVertexAttributes(){return ju.members}emplace(t,e,i,r){t.emplace(e,0,i.y,i.height,i.width,0,r.y,r.height,r.width)}}class ed{constructor(t,e,i){this.binders={},this._buffers=[];const r=[];for(const o in t.paint._values){if(!i(o))continue;const n=t.paint.get(o);if(!(n instanceof vh&&xe(n.property.specification)))continue;const s=Hi(o,t.type),a=n.value,l=n.property.specification.type,c=n.property.useIntegerZoom,h=n.property.specification["property-type"],u="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===a.kind)this.binders[o]=u?new Yu(a.value,s):new Xu(a.value,s,l),r.push("/u_"+o);else if("source"===a.kind||u){const i=Xi(o,l,"source"),n="prism-overlay"===t.type?t.id+":"+o:t.id;this.binders[o]=u?"line-dasharray"===o?new td(a,l,c,e,i,n):new Qu(a,l,c,e,i,n):new Ju(a,s,l,i),r.push("/a_"+o)}else{const t=Xi(o,l,"composite");this.binders[o]=new Ku(a,s,l,c,e,t),r.push("/z_"+o)}}this.cacheKey=r.sort().join("")}getMaxValue(t){const e=this.binders[t];return e instanceof Ju||e instanceof Ku?e.maxValue:0}populatePaintArrays(t,e,i){for(const r in this.binders){const o=this.binders[r];(o instanceof Ju||o instanceof Ku||o instanceof $u)&&o.populatePaintArray(t,e,i)}}setConstantPatternPositions(t,e){for(const i in this.binders){const r=this.binders[i];r instanceof Yu&&r.setConstantPatternPositions(t,e)}}setConstantPatternPositionsForProperty(t,e,i){const r=this.binders[t];r instanceof Yu&&r.setConstantPatternPositions(e,i)}setConstantDashPositions(t,e){for(const i in this.binders){const r=this.binders[i];r instanceof Yu&&r.setConstantDashPositions(t,e)}}updatePaintArrays(t,e,i,r,o){let n=!1;for(const s in t){const a=e.getPositions(s);for(const e of a){const a=i.feature(e.index);for(const i in this.binders){const l=this.binders[i];if((l instanceof Ju||l instanceof Ku||l instanceof $u)&&!0===l.expression.isStateDependent){const c=r.paint.get(i);l.expression=c.value,l.updatePaintArray(e.start,e.end,a,t[s],o),n=!0}}}}return n}defines(){const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof Xu||i instanceof Yu)&&t.push(...i.uniformNames.map((t=>"#define HAS_UNIFORM_"+t)))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const i=this.binders[e];if(i instanceof Ju||i instanceof Ku)for(let e=0;e<i.paintVertexAttributes.length;e++)t.push(i.paintVertexAttributes[e].name);else if(i instanceof $u){const e=i.getVertexAttributes();for(const i of e)t.push(i.name)}}return t}getBinderUniforms(){const t=[];for(const e in this.binders){const i=this.binders[e];if(i instanceof Xu||i instanceof Yu||i instanceof Ku)for(const e of i.uniformNames)t.push(e)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){const i=[];for(const r in this.binders){const o=this.binders[r];if(o instanceof Xu||o instanceof Yu||o instanceof Ku)for(const n of o.uniformNames)if(e[n]){const s=o.getBinding(t,e[n],n);i.push({name:n,property:r,binding:s})}}return i}setUniforms(t,e,i,r){for(const{name:t,property:o,binding:n}of e)this.binders[o].setUniform(n,r,i.get(o),t)}updatePaintBuffers(t){this._buffers=[];for(const e in this.binders){const i=this.binders[e];if(t&&i instanceof $u){const e=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;e&&this._buffers.push(e)}else(i instanceof Ju||i instanceof Ku)&&i.paintVertexBuffer&&this._buffers.push(i.paintVertexBuffer)}}upload(t){for(const e in this.binders){const i=this.binders[e];(i instanceof Ju||i instanceof Ku||i instanceof $u)&&i.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const e=this.binders[t];(e instanceof Ju||e instanceof Ku||e instanceof $u)&&e.destroy()}}}class id{constructor(t,e,i=()=>!0){this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=new ed(r,e,i);this.needsUpload=!1,this._featureMap=new Nu,this._bufferOffset=0}populatePaintArrays(t,e,i,r){for(const i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(t,e,r);void 0!==e.id&&this._featureMap.add(e.id,i,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,i,r){for(const o of i)this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,r)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}Pi("ConstantBinder",Xu),Pi("CrossFadedConstantBinder",Yu),Pi("SourceExpressionBinder",Ju),Pi("CrossFadedPatternBinder",Qu),Pi("CrossFadedDasharrayBinder",td),Pi("CompositeExpressionBinder",Ku),Pi("ProgramConfiguration",ed,{omit:["_buffers"]}),Pi("ProgramConfigurationSet",id);const rd=Math.pow(2,14)-1,od=-rd-1,nd=-32768;class sd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new _u,this.indexArray=new zu,this.segments=new Ru,this.programConfigurations=new id(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){const r=this.layers[0],o=[];let n=null,s=!1,a="heatmap"===r.type;if("circle"===r.type){const t=r;n=t.layout.get("circle-sort-key"),s=!n.isConstant(),a=a||"map"===t.paint.get("circle-pitch-alignment")}const l=a?e.subdivisionGranularity.circle:1;for(const{feature:e,id:r,index:a,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Ji(e,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),c,i))continue;const h=s?n.evaluate(c,{},i):void 0,u={id:r,properties:e.properties,type:e.type,sourceLayerIndex:l,index:a,geometry:t?c.geometry:Yi(e),patterns:{},sortKey:h};o.push(u)}s&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of o){const{geometry:o,index:n,sourceLayerIndex:s}=r,a=t[n].feature;this.addFeature(r,o,n,i,l),e.featureIndex.insert(a,o,n,s,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ou),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,i,r,o=1){let n;switch(o){case 1:n=[0,7];break;case 3:n=[0,2,5,7];break;case 5:n=[0,1,3,4,6,7];break;case 7:n=[0,1,2,3,4,5,6,7];break;default:throw new Error("Invalid circle bucket granularity: "+o+"; valid values are 1, 3, 5, 7.")}const s=n.length;for(const i of e)for(const e of i){const i=e.x,r=e.y;if(i<0||i>=Ja||r<0||r>=Ja)continue;const o=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),a=o.vertexLength;for(let t=0;t<s;t++)for(let e=0;e<s;e++)this.layoutVertexArray.emplaceBack(nd+8*i+n[e],nd+8*r+n[t]);for(let t=0;t<s-1;t++)for(let e=0;e<s-1;e++){const i=a+t*s+e,r=a+(t+1)*s+e;this.indexArray.emplaceBack(i,r+1,i+1),this.indexArray.emplaceBack(i,r,r+1)}o.vertexLength+=s*s,o.primitiveLength+=(s-1)*(s-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:{},canonical:r})}}let ad,ld;Pi("CircleBucket",sd,{omit:["layers"]}),xa={get paint(){return ld=ld||new Ih({"circle-radius":new wh(ua.paint_circle["circle-radius"]),"circle-color":new wh(ua.paint_circle["circle-color"]),"circle-blur":new wh(ua.paint_circle["circle-blur"]),"circle-opacity":new wh(ua.paint_circle["circle-opacity"]),"circle-translate":new bh(ua.paint_circle["circle-translate"]),"circle-translate-anchor":new bh(ua.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new bh(ua.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new bh(ua.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new wh(ua.paint_circle["circle-stroke-width"]),"circle-stroke-color":new wh(ua.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new wh(ua.paint_circle["circle-stroke-opacity"])})},get layout(){return ad=ad||new Ih({"circle-sort-key":new wh(ua.layout_circle["circle-sort-key"])})}};class cd extends Ch{constructor(t,e){super(t,xa,e)}createBucket(t){return new sd(t)}queryRadius(t){const e=t;return lr("circle-radius",this,e)+lr("circle-stroke-width",this,e)+cr(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n,unwrappedTileID:s,getElevation:a}){const l=hr(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-o.bearingInRadians,n),c=this.paint.get("circle-radius").evaluate(e,i)+this.paint.get("circle-stroke-width").evaluate(e,i),h=this.paint.get("circle-pitch-scale"),u=this.paint.get("circle-pitch-alignment");let d,p;return"map"===u?(d=l,p=c*n):(d=vr(l,o,s,a),p=c),yr({queryGeometry:d,size:p,transform:o,unwrappedTileID:s,getElevation:a,pitchAlignment:u,pitchScale:h},r)}}const hd=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:ud}=hd;let dd,pd;ba={get paint(){return pd=pd||new Ih({"circle-radius":new wh(ua["paint_circle-overlay"]["circle-radius"]),"circle-color":new wh(ua["paint_circle-overlay"]["circle-color"]),"circle-blur":new wh(ua["paint_circle-overlay"]["circle-blur"]),"circle-opacity":new wh(ua["paint_circle-overlay"]["circle-opacity"]),"circle-translate":new bh(ua["paint_circle-overlay"]["circle-translate"]),"circle-translate-anchor":new bh(ua["paint_circle-overlay"]["circle-translate-anchor"]),"circle-pitch-scale":new bh(ua["paint_circle-overlay"]["circle-pitch-scale"]),"circle-pitch-alignment":new bh(ua["paint_circle-overlay"]["circle-pitch-alignment"]),"circle-stroke-width":new wh(ua["paint_circle-overlay"]["circle-stroke-width"]),"circle-stroke-color":new wh(ua["paint_circle-overlay"]["circle-stroke-color"]),"circle-stroke-opacity":new wh(ua["paint_circle-overlay"]["circle-stroke-opacity"]),"circle-overlay-body-radius":new wh(ua["paint_circle-overlay"]["circle-overlay-body-radius"]),"circle-overlay-blur-color":new bh(ua["paint_circle-overlay"]["circle-overlay-blur-color"]),"circle-overlay-in-shadow-width":new wh(ua["paint_circle-overlay"]["circle-overlay-in-shadow-width"]),"circle-overlay-in-shadow-color":new bh(ua["paint_circle-overlay"]["circle-overlay-in-shadow-color"]),"circle-overlay-in-shadow-opacity":new bh(ua["paint_circle-overlay"]["circle-overlay-in-shadow-opacity"]),"circle-radar-enabled":new wh(ua["paint_circle-overlay"]["circle-radar-enabled"]),"circle-radar-type":new bh(ua["paint_circle-overlay"]["circle-radar-type"]),"circle-radar-color":new bh(ua["paint_circle-overlay"]["circle-radar-color"]),"circle-radar-opacity":new bh(ua["paint_circle-overlay"]["circle-radar-opacity"]),"circle-radar-radius":new bh(ua["paint_circle-overlay"]["circle-radar-radius"]),"circle-radar-width":new bh(ua["paint_circle-overlay"]["circle-radar-width"]),"circle-radar-duration":new bh(ua["paint_circle-overlay"]["circle-radar-duration"]),"circle-radar-wave-count":new bh(ua["paint_circle-overlay"]["circle-radar-wave-count"]),"circle-radar-gradient":new bh(ua["paint_circle-overlay"]["circle-radar-gradient"])})},get layout(){return dd=dd||new Ih({"circle-sort-key":new wh(ua["layout_circle-overlay"]["circle-sort-key"])})}};const fd=new Set(["circle-overlay-blur-color","circle-overlay-in-shadow-color","circle-overlay-in-shadow-opacity","circle-radar-type","circle-radar-color","circle-radar-opacity","circle-radar-radius","circle-radar-width","circle-radar-duration","circle-radar-wave-count","circle-radar-gradient"]),md=-32768;class _d{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new yu,this.indexArray=new zu,this.segments=new Ru,this.programConfigurations=new id(t.layers,t.zoom,xr),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){const r=this.layers[0],o=[],n=r.layout.get("circle-sort-key"),s=!n.isConstant(),a="map"===r.paint.get("circle-pitch-alignment")?e.subdivisionGranularity.circle:1;for(const{feature:e,id:a,index:l,sourceLayerIndex:c}of t){const t=r._featureFilter.needGeometry,h=Ji(e,t);if(!r._featureFilter.filter(new uh(this.zoom),h,i))continue;const u=s?n.evaluate(h,{},i):void 0,d={id:a,properties:e.properties,type:e.type,sourceLayerIndex:c,index:l,geometry:t?h.geometry:Yi(e),patterns:{},sortKey:u};o.push(d)}s&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of o){const{geometry:o,index:n,sourceLayerIndex:s}=r,l=t[n].feature;this.addFeature(r,o,n,i,a),e.featureIndex.insert(l,o,n,s,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ud),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,i,r,o=1){let n;switch(o){case 1:n=[0,7];break;case 3:n=[0,2,5,7];break;case 5:n=[0,1,3,4,6,7];break;case 7:n=[0,1,2,3,4,5,6,7];break;default:throw new Error("Invalid circle overlay bucket granularity: "+o+"; valid values are 1, 3, 5, 7.")}const s=n.length;for(const i of e)for(const e of i){const i=e.x,r=e.y;if(i<0||i>=Ja||r<0||r>=Ja)continue;const o=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),a=o.vertexLength;for(let t=0;t<s;t++)for(let e=0;e<s;e++)this.layoutVertexArray.emplaceBack(md+8*i+n[e],md+8*r+n[t]);for(let t=0;t<s-1;t++)for(let e=0;e<s-1;e++){const i=a+t*s+e,r=a+(t+1)*s+e;this.indexArray.emplaceBack(i,r+1,i+1),this.indexArray.emplaceBack(i,r,r+1)}o.vertexLength+=s*s,o.primitiveLength+=(s-1)*(s-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:{},canonical:r})}}Pi("CircleOverlayBucket",_d,{omit:["layers"]});class yd extends Ch{constructor(t,e){super(t,ba,e)}createBucket(t){return new _d(t)}queryRadius(t){const e=t,i=lr("circle-radius",this,e),r=lr("circle-overlay-body-radius",this,e)>0?i:i+lr("circle-stroke-width",this,e),o=lr("circle-radar-enabled",this,e)>0?this.paint.get("circle-radar-radius")+1.6*this.paint.get("circle-radar-width"):0;return Math.max(r,o)+cr(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n,unwrappedTileID:s,getElevation:a}){const l=hr(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-o.bearingInRadians,n),c=this.paint.get("circle-radius").evaluate(e,i),h=this.paint.get("circle-stroke-width").evaluate(e,i),u=this.paint.get("circle-overlay-body-radius").evaluate(e,i)>0?c:c+h,d=this.paint.get("circle-radar-enabled").evaluate(e,i)>0?this.paint.get("circle-radar-radius")+1.6*this.paint.get("circle-radar-width"):0,p=Math.max(u,d),f=this.paint.get("circle-pitch-scale"),m=this.paint.get("circle-pitch-alignment");let _,y;return"map"===m?(_=l,y=p*n):(_=vr(l,o,s,a),y=p),yr({queryGeometry:_,size:y,transform:o,unwrappedTileID:s,getElevation:a,pitchAlignment:m,pitchScale:f},r)}}class gd extends sd{}let vd;Pi("HeatmapBucket",gd,{omit:["layers"]}),wa={get paint(){return vd=vd||new Ih({"heatmap-radius":new wh(ua.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wh(ua.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new bh(ua.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ph(ua.paint_heatmap["heatmap-color"]),"heatmap-opacity":new bh(ua.paint_heatmap["heatmap-opacity"])})}};class xd{constructor(t,e){br(this,t,1,e)}resize(t){wr(this,t,1)}clone(){return new xd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,i,r,o){Tr(t,e,i,r,o,1)}}class bd{constructor(t,e){br(this,t,4,e)}resize(t){wr(this,t,4)}replace(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new bd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,e,i,r,o){Tr(t,e,i,r,o,4)}setPixel(t,e,i){const r=4*(t*this.width+e);this.data[r+0]=Math.round(255*i.r/i.a),this.data[r+1]=Math.round(255*i.g/i.a),this.data[r+2]=Math.round(255*i.b/i.a),this.data[r+3]=Math.round(255*i.a)}}Pi("AlphaImage",xd),Pi("RGBAImage",bd);const wd="big-fb";class Td extends Ch{createBucket(t){return new gd(t)}constructor(t,e){super(t,wa,e),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"heatmap-color"===t&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Sr({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(wd)&&this.heatmapFbos.delete(wd)}queryRadius(t){return lr("heatmap-radius",this,t)}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n,unwrappedTileID:s,getElevation:a}){return yr({queryGeometry:t,size:this.paint.get("heatmap-radius").evaluate(e,i)*n,transform:o,unwrappedTileID:s,getElevation:a},r)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&!this.isHidden()}}let Sd,Pd;Ta={get paint(){return Sd=Sd||new Ih({"hillshade-illumination-direction":new bh(ua.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new bh(ua.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new bh(ua.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new bh(ua.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new bh(ua.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new bh(ua.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new bh(ua.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new bh(ua.paint_hillshade["hillshade-method"])})}};class Id extends Ch{constructor(t,e){super(t,Ta,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,i=this.paint.get("hillshade-highlight-color").values,r=this.paint.get("hillshade-shadow-color").values;const o=Math.max(t.length,e.length,i.length,r.length);t=t.concat(Array(o-t.length).fill(t.at(-1))),e=e.concat(Array(o-e.length).fill(e.at(-1))),i=i.concat(Array(o-i.length).fill(i.at(-1))),r=r.concat(Array(o-r.length).fill(r.at(-1)));const n=e.map(R);return{directionRadians:t.map(R),altitudeRadians:n,shadowColor:r,highlightColor:i}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&!this.isHidden()}}Sa={get paint(){return Pd=Pd||new Ih({"color-relief-opacity":new bh(ua["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new Ph(ua["paint_color-relief"]["color-relief-color"])})}};class Cd{constructor(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}update(t,e,i){const{width:r,height:o}=t,n=!(this.size&&this.size[0]===r&&this.size[1]===o||i),{context:s}=this,{gl:a}=s;if(this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!e||!1!==e.premultiply)),n)this.size=[r,o],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||D(t)?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,r,o,0,this.format,a.UNSIGNED_BYTE,t.data);else{const{x:e,y:n}=i||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||D(t)?a.texSubImage2D(a.TEXTURE_2D,0,e,n,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,e,n,r,o,a.RGBA,a.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(t,e,i){const{context:r}=this,{gl:o}=r;o.bindTexture(o.TEXTURE_2D,this.texture),i!==o.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(i=o.LINEAR),t!==this.filter&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,t),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,i||t),this.filter=t),e!==this.wrap&&(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,e),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,e),this.wrap=e)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class Md{constructor(t,e,i,r=1,o=1,n=1,s=0){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i))return void k('"'+i+'" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".');this.stride=e.height;const a=this.dim=e.height-2;switch(this.data=new Uint32Array(e.data.buffer),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=r,this.greenFactor=o,this.blueFactor=n,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let t=0;t<a;t++)this.data[this._idx(-1,t)]=this.data[this._idx(0,t)],this.data[this._idx(a,t)]=this.data[this._idx(a-1,t)],this.data[this._idx(t,-1)]=this.data[this._idx(t,0)],this.data[this._idx(t,a)]=this.data[this._idx(t,a-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(a,-1)]=this.data[this._idx(a-1,0)],this.data[this._idx(-1,a)]=this.data[this._idx(0,a-1)],this.data[this._idx(a,a)]=this.data[this._idx(a-1,a-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let t=0;t<a;t++)for(let e=0;e<a;e++){const i=this.get(t,e);i>this.max&&(this.max=i),i<this.min&&(this.min=i)}}get(t,e){const i=new Uint8Array(this.data.buffer),r=4*this._idx(t,e);return this.unpack(i[r],i[r+1],i[r+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("Out of range source coordinates for DEM data. x: "+t+", y: "+e+", dim: "+this.dim);return(e+1)*this.stride+(t+1)}unpack(t,e,i){return t*this.redFactor+e*this.greenFactor+i*this.blueFactor-this.baseShift}pack(t){return Pr(t,this.getUnpackVector())}getPixels(){return new bd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,e,i){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let r=e*this.dim,o=e*this.dim+this.dim,n=i*this.dim,s=i*this.dim+this.dim;switch(e){case-1:r=o-1;break;case 1:o=r+1}switch(i){case-1:n=s-1;break;case 1:s=n+1}const a=-e*this.dim,l=-i*this.dim;for(let e=n;e<s;e++)for(let i=r;i<o;i++)this.data[this._idx(i,e)]=t.data[this._idx(i+a,e+l)]}}Pi("DEMData",Md);class Ad extends Ch{constructor(t,e){super(t,Sa,e)}_createColorRamp(t){const e={elevationStops:[],colorStops:[]},i=this._transitionablePaint._values["color-relief-color"].value.expression;if(i instanceof Zc&&i._styleExpression.expression instanceof xc){this.colorRampExpression=i;const t=i._styleExpression.expression;e.elevationStops=t.labels,e.colorStops=[];for(const i of e.elevationStops)e.colorStops.push(t.evaluate({globals:{elevation:i}}))}if(e.elevationStops.length<1&&(e.elevationStops=[0],e.colorStops=[Gu.transparent]),e.elevationStops.length<2&&(e.elevationStops.push(e.elevationStops[0]+1),e.colorStops.push(e.colorStops[0])),e.elevationStops.length<=t)return e;const r={elevationStops:[],colorStops:[]},o=(e.elevationStops.length-1)/(t-1);for(let t=0;t<e.elevationStops.length-.5;t+=o)r.elevationStops.push(e.elevationStops[Math.round(t)]),r.colorStops.push(e.colorStops[Math.round(t)]);return k("Too many colors in specification of "+this.id+" color-relief layer, may not render properly. Max possible colors: "+t+", provided: "+e.elevationStops.length),r}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(t,e,i){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;const r=this._createColorRamp(e),o=new bd({width:r.colorStops.length,height:1}),n=new bd({width:r.colorStops.length,height:1});for(let t=0;t<r.elevationStops.length;t++){const e=Pr(r.elevationStops[t],i);n.setPixel(0,t,new Gu(e.r/255,e.g/255,e.b/255,1)),o.setPixel(0,t,r.colorStops[t])}return this.colorRampTextures={elevationTexture:new Cd(t,n,t.gl.RGBA),colorTexture:new Cd(t,o,t.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}}const kd=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ed}=kd,zd=["top-fill-pattern","side-fill-pattern"];class Dd{constructor(t,e){if(e>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class Ld{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}Ld.noSubdivision=new Ld({fill:new Dd(0,0),line:new Dd(0,0),tile:new Dd(0,0),stencil:new Dd(0,0),circle:1}),Pi("SubdivisionGranularityExpression",Dd),Pi("SubdivisionGranularitySetting",Ld);const Od=-32768,Rd=32767;class Fd{constructor(t,e){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=Ja/t,this._canonical=e}_getKey(t,e){return(t+=32768)<<16|e+32768}_vertexToIndex(t,e){if(t<-32768||e<-32768||t>32767||e>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const i=0|Math.round(t),r=0|Math.round(e),o=this._getKey(i,r);if(this._vertexDictionary.has(o))return this._vertexDictionary.get(o);const n=this._vertexBuffer.length/2;return this._vertexDictionary.set(o,n),this._vertexBuffer.push(i,r),n}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(t,e){const i=[];for(let r=0;r<e.length;r+=3){const o=e[r],n=e[r+1],s=e[r+2],a=t[2*o],l=t[2*o+1];(t[2*n]-a)*(t[2*s+1]-l)-(t[2*n+1]-l)*(t[2*s]-a)>0?(i.push(o),i.push(s),i.push(n)):(i.push(o),i.push(n),i.push(s))}return i}(this._vertexBuffer,t);const e=[],i=t.length;for(let r=0;r<i;r+=3){const i=[t[r+0],t[r+1],t[r+2]],o=[this._vertexBuffer[2*t[r+0]+0],this._vertexBuffer[2*t[r+0]+1],this._vertexBuffer[2*t[r+1]+0],this._vertexBuffer[2*t[r+1]+1],this._vertexBuffer[2*t[r+2]+0],this._vertexBuffer[2*t[r+2]+1]];let n=1/0,s=1/0,a=-1/0,l=-1/0;for(let t=0;t<3;t++){const e=o[2*t],i=o[2*t+1];n=Math.min(n,e),a=Math.max(a,e),s=Math.min(s,i),l=Math.max(l,i)}if(n===a||s===l)continue;const c=Math.floor(n/this._granularityCellSize),h=Math.ceil(a/this._granularityCellSize),u=Math.floor(s/this._granularityCellSize),d=Math.ceil(l/this._granularityCellSize);if(c!==h||u!==d)for(let t=u;t<d;t++){const r=this._scanlineGenerateVertexRingForCellRow(t,o,i);io(this._vertexBuffer,r,e)}else e.push(...i)}return e}_scanlineGenerateVertexRingForCellRow(t,e,i){const r=t*this._granularityCellSize,o=r+this._granularityCellSize,n=[];for(let t=0;t<3;t++){const s=e[2*t],a=e[2*t+1],l=e[2*(t+1)%6],c=e[(2*(t+1)+1)%6],h=e[2*(t+2)%6],u=e[(2*(t+2)+1)%6],d=l-s,p=c-a,f=0===d,m=0===p,_=(r-a)/p,y=(o-a)/p,g=Math.min(_,y),v=Math.max(_,y);if(!m&&(g>=1||v<=0)||m&&(a<r||a>o)){c>=r&&c<=o&&n.push(i[(t+1)%3]);continue}!m&&g>0&&n.push(this._vertexToIndex(s+d*g,a+p*g));const x=s+d*Math.max(g,0),b=s+d*Math.min(v,1);f||this._generateIntraEdgeVertices(n,s,a,l,c,x,b),!m&&v<1&&n.push(this._vertexToIndex(s+d*v,a+p*v)),(m||c>=r&&c<=o)&&n.push(i[(t+1)%3]),!m&&(c<=r||c>=o)&&this._generateInterEdgeVertices(n,s,a,l,c,h,u,b,r,o)}return n}_generateIntraEdgeVertices(t,e,i,r,o,n,s){const a=r-e,l=o-i,c=0===l,h=c?Math.min(e,r):Math.min(n,s),u=c?Math.max(e,r):Math.max(n,s),d=Math.floor(h/this._granularityCellSize)+1,p=Math.ceil(u/this._granularityCellSize)-1;if(c?e<r:n<s)for(let r=d;r<=p;r++){const o=r*this._granularityCellSize;t.push(this._vertexToIndex(o,i+l*(o-e)/a))}else for(let r=p;r>=d;r--){const o=r*this._granularityCellSize;t.push(this._vertexToIndex(o,i+l*(o-e)/a))}}_generateInterEdgeVertices(t,e,i,r,o,n,s,a,l,c){const h=o-i,u=n-r,d=s-o,p=(l-o)/d,f=(c-o)/d,m=Math.min(p,f),_=Math.max(p,f),y=r+u*m;let g=Math.floor(Math.min(y,a)/this._granularityCellSize)+1,v=Math.ceil(Math.max(y,a)/this._granularityCellSize)-1,x=a<y;const b=0===d;if(b&&(s===l||s===c))return;if(b||m>=1||_<=0){const t=i-s,r=n+(e-n)*Math.min((l-s)/t,(c-s)/t);g=Math.floor(Math.min(r,a)/this._granularityCellSize)+1,v=Math.ceil(Math.max(r,a)/this._granularityCellSize)-1,x=a<r}const w=h>0?c:l;if(x)for(let e=g;e<=v;e++)t.push(this._vertexToIndex(e*this._granularityCellSize,w));else for(let e=v;e>=g;e--)t.push(this._vertexToIndex(e*this._granularityCellSize,w))}_generateOutline(t){const e=[];for(const i of t){const t=eo(i,this._granularity,!0),r=this._pointArrayToIndices(t),o=[];for(let t=1;t<r.length;t++)o.push(r[t-1]),o.push(r[t]);e.push(o)}return e}_handlePoles(t){let e=!1,i=!1;this._canonical&&(0===this._canonical.y&&(e=!0),this._canonical.y===(1<<this._canonical.z)-1&&(i=!0)),(e||i)&&this._fillPoles(t,e,i)}_ensureNoPoleVertices(){const t=this._vertexBuffer;for(let e=0;e<t.length;e+=2){const i=t[e+1];i===Od&&(t[e+1]=-32767),i===Rd&&(t[e+1]=32766)}}_generatePoleQuad(t,e,i,r,o,n){r>o!=(n===Od)?(t.push(e),t.push(i),t.push(this._vertexToIndex(r,n)),t.push(i),t.push(this._vertexToIndex(o,n)),t.push(this._vertexToIndex(r,n))):(t.push(i),t.push(e),t.push(this._vertexToIndex(r,n)),t.push(this._vertexToIndex(o,n)),t.push(i),t.push(this._vertexToIndex(r,n)))}_fillPoles(t,e,i){const r=this._vertexBuffer,o=Ja,n=t.length;for(let s=2;s<n;s+=3){const n=t[s-2],a=t[s-1],l=t[s],c=r[2*n],h=r[2*n+1],u=r[2*a],d=r[2*a+1],p=r[2*l],f=r[2*l+1];e&&(0===h&&0===d&&this._generatePoleQuad(t,n,a,c,u,Od),0===d&&0===f&&this._generatePoleQuad(t,a,l,u,p,Od),0===f&&0===h&&this._generatePoleQuad(t,l,n,p,c,Od)),i&&(h===o&&d===o&&this._generatePoleQuad(t,n,a,c,u,Rd),d===o&&f===o&&this._generatePoleQuad(t,a,l,u,p,Rd),f===o&&h===o&&this._generatePoleQuad(t,l,n,p,c,Rd))}}_initializeVertices(t){for(let e=0;e<t.length;e+=2)this._vertexToIndex(t[e],t[e+1])}subdividePolygonInternal(t,e){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:i,holeIndices:r}=function(t){const e=[],i=[];for(const r of t)if(0!==r.length){r!==t[0]&&e.push(i.length/2);for(let t=0;t<r.length;t++)i.push(r[t].x),i.push(r[t].y)}return{flattened:i,holeIndices:e}}(t);let o;this._initializeVertices(i);try{const t=function(t,e,i=2){const r=e&&e.length,o=r?e[0]*i:t.length;let n=Er(t,0,o,i,!0);const s=[];if(!n||n.next===n.prev)return s;let a,l,c;if(r&&(n=function(t,e,i,r){const o=[];for(let i=0,n=e.length;i<n;i++){const s=Er(t,e[i]*r,i<n-1?e[i+1]*r:t.length,r,!1);s===s.next&&(s.steiner=!0),o.push(Nr(s))}o.sort(jr);for(let t=0;t<o.length;t++)i=Br(o[t],i);return i}(t,e,n,i)),t.length>80*i){a=t[0],l=t[1];let e=a,r=l;for(let n=i;n<o;n+=i){const i=t[n],o=t[n+1];i<a&&(a=i),o<l&&(l=o),i>e&&(e=i),o>r&&(r=o)}c=Math.max(e-a,r-l),c=0!==c?32767/c:0}return Dr(n,s,i,a,l,c,0),s}(i,r),e=this._convertIndices(i,t);o=this._subdivideTrianglesScanline(e)}catch(t){console.error(t)}let n=[];return e&&(n=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(o),{verticesFlattened:this._vertexBuffer,indicesTriangles:o,indicesLineList:n}}_convertIndices(t,e){const i=[];for(let r=0;r<e.length;r++)i.push(this._vertexToIndex(t[2*e[r]],t[2*e[r]+1]));return i}_pointArrayToIndices(t){const e=[];for(let i=0;i<t.length;i++){const r=t[i];e.push(this._vertexToIndex(r.x,r.y))}return e}}class jd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new gu,this.indexArray=new zu,this.indexArray2=new Du,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.segments2=new Ru,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){this.hasDependencies=Ir("fill",this.layers,e);const r=this.layers[0].layout.get("fill-sort-key"),o=!r.isConstant(),n=[];for(const{feature:s,id:a,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,h=Ji(s,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),h,i))continue;const u=o?r.evaluate(h,{},i,e.availableImages):void 0,d={id:a,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:t?h.geometry:Yi(s),patterns:{},sortKey:u};n.push(d)}o&&n.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of n){const{geometry:o,index:n,sourceLayerIndex:s}=r;if(this.hasDependencies){const t=Cr("fill",this.layers,r,{zoom:this.zoom},e);this.patternFeatures.push(t)}else this.addFeature(r,o,n,i,{},e.subdivisionGranularity);e.featureIndex.insert(t[n].feature,o,n,s,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}addFeatures(t,e,i){for(const r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,e,i,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ed),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,i,r,o,n){for(const t of Vt(e,500)){const e=to(t,r,n.fill.getGranularityForZoomLevel(r.z)),i=this.layoutVertexArray;ro(((t,e)=>{i.emplaceBack(t,e)}),this.segments,this.layoutVertexArray,this.indexArray,e.verticesFlattened,e.indicesTriangles,this.segments2,this.indexArray2,e.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,canonical:r})}}let Bd,Vd;Pi("FillBucket",jd,{omit:["layers","patternFeatures"]}),Pa={get paint(){return Vd=Vd||new Ih({"fill-antialias":new bh(ua.paint_fill["fill-antialias"]),"fill-opacity":new wh(ua.paint_fill["fill-opacity"]),"fill-color":new wh(ua.paint_fill["fill-color"]),"fill-outline-color":new wh(ua.paint_fill["fill-outline-color"]),"fill-translate":new bh(ua.paint_fill["fill-translate"]),"fill-translate-anchor":new bh(ua.paint_fill["fill-translate-anchor"]),"fill-pattern":new Th(ua.paint_fill["fill-pattern"])})},get layout(){return Bd=Bd||new Ih({"fill-sort-key":new wh(ua.layout_fill["fill-sort-key"])})}};class Nd extends Ch{constructor(t,e){super(t,Pa,e)}recalculate(t,e){super.recalculate(t,e);const i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new jd(t)}queryRadius(){return cr(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:i,pixelsToTileUnits:r}){return Qi(hr(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-i.bearingInRadians,r),e)}isTileClipped(){return!0}}const Gd=Vi([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ud}=Gd;class qd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new vu,this.indexArray=new zu,this.indexArray2=new Du,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.segments2=new Ru,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){this.hasDependencies=Ir("fill",this.layers,e);const r=this.layers[0].layout.get("fill-sort-key"),o=!r.isConstant(),n=[];for(const{feature:s,id:a,index:l,sourceLayerIndex:c}of t){const t=this.layers[0]._featureFilter.needGeometry,h=Ji(s,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),h,i))continue;const u=o?r.evaluate(h,{},i,e.availableImages):void 0,d={id:a,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:t?h.geometry:Yi(s),patterns:{},sortKey:u};n.push(d)}o&&n.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of n){const{geometry:o,index:n,sourceLayerIndex:s}=r;if(this.hasDependencies){const t=Cr("fill",this.layers,r,{zoom:this.zoom},e);this.patternFeatures.push(t)}else this.addFeature(r,o,n,i,{},e.subdivisionGranularity);e.featureIndex.insert(t[n].feature,o,n,s,this.index)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}addFeatures(t,e,i){for(const r of this.patternFeatures)this.addFeature(r,r.geometry,r.index,e,i,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ud),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,i,r,o,n){for(const t of Vt(e,500)){const e=to(t,r,n.fill.getGranularityForZoomLevel(r.z)),i=this.layoutVertexArray;ro(((t,e)=>{i.emplaceBack(t,e)}),this.segments,this.layoutVertexArray,this.indexArray,e.verticesFlattened,e.indicesTriangles,this.segments2,this.indexArray2,e.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,canonical:r})}}let Zd,Wd;Pi("PolygonOverlayBucket",qd,{omit:["layers","patternFeatures"]}),Ia={get paint(){return Wd=Wd||new Ih({"fill-antialias":new bh(ua["paint_polygon-overlay"]["fill-antialias"]),"fill-opacity":new wh(ua["paint_polygon-overlay"]["fill-opacity"]),"fill-color":new wh(ua["paint_polygon-overlay"]["fill-color"]),"fill-outline-color":new wh(ua["paint_polygon-overlay"]["fill-outline-color"]),"fill-translate":new bh(ua["paint_polygon-overlay"]["fill-translate"]),"fill-translate-anchor":new bh(ua["paint_polygon-overlay"]["fill-translate-anchor"]),"fill-pattern":new Th(ua["paint_polygon-overlay"]["fill-pattern"])})},get layout(){return Zd=Zd||new Ih({"fill-sort-key":new wh(ua["layout_polygon-overlay"]["fill-sort-key"])})}};class Hd extends Ch{constructor(t,e){super(t,Ia,e)}recalculate(t,e){super.recalculate(t,e);const i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new qd(t)}queryRadius(){return cr(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:i,pixelsToTileUnits:r}){return Qi(hr(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-i.bearingInRadians,r),e)}isTileClipped(){return!0}}const Xd=Vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Yd=Vi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Jd}=Xd;no.prototype={clone(){return new no(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){const e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){const e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){const t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){const e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround(t,e){const i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:no},no.convert=function(t){if(t instanceof no)return t;if(Array.isArray(t))return new no(+t[0],+t[1]);if(void 0!==t.x&&void 0!==t.y)return new no(+t.x,+t.y);throw new Error("Expected [x, y] or {x, y} point format")};class Kd{constructor(t,e,i,r,o){this.properties={},this.extent=i,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=r,this._values=o,t.readFields(so,this,e)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos,i=[];let r,o=1,n=0,s=0,a=0;for(;t.pos<e;){if(n<=0){const e=t.readVarint();o=7&e,n=e>>3}if(n--,1===o||2===o)s+=t.readSVarint(),a+=t.readSVarint(),1===o&&(r&&i.push(r),r=[]),r&&r.push(new no(s,a));else{if(7!==o)throw new Error("unknown command "+o);r&&r.push(r[0].clone())}}return r&&i.push(r),i}bbox(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let i=1,r=0,o=0,n=0,s=1/0,a=-1/0,l=1/0,c=-1/0;for(;t.pos<e;){if(r<=0){const e=t.readVarint();i=7&e,r=e>>3}if(r--,1===i||2===i)o+=t.readSVarint(),n+=t.readSVarint(),o<s&&(s=o),o>a&&(a=o),n<l&&(l=n),n>c&&(c=n);else if(7!==i)throw new Error("unknown command "+i)}return[s,l,a,c]}toGeoJSON(t,e,i){function r(t){return[360*(t.x+s)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+a)/n)*Math.PI))-90]}function o(t){return t.map(r)}const n=this.extent*Math.pow(2,i),s=this.extent*t,a=this.extent*e,l=this.loadGeometry();let c;if(1===this.type){const t=[];for(const e of l)t.push(e[0]);const e=o(t);c=1===t.length?{type:"Point",coordinates:e[0]}:{type:"MultiPoint",coordinates:e}}else if(2===this.type){const t=l.map(o);c=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}}else{if(3!==this.type)throw new Error("unknown feature type");{const t=ao(l),e=[];for(const i of t)e.push(i.map(o));c=1===e.length?{type:"Polygon",coordinates:e[0]}:{type:"MultiPolygon",coordinates:e}}}const h={type:"Feature",geometry:c,properties:this.properties};return null!=this.id&&(h.id=this.id),h}}Kd.types=["Unknown","Point","LineString","Polygon"];class $d{constructor(t,e){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(co,this,e),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const e=this._pbf.readVarint()+this._pbf.pos;return new Kd(this._pbf,e,this.extent,this._keys,this._values)}}class Qd{constructor(t,e){this.layers=t.readFields(ho,{},e)}}const tp=Math.pow(2,13);class ep{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new xu,this.centroidVertexArray=new mu,this.indexArray=new zu,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){this.features=[],this.hasDependencies=Ir("fill-extrusion",this.layers,e);for(const{feature:r,id:o,index:n,sourceLayerIndex:s}of t){const t=this.layers[0]._featureFilter.needGeometry,a=Ji(r,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),a,i))continue;const l={id:o,sourceLayerIndex:s,index:n,geometry:t?a.geometry:Yi(r),properties:r.properties,type:r.type,patterns:{}};this.hasDependencies?this.features.push(Cr("fill-extrusion",this.layers,l,{zoom:this.zoom},e)):this.addFeature(l,l.geometry,n,i,{},e.subdivisionGranularity),e.featureIndex.insert(r,l.geometry,n,s,this.index,!0)}}addFeatures(t,e,i){for(const r of this.features){const{geometry:o}=r;this.addFeature(r,o,r.index,e,i,t.subdivisionGranularity)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Jd),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Yd.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,i,r,o,n){for(const i of Vt(e,500)){const e={x:0,y:0,sampleCount:0},o=this.layoutVertexArray.length;this.processPolygon(e,r,t,i,n);const s=this.layoutVertexArray.length-o,a=Math.floor(e.x/e.sampleCount),l=Math.floor(e.y/e.sampleCount);for(let t=0;t<s;t++)this.centroidVertexArray.emplaceBack(a,l)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,canonical:r})}processPolygon(t,e,i,r,o){if(r.length<1)return;if(fo(r[0]))return;for(const e of r)0!==e.length&&po(t,e);const n={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},s=o.fill.getGranularityForZoomLevel(e.z),a="Polygon"===Kd.types[i.type];for(const t of r){if(0===t.length)continue;if(fo(t))continue;const e=eo(t,s,a);this._generateSideFaces(e,n)}if(!a)return;const l=to(r,e,s,!1),c=this.layoutVertexArray;ro(((t,e)=>{uo(c,t,e,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let i=0;for(let n=1;n<t.length;n++){const s=t[n],a=t[n-1];if((r=s).x===(o=a).x&&(r.x<0||r.x>Ja)||r.y===o.y&&(r.y<0||r.y>Ja))continue;e.segment.vertexLength+4>Ru.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const l=s.sub(a)._perp()._unit(),c=a.dist(s);i+c>32768&&(i=0),uo(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,0,i),uo(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,1,i),i+=c,uo(this.layoutVertexArray,a.x,a.y,l.x,l.y,0,0,i),uo(this.layoutVertexArray,a.x,a.y,l.x,l.y,0,1,i);const h=e.segment.vertexLength;this.indexArray.emplaceBack(h,h+2,h+1),this.indexArray.emplaceBack(h+1,h+2,h+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}var r,o}}let ip;Pi("FillExtrusionBucket",ep,{omit:["layers","features"]}),Ca={get paint(){return ip=ip||new Ih({"fill-extrusion-opacity":new bh(ua["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wh(ua["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new bh(ua["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new bh(ua["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Th(ua["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wh(ua["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wh(ua["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new bh(ua["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class rp extends Ch{constructor(t,e){super(t,Ca,e)}createBucket(t){return new ep(t)}queryRadius(){return cr(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:o,transform:n,pixelsToTileUnits:s,pixelPosMatrix:a}){const l=hr(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,s),c=this.paint.get("fill-extrusion-height").evaluate(e,r),h=this.paint.get("fill-extrusion-base").evaluate(e,r),u=function(t,e){const r=[];for(const o of t){const t=[o.x,o.y,0,1];f(t,t,e),r.push(new i(t[0]/t[3],t[1]/t[3]))}return r}(l,a),d=function(t,e,r,o){const n=[],s=[],a=o[8]*e,l=o[9]*e,c=o[10]*e,h=o[11]*e,u=o[8]*r,d=o[9]*r,p=o[10]*r,f=o[11]*r;for(const e of t){const t=[],r=[];for(const n of e){const e=n.x,s=n.y,m=o[0]*e+o[4]*s+o[12],_=o[1]*e+o[5]*s+o[13],y=o[2]*e+o[6]*s+o[14],g=o[3]*e+o[7]*s+o[15],v=y+c,x=g+h,b=m+u,w=_+d,T=y+p,S=g+f,P=new i((m+a)/x,(_+l)/x);P.z=v/x,t.push(P);const I=new i(b/S,w/S);I.z=T/S,r.push(I)}n.push(t),s.push(r)}return[n,s]}(o,h,c,a);return function(t,e,i){let r=1/0;Qi(i,e)&&(r=_o(i,e[0]));for(let o=0;o<e.length;o++){const n=e[o],s=t[o];for(let t=0;t<n.length-1;t++){const e=n[t],o=[e,n[t+1],s[t+1],s[t],e];Ki(i,o)&&(r=Math.min(r,_o(i,o)))}}return r!==1/0&&r}(d[0],d[1],u)}}const op=6371008.8;class np{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.longitude=+t,this.latitude=+e,this.latitude>90||this.latitude<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new np(P(this.longitude,-180,180),this.latitude)}toArray(){return[this.longitude,this.latitude]}toString(){return"LngLat("+this.longitude+", "+this.latitude+")"}distanceTo(t){const e=Math.PI/180,i=this.latitude*e,r=t.latitude*e,o=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((t.longitude-this.longitude)*e);return op*Math.acos(Math.min(o,1))}static convert(t){if(t instanceof np)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new np(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t){const e=t;if(!("longitude"in e)||!("latitude"in e))throw new Error("`LngLatLike` object must have {longitude, latitude}.");return new np(Number(e.longitude),Number(e.latitude))}throw new Error("`LngLatLike` argument must be a LngLat instance, an object {longitude: <number>, latitude: <number>}, or an array of [<number>, <number>].")}}const sp=2*Math.PI*op;class ap{constructor(t,e,i=0){this.x=+t,this.y=+e,this.z=+i}static fromLngLat(t,e=0){const i=np.convert(t);return new ap(go(i.longitude),vo(i.latitude),xo(e,i.latitude))}toLngLat(){return new np(bo(this.x),wo(this.y))}toAltitude(){return To(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/sp*(t=wo(this.y),1/Math.cos(t*Math.PI/180));var t}}const lp=Math.pow(2,13),cp=2*Math.PI*op;class hp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new xu,this.centroidVertexArray=new mu,this.indexArray=new zu,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){this.features=[],this.hasDependencies=function(t,e){const i=e.patternDependencies;let r=!1;for(const e of t)for(const t of zd){const o=e.paint.get(t);if(!Mr(o))continue;r=!0;const n=o.constantOr(null);n&&(i[n.to.toString()]=!0,i[n.from.toString()]=!0)}return r}(this.layers,e);const r=this.hasDependencies&&Ar(this.layers);for(const{feature:o,id:n,index:s,sourceLayerIndex:a}of t){const t=this.layers[0]._featureFilter.needGeometry,l=Ji(o,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),l,i))continue;const c={id:n,sourceLayerIndex:a,index:s,geometry:t?l.geometry:Yi(o),properties:o.properties,type:o.type,patterns:{}};r?this.features.push(kr(this.layers,c,{zoom:this.zoom},e)):this.addFeature(c,c.geometry,s,i,{},e.subdivisionGranularity),e.featureIndex.insert(o,c.geometry,s,a,this.index,!0)}}addFeatures(t,e,i){if(Ar(this.layers))for(const r of this.features){const{geometry:o}=r;this.addFeature(r,o,r.index,e,i,t.subdivisionGranularity)}}update(t,e,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Jd),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Yd.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,i,r,o,n){for(const i of Vt(e,500)){const e={x:0,y:0,sampleCount:0},o=this.layoutVertexArray.length;this.processPolygon(e,r,t,i,n);const s=this.layoutVertexArray.length-o,a=Math.floor(e.x/e.sampleCount),l=Math.floor(e.y/e.sampleCount);for(let t=0;t<s;t++)this.centroidVertexArray.emplaceBack(a,l)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,canonical:r})}processPolygon(t,e,i,r,o){if(r.length<1)return;if(Mo(r[0]))return;for(const e of r)0!==e.length&&Po(t,e);const n={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},s=o.fill.getGranularityForZoomLevel(e.z),a="Polygon"===Kd.types[i.type];for(const t of r){if(0===t.length)continue;if(Mo(t))continue;const i=eo(t,s,a);this._generateSideFaces(i,n,e)}if(!a)return;const l=to(r,e,s,!1),c=this.layoutVertexArray;ro(((t,e)=>{So(c,t,e,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e,i){let r=0;for(let s=1;s<t.length;s++){const a=t[s],l=t[s-1];if((o=a).x===(n=l).x&&(o.x<0||o.x>Ja)||o.y===n.y&&(o.y<0||o.y>Ja))continue;e.segment.vertexLength+4>Ru.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const c=a.sub(l)._perp()._unit(),h=Co(l,a,i);r+h>32768&&(r=0),So(this.layoutVertexArray,a.x,a.y,c.x,c.y,0,0,r),So(this.layoutVertexArray,a.x,a.y,c.x,c.y,0,1,r),r+=h,So(this.layoutVertexArray,l.x,l.y,c.x,c.y,0,0,r),So(this.layoutVertexArray,l.x,l.y,c.x,c.y,0,1,r);const u=e.segment.vertexLength;this.indexArray.emplaceBack(u,u+2,u+1),this.indexArray.emplaceBack(u+1,u+2,u+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}var o,n}}let up;Pi("PrismOverlayBucket",hp,{omit:["layers","features"]}),Ma={get paint(){return up=up||new Ih({"top-fill-color":new wh(ua["paint_prism-overlay"]["top-fill-color"]),"top-fill-opacity":new bh(ua["paint_prism-overlay"]["top-fill-opacity"]),"top-fill-pattern":new Th(ua["paint_prism-overlay"]["top-fill-pattern"]),"side-fill-color":new wh(ua["paint_prism-overlay"]["side-fill-color"]),"side-fill-opacity":new bh(ua["paint_prism-overlay"]["side-fill-opacity"]),"side-fill-pattern":new Th(ua["paint_prism-overlay"]["side-fill-pattern"]),"extrusion-height":new wh(ua["paint_prism-overlay"]["extrusion-height"]),"extrusion-base":new wh(ua["paint_prism-overlay"]["extrusion-base"]),"extrusion-vertical-gradient":new bh(ua["paint_prism-overlay"]["extrusion-vertical-gradient"])})}};class dp extends Ch{constructor(t,e){super(t,Ma,e)}createBucket(t){return new hp(t)}queryRadius(){return 0}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:o,pixelPosMatrix:n}){const s=this.paint.get("extrusion-height").evaluate(e,r),a=this.paint.get("extrusion-base").evaluate(e,r),l=function(t,e){const r=[];for(const o of t){const t=[o.x,o.y,0,1];f(t,t,e),r.push(new i(t[0]/t[3],t[1]/t[3]))}return r}(t,n),c=function(t,e,r,o){const n=[],s=[],a=o[8]*e,l=o[9]*e,c=o[10]*e,h=o[11]*e,u=o[8]*r,d=o[9]*r,p=o[10]*r,f=o[11]*r;for(const e of t){const t=[],r=[];for(const n of e){const e=n.x,s=n.y,m=o[0]*e+o[4]*s+o[12],_=o[1]*e+o[5]*s+o[13],y=o[2]*e+o[6]*s+o[14],g=o[3]*e+o[7]*s+o[15],v=y+c,x=g+h,b=m+u,w=_+d,T=y+p,S=g+f,P=new i((m+a)/x,(_+l)/x);P.z=v/x,t.push(P);const I=new i(b/S,w/S);I.z=T/S,r.push(I)}n.push(t),s.push(r)}return[n,s]}(o,a,s,n);return function(t,e,i){let r=1/0;Qi(i,e)&&(r=_o(i,e[0]));for(let o=0;o<e.length;o++){const n=e[o],s=t[o];for(let t=0;t<n.length-1;t++){const e=n[t],o=[e,n[t+1],s[t+1],s[t],e];Ki(i,o)&&(r=Math.min(r,_o(i,o)))}}return r!==1/0&&r}(c[0],c[1],l)}}const pp=Vi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:fp}=pp,mp=Vi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:_p}=mp,yp=Math.cos(Math.PI/180*37.5),gp=Math.pow(2,14)/.5;class vp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={}})),this.layoutVertexArray=new bu,this.layoutVertexArray2=new wu,this.indexArray=new zu,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){this.hasDependencies=Ir("line",this.layers,e)||this.hasLineDasharray(this.layers);const r=this.layers[0].layout.get("line-sort-key"),o=!r.isConstant(),n=[];for(const{feature:e,id:s,index:a,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Ji(e,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),c,i))continue;const h=o?r.evaluate(c,{},i):void 0,u={id:s,properties:e.properties,type:e.type,sourceLayerIndex:l,index:a,geometry:t?c.geometry:Yi(e),patterns:{},dashes:{},sortKey:h};n.push(u)}o&&n.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of n){const{geometry:o,index:n,sourceLayerIndex:s}=r;this.hasDependencies?(Ir("line",this.layers,e)?Cr("line",this.layers,r,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,r,this.zoom,e),this.patternFeatures.push(r)):this.addFeature(r,o,n,i,{},{},e.subdivisionGranularity),e.featureIndex.insert(t[n].feature,o,n,s,this.index)}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i,dashPositions:r})}addFeatures(t,e,i,r){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,e,i,r,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,_p)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,fp),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,i,r,o,n,s){const a=this.layers[0].layout,l=a.get("line-join").evaluate(t,{}),c=a.get("line-cap"),h=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const i of e)this.addLine(i,t,l,c,h,u,r,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,dashPositions:n,canonical:r})}addLine(t,e,i,r,o,n,s,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=eo(t,s?a.line.getGranularityForZoomLevel(s.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e<t.length-1;e++)this.totalDistance+=t[e].dist(t[e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const l="Polygon"===Kd.types[e.type];let c=t.length;for(;c>=2&&t[c-1].equals(t[c-2]);)c--;let h=0;for(;h<c-1&&t[h].equals(t[h+1]);)h++;if(c<(l?3:2))return;"bevel"===i&&(o=1.05);const u=this.overscaling<=16?122880/(512*this.overscaling):0,d=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray);let p,f,m,_,y;this.e1=this.e2=-1,l&&(p=t[c-2],y=t[h].sub(p)._unit()._perp());for(let e=h;e<c;e++){if(m=e===c-1?l?t[h+1]:void 0:t[e+1],m&&t[e].equals(m))continue;y&&(_=y),p&&(f=p),p=t[e],y=m?m.sub(p)._unit()._perp():_,_=_||y;let s=_.add(y);0===s.x&&0===s.y||s._unit();const a=_.x*y.x+_.y*y.y,g=s.x*y.x+s.y*y.y,v=0!==g?1/g:1/0,x=2*Math.sqrt(2-2*g),b=g<yp&&f&&m,w=_.x*y.y-_.y*y.x>0;if(b&&e>h){const t=p.dist(f);if(t>2*u){const e=p.sub(p.sub(f)._mult(u/t)._round());this.updateDistance(f,e),this.addCurrentVertex(e,_,0,0,d),f=e}}const T=f&&m;let S=T?i:l?"butt":r;if(T&&"round"===S&&(v<n?S="miter":v<=2&&(S="fakeround")),"miter"===S&&v>o&&(S="bevel"),"bevel"===S&&(v>2&&(S="flipbevel"),v<o&&(S="miter")),f&&this.updateDistance(f,p),"miter"===S)s._mult(v),this.addCurrentVertex(p,s,0,0,d);else if("flipbevel"===S){if(v>100)s=y.mult(-1);else{const t=v*_.add(y).mag()/_.sub(y).mag();s._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(p,s,0,0,d),this.addCurrentVertex(p,s.mult(-1),0,0,d)}else if("bevel"===S||"fakeround"===S){const t=-Math.sqrt(v*v-1),e=w?t:0,i=w?0:t;if(f&&this.addCurrentVertex(p,_,e,i,d),"fakeround"===S){const t=Math.round(180*x/Math.PI/20);for(let e=1;e<t;e++){let i=e/t;if(.5!==i){const t=i-.5;i+=i*t*(i-1)*((1.0904+a*(a*(3.55645-1.43519*a)-3.2452))*t*t+(.848013+a*(.215638*a-1.06021)))}const r=y.sub(_)._mult(i)._add(_)._unit()._mult(w?-1:1);this.addHalfVertex(p,r.x,r.y,!1,w,0,d)}}m&&this.addCurrentVertex(p,y,-e,-i,d)}else if("butt"===S)this.addCurrentVertex(p,s,0,0,d);else if("square"===S){const t=f?1:-1;this.addCurrentVertex(p,s,t,t,d)}else"round"===S&&(f&&(this.addCurrentVertex(p,_,0,0,d),this.addCurrentVertex(p,_,1,1,d,!0)),m&&(this.addCurrentVertex(p,y,-1,-1,d,!0),this.addCurrentVertex(p,y,0,0,d)));if(b&&e<c-1){const t=p.dist(m);if(t>2*u){const e=p.add(m.sub(p)._mult(u/t)._round());this.updateDistance(p,e),this.addCurrentVertex(e,y,0,0,d),p=e}}}}addCurrentVertex(t,e,i,r,o,n=!1){const s=e.y*r-e.x,a=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*i,e.y-e.x*i,n,!1,i,o),this.addHalfVertex(t,s,a,n,!0,-r,o),this.distance>gp/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,i,r,o,n))}addHalfVertex({x:t,y:e},i,r,o,n,s,a){const l=.5*(this.lineClips?this.scaledDistance*(gp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(o?1:0),(e<<1)+(n?1:0),Math.round(63*i)+128,Math.round(63*r)+128,1+(0===s?0:s<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),a.primitiveLength++),n?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(const e of t){const t=e.paint.get("line-dasharray");if(t&&!t.isConstant())return!0}return!1}addLineDashDependencies(t,e,i,r){for(const o of t){const t=o.paint.get("line-dasharray");if(!t||"constant"===t.value.kind)continue;const n="round"===o.layout.get("line-cap"),s={dasharray:t.value.evaluate({zoom:i-1},e,{}),round:n},a={dasharray:t.value.evaluate({zoom:i},e,{}),round:n},l={dasharray:t.value.evaluate({zoom:i+1},e,{}),round:n},c=s.dasharray.join(",")+","+s.round,h=a.dasharray.join(",")+","+a.round,u=l.dasharray.join(",")+","+l.round;r.dashDependencies[c]=s,r.dashDependencies[h]=a,r.dashDependencies[u]=l,e.dashes[o.id]={min:c,mid:h,max:u}}}}let xp,bp,wp;Pi("LineBucket",vp,{omit:["layers","patternFeatures"]}),Aa={get paint(){return bp=bp||new Ih({"line-opacity":new wh(ua.paint_line["line-opacity"]),"line-color":new wh(ua.paint_line["line-color"]),"line-translate":new bh(ua.paint_line["line-translate"]),"line-translate-anchor":new bh(ua.paint_line["line-translate-anchor"]),"line-width":new wh(ua.paint_line["line-width"]),"line-gap-width":new wh(ua.paint_line["line-gap-width"]),"line-offset":new wh(ua.paint_line["line-offset"]),"line-blur":new wh(ua.paint_line["line-blur"]),"line-dasharray":new Th(ua.paint_line["line-dasharray"]),"line-pattern":new Th(ua.paint_line["line-pattern"]),"line-gradient":new Ph(ua.paint_line["line-gradient"])})},get layout(){return xp=xp||new Ih({"line-cap":new bh(ua.layout_line["line-cap"]),"line-join":new wh(ua.layout_line["line-join"]),"line-miter-limit":new bh(ua.layout_line["line-miter-limit"]),"line-round-limit":new bh(ua.layout_line["line-round-limit"]),"line-sort-key":new wh(ua.layout_line["line-sort-key"])})}};class Tp extends wh{possiblyEvaluate(t,e){return e=new uh(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,i,r){return e=I({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,i,r)}}class Sp extends Ch{constructor(t,e){super(t,Aa,e),this.gradientVersion=0,wp||(wp=new Tp(Aa.paint.properties["line-width"].specification),wp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this.gradientExpression();this.stepInterpolant=!!Le(t)&&t._styleExpression.expression instanceof vc,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=wp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new vp(t)}queryRadius(t){const e=t,i=Ao(lr("line-width",this,e),lr("line-gap-width",this,e)),r=lr("line-offset",this,e);return i/2+Math.abs(r)+cr(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n}){const s=hr(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-o.bearingInRadians,n),a=n/2*Ao(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),l=this.paint.get("line-offset").evaluate(e,i);return l&&(r=dr(r,l*n)),tr(s,r,a)}isTileClipped(){return!0}}const Pp=Vi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Ip}=Pp,Cp=Vi([{name:"a_pos",components:2,type:"Float32"},{name:"a_normal",components:2,type:"Float32"},{name:"a_distance",components:1,type:"Float32"},{name:"a_direction",components:2,type:"Float32"}],4),{members:Mp}=Cp,Ap=Vi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:kp}=Ap,Ep=Math.cos(Math.PI/180*37.5),zp=Math.pow(2,14)/.5;class Dp extends zh{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,o,n,s){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,o,n,s)}emplace(t,e,i,r,o,n,s,a){const l=7*t;return this.float32[l+0]=e,this.float32[l+1]=i,this.float32[l+2]=r,this.float32[l+3]=o,this.float32[l+4]=n,this.float32[l+5]=s,this.float32[l+6]=a,t}}Dp.prototype.bytesPerElement=28,Pi("PolylineOverlayArrowLayoutArray",Dp);class Lp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasDependencies=!1,this.hasDirectionGeometry=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={}})),this.layoutVertexArray=new Tu,this.layoutVertexArray2=new Su,this.arrowLayoutVertexArray=new Dp,this.indexArray=new zu,this.arrowIndexArray=new zu,this.programConfigurations=new id(t.layers,t.zoom),this.segments=new Ru,this.arrowSegments=new Ru,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i){const r=Ir("line",this.layers,e),o=this.hasDirectionImage(this.layers,e);this.hasDirectionGeometry=o,this.hasDependencies=r||o||this.hasLineDasharray(this.layers);const n=this.layers[0].layout.get("line-sort-key"),s=!n.isConstant(),a=[];for(const{feature:e,id:r,index:o,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Ji(e,t);if(!this.layers[0]._featureFilter.filter(new uh(this.zoom),c,i))continue;const h=s?n.evaluate(c,{},i):void 0,u={id:r,properties:e.properties,type:e.type,sourceLayerIndex:l,index:o,geometry:t?c.geometry:Yi(e),patterns:{},dashes:{},sortKey:h};a.push(u)}s&&a.sort(((t,e)=>t.sortKey-e.sortKey));for(const n of a){const{geometry:s,index:a,sourceLayerIndex:l}=n;this.hasDependencies?(r&&Cr("line",this.layers,n,{zoom:this.zoom},e),o&&this.addDirectionImageDependencies(this.layers,n,this.zoom,e),r||o||!this.hasLineDasharray(this.layers)||this.addLineDashDependencies(this.layers,n,this.zoom,e),this.patternFeatures.push(n)):this.addFeature(n,s,a,i,{},{},e.subdivisionGranularity),e.featureIndex.insert(t[a].feature,s,a,l,this.index)}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:i,dashPositions:r})}addFeatures(t,e,i,r){for(const o of this.patternFeatures)this.addFeature(o,o.geometry,o.index,e,i,r,t.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,kp)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ip),this.indexBuffer=t.createIndexBuffer(this.indexArray),0!==this.arrowLayoutVertexArray.length&&(this.arrowLayoutVertexBuffer=t.createVertexBuffer(this.arrowLayoutVertexArray,Mp),this.arrowIndexBuffer=t.createIndexBuffer(this.arrowIndexArray))),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.arrowLayoutVertexBuffer&&this.arrowLayoutVertexBuffer.destroy(),this.arrowIndexBuffer&&this.arrowIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.arrowSegments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,i,r,o,n,s){const a=this.layers[0].layout,l=a.get("line-join").evaluate(t,{}),c=a.get("line-cap"),h=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const i of e)this.addLine(i,t,l,c,h,u,r,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{imagePositions:o,dashPositions:n,canonical:r})}addLine(t,e,i,r,o,n,s,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=eo(t,s?a.line.getGranularityForZoomLevel(s.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e<t.length-1;e++)this.totalDistance+=t[e].dist(t[e+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const l="Polygon"===Kd.types[e.type];let c=t.length;for(;c>=2&&t[c-1].equals(t[c-2]);)c--;let h=0;for(;h<c-1&&t[h].equals(t[h+1]);)h++;if(c<(l?3:2))return;this.hasDirectionGeometry&&this.addArrowLine(t,h,c,l),"bevel"===i&&(o=1.05);const u=this.overscaling<=16?122880/(512*this.overscaling):0,d=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray);let p,f,m,_,y;this.e1=this.e2=-1,l&&(p=t[c-2],y=t[h].sub(p)._unit()._perp());for(let e=h;e<c;e++){if(m=e===c-1?l?t[h+1]:void 0:t[e+1],m&&t[e].equals(m))continue;y&&(_=y),p&&(f=p),p=t[e],y=m?m.sub(p)._unit()._perp():_,_=_||y;let s=_.add(y);0===s.x&&0===s.y||s._unit();const a=_.x*y.x+_.y*y.y,g=s.x*y.x+s.y*y.y,v=0!==g?1/g:1/0,x=2*Math.sqrt(2-2*g),b=g<Ep&&f&&m,w=_.x*y.y-_.y*y.x>0;if(b&&e>h){const t=p.dist(f);if(t>2*u){const e=p.sub(p.sub(f)._mult(u/t)._round());this.updateDistance(f,e),this.addCurrentVertex(e,_,0,0,d),f=e}}const T=f&&m;let S=T?i:l?"butt":r;if(T&&"round"===S&&(v<n?S="miter":v<=2&&(S="fakeround")),"miter"===S&&v>o&&(S="bevel"),"bevel"===S&&(v>2&&(S="flipbevel"),v<o&&(S="miter")),f&&this.updateDistance(f,p),"miter"===S)s._mult(v),this.addCurrentVertex(p,s,0,0,d);else if("flipbevel"===S){if(v>100)s=y.mult(-1);else{const t=v*_.add(y).mag()/_.sub(y).mag();s._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(p,s,0,0,d),this.addCurrentVertex(p,s.mult(-1),0,0,d)}else if("bevel"===S||"fakeround"===S){const t=-Math.sqrt(v*v-1),e=w?t:0,i=w?0:t;if(f&&this.addCurrentVertex(p,_,e,i,d),"fakeround"===S){const t=Math.round(180*x/Math.PI/20);for(let e=1;e<t;e++){let i=e/t;if(.5!==i){const t=i-.5;i+=i*t*(i-1)*((1.0904+a*(a*(3.55645-1.43519*a)-3.2452))*t*t+(.848013+a*(.215638*a-1.06021)))}const r=y.sub(_)._mult(i)._add(_)._unit()._mult(w?-1:1);this.addHalfVertex(p,r.x,r.y,!1,w,0,d)}}m&&this.addCurrentVertex(p,y,-e,-i,d)}else if("butt"===S)this.addCurrentVertex(p,s,0,0,d);else if("square"===S){const t=f?1:-1;this.addCurrentVertex(p,s,t,t,d)}else"round"===S&&(f&&(this.addCurrentVertex(p,_,0,0,d),this.addCurrentVertex(p,_,1,1,d,!0)),m&&(this.addCurrentVertex(p,y,-1,-1,d,!0),this.addCurrentVertex(p,y,0,0,d)));if(b&&e<c-1){const t=p.dist(m);if(t>2*u){const e=p.add(m.sub(p)._mult(u/t)._round());this.updateDistance(p,e),this.addCurrentVertex(e,y,0,0,d),p=e}}}}addCurrentVertex(t,e,i,r,o,n=!1){const s=e.y*r-e.x,a=-e.y-e.x*r;this.addHalfVertex(t,e.x+e.y*i,e.y-e.x*i,n,!1,i,o),this.addHalfVertex(t,s,a,n,!0,-r,o),this.distance>zp/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,i,r,o,n))}addHalfVertex({x:t,y:e},i,r,o,n,s,a){const l=.5*(this.lineClips?this.scaledDistance*(zp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(o?1:0),(e<<1)+(n?1:0),Math.round(63*i)+128,Math.round(63*r)+128,1+(0===s?0:s<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),a.primitiveLength++),n?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}getArrowDistanceOffset(){if(!this.lineClips||this.totalDistance<=0)return 0;const t=this.lineClips.end-this.lineClips.start;return t<=0?0:this.lineClips.start*(this.totalDistance/t)}addArrowLine(t,e,i,r){if(r)return;let o=this.getArrowDistanceOffset();const n=Math.max(1,Math.floor(2048*this.overscaling));for(let r=e;r<i-1;r++){const e=t[r],i=t[r+1],s=i.x-e.x,a=i.y-e.y,l=Math.sqrt(s*s+a*a);if(0===l)continue;const c=s/l,h=a/l,u=-h,d=c;let p=0;for(;p<l;){const t=Math.min(l,p+n),i=p/l,r=t/l;this.addArrowQuad(e.x+s*i,e.y+a*i,e.x+s*r,e.y+a*r,u,d,c,h,o+p,o+t),p=t}o+=l}}addArrowQuad(t,e,i,r,o,n,s,a,l,c){const h=this.arrowSegments.prepareSegment(4,this.arrowLayoutVertexArray,this.arrowIndexArray),u=h.vertexLength;this.arrowLayoutVertexArray.emplaceBack(t,e,o,n,l,s,a),this.arrowLayoutVertexArray.emplaceBack(t,e,-o,-n,l,s,a),this.arrowLayoutVertexArray.emplaceBack(i,r,o,n,c,s,a),this.arrowLayoutVertexArray.emplaceBack(i,r,-o,-n,c,s,a),this.arrowIndexArray.emplaceBack(u,u+1,u+2),this.arrowIndexArray.emplaceBack(u+1,u+3,u+2),h.vertexLength+=4,h.primitiveLength+=2}hasLineDasharray(t){for(const e of t){const t=e.paint.get("line-dasharray");if(t&&!t.isConstant())return!0}return!1}hasDirectionImage(t,e){const i=e.patternDependencies;let r=!1;for(const e of t){const t=e.paint.get("line-direction-image");t.isConstant()||(r=!0);const o=t.constantOr(null);o&&(r=!0,i[o.to]=!0,i[o.from]=!0)}return r}addDirectionImageDependencies(t,e,i,r){const o=r.patternDependencies;for(const n of t){const t=n.paint.get("line-direction-image").value;if("constant"===t.kind)continue;let s=t.evaluate({zoom:i-1},e,{},r.availableImages),a=t.evaluate({zoom:i},e,{},r.availableImages),l=t.evaluate({zoom:i+1},e,{},r.availableImages);s=s&&s.name?s.name:s,a=a&&a.name?a.name:a,l=l&&l.name?l.name:l,o[s]=!0,o[a]=!0,o[l]=!0,e.patterns[n.id]={min:s,mid:a,max:l}}}addLineDashDependencies(t,e,i,r){for(const o of t){const t=o.paint.get("line-dasharray");if(!t||"constant"===t.value.kind)continue;const n="round"===o.layout.get("line-cap"),s={dasharray:t.value.evaluate({zoom:i-1},e,{}),round:n},a={dasharray:t.value.evaluate({zoom:i},e,{}),round:n},l={dasharray:t.value.evaluate({zoom:i+1},e,{}),round:n},c=s.dasharray.join(",")+","+s.round,h=a.dasharray.join(",")+","+a.round,u=l.dasharray.join(",")+","+l.round;r.dashDependencies[c]=s,r.dashDependencies[h]=a,r.dashDependencies[u]=l,e.dashes[o.id]={min:c,mid:h,max:u}}}}let Op,Rp,Fp;Pi("PolylineOverlayBucket",Lp,{omit:["layers","patternFeatures"]}),ka={get paint(){return Rp=Rp||new Ih({"line-opacity":new wh(ua["paint_polyline-overlay"]["line-opacity"]),"line-color":new wh(ua["paint_polyline-overlay"]["line-color"]),"line-translate":new bh(ua["paint_polyline-overlay"]["line-translate"]),"line-translate-anchor":new bh(ua["paint_polyline-overlay"]["line-translate-anchor"]),"line-width":new wh(ua["paint_polyline-overlay"]["line-width"]),"line-gap-width":new wh(ua["paint_polyline-overlay"]["line-gap-width"]),"line-offset":new wh(ua["paint_polyline-overlay"]["line-offset"]),"line-blur":new wh(ua["paint_polyline-overlay"]["line-blur"]),"line-dasharray":new Th(ua["paint_polyline-overlay"]["line-dasharray"]),"line-pattern":new Th(ua["paint_polyline-overlay"]["line-pattern"]),"line-direction-image":new Th(ua["paint_polyline-overlay"]["line-direction-image"]),"line-direction-color":new bh(ua["paint_polyline-overlay"]["line-direction-color"]),"line-direction-opacity":new bh(ua["paint_polyline-overlay"]["line-direction-opacity"]),"line-direction-gap":new bh(ua["paint_polyline-overlay"]["line-direction-gap"]),"line-direction-custom-image":new bh(ua["paint_polyline-overlay"]["line-direction-custom-image"]),"line-depth-test":new bh(ua["paint_polyline-overlay"]["line-depth-test"]),"line-gradient":new Ph(ua["paint_polyline-overlay"]["line-gradient"])})},get layout(){return Op=Op||new Ih({"line-cap":new bh(ua["layout_polyline-overlay"]["line-cap"]),"line-join":new wh(ua["layout_polyline-overlay"]["line-join"]),"line-miter-limit":new bh(ua["layout_polyline-overlay"]["line-miter-limit"]),"line-round-limit":new bh(ua["layout_polyline-overlay"]["line-round-limit"]),"line-sort-key":new wh(ua["layout_polyline-overlay"]["line-sort-key"])})}};class jp extends wh{possiblyEvaluate(t,e){return e=new uh(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,i,r){return e=I({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,i,r)}}class Bp extends Ch{constructor(t,e){super(t,ka,e),this.gradientVersion=0,Fp||(Fp=new jp(ka.paint.properties["line-width"].specification),Fp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this.gradientExpression();this.stepInterpolant=!!Le(t)&&t._styleExpression.expression instanceof vc,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Fp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Lp(t)}queryRadius(t){const e=t,i=ko(lr("line-width",this,e),lr("line-gap-width",this,e)),r=lr("line-offset",this,e);return i/2+Math.abs(r)+cr(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:i,geometry:r,transform:o,pixelsToTileUnits:n}){const s=hr(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-o.bearingInRadians,n),a=n/2*ko(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),l=this.paint.get("line-offset").evaluate(e,i);return l&&(r=dr(r,l*n)),tr(s,r,a)}isTileClipped(){return!0}}const Vp=Vi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Np=Vi([{name:"a_projected_pos",components:3,type:"Float32"}],4);Vi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Gp=Vi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Vi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Up=Vi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),qp=Vi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Vi([{name:"triangle",components:3,type:"Uint16"}]),Vi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Vi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Vi([{type:"Float32",name:"offsetX"}]),Vi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Vi([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]),Ea=24;const Zp={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Wp={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Hp={40:!0};class Xp{constructor(t="",e=[],i=[]){this.text=t,this.sections=e,this.sectionIndex=i,this.imageSectionID=null}static fromFeature(t,e){const i=new Xp;for(let r=0;r<t.sections.length;r++){const o=t.sections[r];o.image?i.addImageSection(o):i.addTextSection(o,e)}return i}length(){return[...this.text].length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=function(t){let e="",i={premature:!0,value:void 0};const r=t[Symbol.iterator]();let o=r.next();const n=t[Symbol.iterator]();n.next();let s=n.next();for(;!o.done;)e+=!s.done&&Ri(s.value.codePointAt(0))&&!Zp[s.value]||!i.premature&&Ri(i.value.codePointAt(0))&&!Zp[i.value]||!Zp[o.value]?o.value:Zp[o.value],i={value:o.value,premature:!1},o=r.next(),s=n.next();return e}(this.text)}hasZeroWidthSpaces(){return this.text.includes("​")}trim(){const t=this.text.match(/^\s*/),e=t?t[0].length:0,i=this.text.match(/\S\s*$/),r=i?i[0].length-1:0;this.text=this.text.substring(e,this.text.length-r),this.sectionIndex=this.sectionIndex.slice(e,this.sectionIndex.length-r)}substring(t,e){const i=[...this.text].slice(t,e).join(""),r=this.sectionIndex.slice(t,e);return new Xp(i,this.sections,r)}toCodeUnitIndex(t){return[...this.text].slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,e)=>Math.max(t,this.sections[e].scale)),0)}getMaxImageSize(t){let e=0,i=0;for(let r=0;r<this.length();r++){const o=this.getSection(r);if("imageName"in o){const r=t[o.imageName];if(!r)continue;const n=r.displaySize;e=Math.max(e,n[0]),i=Math.max(i,n[1])}}return{maxImageWidth:e,maxImageHeight:i}}addTextSection(t,e){this.text+=t.text,this.sections.push({scale:t.scale||1,verticalAlign:t.verticalAlign||"bottom",fontStack:t.fontStack||e});const i=this.sections.length-1;this.sectionIndex.push(...[...t.text].map((()=>i)))}addImageSection(t){const e=t.image?t.image.name:"";if(0===e.length)return void k("Can't add FormattedSection with an empty image.");const i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push({scale:1,verticalAlign:t.verticalAlign||"bottom",imageName:e}),this.sectionIndex.push(this.sections.length-1)):k("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,e,i,r,o){const n=[],s=this.determineAverageLineWidth(t,e,i,r,o),a=this.hasZeroWidthSpaces();let l=0,c=0;const h=this.text[Symbol.iterator]();let u=h.next();const d=this.text[Symbol.iterator]();d.next();let p=d.next();const f=this.text[Symbol.iterator]();f.next(),f.next();let m=f.next();for(;!u.done;){const e=this.getSection(c),_=u.value.codePointAt(0);if(zi(_)||(l+=zo(_,e,i,r,t,o)),!p.done){const t=/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(_)),i=p.value.codePointAt(0);(Wp[_]||t||"imageName"in e||!m.done&&Hp[i])&&n.push(Oo(c+1,l,s,n,Lo(_,i,t&&a),!1))}c++,u=h.next(),p=d.next(),m=f.next()}return Ro(Oo(this.length(),l,s,n,0,!0))}determineAverageLineWidth(t,e,i,r,o){let n=0,s=0;for(const e of this.text){const a=this.getSection(s);n+=zo(e.codePointAt(0),a,i,r,t,o),s++}return n/Math.max(1,Math.ceil(n/e))}}const Yp=4294967296,Jp=1/Yp,Kp="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class $p{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,e,i=this.length){for(;this.pos<i;){const i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Yp;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Yp;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const e=this.buf;let i,r;return r=e[this.pos++],i=127&r,r<128?i:(r=e[this.pos++],i|=(127&r)<<7,r<128?i:(r=e[this.pos++],i|=(127&r)<<14,r<128?i:(r=e[this.pos++],i|=(127&r)<<21,r<128?i:(r=e[this.pos],i|=(15&r)<<28,function(t,e,i){const r=i.buf;let o,n;if(n=r[i.pos++],o=(112&n)>>4,n<128)return Fo(t,o,e);if(n=r[i.pos++],o|=(127&n)<<3,n<128)return Fo(t,o,e);if(n=r[i.pos++],o|=(127&n)<<10,n<128)return Fo(t,o,e);if(n=r[i.pos++],o|=(127&n)<<17,n<128)return Fo(t,o,e);if(n=r[i.pos++],o|=(127&n)<<24,n<128)return Fo(t,o,e);if(n=r[i.pos++],o|=(1&n)<<31,n<128)return Fo(t,o,e);throw new Error("Expected varint not more than 10 bytes")}(i,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return Boolean(this.readVarint())}readString(){const t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Kp?Kp.decode(this.buf.subarray(e,t)):function(t,e,i){let r="",o=e;for(;o<i;){const e=t[o];let n,s,a,l=null,c=e>239?4:e>223?3:e>191?2:1;if(o+c>i)break;1===c?e<128&&(l=e):2===c?(n=t[o+1],128==(192&n)&&(l=(31&e)<<6|63&n,l<=127&&(l=null))):3===c?(n=t[o+1],s=t[o+2],128==(192&n)&&128==(192&s)&&(l=(15&e)<<12|(63&n)<<6|63&s,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===c&&(n=t[o+1],s=t[o+2],a=t[o+3],128==(192&n)&&128==(192&s)&&128==(192&a)&&(l=(15&e)<<18|(63&n)<<12|(63&s)<<6|63&a,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),o+=c}return r}(this.buf,e,t)}readBytes(){const t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readVarint(e));return t}readPackedSVarint(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSVarint());return t}readPackedBoolean(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readBoolean());return t}readPackedFloat(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFloat());return t}readPackedDouble(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readDouble());return t}readPackedFixed32(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed32());return t}readPackedSFixed32(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed32());return t}readPackedFixed64(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed64());return t}readPackedSFixed64(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed64());return t}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}skip(t){const e=7&t;if(0===e)for(;this.buf[this.pos++]>127;);else if(2===e)this.pos=this.readVarint()+this.pos;else if(5===e)this.pos+=4;else{if(1!==e)throw new Error("Unimplemented type: "+e);this.pos+=8}}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e<this.pos+t;)e*=2;if(e!==this.length){const t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.dataView=new DataView(t.buffer),this.length=e}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeSFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*Jp),!0),this.pos+=8}writeSFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*Jp),!0),this.pos+=8}writeVarint(t){(t=+t||0)>268435455||t<0?function(t,e){let i,r;if(t>=0?(i=t%4294967296|0,r=t/4294967296|0):(i=~(-t%4294967296),r=~(-t/4294967296),4294967295^i?i=i+1|0:(i=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");var o,n;e.realloc(10),o=i,(n=e).buf[n.pos++]=127&o|128,o>>>=7,n.buf[n.pos++]=127&o|128,o>>>=7,n.buf[n.pos++]=127&o|128,o>>>=7,n.buf[n.pos++]=127&o|128,n.buf[n.pos]=127&(o>>>=7),function(t,e){const i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const e=this.pos;this.pos=function(t,e,i){for(let r,o,n=0;n<e.length;n++){if(r=e.charCodeAt(n),r>55295&&r<57344){if(!o){r>56319||n+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):o=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,o=r;continue}r=o-55296<<10|r-56320|65536,o=null}else o&&(t[i++]=239,t[i++]=191,t[i++]=189,o=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);const i=this.pos-e;i>=128&&jo(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const e=t.length;this.writeVarint(e),this.realloc(e);for(let i=0;i<e;i++)this.buf[this.pos++]=t[i]}writeRawMessage(t,e){this.pos++;const i=this.pos;t(e,this);const r=this.pos-i;r>=128&&jo(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r}writeMessage(t,e,i){this.writeTag(t,2),this.writeRawMessage(e,i)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Bo,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Vo,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Uo,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,No,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Go,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,qo,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Zo,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Wo,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Ho,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}}class Qp{constructor(t,{pixelRatio:e,version:i,stretchX:r,stretchY:o,content:n,textFitWidth:s,textFitHeight:a}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=r,this.stretchY=o,this.content=n,this.version=i,this.textFitWidth=s,this.textFitHeight=a}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class tf{constructor(t,e){const i={},r={};this.haveRenderCallbacks=[];const o=[];this.addImages(t,i,o),this.addImages(e,r,o);const{w:n,h:s}=Ko(o),a=new bd({width:n||1,height:s||1});for(const e in t){const r=t[e],o=i[e].paddedRect;bd.copy(r.data,a,{x:0,y:0},{x:o.x+1,y:o.y+1},r.data)}for(const t in e){const i=e[t],o=r[t].paddedRect,n=o.x+1,s=o.y+1,l=i.data.width,c=i.data.height;bd.copy(i.data,a,{x:0,y:0},{x:n,y:s},i.data),bd.copy(i.data,a,{x:0,y:c-1},{x:n,y:s-1},{width:l,height:1}),bd.copy(i.data,a,{x:0,y:0},{x:n,y:s+c},{width:l,height:1}),bd.copy(i.data,a,{x:l-1,y:0},{x:n-1,y:s},{width:1,height:c}),bd.copy(i.data,a,{x:0,y:0},{x:n+l,y:s},{width:1,height:c})}this.image=a,this.iconPositions=i,this.patternPositions=r}addImages(t,e,i){for(const r in t){const o=t[r],n={x:0,y:0,w:o.data.width+2,h:o.data.height+2};i.push(n),e[r]=new Qp(n,o),o.hasRenderCallback&&this.haveRenderCallbacks.push(r)}}patchUpdatedImages(t,e){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const i in t.updatedImages)this.patchUpdatedImage(this.iconPositions[i],t.getImage(i),e),this.patchUpdatedImage(this.patternPositions[i],t.getImage(i),e)}patchUpdatedImage(t,e,i){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[r,o]=t.tl;i.update(e.data,void 0,{x:r,y:o})}}Pi("ImagePosition",Qp),Pi("ImageAtlas",tf),t.aC=void 0,(qa=t.aC||(t.aC={}))[qa.none=0]="none",qa[qa.horizontal=1]="horizontal",qa[qa.vertical=2]="vertical",qa[qa.horizontalOnly=3]="horizontalOnly";const ef=-17,rf=128,of=32640,nf=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];class sf{constructor(t){this.layoutVertexArray=new Cu,this.indexArray=new zu,this.programConfigurations=t,this.segments=new Ru,this.dynamicLayoutVertexArray=new Mu,this.opacityVertexArray=new Au,this.hasVisibleVertices=!1,this.placedSymbolArray=new su}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(t,e,i,r){this.isEmpty()||(i&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Vp.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Np.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,nf,!0),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Pi("SymbolBuffers",sf);class af{constructor(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new Ru,this.collisionVertexArray=new Eu}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Gp.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Pi("CollisionBuffers",af);class lf{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cn(this.zoom,i["text-size"]),this.iconSizeData=cn(this.zoom,i["icon-size"]);const r=this.layers[0].layout,o=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap="never"!==hn(r,"text-overlap","text-allow-overlap")||"never"!==hn(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==n&&!o.isConstant(),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((e=>t.aC[e]))),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=e.sourceID}createArrays(){this.text=new sf(new id(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new sf(new id(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new cu,this.lineVertexArray=new hu,this.symbolInstances=new lu,this.textAnchorOffsets=new du}calculateGlyphDependencies(t,e,i,r,o){for(const n of t)if(e[n.codePointAt(0)]=!0,(i||r)&&o){const t=Zp[n];t&&(e[t.codePointAt(0)]=!0)}}populate(e,i,r){const o=this.layers[0],n=o.layout,s=n.get("text-font"),a=n.get("text-field"),l=n.get("icon-image"),c=("constant"!==a.value.kind||a.value.value instanceof Xl&&!a.value.value.isEmpty()||a.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],!c&&!h)return;const d=i.iconDependencies,p=i.glyphDependencies,f=i.availableImages,m=new uh(this.zoom);for(const{feature:i,id:a,index:l,sourceLayerIndex:_}of e){const e=o._featureFilter.needGeometry,y=Ji(i,e);if(!o._featureFilter.filter(m,y,r))continue;let g,v;if(e||(y.geometry=Yi(i)),c){const t=o.getValueAndResolveTokens("text-field",y,r,f),e=Xl.factory(t),i=this.hasRTLText=this.hasRTLText||pn(e);(!i||"unavailable"===hh.getRTLTextPluginStatus()||i&&hh.isParsed())&&(g=Eo(e,o,y))}if(h){const t=o.getValueAndResolveTokens("icon-image",y,r,f);v=t instanceof ec?t:ec.fromString(t)}if(!g&&!v)continue;const x=this.sortFeaturesByKey?u.evaluate(y,{},r):void 0;if(this.features.push({id:a,text:g,icon:v,index:l,sourceLayerIndex:_,geometry:y.geometry,properties:i.properties,type:Kd.types[i.type],sortKey:x}),v&&(d[v.name]=!0),g){const e=s.evaluate(y,{},r).join(","),i="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.aC.vertical)>=0;for(const t of g.sections)if(t.image)d[t.image.name]=!0;else{const r=Di(g.toString()),o=t.fontStack||e,n=p[o]=p[o]||{};this.calculateGlyphDependencies(t.text,n,i,this.allowVerticalPlacement,r)}}}"line"===n.get("symbol-placement")&&(this.features=function(t){function e(e){a.push(t[e]),l++}function i(t,e,i){const r=s[t];return delete s[t],s[e]=r,a[r].geometry[0].pop(),a[r].geometry[0]=a[r].geometry[0].concat(i[0]),r}function r(t,e,i){const r=n[e];return delete n[e],n[t]=r,a[r].geometry[0].shift(),a[r].geometry[0]=i[0].concat(a[r].geometry[0]),r}function o(t,e,i){const r=i?e[0][e[0].length-1]:e[0][0];return t+":"+r.x+":"+r.y}const n={},s={},a=[];let l=0;for(let c=0;c<t.length;c++){const h=t[c],u=h.geometry,d=h.text?h.text.toString():null;if(!d){e(c);continue}const p=o(d,u),f=o(d,u,!0);if(p in s&&f in n&&s[p]!==n[f]){const t=r(p,f,u),e=i(p,f,a[t].geometry);delete n[p],delete s[f],s[o(d,a[e].geometry,!0)]=e,a[t].geometry=null}else p in s?i(p,f,u):f in n?r(p,f,u):(e(c),n[p]=l-1,s[f]=l-1)}return a.filter((t=>t.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey))}update(t,e,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:i}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:i}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const i=this.lineVertexArray.length;if(void 0!==t.segment){let i=t.dist(e[t.segment+1]),r=t.dist(e[t.segment]);const o={};for(let r=t.segment+1;r<e.length;r++)o[r]={x:e[r].x,y:e[r].y,tileUnitDistanceFromAnchor:i},r<e.length-1&&(i+=e[r+1].dist(e[r]));for(let i=t.segment||0;i>=0;i--)o[i]={x:e[i].x,y:e[i].y,tileUnitDistanceFromAnchor:r},i>0&&(r+=e[i-1].dist(e[i]));for(let t=0;t<e.length;t++){const e=o[t];this.lineVertexArray.emplaceBack(e.x,e.y,e.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}}addSymbols(e,i,r,o,n,s,a,l,c,h,u,d){const p=e.indexArray,f=e.layoutVertexArray,m=e.segments.prepareSegment(4*i.length,f,p,this.canOverlap?s.sortKey:void 0),_=this.glyphOffsetArray.length,y=m.vertexLength,g=this.allowVerticalPlacement&&a===t.aC.vertical?Math.PI/2:0,v=s.text&&s.text.sections;for(let t=0;t<i.length;t++){const{tl:o,tr:n,bl:a,br:c,tex:h,pixelOffsetTL:u,pixelOffsetBR:_,minFontScaleX:y,minFontScaleY:x,glyphOffset:b,isSDF:w,sectionIndex:T}=i[t],S=m.vertexLength,P=b[1];un(f,l.x,l.y,o.x,P+o.y,h.x,h.y,r,w,u.x,u.y,y,x),un(f,l.x,l.y,n.x,P+n.y,h.x+h.w,h.y,r,w,_.x,u.y,y,x),un(f,l.x,l.y,a.x,P+a.y,h.x,h.y+h.h,r,w,u.x,_.y,y,x),un(f,l.x,l.y,c.x,P+c.y,h.x+h.w,h.y+h.h,r,w,_.x,_.y,y,x),dn(e.dynamicLayoutVertexArray,l,g),p.emplaceBack(S,S+2,S+1),p.emplaceBack(S+1,S+2,S+3),m.vertexLength+=4,m.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(b[0]),t!==i.length-1&&T===i[t+1].sectionIndex||e.programConfigurations.populatePaintArrays(f.length,s,s.index,{imagePositions:{},canonical:d,formattedSection:v&&v[T]})}e.placedSymbolArray.emplaceBack(l.x,l.y,_,this.glyphOffsetArray.length-_,y,c,h,l.segment,r?r[0]:0,r?r[1]:0,o[0],o[1],a,0,!1,0,u)}_addCollisionDebugVertex(t,e,i,r,o,n){return e.emplaceBack(0,0),t.emplaceBack(i.x,i.y,r,o,Math.round(n.x),Math.round(n.y))}addCollisionDebugVertices(t,e,r,o,n,s,a){const l=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),c=l.vertexLength,h=n.layoutVertexArray,u=n.collisionVertexArray,d=a.anchorX,p=a.anchorY;this._addCollisionDebugVertex(h,u,s,d,p,new i(t,e)),this._addCollisionDebugVertex(h,u,s,d,p,new i(r,e)),this._addCollisionDebugVertex(h,u,s,d,p,new i(r,o)),this._addCollisionDebugVertex(h,u,s,d,p,new i(t,o)),l.vertexLength+=4;const f=n.indexArray;f.emplaceBack(c,c+1),f.emplaceBack(c+1,c+2),f.emplaceBack(c+2,c+3),f.emplaceBack(c+3,c),l.primitiveLength+=4}addDebugCollisionBoxes(t,e,i,r){for(let o=t;o<e;o++){const t=this.collisionBoxArray.get(o);this.addCollisionDebugVertices(t.x1,t.y1,t.x2,t.y2,r?this.textCollisionBox:this.iconCollisionBox,t.anchorPoint,i)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new af(ku,Up.members,Du),this.iconCollisionBox=new af(ku,Up.members,Du);for(let t=0;t<this.symbolInstances.length;t++){const e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}}_deserializeCollisionBoxesForSymbol(t,e,i,r,o,n,s,a,l){const c={};for(let r=e;r<i;r++){const e=t.get(r);c.textBox={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,anchorPointX:e.anchorPointX,anchorPointY:e.anchorPointY},c.textFeatureIndex=e.featureIndex;break}for(let e=r;e<o;e++){const i=t.get(e);c.verticalTextBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anchorPointY},c.verticalTextFeatureIndex=i.featureIndex;break}for(let e=n;e<s;e++){const i=t.get(e);c.iconBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anchorPointY},c.iconFeatureIndex=i.featureIndex;break}for(let e=a;e<l;e++){const i=t.get(e);c.verticalIconBox={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,anchorPointX:i.anchorPointX,anchorPointY:i.anchorPointY},c.verticalIconFeatureIndex=i.featureIndex;break}return c}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let e=0;e<this.symbolInstances.length;e++){const i=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs;for(let e=i.vertexStartIndex;e<r;e+=4)t.indexArray.emplaceBack(e,e+2,e+1),t.indexArray.emplaceBack(e+1,e+2,e+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const e=Math.sin(t),i=Math.cos(t),r=[],o=[],n=[];for(let t=0;t<this.symbolInstances.length;++t){n.push(t);const s=this.symbolInstances.get(t);r.push(0|Math.round(e*s.anchorX+i*s.anchorY)),o.push(s.featureIndex)}return n.sort(((t,e)=>r[t]-r[e]||o[e]-o[t])),n}addToSortKeyRanges(t,e){const i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===e?i.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(((t,e,i)=>{t>=0&&i.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)})),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let cf,hf,uf;Pi("SymbolBucket",lf,{omit:["layers","collisionBoxArray","features","compareText"]}),lf.MAX_GLYPHS=65535,lf.addDynamicAttributes=dn,za={get paint(){return hf=hf||new Ih({"icon-opacity":new wh(ua.paint_symbol["icon-opacity"]),"icon-color":new wh(ua.paint_symbol["icon-color"]),"icon-halo-color":new wh(ua.paint_symbol["icon-halo-color"]),"icon-halo-width":new wh(ua.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wh(ua.paint_symbol["icon-halo-blur"]),"icon-translate":new bh(ua.paint_symbol["icon-translate"]),"icon-translate-anchor":new bh(ua.paint_symbol["icon-translate-anchor"]),"text-opacity":new wh(ua.paint_symbol["text-opacity"]),"text-color":new wh(ua.paint_symbol["text-color"],{runtimeType:wl,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new wh(ua.paint_symbol["text-halo-color"]),"text-halo-width":new wh(ua.paint_symbol["text-halo-width"]),"text-halo-blur":new wh(ua.paint_symbol["text-halo-blur"]),"text-translate":new bh(ua.paint_symbol["text-translate"]),"text-translate-anchor":new bh(ua.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Ih({"symbol-placement":new bh(ua.layout_symbol["symbol-placement"]),"symbol-spacing":new bh(ua.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new bh(ua.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wh(ua.layout_symbol["symbol-sort-key"]),"symbol-z-order":new bh(ua.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new bh(ua.layout_symbol["icon-allow-overlap"]),"icon-overlap":new bh(ua.layout_symbol["icon-overlap"]),"icon-ignore-placement":new bh(ua.layout_symbol["icon-ignore-placement"]),"icon-optional":new bh(ua.layout_symbol["icon-optional"]),"icon-rotation-alignment":new bh(ua.layout_symbol["icon-rotation-alignment"]),"icon-size":new wh(ua.layout_symbol["icon-size"]),"icon-text-fit":new bh(ua.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new bh(ua.layout_symbol["icon-text-fit-padding"]),"icon-image":new wh(ua.layout_symbol["icon-image"]),"icon-rotate":new wh(ua.layout_symbol["icon-rotate"]),"icon-padding":new wh(ua.layout_symbol["icon-padding"]),"icon-keep-upright":new bh(ua.layout_symbol["icon-keep-upright"]),"icon-offset":new wh(ua.layout_symbol["icon-offset"]),"icon-anchor":new wh(ua.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new bh(ua.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new bh(ua.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new bh(ua.layout_symbol["text-rotation-alignment"]),"text-field":new wh(ua.layout_symbol["text-field"]),"text-font":new wh(ua.layout_symbol["text-font"]),"text-size":new wh(ua.layout_symbol["text-size"]),"text-max-width":new wh(ua.layout_symbol["text-max-width"]),"text-line-height":new bh(ua.layout_symbol["text-line-height"]),"text-letter-spacing":new wh(ua.layout_symbol["text-letter-spacing"]),"text-justify":new wh(ua.layout_symbol["text-justify"]),"text-radial-offset":new wh(ua.layout_symbol["text-radial-offset"]),"text-variable-anchor":new bh(ua.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wh(ua.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wh(ua.layout_symbol["text-anchor"]),"text-max-angle":new bh(ua.layout_symbol["text-max-angle"]),"text-writing-mode":new bh(ua.layout_symbol["text-writing-mode"]),"text-rotate":new wh(ua.layout_symbol["text-rotate"]),"text-padding":new bh(ua.layout_symbol["text-padding"]),"text-keep-upright":new bh(ua.layout_symbol["text-keep-upright"]),"text-transform":new wh(ua.layout_symbol["text-transform"]),"text-offset":new wh(ua.layout_symbol["text-offset"]),"text-allow-overlap":new bh(ua.layout_symbol["text-allow-overlap"]),"text-overlap":new bh(ua.layout_symbol["text-overlap"]),"text-ignore-placement":new bh(ua.layout_symbol["text-ignore-placement"]),"text-optional":new bh(ua.layout_symbol["text-optional"])})}};class df{constructor(t){if(void 0===t.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:gl,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Pi("FormatSectionOverride",df,{omit:["defaultValue"]});class pf extends Ch{constructor(t,e){super(t,za,e)}recalculate(t,e){if(super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const t=this.layout.get("text-writing-mode");if(t){const e=[];for(const i of t)e.indexOf(i)<0&&e.push(i);this.layout._values["text-writing-mode"]=e}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,e,i,r){const o=this.layout.get(t).evaluate(e,{},i,r),n=this._unevaluatedLayout._values[t];return n.isDataDriven()||ze(n.value)||!o?o:(s=e.properties,o.replace(/{([^{}]+)}/g,((t,e)=>s&&e in s?String(s[e]):"")));var s}createBucket(t){return new lf(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of za.paint.overridableProperties){if(!pf.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),i=new df(e),r=new qc(i,e.property.specification);let o=null;o="constant"===e.value.kind||"source"===e.value.kind?new Zc("source",r):new Wc("composite",r,e.value.zoomStops),this.paint._values[t]=new vh(e.property,o,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&pf.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const i=t.get("text-field"),r=za.paint.properties[e];let o=!1;const n=t=>{for(const e of t)if(r.overrides&&r.overrides.hasOverride(e))return void(o=!0)};if("constant"===i.value.kind&&i.value.value instanceof Xl)n(i.value.value.sections);else if("source"===i.value.kind||"composite"===i.value.kind){const t=e=>{o||(e instanceof rc&&pt(e.value)===Cl?n(e.value.sections):e instanceof Ec?n(e.sections):e.eachChild(t))},e=i.value;e._styleExpression&&t(e._styleExpression.expression)}return o}}Da={get paint(){return uf=uf||new Ih({"background-color":new bh(ua.paint_background["background-color"]),"background-pattern":new Sh(ua.paint_background["background-pattern"]),"background-opacity":new bh(ua.paint_background["background-opacity"])})}};class ff extends Ch{constructor(t,e){super(t,Da,e)}}class mf extends Ch{constructor(t,e){super(t,{},e),this.onAdd=t=>{this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},this.onRemove=t=>{this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class _f{constructor(t){this._methodToThrottle=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const yf={once:!0};class gf{constructor(t,e,i){if(o=e,n=i,(r=t)<0||r>25||n<0||n>=Math.pow(2,r)||o<0||o>=Math.pow(2,r))throw new Error("x="+e+", y="+i+", z="+t+" outside of bounds. 0<=x<"+Math.pow(2,t)+", 0<=y<"+Math.pow(2,t)+" 0<=z<=25 ");var r,o,n;this.z=t,this.x=e,this.y=i,this.key=mn(0,t,t,e,i)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,i){const r=(n=this.y,s=this.z,a=fn(256*(o=this.x),256*(n=Math.pow(2,s)-n-1),s),l=fn(256*(o+1),256*(n+1),s),a[0]+","+a[1]+","+l[0]+","+l[1]);var o,n,s,a,l;const c=function(t,e,i){let r,o="";for(let n=t;n>0;n--)r=1<<n-1,o+=(e&r?1:0)+(i&r?2:0);return o}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===i?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,r)}isChildOf(t){const e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){const e=Math.pow(2,this.z);return new i((t.x*e-this.x)*Ja,(t.y*e-this.y)*Ja)}toString(){return this.z+"/"+this.x+"/"+this.y}}class vf{constructor(t,e){this.wrap=t,this.canonical=e,this.key=mn(t,e.z,e.z,e.x,e.y)}}class xf{constructor(t,e,i,r,o){if(this.terrainRttPosMatrix32f=null,t<i)throw new Error("overscaledZ should be >= z; overscaledZ = "+t+"; z = "+i);this.overscaledZ=t,this.wrap=e,this.canonical=new gf(i,+r,+o),this.key=mn(e,t,i,r,o)}clone(){return new xf(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error("targetZ > this.overscaledZ; targetZ = "+t+"; overscaledZ = "+this.overscaledZ);const e=this.canonical.z-t;return t>this.canonical.z?new xf(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new xf(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,e){if(t>this.overscaledZ)throw new Error("targetZ > this.overscaledZ; targetZ = "+t+"; overscaledZ = "+this.overscaledZ);const i=this.canonical.z-t;return t>this.canonical.z?mn(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):mn(this.wrap*+e,t,t,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(t){if(t.wrap!==this.wrap)return!1;if(this.overscaledZ-t.overscaledZ<=0)return!1;if(0===t.overscaledZ)return this.overscaledZ>0;const e=this.canonical.z-t.canonical.z;return!(e<0)&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return[new xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,i=2*this.canonical.x,r=2*this.canonical.y;return[new xf(e,this.wrap,e,i,r),new xf(e,this.wrap,e,i+1,r),new xf(e,this.wrap,e,i,r+1),new xf(e,this.wrap,e,i+1,r+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new xf(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new xf(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new vf(this.wrap,this.canonical)}toString(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y}getTilePoint(t){return this.canonical.getTilePoint(new ap(t.x-this.wrap,t.y))}}Pi("CanonicalTileID",gf),Pi("OverscaledTileID",xf,{omit:["terrainRttPosMatrix32f"]});class bf{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){const e=new bf;return e.extend(t(new i(this.minX,this.minY))),e.extend(t(new i(this.maxX,this.minY))),e.extend(t(new i(this.minX,this.maxY))),e.extend(t(new i(this.maxX,this.maxY))),e}static fromPoints(t){const e=new bf;for(const i of t)e.extend(i);return e}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class wf{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e<t.length;e++){const i=t[e];this._stringToNumber[i]=e,this._numberToString[e]=i}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error("Out of bounds. Index requested n="+t+" can't be >= this._numberToString.length "+this._numberToString.length);return this._numberToString[t]}}class Tf{constructor(t,e,i,r,o){this.type="Feature",this._vectorTileFeature=t,this._x=i,this._y=r,this._z=e,this.properties=t.properties,this.id=o}projectPoint(t,e,i,r){return[360*(t.x+e)/r-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+i)/r)*Math.PI))-90]}projectLine(t,e,i,r){return t.map((t=>this.projectPoint(t,e,i,r)))}get geometry(){if(this._geometry)return this._geometry;const t=this._vectorTileFeature,e=t.extent*Math.pow(2,this._z),i=t.extent*this._x,r=t.extent*this._y,o=t.loadGeometry();switch(t.type){case 1:{const t=[];for(const e of o)t.push(e[0]);const n=this.projectLine(t,i,r,e);this._geometry=1===t.length?{type:"Point",coordinates:n[0]}:{type:"MultiPoint",coordinates:n};break}case 2:{const t=o.map((t=>this.projectLine(t,i,r,e)));this._geometry=1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t};break}case 3:{const t=ao(o),n=[];for(const o of t)n.push(o.map((t=>this.projectLine(t,i,r,e))));this._geometry=1===n.length?{type:"Polygon",coordinates:n[0]}:{type:"MultiPolygon",coordinates:n};break}default:throw new Error("unknown feature type: "+t.type)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&"_x"!==e&&"_y"!==e&&"_z"!==e&&(t[e]=this[e]);return t}}class Sf{_name;dataBuffer;nullabilityBuffer;_size;constructor(t,e,i){this._name=t,this.dataBuffer=e,"number"==typeof i?this._size=i:(this.nullabilityBuffer=i,this._size=i.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){return this.nullabilityBuffer&&this.nullabilityBuffer.get(t)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Pf extends Sf{}class If extends Pf{getValueFromBuffer(t){return this.dataBuffer[t]}}class Cf extends Pf{getValueFromBuffer(t){return this.dataBuffer[t]}}class Mf extends Sf{delta;constructor(t,e,i,r){super(t,e,r),this.delta=i}}class Af extends Mf{constructor(t,e,i,r){super(t,Int32Array.of(e),i,r)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}}class kf extends Sf{constructor(t,e,i){super(t,Int32Array.of(e),i)}getValueFromBuffer(t){return this.dataBuffer[0]}}class Ef{_name;_geometryVector;_idVector;_propertyVectors;_extent;propertyVectorsMap;constructor(t,e,i,r,o=4096){this._name=t,this._geometryVector=e,this._idVector=i,this._propertyVectors=r,this._extent=o}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((t=>[t.name,t])))),this.propertyVectorsMap.get(t)}*[Symbol.iterator](){const t=this.geometryVector[Symbol.iterator]();let e=0;for(;e<this.numFeatures;){let i;this.idVector&&(i=this.containsMaxSaveIntegerValues(this.idVector)?Number(this.idVector.getValue(e)):this.idVector.getValue(e));const r=t?.next().value,o={};for(const t of this.propertyVectors){if(!t)continue;const i=t.name,r=t.getValue(e);null!==r&&(o[i]=r)}e++,yield{id:i,geometry:r,properties:o}}}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){const t=[],e=this.geometryVector.getGeometries();for(let i=0;i<this.numFeatures;i++){let r;this.idVector&&(r=this.containsMaxSaveIntegerValues(this.idVector)?Number(this.idVector.getValue(i)):this.idVector.getValue(i));const o={coordinates:e[i],type:this.geometryVector.geometryType(i)},n={};for(const t of this.propertyVectors){if(!t)continue;const e=t.name,r=t.getValue(i);null!==r&&(n[e]=r)}t.push({id:r,geometry:o,properties:n})}return t}containsMaxSaveIntegerValues(t){return t instanceof If||t instanceof kf&&t instanceof Af||t instanceof Cf}}const zf=0,Df=0,Lf=1,Of=2,Rf=3,Ff=4,jf=5,Bf=6,Vf=7,Nf=8,Gf=9,Uf=0,qf=1;class Zf{value;constructor(t){this.value=t}get(){return this.value}set(t){this.value=t}increment(){return this.value++}add(t){this.value+=t}}var Wf,Hf,Xf,Yf,Jf,Kf,$f,Qf,tm,em;(Xf=La||(La={})).NONE="NONE",Xf.DELTA="DELTA",Xf.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",Xf.RLE="RLE",Xf.MORTON="MORTON",Xf.PDE="PDE",(Hf=Oa||(Oa={})).NONE="NONE",Hf.FAST_PFOR="FAST_PFOR",Hf.VARINT="VARINT",Hf.ALP="ALP",(Wf=Ra||(Ra={})).PRESENT="PRESENT",Wf.DATA="DATA",Wf.OFFSET="OFFSET",Wf.LENGTH="LENGTH";class im{_dictionaryType;_offsetType;_lengthType;constructor(t,e,i){this._dictionaryType=t,this._offsetType=e,this._lengthType=i}get dictionaryType(){return this._dictionaryType}get offsetType(){return this._offsetType}get lengthType(){return this._lengthType}}($f=Fa||(Fa={})).NONE="NONE",$f.SINGLE="SINGLE",$f.SHARED="SHARED",$f.VERTEX="VERTEX",$f.MORTON="MORTON",$f.FSST="FSST",(Kf=ja||(ja={})).VERTEX="VERTEX",Kf.INDEX="INDEX",Kf.STRING="STRING",Kf.KEY="KEY",(Jf=Ba||(Ba={})).VAR_BINARY="VAR_BINARY",Jf.GEOMETRIES="GEOMETRIES",Jf.PARTS="PARTS",Jf.RINGS="RINGS",Jf.TRIANGLES="TRIANGLES",Jf.SYMBOL="SYMBOL",Jf.DICTIONARY="DICTIONARY",(Yf=Va||(Va={}))[Yf.FLAT=0]="FLAT",Yf[Yf.CONST=1]="CONST",Yf[Yf.SEQUENCE=2]="SEQUENCE",Yf[Yf.DICTIONARY=3]="DICTIONARY",Yf[Yf.FSST_DICTIONARY=4]="FSST_DICTIONARY";class rm{values;_size;constructor(t,e){this.values=t,this._size=e}get(t){const e=Math.floor(t/8);return 1==(this.values[e]>>t%8&1)}set(t,e){const i=Math.floor(t/8);this.values[i]=this.values[i]|(e?1:0)<<t%8}getInt(t){const e=Math.floor(t/8);return this.values[e]>>t%8&1}size(){return this._size}getBuffer(){return this.values}}class om extends Pf{getValueFromBuffer(t){return this.dataBuffer[t]}}class nm extends Mf{constructor(t,e,i,r){super(t,BigInt64Array.of(e),i,r)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}}class sm{_geometryOffsets;_partOffsets;_ringOffsets;constructor(t,e,i){this._geometryOffsets=t,this._partOffsets=e,this._ringOffsets=i}get geometryOffsets(){return this._geometryOffsets}get partOffsets(){return this._partOffsets}get ringOffsets(){return this._ringOffsets}}(em=Na||(Na={}))[em.POINT=0]="POINT",em[em.LINESTRING=1]="LINESTRING",em[em.POLYGON=2]="POLYGON",em[em.MULTIPOINT=3]="MULTIPOINT",em[em.MULTILINESTRING=4]="MULTILINESTRING",em[em.MULTIPOLYGON=5]="MULTIPOLYGON",(tm=Ga||(Ga={}))[tm.POINT=0]="POINT",tm[tm.LINESTRING=1]="LINESTRING",tm[tm.POLYGON=2]="POLYGON",(Qf=Ua||(Ua={}))[Qf.MORTON=0]="MORTON",Qf[Qf.VEC_2=1]="VEC_2",Qf[Qf.VEC_3=2]="VEC_3";class am{createPoint(t){return[[t]]}createMultiPoint(t){return t.map((t=>[t]))}createLineString(t){return[t]}createMultiLineString(t){return t}createPolygon(t,e){return[t].concat(e)}createMultiPolygon(t){return t.flat()}}class lm{_vertexBufferType;_topologyVector;_vertexOffsets;_vertexBuffer;_mortonSettings;constructor(t,e,i,r,o){this._vertexBufferType=t,this._topologyVector=e,this._vertexOffsets=i,this._vertexBuffer=r,this._mortonSettings=o}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}*[Symbol.iterator](){const t=Un(this);let e=0;for(;e<this.numGeometries;)yield{coordinates:t[e],type:this.geometryType(e)},e++}getSimpleEncodedVertex(t){const e=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getVertex(t){if(this.vertexOffsets&&this.mortonSettings){const e=Nn(this.vertexBuffer[this.vertexOffsets[t]],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[e.x,e.y]}const e=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getGeometries(){return Un(this)}get mortonSettings(){return this._mortonSettings}}class cm extends lm{_numGeometries;_geometryType;constructor(t,e,i,r,o,n,s){super(i,r,o,n,s),this._numGeometries=t,this._geometryType=e}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===Na.POLYGON||this._geometryType===Na.MULTIPOLYGON}containsSingleGeometryType(){return!0}}class hm extends lm{_geometryTypes;constructor(t,e,i,r,o,n){super(t,i,r,o,n),this._geometryTypes=e}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let t=0;t<this.numGeometries;t++)if(this.geometryType(t)===Na.POLYGON||this.geometryType(t)===Na.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}}class um{_triangleOffsets;_indexBuffer;_vertexBuffer;_topologyVector;constructor(t,e,i,r){this._triangleOffsets=t,this._indexBuffer=e,this._vertexBuffer=i,this._topologyVector=r}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw new Error("Cannot convert GpuVector to coordinates without topology information");const t=new Array(this.numGeometries),e=this._topologyVector,i=e.partOffsets,r=e.ringOffsets,o=e.geometryOffsets;let n=0,s=1,a=1,l=1;for(let e=0;e<this.numGeometries;e++)switch(this.geometryType(e)){case Na.POLYGON:{const c=i[s]-i[s-1];s++;const h=[];for(let t=0;t<c;t++){const t=r[a]-r[a-1];a++;const e=[];for(let i=0;i<t;i++){const t=this._vertexBuffer[n++],i=this._vertexBuffer[n++];e.push(new no(t,i))}e.length>0&&e.push(e[0]),h.push(e)}t[e]=h,o&&l++}break;case Na.MULTIPOLYGON:{const c=o[l]-o[l-1];l++;const h=[];for(let t=0;t<c;t++){const t=i[s]-i[s-1];s++;for(let e=0;e<t;e++){const t=r[a]-r[a-1];a++;const e=[];for(let i=0;i<t;i++){const t=this._vertexBuffer[n++],i=this._vertexBuffer[n++];e.push(new no(t,i))}e.length>0&&e.push(e[0]),h.push(e)}}t[e]=h}}return t}[Symbol.iterator](){return null}}class dm extends um{_numGeometries;_geometryType;constructor(t,e,i,r,o,n){super(i,r,o,n),this._numGeometries=t,this._geometryType=e}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class pm extends um{_geometryTypes;constructor(t,e,i,r,o){super(e,i,r,o),this._geometryTypes=t}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}class fm extends Sf{dataVector;constructor(t,e,i){super(t,e.getBuffer(),i),this.dataVector=e}getValueFromBuffer(t){return this.dataVector.get(t)}}class mm extends Pf{getValueFromBuffer(t){return this.dataBuffer[t]}}class _m extends Sf{constructor(t,e,i){super(t,BigInt64Array.of(e),i)}getValueFromBuffer(t){return this.dataBuffer[0]}}const ym=new TextDecoder;class gm extends Sf{offsetBuffer;constructor(t,e,i,r){super(t,i,r),this.offsetBuffer=e}}class vm extends gm{textEncoder;constructor(t,e,i,r){super(t,e,i,r??e.length-1),this.textEncoder=new TextEncoder}getValueFromBuffer(t){return is(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class xm extends gm{indexBuffer;textEncoder;constructor(t,e,i,r,o){super(t,i,r,o??e.length),this.indexBuffer=e,this.indexBuffer=e,this.textEncoder=new TextEncoder}getValueFromBuffer(t){const e=this.indexBuffer[t];return is(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class bm extends gm{indexBuffer;symbolOffsetBuffer;symbolTableBuffer;textEncoder;symbolLengthBuffer;lengthBuffer;decodedDictionary;constructor(t,e,i,r,o,n,s){super(t,i,r,s),this.indexBuffer=e,this.symbolOffsetBuffer=o,this.symbolTableBuffer=n,this.textEncoder=new TextEncoder}getValueFromBuffer(t){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer),this.lengthBuffer=this.offsetToLengthBuffer(this.offsetBuffer)),this.decodedDictionary=function(t,e,i){const r=[],o=new Array(e.length).fill(0);for(let t=1;t<e.length;t++)o[t]=o[t-1]+e[t-1];for(let n=0;n<i.length;n++)if(255===i[n])r.push(i[++n]);else{const s=e[i[n]],a=o[i[n]];for(let e=0;e<s;e++)r.push(t[a+e])}return new Uint8Array(r)}(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer));const e=this.indexBuffer[t];return is(this.decodedDictionary,this.offsetBuffer[e],this.offsetBuffer[e+1])}offsetToLengthBuffer(t){const e=new Uint32Array(t.length-1);let i=t[0];for(let r=1;r<t.length;r++){const o=t[r];e[r-1]=o-i,i=o}return e}}const wm=new TextDecoder;class Tm{constructor(t,e){var i;switch(this._featureData=t,this.properties=this._featureData.properties||{},null===(i=this._featureData.geometry)||void 0===i?void 0:i.type){case Na.POINT:case Na.MULTIPOINT:this.type=1;break;case Na.LINESTRING:case Na.MULTILINESTRING:this.type=2;break;case Na.POLYGON:case Na.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){const t=[];for(const e of this._featureData.geometry.coordinates){const r=[];for(const t of e)r.push(new i(t.x,t.y));t.push(r)}return t}}class Sm{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new Tm(this.features[t],this.extent)}}class Pm{constructor(t){this.layers={};const e=function(t,e,i=!0){const r=new Zf(0),o=[];for(;r.get()<t.length;){const e=vn(t,r,1)[0]>>>0,h=r.get()+e;if(h>t.length)throw new Error("Block overruns tile: "+h+" > "+t.length);if(1!=vn(t,r,1)[0]>>>0){r.set(h);continue}const u=ls(t,r),d=u[1],p=u[0].featureTables[0];let f=null,m=null;const _=[];let y=0;for(const e of p.columns){const o=e.name;if("id"===o){let n=null;if(e.nullable){const e=kn(t,r),i=r.get(),o=es(t,e.numValues,e.byteLength,r);r.set(i+e.byteLength),n=new rm(o,e.numValues)}const s=kn(t,r);y=s.decompressedCount,f=cs(t,e,r,o,s,n??y,i)}else if("geometry"===o){const e=vn(t,r,1)[0];if(0===y){const e=r.get();y=kn(t,r).decompressedCount,r.set(e)}m=$n(t,e,r,y)}else{const i=os(e)?vn(t,r,1)[0]:1;if(0===i&&"scalarType"===e.type)continue;const o=(n=t,s=r,l=i,c=y,"scalarType"===(a=e).type?function(t,e,i,r,o,n){let s=null,a=0;if(0===t)return null;if(n.nullable){const t=kn(e,i);a=t.numValues;const r=i.get(),o=es(e,a,t.byteLength,i);i.set(r+t.byteLength),s=new rm(o,t.numValues)}const l=s??r;switch(o.physicalType){case Ff:case Rf:return function(t,e,i,r,o){const n=kn(t,e),s=Vn(n,o,t,e),a=r.physicalType===Rf;if(s===Va.FLAT){const r=zn(t,e,n,a,0,rs(o)?o:void 0);return new If(i.name,r,o)}if(s===Va.SEQUENCE){const r=Rn(t,e,n);return new Af(i.name,r[0],r[1],n.numRleValues)}{const r=On(t,e,n,a);return new kf(i.name,r,o)}}(e,i,n,o,l);case Gf:return function(t,e,i,r,o){let n=null,s=null,a=null,l=null,c=null,h=null,u=null,d=null;for(let t=0;t<r;t++){const t=kn(e,i);if(0!==t.byteLength)switch(t.physicalStreamType){case Ra.PRESENT:{const r=es(e,t.numValues,t.byteLength,i);h=new rm(r,t.numValues);break}case Ra.OFFSET:s=zn(e,i,t,!1,0,null!=o||null!=h?o??h:void 0);break;case Ra.LENGTH:{const r=Dn(e,i,t);Ba.DICTIONARY===t.logicalStreamType.lengthType?n=r:Ba.SYMBOL===t.logicalStreamType.lengthType?l=r:u=r;break}case Ra.DATA:{const r=e.subarray(i.get(),i.get()+t.byteLength);i.add(t.byteLength);const o=t.logicalStreamType.dictionaryType;Fa.FSST===o?c=r:Fa.SINGLE===o||Fa.SHARED===o?a=r:Fa.NONE===o&&(d=r);break}}}return((g=c)?new bm(t,s,n,a,l,g,o??h):null)??(p=t,m=s,_=n,y=o??h,(f=a)?y?new xm(p,m,_,f,y):new xm(p,m,_,f):null)??function(t,e,i,r,o){if(!e||!i)return null;if(r)return o?new xm(t,r,e,i,o):new xm(t,r,e,i);if(o&&o.size()!==e.length-1){const r=new Int32Array(o.size());let n=0;for(let t=0;t<o.size();t++)r[t]=o.get(t)?n++:0;return new xm(t,r,e,i,o)}return o?new vm(t,e,i,o):new vm(t,e,i)}(t,u,d,s,o??h);var p,f,m,_,y,g}(n.name,e,i,n.nullable?t-1:t,s);case Df:return function(t,e,i,r,o){const n=kn(t,e),s=n.numValues,a=e.get(),l=rs(o)?o:void 0,c=es(t,s,n.byteLength,e,l);e.set(a+n.byteLength);const h=new rm(c,s);return new fm(i.name,h,o)}(e,i,n,0,l);case Bf:case jf:return function(t,e,i,r,o){const n=kn(t,e),s=Vn(n,r,t,e),a=o.physicalType===jf;if(s===Va.FLAT){const o=jn(t,e,n,a,rs(r)?r:void 0);return new om(i.name,o,r)}if(s===Va.SEQUENCE){const r=Fn(t,e,n);return new nm(i.name,r[0],r[1],n.numRleValues)}{const o=Bn(t,e,n,a);return new _m(i.name,o,r)}}(e,i,n,l,o);case Vf:return function(t,e,i,r){const o=kn(t,e),n=rs(r)?r:void 0,s=function(t,e,i,r){const o=e.get(),n=o+i*Float32Array.BYTES_PER_ELEMENT,s=new Uint8Array(t.subarray(o,n)).buffer,a=new Float32Array(s);return e.set(n),r?En(a,r,0):a}(t,e,o.numValues,n);return new mm(i.name,s,r)}(e,i,n,l);case Nf:return function(t,e,i,r){const o=kn(t,e),n=rs(r)?r:void 0,s=function(t,e,i,r){const o=e.get(),n=o+i*Float64Array.BYTES_PER_ELEMENT,s=new Uint8Array(t.subarray(o,n)).buffer,a=new Float64Array(s);return e.set(n),r?En(a,r,0):a}(t,e,o.numValues,n);return new Cf(i.name,s,r)}(e,i,n,l);default:throw new Error("The specified data type for the field is currently not supported: "+o)}}(l,n,s,c,a.scalarType,a):1!=l?null:function(t,e,i,r){let o=null,n=null,s=null,a=null,l=!1;for(;!l;){const i=kn(t,e);switch(i.physicalStreamType){case Ra.LENGTH:Ba.DICTIONARY===i.logicalStreamType.lengthType?o=Dn(t,e,i):s=Dn(t,e,i);break;case Ra.DATA:Fa.SINGLE===i.logicalStreamType.dictionaryType||Fa.SHARED===i.logicalStreamType.dictionaryType?(n=t.subarray(e.get(),e.get()+i.byteLength),l=!0):a=t.subarray(e.get(),e.get()+i.byteLength),e.add(i.byteLength)}}const c=i.complexType.children,h=[];let u=0;for(const l of c){const c=vn(t,e,1)[0];if(0==c)continue;const d=i.name+("default"===l.name?"":":"+l.name);if(2!==c||"scalarField"!==l.type||l.scalarField.physicalType!==Gf)throw new Error("Currently only optional string fields are implemented for a struct.");const p=kn(t,e),f=es(t,p.numValues,p.byteLength,e),m=kn(t,e),_=zn(t,e,m,!1,0,m.decompressedCount!==r?new rm(f,p.numValues):void 0);h[u++]=a?new bm(d,_,o,n,s,a,new rm(f,p.numValues)):new xm(d,_,o,n,new rm(f,p.numValues))}return h}(n,s,a,c));if(o)if(Array.isArray(o))for(const t of o)_.push(t);else _.push(o)}}const g=new Ef(p.name,m,f,_,d);o.push(g),r.set(h)}var n,s,a,l,c;return o}(new Uint8Array(t));this.layers=e.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e.name]:new Sm(e)})),{})}}class Im{constructor(t,e){this.feature=t,this.type=t.type,this.properties=t.tags?t.tags:{},this.extent=e,"id"in t&&("string"==typeof t.id?this.id=parseInt(t.id,10):"number"!=typeof t.id||isNaN(t.id)||(this.id=t.id))}loadGeometry(){const t=[],e=1===this.feature.type?[this.feature.geometry]:this.feature.geometry;for(const i of e){const e=[];for(const t of i)e.push(new no(t[0],t[1]));t.push(e)}return t}}const Cm="_geojsonTileLayer";class Mm{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new nh(Ja,16,0),this.grid3D=new nh(Ja,16,0),this.featureIndexArray=new fu,this.promoteId=e}insert(t,e,i,r,o,n){const s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,r,o);const a=n?this.grid3D:this.grid;for(let t=0;t<e.length;t++){const i=e[t],r=[1/0,1/0,-1/0,-1/0];for(let t=0;t<i.length;t++){const e=i[t];r[0]=Math.min(r[0],e.x),r[1]=Math.min(r[1],e.y),r[2]=Math.max(r[2],e.x),r[3]=Math.max(r[3],e.y)}r[0]<Ja&&r[1]<Ja&&r[2]>=0&&r[3]>=0&&a.insert(s,r[0],r[1],r[2],r[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new Qd(new $p(this.rawTileData)).layers:new Pm(this.rawTileData).layers,this.sourceLayerCoder=new wf(this.vtLayers?Object.keys(this.vtLayers).sort():[Cm])),this.vtLayers}query(t,e,r,o){this.loadVTLayers();const n=t.params,s=Ja/t.tileSize/t.scale,a=Ve(n.filter,n.globalState),l=t.queryGeometry,c=t.queryPadding*s,h=bf.fromPoints(l),u=this.grid.query(h.minX-c,h.minY-c,h.maxX+c,h.maxY+c),d=bf.fromPoints(t.cameraQueryGeometry).expandBy(c),p=this.grid3D.query(d.minX,d.minY,d.maxX,d.maxY,((e,r,o,n)=>function(t,e,r,o,n){for(const i of t)if(e<=i.x&&r<=i.y&&o>=i.x&&n>=i.y)return!0;const s=[new i(e,r),new i(e,n),new i(o,n),new i(o,r)];if(t.length>2)for(const e of s)if(sr(t,e))return!0;for(let e=0;e<t.length-1;e++)if(ar(t[e],t[e+1],s))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,o+c,n+c)));for(const t of p)u.push(t);u.sort(gs);const f={};let m;for(let i=0;i<u.length;i++){const c=u[i];if(c===m)continue;m=c;const h=this.featureIndexArray.get(c);let d=null;this.loadMatchingFeature(f,h.bucketIndex,h.sourceLayerIndex,h.featureIndex,a,n.layers,n.availableImages,e,r,o,((e,i,r)=>(d||(d=Yi(e)),i.queryIntersectsFeature({queryGeometry:l,feature:e,featureState:r,geometry:d,zoom:this.z,transform:t.transform,pixelsToTileUnits:s,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))))}return f}loadMatchingFeature(t,e,i,r,o,n,s,a,l,c,h){const u=this.bucketLayerIDs[e];if(n&&!u.some((t=>n.has(t))))return;const d=this.sourceLayerCoder.decode(i),p=this.vtLayers[d].feature(r);if(o.needGeometry){const t=Ji(p,!0);if(!o.filter(new uh(this.tileID.overscaledZ),t,this.tileID.canonical))return}else if(!o.filter(new uh(this.tileID.overscaledZ),p))return;const f=this.getId(p,d);for(let e=0;e<u.length;e++){const i=u[e];if(n&&!n.has(i))continue;const o=a[i];if(!o)continue;let d={};f&&c&&(d=c.getState(o.sourceLayer||Cm,f));const m=I({},l[i]);m.paint=ys(m.paint,o.paint,p,d,s),m.layout=ys(m.layout,o.layout,p,d,s);const _=!h||h(p,o,d);if(!_)continue;const y=new Tf(p,this.z,this.x,this.y,f);y.layer=m;let g=t[i];void 0===g&&(g=t[i]=[]),g.push({featureIndex:r,feature:y,intersectionZ:_})}}lookupSymbolFeatures(t,e,i,r,o,n,s,a){const l={};this.loadVTLayers();const c=Ve(o.filterSpec,o.globalState);for(const o of t)this.loadMatchingFeature(l,i,r,o,c,n,s,a,e);return l}hasLayer(t){for(const e of this.bucketLayerIDs)for(const i of e)if(t===i)return!0;return!1}getId(t,e){var i;let r=t.id;return this.promoteId&&(r=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]],"boolean"==typeof r&&(r=Number(r)),void 0===r&&(null===(i=t.properties)||void 0===i?void 0:i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))),r}}Pi("FeatureIndex",Mm,{omit:["rawTileData","sourceLayerCoder"]});class Am extends i{constructor(t,e,i,r){super(t,e),this.angle=i,void 0!==r&&(this.segment=r)}clone(){return new Am(this.x,this.y,this.angle,this.segment)}}Pi("Anchor",Am);class km{constructor(t,e,r,o,n,s,a,l,c,h){var u;if(this.boxStartIndex=t.length,c){let t=s.top,e=s.bottom;const i=s.collisionPadding;i&&(t-=i[1],e+=i[3]);let r=e-t;r>0&&(r=Math.max(10,r),this.circleDiameter=r)}else{const c=(null===(u=s.image)||void 0===u?void 0:u.content)&&(s.image.textFitWidth||s.image.textFitHeight)?an(s):{x1:s.left,y1:s.top,x2:s.right,y2:s.bottom};c.y1=c.y1*a-l[0],c.y2=c.y2*a+l[2],c.x1=c.x1*a-l[3],c.x2=c.x2*a+l[1];const d=s.collisionPadding;if(d&&(c.x1-=d[0]*a,c.y1-=d[1]*a,c.x2+=d[2]*a,c.y2+=d[3]*a),h){const t=new i(c.x1,c.y1),e=new i(c.x2,c.y1),r=new i(c.x1,c.y2),o=new i(c.x2,c.y2),n=h*Math.PI/180;t._rotate(n),e._rotate(n),r._rotate(n),o._rotate(n),c.x1=Math.min(t.x,e.x,r.x,o.x),c.x2=Math.max(t.x,e.x,r.x,o.x),c.y1=Math.min(t.y,e.y,r.y,o.y),c.y2=Math.max(t.y,e.y,r.y,o.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,o,n)}this.boxEndIndex=t.length}}t.aS=void 0,(Za=t.aS||(t.aS={}))[Za.center=1]="center",Za[Za.left=2]="left",Za[Za.right=3]="right",Za[Za.top=4]="top",Za[Za.bottom=5]="bottom",Za[Za["top-left"]=6]="top-left",Za[Za["top-right"]=7]="top-right",Za[Za["bottom-left"]=8]="bottom-left",Za[Za["bottom-right"]=9]="bottom-right";const Em=Number.POSITIVE_INFINITY,zm=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Dm{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,i]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const r=i>>4;if(1!==r)throw new Error("Got v"+r+" data when expected v1.");const o=zm[15&i];if(!o)throw new Error("Unrecognized array type.");const[n]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Dm(s,n,o,t)}constructor(t,e=64,i=Float64Array,r){if(isNaN(t)||t<0)throw new Error("Unpexpected numItems value: "+t+".");this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=zm.indexOf(this.ArrayType),n=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(o<0)throw new Error("Unexpected typed array class: "+i+".");r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+n+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=e,i}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error("Added "+t+" items when expected "+this.numItems+".");return Hs(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,i,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:n,nodeSize:s}=this,a=[0,o.length-1,0],l=[];for(;a.length;){const c=a.pop()||0,h=a.pop()||0,u=a.pop()||0;if(h-u<=s){for(let s=u;s<=h;s++){const a=n[2*s],c=n[2*s+1];a>=t&&a<=i&&c>=e&&c<=r&&l.push(o[s])}continue}const d=u+h>>1,p=n[2*d],f=n[2*d+1];p>=t&&p<=i&&f>=e&&f<=r&&l.push(o[d]),(0===c?t<=p:e<=f)&&(a.push(u),a.push(d-1),a.push(1-c)),(0===c?i>=p:r>=f)&&(a.push(d+1),a.push(h),a.push(1-c))}return l}within(t,e,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:n}=this,s=[0,r.length-1,0],a=[],l=i*i;for(;s.length;){const c=s.pop()||0,h=s.pop()||0,u=s.pop()||0;if(h-u<=n){for(let i=u;i<=h;i++)Ks(o[2*i],o[2*i+1],t,e)<=l&&a.push(r[i]);continue}const d=u+h>>1,p=o[2*d],f=o[2*d+1];Ks(p,f,t,e)<=l&&a.push(r[d]),(0===c?t-i<=p:e-i<=f)&&(s.push(u),s.push(d-1),s.push(1-c)),(0===c?t+i>=p:e+i>=f)&&(s.push(d+1),s.push(h),s.push(1-c))}return a}}t.cO=void 0,(Wa=t.cO||(t.cO={})).create="create",Wa.load="load",Wa.fullLoad="fullLoad";let Lm=null,Om=[];const Rm=1e3/60,Fm="loadTime",jm="fullLoadTime",Bm={mark(t){performance.mark(t)},frame(t){const e=t;null!=Lm&&Om.push(e-Lm),Lm=e},clearMetrics(){Lm=null,Om=[],performance.clearMeasures(Fm),performance.clearMeasures(jm);for(const e in t.cO)performance.clearMarks(t.cO[e])},getPerformanceMetrics(){performance.measure(Fm,t.cO.create,t.cO.load),performance.measure(jm,t.cO.create,t.cO.fullLoad);const e=performance.getEntriesByName(Fm)[0].duration,i=performance.getEntriesByName(jm)[0].duration,r=Om.length,o=1/(Om.reduce(((t,e)=>t+e),0)/r/1e3),n=Om.filter((t=>t>Rm)).reduce(((t,e)=>t+(e-Rm)/Rm),0);return{loadTime:e,fullLoadTime:i,fps:o,percentDroppedFrames:n/(r+n)*100,totalFrames:r}}};t.$=go,t.A=ra,t.B=eh,t.C=dh,t.D=bh,t.E=ml,t.F=Si,t.G=th,t.H=function([t,e,i]){return e+=90,e*=Math.PI/180,i*=Math.PI/180,{x:t*Math.cos(e)*Math.sin(i),y:t*Math.sin(e)*Math.sin(i),z:t*Math.cos(i)}},t.I=Qp,t.J=bc,t.K=uh,t.L=ih,t.M=function(t){if(null==tl){const e=t.navigator?t.navigator.userAgent:null;tl=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return tl},t.N=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new _f((()=>this.process())),this.subscription=O(this.target,"message",(t=>this.receive(t)),!1),this.globalScope=z(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise(((i,r)=>{const o=Math.round(1e18*Math.random()).toString(36).substring(0,10),n=e?O(e.signal,"abort",(()=>{null==n||n.unsubscribe(),delete this.resolveRejects[o];const e={id:o,type:"<cancel>",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(e)}),yf):null;this.resolveRejects[o]={resolve:t=>{null==n||n.unsubscribe(),i(t)},reject:t=>{null==n||n.unsubscribe(),r(t)}};const s=[],a=Object.assign(Object.assign({},t),{id:o,sourceMapId:this.mapId,origin:location.origin,data:Ai(t.data,s)});this.target.postMessage(a,{transfer:s})}))}receive(t){const e=t.data,i=e.id;if(!("file://"!==e.origin&&"file://"!==location.origin&&"resource://android"!==e.origin&&"resource://android"!==location.origin&&e.origin!==location.origin||e.targetMapId&&this.mapId!==e.targetMapId)){if("<cancel>"===e.type){delete this.tasks[i];const t=this.abortControllers[i];return delete this.abortControllers[i],void(t&&t.abort())}if(z(self)||e.mustQueue)return this.tasks[i]=e,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,e)}}process(){if(0===this.taskQueue.length)return;const t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,i){return e(this,void 0,void 0,(function*(){if("<response>"===i.type){const e=this.resolveRejects[t];if(delete this.resolveRejects[t],!e)return;return void(i.error?e.reject(ki(i.error)):e.resolve(ki(i.data)))}if(!this.messageHandlers[i.type])return void this.completeTask(t,new Error("Could not find a registered handler for "+i.type+", map ID: "+this.mapId+", available handlers: "+Object.keys(this.messageHandlers).join(", ")));const e=ki(i.data),r=new AbortController;this.abortControllers[t]=r;try{const o=yield this.messageHandlers[i.type](i.sourceMapId,e,r);this.completeTask(t,null,o)}catch(e){this.completeTask(t,e)}}))}completeTask(t,e,i){const r=[];delete this.abortControllers[t];const o={id:t,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:e?Ai(e):null,data:Ai(i,r)};this.target.postMessage(o,{transfer:r})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.O=cl,t.P=i,t.Q=function(){var t=new ra(16);return ra!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.R=bd,t.S=function(t,e,i){var r,o,n,s,a,l,c,h,u,d,p,f,m=i[0],_=i[1],y=i[2];return e===t?(t[12]=e[0]*m+e[4]*_+e[8]*y+e[12],t[13]=e[1]*m+e[5]*_+e[9]*y+e[13],t[14]=e[2]*m+e[6]*_+e[10]*y+e[14],t[15]=e[3]*m+e[7]*_+e[11]*y+e[15]):(o=e[1],n=e[2],s=e[3],a=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=e[9],p=e[10],f=e[11],t[0]=r=e[0],t[1]=o,t[2]=n,t[3]=s,t[4]=a,t[5]=l,t[6]=c,t[7]=h,t[8]=u,t[9]=d,t[10]=p,t[11]=f,t[12]=r*m+a*_+u*y+e[12],t[13]=o*m+l*_+d*y+e[13],t[14]=n*m+c*_+p*y+e[14],t[15]=s*m+h*_+f*y+e[15]),t},t.T=Cd,t.U=function(t,e,i){var r=i[0],o=i[1],n=i[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.V=function(t,e,i){var r=e[0],o=e[1],n=e[2],s=e[3],a=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=e[9],p=e[10],f=e[11],m=e[12],_=e[13],y=e[14],g=e[15],v=i[0],x=i[1],b=i[2],w=i[3];return t[0]=v*r+x*a+b*u+w*m,t[1]=v*o+x*l+b*d+w*_,t[2]=v*n+x*c+b*p+w*y,t[3]=v*s+x*h+b*f+w*g,t[4]=(v=i[4])*r+(x=i[5])*a+(b=i[6])*u+(w=i[7])*m,t[5]=v*o+x*l+b*d+w*_,t[6]=v*n+x*c+b*p+w*y,t[7]=v*s+x*h+b*f+w*g,t[8]=(v=i[8])*r+(x=i[9])*a+(b=i[10])*u+(w=i[11])*m,t[9]=v*o+x*l+b*d+w*_,t[10]=v*n+x*c+b*p+w*y,t[11]=v*s+x*h+b*f+w*g,t[12]=(v=i[12])*r+(x=i[13])*a+(b=i[14])*u+(w=i[15])*m,t[13]=v*o+x*l+b*d+w*_,t[14]=v*n+x*c+b*p+w*y,t[15]=v*s+x*h+b*f+w*g,t},t.W=function(t,e){const i={};for(let r=0;r<e.length;r++){const o=e[r];o in t&&(i[o]=t[o])}return i},t.X=np,t.Y=P,t.Z=vo,t._=e,t.a=ll,t.a$=zu,t.a0=j,t.a1=function(t,e,i,r,o){t.url=t.url.replace(/\/\{z\}\/\{x\}\/\{y\}$/,"").replace(/\/\d+\/\d+\/\d+$/,""),t.method="POST",t.body=JSON.stringify({tiles:[{layer:o,id:e+","+i+","+r}],is_compressed:!0}),t.headers||(t.headers={}),t.headers["Content-Type"]="application/json"},t.a2=o,t.a3=n,t.a4=L,t.a5=xf,t.a6=bo,t.a7=wo,t.a8=Ja,t.a9=function(t,e,i){if(!t)return e||{};if(!e)return t||{};const r=gn(t),o=gn(e);!function(t,e){e.removeAll&&(t.add.clear(),t.update.clear(),t.remove.clear(),e.remove.clear());for(const i of e.remove)t.add.delete(i),t.update.delete(i);for(const[i,r]of e.update){const o=t.update.get(i);o&&(e.update.set(i,yn(o,r)),t.update.delete(i))}}(r,o);const n={};if((r.removeAll||o.removeAll)&&(n.removeAll=!0),n.remove=new Set([...r.remove,...o.remove]),n.add=new Map([...r.add,...o.add]),n.update=new Map([...r.update,...o.update]),n.remove.size&&n.add.size)for(const t of n.add.keys())n.remove.delete(t);return function(t){const e={};return t.removeAll&&(e.removeAll=t.removeAll),t.remove&&(e.remove=Array.from(t.remove)),t.add&&(e.add=Array.from(t.add.values())),t.update&&(e.update=Array.from(t.update.values())),e}(n)},t.aA=class{constructor(t,e){this.max=t,this.onRemove=e,this.reset()}reset(){for(const t in this.data)for(const e of this.data[t])e.timeout&&clearTimeout(e.timeout),this.onRemove(e.value);return this.data={},this.order=[],this}add(t,e,i){const r=t.wrapped().key;void 0===this.data[r]&&(this.data[r]=[]);const o={value:e,timeout:void 0};if(void 0!==i&&(o.timeout=setTimeout((()=>{this.remove(t,o)}),i)),this.data[r].push(o),this.order.push(r),this.order.length>this.max){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value}getByKey(t){const e=this.data[t];return e?e[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,e){if(!this.has(t))return this;const i=t.wrapped().key,r=void 0===e?0:this.data[i].indexOf(e),o=this.data[i][r];return this.data[i].splice(r,1),o.timeout&&clearTimeout(o.timeout),0===this.data[i].length&&delete this.data[i],this.onRemove(o.value),this.order.splice(this.order.indexOf(i),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(t){const e=[];for(const i in this.data)for(const r of this.data[i])t(r.value)||e.push(r);for(const t of e)this.remove(t.value.tileID,t)}},t.aB=function(t,e){let i=0,r=0;if("constant"===t.kind)r=t.layoutSize;else if("source"!==t.kind){const{interpolationType:o,minZoom:n,maxZoom:s}=t,a=o?S(xc.interpolationFactor(o,e,n,s),0,1):0;"camera"===t.kind?r=bc.number(t.minSize,t.maxSize,a):i=a}return{uSizeT:i,uSize:r}},t.aD=function(t,{uSize:e,uSizeT:i},{lowerSize:r,upperSize:o}){return"source"===t.kind?r/rf:"composite"===t.kind?bc.number(r/rf,o/rf,i):e},t.aE=function(t,e){var i=e[0],r=e[1],o=e[2],n=e[3],s=e[4],a=e[5],l=e[6],c=e[7],h=e[8],u=e[9],d=e[10],p=e[11],f=e[12],m=e[13],_=e[14],y=e[15],g=i*a-r*s,v=i*l-o*s,x=i*c-n*s,b=r*l-o*a,w=r*c-n*a,T=o*c-n*l,S=h*m-u*f,P=h*_-d*f,I=h*y-p*f,C=u*_-d*m,M=u*y-p*m,A=d*y-p*_,k=g*A-v*M+x*C+b*I-w*P+T*S;return k?(t[0]=(a*A-l*M+c*C)*(k=1/k),t[1]=(o*M-r*A-n*C)*k,t[2]=(m*T-_*w+y*b)*k,t[3]=(d*w-u*T-p*b)*k,t[4]=(l*I-s*A-c*P)*k,t[5]=(i*A-o*I+n*P)*k,t[6]=(_*x-f*T-y*v)*k,t[7]=(h*T-d*x+p*v)*k,t[8]=(s*M-a*I+c*S)*k,t[9]=(r*I-i*M-n*S)*k,t[10]=(f*w-m*x+y*g)*k,t[11]=(u*x-h*w-p*g)*k,t[12]=(a*P-s*C-l*S)*k,t[13]=(i*C-r*P+o*S)*k,t[14]=(m*v-f*b-_*g)*k,t[15]=(h*b-u*v+d*g)*k,t):null},t.aF=y,t.aG=function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},t.aH=function(t){return t[0]=0,t[1]=0,t},t.aI=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},t.aJ=dn,t.aK=f,t.aL=function(t,e,r,o){const n=e.y-t.y,s=e.x-t.x,a=o.y-r.y,l=o.x-r.x,c=a*s-l*n;if(0===c)return null;const h=(l*(t.y-r.y)-a*(t.x-r.x))/c;return new i(t.x+h*s,t.y+h*n)},t.aM=vs,t.aN=Ki,t.aO=function(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return[e,i,r,o]},t.aP=Ea,t.aQ=v,t.aR=function(t,e,i,r,o=!1){if(!i[0]&&!i[1])return[0,0];const n=o?"map"===r?-t.bearingInRadians:0:"viewport"===r?t.bearingInRadians:0;if(n){const t=Math.sin(n),e=Math.cos(n);i=[i[0]*e-i[1]*t,i[0]*t+i[1]*e]}return[o?i[0]:v(e,i[0],t.zoom),o?i[1]:v(e,i[1],t.zoom)]},t.aT=hn,t.aU=Gs,t.aV=Qo,t.aW=Dm,t.aX=Vi,t.aY=Ld,t.aZ=mu,t.a_=Ru,t.aa=function(t,e){const i=new Map;if(null==t)return i;if(null==t.type)return i;if("Feature"===t.type){const r=_n(t,e);if(null==r)return;return i.set(r,t),i}if("FeatureCollection"===t.type){const r=new Set;for(const o of t.features){const t=_n(o,e);if(null==t)return;if(r.has(t))return;r.add(t),i.set(t,o)}return i}},t.ab=function(t,e,i){var r,o;const n=[];if(e.removeAll)t.clear();else if(e.remove)for(const i of e.remove){const e=t.get(i);e&&(n.push(e.geometry),t.delete(i))}if(e.add)for(const r of e.add){const e=_n(r,i);if(null==e)continue;const o=t.get(e);o&&n.push(o.geometry),n.push(r.geometry),t.set(e,r)}if(e.update)for(const i of e.update){const e=t.get(i.id);if(!e)continue;const s=!!i.newGeometry,a=i.removeAllProperties||(null===(r=i.removeProperties)||void 0===r?void 0:r.length)>0||(null===(o=i.addOrUpdateProperties)||void 0===o?void 0:o.length)>0;if(!s&&!a)continue;n.push(e.geometry);const l=Object.assign({},e);if(t.set(i.id,l),s&&(n.push(i.newGeometry),l.geometry=i.newGeometry),a){if(l.properties=i.removeAllProperties?{}:Object.assign({},l.properties||{}),i.removeProperties)for(const t of i.removeProperties)delete l.properties[t];if(i.addOrUpdateProperties)for(const{key:t,value:e}of i.addOrUpdateProperties)l.properties[t]=e}}return n},t.ac=ap,t.ad=bf,t.ae=25,t.af=gf,t.ag=t=>{const e=window.document.createElement("video");return e.muted=!0,new Promise((i=>{e.onloadstart=()=>{i(e)};for(const i of t){const t=window.document.createElement("source");N(i)||(e.crossOrigin="Anonymous"),t.src=i,e.appendChild(t)}}))},t.ah=Jc,t.ai=function(){return $a++},t.aj=ou,t.ak=lf,t.al=Cm,t.am=Ve,t.an=Ji,t.ao=Tf,t.ap=function(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((t,i,r,o)=>{const n=r||o;return e[i]=!n||n.toLowerCase(),""})),e["max-age"]){const t=parseInt(e["max-age"],10);isNaN(t)?delete e["max-age"]:e["max-age"]=t}return e},t.aq=S,t.ar=85.051129,t.as=R,t.at=function(t){return Math.pow(2,t)},t.au=a,t.av=xo,t.aw=function(t){return Math.log(t)/Math.LN2},t.ax=ha,t.ay=function(t){if(!t.length)return new Set;const e=Math.max(...t.map((t=>t.canonical.z)));let i=1/0,r=-1/0,o=1/0,n=-1/0;const s=[];for(const a of t){const{x:t,y:l,z:c}=a.canonical,h=Math.pow(2,e-c),u=t*h,d=l*h;s.push({id:a,x:u,y:d}),u<i&&(i=u),u>r&&(r=u),d<o&&(o=d),d>n&&(n=d)}const a=new Set;for(const t of s)t.x!==i&&t.x!==r&&t.y!==o&&t.y!==n||a.add(t.id);return a},t.az=function(t,e){const i=Math.abs(2*t.wrap)-+(t.wrap<0),r=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||r-i||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x},t.b=D,t.b$=class extends Uu{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))}},t.b0=F,t.b1=To,t.b2=d,t.b3=u,t.b4=function(t){var e=new ra(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.b5=aa,t.b6=function(t,e){var i=e[0],r=e[1],o=e[2],n=i*i+r*r+o*o;return n>0&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},t.b7=p,t.b8=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.b9=ca,t.bA=function(t,e,i,r,o){return b(r,o,S((t-e)/(i-e),0,1))},t.bB=x,t.bC=function(){return new Float64Array(3)},t.bD=function(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t[2]=e[2]+i[2]*r,t},t.bE=_,t.bF=function(t,e,i){var r=i[0],o=i[1],n=i[2],s=i[3],a=e[0],l=e[1],c=e[2],h=o*c-n*l,u=n*a-r*c,d=r*l-o*a;return t[0]=a+s*(h+=h)+o*(d+=d)-n*(u+=u),t[1]=l+s*u+n*h-r*d,t[2]=c+s*d+r*u-o*h,t},t.bG=function(t,e,i){const r=(o=[t[0],t[1],t[2],e[0],e[1],e[2],i[0],i[1],i[2]])[0]*((h=o[8])*(s=o[4])-(a=o[5])*(c=o[7]))+o[1]*(-h*(n=o[3])+a*(l=o[6]))+o[2]*(c*n-s*l);var o,n,s,a,l,c,h;if(0===r)return null;const f=p([],[e[0],e[1],e[2]],[i[0],i[1],i[2]]),m=p([],[i[0],i[1],i[2]],[t[0],t[1],t[2]]),_=p([],[t[0],t[1],t[2]],[e[0],e[1],e[2]]),y=d([],f,-t[3]);return u(y,y,d([],m,-e[3])),u(y,y,d([],_,-i[3])),d(y,y,1/r),y},t.bH=op,t.bI=function(){return new Float64Array(4)},t.bJ=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),n[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),n[2]=o[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bK=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[0],n[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),n[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bL=function(t,e,i,r){var o=[],n=[];return o[0]=e[0]-i[0],o[1]=e[1]-i[1],o[2]=e[2]-i[2],n[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),n[1]=o[1],n[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t},t.bM=function(t,e,i){var r=Math.sin(i),o=Math.cos(i),n=e[0],s=e[1],a=e[2],l=e[3],c=e[8],h=e[9],u=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=n*o-c*r,t[1]=s*o-h*r,t[2]=a*o-u*r,t[3]=l*o-d*r,t[8]=n*r+c*o,t[9]=s*r+h*o,t[10]=a*r+u*o,t[11]=l*r+d*o,t},t.bN=function(t,e){const i=x(t,360),r=x(e,360),o=r-i,n=r>i?o-360:o+360;return Math.abs(o)<Math.abs(n)?o:n},t.bO=function(t){return t[0]=0,t[1]=0,t[2]=0,t},t.bP=function(t,e,i,r){const o=Math.sqrt(t*t+e*e),n=Math.sqrt(i*i+r*r);t/=o,e/=o,i/=n,r/=n;const s=Math.acos(t*i+e*r);return-e*i+t*r>0?s:-s},t.bQ=function(t,e){const i=x(t,2*Math.PI),r=x(e,2*Math.PI);return Math.min(Math.abs(i-r),Math.abs(i-r+2*Math.PI),Math.abs(i-r-2*Math.PI))},t.bR=ul,t.bS=ah,t.bT=function t(e,i){if(Array.isArray(e)){if(!Array.isArray(i)||e.length!==i.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],i[r]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==i){if("object"!=typeof i)return!1;if(Object.keys(e).length!==Object.keys(i).length)return!1;for(const r in e)if(!t(e[r],i[r]))return!1;return!0}return e===i},t.bU=function(t,e){if("custom"===t.type)return new mf(t,e);switch(t.type){case"background":return new ff(t,e);case"circle":return new cd(t,e);case"circle-overlay":return new yd(t,e);case"color-relief":return new Ad(t,e);case"fill":return new Nd(t,e);case"polygon-overlay":return new Hd(t,e);case"fill-extrusion":return new rp(t,e);case"prism-overlay":return new dp(t,e);case"heatmap":return new Td(t,e);case"hillshade":return new Id(t,e);case"line":return new Sp(t,e);case"polyline-overlay":return new Bp(t,e);case"raster":return new Ah(t,e);case"symbol":return new pf(t,e)}},t.bV=t=>"raster"===t.type,t.bW=A,t.bX=function(t){const e=[],i=t.id;return void 0===i&&e.push({message:"layers."+i+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+i+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+i+': property "renderingMode" must be either "2d" or "3d"'}),e},t.bY=C,t.bZ=M,t.b_=function(t,e){var i,r,o={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(o[i[r]]=t[i[r]]);return o},t.ba=c,t.bb=function(t,e,i){const r=e[0]*i[0]+e[1]*i[1]+e[2]*i[2];return 0===r?null:(-(t[0]*i[0]+t[1]*i[1]+t[2]*i[2])-i[3])/r},t.bc=la,t.bd=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t},t.be=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]},t.bf=vf,t.bg=mn,t.bh=na,t.bi=function(t){var e=new ra(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.bj=function(t,e,i){var r=Math.sin(i),o=Math.cos(i),n=e[0],s=e[1],a=e[2],l=e[3],c=e[4],h=e[5],u=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=n*o+c*r,t[1]=s*o+h*r,t[2]=a*o+u*r,t[3]=l*o+d*r,t[4]=c*o-n*r,t[5]=h*o-s*r,t[6]=u*o-a*r,t[7]=d*o-l*r,t},t.bk=function(t,e,i){var r=Math.sin(i),o=Math.cos(i),n=e[4],s=e[5],a=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=n*o+c*r,t[5]=s*o+h*r,t[6]=a*o+u*r,t[7]=l*o+d*r,t[8]=c*o-n*r,t[9]=h*o-s*r,t[10]=u*o-a*r,t[11]=d*o-l*r,t},t.bl=function(){const t=new Float32Array(16);return a(t),t},t.bm=function(){const t=new Float64Array(16);return a(t),t},t.bn=function(){return new Float64Array(16)},t.bo=function(t,e,i){const r=new Float64Array(4);return _(r,t,e-90,i),r},t.bp=function(t,e,i,r){var o,n,s,a,l=e[0],c=e[1],h=e[2],u=e[3],d=i[0],p=i[1],f=i[2],m=i[3],_=l*d+c*p+h*f+u*m;return _<0&&(_=-_,d=-d,p=-p,f=-f,m=-m),1-_>ia?(o=Math.acos(_),n=Math.sin(o),s=Math.sin((1-r)*o)/n,a=Math.sin(r*o)/n):(s=1-r,a=r),t[0]=s*l+a*d,t[1]=s*c+a*p,t[2]=s*h+a*f,t[3]=s*u+a*m,t},t.bq=function(t){const e=new Float64Array(9);var i,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v;u=(o=(r=t)[0])*(l=o+o),d=(n=r[1])*l,f=(s=r[2])*l,m=s*(c=n+n),y=(a=r[3])*l,g=a*c,v=a*(h=s+s),(i=e)[0]=1-(p=n*c)-(_=s*h),i[3]=d-v,i[6]=f+g,i[1]=d+v,i[4]=1-u-_,i[7]=m-y,i[2]=f-g,i[5]=m+y,i[8]=1-u-p;const x=F(-Math.asin(S(e[2],-1,1)));let b,w;return Math.hypot(e[5],e[8])<.001?(b=0,w=-F(Math.atan2(e[3],e[4]))):(b=F(0===e[5]&&0===e[8]?0:Math.atan2(e[5],e[8])),w=F(0===e[1]&&0===e[0]?0:Math.atan2(e[1],e[0]))),{roll:b,pitch:x+90,bearing:w}},t.br=function(t,e){return t.roll==e.roll&&t.pitch==e.pitch&&t.bearing==e.bearing},t.bs=Gu,t.bt=qu,t.bu=Od,t.bv=Rd,t.bw=Dd,t.bx=b,t.by=w,t.bz=ic,t.c=sl,t.c$=vp,t.c0=Wu,t.c1=class extends Uu{constructor(t,e){super(t,e),this.current=Hu}set(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(let e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}}},t.c2=Zu,t.c3=class extends Uu{constructor(t,e){super(t,e),this.current=[0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))}},t.c4=class extends Uu{constructor(t,e){super(t,e),this.current=[0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))}},t.c5=s,t.c6=function(t,e){var i=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=i,t[2]=0,t[3]=-i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.c7=function(t,e,i){var r=e[0],o=e[1],n=e[2];return t[0]=r*i[0]+o*i[3]+n*i[6],t[1]=r*i[1]+o*i[4]+n*i[7],t[2]=r*i[2]+o*i[5]+n*i[8],t},t.c8=sa,t.c9=class extends Uu{constructor(t,e){super(t,e),this.current=new Array}set(t){if(t!=this.current){this.current=t;const e=new Float32Array(4*t.length);for(let i=0;i<t.length;i++)e[4*i]=t[i].r,e[4*i+1]=t[i].g,e[4*i+2]=t[i].b,e[4*i+3]=t[i].a;this.gl.uniform4fv(this.location,e)}}},t.cA=t=>"custom"===t.type,t.cB=T,t.cC=Ka,t.cD=function(t,e,i){const r=g(e.x-i.x,e.y-i.y),o=g(t.x-i.x,t.y-i.y);var n,s;return F(Math.atan2(r[0]*o[1]-r[1]*o[0],(n=r)[0]*(s=o)[0]+n[1]*s[1]))},t.cE=function(t,e){return nl[e]&&(t instanceof MouseEvent||t instanceof WheelEvent)},t.cF=function(t,e){return ol[e]&&"touches"in t},t.cG=function(t){return ol[t]||nl[t]},t.cH=function(t,e,i){var r=e[0],o=e[1];return t[0]=i[0]*r+i[4]*o+i[12],t[1]=i[1]*r+i[5]*o+i[13],t},t.cI=function(t,e){const{x:i,y:r}=ap.fromLngLat(e);return!(t<0||t>25||r<0||r>=1||i<0||i>=1)},t.cJ=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.cK=class extends Lh{},t.cL=function(t,e,i,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,i):o?o.value=i:e.set(t,i),i},t.cM=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)},t.cN=Bm,t.cP=hl,t.cQ=V,t.cR=function(){V("apitiles",((t,i)=>e(this,void 0,void 0,(function*(){var e,r,o,n,s,a,l;const c=(l=t.url).startsWith("apitiles://")?l.substring(11):l,h=Object.assign({Accept:"application/json"},t.headers);let u;try{u=yield fetch(c,{method:null!==(e=t.method)&&void 0!==e?e:"GET",headers:h,body:t.body,signal:i.signal})}catch(e){if(j(e))throw e;throw new hl(0,null!==(r=e.message)&&void 0!==r?r:"Network error",t.url,new Blob)}if(!u.ok){const e=yield u.blob();throw new hl(u.status,u.statusText,t.url,e)}const d=null!==(o=u.headers.get("Content-Type"))&&void 0!==o?o:"",p=u.headers.get("Cache-Control"),f=u.headers.get("Expires");if("arrayBuffer"===t.type){const t=yield u.arrayBuffer();return i.signal.throwIfAborted(),123===(t.byteLength>0?new Uint8Array(t,0,1)[0]:0)?{data:new ArrayBuffer(0),cacheControl:p,expires:f}:{data:t,cacheControl:p,expires:f}}if(d.includes("image/")){const t=yield u.arrayBuffer();return i.signal.throwIfAborted(),{data:t,cacheControl:p,expires:f}}const m=yield u.json();i.signal.throwIfAborted();const{data:_,code:y}=(g=m)&&"object"==typeof g&&"code"in g?{data:null!==(v=g.data)&&void 0!==v?v:g,code:g.code}:{data:g,code:200};var g,v;if(200!==y){const e=null!==(a=null!==(s=null===(n=null==_?void 0:_.error)||void 0===n?void 0:n.message)&&void 0!==s?s:null==_?void 0:_.message)&&void 0!==a?a:"Service error code: "+y;throw new hl(y,e,t.url,new Blob)}return _&&"object"==typeof _&&!_.scheme&&(_.scheme="xyz"),{data:_,cacheControl:p,expires:f}}))))},t.cS=Pi,t.cT=wf,t.cU=Mm,t.cV=tf,t.cW=function(e){e.bucket.createArrays(),e.bucket.tilePixelRatio=Ja/(512*e.bucket.overscaling),e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;const i=e.bucket.layers[0],r=i.layout,o=i._unevaluatedLayout._values,n={layoutIconSize:o["icon-size"].possiblyEvaluate(new uh(e.bucket.zoom+1),e.canonical),layoutTextSize:o["text-size"].possiblyEvaluate(new uh(e.bucket.zoom+1),e.canonical),textMaxSize:o["text-size"].possiblyEvaluate(new uh(18))};if("composite"===e.bucket.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.bucket.textSizeData;n.compositeTextSizes=[o["text-size"].possiblyEvaluate(new uh(t),e.canonical),o["text-size"].possiblyEvaluate(new uh(i),e.canonical)]}if("composite"===e.bucket.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.bucket.iconSizeData;n.compositeIconSizes=[o["icon-size"].possiblyEvaluate(new uh(t),e.canonical),o["icon-size"].possiblyEvaluate(new uh(i),e.canonical)]}const s=r.get("text-line-height")*Ea,a="viewport"!==r.get("text-rotation-alignment")&&"point"!==r.get("symbol-placement"),l=r.get("text-keep-upright"),c=r.get("text-size");for(const o of e.bucket.features){const h=r.get("text-font").evaluate(o,{},e.canonical).join(","),u=c.evaluate(o,{},e.canonical),d=n.layoutTextSize.evaluate(o,{},e.canonical),p=n.layoutIconSize.evaluate(o,{},e.canonical),f={horizontal:{},vertical:void 0},m=o.text;let _,y=[0,0];if(m){const n=m.toString(),c=r.get("text-letter-spacing").evaluate(o,{},e.canonical)*Ea,p=Li(n)?c:0,_=r.get("text-anchor").evaluate(o,{},e.canonical),g=Ns(i,o,e.canonical);if(!g){const t=r.get("text-radial-offset").evaluate(o,{},e.canonical);y=t?Vs(_,[t*Ea,Em]):r.get("text-offset").evaluate(o,{},e.canonical).map((t=>t*Ea))}let v=a?"center":r.get("text-justify").evaluate(o,{},e.canonical);const x="point"===r.get("symbol-placement")?r.get("text-max-width").evaluate(o,{},e.canonical)*Ea:1/0,b=()=>{e.bucket.allowVerticalPlacement&&Di(n)&&(f.vertical=$o(m,e.glyphMap,e.glyphPositions,e.imagePositions,h,x,s,_,"left",p,y,t.aC.vertical,!0,d,u))};if(!a&&g){const i=new Set;if("auto"===v)for(let t=0;t<g.values.length;t+=2)i.add(Gs(g.values[t]));else i.add(v);let r=!1;for(const o of i)if(!f.horizontal[o])if(r)f.horizontal[o]=f.horizontal[0];else{const i=$o(m,e.glyphMap,e.glyphPositions,e.imagePositions,h,x,s,"center",o,p,y,t.aC.horizontal,!1,d,u);i&&(f.horizontal[o]=i,r=1===i.positionedLines.length)}b()}else{"auto"===v&&(v=Gs(_));const i=$o(m,e.glyphMap,e.glyphPositions,e.imagePositions,h,x,s,_,v,p,y,t.aC.horizontal,!1,d,u);i&&(f.horizontal[v]=i),b(),Di(n)&&a&&l&&(f.vertical=$o(m,e.glyphMap,e.glyphPositions,e.imagePositions,h,x,s,_,v,p,y,t.aC.vertical,!1,d,u))}}let g=!1;if(o.icon&&o.icon.name){const t=e.imageMap[o.icon.name];t&&(_=sn(e.imagePositions[o.icon.name],r.get("icon-offset").evaluate(o,{},e.canonical),r.get("icon-anchor").evaluate(o,{},e.canonical)),g=!!t.sdf,void 0===e.bucket.sdfIcons?e.bucket.sdfIcons=g:e.bucket.sdfIcons!==g&&k("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.bucket.pixelRatio||0!==r.get("icon-rotate").constantOr(1))&&(e.bucket.iconsNeedLinear=!0))}const v=Zs(f.horizontal)||f.vertical;e.bucket.iconsInText=!!v&&v.iconsInText,(v||_)&&Us(e.bucket,o,f,_,e.imageMap,n,d,p,y,g,e.canonical,e.subdivisionGranularity)}e.showCollisionBoxes&&e.bucket.generateCollisionDebugBuffers()},t.cX=jd,t.cY=qd,t.cZ=ep,t.c_=hp,t.ca=class extends Uu{constructor(t,e){super(t,e),this.current=new Array}set(t){if(t!=this.current){this.current=t;const e=new Float32Array(t);this.gl.uniform1fv(this.location,e)}}},t.cb=class extends Wh{},t.cc=qp,t.cd=class extends Xh{},t.ce=wd,t.cf=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.cg=Sr,t.ch=function(t,e,i){var r=e[0],o=e[1],n=e[2],s=i[3]*r+i[7]*o+i[11]*n+i[15];return t[0]=(i[0]*r+i[4]*o+i[8]*n+i[12])/(s=s||1),t[1]=(i[1]*r+i[5]*o+i[9]*n+i[13])/s,t[2]=(i[2]*r+i[6]*o+i[10]*n+i[14])/s,t},t.ci=class extends Oh{},t.cj=class extends eu{},t.ck=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},t.cl=function(t,e){var i=t[0],r=t[1],o=t[2],n=t[3],s=t[4],a=t[5],l=t[6],c=t[7],h=t[8],u=t[9],d=t[10],p=t[11],f=t[12],m=t[13],_=t[14],y=t[15],g=e[0],v=e[1],x=e[2],b=e[3],w=e[4],T=e[5],S=e[6],P=e[7],I=e[8],C=e[9],M=e[10],A=e[11],k=e[12],E=e[13],z=e[14],D=e[15];return Math.abs(i-g)<=ia*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(r-v)<=ia*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-x)<=ia*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(n-b)<=ia*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(s-w)<=ia*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(a-T)<=ia*Math.max(1,Math.abs(a),Math.abs(T))&&Math.abs(l-S)<=ia*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-P)<=ia*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(h-I)<=ia*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(u-C)<=ia*Math.max(1,Math.abs(u),Math.abs(C))&&Math.abs(d-M)<=ia*Math.max(1,Math.abs(d),Math.abs(M))&&Math.abs(p-A)<=ia*Math.max(1,Math.abs(p),Math.abs(A))&&Math.abs(f-k)<=ia*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(m-E)<=ia*Math.max(1,Math.abs(m),Math.abs(E))&&Math.abs(_-z)<=ia*Math.max(1,Math.abs(_),Math.abs(z))&&Math.abs(y-D)<=ia*Math.max(1,Math.abs(y),Math.abs(D))},t.cm=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.cn=t=>"symbol"===t.type,t.co=t=>"circle"===t.type,t.cp=t=>"circle-overlay"===t.type,t.cq=t=>"heatmap"===t.type,t.cr=t=>"line"===t.type,t.cs=t=>"polyline-overlay"===t.type,t.ct=t=>"fill"===t.type,t.cu=t=>"polygon-overlay"===t.type,t.cv=t=>"fill-extrusion"===t.type,t.cw=t=>"prism-overlay"===t.type,t.cx=t=>"hillshade"===t.type,t.cy=t=>"color-relief"===t.type,t.cz=t=>"background"===t.type,t.d=N,t.d0=Lp,t.d1=function(t){const e=new $p;return function(t,e){for(const i in t.layers)e.writeMessage(3,hs,t.layers[i])}(t,e),e.finish()},t.d2=function(t,e,i,r,o,n){let s=xs(t,e,i,o,0);return s=xs(s,e,r,n,1),s},t.d3=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){const t=this.map.keys().next().value;this.map.delete(t)}this.map.set(t,e)}clear(){this.map.clear()}},t.d4=Qd,t.d5=$p,t.d6=Pm,t.d7=class{constructor(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let t=performance.getEntriesByName(this._marks.measure);return 0===t.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),t=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),t}},t.d8=function(t,i,r,o,s){return e(this,void 0,void 0,(function*(){if(n())try{return yield L(t,i,r,o,s)}catch(t){}return function(t,e,i,r,o){const n=t.width,s=t.height;il&&rl||(il=new OffscreenCanvas(n,s),rl=il.getContext("2d",{willReadFrequently:!0})),il.width=n,il.height=s,rl.drawImage(t,0,0,n,s);const a=rl.getImageData(e,i,r,o);return rl.clearRect(0,0,n,s),a.data}(t,i,r,o,s)}))},t.d9=Md,t.da=r,t.db=class{constructor(t,e){this.layers={[Cm]:this},this.name=Cm,this.version=e?e.version:1,this.extent=e?e.extent:4096,this.length=t.length,this.features=t}feature(t){return new Im(this.features[t],this.extent)}},t.dc=De,t.dd=function(t){delete sl.REGISTERED_PROTOCOLS[t]},t.de=hh,t.e=I,t.f=function(t){const e=Math.min(1024,t.byteLength);if(e<4)return!1;const i=new Uint8Array(t,0,e);let r=0;239===i[0]&&187===i[1]&&191===i[2]&&(r=3);const o=new TextDecoder("utf-8",{fatal:!1}).decode(i.subarray(r)).trimStart();return!!o.startsWith("<svg")||!!o.startsWith("<?xml")&&/<svg[\s>/]/i.test(o.slice(0,512))},t.g=B,t.h=function(t){return new Promise(((e,i)=>{const r=new Image,o=new Blob([new Uint8Array(t)],{type:"image/svg+xml"}),n=URL.createObjectURL(o);r.onload=()=>{URL.revokeObjectURL(n),r.onload=null,r.onerror=null,e(r)},r.onerror=()=>{URL.revokeObjectURL(n),r.onload=null,r.onerror=null,i(new Error("Could not decode SVG image."))},r.src=n}))},t.i=z,t.j=t=>e(void 0,void 0,void 0,(function*(){if(0===t.byteLength)return createImageBitmap(new ImageData(1,1));const e=new Blob([new Uint8Array(t)],{type:"image/png"});try{return createImageBitmap(e)}catch(t){throw new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG.")}})),t.k=t=>new Promise(((e,i)=>{const r=new Image;r.onload=()=>{e(r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame((()=>{r.src=el}))},r.onerror=()=>i(new Error("Could not load image. Please make sure to use a supported image type such as PNG, JPEG, or SVG."));const o=new Blob([new Uint8Array(t)],{type:"image/png"});r.src=t.byteLength?URL.createObjectURL(o):el})),t.l=(t,e)=>dl(I(t,{type:"json"}),e),t.m=dl,t.n=fl,t.o=pl,t.p=Ko,t.q=(t,e)=>dl(I(t,{type:"arrayBuffer"}),e),t.r=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.s=O,t.t=function(t){return new $p(t).readFields(Xo,[])},t.u=function(t){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(t))},t.v=ua,t.w=k,t.x=xd,t.y=Ih,t.z=mh})),i("worker",0,(function(t){function e(t){const i=typeof t;if("number"===i||"boolean"===i||"string"===i||null==t)return JSON.stringify(t);if(Array.isArray(t)){let i="[";for(const r of t)i+=e(r)+",";return i+"]"}const r=Object.keys(t).sort();let o="{";for(let i=0;i<r.length;i++)o+=JSON.stringify(r[i])+":"+e(t[r[i]])+",";return o+"}"}function i(i){let r="";for(const o of t.r)r+="/"+e(i[o]);return r}function r(e,i,r){const o=new t.K(i);for(const t of e)t.recalculate(o,r)}function o(e){let i=t.d1(e);return 0===i.byteOffset&&i.byteLength===i.buffer.byteLength||(i=new Uint8Array(i)),{vectorTile:e,rawData:i.buffer}}function n(e,i,r){const{extent:o}=e,n=Math.pow(2,r.z-i.z),s=(r.x-i.x*n)*o,a=(r.y-i.y*n)*o,l=[];for(let i=0;i<e.length;i++){const r=e.feature(i);let c=r.loadGeometry();for(const t of c)for(const e of t)e.x=e.x*n-s,e.y=e.y*n-a;const h=128;c=t.d2(c,r.type,-h,-h,o+h,o+h),0!==c.length&&l.push(new W(r.type,c,r.properties,r.id,o))}return new H(l,e.name,o)}function s(t,e,i){return{type:"Feature",id:t[e+3],properties:a(t,e,i),geometry:{type:"Point",coordinates:[(r=t[e],360*(r-.5)),h(t[e+1])]}};var r}function a(t,e,i){const r=t[e+5],o=r>=1e4?Math.round(r/1e3)+"k":r>=1e3?Math.round(r/100)/10+"k":r,n=t[e+6],s=-1===n?{}:Object.assign({},i[n]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:r,point_count_abbreviated:o})}function l(t){return t/360+.5}function c(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function h(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function u(t,e,i,r){let o=r;const n=e+(i-e>>1);let s,a=i-e;const l=t[e],c=t[e+1],h=t[i],p=t[i+1];for(let r=e+3;r<i;r+=3){const e=d(t[r],t[r+1],l,c,h,p);if(e>o)s=r,o=e;else if(e===o){const t=Math.abs(r-n);t<a&&(s=r,a=t)}}o>r&&(s-e>3&&u(t,e,s,r),t[s+2]=o,i-s>3&&u(t,s,i,r))}function d(t,e,i,r,o,n){let s=o-i,a=n-r;if(0!==s||0!==a){const l=((t-i)*s+(e-r)*a)/(s*s+a*a);l>1?(i=o,r=n):l>0&&(i+=s*l,r+=a*l)}return s=t-i,a=e-r,s*s+a*a}function p(t,e,i,r){const o={id:null==t?null:t,type:e,geometry:i,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)f(o,i);else if("Polygon"===e)f(o,i[0]);else if("MultiLineString"===e)for(const t of i)f(o,t);else if("MultiPolygon"===e)for(const t of i)f(o,t[0]);return o}function f(t,e){for(let i=0;i<e.length;i+=3)t.minX=Math.min(t.minX,e[i]),t.minY=Math.min(t.minY,e[i+1]),t.maxX=Math.max(t.maxX,e[i]),t.maxY=Math.max(t.maxY,e[i+1])}function m(t,e,i,r){if(!e.geometry)return;const o=e.geometry.coordinates;if(o&&0===o.length)return;const n=e.geometry.type,s=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2);let a=[],l=e.id;if(i.promoteId?l=e.properties[i.promoteId]:i.generateId&&(l=r||0),"Point"===n)_(o,a);else if("MultiPoint"===n)for(const t of o)_(t,a);else if("LineString"===n)y(o,a,s,!1);else if("MultiLineString"===n){if(i.lineMetrics){for(const i of o)a=[],y(i,a,s,!1),t.push(p(l,"LineString",a,e.properties));return}g(o,a,s,!1)}else if("Polygon"===n)g(o,a,s,!0);else{if("MultiPolygon"!==n){if("GeometryCollection"===n){for(const o of e.geometry.geometries)m(t,{id:l,geometry:o,properties:e.properties},i,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const t of o){const e=[];g(t,e,s,!0),a.push(e)}}t.push(p(l,n,a,e.properties))}function _(t,e){e.push(v(t[0]),x(t[1]),0)}function y(t,e,i,r){let o,n,s=0;for(let i=0;i<t.length;i++){const a=v(t[i][0]),l=x(t[i][1]);e.push(a,l,0),i>0&&(s+=r?(o*l-a*n)/2:Math.sqrt(Math.pow(a-o,2)+Math.pow(l-n,2))),o=a,n=l}const a=e.length-3;e[2]=1,u(e,0,a,i),e[a+2]=1,e.size=Math.abs(s),e.start=0,e.end=e.size}function g(t,e,i,r){for(let o=0;o<t.length;o++){const n=[];y(t[o],n,i,r),e.push(n)}}function v(t){return t/360+.5}function x(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function b(t,e,i,r,o,n,s,a){if(r/=e,n>=(i/=e)&&s<r)return t;if(s<i||n>=r)return null;const l=[];for(const e of t){const t=e.geometry;let n=e.type;const s=0===o?e.minX:e.minY,c=0===o?e.maxX:e.maxY;if(s>=i&&c<r){l.push(e);continue}if(c<i||s>=r)continue;let h=[];if("Point"===n||"MultiPoint"===n)w(t,h,i,r,o);else if("LineString"===n)T(t,h,i,r,o,!1,a.lineMetrics);else if("MultiLineString"===n)P(t,h,i,r,o,!1);else if("Polygon"===n)P(t,h,i,r,o,!0);else if("MultiPolygon"===n)for(const e of t){const t=[];P(e,t,i,r,o,!0),t.length&&h.push(t)}if(h.length){if(a.lineMetrics&&"LineString"===n){for(const t of h)l.push(p(e.id,n,t,e.tags));continue}"LineString"!==n&&"MultiLineString"!==n||(1===h.length?(n="LineString",h=h[0]):n="MultiLineString"),"Point"!==n&&"MultiPoint"!==n||(n=3===h.length?"Point":"MultiPoint"),l.push(p(e.id,n,h,e.tags))}}return l.length?l:null}function w(t,e,i,r,o){for(let n=0;n<t.length;n+=3){const s=t[n+o];s>=i&&s<=r&&I(e,t[n],t[n+1],t[n+2])}}function T(t,e,i,r,o,n,s){let a=S(t);const l=0===o?C:M;let c,h,u=t.start;for(let d=0;d<t.length-3;d+=3){const p=t[d],f=t[d+1],m=t[d+2],_=t[d+3],y=t[d+4],g=0===o?p:f,v=0===o?_:y;let x=!1;s&&(c=Math.sqrt(Math.pow(p-_,2)+Math.pow(f-y,2))),g<i?v>i&&(h=l(a,p,f,_,y,i),s&&(a.start=u+c*h)):g>r?v<r&&(h=l(a,p,f,_,y,r),s&&(a.start=u+c*h)):I(a,p,f,m),v<i&&g>=i&&(h=l(a,p,f,_,y,i),x=!0),v>r&&g<=r&&(h=l(a,p,f,_,y,r),x=!0),!n&&x&&(s&&(a.end=u+c*h),e.push(a),a=S(t)),s&&(u+=c)}let d=t.length-3;const p=t[d],f=t[d+1],m=0===o?p:f;m>=i&&m<=r&&I(a,p,f,t[d+2]),d=a.length-3,n&&d>=3&&(a[d]!==a[0]||a[d+1]!==a[1])&&I(a,a[0],a[1],a[2]),a.length&&e.push(a)}function S(t){const e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function P(t,e,i,r,o,n){for(const s of t)T(s,e,i,r,o,n,!1)}function I(t,e,i,r){t.push(e,i,r)}function C(t,e,i,r,o,n){const s=(n-e)/(r-e);return I(t,n,i+(o-i)*s,1),s}function M(t,e,i,r,o,n){const s=(n-i)/(o-i);return I(t,e+(r-e)*s,n,1),s}function A(t,e){const i=[];for(let r=0;r<t.length;r++){const o=t[r],n=o.type;let s;if("Point"===n||"MultiPoint"===n||"LineString"===n)s=k(o.geometry,e);else if("MultiLineString"===n||"Polygon"===n){s=[];for(const t of o.geometry)s.push(k(t,e))}else if("MultiPolygon"===n){s=[];for(const t of o.geometry){const i=[];for(const r of t)i.push(k(r,e));s.push(i)}}i.push(p(o.id,n,s,o.tags))}return i}function k(t,e){const i=[];i.size=t.size,void 0!==t.start&&(i.start=t.start,i.end=t.end);for(let r=0;r<t.length;r+=3)i.push(t[r]+e,t[r+1],t[r+2]);return i}function E(t,e){if(t.transformed)return t;const i=1<<t.z,r=t.x,o=t.y;for(const n of t.features){const t=n.geometry,s=n.type;if(n.geometry=[],1===s)for(let s=0;s<t.length;s+=2)n.geometry.push(z(t[s],t[s+1],e,i,r,o));else for(let s=0;s<t.length;s++){const a=[];for(let n=0;n<t[s].length;n+=2)a.push(z(t[s][n],t[s][n+1],e,i,r,o));n.geometry.push(a)}}return t.transformed=!0,t}function z(t,e,i,r,o,n){return[Math.round(i*(t*r-o)),Math.round(i*(e*r-n))]}function D(t,e,i,r,o){const n=e===o.maxZoom?0:o.tolerance/((1<<e)*o.extent),s={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:i,y:r,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const e of t)L(s,e,n,o);return s}function L(t,e,i,r){const o=e.geometry,n=e.type,s=[];if(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),"Point"===n||"MultiPoint"===n)for(let e=0;e<o.length;e+=3)s.push(o[e],o[e+1]),t.numPoints++,t.numSimplified++;else if("LineString"===n)O(s,o,t,i,!1,!1);else if("MultiLineString"===n||"Polygon"===n)for(let e=0;e<o.length;e++)O(s,o[e],t,i,"Polygon"===n,0===e);else if("MultiPolygon"===n)for(let e=0;e<o.length;e++){const r=o[e];for(let e=0;e<r.length;e++)O(s,r[e],t,i,!0,0===e)}if(s.length){let i=e.tags||null;if("LineString"===n&&r.lineMetrics){i={};for(const t in e.tags)i[t]=e.tags[t];i.mapbox_clip_start=o.start/o.size,i.mapbox_clip_end=o.end/o.size}const a={geometry:s,type:"Polygon"===n||"MultiPolygon"===n?3:"LineString"===n||"MultiLineString"===n?2:1,tags:i};null!==e.id&&(a.id=e.id),t.features.push(a)}}function O(t,e,i,r,o,n){const s=r*r;if(r>0&&e.size<(o?s:r))return void(i.numPoints+=e.length/3);const a=[];for(let t=0;t<e.length;t+=3)(0===r||e[t+2]>s)&&(i.numSimplified++,a.push(e[t],e[t+1])),i.numPoints++;o&&function(t,e){let i=0;for(let e=0,r=t.length,o=r-2;e<r;o=e,e+=2)i+=(t[e]-t[o])*(t[e+1]+t[o+1]);if(i>0===e)for(let e=0,i=t.length;e<i/2;e+=2){const r=t[e],o=t[e+1];t[e]=t[i-2-e],t[e+1]=t[i-1-e],t[i-2-e]=r,t[i-1-e]=o}}(a,n),t.push(a)}function R(t,e,i){return 32*((1<<t)*i+e)+t}function F(e,i){return i.cluster?new Q(function({superclusterOptions:e,clusterProperties:i}){if(!i||!e)return e;const r={},o={},n={accumulated:null,zoom:0},s={properties:null},a=Object.keys(i);for(const e of a){const[n,s]=i[e],a=t.dc(s),l=t.dc("string"==typeof n?[n,["accumulated"],["get",e]]:n);r[e]=a.value,o[e]=l.value}return e.map=t=>{s.properties=t;const e={};for(const t of a)e[t]=r[t].evaluate(n,s);return e},e.reduce=(t,e)=>{s.properties=e;for(const e of a)n.accumulated=t[e],t[e]=o[e].evaluate(n,s)},e}(i)).load(e.features):new et(e,i.geojsonVtOptions)}var j,B,V,N,G;class U{constructor(t,e){this.keyCache={},t&&this.replace(t,e)}replace(t,e){this._layerConfigs={},this._layers={},this.update(t,[],e)}update(e,r,o){for(const i of e){this._layerConfigs[i.id]=i;const e=this._layers[i.id]=t.bU(i,o);e._featureFilter=t.am(e.filter,o),this.keyCache[i.id]&&delete this.keyCache[i.id]}for(const t of r)delete this.keyCache[t],delete this._layerConfigs[t],delete this._layers[t];this.familiesBySource={};const n=function(t,e){const r={};for(let o=0;o<t.length;o++){const n=e&&e[t[o].id]||i(t[o]);e&&(e[t[o].id]=n);let s=r[n];s||(s=r[n]=[]),s.push(t[o])}const o=[];for(const t in r)o.push(r[t]);return o}(Object.values(this._layerConfigs),this.keyCache);for(const e of n){const i=e.map((t=>this._layers[t.id])),r=i[0];if(r.isHidden())continue;const o=r.source||"";let n=this.familiesBySource[o];n||(n=this.familiesBySource[o]={});const s=r.sourceLayer||t.al;let a=n[s];a||(a=n[s]=[]),a.push(i)}}}class q{constructor(e){const i={},r=[];for(const t in e){const o=e[t],n=i[t]={};for(const t in o){const e=o[+t];if(!e||0===e.bitmap.width||0===e.bitmap.height)continue;const i={x:0,y:0,w:e.bitmap.width+2,h:e.bitmap.height+2};r.push(i),n[t]={rect:i,metrics:e.metrics}}}const{w:o,h:n}=t.p(r),s=new t.x({width:o||1,height:n||1});for(const r in e){const o=e[r];for(const e in o){const n=o[+e];if(!n||0===n.bitmap.width||0===n.bitmap.height)continue;const a=i[r][e].rect;t.x.copy(n.bitmap,s,{x:0,y:0},{x:a.x+1,y:a.y+1},n.bitmap)}}this.image=s,this.positions=i}}t.cS("GlyphAtlas",q);class Z{constructor(e){this.tileID=new t.a5(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId,this.inFlightDependencies=[]}parse(e,i,o,n,s){return t._(this,void 0,void 0,(function*(){this.status="parsing",this.data=e,this.collisionBoxArray=new t.aj;const a=new t.cT(Object.keys(e.layers).sort()),l=new t.cU(this.tileID,this.promoteId);l.bucketLayerIDs=[];const c={},h={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:o,subdivisionGranularity:s},u=i.familiesBySource[this.source];for(const i in u){const n=e.layers[i];if(!n)continue;1===n.version&&t.w('Vector tile source "'+this.source+'" layer "'+i+'" does not use vector tile spec v2 and therefore may have some rendering errors.');const s=a.encode(i),d=[];for(let t=0;t<n.length;t++){const e=n.feature(t),r=l.getId(e,i);d.push({feature:e,id:r,index:t,sourceLayerIndex:s})}for(const e of u[i]){const i=e[0];i.source!==this.source&&t.w("layer.source = "+i.source+" does not equal this.source = "+this.source),i.isHidden(this.zoom,!0)||(r(e,this.zoom,o),(c[i.id]=i.createBucket({index:l.bucketLayerIDs.length,layers:e,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:s,sourceID:this.source})).populate(d,h,this.tileID.canonical),l.bucketLayerIDs.push(e.map((t=>t.id))))}}const d=t.bY(h.glyphDependencies,(t=>Object.keys(t).map(Number)));this.inFlightDependencies.forEach((t=>null==t?void 0:t.abort())),this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(d).length){const t=new AbortController;this.inFlightDependencies.push(t),p=n.sendAsync({type:"GG",data:{stacks:d,source:this.source,tileID:this.tileID,type:"glyphs"}},t)}const f=Object.keys(h.iconDependencies);let m=Promise.resolve({});if(f.length){const t=new AbortController;this.inFlightDependencies.push(t),m=n.sendAsync({type:"GI",data:{icons:f,source:this.source,tileID:this.tileID,type:"icons"}},t)}const _=Object.keys(h.patternDependencies);let y=Promise.resolve({});if(_.length){const t=new AbortController;this.inFlightDependencies.push(t),y=n.sendAsync({type:"GI",data:{icons:_,source:this.source,tileID:this.tileID,type:"patterns"}},t)}const g=h.dashDependencies;let v=Promise.resolve({});if(Object.keys(g).length){const t=new AbortController;this.inFlightDependencies.push(t),v=n.sendAsync({type:"GDA",data:{dashes:g}},t)}const[x,b,w,T]=yield Promise.all([p,m,y,v]),S=new q(x),P=new t.cV(b,w);for(const e in c){const i=c[e];i instanceof t.ak?(r(i.layers,this.zoom,o),t.cW({bucket:i,glyphMap:x,glyphPositions:S.positions,imageMap:b,imagePositions:P.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):i.hasDependencies&&(i instanceof t.cX||i instanceof t.cY||i instanceof t.cZ||i instanceof t.c_||i instanceof t.c$||i instanceof t.d0)&&(r(i.layers,this.zoom,o),i.addFeatures(h,this.tileID.canonical,P.patternPositions,T))}return this.status="done",{buckets:Object.values(c).filter((t=>!t.isEmpty())),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:S.image,imageAtlas:P,dashPositions:T,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?b:null,glyphPositions:this.returnDependencies?S.positions:null}}))}}class W{constructor(t,e,i,r,o){this.type=t,this.properties=i||{},this.extent=o,this.pointsArray=e,this.id=r}loadGeometry(){return this.pointsArray.map((e=>e.map((e=>new t.P(e.x,e.y)))))}}class H{constructor(t,e,i){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=i}feature(t){return this._myFeatures[t]}}class X{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}}class Y{constructor(e,i,r){this.actor=e,this.layerIndex=i,this.availableImages=r,this.fetching={},this.loading={},this.loaded={},this.overzoomedTileResultCache=new t.d3(1e3)}loadVectorTile(e,i){return t._(this,void 0,void 0,(function*(){const r=yield t.q(e.request,i),o=r.data;if(null==o)return null;const n=o instanceof ArrayBuffer?o:o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength);let s=n;const a=e._apitilesTileId;if(a){const e=n;if(0===e.byteLength)return{vectorTile:new t.d4(new t.d5(new ArrayBuffer(0))),rawData:new ArrayBuffer(0),cacheControl:r.cacheControl,expires:r.expires};if(s=new ArrayBuffer(0),e.byteLength>6){const t=new DataView(e).getUint16(4,!1);if(t>0&&6+t<=e.byteLength)try{const i=JSON.parse((new TextDecoder).decode(new Uint8Array(e,6,t))),r=6+t,o=i.compress;let n;if(o&&"none"!==o&&"undefined"!=typeof DecompressionStream){const t="zlib"===o?"deflate":"gzip",i=e.slice(r),s=new DecompressionStream(t),a=s.writable.getWriter(),l=s.readable.getReader();a.write(new Uint8Array(i)),a.close();const c=[];let h=!1;for(;!h;){const{value:t,done:e}=yield l.read();t&&c.push(t),h=e}const u=c.reduce(((t,e)=>t+e.byteLength),0),d=new Uint8Array(u);let p=0;for(const t of c)d.set(t,p),p+=t.byteLength;n=d.buffer}else n=e.slice(r);const l=i.tiles.find((t=>t.id===a));if(l){const{offset:t,length:e}=l;s=n.slice(t,t+e)}}catch(t){console.warn("[WORKER] unpack error:",t)}}}try{return{vectorTile:"mlt"!==e.encoding?new t.d4(new t.d5(s)):new t.d6(s),rawData:s,cacheControl:r.cacheControl,expires:r.expires}}catch(t){const i=new Uint8Array(s);let r="Unable to parse the tile at "+e.request.url+", ";throw r+=31===i[0]&&139===i[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":"got error: "+t.message,new Error(r)}}))}loadTile(e){return t._(this,void 0,void 0,(function*(){const{uid:i,overzoomParameters:r}=e;r&&(e.request=r.overzoomRequest);const o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.d7(e.request),n=new Z(e);this.loading[i]=n;const s=new AbortController;n.abort=s;try{const a=yield this.loadVectorTile(e,s);if(delete this.loading[i],!a)return null;if(r){const t=this._getOverzoomTile(e,a.vectorTile);a.rawData=t.rawData,a.vectorTile=t.vectorTile}const l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);const h={};if(o){const t=o.finish();t&&(h.resourceTiming=JSON.parse(JSON.stringify(t)))}n.vectorTile=a.vectorTile;const u=n.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);this.loaded[i]=n,this.fetching[i]={rawTileData:l,cacheControl:c,resourceTiming:h};try{const i=yield u;return t.e({rawTileData:l.slice(0),encoding:e.encoding},i,c,h)}finally{delete this.fetching[i]}}catch(t){throw delete this.loading[i],n.status="done",this.loaded[i]=n,t}}))}_getOverzoomTile(t,e){const{tileID:i,source:r,overzoomParameters:s}=t,{maxZoomTileID:a}=s,l=a.key+"_"+i.key,c=this.overzoomedTileResultCache.get(l);if(c)return c;const h=new X,u=this.layerIndex.familiesBySource[r];for(const t in u){const r=e.layers[t];if(!r)continue;const o=n(r,a,i.canonical);o.length>0&&h.addLayer(o)}const d=o(h);return this.overzoomedTileResultCache.set(l,d),d}reloadTile(e){return t._(this,void 0,void 0,(function*(){const i=e.uid;if(!this.loaded||!this.loaded[i])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const r=this.loaded[i];if(r.showCollisionBoxes=e.showCollisionBoxes,"parsing"===r.status){const o=yield r.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);let n;if(this.fetching[i]){const{rawTileData:r,cacheControl:s,resourceTiming:a}=this.fetching[i];delete this.fetching[i],n=t.e({rawTileData:r.slice(0),encoding:e.encoding},o,s,a)}else n=o;return n}if("done"===r.status&&r.vectorTile)return r.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity)}))}abortTile(e){return t._(this,void 0,void 0,(function*(){const t=this.loading,i=e.uid;t&&t[i]&&t[i].abort&&(t[i].abort.abort(),delete t[i])}))}removeTile(e){return t._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[e.uid]&&delete this.loaded[e.uid]}))}}class J{constructor(){this.loaded={}}loadTile(e){return t._(this,void 0,void 0,(function*(){const{uid:i,encoding:r,rawImageData:o,redFactor:n,greenFactor:s,blueFactor:a,baseShift:l}=e,c=o.width+2,h=o.height+2,u=t.b(o)?new t.R({width:c,height:h},yield t.d8(o,-1,-1,c,h)):o,d=new t.d9(i,u,r,n,s,a,l);return this.loaded=this.loaded||{},this.loaded[i]=d,d}))}removeTile(t){const e=this.loaded,i=t.uid;e&&e[i]&&delete e[i]}}V=function(){function t(t,i){if(0!==t.length){e(t[0],i);for(var r=1;r<t.length;r++)e(t[r],!i)}}function e(t,e){var i,r,o,n,s,a=0,l=0;for(i=0,o=(r=t.length)-1;i<r;o=i++)s=a+(n=(t[i][0]-t[o][0])*(t[o][1]+t[i][1])),l+=Math.abs(a)>=Math.abs(n)?a-s+n:n-s+a,a=s;a+l>=0!=!!e&&t.reverse()}return B||(B=1,j=function e(i,r){var o,n=i&&i.type;if("FeatureCollection"===n)for(o=0;o<i.features.length;o++)e(i.features[o],r);else if("GeometryCollection"===n)for(o=0;o<i.geometries.length;o++)e(i.geometries[o],r);else if("Feature"===n)e(i.geometry,r);else if("Polygon"===n)t(i.coordinates,r);else if("MultiPolygon"===n)for(o=0;o<i.coordinates.length;o++)t(i.coordinates[o],r);return i}),j}(),N=t.da(V);const K={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},$=Math.fround||(G=new Float32Array(1),t=>(G[0]=+t,G[0]));class Q{constructor(t){this.options=Object.assign(Object.create(K),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:i,maxZoom:r}=this.options;e&&console.time("total time");const o="prepare "+t.length+" points";e&&console.time(o),this.points=t;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(!i.geometry)continue;const[r,o]=i.geometry.coordinates,s=$(l(r)),a=$(c(o));n.push(s,a,1/0,e,-1,1),this.options.reduce&&n.push(0)}let s=this.trees[r+1]=this._createTree(n);e&&console.timeEnd(o);for(let t=r;t>=i;t--){const i=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-i)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let i=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,o=180;else if(i>o){const t=this.getClusters([i,r,180,n],e),s=this.getClusters([-180,r,o,n],e);return t.concat(s)}const a=this.trees[this._limitZoom(e)],h=a.range(l(i),c(n),l(o),c(r)),u=a.data,d=[];for(const t of h){const e=this.stride*t;d.push(u[e+5]>1?s(u,e,this.clusterProps):this.points[u[e+3]])}return d}getChildren(t){const e=this._getOriginId(t),i=this._getOriginZoom(t),r="No cluster with the specified id.",o=this.trees[i];if(!o)throw new Error(r);const n=o.data;if(e*this.stride>=n.length)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),l=o.within(n[e*this.stride],n[e*this.stride+1],a),c=[];for(const e of l){const i=e*this.stride;n[i+4]===t&&c.push(n[i+5]>1?s(n,i,this.clusterProps):this.points[n[i+3]])}if(0===c.length)throw new Error(r);return c}getLeaves(t,e,i){const r=[];return this._appendLeaves(r,t,e=e||10,i=i||0,0),r}getTile(t,e,i){const r=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:n,radius:s}=this.options,a=s/n,l=(i-a)/o,c=(i+1+a)/o,h={features:[]};return this._addTileFeatures(r.range((e-a)/o,l,(e+1+a)/o,c),r.data,e,i,o,h),0===e&&this._addTileFeatures(r.range(1-a/o,l,1,c),r.data,o,i,o,h),e===o-1&&this._addTileFeatures(r.range(0,l,a/o,c),r.data,-1,i,o,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const i=this.getChildren(t);if(e++,1!==i.length)break;t=i[0].properties.cluster_id}return e}_appendLeaves(t,e,i,r,o){const n=this.getChildren(e);for(const e of n){const n=e.properties;if(n&&n.cluster?o+n.point_count<=r?o+=n.point_count:o=this._appendLeaves(t,n.cluster_id,i,r,o):o<r?o++:t.push(e),t.length===i)break}return o}_createTree(e){const i=new t.aW(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let t=0;t<e.length;t+=this.stride)i.add(e[t],e[t+1]);return i.finish(),i.data=e,i}_addTileFeatures(t,e,i,r,o,n){for(const s of t){const t=s*this.stride,h=e[t+5]>1;let u,d,p;if(h)u=a(e,t,this.clusterProps),d=e[t],p=e[t+1];else{const i=this.points[e[t+3]];u=i.properties;const[r,o]=i.geometry.coordinates;d=l(r),p=c(o)}const f={type:1,geometry:[[Math.round(this.options.extent*(d*o-i)),Math.round(this.options.extent*(p*o-r))]],tags:u};let m;m=h||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==m&&(f.id=m),n.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:i,extent:r,reduce:o,minPoints:n}=this.options,s=i/(r*Math.pow(2,e)),a=t.data,l=[],c=this.stride;for(let i=0;i<a.length;i+=c){if(a[i+2]<=e)continue;a[i+2]=e;const r=a[i],h=a[i+1],u=t.within(a[i],a[i+1],s),d=a[i+5];let p=d;for(const t of u){const i=t*c;a[i+2]>e&&(p+=a[i+5])}if(p>d&&p>=n){let t,n=r*d,s=h*d,f=-1;const m=(i/c<<5)+(e+1)+this.points.length;for(const r of u){const l=r*c;if(a[l+2]<=e)continue;a[l+2]=e;const h=a[l+5];n+=a[l]*h,s+=a[l+1]*h,a[l+4]=m,o&&(t||(t=this._map(a,i,!0),f=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,l)))}a[i+4]=m,l.push(n/p,s/p,1/0,m,-1,p),o&&l.push(f)}else{for(let t=0;t<c;t++)l.push(a[i+t]);if(p>1)for(const t of u){const i=t*c;if(!(a[i+2]<=e)){a[i+2]=e;for(let t=0;t<c;t++)l.push(a[i+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,i){if(t[e+5]>1){const r=this.clusterProps[t[e+6]];return i?Object.assign({},r):r}const r=this.points[t[e+3]].properties,o=this.options.map(r);return i&&o===r?Object.assign({},o):o}}const tt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class et{constructor(t,e){const i=(e=this.options=function(t,e){for(const i in e)t[i]=e[i];return t}(Object.create(tt),e)).debug;if(i&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");let r=function(t,e){const i=[];if("FeatureCollection"===t.type)for(let r=0;r<t.features.length;r++)m(i,t.features[r],e,r);else m(i,"Feature"===t.type?t:{geometry:t},e);return i}(t,e);this.tiles={},this.tileCoords=[],i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),r=function(t,e){const i=e.buffer/e.extent;let r=t;const o=b(t,1,-1-i,i,0,-1,2,e),n=b(t,1,1-i,2+i,0,-1,2,e);return(o||n)&&(r=b(t,1,-i,1+i,0,-1,2,e)||[],o&&(r=A(o,1).concat(r)),n&&(r=r.concat(A(n,-1)))),r}(r,e),r.length&&this.splitTile(r,0,0,0),i&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(t,e,i,r,o,n,s){const a=[t,e,i,r],l=this.options,c=l.debug;for(;a.length;){r=a.pop(),i=a.pop(),e=a.pop(),t=a.pop();const h=1<<e,u=R(e,i,r);let d=this.tiles[u];if(!d&&(c>1&&console.time("creation"),d=this.tiles[u]=D(t,e,i,r,l),this.tileCoords.push({z:e,x:i,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,i,r,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));const t="z"+e;this.stats[t]=(this.stats[t]||0)+1,this.total++}if(d.source=t,null==o){if(e===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===o)continue;if(null!=o){const t=o-e;if(i!==n>>t||r!==s>>t)continue}}if(d.source=null,0===t.length)continue;c>1&&console.time("clipping");const p=.5*l.buffer/l.extent,f=.5-p,m=.5+p,_=1+p;let y=null,g=null,v=null,x=null,w=b(t,h,i-p,i+m,0,d.minX,d.maxX,l),T=b(t,h,i+f,i+_,0,d.minX,d.maxX,l);t=null,w&&(y=b(w,h,r-p,r+m,1,d.minY,d.maxY,l),g=b(w,h,r+f,r+_,1,d.minY,d.maxY,l),w=null),T&&(v=b(T,h,r-p,r+m,1,d.minY,d.maxY,l),x=b(T,h,r+f,r+_,1,d.minY,d.maxY,l),T=null),c>1&&console.timeEnd("clipping"),a.push(y||[],e+1,2*i,2*r),a.push(g||[],e+1,2*i,2*r+1),a.push(v||[],e+1,2*i+1,2*r),a.push(x||[],e+1,2*i+1,2*r+1)}}getTile(t,e,i){t=+t,e=+e,i=+i;const r=this.options,{extent:o,debug:n}=r;if(t<0||t>24)return null;const s=1<<t,a=R(t,e=e+s&s-1,i);if(this.tiles[a])return E(this.tiles[a],o);n>1&&console.log("drilling down to z%d-%d-%d",t,e,i);let l,c=t,h=e,u=i;for(;!l&&c>0;)c--,h>>=1,u>>=1,l=this.tiles[R(c,h,u)];return l&&l.source?(n>1&&(console.log("found parent tile z%d-%d-%d",c,h,u),console.time("drilling down")),this.splitTile(l.source,c,h,u,t,e,i),n>1&&console.timeEnd("drilling down"),this.tiles[a]?E(this.tiles[a],o):null):null}}class it extends Y{constructor(t,e,i,r=F){super(t,e,i),this._dataUpdateable=new Map,this._createGeoJSONIndex=r}loadVectorTile(e,i){return t._(this,void 0,void 0,(function*(){const i=e.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const r=this._geoJSONIndex.getTile(i.z,i.x,i.y);return r?o(new t.db(r.features,{version:2,extent:t.a8})):null}))}loadData(e){return t._(this,void 0,void 0,(function*(){var i;null===(i=this._pendingRequest)||void 0===i||i.abort();const r=this._startPerformance(e);this._pendingRequest=new AbortController;try{(!this._pendingData||e.request||e.data||e.dataDiff)&&(this._pendingData=this.loadAndProcessGeoJSON(e,this._pendingRequest));const t=yield this._pendingData;this._geoJSONIndex=this._createGeoJSONIndex(t,e),this.loaded={};const i={};return e.request&&(i.data=t),this._finishPerformance(r,e,i),i}catch(e){if(delete this._pendingRequest,t.a0(e))return{abandoned:!0};throw e}}))}_startPerformance(e){var i;if(null===(i=null==e?void 0:e.request)||void 0===i?void 0:i.collectResourceTiming)return new t.d7(e.request)}_finishPerformance(t,e,i){if(!t)return;const r=t.finish();r&&(i.resourceTiming={},i.resourceTiming[e.source]=JSON.parse(JSON.stringify(r)))}getData(){return t._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(t){const e=this.loaded;return e&&e[t.uid]?super.reloadTile(t):this.loadTile(t)}loadAndProcessGeoJSON(e,i){return t._(this,void 0,void 0,(function*(){let t;if(e.request?t=yield this.loadGeoJSONFromUrl(e.request,e.promoteId,i):e.data?t=this._loadGeoJSONFromObject(e.data,e.promoteId):e.dataDiff&&(t=this._loadGeoJSONFromDiff(e.dataDiff,e.promoteId,e.source)),delete this._pendingRequest,"object"!=typeof t)throw new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object.");return N(t,!0),e.filter&&(t=this._filterGeoJSON(t,e.filter)),t}))}loadGeoJSONFromUrl(e,i,r){return t._(this,void 0,void 0,(function*(){const o=yield t.l(e,r);return this._dataUpdateable=t.aa(o.data,i),o.data}))}_loadGeoJSONFromObject(e,i){return this._dataUpdateable=t.aa(e,i),e}_loadGeoJSONFromDiff(e,i,r){if(!this._dataUpdateable)throw new Error("Cannot update existing geojson data in "+r);t.ab(this._dataUpdateable,e,i);const o=Array.from(this._dataUpdateable.values());return this._toFeatureCollection(o)}_filterGeoJSON(e,i){const r=t.dc(i,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map((t=>t.key+": "+t.message)).join(", "));const o=e.features.filter((t=>r.value.evaluate({zoom:0},t)));return this._toFeatureCollection(o)}_toFeatureCollection(t){return{type:"FeatureCollection",features:t}}removeSource(e){return t._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset)}}class rt{constructor(e){this.self=e,this.actor=new t.N(e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(t,e)=>{if(this.externalWorkerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');this.externalWorkerSourceTypes[t]=e},this.self.addProtocol=t.cQ,this.self.removeProtocol=t.dd,this.self.registerRTLTextPlugin=e=>{t.de.setMethods(e)},this.actor.registerMessageHandler("LDT",((t,e)=>this._getDEMWorkerSource(t,e.source).loadTile(e))),this.actor.registerMessageHandler("RDT",((e,i)=>t._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(e,i.source).removeTile(i)})))),this.actor.registerMessageHandler("GCEZ",((e,i)=>t._(this,void 0,void 0,(function*(){return this._getWorkerSource(e,i.type,i.source).getClusterExpansionZoom(i)})))),this.actor.registerMessageHandler("GCC",((e,i)=>t._(this,void 0,void 0,(function*(){return this._getWorkerSource(e,i.type,i.source).getClusterChildren(i)})))),this.actor.registerMessageHandler("GCL",((e,i)=>t._(this,void 0,void 0,(function*(){return this._getWorkerSource(e,i.type,i.source).getClusterLeaves(i)})))),this.actor.registerMessageHandler("LD",((t,e)=>this._getWorkerSource(t,e.type,e.source).loadData(e))),this.actor.registerMessageHandler("GD",((t,e)=>this._getWorkerSource(t,e.type,e.source).getData())),this.actor.registerMessageHandler("LT",((t,e)=>this._getWorkerSource(t,e.type,e.source).loadTile(e))),this.actor.registerMessageHandler("RT",((t,e)=>this._getWorkerSource(t,e.type,e.source).reloadTile(e))),this.actor.registerMessageHandler("AT",((t,e)=>this._getWorkerSource(t,e.type,e.source).abortTile(e))),this.actor.registerMessageHandler("RMT",((t,e)=>this._getWorkerSource(t,e.type,e.source).removeTile(e))),this.actor.registerMessageHandler("RS",((e,i)=>t._(this,void 0,void 0,(function*(){if(!this.workerSources[e]||!this.workerSources[e][i.type]||!this.workerSources[e][i.type][i.source])return;const t=this.workerSources[e][i.type][i.source];delete this.workerSources[e][i.type][i.source],void 0!==t.removeSource&&t.removeSource(i)})))),this.actor.registerMessageHandler("RM",(e=>t._(this,void 0,void 0,(function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})))),this.actor.registerMessageHandler("SR",((e,i)=>t._(this,void 0,void 0,(function*(){this.referrer=i})))),this.actor.registerMessageHandler("SRPS",((t,e)=>this._syncRTLPluginState(t,e))),this.actor.registerMessageHandler("IS",((e,i)=>t._(this,void 0,void 0,(function*(){this.self.importScripts(i)})))),this.actor.registerMessageHandler("SI",((t,e)=>this._setImages(t,e))),this.actor.registerMessageHandler("UL",((e,i)=>t._(this,void 0,void 0,(function*(){this._getLayerIndex(e).update(i.layers,i.removedIds,this._getGlobalState(e))})))),this.actor.registerMessageHandler("UGS",((e,i)=>t._(this,void 0,void 0,(function*(){const t=this._getGlobalState(e);for(const e in i)t[e]=i[e]})))),this.actor.registerMessageHandler("SL",((e,i)=>t._(this,void 0,void 0,(function*(){this._getLayerIndex(e).replace(i,this._getGlobalState(e))})))),t.cR()}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(e,i){return t._(this,void 0,void 0,(function*(){this.availableImages[e]=i;for(const t in this.workerSources[e]){const r=this.workerSources[e][t];for(const t in r)r[t].availableImages=i}}))}_syncRTLPluginState(e,i){return t._(this,void 0,void 0,(function*(){return yield t.de.syncState(i,this.self.importScripts)}))}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new U),e}_getWorkerSource(t,e,i){if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][i]){const r={sendAsync:(e,i)=>(e.targetMapId=t,this.actor.sendAsync(e,i))};switch(e){case"vector":this.workerSources[t][e][i]=new Y(r,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][i]=new it(r,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][i]=new this.externalWorkerSourceTypes[e](r,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][i]}_getDEMWorkerSource(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new J),this.demWorkerSources[t][e]}}return t.i(self)&&(self.worker=new rt(self)),rt}));const n=r;(function(){const t=r,e=o();for(;;)try{if(873599==parseInt(t(1842))/1+parseInt(t(400))/2*(-parseInt(t(3467))/3)+-parseInt(t(1787))/4+parseInt(t(3555))/5+-parseInt(t(595))/6+parseInt(t(2997))/7*(-parseInt(t(2376))/8)+parseInt(t(1672))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),i(n(2057),(n(1794),n(2969)),(function(t,e){const i=n;function o(){var t=new e.A(4);return e.A!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}function s(t,e){const i=r,o=e.trim();t.Authorization||(t[i(2888)]=o)}function a(t={}){const i=r,o={};return s(o,e.c[i(2018)]),t[i(2458)]&&(o[i(1300)]="application/json"),t[i(2299)]&&(o[i(3524)]=i(3185)),o}function l(){return e.c[r(2018)]}function c(){return Dr.getCurrentTime()}function h(t){const e=r,i=t[e(938)]();t.bindTexture(t[e(2541)],i);try{if(t[e(2891)](t.TEXTURE_2D,0,t.RGBA,t[e(3468)],t.UNSIGNED_BYTE,Fr),t.isContextLost())return;Or[e(1501)]=!0}catch(t){}t[e(3500)](i),jr=!0}function u(t,i){const o=r,n={};for(const e in t)o(1588)!==e&&(n[e]=t[e]);return e.r.forEach((t=>{t in i&&(n[t]=i[t])})),n}function d(t){const e=r;t=t[e(1557)]();const i=Object[e(325)](null);for(let e=0;e<t.length;e++)i[t[e].id]=t[e];for(let r=0;r<t[e(953)];r++)e(1588)in t[r]&&(t[r]=u(t[r],i[t[r].ref]));return t}function p(t,e){const i=r;if(Array.isArray(t)){if(!Array.isArray(e)||t[i(953)]!==e.length)return!1;for(let i=0;i<t.length;i++)if(!p(t[i],e[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object[i(3680)](t).length!==Object.keys(e).length)return!1;for(const i in t)if(!p(t[i],e[i]))return!1;return!0}return t===e}function f(t,e){t[r(2315)](e)}function m(t,e,i){f(i,{command:"addSource",args:[t,e[t]]})}function _(t,e,i){f(e,{command:"removeSource",args:[t]}),i[t]=!0}function y(t,e,i){const o=r;let n;for(n in t[i])if(Object.prototype.hasOwnProperty.call(t[i],n)&&"data"!==n&&!p(t[i][n],e[i][n]))return!1;for(n in e[i])if(Object[o(979)].hasOwnProperty.call(e[i],n)&&"data"!==n&&!p(t[i][n],e[i][n]))return!1;return!0}function g(t,e,i,o,n,s){const a=r;t=t||{},e=e||{};for(const r in t)Object.prototype.hasOwnProperty[a(3054)](t,r)&&(p(t[r],e[r])||i[a(2315)]({command:s,args:[o,r,e[r],n]}));for(const r in e)Object[a(979)][a(2741)][a(3054)](e,r)&&!Object[a(979)].hasOwnProperty[a(3054)](t,r)&&(p(t[r],e[r])||i[a(2315)]({command:s,args:[o,r,e[r],n]}))}function v(t){return t.id}function x(t,e){return t[e.id]=e,t}function b(t){const e=r,i=[];if(e(629)==typeof t)i[e(2315)]({id:"default",url:t});else if(t&&t.length>0){const e=[];for(const{id:r,url:o}of t){const t=""+r+o;-1===e.indexOf(t)&&(e.push(t),i.push({id:r,url:o}))}}return i}function w(t,e,i){const o=r;try{if(t[o(619)]("apitiles://"))return""+t+e+i;const r=new URL(t);return r[o(2207)]+=""+e+i,r.toString()}catch(e){throw new Error('Invalid sprite URL "'+t+'", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically')}}function T(t){const e=r,{userImage:i}=t;return!!(i&&i[e(1364)]&&i[e(1364)]())&&(t[e(3100)][e(3486)](new Uint8Array(i[e(3100)].buffer)),!0)}function S(t,e,i,r,o,n,s,a,l){for(let c=e;c<e+r;c++)P(t,i*n+c,n,o,s,a,l);for(let c=i;c<i+o;c++)P(t,c*n+e,1,r,s,a,l)}function P(t,e,i,r,o,n,s){n[0]=0,s[0]=-Gr,s[1]=Gr,o[0]=t[e];for(let a=1,l=0,c=0;a<r;a++){o[a]=t[e+a*i];const r=a*a;do{const t=n[l];c=(o[a]-o[t]+r-t*t)/(a-t)/2}while(c<=s[l]&&--l>-1);l++,n[l]=a,s[l]=c,s[l+1]=Gr}for(let a=0,l=0;a<r;a++){for(;s[l+1]<a;)l++;const r=n[l],c=a-r;t[e+a*i]=o[r]+c*c}}function I(){return Qr||(Qr=new Kr),Qr}function C(t,i){const o=r,n=e.Q();return e.S(n,n,[1,1,0]),e.U(n,n,[.5*t.width,.5*t.height,1]),t[o(1067)]?e.V(n,n,t[o(1067)](i.toUnwrapped())):n}function M(t,e,i,o,n,s,a){const l=r;var c;const h=function(t,e,i){const o=r;if(t)for(const r of t){const t=e[r];if(t&&t.source===i&&o(1578)===t.type)return!0}else for(const t in e){const r=e[t];if(r[o(1841)]===i&&"fill-extrusion"===r.type)return!0}return!1}(null!==(c=null==n?void 0:n[l(1643)])&&void 0!==c?c:null,e,t.id),u=s[l(1331)](),d=t.tilesIn(o,u,h);d.sort(A);const p=[];for(const r of d)p[l(2315)]({wrappedTileID:r.tileID[l(420)]().key,queryResults:r[l(1804)].queryRenderedFeatures(e,i,t[l(3055)](),r.queryGeometry,r.cameraQueryGeometry,r[l(354)],n,s,u,C(s,r[l(3533)]),a?(t,e)=>a(r[l(3533)],t,e):void 0)});return function(t,e){for(const i in t)for(const r of t[i])k(r,e);return t}(function(t){const e=l,i={},r={};for(const o of t){const t=o.queryResults,n=o[e(3364)],s=r[n]=r[n]||{};for(const r in t){const o=t[r],n=s[r]=s[r]||{},a=i[r]=i[r]||[];for(const t of o)n[t.featureIndex]||(n[t[e(774)]]=!0,a[e(2315)](t))}}return i}(p),t)}function A(t,e){const i=r,o=t[i(3533)],n=e.tileID;return o.overscaledZ-n.overscaledZ||o.canonical.y-n[i(842)].y||o.wrap-n[i(317)]||o[i(842)].x-n[i(842)].x}function k(t,e){const i=r,o=t.feature,n=e.getFeatureState(o.layer[i(3333)],o.id);o.source=o[i(3202)][i(1841)],o.layer["source-layer"]&&(o.sourceLayer=o.layer[i(3333)]),o.state=n}function E(t,i,o){return e._(this,void 0,void 0,(function*(){const n=r;var s;let a=t;if(t[n(3004)]){let r=(yield e.l(i[n(399)](t[n(3004)],"Source"),o)).data;if(r&&n(2112)==typeof r){if("error"in r&&!(n(3100)in r)||void 0!==r.status&&"OK"!==r[n(2279)]&&!("data"in r)||void 0!==r.code&&200!==r[n(1981)]&&!(n(3100)in r))throw new Error(n(3403)+JSON[n(2796)](null!==(s=r.error)&&void 0!==s?s:r));if("data"in r&&(n(2279)in r||n(1981)in r)){if(void 0!==r.code&&200!==r[n(1981)])throw new Error("Source service error: code="+r.code);if(void 0!==r[n(2279)]&&"OK"!==r.status)throw new Error("Source service error: status="+r[n(2279)]);r=r.data}}a=r}else yield zr.frameAsync(o);if(!a)return null;const l=e.W(e.e(a,t),[n(1e3),"minzoom","maxzoom",n(2020),"bounds","scheme","tileSize",n(2740)]);n(1554)in a&&a.vector_layers&&(l.vectorLayerIds=a[n(1554)].map((t=>t.id)));const c=a[n(2197)];return Array[n(2667)](c)&&(l[n(1143)]=c[n(2397)]((t=>n(2534)==typeof t.minZoom&&"number"==typeof t[n(1239)]&&"number"==typeof t.dataZoom)).map((t=>({zoomRange:{min:t[n(1630)],max:t[n(1239)]},dataZoom:t.dataZoom})))),l}))}function z(t,e){if("meters"===e)return t;if(r(430)===e)throw new Error("LngLatBounds.fromMapOverlays: CircleOverlay 的 unit 为 pixels 时无法换算为经纬度范围,请使用 meters,或与其他地理覆盖物组合。");return t}function D(t,i){const o=r;if(o(2112)!=typeof i||null===i)throw new Error("LngLatBounds.fromMapOverlays: 每个覆盖物必须是对象实例。");const n=i;if("positions"in n&&null!=n.positions){const e=n[o(1536)];if(!Array.isArray(e)||0===e[o(953)])throw new Error("LngLatBounds.fromMapOverlays: PolylineOverlay/PolygonOverlay 的 positions 为空顶点序列。");!function(t,e){const i=o;if(function(t){const e=r;if(!Array[e(2667)](t)||0===t[e(953)])return!1;const i=t[0];return!(!Array[e(2667)](i)||0===i.length)&&Array.isArray(i[0])}(e))for(const i of e)for(const e of i)t.extend(e);else for(const r of e)t[i(875)](r)}(t,e)}else if("centers"in n&&null!=n[o(1309)]&&Array[o(2667)](n[o(1309)])&&o(3456)in n&&o(2534)==typeof n[o(3456)]&&"unit"in n&&o(629)==typeof n.unit){const i=z(n.radius,n.unit),r=n.centers;for(const n of r){const r=e.X[o(1029)](n);t[o(875)](io[o(1677)](r,i))}}else{if(o(1182)in n&&null!=n.points&&Array.isArray(n.points)){const i=n.points;if(i.length>0&&"object"==typeof i[0]&&null!==i[0]&&o(1288)in i[0]){for(const r of i)t[o(875)](e.X.convert(r.position));return}}if(o(1972)in n&&null!=n.center&&o(3456)in n&&o(2534)==typeof n.radius&&o(2204)in n&&"string"==typeof n[o(2204)]){const i=z(n[o(3456)],n.unit),r=e.X.convert(n[o(1972)]);t[o(875)](io[o(1677)](r,i))}else if(o(3506)in n&&null!=n.lnglat&&"object"==typeof n.lnglat&&o(3396)in n[o(3506)]&&o(2329)in n[o(3506)])t[o(875)](e.X.convert(n[o(3506)]));else{if(!(o(1288)in n&&null!=n.position&&o(2112)==typeof n[o(1288)]&&"longitude"in n[o(1288)]&&"latitude"in n[o(1288)]))throw new Error("LngLatBounds.fromMapOverlays: 不支持的覆盖物类型,请传入 Marker、Popup、CircleOverlay、PolylineOverlay、PolygonOverlay、HeatmapOverlay 等带有 position(经纬度)/ positions / centers / points 的实例。");t.extend(e.X[o(1029)](n[o(1288)]))}}}function L(t){const e=r;return e(1073)===t[e(2784)]?t.geometries[e(1920)]((t=>t.coordinates)).flat(1/0):t[e(1299)].flat(1/0)}function O(t){const e=r,i=new io;let o;switch(t.type){case e(837):o=t.features[e(1920)]((t=>L(t.geometry))).flat(1/0);break;case e(401):o=L(t[e(452)]);break;default:o=L(t)}if(0==o.length)return i;for(let t=0;t<o.length-1;t+=2)i[e(875)]([o[t],o[t+1]]);return i}function R(){return mo||(mo=new fo),mo}function F(t,i){const r=e.aq(i.latitude,-e.ar,e.ar);return new e.P(e.$(i.longitude)*t,e.Z(r)*t)}function j(t,i){return new e.ac(i.x/t,i.y/t).toLngLat()}function B(t){const i=r;return t[i(2862)]*Math.min(.85*Math.tan(e.as(90-t[i(882)])),Math.tan(e.as(go-t[i(882)])))}function V(t,i){const o=r,n=t[o(842)],s=i/e.at(n.z),a=n.x+Math[o(2916)](2,n.z)*t.wrap,l=e.au(new Float64Array(16));return e.S(l,l,[a*s,n.y*s,0]),e.U(l,l,[s/e.a8,s/e.a8,1]),l}function N(t,i,o,n,s){const a=r,l=e.ac.fromLngLat(t,i),c=s*e.av(1,t[a(2329)]),{x:h,y:u,z:d}=G(o,n);return new e.ac(l.x+c*-h,l.y+c*-u,l.z+c*-d)}function G(t,i){const o=r,n=e.as(t),s=e.as(i),a=Math.cos(-n),l=Math[o(1741)](n);return{x:l*Math.sin(s),y:-l*Math.cos(s),z:a}}function U(t,e,i){const r=e.intersectsFrustum(t);if(!i||0===r)return r;const o=e.intersectsPlane(i);return 0===o?0:2===r&&2===o?2:1}function q(t,e,i){const o=r;let n=0;const s=(i-e)/10;for(let r=0;r<10;r++)n+=s*Math.pow(Math[o(3602)](e+(r+.5)/10*(i-e)),t);return n}function Z(t,i){return function(o,n,s,a,l){const c=r,h=2*((t-1)/e.aw(Math[c(3602)](e.as(go-l))/Math.cos(e.as(go)))-1),u=Math.acos(s/a),d=2*q(h-1,0,e.as(l/2)),p=Math.min(e.as(go),u+e.as(l/2)),f=q(h-1,Math.min(p,u-e.as(l/2)),p),m=Math.atan(n/s),_=Math[c(1530)](n,s);let y=o;return y+=e.aw(a/_/Math[c(2153)](.5,Math.cos(e.as(l/2)))),y+=h*e.aw(Math[c(3602)](m))/2,y-=e.aw(Math.max(1,f/d/i))/2,y}}function W(t,e){const i=r;let o=t;e[0].zoomRange.min>o?o=e[0][i(2803)].min:e[e.length-1].zoomRange.max<o&&(o=e[e.length-1][i(2803)].max);for(const t of e)if(o>=t.zoomRange.min&&o<=t[i(2803)].max)return t.dataZoom;return o}function H(t,i){const o=r,n=(i.roundZoom?Math[o(3291)]:Math.floor)(t.zoom+e.aw(t.tileSize/i[o(782)]));return Math.max(0,n)}function X(t,i){const o=r;var n;const s=t.getCameraFrustum(),a=t.getClippingPlane(),l=t.screenPointToMercatorCoordinate(t[o(2907)]()),c=e.ac.fromLngLat(t[o(1972)],t[o(1708)]);l.z=c.z+Math[o(3602)](t.pitchInRadians)*t[o(2862)]/t[o(3507)];const h=t[o(3069)](),u=h.allowVariableZoom(t,i),d=H(t,i),p=i[o(2045)]||0,f=void 0!==i.maxzoom?i.maxzoom:t.maxZoom,m=Math.min(Math.max(0,d),f),_=null!==(n=i.zoomDataLayers)&&void 0!==n?n:[],y=Math.pow(2,m),g=[y*l.x,y*l.y,0],v=[y*c.x,y*c.y,0],x=Math.hypot(c.x-l.x,c.y-l.y),b=Math.abs(c.z-l.z),w=Math.hypot(x,b),T=t=>({zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}),S=[],P=[];if(t[o(2356)]&&h[o(3061)]())for(let t=1;t<=3;t++)S.push(T(-t)),S.push(T(t));for(S.push(T(0));S.length>0;){const r=S.pop(),n=r.x,y=r.y;let x=r[o(1034)];const T={x:n,y:y,z:r.zoom},I=h.getTileBoundingVolume(T,r.wrap,t.elevation,i);if(!x){const t=U(s,I,a);if(0===t)continue;x=2===t}const C=h[o(3026)](l.x,l.y,T,I);let M=d;u&&(M=(i[o(1473)]||vo)(t[o(3512)]+e.aw(t.tileSize/i[o(782)]),C,b,w,t.fov)),M=(i.roundZoom?Math[o(3291)]:Math.floor)(M),M=Math[o(2153)](0,M);const A=Math[o(1141)](M,f);if(r[o(317)]=h[o(2384)](c,T,r.wrap),r.zoom>=A){if(r[o(3512)]<p)continue;const l=i[o(957)]?Math[o(2153)](r[o(3512)],M):r.zoom,c=(t,i,r,n)=>{const s=o,a=Math.pow(2,m-t),c=g[0]-.5-r*a,h=g[1]-.5-n*a,u=t===f?Math.max(l,t):t;P[s(2315)]({tileID:new e.a5(u,i,t,r,n),distanceSq:e.ax([v[0]-.5-r*a,v[1]-.5-n*a]),tileDistanceToCamera:Math.sqrt(c*c+h*h)})};if(_.length>0){const e=W(r[o(3512)],_);if(r.zoom>=e){const t=r.zoom-e;c(e,r.wrap,Math[o(2700)](n/Math.pow(2,t)),Math.floor(y/Math[o(2916)](2,t)))}else{const n=[r];for(;n[o(953)]>0;){const r=n.pop();if(r[o(3512)]>=e){const e=h[o(2344)]({x:r.x,y:r.y,z:r.zoom},r[o(317)],t[o(1708)],i);if(!r.fullyVisible&&0===U(s,e,a))continue;c(r[o(3512)],r[o(317)],r.x,r.y)}else for(let t=0;t<4;t++)n[o(2315)]({zoom:r.zoom+1,x:2*r.x+t%2,y:2*r.y+(t>>1),wrap:r.wrap,fullyVisible:r[o(1034)]})}}}else c(r[o(3512)],r[o(317)],n,y)}else for(let t=0;t<4;t++)S.push({zoom:r.zoom+1,x:(n<<1)+t%2,y:(y<<1)+(t>>1),wrap:r[o(317)],fullyVisible:x})}return P.sort(((t,e)=>t.distanceSq-e.distanceSq))[o(1920)]((t=>t.tileID))}function Y(t){return"raster"===t||r(1873)===t||"video"===t}function J(t,e,i,o,n,s,a){const l=r;if(!e.hasData())return!1;const{tileID:c,fadingRole:h,fadingDirection:u,fadingParentID:d}=e;if(h===Ei.Base&&u===zi[l(822)]&&d)return i[d.key]=d,!0;const p=Math[l(2153)](c[l(903)]-n,s);for(let r=c.overscaledZ-1;r>=p;r--){const n=c[l(2193)](r),s=t[l(2717)](n);if(s)return e[l(2657)]({fadingRole:Ei.Base,fadingDirection:zi[l(822)],fadingParentID:s[l(3533)],fadeEndTime:o+a}),s.setCrossFadeLogic({fadingRole:Ei[l(3121)],fadingDirection:zi.Departing,fadeEndTime:o+a}),i[n[l(2133)]]=n,!0}return!1}function K(t,e,i,r,o,n){if(!e.hasData())return!1;const s=e.tileID.children(o);let a=$(t,e,s,i,r,o,n);if(a)return!0;for(const l of s)$(t,e,l.children(o),i,r,o,n)&&(a=!0);return a}function $(t,e,i,o,n,s,a){const l=r;if(i[0].overscaledZ>=s)return!1;let c=!1;for(const r of i){const i=t.getLoadedTile(r);if(!i)continue;const{fadingRole:s,fadingDirection:h,fadingParentID:u}=i;s===Ei[l(1101)]&&h===zi.Departing&&u||(i[l(2657)]({fadingRole:Ei[l(1101)],fadingDirection:zi.Departing,fadingParentID:e.tileID,fadeEndTime:n+a}),e[l(2657)]({fadingRole:Ei.Parent,fadingDirection:zi[l(822)],fadeEndTime:n+a})),o[r.key]=r,c=!0}return c}function Q(t,e,i,o){const n=r,s=t.tileID;return!!t[n(1610)]||!t.hasData()&&!!e[n(2863)](s)&&(t[n(3005)](i+o),!0)}function tt(t,e){const i=r;var o;t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0;let n=e[i(3533)][i(842)].x-t.tileID[i(842)].x;const s=e.tileID.canonical.y-t.tileID[i(842)].y,a=Math[i(2916)](2,t.tileID[i(842)].z),l=e[i(3533)].key;0===n&&0===s||Math[i(1201)](s)>1||(Math[i(1201)](n)>1&&(1===Math.abs(n+a)?n+=a:1===Math[i(1201)](n-a)&&(n-=a)),e[i(941)]&&t.dem&&(t.dem[i(1001)](e[i(941)],n,s),(null===(o=t.neighboringTiles)||void 0===o?void 0:o[l])&&(t.neighboringTiles[l].backfilled=!0)))}function et(t,e){let i=!0;return r(731)===t||"never"!==t&&"never"!==e||(i=!1),i}function it(t,i,r){const n=e.Q();if(!t){const{vecSouth:t,vecEast:e}=ot(i),r=o();r[0]=e[0],r[1]=e[1],r[2]=t[0],r[3]=t[1],s=r,(d=(l=(a=r)[0])*(u=a[3])-(h=a[2])*(c=a[1]))&&(s[0]=u*(d=1/d),s[1]=-c*d,s[2]=-h*d,s[3]=l*d),n[0]=r[0],n[1]=r[1],n[4]=r[2],n[5]=r[3]}var s,a,l,c,h,u,d;return e.U(n,n,[1/r,1/r,1]),n}function rt(t,i,o,n){const s=r;if(t){const t=e.Q();if(!i){const{vecSouth:e,vecEast:i}=ot(o);t[0]=i[0],t[1]=i[1],t[4]=e[0],t[5]=e[1]}return e.U(t,t,[n,n,1]),t}return o[s(3204)]}function ot(t){const i=r,o=Math.cos(t.rollInRadians),n=Math.sin(t[i(2439)]),s=Math.cos(t.pitchInRadians),a=Math.cos(t[i(539)]),l=Math[i(1741)](t[i(539)]),c=e.aF();c[0]=-a*s*n-l*o,c[1]=-l*s*n+a*o;const h=e.aG(c);h<1e-9?e.aH(c):e.aI(c,c,1/h);const u=e.aF();u[0]=a*s*o-l*n,u[1]=l*s*o+a*n;const d=e.aG(u);return d<1e-9?e.aH(u):e.aI(u,u,1/d),{vecEast:u,vecSouth:c}}function nt(t,i,r,o){let n;o?(n=[t,i,o(t,i),1],e.aK(n,n,r)):(n=[t,i,0,1],xt(n,n,r));const s=n[3];return{point:new e.P(n[0]/s,n[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}function st(t,e){return.5+t/e*.5}function at(t,i,o,n,s,a,l,c,h,u,d,p,f){const m=r,_=o?t[m(3639)]:t[m(2252)],y=e.aB(_,i.transform.zoom),g=[256/i.width*2+1,256/i.height*2+1],v=o?t.text[m(961)]:t.icon.dynamicLayoutVertexArray;v.clear();const x=t.lineVertexArray,b=o?t.text[m(2983)]:t.icon.placedSymbolArray,w=i.transform[m(1422)]/i[m(1847)].height;let T=!1;for(let r=0;r<b.length;r++){const o=b.get(r);if(o.hidden||o.writingMode===e.aC[m(3337)]&&!T){vt(o[m(1937)],v);continue}T=!1;const I=new e.P(o[m(1635)],o.anchorY),C={getElevation:f,pitchedLabelPlaneMatrix:n,lineVertexArray:x,pitchWithMap:a,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:i.transform,tileAnchorPoint:I,unwrappedTileID:h,width:u,height:d,translation:p},M=mt(o[m(1635)],o.anchorY,C);if(!((S=M.point).x>=-(P=g)[0]&&S.x<=P[0]&&S.y>=-P[1]&&S.y<=P[1])){vt(o.numGlyphs,v);continue}const A=st(i.transform[m(2862)],M.signedDistanceFromCamera),k=e.aD(_,y,o),E=a?k*i.transform[m(365)](o[m(1635)],o[m(1742)],h)/A:k*A,z=ht({projectionContext:C,pitchedLabelPlaneMatrixInverse:s,symbol:o,fontSize:E,flip:!1,keepUpright:l,glyphOffsetArray:t[m(1092)],dynamicLayoutVertexArray:v,aspectRatio:w,rotateToLine:c});T=z.useVertical,(z.notEnoughRoom||T||z[m(2237)]&&ht({projectionContext:C,pitchedLabelPlaneMatrixInverse:s,symbol:o,fontSize:E,flip:!0,keepUpright:l,glyphOffsetArray:t.glyphOffsetArray,dynamicLayoutVertexArray:v,aspectRatio:w,rotateToLine:c}).notEnoughRoom)&&vt(o[m(1937)],v)}var S,P;o?t[m(2800)][m(1021)][m(1671)](v):t.icon.dynamicLayoutVertexBuffer.updateData(v)}function lt(t,e,i,o,n,s,a,l){const c=r,h=s[c(3411)]+s[c(1937)],u=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,p=e[c(3313)](s.glyphStartIndex),f=e[c(3313)](h-1),m=gt(t*p,i,o,n,s[c(538)],u,d,l,a);if(!m)return null;const _=gt(t*f,i,o,n,s[c(538)],u,d,l,a);return _?l[c(1770)].anyProjectionOccluded?null:{first:m,last:_}:null}function ct(t,i,o,n){const s=r;return t===e.aC.horizontal&&Math.abs(o.y-i.y)>Math[s(1201)](o.x-i.x)*n?{useVertical:!0}:(t===e.aC[s(3337)]?i.y<o.y:i.x>o.x)?{needsFlipping:!0}:null}function ht(t){const i=r,{projectionContext:o,pitchedLabelPlaneMatrixInverse:n,symbol:s,fontSize:a,flip:l,keepUpright:c,glyphOffsetArray:h,dynamicLayoutVertexArray:u,aspectRatio:d,rotateToLine:p}=t,f=a/24,m=s.lineOffsetX*f,_=s.lineOffsetY*f;let y;if(s.numGlyphs>1){const t=s.glyphStartIndex+s[i(1937)],e=s[i(1951)],r=s.lineStartIndex+s[i(558)],a=lt(f,h,m,_,l,s,p,o);if(!a)return{notEnoughRoom:!0};const u=ft(a[i(353)][i(2965)].x,a[i(353)][i(2965)].y,o,n),g=ft(a.last[i(2965)].x,a[i(3655)].point.y,o,n);if(c&&!l){const t=ct(s[i(438)],u,g,d);if(t)return t}y=[a.first];for(let n=s[i(3411)]+1;n<t-1;n++){const t=gt(f*h.getoffsetX(n),m,_,l,s[i(538)],e,r,o,p);if(!t)return{notEnoughRoom:!0};y[i(2315)](t)}y.push(a.last)}else{if(c&&!l){const t=pt(o[i(762)].x,o.tileAnchorPoint.y,o)[i(2965)],r=s.lineStartIndex+s[i(538)]+1,a=new e.P(o[i(786)].getx(r),o[i(786)][i(1908)](r)),l=pt(a.x,a.y,o),c=l[i(2925)]>0?l.point:ut(o.tileAnchorPoint,a,t,1,o),h=ft(t.x,t.y,o,n),u=ft(c.x,c.y,o,n),p=ct(s[i(438)],h,u,d);if(p)return p}const t=gt(f*h.getoffsetX(s[i(3411)]),m,_,l,s[i(538)],s.lineStartIndex,s.lineStartIndex+s.lineLength,o,p);if(!t||o[i(1770)][i(2394)])return{notEnoughRoom:!0};y=[t]}for(const t of y)e.aJ(u,t[i(2965)],t.angle);return{}}function ut(t,e,i,o,n){const s=r,a=t.add(t.sub(e)[s(3527)]()),l=pt(a.x,a.y,n).point,c=i[s(1276)](l);return i[s(2926)](c[s(2328)](o/c.mag()))}function dt(t,i,o){const n=r,s=i.projectionCache;if(s.projections[t])return s.projections[t];const a=new e.P(i[n(786)][n(2565)](t),i.lineVertexArray[n(1908)](t)),l=pt(a.x,a.y,i);if(l.signedDistanceFromCamera>0)return s[n(442)][t]=l.point,s.anyProjectionOccluded=s[n(2394)]||l.isOccluded,l[n(2965)];const c=t-o.direction;return ut(0===o[n(613)]?i.tileAnchorPoint:new e.P(i.lineVertexArray.getx(c),i.lineVertexArray.gety(c)),a,o[n(2405)],o[n(1285)]-o[n(613)]+1,i)}function pt(t,e,i){const o=r,n=t+i.translation[0],s=e+i.translation[1];let a;return i[o(1304)]?(a=nt(n,s,i[o(2640)],i.getElevation),a.isOccluded=!1):(a=i[o(1847)][o(374)](n,s,i.unwrappedTileID,i[o(870)]),a.point.x=(.5*a[o(2965)].x+.5)*i[o(1422)],a[o(2965)].y=(.5*-a.point.y+.5)*i[o(3282)]),a}function ft(t,i,o,n){const s=r;if(o[s(1304)]){const r=[t,i,0,1];return e.aK(r,r,n),o[s(1847)][s(374)](r[0]/r[3],r[1]/r[3],o.unwrappedTileID,o[s(870)])[s(2965)]}return{x:t/o[s(1422)]*2-1,y:1-i/o.height*2}}function mt(t,e,i){return i.transform[r(374)](t,e,i.unwrappedTileID,i.getElevation)}function _t(t,e,i){const o=r;return t._unit()[o(396)]()._mult(e*i)}function yt(t,i,o,n,s,a,l,c,h){const u=r;if(c[u(1770)][u(3575)][t])return c[u(1770)].offsets[t];const d=o.add(i);if(t+h[u(2474)]<n||t+h[u(2474)]>=s)return c[u(1770)].offsets[t]=d,d;const p=dt(t+h.direction,c,h),f=_t(p[u(1276)](o),l,h.direction),m=o[u(2926)](f),_=p[u(2926)](f);return c.projectionCache.offsets[t]=e.aL(a,d,m,_)||d,c[u(1770)].offsets[t]}function gt(t,e,i,o,n,s,a,l,c){const h=r,u=o?t-e:t+e;let d=u>0?1:-1,p=0;o&&(d*=-1,p=Math.PI),d<0&&(p+=Math.PI);let f,m=d>0?s+n:s+n+1;l.projectionCache.cachedAnchorPoint?f=l[h(1770)].cachedAnchorPoint:(f=pt(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l)[h(2965)],l[h(1770)][h(3426)]=f);let _,y,g=f,v=f,x=0,b=0;const w=Math.abs(u),T=[];let S;for(;x+b<=w;){if(m+=d,m<s||m>=a)return null;x+=b,v=g,y=_;const t={absOffsetX:w,direction:d,distanceFromAnchor:x,previousVertex:v};if(g=dt(m,l,t),0===i)T[h(2315)](v),S=g.sub(v);else{let e;const r=g.sub(v);e=0===r[h(1844)]()?_t(dt(m+d,l,t).sub(g),i,d):_t(r,i,d),y||(y=v[h(2926)](e)),_=yt(m,e,g,s,a,y,i,l,t),T.push(y),S=_[h(1276)](y)}b=S.mag()}const P=S[h(2328)]((w-x)/b)._add(y||v),I=p+Math[h(2275)](g.y-v.y,g.x-v.x);return T[h(2315)](P),{point:P,angle:c?I:0,path:T}}function vt(t,e){const i=r;for(let r=0;r<t;r++){const t=e.length;e[i(2820)](t+4),e[i(3220)].set(Po,3*t)}}function xt(t,e,i){const r=e[0],o=e[1];return t[0]=i[0]*r+i[4]*o+i[12],t[1]=i[1]*r+i[5]*o+i[13],t[3]=i[3]*r+i[7]*o+i[15],t}function bt(t,i,r,o,n){const{horizontalAlign:s,verticalAlign:a}=e.aV(t);return new e.P(-(s-.5)*i+o[0]*n,-(a-.5)*r+o[1]*n)}function wt(t,e,i,o,n,s){const a=r;o&&0!==o[a(953)]||(o=[0,0,0,0]);const l=o[0]-Io,c=o[1]-Io,h=o[2]-Io,u=o[3]-Io;t.emplaceBack(e?1:0,i?1:0,n||0,s||0,l,c),t[a(2225)](e?1:0,i?1:0,n||0,s||0,h,c),t[a(2225)](e?1:0,i?1:0,n||0,s||0,h,u),t.emplaceBack(e?1:0,i?1:0,n||0,s||0,l,u)}function Tt(t){const e=r;if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;const i=t[e(2850)]?1:0,o=Math[e(2700)](127*t.opacity);return o*Lo+i*Oo+o*Ro+i*Fo+o*jo+i*Bo+o*Vo+i}function St(t,e){const i=r,o=/#pragma maptec: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=e[i(3179)](/in ([\w]+) ([\w]+)/g),s=t[i(3179)](/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),l=a?a.concat(s):s,c={};return{fragmentSource:t=t.replace(o,((t,e,r,o,n)=>(c[n]=!0,i(1766)===e?i(1548)+n+"\nin "+r+" "+o+" "+n+";\n#else\nuniform "+r+" "+o+i(648)+n+i(1007):"\n#ifdef HAS_UNIFORM_u_"+n+"\n "+r+" "+o+" "+n+" = u_"+n+i(1007)))),vertexSource:e=e[i(3486)](o,((t,e,r,o,n)=>{const s=i,a=s(2270)===o?s(1402):s(833),l=n[s(3179)](/color/)?"color":a;return c[n]?s(1766)===e?"\n#ifndef HAS_UNIFORM_u_"+n+s(1125)+n+"_t;\nin "+r+" "+a+s(2746)+n+";\nout "+r+" "+o+" "+n+";\n#else\nuniform "+r+" "+o+" u_"+n+s(1007):s(833)===l?"\n#ifndef HAS_UNIFORM_u_"+n+"\n "+n+" = a_"+n+";\n#else\n "+r+" "+o+" "+n+s(2566)+n+s(1007):"\n#ifndef HAS_UNIFORM_u_"+n+s(1089)+n+s(3455)+l+s(2479)+n+", u_"+n+s(2913)+r+" "+o+" "+n+s(2566)+n+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+n+s(1125)+n+s(878)+r+" "+a+s(2746)+n+";\n#else\nuniform "+r+" "+o+" u_"+n+";\n#endif\n":s(833)===l?s(1548)+n+s(1089)+r+" "+o+" "+n+" = a_"+n+";\n#else\n "+r+" "+o+" "+n+s(2566)+n+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+n+"\n "+r+" "+o+" "+n+s(3455)+l+"(a_"+n+", u_"+n+"_t);\n#else\n "+r+" "+o+" "+n+s(2566)+n+";\n#endif\n"})),staticAttributes:n,staticUniforms:l}}function Pt(t,e){if(!t.renderWorldCopies||t[r(3262)])return;const i=e.longitude-t.center.longitude;e.longitude+=i>180?-360:i<-180?360:0}function It(t){return Math.max(0,Math[r(2700)](t))}function Ct(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Mt(t){const i=r;if(t[i(763)])if(t.k<1){const r=e.bo(t[i(2129)].roll,t[i(2129)].pitch,t[i(2129)].bearing),o=e.bo(t.endEulerAngles[i(3579)],t[i(312)][i(882)],t.endEulerAngles.bearing),n=new Float64Array(4);e.bp(n,r,o,t.k);const s=e.bq(n);t.tr[i(2053)](s.roll),t.tr[i(2467)](s[i(882)]),t.tr[i(1812)](s[i(1121)])}else t.tr.setRoll(t.endEulerAngles[i(3579)]),t.tr[i(2467)](t.endEulerAngles[i(882)]),t.tr[i(1812)](t.endEulerAngles[i(1121)]);else t.tr[i(2053)](e.J[i(2534)](t.startEulerAngles[i(3579)],t.endEulerAngles[i(3579)],t.k)),t.tr[i(2467)](e.J[i(2534)](t[i(2129)][i(882)],t.endEulerAngles[i(882)],t.k)),t.tr.setBearing(e.J.number(t.startEulerAngles[i(1121)],t[i(312)][i(1121)],t.k))}function At(t,i,o,n,s){const a=r,l=s.padding,c=F(s[a(3507)],o.getNorthWest()),h=F(s.worldSize,o.getNorthEast()),u=F(s.worldSize,o[a(2099)]()),d=F(s[a(3507)],o.getSouthWest()),p=e.as(-n),f=c.rotate(p),m=h[a(1752)](p),_=u[a(1752)](p),y=d[a(1752)](p),g=new e.P(Math.max(f.x,m.x,y.x,_.x),Math.max(f.y,m.y,y.y,_.y)),v=new e.P(Math.min(f.x,m.x,y.x,_.x),Math[a(1141)](f.y,m.y,y.y,_.y)),x=g[a(1276)](v),b=(s.width-(l[a(2367)]+l.right+i.left+i.right))/x.x,w=(s.height-(l[a(3419)]+l[a(611)]+i[a(3419)]+i.bottom))/x.y;if(w<0||b<0)return void Ct();const T=Math.min(e.aw(s.scale*Math[a(1141)](b,w)),t.maxZoom),S=e.P.convert(t.offset),P=new e.P((i.left-i[a(465)])/2,(i[a(3419)]-i.bottom)/2).rotate(e.as(n)),I=S[a(2926)](P)[a(3574)](s.scale/e.at(T));return{center:j(s[a(3507)],c[a(2926)](u)[a(523)](2)[a(1276)](I)),zoom:T,bearing:n}}function kt(t){const e=r;var i;if(fn[e(2863)](t))return fn[e(1445)](t);{const r=null===(i=t.getParameter(t[e(2424)]))||void 0===i?void 0:i[e(619)](e(386));return fn[e(571)](t,r),r}}function Et(t){const e=r,i=Lt(t[e(3507)],t[e(1972)].latitude);return 2*Math.PI*i}function zt(t,i,o,n,s){const a=r,l=1/(1<<s),c=i/e.a8*l+n*l,h=e.bB((t/e.a8*l+o*l)*Math.PI*2+Math.PI,2*Math.PI),u=2*Math.atan(Math[a(3297)](Math.PI-c*Math.PI*2))-.5*Math.PI,d=Math[a(3602)](u),p=new Float64Array(3);return p[0]=Math.sin(h)*d,p[1]=Math[a(1741)](u),p[2]=Math[a(3602)](h)*d,p}function Dt(t){const e=r;return function(t,e){const i=r,o=Math.cos(e),n=new Float64Array(3);return n[0]=Math[i(1741)](t)*o,n[1]=Math.sin(e),n[2]=Math[i(3602)](t)*o,n}(t[e(3396)]*Math.PI/180,t[e(2329)]*Math.PI/180)}function Lt(t,e){return t/(2*Math.PI)/Math[r(3602)](e*Math.PI/180)}function Ot(t){const i=r,o=Math[i(2574)](t[1])/Math.PI*180,n=Math[i(1313)](t[0]*t[0]+t[2]*t[2]);if(n>1e-6){const i=t[0]/n,r=Math.acos(t[2]/n),s=(i>0?r:-r)/Math.PI*180;return new e.X(e.Y(s,-180,180),o)}return new e.X(0,o)}function Rt(t){return Math[r(3602)](t*Math.PI/180)}function Ft(t,i){const r=Rt(t),o=Rt(i);return e.aw(o/r)}function jt(t,i){const o=r,n=t.rotate(i[o(539)]),s=i.zoom+Ft(i[o(1972)][o(2329)],0),a=e.bx(1/Rt(i[o(1972)][o(2329)]),1/Rt(Math.min(Math[o(1201)](i[o(1972)].latitude),60)),e.bA(s,7,3,0,1)),l=360/Et({worldSize:i.worldSize,center:{latitude:i.center.latitude}});return new e.X(i.center[o(3396)]-n.x*l*a,e.aq(i.center.latitude+n.y*l,-e.ar,e.ar))}function Bt(t){const e=r,i=.5*t,o=Math.sin(i),n=Math[e(3602)](i);return Math.log(o+n)-Math[e(1163)](n-o)}function Vt(t,i,o,n){const s=r,a=t[s(2329)]+o*n;if(Math.abs(o)>1){const r=(Math[s(2756)](t[s(2329)]+o)!==Math.sign(t[s(2329)])?-Math.abs(t[s(2329)]):Math.abs(t.latitude))*Math.PI/180,l=Math.abs(t.latitude+o)*Math.PI/180,c=Bt(r+n*(l-r)),h=Bt(r),u=Bt(l);return new e.X(t[s(3396)]+i*((c-h)/(u-h)),a)}return new e.X(t.longitude+i*n,a)}function Nt(t,e,i){const r=t-e;return r<0?-r:Math.max(0,r-i)}function Gt(t,e,i,o,n){const s=r,a=t-i;let l;return l=a<0?Math.min(-a,1+a-n):a>1?Math[s(1141)](Math[s(2153)](a-n,0),1-a):0,Math.max(l,Nt(e,o,n))}function Ut(t,i){const o=r;let n=1/0,s=-1/0;for(const r of i){const i=e.b8(t,r);n=Math.min(n,i),s=Math[o(2153)](s,i)}return{min:n,max:s}}function qt(t){const e=r,i=[];for(let r=0;r<t.length;r++){if(null===t[r])continue;const o=t[r][e(462)](" ");i.push(o.pop())}return i}function Zt(t,i,o){const n=r,s=1/e.aQ(o,1,i.transform[n(2752)]),a=Math[n(2916)](2,o.tileID[n(903)]),l=o[n(782)]*Math[n(2916)](2,i.transform.tileZoom)/a,c=l*(o.tileID[n(842)].x+o[n(3533)][n(317)]*a),h=l*o.tileID[n(842)].y;return{u_image:0,u_texsize:o.imageAtlasTexture.size,u_scale:[s,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[c>>16,h>>16],u_pixel_coord_lower:[65535&c,65535&h]}}function Wt(t,i){const o=r,n=Math.pow(2,i[o(842)].z),s=i.canonical.y;return[new e.ac(0,s/n)[o(1224)]().latitude,new e.ac(0,(s+1)/n)[o(1224)]()[o(2329)]]}function Ht(t,i){return 1/e.aQ(t,1,i[r(2752)])}function Xt(t,i,o){const n=r;return e.aR(t.transform,i,o[n(3681)].get(n(1282)),o[n(3681)].get(n(2163)))}function Yt(t,i){return 1/e.aQ(t,1,i[r(2752)])}function Jt(t,i,o){const n=r;return e.aR(t.transform,i,o.paint.get(n(1282)),o.paint[n(1445)](n(2163)))}function Kt(t){const e=r;t*=Math.PI/180;const i=Math.sin(t),o=Math[e(3602)](t);return[(2*o+1)/3,(-Math.sqrt(3)*i-o+1)/3,(Math[e(1313)](3)*i-o+1)/3]}function $t(t,i,o,n,s){const a=r,l=t.context,c=t.transform,h=l.gl,u=t[a(1553)]("collisionBox"),d=[];let p=0,f=0;for(let e=0;e<n[a(953)];e++){const r=n[e],m=i.getTile(r)[a(1148)](o);if(!m)continue;const _=s?m.textCollisionBox:m[a(3428)],y=m.collisionCircleArray;y[a(953)]>0&&(d.push({circleArray:y,circleOffset:f,coord:r}),p+=y[a(953)]/4,f=p),_&&u[a(1320)](l,h.LINES,un.disabled,pn[a(2008)],t.colorModeForRenderPass(),hn[a(2008)],Xn(t.transform),t[a(1048)].map.terrain&&t.style[a(1920)].terrain[a(3497)](r),c.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),o.id,_[a(1274)],_[a(706)],_[a(2357)],null,t[a(1847)].zoom,null,null,_.collisionVertexBuffer)}if(!s||!d.length)return;const m=t.useProgram("collisionCircle"),_=new e.cb;_[a(2820)](4*p),_._trim();let y=0;for(const t of d)for(let e=0;e<t.circleArray[a(953)]/4;e++){const i=4*e,r=t[a(2487)][i+0],o=t[a(2487)][i+1],n=t.circleArray[i+2],s=t[a(2487)][i+3];_[a(1373)](y++,r,o,n,s,0),_[a(1373)](y++,r,o,n,s,1),_.emplace(y++,r,o,n,s,2),_[a(1373)](y++,r,o,n,s,3)}(!na||na[a(953)]<2*p)&&(na=function(t){const i=a,r=2*t,o=new e.cd;o.resize(r),o[i(562)]();for(let t=0;t<r;t++){const e=6*t;o[i(1828)][e+0]=4*t+0,o.uint16[e+1]=4*t+1,o[i(1828)][e+2]=4*t+2,o[i(1828)][e+3]=4*t+2,o.uint16[e+4]=4*t+3,o.uint16[e+5]=4*t+0}return o}(p));const g=l[a(2778)](na,!0),v=l.createVertexBuffer(_,e.cc.members,!0);for(const i of d){const r=Yn(t.transform);m[a(1320)](l,h[a(2549)],un.disabled,pn[a(2008)],t[a(1214)](),hn[a(2008)],r,t.style[a(1920)].terrain&&t[a(1048)][a(1920)][a(3245)].getTerrainData(i[a(3287)]),null,o.id,v,g,e.a_[a(568)](0,2*i.circleOffset,i[a(2487)][a(953)],i.circleArray[a(953)]/2),null,t.transform.zoom,null,null,null)}v.destroy(),g.destroy()}function Qt(t,i,r,o,n,s){const{horizontalAlign:a,verticalAlign:l}=e.aV(t);return new e.P((-(a-.5)*i/n+o[0])*s,(-(l-.5)*r/n+o[1])*s)}function te(t,i,o,n,s,a){const l=r,c=i.tileAnchorPoint[l(2926)](new e.P(i.translation[0],i[l(2895)][1]));if(i.pitchWithMap){let t=n.mult(a);o||(t=t[l(1752)](-s));const e=c[l(2926)](t);return nt(e.x,e.y,i[l(2640)],i[l(870)])[l(2965)]}if(o){const e=pt(i[l(762)].x+1,i.tileAnchorPoint.y,i)[l(2965)].sub(t),r=Math[l(3251)](e.y/e.x)+(e.x<0?Math.PI:0);return t.add(n[l(1752)](r))}return t.add(n)}function ee(t,i,o,n,s,a,l,c,h,u,d,p){const f=r,m=t[f(2800)].placedSymbolArray,_=t[f(2800)][f(961)],y=t[f(803)][f(961)],g={};_.clear();for(let r=0;r<m.length;r++){const y=m.get(r),v=y.hidden||!y[f(1518)]||t.allowVerticalPlacement&&!y[f(1152)]?null:n[y[f(1518)]];if(v){const r=new e.P(y[f(1635)],y[f(1742)]),n={getElevation:p,width:s[f(1422)],height:s.height,pitchedLabelPlaneMatrix:a,pitchWithMap:o,transform:s,tileAnchorPoint:r,translation:u,unwrappedTileID:d},m=o?mt(r.x,r.y,n):pt(r.x,r.y,n),x=st(s[f(2862)],m.signedDistanceFromCamera);let b=e.aD(t[f(3639)],c,y)*x/e.aP;o&&(b*=t.tilePixelRatio/l);const{width:w,height:T,anchor:S,textOffset:P,textBoxScale:I}=v,C=Qt(S,w,T,P,I,b),M=s.getPitchedTextCorrection(r.x+u[0],r.y+u[1],d),A=te(m.point,n,i,C,-s[f(539)],M),k=t.allowVerticalPlacement&&y.placedOrientation===e.aC.vertical?Math.PI/2:0;for(let t=0;t<y.numGlyphs;t++)e.aJ(_,A,k);h&&y[f(1312)]>=0&&(g[y.associatedIconIndex]={shiftedAnchor:A,angle:k})}else vt(y[f(1937)],_)}if(h){y[f(1499)]();const i=t.icon.placedSymbolArray;for(let t=0;t<i[f(953)];t++){const r=i[f(1445)](t);if(r.hidden)vt(r.numGlyphs,y);else{const i=g[t];if(i)for(let t=0;t<r[f(1937)];t++)e.aJ(y,i[f(1389)],i[f(2597)]);else vt(r.numGlyphs,y)}}t.icon.dynamicLayoutVertexBuffer.updateData(y)}t.text[f(1021)].updateData(_)}function ie(t,i,o,n,s,a,l,c,h,u,d,p,f){const m=r,_=t[m(1249)],y=_.gl,g=t.transform,v=m(1920)===c,x="map"===h,b=m(3657)!==c&&"point"!==o[m(413)].get("symbol-placement"),w=v&&!x&&!b,T=!o[m(413)].get("symbol-sort-key").isConstant();let S=!1;const P=t[m(2853)](0,un[m(2490)]),I=o._unevaluatedLayout.hasValue("text-variable-anchor")||o[m(923)][m(2076)](m(2604)),C=[],M=g[m(1128)]();for(const c of n){const n=i[m(1192)](c),h=n.getBucket(o);if(!h)continue;const d=s?h.text:h.icon;if(!d||!d[m(2357)][m(1445)]().length||!d[m(997)])continue;const p=d.programConfigurations.get(o.id),_=s||h[m(2051)],P=s?h[m(3639)]:h.iconSizeData,A=x||0!==g[m(882)],k=t.useProgram(h.iconsInText&&s?"symbolTextAndIcon":_?"symbolSDF":r(848),p),E=e.aB(P,g.zoom),z=t.style[m(1920)].terrain&&t.style.map.terrain[m(3497)](c);let D,L,O,R,F=[0,0],j=null;if(s)L=n[m(357)],O=y[m(1661)],D=n.glyphAtlasTexture[m(863)],h[m(2950)]&&(F=n[m(2987)].size,j=n[m(2987)],R=A||t[m(1666)][m(2109)]||t[m(1666)][m(1647)]||"composite"===P.kind||"camera"===P.kind?y[m(1661)]:y[m(3128)]);else{const e=1!==o.layout.get(m(3075)).constantOr(0)||h[m(747)];L=n.imageAtlasTexture,O=_||t.options[m(2109)]||t.options[m(1647)]||e||A?y.LINEAR:y.NEAREST,D=n[m(2987)][m(863)]}const B=e.aQ(n,1,t[m(1847)][m(3512)]),V=it(v,t.transform,B),N=e.Q();e.aE(N,V);const G=rt(x,v,t.transform,B),U=e.aR(g,n,a,l),q=g.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!f,applyTerrainMatrix:!0}),Z=I&&h.hasTextData(),W=m(3322)!==o.layout.get(m(3259))&&Z&&h.hasIconData();if(b){const e=t.style[m(1920)][m(3245)]?(e,i)=>t[m(1048)].map[m(3245)].getElevation(c,e,i):null,i="map"===o.layout[m(1445)](m(3258));at(h,t,s,V,N,x,u,i,c.toUnwrapped(),g[m(1422)],g[m(3282)],U,e)}const H=s&&I||W,X=b||H?sa:x?V:t[m(1847)].clipSpaceToPixelsMatrix,Y=_&&0!==o[m(3681)].get(s?"text-halo-width":"icon-halo-width").constantOr(1);let J;J=_?h[m(2950)]?fs(P[m(3123)],E,w,x,b,H,t,X,G,U,D,F,M):ps(P[m(3123)],E,w,x,b,H,t,X,G,U,s,D,!0,M):ds(P.kind,E,w,x,b,H,t,X,G,U,s,D,M);const K={program:k,buffers:d,uniformValues:J,projectionData:q,atlasTexture:L,atlasTextureIcon:j,atlasInterpolation:O,atlasInterpolationIcon:R,isSDF:_,hasHalo:Y};if(T&&h.canOverlap){S=!0;const t=d.segments.get();for(const i of t)C[m(2315)]({segments:new e.a_([i]),sortKey:i[m(2358)],state:K,terrainData:z})}else C[m(2315)]({segments:d.segments,sortKey:0,state:K,terrainData:z})}S&&C[m(1696)](((t,e)=>t.sortKey-e[m(2358)]));for(const e of C){const i=e.state;if(_[m(3436)].set(y[m(2989)]),i.atlasTexture.bind(i[m(3604)],y.CLAMP_TO_EDGE),i.atlasTextureIcon&&(_.activeTexture[m(571)](y[m(2653)]),i[m(3166)]&&i.atlasTextureIcon[m(2211)](i.atlasInterpolationIcon,y[m(2557)])),i[m(1952)]){const r=i[m(2836)];i.hasHalo&&(r[m(2029)]=1,re(i[m(3518)],e.segments,o,t,i.program,P,d,p,r,i.projectionData,e[m(1550)])),r.u_is_halo=0}re(i[m(3518)],e.segments,o,t,i.program,P,d,p,i.uniformValues,i[m(1731)],e.terrainData)}}function re(t,e,i,o,n,s,a,l,c,h,u){const d=r,p=o.context;n.draw(p,p.gl.TRIANGLES,s,a,l,hn.backCCW,c,u,h,i.id,t[d(1274)],t[d(706)],e,i.paint,o.transform.zoom,t[d(3080)][d(1445)](i.id),t.dynamicLayoutVertexBuffer,t[d(894)])}function oe(t,i,o,n,s){const a=r,l=t.context,c=l.gl,h=pn.disabled,u=new ln([c[a(2683)],c.ONE],e.bs.transparent,[!0,!0,!0,!0]),d=i.getBucket(o);if(!d)return;const p=n[a(2133)];let f=o.heatmapFbos.get(p);f||(f=se(l,i[a(782)],i[a(782)]),o[a(2369)].set(p,f)),l[a(2582)][a(571)](f.framebuffer),l.viewport[a(571)]([0,0,i.tileSize,i.tileSize]),l[a(1499)]({color:e.bs.transparent});const m=d[a(3080)][a(1445)](o.id),_=t.useProgram(a(781),m,!s),y=t[a(1847)][a(3543)]({overscaledTileID:i[a(3533)],applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=t[a(1048)].map[a(3245)].getTerrainData(n);_[a(1320)](l,c[a(2549)],un.disabled,h,u,hn.disabled,Kn(i,t.transform[a(3512)],o[a(3681)][a(1445)]("heatmap-intensity"),1),g,y,o.id,d.layoutVertexBuffer,d.indexBuffer,d[a(2357)],o[a(3681)],t[a(1847)][a(3512)],m)}function ne(t,e,i,o,n){const s=r,a=t.context,l=a.gl,c=t.transform;a[s(3085)](t.colorModeForRenderPass());const h=ae(a,e),u=i.key,d=e.heatmapFbos[s(1445)](u);if(!d)return;a.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,d.colorAttachment.get()),a[s(3436)].set(l[s(2653)]),h[s(2211)](l[s(1661)],l.CLAMP_TO_EDGE);const p=c.getProjectionData({overscaledTileID:i,applyTerrainMatrix:n,applyGlobeMatrix:!o});t.useProgram("heatmapTexture").draw(a,l.TRIANGLES,un[s(2008)],pn[s(2008)],t.colorModeForRenderPass(),hn.disabled,$n(t,e,0,1),null,p,e.id,t.rasterBoundsBuffer,t[s(3501)],t.rasterBoundsSegments,e[s(3681)],c[s(3512)]),d.destroy(),e[s(2369)].delete(u)}function se(t,e,i){const o=r;var n,s;const a=t.gl,l=a[o(938)]();a.bindTexture(a.TEXTURE_2D,l),a.texParameteri(a.TEXTURE_2D,a[o(945)],a[o(2557)]),a[o(1968)](a[o(2541)],a[o(3348)],a.CLAMP_TO_EDGE),a[o(1968)](a.TEXTURE_2D,a[o(2248)],a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a[o(1661)]);const c=null!==(n=t.HALF_FLOAT)&&void 0!==n?n:a.UNSIGNED_BYTE,h=null!==(s=t[o(1231)])&&void 0!==s?s:a[o(3468)];a.texImage2D(a.TEXTURE_2D,0,h,e,i,0,a.RGBA,c,null);const u=t[o(947)](e,i,!1,!1);return u.colorAttachment.set(l),u}function ae(t,i){const o=r;return i.colorRampTexture||(i.colorRampTexture=new e.T(t,i[o(394)],t.gl[o(3468)])),i.colorRampTexture}function le(t,i,o,n,s,a,l,c){const h=r;let u=256;if(s[h(3078)]){const r=i.getSource().maxzoom,n=l[h(842)].z===r?Math[h(3537)](1<<t.transform[h(1239)]-l[h(842)].z):1;u=e.aq(e.cf(a.maxLineLength/e.a8*1024*n),256,o[h(2246)])}return c.gradient=e.cg({expression:s[h(3637)](),evaluationKey:"lineProgress",resolution:u,image:c[h(2648)]||void 0,clips:a[h(2381)]}),c.texture?c[h(600)][h(1923)](c[h(2648)]):c.texture=new e.T(o,c.gradient,n.RGBA),c.version=s.gradientVersion,c[h(600)]}function ce(t,e,i,o,n){const s=r;t[s(3436)].set(e.TEXTURE0),i[s(2987)].bind(e.LINEAR,e[s(2557)]),o.updatePaintBuffers(n)}function he(t,e,i,o,n,s){const a=r;(n||t.lineAtlas.dirty)&&(e.activeTexture[a(571)](i.TEXTURE0),t[a(1529)][a(2211)](e)),o[a(1485)](s)}function ue(t,e,i,o,n,s,a){const l=r,c=s.gradients[n.id];let h=c.texture;n.gradientVersion!==c[l(1537)]&&(h=le(t,e,i,o,n,s,a,c)),i[l(3436)][l(571)](o.TEXTURE0),h.bind(n.stepInterpolant?o.NEAREST:o[l(1661)],o.CLAMP_TO_EDGE)}function de(t,e,i,o,n,s,a,l,c){const h=r,u=s.gradients[n.id];let d=u[h(600)];n.gradientVersion!==u.version&&(d=le(t,e,i,o,n,s,a,u)),i[h(3436)].set(o.TEXTURE0),d.bind(n.stepInterpolant?o[h(3128)]:o.LINEAR,o[h(2557)]),i.activeTexture.set(o[h(2653)]),t.lineAtlas.bind(i),l.updatePaintBuffers(c)}function pe(t,i,o,n,s,a,l,c){const h=r;let u=256;if(s[h(3078)]){const r=i[h(1321)]().maxzoom,n=l.canonical.z===r?Math[h(3537)](1<<t.transform[h(1239)]-l.canonical.z):1;u=e.aq(e.cf(a.maxLineLength/e.a8*1024*n),256,o.maxTextureSize)}return c.gradient=e.cg({expression:s.gradientExpression(),evaluationKey:"lineProgress",resolution:u,image:c.gradient||void 0,clips:a.lineClipsArray}),c.texture?c[h(600)].update(c[h(2648)]):c[h(600)]=new e.T(o,c[h(2648)],n[h(3468)]),c[h(1537)]=s[h(2267)],c.texture}function fe(t,e,i,o,n){const s=r;t.activeTexture[s(571)](e.TEXTURE0),i[s(2987)][s(2211)](e.LINEAR,e[s(2557)]),o.updatePaintBuffers(n)}function me(t,e,i,o,n,s){const a=r;(n||t.lineAtlas[a(1639)])&&(e.activeTexture.set(i[a(2989)]),t[a(1529)][a(2211)](e)),o.updatePaintBuffers(s)}function _e(t,e,i,o,n,s,a){const l=r,c=s[l(2679)][n.id];let h=c.texture;n[l(2267)]!==c[l(1537)]&&(h=pe(t,e,i,o,n,s,a,c)),i[l(3436)][l(571)](o.TEXTURE0),h[l(2211)](n[l(3078)]?o[l(3128)]:o.LINEAR,o[l(2557)])}function ye(t,e,i,o,n,s,a,l,c){const h=r,u=s[h(2679)][n.id];let d=u.texture;n.gradientVersion!==u[h(1537)]&&(d=pe(t,e,i,o,n,s,a,u)),i[h(3436)][h(571)](o[h(2989)]),d[h(2211)](n.stepInterpolant?o.NEAREST:o[h(1661)],o[h(2557)]),i.activeTexture.set(o[h(2653)]),t[h(1529)][h(2211)](i),l[h(1485)](c)}function ge(t,e,i,o,n){const s=r;if(!i||!o||!o.imageAtlas)return;const a=o.imageAtlas[s(1970)];let l=a[i.to[s(2289)]()],c=a[i[s(699)][s(2289)]()];if(!l&&c&&(l=c),!c&&l&&(c=l),!l||!c){const t=n[s(654)](e);l=a[t],c=a[t]}l&&c&&t[s(1375)](l,c)}function ve(t,e,i,o,n){const s=r;if(!i||!(null==o?void 0:o.imageAtlas))return;const a=o.imageAtlas[s(1970)];let l=a[i.to.toString()],c=a[i.from[s(2289)]()];if(!l&&c&&(l=c),!c&&l&&(c=l),!l||!c){const t=n[s(654)](e);l=a[t],c=a[t]}l&&c&&t[s(3651)](e,l,c)}function xe(t,e,i,o){const n=r;if(!i)return;let s=o[n(1725)](i.to[n(2289)]()),a=o[n(1725)](i.from[n(2289)]());!s&&a&&(s=a),!a&&s&&(a=s),s&&a&&t[n(3651)](e,s,a)}function be(t,i,o,n,s,a,l,c){const h=r,u=t.context.gl,d="fill-pattern",p=o[h(3681)].get(d),f=p&&p[h(1498)](1),m=o[h(3079)]();let _,y,g,v,x;const b=t[h(1847)],w=o.paint.get("fill-translate"),T=o.paint[h(1445)]("fill-translate-anchor");l?(y=f&&!o[h(654)]("fill-outline-color")?h(2598):"fillOutline",_=u.LINES):(y=f?h(2027):"fill",_=u[h(2549)]);const S=p[h(1498)](null);for(const r of n){const n=i[h(1192)](r);if(f&&!n.patternsLoaded())continue;const p=n[h(1148)](o);if(!p)continue;const P=p.programConfigurations.get(o.id),I=t[h(1553)](y,P),C=t.style[h(1920)][h(3245)]&&t[h(1048)].map.terrain.getTerrainData(r);f&&(t.context[h(3436)].set(u[h(2989)]),n[h(2987)][h(2211)](u[h(1661)],u[h(2557)]),P.updatePaintBuffers(m)),ge(P,d,S,n,o);const M=b[h(3543)]({overscaledTileID:r,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),A=e.aR(b,n,w,T);if(l){v=p.indexBuffer2,x=p.segments2;const e=[u[h(2127)],u[h(2107)]];g=h(2598)===y&&f?Nn(t,m,n,e,A):Vn(e,A)}else v=p.indexBuffer,x=p[h(2357)],g=f?Bn(t,m,n,A):{u_fill_translate:A};const k=t[h(3154)](r);I[h(1320)](t[h(1249)],_,s,k,a,hn[h(1528)],g,C,M,o.id,p.layoutVertexBuffer,v,x,o[h(3681)],t[h(1847)].zoom,P)}}function we(t,i,o,n,s,a,l,c){const h=r,u=t[h(1249)].gl,d=h(3541),p=o[h(3681)].get(d),f=p&&p.constantOr(1),m=o[h(3079)]();let _,y,g,v,x;const b=t.transform,w=o[h(3681)][h(1445)](h(2231)),T=o.paint[h(1445)](h(3209));l?(y=f&&!o.getPaintProperty("fill-outline-color")?h(3550):h(2611),_=u.LINES):(y=f?"polygonOverlayPattern":"polygonOverlay",_=u[h(2549)]);const S=p[h(1498)](null);for(const r of n){const n=i.getTile(r);if(f&&!n[h(992)]())continue;const p=n[h(1148)](o);if(!p)continue;const P=p.programConfigurations.get(o.id),I=t[h(1553)](y,P),C=t.style[h(1920)].terrain&&t.style[h(1920)].terrain[h(3497)](r);f&&(t.context[h(3436)].set(u.TEXTURE0),n[h(2987)].bind(u.LINEAR,u.CLAMP_TO_EDGE),P.updatePaintBuffers(m)),ge(P,d,S,n,o);const M=b[h(3543)]({overscaledTileID:r,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),A=e.aR(b,n,w,T);if(l){v=p.indexBuffer2,x=p.segments2;const e=[u[h(2127)],u[h(2107)]];g="polygonOverlayOutlinePattern"===y&&f?qn(t,m,n,e,A):Un(e,A)}else v=p[h(706)],x=p[h(2357)],g=f?Gn(t,m,n,A):{u_fill_translate:A};const k=t[h(3154)](r);I.draw(t[h(1249)],_,s,k,a,hn[h(1528)],g,C,M,o.id,p.layoutVertexBuffer,v,x,o.paint,t[h(1847)].zoom,P)}}function Te(t,i,o,n,s,a,l,c){const h=r,u=t[h(1249)],d=u.gl,p="fill-extrusion-pattern",f=o[h(3681)][h(1445)](p),m=f.constantOr(1),_=o.getCrossfadeParameters(),y=o.paint.get("fill-extrusion-opacity"),g=f.constantOr(null),v=t[h(1847)];for(const r of n){const n=i.getTile(r),f=n.getBucket(o);if(!f)continue;const x=t[h(1048)].map[h(3245)]&&t[h(1048)][h(1920)][h(3245)][h(3497)](r),b=f.programConfigurations[h(1445)](o.id),w=t[h(1553)](m?"fillExtrusionPattern":"fillExtrusion",b);m&&(t[h(1249)].activeTexture.set(d.TEXTURE0),n[h(2987)][h(2211)](d.LINEAR,d[h(2557)]),b[h(1485)](_));const T=v.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!c,applyTerrainMatrix:!0});ge(b,p,g,n,o);const S=e.aR(v,n,o[h(3681)].get("fill-extrusion-translate"),o[h(3681)][h(1445)](h(1506))),P=o[h(3681)].get(h(2059)),I=m?Rn(t,P,y,S,r,_,n):On(t,P,y,S);w.draw(u,u.gl[h(2549)],s,a,l,hn[h(1528)],I,x,T,o.id,f[h(1274)],f.indexBuffer,f[h(2357)],o.paint,t.transform[h(3512)],b,t[h(1048)].map.terrain&&f.centroidVertexBuffer)}}function Se(t){const e=r;return!t[e(1130)]()||null!=t[e(1498)](null)}function Pe(t,e,i,o,n,s,a,l){const c=r,h=new un(t[c(1249)].gl[c(3667)],un.ReadWrite,t.depthRangeFor3D);n<1||!s&&1!==n?(Ie(t,e,i,o,h,pn.disabled,ln[c(2008)],l,a),Ie(t,e,i,o,h,t[c(3140)](),t[c(1214)](),l,a)):Ie(t,e,i,o,h,pn.disabled,t.colorModeForRenderPass(),l,a)}function Ie(t,e,i,o,n,s,a,l,c){const h=r,u=t[h(1249)],d=u.gl,p=t.transform,f=i.paint.get("top-fill-opacity"),m=i.paint[h(1445)](h(2213)),_=i[h(3681)].get("extrusion-vertical-gradient"),y=i.paint[h(1445)]("top-fill-pattern"),g=i.paint[h(1445)](h(1566)),v=Se(y),x=Se(g),b=function(t,e,i,r){const o=h;return!(!i&&!r||i&&!t.isConstant()||r&&!e[o(1130)]())}(y,g,v,x),w=i.getCrossfadeParameters();(v||x)&&b&&(u[h(3436)][h(571)](d[h(2989)]),t[h(1829)][h(2211)](u));for(const r of o){const o=e[h(1192)](r),T=o[h(1148)](i);if(!T)continue;const S=v,P=x,I=y.constantOr(null),C=g[h(1498)](null),M=t[h(1048)].map[h(3245)]&&t.style.map[h(3245)].getTerrainData(r),A=T.programConfigurations.get(i.id),k=t[h(1553)](h(3488),A);(S||P)&&!b&&o[h(2987)]&&(u.activeTexture.set(d.TEXTURE0),o[h(2987)][h(2211)](d[h(1661)],d.CLAMP_TO_EDGE),A[h(1485)](w));const E=p[h(3543)]({overscaledTileID:r,applyGlobeMatrix:!l,applyTerrainMatrix:!0});b?(I&&xe(A,"top-fill-pattern",I,t.imageManager),C&&xe(A,"side-fill-pattern",C,t[h(1829)])):(ve(A,h(1493),I,o,i),ve(A,h(1566),C,o,i));const z=jn(t,{shouldUseVerticalGradient:_,topOpacity:f,sideOpacity:m,hasTopPattern:S,hasSidePattern:P,useGlobalPatternAtlas:b,drawTopSurface:c[h(1166)],drawSideSurface:c[h(489)]},r,w,o);k.draw(u,u.gl.TRIANGLES,n,s,a,hn[h(1528)],z,M,E,i.id,T[h(1274)],T.indexBuffer,T[h(2357)],i.paint,t.transform.zoom,A,t.style[h(1920)][h(3245)]&&T.centroidVertexBuffer)}}function Ce(t,e,i,o,n,s,a,l,c){const h=r;var u;const d=t.style[h(3645)],p=t.context,f=t[h(1847)],m=p.gl,_=["#define NUM_ILLUMINATION_SOURCES "+i[h(3681)][h(1445)]("hillshade-highlight-color")[h(2007)][h(953)]],y=t.useProgram("hillshade",null,!1,_),g=!t.options.moving;for(const r of o){const o=e[h(1192)](r),_=o.fbo;if(!_)continue;const v=d.getMeshFromTileID(p,r[h(842)],l,!0,"raster"),x=null===(u=t[h(1048)].map[h(3245)])||void 0===u?void 0:u[h(3497)](r);p[h(3436)].set(m.TEXTURE0),m.bindTexture(m[h(2541)],_[h(2535)][h(1445)]());const b=f.getProjectionData({overscaledTileID:r,aligned:g,applyGlobeMatrix:!c,applyTerrainMatrix:!0});y.draw(p,m[h(2549)],s,n[r[h(903)]],a,hn.backCCW,Qn(t,o,i),x,b,i.id,v.vertexBuffer,v.indexBuffer,v[h(2357)])}}function Me(t,i,o,n,s,a,l,c,h){const u=r;var d;const p=t.style.projection,f=t[u(1249)],m=t.transform,_=f.gl,y=t.useProgram("colorRelief"),g=!t[u(1666)][u(2646)];let v=!0,x=0;for(const r of n){const n=i.getTile(r),b=n[u(941)];if(v){const t=_[u(3392)](_.MAX_TEXTURE_SIZE),{elevationTexture:e,colorTexture:i}=o.getColorRampTextures(f,t,b.getUnpackVector());f[u(3436)].set(_.TEXTURE1),e.bind(_[u(3128)],_[u(2557)]),f.activeTexture[u(571)](_.TEXTURE4),i[u(2211)](_.LINEAR,_[u(2557)]),v=!1,x=e.size[0]}if(!b||!b.data)continue;const w=b[u(3253)],T=b.getPixels();if(f.activeTexture[u(571)](_.TEXTURE0),f.pixelStoreUnpackPremultiplyAlpha.set(!1),n[u(2128)]=n.demTexture||t.getTileTexture(w),n.demTexture){const t=n.demTexture;t.update(T,{premultiply:!1}),t.bind(_.LINEAR,_.CLAMP_TO_EDGE)}else n.demTexture=new e.T(f,T,_.RGBA,{premultiply:!1}),n.demTexture[u(2211)](_[u(1661)],_[u(2557)]);const S=p[u(1397)](f,r.canonical,c,!0,u(1198)),P=null===(d=t.style.map.terrain)||void 0===d?void 0:d[u(3497)](r),I=m.getProjectionData({overscaledTileID:r,aligned:g,applyGlobeMatrix:!h,applyTerrainMatrix:!0});y[u(1320)](f,_[u(2549)],a,s[r.overscaledZ],l,hn.backCCW,es(o,n[u(941)],x),P,I,o.id,S.vertexBuffer,S[u(706)],S.segments)}}function Ae(t,e,i,o,n,s,a,l,c=!1,h=!1){const u=r,d=o[o.length-1].overscaledZ,p=t.context,f=p.gl,m=t.useProgram(u(1198)),_=t.transform,y=t.style[u(3645)],g=t[u(1214)](),v=!t.options.moving,x=i.paint.get(u(2659)),b=i[u(3681)][u(1445)](u(2444)),w=i.paint[u(1445)](u(2749)),T=!!t[u(1048)][u(1920)][u(3245)];for(const r of o){const o=t.getDepthModeForSublayer(r.overscaledZ-d,1===x?un.ReadWrite:un.ReadOnly,f.LESS),S=e[u(1192)](r),P="nearest"===b?f[u(3128)]:f.LINEAR;p[u(3436)][u(571)](f[u(2989)]),S[u(600)].bind(P,f[u(2557)],f[u(3029)]),p[u(3436)][u(571)](f.TEXTURE1);const{parentTile:I,parentScaleBy:C,parentTopLeft:M,fadeValues:A}=ke(S,e,w,T);S.fadeOpacity=A.tileOpacity,I?(I[u(711)]=A[u(865)],I[u(600)].bind(P,f[u(2557)],f[u(3029)])):S[u(600)][u(2211)](P,f[u(2557)],f.LINEAR_MIPMAP_NEAREST),S.texture.useMipmap&&p[u(3530)]&&t[u(1847)][u(882)]>20&&f[u(1177)](f[u(2541)],p[u(3530)].TEXTURE_MAX_ANISOTROPY_EXT,p[u(1503)]);const k=t[u(1048)][u(1920)][u(3245)]&&t.style.map[u(3245)][u(3497)](r),E=_[u(3543)]({overscaledTileID:r,aligned:v,applyGlobeMatrix:!h,applyTerrainMatrix:!0}),z=us(M,C,A[u(2206)],i,l),D=y[u(1397)](p,r[u(842)],s,a,u(1198));m[u(1320)](p,f[u(2549)],o,n?n[r.overscaledZ]:pn[u(2008)],g,c?hn.frontCCW:hn.backCCW,z,k,E,i.id,D.vertexBuffer,D[u(706)],D.segments)}}function ke(t,i,o,n){const s=r,a={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(0===o||n)return a;if(t[s(3409)]){const r=i[s(2717)](t[s(3409)]);if(!r)return a;const n=Math.pow(2,r[s(3533)].overscaledZ-t.tileID[s(903)]);return{parentTile:r,parentScaleBy:n,parentTopLeft:[t[s(3533)].canonical.x*n%1,t[s(3533)].canonical.y*n%1],fadeValues:function(t,i,r){const o=s,n=c(),a=(n-i.timeAdded)/r,l=t.fadingDirection===zi[o(822)],h=e.aq((n-t.timeAdded)/r,0,1),u=e.aq(1-a,0,1),d=l?h:u;return{tileOpacity:d,parentTileOpacity:l?u:h,fadeMix:{opacity:1,mix:1-d}}}(t,r,o)}}return t.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:function(t,i){const r=(c()-t.timeAdded)/i,o=e.aq(r,0,1);return{tileOpacity:o,fadeMix:{opacity:o,mix:0}}}(t,o)}:a}function Ee(t,e,i,o){const n=r;De(t,0,e+i/2,t[n(1847)][n(1422)],i,o)}function ze(t,e,i,o){De(t,e-i/2,0,i,t[r(1847)].height,o)}function De(t,e,i,o,n,s){const a=r,l=t.context,c=l.gl;c.enable(c[a(605)]),c.scissor(e*t.pixelRatio,i*t.pixelRatio,o*t[a(3105)],n*t[a(3105)]),l.clear({color:s}),c.disable(c.SCISSOR_TEST)}function Le(t,i,o){const n=r,s=t[n(1249)],a=s.gl,l=t[n(1553)](n(3250)),c=un[n(2008)],h=pn[n(2008)],u=t[n(1214)](),d=n(2015),p=t.style.map[n(3245)]&&t.style[n(1920)][n(3245)][n(3497)](o);s[n(3436)].set(a.TEXTURE0);const f=i[n(1946)](o.key)[n(2283)],m=Math.floor((f&&f.byteLength||0)/1024),_=i[n(1192)](o).tileSize,y=512/Math.min(_,512)*(o[n(903)]/t.transform[n(3512)])*.5;let g=o.canonical.toString();o[n(903)]!==o.canonical.z&&(g+=n(1634)+o.overscaledZ),function(t,e){const i=n;t[i(594)]();const r=t[i(2392)],o=t[i(1249)].gl,s=t[i(2392)].getContext("2d");s[i(2739)](0,0,r[i(1422)],r.height),s.shadowColor=i(2176),s.shadowBlur=2,s[i(336)]=1.5,s[i(2171)]=i(2176),s[i(485)]=i(3419),s[i(3165)]=i(1179),s[i(3389)](e,5,5),s.strokeText(e,5,5),t.debugOverlayTexture[i(1923)](r),t[i(2182)].bind(o.LINEAR,o.CLAMP_TO_EDGE)}(t,g+" "+m+"kB");const v=t.transform.getProjectionData({overscaledTileID:o,applyGlobeMatrix:!0,applyTerrainMatrix:!0});l[n(1320)](s,a.TRIANGLES,c,h,ln[n(3269)],hn[n(2008)],Jn(e.bs.transparent,y),null,v,d,t[n(1947)],t.quadTriangleIndexBuffer,t.debugSegments),l.draw(s,a.LINE_STRIP,c,h,u,hn[n(2008)],Jn(e.bs.red),p,v,d,t.debugBuffer,t[n(2317)],t.debugSegments)}function Oe(t,e,i,o){const n=r,{isRenderingGlobe:s}=o,a=t[n(1249)],l=a.gl,c=t.transform,h=t[n(1214)](),u=t[n(2662)](),d=t.useProgram(n(3245));a[n(2582)].set(null),a[n(3657)][n(571)]([0,0,t[n(1422)],t[n(3282)]]);for(const r of i){const i=e[n(1395)](r[n(3533)]),o=t.renderToTexture.getTexture(r),p=e[n(3497)](r.tileID);a[n(3436)][n(571)](l[n(2989)]),l.bindTexture(l[n(2541)],o[n(600)]);const f=e[n(2603)](c.zoom),m=c[n(1153)](r[n(3533)][n(2656)]()),_=zn(f,m,t.style.sky,c[n(882)],s),y=c[n(3543)]({overscaledTileID:r[n(3533)],applyTerrainMatrix:!1,applyGlobeMatrix:!0});d[n(1320)](a,l[n(2549)],u,pn.disabled,h,hn[n(1528)],_,p,y,"terrain",i.vertexBuffer,i[n(706)],i.segments)}}function Re(t,i){const o=r;if(!i.mesh){const r=new e.aZ;r[o(2225)](-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);const n=new e.a$;n.emplaceBack(0,1,2),n.emplaceBack(0,2,3),i.mesh=new Jo(t[o(476)](r,Li[o(3347)]),t.createIndexBuffer(n),e.a_.simpleSegment(0,0,r.length,n[o(953)]))}return i.mesh}function Fe(t,e){let i,r=!1,o=null,n=null;const s=()=>{o=null,r&&(t.apply(n,i),o=setTimeout(s,e),r=!1)};return(...t)=>(r=!0,n=this,i=t,o||s(),o)}function je(t,e){const i=r;(!t[i(1415)]||t.duration<e.duration)&&(t.duration=e[i(1415)],t[i(1904)]=e[i(1904)])}function Be(t,i,o){const n=r,{maxSpeed:s,linearity:a,deceleration:l}=o,c=e.aq(t*a/(i/1e3),-s,s),h=Math.abs(c)/(l*a);return{easing:o[n(1904)],duration:1e3*h,amount:c*(h/2)}}function Ve(t,e){const i=r;if(t[i(953)]!==e.length)throw new Error(i(1270)+t.length+i(1025)+e.length);const o={};for(let r=0;r<t.length;r++)o[t[r][i(388)]]=e[r];return o}function Ne(t,e,i){const o=r;for(let r=0;r<t[o(953)];r++)if(t[r].identifier===i)return e[r]}function Ge(t,e){return Math[r(1163)](t/e)/Math.LN2}function Ue(t,e){return 180*t.angleWith(e)/Math.PI}function qe(t){const e=r;return Math.abs(t.y)>Math[e(1201)](t.x)}function Ze(t){return t*(2-t)}function We(t){const e=r;return t.panDelta&&t.panDelta[e(1844)]()||t.zoomDelta||t[e(320)]||t.pitchDelta||t.rollDelta}function He(t){return function(t,e,i){const o=r;return function(t){const e=r,i=t.toLowerCase();return!!(i[e(619)]("http://")||i[e(619)](e(2509))||i.startsWith(e(1504))||i[e(619)](e(3367))||i.startsWith(e(2856))||i[e(619)]("blob:")||i.startsWith(e(858))||t[e(619)]("/")||t.startsWith("./")||t.startsWith("../"))}(t)?t:_l[o(3046)](t)?e+"/maps/inner/"+i+"/styles?style_id="+encodeURIComponent(t):t}(t,e.c.SERVER_URL,e.c[r(3464)])}function Xe(t,e){const i=r;if(t)switch(t[i(2784)]){case"Point":case i(1094):e[i(3081)]=!0;break;case i(3670):case"MultiLineString":e.hasLine=!0;break;case i(2064):case i(2990):e[i(2103)]=!0;break;case"GeometryCollection":for(const r of t[i(2124)])Xe(r,e)}}function Ye(t){const e=r,i={hasPoint:!1,hasLine:!1,hasPolygon:!1};for(const r of t[e(2794)])Xe(r[e(452)],i);return i}function Je(){return Cl}function Ke(t){const e=r;return[e(3401),Ml,["==",["coalesce",[e(1445),e(2845)],[e(3474),"solid"]],[e(3474),t]]]}function $e(t){const e=r;return[e(3401),Al,["==",[e(3099),[e(1445),"lineDash"],["literal",e(3643)]],["literal",t]]]}function Qe(t,e){return["coalesce",["get",t],[r(3474),e]]}function ti(t){const e=r;if(void 0===t)return;if(!Array[e(2667)](t)||t.length<2)throw new Error("strokeGradient must be an array with at least 2 stops");let i=-1;const o=[];for(const r of t){if(null===r||e(2112)!=typeof r||"number"!=typeof r[e(2651)]||Number[e(2721)](r.progress)||r[e(2651)]<0||r[e(2651)]>1)throw new Error(e(1242));if("string"!=typeof r.color||0===r.color.trim()[e(953)])throw new Error(e(2249));if(r[e(2651)]<i)throw new Error("strokeGradient stops must be sorted by progress ascending");i=r[e(2651)],o.push({progress:r.progress,color:r[e(1203)]})}return o}function ei(t){return Object[r(2132)]({},t)}function ii(t,e,i){return i?["literal",e]:["coalesce",[r(1445),t],["literal",e]]}function ri(t,e,i){return i?["literal",e]:["case",["has",t],[r(1230),["get",t]],["literal",e]]}function oi(t){const e=r,i=t[e(2768)]();return!!i&&(/^https?:\/\//i.test(i)||i.startsWith("//")||i.startsWith("/")||i[e(619)]("./")||i[e(619)](e(1033))||i.startsWith("data:")||i[e(619)](e(2364))||i[e(619)]("file://")||/\.(png|webp|jpe?g|gif|svg)(\?|#|$)/i.test(i))}function ni(t){const e=r,i=t instanceof HTMLImageElement?t[e(3047)]:t[e(1422)],o=t instanceof HTMLImageElement?t.naturalHeight:t[e(3282)];if(0===i||0===o)throw new Error("Image has zero width or height")}function si(t,e,i){const o=r;t.hasImage(e)||(t[o(1112)](e,i),t.triggerRepaint())}function ai(t){const e=r;if(void 0===t)return;if(!Number[e(3588)](t)||t<=0)return Fl;const i=Math[e(2153)](t,.01);return Fl/i}function li(t){const e=r;if(void 0===t)return;if(!Array.isArray(t)||t[e(953)]<2)throw new Error(e(1916));let i=-1;const o=[];for(const r of t){if("number"!=typeof r.progress||Number.isNaN(r.progress)||r.progress<0||r.progress>1)throw new Error(e(1242));if("string"!=typeof r.color||0===r.color[e(2768)]()[e(953)])throw new Error("strokeGradient.color must be a non-empty string");if(r[e(2651)]<i)throw new Error(e(881));i=r[e(2651)],o.push({progress:r.progress,color:r[e(1203)]})}return o}function ci(t){const e=r,i=[e(1874),[e(534)],["line-progress"]];for(const r of t)i.push(r[e(2651)],r.color);return i}function hi(t,e){if(function(t){const e=r;return t[e(953)]>0&&Array[e(2667)](t[0])&&Array[e(2667)](t[0][0])}(e))for(const i of e)hi(t,i);else for(const i of e)t.extend(i)}function ui(t){const e=r;var i;if(0===t[e(953)])return 1;let o=Number.NEGATIVE_INFINITY;for(const r of t){const t=null!==(i=r[e(3402)])&&void 0!==i?i:1;t>o&&(o=t)}return o>0?o:1}function di(t){const e=r,i=null!=t?t:Xl,o=Object.keys(i)[e(1920)]((t=>Number(t)))[e(1696)](((t,e)=>t-e));if(o.length<2)throw new Error(e(362));let n=-1;const s={};for(const t of o){if(Number[e(2721)](t)||t<0||t>1)throw new Error(e(482));if(t<n)throw new Error(e(3382));const r=i[t];if("string"!=typeof r||0===r[e(2768)]()[e(953)])throw new Error("gradient colors must be non-empty strings");n=t,s[t]=r}return s}function pi(t){const e=r,i=di(t),o=Object.keys(i).map((t=>Number(t)))[e(1696)](((t,e)=>t-e)),n=[e(1874),[e(534)],["heatmap-density"]];for(const t of o)n.push(t,i[t]);return n}function fi(t,i,o){const n=r;var s;const a=[];for(const u of t){const t=e.X.convert(u.position).toArray(),d=(l=u[n(3402)],(h=o)===(c=i)?0:Math[r(1141)](1,Math.max(0,((null!=l?l:1)-c)/(h-c))));a[n(2315)]({type:n(401),properties:Object.assign({weight:d},null!==(s=u[n(1594)])&&void 0!==s?s:{}),geometry:{type:"Point",coordinates:t}})}var l,c,h;return{type:"FeatureCollection",features:a}}function mi(t){return r(629)==typeof t.id?t.id:t}function _i(t,e,i){const o=r,n=i&&i[o(3039)]||100,s=t[o(835)].clientHeight/2,a=t[o(835)][o(2978)]/2,l=t[o(3504)]([a-n/2,s]),c=t.unproject([a+n/2,s]),h=Math.round(t.project(c).x-t.project(l).x),u=Math.min(n,h,t[o(835)][o(2978)]),d=l.distanceTo(c);if(i&&"imperial"===i.unit){const i=3.2808*d;i>5280?yi(e,u,i/5280,t._getUIString("ScaleControl.Miles")):yi(e,u,i,t._getUIString("ScaleControl.Feet"))}else i&&o(1378)===i.unit?yi(e,u,d/1852,t[o(1762)]("ScaleControl.NauticalMiles")):d>=1e3?yi(e,u,d/1e3,t._getUIString("ScaleControl.Kilometers")):yi(e,u,d,t[o(1762)](o(2838)))}function yi(t,e,i,o){const n=r,s=function(t){const e=r,i=Math.pow(10,(""+Math.floor(t))[e(953)]-1);let o=t/i;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){const i=e,r=Math[i(2916)](10,Math[i(3537)](-Math.log(t)/Math[i(469)]));return Math.round(t*r)/r}(o),i*o}(i);t[n(1048)].width=e*(s/i)+"px",t.innerHTML=s+n(1869)+o}function gi(t,i,o,n=!1){const s=r;if(n||!o.getCoveringTilesDetailsProvider().allowWorldCopies())return null==t?void 0:t.wrap();const a=new e.X(t[s(3396)],t[s(2329)]);if(t=new e.X(t[s(3396)],t.latitude),i){const r=new e.X(t[s(3396)]-360,t[s(2329)]),n=new e.X(t.longitude+360,t.latitude),a=o[s(2985)](t).distSqr(i);o[s(2985)](r)[s(2404)](i)<a?t=r:o[s(2985)](n)[s(2404)](i)<a&&(t=n)}for(;Math[s(1201)](t[s(3396)]-o[s(1972)][s(3396)])>180;){const e=o.locationToScreenPoint(t);if(e.x>=0&&e.y>=0&&e.x<=o[s(1422)]&&e.y<=o[s(3282)])break;t[s(3396)]>o.center.longitude?t.longitude-=360:t[s(3396)]+=360}return t[s(3396)]!==a.longitude&&o.isPointOnMapSurface(o.locationToScreenPoint(t))?t:a}function vi(t,e,i){const o=r,n=t[o(2975)];for(const t in uc)n[o(2591)]("maptec-"+i+"-anchor-"+t);n[o(2926)]("maptec-"+i+"-anchor-"+e)}function xi(t){const i=r;if(t){if(i(2534)==typeof t){const r=Math.round(Math.abs(t)/Math[i(1585)]);return{center:new e.P(0,0),top:new e.P(0,t),"top-left":new e.P(r,r),"top-right":new e.P(-r,r),bottom:new e.P(0,-t),"bottom-left":new e.P(r,-r),"bottom-right":new e.P(-r,-r),left:new e.P(t,0),right:new e.P(-t,0)}}if(t instanceof e.P||Array.isArray(t)){const r=e.P[i(1029)](t);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:e.P[i(1029)](t.center||[0,0]),top:e.P.convert(t[i(3419)]||[0,0]),"top-left":e.P.convert(t["top-left"]||[0,0]),"top-right":e.P.convert(t["top-right"]||[0,0]),bottom:e.P[i(1029)](t.bottom||[0,0]),"bottom-left":e.P[i(1029)](t[i(1684)]||[0,0]),"bottom-right":e.P.convert(t["bottom-right"]||[0,0]),left:e.P[i(1029)](t.left||[0,0]),right:e.P.convert(t[i(465)]||[0,0])}}return xi(new e.P(0,0))}function bi(t,e){return 4294967296*(e>>>0)+(t>>>0)}function wi(t){const e=r,i=t.buf;let o=i[t[e(1998)]++],n=127&o;return o<128?n:(o=i[t[e(1998)]++],n|=(127&o)<<7,o<128?n:(o=i[t[e(1998)]++],n|=(127&o)<<14,o<128?n:(o=i[t[e(1998)]++],n|=(127&o)<<21,o<128?n:(o=i[t.pos],n|=(15&o)<<28,function(t,i){const r=e,o=i[r(526)];let n=o[i.pos++],s=(112&n)>>4;if(n<128)return bi(t,s);if(n=o[i[r(1998)]++],s|=(127&n)<<3,n<128)return bi(t,s);if(n=o[i.pos++],s|=(127&n)<<10,n<128)return bi(t,s);if(n=o[i[r(1998)]++],s|=(127&n)<<17,n<128)return bi(t,s);if(n=o[i.pos++],s|=(127&n)<<24,n<128)return bi(t,s);if(n=o[i.pos++],s|=(1&n)<<31,n<128)return bi(t,s);throw new Error("Expected varint not more than 10 bytes")}(n,t)))))}function Ti(t,e){const i=r;return t.getUint32(e+4,!0)*2**32+t[i(3176)](e+0,!0)}function Si(t){const e=r,i={buf:new Uint8Array(t),pos:0},o=wi(i),n=[];let s=0;for(let t=0;t<o;t++){const t=wi(i);n[e(2315)]({tileId:s+t,offset:0,length:0,runLength:1}),s+=t}for(let t=0;t<o;t++)n[t][e(732)]=wi(i);for(let t=0;t<o;t++)n[t].length=wi(i);for(let t=0;t<o;t++){const r=wi(i);n[t].offset=0===r&&t>0?n[t-1].offset+n[t-1][e(953)]:r-1}return n}function Pi(t,e){const i=r;let o=0,n=t.length-1;for(;o<=n;){const r=n+o>>1,s=e-t[r][i(2454)];if(s>0)o=r+1;else{if(!(s<0))return t[r];n=r-1}}if(n>=0){if(0===t[n][i(732)])return t[n];if(e-t[n][i(2454)]<t[n][i(732)])return t[n]}return null}function Ii(t,i){return e._(this,void 0,void 0,(function*(){const e=r;if(0===i||1===i)return t;if(2===i){if(void 0===globalThis[e(3690)])return(u=new Uint8Array(t),31==u[0]&&139==u[1]&&8==u[2]?(l=u,c=d,h=wr(l),h+8>l.length&&vr(6,"invalid gzip data"),xr(l.subarray(h,-8),{i:2},new Hi(Tr(l)),c)):8!=(15&u[0])||u[0]>>4>7||(u[0]<<8|u[1])%31?(s=u,a=d,xr(s,{i:2},a,a)):(o=u,n=d,xr(o.subarray(Sr(o),-4),{i:2},n,n))).buffer;const i=new Response(t).body;if(!i)throw new Error(e(1681));const r=i.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(r)[e(1772)]()}var o,n,s,a,l,c,h,u,d;throw new Error("Compression method not supported")}))}function Ci(t,e,r,o=i(534)){const n=i;switch(o){case"linear":default:return(d=e)+(r-d)*t;case n(2229):return(u=e)+(r-u)*(h=t)*h;case n(2772):return(c=e)+(r-c)*(l=t)*(2-l);case n(1431):return(a=e)+(r-a)*((s=t)<.5?2*s*s:(4-2*s)*s-1);case"step":return t<1?e:r}var s,a,l,c,h,u,d}function Mi(t){let e=0;const i=[0];for(let r=1;r<t.length;r++){const o=t[r-1],n=t[r],s=n[0]-o[0],a=n[1]-o[1];e+=Math.sqrt(s*s+a*a),i.push(e)}return{totalLength:e,cumulativeLengths:i}}function Ai(t,e){let i=Math.atan2(t,e)*(180/Math.PI);return i=(i-90+360)%360,i<0&&(i+=360),i}var ki,Ei,zi,Di,Li,Oi,Ri,Fi,ji,Bi,Vi,Ni,Gi,Ui,qi,Zi,Wi,Hi,Xi,Yi,Ji,Ki,$i,Qi,tr,er,ir,rr,or,nr,sr,ar,lr,cr,hr,ur,dr,pr,fr,mr,_r,yr,gr,vr,xr,br,wr,Tr,Sr,Pr,Ir,Cr=i(2217);let Mr,Ar,kr,Er=null;const zr={frame(t,r,o){const n=i,s=requestAnimationFrame((t=>{a(),r(t)})),{unsubscribe:a}=e.s(t[n(2388)],"abort",(()=>{const i=n;a(),cancelAnimationFrame(s),o(new e.a(t.signal[i(1385)]))}),!1)},frameAsync(t){return new Promise(((e,i)=>{this.frame(t,e,i)}))},getImageData(t,e=0){const r=i;return this[r(1496)](t)[r(1698)](-e,-e,t[r(1422)]+2*e,t.height+2*e)},getImageCanvasContext(t){const e=i,r=window[e(3016)].createElement(e(1174)),o=r[e(582)]("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return r[e(1422)]=t[e(1422)],r[e(3282)]=t.height,o.drawImage(t,0,0,t.width,t[e(3282)]),o},resolveURL:t=>(Mr||(Mr=document.createElement("a")),Mr.href=t,Mr.href),hardwareConcurrency:i(2354)!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==kr?kr:!!matchMedia&&(null==Ar&&(Ar=matchMedia("(prefers-reduced-motion: reduce)")),Ar.matches)},set prefersReducedMotion(t){kr=t}},Dr=new class{constructor(){const t=i;this[t(617)]=t(2354)!=typeof performance&&performance&&performance.now?performance[t(812)][t(2211)](performance):Date[t(812)].bind(Date),this._frozenAt=null}[i(1150)](){return null!==this[i(2172)]?this._frozenAt:this._realTime()}setNow(t){this._frozenAt=t}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};class Lr{static[i(3273)](t){const e=i;if(!Lr.docStyle)return t[0];for(let i=0;i<t[e(953)];i++)if(t[i]in Lr[e(2083)])return t[i];return t[0]}static create(t,e,r){const o=i,n=window.document[o(2737)](t);return void 0!==e&&(n.className=e),r&&r[o(1324)](n),n}static[i(1738)](t,e){return window.document[i(1156)](t,e)}static disableDrag(){const t=i;Lr.docStyle&&Lr.selectProp&&(Lr.userSelect=Lr[t(2083)][Lr[t(1870)]],Lr.docStyle[Lr[t(1870)]]="none")}static enableDrag(){const t=i;Lr.docStyle&&Lr.selectProp&&(Lr[t(2083)][Lr[t(1870)]]=Lr[t(2333)])}static[i(2955)](t,e){const r=i;t[r(1048)][Lr[r(896)]]=e}static[i(2689)](t,e,r,o={}){t.addEventListener(e,r,"passive"in o?o:o[i(3465)])}static[i(841)](t,e,r,o={}){const n=i;t[n(841)](e,r,n(1763)in o?o:o[n(3465)])}static suppressClickInternal(t){t[i(911)](),t.stopPropagation(),window.removeEventListener("click",Lr.suppressClickInternal,!0)}static suppressClick(){const t=i;window[t(2689)]("click",Lr[t(1105)],!0),window.setTimeout((()=>{window[t(841)]("click",Lr.suppressClickInternal,!0)}),0)}static getScale(t){const e=i,r=t[e(1355)]();return{x:r[e(1422)]/t.offsetWidth||1,y:r.height/t.offsetHeight||1,boundingClientRect:r}}static[i(315)](t,r,o){const n=i,s=r.boundingClientRect;return new e.P((o[n(1526)]-s[n(2367)])/r.x-t[n(3323)],(o[n(744)]-s[n(3419)])/r.y-t[n(1109)])}static mousePos(t,e){const r=i,o=Lr[r(2093)](t);return Lr[r(315)](t,o,e)}static touchPos(t,e){const r=i,o=[],n=Lr[r(2093)](t);for(let i=0;i<e[r(953)];i++)o.push(Lr.getPoint(t,n,e[i]));return o}static mouseButton(t){return t.button}static[i(2591)](t){const e=i;t[e(537)]&&t[e(537)].removeChild(t)}static[i(2878)](t){const e=i,r=(new DOMParser)[e(3499)](t,"text/html")[e(3445)]||document.createElement("body"),o=r.querySelectorAll("script");for(const t of o)t.remove();return Lr[e(2095)](r),r[e(1858)]}static[i(1186)](t,e){const r=i,o=e.replace(/\s+/g,"").toLowerCase();return!(!["src",r(745),r(1612)].includes(t)||!o.includes("javascript:")&&!o.includes("data:"))||!!t.startsWith("on")||void 0}static clean(t){const e=t.children;for(const t of e)Lr.removeAttributes(t),Lr.clean(t)}static removeAttributes(t){const e=i;for(const{name:i,value:r}of t[e(2854)])Lr.isPossiblyDangerous(i,r)&&t[e(2363)](i)}}Lr[i(2083)]="undefined"!=typeof window&&window.document&&window[i(3016)][i(3292)][i(1048)],Lr[i(1870)]=Lr.testProp([i(2333),"MozUserSelect","WebkitUserSelect","msUserSelect"]),Lr[i(896)]=Lr.testProp([i(1847),i(772)]);const Or={supported:!1,testSupport:function(t){!jr&&Fr&&(Br?h(t):Rr=t)}};let Rr,Fr,jr=!1,Br=!1;i(2354)!=typeof document&&(Fr=document[i(2737)]("img"),Fr.onload=()=>{Rr&&h(Rr),Rr=null,Br=!0},Fr[i(2085)]=()=>{jr=!0,Rr=null},Fr.src=i(655)),function(t){const o=i;let n,s,a,l;t.resetRequestQueue=()=>{n=[],s=0,a=0,l={}},t.addThrottleControl=t=>{const e=a++;return l[e]=t,e},t[o(3035)]=t=>{delete l[t],h()},t[o(3388)]=(t,i,r=!0)=>new Promise(((s,a)=>{const l=o;Or[l(1501)]&&(t[l(2086)]||(t[l(2086)]={}),t.headers[l(1300)]="image/webp,*/*"),e.e(t,{type:"image"}),n.push({abortController:i,requestParameters:t,supportImageRefresh:r,state:l(3049),onError:t=>{a(t)},onSuccess:t=>{s(t)}}),h()}));const c=t=>e._(this,void 0,void 0,(function*(){const i=o;t.state="running";const{requestParameters:r,supportImageRefresh:n,onError:a,onSuccess:l,abortController:c}=t,d=!1===n&&!e.i(self)&&!e.g(r[i(3004)])&&(!r[i(2086)]||Object[i(3680)](r.headers)[i(3535)](((t,e)=>t&&i(1300)===e),!0));s++;const p=d?u(r,c):e.m(r,c);try{const r=yield p;delete t[i(657)],t[i(3158)]="completed",r[i(3100)]instanceof HTMLImageElement||e.b(r[i(3100)])?l(r):r.data&&l({data:yield(f=r.data,e.f(f)?"undefined"==typeof Image?Promise[i(2135)](new Error(i(1962))):e.h(f):i(2770)==typeof createImageBitmap?e.j(f):e.k(f)),cacheControl:r.cacheControl,expires:r[i(714)]})}catch(e){delete t.abortController,a(e)}finally{s--,h()}var f})),h=()=>{const t=o,i=(()=>{const t=r;for(const e of Object[t(3680)](l))if(l[e]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let e=s;e<i&&n.length>0;e++){const i=n[t(2486)]();i[t(657)][t(2388)].aborted?e--:c(i)}},u=(t,i)=>new Promise(((r,n)=>{const s=o,a=new Image,l=t.url,c=t[s(3221)];c&&s(1332)===c?a[s(955)]="use-credentials":(c&&"same-origin"===c||!e.d(l))&&(a[s(955)]="anonymous"),i.signal.addEventListener(s(970),(()=>{a[s(1861)]="",n(new e.a(i.signal.reason))})),a.fetchPriority="high",a.onload=()=>{a.onerror=a[s(1628)]=null,r({data:a})},a.onerror=()=>{const t=s;a.onerror=a.onload=null,i.signal.aborted||n(new Error(t(3077)))},a.src=l}))}(ki||(ki={})),ki[i(3531)]();class Vr{constructor(t){this[i(444)]=null!=t?t:null}transformRequest(t,r){const o=i;let n;return n=this[o(444)]&&this[o(444)](t,r)||{url:t},e.c.API_KEY&&/\/\/(?:pre-api|dev-api|test-api|prod-api|api)\.maptec\.com(?:[/:?]|$)/[o(3046)](n.url)&&(n.headers||(n.headers={}),s(n[o(2086)],e.c[o(2018)])),n}setTransformRequest(t){this[i(444)]=t}}class Nr extends e.E{constructor(){const t=i;super(),this[t(2437)]={},this.updatedImages={},this[t(2677)]={},this.loaded=!1,this.requestors=[],this[t(1785)]={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}[i(2355)](){const t=i;this.atlasTexture&&(this[t(795)].destroy(),this.atlasTexture=null);for(const t of Object.keys(this.images))this.removeImage(t);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this[t(1639)]=!0}isLoaded(){return this[i(3340)]}[i(3065)](t){const e=i;if(this.loaded!==t&&(this[e(3340)]=t,t)){for(const{ids:t,promiseResolve:e}of this.requestors)e(this._getImagesForIds(t));this[e(3370)]=[]}}[i(3388)](t){const r=i,o=this.images[t];if(o&&!o.data&&o[r(3616)]){const t=o.spriteData;o[r(3100)]=new e.R({width:t.width,height:t.height},t[r(1249)].getImageData(t.x,t.y,t.width,t[r(3282)]).data),o[r(3616)]=null}return o}addImage(t,e){const r=i;if(this.images[t])throw new Error("Image id "+t+" already exist, use updateImage instead");this[r(409)](t,e)&&(this[r(2437)][t]=e)}_validate(t,r){const o=i;let n=!0;const s=r[o(3100)]||r.spriteData;return this[o(2676)](r[o(2581)],s&&s[o(1422)])||(this.fire(new e.n(new Error(o(3581)+t+o(3469)))),n=!1),this[o(2676)](r[o(1115)],s&&s.height)||(this[o(1430)](new e.n(new Error(o(3581)+t+'" has invalid "stretchY" value'))),n=!1),this[o(3144)](r.content,r)||(this.fire(new e.n(new Error('Image "'+t+o(3565)))),n=!1),n}[i(2676)](t,e){if(!t)return!0;let i=0;for(const r of t){if(r[0]<i||r[1]<r[0]||e<r[1])return!1;i=r[1]}return!0}_validateContent(t,e){const r=i;if(!t)return!0;if(4!==t.length)return!1;const o=e[r(3616)],n=o&&o[r(1422)]||e[r(3100)].width,s=o&&o[r(3282)]||e[r(3100)].height;return!(t[0]<0||n<t[0]||t[1]<0||s<t[1]||t[2]<0||n<t[2]||t[3]<0||s<t[3]||t[2]<t[0]||t[3]<t[1])}[i(1679)](t,e,r=!0){const o=i,n=this.getImage(t);if(r&&(n.data.width!==e[o(3100)].width||n[o(3100)].height!==e[o(3100)][o(3282)]))throw new Error("size mismatch between old image ("+n.data.width+"x"+n.data[o(3282)]+o(2953)+e.data[o(1422)]+"x"+e[o(3100)][o(3282)]+").");e[o(1537)]=n[o(1537)]+1,this.images[t]=e,this[o(1391)][t]=!0}[i(3305)](t){const e=i,r=this[e(2437)][t];delete this[e(2437)][t],delete this.patterns[t],r[e(512)]&&r[e(512)][e(1593)]&&r.userImage.onRemove()}listImages(){return Object[i(3680)](this.images)}getImages(t){return new Promise(((e,i)=>{const o=r;let n=!0;if(!this[o(1911)]())for(const e of t)this[o(2437)][e]||(n=!1);this[o(1911)]()||n?e(this._getImagesForIds(t)):this.requestors[o(2315)]({ids:t,promiseResolve:e})}))}[i(3139)](t){const r=i,o={};for(const i of t){let t=this[r(3388)](i);t||(this[r(1430)](new e.o("styleimagemissing",{id:i})),t=this[r(3388)](i)),t?o[i]={data:t.data[r(2621)](),pixelRatio:t.pixelRatio,sdf:t.sdf,version:t.version,stretchX:t.stretchX,stretchY:t[r(1115)],content:t[r(750)],textFitWidth:t.textFitWidth,textFitHeight:t[r(3210)],hasRenderCallback:Boolean(t[r(512)]&&t[r(512)].render)}:e.w(r(3581)+i+r(966))}return o}getPixelSize(){const{width:t,height:e}=this.atlasImage;return{width:t,height:e}}getPattern(t){const r=i,o=this[r(1785)][t],n=this.getImage(t);if(!n)return null;if(o&&o.position[r(1537)]===n[r(1537)])return o.position;if(o)o.position[r(1537)]=n[r(1537)];else{const i={w:n.data.width+2,h:n.data[r(3282)]+2,x:0,y:0},o=new e.I(i,n);this.patterns[t]={bin:i,position:o}}return this[r(2140)](),this.patterns[t].position}bind(t){const r=i,o=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture[r(1923)](this[r(1751)]),this[r(1639)]=!1):this[r(795)]=new e.T(t,this.atlasImage,o.RGBA),this.atlasTexture.bind(o[r(1661)],o[r(2557)])}_updatePatternAtlas(){const t=i,r=[];for(const e in this[t(1785)])r[t(2315)](this[t(1785)][e].bin);const{w:o,h:n}=e.p(r),s=this[t(1751)];s.resize({width:o||1,height:n||1});for(const i in this[t(1785)]){const{bin:r}=this[t(1785)][i],o=r.x+1,n=r.y+1,a=this[t(3388)](i).data,l=a.width,c=a[t(3282)];e.R.copy(a,s,{x:0,y:0},{x:o,y:n},{width:l,height:c}),e.R[t(1059)](a,s,{x:0,y:c-1},{x:o,y:n-1},{width:l,height:1}),e.R[t(1059)](a,s,{x:0,y:0},{x:o,y:n+c},{width:l,height:1}),e.R[t(1059)](a,s,{x:l-1,y:0},{x:o-1,y:n},{width:1,height:c}),e.R.copy(a,s,{x:0,y:0},{x:o+l,y:n},{width:1,height:c})}this[t(1639)]=!0}[i(1047)](){this[i(2677)]={}}dispatchRenderCallbacks(t){const r=i;for(const i of t){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;const t=this.getImage(i);t||e.w('Image with ID: "'+i+'" was not found'),T(t)&&this[r(1679)](i,t)}}[i(1185)](){const t=i,e={};for(const i in this[t(2437)]){const r=this[t(2437)][i];e[i]=Object[t(2132)](Object[t(2132)]({},r),{data:r.data?r[t(3100)][t(2621)]():null})}return e}}const Gr=1e20,Ur=e.v.layout_symbol["text-font"][i(3316)].join(",");class qr{constructor(t,e,r){this[i(1670)]=t,this.localIdeographFontFamily=e,this.entries={},this.lang=r}[i(2218)](t){this[i(3004)]=t}getGlyphs(t){return e._(this,void 0,void 0,(function*(){const e=r,i=[];for(const r in t)for(const o of t[r])i.push(this[e(2482)](r,o));const o=yield Promise.all(i),n={};for(const{stack:t,id:i,glyph:r}of o)n[t]||(n[t]={}),n[t][i]=r&&{id:r.id,bitmap:r[e(2780)].clone(),metrics:r[e(1424)]};return n}))}_getAndCacheGlyphsPromise(t,i){return e._(this,void 0,void 0,(function*(){const e=r;let o=this.entries[t];o||(o=this.entries[t]={glyphs:{},requests:{},ranges:{}});let n=o[e(2546)][i];return void 0!==n?{stack:t,id:i,glyph:n}:!this[e(3004)]||this[e(2438)](i)?(n=o[e(2546)][i]=this[e(1691)](o,t,i),{stack:t,id:i,glyph:n}):yield this._downloadAndCacheRangePromise(t,i)}))}_downloadAndCacheRangePromise(t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=this[e(1197)][t],n=Math.floor(i/256);if(o.ranges[n])return{stack:t,id:i,glyph:null};if(!o.requests[n]){const i=qr[e(2335)](t,n,this.url,this.requestManager);o[e(913)][n]=i}try{const r=yield o.requests[n];for(const t in r)o[e(2546)][+t]=r[+t];return o.ranges[n]=!0,{stack:t,id:i,glyph:r[i]||null}}catch(r){const s=o[e(2546)][i]=this._drawGlyph(o,t,i);return this._warnOnMissingGlyphRange(s,n,i,r),{stack:t,id:i,glyph:s}}}))}_warnOnMissingGlyphRange(t,r,o,n){const s=i,a=256*r,l=a+255,c=o[s(2289)](16).padStart(4,"0")[s(1658)]();e.w(s(2377)+r+", "+a+"-"+l+". Rendering codepoint U+"+c+s(2156)+n)}[i(2438)](t){return!!this[i(2412)]&&e.u(t)}_drawGlyph(t,r,o){const n=i,s=r===Ur&&""!==this[n(2412)]&&this[n(2438)](o),a=s?"ideographTinySDF":"tinySDF";t[a]||(t[a]=this._createTinySDF(s?this.localIdeographFontFamily:r));const l=t[a].draw(String[n(944)](o)),c=/^\p{gc=Cf}+$/u.test(String[n(944)](o));return{id:o,bitmap:new e.x({width:l[n(1422)]||60,height:l.height||60},l[n(3100)]),metrics:{width:c?0:l.glyphWidth/2||24,height:l[n(453)]/2||24,left:l[n(1540)]/2+.5||0,top:l.glyphTop/2-27.5||-8,advance:c?0:l[n(3192)]/2||24,isDoubleResolution:!0}}}_createTinySDF(t){const e=i,r=t?t.split(","):[];r.push("sans-serif");const o=r.map((t=>/[-\w]+/.test(t)?t:"'"+CSS[e(3563)](t)+"'")).join(",");return new qr.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:o,fontWeight:this._fontWeight(r[0]),fontStyle:this._fontStyle(r[0]),lang:this[e(597)]})}[i(601)](t){const e=i;return/italic/i.test(t)?"italic":/oblique/i[e(3046)](t)?e(2399):"normal"}[i(2709)](t){const e=i,r={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950};let o;for(const[i,n]of Object[e(1197)](r))new RegExp("\\b"+i+"\\b","i").test(t)&&(o=""+n);return o}destroy(){const t=i;for(const e in this.entries){const i=this.entries[e];i[t(1460)]&&(i.tinySDF=null),i.ideographTinySDF&&(i.ideographTinySDF=null),i.glyphs={},i[t(913)]={},i[t(1837)]={}}this.entries={}}}qr.loadGlyphRange=function(t,i,o,n){return e._(this,void 0,void 0,(function*(){const s=r,a=256*i,l=a+255,c=n[s(399)](o[s(3486)](s(2644),t).replace(s(1678),a+"-"+l),"Glyphs"),h=yield e.q(c,new AbortController);if(!h||!h[s(3100)])throw new Error(s(2911)+i+", "+a+"-"+l);const u={};for(const t of e.t(h.data))u[t.id]=t;return u}))},qr.TinySDF=class{constructor({fontSize:t=24,buffer:e=3,radius:r=8,cutoff:o=.25,fontFamily:n=i(3186),fontWeight:s="normal",fontStyle:a=i(3045),lang:l=null}={}){const c=i;this.buffer=e,this[c(3254)]=o,this[c(3456)]=r,this.lang=l;const h=this.size=t+4*e,u=this._createCanvas(h),d=this[c(2884)]=u.getContext("2d",{willReadFrequently:!0});d.font=a+" "+s+" "+t+c(794)+n,d.textBaseline=c(1856),d.textAlign="left",d[c(1609)]="black",this[c(2673)]=new Float64Array(h*h),this[c(3471)]=new Float64Array(h*h),this.f=new Float64Array(h),this.z=new Float64Array(h+1),this.v=new Uint16Array(h)}[i(1642)](t){const e=i,r=document.createElement("canvas");return r[e(1422)]=r.height=t,r}draw(t){const e=i,{width:r,actualBoundingBoxAscent:o,actualBoundingBoxDescent:n,actualBoundingBoxLeft:s,actualBoundingBoxRight:a}=this.ctx[e(1037)](t),l=Math.ceil(o),c=Math.max(0,Math.min(this[e(863)]-this[e(2841)],Math[e(3537)](a-s))),h=Math[e(1141)](this.size-this[e(2841)],l+Math.ceil(n)),u=c+2*this[e(2841)],d=h+2*this.buffer,p=Math.max(u*d,0),f=new Uint8ClampedArray(p),m={data:f,width:u,height:d,glyphWidth:c,glyphHeight:h,glyphTop:l,glyphLeft:0,glyphAdvance:r};if(0===c||0===h)return m;const{ctx:_,buffer:y,gridInner:g,gridOuter:v}=this;this[e(597)]&&(_.lang=this[e(597)]),_[e(2739)](y,y,c,h),_[e(3389)](t,y,y+l);const x=_[e(1698)](y,y,c,h);v[e(1474)](Gr,0,p),g[e(1474)](0,0,p);for(let t=0;t<h;t++)for(let i=0;i<c;i++){const r=x[e(3100)][4*(t*c+i)+3]/255;if(0===r)continue;const o=(t+y)*u+i+y;if(1===r)v[o]=0,g[o]=Gr;else{const t=.5-r;v[o]=t>0?t*t:0,g[o]=t<0?t*t:0}}S(v,0,0,u,d,u,this.f,this.v,this.z),S(g,y,y,c,h,u,this.f,this.v,this.z);for(let t=0;t<p;t++){const i=Math[e(1313)](v[t])-Math.sqrt(g[t]);f[t]=Math.round(255-255*(i/this.radius+this.cutoff))}return m}};class Zr{constructor(){this.specification=e.v.light[i(1288)]}[i(661)](t,i){return e.H(t.expression.evaluate(i))}[i(1874)](t,r,o){const n=i;return{x:e.J.number(t.x,r.x,o),y:e.J.number(t.y,r.y,o),z:e.J[n(2534)](t.z,r.z,o)}}}let Wr;class Hr extends e.E{constructor(t){const r=i;super(),Wr=Wr||new e.y({anchor:new e.D(e.v.light[r(716)]),position:new Zr,color:new e.D(e.v.light.color),intensity:new e.D(e.v.light.intensity)}),this._transitionable=new e.z(Wr,void 0),this[r(3171)](t),this[r(2560)]=this._transitionable.untransitioned()}[i(1039)](){return this._transitionable.serialize()}setLight(t,r={}){const o=i;if(!this._validate(e.B,t,r))for(const i in t){const r=t[i];i.endsWith(e.C)?this._transitionable.setTransition(i.slice(0,-e.C[o(953)]),r):this._transitionable[o(1478)](i,r)}}[i(3658)](t){const e=i;this[e(2560)]=this._transitionable[e(2521)](t,this._transitioning)}hasTransition(){return this._transitioning[i(377)]()}[i(697)](t){this.properties=this._transitioning[i(661)](t)}_validate(t,r,o){const n=i;return(!o||!1!==o[n(3256)])&&e.F(this,t[n(3054)](e.G,{value:r,style:{glyphs:!0,sprite:!0},styleSpec:e.v}))}}const Xr=new e.y({"sky-color":new e.D(e.v.sky[i(3460)]),"horizon-color":new e.D(e.v.sky["horizon-color"]),"fog-color":new e.D(e.v.sky["fog-color"]),"fog-ground-blend":new e.D(e.v.sky["fog-ground-blend"]),"horizon-fog-blend":new e.D(e.v[i(3169)]["horizon-fog-blend"]),"sky-horizon-blend":new e.D(e.v.sky["sky-horizon-blend"]),"atmosphere-blend":new e.D(e.v.sky["atmosphere-blend"])});class Yr extends e.E{constructor(t){const r=i;super(),this[r(1383)]=new e.z(Xr,void 0),this.setSky(t),this[r(2560)]=this[r(1383)][r(1975)](),this.recalculate(new e.K(0))}[i(776)](t,r={}){const o=i;if(!this._validate(e.L,t,r)){t||(t={"sky-color":o(1158),"horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const i in t){const r=t[i];i[o(506)](e.C)?this[o(1383)].setTransition(i.slice(0,-e.C[o(953)]),r):this._transitionable.setValue(i,r)}}}getSky(){return this[i(1383)].serialize()}updateTransitions(t){this._transitioning=this._transitionable[i(2521)](t,this._transitioning)}[i(377)](){const t=i;return this[t(2560)][t(377)]()}[i(697)](t){this.properties=this[i(2560)].possiblyEvaluate(t)}_validate(t,r,o={}){return!1!==(null==o?void 0:o.validate)&&e.F(this,t[i(3054)](e.G,e.e({value:r,style:{glyphs:!0,sprite:!0},styleSpec:e.v})))}[i(561)](t){return t<60?0:t<70?(t-60)/10:1}}class Jr{constructor(t,e){const r=i;this[r(1422)]=t,this[r(3282)]=e,this.nextRow=0,this.data=new Uint8Array(this.width*this[r(3282)]),this.dashEntry={}}[i(3167)](t,e){const r=i,o=t[r(2533)](",")+String(e);return this.dashEntry[o]||(this.dashEntry[o]=this.addDash(t,e)),this[r(416)][o]}[i(3207)](t,e,r){const o=i,n=[];let s=t[o(953)]%2==1?-t[t.length-1]*r:0,a=t[0]*r,l=!0;n[o(2315)]({left:s,right:a,isDash:l,zeroLength:0===t[0]});let c=t[0];for(let e=1;e<t[o(953)];e++){l=!l;const i=t[e];s=c*r,c+=i,a=c*r,n.push({left:s,right:a,isDash:l,zeroLength:0===i})}return n}addRoundDash(t,e,r){const o=i,n=e/2;for(let e=-r;e<=r;e++){const i=this.width*(this[o(3318)]+r+e);let s=0,a=t[s];for(let l=0;l<this.width;l++){l/a.right>1&&(a=t[++s]);const c=Math.abs(l-a.left),h=Math.abs(l-a.right),u=Math.min(c,h);let d;const p=e/r*(n+1);if(a.isDash){const t=n-Math.abs(p);d=Math.sqrt(u*u+t*t)}else d=n-Math[o(1313)](u*u+p*p);this[o(3100)][i+l]=Math[o(2153)](0,Math.min(255,d+128))}}}addRegularDash(t){const e=i;for(let i=t.length-1;i>=0;--i){const r=t[i],o=t[i+1];r.zeroLength?t[e(1657)](i,1):o&&o.isDash===r[e(2481)]&&(o.left=r.left,t[e(1657)](i,1))}const r=t[0],o=t[t[e(953)]-1];r.isDash===o[e(2481)]&&(r.left=o.left-this[e(1422)],o.right=r[e(465)]+this[e(1422)]);const n=this[e(1422)]*this.nextRow;let s=0,a=t[s];for(let i=0;i<this.width;i++){i/a[e(465)]>1&&(a=t[++s]);const r=Math.abs(i-a.left),o=Math.abs(i-a[e(465)]),l=Math.min(r,o);this.data[n+i]=Math.max(0,Math.min(255,(a[e(2481)]?l:-l)+128))}}addDash(t,r){const o=i,n=r?7:0,s=2*n+1;if(this.nextRow+s>this.height)return e.w("LineAtlas out of space"),null;let a=0;for(let e=0;e<t[o(953)];e++)a+=t[e];if(0!==a){const e=this[o(1422)]/a,i=this[o(3207)](t,this[o(1422)],e);r?this.addRoundDash(i,e,n):this[o(1627)](i)}const l={y:this[o(3318)]+n,height:2*n,width:a};return this.nextRow+=s,this[o(1639)]=!0,l}[i(2211)](t){const e=i,r=t.gl;this.texture?(r.bindTexture(r[e(2541)],this[e(600)]),this.dirty&&(this.dirty=!1,r.texSubImage2D(r.TEXTURE_2D,0,0,0,this[e(1422)],this.height,r[e(1472)],r[e(1884)],this.data))):(this[e(600)]=r[e(938)](),r[e(891)](r[e(2541)],this[e(600)]),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.REPEAT),r[e(1968)](r[e(2541)],r.TEXTURE_WRAP_T,r.REPEAT),r[e(1968)](r.TEXTURE_2D,r[e(2248)],r[e(1661)]),r.texParameteri(r.TEXTURE_2D,r[e(2375)],r[e(1661)]),r.texImage2D(r[e(2541)],0,r.ALPHA,this[e(1422)],this[e(3282)],0,r.ALPHA,r.UNSIGNED_BYTE,this.data))}}class Kr{constructor(){this.active={}}acquire(t){const r=i;if(!this.workers)for(this[r(1659)]=[];this[r(1659)][r(953)]<Kr[r(671)];)this.workers[r(2315)](new Worker(e.c[r(1233)]));return this[r(343)][t]=!0,this[r(1659)].slice()}release(t){const e=i;delete this[e(343)][t],0===this.numActive()&&(this.workers[e(799)]((t=>{t[e(734)]()})),this.workers=null)}[i(3222)](){return!!this.active[i(707)]}[i(3448)](){return Object.keys(this.active).length}}const $r=Math[i(2700)](zr[i(1468)]/2);let Qr,to;Kr[i(671)]=e.M(globalThis)?Math[i(2153)](Math[i(1141)]($r,3),1):1;class eo{constructor(t,r){const o=i;this[o(1068)]=t,this[o(1680)]=[],this.currentActor=0,this.id=r;const n=this.workerPool[o(1838)](r);for(let t=0;t<n[o(953)];t++){const i=new e.N(n[t],r);i[o(1814)]=o(1716)+t,this.actors[o(2315)](i)}if(!this.actors.length)throw new Error(o(1333))}[i(884)](t,e){const r=i,o=[];for(const i of this[r(1680)])o.push(i[r(614)]({type:t,data:e}));return Promise[r(3401)](o)}[i(2982)](){const t=i;return this.currentActor=(this[t(3022)]+1)%this.actors[t(953)],this.actors[this.currentActor]}remove(t=!0){const e=i;this.actors.forEach((t=>{t[r(2591)]()})),this[e(1680)]=[],t&&this[e(1068)][e(2070)](this.id)}[i(414)](t,e){for(const i of this.actors)i.registerMessageHandler(t,e)}unregisterMessageHandler(t){const e=i;for(const i of this.actors)i[e(1013)](t)}}class io{constructor(t,e){const r=i;t&&(e?this[r(1087)](t).setNorthEast(e):Array[r(2667)](t)&&(4===t.length?this[r(1087)]([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0])[r(1896)](t[1])))}[i(1896)](t){const r=i;return this[r(1615)]=t instanceof e.X?new e.X(t.longitude,t[r(2329)]):e.X.convert(t),this}setSouthWest(t){const r=i;return this[r(2215)]=t instanceof e.X?new e.X(t[r(3396)],t[r(2329)]):e.X.convert(t),this}[i(875)](t){const r=i,o=this._southWest,n=this[r(1615)];let s,a;if(t instanceof e.X)s=t,a=t;else{if(!(t instanceof io))return Array[r(2667)](t)?4===t.length||t[r(1697)](Array[r(2667)])?this.extend(io.convert(t)):this.extend(e.X[r(1029)](t)):t&&r(3396)in t&&"latitude"in t?this[r(875)](e.X.convert(t)):this;if(s=t[r(2215)],a=t._northEast,!s||!a)return this}return o||n?(o[r(3396)]=Math[r(1141)](s[r(3396)],o.longitude),o.latitude=Math[r(1141)](s[r(2329)],o.latitude),n.longitude=Math.max(a.longitude,n[r(3396)]),n[r(2329)]=Math[r(2153)](a.latitude,n.latitude)):(this[r(2215)]=new e.X(s.longitude,s.latitude),this._northEast=new e.X(a.longitude,a[r(2329)])),this}getCenter(){const t=i;return new e.X((this._southWest.longitude+this[t(1615)][t(3396)])/2,(this._southWest[t(2329)]+this[t(1615)].latitude)/2)}[i(3058)](){return this._southWest}getNorthEast(){return this[i(1615)]}[i(344)](){return new e.X(this.getWest(),this.getNorth())}[i(2099)](){return new e.X(this.getEast(),this.getSouth())}getWest(){return this._southWest.longitude}[i(1330)](){return this._southWest[i(2329)]}getEast(){return this._northEast[i(3396)]}[i(3235)](){return this._northEast.latitude}toArray(){const t=i;return[this[t(2215)][t(1072)](),this[t(1615)][t(1072)]()]}toString(){const t=i;return t(1773)+this[t(2215)][t(2289)]()+", "+this._northEast[t(2289)]()+")"}[i(2185)](){return!(this._southWest&&this._northEast)}contains(t){const r=i,{longitude:o,latitude:n}=e.X[r(1029)](t);let s=this._southWest.longitude<=o&&o<=this[r(1615)].longitude;return this[r(2215)].longitude>this[r(1615)].longitude&&(s=this._southWest[r(3396)]>=o&&o>=this._northEast[r(3396)]),this[r(2215)][r(2329)]<=n&&n<=this._northEast.latitude&&s}[i(1162)](t){const r=i;if(!((t=io[r(1029)](t)).getNorth()>=this[r(1330)]()&&t.getSouth()<=this.getNorth()))return!1;const o=Math.abs(this[r(2320)]()-this.getWest()),n=Math.abs(t[r(2320)]()-t.getWest());if(o>=360||n>=360)return!0;const s=e.Y(this[r(2699)](),-180,180),a=e.Y(this.getEast(),-180,180),l=e.Y(t.getWest(),-180,180),c=e.Y(t.getEast(),-180,180),h=s>=a,u=l>=c;return!(!h||!u)||(h?c>=s||l<=a:u?a>=l||s<=c:l<=a&&c>=s)}static[i(1029)](t){return t instanceof io?t:t?new io(t):t}static fromLngLat(t,r=0){const o=i,n=360*r/40075017,s=n/Math.cos(Math.PI/180*t[o(2329)]);return new io(new e.X(t[o(3396)]-s,t.latitude-n),new e.X(t.longitude+s,t[o(2329)]+n))}static fromMapOverlays(t){const e=i,o=function(t){const e=r;if(null==t)throw new Error("LngLatBounds.fromMapOverlays: 参数不能为 null 或 undefined。");if(Array.isArray(t)){if(0===t[e(953)])throw new Error(e(2847));return t}return[t]}(t),n=new io;for(const t of o)D(n,t);if(n[e(2185)]())throw new Error(e(1774));const s=n.getSouthWest(),a=n[e(3618)]();if(s[e(3396)]===a[e(3396)]&&s[e(2329)]===a.latitude)throw new Error("LngLatBounds.fromMapOverlays: 结果仅为单个地理点,无法构成范围框;请传入至少两个不同坐标、或折线/多边形/非零半径的地理圆等。");return n}adjustAntiMeridian(){const t=i,r=new e.X(this[t(2215)][t(3396)],this._southWest.latitude),o=new e.X(this[t(1615)].longitude,this._northEast[t(2329)]);return new io(r,r[t(3396)]>o.longitude?new e.X(o.longitude+360,o.latitude):o)}}class ro{constructor(t,e,r){const o=i;this.bounds=io.convert(this[o(2832)](t)),this[o(2045)]=e||0,this.maxzoom=r||24}[i(2832)](t){const e=i;return Array.isArray(t)&&4===t[e(953)]?[Math.max(-180,t[0]),Math[e(2153)](-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const r=i,o=Math.pow(2,t.z),n=Math.floor(e.$(this[r(2459)].getWest())*o),s=Math.floor(e.Z(this.bounds[r(3235)]())*o),a=Math.floor(e.$(this.bounds[r(2320)]())*o),l=Math[r(2700)](e.Z(this.bounds[r(1330)]())*o);return 0===t.z||(n>a?t.x>=n||t.x<=a:t.x>=n&&t.x<=a)&&t.y>=s&&t.y<=l}}class oo extends e.E{constructor(t,r,o,n){const s=i;var a;if(super(),this.id=t,this[s(3416)]=o,this.type=s(1325),this.minzoom=0,this[s(615)]=22,this.scheme=s(2507),this[s(782)]=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.e(this,e.W(r,[s(3004),s(2619),s(782),s(965),s(2740)])),this._options=e.e({type:"vector"},r),this[s(3584)]=r[s(2066)],this[s(1032)]=r[s(1982)],this._urlLayer=null!==(a=r["url-layer"])&&void 0!==a?a:r[s(1740)],this[s(307)]=[],512!==this.tileSize)throw new Error(s(2168));this.setEventedParent(n)}[i(3103)](){return e._(this,void 0,void 0,(function*(){const t=r;var i,o;this._loaded=!1,this[t(1430)](new e.o("dataloading",{dataType:"source"})),this[t(402)]=new AbortController;try{let r=this[t(2764)];if(this[t(1032)]&&this[t(2764)][t(3004)]&&!/^\w+:\/\//.test(this[t(2764)][t(3004)])){const i=e.c.SERVER_URL;let o=this[t(2764)].url;"apitiles"===this._urlType&&(o=o[t(3486)]("/tile/resource",t(729)));const n="apitiles"===this._urlType?t(2856):"";let s=n?""+n+i+o:""+i+o;const a=new URLSearchParams;this._urlLayer&&a[t(571)]("layer",this[t(3366)]);const l=a.toString();l&&(s+="?"+l),r=Object[t(2132)](Object[t(2132)]({},this._options),{url:s})}const n=yield E(r,this[t(1920)]._requestManager,this[t(402)]);if(this._tileJSONRequest=null,this._loaded=!0,this[t(1920)].style.tileManagers[this.id].clearTiles(),n){if(this._zoomDataLayers=null!==(i=n[t(1143)])&&void 0!==i?i:[],e.e(this,n),!this[t(1e3)]||0===this[t(1e3)][t(953)]){const i=e.c[t(1017)],r=null!==(o=this[t(2764)].url)&&void 0!==o?o:"";i&&r&&(this.tiles=t(2571)===this[t(1032)]?["apitiles://"+i+r+t(1595)]:[""+i+r+"/{z}/{x}/{y}"])}n.bounds&&(this.tileBounds=new ro(n[t(2459)],this.minzoom,this.maxzoom)),this[t(1430)](new e.o(t(3100),{dataType:"source",sourceDataType:t(1978)})),this.fire(new e.o(t(3100),{dataType:"source",sourceDataType:"content"}))}}catch(i){this._tileJSONRequest=null,this._loaded=!0,e.a0(i)||this[t(1430)](new e.n(i))}}))}loaded(){return this._loaded}[i(3310)](t){const e=i;return!this[e(2331)]||this[e(2331)][e(2287)](t[e(842)])}[i(3540)](t){this[i(1920)]=t,this.load()}setSourceProperty(t){const e=i;this._tileJSONRequest&&this[e(402)].abort(),t(),this[e(3103)]()}[i(2224)](t){const e=i;return this[e(2401)]((()=>{this[e(2764)].tiles=t})),this}setUrl(t){return this.setSourceProperty((()=>{const e=r;this[e(3004)]=t,this._options[e(3004)]=t})),this}[i(1593)](){const t=i;this[t(402)]&&(this[t(402)].abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(t){return e._(this,void 0,void 0,(function*(){const i=r;if(!this[i(1e3)]||0===this[i(1e3)].length)return;const o=t[i(3533)][i(842)].url(this[i(1e3)],this[i(1920)].getPixelRatio(),this[i(2619)]),n=this[i(1920)]._requestManager[i(399)](o,"Tile");if("apitiles"===this[i(1032)]){if(!this[i(3366)])throw new Error(i(954)+this.id+i(3534));e.a1(n,t.tileID.canonical.z,t.tileID[i(842)].x,t[i(3533)].canonical.y,this._urlLayer)}const s=i(2571)===this._urlType?t[i(3533)].canonical.z+","+t.tileID[i(842)].x+","+t.tileID[i(842)].y:void 0,a={request:n,uid:t.uid,tileID:t.tileID,zoom:t.tileID[i(903)],tileSize:this[i(782)]*t[i(3533)].overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this[i(1920)].showCollisionBoxes,promoteId:this[i(965)],subdivisionGranularity:this.map[i(1048)][i(3645)][i(3532)],encoding:this[i(2740)],overzoomParameters:this._getOverzoomParameters(t),_apitilesTileId:s};a.request.collectResourceTiming=this[i(3584)];let l="RT";if(t.actor&&"expired"!==t[i(3158)]){if("loading"===t.state)return new Promise(((e,r)=>{t[i(2205)]={resolve:e,reject:r}}))}else t[i(2762)]=this.dispatcher.getActor(),l="LT";t[i(657)]=new AbortController;try{const e=yield t.actor[i(614)]({type:l,data:a},t[i(657)]);if(delete t[i(657)],t.aborted)return;this._afterTileLoadWorkerResponse(t,e)}catch(e){if(delete t.abortController,t[i(2195)])return;if(e&&404!==e.status)throw e;this._afterTileLoadWorkerResponse(t,null)}}))}_getOverzoomParameters(t){const e=i;if(t.tileID.canonical.z<=this.maxzoom)return;if(void 0===this.map[e(1871)])return;const r=t[e(3533)].scaledTo(this[e(615)])[e(842)],o=r[e(3004)](this.tiles,this.map[e(983)](),this.scheme);return{maxZoomTileID:r,overzoomRequest:this[e(1920)][e(1700)].transformRequest(o,e(2805))}}_afterTileLoadWorkerResponse(t,e){const r=i;if(e&&e.resourceTiming&&(t.resourceTiming=e.resourceTiming),e&&this[r(1920)]._refreshExpiredTiles&&t[r(940)](e),t.loadVectorData(e,this.map[r(1258)]),t.reloadPromise){const e=t[r(2205)];t[r(2205)]=null,this[r(1311)](t)[r(2654)](e.resolve)[r(2304)](e[r(2135)])}}abortTile(t){return e._(this,void 0,void 0,(function*(){const e=r;t.abortController&&(t.abortController[e(970)](),delete t.abortController),t[e(2762)]&&(yield t.actor[e(614)]({type:"AT",data:{uid:t.uid,type:this[e(2784)],source:this.id}}))}))}[i(455)](t){return e._(this,void 0,void 0,(function*(){const e=r;t.unloadVectorData(),t.actor&&(yield t[e(2762)][e(614)]({type:e(1124),data:{uid:t[e(1392)],type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class no extends e.E{constructor(t,r,o,n){const s=i;super(),this.id=t,this.dispatcher=o,this.setEventedParent(n),this.type=s(1198),this.minzoom=0,this[s(615)]=22,this[s(658)]=!0,this.scheme=s(2507),this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},r),e.e(this,e.W(r,[s(3004),"scheme",s(782)]))}load(){return e._(this,arguments,void 0,(function*(t=!1){const i=r;this._loaded=!1,this.fire(new e.o("dataloading",{dataType:i(1841)})),this._tileJSONRequest=new AbortController;try{const r=yield E(this._options,this.map._requestManager,this[i(402)]);this[i(402)]=null,this[i(1408)]=!0,r&&(e.e(this,r),r[i(2459)]&&(this.tileBounds=new ro(r[i(2459)],this[i(2045)],this[i(615)])),this[i(1430)](new e.o(i(3100),{dataType:i(1841),sourceDataType:i(1978)})),this[i(1430)](new e.o(i(3100),{dataType:i(1841),sourceDataType:i(750),sourceDataChanged:t})))}catch(t){this._tileJSONRequest=null,this[i(1408)]=!0,e.a0(t)||this.fire(new e.n(t))}}))}[i(3340)](){return this[i(1408)]}[i(3540)](t){this[i(1920)]=t,this.load()}[i(1593)](){const t=i;this[t(402)]&&(this[t(402)].abort(),this[t(402)]=null)}setSourceProperty(t){const e=i;this[e(402)]&&(this._tileJSONRequest[e(970)](),this._tileJSONRequest=null),t(),this[e(3103)](!0)}setTiles(t){return this.setSourceProperty((()=>{this[r(2764)].tiles=t})),this}setUrl(t){const e=i;return this[e(2401)]((()=>{const i=e;this[i(3004)]=t,this._options[i(3004)]=t})),this}serialize(){return e.e({},this[i(2764)])}hasTile(t){const e=i;return!this[e(2331)]||this.tileBounds[e(2287)](t[e(842)])}[i(1311)](t){return e._(this,void 0,void 0,(function*(){const i=r,o=t[i(3533)].canonical[i(3004)](this.tiles,this.map.getPixelRatio(),this.scheme);t[i(657)]=new AbortController;try{const r=yield ki.getImage(this[i(1920)][i(1700)][i(399)](o,i(2805)),t[i(657)],this.map._refreshExpiredTiles);if(delete t.abortController,t[i(2195)])return void(t[i(3158)]=i(680));if(r&&r.data){this[i(1920)]._refreshExpiredTiles&&(r.cacheControl||r[i(714)])&&t[i(940)]({cacheControl:r.cacheControl,expires:r[i(714)]});const o=this[i(1920)].painter[i(1249)],n=o.gl,s=r[i(3100)];t.texture=this[i(1920)].painter[i(1361)](s[i(1422)]),t[i(600)]?t[i(600)][i(1923)](s,{useMipmap:!0}):(t.texture=new e.T(o,s,n[i(3468)],{useMipmap:!0}),t.texture[i(2211)](n[i(1661)],n.CLAMP_TO_EDGE,n[i(3029)])),t.state="loaded"}}catch(e){if(delete t[i(657)],t[i(2195)])t.state=i(680);else if(e)throw t.state="errored",e}}))}[i(665)](t){return e._(this,void 0,void 0,(function*(){const e=r;t[e(657)]&&(t[e(657)].abort(),delete t.abortController)}))}unloadTile(t){return e._(this,void 0,void 0,(function*(){const e=r;t.texture&&this[e(1920)][e(1258)][e(885)](t[e(600)])}))}hasTransition(){return!1}}class so extends no{constructor(t,r,o,n){const s=i;super(t,r,o,n),this.type="raster-dem",this[s(615)]=22,this._options=e.e({type:s(2971)},r),this.encoding=r.encoding||"mapbox",this.redFactor=r[s(603)],this.greenFactor=r.greenFactor,this[s(1189)]=r[s(1189)],this.baseShift=r[s(2668)]}[i(1311)](t){return e._(this,void 0,void 0,(function*(){const i=r,o=t.tileID.canonical.url(this.tiles,this[i(1920)][i(983)](),this[i(2619)]),n=this[i(1920)][i(1700)].transformRequest(o,i(2805));t[i(2259)]=this._getNeighboringTiles(t.tileID),t.abortController=new AbortController;try{const r=yield ki[i(3388)](n,t.abortController,this.map._refreshExpiredTiles);if(delete t.abortController,t[i(2195)])return void(t.state=i(680));if(r&&r.data){const o=r[i(3100)];this[i(1920)][i(1246)]&&(r.cacheControl||r.expires)&&t[i(940)]({cacheControl:r[i(1689)],expires:r[i(714)]});const n=e.b(o)&&e.a2()?o:yield this.readImageNow(o),s={type:this[i(2784)],uid:t[i(1392)],source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this[i(2668)]};if(!t.actor||"expired"===t.state){t[i(2762)]=this.dispatcher.getActor();const e=yield t[i(2762)][i(614)]({type:"LDT",data:s});t[i(941)]=e,t[i(2159)]=!0,t[i(1523)]=!0,t[i(3158)]=i(3340)}}}catch(e){if(delete t.abortController,t.aborted)t.state="unloaded";else if(e)throw t[i(3158)]="errored",e}}))}[i(701)](t){return e._(this,void 0,void 0,(function*(){const i=r;if(i(2354)!=typeof VideoFrame&&e.a3()){const r=t[i(1422)]+2,o=t.height+2;try{return new e.R({width:r,height:o},yield e.a4(t,-1,-1,r,o))}catch(t){}}return zr.getImageData(t,1)}))}_getNeighboringTiles(t){const r=i,o=t.canonical,n=Math.pow(2,o.z),s=(o.x-1+n)%n,a=0===o.x?t[r(317)]-1:t[r(317)],l=(o.x+1+n)%n,c=o.x+1===n?t.wrap+1:t.wrap,h={};return h[new e.a5(t[r(903)],a,o.z,s,o.y)[r(2133)]]={backfilled:!1},h[new e.a5(t.overscaledZ,c,o.z,l,o.y)[r(2133)]]={backfilled:!1},o.y>0&&(h[new e.a5(t[r(903)],a,o.z,s,o.y-1)[r(2133)]]={backfilled:!1},h[new e.a5(t.overscaledZ,t.wrap,o.z,o.x,o.y-1)[r(2133)]]={backfilled:!1},h[new e.a5(t[r(903)],c,o.z,l,o.y-1)[r(2133)]]={backfilled:!1}),o.y+1<n&&(h[new e.a5(t.overscaledZ,a,o.z,s,o.y+1).key]={backfilled:!1},h[new e.a5(t[r(903)],t[r(317)],o.z,o.x,o.y+1).key]={backfilled:!1},h[new e.a5(t[r(903)],c,o.z,l,o.y+1).key]={backfilled:!1}),h}[i(455)](t){return e._(this,void 0,void 0,(function*(){const e=r;t[e(2128)]&&this.map.painter[e(885)](t[e(2128)]),t[e(473)]&&(t.fbo.destroy(),delete t[e(473)]),t[e(941)]&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&(yield t.actor[e(614)]({type:"RDT",data:{type:this.type,uid:t.uid,source:this.id}}))}))}}class ao extends e.E{constructor(t,r,o,n){const s=i;super(),this.id=t,this.type=s(1830),this.minzoom=0,this[s(615)]=18,this.tileSize=512,this.isTileClipped=!0,this[s(957)]=!0,this[s(2883)]=!1,this._isUpdatingWorker=!1,this[s(2701)]={data:r[s(3100)]},this.actor=o[s(2982)](),this[s(3686)](n),this[s(2026)]=s(629)==typeof r.data?{url:r.data}:{geojson:r.data},this._options=e.e({},r),this._collectResourceTiming=r.collectResourceTiming,void 0!==r.maxzoom&&(this[s(615)]=r[s(615)]),r.type&&(this.type=r.type),r[s(2020)]&&(this[s(2020)]=r.attribution),this[s(965)]=r[s(965)],void 0!==r.clusterMaxZoom&&this.maxzoom<=r.clusterMaxZoom&&e.w('The maxzoom value "'+this[s(615)]+'" is expected to be greater than the clusterMaxZoom value "'+r[s(2562)]+'".'),this.workerOptions=e.e({source:this.id,cluster:r[s(2338)]||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==r[s(2841)]?r.buffer:128),tolerance:this[s(2678)](void 0!==r.tolerance?r.tolerance:.375),extent:e.a8,maxZoom:this.maxzoom,lineMetrics:r[s(725)]||!1,generateId:r[s(1016)]||!1},superclusterOptions:{maxZoom:this._getClusterMaxZoom(r.clusterMaxZoom),minPoints:Math[s(2153)](2,r[s(1539)]||2),extent:e.a8,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties,filter:r[s(2397)]},r.workerOptions),"string"==typeof this[s(965)]&&(this.workerOptions.promoteId=this.promoteId)}[i(1488)](){const t=i;return void 0!==this._pendingWorkerUpdate[t(3100)]||void 0!==this[t(2701)][t(3083)]||this[t(2701)][t(2190)]}[i(2678)](t){return t*(e.a8/this.tileSize)}[i(2077)](t){const r=i,o=t?Math.round(t):this[r(615)]-1;return Number.isInteger(t)||void 0===t||e.w(r(934)+t+r(2092)+o+'"'),o}load(){return e._(this,void 0,void 0,(function*(){const t=r;yield this[t(1561)]()}))}[i(3540)](t){this[i(1920)]=t,this.load()}[i(3063)](t,e){const r=i;this[r(2026)]=r(629)==typeof t?{url:t}:{geojson:t},this[r(2701)]={data:t};const o=this._updateWorkerData();return e?o:this}[i(1671)](t,r){const o=i;this[o(2701)].diff=e.a9(this[o(2701)].diff,t);const n=this[o(1561)]();return r?n:this}[i(2499)](){return e._(this,void 0,void 0,(function*(){const t=r,i=e.e({type:this[t(2784)]},this[t(1695)]);return this[t(2762)].sendAsync({type:"GD",data:i})}))}[i(1876)](){return e._(this,void 0,void 0,(function*(){const t=r;return O(yield this[t(2499)]())}))}[i(3595)](t){const e=i;return this[e(1695)].cluster=t[e(2338)],void 0!==t.clusterRadius&&(this[e(1695)].superclusterOptions.radius=this[e(2678)](t.clusterRadius)),void 0!==t[e(2562)]&&(this.workerOptions[e(3449)][e(1239)]=this._getClusterMaxZoom(t[e(2562)])),this[e(2701)][e(2190)]=!0,this[e(1561)](),this}[i(3036)](t){const e=i;return this[e(2762)].sendAsync({type:"GCEZ",data:{type:this[e(2784)],clusterId:t,source:this.id}})}[i(1114)](t){return this.actor.sendAsync({type:i(2852),data:{type:this.type,clusterId:t,source:this.id}})}[i(369)](t,e,r){const o=i;return this[o(2762)][o(614)]({type:"GCL",data:{type:this[o(2784)],source:this.id,clusterId:t,limit:e,offset:r}})}[i(1561)](){return e._(this,void 0,void 0,(function*(){const t=r;if(this[t(2319)])return;if(!this._hasPendingWorkerUpdate())return void e.w(t(1031)+this.id+".");const{data:i,diff:o}=this[t(2701)],n=e.e({type:this.type},this.workerOptions);void 0!==i?("string"==typeof i?(n.request=this.map[t(1700)][t(399)](zr[t(2880)](i),t(410)),n[t(3255)].collectResourceTiming=this[t(3584)]):n[t(3100)]=i,this[t(2701)][t(3100)]=void 0):o&&(n[t(3647)]=o,this._pendingWorkerUpdate[t(3083)]=void 0),this._pendingWorkerUpdate[t(2190)]=void 0,this[t(2319)]=!0,this.fire(new e.o("dataloading",{dataType:"source"}));try{const i=yield this.actor[t(614)]({type:"LD",data:n});if(this[t(2319)]=!1,this._removed||i[t(1511)])return void this.fire(new e.o("dataabort",{dataType:t(1841)}));i.data&&(this[t(2026)]={geojson:i.data});const r=this[t(688)](o),s=this._getShouldReloadTileOptions(r);let a=null;i.resourceTiming&&i.resourceTiming[this.id]&&(a=i[t(1470)][this.id][t(1557)](0));const l={dataType:t(1841)};this[t(3584)]&&a&&a[t(953)]>0&&e.e(l,{resourceTiming:a}),this[t(1430)](new e.o("data",Object[t(2132)](Object[t(2132)]({},l),{sourceDataType:t(1978)}))),this[t(1430)](new e.o(t(3100),Object[t(2132)](Object.assign({},l),{sourceDataType:t(750),shouldReloadTileOptions:s})))}catch(i){if(this._isUpdatingWorker=!1,this[t(2883)])return void this[t(1430)](new e.o("dataabort",{dataType:t(1841)}));this.fire(new e.n(i))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}}))}_applyDiffToSource(t){const r=i;if(!t)return;const o=r(629)==typeof this.promoteId?this[r(965)]:void 0;if(!this._data[r(3004)]&&!this._data.updateable){const t=e.aa(this._data[r(1830)],o);if(!t)throw new Error(r(1892)+this.id+r(392));this._data={updateable:t}}if(!this[r(2026)].updateable)return;const n=e.ab(this._data.updateable,t,o);return t.removeAll||this[r(2764)].cluster?void 0:n}[i(933)](t){if(t)return{affectedBounds:t.filter(Boolean).map((t=>O(t)))}}[i(2067)](t,{affectedBounds:r}){const o=i;if(o(1717)===t.state)return!0;if(o(680)===t[o(3158)])return!1;const{buffer:n,extent:s}=this.workerOptions.geojsonVtOptions,a=function({x:t,y:i,z:r},n=0){const s=o,a=e.a6((t-n)/Math[s(2916)](2,r)),l=e.a7((i+1+n)/Math[s(2916)](2,r)),c=e.a6((t+1+n)/Math.pow(2,r)),h=e.a7((i-n)/Math.pow(2,r));return new io([a,l],[c,h])}(t[o(3533)].canonical,n/s);for(const t of r)if(a[o(1162)](t))return!0;return!1}[i(3340)](){return!this._isUpdatingWorker&&!this[i(1488)]()}[i(1311)](t){return e._(this,void 0,void 0,(function*(){const e=r,i=t[e(2762)]?"RT":"LT";t.actor=this[e(2762)];const o={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t[e(3533)].overscaledZ,maxZoom:this[e(615)],tileSize:this.tileSize,source:this.id,pixelRatio:this[e(1920)][e(983)](),showCollisionBoxes:this[e(1920)][e(3106)],promoteId:this[e(965)],subdivisionGranularity:this.map.style.projection[e(3532)]};t[e(657)]=new AbortController;const n=yield this[e(2762)].sendAsync({type:i,data:o},t.abortController);delete t.abortController,t[e(2385)](),t.aborted||t[e(2508)](n,this[e(1920)].painter,"RT"===i)}))}[i(665)](t){return e._(this,void 0,void 0,(function*(){const e=r;t[e(657)]&&(t.abortController[e(970)](),delete t[e(657)]),t.aborted=!0}))}[i(455)](t){return e._(this,void 0,void 0,(function*(){t.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:t.uid,type:this.type,source:this.id}})}))}[i(1593)](){const t=i;this._removed=!0,this[t(2762)].sendAsync({type:"RS",data:{type:this[t(2784)],source:this.id}})}serialize(){const t=i;return e.e({},this[t(2764)],{type:this.type,data:this._data[t(2138)]?{type:t(837),features:Array.from(this[t(2026)].updateable[t(2007)]())}:this._data.url||this._data[t(1830)]})}hasTransition(){return!1}}class lo extends e.E{constructor(t,e,r,o){const n=i;super(),this.flippedWindingOrder=!1,this.id=t,this.dispatcher=r,this.coordinates=e[n(1299)],this[n(2784)]=n(1873),this[n(2045)]=0,this[n(615)]=22,this.tileSize=512,this.tiles={},this[n(1408)]=!1,this.setEventedParent(o),this.options=e}[i(3103)](t){return e._(this,void 0,void 0,(function*(){const i=r;this[i(1408)]=!1,this[i(1430)](new e.o(i(1757),{dataType:i(1841)})),this[i(3004)]=this[i(1666)][i(3004)],this[i(2084)]=new AbortController;try{const e=yield ki.getImage(this.map._requestManager.transformRequest(this.url,i(3438)),this._request);this[i(2084)]=null,this._loaded=!0,e&&e.data&&(this.image=e[i(3100)],t&&(this.coordinates=t),this._finishLoading())}catch(t){this[i(2084)]=null,this[i(1408)]=!0,e.a0(t)||this.fire(new e.n(t))}}))}[i(3340)](){return this[i(1408)]}[i(1679)](t){const e=i;return t[e(3004)]?(this[e(2084)]&&(this[e(2084)][e(970)](),this[e(2084)]=null),this.options[e(3004)]=t.url,this.load(t[e(1299)])[e(3351)]((()=>{this.texture=null})),this):this}_finishLoading(){const t=i;this[t(1920)]&&(this.setCoordinates(this.coordinates),this.fire(new e.o(t(3100),{dataType:t(1841),sourceDataType:t(1978)})))}onAdd(t){this[i(1920)]=t,this.load()}onRemove(){const t=i;this[t(2084)]&&(this[t(2084)].abort(),this._request=null)}setCoordinates(t){const r=i;this[r(1299)]=t;const o=t[r(1920)](e.ac.fromLngLat);var n;return this[r(3533)]=function(t){const i=r,o=e.ad.fromPoints(t),n=o.width(),s=o[i(3282)](),a=Math.max(n,s),l=Math.max(0,Math[i(2700)](-Math[i(1163)](a)/Math.LN2)),c=Math[i(2916)](2,l);return new e.af(l,Math[i(2700)]((o[i(2164)]+o[i(798)])/2*c),Math.floor((o.minY+o[i(1160)])/2*c))}(o),this.terrainTileRanges=this[r(1872)](o),this.minzoom=this[r(615)]=this.tileID.z,this[r(893)]=o.map((t=>this.tileID.getTilePoint(t)[r(2264)]())),this.flippedWindingOrder=((n=this[r(893)])[1].x-n[0].x)*(n[2].y-n[0].y)-(n[1].y-n[0].y)*(n[2].x-n[0].x)<0,this[r(1430)](new e.o("data",{dataType:"source",sourceDataType:"content"})),this}[i(2626)](){const t=i;if(0===Object[t(3680)](this.tiles).length||!this[t(1873)])return;const r=this.map[t(1258)].context,o=r.gl;this.texture||(this[t(600)]=new e.T(r,this[t(1873)],o.RGBA),this[t(600)].bind(o.LINEAR,o[t(2557)]));let n=!1;for(const e in this.tiles){const i=this.tiles[e];"loaded"!==i[t(3158)]&&(i.state=t(3340),i.texture=this.texture,n=!0)}n&&this[t(1430)](new e.o("data",{dataType:"source",sourceDataType:t(3216),sourceId:this.id}))}loadTile(t){return e._(this,void 0,void 0,(function*(){const e=r;this[e(3533)]&&this.tileID[e(2586)](t[e(3533)].canonical)?(this[e(1e3)][String(t.tileID.wrap)]=t,t.buckets={}):t[e(3158)]=e(1932)}))}[i(624)](){const t=i;return{type:"image",url:this[t(1666)].url,coordinates:this[t(1299)]}}hasTransition(){return!1}_getOverlappingTileRanges(t){const r=i,{minX:o,minY:n,maxX:s,maxY:a}=e.ad[r(1056)](t),l={};for(let t=0;t<=e.ae;t++){const e=Math[r(2916)](2,t),i=Math[r(2700)](o*e),c=Math[r(2700)](n*e),h=Math[r(2700)](s*e),u=Math.floor(a*e),d=(i%e+e)%e,p=h%e,f=Math.floor(i/e),m=Math[r(2700)](h/e);l[t]={minWrap:f,maxWrap:m,minTileXWrapped:d,maxTileXWrapped:p,minTileY:c,maxTileY:u}}return l}}class co extends lo{constructor(t,e,r,o){const n=i;super(t,e,r,o),this[n(658)]=!0,this[n(2784)]=n(1655),this[n(1666)]=e}[i(3103)](){return e._(this,void 0,void 0,(function*(){const t=r;this[t(1408)]=!1;const i=this.options;this[t(2932)]=[];for(const e of i[t(2932)])this[t(2932)].push(this[t(1920)]._requestManager[t(399)](e,"Source")[t(3004)]);try{const i=yield e.ag(this[t(2932)]);if(this._loaded=!0,!i)return;this.video=i,this.video[t(349)]=!0,this[t(1655)][t(2689)](t(3300),(()=>{const e=t;this[e(1920)][e(1106)]()})),this[t(1920)]&&this[t(1655)].play(),this[t(334)]()}catch(t){this.fire(new e.n(t))}}))}pause(){this[i(1655)]&&this.video.pause()}play(){this.video&&this[i(1655)].play()}[i(3328)](t){const r=i;if(this[r(1655)]){const i=this[r(1655)][r(2396)];t<i[r(1191)](0)||t>i.end(0)?this[r(1430)](new e.n(new e.ah("sources."+this.id,null,"Playback for this video can be set only between the "+i[r(1191)](0)+r(1211)+i[r(2049)](0)+"-second mark."))):this[r(1655)].currentTime=t}}getVideo(){return this[i(1655)]}[i(3540)](t){const e=i;this[e(1920)]||(this.map=t,this[e(3103)](),this.video&&(this.video[e(2028)](),this[e(2761)](this[e(1299)])))}[i(2626)](){const t=i;if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const r=this[t(1920)].painter.context,o=r.gl;this.texture?this.video.paused||(this.texture.bind(o[t(1661)],o.CLAMP_TO_EDGE),o[t(1522)](o[t(2541)],0,0,0,o[t(3468)],o.UNSIGNED_BYTE,this[t(1655)])):(this[t(600)]=new e.T(r,this[t(1655)],o.RGBA),this.texture[t(2211)](o.LINEAR,o.CLAMP_TO_EDGE));let n=!1;for(const e in this.tiles){const i=this[t(1e3)][e];t(3340)!==i.state&&(i[t(3158)]=t(3340),i[t(600)]=this[t(600)],n=!0)}n&&this[t(1430)](new e.o("data",{dataType:t(1841),sourceDataType:t(3216),sourceId:this.id}))}serialize(){const t=i;return{type:t(1655),urls:this[t(2932)],coordinates:this.coordinates}}[i(377)](){return this.video&&!this.video[i(2147)]}}class ho extends lo{constructor(t,r,o,n){const s=i;super(t,r,o,n),r[s(1299)]?Array.isArray(r[s(1299)])&&4===r[s(1299)][s(953)]&&!r.coordinates[s(1096)]((t=>!Array[s(2667)](t)||2!==t[s(953)]||t.some((t=>s(2534)!=typeof t))))||this.fire(new e.n(new e.ah(s(3394)+t,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.n(new e.ah("sources."+t,null,s(2949)))),r[s(2543)]&&"boolean"!=typeof r.animate&&this[s(1430)](new e.n(new e.ah("sources."+t,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r[s(1174)]||r[s(1174)]instanceof HTMLCanvasElement||this.fire(new e.n(new e.ah(s(3394)+t,null,s(3630)))):this.fire(new e.n(new e.ah(s(3394)+t,null,s(2685)))),this.options=r,this.animate=void 0===r[s(2543)]||r[s(2543)]}[i(3103)](){return e._(this,void 0,void 0,(function*(){const t=r;this._loaded=!0,this[t(1174)]||(this[t(1174)]=this[t(1666)][t(1174)]instanceof HTMLCanvasElement?this.options.canvas:document[t(1353)](this.options.canvas)),this.width=this[t(1174)][t(1422)],this[t(3282)]=this.canvas[t(3282)],this[t(3623)]()?this[t(1430)](new e.n(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){const e=t;this[e(372)]=!0,this[e(1920)].triggerRepaint()},this.pause=function(){this._playing&&(this[t(2626)](),this._playing=!1)},this[t(334)]())}))}getCanvas(){return this[i(1174)]}[i(3540)](t){const e=i;this[e(1920)]=t,this.load(),this[e(1174)]&&this.animate&&this[e(2028)]()}onRemove(){this[i(1994)]()}[i(2626)](){const t=i;let r=!1;if(this[t(1174)][t(1422)]!==this.width&&(this[t(1422)]=this[t(1174)].width,r=!0),this.canvas[t(3282)]!==this.height&&(this[t(3282)]=this.canvas.height,r=!0),this._hasInvalidDimensions())return;if(0===Object[t(3680)](this[t(1e3)])[t(953)])return;const o=this.map.painter[t(1249)],n=o.gl;this[t(600)]?(r||this[t(372)])&&this.texture.update(this[t(1174)],{premultiply:!0}):(this[t(600)]=new e.T(o,this[t(1174)],n.RGBA,{premultiply:!0}),this.texture[t(2211)](n.LINEAR,n.CLAMP_TO_EDGE));let s=!1;for(const e in this.tiles){const i=this.tiles[e];"loaded"!==i[t(3158)]&&(i[t(3158)]=t(3340),i[t(600)]=this[t(600)],s=!0)}s&&this[t(1430)](new e.o("data",{dataType:t(1841),sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this[i(372)]}_hasInvalidDimensions(){const t=i;for(const e of[this[t(1174)].width,this[t(1174)][t(3282)]])if(isNaN(e)||e<=0)return!0;return!1}}const uo={},po=i(1188);class fo extends e.E{constructor(){const t=i;super(...arguments),this[t(2279)]=t(3232),this.url=null,this.dispatcher=(to||(to=new eo(I(),e.O),to.registerMessageHandler("GR",((t,i,r)=>e.m(i,r)))),to)}[i(2970)](t){const e=i;return this[e(2279)]=t,this[e(3416)].broadcast("SRPS",{pluginStatus:t,pluginURL:this.url}).catch((t=>{throw this.status="error",t}))}[i(3161)](){return this[i(2279)]}clearRTLTextPlugin(){const t=i;this[t(2279)]="unavailable",this[t(3004)]=null}[i(687)](t){return e._(this,arguments,void 0,(function*(t,e=!1){const i=r;if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=zr.resolveURL(t),!this.url)throw new Error(i(3012)+t+" is invalid");if(i(3232)===this.status){if(!e)return this._requestImport();this.status=i(2917),this[i(2970)](this.status)}else if("requested"===this.status)return this._requestImport()}))}[i(2693)](){return e._(this,void 0,void 0,(function*(){const t=r;yield this._syncState(t(1717)),this[t(2279)]=t(3340),this[t(1430)](new e.o(po))}))}lazyLoad(){const t=i;"unavailable"===this.status?this.status=t(3056):t(2917)===this.status&&this._requestImport()}}let mo=null;!function(t){const e=i;t[t[e(1101)]=0]=e(1101),t[t.Parent=1]="Parent"}(Ei||(Ei={})),function(t){const e=i;t[t.Departing=0]="Departing",t[t[e(822)]=1]="Incoming"}(zi||(zi={}));class _o{constructor(t,r){const o=i;this[o(3642)]=0,this.fadeEndTime=0,this.fadeOpacity=1,this[o(3533)]=t,this.uid=e.ai(),this.uses=0,this[o(782)]=r,this.buckets={},this[o(2110)]=null,this[o(908)]=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this[o(3329)]=[],this.rttCoords={},this[o(2407)]=0,this[o(3158)]="loading"}isRenderable(t){const e=i;return this[e(3526)]()&&(!this[e(1080)]||this[e(711)]>0)&&(t||!this[e(834)]())}setCrossFadeLogic({fadingRole:t,fadingDirection:e,fadingParentID:r,fadeEndTime:o}){const n=i;this.resetFadeLogic(),this[n(621)]=t,this.fadingDirection=e,this.fadingParentID=r,this[n(1080)]=o}[i(3005)](t){const e=i;this.resetFadeLogic(),this.selfFading=!0,this[e(1080)]=t}[i(3052)](){const t=i;this[t(621)]=null,this[t(316)]=null,this[t(3409)]=null,this.selfFading=!1,this.timeAdded=c(),this[t(1080)]=0,this[t(711)]=1}[i(468)](){const t=i;return t(1932)===this.state||"loaded"===this.state||"reloading"===this[t(3158)]}clearTextures(t){const e=i;this[e(2128)]&&t[e(885)](this.demTexture),this[e(2128)]=null}loadVectorData(t,r,o){const n=i;if(this.hasData()&&this[n(2385)](),this.state=n(3340),t){t.featureIndex&&(this[n(2125)]=t[n(774)],t[n(2078)]?(this[n(2283)]=t.rawTileData,this.latestFeatureIndex[n(2078)]=t[n(2078)],this.latestFeatureIndex[n(2740)]=t[n(2740)]):this.latestRawTileData&&(this.latestFeatureIndex[n(2078)]=this.latestRawTileData,this.latestFeatureIndex.encoding=this[n(2745)])),this.collisionBoxArray=t[n(1129)],this[n(2692)]=function(t,e){const i=n,r={};if(!e)return r;for(const o of t){const t=o.layerIds[i(1920)]((t=>e.getLayer(t)))[i(2397)](Boolean);if(0!==t.length){o.layers=t,o[i(695)]&&(o.stateDependentLayers=o[i(695)][i(1920)]((e=>t[i(2397)]((t=>t.id===e))[0])));for(const e of t)r[e.id]=o}}return r}(t.buckets,null==r?void 0:r[n(1048)]),this.hasSymbolBuckets=!1;for(const t in this[n(2692)]){const i=this.buckets[t];if(i instanceof e.ak){if(this.hasSymbolBuckets=!0,!o)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this[n(1599)])for(const t in this.buckets){const i=this[n(2692)][t];if(i instanceof e.ak&&i.hasRTLText){this.hasRTLText=!0,R().lazyLoad();break}}this[n(908)]=0;for(const t in this[n(2692)]){const e=this[n(2692)][t];this[n(908)]=Math[n(2153)](this.queryPadding,r[n(1048)].getLayer(t)[n(435)](e))}t.imageAtlas&&(this[n(792)]=t.imageAtlas),t.glyphAtlasImage&&(this[n(540)]=t.glyphAtlasImage),this.dashPositions=t[n(2012)]}else this.collisionBoxArray=new e.aj}[i(2385)](){const t=i;for(const e in this[t(2692)])this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this[t(792)]&&(this[t(792)]=null),this[t(357)]&&this[t(357)].destroy(),this[t(2012)]&&(this.dashPositions=null),this[t(2125)]=null,this.state="unloaded"}getBucket(t){return this.buckets[t.id]}[i(2992)](t){const r=i;for(const e in this.buckets){const i=this[r(2692)][e];i.uploadPending()&&i[r(2992)](t)}const o=t.gl;this[r(792)]&&!this[r(792)].uploaded&&(this[r(2987)]=new e.T(t,this[r(792)][r(1873)],o.RGBA),this[r(792)][r(1222)]=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(t,this.glyphAtlasImage,o.ALPHA),this.glyphAtlasImage=null)}prepare(t){const e=i;this[e(792)]&&this.imageAtlas[e(3381)](t,this.imageAtlasTexture)}queryRenderedFeatures(t,e,r,o,n,s,a,l,c,h,u){const d=i;return this.latestFeatureIndex&&this[d(2125)].rawTileData?this[d(2125)].query({queryGeometry:o,cameraQueryGeometry:n,scale:s,tileSize:this.tileSize,pixelPosMatrix:h,transform:l,params:a,queryPadding:this[d(908)]*c,getElevation:u},t,e,r):{}}[i(492)](t,r){const o=i,n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;const s=n.loadVTLayers(),a=r&&r[o(1992)]?r[o(1992)]:"",l=s[e.al]||s[a];if(!l)return;const c=e.am(null==r?void 0:r[o(2397)],null==r?void 0:r[o(2353)]),{z:h,x:u,y:d}=this[o(3533)].canonical,p={z:h,x:u,y:d};for(let i=0;i<l.length;i++){const r=l[o(2886)](i);if(c[o(2418)]){const t=e.an(r,!0);if(!c.filter(new e.K(this[o(3533)].overscaledZ),t,this[o(3533)].canonical))continue}else if(!c[o(2397)](new e.K(this.tileID[o(903)]),r))continue;const s=n[o(759)](r,a),f=new e.ao(r,h,u,d,s);f[o(1804)]=p,t.push(f)}}[i(3526)](){const t=i;return t(3340)===this[t(3158)]||t(677)===this[t(3158)]||"expired"===this[t(3158)]}[i(992)](){return this.imageAtlas&&!!Object.keys(this[i(792)].patternPositions).length}setExpiryData(t){const r=i,o=this[r(2110)];if(t[r(1689)]){const i=e.ap(t[r(1689)]);i[r(3649)]&&(this.expirationTime=Date.now()+1e3*i["max-age"])}else t.expires&&(this.expirationTime=new Date(t[r(714)])[r(2348)]());if(this.expirationTime){const t=Date.now();let e=!1;if(this.expirationTime>t)e=!1;else if(o)if(this.expirationTime<o)e=!0;else{const i=this.expirationTime-o;i?this.expirationTime=t+Math[r(2153)](i,3e4):e=!0}else e=!0;e?(this.expiredRequestCount++,this[r(3158)]="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){const t=i;if(this.expirationTime)return this[t(2407)]?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date)[t(2348)](),Math.pow(2,31)-1)}setFeatureState(t,r){const o=i;if(!this.latestFeatureIndex||!this[o(2125)][o(2078)]||0===Object.keys(t).length)return;const n=this[o(2125)].loadVTLayers();for(const i in this[o(2692)]){if(!r.style[o(2767)](i))continue;const s=this.buckets[i],a=s.layers[0].sourceLayer||e.al,l=n[a],c=t[a];if(!l||!c||0===Object.keys(c).length)continue;s[o(1923)](c,l,this.imageAtlas&&this.imageAtlas.patternPositions||{},this[o(2012)]||{});const h=r&&r[o(1048)]&&r.style.getLayer(i);h&&(this.queryPadding=Math[o(2153)](this[o(908)],h.queryRadius(s)))}}holdingForSymbolFade(){return void 0!==this[i(929)]}[i(1987)](){return!this.symbolFadeHoldUntil||this[i(929)]<c()}clearSymbolFadeHold(){this.symbolFadeHoldUntil=void 0}[i(3476)](t){this[i(929)]=c()+t}setDependencies(t,e){const r=i,o={};for(const t of e)o[t]=!0;this[r(576)][t]=o}[i(2034)](t,e){const r=i;for(const i of t){const t=this[r(576)][i];if(t)for(const i of e)if(t[i])return!0}return!1}}class yo{constructor(){const t=i;this[t(3158)]={},this.stateChanges={},this[t(3090)]={}}updateState(t,r,o){const n=i,s=String(r);if(this[n(1644)][t]=this.stateChanges[t]||{},this[n(1644)][t][s]=this.stateChanges[t][s]||{},e.e(this.stateChanges[t][s],o),null===this[n(3090)][t]){this[n(3090)][t]={};for(const e in this.state[t])e!==s&&(this[n(3090)][t][e]=null)}else if(this[n(3090)][t]&&null===this.deletedStates[t][s]){this[n(3090)][t][s]={};for(const e in this.state[t][s])o[e]||(this[n(3090)][t][s][e]=null)}else for(const e in o)this[n(3090)][t]&&this.deletedStates[t][s]&&null===this[n(3090)][t][s][e]&&delete this[n(3090)][t][s][e]}removeFeatureState(t,e,r){const o=i;if(null===this[o(3090)][t])return;const n=String(e);if(this[o(3090)][t]=this[o(3090)][t]||{},r&&void 0!==e)null!==this.deletedStates[t][n]&&(this[o(3090)][t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e)if(this[o(1644)][t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this[o(3090)][t][n][r]=null;else this.deletedStates[t][n]=null;else this[o(3090)][t]=null}getState(t,r){const o=i,n=String(r),s=e.e({},(this[o(3158)][t]||{})[n],(this.stateChanges[t]||{})[n]);if(null===this.deletedStates[t])return{};if(this[o(3090)][t]){const e=this.deletedStates[t][r];if(null===e)return{};for(const t in e)delete s[t]}return s}[i(411)](t,e){t[i(361)](this.state,e)}coalesceChanges(t,r){const o=i,n={};for(const t in this.stateChanges){this[o(3158)][t]=this[o(3158)][t]||{};const i={};for(const r in this.stateChanges[t])this[o(3158)][t][r]||(this[o(3158)][t][r]={}),e.e(this.state[t][r],this[o(1644)][t][r]),i[r]=this.state[t][r];n[t]=i}for(const t in this[o(3090)]){this[o(3158)][t]=this[o(3158)][t]||{};const i={};if(null===this.deletedStates[t])for(const e in this.state[t])i[e]={},this.state[t][e]={};else for(const e in this.deletedStates[t]){if(null===this[o(3090)][t][e])this[o(3158)][t][e]={};else for(const i of Object[o(3680)](this[o(3090)][t][e]))delete this[o(3158)][t][e][i];i[e]=this.state[t][e]}n[t]=n[t]||{},e.e(n[t],i)}this[o(1644)]={},this[o(3090)]={},0!==Object.keys(n)[o(953)]&&t.setFeatureState(n,r)}}const go=89.25,vo=Z(9.314,3),xo=e.ad[i(1056)]([new e.P(0,0),new e.P(e.a8,e.a8)]);class bo{constructor(){this[i(2563)]={}}handleWrapJump(t){const e=i,r={};for(const i in this[e(2563)]){const o=this._tiles[i];o[e(3533)]=o[e(3533)][e(2189)](o.tileID[e(317)]+t),r[o[e(3533)][e(2133)]]=o}this[e(2563)]=r}setFeatureState(t,e){for(const i in this._tiles)this._tiles[i].setFeatureState(t,e)}getAllTiles(){return Object.values(this[i(2563)])}[i(2537)](t=!1){const r=i;return t?Object.values(this._tiles).map((t=>t[r(3533)])).sort(e.az).map((t=>t.key)):Object.keys(this._tiles)}[i(3317)](t){return this._tiles[t]}setTile(t,e){this[i(2563)][t]=e}deleteTileById(t){delete this._tiles[t]}[i(2717)](t){const e=this.getTileById(t[i(2133)]);return(null==e?void 0:e.hasData())?e:null}[i(1433)](t,e=!1){var r;return null===(r=this[i(3317)](t))||void 0===r?void 0:r.isRenderable(e)}getRenderableIds(t=0,r){const o=i,n=[];for(const t of this.getAllIds())this.isIdRenderable(t,r)&&n[o(2315)](this[o(3317)](t));return r?n.sort(((i,r)=>{const n=o,s=i.tileID,a=r[n(3533)],l=new e.P(s[n(842)].x,s[n(842)].y)[n(2527)](-t),c=new e.P(a[n(842)].x,a[n(842)].y)[n(2527)](-t);return s.overscaledZ-a[n(903)]||c.y-l.y||c.x-l.x}))[o(1920)]((t=>t[o(3533)].key)):n.map((t=>t[o(3533)]))[o(1696)](e.az)[o(1920)]((t=>t.key))}}class wo extends e.E{constructor(t,o,n){const s=i;super(),this.id=t,this[s(3416)]=n,this.on("data",(t=>this[s(2054)](t))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on(s(3240),(()=>{const t=s;this[t(3590)]=this._source[t(3340)]()})),this._source=((t,e,i,o)=>{const n=s,a=new((t=>{const e=r;switch(t){case e(1830):return ao;case e(1873):return lo;case e(1198):return no;case"raster-dem":return so;case"vector":return oo;case e(1655):return co;case e(1174):return ho}return uo[t]})(e[n(2784)]))(t,e,i,o);if(a.id!==t)throw new Error(n(2670)+t+n(1009)+a.id);return a})(t,o,n,this),this._inViewTiles=new bo,this[s(1053)]=new e.aA(0,(t=>this[s(2170)](t))),this[s(1641)]={},this[s(450)]=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this[s(3010)]=5,this[s(868)]=new yo,this._didEmitContent=!1,this[s(2753)]=!1}[i(3540)](t){const e=i;this[e(1920)]=t,this[e(450)]=t?t[e(450)]:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source[e(3540)]&&this._source.onAdd(t)}onRemove(t){const e=i;for(const t of this._inViewTiles[e(1546)]())t[e(2385)]();this[e(854)](),this._source&&this._source[e(1593)]&&this[e(481)][e(1593)](t),this[e(544)]=new bo}[i(3340)](){const t=i;if(this[t(3590)])return!0;if(!this[t(3356)])return!1;if(!this[t(481)][t(3340)]())return!1;if(!(void 0===this[t(3523)]&&void 0===this[t(338)]||this.used||this.usedForTerrain))return!0;if(!this[t(2753)])return!1;for(const e of this[t(544)].getAllTiles())if("loaded"!==e[t(3158)]&&"errored"!==e[t(3158)])return!1;return!0}getSource(){return this[i(481)]}getState(){return this[i(868)]}pause(){this._paused=!0}[i(1459)](){const t=i;if(!this[t(2073)])return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this[t(2964)](),this.transform&&this.update(this.transform,this[t(3245)])}[i(309)](t,i,o){return e._(this,void 0,void 0,(function*(){const n=r;try{yield this[n(481)][n(1311)](t),this._tileLoaded(t,i,o)}catch(i){t[n(3158)]="errored",404!==i[n(2279)]?this._source.fire(new e.n(i,{tile:t})):this.update(this.transform,this[n(3245)])}}))}_unloadTile(t){const e=i;this._source[e(455)]&&this[e(481)][e(455)](t)}[i(3001)](t){const r=i;this[r(481)][r(665)]&&this[r(481)][r(665)](t),this[r(481)][r(1430)](new e.o(r(2974),{tile:t,coord:t.tileID,dataType:"source"}))}[i(624)](){return this._source[i(624)]()}prepare(t){const e=i;this._source.prepare&&this[e(481)][e(2626)](),this[e(868)].coalesceChanges(this[e(544)],this.map?this[e(1920)][e(1258)]:null);for(const i of this[e(544)].getAllTiles())i.upload(t),i[e(2626)](this[e(1920)][e(1048)].imageManager)}[i(3634)](){return this[i(544)].getAllIds(!0)}[i(2484)](t){var e;return this[i(544)].getRenderableIds(null===(e=this.transform)||void 0===e?void 0:e.bearingInRadians,t)}hasRenderableParent(t){const e=i,r=t.overscaledZ-1;if(r>=this[e(481)][e(2045)]){const i=this.getLoadedTile(t.scaledTo(r));if(i)return this._inViewTiles.isIdRenderable(i[e(3533)].key)}return!1}reload(t,e=void 0){const r=i;if(this[r(2073)])this[r(2910)]=!0;else{this[r(1053)].reset();for(const i of this._inViewTiles[r(2537)]()){const o=this[r(544)].getTileById(i);e&&!this._source[r(2067)](o,e)||(t?this[r(2703)](i,"expired"):r(1932)!==o.state&&this._reloadTile(i,"reloading"))}}}_reloadTile(t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=this._inViewTiles.getTileById(t);o&&("loading"!==o[e(3158)]&&(o[e(3158)]=i),yield this[e(309)](o,t,i))}))}_tileLoaded(t,r,o){const n=i;t[n(3642)]=c(),t[n(1610)]&&(t.fadeEndTime=t.timeAdded+this._rasterFadeDuration),n(886)===o&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(r,t),n(2971)===this.getSource().type&&t.dem&&function(t,e){const i=n;var r,o;const s=e[i(2484)]();for(const n of s){if(!t.neighboringTiles||!t[i(2259)][n])continue;const s=e.getTileById(n);t.neighboringTiles[n][i(398)]||tt(t,s),(null===(o=null===(r=s[i(2259)])||void 0===r?void 0:r[t[i(3533)].key])||void 0===o?void 0:o[i(398)])||tt(s,t)}}(t,this[n(544)]),this._state[n(411)](t,this.map?this.map.painter:null),t[n(2195)]||this._source.fire(new e.o(n(3100),{dataType:n(1841),tile:t,coord:t.tileID}))}[i(1192)](t){return this.getTileByID(t[i(2133)])}getTileByID(t){return this._inViewTiles.getTileById(t)}_retainLoadedChildren(t,e){const r=i,o=this._getLoadedDescendents(e),n=new Set;for(const i of e){const e=o[i.key];if(!(null==e?void 0:e.length)){n.add(i);continue}const s=i[r(903)]+wo.maxOverzooming,a=e.filter((t=>t[r(3533)].overscaledZ<=s));if(!a[r(953)]){n[r(2926)](i);continue}const l=Math[r(1141)](...a.map((t=>t.tileID[r(903)]))),c=a[r(2397)]((t=>t[r(3533)].overscaledZ===l)).map((t=>t.tileID));for(const e of c)t[e[r(2133)]]=e;this._areDescendentsComplete(c,l,i.overscaledZ)||n.add(i)}return n}_getLoadedDescendents(t){const e=i;var r;const o={};for(const i of this._inViewTiles.getAllTiles().filter((t=>t[e(3526)]())))for(const n of t)i[e(3533)][e(3491)](n)&&(o[r=n[e(2133)]]||(o[r]=[]))[e(2315)](i);return o}_areDescendentsComplete(t,e,r){const o=i;return 1===t[o(953)]&&t[0][o(720)]()?t[0][o(903)]===e:Math[o(2916)](4,e-r)===t[o(953)]}getLoadedTile(t){const e=i;return this[e(544)][e(2717)](t)}updateCacheSize(t){const r=i,o=Math.ceil(t.width/this[r(481)][r(782)])+1,n=Math.ceil(t.height/this[r(481)].tileSize)+1,s=Math[r(2700)](o*n*(null===this[r(3479)]?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this[r(3479)])),a="number"==typeof this[r(450)]?Math.min(this[r(450)],s):s;this[r(1053)][r(2327)](a)}handleWrapJump(t){const e=i,r=Math.round((t-(void 0===this._prevLng?t:this[e(3138)]))/360);this[e(3138)]=t,r&&(this[e(544)][e(1706)](r),this._resetTileReloadTimers())}update(t,r){const o=i;var n;if(!this[o(3356)]||this._paused)return;let s;if(this.transform=t,this[o(3245)]=r,this[o(501)](t),this.handleWrapJump(this[o(1847)].center.longitude),this.used||this.usedForTerrain)if(this[o(481)].tileID)s=t[o(3519)](this[o(481)][o(3533)])[o(1920)]((t=>new e.a5(t[o(842)].z,t.wrap,t[o(842)].z,t.canonical.x,t.canonical.y)));else{const e=null!==(n=this._source._zoomDataLayers)&&void 0!==n?n:[],i="vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?t.maxZoom-this.map._zoomLevelsToOverscale:this[o(481)][o(615)],a=e.length>0?Math.max(...e[o(1920)]((t=>Math.max(t[o(2803)].max,t[o(2998)])))):i;s=X(t,{tileSize:this[o(338)]?this.tileSize:this._source.tileSize,minzoom:this[o(481)].minzoom,maxzoom:a,roundZoom:!this[o(338)]&&this[o(481)][o(658)],reparseOverscaled:this[o(481)].reparseOverscaled,terrain:r,calculateTileZoom:this[o(481)][o(1473)],zoomDataLayers:e}),this._source[o(3310)]&&(s=s[o(2397)]((t=>this[o(481)].hasTile(t))))}else s=[];this[o(338)]&&(s=this[o(1146)](s));const a=0===s.length&&!this[o(2753)]&&this._didEmitContent;this._updated=!0,a&&this[o(1430)](new e.o("data",{sourceDataType:o(3216),dataType:"source",sourceId:this.id}));const l=H(t,this._source),h=this._updateRetainedTiles(s,l),u=Y(this._source[o(2784)]);u&&this._rasterFadeDuration>0&&!r&&function(t,i,r,n,s,a,l){const h=o,u=c(),d=e.ay(i);for(const e of i){const i=t.getTileById(e[h(2133)]);i.fadingDirection!==zi.Departing&&0!==i[h(711)]||i[h(3052)](),J(t,i,r,u,n,s,l)||K(t,i,r,u,a,l)||Q(i,d,u,l)||i.resetFadeLogic()}}(this._inViewTiles,s,h,this._maxFadingAncestorLevels,this[o(481)].minzoom,this[o(481)][o(615)],this[o(2660)]),u?this._cleanUpRasterTiles(h):this._cleanUpVectorTiles(h)}[i(2540)](t){const e=i;for(const i of this._inViewTiles[e(2537)]())t[i]||this._removeTile(i)}_cleanUpVectorTiles(t){const e=i;for(const i of this[e(544)].getAllIds()){const r=this[e(544)].getTileById(i);t[i]?r.clearSymbolFadeHold():r.hasSymbolBuckets?r.holdingForSymbolFade()?r[e(1987)]()&&this._removeTile(i):r.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(i)}}[i(1146)](t){const e=i,r=[];for(const i of t)if(i[e(842)].z>this._source.minzoom){const t=i.scaledTo(i[e(842)].z-1);r[e(2315)](t);const o=i[e(2193)](Math[e(2153)](this._source.minzoom,Math.min(i.canonical.z,5)));r[e(2315)](o)}return t[e(1912)](r)}releaseSymbolFadeTiles(){for(const t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).holdingForSymbolFade()&&this._removeTile(t)}_updateRetainedTiles(t,e){const r=i;var o;const n=new Set;for(const e of t)this._addTile(e)[r(3526)]()||n[r(2926)](e);const s=t.reduce(((t,e)=>(t[e[r(2133)]]=e,t)),{}),a=this._retainLoadedChildren(s,n),l={},c=Math.max(e-wo.maxUnderzooming,this._source.minzoom);for(const t of a){let e=this[r(544)][r(3317)](t[r(2133)]),i=null==e?void 0:e.wasRequested();for(let n=t.overscaledZ-1;n>=c;--n){const a=t.scaledTo(n);if(l[a.key])break;if(l[a[r(2133)]]=!0,e=this[r(1192)](a),!e&&i&&(e=this._addTile(a)),e){const t=e.hasData();if((t||!(null===(o=this[r(1920)])||void 0===o?void 0:o[r(1492)])||i)&&(s[a[r(2133)]]=a),i=e[r(468)](),t)break}}}return s}[i(2823)](t){const r=i;let o=this[r(544)].getTileById(t[r(2133)]);if(o)return o;o=this[r(1053)].getAndRemove(t),o&&(o[r(3052)](),this._setTileReloadTimer(t.key,o),o.tileID=t,this[r(868)].initializeTileState(o,this.map?this.map.painter:null));const n=o;return o||(o=new _o(t,this[r(481)][r(782)]*t[r(2556)]()),this[r(309)](o,t[r(2133)],o.state)),o.uses++,this[r(544)].setTile(t[r(2133)],o),n||this[r(481)][r(1430)](new e.o(r(1757),{tile:o,coord:o.tileID,dataType:"source"})),o}[i(1502)](t,e){const r=i;this[r(3188)](t);const o=e.getExpiryTimeout();o&&(this[r(1641)][t]=setTimeout((()=>{this._reloadTile(t,r(886)),delete this._timers[t]}),o))}[i(3188)](t){const e=this[i(1641)][t];e&&(clearTimeout(e),delete this._timers[t])}[i(1043)](){const t=i;for(const e in this._timers)clearTimeout(this[t(1641)][e]),delete this[t(1641)][e];for(const e of this[t(544)][t(2537)]()){const i=this[t(544)][t(3317)](e);this._setTileReloadTimer(e,i)}}refreshTiles(t){const e=i;for(const i of this._inViewTiles.getAllIds()){const r=this[e(544)][e(3317)](i);(this[e(544)].isIdRenderable(i)||"errored"==r[e(3158)])&&t[e(1096)]((t=>t.equals(r.tileID[e(842)])))&&this[e(2703)](i,e(886))}}_removeTile(t){const e=i,r=this._inViewTiles.getTileById(t);r&&(r[e(352)]--,this[e(544)].deleteTileById(t),this._clearTileReloadTimer(t),r.uses>0||(r.hasData()&&e(677)!==r[e(3158)]?this[e(1053)][e(2926)](r[e(3533)],r,r.getExpiryTimeout()):(r.aborted=!0,this[e(3001)](r),this._unloadTile(r))))}[i(2054)](t){const e=i;"source"===t[e(2596)]&&(e(1978)!==t[e(3576)]?"content"===t[e(3576)]&&this._sourceLoaded&&!this[e(2073)]&&(this[e(2964)](t.sourceDataChanged,t.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}[i(854)](){const t=i;this._shouldReloadOnResume=!1,this[t(2073)]=!1;for(const e of this[t(544)][t(2537)]())this._removeTile(e);this._outOfViewCache[t(2181)]()}[i(1421)](t,r,o){const n=i,s=[],a=this.transform;if(!a)return s;const l=a.getCoveringTilesDetailsProvider().allowWorldCopies(),c=o?a[n(718)](t):t,h=t=>a.screenPointToMercatorCoordinate(t,this.terrain),u=this.transformBbox(t,h,!l),d=this[n(634)](c,h,!l),p=this[n(3634)](),f=e.ad[n(1056)](d);for(let t=0;t<p.length;t++){const i=this._inViewTiles[n(3317)](p[t]);if(i.holdingForSymbolFade())continue;const o=l?[i.tileID]:[i.tileID.unwrapTo(-1),i[n(3533)].unwrapTo(0)],c=Math[n(2916)](2,a[n(3512)]-i[n(3533)].overscaledZ),h=r*i[n(908)]*e.a8/i[n(782)]/c;for(const t of o){const r=f.map((i=>t[n(722)](new e.ac(i.x,i.y))));if(r[n(1521)](h),r.intersects(xo)){const e=u.map((e=>t[n(722)](e))),r=d[n(1920)]((e=>t[n(722)](e)));s.push({tile:i,tileID:l?t:t[n(2189)](0),queryGeometry:e,cameraQueryGeometry:r,scale:c})}}}return s}[i(634)](t,r,o){const n=i;let s=t.map(r);if(o){const i=e.ad.fromPoints(t);i.shrinkBy(.001*Math[n(1141)](i[n(1422)](),i.height()));const o=i[n(1920)](r);e.ad[n(1056)](s).covers(o)||(s=s[n(1920)]((t=>t.x>.5?new e.ac(t.x-1,t.y,t.z):t)))}return s}getVisibleCoordinates(t){const e=i,r=this[e(2484)](t)[e(1920)]((t=>this[e(544)][e(3317)](t).tileID));return this.transform&&this[e(1847)][e(1953)](r),r}hasTransition(){const t=i;return!!this._source[t(377)]()||!(!Y(this[t(481)].type)||!function(e,i){const r=t;if(i<=0)return!1;const o=c();for(const t of e[r(1546)]())if(t.fadeEndTime>=o)return!0;return!1}(this._inViewTiles,this[t(2660)]))}[i(2758)](t){this[i(2660)]=t}[i(361)](t,r,o){this._state[i(3505)](t=t||e.al,r,o)}removeFeatureState(t,r,o){const n=i;this[n(868)][n(741)](t=t||e.al,r,o)}[i(2873)](t,r){return this[i(868)].getState(t=t||e.al,r)}[i(1060)](t,e,r){const o=i,n=this[o(544)][o(3317)](t);n&&n[o(1060)](e,r)}reloadTilesForDependencies(t,e){const r=i;for(const i of this[r(544)][r(2537)]())this[r(544)].getTileById(i).hasDependency(t,e)&&this[r(2703)](i,r(677));this[r(1053)].filter((i=>!i.hasDependency(t,e)))}areTilesLoaded(){const t=i;for(const e of this[t(544)].getAllTiles())if("loaded"!==e.state&&"errored"!==e[t(3158)])return!1;return!0}}wo.maxUnderzooming=10,wo.maxOverzooming=3;class To{constructor(t,e){this.reset(t,e)}reset(t,e){const r=i;this[r(1182)]=t||[],this[r(1690)]=[0];for(let t=1;t<this[r(1182)][r(953)];t++)this._distances[t]=this._distances[t-1]+this.points[t][r(2395)](this.points[t-1]);this[r(953)]=this._distances[this._distances.length-1],this[r(1022)]=Math[r(1141)](e||0,.5*this.length),this[r(443)]=this[r(953)]-2*this[r(1022)]}[i(3267)](t){const r=i;if(1===this.points.length)return this[r(1182)][0];t=e.aq(t,0,1);let o=1,n=this[r(1690)][o];const s=t*this.paddedLength+this[r(1022)];for(;n<s&&o<this._distances[r(953)];)n=this._distances[++o];const a=o-1,l=this[r(1690)][a],c=n-l,h=c>0?(s-l)/c:0;return this.points[a].mult(1-h)[r(2926)](this[r(1182)][o][r(3574)](h))}}class So{constructor(t,e,r){const o=i,n=this[o(1164)]=[],s=this.circleCells=[];this[o(1359)]=Math[o(3537)](t/r),this.yCellCount=Math.ceil(e/r);for(let t=0;t<this.xCellCount*this[o(2632)];t++)n.push([]),s.push([]);this.circleKeys=[],this.boxKeys=[],this[o(1653)]=[],this[o(1005)]=[],this.width=t,this[o(3282)]=e,this[o(2383)]=this.xCellCount/t,this.yScale=this[o(2632)]/e,this[o(3459)]=0,this.circleUid=0}keysLength(){const t=i;return this[t(2297)][t(953)]+this[t(1469)][t(953)]}[i(578)](t,e,r,o,n){const s=i;this._forEachCell(e,r,o,n,this._insertBoxCell,this.boxUid++),this[s(2297)].push(t),this.bboxes[s(2315)](e),this.bboxes.push(r),this.bboxes[s(2315)](o),this[s(1653)].push(n)}[i(1439)](t,e,r,o){const n=i;this[n(2192)](e-o,r-o,e+o,r+o,this._insertCircleCell,this[n(1775)]++),this[n(1469)].push(t),this[n(1005)].push(e),this[n(1005)][n(2315)](r),this[n(1005)].push(o)}_insertBoxCell(t,e,i,r,o,n){this.boxCells[o].push(n)}[i(3509)](t,e,r,o,n,s){this[i(3344)][n].push(s)}_query(t,e,r,o,n,s,a){const l=i;if(r<0||t>this[l(1422)]||o<0||e>this[l(3282)])return[];const c=[];if(t<=0&&e<=0&&this.width<=r&&this[l(3282)]<=o){if(n)return[{key:null,x1:t,y1:e,x2:r,y2:o}];for(let t=0;t<this[l(2297)][l(953)];t++)c[l(2315)]({key:this[l(2297)][t],x1:this.bboxes[4*t],y1:this.bboxes[4*t+1],x2:this.bboxes[4*t+2],y2:this[l(1653)][4*t+3]});for(let t=0;t<this[l(1469)][l(953)];t++){const e=this[l(1005)][3*t],i=this.circles[3*t+1],r=this.circles[3*t+2];c.push({key:this.circleKeys[t],x1:e-r,y1:i-r,x2:e+r,y2:i+r})}}else this[l(2192)](t,e,r,o,this[l(1845)],c,{hitTest:n,overlapMode:s,seenUids:{box:{},circle:{}}},a);return c}[i(1326)](t,e,r,o){return this[i(2834)](t,e,r,o,!1,null)}hitTest(t,e,r,o,n,s){const a=i;return this._query(t,e,r,o,!0,n,s)[a(953)]>0}[i(2210)](t,e,r,o,n){const s=i,a=t-r,l=t+r,c=e-r,h=e+r;if(l<0||a>this[s(1422)]||h<0||c>this.height)return!1;const u=[];return this._forEachCell(a,c,l,h,this._queryCellCircle,u,{hitTest:!0,overlapMode:o,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},n),u[s(953)]>0}[i(1845)](t,e,r,o,n,s,a,l){const c=i,{seenUids:h,hitTest:u,overlapMode:d}=a,p=this[c(1164)][n];if(null!==p){const i=this.bboxes;for(const n of p)if(!h.box[n]){h.box[n]=!0;const a=4*n,p=this.boxKeys[n];if(t<=i[a+2]&&e<=i[a+3]&&r>=i[a+0]&&o>=i[a+1]&&(!l||l(p))&&(!u||!et(d,p[c(2663)]))&&(s[c(2315)]({key:p,x1:i[a],y1:i[a+1],x2:i[a+2],y2:i[a+3]}),u))return!0}}const f=this[c(3344)][n];if(null!==f){const i=this.circles;for(const n of f)if(!h.circle[n]){h.circle[n]=!0;const a=3*n,p=this.circleKeys[n];if(this[c(844)](i[a],i[a+1],i[a+2],t,e,r,o)&&(!l||l(p))&&(!u||!et(d,p[c(2663)]))){const t=i[a],e=i[a+1],r=i[a+2];if(s.push({key:p,x1:t-r,y1:e-r,x2:t+r,y2:e+r}),u)return!0}}}return!1}[i(2500)](t,e,r,o,n,s,a,l){const c=i,{circle:h,seenUids:u,overlapMode:d}=a,p=this[c(1164)][n];if(null!==p){const t=this.bboxes;for(const e of p)if(!u.box[e]){u[c(637)][e]=!0;const i=4*e,r=this.boxKeys[e];if(this._circleAndRectCollide(h.x,h.y,h[c(3456)],t[i+0],t[i+1],t[i+2],t[i+3])&&(!l||l(r))&&!et(d,r[c(2663)]))return s.push(!0),!0}}const f=this[c(3344)][n];if(null!==f){const t=this[c(1005)];for(const e of f)if(!u[c(3217)][e]){u.circle[e]=!0;const i=3*e,r=this[c(1469)][e];if(this._circlesCollide(t[i],t[i+1],t[i+2],h.x,h.y,h[c(3456)])&&(!l||l(r))&&!et(d,r[c(2663)]))return s.push(!0),!0}}}_forEachCell(t,e,r,o,n,s,a,l){const c=i,h=this[c(2801)](t),u=this._convertToYCellCoord(e),d=this[c(2801)](r),p=this[c(1123)](o);for(let i=h;i<=d;i++)for(let h=u;h<=p;h++)if(n.call(this,t,e,r,o,this[c(1359)]*h+i,s,a,l))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}[i(1123)](t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}[i(2429)](t,e,i,r,o,n){const s=r-t,a=o-e,l=i+n;return l*l>s*s+a*a}[i(844)](t,e,r,o,n,s,a){const l=i,c=(s-o)/2,h=Math.abs(t-(o+c));if(h>c+r)return!1;const u=(a-n)/2,d=Math[l(1201)](e-(n+u));if(d>u+r)return!1;if(h<=c||d<=u)return!0;const p=h-c,f=d-u;return p*p+f*f<=r*r}}const Po=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]),Io=100;class Co{constructor(t,e=new So(t.width+200,t[i(3282)]+200,25),r=new So(t[i(1422)]+200,t[i(3282)]+200,25)){const o=i;this.transform=t,this.grid=e,this.ignoredGrid=r,this[o(2098)]=Math[o(3602)](t[o(882)]*Math.PI/180)*t[o(2862)],this.screenRightBoundary=t.width+Io,this.screenBottomBoundary=t.height+Io,this.gridRightBoundary=t.width+200,this[o(1597)]=t[o(3282)]+200,this[o(2600)]=.6}[i(2072)](t,e,r,o,n,s,a,l,c,h,u,d){const p=i,f=this[p(814)](t.anchorPointX+l[0],t[p(2730)]+l[1],n,h,d),m=r*f[p(2658)];let _;if(s||a)_=this._projectCollisionBox(t,m,o,n,s,a,l,f,h,u,d);else{const e=f.x+(u?u.x*m:0),i=f.y+(u?u.y*m:0);_={allPointsOccluded:!1,box:[e+t.x1*m,i+t.y1*m,e+t.x2*m,i+t.y2*m]}}const[y,g,v,x]=_.box,b=s?_[p(3612)]:f.isOccluded;let w=b;return w||(w=f[p(2658)]<this[p(2600)]),w||(w=!this[p(2942)](y,g,v,x)),w||p(731)!==e&&this[p(2060)][p(3441)](y,g,v,x,e,c)?{box:[y,g,v,x],placeable:!1,offscreen:!1,occluded:b}:{box:[y,g,v,x],placeable:!0,offscreen:this.isOffscreen(y,g,v,x),occluded:b}}placeCollisionCircles(t,r,o,n,s,a,l,c,h,u,d,p,f,m){const _=i,y=[],g=new e.P(r.anchorX,r.anchorY),v=this[_(1769)](g.x,g.y,a,m),x=(h?s*this[_(1847)].getPitchedTextCorrection(r.anchorX,r[_(1742)],a)/v:s*v)/e.aP,b={getElevation:m,pitchedLabelPlaneMatrix:l,lineVertexArray:o,pitchWithMap:h,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this[_(1847)],tileAnchorPoint:g,unwrappedTileID:a,width:this[_(1847)][_(1422)],height:this.transform[_(3282)],translation:f},w=lt(x,n,r[_(2584)]*x,r[_(498)]*x,!1,r,!1,b);let T=!1,S=!1,P=!0;if(w){const i=.5*d*v+p,r=new e.P(-100,-100),o=new e.P(this.screenRightBoundary,this[_(935)]),n=new To,s=w[_(353)],a=w.last;let l=[];for(let t=s[_(3156)].length-1;t>=1;t--)l[_(2315)](s.path[t]);for(let t=1;t<a[_(3156)].length;t++)l.push(a[_(3156)][t]);const f=2.5*i;if(h){const t=this[_(746)](l,b);l=t.some((t=>t[_(2925)]<=0))?[]:t.map((t=>t.point))}let m=[];if(l.length>0){const t=l[0][_(2621)](),i=l[0].clone();for(let e=1;e<l.length;e++)t.x=Math.min(t.x,l[e].x),t.y=Math.min(t.y,l[e].y),i.x=Math.max(i.x,l[e].x),i.y=Math[_(2153)](i.y,l[e].y);m=t.x>=r.x&&i.x<=o.x&&t.y>=r.y&&i.y<=o.y?[l]:i.x<r.x||t.x>o.x||i.y<r.y||t.y>o.y?[]:e.aM([l],r.x,r.y,o.x,o.y)}for(const e of m){n.reset(e,.25*i);let r=0;r=n[_(953)]<=.5*i?1:Math[_(3537)](n.paddedLength/f)+1;for(let e=0;e<r;e++){const o=e/Math[_(2153)](r-1,1),s=n.lerp(o),a=s.x+Io,l=s.y+Io;y.push(a,l,i,0);const h=a-i,d=l-i,p=a+i,f=l+i;if(P=P&&this.isOffscreen(h,d,p,f),S=S||this.isInsideGrid(h,d,p,f),"always"!==t&&this.grid[_(2210)](a,l,i,t,u)&&(T=!0,!c))return{circles:[],offscreen:!1,collisionDetected:T}}}}return{circles:!c&&T||!S||v<this[_(2600)]?[]:y,offscreen:P,collisionDetected:T}}[i(746)](t,i){return function(t){const e=r;let i=0,o=0,n=0,s=0;for(let r=0;r<t[e(953)];r++)t[r][e(1715)]?(n=r+1,s=0):(s++,s>o&&(o=s,i=n));return t.slice(i,i+o)}(function(t,i){const o=r,n=e.Q();return e.aE(n,i[o(2640)]),t[o(1920)]((t=>{const e=o,r=nt(t.x,t.y,n,i.getElevation),s=i[e(1847)][e(374)](r[e(2965)].x,r[e(2965)].y,i.unwrappedTileID,i.getElevation);return s.point.x=(.5*s[e(2965)].x+.5)*i.width,s.point.y=(.5*-s.point.y+.5)*i[e(3282)],s}))}(t,i))}queryRenderedSymbols(t){const r=i;if(0===t.length||0===this[r(2060)][r(2601)]()&&0===this.ignoredGrid[r(2601)]())return{};const o=[],n=new e.ad;for(const i of t){const t=new e.P(i.x+Io,i.y+Io);n.extend(t),o[r(2315)](t)}const{minX:s,minY:a,maxX:l,maxY:c}=n,h=this[r(2060)].query(s,a,l,c)[r(1912)](this.ignoredGrid.query(s,a,l,c)),u={},d={};for(const t of h){const i=t.key;if(void 0===u[i.bucketInstanceId]&&(u[i.bucketInstanceId]={}),u[i.bucketInstanceId][i[r(774)]])continue;const n=[new e.P(t.x1,t.y1),new e.P(t.x2,t.y1),new e.P(t.x2,t.y2),new e.P(t.x1,t.y2)];e.aN(o,n)&&(u[i[r(2637)]][i[r(774)]]=!0,void 0===d[i.bucketInstanceId]&&(d[i.bucketInstanceId]=[]),d[i.bucketInstanceId][r(2315)](i.featureIndex))}return d}insertCollisionBox(t,e,r,o,n,s){const a=i;(r?this[a(1878)]:this[a(2060)])[a(578)]({bucketInstanceId:o,featureIndex:n,collisionGroupID:s,overlapMode:e},t[0],t[1],t[2],t[3])}[i(2300)](t,e,r,o,n,s){const a=i,l=r?this[a(1878)]:this.grid,c={bucketInstanceId:o,featureIndex:n,collisionGroupID:s,overlapMode:e};for(let e=0;e<t[a(953)];e+=4)l.insertCircle(c,t[e],t[e+1],t[e+2])}[i(814)](t,r,o,n,s){const a=i;if(s){let i;n?(i=[t,r,n(t,r),1],e.aK(i,i,s)):(i=[t,r,0,1],xt(i,i,s));const o=i[3];return{x:(i[0]/o+1)/2*this.transform.width+Io,y:(-i[1]/o+1)/2*this.transform[a(3282)]+Io,perspectiveRatio:.5+this.transform[a(2862)]/o*.5,isOccluded:!1,signedDistanceFromCamera:o}}{const e=this[a(1847)].projectTileCoordinates(t,r,o,n);return{x:(e.point.x+1)/2*this.transform.width+Io,y:(1-e.point.y)/2*this.transform[a(3282)]+Io,perspectiveRatio:.5+this[a(1847)][a(2862)]/e.signedDistanceFromCamera*.5,isOccluded:e[a(1715)],signedDistanceFromCamera:e[a(2925)]}}}getPerspectiveRatio(t,e,r,o){const n=i,s=this.transform.projectTileCoordinates(t,e,r,o);return.5+this[n(1847)][n(2862)]/s[n(2925)]*.5}isOffscreen(t,e,r,o){return r<Io||t>=this[i(2595)]||o<Io||e>this.screenBottomBoundary}isInsideGrid(t,e,r,o){return r>=0&&t<this[i(446)]&&o>=0&&e<this.gridBottomBoundary}[i(1886)](){const t=e.au([]);return e.S(t,t,[-100,-100,0]),t}_projectCollisionBox(t,r,o,n,s,a,l,c,h,u,d){const p=i;let f=1,m=0,_=0,y=1;const g=t.anchorPointX+l[0],v=t[p(2730)]+l[1];if(a&&!s){const t=this[p(814)](g+1,v,n,h,d),e=t.x-c.x,i=Math[p(3251)]((t.y-c.y)/e)+(e<0?Math.PI:0),r=Math[p(1741)](i),o=Math[p(3602)](i);f=o,m=r,_=-r,y=o}else if(!a&&s){const t=ot(this[p(1847)]);f=t.vecEast[0],m=t.vecEast[1],_=t.vecSouth[0],y=t[p(1370)][1]}let x=c.x,b=c.y,w=r;s&&(x=g,b=v,w=Math[p(2916)](2,-(this.transform.zoom-o.overscaledZ)),w*=this.transform.getPitchedTextCorrection(g,v,n),u||(w*=e.aq(.5+c[p(2925)]/this.transform[p(2862)]*.5,0,4))),u&&(x+=f*u.x*w+_*u.y*w,b+=m*u.x*w+y*u.y*w);const T=t.x1*w,S=t.x2*w,P=(T+S)/2,I=t.y1*w,C=t.y2*w,M=(I+C)/2,A=[{offsetX:T,offsetY:I},{offsetX:P,offsetY:I},{offsetX:S,offsetY:I},{offsetX:S,offsetY:M},{offsetX:S,offsetY:C},{offsetX:P,offsetY:C},{offsetX:T,offsetY:C},{offsetX:T,offsetY:M}];let k=[];for(const{offsetX:t,offsetY:i}of A)k[p(2315)](new e.P(x+f*t+_*i,b+m*t+y*i));let E=!1;if(s){const t=k.map((t=>this[p(814)](t.x,t.y,n,h,d)));E=t[p(1096)]((t=>!t[p(1715)])),k=t.map((t=>new e.P(t.x,t.y)))}else E=!0;return{box:e.aO(k),allPointsOccluded:!E}}}class Mo{constructor(t,e,r,o){const n=i;this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):o&&r?1:0,this[n(2850)]=r}isHidden(){return 0===this.opacity&&!this.placed}}class Ao{constructor(t,e,r,o,n){const s=i;this[s(2800)]=new Mo(t?t[s(2800)]:null,e,r,n),this[s(803)]=new Mo(t?t.icon:null,e,o,n)}[i(1818)](){return this.text[i(1818)]()&&this.icon.isHidden()}}class ko{constructor(t,e,i){this.text=t,this.icon=e,this.skipFade=i}}class Eo{constructor(t,e,r,o,n){const s=i;this[s(2637)]=t,this[s(774)]=e,this[s(522)]=r,this.bucketIndex=o,this.tileID=n}}class zo{constructor(t){const e=i;this[e(862)]=t,this[e(543)]=0,this.collisionGroups={}}[i(1445)](t){const e=i;if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this[e(2512)][t]){const i=++this[e(543)];this.collisionGroups[t]={ID:i,predicate:t=>t[e(1206)]===i}}return this.collisionGroups[t]}}class Do{constructor(t,e,r,o,n){const s=i;this.transform=t[s(2621)](),this[s(3245)]=e,this.collisionIndex=new Co(this[s(1847)]),this.placements={},this[s(1319)]={},this[s(2738)]={},this[s(1950)]=!1,this.commitTime=0,this.fadeDuration=r,this[s(971)]={},this[s(2512)]=new zo(o),this[s(434)]={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n[s(1165)]=void 0),this.placedOrientations={}}_getTerrainElevationFunc(t){const e=this[i(3245)];return e?(i,r)=>e.getElevation(t,i,r):null}getBucketParts(t,r,o,n){const s=i,a=o.getBucket(r),l=o[s(2125)];if(!a||!l||r.id!==a[s(958)][0])return;const c=o[s(1129)],h=a.layers[0].layout,u=a.layers[0][s(3681)],d=Math[s(2916)](2,this[s(1847)][s(3512)]-o.tileID[s(903)]),p=o[s(782)]/e.a8,f=o[s(3533)].toUnwrapped(),m="map"===h[s(1445)](s(3258)),_=e.aQ(o,1,this[s(1847)][s(3512)]),y=e.aR(this[s(924)].transform,o,u.get("text-translate"),u[s(1445)](s(1238))),g=e.aR(this[s(924)][s(1847)],o,u.get("icon-translate"),u[s(1445)](s(3076))),v=it(m,this[s(1847)],_);this.retainedQueryData[a.bucketInstanceId]=new Eo(a.bucketInstanceId,l,a.sourceLayerIndex,a.index,o[s(3533)]);const x={bucket:a,layout:h,translationText:y,translationIcon:g,unwrappedTileID:f,pitchedLabelPlaneMatrix:v,scale:d,textPixelRatio:p,holdingForFade:o[s(834)](),collisionBoxArray:c,partiallyEvaluatedTextSize:e.aB(a.textSizeData,this[s(1847)].zoom),collisionGroup:this[s(2512)].get(a.sourceID)};if(n)for(const e of a.sortKeyRanges){const{sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:o}=e;t.push({sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:o,parameters:x})}else t[s(2315)]({symbolInstanceStart:0,symbolInstanceEnd:a[s(1181)][s(953)],parameters:x})}[i(2513)](t,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b){const w=i,T=e.aS[t.textAnchor],S=[t.textOffset0,t[w(1737)]],P=bt(T,o,n,S,s),I=this.collisionIndex.placeCollisionBox(r,p,c,h,u,l,a,y,d[w(951)],x,P,b);if((!v||this.collisionIndex[w(2072)](v,p,c,h,u,l,a,g,d[w(951)],x,P,b).placeable)&&I.placeable){let t;if(this[w(1165)]&&this.prevPlacement[w(2738)][f[w(1518)]]&&this.prevPlacement[w(754)][f.crossTileID]&&this.prevPlacement.placements[f.crossTileID][w(2800)]&&(t=this.prevPlacement.variableOffsets[f[w(1518)]].anchor),0===f.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[f[w(1518)]]={textOffset:S,width:o,height:n,anchor:T,textBoxScale:s,prevAnchor:t},this[w(1767)](m,T,f,_),m[w(2531)]&&(this.markUsedOrientation(m,_,f),this.placedOrientations[f[w(1518)]]=_),{shift:P,placedGlyphBoxes:I}}}placeLayerBucketPart(t,r,o){const n=i,{bucket:s,layout:a,translationText:l,translationIcon:c,unwrappedTileID:h,pitchedLabelPlaneMatrix:u,textPixelRatio:d,holdingForFade:p,collisionBoxArray:f,partiallyEvaluatedTextSize:m,collisionGroup:_}=t.parameters,y=a[n(1445)]("text-optional"),g=a.get(n(2451)),v=e.aT(a,"text-overlap",n(3189)),x=n(731)===v,b=e.aT(a,n(989),"icon-allow-overlap"),w="always"===b,T=n(1920)===a.get(n(3258)),S=n(1920)===a.get("text-pitch-alignment"),P=n(3322)!==a[n(1445)]("icon-text-fit"),I=n(1945)===a.get(n(2321)),C=x&&(w||!s[n(2870)]()||g),M=w&&(x||!s[n(976)]()||y);!s.collisionArrays&&f&&s[n(1418)](f);const A=this.retainedQueryData[s.bucketInstanceId][n(3533)],k=this[n(743)](A),E=this[n(1847)].getFastPathSimpleProjectionMatrix(A),z=(t,i,f)=>{const w=n;var I,z;if(r[t.crossTileID])return;if(p)return void(this[w(754)][t[w(1518)]]=new ko(!1,!1,!1));let D=!1,L=!1,O=!0,R=null,F={box:null,placeable:!1,offscreen:null,occluded:!1},j={placeable:!1},B=null,V=null,N=null,G=0,U=0,q=0;i.textFeatureIndex?G=i[w(1616)]:t[w(3116)]&&(G=t.featureIndex),i.verticalTextFeatureIndex&&(U=i.verticalTextFeatureIndex);const Z=i.textBox;if(Z){const r=i=>{const r=w;let o=e.aC[r(735)];if(s[r(2531)]&&!i&&this[r(1165)]){const e=this[r(1165)][r(2599)][t.crossTileID];e&&(this.placedOrientations[t[r(1518)]]=e,o=e,this.markUsedOrientation(s,o,t))}return o},n=(r,o)=>{const n=w;if(s.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&i[n(3018)]){for(const t of s[n(3495)])if(t===e.aC[n(3337)]?(F=o(),j=F):F=r(),F&&F.placeable)break}else F=r()},a=t.textAnchorOffsetStartIndex,u=t.textAnchorOffsetEndIndex;if(u===a){const o=(e,i)=>{const r=w,o=this.collisionIndex[r(2072)](e,v,d,A,h,S,T,l,_[r(951)],k,void 0,E);return o&&o.placeable&&(this.markUsedOrientation(s,i,t),this[r(2599)][t.crossTileID]=i),o};n((()=>o(Z,e.aC[w(735)])),(()=>{const r=i.verticalTextBox;return s[w(2531)]&&t.numVerticalGlyphVertices>0&&r?o(r,e.aC.vertical):{box:null,offscreen:null}})),r(F&&F.placeable)}else{let p=e.aS[null===(z=null===(I=this.prevPlacement)||void 0===I?void 0:I[w(2738)][t.crossTileID])||void 0===z?void 0:z.anchor];const f=(e,i,r)=>{const n=w,f=e.x2-e.x1,m=e.y2-e.y1,y=t.textBoxScale,g=P&&n(899)===b?i:null;let x=null,I=n(899)===v?1:2,C=n(899);p&&I++;for(let i=0;i<I;i++){for(let i=a;i<u;i++){const o=s[n(2303)].get(i);if(p&&o.textAnchor!==p)continue;const a=this.attemptAnchorPlacement(o,e,f,m,y,T,S,d,A,h,_,C,t,s,r,l,c,g,k);if(a&&(x=a.placedGlyphBoxes,x&&x[n(1965)]))return D=!0,R=a.shift,x}p?p=null:C=v}return o&&!x&&(x={box:this.collisionIndex[n(2072)](Z,n(731),d,A,h,S,T,l,_[n(951)],k,void 0,E)[n(637)],offscreen:!1,placeable:!1,occluded:!1}),x};n((()=>f(Z,i[w(2612)],e.aC[w(735)])),(()=>{const r=i.verticalTextBox;return s.allowVerticalPlacement&&(!F||!F.placeable)&&t.numVerticalGlyphVertices>0&&r?f(r,i[w(2552)],e.aC.vertical):{box:null,occluded:!0,offscreen:null}})),F&&(D=F.placeable,O=F[w(2465)]);const m=r(F&&F[w(1965)]);if(!D&&this.prevPlacement){const e=this[w(1165)][w(2738)][t[w(1518)]];e&&(this.variableOffsets[t[w(1518)]]=e,this.markUsedJustification(s,e[w(716)],t,m))}}}if(B=F,D=B&&B.placeable,O=B&&B.offscreen,t[w(3116)]&&t.centerJustifiedTextSymbolIndex>=0){const i=s[w(2800)][w(2983)].get(t.centerJustifiedTextSymbolIndex),r=e.aD(s.textSizeData,m,i),n=a.get(w(2751));V=this[w(924)][w(1027)](v,i,s[w(786)],s.glyphOffsetArray,r,h,u,o,S,_[w(951)],t.collisionCircleDiameter,n,l,k),V.circles[w(953)]&&V[w(2311)]&&!o&&e.w("Collisions detected, but collision boxes are not shown"),D=x||V[w(1005)].length>0&&!V.collisionDetected,O=O&&V.offscreen}if(i.iconFeatureIndex&&(q=i.iconFeatureIndex),i.iconBox){const t=t=>this[w(924)][w(2072)](t,b,d,A,h,S,T,c,_.predicate,k,P&&R?R:void 0,E);j&&j[w(1965)]&&i[w(2552)]?(N=t(i[w(2552)]),L=N[w(1965)]):(N=t(i[w(2612)]),L=N[w(1965)]),O=O&&N.offscreen}const W=y||0===t[w(2266)]&&0===t[w(3113)],H=g||0===t.numIconVertices;W||H?H?W||(L=L&&D):D=L&&D:L=D=L&&D;const X=L&&N.placeable;if(D&&B.placeable&&this[w(924)][w(3064)](B.box,v,a.get("text-ignore-placement"),s[w(2637)],j&&j[w(1965)]&&U?U:G,_.ID),X&&this[w(924)].insertCollisionBox(N[w(637)],b,a.get("icon-ignore-placement"),s.bucketInstanceId,q,_.ID),V&&D&&this[w(924)].insertCollisionCircles(V.circles,v,a[w(1445)]("text-ignore-placement"),s.bucketInstanceId,G,_.ID),o&&this[w(1328)](s.bucketInstanceId,f,i,B,N,V),0===t.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===s[w(2637)])throw new Error("bucket.bucketInstanceId can't be 0");this[w(754)][t.crossTileID]=new ko((D||C)&&!(null==B?void 0:B.occluded),(L||M)&&!(null==N?void 0:N[w(1305)]),O||s[w(925)]),r[t[w(1518)]]=!0};if(I){if(0!==t[n(2426)])throw new Error(n(686));const e=s.getSortedSymbolIndexes(-this[n(1847)][n(539)]);for(let t=e[n(953)]-1;t>=0;--t){const i=e[t];z(s.symbolInstances[n(1445)](i),s[n(2931)][i],i)}}else for(let e=t.symbolInstanceStart;e<t[n(2684)];e++)z(s.symbolInstances.get(e),s.collisionArrays[e],e);s.justReloaded=!1}[i(1328)](t,e,r,o,n,s){const a=i;if(r.textBox||r.iconBox){let i,s;this.collisionBoxArrays.has(t)?i=this.collisionBoxArrays.get(t):(i=new Map,this[a(2154)][a(571)](t,i)),i[a(2863)](e)?s=i[a(1445)](e):(s={text:null,icon:null},i.set(e,s)),r[a(3387)]&&(s.text=o[a(637)]),r[a(2612)]&&(s[a(803)]=n.box)}if(s){let e=this[a(434)][t];void 0===e&&(e=this.collisionCircleArrays[t]=[]);for(let t=0;t<s[a(1005)][a(953)];t+=4)e[a(2315)](s.circles[t+0]-Io),e.push(s.circles[t+1]-Io),e.push(s[a(1005)][t+2]),e.push(s.collisionDetected?1:0)}}markUsedJustification(t,r,o,n){const s=i;let a;a=n===e.aC.vertical?o.verticalPlacedTextSymbolIndex:{left:o[s(1234)],center:o[s(1816)],right:o.rightJustifiedTextSymbolIndex}[e.aU(r)];const l=[o.leftJustifiedTextSymbolIndex,o[s(1816)],o.rightJustifiedTextSymbolIndex,o.verticalPlacedTextSymbolIndex];for(const e of l)e>=0&&(t[s(2800)][s(2983)][s(1445)](e)[s(1518)]=a>=0&&e!==a?0:o[s(1518)])}[i(3629)](t,r,o){const n=i,s=r===e.aC[n(735)]||r===e.aC[n(488)]?r:0,a=r===e.aC.vertical?r:0,l=[o[n(1234)],o.centerJustifiedTextSymbolIndex,o[n(3673)]];for(const e of l)t[n(2800)][n(2983)][n(1445)](e)[n(1152)]=s;o[n(3615)]&&(t[n(2800)][n(2983)][n(1445)](o[n(3615)])[n(1152)]=a)}commit(t){const e=i;this[e(1076)]=t,this.zoomAtLastRecencyCheck=this.transform[e(3512)];const r=this.prevPlacement;let o=!1;this.prevZoomAdjustment=r?r[e(630)](this[e(1847)].zoom):0;const n=r?r[e(2402)](t):1,s=r?r[e(1319)]:{},a=r?r[e(2738)]:{},l=r?r[e(2599)]:{};for(const t in this[e(754)]){const i=this[e(754)][t],r=s[t];r?(this.opacities[t]=new Ao(r,n,i[e(2800)],i[e(803)]),o=o||i.text!==r.text.placed||i.icon!==r.icon.placed):(this.opacities[t]=new Ao(null,n,i[e(2800)],i.icon,i[e(959)]),o=o||i.text||i.icon)}for(const t in s){const i=s[t];if(!this.opacities[t]){const r=new Ao(i,n,!1,!1);r.isHidden()||(this.opacities[t]=r,o=o||i[e(2800)][e(2850)]||i.icon[e(2850)])}}for(const t in a)this.variableOffsets[t]||!this[e(1319)][t]||this.opacities[t][e(1818)]()||(this[e(2738)][t]=a[t]);for(const t in l)this.placedOrientations[t]||!this.opacities[t]||this.opacities[t].isHidden()||(this[e(2599)][t]=l[t]);if(r&&void 0===r[e(2868)])throw new Error(e(1613));o?this[e(2868)]=t:"number"!=typeof this.lastPlacementChangeTime&&(this[e(2868)]=r?r.lastPlacementChangeTime:t)}updateLayerOpacities(t,e){const r=i,o={};for(const i of e){const e=i.getBucket(t);e&&i.latestFeatureIndex&&t.id===e.layerIds[0]&&this[r(3432)](e,i[r(3533)],o,i.collisionBoxArray)}}updateBucketOpacities(t,r,o,n){const s=i;t[s(976)]()&&(t.text.opacityVertexArray.clear(),t[s(2800)].hasVisibleVertices=!1),t[s(2870)]()&&(t[s(803)][s(625)][s(1499)](),t[s(803)].hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t[s(3428)][s(727)][s(1499)](),t[s(1823)]()&&t.textCollisionBox.collisionVertexArray[s(1499)]();const a=t.layers[0],l=a[s(413)],c=new Ao(null,0,!1,!1,!0),h=l.get("text-allow-overlap"),u=l[s(1445)](s(872)),d=a[s(923)][s(2076)]("text-variable-anchor")||a[s(923)][s(2076)](s(2604)),p=s(1920)===l[s(1445)](s(3258)),f=s(1920)===l.get("text-pitch-alignment"),m=s(3322)!==l[s(1445)]("icon-text-fit"),_=new Ao(null,0,h&&(u||!t[s(2870)]()||l[s(1445)](s(2451))),u&&(h||!t.hasTextData()||l.get(s(1294))),!0);!t[s(2931)]&&n&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(n);const y=(t,e,i)=>{const r=s;for(let o=0;o<e/4;o++)t.opacityVertexArray[r(2225)](i);t.hasVisibleVertices=t[r(997)]||i!==No},g=this.collisionBoxArrays.get(t[s(2637)]);for(let i=0;i<t[s(1181)].length;i++){const r=t[s(1181)].get(i),{numHorizontalGlyphVertices:n,numVerticalGlyphVertices:a,crossTileID:l}=r;let h=this[s(1319)][l];o[l]?h=c:h||(h=_,this[s(1319)][l]=h),o[l]=!0;const u=r[s(1703)]>0,v=this.placedOrientations[r.crossTileID],x=v===e.aC.vertical,b=v===e.aC.horizontal||v===e.aC.horizontalOnly;if(n>0||a>0){const e=Tt(h[s(2800)]);y(t[s(2800)],n,x?No:e),y(t[s(2800)],a,b?No:e);const i=h[s(2800)][s(1818)]();[r[s(3673)],r[s(1816)],r[s(1234)]][s(799)]((e=>{const r=s;e>=0&&(t.text[r(2983)][r(1445)](e).hidden=i||x?1:0)})),r.verticalPlacedTextSymbolIndex>=0&&(t[s(2800)][s(2983)][s(1445)](r.verticalPlacedTextSymbolIndex).hidden=i||b?1:0);const o=this[s(2738)][r[s(1518)]];o&&this[s(1767)](t,o.anchor,r,v);const l=this.placedOrientations[r.crossTileID];l&&(this[s(1767)](t,"left",r,l),this.markUsedOrientation(t,l,r))}if(u){const e=Tt(h.icon),i=!(m&&r[s(2494)]&&x);r.placedIconSymbolIndex>=0&&(y(t.icon,r[s(1703)],i?e:No),t[s(803)].placedSymbolArray[s(1445)](r[s(3567)]).hidden=h.icon[s(1818)]()),r[s(2494)]>=0&&(y(t.icon,r[s(3341)],i?No:e),t.icon[s(2983)].get(r[s(2494)]).hidden=h[s(803)][s(1818)]())}const w=g&&g[s(2863)](i)?g.get(i):{text:null,icon:null};if(t.hasIconCollisionBoxData()||t[s(1823)]()){const r=t.collisionArrays[i];if(r){let i=new e.P(0,0);if(r[s(3387)]||r[s(3018)]){let e=!0;if(d){const t=this[s(2738)][l];t?(i=bt(t[s(716)],t[s(1422)],t.height,t[s(2510)],t[s(1384)]),p&&i[s(2527)](f?-this.transform[s(539)]:this.transform[s(539)])):e=!1}if(r[s(3387)]||r.verticalTextBox){let o;r[s(3387)]&&(o=x),r.verticalTextBox&&(o=b),wt(t[s(1650)].collisionVertexArray,h.text[s(2850)],!e||o,w[s(2800)],i.x,i.y)}}if(r.iconBox||r.verticalIconBox){const e=Boolean(!b&&r.verticalIconBox);let o;r[s(2612)]&&(o=e),r.verticalIconBox&&(o=!e),wt(t.iconCollisionBox[s(727)],h.icon.placed,o,w.icon,m?i.x:0,m?i.y:0)}}}}if(t[s(3536)](-this.transform.bearingInRadians),this[s(971)][t[s(2637)]]&&(this[s(971)][t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t[s(2800)][s(894)]&&t.text[s(894)][s(1671)](t.text[s(625)]),t.hasIconData()&&t[s(803)][s(894)]&&t[s(803)][s(894)][s(1671)](t[s(803)][s(625)]),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox[s(3538)][s(1671)](t.iconCollisionBox[s(727)]),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox[s(3538)].updateData(t[s(1650)][s(727)]),t.text.opacityVertexArray.length!==t.text.layoutVertexArray[s(953)]/4)throw new Error(s(1026)+t[s(2800)].opacityVertexArray[s(953)]+") !== bucket.text.layoutVertexArray.length (= "+t.text.layoutVertexArray.length+") / 4");if(t.icon.opacityVertexArray[s(953)]!==t[s(803)][s(1848)].length/4)throw new Error("bucket.icon.opacityVertexArray.length (= "+t.icon[s(625)].length+") !== bucket.icon.layoutVertexArray.length (= "+t[s(803)].layoutVertexArray[s(953)]+") / 4");t.bucketInstanceId in this[s(434)]&&(t.collisionCircleArray=this[s(434)][t.bucketInstanceId],delete this.collisionCircleArrays[t[s(2637)]])}[i(2402)](t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform[i(3512)]-t)/1.5)}[i(3626)](t){const e=i;return this[e(1950)]||t-this[e(2868)]<this[e(1316)]}stillRecent(t,e){const r=i,o=this[r(2449)]===e?1-this[r(630)](e):1;return this[r(2449)]=e,this[r(1076)]+this[r(1316)]*o>t}[i(3298)](){this[i(1950)]=!0}}const Lo=Math.pow(2,25),Oo=Math[i(2916)](2,24),Ro=Math.pow(2,17),Fo=Math.pow(2,16),jo=Math[i(2916)](2,9),Bo=Math.pow(2,8),Vo=Math.pow(2,1),No=0;class Go{constructor(t){const e=i;this[e(1846)]=e(1945)!==t[e(413)].get("symbol-z-order")&&!t.layout.get("symbol-sort-key").isConstant(),this[e(1298)]=0,this._currentPartIndex=0,this[e(3374)]={},this[e(3580)]=[]}[i(3021)](t,e,r,o,n){const s=i,a=this._bucketParts;for(;this[s(1298)]<t.length;)if(e[s(2089)](a,o,t[this[s(1298)]],this._sortAcrossTiles),this[s(1298)]++,n())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,a[s(1696)](((t,e)=>t.sortKey-e[s(2358)])));this[s(1491)]<a.length;)if(e[s(1006)](a[this[s(1491)]],this[s(3374)],r),this._currentPartIndex++,n())return!0;return!1}}class Uo{constructor(t,e,r,o,n,s,a,l){const c=i;this.placement=new Do(t,e,s,a,l),this[c(2160)]=r.length-1,this._forceFullPlacement=o,this[c(3125)]=n,this._done=!1}[i(1180)](){return this[i(2680)]}[i(3021)](t,e,r){const o=i,n=c(),s=()=>!this[o(509)]&&c()-n>2;for(;this[o(2160)]>=0;){const i=e[t[this[o(2160)]]],n=this[o(2944)].collisionIndex.transform[o(3512)];if(o(1078)===i.type&&(!i.minzoom||i.minzoom<=n)&&(!i.maxzoom||i.maxzoom>n)){if(this._inProgressLayer||(this._inProgressLayer=new Go(i)),this._inProgressLayer[o(3021)](r[i.source],this[o(2944)],this[o(3125)],i,s))return;delete this._inProgressLayer}this[o(2160)]--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const qo=512/e.a8/2;class Zo{constructor(t,r,o){const n=i;this[n(3533)]=t,this.bucketInstanceId=o,this[n(612)]={};const s=new Map;for(let t=0;t<r[n(953)];t++){const e=r.get(t),i=e[n(2133)],o=s[n(1445)](i);o?o[n(2315)](e):s.set(i,[e])}for(const[t,i]of s){const r={positions:i.map((t=>({x:Math.floor(t.anchorX*qo),y:Math.floor(t[n(1742)]*qo)}))),crossTileIDs:i[n(1920)]((t=>t.crossTileID))};if(r[n(1536)][n(953)]>128){const t=new e.aW(r.positions.length,16,Uint16Array);for(const{x:e,y:i}of r.positions)t[n(2926)](e,i);t.finish(),delete r[n(1536)],r.index=t}this[n(612)][t]=r}}getScaledCoordinates(t,r){const o=i,{x:n,y:s,z:a}=this[o(3533)].canonical,{x:l,y:c,z:h}=r.canonical,u=qo/Math[o(2916)](2,h-a),d=(c*e.a8+t.anchorY)*u,p=s*e.a8*qo;return{x:Math.floor((l*e.a8+t[o(1635)])*u-n*e.a8*qo),y:Math.floor(d-p)}}[i(2760)](t,e,r){const o=i,n=this.tileID[o(842)].z<e.canonical.z?1:Math[o(2916)](2,this[o(3533)][o(842)].z-e.canonical.z);for(let i=0;i<t.length;i++){const s=t[o(1445)](i);if(s.crossTileID)continue;const a=this._symbolsByKey[s[o(2133)]];if(!a)continue;const l=this[o(533)](s,e);if(a[o(2057)]){const t=a.index[o(2436)](l.x-n,l.y-n,l.x+n,l.y+n)[o(1696)]();for(const e of t){const t=a.crossTileIDs[e];if(!r[t]){r[t]=!0,s[o(1518)]=t;break}}}else if(a.positions)for(let t=0;t<a[o(1536)].length;t++){const e=a[o(1536)][t],i=a[o(1524)][t];if(Math.abs(e.x-l.x)<=n&&Math[o(1201)](e.y-l.y)<=n&&!r[i]){r[i]=!0,s[o(1518)]=i;break}}}}getCrossTileIDsLists(){const t=i;return Object[t(2007)](this._symbolsByKey)[t(1920)]((({crossTileIDs:t})=>t))}}class Wo{constructor(){this.maxCrossTileID=0}[i(2232)](){return++this.maxCrossTileID}}class Ho{constructor(){const t=i;this[t(1815)]={},this[t(1909)]={},this.lng=0}[i(1706)](t){const e=i,r=Math.round((t-this.lng)/360);if(0!==r)for(const t in this.indexes){const i=this.indexes[t],o={};for(const t in i){const n=i[t];n[e(3533)]=n[e(3533)][e(2189)](n.tileID[e(317)]+r),o[n.tileID.key]=n}this.indexes[t]=o}this[e(757)]=t}[i(2310)](t,e,r){const o=i;if(this[o(1815)][t[o(903)]]&&this.indexes[t[o(903)]][t.key]){if(this[o(1815)][t.overscaledZ][t[o(2133)]][o(2637)]===e[o(2637)])return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t[o(903)]][t.key])}for(let t=0;t<e[o(1181)].length;t++)e.symbolInstances.get(t)[o(1518)]=0;this.usedCrossTileIDs[t[o(903)]]||(this[o(1909)][t.overscaledZ]={});const n=this[o(1909)][t[o(903)]];for(const i in this[o(1815)]){const r=this[o(1815)][i];if(Number(i)>t[o(903)])for(const i in r){const s=r[i];s[o(3533)][o(3491)](t)&&s.findMatches(e[o(1181)],t,n)}else{const s=r[t[o(2193)](Number(i))[o(2133)]];s&&s[o(2760)](e.symbolInstances,t,n)}}for(let t=0;t<e.symbolInstances[o(953)];t++){const i=e[o(1181)].get(t);i.crossTileID||(i.crossTileID=r[o(2232)](),n[i.crossTileID]=!0)}return void 0===this[o(1815)][t[o(903)]]&&(this.indexes[t[o(903)]]={}),this.indexes[t[o(903)]][t.key]=new Zo(t,e.symbolInstances,e.bucketInstanceId),!0}[i(525)](t,e){const r=i;for(const i of e[r(3129)]())for(const e of i)delete this.usedCrossTileIDs[t][e]}removeStaleBuckets(t){const e=i;let r=!1;for(const i in this.indexes){const o=this.indexes[i];for(const n in o)t[o[n].bucketInstanceId]||(this[e(525)](i,o[n]),delete o[n],r=!0)}return r}}class Xo{constructor(){const t=i;this.layerIndexes={},this[t(1524)]=new Wo,this.maxBucketInstanceId=0,this[t(2244)]={}}addLayer(t,e,r){const o=i;let n=this.layerIndexes[t.id];void 0===n&&(n=this[o(880)][t.id]=new Ho);let s=!1;const a={};n.handleWrapJump(r);for(const i of e){const e=i[o(1148)](t);e&&t.id===e.layerIds[0]&&(e[o(2637)]||(e.bucketInstanceId=++this[o(2055)]),n.addBucket(i.tileID,e,this[o(1524)])&&(s=!0),a[e[o(2637)]]=!0)}return n.removeStaleBuckets(a)&&(s=!0),s}[i(1527)](t){const e={};t[i(799)]((t=>{e[t]=!0}));for(const t in this.layerIndexes)e[t]||delete this.layerIndexes[t]}}Di="void main() {fragColor=vec4(1.0);}";const Yo={prelude:St("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nout highp vec4 fragColor;",i(380)),projectionMercator:St("",i(2928)),projectionGlobe:St("","#define GLOBE_RADIUS 6371008.8\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); \nif (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}"),background:St("uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:St("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(3463)),circle:St(i(3102),"uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define mediump float radius\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define highp vec4 stroke_color\n#pragma maptec: define mediump float stroke_width\n#pragma maptec: define lowp float stroke_opacity\nvoid main(void) {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize mediump float radius\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize highp vec4 stroke_color\n#pragma maptec: initialize mediump float stroke_width\n#pragma maptec: initialize lowp float stroke_opacity\nvec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),circleOverlay:St(i(3451),i(1147)),clippingMask:St(Di,i(1500)),heatmap:St(i(2108),"uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;\n#pragma maptec: define highp float weight\n#pragma maptec: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma maptec: initialize highp float weight\n#pragma maptec: initialize mediump float radius\nvec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);\n#ifdef GLOBE\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\n#else\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\n#endif\n}"),heatmapTexture:St(i(2544),i(1744)),collisionBox:St("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:St("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}",i(1863)),colorRelief:St(i(1881),i(2606)),debug:St(i(3442),i(3218)),depth:St(Di,"in vec2 a_pos;void main() {\n#ifdef GLOBE\ngl_Position=projectTileFor3D(a_pos,0.0);\n#else\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\n#endif\n}"),fill:St("#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;in vec2 a_pos;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),fillOutline:St(i(1220),"uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 outline_color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 outline_color\n#pragma maptec: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillOutlinePattern:St(i(1240),"uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillPattern:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),polygonOverlay:St("#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;in vec2 a_pos;\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float opacity\ngl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),polygonOverlayPattern:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(1487)),polygonOverlayOutline:St(i(1220),i(1711)),polygonOverlayOutlinePattern:St("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillExtrusion:St("in vec4 v_color;void main() {fragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\nout vec4 v_color;\n#pragma maptec: define highp float base\n#pragma maptec: define highp float height\n#pragma maptec: define highp vec4 color\nvoid main() {\n#pragma maptec: initialize highp float base\n#pragma maptec: initialize highp float height\n#pragma maptec: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:St("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\n#pragma maptec: define lowp float base\n#pragma maptec: define lowp float height\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float base\n#pragma maptec: initialize lowp float height\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;\n#ifdef TERRAIN3D\nin vec2 a_centroid;\n#endif\n#ifdef GLOBE\nout vec3 v_sphere_pos;\n#endif\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\n#pragma maptec: define lowp float base\n#pragma maptec: define lowp float height\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float base\n#pragma maptec: initialize lowp float height\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),prismOverlay:St(i(2144),i(2528)),hillshadePrepare:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(2082)),hillshade:St(i(2706),"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:St(i(2859),"\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:St(i(2130),"\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:St("uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(1187)),lineGradientSDF:St(i(1693),i(3325)),polylineOverlay:St(i(2859),"\n#define scale 0.015873016\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),polylineOverlayGradient:St(i(2130),i(1866)),polylineOverlayPattern:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define lowp vec4 pattern_from\n#pragma maptec: define lowp vec4 pattern_to\n#pragma maptec: define lowp float pixel_ratio_from\n#pragma maptec: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 pattern_from\n#pragma maptec: initialize mediump vec4 pattern_to\n#pragma maptec: initialize lowp float pixel_ratio_from\n#pragma maptec: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),polylineOverlayArrow:St("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump float u_ratio;uniform highp vec4 u_direction_color;uniform lowp float u_direction_opacity;uniform lowp float u_direction_gap;uniform lowp float u_custom_image_flag;uniform highp float u_meter_per_pixel_ratio;uniform highp float u_direction_width;uniform sampler2D u_image;in highp float v_distance;in highp float v_flag;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maptec: define lowp vec4 direction_pattern_from\n#pragma maptec: define lowp vec4 direction_pattern_to\n#pragma maptec: define lowp float direction_pixel_ratio_from\n#pragma maptec: define lowp float direction_pixel_ratio_to\nvec4 sample_arrow(vec4 pattern_position,float pixel_ratio) {vec2 pattern_top_left=pattern_position.xy;vec2 pattern_bottom_right=pattern_position.zw;vec2 display_size=(pattern_bottom_right-pattern_top_left)/pixel_ratio;float icon_height=max(display_size.y,1.0);vec2 icon_size=display_size*vec2(max(u_direction_width,1.0)/icon_height,1.0);float repeat_distance=icon_size.x*4.0*u_direction_gap*u_meter_per_pixel_ratio;float pattern_distance=mod(v_distance,repeat_distance);if (pattern_distance <=0.0 || pattern_distance >=icon_size.x) {discard;}float line_progress=1.0-clamp(pattern_distance/icon_size.x,0.0,1.0);vec2 texture_progress=vec2(v_flag,line_progress);vec2 texel_size=1.0/u_texsize;vec2 image_position=mix(pattern_top_left*texel_size,pattern_bottom_right*texel_size,texture_progress\n);return texture(u_image,image_position);}void main() {\n#pragma maptec: initialize mediump vec4 direction_pattern_from\n#pragma maptec: initialize mediump vec4 direction_pattern_to\n#pragma maptec: initialize lowp float direction_pixel_ratio_from\n#pragma maptec: initialize lowp float direction_pixel_ratio_to\nif (u_direction_opacity <=0.0) {discard;}vec4 color_from=sample_arrow(direction_pattern_from,direction_pixel_ratio_from);vec4 color_to=sample_arrow(direction_pattern_to,direction_pixel_ratio_to);vec4 arrow_color=mix(color_from,color_to,u_fade);if (u_custom_image_flag < 0.5) {if (arrow_color.a <=0.0) {discard;}arrow_color=vec4(u_direction_color.rgb,u_direction_color.a);}fragColor=arrow_color*u_direction_opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(2638)),polylineOverlaySDF:St(i(3283),"\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nin vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maptec: define highp vec4 color\n#pragma maptec: define lowp float blur\n#pragma maptec: define lowp float opacity\n#pragma maptec: define mediump float gapwidth\n#pragma maptec: define lowp float offset\n#pragma maptec: define mediump float width\n#pragma maptec: define lowp float floorwidth\n#pragma maptec: define mediump vec4 dasharray_from\n#pragma maptec: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maptec: initialize highp vec4 color\n#pragma maptec: initialize lowp float blur\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize mediump float gapwidth\n#pragma maptec: initialize lowp float offset\n#pragma maptec: initialize mediump float width\n#pragma maptec: initialize lowp float floorwidth\n#pragma maptec: initialize mediump vec4 dasharray_from\n#pragma maptec: initialize mediump vec4 dasharray_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;v_linesofar=a_linesofar;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),polylineOverlayGradientSDF:St(i(1693),i(1111)),raster:St("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;\n#ifdef GLOBE\nif (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}\n#endif\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:St(i(3190),"in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;\n#pragma maptec: define lowp float opacity\nvoid main() {\n#pragma maptec: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:St(i(384),"in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;\n#pragma maptec: define highp vec4 fill_color\n#pragma maptec: define highp vec4 halo_color\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float halo_width\n#pragma maptec: define lowp float halo_blur\nvoid main() {\n#pragma maptec: initialize highp vec4 fill_color\n#pragma maptec: initialize highp vec4 halo_color\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float halo_width\n#pragma maptec: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:St("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;\n#pragma maptec: define highp vec4 fill_color\n#pragma maptec: define highp vec4 halo_color\n#pragma maptec: define lowp float opacity\n#pragma maptec: define lowp float halo_width\n#pragma maptec: define lowp float halo_blur\nvoid main() {\n#pragma maptec: initialize highp vec4 fill_color\n#pragma maptec: initialize highp vec4 halo_color\n#pragma maptec: initialize lowp float opacity\n#pragma maptec: initialize lowp float halo_width\n#pragma maptec: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}",i(787)),terrain:St(i(3453),"in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:St(i(1142),i(1602)),terrainCoords:St("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",i(1480)),projectionErrorMeasurement:St(i(321),i(660)),atmosphere:St(i(1556),i(3284)),sky:St(i(888),i(306))};class Jo{constructor(t,e,r){const o=i;this.vertexBuffer=t,this[o(706)]=e,this.segments=r}destroy(){const t=i;this.vertexBuffer[t(2355)](),this[t(706)].destroy(),this.segments[t(2355)](),this[t(3320)]=null,this[t(706)]=null,this[t(2357)]=null}}Li=e.aX([{name:"a_pos",type:"Int16",components:2}]);const Ko="#define PROJECTION_MERCATOR",$o="mercator";class Qo{constructor(){this[i(710)]=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return $o}get shaderDefine(){return Ko}get shaderPreludeCode(){return Yo[i(2362)]}get[i(1052)](){return Yo.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aY[i(2253)]}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}[i(2355)](){}updateGPUdependent(t){}[i(1397)](t,r,o,n,s){const a=i;if(this._cachedMesh)return this._cachedMesh;const l=new e.aZ;l.emplaceBack(0,0),l.emplaceBack(e.a8,0),l.emplaceBack(0,e.a8),l[a(2225)](e.a8,e.a8);const c=t.createVertexBuffer(l,Li.members),h=e.a_.simpleSegment(0,0,4,2),u=new e.a$;u.emplaceBack(1,0,2),u.emplaceBack(1,2,3);const d=t[a(2778)](u);return this[a(710)]=new Jo(c,d,h),this[a(710)]}[i(697)](){}[i(377)](){return!1}[i(1699)](t){}}class tn{constructor(t=0,e=0,r=0,o=0){const n=i;if(isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(o)||o<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this[n(2367)]=r,this.right=o}[i(1874)](t,r,o){const n=i;return null!=r.top&&null!=t[n(3419)]&&(this.top=e.J[n(2534)](t.top,r.top,o)),null!=r.bottom&&null!=t[n(611)]&&(this[n(611)]=e.J.number(t[n(611)],r.bottom,o)),null!=r.left&&null!=t.left&&(this.left=e.J[n(2534)](t.left,r[n(2367)],o)),null!=r[n(465)]&&null!=t[n(465)]&&(this[n(465)]=e.J.number(t.right,r[n(465)],o)),this}[i(1120)](t,r){const o=i,n=e.aq((this.left+t-this[o(465)])/2,0,t),s=e.aq((this.top+r-this[o(611)])/2,0,r);return new e.P(n,s)}[i(2586)](t){const e=i;return this.top===t[e(3419)]&&this[e(611)]===t[e(611)]&&this[e(2367)]===t.left&&this.right===t[e(465)]}clone(){const t=i;return new tn(this.top,this.bottom,this[t(2367)],this[t(465)])}toJSON(){const t=i;return{top:this[t(3419)],bottom:this[t(611)],left:this[t(2367)],right:this[t(465)]}}}class en{constructor(t,r){const o=i;var n;this[o(3485)]=(t,e)=>null!==this[o(3148)]?this[o(3148)](t,e):this[o(1379)][o(2492)](t,e),this[o(1379)]=t,this._tileSize=512,this[o(883)]=void 0===(null==r?void 0:r.renderWorldCopies)||!!(null==r?void 0:r.renderWorldCopies),this[o(3413)]=(null==r?void 0:r[o(1630)])||0,this[o(3338)]=(null==r?void 0:r.maxZoom)||22,this[o(1931)]=null==(null==r?void 0:r[o(1042)])?0:null==r?void 0:r[o(1042)],this[o(3059)]=null==(null==r?void 0:r[o(3421)])?60:null==r?void 0:r.maxPitch,this._constrainOverride=null!==(n=null==r?void 0:r.constrainOverride)&&void 0!==n?n:null,this.setMaxBounds(),this[o(1971)]=0,this._height=0,this[o(1243)]=new e.X(0,0),this[o(360)]=0,this._zoom=0,this[o(823)]=It(this._zoom),this._scale=e.at(this._zoom),this[o(2511)]=0,this._fovInRadians=.6435011087932844,this[o(3336)]=0,this._rollInRadians=0,this[o(3246)]=!0,this[o(2041)]=new tn,this[o(1638)]=0,this[o(1307)]=!0}apply(t,r,o){const n=i;this._constrainOverride=t.constrainOverride,this[n(3193)]=t.latRange,this._lngRange=t.lngRange,this[n(1971)]=t[n(1422)],this[n(2896)]=t[n(3282)],this[n(1243)]=t[n(1972)],this._elevation=t[n(1708)],this[n(1638)]=t[n(2157)],this._zoom=t.zoom,this[n(823)]=It(this._zoom),this._scale=e.at(this._zoom),this._bearingInRadians=t[n(539)],this._fovInRadians=t[n(2807)],this._pitchInRadians=t[n(1809)],this._rollInRadians=t.rollInRadians,this[n(3246)]=t.unmodified,this[n(2041)]=new tn(t[n(1022)][n(3419)],t.padding.bottom,t[n(1022)].left,t.padding.right),this[n(3413)]=t.minZoom,this[n(3338)]=t[n(1239)],this[n(1931)]=t.minPitch,this[n(3059)]=t.maxPitch,this[n(883)]=t[n(2356)],this[n(2161)]=t.cameraToCenterDistance,this._nearZ=t.nearZ,this._farZ=t[n(1694)],this._autoCalculateNearFarZ=!o&&t[n(1199)],r&&this[n(2391)](),this[n(2173)]()}get[i(3204)](){return this[i(3071)]}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(t){this[i(1638)]=t}get[i(782)](){return this[i(1432)]}get[i(2752)](){return this._tileZoom}get[i(354)](){return this._scale}get[i(1422)](){return this._width}get[i(3282)](){return this[i(2896)]}get[i(539)](){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this[i(3193)]}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}[i(3689)](t){const e=i;this._minZoom!==t&&(this._minZoom=t,this[e(2707)](this.applyConstrain(this[e(1243)],this[e(3512)]).zoom))}get[i(1239)](){return this[i(3338)]}[i(922)](t){const e=i;this[e(3338)]!==t&&(this[e(3338)]=t,this[e(2707)](this[e(3485)](this[e(1243)],this[e(3512)])[e(3512)]))}get minPitch(){return this._minPitch}setMinPitch(t){const e=i;this[e(1931)]!==t&&(this._minPitch=t,this[e(2467)](Math[e(2153)](this.pitch,t)))}get maxPitch(){return this._maxPitch}setMaxPitch(t){const e=i;this[e(3059)]!==t&&(this._maxPitch=t,this[e(2467)](Math.min(this[e(882)],t)))}get[i(2356)](){return this._renderWorldCopies}setRenderWorldCopies(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t}get[i(2718)](){return this[i(3148)]}setConstrainOverride(t){const e=i;void 0===t&&(t=null),this[e(3148)]!==t&&(this._constrainOverride=t,this.constrainInternal(),this[e(2173)]())}get[i(3507)](){return this[i(1432)]*this._scale}get centerOffset(){return this[i(1281)]._sub(this.size._div(2))}get[i(863)](){return new e.P(this._width,this[i(2896)])}get[i(1121)](){return this._bearingInRadians/Math.PI*180}setBearing(t){const r=i,n=e.Y(t,-180,180)*Math.PI/180;var s,a,l,c,h,u,d,p,f;this._bearingInRadians!==n&&(this[r(3246)]=!1,this._bearingInRadians=n,this[r(2173)](),this[r(3687)]=o(),s=this[r(3687)],l=-this[r(2511)],c=(a=this[r(3687)])[0],h=a[1],u=a[2],d=a[3],p=Math.sin(l),f=Math[r(3602)](l),s[0]=c*f+u*p,s[1]=h*f+d*p,s[2]=c*-p+u*f,s[3]=h*-p+d*f)}get[i(1589)](){return this[i(3687)]}get[i(1809)](){return this._pitchInRadians}get[i(882)](){return this[i(3336)]/Math.PI*180}setPitch(t){const r=i,o=e.aq(t,this[r(1042)],this[r(3421)])/180*Math.PI;this[r(3336)]!==o&&(this[r(3246)]=!1,this._pitchInRadians=o,this[r(2173)]())}get rollInRadians(){return this._rollInRadians}get[i(3579)](){return this._rollInRadians/Math.PI*180}[i(2053)](t){const e=t/180*Math.PI;this[i(583)]!==e&&(this._unmodified=!1,this._rollInRadians=e,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.b0(this[i(2292)])}setFov(t){const r=i;t=e.aq(t,.1,150),this.fov!==t&&(this[r(3246)]=!1,this._fovInRadians=e.as(t),this._calcMatrices())}get[i(3512)](){return this._zoom}setZoom(t){const r=i,o=this[r(3485)](this[r(1243)],t).zoom;this._zoom!==o&&(this[r(3246)]=!1,this._zoom=o,this._tileZoom=Math.max(0,Math.floor(o)),this[r(1563)]=e.at(o),this.constrainInternal(),this._calcMatrices())}get[i(1972)](){return this[i(1243)]}setCenter(t){const e=i;t.latitude===this[e(1243)].latitude&&t[e(3396)]===this[e(1243)].longitude||(this[e(3246)]=!1,this[e(1243)]=t,this.constrainInternal(),this[e(2173)]())}get elevation(){return this._elevation}setElevation(t){t!==this[i(360)]&&(this._elevation=t,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets[i(1257)]()}[i(378)](t){const e=i;this[e(2041)].equals(t)||(this[e(3246)]=!1,this[e(2041)].interpolate(this[e(2041)],t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get[i(1081)](){return this[i(1755)]}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this[i(1709)]}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}[i(2272)](t,e){const r=i;this[r(1307)]=!1,this._nearZ=t,this[r(3270)]=e,this._calcMatrices()}clearNearFarZOverride(){const t=i;this[t(1307)]=!0,this[t(2173)]()}[i(749)](t){return this[i(2041)].equals(t)}interpolatePadding(t,e,r){this[i(3246)]=!1,this._edgeInsets.interpolate(t,e,r),this.constrainInternal(),this._calcMatrices()}[i(2820)](t,e,r=!0){const o=i;this[o(1971)]=t,this._height=e,r&&this.constrainInternal(),this[o(2173)]()}getMaxBounds(){const t=i;return this._latRange&&2===this[t(3193)].length&&this._lngRange&&2===this[t(3360)].length?new io([this[t(3360)][0],this._latRange[0]],[this._lngRange[1],this[t(3193)][1]]):null}[i(2464)](t){const r=i;t?(this._lngRange=[t[r(2699)](),t.getEast()],this._latRange=[t[r(1330)](),t.getNorth()],this.constrainInternal()):(this[r(3360)]=null,this._latRange=[-e.ar,e.ar])}getCameraQueryGeometry(t,r){const o=i;if(1===r[o(953)])return[r[0],t];{const{minX:i,minY:n,maxX:s,maxY:a}=e.ad[o(1056)](r).extend(t);return[new e.P(i,n),new e.P(s,n),new e.P(s,a),new e.P(i,a),new e.P(i,n)]}}[i(2391)](){const t=i;if(!this.center||!this[t(1971)]||!this[t(2896)]||this._constraining)return;this[t(1688)]=!0;const e=this[t(3246)],{center:r,zoom:o}=this[t(3485)](this.center,this[t(3512)]);this[t(3302)](r),this.setZoom(o),this[t(3246)]=e,this._constraining=!1}[i(2173)](){const t=i;if(this._width&&this._height){this[t(2539)]=[2/this._width,-2/this._height];let i=e.au(new Float64Array(16));e.U(i,i,[this[t(1971)]/2,-this[t(2896)]/2,1]),e.S(i,i,[1,-1,0]),this._clipSpaceToPixelsMatrix=i,i=e.au(new Float64Array(16)),e.U(i,i,[1,-1,1]),e.S(i,i,[-1,-1,0]),e.U(i,i,[2/this._width,2/this[t(2896)],1]),this._pixelsToClipSpaceMatrix=i,this[t(2161)]=.5/Math.tan(this[t(2807)]/2)*this._height}this[t(1379)].calcMatrices()}[i(1145)](t,r,o,n){const s=i,a=void 0!==o?o:this[s(1121)],l=n=void 0!==n?n:this.pitch,{distanceToCenter:c,clampedElevation:h}=this._distanceToCenterFromAltElevationPitch(r,this[s(1708)],l),{x:u,y:d}=G(l,a),p=e.ac[s(1677)](t,r);let f,m,_=e.b1(1,p.y),y=0;do{if(y+=1,y>10)break;m=c/_,f=new e.ac(p.x+u*m,p.y+d*m),_=1/f.meterInMercatorCoordinateUnits()}while(Math.abs(c-m*_)>1e-12);return{center:f[s(1224)](),elevation:h,zoom:e.aw(this.height/2/Math.tan(this[s(2807)]/2)/m/this.tileSize)}}recalculateZoomAndCenter(t){const r=i;if(this[r(1708)]-t==0)return;const o=1/this[r(3507)],n=e.av(1,this[r(1972)][r(2329)])*this.worldSize,s=e.ac.fromLngLat(this.center,this.elevation),a=s.x/o,l=s.y/o,c=s.z/o,h=this.pitch,u=this.bearing,{x:d,y:p,z:f}=G(h,u),m=this[r(2862)],_=a+m*-d,y=l+m*-p,g=c+m*f,{distanceToCenter:v,clampedElevation:x}=this[r(1393)](g/n,t,h),b=v*n,w=new e.ac((_+d*b)*o,(y+p*b)*o,0).toLngLat(),T=e.av(1,w[r(2329)]),S=e.aw(this.height/2/Math.tan(this[r(2807)]/2)/v/T/this.tileSize);this._elevation=x,this._center=w,this[r(2707)](S)}[i(1393)](t,r,o){const n=i,s=-Math.cos(e.as(o)),a=t-r;let l,c=r;return s*a>=0||Math[n(1201)](s)<.1?(l=1e4,c=t+l*s):l=-a/s,{distanceToCenter:l,clampedElevation:c}}[i(2907)](){const t=i,r=Math.tan(this.pitchInRadians)*(this[t(2862)]||1);return this.centerPoint.add(new e.P(r*Math[t(1741)](this.rollInRadians),r*Math[t(3602)](this.rollInRadians)))}getCameraAltitude(){const t=i;return Math.cos(this[t(1809)])*this[t(2161)]/this[t(1755)]+this[t(1708)]}[i(2409)](){const t=i,r=e.av(1,this.center.latitude)*this[t(3507)];return N(this.center,this.elevation,this.pitch,this[t(1121)],this[t(2862)]/r)[t(1224)]()}[i(1045)](t){const r=i;if(!t)return[0,0,1,1];const o=t.canonical.z>=0?1<<t.canonical.z:Math[r(2916)](2,t.canonical.z);return[t.canonical.x/o,t[r(842)].y/o,1/o/e.a8,1/o/e.a8]}}class rn{constructor(t,r){const o=i;this[o(1141)]=t,this.max=r,this[o(1972)]=e.b2([],e.b3([],this.min,this[o(2153)]),.5)}quadrant(t){const r=i,o=[t%2==0,t<2],n=e.b4(this.min),s=e.b4(this.max);for(let t=0;t<o[r(953)];t++)n[t]=o[t]?this.min[t]:this[r(1972)][t],s[t]=o[t]?this[r(1972)][t]:this.max[t];return s[2]=this[r(2153)][2],new rn(n,s)}[i(1949)](t){const e=i;return Math[e(2153)](Math.min(this[e(2153)][0],t[0]),this[e(1141)][0])-t[0]}[i(2223)](t){const e=i;return Math.max(Math[e(1141)](this[e(2153)][1],t[1]),this.min[1])-t[1]}intersectsFrustum(t){const e=i;let r=!0;for(let i=0;i<t[e(1020)].length;i++){const e=this.intersectsPlane(t.planes[i]);if(0===e)return 0;1===e&&(r=!1)}return r?2:t.aabb[e(1141)][0]>this[e(2153)][0]||t[e(1936)][e(1141)][1]>this[e(2153)][1]||t.aabb.min[2]>this.max[2]||t[e(1936)][e(2153)][0]<this.min[0]||t[e(1936)][e(2153)][1]<this[e(1141)][1]||t[e(1936)].max[2]<this[e(1141)][2]?0:1}intersectsPlane(t){const e=i;let r=t[3],o=t[3];for(let i=0;i<3;i++)t[i]>0?(r+=t[i]*this[e(1141)][i],o+=t[i]*this[e(2153)][i]):(o+=t[i]*this.min[i],r+=t[i]*this.max[i]);return r>=0?2:o<0?0:1}}class on{[i(3026)](t,e,i,r){const o=r.distanceX([t,e]),n=r.distanceY([t,e]);return Math.hypot(o,n)}getWrap(t,e,i){return i}[i(2344)](t,r,o,n){const s=i;var a,l;let c=0,h=0;if(null==n?void 0:n[s(3245)]){const i=new e.a5(t.z,r,t.z,t.x,t.y),u=n.terrain[s(1338)](i);c=null!==(a=u.minElevation)&&void 0!==a?a:Math[s(1141)](0,o),h=null!==(l=u.maxElevation)&&void 0!==l?l:Math.max(0,o)}const u=1<<t.z;return new rn([r+t.x/u,t.y/u,c],[r+(t.x+1)/u,(t.y+1)/u,h])}[i(496)](t,r){const o=i,n=t.fov*(Math.abs(Math[o(3602)](t[o(2439)]))*t[o(3282)]+Math[o(1201)](Math.sin(t[o(2439)]))*t[o(1422)])/t[o(3282)],s=e.aq(78.5-n/2,0,60);return!!r[o(3245)]||t.pitch>s}[i(3061)](){return!0}[i(2350)](){}}class nn{constructor(t,e,i){this.points=t,this.planes=e,this.aabb=i}static[i(1263)](t,r=1,o=0,n,s){const a=i,l=s?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],c=Math[a(2916)](2,o),h=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]][a(1920)]((i=>function(t,i,r,o){const n=e.aK([],t,i),s=1/n[3]/r*o;return e.b9(n,n,[s,s,1/n[3],s])}(i,t,r,c)));n&&function(t,i,r,o){const n=a,s=o?4:0,l=o?0:4;let c=0;const h=[],u=[];for(let i=0;i<4;i++){const r=e.b5([],t[i+l],t[i+s]),o=e.ba(r);e.b2(r,r,1/o),h[n(2315)](o),u[n(2315)](r)}for(let i=0;i<4;i++){const o=e.bb(t[i+s],u[i],r);c=null!==o&&o>=0?Math.max(c,o):Math[n(2153)](c,h[i])}const d=function(t,i){const r=e.b5([],t[i[0]],t[i[1]]),o=e.b5([],t[i[2]],t[i[1]]),n=[0,0,0,0];return e.b6(n,e.b7([],r,o)),n[3]=-e.b8(n,t[i[0]]),n}(t,i),p=function(t,i){const r=n,o=e.bc(t),s=e.bd([],t,1/o),a=e.b5([],i,e.b2([],s,e.b8(i,s))),l=e.bc(a);if(l>0){const t=Math[r(1313)](1-s[3]*s[3]),o=e.b2([],s,-s[3]),n=e.b3([],o,e.b2([],a,t/l));return e.be(i,n)}return null}(r,d);if(null!==p){const t=p/e.b8(u[0],d);c=Math[n(1141)](c,t)}for(let e=0;e<4;e++){const i=Math.min(c,h[e]);t[e+l]=[t[e+s][0]+u[e][0]*i,t[e+s][1]+u[e][1]*i,t[e+s][2]+u[e][2]*i,1]}}(h,l[0],n,s);const u=l.map((t=>{const i=e.b5([],h[t[0]],h[t[1]]),r=e.b5([],h[t[2]],h[t[1]]),o=e.b6([],e.b7([],i,r)),n=-e.b8(o,h[t[1]]);return o.concat(n)})),d=[Number[a(2220)],Number[a(2220)],Number.POSITIVE_INFINITY],p=[Number[a(2914)],Number[a(2914)],Number.NEGATIVE_INFINITY];for(const t of h)for(let e=0;e<3;e++)d[e]=Math.min(d[e],t[e]),p[e]=Math.max(p[e],t[e]);return new nn(h,u,new rn(d,p))}}class sn{get pixelsToClipSpaceMatrix(){const t=i;return this[t(1907)][t(3204)]}get[i(1113)](){const t=i;return this[t(1907)][t(1113)]}get[i(651)](){return this._helper.pixelsToGLUnits}get[i(2919)](){return this[i(1907)].centerOffset}get[i(863)](){const t=i;return this[t(1907)][t(863)]}get rotationMatrix(){return this._helper.rotationMatrix}get[i(1281)](){return this[i(1907)].centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}[i(3689)](t){const e=i;this[e(1907)][e(3689)](t)}setMaxZoom(t){this._helper.setMaxZoom(t)}[i(641)](t){this[i(1907)].setMinPitch(t)}[i(2580)](t){const e=i;this[e(1907)][e(2580)](t)}setRenderWorldCopies(t){const e=i;this[e(1907)][e(494)](t)}setBearing(t){const e=i;this[e(1907)][e(1812)](t)}setPitch(t){this[i(1907)].setPitch(t)}setRoll(t){this[i(1907)].setRoll(t)}setFov(t){const e=i;this[e(1907)][e(2519)](t)}setZoom(t){const e=i;this[e(1907)][e(2707)](t)}setCenter(t){this[i(1907)].setCenter(t)}setElevation(t){const e=i;this[e(1907)][e(1119)](t)}[i(2661)](t){this._helper[i(2661)](t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,e,r){return this._helper[i(669)](t,e,r)}[i(749)](t){return this[i(1907)].isPaddingEqual(t)}resize(t,e,r=!0){this._helper[i(2820)](t,e,r)}getMaxBounds(){return this._helper[i(946)]()}[i(2464)](t){this._helper.setMaxBounds(t)}setConstrainOverride(t){const e=i;this[e(1907)][e(566)](t)}overrideNearFarZ(t,e){this[i(1907)].overrideNearFarZ(t,e)}clearNearFarZOverride(){this[i(1907)].clearNearFarZOverride()}[i(718)](t){return this[i(1907)].getCameraQueryGeometry(this.getCameraPoint(),t)}get[i(782)](){return this[i(1907)].tileSize}get[i(2752)](){return this[i(1907)].tileZoom}get[i(354)](){return this._helper.scale}get[i(3507)](){const t=i;return this[t(1907)][t(3507)]}get width(){return this[i(1907)].width}get height(){return this._helper.height}get[i(3262)](){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this[i(1907)].minZoom}get maxZoom(){return this._helper[i(1239)]}get[i(3512)](){return this._helper[i(3512)]}get center(){return this[i(1907)].center}get minPitch(){const t=i;return this[t(1907)][t(1042)]}get[i(3421)](){return this._helper[i(3421)]}get pitch(){return this._helper.pitch}get pitchInRadians(){const t=i;return this[t(1907)][t(1809)]}get roll(){return this[i(1907)].roll}get rollInRadians(){const t=i;return this[t(1907)][t(2439)]}get bearing(){return this[i(1907)].bearing}get[i(539)](){return this[i(1907)].bearingInRadians}get[i(2025)](){const t=i;return this[t(1907)][t(2025)]}get fovInRadians(){return this._helper[i(2807)]}get elevation(){const t=i;return this[t(1907)][t(1708)]}get minElevationForCurrentTile(){const t=i;return this[t(1907)][t(2157)]}get padding(){const t=i;return this[t(1907)][t(1022)]}get[i(390)](){return this._helper[i(390)]}get[i(2356)](){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper[i(2862)]}get constrainOverride(){return this._helper[i(2718)]}get nearZ(){const t=i;return this[t(1907)][t(3003)]}get farZ(){return this[i(1907)].farZ}get autoCalculateNearFarZ(){return this[i(1907)].autoCalculateNearFarZ}setTransitionState(t,e){}constructor(t){const r=i;this[r(674)]=new Map,this._alignedPosMatrixCache=new Map,this[r(2945)]=new Map,this[r(2492)]=(t,i)=>{const o=r;i=e.aq(+i,this.minZoom,this[o(1239)]);const n={center:new e.X(t[o(3396)],t.latitude),zoom:i};let s=this[o(1907)]._lngRange;if(!this._helper._renderWorldCopies&&null===s){const t=180-1e-10;s=[-t,t]}const a=this[o(782)]*e.at(n[o(3512)]);let l=0,c=a,h=0,u=a,d=0,p=0;const{x:f,y:m}=this[o(863)];if(this._helper._latRange){const t=this[o(1907)][o(3193)];l=e.Z(t[1])*a,c=e.Z(t[0])*a,c-l<m&&(d=m/(c-l))}s&&(h=e.Y(e.$(s[0])*a,0,a),u=e.Y(e.$(s[1])*a,0,a),u<h&&(u+=a),u-h<f&&(p=f/(u-h)));const{x:_,y:y}=F(a,t);let g,v;const x=Math[o(2153)](p||0,d||0);if(x){const t=new e.P(p?(u+h)/2:_,d?(c+l)/2:y);return n.center=j(a,t)[o(317)](),n.zoom+=e.aw(x),n}if(this._helper[o(3193)]){const t=m/2;y-t<l&&(v=l+t),y+t>c&&(v=c-t)}if(s){const t=(h+u)/2;let i=_;this._helper[o(883)]&&(i=e.Y(_,t-a/2,t+a/2));const r=f/2;i-r<h&&(g=h+r),i+r>u&&(g=u-r)}if(void 0!==g||void 0!==v){const t=new e.P(null!=g?g:_,null!=v?v:y);n[o(1972)]=j(a,t)[o(317)]()}return n},this[r(3485)]=(t,e)=>this._helper[r(3485)](t,e),this[r(1907)]=new en({calcMatrices:()=>{this._calcMatrices()},defaultConstrain:(t,e)=>this[r(2492)](t,e)},t),this._coveringTilesDetailsProvider=new on}[i(2621)](){const t=i,e=new sn;return e[t(937)](this,!1),e}apply(t,e,i){this._helper.apply(t,e,i)}get[i(1399)](){return this[i(3e3)]}get projectionMatrix(){return this._projectionMatrix}get[i(3172)](){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get[i(1584)](){return this[i(421)]}getVisibleUnwrappedCoordinates(t){const r=i,o=[new e.bf(0,t)];if(this[r(1907)]._renderWorldCopies){const i=this[r(2843)](new e.P(0,0)),n=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),s=this[r(2843)](new e.P(this._helper._width,this._helper._height)),a=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),l=Math[r(2700)](Math[r(1141)](i.x,n.x,s.x,a.x)),c=Math[r(2700)](Math.max(i.x,n.x,s.x,a.x)),h=1;for(let i=l-h;i<=c+h;i++)0!==i&&o.push(new e.bf(i,t))}return o}[i(2251)](){const t=i;return nn[t(1263)](this._invViewProjMatrix,this[t(3507)])}getClippingPlane(){return null}[i(3069)](){return this[i(3096)]}recalculateZoomAndCenter(t){const e=i,r=this.screenPointToLocation(this.centerPoint,t),o=t?t.getElevationForLngLatZoom(r,this[e(1907)][e(823)]):0;this._helper[e(1515)](o)}[i(1265)](t,r){const o=i,n=e.av(this[o(1708)],this.center.latitude),s=this[o(3466)](r,n),a=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,n),l=e.ac[o(1677)](t),c=new e.ac(l.x-(s.x-a.x),l.y-(s.y-a.y));this.setCenter(null==c?void 0:c[o(1224)]()),this[o(1907)]._renderWorldCopies&&this[o(3302)](this[o(1972)][o(317)]())}[i(2985)](t,r){const o=i;return r?this.coordinatePoint(e.ac.fromLngLat(t),r.getElevationForLngLat(t,this),this[o(3607)]):this.coordinatePoint(e.ac.fromLngLat(t))}screenPointToLocation(t,e){const r=i;var o;return null===(o=this.screenPointToMercatorCoordinate(t,e))||void 0===o?void 0:o[r(1224)]()}screenPointToMercatorCoordinate(t,e){const r=i;if(e){const i=e.pointCoordinate(t);if(null!=i)return i}return this[r(3466)](t)}[i(3466)](t,r){const o=i,n=r||0,s=[t.x,t.y,0,1],a=[t.x,t.y,1,1];if(!this._pixelMatrixInverse)return e.ac[o(1677)](this.center,n);e.aK(s,s,this[o(2048)]),e.aK(a,a,this[o(2048)]);const l=s[3],c=a[3],h=s[1]/l,u=a[1]/c,d=s[2]/l,p=a[2]/c,f=d===p?0:(n-d)/(p-d);return new e.ac(e.J[o(2534)](s[0]/l,a[0]/c,f)/this[o(3507)],e.J[o(2534)](h,u,f)/this.worldSize,n)}[i(2347)](t,r=0,o=this[i(666)]){const n=[t.x*this[i(3507)],t.y*this.worldSize,r,1];return e.aK(n,n,o),new e.P(n[0]/n[3],n[1]/n[3])}getBounds(){const t=i,r=Math[t(2153)](0,this[t(1907)][t(2896)]/2-B(this));return(new io).extend(this[t(643)](new e.P(0,r)))[t(875)](this[t(643)](new e.P(this[t(1907)]._width,r)))[t(875)](this[t(643)](new e.P(this._helper[t(1971)],this._helper._height))).extend(this[t(643)](new e.P(0,this[t(1907)][t(2896)])))}isPointOnMapSurface(t,e){const r=i;return e?null!=e.pointCoordinate(t):t.y>this[r(3282)]/2-B(this)}[i(1067)](t,r=!1,o){const n=i;var s;const a=null!==(s=t.key)&&void 0!==s?s:e.bg(t[n(317)],t[n(842)].z,t.canonical.z,t[n(842)].x,t.canonical.y),l=r?this[n(3098)]:this[n(674)];if(l.has(a)){const t=l[n(1445)](a);return o?t[n(2226)]:t.f64}const c=V(t,this[n(3507)]);e.V(c,r?this._alignedProjMatrix:this[n(322)],c);const h={f64:c,f32:new Float32Array(c)};return l[n(571)](a,h),o?h[n(2226)]:h[n(1674)]}[i(1153)](t){const r=i,o=t.key,n=this._fogMatrixCacheF32;if(n.has(o))return n.get(o);const s=V(t,this[r(3507)]);return e.V(s,this._fogMatrix,s),n[r(571)](o,new Float32Array(s)),n.get(o)}calculateCenterFromCameraLngLatAlt(t,e,r,o){return this._helper[i(1145)](t,e,r,o)}[i(2714)](t,r,o){const n=i;if(!this[n(1907)][n(1199)])return;const s=Math.min(this[n(1708)],this[n(2157)],this[n(2390)]()-100),a=t-s*this[n(1907)][n(1755)]/Math[n(3602)](r),l=s<0?a:t,c=Math.PI/2+this.pitchInRadians,h=e.as(this.fov)*(Math.abs(Math[n(3602)](e.as(this[n(3579)])))*this.height+Math[n(1201)](Math.sin(e.as(this.roll)))*this.width)/this[n(3282)]*(.5+o.y/this[n(3282)]),u=Math[n(1741)](h)*l/Math.sin(e.aq(Math.PI-c-h,.01,Math.PI-.01)),d=B(this),p=Math[n(3251)](d/this[n(1907)][n(2862)]),f=e.as(.75),m=p>f?2*p*(.5+o.y/(2*d)):f,_=Math[n(1741)](m)*l/Math[n(1741)](e.aq(Math.PI-c-m,.01,Math.PI-.01)),y=Math[n(1141)](u,_);this[n(1907)][n(3270)]=1.01*(Math[n(3602)](Math.PI/2-r)*y+l),this._helper[n(1709)]=this._helper[n(2896)]/50}_calcMatrices(){const t=i;if(!this[t(1907)]._height)return;const r=this[t(2919)],o=F(this[t(3507)],this.center),n=o.x,s=o.y;this[t(1907)][t(1755)]=e.av(1,this.center.latitude)*this[t(3507)];const a=e.as(Math.min(this[t(882)],go)),l=Math.max(this._helper[t(2862)]/2,this._helper[t(2862)]+this[t(1907)]._elevation*this[t(1907)]._pixelPerMeter/Math[t(3602)](a));let c;this[t(2714)](l,a,r),c=new Float64Array(16),e.bh(c,this[t(2807)],this[t(1907)][t(1971)]/this[t(1907)][t(2896)],this[t(1907)][t(1709)],this._helper[t(3270)]),this[t(1786)]=new Float64Array(16),e.aE(this[t(1786)],c),c[8]=2*-r.x/this._helper[t(1971)],c[9]=2*r.y/this._helper._height,this._projectionMatrix=e.bi(c),e.U(c,c,[1,-1,1]),e.S(c,c,[0,0,-this._helper.cameraToCenterDistance]),e.bj(c,c,-this[t(2439)]),e.bk(c,c,this.pitchInRadians),e.bj(c,c,-this[t(539)]),e.S(c,c,[-n,-s,0]),this[t(421)]=e.U([],c,[this[t(3507)],this[t(3507)],this[t(3507)]]),e.U(c,c,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.V(new Float64Array(16),this[t(1113)],c),e.S(c,c,[0,0,-this.elevation]),this[t(322)]=c,this[t(869)]=e.aE([],c);const h=[0,0,-1,1];e.aK(h,h,this[t(869)]),this[t(3e3)]=[h[0]/h[3],h[1]/h[3],h[2]/h[3]],this._fogMatrix=new Float64Array(16),e.bh(this[t(3007)],this.fovInRadians,this[t(1422)]/this[t(3282)],l,this[t(1907)]._farZ),this._fogMatrix[8]=2*-r.x/this.width,this[t(3007)][9]=2*r.y/this.height,e.U(this[t(3007)],this[t(3007)],[1,-1,1]),e.S(this[t(3007)],this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.bj(this[t(3007)],this[t(3007)],-this.rollInRadians),e.bk(this[t(3007)],this._fogMatrix,this[t(1809)]),e.bj(this._fogMatrix,this[t(3007)],-this[t(539)]),e.S(this[t(3007)],this._fogMatrix,[-n,-s,0]),e.U(this._fogMatrix,this[t(3007)],[1,1,this._helper[t(1755)]]),e.S(this._fogMatrix,this[t(3007)],[0,0,-this.elevation]),this[t(3607)]=e.V(new Float64Array(16),this.clipSpaceToPixelsMatrix,c);const u=this[t(1907)][t(1971)]%2/2,d=this[t(1907)][t(2896)]%2/2,p=Math[t(3602)](this.bearingInRadians),f=Math.sin(-this.bearingInRadians),m=n-Math[t(3291)](n)+p*u+f*d,_=s-Math.round(s)+p*d+f*u,y=new Float64Array(c);if(e.S(y,y,[m>.5?m-1:m,_>.5?_-1:_,0]),this[t(3398)]=y,c=e.aE(new Float64Array(16),this._pixelMatrix),!c)throw new Error("failed to invert matrix");this._pixelMatrixInverse=c,this[t(3150)]()}[i(3150)](){const t=i;this[t(674)].clear(),this._alignedPosMatrixCache[t(1499)](),this._fogMatrixCacheF32[t(1499)]()}[i(1331)](){const t=i;if(!this[t(2048)])return 1;const r=this.screenPointToMercatorCoordinate(new e.P(0,0)),o=[r.x*this[t(3507)],r.y*this.worldSize,0,1];return e.aK(o,o,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){const t=i;return this[t(1907)][t(2907)]()}[i(2390)](){return this[i(1907)].getCameraAltitude()}getCameraLngLat(){const t=i,r=e.av(1,this[t(1972)].latitude)*this[t(3507)];return N(this[t(1972)],this.elevation,this.pitch,this[t(1121)],this[t(1907)].cameraToCenterDistance/r)[t(1224)]()}[i(2265)](t,r){const o=i,n=e.ac[o(1677)](t),s=[n.x*this[o(3507)],n.y*this.worldSize,r,1];return e.aK(s,s,this[o(322)]),s[2]/s[3]}[i(3543)](t){const r=i,{overscaledTileID:o,aligned:n,applyTerrainMatrix:s}=t,a=this._helper.getMercatorTileCoordinates(o),l=o?this.calculatePosMatrix(o,n,!0):null;let c;return c=o&&o[r(521)]&&s?o.terrainRttPosMatrix32f:l||e.bl(),{mainMatrix:c,tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:c}}[i(926)](t){return!1}[i(1532)](){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(t,e,i){return 1}[i(1605)](t){return e.b4(t)}[i(339)](t){throw new Error(i(963))}projectTileCoordinates(t,i,r,o){const n=this.calculatePosMatrix(r);let s;o?(s=[t,i,o(t,i),1],e.aK(s,s,n)):(s=[t,i,0,1],xt(s,s,n));const a=s[3];return{point:new e.P(s[0]/a,s[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}[i(1953)](t){for(const e of t)this.calculatePosMatrix(e)}[i(647)](t,r){const o=i,n=e.ac.fromLngLat(t,r),s=n[o(1267)](),a=e.bm();return e.S(a,a,[n.x,n.y,n.z]),e.bj(a,a,Math.PI),e.bk(a,a,Math.PI/2),e.U(a,a,[-s,s,s]),a}[i(3127)](t=!0){const r=i,o=new e.a5(0,0,0,0,0),n=this.getProjectionData({overscaledTileID:o,applyGlobeMatrix:t}),s=V(o,this[r(3507)]);e.V(s,this[r(322)],s),n[r(1054)]=[0,0,1,1];const a=[e.a8,e.a8,this[r(3507)]/this._helper.pixelsPerMeter],l=e.bn();return e.U(l,s,a),n.fallbackMatrix=l,n[r(359)]=l,n}getFastPathSimpleProjectionMatrix(t){return this[i(1067)](t)}}class an{get useGlobeControls(){return!1}handlePanInertia(t,e){const r=i,o=t[r(1844)](),n=Math[r(1201)](B(e));return{easingOffset:t.mult(Math[r(1141)](.75*n/o,1)),easingCenter:e.center}}handleMapControlsRollPitchBearingZoom(t,e){const r=i;t.bearingDelta&&e.setBearing(e.bearing+t.bearingDelta),t[r(3068)]&&e.setPitch(e[r(882)]+t[r(3068)]),t.rollDelta&&e.setRoll(e.roll+t.rollDelta),t.zoomDelta&&e[r(2707)](e.zoom+t.zoomDelta)}[i(2473)](t,e,r){const o=i;t.around[o(2404)](e.centerPoint)<.01||e.setLocationAtPoint(r,t[o(2924)])}cameraForBoxAndBearing(t,e,i,r,o){return At(t,e,i,r,o)}handleJumpToCenterZoom(t,r){t.zoom!==(void 0!==r.zoom?+r[i(3512)]:t.zoom)&&t.setZoom(+r.zoom),void 0!==r.center&&t.setCenter(e.X.convert(r.center))}handleEaseTo(t,r){const o=i,n=t.zoom,s=t[o(1022)],a={roll:t.roll,pitch:t[o(882)],bearing:t[o(1121)]},l={roll:void 0===r[o(3579)]?t.roll:r.roll,pitch:void 0===r[o(882)]?t[o(882)]:r[o(882)],bearing:void 0===r[o(1121)]?t.bearing:r[o(1121)]},c=void 0!==r.zoom,h=!t[o(749)](r[o(1022)]);let u=!1;const d=c?+r[o(3512)]:t[o(3512)];let p=t.centerPoint.add(r.offsetAsPoint);const f=t[o(643)](p),{center:m,zoom:_}=t[o(3485)](e.X[o(1029)](r.center||f),null!=d?d:n);Pt(t,m);const y=F(t.worldSize,f),g=F(t[o(3507)],m)[o(1276)](y),v=e.at(_-n);return u=_!==n,{easeFunc:i=>{const c=o;if(u&&t[c(2707)](e.J.number(n,_,i)),e.br(a,l)||Mt({startEulerAngles:a,endEulerAngles:l,tr:t,k:i,useSlerp:a.roll!=l.roll}),h&&(t.interpolatePadding(s,r[c(1022)],i),p=t[c(1281)].add(r[c(3390)])),r[c(2924)])t[c(1265)](r.around,r[c(2498)]);else{const r=e.at(t.zoom-n),o=_>n?Math[c(1141)](2,v):Math.max(.5,v),s=Math[c(2916)](o,1-i),a=j(t.worldSize,y[c(2926)](g[c(3574)](i*s))[c(3574)](r));t.setLocationAtPoint(t.renderWorldCopies?a.wrap():a,p)}},isZooming:u,elevationCenter:m}}handleFlyTo(t,r){const o=i,n=void 0!==r.zoom,s=t[o(3512)],a=t[o(3485)](e.X[o(1029)](r.center||r.locationAtOffset),n?+r.zoom:s),l=a.center,c=a[o(3512)];Pt(t,l);const h=F(t.worldSize,r.locationAtOffset),u=F(t[o(3507)],l)[o(1276)](h),d=u[o(1844)](),p=e.at(c-s);let f;if(void 0!==r[o(1630)]){const i=Math[o(1141)](+r[o(1630)],s,c),n=t.applyConstrain(l,i).zoom;f=e.at(n-s)}return{easeFunc:(i,r,n,a)=>{const d=o;t.setZoom(1===i?c:s+e.aw(r));const p=1===i?l:j(t.worldSize,h.add(u[d(3574)](n))[d(3574)](r));t[d(1265)](t.renderWorldCopies?p[d(317)]():p,a)},scaleOfZoom:p,targetCenter:l,scaleOfMinZoom:f,pixelPathLength:d}}}class ln{constructor(t,e,r){const o=i;this.blendFunction=t,this.blendColor=e,this[o(1915)]=r}}ln.Replace=[1,0],ln[i(2008)]=new ln(ln.Replace,e.bs.transparent,[!1,!1,!1,!1]),ln[i(2102)]=new ln(ln[i(2427)],e.bs.transparent,[!0,!0,!0,!0]),ln[i(3269)]=new ln([1,771],e.bs[i(1158)],[!0,!0,!0,!0]);const cn=2305;class hn{constructor(t,e,r){const o=i;this[o(1573)]=t,this[o(1840)]=e,this[o(2536)]=r}}hn.disabled=new hn(!1,1029,cn),hn[i(1528)]=new hn(!0,1029,cn),hn.frontCCW=new hn(!0,1028,cn);class un{constructor(t,e,r){const o=i;this[o(3435)]=t,this.mask=e,this[o(2436)]=r}}un.ReadOnly=!1,un[i(342)]=!0,un[i(2008)]=new un(519,un[i(2490)],[0,1]);const dn=7680;class pn{constructor(t,e,r,o,n,s){const a=i;this.test=t,this.ref=e,this.mask=r,this.fail=o,this.depthFail=n,this[a(507)]=s}}pn.disabled=new pn({func:519,mask:0},0,0,dn,dn,dn);const fn=new WeakMap;class mn{get[i(2897)](){return!!this[i(806)]}constructor(t){const r=i;this[r(1701)]=4,this._measureWaitFrames=6,this._texWidth=1,this[r(323)]=1,this._measuredError=0,this[r(1513)]=0,this[r(1800)]=-1e3,this[r(806)]=null,this[r(1414)]=t;const o=t.context,n=o.gl;this._texFormat=n[r(3468)],this[r(1868)]=n.UNSIGNED_BYTE;const s=new e.aZ;s[r(2225)](-1,-1),s.emplaceBack(2,-1),s[r(2225)](-1,2);const a=new e.a$;a[r(2225)](0,1,2),this[r(1664)]=new Jo(o.createVertexBuffer(s,Li.members),o[r(2778)](a),e.a_.simpleSegment(0,0,s.length,a[r(953)])),this[r(1261)]=new Uint8Array(4),o[r(3436)][r(571)](n[r(2653)]);const l=n.createTexture();n[r(891)](n[r(2541)],l),n.texParameteri(n.TEXTURE_2D,n[r(945)],n.CLAMP_TO_EDGE),n.texParameteri(n[r(2541)],n[r(3348)],n.CLAMP_TO_EDGE),n[r(1968)](n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n[r(3128)]),n.texParameteri(n[r(2541)],n.TEXTURE_MAG_FILTER,n[r(3128)]),n[r(2891)](n.TEXTURE_2D,0,this[r(826)],this._texWidth,this[r(323)],0,this[r(826)],this._texType,null),this._fbo=o.createFramebuffer(this[r(2939)],this._texHeight,!1,!1),this[r(1095)].colorAttachment.set(l),kt(n)&&(this[r(915)]=n[r(2322)](),n.bindBuffer(n.PIXEL_PACK_BUFFER,this[r(915)]),n.bufferData(n[r(3424)],4,n.STREAM_READ),n.bindBuffer(n.PIXEL_PACK_BUFFER,null))}[i(2355)](){const t=i,e=this[t(1414)].context.gl;this[t(1664)].destroy(),this[t(1095)][t(2355)](),e.deleteBuffer(this._pbo),this[t(1664)]=null,this._fbo=null,this[t(915)]=null,this._resultBuffer=null}updateErrorLoop(t,e){const r=i,o=this._updateCount;return this[r(806)]?o>=this._readbackQueue[r(2497)]+this._readbackWaitFrames&&this[r(3229)]():o>=this._lastReadbackFrame+this._measureWaitFrames&&this[r(1596)](t,e),this[r(1513)]++,this[r(1646)]}_bindFramebuffer(){const t=i,e=this._cachedRenderContext[t(1249)],r=e.gl;e[t(3436)].set(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,this._fbo.colorAttachment[t(1445)]()),e.bindFramebuffer.set(this._fbo[t(717)])}[i(1596)](t,r){const o=i,n=this._cachedRenderContext[o(1249)],s=n.gl;if(this[o(2416)](),n.viewport.set([0,0,this[o(2939)],this._texHeight]),n[o(1499)]({color:e.bs.transparent}),this[o(1414)].useProgram(o(3457))[o(1320)](n,s.TRIANGLES,un.disabled,pn.disabled,ln.unblended,hn[o(2008)],{u_input:t,u_output_expected:r},null,null,"$clipping",this._fullscreenTriangle[o(3320)],this[o(1664)][o(706)],this._fullscreenTriangle[o(2357)]),this[o(915)]&&kt(s)){s.bindBuffer(s.PIXEL_PACK_BUFFER,this[o(915)]),s[o(2069)](s[o(2905)]),s[o(1425)](0,0,this[o(2939)],this._texHeight,this._texFormat,this[o(1868)],0),s[o(1562)](s.PIXEL_PACK_BUFFER,null);const t=s[o(3330)](s.SYNC_GPU_COMMANDS_COMPLETE,0);s.flush(),this[o(806)]={frameNumberIssued:this[o(1513)],sync:t}}else this[o(806)]={frameNumberIssued:this[o(1513)],sync:null}}[i(3229)](){const t=i,r=this._cachedRenderContext[t(1249)].gl;if(this._pbo&&this._readbackQueue&&kt(r)){const i=r.clientWaitSync(this._readbackQueue[t(1116)],0,0);if(i===r.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this[t(806)]=null,void(this._lastReadbackFrame=this[t(1513)]);if(i===r.TIMEOUT_EXPIRED)return;r[t(1562)](r.PIXEL_PACK_BUFFER,this[t(915)]),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,this[t(1261)],0,4),r.bindBuffer(r[t(3424)],null)}else this._bindFramebuffer(),r.readPixels(0,0,this._texWidth,this[t(323)],this[t(826)],this[t(1868)],this._resultBuffer);this._readbackQueue=null,this._measuredError=mn._parseRGBA8float(this[t(1261)]),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(t){let e=0;return e+=t[0]/256,e+=t[1]/65536,e+=t[2]/16777216,t[3]<127&&(e=-e),e/128}}const _n=e.a8/128,yn=new e.aY({fill:new e.bw(128,2),line:new e.bw(512,0),tile:new e.bw(128,32),stencil:new e.bw(128,1),circle:3});class gn{constructor(){const t=i;this._tileMeshCache={},this[t(1465)]=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this[t(1656)]=-1e3}get name(){return i(995)}get[i(1603)](){return 1}get[i(633)](){return!0}get[i(3439)](){return"globe"}get[i(839)](){return i(3458)}get[i(3119)](){return Yo[i(3111)]}get[i(1052)](){return Yo.projectionMercator.vertexSource}get[i(3532)](){return yn}get[i(2126)](){return!0}get[i(2842)](){return this._errorCorrectionUsable}[i(2355)](){const t=i;this._errorMeasurement&&this[t(3233)][t(2355)]()}[i(3042)](t){const r=i;this[r(3233)]||(this[r(3233)]=new mn(t));const o=e.Z(this[r(1400)]),n=2*Math[r(3251)](Math[r(3297)](Math.PI-o*Math.PI*2))-.5*Math.PI,s=this[r(3233)].updateErrorLoop(o,n),a=c();s!==this[r(1779)]&&(this[r(2035)]=this._errorCorrectionUsable,this._errorMeasurementLastValue=s,this._errorMeasurementLastChangeTime=a);const l=Math[r(1141)](Math.max((a-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this[r(1465)]=e.bx(this[r(2035)],-this[r(1779)],e.by(l))}_getMeshKey(t){const e=i;return t.granularity[e(2289)](36)+"_"+(t[e(1212)]?"b":"")+(t[e(3006)]?"n":"")+(t[e(2005)]?"s":"")}[i(1397)](t,e,r,o,n){const s=i,a=("stencil"===n?yn.stencil:yn[s(1804)])[s(853)](e.z);return this[s(602)](t,{granularity:a,generateBorders:r,extendToNorthPole:0===e.y&&o,extendToSouthPole:e.y===(1<<e.z)-1&&o})}_getMesh(t,o){const n=i,s=this._getMeshKey(o);if(s in this[n(451)])return this[n(451)][s];const a=function(t,i){const o=n,s=function(t){const i=r,o=void 0!==t.granularity?Math[i(2153)](t[i(2230)],1):1,n=o+(t.generateBorders?2:0),s=o+(t[i(3006)]||t[i(1212)]?1:0)+(t[i(2005)]||t[i(1212)]?1:0),a=n+1,l=s+1,c=t[i(1212)]?-1:0,h=t.generateBorders||t.extendToNorthPole?-1:0,u=o+(t[i(1212)]?1:0),d=o+(t.generateBorders||t.extendToSouthPole?1:0),p=a*l,f=n*s*6,m=a*l>65536;if(m)throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const _=m||!1,y=new Int16Array(2*p);let g=0;for(let r=h;r<=d;r++)for(let n=c;n<=u;n++){let s=n/o*e.a8;-1===n&&(s=-_n),n===o+1&&(s=e.a8+_n);let a=r/o*e.a8;-1===r&&(a=t[i(3006)]?e.bu:-_n),r===o+1&&(a=t[i(2005)]?e.bv:e.a8+_n),y[g++]=s,y[g++]=a}const v=_?new Uint32Array(f):new Uint16Array(f);let x=0;for(let t=0;t<s;t++)for(let e=0;e<n;e++){const i=e+1+t*a,r=e+(t+1)*a,o=e+1+(t+1)*a;v[x++]=e+t*a,v[x++]=r,v[x++]=i,v[x++]=i,v[x++]=r,v[x++]=o}return{vertices:y.buffer[i(1557)](0),indices:v.buffer.slice(0),uses32bitIndices:_}}(i),a=e.aZ[o(3620)]({arrayBuffer:s.vertices,length:s.vertices.byteLength/2/2}),l=e.a$[o(3620)]({arrayBuffer:s[o(2792)],length:s[o(2792)].byteLength/2/3});return new Jo(t[o(476)](a,Li.members),t[o(2778)](l),e.a_[o(568)](0,0,a[o(953)],l[o(953)]))}(t,o);return this[n(451)][s]=a,a}recalculate(t){}hasTransition(){const t=i,e=c();let r=!1;return r=r||(e-this._errorMeasurementLastChangeTime)/1e3<.7,r=r||this._errorMeasurement&&this[t(3233)].awaitingQuery,r}[i(1699)](t){this[i(1400)]=t}}const vn=new e.y({type:new e.D(e.v[i(3645)][i(2784)])});class xn extends e.E{constructor(t){const r=i;super(),this[r(1383)]=new e.z(vn,void 0),this[r(649)](t),this._transitioning=this[r(1383)][r(1975)](),this[r(697)](new e.K(0)),this._mercatorProjection=new Qo,this._verticalPerspectiveProjection=new gn}get transitionState(){const t=i,r=this[t(1594)].get("type");if("string"==typeof r&&"mercator"===r)return 0;if("string"==typeof r&&"vertical-perspective"===r)return 1;if(r instanceof e.bz){if(t(995)===r.from&&"mercator"===r.to)return 1-r[t(2495)];if("mercator"===r.from&&t(995)===r.to)return r[t(2495)]}return 1}get[i(1289)](){return this.transitionState>0}get[i(2842)](){return this[i(1901)].latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this[i(1675)]}get[i(1814)](){return i(2361)}get useSubdivision(){return this.currentProjection[i(633)]}get[i(3439)](){const t=i;return this[t(3663)][t(3439)]}get shaderDefine(){return this.currentProjection.shaderDefine}get[i(3119)](){return this[i(3663)].shaderPreludeCode}get[i(1052)](){return this.currentProjection.vertexShaderPreludeCode}get[i(3532)](){return this[i(3663)].subdivisionGranularity}get useGlobeControls(){return this[i(1603)]>0}[i(2355)](){const t=i;this[t(1675)][t(2355)](),this._verticalPerspectiveProjection[t(2355)]()}[i(3042)](t){const e=i;this._mercatorProjection.updateGPUdependent(t),this[e(1901)].updateGPUdependent(t)}[i(1397)](t,e,r,o,n){return this[i(3663)].getMeshFromTileID(t,e,r,o,n)}[i(649)](t){this._transitionable[i(1478)]("type",(null==t?void 0:t.type)||"mercator")}updateTransitions(t){const e=i;this[e(2560)]=this._transitionable[e(2521)](t,this[e(2560)])}[i(377)](){const t=i;return this._transitioning.hasTransition()||this.currentProjection[t(377)]()}recalculate(t){const e=i;this.properties=this[e(2560)][e(661)](t)}[i(1699)](t){const e=i;this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(t),this[e(1675)].setErrorQueryLatitudeDegrees(t)}}class bn{constructor(t){const e=i;this._cachePrevious=new Map,this[e(1447)]=new Map,this[e(1339)]=!1,this[e(2881)]=t}swapBuffers(){const t=i;if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this[t(1447)]=e,this[t(1447)].clear(),this._hadAnyChanges=!1}[i(2344)](t,e,r,o){const n=i,s=t.z+"_"+t.x+"_"+t.y+"_"+((null==o?void 0:o.terrain)?"t":""),a=this._cache[n(1445)](s);if(a)return a;const l=this[n(852)].get(s);if(l)return this[n(1447)][n(571)](s,l),l;const c=this[n(2881)](t,e,r,o);return this._cache.set(s,c),this._hadAnyChanges=!0,c}}class wn{constructor(t,e,r,o){const n=i;this[n(1141)]=r,this.max=o,this.points=t,this[n(1020)]=e}static[i(368)](t,e){const i=[];for(let r=0;r<8;r++)i.push([1&~r?t[0]:e[0],1==(r>>1&1)?e[1]:t[1],1==(r>>2&1)?e[2]:t[2]]);return new wn(i,[[-1,0,0,e[0]],[1,0,0,-t[0]],[0,-1,0,e[1]],[0,1,0,-t[1]],[0,0,-1,e[2]],[0,0,1,-t[2]]],t,e)}static[i(2014)](t,r,o){const n=i,s=e.bE([],o[0],o[1],o[2]),a=e.bF([],[r[0],0,0],s),l=e.bF([],[0,r[1],0],s),c=e.bF([],[0,0,r[2]],s),h=[...t],u=[...t];for(let e=0;e<8;e++)for(let i=0;i<3;i++){const r=t[i]+a[i]*(1&~e?-1:1)+l[i]*(1==(e>>1&1)?1:-1)+c[i]*(1==(e>>2&1)?1:-1);h[i]=Math[n(1141)](h[i],r),u[i]=Math.max(u[i],r)}const d=[];for(let i=0;i<8;i++){const r=[...t];e.b3(r,r,e.b2([],a,1&~i?-1:1)),e.b3(r,r,e.b2([],l,1==(i>>1&1)?1:-1)),e.b3(r,r,e.b2([],c,1==(i>>2&1)?1:-1)),d.push(r)}return new wn(d,[[...a,-e.b8(a,d[0])],[...l,-e.b8(l,d[0])],[...c,-e.b8(c,d[0])],[-a[0],-a[1],-a[2],-e.b8(a,d[7])],[-l[0],-l[1],-l[2],-e.b8(l,d[7])],[-c[0],-c[1],-c[2],-e.b8(c,d[7])]],h,u)}intersectsFrustum(t){const e=i;let r=!0;const o=this[e(1182)][e(953)],n=this[e(1020)][e(953)],s=t.planes.length,a=t[e(1182)][e(953)];for(let i=0;i<s;i++){const n=t[e(1020)][i];let s=0;for(let t=0;t<o;t++){const e=this.points[t];n[0]*e[0]+n[1]*e[1]+n[2]*e[2]+n[3]>=0&&s++}if(0===s)return 0;s<o&&(r=!1)}if(r)return 2;for(let i=0;i<n;i++){const r=this.planes[i];let o=0;for(let i=0;i<a;i++){const n=t[e(1182)][i];r[0]*n[0]+r[1]*n[1]+r[2]*n[2]+r[3]>=0&&o++}if(0===o)return 0}return 1}[i(1453)](t){const e=i,r=this[e(1182)][e(953)];let o=0;for(let i=0;i<r;i++){const r=this[e(1182)][i];t[0]*r[0]+t[1]*r[1]+t[2]*r[2]+t[3]>=0&&o++}return o===r?2:0===o?0:1}}class Tn{constructor(){this._boundingVolumeCache=new bn(this._computeTileBoundingVolume)}[i(2350)](){this[i(1976)].swapBuffers()}distanceToTile2d(t,e,i,r){const o=1<<i.z,n=1/o,s=i.x/o,a=i.y/o;let l=2;return l=Math.min(l,Gt(t,e,s,a,n)),l=Math.min(l,Gt(t,e,s+.5,-a-n,n)),l=Math.min(l,Gt(t,e,s+.5,2-a-n,n)),l}[i(2384)](t,e,r){const o=i,n=1<<e.z,s=1/n,a=e.x/n,l=Nt(t.x,a,s),c=Nt(t.x,a-1,s),h=Nt(t.x,a+1,s),u=Math[o(1141)](l,c,h);return u===h?1:u===c?-1:0}[i(496)](t,e){return H(t,e)>4}allowWorldCopies(){return!1}[i(2344)](t,e,r,o){return this[i(1976)].getTileBoundingVolume(t,e,r,o)}_computeTileBoundingVolume(t,r,o,n){const s=i;var a,l;let c=0,h=0;if(null==n?void 0:n[s(3245)]){const i=new e.a5(t.z,r,t.z,t.x,t.y),u=n.terrain.getMinMaxElevation(i);c=null!==(a=u[s(3308)])&&void 0!==a?a:Math[s(1141)](0,o),h=null!==(l=u.maxElevation)&&void 0!==l?l:Math[s(2153)](0,o)}if(c/=e.bH,h/=e.bH,c+=1,h+=1,t.z<=0)return wn[s(368)]([-h,-h,-h],[h,h,h]);if(1===t.z)return wn[s(368)]([0===t.x?-h:0,0===t.y?0:-h,-h],[0===t.x?0:h,0===t.y?h:0,h]);{const i=[zt(0,0,t.x,t.y,t.z),zt(e.a8,0,t.x,t.y,t.z),zt(e.a8,e.a8,t.x,t.y,t.z),zt(0,e.a8,t.x,t.y,t.z)],r=[];for(const t of i)r[s(2315)](e.b2([],t,h));if(h!==c)for(const t of i)r.push(e.b2([],t,c));0===t.y&&r[s(2315)]([0,1,0]),t.y===(1<<t.z)-1&&r.push([0,-1,0]);const o=[1,1,1],n=[-1,-1,-1];for(const t of r)for(let e=0;e<3;e++)o[e]=Math[s(1141)](o[e],t[e]),n[e]=Math.max(n[e],t[e]);const a=zt(e.a8/2,e.a8/2,t.x,t.y,t.z),l=e.b7([],[0,1,0],a);e.b6(l,l);const u=e.b7([],a,l);e.b6(u,u);const d=e.b7([],i[2],i[1]);e.b6(d,d);const p=e.b7([],i[0],i[3]);e.b6(p,p),r[s(2315)](e.b2([],a,h)),t.y>=(1<<t.z)/2&&r[s(2315)](e.b2([],zt(e.a8/2,0,t.x,t.y,t.z),h)),t.y<(1<<t.z)/2&&r[s(2315)](e.b2([],zt(e.a8/2,e.a8,t.x,t.y,t.z),h));const f=Ut(a,r),m=Ut(u,r),_=[-a[0],-a[1],-a[2],f.max],y=[a[0],a[1],a[2],-f.min],g=[-u[0],-u[1],-u[2],m[s(2153)]],v=[u[0],u[1],u[2],-m.min],x=[...d,0],b=[...p,0],w=[];return 0===t.y?w[s(2315)](e.bG(b,x,_),e.bG(b,x,y)):w[s(2315)](e.bG(g,x,_),e.bG(g,x,y),e.bG(g,b,_),e.bG(g,b,y)),t.y===(1<<t.z)-1?w[s(2315)](e.bG(b,x,_),e.bG(b,x,y)):w.push(e.bG(v,x,_),e.bG(v,x,y),e.bG(v,b,_),e.bG(v,b,y)),new wn(w,[_,y,g,v,x,b],o,n)}}}class Sn{get[i(3204)](){const t=i;return this[t(1907)][t(3204)]}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get[i(651)](){return this[i(1907)].pixelsToGLUnits}get[i(2919)](){return this._helper[i(2919)]}get size(){return this._helper.size}get[i(1589)](){return this[i(1907)].rotationMatrix}get[i(1281)](){return this._helper.centerPoint}get pixelsPerMeter(){const t=i;return this[t(1907)][t(1081)]}setMinZoom(t){this[i(1907)].setMinZoom(t)}[i(922)](t){this._helper.setMaxZoom(t)}[i(641)](t){this._helper.setMinPitch(t)}[i(2580)](t){this._helper.setMaxPitch(t)}[i(494)](t){this._helper[i(494)](t)}setBearing(t){this[i(1907)].setBearing(t)}[i(2467)](t){this._helper.setPitch(t)}[i(2053)](t){this._helper.setRoll(t)}setFov(t){this._helper[i(2519)](t)}setZoom(t){this[i(1907)].setZoom(t)}[i(3302)](t){this._helper[i(3302)](t)}[i(1119)](t){this._helper.setElevation(t)}[i(2661)](t){const e=i;this[e(1907)][e(2661)](t)}[i(378)](t){this._helper[i(378)](t)}interpolatePadding(t,e,r){return this[i(1907)].interpolatePadding(t,e,r)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}[i(2820)](t,e){this._helper[i(2820)](t,e)}[i(946)](){return this._helper.getMaxBounds()}[i(2464)](t){const e=i;this[e(1907)][e(2464)](t)}[i(566)](t){this[i(1907)].setConstrainOverride(t)}overrideNearFarZ(t,e){this[i(1907)].overrideNearFarZ(t,e)}[i(3181)](){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){const e=i;return this[e(1907)][e(718)](this.getCameraPoint(),t)}get[i(782)](){return this[i(1907)].tileSize}get tileZoom(){return this._helper[i(2752)]}get scale(){return this._helper[i(354)]}get[i(3507)](){return this[i(1907)].worldSize}get[i(1422)](){const t=i;return this[t(1907)][t(1422)]}get height(){return this._helper[i(3282)]}get[i(3262)](){const t=i;return this[t(1907)][t(3262)]}get[i(857)](){return this._helper.latRange}get minZoom(){return this._helper[i(1630)]}get maxZoom(){const t=i;return this[t(1907)][t(1239)]}get[i(3512)](){const t=i;return this[t(1907)][t(3512)]}get[i(1972)](){return this[i(1907)].center}get minPitch(){return this[i(1907)].minPitch}get maxPitch(){const t=i;return this[t(1907)][t(3421)]}get pitch(){return this._helper.pitch}get pitchInRadians(){const t=i;return this[t(1907)][t(1809)]}get[i(3579)](){return this[i(1907)].roll}get[i(2439)](){return this._helper.rollInRadians}get bearing(){return this._helper[i(1121)]}get[i(539)](){const t=i;return this[t(1907)][t(539)]}get fov(){return this[i(1907)].fov}get fovInRadians(){return this[i(1907)].fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get[i(390)](){return this[i(1907)].unmodified}get renderWorldCopies(){const t=i;return this[t(1907)][t(2356)]}get[i(2718)](){return this[i(1907)].constrainOverride}get nearZ(){const t=i;return this[t(1907)][t(3003)]}get farZ(){const t=i;return this[t(1907)][t(1694)]}get[i(1199)](){return this._helper[i(1199)]}[i(1140)](t){}constructor(t){const r=i;this[r(3482)]=e.bI(),this[r(847)]=e.bm(),this[r(2002)]=e.bl(),this[r(3002)]=e.bm(),this._globeViewProjMatrixNoCorrectionInverted=e.bm(),this[r(3372)]=e.bm(),this._cameraPosition=e.bC(),this._globeLatitudeErrorCorrectionRadians=0,this.defaultConstrain=(t,i)=>{const o=r,n=e.aq(t[o(2329)],-e.ar,e.ar),s=e.aq(+i,this[o(1630)]+Ft(0,n),this[o(1239)]);return{center:new e.X(t.longitude,n),zoom:s}},this.applyConstrain=(t,e)=>this[r(1907)][r(3485)](t,e),this._helper=new en({calcMatrices:()=>{this[r(2173)]()},defaultConstrain:(t,e)=>this.defaultConstrain(t,e)},t),this[r(3096)]=new Tn}[i(2621)](){const t=i,e=new Sn;return e[t(937)](this,!1),e}apply(t,e,r){const o=i;this._globeLatitudeErrorCorrectionRadians=r||0,this._helper[o(937)](t,e)}get projectionMatrix(){return this._projectionMatrix}get[i(3172)](){return this[i(3002)]}get[i(3560)](){return this[i(3372)]}get[i(1399)](){const t=i,r=e.bC();return r[0]=this[t(3e3)][0],r[1]=this[t(3e3)][1],r[2]=this._cameraPosition[2],r}get cameraToCenterDistance(){const t=i;return this[t(1907)][t(2862)]}getProjectionData(t){const e=i,{overscaledTileID:r,applyGlobeMatrix:o}=t,n=this[e(1907)].getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:n,clippingPlane:this._cachedClippingPlane,projectionTransition:o?1:0,fallbackMatrix:this[e(2002)]}}_computeClippingPlane(t){const r=i,o=this.pitchInRadians,n=this.cameraToCenterDistance/t,s=Math.sin(o)*n,a=Math.cos(o)*n+1,l=1/Math.sqrt(s*s+a*a)*1;let c=-s,h=a;const u=Math[r(1313)](c*c+h*h);c/=u,h/=u;const d=[0,c,h];e.bJ(d,d,[0,0,0],-this[r(539)]),e.bK(d,d,[0,0,0],-1*this.center.latitude*Math.PI/180),e.bL(d,d,[0,0,0],this.center.longitude*Math.PI/180);const p=1/e.ba(d);return e.b2(d,d,p),[...d,-l*p]}isLocationOccluded(t){return!this.isSurfacePointVisible(Dt(t))}transformLightDirection(t){const r=i,o=this[r(1907)][r(1243)].longitude*Math.PI/180,n=this[r(1907)][r(1243)][r(2329)]*Math.PI/180,s=Math.cos(n),a=[Math.sin(o)*s,Math[r(1741)](n),Math.cos(o)*s],l=[a[2],0,-a[0]],c=[0,0,0];e.b7(c,l,a),e.b6(l,l),e.b6(c,c);const h=[0,0,0];return e.b6(h,[l[0]*t[0]+c[0]*t[1]+a[0]*t[2],l[1]*t[0]+c[1]*t[1]+a[1]*t[2],l[2]*t[0]+c[2]*t[1]+a[2]*t[2]]),h}getPixelScale(){const t=i;return 1/Math.cos(this._helper[t(1243)][t(2329)]*Math.PI/180)}[i(1128)](){return Math.cos(this[i(1907)]._center.latitude*Math.PI/180)}[i(365)](t,r,o){const n=i,s=function(t,i,r){const o=1/(1<<r.z);return new e.ac(t/e.a8*o+r.x*o,i/e.a8*o+r.y*o)}(t,r,o.canonical),a=(l=s.y,[e.bB(s.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-l*Math.PI*2))-.5*Math.PI]);var l;return this[n(1128)]()/Math.cos(a[1])}projectTileCoordinates(t,r,o,n){const s=o[i(842)],a=zt(t,r,s.x,s.y,s.z),l=1+(n?n(t,r):0)/e.bH,c=[a[0]*l,a[1]*l,a[2]*l,1];e.aK(c,c,this._globeViewProjMatrixNoCorrection);const h=this._cachedClippingPlane,u=h[0]*a[0]+h[1]*a[1]+h[2]*a[2]+h[3]<0;return{point:new e.P(c[0]/c[3],c[1]/c[3]),signedDistanceFromCamera:c[3],isOccluded:u}}_calcMatrices(){const t=i;if(!this[t(1907)][t(1971)]||!this._helper._height)return;const r=Lt(this[t(3507)],this[t(1972)][t(2329)]),o=e.bn(),n=e.bn();this._helper[t(1199)]&&(this[t(1907)][t(1709)]=.5,this._helper._farZ=this[t(2862)]+2*r),e.bh(o,this[t(2807)],this.width/this[t(3282)],this[t(1907)]._nearZ,this._helper[t(3270)]);const s=this[t(2919)];o[8]=2*-s.x/this._helper._width,o[9]=2*s.y/this._helper[t(2896)],this[t(847)]=e.bi(o),this._globeProjMatrixInverted=e.bn(),e.aE(this[t(3372)],o),e.S(o,o,[0,0,-this[t(2862)]]),e.bj(o,o,this[t(2439)]),e.bk(o,o,-this[t(1809)]),e.bj(o,o,this.bearingInRadians),e.S(o,o,[0,0,-r]);const a=e.bC();a[0]=r,a[1]=r,a[2]=r,e.bk(n,o,this[t(1972)].latitude*Math.PI/180),e.bM(n,n,-this.center[t(3396)]*Math.PI/180),e.U(n,n,a),this._globeViewProjMatrixNoCorrection=n,e.bk(o,o,this.center.latitude*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),e.bM(o,o,-this[t(1972)].longitude*Math.PI/180),e.U(o,o,a),this._globeViewProjMatrix32f=new Float32Array(o),this[t(1883)]=e.bn(),e.aE(this[t(1883)],n);const l=e.bC();this[t(3e3)]=e.bC(),this._cameraPosition[2]=this.cameraToCenterDistance/r,e.bJ(this._cameraPosition,this._cameraPosition,l,-this[t(2439)]),e.bK(this[t(3e3)],this._cameraPosition,l,this.pitchInRadians),e.bJ(this[t(3e3)],this._cameraPosition,l,-this[t(539)]),e.b3(this._cameraPosition,this[t(3e3)],[0,0,1]),e.bK(this[t(3e3)],this[t(3e3)],l,-this.center.latitude*Math.PI/180),e.bL(this._cameraPosition,this[t(3e3)],l,this[t(1972)].longitude*Math.PI/180),this[t(3482)]=this[t(972)](r);const c=e.bi(this[t(1883)]);e.U(c,c,[1,1,-1]),this._cachedFrustum=nn.fromInvProjectionMatrix(c,1,0,this._cachedClippingPlane,!0)}[i(1153)](t){e.w(i(783));const r=e.bn();return e.au(r),r}getVisibleUnwrappedCoordinates(t){return[new e.bf(0,t)]}[i(2251)](){return this[i(3665)]}[i(2121)](){return this[i(3482)]}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){const r=i;t&&e.w("terrain is not fully supported on vertical perspective projection."),this[r(1907)].recalculateZoomAndCenter(0)}[i(1331)](){return 1}[i(2907)](){const t=i;return this[t(1907)][t(2907)]()}[i(2390)](){return this[i(1907)].getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}[i(2265)](t,r){const o=i;if(!this._globeViewProjMatrixNoCorrection)return 1;const n=Dt(t);e.b2(n,n,1+r/e.bH);const s=e.bI();return e.aK(s,[n[0],n[1],n[2],1],this[o(3002)]),s[2]/s[3]}populateCache(t){}getBounds(){const t=i,r=.5*this[t(1422)],o=.5*this.height,n=[new e.P(0,0),new e.P(r,0),new e.P(this.width,0),new e.P(this.width,o),new e.P(this.width,this.height),new e.P(r,this[t(3282)]),new e.P(0,this.height),new e.P(0,o)],s=[];for(const e of n)s.push(this[t(347)](e));let a=0,l=0,c=0,h=0;const u=this.center;for(const t of s){const i=e.bN(u.longitude,t.longitude),r=e.bN(u.latitude,t.latitude);i<l&&(l=i),i>a&&(a=i),r<h&&(h=r),r>c&&(c=r)}const d=[u.longitude+l,u.latitude+h,u.longitude+a,u.latitude+c];return this[t(1287)]([0,1,0])&&(d[3]=90,d[0]=-180,d[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(d[1]=-90,d[0]=-180,d[2]=180),new io(d)}calculateCenterFromCameraLngLatAlt(t,e,r,o){return this._helper[i(1145)](t,e,r,o)}[i(1265)](t,r){const o=i,n=Dt(this[o(347)](r)),s=Dt(t),a=e.bC();e.bO(a);const l=e.bC();e.bL(l,n,a,-this.center[o(3396)]*Math.PI/180),e.bK(l,l,a,this[o(1972)].latitude*Math.PI/180);const c=s[0]*s[0]+s[2]*s[2],h=l[0]*l[0];if(c<h)return;const u=Math[o(1313)](c-h),d=-u,p=e.bP(s[0],s[2],l[0],u),f=e.bP(s[0],s[2],l[0],d),m=e.bC();e.bL(m,s,a,-p);const _=e.bP(m[1],m[2],l[1],l[2]),y=e.bC();e.bL(y,s,a,-f);const g=e.bP(y[1],y[2],l[1],l[2]),v=.5*Math.PI,x=_>=-v&&_<=v,b=g>=-v&&g<=v;let w,T;if(x&&b){const t=this.center.longitude*Math.PI/180,i=this[o(1972)][o(2329)]*Math.PI/180;e.bQ(p,t)+e.bQ(_,i)<e.bQ(f,t)+e.bQ(g,i)?(w=p,T=_):(w=f,T=g)}else if(x)w=p,T=_;else{if(!b)return;w=f,T=g}const S=w/Math.PI*180,P=T/Math.PI*180,I=this.center[o(2329)];this[o(3302)](new e.X(S,e.aq(P,-90,90))),this[o(2707)](this.zoom+Ft(I,this.center[o(2329)]))}locationToScreenPoint(t,r){const o=i,n=Dt(t);if(r){const i=r[o(3380)](t,this._helper[o(823)]);e.b2(n,n,1+i/e.bH)}return this._projectSurfacePointToScreen(n)}[i(1494)](t){const r=i,o=e.bI();return e.aK(o,[...t,1],this[r(3002)]),o[0]/=o[3],o[1]/=o[3],new e.P((.5*o[0]+.5)*this.width,(.5*-o[1]+.5)*this.height)}screenPointToMercatorCoordinate(t,r){const o=i;if(r){const e=r[o(432)](t);if(e)return e}return e.ac[o(1677)](this[o(347)](t))}screenPointToLocation(t,e){var i;return null===(i=this.screenPointToMercatorCoordinate(t,e))||void 0===i?void 0:i.toLngLat()}[i(1271)](t,e){const r=this[i(3e3)],o=this.getRayDirectionFromPixel(t);return!!this.rayPlanetIntersection(r,o)}[i(339)](t){const r=i,o=e.bI();o[0]=t.x/this[r(1422)]*2-1,o[1]=-1*(t.y/this[r(3282)]*2-1),o[2]=1,o[3]=1,e.aK(o,o,this._globeViewProjMatrixNoCorrectionInverted),o[0]/=o[3],o[1]/=o[3],o[2]/=o[3];const n=e.bC();n[0]=o[0]-this._cameraPosition[0],n[1]=o[1]-this[r(3e3)][1],n[2]=o[2]-this._cameraPosition[2];const s=e.bC();return e.b6(s,n),s}isSurfacePointVisible(t){const e=this[i(3482)];return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]>=0}[i(1287)](t){const r=i;if(!this.isSurfacePointVisible(t))return!1;const o=e.bI();return e.aK(o,[...t,1],this[r(3002)]),o[0]/=o[3],o[1]/=o[3],o[2]/=o[3],o[0]>-1&&o[0]<1&&o[1]>-1&&o[1]<1&&o[2]>-1&&o[2]<1}rayPlanetIntersection(t,r){const o=i,n=e.b8(t,r),s=e.bC(),a=e.bC();e.b2(a,r,n),e.b5(s,t,a);const l=1-e.b8(s,s);if(l<0)return null;const c=e.b8(t,t)-1,h=-n+(n<0?1:-1)*Math.sqrt(l),u=c/h,d=h;return{tMin:Math.min(u,d),tMax:Math[o(2153)](u,d)}}[i(347)](t){const r=i,o=this[r(3e3)],n=this.getRayDirectionFromPixel(t),s=this.rayPlanetIntersection(o,n);if(s){const t=e.bC();e.b3(t,o,[n[0]*s[r(366)],n[1]*s.tMin,n[2]*s.tMin]);const i=e.bC();return e.b6(i,t),Ot(i)}const a=this[r(3482)],l=a[0]*n[0]+a[1]*n[1]+a[2]*n[2],c=-e.be(a,o)/l,h=e.bC();if(c>0)e.b3(h,o,[n[0]*c,n[1]*c,n[2]*c]);else{const t=e.bC();e.b3(t,o,[2*n[0],2*n[1],2*n[2]]);const i=e.be(this[r(3482)],t);e.b5(h,t,[this[r(3482)][0]*i,this._cachedClippingPlane[1]*i,this[r(3482)][2]*i])}const u=function(t){const i=r,o=e.bC();return o[0]=t[0]*-t[3],o[1]=t[1]*-t[3],o[2]=t[2]*-t[3],{center:o,radius:Math[i(1313)](1-t[3]*t[3])}}(a);return Ot(function(t,i,r){const o=e.bC();e.b5(o,r,t);const n=e.bC();return e.bD(n,t,o,i/e.bc(o)),n}(u.center,u[r(3456)],h))}[i(647)](t,r){const o=i,n=e.X.convert(t),s=1/e.bH,a=e.bm();return e.bM(a,a,n[o(3396)]/180*Math.PI),e.bk(a,a,-n[o(2329)]/180*Math.PI),e.S(a,a,[0,0,1+r/e.bH]),e.bk(a,a,.5*Math.PI),e.U(a,a,[s,s,s]),a}[i(3127)](t=!0){const r=i,o=this.getProjectionData({overscaledTileID:new e.a5(0,0,0,0,0),applyGlobeMatrix:t});return o[r(1054)]=[0,0,1,1],o}[i(520)](t){}}class Pn{get[i(3204)](){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper[i(1113)]}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){const t=i;return this[t(1907)][t(2919)]}get size(){return this._helper[i(863)]}get[i(1589)](){return this._helper[i(1589)]}get centerPoint(){const t=i;return this[t(1907)][t(1281)]}get pixelsPerMeter(){return this._helper.pixelsPerMeter}[i(3689)](t){this._helper.setMinZoom(t)}[i(922)](t){const e=i;this[e(1907)][e(922)](t)}[i(641)](t){this._helper.setMinPitch(t)}[i(2580)](t){this._helper[i(2580)](t)}[i(494)](t){this._helper[i(494)](t)}[i(1812)](t){this[i(1907)].setBearing(t)}[i(2467)](t){const e=i;this[e(1907)][e(2467)](t)}[i(2053)](t){this[i(1907)].setRoll(t)}[i(2519)](t){const e=i;this[e(1907)][e(2519)](t)}[i(2707)](t){this[i(1907)].setZoom(t)}[i(3302)](t){this._helper[i(3302)](t)}setElevation(t){this[i(1907)].setElevation(t)}[i(2661)](t){const e=i;this[e(1907)][e(2661)](t)}setPadding(t){const e=i;this[e(1907)][e(378)](t)}interpolatePadding(t,e,r){return this[i(1907)].interpolatePadding(t,e,r)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}[i(2820)](t,e,r=!0){this[i(1907)].resize(t,e,r)}[i(946)](){return this._helper.getMaxBounds()}setMaxBounds(t){const e=i;this[e(1907)][e(2464)](t)}setConstrainOverride(t){this[i(1907)].setConstrainOverride(t)}[i(2272)](t,e){this._helper.overrideNearFarZ(t,e)}[i(3181)](){this._helper[i(3181)]()}getCameraQueryGeometry(t){const e=i;return this._helper[e(718)](this[e(2907)](),t)}get[i(782)](){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get[i(354)](){const t=i;return this[t(1907)][t(354)]}get[i(3507)](){return this[i(1907)].worldSize}get[i(1422)](){return this[i(1907)].width}get[i(3282)](){return this[i(1907)].height}get lngRange(){return this._helper[i(3262)]}get[i(857)](){return this._helper.latRange}get minZoom(){const t=i;return this[t(1907)][t(1630)]}get maxZoom(){return this[i(1907)].maxZoom}get[i(3512)](){const t=i;return this[t(1907)][t(3512)]}get[i(1972)](){const t=i;return this[t(1907)][t(1972)]}get[i(1042)](){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){const t=i;return this[t(1907)][t(1809)]}get[i(3579)](){return this._helper[i(3579)]}get rollInRadians(){const t=i;return this[t(1907)][t(2439)]}get[i(1121)](){return this[i(1907)].bearing}get bearingInRadians(){return this._helper[i(539)]}get[i(2025)](){return this._helper[i(2025)]}get[i(2807)](){const t=i;return this[t(1907)][t(2807)]}get[i(1708)](){return this[i(1907)].elevation}get[i(2157)](){return this[i(1907)].minElevationForCurrentTile}get[i(1022)](){return this[i(1907)].padding}get[i(390)](){return this[i(1907)].unmodified}get renderWorldCopies(){const t=i;return this[t(1907)][t(2356)]}get[i(2862)](){const t=i;return this[t(1907)][t(2862)]}get[i(2718)](){const t=i;return this[t(1907)][t(2718)]}get[i(3003)](){return this[i(1907)].nearZ}get farZ(){const t=i;return this[t(1907)][t(1694)]}get[i(1199)](){return this[i(1907)].autoCalculateNearFarZ}get isGlobeRendering(){return this[i(1065)]>0}[i(1140)](t,e){const r=i;this[r(1065)]=t,this[r(2708)]=e,this[r(2173)](),this[r(3275)].getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform[r(3069)]().prepareNextFrame()}get[i(723)](){return this.isGlobeRendering?this[i(3275)]:this._mercatorTransform}constructor(t){const e=i;this._globeLatitudeErrorCorrectionRadians=0,this[e(1065)]=1,this[e(2492)]=(t,e)=>this.currentTransform.defaultConstrain(t,e),this.applyConstrain=(t,i)=>this._helper[e(3485)](t,i),this._helper=new en({calcMatrices:()=>{this[e(2173)]()},defaultConstrain:(t,e)=>this.defaultConstrain(t,e)},t),this[e(1065)]=1,this[e(3293)]=new sn,this[e(3275)]=new Sn}[i(2621)](){const t=i,e=new Pn;return e._globeness=this._globeness,e[t(2708)]=this._globeLatitudeErrorCorrectionRadians,e.apply(this,!1),e}apply(t,e){const r=i;this[r(1907)][r(937)](t,e),this._mercatorTransform.apply(this,!1),this[r(3275)].apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get[i(3172)](){const t=i;return this[t(723)][t(3172)]}get inverseProjectionMatrix(){return this[i(723)].inverseProjectionMatrix}get[i(1399)](){const t=i;return this[t(723)][t(1399)]}getProjectionData(t){const e=i,r=this._mercatorTransform[e(3543)](t),o=this._verticalPerspectiveTransform[e(3543)](t);return{mainMatrix:this[e(2698)]?o.mainMatrix:r[e(359)],clippingPlane:o.clippingPlane,tileMercatorCoords:o.tileMercatorCoords,projectionTransition:t[e(2810)]?this[e(1065)]:0,fallbackMatrix:r[e(927)]}}[i(926)](t){return this[i(723)].isLocationOccluded(t)}[i(1605)](t){return this.currentTransform.transformLightDirection(t)}[i(1532)](){const t=i;return e.bx(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this[t(1065)])}[i(1128)](){const t=i;return e.bx(this[t(3293)][t(1128)](),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this[t(1065)])}getPitchedTextCorrection(t,r,o){const n=i,s=this[n(3293)][n(365)](t,r,o),a=this[n(3275)][n(365)](t,r,o);return e.bx(s,a,this._globeness)}[i(374)](t,e,r,o){return this[i(723)].projectTileCoordinates(t,e,r,o)}_calcMatrices(){const t=i;this[t(1907)][t(1971)]&&this[t(1907)]._height&&(this[t(3275)][t(937)](this,!1,this[t(2708)]),this._helper._nearZ=this._verticalPerspectiveTransform[t(3003)],this[t(1907)]._farZ=this[t(3275)][t(1694)],this[t(3293)].apply(this,!0,this[t(2698)]),this._helper._nearZ=this[t(3293)][t(3003)],this._helper._farZ=this[t(3293)].farZ)}[i(1153)](t){return this[i(723)].calculateFogMatrix(t)}[i(3519)](t){return this[i(723)].getVisibleUnwrappedCoordinates(t)}[i(2251)](){return this[i(723)].getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}[i(3069)](){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){const e=i;this[e(3293)][e(1515)](t),this._verticalPerspectiveTransform[e(1515)](t)}[i(1331)](){const t=i;return this[t(3293)][t(1331)]()}[i(2907)](){return this._helper.getCameraPoint()}[i(2390)](){return this[i(1907)].getCameraAltitude()}[i(2409)](){return this._helper.getCameraLngLat()}lngLatToCameraDepth(t,e){return this[i(723)].lngLatToCameraDepth(t,e)}[i(1953)](t){const e=i;this[e(3293)][e(1953)](t),this[e(3275)][e(1953)](t)}[i(1876)](){return this[i(723)].getBounds()}[i(1145)](t,e,r,o){return this._helper[i(1145)](t,e,r,o)}setLocationAtPoint(t,e){const r=i;if(!this[r(2698)])return this._mercatorTransform.setLocationAtPoint(t,e),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(t,e),this[r(937)](this[r(3275)],!1)}locationToScreenPoint(t,e){return this.currentTransform[i(2985)](t,e)}[i(2843)](t,e){return this.currentTransform[i(2843)](t,e)}[i(643)](t,e){return this.currentTransform[i(643)](t,e)}[i(1271)](t,e){return this.currentTransform.isPointOnMapSurface(t,e)}[i(339)](t){const e=i;return this[e(3275)][e(339)](t)}getMatrixForModel(t,e){return this.currentTransform.getMatrixForModel(t,e)}[i(3127)](t=!0){const e=i,r=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this[e(2698)])return r;const o=this._verticalPerspectiveTransform[e(3127)](t);return o[e(927)]=r[e(359)],o}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}}class In{get useGlobeControls(){return!0}[i(3278)](t,r){const o=i,n=jt(t,r);return Math.abs(n[o(3396)]-r.center[o(3396)])>180&&(n[o(3396)]=r[o(1972)].longitude+179.5*Math[o(2756)](n[o(3396)]-r.center[o(3396)])),{easingCenter:n,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(t,r){const o=i,n=t.around,s=r[o(643)](n);t[o(320)]&&r[o(1812)](r.bearing+t.bearingDelta),t.pitchDelta&&r[o(2467)](r[o(882)]+t[o(3068)]),t[o(1346)]&&r[o(2053)](r[o(3579)]+t[o(1346)]);const a=r.zoom;t[o(3430)]&&r[o(2707)](r.zoom+t.zoomDelta);const l=r[o(3512)]-a;if(0===l)return;const c=e.bN(r.center.longitude,s.longitude),h=c/(Math[o(1201)](c/180)+1),u=e.bN(r[o(1972)].latitude,s.latitude),d=r.getRayDirectionFromPixel(n),p=r.cameraPosition,f=-1*e.b8(p,d),m=e.bC();e.b3(m,p,[d[0]*f,d[1]*f,d[2]*f]);const _=e.ba(m)-1,y=Math[o(3297)](.5*-Math.max(_-.3,0)),g=Lt(r[o(3507)],r.center[o(2329)])/Math.min(r[o(1422)],r.height),v=e.bA(g,.9,.5,1,.25),x=(1-e.at(-l))*Math.min(y,v),b=r[o(1972)].latitude,w=r.zoom,T=new e.X(r.center.longitude+h*x,e.aq(r.center[o(2329)]+u*x,-e.ar,e.ar));r.setLocationAtPoint(s,n);const S=r[o(1972)],P=e.bA(Math[o(1201)](c),45,85,0,1),I=e.bA(g,.75,.35,0,1),C=Math[o(2916)](Math.max(P,I),.25),M=e.bN(S[o(3396)],T.longitude),A=e.bN(S.latitude,T.latitude);r.setCenter(new e.X(S.longitude+M*C,S.latitude+A*C).wrap()),r.setZoom(w+Ft(b,r.center[o(2329)]))}[i(2473)](t,e,r){const o=i;if(!t.panDelta)return;const n=e.center[o(2329)],s=e.zoom;e.setCenter(jt(t.panDelta,e).wrap()),e[o(2707)](s+Ft(n,e[o(1972)].latitude))}[i(2247)](t,r,o,n,s){const a=i,l=At(t,r,o,n,s),c=r[a(2367)]/s[a(1422)]*2-1,h=(s.width-r.right)/s[a(1422)]*2-1,u=r.top/s.height*-2+1,d=(s.height-r.bottom)/s[a(3282)]*-2+1,p=e.bN(o.getWest(),o[a(2320)]())<0,f=p?o[a(2320)]():o[a(2699)](),m=p?o[a(2699)]():o[a(2320)](),_=Math[a(2153)](o.getNorth(),o[a(1330)]()),y=Math[a(1141)](o[a(3235)](),o[a(1330)]()),g=f+.5*e.bN(f,m),v=_+.5*e.bN(_,y),x=s[a(2621)]();x.setCenter(l.center),x.setBearing(l.bearing),x.setPitch(0),x.setRoll(0),x.setZoom(l[a(3512)]);const b=x.modelViewProjectionMatrix,w=[Dt(o[a(344)]()),Dt(o.getNorthEast()),Dt(o.getSouthWest()),Dt(o.getSouthEast()),Dt(new e.X(m,v)),Dt(new e.X(f,v)),Dt(new e.X(g,_)),Dt(new e.X(g,y))],T=Dt(l[a(1972)]);let S=Number[a(2220)];for(const t of w)c<0&&(S=In.getLesserNonNegativeNonNull(S,In[a(930)](t,T,b,"x",c))),h>0&&(S=In[a(2613)](S,In[a(930)](t,T,b,"x",h))),u>0&&(S=In[a(2613)](S,In[a(930)](t,T,b,"y",u))),d<0&&(S=In.getLesserNonNegativeNonNull(S,In.solveVectorScale(t,T,b,"y",d)));if(Number[a(3588)](S)&&0!==S)return l.zoom=x.zoom+e.aw(S),l;Ct()}[i(427)](t,r){const o=i,n=t[o(1972)][o(2329)],s=t.applyConstrain(r.center?e.X[o(1029)](r.center):t.center,t.zoom)[o(1972)];t.setCenter(s.wrap());const a=void 0!==r.zoom?+r[o(3512)]:t[o(3512)]+Ft(n,s.latitude);t.zoom!==a&&t[o(2707)](a)}handleEaseTo(t,r){const o=i,n=t.zoom,s=t[o(1972)],a=t[o(1022)],l={roll:t.roll,pitch:t.pitch,bearing:t.bearing},c={roll:void 0===r.roll?t.roll:r[o(3579)],pitch:void 0===r.pitch?t[o(882)]:r[o(882)],bearing:void 0===r[o(1121)]?t[o(1121)]:r.bearing},h=void 0!==r[o(3512)],u=!t[o(749)](r[o(1022)]);let d=!1;const p=r.center?e.X[o(1029)](r.center):s,f=t.applyConstrain(p,n)[o(1972)];Pt(t,f);const m=t[o(2621)]();m[o(3302)](f),m[o(2707)](h?+r[o(3512)]:n+Ft(s[o(2329)],p.latitude)),m.setBearing(r[o(1121)]);const _=new e.P(e.aq(t[o(1281)].x+r[o(3390)].x,0,t[o(1422)]),e.aq(t[o(1281)].y+r[o(3390)].y,0,t[o(3282)]));m.setLocationAtPoint(f,_);const y=(r[o(1817)]&&r.offsetAsPoint[o(1844)]())>0?m[o(1972)]:f,g=h?+r[o(3512)]:n+Ft(s[o(2329)],y[o(2329)]),v=n+Ft(s.latitude,0),x=g+Ft(y.latitude,0),b=e.bN(s[o(3396)],y.longitude),w=e.bN(s[o(2329)],y[o(2329)]),T=e.at(x-v);return d=g!==n,{easeFunc:i=>{const n=o;if(e.br(l,c)||Mt({startEulerAngles:l,endEulerAngles:c,tr:t,k:i,useSlerp:l[n(3579)]!=c[n(3579)]}),u&&t[n(669)](a,r[n(1022)],i),r.around)e.w(n(1811)),t.setLocationAtPoint(r[n(2924)],r.aroundPoint);else{const e=x>v?Math[n(1141)](2,T):Math.max(.5,T),r=Math[n(2916)](e,1-i),o=Vt(s,b,w,i*r);t[n(3302)](o[n(317)]())}if(d){const r=e.J[n(2534)](v,x,i)+Ft(0,t[n(1972)][n(2329)]);t.setZoom(r)}},isZooming:d,elevationCenter:y}}[i(1284)](t,r){const o=i,n=void 0!==r[o(3512)],s=t.center,a=t.zoom,l=t[o(1022)],c=!t.isPaddingEqual(r.padding),h=t.applyConstrain(e.X[o(1029)](r[o(1972)]||r.locationAtOffset),a)[o(1972)],u=n?+r.zoom:t[o(3512)]+Ft(t.center[o(2329)],h[o(2329)]),d=t.clone();d.setCenter(h),d[o(2707)](u),d[o(1812)](r[o(1121)]);const p=new e.P(e.aq(t.centerPoint.x+r[o(3390)].x,0,t[o(1422)]),e.aq(t.centerPoint.y+r[o(3390)].y,0,t.height));d[o(1265)](h,p);const f=d[o(1972)];Pt(t,f);const m=function(t,i,r){const o=Dt(i),n=Dt(r),s=e.b8(o,n),a=Math.acos(s),l=Et(t);return a/(2*Math.PI)*l}(t,s,f),_=a+Ft(s.latitude,0),y=u+Ft(f.latitude,0),g=e.at(y-_);let v;if("number"==typeof r[o(1630)]){const i=+r.minZoom+Ft(f[o(2329)],0),n=Math.min(i,_,y)+Ft(0,f[o(2329)]),s=t[o(3485)](f,n)[o(3512)]+Ft(f[o(2329)],0);v=e.at(s-_)}const x=e.bN(s[o(3396)],f[o(3396)]),b=e.bN(s[o(2329)],f[o(2329)]);return{easeFunc:(i,n,a,h)=>{const d=o,p=Vt(s,x,b,a);c&&t[d(669)](l,r.padding,i);const m=1===i?f:p;t[d(3302)](m.wrap());const y=_+e.aw(n);t[d(2707)](1===i?u:y+Ft(0,m.latitude))},scaleOfZoom:g,targetCenter:f,scaleOfMinZoom:v,pixelPathLength:m}}static solveVectorScale(t,e,i,r,o){const n="x"===r?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],s=[i[3],i[7],i[11],i[15]],a=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],l=t[0]*s[0]+t[1]*s[1]+t[2]*s[2],c=e[0]*n[0]+e[1]*n[1]+e[2]*n[2],h=e[0]*s[0]+e[1]*s[1]+e[2]*s[2];return c+o*l===a+o*h||s[3]*(a-c)+n[3]*(h-l)+a*h==c*l?null:(c+n[3]-o*h-o*s[3])/(c-a-o*h+o*l)}static getLesserNonNegativeNonNull(t,e){return null!==e&&e>=0&&e<t?e:t}}class Cn{constructor(t){const e=i;this._globe=t,this._mercatorCameraHelper=new an,this[e(1821)]=new In}get[i(2126)](){return this._globe[i(1289)]}get[i(3677)](){return this[i(2126)]?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}[i(3278)](t,e){return this[i(3677)].handlePanInertia(t,e)}handleMapControlsRollPitchBearingZoom(t,e){return this.currentHelper[i(2610)](t,e)}handleMapControlsPan(t,e,r){this.currentHelper[i(2473)](t,e,r)}[i(2247)](t,e,i,r,o){return this.currentHelper.cameraForBoxAndBearing(t,e,i,r,o)}handleJumpToCenterZoom(t,e){this.currentHelper[i(427)](t,e)}handleEaseTo(t,e){return this.currentHelper[i(3627)](t,e)}[i(1284)](t,e){const r=i;return this[r(3677)][r(1284)](t,e)}}const Mn=(t,r)=>e.F(t,r&&r[i(2397)]((t=>i(2577)!==t.identifier))),An=function(){const t={},i=e.v.$version;for(const r in e.v.$root){const o=e.v.$root[r];if(o.required){let e=null;e="version"===r?i:"array"===o.type?[]:{},null!=e&&(t[r]=e)}}return t}();class kn extends e.E{constructor(t,o={}){const n=i;var s,a;super(),this._rtlPluginLoaded=()=>{const t=r;for(const e in this.tileManagers){const i=this.tileManagers[e][t(1321)]()[t(2784)];"vector"!==i&&t(1830)!==i||this[t(1217)][e][t(2964)]()}},this.map=t,this.dispatcher=new eo(I(),t[n(3334)]()),this.dispatcher.registerMessageHandler("GG",((t,e)=>this.getGlyphs(t,e))),this[n(3416)][n(414)]("GI",((t,e)=>this.getImages(t,e))),this.dispatcher[n(414)](n(748),((t,e)=>this.getDashes(t,e))),this[n(1829)]=new Nr,this[n(1829)][n(3686)](this);const l=(null===(s=t._container)||void 0===s?void 0:s.lang)||n(2354)!=typeof document&&(null===(a=document[n(3292)])||void 0===a?void 0:a[n(597)])||void 0;this[n(721)]=new qr(t._requestManager,o[n(2412)],l),this[n(1529)]=new Jr(256,512),this.crossTileSymbolIndex=new Xo,this[n(1611)](),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bR()),R().on(po,this[n(1960)]),this.on(n(3100),(t=>{const e=n;if(e(1841)!==t[e(2596)]||e(1978)!==t[e(3576)])return;const i=this.tileManagers[t.sourceId];if(!i)return;const r=i[e(1321)]();if(r&&r[e(2116)])for(const t in this._layers){const e=this._layers[t];e.source===r.id&&this._validateLayer(e)}}))}[i(1611)](){const t=i;var r;this._spritesImagesIds={},this._layers={},this._order=[],this[t(1217)]={},this[t(2747)]=new e.bS,this[t(440)]=[],this[t(527)]={},this._serializedLayers={},this[t(1919)]=null,this[t(1035)]=null,this.sky=null,this[t(3645)]&&(this[t(3645)].destroy(),delete this.projection),this._loaded=!1,this[t(1836)]=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this[t(3170)]={},this[t(3678)]=!1,this[t(2501)]=new((null===(r=this.crossTileSymbolIndex)||void 0===r?void 0:r[t(887)])||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(t,r){const o=i;var n,s,a;this._checkLoaded();const l=null===r?null!==(a=null===(s=null===(n=this.stylesheet.state)||void 0===n?void 0:n[t])||void 0===s?void 0:s.default)&&void 0!==a?a:null:r;if(e.bT(l,this[o(527)][t]))return this;this._globalState[t]=l,this._applyGlobalStateChanges([t])}[i(1127)](){return this._globalState}setGlobalState(t){const r=i;this._checkLoaded();const o=[];for(const i in t)!e.bT(this._globalState[i],t[i].default)&&(o[r(2315)](i),this[r(527)][i]=t[i][r(3316)]);this[r(2902)](o)}_applyGlobalStateChanges(t){const e=i;if(0===t[e(953)])return;const r=new Set,o={};for(const i of t){o[i]=this[e(527)][i];for(const t in this._layers){const o=this[e(3557)][t],n=o[e(2186)](),s=o.getPaintAffectingGlobalStateRefs(),a=o.getVisibilityAffectingGlobalStateRefs();if(n.has(i)&&r[e(2926)](o.source),s[e(2863)](i))for(const{name:t,value:r}of s[e(1445)](i))this[e(805)](o,t,r);(null==a?void 0:a[e(2863)](i))&&(o.recalculateVisibility(),this._updateLayer(o))}}this[e(3416)].broadcast("UGS",o);for(const t in this[e(1217)])r.has(t)&&(this[e(567)](t),this._changed=!0)}loadURL(t,r={},o){const n=i;this[n(1430)](new e.o("dataloading",{dataType:n(1048)})),r.validate=n(1535)!=typeof r[n(3256)]||r[n(3256)];const s=this[n(1920)]._requestManager.transformRequest(t,"Style");this[n(1253)]=new AbortController;const a=this._loadStyleRequest;e.l(s,this[n(1253)]).then((t=>{const i=n;this[i(1253)]=null;let s=t[i(3100)];if(s&&i(2112)==typeof s&&i(3100)in s&&("status"in s||i(1981)in s)){if(void 0!==s[i(1981)]&&200!==s.code)return void this[i(1430)](new e.n(new Error("Style service error: code="+s.code)));if(void 0!==s[i(2279)]&&"OK"!==s.status)return void this.fire(new e.n(new Error("Style service error: status="+s[i(2279)])));s=s[i(3100)],r=Object[i(2132)](Object.assign({},r),{validate:!1})}this._load(s,r,o)}))[n(2304)]((t=>{const i=n;this._loadStyleRequest=null,t&&!a.signal.aborted&&this[i(1430)](new e.n(t))}))}[i(479)](t,r={},o){const n=i;this.fire(new e.o(n(1757),{dataType:"style"})),this._frameRequest=new AbortController,zr[n(1820)](this._frameRequest)[n(2654)]((()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(t,r,o)}))[n(2304)]((()=>{}))}[i(1155)](){const t=i;this[t(1430)](new e.o("dataloading",{dataType:t(1048)})),this[t(1632)](An,{validate:!1})}_load(t,r,o){const n=i;var s,a;let l=r.transformStyle?r.transformStyle(o,t):t;if(r[n(3256)]&&Mn(this,e.G(l)))return;l=Object.assign({},l),this[n(1408)]=!0,this.stylesheet=l;for(const t in l[n(3640)])this[n(1387)](t,l.sources[t],{validate:!1});const c=l.asset,h=e.c.SERVER_URL,u=(t,e)=>t?/^\w+:\/\//.test(t)?t:h?""+h+t:t:t;if(c){const t=c.sprite,e=c.glyphs;if(t){let e;e="string"==typeof t?u(t):Array[n(2667)](t)?t[n(1920)]((t=>Object[n(2132)](Object[n(2132)]({},t),{url:u(t.url)}))):t,this[n(3024)](e)}else this.imageManager.setLoaded(!0);e&&this.glyphManager[n(2218)](u(e))}else l[n(3503)]?this._loadSprite(l.sprite):this.imageManager[n(3065)](!0),this.glyphManager.setURL(l.glyphs);this[n(1543)](),this.light=new Hr(this.stylesheet.light),this[n(3195)]((null===(s=this.stylesheet.projection)||void 0===s?void 0:s[n(2784)])||n(2380)),this.sky=new Yr(this[n(1919)][n(3169)]),this.map[n(3248)](null!==(a=this.stylesheet[n(3245)])&&void 0!==a?a:null),this[n(1430)](new e.o(n(3100),{dataType:n(1048)})),this[n(1430)](new e.o(n(3354)))}_createLayers(){const t=i;var r,o,n;const s=d(this[t(1919)].layers);this[t(2414)](null!==(r=this[t(1919)].state)&&void 0!==r?r:null),this.dispatcher.broadcast("SL",s),this[t(2373)]=s.map((t=>t.id)),this._layers={},this._serializedLayers=null;for(const i of s){const r=e.bU(i,this._globalState);if(r.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=r,e.bV(r)&&this.tileManagers[r.source]){const e=null!==(n=null===(o=i[t(3681)])||void 0===o?void 0:o[t(2749)])&&void 0!==n?n:r.paint.get(t(2749));this[t(1217)][r[t(1841)]].setRasterFadeDuration(e)}}}[i(3024)](t,o=!1,n=void 0){const s=i;this.imageManager.setLoaded(!1);const a=new AbortController;let l;this._spriteRequest=a,function(t,i,o,n){return e._(this,void 0,void 0,(function*(){const s=r,a=b(t),l=o>1?"@2x":"",c={},h={};for(const{id:t,url:r}of a){const o=i[s(399)](w(r,l,".json"),s(873));c[t]=e.l(o,n);const a=i.transformRequest(w(r,l,s(2386)),s(2514));h[t]=ki.getImage(a,n)}return yield Promise.all([...Object.values(c),...Object.values(h)]),function(t,i){return e._(this,void 0,void 0,(function*(){const e=r,o={};for(const r in t){o[r]={};const n=zr.getImageCanvasContext((yield i[r])[e(3100)]),s=(yield t[r]).data,a=s&&"object"==typeof s&&"data"in s&&"object"==typeof s.data?s[e(3100)]:s;for(const t in a){const{width:e,height:i,x:s,y:l,sdf:c,pixelRatio:h,stretchX:u,stretchY:d,content:p,textFitWidth:f,textFitHeight:m}=a[t];o[r][t]={data:null,pixelRatio:h,sdf:c,stretchX:u,stretchY:d,content:p,textFitWidth:f,textFitHeight:m,spriteData:{width:e,height:i,x:s,y:l,context:n}}}}return o}))}(c,h)}))}(t,this.map._requestManager,this[s(1920)][s(983)](),this._spriteRequest).then((t=>{const e=s;if(this._spriteRequest=null,t)for(const i in t){this[e(2787)][i]=[];const r=this[e(2787)][i]?this._spritesImagesIds[i].filter((e=>!(e in t))):[];for(const t of r)this.imageManager.removeImage(t),this._changedImages[t]=!0;for(const r in t[i]){const n=e(3316)===i?r:i+":"+r;this._spritesImagesIds[i][e(2315)](n),n in this.imageManager[e(2437)]?this[e(1829)].updateImage(n,t[i][r],!1):this.imageManager[e(1112)](n,t[i][r]),o&&(this._changedImages[n]=!0)}}})).catch((t=>{const i=s;this[i(508)]=null,l=t,a.signal.aborted||this[i(1430)](new e.n(l))}))[s(3351)]((()=>{const t=s;this.imageManager.setLoaded(!0),this[t(440)]=this[t(1829)][t(3130)](),o&&(this[t(1836)]=!0),this.dispatcher[t(884)]("SI",this[t(440)]),this[t(1430)](new e.o(t(3100),{dataType:"style"})),n&&n(l)}))}_unloadSprite(){const t=i;for(const e of Object[t(2007)](this[t(2787)])[t(1903)]())this[t(1829)][t(3305)](e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager[t(3130)](),this._changed=!0,this[t(3416)][t(884)]("SI",this[t(440)]),this.fire(new e.o("data",{dataType:t(1048)}))}_validateLayer(t){const r=i,o=this[r(1217)][t[r(1841)]];if(!o)return;const n=t.sourceLayer;if(!n)return;const s=o[r(1321)]();r(1830)===s.type?this.fire(new e.n(new Error('Source layer "'+n+r(1178)+s.id+'" as specified by style layer "'+t.id+'".'))):s.vectorLayerIds&&-1===s[r(2116)][r(2887)](n)&&console.warn('Source layer "'+n+'" does not exist on source "'+s.id+'" as specified by style layer "'+t.id+'".')}loaded(){const t=i;if(!this[t(1408)])return!1;if(Object.keys(this._updatedSources)[t(953)])return!1;for(const e in this[t(1217)])if(!this[t(1217)][e].loaded())return!1;return!!this.imageManager[t(1911)]()}_serializeByIds(t,r=!1){const o=i,n=this[o(2003)]();if(!t||0===t[o(953)])return Object.values(r?e.bW(n):n);const s=[];for(const i of t)if(n[i]){const t=r?e.bW(n[i]):n[i];s.push(t)}return s}[i(2003)](){const t=i;let e=this[t(2666)];if(e)return e;e=this._serializedLayers={};const r=Object[t(3680)](this[t(3557)]);for(const i of r){const r=this[t(3557)][i];"custom"!==r[t(2784)]&&(e[i]=r[t(624)]())}return e}[i(3626)](){const t=i;var e,r,o;if(null===(e=this[t(1035)])||void 0===e?void 0:e.hasTransition())return!0;if(null===(r=this[t(3169)])||void 0===r?void 0:r.hasTransition())return!0;if(null===(o=this[t(3645)])||void 0===o?void 0:o[t(377)]())return!0;for(const e in this.tileManagers)if(this.tileManagers[e][t(377)]())return!0;for(const e in this[t(3557)])if(this[t(3557)][e].hasTransition())return!0;return!1}[i(3517)](){if(!this._loaded)throw new Error(i(1683))}update(t){const r=i;if(!this._loaded)return;const o=this[r(1836)];if(o){const e=Object.keys(this._updatedLayers),i=Object.keys(this[r(1138)]);(e[r(953)]||i[r(953)])&&this._updateWorkerLayers(e,i);for(const t in this[r(395)]){const e=this._updatedSources[t];if("reload"===e)this[r(567)](t);else{if("clear"!==e)throw new Error("Invalid action "+e);this._clearSource(t)}}this._updateTilesForChangedImages(),this[r(916)]();for(const e in this[r(3170)])this._layers[e].updateTransitions(t);this[r(1035)][r(3658)](t),this[r(3169)][r(3658)](t),this._resetUpdates()}const n={};for(const t in this[r(1217)]){const e=this[r(1217)][t];n[t]=e.used,e[r(3523)]=!1}for(const e of this._order){const i=this[r(3557)][e];i[r(697)](t,this._availableImages),!i.isHidden(t.zoom)&&i.source&&(this[r(1217)][i[r(1841)]][r(3523)]=!0)}for(const t in n){const i=this.tileManagers[t];!!n[t]!=!!i.used&&i[r(1430)](new e.o(r(3100),{sourceDataType:"visibility",dataType:"source",sourceId:t}))}this.light[r(697)](t),this[r(3169)][r(697)](t),this[r(3645)].recalculate(t),this.z=t[r(3512)],o&&this[r(1430)](new e.o("data",{dataType:r(1048)}))}[i(1673)](){const t=i,e=Object[t(3680)](this[t(931)]);if(e.length){for(const i in this.tileManagers)this.tileManagers[i][t(1362)](["icons",t(1785)],e);this[t(931)]={}}}_updateTilesForChangedGlyphs(){const t=i;if(this[t(2023)]){for(const e in this.tileManagers)this[t(1217)][e][t(1362)](["glyphs"],[""]);this[t(2023)]=!1}}[i(3142)](t,e){this.dispatcher[i(884)]("UL",{layers:this._serializeByIds(t,!1),removedIds:e})}[i(1028)](){const t=i;this[t(1836)]=!1,this._updatedLayers={},this[t(1138)]={},this._updatedSources={},this[t(3170)]={},this[t(931)]={},this[t(2023)]=!1}setState(t,r={}){const o=i;var n;this._checkLoaded();const s=this.serialize();if(t=r[o(569)]?r.transformStyle(s,t):t,(null===(n=r.validate)||void 0===n||n)&&Mn(this,e.G(t)))return!1;(t=e.bW(t)).layers=d(t[o(1643)]);const a=function(t,e){const i=o;if(!t)return[{command:"setStyle",args:[e]}];let r=[];try{if(!p(t.version,e.version))return[{command:i(2183),args:[e]}];p(t[i(1972)],e[i(1972)])||r[i(2315)]({command:i(3302),args:[e[i(1972)]]}),p(t[i(3158)],e.state)||r.push({command:"setGlobalState",args:[e[i(3158)]]}),p(t[i(598)],e.centerAltitude)||r.push({command:i(770),args:[e.centerAltitude]}),p(t.zoom,e.zoom)||r.push({command:"setZoom",args:[e.zoom]}),p(t[i(1121)],e[i(1121)])||r.push({command:"setBearing",args:[e[i(1121)]]}),p(t.pitch,e.pitch)||r[i(2315)]({command:i(2467),args:[e.pitch]}),p(t[i(3579)],e[i(3579)])||r[i(2315)]({command:"setRoll",args:[e[i(3579)]]}),p(t.sprite,e[i(3503)])||r.push({command:i(1620),args:[e.sprite]}),p(t[i(2546)],e.glyphs)||r[i(2315)]({command:i(1219),args:[e.glyphs]}),p(t.transition,e.transition)||r.push({command:"setTransition",args:[e.transition]}),p(t.light,e[i(1035)])||r.push({command:i(3171),args:[e[i(1035)]]}),p(t[i(3245)],e[i(3245)])||r.push({command:"setTerrain",args:[e[i(3245)]]}),p(t[i(3169)],e.sky)||r.push({command:i(776),args:[e.sky]}),p(t.projection,e[i(3645)])||r.push({command:i(649),args:[e.projection]});const o={},n=[];!function(t,e,r,o){const n=i;let s;for(s in e=e||{},t=t||{})Object.prototype.hasOwnProperty.call(t,s)&&(Object.prototype.hasOwnProperty[n(3054)](e,s)||_(s,r,o));for(s in e)Object[n(979)].hasOwnProperty.call(e,s)&&(Object[n(979)].hasOwnProperty[n(3054)](t,s)?p(t[s],e[s])||("geojson"===t[s][n(2784)]&&n(1830)===e[s][n(2784)]&&y(t,e,s)?f(r,{command:n(2594),args:[s,e[s][n(3100)]]}):(l=e,_(a=s,c=r,o),m(a,l,c))):m(s,e,r));var a,l,c}(t.sources,e[i(3640)],n,o);const s=[];t.layers&&t.layers[i(799)]((t=>{const e=i;"source"in t&&o[t[e(1841)]]?r[e(2315)]({command:e(327),args:[t.id]}):s[e(2315)](t)})),r=r.concat(n),function(t,e,r){const o=i;e=e||[];const n=(t=t||[])[o(1920)](v),s=e[o(1920)](v),a=t[o(3535)](x,{}),l=e.reduce(x,{}),c=n.slice(),h=Object.create(null);let u,d,m,_,y;for(let t=0,e=0;t<n[o(953)];t++)u=n[t],Object[o(979)][o(2741)][o(3054)](l,u)?e++:(f(r,{command:o(327),args:[u]}),c.splice(c.indexOf(u,e),1));for(let t=0,e=0;t<s.length;t++)u=s[s.length-1-t],c[c.length-1-t]!==u&&(Object.prototype[o(2741)].call(a,u)?(f(r,{command:"removeLayer",args:[u]}),c.splice(c.lastIndexOf(u,c.length-e),1)):e++,_=c[c[o(953)]-t],f(r,{command:"addLayer",args:[l[u],_]}),c.splice(c[o(953)]-t,0,u),h[u]=!0);for(let t=0;t<s.length;t++)if(u=s[t],d=a[u],m=l[u],!h[u]&&!p(d,m))if(p(d.source,m[o(1841)])&&p(d[o(3333)],m[o(3333)])&&p(d.type,m[o(2784)])){for(y in g(d.layout,m[o(413)],r,u,null,o(1122)),g(d.paint,m.paint,r,u,null,o(1449)),p(d.filter,m.filter)||f(r,{command:"setFilter",args:[u,m.filter]}),p(d.minzoom,m[o(2045)])&&p(d[o(615)],m[o(615)])||f(r,{command:"setLayerZoomRange",args:[u,m.minzoom,m[o(615)]]}),d)Object[o(979)].hasOwnProperty.call(d,y)&&o(413)!==y&&o(3681)!==y&&"filter"!==y&&o(1978)!==y&&"minzoom"!==y&&o(615)!==y&&(0===y[o(2887)]("paint.")?g(d[y],m[y],r,u,y.slice(6),"setPaintProperty"):p(d[y],m[y])||f(r,{command:"setLayerProperty",args:[u,y,m[y]]}));for(y in m)Object[o(979)][o(2741)].call(m,y)&&!Object[o(979)][o(2741)][o(3054)](d,y)&&"layout"!==y&&o(3681)!==y&&o(2397)!==y&&o(1978)!==y&&o(2045)!==y&&"maxzoom"!==y&&(0===y[o(2887)](o(2146))?g(d[y],m[y],r,u,y[o(1557)](6),"setPaintProperty"):p(d[y],m[y])||f(r,{command:o(1463),args:[u,y,m[y]]}))}else f(r,{command:o(327),args:[u]}),_=c[c.lastIndexOf(u)+1],f(r,{command:"addLayer",args:[m,_]})}(s,e[i(1643)],r)}catch(t){console.warn(i(1781),t),r=[{command:"setStyle",args:[e]}]}return r}(s,t),l=this._getOperationsToPerform(a);if(l.unimplemented[o(953)]>0)throw new Error("Unimplemented: "+l.unimplemented[o(2533)](", ")+".");if(0===l[o(2625)][o(953)])return!1;for(const t of l[o(2625)])t();return this[o(1919)]=t,this._serializedLayers=null,this.fire(new e.o("style.load",{style:this})),!0}_getOperationsToPerform(t){const e=i,r=[],o=[];for(const i of t)switch(i.command){case e(3302):case e(2707):case"setBearing":case e(2467):case"setRoll":continue;case"addLayer":r.push((()=>this.addLayer[e(937)](this,i[e(2869)])));break;case"removeLayer":r.push((()=>this[e(327)][e(937)](this,i.args)));break;case e(1449):r[e(2315)]((()=>this.setPaintProperty.apply(this,i.args)));break;case"setLayoutProperty":r[e(2315)]((()=>this[e(1122)][e(937)](this,i[e(2869)])));break;case"setFilter":r[e(2315)]((()=>this[e(1889)].apply(this,i.args)));break;case e(1387):r.push((()=>this.addSource.apply(this,i[e(2869)])));break;case"removeSource":r.push((()=>this.removeSource.apply(this,i.args)));break;case"setLayerZoomRange":r.push((()=>this[e(1495)].apply(this,i[e(2869)])));break;case"setLight":r[e(2315)]((()=>this.setLight[e(937)](this,i[e(2869)])));break;case"setGeoJSONSourceData":r.push((()=>this[e(2594)].apply(this,i[e(2869)])));break;case e(1219):r.push((()=>this.setGlyphs.apply(this,i.args)));break;case e(1620):r[e(2315)]((()=>this[e(1620)].apply(this,i[e(2869)])));break;case"setTerrain":r.push((()=>this.map[e(3248)][e(937)](this,i[e(2869)])));break;case"setSky":r[e(2315)]((()=>this.setSky[e(937)](this,i[e(2869)])));break;case"setProjection":this[e(649)][e(937)](this,i.args);break;case e(2414):r.push((()=>this[e(2414)][e(937)](this,i.args)));break;case e(3215):r.push((()=>{}));break;default:o[e(2315)](i.command)}return{operations:r,unimplemented:o}}addImage(t,r){const o=i;if(this[o(3388)](t))return this.fire(new e.n(new Error(o(2696)+t+o(645))));this[o(1829)][o(1112)](t,r),this[o(676)](t)}[i(1679)](t,e){this.imageManager[i(1679)](t,e)}getImage(t){return this[i(1829)].getImage(t)}removeImage(t){const r=i;if(!this.getImage(t))return this[r(1430)](new e.n(new Error(r(2696)+t+r(2727))));this[r(1829)][r(3305)](t),this[r(676)](t)}_afterImageUpdated(t){const r=i;this[r(440)]=this.imageManager.listImages(),this[r(931)][t]=!0,this._changed=!0,this[r(3416)][r(884)]("SI",this[r(440)]),this.fire(new e.o(r(3100),{dataType:"style"}))}[i(3130)](){return this._checkLoaded(),this.imageManager.listImages()}[i(1387)](t,r,o={}){const n=i;if(this[n(3517)](),void 0!==this[n(1217)][t])throw new Error(n(954)+t+'" already exists.');if(!r[n(2784)])throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r)[n(2533)](", ")+".");if(["vector","raster",n(1830),"video",n(1873)][n(2887)](r.type)>=0&&this._validate(e.G.source,n(3394)+t,r,null,o))return;this.map&&this[n(1920)][n(3584)]&&(r.collectResourceTiming=!0);const s=this.tileManagers[t]=new wo(t,r,this[n(3416)]);s.style=this,s.setEventedParent(this,(()=>({isSourceLoaded:s.loaded(),source:s[n(624)](),sourceId:t}))),s[n(3540)](this[n(1920)]),this[n(1836)]=!0}removeSource(t){const r=i;if(this._checkLoaded(),void 0===this[r(1217)][t])throw new Error(r(3513));for(const i in this._layers)if(this[r(3557)][i][r(1841)]===t)return this.fire(new e.n(new Error(r(954)+t+r(1405)+i+'" is using it.')));const o=this.tileManagers[t];delete this[r(1217)][t],delete this[r(395)][t],o[r(1430)](new e.o(r(3100),{sourceDataType:"metadata",dataType:r(1841),sourceId:t})),o[r(3686)](null),o.onRemove(this[r(1920)]),this._changed=!0}setGeoJSONSourceData(t,e){const r=i;if(this[r(3517)](),void 0===this[r(1217)][t])throw new Error(r(3384)+t);const o=this[r(1217)][t].getSource();if(r(1830)!==o[r(2784)])throw new Error(r(2994)+o[r(2784)]+r(1891));o.setData(e),this[r(1836)]=!0}getSource(t){const e=i;return this.tileManagers[t]&&this[e(1217)][t][e(1321)]()}[i(1049)](t,r,o={}){const n=i;this[n(3517)]();const s=t.id;if(this.getLayer(s))return void this.fire(new e.n(new Error(n(2908)+s+'" already exists on this map.')));let a;if("custom"===t[n(2784)]){if(Mn(this,e.bX(t)))return;a=e.bU(t,this._globalState)}else{if(n(1841)in t&&"object"==typeof t.source&&(this[n(1387)](s,t[n(1841)]),t=e.bW(t),t=e.e(t,{source:s})),this[n(409)](e.G.layer,n(3653)+s,t,{arrayIndex:-1},o))return;a=e.bU(t,this[n(527)]),this[n(1371)](a),a[n(3686)](this,{layer:{id:s}})}const l=r?this[n(2373)][n(2887)](r):this[n(2373)].length;if(r&&-1===l)this.fire(new e.n(new Error(n(698)+s+n(2972)+r+'".')));else{if(this[n(2373)][n(1657)](l,0,s),this._layerOrderChanged=!0,this[n(3557)][s]=a,this[n(1138)][s]&&a.source&&n(1645)!==a.type){const t=this[n(1138)][s];delete this._removedLayers[s],t[n(2784)]!==a[n(2784)]?this[n(395)][a[n(1841)]]="clear":(this[n(395)][a.source]=n(2964),this.tileManagers[a.source].pause())}this[n(3244)](a),a[n(3540)]&&a.onAdd(this.map)}}moveLayer(t,r){const o=i;if(this[o(3517)](),this._changed=!0,!this[o(3557)][t])return void this.fire(new e.n(new Error(o(2573)+t+"' does not exist in the map's style and cannot be moved.")));if(t===r)return;const n=this[o(2373)][o(2887)](t);this[o(2373)][o(1657)](n,1);const s=r?this._order.indexOf(r):this._order[o(953)];r&&-1===s?this[o(1430)](new e.n(new Error(o(3674)+t+o(2972)+r+'".'))):(this[o(2373)].splice(s,0,t),this._layerOrderChanged=!0)}removeLayer(t){const r=i;this._checkLoaded();const o=this[r(3557)][t];if(!o)return void this[r(1430)](new e.n(new Error(r(2991)+t+'".')));o.setEventedParent(null);const n=this._order[r(2887)](t);this[r(2373)][r(1657)](n,1),this._layerOrderChanged=!0,this._changed=!0,this[r(1138)][t]=o,delete this[r(3557)][t],this._serializedLayers&&delete this._serializedLayers[t],delete this[r(2422)][t],delete this._updatedPaintProps[t],o.onRemove&&o.onRemove(this[r(1920)])}[i(518)](t){return this._layers[t]}[i(3107)](){return[...this[i(2373)]]}hasLayer(t){return t in this[i(3557)]}setLayerZoomRange(t,r,o){const n=i;this[n(3517)]();const s=this.getLayer(t);s?s.minzoom===r&&s.maxzoom===o||(null!=r&&(s.minzoom=r),null!=o&&(s[n(615)]=o),this[n(3244)](s)):this[n(1430)](new e.n(new Error(n(376)+t+'".')))}[i(1889)](t,r,o={}){const n=i;this._checkLoaded();const s=this[n(518)](t);if(s){if(!e.bT(s[n(2397)],r))return null==r?(s.setFilter(void 0),void this[n(3244)](s)):void(this._validate(e.G[n(2397)],"layers."+s.id+".filter",r,null,o)||(s[n(1889)](e.bW(r)),this[n(3244)](s)))}else this[n(1430)](new e.n(new Error('Cannot filter non-existing layer "'+t+'".')))}getFilter(t){const r=i;return e.bW(this[r(518)](t)[r(2397)])}[i(1122)](t,r,o,n={}){const s=i;this[s(3517)]();const a=this[s(518)](t);a?e.bT(a.getLayoutProperty(r),o)||(a.setLayoutProperty(r,o,n),this._updateLayer(a)):this[s(1430)](new e.n(new Error(s(2120)+t+'".')))}[i(3660)](t,r){const o=i,n=this[o(518)](t);if(n)return n.getLayoutProperty(r);this[o(1430)](new e.n(new Error('Cannot get style of non-existing layer "'+t+'".')))}setPaintProperty(t,r,o,n={}){const s=i;this[s(3517)]();const a=this[s(518)](t);a?e.bT(a[s(654)](r),o)||this[s(805)](a,r,o,n):this[s(1430)](new e.n(new Error('Cannot style non-existing layer "'+t+'".')))}[i(805)](t,r,o,n={}){const s=i;t.setPaintProperty(r,o,n)&&this[s(3244)](t),e.bV(t)&&s(2749)===r&&this.tileManagers[t.source].setRasterFadeDuration(o),this._changed=!0,this._updatedPaintProps[t.id]=!0,this._serializedLayers=null}getPaintProperty(t,e){return this[i(518)](t).getPaintProperty(e)}[i(361)](t,r){const o=i;this[o(3517)]();const n=t[o(1841)],s=t.sourceLayer,a=this.tileManagers[n];if(void 0===a)return void this.fire(new e.n(new Error("The source '"+n+o(2345))));const l=a[o(1321)]()[o(2784)];o(1830)===l&&s?this[o(1430)](new e.n(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):o(1325)!==l||s?(void 0===t.id&&this[o(1430)](new e.n(new Error(o(1023)))),a.setFeatureState(s,t.id,r)):this.fire(new e.n(new Error(o(2387))))}removeFeatureState(t,r){const o=i;this._checkLoaded();const n=t[o(1841)],s=this.tileManagers[n];if(void 0===s)return void this.fire(new e.n(new Error("The source '"+n+o(2345))));const a=s[o(1321)]()[o(2784)],l="vector"===a?t[o(1992)]:void 0;o(1325)!==a||l?r&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.n(new Error("A feature id is required to remove its specific state property."))):s.removeFeatureState(l,t.id,r):this[o(1430)](new e.n(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){const r=i;this[r(3517)]();const o=t[r(1841)],n=t[r(1992)],s=this.tileManagers[o];if(void 0!==s)return r(1325)!==s[r(1321)]().type||n?(void 0===t.id&&this[r(1430)](new e.n(new Error(r(1023)))),s.getFeatureState(n,t.id)):void this[r(1430)](new e.n(new Error(r(2387))));this[r(1430)](new e.n(new Error(r(1993)+o+r(2345))))}[i(752)](){const t=i;return e.e({duration:300,delay:0},this.stylesheet&&this[t(1919)][t(2495)])}serialize(){const t=i;if(!this[t(1408)])return;const r=e.bY(this.tileManagers,(t=>t.serialize())),o=this[t(2951)](this._order,!0),n=this[t(1920)][t(3592)]()||void 0,s=this[t(1919)];return e.bZ({version:s[t(1537)],name:s.name,metadata:s.metadata,light:s.light,sky:s.sky,center:s.center,zoom:s[t(3512)],bearing:s[t(1121)],pitch:s.pitch,sprite:s.sprite,glyphs:s[t(2546)],transition:s.transition,projection:s.projection,sources:r,layers:o,terrain:n},(t=>void 0!==t))}[i(3244)](t){const e=i;this._updatedLayers[t.id]=!0,t.source&&!this[e(395)][t.source]&&"raster"!==this.tileManagers[t[e(1841)]][e(1321)]().type&&(this._updatedSources[t.source]="reload",this[e(1217)][t[e(1841)]][e(1994)]()),this._serializedLayers=null,this[e(1836)]=!0}[i(1363)](t){const e=i,o=t=>{const e=r,i=this._layers[t][e(2784)];return e(1578)===i||e(1880)===i},n={},s=[];for(let i=this._order[e(953)]-1;i>=0;i--){const e=this._order[i];if(o(e)){n[e]=i;for(const i of t){const t=i[e];if(t)for(const e of t)s.push(e)}}}s.sort(((t,i)=>i[e(1631)]-t.intersectionZ));const a=[];for(let i=this[e(2373)][e(953)]-1;i>=0;i--){const r=this[e(2373)][i];if(o(r))for(let t=s.length-1;t>=0;t--){const r=s[t][e(2886)];if(n[r[e(3202)].id]<i)break;a[e(2315)](r),s.pop()}else for(const i of t){const t=i[r];if(t)for(const i of t)a[e(2315)](i.feature)}}return a}queryRenderedFeatures(t,r,o){const n=i;r&&r[n(2397)]&&this._validate(e.G.filter,"queryRenderedFeatures.filter",r.filter,null,r);const s={};if(r&&r.layers){if(!(Array.isArray(r.layers)||r[n(1643)]instanceof Set))return this[n(1430)](new e.n(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const t of r.layers){const i=this._layers[t];if(!i)return this[n(1430)](new e.n(new Error("The layer '"+t+"' does not exist in the map's style and cannot be queried for features."))),[];s[i[n(1841)]]=!0}}const a=[];r[n(2894)]=this._availableImages;const l=this[n(2003)](),c=r[n(1643)]instanceof Set?r.layers:Array.isArray(r[n(1643)])?new Set(r[n(1643)]):null,h=e.b_(r,["overlays"]),u=Object.assign(Object[n(2132)]({},h),{layers:c,globalState:this._globalState});for(const e in this.tileManagers)r[n(1643)]&&!s[e]||a.push(M(this.tileManagers[e],this._layers,l,t,u,o,this.map[n(3245)]?(t,e,i)=>this.map.terrain[n(870)](t,e,i):void 0));return this.placement&&a.push(function(t,e,i,r,o,s,a){const l=n,c={},h=s.queryRenderedSymbols(r),u=[];for(const t of Object[l(3680)](h)[l(1920)](Number))u.push(a[t]);u.sort(A);for(const i of u){const r=i[l(774)].lookupSymbolFeatures(h[i[l(2637)]],e,i.bucketIndex,i.sourceLayerIndex,{filterSpec:o.filter,globalState:o[l(2353)]},o[l(1643)],o.availableImages,t);for(const t in r){const e=c[t]=c[t]||[],o=r[t];o[l(1696)](((t,e)=>{const r=l,o=i[r(1989)];if(o){const i=o.indexOf(t[r(774)]);return o.indexOf(e.featureIndex)-i}return e.featureIndex-t[r(774)]}));for(const t of o)e.push(t)}}return function(t,e,i){for(const r in t)for(const o of t[r])k(o,i[e[r].source]);return t}(c,t,i)}(this._layers,l,this[n(1217)],t,u,this[n(2944)].collisionIndex,this[n(2944)].retainedQueryData)),this[n(1363)](a)}querySourceFeatures(t,r){const o=i;(null==r?void 0:r.filter)&&this[o(409)](e.G[o(2397)],"querySourceFeatures.filter",r[o(2397)],null,r);const n=this.tileManagers[t];return n?function(t,e){const i=o,r=t[i(2484)]().map((e=>t[i(1946)](e))),n=[],s={};for(let t=0;t<r[i(953)];t++){const o=r[t],a=o.tileID[i(842)].key;s[a]||(s[a]=!0,o.querySourceFeatures(n,e))}return n}(n,r?Object[o(2132)](Object[o(2132)]({},r),{globalState:this[o(527)]}):{globalState:this._globalState}):[]}getLight(){return this[i(1035)].getLight()}[i(3171)](t,r={}){const o=i;this[o(3517)]();const n=this.light[o(1039)]();let s=!1;for(const i in t)if(!e.bT(t[i],n[i])){s=!0;break}if(!s)return;const a={now:c(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this[o(1035)].setLight(t,r),this.light.updateTransitions(a)}[i(1411)](){var t;return null===(t=this[i(1919)])||void 0===t?void 0:t.projection}[i(649)](t){const e=i;if(this[e(3517)](),this.projection){if(this[e(3645)][e(1814)]===t.type)return;this[e(3645)].destroy(),delete this[e(3645)]}this[e(1919)].projection=t,this[e(3195)](t[e(2784)])}getSky(){var t;return null===(t=this[i(1919)])||void 0===t?void 0:t.sky}[i(776)](t,r={}){const o=i;this._checkLoaded();const n=this[o(3201)]();let s=!1;if(!t&&!n)return;if(t&&!n)s=!0;else if(!t&&n)s=!0;else for(const i in t)if(!e.bT(t[i],n[i])){s=!0;break}if(!s)return;const a={now:c(),transition:e.e({duration:300,delay:0},this.stylesheet[o(2495)])};this.stylesheet.sky=t,this[o(3169)].setSky(t,r),this[o(3169)].updateTransitions(a)}[i(3195)](t){const o=i,n=function(t,i){const o=r,n={constrainOverride:i};if(Array[o(2667)](t)){const e=new xn({type:t});return{projection:e,transform:new Pn(n),cameraHelper:new Cn(e)}}switch(t){case o(2380):return{projection:new Qo,transform:new sn(n),cameraHelper:new an};case o(2361):{const t=new xn({type:["interpolate",["linear"],[o(3512)],11,"vertical-perspective",12,o(2380)]});return{projection:t,transform:new Pn(n),cameraHelper:new Cn(t)}}case o(995):return{projection:new gn,transform:new Sn(n),cameraHelper:new In};default:return e.w(o(788)+t+". Falling back to mercator projection."),{projection:new Qo,transform:new sn(n),cameraHelper:new an}}}(t,this[o(1920)][o(2493)]);this.projection=n[o(3645)],this[o(1920)].migrateProjection(n[o(1847)],n.cameraHelper);for(const t in this.tileManagers)this.tileManagers[t][o(2964)]()}[i(409)](t,r,o,n,s={}){const a=i;return(!s||!1!==s[a(3256)])&&Mn(this,t[a(3054)](e.G,e.e({key:r,style:this.serialize(),value:o,styleSpec:e.v},n)))}_remove(t=!0){const e=i;this[e(1475)]&&(this._frameRequest.abort(),this[e(1475)]=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),R()[e(1002)](po,this._rtlPluginLoaded);for(const t in this[e(3557)])this._layers[t][e(3686)](null);for(const t in this[e(1217)]){const i=this[e(1217)][t];i[e(3686)](null),i[e(1593)](this[e(1920)])}this.imageManager[e(3686)](null),this.setEventedParent(null),t&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(t)}[i(3631)](t){this.tileManagers[t].clearTiles()}_reloadSource(t){this.tileManagers[t][i(1459)](),this.tileManagers[t].reload()}[i(2291)](t){const e=i;for(const i in this.tileManagers)this[e(1217)][i][e(1923)](t,this.map.terrain)}[i(3048)](){const t=i;for(const e in this[t(1217)])this._reloadSource(e)}_updatePlacement(t,e,r,o,n=!1){const s=i;let a=!1,l=!1;const h={};for(const e of this[s(2373)]){const i=this[s(3557)][e];if(s(1078)!==i[s(2784)])continue;if(!h[i[s(1841)]]){const t=this.tileManagers[i[s(1841)]];h[i.source]=t.getRenderableIds(!0)[s(1920)]((e=>t[s(1946)](e)))[s(1696)](((t,e)=>e.tileID[s(903)]-t.tileID[s(903)]||(t.tileID.isLessThan(e[s(3533)])?-1:1)))}const r=this.crossTileSymbolIndex.addLayer(i,h[i[s(1841)]],t[s(1972)][s(3396)]);a=a||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((n=n||this[s(3678)]||0===r)||!this.pauseablePlacement||this[s(3572)][s(1180)]()&&!this[s(2944)][s(1893)](c(),t[s(3512)]))&&(this.pauseablePlacement=new Uo(t,this[s(1920)].terrain,this._order,n,e,r,o,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement[s(3298)]():(this[s(3572)].continuePlacement(this[s(2373)],this._layers,h),this[s(3572)][s(1180)]()&&(this.placement=this.pauseablePlacement[s(1407)](c()),l=!0),a&&this.pauseablePlacement.placement.setStale()),l||a)for(const t of this[s(2373)]){const e=this[s(3557)][t];"symbol"===e.type&&this.placement.updateLayerOpacities(e,h[e.source])}return!this.pauseablePlacement[s(1180)]()||this.placement.hasTransitions(c())}[i(337)](){const t=i;for(const e in this.tileManagers)this[t(1217)][e][t(912)]()}[i(1747)](t,i){return e._(this,void 0,void 0,(function*(){const t=r,e=yield this[t(1829)].getImages(i[t(3452)]);this._updateTilesForChangedImages();const o=this[t(1217)][i.source];return o&&o.setDependencies(i[t(3533)][t(2133)],i.type,i[t(3452)]),e}))}[i(1329)](t,i){return e._(this,void 0,void 0,(function*(){const t=r,e=yield this[t(721)][t(1329)](i.stacks),o=this.tileManagers[i.source];return o&&o[t(1060)](i[t(3533)].key,i.type,[""]),e}))}getGlyphsUrl(){return this[i(1919)].glyphs||null}[i(1219)](t,r={}){const o=i;this._checkLoaded(),t&&this[o(409)](e.G[o(2546)],o(2546),t,null,r)||(this[o(2023)]=!0,this[o(1919)][o(2546)]=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}getDashes(t,i){return e._(this,void 0,void 0,(function*(){const t=r,e={};for(const[r,o]of Object[t(1197)](i[t(1795)]))e[r]=this.lineAtlas.getDash(o.dasharray,o.round);return e}))}addSprite(t,r,o={},n){const s=i;this._checkLoaded();const a=[{id:t,url:r}],l=[...b(this[s(1919)][s(3503)]),...a];this[s(409)](e.G[s(3503)],s(3503),l,null,o)||(this.stylesheet.sprite=l,this[s(3024)](a,!0,n))}removeSprite(t){const r=i;this._checkLoaded();const o=b(this[r(1919)].sprite);if(o[r(3307)]((e=>e.id===t))){if(this[r(2787)][t])for(const e of this._spritesImagesIds[t])this[r(1829)].removeImage(e),this[r(931)][e]=!0;o.splice(o[r(1569)]((e=>e.id===t)),1),this.stylesheet[r(3503)]=o[r(953)]>0?o:void 0,delete this._spritesImagesIds[t],this[r(440)]=this.imageManager.listImages(),this._changed=!0,this.dispatcher[r(884)]("SI",this[r(440)]),this.fire(new e.o(r(3100),{dataType:"style"}))}else this.fire(new e.n(new Error('Sprite "'+t+"\" doesn't exists on this map.")))}getSprite(){return b(this.stylesheet[i(3503)])}setSprite(t,r={},o){const n=i;this._checkLoaded(),t&&this[n(409)](e.G[n(3503)],n(3503),t,null,r)||(this[n(1919)][n(3503)]=t,t?this._loadSprite(t,!0,o):(this._unloadSprite(),o&&o(null)))}[i(2355)](){const t=i;this[t(1475)]&&(this._frameRequest[t(970)](),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest[t(970)](),this._loadStyleRequest=null),this._spriteRequest&&(this[t(508)][t(970)](),this[t(508)]=null);for(const e in this[t(1217)]){const i=this.tileManagers[e];i[t(3686)](null),i.onRemove(this[t(1920)])}this[t(1217)]={},this[t(1829)]&&(this[t(1829)][t(3686)](null),this.imageManager.destroy(),this[t(440)]=[],this._spritesImagesIds={}),this[t(721)]&&this.glyphManager[t(2355)]();for(const e in this._layers){const i=this[t(3557)][e];i[t(3686)](null),i.onRemove&&i.onRemove(this.map)}this[t(1611)](),this[t(3686)](null),this[t(3416)][t(1013)]("GG"),this.dispatcher.unregisterMessageHandler("GI"),this[t(3416)].unregisterMessageHandler(t(748)),this.dispatcher[t(2591)](!0),this._listeners={},this._oneTimeListeners={}}}Oi=e.aX([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:i(1428),components:2}]);class En{constructor(){const t=i;this.boundProgram=null,this[t(3597)]=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this[t(477)]=null,this.boundDynamicVertexBuffer=null,this.vao=null}[i(2211)](t,e,r,o,n,s,a,l,c){const h=i;this[h(1249)]=t;let u=this[h(1318)][h(953)]!==o.length;for(let t=0;!u&&t<o.length;t++)this[h(1318)][t]!==o[t]&&(u=!0);!this.vao||this.boundProgram!==e||this[h(3597)]!==r||u||this.boundIndexBuffer!==n||this[h(477)]!==s||this[h(2039)]!==a||this.boundDynamicVertexBuffer2!==l||this.boundDynamicVertexBuffer3!==c?this.freshBind(e,r,o,n,s,a,l,c):(t[h(3433)][h(571)](this.vao),a&&a.bind(),n&&n[h(1839)]&&n.bind(),l&&l[h(2211)](),c&&c[h(2211)]())}[i(2339)](t,e,r,o,n,s,a,l){const c=i,h=t[c(2118)],u=this.context,d=u.gl;this[c(2477)]&&this.destroy(),this[c(2477)]=u[c(3675)](),u.bindVertexArray[c(571)](this.vao),this[c(329)]=t,this.boundLayoutVertexBuffer=e,this[c(1318)]=r,this.boundIndexBuffer=o,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=s,this[c(3104)]=a,this[c(385)]=l,e.enableAttributes(d,t);for(const e of r)e[c(1969)](d,t);s&&s[c(1969)](d,t),a&&a[c(1969)](d,t),l&&l[c(1969)](d,t),e[c(2211)](),e[c(466)](d,t,n);for(const e of r)e[c(2211)](),e.setVertexAttribPointers(d,t,n);s&&(s.bind(),s[c(466)](d,t,n)),o&&o.bind(),a&&(a[c(2211)](),a[c(466)](d,t,n)),l&&(l.bind(),l.setVertexAttribPointers(d,t,n)),u.currentNumAttributes=h}destroy(){const t=i;this[t(2477)]&&(this[t(1249)][t(2094)](this[t(2477)]),this.vao=null)}}const zn=(t,r,o,n,s)=>({u_texture:0,u_ele_delta:t,u_fog_matrix:r,u_fog_color:o?o.properties.get("fog-color"):e.bs.white,u_fog_ground_blend:o?o[i(1594)].get("fog-ground-blend"):1,u_fog_ground_blend_opacity:s?0:o?o.calculateFogBlendOpacity(n):0,u_horizon_color:o?o[i(1594)].get("horizon-color"):e.bs[i(2176)],u_horizon_fog_blend:o?o.properties.get(i(1510)):1,u_is_globe_mode:s?1:0}),Dn={mainMatrix:"u_projection_matrix",tileMercatorCoords:i(1600),clippingPlane:i(1888),projectionTransition:"u_projection_transition",fallbackMatrix:i(304)};class Ln{constructor(t,r,o,n,s,a,l,c,h=[]){const u=i,d=t.gl;this.program=d.createProgram();const p=qt(r.staticAttributes),f=o?o.getBinderAttributes():[],m=p.concat(f),_=Yo[u(412)][u(2136)]?qt(Yo.prelude[u(2136)]):[],y=l.staticUniforms?qt(l[u(2136)]):[],g=r.staticUniforms?qt(r[u(2136)]):[],v=o?o.getBinderUniforms():[],x=_.concat(y).concat(g)[u(1912)](v),b=[];for(const t of x)b.indexOf(t)<0&&b[u(2315)](t);const w=o?o[u(693)]():[];kt(d)&&w.unshift("#version 300 es"),s&&w.push("#define OVERDRAW_INSPECTOR;"),a&&w.push(u(670)),c&&w[u(2315)](c),h&&w.push(...h);let T=w.concat(Yo[u(412)][u(3494)],l[u(3494)],r[u(3494)])[u(2533)]("\n"),S=w[u(1912)](Yo.prelude.vertexSource,l[u(2938)],r.vertexSource)[u(2533)]("\n");kt(d)||(T=function(t){const e=u;return t.replace(/\bin\s/g,"varying ")[e(3486)](e(2250),"").replace(/fragColor/g,e(2100)).replace(/texture\(/g,"texture2D(")}(T),S=function(t){const e=u;return t.replace(/\bin\s/g,e(3133)).replace(/\bout\s/g,"varying ")[e(3486)](/texture\(/g,"texture2D(")}(S));const P=d[u(308)](d.FRAGMENT_SHADER);if(d.isContextLost())return void(this.failedToCreate=!0);if(d.shaderSource(P,T),d.compileShader(P),!d.getShaderParameter(P,d[u(1525)]))throw new Error("Could not compile fragment shader: "+d.getShaderInfoLog(P));d[u(3548)](this.program,P);const I=d[u(308)](d[u(2306)]);if(d[u(3489)]())return void(this.failedToCreate=!0);if(d.shaderSource(I,S),d[u(1875)](I),!d[u(2139)](I,d[u(1525)]))throw new Error("Could not compile vertex shader: "+d.getShaderInfoLog(I));d[u(3548)](this.program,I),this.attributes={};const C={};this[u(2118)]=m[u(953)];for(let t=0;t<this[u(2118)];t++)m[t]&&(d[u(2899)](this.program,t,m[t]),this.attributes[m[t]]=t);if(d[u(3089)](this.program),!d[u(2589)](this.program,d.LINK_STATUS))throw new Error(u(332)+d[u(1084)](this[u(2346)]));d.deleteShader(I),d[u(1266)](P);for(let t=0;t<b.length;t++){const e=b[t];if(e&&!C[e]){const t=d.getUniformLocation(this.program,e);t&&(C[e]=t)}}var M,A,k,E;this.fixedUniforms=n(t,C),this.terrainUniforms={u_depth:new e.b$(k=t,(E=C)[u(3635)]),u_terrain:new e.b$(k,E.u_terrain),u_terrain_dim:new e.bt(k,E[u(760)]),u_terrain_matrix:new e.c1(k,E.u_terrain_matrix),u_terrain_unpack:new e.c2(k,E[u(3124)]),u_terrain_exaggeration:new e.bt(k,E[u(2017)])},this.projectionUniforms={u_projection_matrix:new e.c1(M=t,(A=C)[u(2298)]),u_projection_tile_mercator_coords:new e.c2(M,A.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c2(M,A.u_projection_clipping_plane),u_projection_transition:new e.bt(M,A[u(1512)]),u_projection_fallback_matrix:new e.c1(M,A[u(304)])},this[u(855)]=o?o[u(1377)](t,C):[]}draw(t,e,r,o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v){const x=i,b=t.gl;if(this[x(2776)])return;if(t.program.set(this[x(2346)]),t[x(3030)](r),t.setStencilMode(o),t[x(3085)](n),t.setCullFace(s),l){t[x(3436)][x(571)](b.TEXTURE2),b.bindTexture(b[x(2541)],l.depthTexture),t[x(3436)].set(b[x(1167)]),b.bindTexture(b[x(2541)],l[x(600)]);for(const t in this[x(2004)])this[x(2004)][t][x(571)](l[t])}if(c)for(const t in c)this.projectionUniforms[Dn[t]].set(c[t]);if(a)for(const t in this[x(305)])this.fixedUniforms[t].set(a[t]);_&&_[x(2799)](t,this.binderUniforms,f,{zoom:m});let w=0;switch(e){case b[x(2779)]:w=2;break;case b[x(2549)]:w=3;break;case b.LINE_STRIP:w=1}for(const i of p[x(1445)]()){const r=i.vaos||(i.vaos={});(r[h]||(r[h]=new En))[x(2211)](t,this,u,_?_.getPaintVertexBuffers():[],d,i.vertexOffset,y,g,v),b[x(2448)](e,i[x(491)]*w,b.UNSIGNED_SHORT,i[x(1560)]*w*2)}}}const On=(t,r,o,n)=>{const s=i,a=t.style[s(1035)],l=a[s(1594)][s(1445)]("position"),c=[l.x,l.y,l.z],h=e.c5();"viewport"===a[s(1594)][s(1445)](s(716))&&e.c6(h,t.transform[s(539)]),e.c7(c,c,h);const u=t[s(1847)][s(1605)](c),d=a.properties.get("color");return{u_lightpos:c,u_lightpos_globe:u,u_lightintensity:a.properties[s(1445)]("intensity"),u_lightcolor:[d.r,d.g,d.b],u_vertical_gradient:+r,u_opacity:o,u_fill_translate:n}},Rn=(t,r,o,n,s,a,l)=>e.e(On(t,r,o,n),Zt(a,t,l),{u_height_factor:-Math[i(2916)](2,s.overscaledZ)/l[i(782)]/8}),Fn=2*Math.PI*e.bH,jn=(t,r,o,n,s)=>{const a=i,l=t[a(1048)].light,c=l.properties[a(1445)]("position"),h=[c.x,c.y,c.z],u=e.c5();a(3657)===l[a(1594)].get("anchor")&&e.c6(u,t[a(1847)][a(539)]),e.c7(h,h,u);const d=t.transform[a(1605)](h),p=l[a(1594)][a(1445)]("color"),f=function(t){const i=a;if(!t)return{tileUnitsToMeters:0,tileOriginMeters:[0,0]};const r=Math.pow(2,t.canonical.z),o=Fn/(e.a8*r);return{tileUnitsToMeters:o,tileOriginMeters:[(t.canonical.x+t.wrap*r)*e.a8*o,t[i(842)].y*e.a8*o]}}(o),m={u_lightpos:h,u_lightpos_globe:d,u_lightintensity:l[a(1594)][a(1445)]("intensity"),u_lightcolor:[p.r,p.g,p.b],u_vertical_gradient:+r.shouldUseVerticalGradient,u_top_opacity:r.topOpacity,u_side_opacity:r[a(3554)],u_height_factor:o&&s?-Math.pow(2,o.overscaledZ-t[a(1847)].tileZoom)/s[a(782)]/8:0,u_has_top_pattern:+r[a(1171)],u_has_side_pattern:+r.hasSidePattern,u_image:0,u_draw_top_surface:+r[a(1166)],u_draw_side_surface:+r[a(489)],u_texsize:[0,0],u_pixel_coord_upper:[0,0],u_pixel_coord_lower:[0,0],u_top_uv_tile_units_to_meters:f[a(681)],u_top_uv_tile_origin_meters:f.tileOriginMeters,u_scale:[0,0,0],u_fade:1};if(n&&s&&(r.hasTopPattern||r[a(2268)])){const i=r[a(652)]?function(t,i,r){const o=a,n=1/e.aQ(r,1,i.transform.tileZoom),s=Math[o(2916)](2,r[o(3533)].overscaledZ),l=r.tileSize*Math[o(2916)](2,i[o(1847)].tileZoom)/s,c=l*(r[o(3533)].canonical.x+r[o(3533)].wrap*s),h=l*r[o(3533)].canonical.y,{width:u,height:d}=i.imageManager.getPixelSize();return{u_image:0,u_texsize:[u,d],u_scale:[n,t.fromScale,t[o(1831)]],u_fade:t.t,u_pixel_coord_upper:[c>>16,h>>16],u_pixel_coord_lower:[65535&c,65535&h]}}(n,t,s):s[a(2987)]?Zt(n,t,s):null;if(i)return e.e(m,i)}return m},Bn=(t,i,r,o)=>e.e(Zt(i,t,r),{u_fill_translate:o}),Vn=(t,e)=>({u_world:t,u_fill_translate:e}),Nn=(t,i,r,o,n)=>e.e(Bn(t,i,r,n),{u_world:o}),Gn=(t,i,r,o)=>e.e(Zt(i,t,r),{u_fill_translate:o}),Un=(t,e)=>({u_world:t,u_fill_translate:e}),qn=(t,i,r,o,n)=>e.e(Gn(t,i,r,n),{u_world:o}),Zn=(t,r,o,n,s)=>{const a=i,l=t.transform;let c,h,u=0;if(a(1920)===o.paint[a(1445)]("circle-pitch-alignment")){const t=e.aQ(r,1,l[a(3512)]);c=!0,h=[t,t],u=t/(e.a8*Math[a(2916)](2,r[a(3533)][a(903)]))*2*Math.PI*s}else c=!1,h=l[a(651)];return{u_camera_to_center_distance:l.cameraToCenterDistance,u_scale_with_map:+("map"===o[a(3681)].get(a(2470))),u_pitch_with_map:+c,u_device_pixel_ratio:t[a(3105)],u_extrude_scale:h,u_globe_extrude_scale:u,u_translate:n}},Wn=Date.now(),Hn=(t,r,o,n,s)=>{const a=i,l=t[a(1847)];let c,h,u=0;if("map"===o[a(3681)].get("circle-pitch-alignment")){const t=e.aQ(r,1,l[a(3512)]);c=!0,h=[t,t],u=t/(e.a8*Math[a(2916)](2,r.tileID.overscaledZ))*2*Math.PI*s}else c=!1,h=l.pixelsToGLUnits;return{u_camera_to_center_distance:l.cameraToCenterDistance,u_scale_with_map:+(a(1920)===o.paint[a(1445)](a(2470))),u_pitch_with_map:+c,u_device_pixel_ratio:t[a(3105)],u_extrude_scale:h,u_globe_extrude_scale:u,u_translate:n,u_blur_color:o.paint[a(1445)](a(861)),u_in_shadow_color:o[a(3681)].get("circle-overlay-in-shadow-color"),u_in_shadow_opacity:o[a(3681)].get("circle-overlay-in-shadow-opacity"),u_time:Date.now()-Wn,u_radar_type:o[a(3681)].get("circle-radar-type"),u_radar_color:o.paint[a(1445)]("circle-radar-color"),u_radar_opacity:o[a(3681)].get("circle-radar-opacity"),u_radar_radius:o[a(3681)][a(1445)](a(876)),u_radar_width:o[a(3681)].get("circle-radar-width"),u_radar_duration:o[a(3681)][a(1445)]("circle-radar-duration"),u_radar_wave_count:o.paint[a(1445)](a(851)),u_radar_gradient:o[a(3681)][a(1445)]("circle-radar-gradient")}},Xn=t=>({u_pixel_extrude_scale:[1/t.width,1/t[i(3282)]]}),Yn=t=>({u_viewport_size:[t.width,t[i(3282)]]}),Jn=(t,e=1)=>({u_color:t,u_overlay:0,u_overlay_scale:e}),Kn=(t,r,o,n)=>{const s=i,a=e.aQ(t,1,r)/(e.a8*Math[s(2916)](2,t.tileID.overscaledZ))*2*Math.PI*n;return{u_extrude_scale:e.aQ(t,1,r),u_intensity:o,u_globe_extrude_scale:a}},$n=(t,r,o,n)=>{const s=i,a=e.Q();e.c8(a,0,t[s(1422)],t[s(3282)],0,0,1);const l=t.context.gl;return{u_matrix:a,u_world:[l[s(2127)],l.drawingBufferHeight],u_image:o,u_color_ramp:n,u_opacity:r[s(3681)][s(1445)](s(2723))}},Qn=(t,e,r)=>{const o=i,n=r[o(3681)][o(1445)]("hillshade-accent-color");let s;switch(r.paint[o(1445)](o(866))){case o(737):s=4;break;case o(1350):s=1;break;case"igor":s=2;break;case"multidirectional":s=3;break;default:s=0}const a=r.getIlluminationProperties();for(let e=0;e<a.directionRadians.length;e++)"viewport"===r.paint[o(1445)](o(679))&&(a.directionRadians[e]+=t.transform[o(539)]);return{u_image:0,u_latrange:Wt(0,e[o(3533)]),u_exaggeration:r.paint.get("hillshade-exaggeration"),u_altitudes:a.altitudeRadians,u_azimuths:a.directionRadians,u_accent:n,u_method:s,u_highlights:a[o(2504)],u_shadows:a.shadowColor}},ts=(t,r)=>{const o=i,n=r[o(3253)],s=e.Q();return e.c8(s,0,e.a8,-e.a8,0,0,1),e.S(s,s,[0,-e.a8,0]),{u_matrix:s,u_image:1,u_dimension:[n,n],u_zoom:t.overscaledZ,u_unpack:r[o(996)]()}},es=(t,e,r=0)=>({u_image:0,u_unpack:e[i(996)](),u_dimension:[e.stride,e[i(3253)]],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:t[i(3681)][i(1445)]("color-relief-opacity")}),is=(t,r,o,n)=>{const s=i,a=t.transform;return{u_translation:Xt(t,r,o),u_ratio:n/e.aQ(r,1,a[s(3512)]),u_device_pixel_ratio:t.pixelRatio,u_units_to_pixels:[1/a[s(651)][0],1/a[s(651)][1]]}},rs=(t,r,o,n,s)=>{const a=i,l=t[a(1847)],c=Ht(r,l);return{u_translation:Xt(t,r,o),u_texsize:r[a(2987)][a(863)],u_ratio:n/e.aQ(r,1,l[a(3512)]),u_device_pixel_ratio:t.pixelRatio,u_image:0,u_scale:[c,s.fromScale,s[a(1831)]],u_fade:s.t,u_units_to_pixels:[1/l[a(651)][0],1/l[a(651)][1]]}},os=(t,r,o,n,s)=>{const a=i,l=Ht(r,t[a(1847)]);return e.e(is(t,r,o,n),{u_tileratio:l,u_crossfade_from:s[a(2518)],u_crossfade_to:s.toScale,u_image:0,u_mix:s.t,u_lineatlas_width:t.lineAtlas[a(1422)],u_lineatlas_height:t.lineAtlas[a(3282)]})},ns=(t,r,o,n,s,a)=>{const l=i,c=Ht(r,t.transform);return e.e(is(t,r,o,n),{u_image:0,u_image_height:a,u_tileratio:c,u_crossfade_from:s.fromScale,u_crossfade_to:s.toScale,u_image_dash:1,u_mix:s.t,u_lineatlas_width:t[l(1529)][l(1422)],u_lineatlas_height:t[l(1529)][l(3282)]})},ss=(t,r,o,n)=>{const s=i,a=t[s(1847)];return{u_translation:Jt(t,r,o),u_ratio:n/e.aQ(r,1,a[s(3512)]),u_device_pixel_ratio:t.pixelRatio,u_units_to_pixels:[1/a[s(651)][0],1/a[s(651)][1]]}},as=(t,r,o,n,s)=>{const a=i,l=Yt(r,t[a(1847)]);return e.e(ss(t,r,o,n),{u_texsize:r.imageAtlasTexture[a(863)],u_image:0,u_scale:[l,s[a(2518)],s[a(1831)]],u_fade:s.t})},ls=(t,r,o,n,s)=>{const a=i,l=Yt(r,t.transform);return e.e(ss(t,r,o,n),{u_tileratio:l,u_crossfade_from:s[a(2518)],u_crossfade_to:s[a(1831)],u_image:0,u_mix:s.t,u_lineatlas_width:t[a(1529)][a(1422)],u_lineatlas_height:t.lineAtlas[a(3282)]})},cs=(t,r,o,n,s,a)=>{const l=i,c=Yt(r,t[l(1847)]);return e.e(ss(t,r,o,n),{u_image:0,u_image_height:a,u_tileratio:c,u_crossfade_from:s[l(2518)],u_crossfade_to:s[l(1831)],u_image_dash:1,u_mix:s.t,u_lineatlas_width:t.lineAtlas.width,u_lineatlas_height:t[l(1529)].height})},hs=(t,r,o,n,s)=>{const a=i,l=t[a(1847)],c=e.aQ(r,1,l.zoom),h=e.aQ(r,1,l[a(2752)]);return e.e(ss(t,r,o,n),{u_texsize:r.imageAtlasTexture.size,u_image:0,u_fade:s.t,u_direction_color:o.paint[a(1445)](a(3008)),u_direction_opacity:o.paint[a(1445)]("line-direction-opacity"),u_direction_gap:o[a(3681)][a(1445)]("line-direction-gap"),u_custom_image_flag:o.paint[a(1445)]("line-direction-custom-image"),u_meter_per_pixel_ratio:h/c,u_direction_width:o.paint.get("line-width").constantOr(1)})},us=(t,e,r,o,n)=>{const s=i;return{u_tl_parent:t,u_scale_parent:e,u_buffer_scale:1,u_fade_t:r[s(2664)],u_opacity:r[s(2941)]*o.paint[s(1445)](s(2659)),u_image0:0,u_image1:1,u_brightness_low:o[s(3681)][s(1445)]("raster-brightness-min"),u_brightness_high:o.paint.get(s(3294)),u_saturation_factor:(l=o[s(3681)].get("raster-saturation"),l>0?1-1/(1.001-l):-l),u_contrast_factor:(a=o.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Kt(o[s(3681)][s(1445)](s(2575))),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]};var a,l},ds=(t,e,r,o,n,s,a,l,c,h,u,d,p)=>{const f=i,m=a.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:m[f(2862)],u_pitch:m[f(882)]/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:m.width/m[f(3282)],u_fade_change:a[f(1666)][f(1316)]?a[f(2402)]:1,u_label_plane_matrix:l,u_coord_matrix:c,u_is_text:+u,u_pitch_with_map:+o,u_is_along_line:n,u_is_variable_anchor:s,u_texsize:d,u_texture:0,u_translation:h,u_pitched_scale:p}},ps=(t,r,o,n,s,a,l,c,h,u,d,p,f,m)=>{const _=i,y=l[_(1847)];return e.e(ds(t,r,o,n,s,a,l,c,h,u,d,p,m),{u_gamma_scale:n?Math.cos(y[_(882)]*Math.PI/180)*y[_(2862)]:1,u_device_pixel_ratio:l.pixelRatio,u_is_halo:1})},fs=(t,i,r,o,n,s,a,l,c,h,u,d,p)=>e.e(ps(t,i,r,o,n,s,a,l,c,h,!0,u,0,p),{u_texsize_icon:d,u_texture_icon:1}),ms=(t,e)=>{},_s={fillExtrusion:(t,r)=>({u_lightpos:new e.c3(t,r.u_lightpos),u_lightpos_globe:new e.c3(t,r[i(2453)]),u_lightintensity:new e.bt(t,r.u_lightintensity),u_lightcolor:new e.c3(t,r[i(480)]),u_vertical_gradient:new e.bt(t,r.u_vertical_gradient),u_opacity:new e.bt(t,r.u_opacity),u_fill_translate:new e.c4(t,r.u_fill_translate)}),fillExtrusionPattern:(t,r)=>({u_lightpos:new e.c3(t,r.u_lightpos),u_lightpos_globe:new e.c3(t,r.u_lightpos_globe),u_lightintensity:new e.bt(t,r.u_lightintensity),u_lightcolor:new e.c3(t,r[i(480)]),u_vertical_gradient:new e.bt(t,r.u_vertical_gradient),u_height_factor:new e.bt(t,r[i(2517)]),u_opacity:new e.bt(t,r[i(3352)]),u_fill_translate:new e.c4(t,r[i(910)]),u_image:new e.b$(t,r[i(1582)]),u_texsize:new e.c4(t,r[i(417)]),u_pixel_coord_upper:new e.c4(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.c4(t,r[i(3226)]),u_scale:new e.c3(t,r.u_scale),u_fade:new e.bt(t,r.u_fade)}),prismOverlay:(t,r)=>({u_lightpos:new e.c3(t,r[i(751)]),u_lightpos_globe:new e.c3(t,r[i(2453)]),u_lightintensity:new e.bt(t,r.u_lightintensity),u_lightcolor:new e.c3(t,r.u_lightcolor),u_vertical_gradient:new e.bt(t,r[i(2318)]),u_top_opacity:new e.bt(t,r[i(371)]),u_side_opacity:new e.bt(t,r[i(1855)]),u_height_factor:new e.bt(t,r[i(2517)]),u_has_top_pattern:new e.bt(t,r[i(901)]),u_has_side_pattern:new e.bt(t,r.u_has_side_pattern),u_image:new e.b$(t,r.u_image),u_draw_top_surface:new e.bt(t,r.u_draw_top_surface),u_draw_side_surface:new e.bt(t,r.u_draw_side_surface),u_texsize:new e.c4(t,r.u_texsize),u_pixel_coord_upper:new e.c4(t,r[i(1505)]),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_top_uv_tile_units_to_meters:new e.bt(t,r[i(2892)]),u_top_uv_tile_origin_meters:new e.c4(t,r[i(2343)]),u_scale:new e.c3(t,r.u_scale),u_fade:new e.bt(t,r[i(3423)])}),fill:(t,r)=>({u_fill_translate:new e.c4(t,r[i(910)])}),fillPattern:(t,r)=>({u_image:new e.b$(t,r.u_image),u_texsize:new e.c4(t,r[i(417)]),u_pixel_coord_upper:new e.c4(t,r[i(1505)]),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_scale:new e.c3(t,r.u_scale),u_fade:new e.bt(t,r.u_fade),u_fill_translate:new e.c4(t,r.u_fill_translate)}),fillOutline:(t,i)=>({u_world:new e.c4(t,i.u_world),u_fill_translate:new e.c4(t,i.u_fill_translate)}),fillOutlinePattern:(t,r)=>({u_world:new e.c4(t,r.u_world),u_image:new e.b$(t,r.u_image),u_texsize:new e.c4(t,r.u_texsize),u_pixel_coord_upper:new e.c4(t,r[i(1505)]),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_scale:new e.c3(t,r.u_scale),u_fade:new e.bt(t,r[i(3423)]),u_fill_translate:new e.c4(t,r[i(910)])}),polygonOverlay:(t,r)=>({u_fill_translate:new e.c4(t,r[i(910)])}),polygonOverlayPattern:(t,r)=>({u_image:new e.b$(t,r.u_image),u_texsize:new e.c4(t,r.u_texsize),u_pixel_coord_upper:new e.c4(t,r[i(1505)]),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_scale:new e.c3(t,r[i(1314)]),u_fade:new e.bt(t,r[i(3423)]),u_fill_translate:new e.c4(t,r[i(910)])}),polygonOverlayOutline:(t,i)=>({u_world:new e.c4(t,i.u_world),u_fill_translate:new e.c4(t,i.u_fill_translate)}),polygonOverlayOutlinePattern:(t,r)=>({u_world:new e.c4(t,r[i(2624)]),u_image:new e.b$(t,r.u_image),u_texsize:new e.c4(t,r.u_texsize),u_pixel_coord_upper:new e.c4(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_scale:new e.c3(t,r[i(1314)]),u_fade:new e.bt(t,r.u_fade),u_fill_translate:new e.c4(t,r.u_fill_translate)}),circle:(t,r)=>({u_camera_to_center_distance:new e.bt(t,r[i(1310)]),u_scale_with_map:new e.b$(t,r[i(2284)]),u_pitch_with_map:new e.b$(t,r.u_pitch_with_map),u_extrude_scale:new e.c4(t,r[i(3648)]),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_globe_extrude_scale:new e.bt(t,r.u_globe_extrude_scale),u_translate:new e.c4(t,r[i(3603)])}),circleOverlay:(t,r)=>({u_camera_to_center_distance:new e.bt(t,r.u_camera_to_center_distance),u_scale_with_map:new e.b$(t,r[i(2284)]),u_pitch_with_map:new e.b$(t,r.u_pitch_with_map),u_extrude_scale:new e.c4(t,r.u_extrude_scale),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_globe_extrude_scale:new e.bt(t,r.u_globe_extrude_scale),u_translate:new e.c4(t,r.u_translate),u_blur_color:new e.c0(t,r[i(1764)]),u_in_shadow_color:new e.c0(t,r[i(2742)]),u_in_shadow_opacity:new e.bt(t,r[i(2631)]),u_time:new e.bt(t,r[i(1351)]),u_radar_type:new e.bt(t,r[i(460)]),u_radar_color:new e.c0(t,r[i(3304)]),u_radar_opacity:new e.bt(t,r.u_radar_opacity),u_radar_radius:new e.bt(t,r.u_radar_radius),u_radar_width:new e.bt(t,r.u_radar_width),u_radar_duration:new e.bt(t,r.u_radar_duration),u_radar_wave_count:new e.bt(t,r.u_radar_wave_count),u_radar_gradient:new e.bt(t,r[i(3212)])}),collisionBox:(t,r)=>({u_pixel_extrude_scale:new e.c4(t,r[i(1927)])}),collisionCircle:(t,i)=>({u_viewport_size:new e.c4(t,i.u_viewport_size)}),debug:(t,r)=>({u_color:new e.c0(t,r[i(2988)]),u_overlay:new e.b$(t,r.u_overlay),u_overlay_scale:new e.bt(t,r.u_overlay_scale)}),depth:ms,clippingMask:ms,heatmap:(t,r)=>({u_extrude_scale:new e.bt(t,r[i(3648)]),u_intensity:new e.bt(t,r[i(3470)]),u_globe_extrude_scale:new e.bt(t,r.u_globe_extrude_scale)}),heatmapTexture:(t,r)=>({u_matrix:new e.c1(t,r[i(618)]),u_world:new e.c4(t,r.u_world),u_image:new e.b$(t,r[i(1582)]),u_color_ramp:new e.b$(t,r.u_color_ramp),u_opacity:new e.bt(t,r.u_opacity)}),hillshade:(t,r)=>({u_image:new e.b$(t,r[i(1582)]),u_latrange:new e.c4(t,r.u_latrange),u_exaggeration:new e.bt(t,r[i(1315)]),u_altitudes:new e.ca(t,r.u_altitudes),u_azimuths:new e.ca(t,r.u_azimuths),u_accent:new e.c0(t,r.u_accent),u_method:new e.b$(t,r.u_method),u_shadows:new e.c9(t,r.u_shadows),u_highlights:new e.c9(t,r[i(2236)])}),hillshadePrepare:(t,r)=>({u_matrix:new e.c1(t,r[i(618)]),u_image:new e.b$(t,r[i(1582)]),u_dimension:new e.c4(t,r.u_dimension),u_zoom:new e.bt(t,r[i(1334)]),u_unpack:new e.c2(t,r[i(3180)])}),colorRelief:(t,r)=>({u_image:new e.b$(t,r.u_image),u_unpack:new e.c2(t,r[i(3180)]),u_dimension:new e.c4(t,r[i(2704)]),u_elevation_stops:new e.b$(t,r.u_elevation_stops),u_color_stops:new e.b$(t,r[i(3609)]),u_color_ramp_size:new e.b$(t,r[i(500)]),u_opacity:new e.bt(t,r[i(3352)])}),line:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_ratio:new e.bt(t,r[i(559)]),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_units_to_pixels:new e.c4(t,r.u_units_to_pixels)}),lineGradient:(t,r)=>({u_translation:new e.c4(t,r.u_translation),u_ratio:new e.bt(t,r[i(559)]),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_image:new e.b$(t,r[i(1582)]),u_image_height:new e.bt(t,r.u_image_height)}),linePattern:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_texsize:new e.c4(t,r.u_texsize),u_ratio:new e.bt(t,r[i(559)]),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_image:new e.b$(t,r.u_image),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_scale:new e.c3(t,r[i(1314)]),u_fade:new e.bt(t,r.u_fade)}),lineSDF:(t,r)=>({u_translation:new e.c4(t,r.u_translation),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_units_to_pixels:new e.c4(t,r.u_units_to_pixels),u_image:new e.b$(t,r.u_image),u_mix:new e.bt(t,r.u_mix),u_tileratio:new e.bt(t,r[i(1743)]),u_crossfade_from:new e.bt(t,r.u_crossfade_from),u_crossfade_to:new e.bt(t,r[i(1193)]),u_lineatlas_width:new e.bt(t,r[i(1854)]),u_lineatlas_height:new e.bt(t,r.u_lineatlas_height)}),lineGradientSDF:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_image:new e.b$(t,r[i(1582)]),u_image_height:new e.bt(t,r.u_image_height),u_tileratio:new e.bt(t,r.u_tileratio),u_crossfade_from:new e.bt(t,r.u_crossfade_from),u_crossfade_to:new e.bt(t,r[i(1193)]),u_image_dash:new e.b$(t,r.u_image_dash),u_mix:new e.bt(t,r.u_mix),u_lineatlas_width:new e.bt(t,r[i(1854)]),u_lineatlas_height:new e.bt(t,r.u_lineatlas_height)}),polylineOverlay:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.c4(t,r.u_units_to_pixels)}),polylineOverlayGradient:(t,r)=>({u_translation:new e.c4(t,r.u_translation),u_ratio:new e.bt(t,r[i(559)]),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_image:new e.b$(t,r.u_image),u_image_height:new e.bt(t,r.u_image_height)}),polylineOverlayPattern:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_texsize:new e.c4(t,r.u_texsize),u_ratio:new e.bt(t,r[i(559)]),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_image:new e.b$(t,r.u_image),u_units_to_pixels:new e.c4(t,r.u_units_to_pixels),u_scale:new e.c3(t,r.u_scale),u_fade:new e.bt(t,r[i(3423)])}),polylineOverlaySDF:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_image:new e.b$(t,r[i(1582)]),u_mix:new e.bt(t,r.u_mix),u_tileratio:new e.bt(t,r[i(1743)]),u_crossfade_from:new e.bt(t,r.u_crossfade_from),u_crossfade_to:new e.bt(t,r.u_crossfade_to),u_lineatlas_width:new e.bt(t,r.u_lineatlas_width),u_lineatlas_height:new e.bt(t,r[i(3091)])}),polylineOverlayGradientSDF:(t,r)=>({u_translation:new e.c4(t,r[i(1940)]),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.c4(t,r[i(2835)]),u_image:new e.b$(t,r.u_image),u_image_height:new e.bt(t,r.u_image_height),u_tileratio:new e.bt(t,r.u_tileratio),u_crossfade_from:new e.bt(t,r[i(405)]),u_crossfade_to:new e.bt(t,r[i(1193)]),u_image_dash:new e.b$(t,r.u_image_dash),u_mix:new e.bt(t,r.u_mix),u_lineatlas_width:new e.bt(t,r[i(1854)]),u_lineatlas_height:new e.bt(t,r[i(3091)])}),polylineOverlayArrow:(t,r)=>({u_translation:new e.c4(t,r.u_translation),u_texsize:new e.c4(t,r[i(417)]),u_ratio:new e.bt(t,r.u_ratio),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_image:new e.b$(t,r.u_image),u_units_to_pixels:new e.c4(t,r.u_units_to_pixels),u_fade:new e.bt(t,r.u_fade),u_direction_color:new e.c0(t,r.u_direction_color),u_direction_opacity:new e.bt(t,r[i(2590)]),u_direction_gap:new e.bt(t,r[i(773)]),u_custom_image_flag:new e.bt(t,r.u_custom_image_flag),u_meter_per_pixel_ratio:new e.bt(t,r.u_meter_per_pixel_ratio),u_direction_width:new e.bt(t,r[i(1010)])}),raster:(t,r)=>({u_tl_parent:new e.c4(t,r[i(785)]),u_scale_parent:new e.bt(t,r.u_scale_parent),u_buffer_scale:new e.bt(t,r[i(2483)]),u_fade_t:new e.bt(t,r.u_fade_t),u_opacity:new e.bt(t,r.u_opacity),u_image0:new e.b$(t,r.u_image0),u_image1:new e.b$(t,r[i(821)]),u_brightness_low:new e.bt(t,r.u_brightness_low),u_brightness_high:new e.bt(t,r.u_brightness_high),u_saturation_factor:new e.bt(t,r.u_saturation_factor),u_contrast_factor:new e.bt(t,r.u_contrast_factor),u_spin_weights:new e.c3(t,r[i(2588)]),u_coords_top:new e.c2(t,r[i(1906)]),u_coords_bottom:new e.c2(t,r.u_coords_bottom)}),symbolIcon:(t,r)=>({u_is_size_zoom_constant:new e.b$(t,r[i(1799)]),u_is_size_feature_constant:new e.b$(t,r[i(1826)]),u_size_t:new e.bt(t,r[i(391)]),u_size:new e.bt(t,r[i(2366)]),u_camera_to_center_distance:new e.bt(t,r.u_camera_to_center_distance),u_pitch:new e.bt(t,r[i(1301)]),u_rotate_symbol:new e.b$(t,r[i(1403)]),u_aspect_ratio:new e.bt(t,r[i(3688)]),u_fade_change:new e.bt(t,r.u_fade_change),u_label_plane_matrix:new e.c1(t,r.u_label_plane_matrix),u_coord_matrix:new e.c1(t,r[i(3564)]),u_is_text:new e.b$(t,r[i(1851)]),u_pitch_with_map:new e.b$(t,r[i(2958)]),u_is_along_line:new e.b$(t,r.u_is_along_line),u_is_variable_anchor:new e.b$(t,r.u_is_variable_anchor),u_texsize:new e.c4(t,r.u_texsize),u_texture:new e.b$(t,r[i(969)]),u_translation:new e.c4(t,r[i(1940)]),u_pitched_scale:new e.bt(t,r.u_pitched_scale)}),symbolSDF:(t,r)=>({u_is_size_zoom_constant:new e.b$(t,r[i(1799)]),u_is_size_feature_constant:new e.b$(t,r.u_is_size_feature_constant),u_size_t:new e.bt(t,r.u_size_t),u_size:new e.bt(t,r[i(2366)]),u_camera_to_center_distance:new e.bt(t,r[i(1310)]),u_pitch:new e.bt(t,r.u_pitch),u_rotate_symbol:new e.b$(t,r.u_rotate_symbol),u_aspect_ratio:new e.bt(t,r.u_aspect_ratio),u_fade_change:new e.bt(t,r.u_fade_change),u_label_plane_matrix:new e.c1(t,r.u_label_plane_matrix),u_coord_matrix:new e.c1(t,r.u_coord_matrix),u_is_text:new e.b$(t,r.u_is_text),u_pitch_with_map:new e.b$(t,r.u_pitch_with_map),u_is_along_line:new e.b$(t,r[i(1228)]),u_is_variable_anchor:new e.b$(t,r.u_is_variable_anchor),u_texsize:new e.c4(t,r.u_texsize),u_texture:new e.b$(t,r[i(969)]),u_gamma_scale:new e.bt(t,r.u_gamma_scale),u_device_pixel_ratio:new e.bt(t,r.u_device_pixel_ratio),u_is_halo:new e.b$(t,r[i(2029)]),u_translation:new e.c4(t,r.u_translation),u_pitched_scale:new e.bt(t,r[i(789)])}),symbolTextAndIcon:(t,r)=>({u_is_size_zoom_constant:new e.b$(t,r[i(1799)]),u_is_size_feature_constant:new e.b$(t,r[i(1826)]),u_size_t:new e.bt(t,r[i(391)]),u_size:new e.bt(t,r[i(2366)]),u_camera_to_center_distance:new e.bt(t,r.u_camera_to_center_distance),u_pitch:new e.bt(t,r.u_pitch),u_rotate_symbol:new e.b$(t,r.u_rotate_symbol),u_aspect_ratio:new e.bt(t,r.u_aspect_ratio),u_fade_change:new e.bt(t,r.u_fade_change),u_label_plane_matrix:new e.c1(t,r.u_label_plane_matrix),u_coord_matrix:new e.c1(t,r[i(3564)]),u_is_text:new e.b$(t,r[i(1851)]),u_pitch_with_map:new e.b$(t,r.u_pitch_with_map),u_is_along_line:new e.b$(t,r.u_is_along_line),u_is_variable_anchor:new e.b$(t,r[i(3570)]),u_texsize:new e.c4(t,r[i(417)]),u_texsize_icon:new e.c4(t,r.u_texsize_icon),u_texture:new e.b$(t,r.u_texture),u_texture_icon:new e.b$(t,r.u_texture_icon),u_gamma_scale:new e.bt(t,r[i(1108)]),u_device_pixel_ratio:new e.bt(t,r[i(1426)]),u_is_halo:new e.b$(t,r[i(2029)]),u_translation:new e.c4(t,r.u_translation),u_pitched_scale:new e.bt(t,r[i(789)])}),background:(t,r)=>({u_opacity:new e.bt(t,r[i(3352)]),u_color:new e.c0(t,r[i(2988)])}),backgroundPattern:(t,r)=>({u_opacity:new e.bt(t,r[i(3352)]),u_image:new e.b$(t,r[i(1582)]),u_pattern_tl_a:new e.c4(t,r[i(2655)]),u_pattern_br_a:new e.c4(t,r[i(1806)]),u_pattern_tl_b:new e.c4(t,r.u_pattern_tl_b),u_pattern_br_b:new e.c4(t,r[i(1170)]),u_texsize:new e.c4(t,r.u_texsize),u_mix:new e.bt(t,r[i(2705)]),u_pattern_size_a:new e.c4(t,r[i(3601)]),u_pattern_size_b:new e.c4(t,r[i(1913)]),u_scale_a:new e.bt(t,r.u_scale_a),u_scale_b:new e.bt(t,r.u_scale_b),u_pixel_coord_upper:new e.c4(t,r[i(1505)]),u_pixel_coord_lower:new e.c4(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bt(t,r.u_tile_units_to_pixels)}),terrain:(t,r)=>({u_texture:new e.b$(t,r[i(969)]),u_ele_delta:new e.bt(t,r.u_ele_delta),u_fog_matrix:new e.c1(t,r.u_fog_matrix),u_fog_color:new e.c0(t,r[i(2469)]),u_fog_ground_blend:new e.bt(t,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bt(t,r.u_fog_ground_blend_opacity),u_horizon_color:new e.c0(t,r[i(2256)]),u_horizon_fog_blend:new e.bt(t,r.u_horizon_fog_blend),u_is_globe_mode:new e.bt(t,r[i(1344)])}),terrainDepth:(t,r)=>({u_ele_delta:new e.bt(t,r[i(2871)])}),terrainCoords:(t,i)=>({u_texture:new e.b$(t,i.u_texture),u_terrain_coords_id:new e.bt(t,i.u_terrain_coords_id),u_ele_delta:new e.bt(t,i.u_ele_delta)}),projectionErrorMeasurement:(t,i)=>({u_input:new e.bt(t,i.u_input),u_output_expected:new e.bt(t,i.u_output_expected)}),atmosphere:(t,r)=>({u_sun_pos:new e.c3(t,r[i(838)]),u_atmosphere_blend:new e.bt(t,r[i(2001)]),u_globe_position:new e.c3(t,r[i(1985)]),u_globe_radius:new e.bt(t,r.u_globe_radius),u_inv_proj_matrix:new e.c1(t,r.u_inv_proj_matrix)}),sky:(t,r)=>({u_sky_color:new e.c0(t,r.u_sky_color),u_horizon_color:new e.c0(t,r.u_horizon_color),u_horizon:new e.c4(t,r.u_horizon),u_horizon_normal:new e.c4(t,r[i(1381)]),u_sky_horizon_blend:new e.bt(t,r.u_sky_horizon_blend),u_sky_blend:new e.bt(t,r.u_sky_blend)})};class ys{constructor(t,e,r){const o=i;this.context=t;const n=t.gl;this.buffer=n.createBuffer(),this[o(1839)]=Boolean(r),this.context[o(1879)](),t.bindElementBuffer[o(571)](this[o(2841)]),n[o(623)](n.ELEMENT_ARRAY_BUFFER,e[o(1772)],this.dynamicDraw?n.DYNAMIC_DRAW:n[o(2943)]),this.dynamicDraw||delete e[o(1772)]}[i(2211)](){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const e=i,r=this[e(1249)].gl;if(!this[e(1839)])throw new Error("Attempted to update data while not in dynamic mode.");this[e(1249)][e(1879)](),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){const t=i;this.buffer&&(this[t(1249)].gl[t(1902)](this.buffer),delete this[t(2841)])}}const gs={Int8:i(939),Uint8:i(1884),Int16:i(2889),Uint16:i(667),Int32:i(2502),Uint32:i(1126),Float32:"FLOAT"};class vs{constructor(t,e,r,o){const n=i;this.length=e.length,this.attributes=r,this[n(454)]=e[n(2605)],this[n(1839)]=o,this[n(1249)]=t;const s=t.gl;this[n(2841)]=s[n(2322)](),t.bindVertexBuffer.set(this[n(2841)]),s.bufferData(s.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?s.DYNAMIC_DRAW:s.STATIC_DRAW),this[n(1839)]||delete e.arrayBuffer}[i(2211)](){this.context.bindVertexBuffer.set(this[i(2841)])}[i(1671)](t){const e=i;if(t[e(953)]!==this[e(953)])throw new Error(e(811)+t.length+e(2457)+this.length);const r=this[e(1249)].gl;this[e(2211)](),r[e(1921)](r[e(587)],0,t[e(1772)])}enableAttributes(t,e){const r=i;for(let i=0;i<this[r(2854)][r(953)];i++){const o=e[r(2854)][this[r(2854)][i][r(1814)]];void 0!==o&&t[r(973)](o)}}setVertexAttribPointers(t,e,r){const o=i;for(let i=0;i<this.attributes[o(953)];i++){const n=this.attributes[i],s=e[o(2854)][n.name];void 0!==s&&t[o(2567)](s,n[o(1061)],t[gs[n.type]],!1,this.itemSize,n.offset+this[o(454)]*(r||0))}}[i(2355)](){const t=i;this.buffer&&(this[t(1249)].gl[t(1902)](this[t(2841)]),delete this[t(2841)])}}class xs{constructor(t){const e=i;this.gl=t.gl,this[e(3316)]=this.getDefault(),this.current=this[e(3316)],this.dirty=!1}get(){return this.current}[i(571)](t){}[i(3656)](){return this.default}[i(1583)](){this[i(571)](this.default)}}class bs extends xs{getDefault(){return e.bs.transparent}set(t){const e=this[i(2278)];(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)}}class ws extends xs{[i(3656)](){return 1}[i(571)](t){const e=i;(t!==this[e(2278)]||this[e(1639)])&&(this.gl.clearDepth(t),this.current=t,this[e(1639)]=!1)}}class Ts extends xs{getDefault(){return 0}set(t){const e=i;(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this[e(1639)]=!1)}}class Ss extends xs{getDefault(){return[!0,!0,!0,!0]}[i(571)](t){const e=i,r=this[e(2278)];(t[0]!==r[0]||t[1]!==r[1]||t[2]!==r[2]||t[3]!==r[3]||this[e(1639)])&&(this.gl[e(2022)](t[0],t[1],t[2],t[3]),this[e(2278)]=t,this.dirty=!1)}}class Ps extends xs{[i(3656)](){return!0}set(t){const e=i;(t!==this.current||this.dirty)&&(this.gl[e(1942)](t),this[e(2278)]=t,this[e(1639)]=!1)}}class Is extends xs{[i(3656)](){return 255}set(t){const e=i;(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this[e(1639)]=!1)}}class Cs extends xs{[i(3656)](){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(t){const e=i,r=this[e(2278)];(t[e(3435)]!==r.func||t[e(1588)]!==r.ref||t.mask!==r.mask||this[e(1639)])&&(this.gl[e(1149)](t[e(3435)],t.ref,t.mask),this[e(2278)]=t,this[e(1639)]=!1)}}class Ms extends xs{getDefault(){const t=this.gl;return[t.KEEP,t.KEEP,t[i(703)]]}set(t){const e=i,r=this.current;(t[0]!==r[0]||t[1]!==r[1]||t[2]!==r[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this[e(2278)]=t,this.dirty=!1)}}class As extends xs{[i(3656)](){return!1}set(t){const e=i;if(t===this[e(2278)]&&!this.dirty)return;const r=this.gl;t?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),this[e(2278)]=t,this[e(1639)]=!1}}class ks extends xs{[i(3656)](){return[0,1]}set(t){const e=i,r=this.current;(t[0]!==r[0]||t[1]!==r[1]||this[e(1639)])&&(this.gl[e(639)](t[0],t[1]),this.current=t,this.dirty=!1)}}class Es extends xs{[i(3656)](){return!1}set(t){const e=i;if(t===this.current&&!this[e(1639)])return;const r=this.gl;t?r.enable(r.DEPTH_TEST):r[e(620)](r.DEPTH_TEST),this.current=t,this[e(1639)]=!1}}class zs extends xs{getDefault(){return this.gl.LESS}set(t){const e=i;(t!==this.current||this[e(1639)])&&(this.gl[e(2775)](t),this[e(2278)]=t,this[e(1639)]=!1)}}class Ds extends xs{getDefault(){return!1}[i(571)](t){const e=i;if(t===this.current&&!this.dirty)return;const r=this.gl;t?r.enable(r[e(3539)]):r.disable(r.BLEND),this[e(2278)]=t,this[e(1639)]=!1}}class Ls extends xs{[i(3656)](){const t=i,e=this.gl;return[e[t(2683)],e[t(3676)]]}[i(571)](t){const e=i,r=this.current;(t[0]!==r[0]||t[1]!==r[1]||this.dirty)&&(this.gl[e(2754)](t[0],t[1]),this[e(2278)]=t,this[e(1639)]=!1)}}class Os extends xs{[i(3656)](){return e.bs[i(1158)]}set(t){const e=i,r=this[e(2278)];(t.r!==r.r||t.g!==r.g||t.b!==r.b||t.a!==r.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this[e(2278)]=t,this[e(1639)]=!1)}}class Rs extends xs{[i(3656)](){return this.gl[i(2815)]}set(t){const e=i;(t!==this[e(2278)]||this.dirty)&&(this.gl[e(980)](t),this.current=t,this.dirty=!1)}}class Fs extends xs{[i(3656)](){return!1}set(t){const e=i;if(t===this.current&&!this.dirty)return;const r=this.gl;t?r[e(1573)](r.CULL_FACE):r[e(620)](r.CULL_FACE),this.current=t,this[e(1639)]=!1}}class js extends xs{getDefault(){return this.gl.BACK}[i(571)](t){const e=i;(t!==this[e(2278)]||this[e(1639)])&&(this.gl.cullFace(t),this.current=t,this[e(1639)]=!1)}}class Bs extends xs{[i(3656)](){return this.gl[i(2452)]}set(t){const e=i;(t!==this[e(2278)]||this[e(1639)])&&(this.gl[e(2536)](t),this[e(2278)]=t,this[e(1639)]=!1)}}class Vs extends xs{getDefault(){return null}[i(571)](t){const e=i;(t!==this.current||this.dirty)&&(this.gl[e(1553)](t),this[e(2278)]=t,this[e(1639)]=!1)}}class Ns extends xs{getDefault(){return this.gl[i(2989)]}[i(571)](t){const e=i;(t!==this[e(2278)]||this[e(1639)])&&(this.gl[e(3436)](t),this[e(2278)]=t,this[e(1639)]=!1)}}class Gs extends xs{[i(3656)](){const t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}set(t){const e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this[i(1639)])&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)}}class Us extends xs{getDefault(){return null}set(t){const e=i;if(t===this.current&&!this[e(1639)])return;const r=this.gl;r.bindFramebuffer(r[e(2301)],t),this[e(2278)]=t,this.dirty=!1}}class qs extends xs{getDefault(){return null}set(t){if(t===this.current&&!this.dirty)return;const e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}}class Zs extends xs{getDefault(){return null}[i(571)](t){if(t===this.current&&!this.dirty)return;const e=this.gl;e[i(891)](e.TEXTURE_2D,t),this.current=t,this.dirty=!1}}class Ws extends xs{[i(3656)](){return null}[i(571)](t){const e=i;if(t===this.current&&!this[e(1639)])return;const r=this.gl;r.bindBuffer(r[e(587)],t),this[e(2278)]=t,this[e(1639)]=!1}}class Hs extends xs{getDefault(){return null}[i(571)](t){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1}}class Xs extends xs{getDefault(){return null}set(t){const e=i;var r;if(t===this.current&&!this[e(1639)])return;const o=this.gl;kt(o)?o[e(3433)](t):null===(r=o[e(1269)](e(1544)))||void 0===r||r[e(2822)](t),this.current=t,this.dirty=!1}}class Ys extends xs{[i(3656)](){return 4}set(t){const e=i;if(t===this[e(2278)]&&!this[e(1639)])return;const r=this.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,t),this.current=t,this[e(1639)]=!1}}class Js extends xs{[i(3656)](){return!1}[i(571)](t){const e=i;if(t===this[e(2278)]&&!this.dirty)return;const r=this.gl;r[e(3134)](r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this[e(2278)]=t,this.dirty=!1}}class Ks extends xs{getDefault(){return!1}[i(571)](t){const e=i;if(t===this.current&&!this[e(1639)])return;const r=this.gl;r.pixelStorei(r[e(1780)],t),this[e(2278)]=t,this[e(1639)]=!1}}class $s extends xs{constructor(t,e){const r=i;super(t),this.context=t,this[r(2729)]=e}getDefault(){return null}}class Qs extends $s{setDirty(){this.dirty=!0}[i(571)](t){const e=i;if(t===this[e(2278)]&&!this.dirty)return;this[e(1249)][e(2582)].set(this.parent);const r=this.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r[e(2541)],t,0),this[e(2278)]=t,this.dirty=!1}}class ta extends $s{[i(571)](t){const e=i;if(t===this[e(2278)]&&!this[e(1639)])return;this.context.bindFramebuffer.set(this[e(2729)]);const r=this.gl;r[e(739)](r[e(2301)],r[e(1419)],r.RENDERBUFFER,t),this[e(2278)]=t,this.dirty=!1}}class ea extends $s{[i(571)](t){const e=i;if(t===this.current&&!this[e(1639)])return;this[e(1249)][e(2582)].set(this[e(2729)]);const r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r[e(379)],r.RENDERBUFFER,t),this.current=t,this[e(1639)]=!1}}const ia=i(1133);class ra{constructor(t,e,r,o,n){const s=i;this.context=t,this[s(1422)]=e,this.height=r;const a=t.gl,l=this[s(717)]=a[s(947)]();if(this.colorAttachment=new Qs(t,l),o)this[s(819)]=n?new ea(t,l):new ta(t,l);else if(n)throw new Error("Stencil cannot be set without depth");if(a.checkFramebufferStatus(a[s(2301)])!==a.FRAMEBUFFER_COMPLETE)throw new Error(ia)}destroy(){const t=i,e=this[t(1249)].gl,r=this[t(2535)].get();if(r&&e.deleteTexture(r),this.depthAttachment){const i=this[t(819)][t(1445)]();i&&e[t(610)](i)}e.deleteFramebuffer(this[t(717)])}}class oa{constructor(t){const e=i;var r,o;if(this.gl=t,this[e(1568)]=new bs(this),this.clearDepth=new ws(this),this[e(1100)]=new Ts(this),this[e(2022)]=new Ss(this),this[e(1942)]=new Ps(this),this.stencilMask=new Is(this),this.stencilFunc=new Cs(this),this[e(3178)]=new Ms(this),this[e(490)]=new As(this),this[e(639)]=new ks(this),this[e(1621)]=new Es(this),this.depthFunc=new zs(this),this.blend=new Ds(this),this.blendFunc=new Ls(this),this.blendColor=new Os(this),this[e(980)]=new Rs(this),this[e(517)]=new Fs(this),this.cullFaceSide=new js(this),this[e(2536)]=new Bs(this),this.program=new Vs(this),this[e(3436)]=new Ns(this),this[e(3657)]=new Gs(this),this.bindFramebuffer=new Us(this),this.bindRenderbuffer=new qs(this),this[e(891)]=new Zs(this),this[e(2243)]=new Ws(this),this[e(1565)]=new Hs(this),this.bindVertexArray=new Xs(this),this[e(1980)]=new Ys(this),this[e(1555)]=new Js(this),this[e(1636)]=new Ks(this),this[e(3530)]=t.getExtension(e(3613))||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t[e(1269)]("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t[e(3392)](this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=t[e(3392)](t.MAX_TEXTURE_SIZE),kt(t)){this[e(780)]=t.HALF_FLOAT;const i=t.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(r=t.RGBA16F)&&void 0!==r?r:null==i?void 0:i[e(994)],this.RGB16F=null!==(o=t[e(2312)])&&void 0!==o?o:null==i?void 0:i[e(2620)],t.getExtension("EXT_color_buffer_float")}else{t[e(1269)]("EXT_color_buffer_half_float"),t[e(1269)]("OES_texture_half_float_linear");const i=t[e(1269)](e(3383));this[e(780)]=null==i?void 0:i[e(2309)]}}[i(1583)](){const t=i;this[t(1879)](),this.clearColor[t(1583)](),this.clearDepth[t(1583)](),this.clearStencil[t(1583)](),this[t(2022)][t(1583)](),this.depthMask.setDefault(),this[t(2851)][t(1583)](),this[t(1149)].setDefault(),this.stencilOp.setDefault(),this[t(490)].setDefault(),this[t(639)].setDefault(),this[t(1621)].setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc[t(1583)](),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace[t(1583)](),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program[t(1583)](),this[t(3436)][t(1583)](),this[t(2582)][t(1583)](),this.pixelStoreUnpack.setDefault(),this[t(1555)].setDefault(),this.pixelStoreUnpackFlipY[t(1583)]()}[i(3198)](){const t=i;this.clearColor[t(1639)]=!0,this[t(3027)][t(1639)]=!0,this[t(1100)][t(1639)]=!0,this[t(2022)][t(1639)]=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest[t(1639)]=!0,this.depthRange.dirty=!0,this.depthTest[t(1639)]=!0,this[t(2775)][t(1639)]=!0,this[t(986)][t(1639)]=!0,this[t(2754)][t(1639)]=!0,this.blendColor.dirty=!0,this[t(980)].dirty=!0,this.cullFace.dirty=!0,this[t(638)].dirty=!0,this[t(2536)].dirty=!0,this.program.dirty=!0,this.activeTexture[t(1639)]=!0,this[t(3657)][t(1639)]=!0,this.bindFramebuffer[t(1639)]=!0,this[t(1057)][t(1639)]=!0,this.bindTexture[t(1639)]=!0,this[t(2243)][t(1639)]=!0,this[t(1565)].dirty=!0,this[t(3433)][t(1639)]=!0,this.pixelStoreUnpack.dirty=!0,this[t(1555)][t(1639)]=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(t,e){return new ys(this,t,e)}[i(476)](t,e,i){return new vs(this,t,e,i)}[i(1629)](t,e,r){const o=i,n=this.gl,s=n.createRenderbuffer();return this.bindRenderbuffer[o(571)](s),n.renderbufferStorage(n[o(3599)],t,e,r),this.bindRenderbuffer.set(null),s}[i(947)](t,e,i,r){return new ra(this,t,e,i,r)}clear({color:t,depth:e,stencil:r}){const o=i,n=this.gl;let s=0;t&&(s|=n[o(1011)],this[o(1568)].set(t),this[o(2022)].set([!0,!0,!0,!0])),void 0!==e&&(s|=n.DEPTH_BUFFER_BIT,this[o(639)].set([0,1]),this[o(3027)].set(e),this[o(1942)].set(!0)),void 0!==r&&(s|=n[o(2323)],this[o(1100)][o(571)](r),this[o(2851)].set(255)),n[o(1499)](s)}[i(3237)](t){const e=i;!1===t.enable?this[e(517)].set(!1):(this.cullFace.set(!0),this[e(638)].set(t[e(1840)]),this[e(2536)][e(571)](t[e(2536)]))}[i(3030)](t){const e=i;t[e(3435)]!==this.gl.ALWAYS||t[e(1915)]?(this[e(1621)].set(!0),this.depthFunc[e(571)](t.func),this[e(1942)][e(571)](t.mask),this[e(639)][e(571)](t.range)):this.depthTest.set(!1)}setStencilMode(t){const e=i;t[e(3046)].func!==this.gl.ALWAYS||t.mask?(this[e(490)][e(571)](!0),this[e(2851)].set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t[e(507)]]),this.stencilFunc[e(571)]({func:t.test[e(3435)],ref:t[e(1588)],mask:t.test[e(1915)]})):this[e(490)].set(!1)}setColorMode(t){const r=i;e.bT(t.blendFunction,ln.Replace)?this.blend.set(!1):(this.blend.set(!0),this[r(2754)][r(571)](t.blendFunction),this.blendColor[r(571)](t.blendColor)),this[r(2022)][r(571)](t[r(1915)])}[i(3675)](){const t=i;var e;return kt(this.gl)?this.gl.createVertexArray():null===(e=this.gl[t(1269)]("OES_vertex_array_object"))||void 0===e?void 0:e.createVertexArrayOES()}deleteVertexArray(t){const e=i;var r;return kt(this.gl)?this.gl[e(2094)](t):null===(r=this.gl[e(1269)]("OES_vertex_array_object"))||void 0===r?void 0:r[e(3141)](t)}unbindVAO(){this[i(3433)].set(null)}}let na;const sa=e.au(new Float32Array(16)),aa=[new e.P(0,0),new e.P(e.a8,0),new e.P(e.a8,e.a8),new e.P(0,e.a8)],la=new e.bs(1,0,0,1),ca=new e.bs(0,1,0,1),ha=new e.bs(0,0,1,1),ua=new e.bs(1,0,1,1),da=new e.bs(0,1,1,1);class pa{constructor(t,r){const o=i;this.context=new oa(t),this.transform=r,this[o(2370)]={},this[o(2372)]={dirty:!0,matrix:e.au(new Float64Array(16)),renderTime:0},this.setup(),this[o(2981)]=wo.maxOverzooming+wo.maxUnderzooming+1,this[o(2876)]=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}[i(2820)](t,e,r){const o=i;if(this.width=Math[o(2700)](t*r),this[o(3282)]=Math[o(2700)](e*r),this.pixelRatio=r,this[o(1249)].viewport[o(571)]([0,0,this.width,this.height]),this[o(1048)])for(const t of this.style[o(2373)])this.style._layers[t].resize()}setup(){const t=i,r=this[t(1249)],o=new e.aZ;o[t(2225)](0,0),o.emplaceBack(e.a8,0),o[t(2225)](0,e.a8),o[t(2225)](e.a8,e.a8),this.tileExtentBuffer=r.createVertexBuffer(o,Li[t(3347)]),this.tileExtentSegments=e.a_.simpleSegment(0,0,4,2);const n=new e.aZ;n[t(2225)](0,0),n[t(2225)](e.a8,0),n[t(2225)](0,e.a8),n.emplaceBack(e.a8,e.a8),this.debugBuffer=r[t(476)](n,Li.members),this[t(2105)]=e.a_[t(568)](0,0,4,5);const s=new e.ci;s[t(2225)](0,0,0,0),s[t(2225)](e.a8,0,e.a8,0),s[t(2225)](0,e.a8,0,e.a8),s.emplaceBack(e.a8,e.a8,e.a8,e.a8),this.rasterBoundsBuffer=r.createVertexBuffer(s,Oi[t(3347)]),this.rasterBoundsSegments=e.a_.simpleSegment(0,0,4,2);const a=new e.aZ;a[t(2225)](0,0),a[t(2225)](e.a8,0),a[t(2225)](0,e.a8),a[t(2225)](e.a8,e.a8),this.rasterBoundsBufferPosOnly=r[t(476)](a,Li[t(3347)]),this[t(1360)]=e.a_[t(568)](0,0,4,5);const l=new e.aZ;l.emplaceBack(0,0),l.emplaceBack(1,0),l[t(2225)](0,1),l[t(2225)](1,1),this.viewportBuffer=r.createVertexBuffer(l,Li[t(3347)]),this.viewportSegments=e.a_[t(568)](0,0,4,2);const c=new e.cj;c[t(2225)](0),c[t(2225)](1),c.emplaceBack(3),c[t(2225)](2),c[t(2225)](0),this[t(2317)]=r[t(2778)](c);const h=new e.a$;h.emplaceBack(1,0,2),h.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=r[t(2778)](h);const u=this[t(1249)].gl;this[t(2342)]=new pn({func:u[t(1456)],mask:0},0,255,u[t(3676)],u.ZERO,u[t(3676)]),this.tileExtentMesh=new Jo(this.tileExtentBuffer,this[t(3501)],this.tileExtentSegments)}[i(1100)](){const t=i,r=this.context,o=r.gl;this.nextStencilID=1,this[t(3671)]=void 0;const n=e.Q();e.c8(n,0,this[t(1422)],this.height,0,0,1),e.U(n,n,[o[t(2127)],o.drawingBufferHeight,0]);const s={mainMatrix:n,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:n};this.useProgram(t(510),null,!0)[t(1320)](r,o.TRIANGLES,un.disabled,this.stencilClearMode,ln.disabled,hn[t(2008)],null,null,s,t(685),this[t(1264)],this[t(3501)],this.viewportSegments)}_renderTileClippingMasks(t,e,r){const o=i;if(this.currentStencilSource===t[o(1841)]||!t[o(2261)]()||!e||!e.length)return;this.currentStencilSource=t[o(1841)],this.nextStencilID+e[o(953)]>256&&this.clearStencil();const n=this[o(1249)];n[o(3085)](ln[o(2008)]),n.setDepthMode(un.disabled);const s={};for(const t of e)s[t[o(2133)]]=this.nextStencilID++;this._renderTileMasks(s,e,r,!0),this._renderTileMasks(s,e,r,!1),this[o(2149)]=s}_renderTileMasks(t,e,r,o){const n=i,s=this.context,a=s.gl,l=this[n(1048)].projection,c=this.transform,h=this[n(1553)]("clippingMask");for(const i of e){const e=t[i[n(2133)]],u=this.style.map[n(3245)]&&this[n(1048)][n(1920)][n(3245)][n(3497)](i),d=l[n(1397)](this[n(1249)],i[n(842)],o,!0,n(950)),p=c[n(3543)]({overscaledTileID:i,applyGlobeMatrix:!r,applyTerrainMatrix:!0});h[n(1320)](s,a[n(2549)],un[n(2008)],new pn({func:a[n(1456)],mask:0},e,255,a.KEEP,a[n(703)],a[n(528)]),ln[n(2008)],r?hn.disabled:hn.backCCW,null,u,p,"$clipping",d.vertexBuffer,d[n(706)],d.segments)}}_renderTilesDepthBuffer(){const t=i,e=this[t(1249)],r=e.gl,o=this[t(1048)][t(3645)],n=this.transform,s=this.useProgram(t(918)),a=this.getDepthModeFor3D(),l=X(n,{tileSize:n[t(782)]});for(const i of l){const l=this[t(1048)].map[t(3245)]&&this[t(1048)].map.terrain[t(3497)](i),c=o.getMeshFromTileID(this.context,i.canonical,!0,!0,t(1198)),h=n[t(3543)]({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});s.draw(e,r[t(2549)],a,pn[t(2008)],ln.disabled,hn.backCCW,null,l,h,"$clipping",c[t(3320)],c.indexBuffer,c[t(2357)])}}stencilModeFor3D(){const t=i;this.currentStencilSource=void 0,this[t(1348)]+1>256&&this[t(1100)]();const e=this.nextStencilID++,r=this[t(1249)].gl;return new pn({func:r.NOTEQUAL,mask:255},e,255,r[t(703)],r[t(703)],r[t(528)])}[i(3154)](t){const e=i,r=this.context.gl;return new pn({func:r[e(556)],mask:255},this[e(2149)][t[e(2133)]],0,r.KEEP,r[e(703)],r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){const e=i,r=this.context.gl,o=t.sort(((t,i)=>i.overscaledZ-t[e(903)])),n=o[o[e(953)]-1][e(903)],s=o[0].overscaledZ-n+1;if(s>1){this[e(3671)]=void 0,this[e(1348)]+s>256&&this[e(1100)]();const t={};for(let i=0;i<s;i++)t[i+n]=new pn({func:r.GEQUAL,mask:255},i+this.nextStencilID,255,r[e(703)],r[e(703)],r[e(528)]);return this[e(1348)]+=s,[t,o]}return[{[n]:pn[e(2008)]},o]}stencilConfigForOverlapTwoPass(t){const e=i,r=this.context.gl,o=t.sort(((t,i)=>i.overscaledZ-t[e(903)])),n=o[o.length-1].overscaledZ,s=o[0].overscaledZ-n+1;if(this[e(1100)](),s>1){const t={},i={};for(let o=0;o<s;o++)t[o+n]=new pn({func:r.GREATER,mask:255},s+1+o,255,r[e(703)],r.KEEP,r[e(528)]),i[o+n]=new pn({func:r[e(694)],mask:255},1+o,255,r[e(703)],r[e(703)],r.REPLACE);return this[e(1348)]=2*s+1,[t,i,o]}return this.nextStencilID=3,[{[n]:new pn({func:r.GREATER,mask:255},2,255,r.KEEP,r[e(703)],r.REPLACE)},{[n]:new pn({func:r[e(694)],mask:255},1,255,r.KEEP,r.KEEP,r.REPLACE)},o]}[i(1214)](){const t=i,r=this[t(1249)].gl;if(this[t(319)]){const i=1/8;return new ln([r[t(2137)],r[t(2683)]],new e.bs(i,i,i,0),[!0,!0,!0,!0])}return t(2047)===this.renderPass?ln.unblended:ln.alphaBlended}getDepthModeForSublayer(t,e,r){const o=i;if(!this[o(3279)]())return un[o(2008)];const n=1-((1+this.currentLayer)*this[o(2981)]+t)*this.depthEpsilon;return new un(r||this[o(1249)].gl.LEQUAL,e,[n,n])}getDepthModeFor3D(){const t=i;return new un(this[t(1249)].gl[t(3667)],un.ReadWrite,this[t(1918)])}[i(3279)](){return this.currentLayer<this[i(1085)]}[i(1364)](t,r){const o=i;var n,s;this.style=t,this.options=r,this.lineAtlas=t.lineAtlas,this[o(1829)]=t[o(1829)],this.glyphManager=t[o(721)],this.symbolFadeChange=t.placement.symbolFadeChange(c()),this.imageManager.beginFrame();const a=this.style[o(2373)],l=this[o(1048)].tileManagers,h={},u={},d={},p={isRenderingToTexture:!1,isRenderingGlobe:(null===(n=t.projection)||void 0===n?void 0:n.transitionState)>0};for(const t in l){const e=l[t];e.used&&e.prepare(this.context),h[t]=e.getVisibleCoordinates(!1),u[t]=h[t].slice()[o(3025)](),d[t]=e[o(3268)](!0).reverse()}this[o(1085)]=1/0;for(let t=0;t<a.length;t++)if(this[o(1048)][o(3557)][a[t]][o(726)]()){this[o(1085)]=t;break}this[o(426)](!1),this[o(3108)]&&(this[o(3108)][o(3516)](this[o(1048)],this[o(1847)].zoom),this[o(1085)]=0),this.renderPass="offscreen";for(const t of a){const e=this[o(1048)]._layers[t];if(!e.hasOffscreenPass()||e.isHidden(this.transform[o(3512)]))continue;const i=u[e.source];("custom"===e[o(2784)]||i[o(953)])&&this[o(1216)](this,l[e.source],e,i,p)}if(null===(s=this[o(1048)].projection)||void 0===s||s[o(3042)]({context:this[o(1249)],useProgram:t=>this[o(1553)](t)}),this[o(1249)][o(3657)].set([0,0,this[o(1422)],this.height]),this.context[o(2582)].set(null),this[o(1249)].clear({color:r.showOverdrawInspector?e.bs.black:e.bs[o(1158)],depth:1}),this.clearStencil(),this.style[o(3169)]&&function(t,e){const i=o,r=t[i(1249)],n=r.gl,s=((t,e,r)=>{const o=i,n=Math.cos(e[o(2439)]),s=Math[o(1741)](e.rollInRadians),a=B(e),l=e.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t[o(1594)][o(1445)]("horizon-color"),u_horizon:[(e.width/2-a*s)*r,(e.height/2+a*n)*r],u_horizon_normal:[-s,n],u_sky_horizon_blend:t.properties[o(1445)]("sky-horizon-blend")*e[o(3282)]/2*r,u_sky_blend:l}})(e,t[i(1048)].map.transform,t[i(3105)]),a=new un(n.LEQUAL,un.ReadWrite,[0,1]),l=pn[i(2008)],c=t.colorModeForRenderPass(),h=t[i(1553)](i(3169)),u=Re(r,e);h[i(1320)](r,n.TRIANGLES,a,l,c,hn[i(2008)],s,null,void 0,"sky",u[i(3320)],u[i(706)],u[i(2357)])}(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order[o(953)]+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this[o(2966)]="opaque",this[o(2033)]=a[o(953)]-1;this.currentLayer>=0;this[o(2033)]--){const t=this[o(1048)][o(3557)][a[this[o(2033)]]],e=l[t.source],i=h[t.source];this[o(2475)](t,i,!1),this[o(1216)](this,e,t,i,p)}this[o(2966)]=o(824);let f=!1;for(this.currentLayer=0;this.currentLayer<a[o(953)];this[o(2033)]++){const t=this[o(1048)][o(3557)][a[this.currentLayer]],e=l[t.source];if(this.renderToTexture&&this[o(3108)].renderLayer(t,p))continue;this.opaquePassEnabledForLayer()||f||(f=!0,p[o(2545)]&&!this.style[o(1920)][o(3245)]&&this[o(2169)]());const i=("symbol"===t[o(2784)]?d:u)[t[o(1841)]];this[o(2475)](t,h[t.source],!!this.renderToTexture),this[o(1216)](this,e,t,i,p)}if(p.isRenderingGlobe&&function(t,i,r){const n=o,s=t[n(1249)],a=s.gl,l=t.useProgram("atmosphere"),c=new un(a[n(3667)],un.ReadOnly,[0,1]),h=t.transform,u=function(t,i){const r=n,o=t[r(1594)].get(r(1288)),s=[-o.x,-o.y,-o.z],a=e.au(new Float64Array(16));return r(1920)===t.properties.get("anchor")&&(e.bj(a,a,i.rollInRadians),e.bk(a,a,-i[r(1809)]),e.bj(a,a,i[r(539)]),e.bk(a,a,i.center.latitude*Math.PI/180),e.bM(a,a,-i.center.longitude*Math.PI/180)),e.ch(s,s,a),s}(r,t[n(1847)]),d=h.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),p=i[n(1594)][n(1445)](n(1008))*d.projectionTransition;if(0===p)return;const f=Lt(h.worldSize,h.center.latitude),m=h.inverseProjectionMatrix,_=new Float64Array(4);_[3]=1,e.aK(_,_,h.modelViewProjectionMatrix),_[0]/=_[3],_[1]/=_[3],_[2]/=_[3],_[3]=1,e.aK(_,_,m),_[0]/=_[3],_[1]/=_[3],_[2]/=_[3],_[3]=1;const y={u_sun_pos:u,u_atmosphere_blend:p,u_globe_position:[_[0],_[1],_[2]],u_globe_radius:f,u_inv_proj_matrix:m},g=Re(s,i);l[n(1320)](s,a[n(2549)],c,pn.disabled,ln.alphaBlended,hn.disabled,y,null,null,"atmosphere",g[n(3320)],g[n(706)],g.segments)}(this,this.style[o(3169)],this.style.light),this.options.showTileBoundaries){const t=function(t,e){const i=o;let r=null;const n=Object.values(t._layers).flatMap((r=>r[i(1841)]&&!r.isHidden(e)?[t.tileManagers[r.source]]:[])),s=n.filter((t=>i(1325)===t[i(1321)]().type)),a=n[i(2397)]((t=>"vector"!==t[i(1321)]()[i(2784)])),l=t=>{const e=i;(!r||r[e(1321)]()[e(615)]<t[e(1321)]().maxzoom)&&(r=t)};return s.forEach((t=>l(t))),r||a[i(799)]((t=>l(t))),r}(this.style,this[o(1847)][o(3512)]);t&&function(t,e,i){for(let r=0;r<i.length;r++)Le(t,e,i[r])}(this,t,t[o(3268)]())}this[o(1666)][o(3211)]&&function(t){const e=o,i=t[e(1847)][e(1022)];Ee(t,t[e(1847)][e(3282)]-(i[e(3419)]||0),3,la),Ee(t,i[e(611)]||0,3,ca),ze(t,i[e(2367)]||0,3,ha),ze(t,t.transform.width-(i.right||0),3,ua);const r=t[e(1847)].centerPoint;var n,s,a,l;De(n=t,(s=r.x)-1,(a=t.transform[e(3282)]-r.y)-10,2,20,l=da),De(n,s-10,a-1,20,2,l)}(this),this.context[o(1583)]()}maybeDrawDepthAndCoords(t){const r=i;if(!this[r(1048)]||!this.style[r(1920)]||!this.style.map[r(3245)])return;const o=this.terrainFacilitator[r(2466)],n=this.transform.modelViewProjectionMatrix;let s=this[r(2372)].dirty;s||(s=t?!e.ck(o,n):!e.cl(o,n)),s||(s=this[r(1048)].map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator[r(1922)])),s&&(e.cm(o,n),this.terrainFacilitator.renderTime=Date.now(),this[r(2372)][r(1639)]=!1,function(t,i){const o=r,n=t.context,s=n.gl,a=t[o(1847)],l=ln.unblended,c=new un(s.LEQUAL,un[o(342)],[0,1]),h=i[o(590)][o(2929)](),u=t[o(1553)](o(3184));n.bindFramebuffer[o(571)](i.getFramebuffer(o(918)).framebuffer),n.viewport.set([0,0,t.width/devicePixelRatio,t.height/devicePixelRatio]),n.clear({color:e.bs[o(1158)],depth:1});for(const t of h){const e=i[o(1395)](t[o(3533)]),r=i.getTerrainData(t.tileID),h=a.getProjectionData({overscaledTileID:t[o(3533)],applyTerrainMatrix:!1,applyGlobeMatrix:!0}),d={u_ele_delta:i.getMeshFrameDelta(a.zoom)};u.draw(n,s.TRIANGLES,c,pn.disabled,l,hn[o(1528)],d,r,h,"terrain",e[o(3320)],e[o(706)],e.segments)}n[o(2582)][o(571)](null),n.viewport.set([0,0,t[o(1422)],t[o(3282)]])}(this,this.style.map[r(3245)]),function(t,i){const o=r,n=t.context,s=n.gl,a=t[o(1847)],l=ln[o(2102)],c=new un(s[o(3667)],un.ReadWrite,[0,1]),h=i[o(3682)](),u=i[o(590)][o(2929)](),d=t.useProgram("terrainCoords");n.bindFramebuffer.set(i[o(1038)]("coords").framebuffer),n.viewport[o(571)]([0,0,t[o(1422)]/devicePixelRatio,t[o(3282)]/devicePixelRatio]),n.clear({color:e.bs[o(1158)],depth:1}),i.coordsIndex=[];for(const t of u){const e=i[o(1395)](t[o(3533)]),r=i[o(3497)](t[o(3533)]);n[o(3436)].set(s[o(2989)]),s[o(891)](s[o(2541)],h.texture);const u={u_terrain_coords_id:(255-i[o(1704)].length)/255,u_texture:0,u_ele_delta:i.getMeshFrameDelta(a[o(3512)])},p=a[o(3543)]({overscaledTileID:t.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});d.draw(n,s.TRIANGLES,c,pn[o(2008)],l,hn.backCCW,u,r,p,"terrain",e[o(3320)],e.indexBuffer,e.segments),i[o(1704)][o(2315)](t.tileID[o(2133)])}n[o(2582)][o(571)](null),n.viewport.set([0,0,t[o(1422)],t[o(3282)]])}(this,this[r(1048)].map.terrain))}[i(1216)](t,r,o,n,s){const a=i;o[a(1818)](this.transform.zoom)||("background"===o[a(2784)]||a(1645)===o[a(2784)]||(n||[]).length)&&(this.id=o.id,e.cn(o)?function(t,i,r,o,n,s){const l=a;if(l(824)!==t[l(2966)])return;const{isRenderingToTexture:c}=s,h=pn[l(2008)],u=t.colorModeForRenderPass();(r._unevaluatedLayout[l(2076)]("text-variable-anchor")||r[l(923)].hasValue("text-variable-anchor-offset"))&&function(t,i,r,o,n,s,a,c,h){const u=l,d=i[u(1847)],p=i.style.map[u(3245)],f=u(1920)===n,m=u(1920)===s;for(const n of t){const t=o[u(1192)](n),s=t.getBucket(r);if(!s||!s.text||!s[u(2800)].segments.get().length)continue;const l=e.aB(s.textSizeData,d.zoom),_=e.aQ(t,1,i.transform.zoom),y=it(f,i.transform,_),g=u(3322)!==r[u(413)].get(u(3259))&&s.hasIconData();if(l){const i=Math[u(2916)](2,d.zoom-t[u(3533)][u(903)]),r=p?(t,e)=>p.getElevation(n,t,e):null;ee(s,f,m,h,d,y,i,l,g,e.aR(d,t,a,c),n.toUnwrapped(),r)}}}(o,t,r,i,r.layout[l(1445)](l(3258)),r[l(413)][l(1445)](l(1999)),r[l(3681)].get("text-translate"),r[l(3681)][l(1445)](l(1238)),n),0!==r.paint.get("icon-opacity")[l(1498)](1)&&ie(t,i,r,o,!1,r[l(3681)].get(l(3265)),r[l(3681)].get("icon-translate-anchor"),r.layout[l(1445)](l(3082)),r[l(413)][l(1445)](l(1581)),r[l(413)][l(1445)](l(3223)),h,u,c),0!==r[l(3681)][l(1445)]("text-opacity")[l(1498)](1)&&ie(t,i,r,o,!0,r.paint[l(1445)]("text-translate"),r[l(3681)][l(1445)](l(1238)),r[l(413)][l(1445)](l(3258)),r.layout[l(1445)]("text-pitch-alignment"),r[l(413)][l(1445)]("text-keep-upright"),h,u,c),i.map.showCollisionBoxes&&($t(t,i,r,o,!0),$t(t,i,r,o,!1))}(t,r,o,n,this.style[a(2944)][a(2738)],s):e.co(o)?function(t,i,r,o,n){const s=a;if(s(824)!==t.renderPass)return;const{isRenderingToTexture:l}=n,c=r.paint.get("circle-opacity"),h=r.paint[s(1445)](s(3397)),u=r[s(3681)][s(1445)]("circle-stroke-opacity"),d=!r.layout[s(1445)]("circle-sort-key")[s(1130)]();if(0===c.constantOr(1)&&(0===h.constantOr(1)||0===u.constantOr(1)))return;const p=t.context,f=p.gl,m=t[s(1847)],_=t[s(2853)](0,un[s(2490)]),y=pn.disabled,g=t.colorModeForRenderPass(),v=[],x=m[s(1128)]();for(let n=0;n<o[s(953)];n++){const a=o[n],c=i[s(1192)](a),h=c[s(1148)](r);if(!h)continue;const u=r.paint[s(1445)]("circle-translate"),p=r[s(3681)][s(1445)](s(2260)),f=e.aR(m,c,u,p),_=h.programConfigurations.get(r.id),y=t[s(1553)]("circle",_),g=h.layoutVertexBuffer,b=h.indexBuffer,w=t.style[s(1920)][s(3245)]&&t[s(1048)][s(1920)].terrain[s(3497)](a),T={programConfiguration:_,program:y,layoutVertexBuffer:g,indexBuffer:b,uniformValues:Zn(t,c,r,f,x),terrainData:w,projectionData:m.getProjectionData({overscaledTileID:a,applyGlobeMatrix:!l,applyTerrainMatrix:!0})};if(d){const t=h[s(2357)].get();for(const i of t)v.push({segments:new e.a_([i]),sortKey:i[s(2358)],state:T})}else v[s(2315)]({segments:h.segments,sortKey:0,state:T})}d&&v.sort(((t,e)=>t[s(2358)]-e.sortKey));for(const e of v){const{programConfiguration:i,program:o,layoutVertexBuffer:n,indexBuffer:a,uniformValues:l,terrainData:c,projectionData:h}=e.state;o.draw(p,f[s(2549)],_,y,g,hn.backCCW,l,c,h,r.id,n,a,e[s(2357)],r[s(3681)],t.transform.zoom,i)}}(t,r,o,n,s):e.cp(o)?function(t,i,r,o,n){const s=a;if("translucent"!==t.renderPass)return;const{isRenderingToTexture:l}=n,c=r.paint.get(s(1618)),h=r.paint[s(1445)](s(3397)),u=r[s(3681)].get("circle-stroke-opacity"),d=r.paint[s(1445)]("circle-radar-enabled"),p=!r[s(413)].get("circle-sort-key")[s(1130)]();if(d.isConstant()&&0===d[s(1498)](0)&&0===c.constantOr(1)&&(0===h.constantOr(1)||0===u.constantOr(1)))return;const f=t[s(1249)],m=f.gl,_=t[s(1847)],y=t[s(2853)](0,un[s(2490)]),g=pn[s(2008)],v=t.colorModeForRenderPass(),x=[],b=_.getCircleRadiusCorrection();for(const n of o){const o=i.getTile(n),a=o[s(1148)](r);if(!a)continue;const c=r[s(3681)][s(1445)](s(3661)),h=r[s(3681)][s(1445)]("circle-translate-anchor"),u=e.aR(_,o,c,h),d=a[s(3080)].get(r.id),f=t.useProgram(s(1416),d),m=a.layoutVertexBuffer,y=a[s(706)],g=t.style.map.terrain&&t.style.map[s(3245)].getTerrainData(n),v={programConfiguration:d,program:f,layoutVertexBuffer:m,indexBuffer:y,uniformValues:Hn(t,o,r,u,b),terrainData:g,projectionData:_[s(3543)]({overscaledTileID:n,applyGlobeMatrix:!l,applyTerrainMatrix:!0})};if(p){const t=a[s(2357)].get();for(const i of t)x.push({segments:new e.a_([i]),sortKey:i[s(2358)],state:v})}else x[s(2315)]({segments:a.segments,sortKey:0,state:v})}p&&x.sort(((t,e)=>t.sortKey-e.sortKey));for(const e of x){const{programConfiguration:i,program:o,layoutVertexBuffer:n,indexBuffer:a,uniformValues:l,terrainData:c,projectionData:h}=e.state;o.draw(f,m.TRIANGLES,y,g,v,hn.backCCW,l,c,h,r.id,n,a,e.segments,r.paint,t.transform[s(3512)],i)}}(t,r,o,n,s):e.cq(o)?function(t,i,r,o,n){const s=a;if(0===r[s(3681)][s(1445)]("heatmap-opacity"))return;const l=t.context,{isRenderingToTexture:c,isRenderingGlobe:h}=n;if(t[s(1048)].map[s(3245)]){for(const e of o){const o=i.getTile(e);i.hasRenderableParent(e)||("offscreen"===t.renderPass?oe(t,o,r,e,h):s(824)===t.renderPass&&ne(t,r,e,c,h))}l[s(3657)].set([0,0,t.width,t[s(3282)]])}else s(2465)===t[s(2966)]?function(t,i,r,o){const n=s,a=t.context,l=a.gl,c=t.transform,h=pn[n(2008)],u=new ln([l.ONE,l[n(2683)]],e.bs.transparent,[!0,!0,!0,!0]);(function(t,i,r){const o=n,s=t.gl;t[o(3436)].set(s[o(2653)]),t.viewport[o(571)]([0,0,i[o(1422)]/4,i.height/4]);let a=r[o(2369)][o(1445)](e.ce);a?(s[o(891)](s[o(2541)],a.colorAttachment.get()),t[o(2582)].set(a.framebuffer)):(a=se(t,i[o(1422)]/4,i[o(3282)]/4),r.heatmapFbos.set(e.ce,a))})(a,t,r),a[n(1499)]({color:e.bs[n(1158)]});for(let e=0;e<o[n(953)];e++){const s=o[e];if(i[n(2062)](s))continue;const d=i[n(1192)](s),p=d[n(1148)](r);if(!p)continue;const f=p[n(3080)][n(1445)](r.id),m=t.useProgram("heatmap",f),_=c.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),y=c.getCircleRadiusCorrection();m.draw(a,l.TRIANGLES,un.disabled,h,u,hn.backCCW,Kn(d,c[n(3512)],r.paint.get(n(2235)),y),null,_,r.id,p[n(1274)],p[n(706)],p[n(2357)],r.paint,c.zoom,f)}a[n(3657)].set([0,0,t.width,t[n(3282)]])}(t,i,r,o):s(824)===t.renderPass&&function(t,i){const r=s,o=t[r(1249)],n=o.gl;o[r(3085)](t[r(1214)]());const a=i[r(2369)][r(1445)](e.ce);a&&(o.activeTexture[r(571)](n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,a.colorAttachment[r(1445)]()),o.activeTexture.set(n[r(2653)]),ae(o,i)[r(2211)](n.LINEAR,n.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(o,n.TRIANGLES,un[r(2008)],pn.disabled,t.colorModeForRenderPass(),hn[r(2008)],$n(t,i,0,1),null,null,i.id,t[r(1264)],t[r(3501)],t[r(860)],i.paint,t[r(1847)].zoom))}(t,r)}(t,r,o,n,s):e.cr(o)?function(t,i,r,o,n){const s=a;if(s(824)!==t[s(2966)])return;const{isRenderingToTexture:l}=n,c=r[s(3681)].get("line-opacity"),h=r[s(3681)][s(1445)]("line-width");if(0===c.constantOr(1)||0===h[s(1498)](1))return;const u=t[s(2853)](0,un.ReadOnly),d=t[s(1214)](),p=r[s(3681)][s(1445)](s(1195)),f=p[s(1498)](1),m=r.paint[s(1445)](s(2828)),_=m[s(1498)](1),y=r[s(3681)].get(s(656)),g=r[s(3079)]();let v;v=_?"linePattern":f&&y?s(3571):f?"lineSDF":s(y?1793:2523);const x=t[s(1249)],b=x.gl,w=t[s(1847)];let T=!0;for(const n of o){const o=i[s(1192)](n);if(_&&!o.patternsLoaded())continue;const a=o[s(1148)](r);if(!a)continue;const c=a[s(3080)].get(r.id),h=t[s(1249)].program.get(),A=t[s(1553)](v,c),k=T||A.program!==h,E=t.style.map[s(3245)]&&t[s(1048)].map[s(3245)].getTerrainData(n),z=m.constantOr(null),D=p&&p[s(1498)](null);if(z&&o.imageAtlas){const t=o.imageAtlas,e=t.patternPositions[z.to[s(2289)]()],i=t[s(1970)][z[s(699)].toString()];e&&i&&c.setConstantPatternPositions(e,i)}else if(D){const e=s(3291)===r[s(413)].get("line-cap"),i=t[s(1529)].getDash(D.to,e),o=t[s(1529)][s(3167)](D.from,e);c.setConstantDashPositions(i,o)}const L=w.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),O=w.getPixelScale();let R;_?(R=rs(t,o,r,O,g),ce(x,b,o,c,g)):f&&y?(R=ns(t,o,r,O,g,a[s(2381)][s(953)]),de(t,i,x,b,r,a,n,c,g)):f?(R=os(t,o,r,O,g),he(t,x,b,c,k,g)):y?(S=t,P=o,I=r,C=O,M=a[s(2381)][s(953)],R=e.e(is(S,P,I,C),{u_image:0,u_image_height:M}),ue(t,i,x,b,r,a,n)):R=is(t,o,r,O),A[s(1320)](x,b.TRIANGLES,u,pn.disabled,d,hn.disabled,R,E,L,r.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,r[s(3681)],t.transform[s(3512)],c,a[s(1190)]),T=!1}var S,P,I,C,M}(t,r,o,n,s):e.cs(o)?function(t,i,r,o,n){const s=a;if("translucent"!==t.renderPass)return;const{isRenderingToTexture:l}=n,c=r[s(3681)].get("line-opacity"),h=r.paint.get(s(2766));if(0===c.constantOr(1)||0===h[s(1498)](1))return;const u=function(t,e){const i=s;return e.paint[i(1445)]("line-depth-test")&&t.opaquePassCutoff<1/0&&!t[i(3279)]()?new un(t[i(1249)].gl.LEQUAL,un[i(2490)],t.depthRangeFor3D):t.getDepthModeForSublayer(0,un.ReadOnly)}(t,r),d=t[s(1214)](),p=r[s(3681)].get(s(1195)),f=p[s(1498)](1),m=r[s(3681)].get(s(2828)),_=m.constantOr(1),y=r.paint.get(s(656)),g=r.getCrossfadeParameters();let v;v=_?s(2934):f&&y?"polylineOverlayGradientSDF":f?s(719):y?"polylineOverlayGradient":"polylineOverlay";const x=t[s(1249)],b=x.gl,w=t[s(1847)];let T=!0;for(const n of o){const o=i.getTile(n),a=o.getBucket(r);if(!a)continue;const c=a.programConfigurations.get(r.id),h=m.constantOr(null),A=r.paint[s(1445)](s(1457))[s(1498)](null),k=r.paint[s(1445)]("line-direction-opacity")>0&&!!A;if((_||k)&&!o[s(992)]())continue;const E=p&&p.constantOr(null);if(h&&o.imageAtlas){const t=o[s(792)],e=t.patternPositions[h.to[s(2289)]()],i=t.patternPositions[h[s(699)][s(2289)]()];e&&i&&c.setConstantPatternPositionsForProperty("line-pattern",e,i)}else if(E){const e=s(3291)===r.layout[s(1445)](s(3375)),i=t.lineAtlas.getDash(E.to,e),o=t[s(1529)][s(3167)](E[s(699)],e);c[s(1926)](i,o)}if(A&&o[s(792)]){const t=o[s(792)],e=t.patternPositions[A.to.toString()],i=t.patternPositions[A[s(699)][s(2289)]()];e&&i&&c.setConstantPatternPositionsForProperty("line-direction-image",e,i)}const z=t.context[s(2346)][s(1445)](),D=t.useProgram(v,c),L=T||D[s(2346)]!==z,O=t[s(1048)][s(1920)].terrain&&t[s(1048)].map[s(3245)][s(3497)](n),R=w.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),F=w[s(1532)]();let j;_?(j=as(t,o,r,F,g),fe(x,b,o,c,g)):f&&y?(j=cs(t,o,r,F,g,a[s(2381)].length),ye(t,i,x,b,r,a,n,c,g)):f?(j=ls(t,o,r,F,g),me(t,x,b,c,L,g)):y?(S=t,P=o,I=r,C=F,M=a[s(2381)].length,j=e.e(ss(S,P,I,C),{u_image:0,u_image_height:M}),_e(t,i,x,b,r,a,n)):j=ss(t,o,r,F);const B=t[s(3154)](n);if(D[s(1320)](x,b.TRIANGLES,u,B,d,hn[s(2008)],j,O,R,r.id,a[s(1274)],a[s(706)],a.segments,r[s(3681)],t[s(1847)][s(3512)],c,a[s(1190)]),k&&a[s(3149)]&&a.arrowIndexBuffer){const e=t.useProgram(s(2188),c),i=hs(t,o,r,F,g);fe(x,b,o,c,g),e.draw(x,b[s(2549)],u,B,d,hn.disabled,i,O,R,r.id,a[s(3149)],a[s(2681)],a.arrowSegments,r[s(3681)],t.transform[s(3512)],c)}T=!1}var S,P,I,C,M}(t,r,o,n,s):e.ct(o)?function(t,i,r,o,n){const s=a,l=r[s(3681)][s(1445)](s(2645)),c=r[s(3681)][s(1445)](s(1974));if(0===c.constantOr(1))return;const{isRenderingToTexture:h}=n,u=t[s(1214)](),d=r[s(3681)].get("fill-pattern"),p=t.opaquePassEnabledForLayer()&&!d[s(1498)](1)&&1===l[s(1498)](e.bs.transparent).a&&1===c[s(1498)](0)?s(2047):"translucent";if(t.renderPass===p){const e=t.getDepthModeForSublayer(1,"opaque"===t.renderPass?un.ReadWrite:un[s(2490)]);be(t,i,r,o,e,u,!1,h)}if(s(824)===t.renderPass&&r.paint.get(s(917))){const e=t[s(2853)](r[s(654)](s(1226))?2:0,un[s(2490)]);be(t,i,r,o,e,u,!0,h)}}(t,r,o,n,s):e.cu(o)?function(t,i,r,o,n){const s=a,l=r[s(3681)][s(1445)](s(2645)),c=r.paint.get(s(1974));if(0===c[s(1498)](1))return;const{isRenderingToTexture:h}=n,u=t[s(1214)](),d=r.paint[s(1445)](s(3541)),p=t[s(3279)]()&&!d.constantOr(1)&&1===l[s(1498)](e.bs[s(1158)]).a&&1===c.constantOr(0)?"opaque":"translucent";if(t.renderPass===p){const e=t.getDepthModeForSublayer(1,s(2047)===t.renderPass?un.ReadWrite:un[s(2490)]);we(t,i,r,o,e,u,!1,h)}if(s(824)===t[s(2966)]&&r.paint[s(1445)]("fill-antialias")){const e=t.getDepthModeForSublayer(r[s(654)]("fill-outline-color")?2:0,un.ReadOnly);we(t,i,r,o,e,u,!0,h)}}(t,r,o,n,s):e.cv(o)?function(t,e,i,r,o){const n=a,s=i[n(3681)][n(1445)]("fill-extrusion-opacity");if(0===s)return;const{isRenderingToTexture:l}=o;if("translucent"===t.renderPass){const o=new un(t.context.gl[n(3667)],un.ReadWrite,t[n(1918)]);if(1!==s||i[n(3681)].get("fill-extrusion-pattern")[n(1498)](1))Te(t,e,i,r,o,pn.disabled,ln.disabled,l),Te(t,e,i,r,o,t[n(3140)](),t.colorModeForRenderPass(),l);else{const s=t.colorModeForRenderPass();Te(t,e,i,r,o,pn[n(2008)],s,l)}}}(t,r,o,n,s):e.cw(o)?function(t,e,i,r,o){const n=a,s=i[n(3681)].get(n(2940)),l=i[n(3681)].get(n(2213));if(0===s&&0===l)return;const{isRenderingToTexture:c}=o;if(n(824)===t.renderPass){const o=i[n(3681)][n(1445)]("top-fill-pattern"),a=i[n(3681)][n(1445)](n(1566)),h=Se(o),u=Se(a);if(s>0&&l>0){if(s<1||h)return Pe(t,e,i,r,l,u,{drawTopSurface:!1,drawSideSurface:!0},c),void Pe(t,e,i,r,s,h,{drawTopSurface:!0,drawSideSurface:!1},c);Pe(t,e,i,r,Math.min(s,l),h||u,{drawTopSurface:!0,drawSideSurface:!0},c)}else s>0&&Pe(t,e,i,r,s,h,{drawTopSurface:!0,drawSideSurface:!1},c),l>0&&Pe(t,e,i,r,l,u,{drawTopSurface:!1,drawSideSurface:!0},c)}}(t,r,o,n,s):e.cx(o)?function(t,i,r,o,n){const s=a;if(s(2465)!==t.renderPass&&"translucent"!==t[s(2966)])return;const{isRenderingToTexture:l}=n,c=t.context,h=t.style[s(3645)].useSubdivision,u=t.getDepthModeForSublayer(0,un[s(2490)]),d=t[s(1214)]();if(s(2465)===t[s(2966)])!function(t,i,r,o,n,a,l){const c=s,h=t.context,u=h.gl;for(const s of r){const r=i.getTile(s),d=r[c(941)];if(!d||!d.data)continue;if(!r[c(2159)])continue;const p=d[c(2725)],f=d[c(3253)],m=d.getPixels();if(h.activeTexture[c(571)](u.TEXTURE1),h.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r[c(2128)]||t[c(1361)](f),r.demTexture){const t=r.demTexture;t.update(m,{premultiply:!1}),t.bind(u[c(3128)],u.CLAMP_TO_EDGE)}else r[c(2128)]=new e.T(h,m,u[c(3468)],{premultiply:!1}),r[c(2128)].bind(u.NEAREST,u.CLAMP_TO_EDGE);h[c(3436)].set(u[c(2989)]);let _=r.fbo;if(!_){const t=new e.T(h,{width:p,height:p,data:null},u[c(3468)]);t[c(2211)](u.LINEAR,u.CLAMP_TO_EDGE),_=r[c(473)]=h[c(947)](p,p,!0,!1),_[c(2535)].set(t.texture)}h.bindFramebuffer.set(_[c(717)]),h.viewport.set([0,0,p,p]),t[c(1553)]("hillshadePrepare").draw(h,u.TRIANGLES,n,a,l,hn[c(2008)],ts(r[c(3533)],d),null,null,o.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t[c(3234)]),r[c(2159)]=!1}}(t,i,o,r,u,pn.disabled,d),c[s(3657)][s(571)]([0,0,t.width,t[s(3282)]]);else if(s(824)===t[s(2966)])if(h){const[e,n,a]=t[s(1322)](o);Ce(t,i,r,a,e,u,d,!1,l),Ce(t,i,r,a,n,u,d,!0,l)}else{const[e,n]=t[s(3429)](o);Ce(t,i,r,n,e,u,d,!1,l)}}(t,r,o,n,s):e.cy(o)?function(t,e,i,r,o){const n=a;if("translucent"!==t[n(2966)])return;if(!r[n(953)])return;const{isRenderingToTexture:s}=o,l=t.style[n(3645)][n(633)],c=t[n(2853)](0,un[n(2490)]),h=t[n(1214)]();if(l){const[o,n,a]=t.stencilConfigForOverlapTwoPass(r);Me(t,e,i,a,o,c,h,!1,s),Me(t,e,i,a,n,c,h,!0,s)}else{const[o,a]=t[n(3429)](r);Me(t,e,i,a,o,c,h,!1,s)}}(t,r,o,n,s):e.bV(o)?function(t,e,i,r,o){const n=a;if("translucent"!==t.renderPass)return;if(0===i[n(3681)].get(n(2659)))return;if(!r[n(953)])return;const{isRenderingToTexture:s}=o,l=e[n(1321)](),c=t[n(1048)].projection[n(633)];if(l instanceof lo)Ae(t,e,i,r,null,!1,!1,l.tileCoords,l.flippedWindingOrder,s);else if(c){const[o,a,l]=t[n(1322)](r);Ae(t,e,i,l,o,!1,!0,aa,!1,s),Ae(t,e,i,l,a,!0,!0,aa,!1,s)}else{const[o,n]=t.getStencilConfigForOverlapAndUpdateStencilID(r);Ae(t,e,i,n,o,!1,!0,aa,!1,s)}}(t,r,o,n,s):e.cz(o)?function(t,r,o,n,s){const l=a,c=o[l(3681)].get(l(2731)),h=o.paint[l(1445)]("background-opacity");if(0===h)return;const{isRenderingToTexture:u}=s,d=t[l(1249)],p=d.gl,f=t.style.projection,m=t.transform,_=m.tileSize,y=o.paint[l(1445)](l(1275));if(t.isPatternMissing(y))return;const g=!y&&1===c.a&&1===h&&t.opaquePassEnabledForLayer()?"opaque":l(824);if(t.renderPass!==g)return;const v=pn[l(2008)],x=t[l(2853)](0,l(2047)===g?un[l(342)]:un[l(2490)]),b=t.colorModeForRenderPass(),w=t.useProgram(y?"backgroundPattern":"background"),T=n||X(m,{tileSize:_,terrain:t.style.map.terrain});y&&(d[l(3436)][l(571)](p.TEXTURE0),t[l(1829)][l(2211)](t.context));const S=o.getCrossfadeParameters();for(const r of T){const n=m.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!u,applyTerrainMatrix:!0}),s=y?(P=h,e.e(function(t,r,o,n){const s=i,a=o[s(1829)].getPattern(t[s(699)][s(2289)]()),l=o.imageManager[s(1725)](t.to.toString()),{width:c,height:h}=o[s(1829)].getPixelSize(),u=Math.pow(2,n.tileID[s(903)]),d=n.tileSize*Math.pow(2,o.transform.tileZoom)/u,p=d*(n.tileID.canonical.x+n.tileID.wrap*u),f=d*n.tileID[s(842)].y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:l.tl,u_pattern_br_b:l.br,u_texsize:[c,h],u_mix:r.t,u_pattern_size_a:a[s(898)],u_pattern_size_b:l[s(898)],u_scale_a:r[s(2518)],u_scale_b:r.toScale,u_tile_units_to_pixels:1/e.aQ(n,1,o[s(1847)][s(2752)]),u_pixel_coord_upper:[p>>16,f>>16],u_pixel_coord_lower:[65535&p,65535&f]}}(y,S,t,{tileID:r,tileSize:_}),{u_opacity:P})):{u_opacity:h,u_color:c},a=t[l(1048)].map[l(3245)]&&t.style.map.terrain[l(3497)](r),g=f.getMeshFromTileID(d,r[l(842)],!1,!0,"raster");w[l(1320)](d,p.TRIANGLES,x,v,b,hn[l(1528)],s,a,n,o.id,g[l(3320)],g[l(706)],g.segments)}var P}(t,0,o,n,s):e.cA(o)&&function(t,e,i,r){const o=a,{isRenderingGlobe:n}=r,s=t[o(1249)],l=i.implementation,c=t.style[o(3645)],h=t[o(1847)],u=h.getProjectionDataForCustomLayer(n),d={farZ:h[o(1694)],nearZ:h[o(3003)],fov:h.fov*Math.PI/180,modelViewProjectionMatrix:h[o(3172)],projectionMatrix:h[o(793)],shaderData:{variantName:c[o(3439)],vertexShaderPrelude:"const float PI = 3.141592653589793;\nuniform mat4 u_projection_matrix;\n"+c[o(3119)].vertexSource,define:c.shaderDefine},defaultProjectionData:u},p=l.renderingMode?l.renderingMode:"2d";if(o(2465)===t[o(2966)]){const e=l.prerender;e&&(t[o(2374)](),s.setColorMode(t.colorModeForRenderPass()),e.call(l,s.gl,d),s[o(3198)](),t[o(3391)]())}else if(o(824)===t.renderPass){t[o(2374)](),s[o(3085)](t[o(1214)]()),s.setStencilMode(pn.disabled);const e="3d"===p?t.getDepthModeFor3D():t[o(2853)](0,un.ReadOnly);s[o(3030)](e),l[o(1364)](s.gl,d),s.setDirty(),t.setBaseState(),s[o(2582)].set(null)}}(t,0,o,s))}saveTileTexture(t){const e=i,r=this[e(2370)][t[e(863)][0]];r?r[e(2315)](t):this._tileTextures[t[e(863)][0]]=[t]}getTileTexture(t){const e=i,r=this._tileTextures[t];return r&&r[e(953)]>0?r[e(3359)]():null}[i(1244)](t){const e=i;if(!t)return!1;if(!t.from||!t.to)return!0;const r=this[e(1829)].getPattern(t[e(699)].toString()),o=this[e(1829)][e(1725)](t.to.toString());return!r||!o}useProgram(t,e,r=!1,o=[]){const n=i;this.cache=this.cache||{};const s=!!this[n(1048)][n(1920)].terrain,a=this[n(1048)][n(3645)],l=r?Yo[n(2362)]:a[n(3119)],c=r?Ko:a[n(839)],h=t+(e?e[n(1798)]:"")+"/"+(r?$o:a[n(3439)])+(this._showOverdrawInspector?"/overdraw":"")+(s?"/terrain":"")+(o?"/"+o.join("/"):"");return this[n(2288)][h]||(this[n(2288)][h]=new Ln(this[n(1249)],Yo[t],e,_s[t],this._showOverdrawInspector,s,l,c,o)),this[n(2288)][h]}[i(2374)](){const t=i;this.context.unbindVAO(),this[t(1249)][t(517)].setDefault(),this.context[t(3436)].setDefault(),this[t(1249)][t(1980)][t(1583)](),this.context[t(1555)].setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}[i(3391)](){const t=i,e=this.context.gl;this[t(1249)][t(517)][t(571)](!1),this[t(1249)][t(3657)][t(571)]([0,0,this[t(1422)],this[t(3282)]]),this[t(1249)].blendEquation.set(e[t(2815)])}initDebugOverlayCanvas(){const t=i;null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this[t(2392)].width=512,this.debugOverlayCanvas[t(3282)]=512,this[t(2182)]=new e.T(this.context,this[t(2392)],this.context.gl[t(3468)]))}destroy(){const t=i;var e,r;if(this._tileTextures){for(const e in this._tileTextures){const i=this[t(2370)][e];if(i)for(const t of i)t.destroy()}this[t(2370)]={}}if(this[t(2152)]&&this[t(2152)].destroy(),this[t(1947)]&&this[t(1947)][t(2355)](),this[t(1151)]&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this[t(3669)][t(2355)](),this[t(1264)]&&this.viewportBuffer[t(2355)](),this.tileBorderIndexBuffer&&this[t(2317)].destroy(),this[t(3501)]&&this.quadTriangleIndexBuffer[t(2355)](),this[t(1592)]&&(null===(e=this.tileExtentMesh.vertexBuffer)||void 0===e||e[t(2355)]()),this.tileExtentMesh&&(null===(r=this[t(1592)][t(706)])||void 0===r||r.destroy()),this[t(2182)]&&this[t(2182)].destroy(),this.cache){for(const e in this.cache){const i=this[t(2288)][e];i&&i.program&&this.context.gl[t(3406)](i[t(2346)])}this[t(2288)]={}}this[t(1249)]&&this[t(1249)][t(1583)]()}overLimit(){const t=i,{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this[t(3282)]!==r}}class fa{constructor(t){const e=i;this._getCurrentHash=()=>{const t=r,e=window[t(3664)].hash[t(3486)]("#","");if(this._hashName){let i;return e[t(462)]("&")[t(1920)]((e=>e[t(462)]("=")))[t(799)]((e=>{e[0]===this[t(3060)]&&(i=e)})),(i&&i[1]||"").split("/")}return e[t(462)]("/")},this[e(1885)]=()=>{const t=e,i=this[t(1436)]();if(!this[t(1055)](i))return!1;const r=this[t(830)][t(2755)][t(3610)]()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this[t(830)].bearing;return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:r,pitch:+(i[4]||0)}),!0},this._updateHashUnthrottled=()=>{const t=e,i=window.location.href[t(3486)](/(#.*)?$/,this[t(1864)]());window[t(2445)][t(2200)](window[t(2445)][t(3158)],null,i)},this[e(1467)]=()=>{const t=e,i=this._getCurrentHash();if(0===i.length)return;const r=i.join("/");let o=r;o[t(462)]("&").length>0&&(o=o[t(462)]("&")[0]),this._hashName&&(o=this._hashName+"="+r);let n=window.location[t(565)].replace(o,"");n.startsWith("#&")?n=n.slice(0,1)+n.slice(2):"#"===n&&(n="");let s=window.location.href.replace(/(#.+)?$/,n);s=s[t(3486)]("&&","&"),window.history[t(2200)](window[t(2445)][t(3158)],null,s)},this[e(1862)]=Fe(this._updateHashUnthrottled,300),this[e(3060)]=t&&encodeURIComponent(t)}addTo(t){const e=i;return this[e(830)]=t,addEventListener("hashchange",this._onHashChange,!1),this[e(830)].on("moveend",this._updateHash),this}[i(2591)](){const t=i;return removeEventListener("hashchange",this[t(1885)],!1),this[t(830)].off("moveend",this._updateHash),clearTimeout(this[t(1862)]()),this[t(1467)](),delete this[t(830)],this}getHashString(t){const e=i,r=this._map[e(1972)],o=Math.round(100*this[e(830)].zoom)/100,n=Math.ceil((o*Math.LN2+Math.log(512/360/.5))/Math[e(469)]),s=Math.pow(10,n),a=Math[e(3291)](r[e(3396)]*s)/s,l=Math.round(r.latitude*s)/s,c=this._map.bearing,h=this[e(830)].pitch;let u="";if(u+=t?"/"+a+"/"+l+"/"+o:o+"/"+l+"/"+a,(c||h)&&(u+="/"+Math[e(3291)](10*c)/10),h&&(u+="/"+Math.round(h)),this._hashName){const t=this._hashName;let i=!1;const r=window[e(3664)][e(565)].slice(1)[e(462)]("&").map((e=>{const r=e.split("=")[0];return r===t?(i=!0,r+"="+u):e})).filter((t=>t));return i||r[e(2315)](t+"="+u),"#"+r.join("&")}return"#"+u}[i(1055)](t){const r=i;if(t.length<3||t.some(isNaN))return!1;try{new e.X(+t[2],+t[1])}catch(t){return!1}const o=+t[0],n=+(t[3]||0),s=+(t[4]||0);return o>=this._map.minZoom&&o<=this[r(830)][r(1239)]&&n>=-180&&n<=180&&s>=this[r(830)][r(1042)]&&s<=this[r(830)][r(3421)]}}const ma={linearity:.3,easing:e.cB(0,0,.3,1)},_a=e.e({deceleration:2500,maxSpeed:1400},ma),ya=e.e({deceleration:20,maxSpeed:1400},ma),ga=e.e({deceleration:1e3,maxSpeed:360},ma),va=e.e({deceleration:1e3,maxSpeed:90},ma),xa=e.e({deceleration:1e3,maxSpeed:360},ma);class ba{constructor(t){this[i(830)]=t,this.clear()}clear(){this[i(2961)]=[]}record(t){const e=i;this._drainInertiaBuffer(),this[e(2961)].push({time:c(),settings:t})}[i(2141)](){const t=i,e=this._inertiaBuffer,r=c();for(;e[t(953)]>0&&r-e[0].time>160;)e[t(2486)]()}_onMoveEnd(t){const r=i;if(this._drainInertiaBuffer(),this[r(2961)][r(953)]<2)return;const o={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:t}of this._inertiaBuffer)o[r(3512)]+=t.zoomDelta||0,o[r(1121)]+=t[r(320)]||0,o.pitch+=t.pitchDelta||0,o[r(3579)]+=t[r(1346)]||0,t[r(635)]&&o[r(2890)]._add(t[r(635)]),t.around&&(o.around=t.around),t.pinchAround&&(o.pinchAround=t.pinchAround);const n=this[r(2961)][this[r(2961)].length-1].time-this[r(2961)][0].time,s={};if(o[r(2890)].mag()){const i=Be(o.pan.mag(),n,e.e({},_a,t||{})),a=o[r(2890)].mult(i.amount/o.pan[r(1844)]()),l=this[r(830)].cameraHelper[r(3278)](a,this._map.transform);s[r(1972)]=l.easingCenter,s[r(1817)]=l.easingOffset,je(s,i)}if(o[r(3512)]){const t=Be(o.zoom,n,ya);s[r(3512)]=this._map.transform.zoom+t[r(560)],je(s,t)}if(o.bearing){const t=Be(o.bearing,n,ga);s[r(1121)]=this._map[r(1847)].bearing+e.aq(t.amount,-179,179),je(s,t)}if(o[r(882)]){const t=Be(o.pitch,n,va);s.pitch=this[r(830)][r(1847)].pitch+t.amount,je(s,t)}if(o.roll){const t=Be(o[r(3579)],n,xa);s[r(3579)]=this[r(830)][r(1847)][r(3579)]+e.aq(t[r(560)],-179,179),je(s,t)}if(s.zoom||s[r(1121)]){const t=void 0===o[r(1865)]?o[r(2924)]:o[r(1865)];s.around=t?this._map.unproject(t):this[r(830)].center}return this.clear(),e.e(s,{noMoveStart:!0})}}class wa extends e.o{preventDefault(){this[i(3561)]=!0}get[i(2e3)](){return this[i(3561)]}constructor(t,r,o,n={}){const s=i;o=o instanceof MouseEvent?o:new MouseEvent(t,o);const a=Lr[s(574)](r.getCanvas(),o),l=r.unproject(a);super(t,e.e({point:a,lngLat:l,originalEvent:o},n)),this._defaultPrevented=!1,this[s(2993)]=r}}class Ta extends e.o{[i(911)](){this[i(3561)]=!0}get[i(2e3)](){return this[i(3561)]}constructor(t,r,o){const n=i,s="touchend"===t?o[n(340)]:o.touches,a=Lr.touchPos(r.getCanvasContainer(),s),l=a[n(1920)]((t=>r[n(3504)](t))),c=a[n(3535)](((t,e,i,r)=>t[n(2926)](e.div(r.length))),new e.P(0,0));super(t,{points:a,point:c,lngLats:l,lngLat:r[n(3504)](c),originalEvent:o}),this._defaultPrevented=!1}}class Sa extends e.o{[i(911)](){this[i(3561)]=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,e,i){super(t,{originalEvent:i}),this._defaultPrevented=!1}}class Pa{constructor(t,e){this._map=t,this._clickTolerance=e.clickTolerance}[i(2181)](){delete this[i(1796)]}[i(2570)](t){return this[i(800)](new Sa(t.type,this._map,t))}[i(1476)](t,e){const r=i;return this._mousedownPos=e,this[r(800)](new wa(t[r(2784)],this._map,t))}[i(817)](t){const e=i;this._map.fire(new wa(t[e(2784)],this[e(830)],t))}[i(1024)](t,e){const r=i;this._mousedownPos&&this[r(1796)].dist(e)>=this._clickTolerance||this._map[r(1430)](new wa(t.type,this._map,t))}[i(367)](t){const e=i;return this._firePreventable(new wa(t[e(2784)],this[e(830)],t))}[i(2672)](t){const e=i;this[e(830)][e(1430)](new wa(t.type,this[e(830)],t))}mouseout(t){const e=i;this[e(830)][e(1430)](new wa(t[e(2784)],this[e(830)],t))}[i(2075)](t){return this._firePreventable(new Ta(t.type,this[i(830)],t))}[i(3175)](t){const e=i;this[e(830)].fire(new Ta(t[e(2784)],this[e(830)],t))}[i(3684)](t){const e=i;this[e(830)].fire(new Ta(t[e(2784)],this[e(830)],t))}[i(2579)](t){this._map.fire(new Ta(t.type,this._map,t))}_firePreventable(t){const e=i;if(this[e(830)].fire(t),t[e(2e3)])return{}}[i(3610)](){return!0}[i(2719)](){return!1}enable(){}[i(620)](){}}class Ia{constructor(t){this[i(830)]=t}[i(2181)](){const t=i;this[t(3094)]=!1,this._ignoreContextMenu=!0,delete this[t(3621)]}mousemove(t){const e=i;this[e(830)][e(1430)](new wa(t.type,this._map,t))}mousedown(){const t=i;this[t(3094)]=!0,this[t(403)]=!1}mouseup(){const t=i;this._delayContextMenu=!1,this._contextMenuEvent&&(this[t(830)][t(1430)](new wa(t(487),this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}[i(487)](t){const e=i;this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map[e(1430)](new wa(t.type,this[e(830)],t)),this._map.listens(e(487))&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}[i(1573)](){}disable(){}}class Ca{constructor(t){this[i(830)]=t}get transform(){return this._map._requestedCameraState||this._map[i(1847)]}get[i(1972)](){const t=i;return{longitude:this.transform.center.longitude,latitude:this[t(1847)][t(1972)].latitude}}get[i(3512)](){return this.transform.zoom}get[i(882)](){return this.transform[i(882)]}get[i(1121)](){return this.transform[i(1121)]}[i(3504)](t){return this.transform[i(643)](e.P.convert(t),this._map.terrain)}}class Ma{constructor(t,e){const r=i;this[r(830)]=t,this[r(3342)]=new Ca(t),this[r(1956)]=t.getCanvasContainer(),this._container=t[r(3431)](),this[r(3420)]=e[r(1071)]||1}isEnabled(){return!!this._enabled}isActive(){return!!this[i(1934)]}enable(){const t=i;this[t(3610)]()||(this[t(3361)]=!0)}[i(620)](){const t=i;this[t(3610)]()&&(this[t(3361)]=!1)}mousedown(t,e){const r=i;this.isEnabled()&&t.shiftKey&&0===t.button&&(Lr.disableDrag(),this._startPos=this._lastPos=e,this[r(1934)]=!0)}[i(2398)](t,e){const r=i;if(!this._active)return;const o=e;if(this._lastPos[r(2586)](o)||!this._box&&o[r(2395)](this[r(303)])<this[r(3420)])return;const n=this._startPos;this[r(3151)]=o,this[r(3633)]||(this._box=Lr[r(325)](r(523),r(1427),this[r(835)]),this[r(835)][r(2975)].add(r(3556)),this[r(1349)]("boxzoomstart",t));const s=Math.min(n.x,o.x),a=Math.max(n.x,o.x),l=Math.min(n.y,o.y),c=Math[r(2153)](n.y,o.y);Lr.setTransform(this[r(3633)],"translate("+s+"px,"+l+"px)"),this[r(3633)][r(1048)].width=a-s+"px",this._box[r(1048)][r(3282)]=c-l+"px"}mouseupWindow(t,r){const o=i;if(!this._active)return;if(0!==t.button)return;const n=this._startPos,s=r;if(this[o(2181)](),Lr[o(1768)](),n.x!==s.x||n.y!==s.y)return this._map[o(1430)](new e.o(o(2071),{originalEvent:t})),{cameraAnimation:t=>t[o(2046)](n,s,this[o(3342)][o(1121)],{linear:!0})};this[o(1349)](o(428),t)}[i(1135)](t){const e=i;this._active&&27===t.keyCode&&(this.reset(),this[e(1349)]("boxzoomcancel",t))}reset(){const t=i;this._active=!1,this[t(835)][t(2975)].remove(t(3556)),this[t(3633)]&&(Lr.remove(this[t(3633)]),this[t(3633)]=null),Lr.enableDrag(),delete this._startPos,delete this._lastPos}[i(1349)](t,i){return this._map.fire(new e.o(t,{originalEvent:i}))}}class Aa{constructor(t){const e=i;this.reset(),this[e(1604)]=t.numTouches}reset(){const t=i;delete this.centroid,delete this.startTime,delete this.touches,this[t(2195)]=!1}[i(2075)](t,r,o){const n=i;(this[n(2525)]||o[n(953)]>this.numTouches)&&(this[n(2195)]=!0),this[n(2195)]||(void 0===this[n(1905)]&&(this[n(1905)]=t[n(1986)]),o[n(953)]===this.numTouches&&(this[n(2525)]=function(t){const i=n,r=new e.P(0,0);for(const e of t)r[i(2839)](e);return r.div(t[i(953)])}(r),this.touches=Ve(o,r)))}[i(3175)](t,e,r){const o=i;if(this.aborted||!this[o(2525)])return;const n=Ve(r,e);for(const t in this.touches){const e=n[t];(!e||e.dist(this.touches[t])>30)&&(this[o(2195)]=!0)}}[i(3684)](t,e,r){const o=i;if((!this.centroid||t.timeStamp-this[o(1905)]>500)&&(this[o(2195)]=!0),0===r.length){const t=!this.aborted&&this[o(2525)];if(this[o(2181)](),t)return t}}}class ka{constructor(t){this.singleTap=new Aa(t),this.numTaps=t.numTaps,this.reset()}reset(){const t=i;this[t(3200)]=1/0,delete this[t(1707)],this.count=0,this[t(2166)][t(2181)]()}touchstart(t,e,r){const o=i;this[o(2166)][o(2075)](t,e,r)}[i(3175)](t,e,r){const o=i;this[o(2166)][o(3175)](t,e,r)}[i(3684)](t,e,r){const o=i,n=this[o(2166)][o(3684)](t,e,r);if(n){const e=t[o(1986)]-this[o(3200)]<500,i=!this[o(1707)]||this.lastTap.dist(n)<30;if(e&&i||this[o(2181)](),this[o(333)]++,this.lastTime=t.timeStamp,this.lastTap=n,this[o(333)]===this[o(1649)])return this.reset(),n}}}class Ea extends e.E{constructor(t,e,r){const o=i;super(),this[o(1260)]=()=>{const t=o,e=Math[t(1141)]((c()-this._easeStart)/this._easeOptions[t(1415)],1);this[t(1637)](this[t(3101)].easing(e)),e<1&&this[t(3110)]?this[t(3110)]=this[t(1955)](this._renderFrameCallback):this[t(324)](void 0,void 0,!0)},this[o(3242)]=!1,this[o(1687)]=!1,this.transform=t,this[o(3525)]=r[o(1489)],this.cameraHelper=e,this.on("moveend",(()=>{delete this[o(2175)]}))}[i(1542)](t,e){t.apply(this[i(1847)],!0),this.transform=t,this.cameraHelper=e}get[i(1972)](){const t=i;return new e.X(this[t(1847)].center[t(3396)],this[t(1847)].center.latitude)}set center(t){this.jumpTo({center:t})}getCenterElevation(){const t=i;return this[t(1847)][t(1708)]}setCenterElevation(t,e){return this[i(2808)]({elevation:t},e),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(t){this[i(1910)]=t}panBy(t,r,o){const n=i;return t=e.P[n(1029)](t).mult(-1),this[n(1984)](this[n(1847)][n(1972)],e.e({offset:t},r),o)}[i(1984)](t,i,r){return this.easeTo(e.e({center:t},i),r)}get zoom(){const t=i;return this[t(1847)][t(3512)]}set zoom(t){this.jumpTo({zoom:t})}[i(1412)](t,i,r){return this.easeTo(e.e({zoom:t},i),r)}zoomIn(t,e){return this[i(1412)](this.zoom+1,t,e),this}zoomOut(t,e){return this[i(1412)](this.zoom-1,t,e),this}getVerticalFieldOfView(){return this[i(1847)].fov}[i(441)](t,r){const o=i;return t!=this[o(1847)].fov&&(this.transform[o(2519)](t),this[o(1430)](new e.o(o(1944),r)).fire(new e.o(o(709),r))[o(1430)](new e.o("moveend",r))),this}get[i(1121)](){return this[i(1847)].bearing}set[i(1121)](t){this.jumpTo({bearing:t})}get padding(){const t=i;return this[t(1847)][t(1022)]}set[i(1022)](t){this[i(2808)]({padding:t})}[i(1341)](t,i,r){return this.easeTo(e.e({bearing:t},i),r)}[i(987)](t,r){return this[i(1341)](0,e.e({duration:1e3},t),r),this}[i(2874)](t,i){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},t),i),this}[i(1340)](t,e){const r=i;return Math.abs(this.bearing)<this[r(3525)]?this[r(987)](t,e):this}get pitch(){return this[i(1847)].pitch}set pitch(t){this[i(2808)]({pitch:t})}[i(3306)](){return this[i(1847)].roll}setRoll(t,e){return this.jumpTo({roll:t},e),this}cameraForBounds(t,e){const r=i;t=io[r(1029)](t)[r(2330)]();const o=e&&e[r(1121)]||0;return this[r(2968)](t[r(344)](),t.getSouthEast(),o,e)}_cameraForBoxAndBearing(t,r,o,n){const s=i,a={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=e.e({padding:a,offset:[0,0],maxZoom:this[s(1847)][s(1239)]},n)).padding){const t=n[s(1022)];n.padding={top:t,bottom:t,right:t,left:t}}const l=e.e(a,n.padding);n[s(1022)]=l;const c=this.transform,h=new io(t,r);return this.cameraHelper[s(2247)](n,l,h,o,c)}[i(1208)](t,e,r){return this._fitInternal(this[i(3434)](t,e),e,r)}_convertToFlyToCameraOptions(t){const r=i;if(!("target"in t)||null==t[r(2993)])return t;const o=function(t){const i=r;if((o=t)instanceof e.X||Array[i(2667)](o)&&2===o.length&&i(2534)==typeof o[0]&&"number"==typeof o[1]||i(2112)==typeof o&&null!==o&&"longitude"in o&&"latitude"in o)return{center:e.X[i(1029)](t)};var o;if("object"!=typeof t||null===t||!("_getBounds"in t)||i(2770)!=typeof t[i(3131)])throw new Error(i(2263));const n=t._getBounds();if(n.isEmpty())throw new Error(i(2488));const s=n.getSouthWest(),a=n[i(3618)]();return s.longitude===a[i(3396)]&&s[i(2329)]===a[i(2329)]?{center:new e.X(s.longitude,s.latitude)}:{bounds:n}}(t.target),n=e.e({},t);if(delete n[r(2993)],r(1972)in o)return n[r(1972)]=o[r(1972)],n;const s=this.cameraForBounds(o[r(2459)],n);if(!s)return;const a=e.e(s,n);return delete a.padding,a}[i(2046)](t,r,o,n,s){const a=i;return this[a(358)](this._cameraForBoxAndBearing(this[a(1847)][a(643)](e.P.convert(t)),this.transform[a(643)](e.P.convert(r)),o,n),n,s)}_fitInternal(t,r,o){const n=i;return t?(delete(r=e.e(t,r))[n(1022)],r.linear?this.easeTo(r,o):this[n(632)](r,o)):this}[i(2808)](t,r){const o=i;this.stop();const n=this._getTransformForUpdate();let s=!1,a=!1,l=!1;const c=n[o(3512)];this[o(2024)].handleJumpToCenterZoom(n,t);const h=n[o(3512)]!==c,u=t;return"elevation"in u&&n[o(1708)]!==+u.elevation&&n[o(1119)](+u[o(1708)]),o(1121)in t&&n[o(1121)]!==+t.bearing&&(s=!0,n.setBearing(+t[o(1121)])),o(882)in t&&n[o(882)]!==+t.pitch&&(a=!0,n.setPitch(+t.pitch)),o(3579)in u&&n[o(3579)]!==+u.roll&&(l=!0,n.setRoll(+u.roll)),null==u[o(1022)]||n.isPaddingEqual(u[o(1022)])||n.setPadding(u[o(1022)]),this._applyUpdatedTransform(n),this[o(1430)](new e.o(o(1944),r))[o(1430)](new e.o("move",r)),h&&this.fire(new e.o("zoomstart",r)).fire(new e.o("zoom",r)).fire(new e.o("zoomend",r)),s&&this.fire(new e.o("rotatestart",r)).fire(new e.o("rotate",r))[o(1430)](new e.o("rotateend",r)),a&&this[o(1430)](new e.o("pitchstart",r))[o(1430)](new e.o(o(882),r))[o(1430)](new e.o(o(3444),r)),l&&this[o(1430)](new e.o("rollstart",r))[o(1430)](new e.o(o(3579),r))[o(1430)](new e.o("rollend",r)),this[o(1430)](new e.o(o(2443),r))}calculateCameraOptionsFromTo(t,r,o,n=0){const s=i,a=e.ac[s(1677)](t,r),l=e.ac.fromLngLat(o,n),c=l.x-a.x,h=l.y-a.y,u=l.z-a.z,d=Math[s(1530)](c,h,u);if(0===d)throw new Error("Can't calculate camera options with same From and To");const p=Math.hypot(c,h),f=e.aw(this[s(1847)].cameraToCenterDistance/d/this.transform.tileSize),m=180*Math.atan2(c,-h)/Math.PI;let _=180*Math[s(778)](p/d)/Math.PI;return _=u<0?90-_:90+_,{center:l.toLngLat(),elevation:n,zoom:f,pitch:_,bearing:m}}[i(2430)](t,e,r,o){const n=i,s=this[n(1847)][n(1145)](t,e,r,o);return{center:s[n(1972)],elevation:s.elevation,zoom:s[n(3512)],bearing:r,pitch:o}}[i(1665)](t,r){const o=i;this._stop(!1,t[o(1726)]),(!1===(t=e.e({offset:[0,0],duration:500,easing:e.cC},t)).animate||!t[o(3410)]&&zr.prefersReducedMotion)&&(t.duration=0);const n=this._getTransformForUpdate(),s=this.bearing,a=n.pitch,l=n.roll,c="bearing"in t?this._normalizeBearing(t.bearing,s):s,h="pitch"in t?+t.pitch:a,u=o(3579)in t?this[o(3443)](t.roll,l):l,d="padding"in t?t[o(1022)]:n[o(1022)],p=e.P.convert(t[o(1817)]);let f,m;t.around&&(f=e.X[o(1029)](t.around),m=n.locationToScreenPoint(f));const _={moving:this[o(3242)],zooming:this[o(1687)],rotating:this[o(871)],pitching:this[o(628)],rolling:this._rolling},y=this[o(2024)].handleEaseTo(n,{bearing:c,pitch:h,roll:u,padding:d,around:f,aroundPoint:m,offsetAsPoint:p,offset:t[o(1817)],zoom:t[o(3512)],center:t.center});return this[o(871)]=this[o(871)]||s!==c,this._pitching=this._pitching||h!==a,this[o(2858)]=this._rolling||u!==l,this._padding=!n.isPaddingEqual(d),this[o(1687)]=this[o(1687)]||y[o(877)],this._easeId=t.easeId,this._prepareEase(r,t.noMoveStart,_),this.terrain&&this[o(351)](y[o(2593)]),this._ease((e=>{const i=o;y[i(708)](e),this.terrain&&!t[i(1668)]&&this[i(433)](e),this._applyUpdatedTransform(n),this[i(3369)](r)}),(e=>{const i=o;this.terrain&&t.freezeElevation&&this[i(1797)](),this[i(2649)](r,e)}),t),this}_prepareEase(t,r,o={}){const n=i;this._moving=!0,r||o[n(2646)]||this[n(1430)](new e.o(n(1944),t)),this._zooming&&!o[n(1647)]&&this[n(1430)](new e.o("zoomstart",t)),this._rotating&&!o[n(2109)]&&this[n(1430)](new e.o("rotatestart",t)),this._pitching&&!o[n(3355)]&&this[n(1430)](new e.o(n(2855),t)),this._rolling&&!o.rolling&&this.fire(new e.o("rollstart",t))}[i(351)](t){const e=i;this._elevationCenter=t,this[e(2325)]=this.transform.elevation,this._elevationTarget=this[e(3245)][e(3380)](t,this[e(1847)][e(2752)]),this._elevationFreeze=!0}_updateElevation(t){const r=i;void 0!==this._elevationStart&&void 0!==this[r(1098)]||this[r(351)](this.transform[r(1972)]),this[r(1847)].setMinElevationForCurrentTile(this[r(3245)][r(2920)](this._elevationCenter,this.transform.tileZoom));const o=this[r(3245)].getElevationForLngLatZoom(this._elevationCenter,this[r(1847)].tileZoom);if(t<1&&o!==this._elevationTarget){const e=this._elevationTarget-this._elevationStart;this[r(2325)]+=t*(e-(o-(e*t+this._elevationStart))/(1-t)),this._elevationTarget=o}this[r(1847)].setElevation(e.J[r(2534)](this[r(2325)],this._elevationTarget,t))}_finalizeElevation(){const t=i;this._elevationFreeze=!1,this[t(2915)]()&&this[t(1847)][t(1515)](this.terrain)}_getTransformForUpdate(){const t=i;return this[t(1538)]||this.terrain?(this[t(2175)]||(this._requestedCameraState=this[t(1847)][t(2621)]()),this._requestedCameraState):this[t(1847)]}_elevateCameraIfInsideTerrain(t){const e=i;if(!this.terrain&&t[e(1708)]>=0&&t.pitch<=90)return{};const r=t.getCameraLngLat(),o=t[e(2390)](),n=this[e(3245)]?this[e(3245)].getElevationForLngLatZoom(r,t[e(3512)]):0;if(o<n){const i=this.calculateCameraOptionsFromTo(r,n,t[e(1972)],t[e(1708)]);return{pitch:i.pitch,zoom:i[e(3512)]}}return{}}[i(3605)](t){const e=i,r=[];if(r.push((t=>this._elevateCameraIfInsideTerrain(t))),this[e(1538)]&&r.push((t=>this[e(1538)](t))),!r.length)return;const o=t[e(2621)]();for(const t of r){const i=o.clone(),{center:r,zoom:n,roll:s,pitch:a,bearing:l,elevation:c}=t(i);r&&i[e(3302)](r),void 0!==c&&i.setElevation(c),void 0!==n&&i[e(2707)](n),void 0!==s&&i.setRoll(s),void 0!==a&&i.setPitch(a),void 0!==l&&i[e(1812)](l),o[e(937)](i,!1)}this.transform.apply(o,!1)}_fireMoveEvents(t){const r=i;this.fire(new e.o("move",t)),this[r(1687)]&&this.fire(new e.o(r(3512),t)),this[r(871)]&&this.fire(new e.o("rotate",t)),this[r(628)]&&this[r(1430)](new e.o("pitch",t)),this[r(2858)]&&this[r(1430)](new e.o("roll",t))}_afterEase(t,r){const o=i;if(this._easeId&&r&&this._easeId===r)return;delete this[o(902)];const n=this._zooming,s=this[o(871)],a=this[o(628)],l=this._rolling;this[o(3242)]=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this[o(2858)]=!1,this[o(2352)]=!1,n&&this.fire(new e.o("zoomend",t)),s&&this.fire(new e.o("rotateend",t)),a&&this.fire(new e.o(o(3444),t)),l&&this.fire(new e.o("rollend",t)),this[o(1430)](new e.o(o(2443),t))}flyTo(t,o){const n=i;function s(t){const e=r,i=(I*I-P*P+(t?-1:1)*M*M*C*C)/(2*(t?I:P)*M*C);return Math[e(1163)](Math[e(1313)](i*i+1)-i)}function a(t){return(Math.exp(t)-Math.exp(-t))/2}function l(t){const e=r;return(Math[e(3297)](t)+Math[e(3297)](-t))/2}var c;if(!(t=this._convertToFlyToCameraOptions(t)))return this;if(!t.essential&&zr[n(2687)]){const i=e.W(t,["center",n(3512),"bearing",n(882),"padding"]);return this[n(2808)](i,o),null===(c=t[n(2882)])||void 0===c||c.call(t,o),this}this[n(1898)]();const h=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cC},t),u=this[n(2795)](),d=u.bearing,p=u[n(882)],f=u.roll,m=u.padding,_=n(1121)in h?this[n(3443)](h.bearing,d):d,y="pitch"in h?+h.pitch:p,g="roll"in h?this[n(3443)](h[n(3579)],f):f,v="padding"in h?h[n(1022)]:u.padding,x=e.P[n(1029)](h[n(1817)]);let b=u.centerPoint[n(2926)](x);const w=u.screenPointToLocation(b),T=this[n(2024)].handleFlyTo(u,{bearing:_,pitch:y,roll:g,padding:v,locationAtOffset:w,offsetAsPoint:x,center:h[n(1972)],minZoom:h[n(1630)],zoom:h.zoom});let S=h.curve;const P=Math[n(2153)](u.width,u[n(3282)]),I=P/T.scaleOfZoom,C=T.pixelPathLength;"number"==typeof T.scaleOfMinZoom&&(S=Math.sqrt(P/T.scaleOfMinZoom/C*2));const M=S*S,A=s(!1);let k=function(t){return l(A)/l(A+S*t)},E=function(t){return P*((l(A)*(a(e=A+S*t)/l(e))-a(A))/M)/C;var e},z=(s(!0)-A)/S;if(Math[n(1201)](C)<2e-6||!isFinite(z)){if(Math.abs(P-I)<1e-6)return this.easeTo(h,o);const t=I<P?-1:1;z=Math.abs(Math.log(I/P))/S,E=()=>0,k=e=>Math.exp(t*S*e)}return h[n(1415)]=n(1415)in h?+h.duration:1e3*z/(n(2432)in h?+h.screenSpeed/S:+h[n(2468)]),h[n(1727)]&&h.duration>h.maxDuration&&(h[n(1415)]=0),this._zooming=!0,this[n(871)]=d!==_,this[n(628)]=y!==p,this._rolling=g!==f,this._padding=!u.isPaddingEqual(v),this._prepareEase(o,!1),this.terrain&&this._prepareElevation(T[n(1608)]),this[n(1995)]((t=>{const i=n,r=t*z,s=1/k(r),a=E(r);this._rotating&&u.setBearing(e.J.number(d,_,t)),this[i(628)]&&u.setPitch(e.J.number(p,y,t)),this[i(2858)]&&u[i(2053)](e.J.number(f,g,t)),this[i(2352)]&&(u.interpolatePadding(m,v,t),b=u[i(1281)].add(x)),T.easeFunc(t,s,a,b),this[i(3245)]&&!h[i(1668)]&&this._updateElevation(t),this[i(3605)](u),this._fireMoveEvents(o)}),((t,e)=>{const i=n;var r,s;this[i(3245)]&&h.freezeElevation&&this[i(1797)](),this[i(2649)](o),e?null===(r=h[i(2882)])||void 0===r||r[i(3054)](h,o):null===(s=h.cancel)||void 0===s||s.call(h,o)}),h),this}[i(2793)](){return!!this[i(3110)]}stop(){return this._stop()}[i(324)](t,e,r){const o=i;var n;if(this[o(3110)]&&(this[o(3437)](this[o(3110)]),delete this[o(3110)],delete this[o(1637)]),this[o(2960)]){const t=this[o(2960)];delete this[o(2960)],t[o(3054)](this,e,r)}return t||null===(n=this[o(3483)])||void 0===n||n.stop(!1),this}[i(1995)](t,e,r){const o=i;!1===r[o(2543)]||0===r.duration?(t(1),e(void 0,!0)):(this[o(3274)]=c(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=e,this[o(3110)]=this[o(1955)](this[o(1260)]))}[i(3443)](t,r){const o=i;t=e.Y(t,-180,180);const n=Math[o(1201)](t-r);return Math.abs(t-360-r)<n&&(t-=360),Math.abs(t+360-r)<n&&(t+=360),t}queryTerrainElevation(t){const r=i;return this.terrain?this[r(3245)].getElevationForLngLat(e.X[r(1029)](t),this[r(1847)]):null}}class za{constructor(t){const e=i;this._tr=new Ca(t),this[e(1619)]=new ka({numTouches:1,numTaps:2}),this[e(673)]=new ka({numTouches:2,numTaps:1}),this[e(2181)]()}reset(){const t=i;this[t(1934)]=!1,this[t(1619)].reset(),this[t(673)].reset()}[i(2075)](t,e,r){const o=i;this._zoomIn[o(2075)](t,e,r),this._zoomOut[o(2075)](t,e,r)}[i(3175)](t,e,r){const o=i;this._zoomIn[o(3175)](t,e,r),this._zoomOut[o(3175)](t,e,r)}[i(3684)](t,e,r){const o=i,n=this[o(1619)].touchend(t,e,r),s=this[o(673)].touchend(t,e,r),a=this[o(3342)];return n?(this[o(1934)]=!0,t.preventDefault(),setTimeout((()=>this[o(2181)]()),0),{cameraAnimation:e=>Ea.prototype.easeTo[o(3054)](e,{duration:300,zoom:a.zoom+1,around:a.unproject(n)},{originalEvent:t})}):s?(this[o(1934)]=!0,t.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:e=>Ea.prototype[o(1665)].call(e,{duration:300,zoom:a[o(3512)]-1,around:a[o(3504)](s)},{originalEvent:t})}):void 0}[i(2579)](){this.reset()}[i(1573)](){this._enabled=!0}[i(620)](){this._enabled=!1,this.reset()}[i(3610)](){return this._enabled}[i(2719)](){return this._active}}class Da{constructor(t){const e=i;this._enabled=!!t[e(1573)],this._moveStateManager=t.moveStateManager,this[e(3420)]=t.clickTolerance||1,this._moveFunction=t.move,this[e(2936)]=!!t.activateOnStart,t[e(3358)](this),this[e(2181)]()}reset(t){const e=i;this[e(1934)]=!1,this._moved=!1,delete this._lastPoint,this[e(2480)][e(1853)](t)}[i(1354)](...t){const e=i,r=this[e(3365)](...t);if(r.bearingDelta||r[e(3068)]||r[e(1346)]||r.around||r[e(635)])return this._active=!0,r}[i(3502)](t,e){const r=i;this[r(3610)]()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager[r(503)](t),this._lastPoint=Array.isArray(e)?e[0]:e,this[r(2936)]&&this._lastPoint&&(this[r(1934)]=!0))}[i(1938)](t,e){const r=i;if(!this.isEnabled())return;const o=this._lastPoint;if(!o)return;if(t[r(911)](),!this[r(2480)][r(2956)](t))return void this[r(2181)](t);const n=Array[r(2667)](e)?e[0]:e;return!this[r(406)]&&n.dist(o)<this[r(3420)]?void 0:(this[r(406)]=!0,this._lastPoint=n,this._move(o,n))}[i(3067)](t){const e=i;this.isEnabled()&&this._lastPoint&&this[e(2480)].isValidEndEvent(t)&&(this[e(406)]&&Lr.suppressClick(),this[e(2181)](t))}enable(){this[i(3361)]=!0}disable(){this[i(3361)]=!1,this.reset()}[i(3610)](){return this._enabled}[i(2719)](){return this[i(1934)]}[i(2587)](){return this._clickTolerance}}const La=0,Oa=2,Ra={[La]:1,[Oa]:2};class Fa{constructor(t){this._correctEvent=t.checkCorrectEvent}[i(503)](t){const e=Lr[i(1572)](t);this._eventButton=e}[i(1853)](t){delete this[i(984)]}[i(1622)](t){return this._correctEvent(t)}[i(2956)](t){return!function(t,e){const i=r,o=Ra[e];return void 0===t[i(1606)]||(t[i(1606)]&o)!==o}(t,this._eventButton)}[i(2628)](t){return Lr.mouseButton(t)===this._eventButton}}class ja{constructor(){this[i(2371)]=void 0}[i(1204)](t){return 1===t.targetTouches.length}[i(591)](t){return t.targetTouches[0].identifier===this[i(2371)]}startMove(t){const e=i;this[e(2371)]=t.targetTouches[0][e(388)]}[i(1853)](t){delete this._firstTouch}[i(1622)](t){return this._isOneFingerTouch(t)}[i(2956)](t){return this[i(1204)](t)&&this._isSameTouchEvent(t)}[i(2628)](t){return this._isOneFingerTouch(t)&&this._isSameTouchEvent(t)}}class Ba{constructor(t=new Fa({checkCorrectEvent:()=>!0}),e=new ja){const r=i;this[r(3395)]=t,this[r(429)]=e}[i(1144)](t,e,i){return t instanceof MouseEvent?e(t):"undefined"!=typeof TouchEvent&&t instanceof TouchEvent?i(t):void 0}startMove(t){const e=i;this._executeRelevantHandler(t,(t=>this[e(3395)][e(503)](t)),(t=>this[e(429)][e(503)](t)))}[i(1853)](t){const e=i;this[e(1144)](t,(t=>this[e(3395)][e(1853)](t)),(t=>this.oneFingerTouchMoveStateManager.endMove(t)))}[i(1622)](t){const e=i;return this._executeRelevantHandler(t,(t=>this.mouseMoveStateManager.isValidStartEvent(t)),(t=>this[e(429)].isValidStartEvent(t)))}[i(2956)](t){const e=i;return this[e(1144)](t,(t=>this[e(3395)].isValidMoveEvent(t)),(t=>this.oneFingerTouchMoveStateManager[e(2956)](t)))}isValidEndEvent(t){const e=i;return this._executeRelevantHandler(t,(t=>this[e(3395)].isValidEndEvent(t)),(t=>this.oneFingerTouchMoveStateManager.isValidEndEvent(t)))}}const Va=t=>{const e=i;t[e(1476)]=t.dragStart,t[e(2398)]=t.dragMove,t[e(817)]=t[e(3067)],t.contextmenu=t=>{t.preventDefault()}};class Na{constructor(t,e){const r=i;this[r(3420)]=t.clickTolerance||1,this[r(830)]=e,this[r(2181)]()}[i(2181)](){const t=i;this._active=!1,this[t(3545)]={},this[t(1623)]=new e.P(0,0)}[i(1366)](t){const e=i;return t<(this._map[e(897)][e(3610)]()?2:1)}touchstart(t,e,r){return this[i(828)](t,e,r)}touchmove(t,e,r){const o=i;if(this[o(1934)]){if(!this[o(1366)](r[o(953)]))return t[o(911)](),this[o(828)](t,e,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",t)}}[i(3684)](t,e,r){const o=i;this._calculateTransform(t,e,r),this._active&&this._shouldBePrevented(r[o(953)])&&this.reset()}[i(2579)](){this[i(2181)]()}[i(828)](t,r,o){const n=i;o[n(953)]>0&&(this._active=!0);const s=Ve(o,r),a=new e.P(0,0),l=new e.P(0,0);let c=0;for(const t in s){const e=s[t],i=this[n(3545)][t];i&&(a[n(2839)](e),l[n(2839)](e.sub(i)),c++,s[t]=e)}if(this._touches=s,this[n(1366)](c)||!l[n(1844)]())return;const h=l[n(523)](c);return this._sum._add(h),this[n(1623)].mag()<this._clickTolerance?void 0:{around:a[n(523)](c),panDelta:h}}enable(){this._enabled=!0}disable(){this[i(3361)]=!1,this.reset()}isEnabled(){return this._enabled}[i(2719)](){return this[i(1934)]}}class Ga{constructor(){this[i(2181)]()}reset(){const t=i;this._active=!1,delete this[t(3683)]}touchstart(t,e,r){const o=i;this._firstTwoTouches||r.length<2||(this[o(3683)]=[r[0][o(388)],r[1][o(388)]],this._start([e[0],e[1]]))}[i(3175)](t,e,r){const o=i;if(!this._firstTwoTouches)return;t[o(911)]();const[n,s]=this[o(3683)],a=Ne(r,e,n),l=Ne(r,e,s);if(!a||!l)return;const c=this[o(2214)]?null:a.add(l).div(2);return this[o(1354)]([a,l],c,t)}touchend(t,e,r){const o=i;if(!this[o(3683)])return;const[n,s]=this._firstTwoTouches,a=Ne(r,e,n),l=Ne(r,e,s);a&&l||(this[o(1934)]&&Lr[o(1768)](),this[o(2181)]())}touchcancel(){this.reset()}enable(t){const e=i;this._enabled=!0,this[e(2214)]=!!t&&"center"===t[e(2924)]}disable(){const t=i;this._enabled=!1,this[t(2181)]()}[i(3610)](){return!!this[i(3361)]}isActive(){return!!this._active}}class Ua extends Ga{[i(2181)](){const t=i;super.reset(),delete this._distance,delete this[t(2382)]}_start(t){const e=i;this[e(2382)]=this[e(515)]=t[0].dist(t[1])}[i(1354)](t,e){const r=i,o=this._distance;if(this._distance=t[0][r(2395)](t[1]),this[r(1934)]||!(Math.abs(Ge(this._distance,this._startDistance))<.1))return this[r(1934)]=!0,{zoomDelta:Ge(this[r(515)],o),pinchAround:e}}}class qa extends Ga{reset(){const t=i;super.reset(),delete this._minDiameter,delete this[t(1365)],delete this._vector}[i(3097)](t){const e=i;this._startVector=this._vector=t[0][e(1276)](t[1]),this._minDiameter=t[0][e(2395)](t[1])}_move(t,e,r){const o=i,n=this[o(2187)];if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this[o(1934)]=!0,{bearingDelta:Ue(this[o(2187)],n),pinchAround:e}}_isBelowThreshold(t){const e=i;this[e(3515)]=Math[e(1141)](this[e(3515)],t[e(1844)]());const r=25/(Math.PI*this[e(3515)])*360,o=Ue(t,this[e(1365)]);return Math[e(1201)](o)<r}}class Za extends Ga{constructor(t){const e=i;super(),this._currentTouchCount=0,this[e(830)]=t}reset(){const t=i;super.reset(),this._valid=void 0,delete this[t(2607)],delete this._lastPoints}touchstart(t,e,r){const o=i;super[o(2075)](t,e,r),this._currentTouchCount=r[o(953)]}[i(3097)](t){const e=i;this[e(1296)]=t,qe(t[0][e(1276)](t[1]))&&(this[e(1732)]=!1)}_move(t,e,r){const o=i;if(this[o(830)].cooperativeGestures[o(3610)]()&&this[o(3303)]<3)return;const n=t[0][o(1276)](this._lastPoints[0]),s=t[1][o(1276)](this._lastPoints[1]);return this._valid=this[o(1564)](n,s,r.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+s.y)/2*-.5}):void 0}[i(1564)](t,e,r){const o=i;if(void 0!==this._valid)return this[o(1732)];const n=t[o(1844)]()>=2,s=e.mag()>=2;if(!n&&!s)return;if(!n||!s)return void 0===this[o(2607)]&&(this._firstMove=r),r-this[o(2607)]<100&&void 0;const a=t.y>0==e.y>0;return qe(t)&&qe(e)&&a}}const Wa={panStep:100,bearingStep:15,pitchStep:10};class Ha{constructor(t){const e=i;this._tr=new Ca(t);const r=Wa;this._panStep=r[e(1134)],this._bearingStep=r.bearingStep,this[e(2674)]=r[e(2096)],this[e(1789)]=!1}reset(){this[i(1934)]=!1}[i(1135)](t){const e=i;if(t.altKey||t.ctrlKey||t.metaKey)return;let r=0,o=0,n=0,s=0,a=0;switch(t[e(548)]){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?o=-1:(t[e(911)](),s=-1);break;case 39:t.shiftKey?o=1:(t[e(911)](),s=1);break;case 38:t[e(1292)]?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(o=0,n=0),{cameraAnimation:i=>{const l=e,c=this._tr;Ea.prototype.easeTo[l(3054)](i,{duration:300,easeId:l(3062),easing:Ze,zoom:r?Math[l(3291)](c[l(3512)])+r*(t[l(1292)]?2:1):c.zoom,bearing:c[l(1121)]+o*this._bearingStep,pitch:c.pitch+n*this._pitchStep,offset:[-s*this[l(2349)],-a*this[l(2349)]],center:c.center},{originalEvent:t})}}}[i(1573)](){this._enabled=!0}disable(){const t=i;this[t(3361)]=!1,this[t(2181)]()}[i(3610)](){return this[i(3361)]}[i(2719)](){return this[i(1934)]}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}const Xa=4.000244140625,Ya=1/450;class Ja{constructor(t,e){const o=i;this._onTimeout=t=>{const e=r;this._type="wheel",this[e(2520)]-=this[e(2293)],this._active||this._start(t)},this[o(830)]=t,this._tr=new Ca(t),this._triggerRenderFrame=e,this[o(2520)]=0,this._defaultZoomRate=.01,this[o(3520)]=Ya}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this[i(3520)]=t}[i(3610)](){return!!this[i(3361)]}isActive(){return!!this[i(1934)]||void 0!==this._finishTimeout}[i(877)](){return!!this[i(1687)]}[i(1573)](t){const e=i;this[e(3610)]()||(this[e(3361)]=!0,this[e(2214)]=!!t&&"center"===t[e(2924)])}disable(){const t=i;this[t(3610)]()&&(this[t(3361)]=!1)}_shouldBePrevented(t){const e=i;return!!this[e(830)].cooperativeGestures.isEnabled()&&!(t[e(2332)]||this[e(830)].cooperativeGestures.isBypassed(t))}wheel(t){const e=i;if(!this.isEnabled())return;if(this[e(1366)](t))return void this._map[e(897)][e(981)]("wheel_zoom",t);let r=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t[e(2238)]:t.deltaY;const o=c(),n=o-(this[e(1722)]||0);this._lastWheelEventTime=o,0!==r&&r%Xa==0?this._type="wheel":0!==r&&Math.abs(r)<4?this[e(2413)]=e(1792):n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this[e(2898)],40,t)):this[e(2413)]||(this._type=Math.abs(n*r)<200?"trackpad":e(2570),this._timeout&&(clearTimeout(this[e(3173)]),this[e(3173)]=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this[e(2413)]&&(this._lastWheelEvent=t,this[e(2520)]-=r,this._active||this._start(t)),t.preventDefault()}[i(3097)](t){const r=i;if(!this._delta)return;this._frameId&&(this[r(1093)]=null),this[r(1934)]=!0,this[r(877)]()||(this[r(1687)]=!0),this[r(2797)]&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const o=Lr[r(574)](this[r(830)][r(2165)](),t),n=this[r(3342)];this._aroundPoint=this[r(2214)]?n[r(1847)][r(2985)](e.X.convert(n.center)):o,this._frameId||(this[r(1093)]=!0,this._triggerRenderFrame())}[i(3137)](){const t=i;if(!this[t(1093)])return;if(this[t(1093)]=null,!this.isActive())return;const r=this._tr.transform;if("number"==typeof this._lastExpectedZoom){const e=r.zoom-this[t(2114)];"number"==typeof this._startZoom&&(this._startZoom+=e),t(2534)==typeof this._targetZoom&&(this[t(3009)]+=e)}if(0!==this._delta){const i="wheel"===this._type&&Math[t(1201)](this[t(2520)])>Xa?this._wheelZoomRate:this._defaultZoomRate;let o=2/(1+Math[t(3297)](-Math[t(1201)](this._delta*i)));this[t(2520)]<0&&0!==o&&(o=1/o);const n="number"!=typeof this[t(3009)]?r.scale:e.at(this[t(3009)]);this[t(3009)]=r.applyConstrain(r[t(2409)](),e.aw(n*o)).zoom,t(2570)===this._type&&(this._startZoom=r[t(3512)],this._easing=this[t(1014)](200)),this._delta=0}const o="number"!=typeof this[t(3009)]?r.zoom:this._targetZoom,n=this._startZoom,s=this[t(644)];let a,l=!1;if(t(2570)===this[t(2413)]&&n&&s){const i=c()-this._lastWheelEventTime,r=Math[t(1141)]((i+5)/200,1),h=s(r);a=e.J[t(2534)](n,o,h),r<1?this[t(1093)]||(this[t(1093)]=!0):l=!0}else a=o,l=!0;return this[t(1934)]=!0,l&&(this[t(1934)]=!1,this[t(2797)]=setTimeout((()=>{const e=t;this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this[e(2114)],delete this[e(2797)]}),200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!l,zoomDelta:a-r[t(3512)],around:this[t(1248)],originalEvent:this[t(1077)]}}[i(1014)](t){const r=i;let o=e.cC;if(this[r(3187)]){const t=this[r(3187)],i=(c()-t[r(1191)])/t[r(1415)],n=t.easing(i+.01)-t[r(1904)](i),s=.27/Math[r(1313)](n*n+1e-4)*.01,a=Math.sqrt(.0729-s*s);o=e.cB(s,a,.25,1)}return this[r(3187)]={start:c(),duration:t,easing:o},o}reset(){const t=i;this._active=!1,this[t(1687)]=!1,delete this._targetZoom,delete this._lastExpectedZoom,this[t(2797)]&&(clearTimeout(this[t(2797)]),delete this._finishTimeout)}}class Ka{constructor(t,e){const r=i;this[r(554)]=t,this[r(1929)]=e}[i(1573)](){this[i(554)].enable(),this._tapZoom.enable()}[i(620)](){const t=i;this._clickZoom.disable(),this[t(1929)].disable()}[i(3610)](){return this[i(554)].isEnabled()&&this._tapZoom.isEnabled()}isActive(){const t=i;return this[t(554)][t(2719)]()||this[t(1929)][t(2719)]()}}class $a{constructor(t){this._tr=new Ca(t),this.reset()}[i(2181)](){this[i(1934)]=!1}[i(367)](t,e){return t.preventDefault(),{cameraAnimation:i=>{const o=r;Ea.prototype.easeTo[o(3054)](i,{duration:300,zoom:this._tr[o(3512)]+(t.shiftKey?-1:1),around:this[o(3342)].unproject(e)},{originalEvent:t})}}}enable(){this._enabled=!0}[i(620)](){this._enabled=!1,this.reset()}[i(3610)](){return this[i(3361)]}[i(2719)](){return this[i(1934)]}}class Qa{constructor(){this[i(2177)]=new ka({numTouches:1,numTaps:1}),this.reset()}reset(){const t=i;this[t(1934)]=!1,delete this[t(1018)],delete this[t(516)],delete this[t(919)],delete this[t(3280)],this[t(2177)].reset()}[i(2075)](t,e,r){const o=i;if(!this._swipePoint)if(this._tapTime){const i=e[0],n=t.timeStamp-this._tapTime<500,s=this[o(3280)][o(2395)](i)<30;n&&s?r[o(953)]>0&&(this._swipePoint=i,this[o(516)]=r[0].identifier):this.reset()}else this._tap.touchstart(t,e,r)}touchmove(t,e,r){const o=i;if(this[o(919)]){if(this[o(1018)]){if(r[0][o(388)]!==this[o(516)])return;const i=e[0],n=i.y-this._swipePoint.y;return this[o(1018)]=i,t[o(911)](),this[o(1934)]=!0,{zoomDelta:n/128}}}else this[o(2177)][o(3175)](t,e,r)}[i(3684)](t,e,r){const o=i;if(this[o(919)])this._swipePoint&&0===r.length&&this.reset();else{const i=this[o(2177)].touchend(t,e,r);i&&(this._tapTime=t[o(1986)],this._tapPoint=i)}}touchcancel(){this[i(2181)]()}enable(){this[i(3361)]=!0}[i(620)](){const t=i;this._enabled=!1,this[t(2181)]()}isEnabled(){return this._enabled}isActive(){return this[i(1934)]}}class tl{constructor(t,e,i){this._el=t,this._mousePan=e,this._touchPan=i}[i(1573)](t){const e=i;this._inertiaOptions=t||{},this[e(3650)][e(1573)](),this[e(1736)][e(1573)](),this._el[e(2975)].add("maptec-touch-drag-pan")}[i(620)](){const t=i;this[t(3650)].disable(),this._touchPan.disable(),this._el[t(2975)][t(2591)](t(2471))}isEnabled(){const t=i;return this[t(3650)].isEnabled()&&this._touchPan[t(3610)]()}isActive(){const t=i;return this._mousePan[t(2719)]()||this[t(1736)].isActive()}}class el{constructor(t,e,r,o){const n=i;this[n(461)]=t.pitchWithRotate,this._rollEnabled=t.rollEnabled,this._mouseRotate=e,this._mousePitch=r,this[n(3569)]=o}[i(1573)](){const t=i;this._mouseRotate[t(1573)](),this._pitchWithRotate&&this[t(2255)].enable(),this._rollEnabled&&this[t(3569)][t(1573)]()}disable(){const t=i;this[t(1692)][t(620)](),this._mousePitch[t(620)](),this[t(3569)][t(620)]()}isEnabled(){const t=i;return this._mouseRotate[t(3610)]()&&(!this[t(461)]||this[t(2255)].isEnabled())&&(!this[t(3132)]||this[t(3569)].isEnabled())}[i(2719)](){const t=i;return this._mouseRotate.isActive()||this._mousePitch[t(2719)]()||this[t(3569)].isActive()}}class il{constructor(t,e,r,o){const n=i;this._el=t,this[n(3213)]=e,this._touchRotate=r,this._tapDragZoom=o,this._rotationDisabled=!1,this._enabled=!0}[i(1573)](t){const e=i;this._touchZoom.enable(t),this[e(1789)]||this._touchRotate.enable(t),this._tapDragZoom.enable(),this[e(1956)].classList.add("maptec-touch-zoom-rotate")}[i(620)](){const t=i;this._touchZoom[t(620)](),this._touchRotate.disable(),this[t(3120)].disable(),this._el.classList.remove("maptec-touch-zoom-rotate")}isEnabled(){const t=i;return this[t(3213)][t(3610)]()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this[t(3120)][t(3610)]()}[i(2719)](){const t=i;return this[t(3213)].isActive()||this[t(1729)][t(2719)]()||this[t(3120)][t(2719)]()}disableRotation(){const t=i;this[t(1789)]=!0,this[t(1729)][t(620)]()}[i(1933)](){const t=i;this._rotationDisabled=!1,this[t(3213)].isEnabled()&&this[t(1729)][t(1573)]()}}class rl{constructor(t,e){const r=i;this[r(1730)]=-1!==navigator[r(990)].indexOf(r(2789))?r(767):"ctrlKey",this._map=t,this._options=e,this[r(3361)]=!1}isActive(){return!1}reset(){}_setupUI(){const t=i;if(this._container)return;const e=this[t(830)][t(2903)]();e[t(2975)][t(2926)]("maptec-cooperative-gestures"),this[t(835)]=Lr[t(325)](t(523),t(2032),e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");t(767)===this[t(1730)]&&(r=this._map._getUIString(t(423)));const o=this._map[t(1762)]("CooperativeGesturesHandler.MobileHelpText"),n=document[t(2737)](t(523));n[t(2568)]="maptec-desktop-message",n.textContent=r,this._container.appendChild(n);const s=document[t(2737)]("div");s[t(2568)]=t(2872),s.textContent=o,this._container[t(1324)](s),this._container[t(1507)]("aria-hidden",t(985))}_destroyUI(){const t=i;this[t(835)]&&(Lr.remove(this[t(835)]),this[t(830)].getCanvasContainer().classList.remove(t(3350))),delete this[t(835)]}[i(1573)](){const t=i;this._setupUI(),this[t(3361)]=!0}disable(){this._enabled=!1,this._destroyUI()}[i(3610)](){return this._enabled}[i(2052)](t){return t[this._bypassKey]}[i(981)](t,r){const o=i;this._enabled&&(this._map.fire(new e.o(o(3118),{gestureType:t,originalEvent:r})),this[o(835)][o(2975)].add("maptec-show"),setTimeout((()=>{const t=o;this._container[t(2975)][t(2591)]("maptec-show")}),100))}}const ol=t=>t.zoom||t[i(1917)]||t[i(3579)]||t[i(882)]||t[i(1752)];class nl extends e.o{}class sl{constructor(t,r){const o=i;this[o(2636)]=t=>{const e=o;this.handleEvent(t,t[e(2784)]+e(1790))},this.handleEvent=(t,i)=>{const r=o;if("blur"===t[r(2784)])return void this[r(1898)](!0);this._updatingCamera=!0;const n="renderFrame"===t.type?void 0:t,s={needsRenderFrame:!1},a={},l={};for(const{handlerName:o,handler:c,allowed:h}of this._handlers){if(!c.isEnabled())continue;let u;if(this[r(2554)](l,h,o))c.reset();else if(c[i||t.type]){if(e.cE(t,i||t.type)){const e=Lr.mousePos(this._map.getCanvas(),t);u=c[i||t.type](t,e)}else if(e.cF(t,i||t[r(2784)])){const e=this._getMapTouches(t.touches),o=Lr.touchPos(this[r(830)].getCanvas(),e);u=c[i||t.type](t,o,e)}else e.cG(i||t.type)||(u=c[i||t.type](t));this[r(2428)](s,a,u,o,n),u&&u[r(3622)]&&this._triggerRenderFrame()}(u||c[r(2719)]())&&(l[o]=c)}const c={};for(const t in this[r(2423)])l[t]||(c[t]=n);this._previousActiveHandlers=l,(Object.keys(c)[r(953)]||We(s))&&(this[r(3422)].push([s,a,c]),this[r(2609)]()),(Object.keys(l).length||We(s))&&this[r(830)]._stop(!0),this[r(2142)]=!1;const{cameraAnimation:h}=s;h&&(this[r(1237)][r(1499)](),this._fireEvents({},{},!0),this._changes=[],h(this[r(830)]))},this[o(830)]=t,this._el=this._map[o(2903)](),this._handlers=[],this[o(1570)]={},this._changes=[],this._inertia=new ba(t),this._bearingSnap=r[o(1489)],this._previousActiveHandlers={},this[o(3547)]={},this[o(2548)](r);const n=this[o(1956)];this[o(1091)]=[[n,o(2075),{passive:!0}],[n,o(3175),{passive:!1}],[n,"touchend",void 0],[n,o(2579),void 0],[n,o(1476),void 0],[n,o(1598),void 0],[n,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[n,o(2672),void 0],[n,o(3596),void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,o(1135),{capture:!1}],[n,"keyup",void 0],[n,o(2570),{passive:!1}],[n,"contextmenu",void 0],[window,"blur",void 0]];for(const[t,e,i]of this[o(1091)])Lr[o(2689)](t,e,t===document?this.handleWindowEvent:this[o(3624)],i)}destroy(){const t=i;for(const[e,i,r]of this._listeners)Lr[t(841)](e,i,e===document?this[t(2636)]:this[t(3624)],r)}[i(2548)](t){const r=i,o=this[r(830)],n=o.getCanvasContainer();this[r(2839)](r(373),new Pa(o,t));const s=o.boxZoom=new Ma(o,t);this[r(2839)](r(2812),s),t[r(905)]&&t[r(2812)]&&s[r(1573)]();const a=o.cooperativeGestures=new rl(o,t[r(897)]);this[r(2839)]("cooperativeGestures",a),t[r(897)]&&a.enable();const l=new za(o),c=new $a(o);o[r(3514)]=new Ka(c,l),this._add(r(2450),l),this[r(2839)](r(1075),c),t[r(905)]&&t.doubleClickZoom&&o.doubleClickZoom.enable();const h=new Qa;this[r(2839)](r(3311),h);const u=o[r(1175)]=new Za(o);this[r(2839)]("touchPitch",u),t[r(905)]&&t[r(1175)]&&o.touchPitch[r(1573)](t.touchPitch);const d=()=>o.project(o.center),p=function({enable:t,clickTolerance:i,aroundCenter:o=!0,minPixelCenterThreshold:n=100,rotateDegreesPerPixelMoved:s=.8},a){const l=r,c=new Fa({checkCorrectEvent:t=>0===Lr.mouseButton(t)&&t.ctrlKey||2===Lr[l(1572)](t)&&!t.ctrlKey});return new Da({clickTolerance:i,move:(t,i)=>{const r=l,c=a();if(o&&Math[r(1201)](c.y-t.y)>n)return{bearingDelta:e.cD(new e.P(t.x,i.y),i,c)};let h=(i.x-t.x)*s;return o&&i.y<c.y&&(h=-h),{bearingDelta:h}},moveStateManager:c,enable:t,assignEvents:Va})}(t,d),f=function({enable:t,clickTolerance:e,pitchDegreesPerPixelMoved:i=-.5}){const o=r,n=new Fa({checkCorrectEvent:t=>0===Lr.mouseButton(t)&&t[o(2332)]||2===Lr.mouseButton(t)});return new Da({clickTolerance:e,move:(t,e)=>({pitchDelta:(e.y-t.y)*i}),moveStateManager:n,enable:t,assignEvents:Va})}(t),m=function({enable:t,clickTolerance:e,rollDegreesPerPixelMoved:i=.3},o){const n=r,s=new Fa({checkCorrectEvent:t=>2===Lr[n(1572)](t)&&t[n(2332)]});return new Da({clickTolerance:e,move:(t,e)=>{const r=o();let n=(e.x-t.x)*i;return e.y<r.y&&(n=-n),{rollDelta:n}},moveStateManager:s,enable:t,assignEvents:Va})}(t,d);o[r(2755)]=new el(t,p,f,m),this._add("mouseRotate",p,["mousePitch"]),this[r(2839)]("mousePitch",f,[r(1813),"mouseRoll"]),this[r(2839)](r(3013),m,["mousePitch"]),t[r(905)]&&t.dragRotate&&o.dragRotate.enable();const _=function({enable:t,clickTolerance:e}){const i=r,o=new Fa({checkCorrectEvent:t=>0===Lr.mouseButton(t)&&!t[i(2332)]});return new Da({clickTolerance:e,move:(t,e)=>({around:e,panDelta:e[i(1276)](t)}),activateOnStart:!0,moveStateManager:o,enable:t,assignEvents:Va})}(t),y=new Na(t,o);o[r(1070)]=new tl(n,_,y),this._add(r(2081),_),this._add("touchPan",y,["touchZoom","touchRotate"]),t[r(905)]&&t[r(1070)]&&o[r(1070)][r(1573)](t.dragPan);const g=new qa,v=new Ua;o.touchZoomRotate=new il(n,v,g,h),this._add("touchRotate",g,["touchPan",r(2713)]),this[r(2839)](r(2713),v,["touchPan",r(840)]),t.interactive&&t.touchZoomRotate&&o.touchZoomRotate[r(1573)](t[r(2802)]),this[r(2839)](r(3309),new Ia(o));const x=o[r(2769)]=new Ja(o,(()=>this._triggerRenderFrame()));this[r(2839)](r(2769),x,["mousePan"]),t.interactive&&t[r(2769)]&&o[r(2769)].enable(t[r(2769)]);const b=o.keyboard=new Ha(o);this._add(r(1654),b),t[r(905)]&&t.keyboard&&o[r(1654)][r(1573)]()}[i(2839)](t,e,r){const o=i;this[o(3636)][o(2315)]({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e}stop(t){const e=i;if(!this[e(2142)]){for(const{handler:t}of this._handlers)t.reset();this._inertia[e(1499)](),this[e(3276)]({},{},t),this._changes=[]}}[i(2719)](){const t=i;for(const{handler:e}of this._handlers)if(e[t(2719)]())return!0;return!1}isZooming(){const t=i;return!!this._eventsInProgress[t(3512)]||this[t(830)][t(2769)].isZooming()}[i(928)](){return!!this._eventsInProgress[i(1752)]}[i(967)](){const t=i;return Boolean(ol(this[t(3547)]))||this[t(877)]()}_blockedByActive(t,e,i){for(const r in t)if(r!==i&&(!e||e.indexOf(r)<0))return!0;return!1}_getMapTouches(t){const e=i,r=[];for(const i of t)this[e(1956)].contains(i[e(2993)])&&r.push(i);return r}[i(2428)](t,r,o,n,s){const a=i;if(!o)return;e.e(t,o);const l={handlerName:n,originalEvent:o.originalEvent||s};void 0!==o[a(3430)]&&(r.zoom=l),void 0!==o[a(635)]&&(r[a(1917)]=l),void 0!==o[a(1346)]&&(r.roll=l),void 0!==o.pitchDelta&&(r.pitch=l),void 0!==o[a(320)]&&(r.rotate=l)}[i(1429)](){const t=i,r={},o={},n={};for(const[i,s,a]of this[t(3422)])i.panDelta&&(r.panDelta=(r[t(635)]||new e.P(0,0))._add(i[t(635)])),i.zoomDelta&&(r.zoomDelta=(r.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(r[t(320)]=(r[t(320)]||0)+i[t(320)]),i.pitchDelta&&(r.pitchDelta=(r.pitchDelta||0)+i.pitchDelta),i[t(1346)]&&(r[t(1346)]=(r.rollDelta||0)+i[t(1346)]),void 0!==i[t(2924)]&&(r[t(2924)]=i[t(2924)]),void 0!==i[t(1865)]&&(r[t(1865)]=i[t(1865)]),i[t(2359)]&&(r[t(2359)]=i.noInertia),e.e(o,s),e.e(n,a);this._updateMapTransform(r,o,n),this._changes=[]}_updateMapTransform(t,e,r){const o=i,n=this[o(830)],s=n[o(2795)](),a=n.terrain;if(!(We(t)||a&&this._terrainMovement))return this._fireEvents(e,r,!0);n[o(324)](!0);let{panDelta:l,zoomDelta:c,bearingDelta:h,pitchDelta:u,rollDelta:d,around:p,pinchAround:f}=t;void 0!==f&&(p=f),p=p||n[o(1847)][o(1281)],a&&!s.isPointOnMapSurface(p)&&(p=s[o(1281)]);const m={panDelta:l,zoomDelta:c,rollDelta:d,pitchDelta:u,bearingDelta:h,around:p};this[o(830)].cameraHelper[o(2126)]&&!s[o(1271)](p)&&(p=s.centerPoint);const _=p[o(2404)](s[o(1281)])<.01?s[o(1972)]:s[o(643)](l?p[o(1276)](l):p);this[o(2639)]({terrain:a,tr:s,deltasForHelper:m,preZoomAroundLoc:_,combinedEventsInProgress:e,panDelta:l}),n._applyUpdatedTransform(s),this[o(830)][o(437)](),t.noInertia||this._inertia[o(1442)](t),this._fireEvents(e,r,!0)}_handleMapControls({terrain:t,tr:e,deltasForHelper:r,preZoomAroundLoc:o,combinedEventsInProgress:n,panDelta:s}){const a=i,l=this[a(830)].cameraHelper;if(l.handleMapControlsRollPitchBearingZoom(r,e),t)return l[a(2126)]?(this._terrainMovement||!n.drag&&!n.zoom||(this[a(889)]=!0,this._map._elevationFreeze=!0),void l[a(2473)](r,e,o)):this[a(889)]||!n[a(1917)]&&!n.zoom?void(n.drag&&this[a(889)]&&s?e.setCenter(e.screenPointToLocation(e.centerPoint[a(1276)](s))):l[a(2473)](r,e,o)):(this[a(889)]=!0,this._map[a(1819)]=!0,void l.handleMapControlsPan(r,e,o));l.handleMapControlsPan(r,e,o)}[i(3276)](t,r,o){const n=i,s=ol(this._eventsInProgress),a=ol(t),l={};for(const e in t){const{originalEvent:i}=t[e];this[n(3547)][e]||(l[e+"start"]=i),this._eventsInProgress[e]=t[e]}!s&&a&&this[n(1349)](n(1944),a[n(3462)]);for(const t in l)this._fireEvent(t,l[t]);a&&this[n(1349)]("move",a.originalEvent);for(const e in t){const{originalEvent:i}=t[e];this._fireEvent(e,i)}const c={};let h;for(const t in this._eventsInProgress){const{handlerName:e,originalEvent:i}=this._eventsInProgress[t];this._handlersById[e][n(2719)]()||(delete this._eventsInProgress[t],h=r[e]||i,c[t+n(2049)]=h)}for(const t in c)this._fireEvent(t,c[t]);const u=ol(this._eventsInProgress),d=(s||a)&&!u;if(d&&this[n(889)]){this._map[n(1819)]=!1,this[n(889)]=!1;const t=this._map[n(2795)]();this._map.getCenterClampedToGround()&&t[n(1515)](this._map[n(3245)]),this[n(830)]._applyUpdatedTransform(t)}if(o&&d){this._updatingCamera=!0;const t=this[n(1237)]._onMoveEnd(this._map[n(1070)]._inertiaOptions),i=t=>0!==t&&-this[n(3525)]<t&&t<this[n(3525)];!t||!t[n(3410)]&&zr[n(2687)]?(this[n(830)].fire(new e.o(n(2443),{originalEvent:h})),i(this[n(830)].bearing)&&this._map[n(987)]()):(i(t[n(1121)]||this._map.bearing)&&(t[n(1121)]=0),t[n(1668)]=!0,Ea.prototype[n(1665)][n(3054)](this[n(830)],t,{originalEvent:h})),this._updatingCamera=!1}}[i(1349)](t,r){this._map[i(1430)](new e.o(t,r?{originalEvent:r}:{}))}_requestFrame(){const t=i;return this._map[t(1106)](),this._map[t(1784)][t(2926)]((e=>{const i=t;delete this._frameId,this.handleEvent(new nl("renderFrame",{timeStamp:e})),this[i(1429)]()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const al={compact:!0,customAttribution:'<a href="https://test-map.maptec.com/" target="_blank">Maptec</a>'};class ll{constructor(t=al){const e=i;this[e(659)]=()=>{const t=e;this._container.classList.contains(t(1376))&&(this._container[t(2975)][t(2287)]("maptec-compact-show")?(this[t(835)].setAttribute(t(675),""),this._container.classList[t(2591)](t(2826))):(this[t(835)].classList.add(t(2826)),this._container[t(2363)](t(675))))},this._updateData=t=>{const i=e;!t||"metadata"!==t.sourceDataType&&i(581)!==t.sourceDataType&&i(1048)!==t.dataType&&i(3245)!==t[i(2784)]||this[i(715)]()},this._updateCompact=()=>{const t=e;this._map.getCanvasContainer()[t(2930)]<=640||this._compact?!1===this[t(3160)]?this._container[t(1507)](t(675),""):this._container.classList[t(2287)](t(1376))||this._container[t(2975)][t(2287)](t(2351))||(this._container[t(1507)]("open",""),this._container.classList.add(t(1376),t(2826))):(this[t(835)].setAttribute("open",""),this[t(835)][t(2975)].contains("maptec-compact")&&this._container[t(2975)].remove("maptec-compact","maptec-compact-show"))},this._updateCompactMinimize=()=>{const t=e;this[t(835)][t(2975)][t(2287)]("maptec-compact")&&this._container[t(2975)][t(2287)]("maptec-compact-show")&&this[t(835)].classList.remove(t(2826))},this.options=t}[i(3617)](){return i(3032)}[i(3540)](t){const e=i;return this[e(830)]=t,this[e(3160)]=this[e(1666)][e(2313)],this._container=Lr[e(325)]("details","maptec-ctrl maptec-ctrl-attrib"),this._compactButton=Lr.create("summary",e(3143),this._container),this._compactButton[e(2689)](e(1024),this._toggleAttribution),this[e(3086)](this._compactButton,e(1345)),this._innerContainer=Lr.create(e(523),e(3376),this[e(835)]),this._updateAttributions(),this._updateCompact(),this._map.on(e(3277),this._updateData),this._map.on(e(849),this[e(2174)]),this[e(830)].on("terrain",this._updateData),this[e(830)].on(e(2820),this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}[i(1593)](){const t=i;Lr.remove(this._container),this[t(830)].off("styledata",this[t(2174)]),this[t(830)].off(t(849),this._updateData),this[t(830)].off(t(3245),this._updateData),this[t(830)].off("resize",this[t(3164)]),this._map[t(1002)](t(1917),this[t(2417)]),this._map=void 0,this._compact=void 0,this[t(2976)]=void 0}[i(3086)](t,e){const r=this._map._getUIString(i(335)+e);t.title=r,t.setAttribute("aria-label",r)}[i(715)](){const t=i;if(!this[t(830)].style)return;let e=[];if(this.options.customAttribution&&(Array[t(2667)](this[t(1666)][t(370)])?e=e.concat(this[t(1666)][t(370)].map((t=>"string"!=typeof t?"":t))):"string"==typeof this.options.customAttribution&&e[t(2315)](this[t(1666)][t(370)])),this[t(830)].style[t(1919)]){const e=this._map.style.stylesheet;this[t(1759)]=e.owner,this[t(859)]=e.id}const r=this[t(830)].style[t(1217)];for(const i in r){const o=r[i];if(o.used||o.usedForTerrain){const i=o.getSource();i[t(2020)]&&e.indexOf(i.attribution)<0&&e[t(2315)](i.attribution)}}e=e[t(2397)]((t=>String(t).trim())),e.sort(((t,e)=>t.length-e.length)),e=e.filter(((i,r)=>{const o=t;for(let t=r+1;t<e.length;t++)if(e[t][o(2887)](i)>=0)return!1;return!0}));const o=e[t(2533)](" | ");o!==this._attribHTML&&(this[t(2976)]=o,e.length?(this[t(3327)][t(1858)]=Lr[t(2878)](o),this._container[t(2975)].remove(t(2351))):this._container[t(2975)][t(2926)](t(2351)),this._updateCompact(),this[t(3152)]=null)}}class cl{constructor(t={}){const e=i;this[e(3164)]=()=>{const t=e,i=this[t(835)].children;if(i.length){const e=i[0];this[t(830)].getCanvasContainer().offsetWidth<=640||this[t(3160)]?!1!==this._compact&&e[t(2975)].add("maptec-compact"):e.classList[t(2591)]("maptec-compact")}},this.options=t}getDefaultPosition(){return i(1684)}onAdd(t){const e=i;this[e(830)]=t,this[e(3160)]=this.options&&this.options.compact,this[e(835)]=Lr.create(e(523),"maptec-ctrl");const r=Lr[e(325)]("div",e(3418));return r[e(1507)]("aria-label",this._map[e(1762)](e(2068))),this[e(835)][e(1324)](r),this._container.style[e(2360)]="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this[e(835)]}[i(1593)](){const t=i;Lr.remove(this[t(835)]),this[t(830)].off(t(2820),this._updateCompact),this._map=void 0,this._compact=void 0}}class hl{constructor(){const t=i;this[t(3345)]=[],this[t(2456)]=0,this._cleared=!1,this[t(730)]=!1}add(t){const e=i,r=++this._id;return this[e(3345)].push({callback:t,id:r,cancelled:!1}),r}[i(2591)](t){const e=i,r=this._currentlyRunning,o=r?this[e(3345)].concat(r):this[e(3345)];for(const e of o)if(e.id===t)return void(e.cancelled=!0)}run(t=0){const e=i;if(this[e(730)])throw new Error(e(529));const r=this[e(730)]=this[e(3345)];this._queue=[];for(const i of r)if(!i[e(879)]&&(i.callback(t),this[e(1686)]))break;this[e(1686)]=!1,this[e(730)]=!1}[i(1499)](){this._currentlyRunning&&(this[i(1686)]=!0),this._queue=[]}}Ri=e.aX([{name:i(3230),type:i(1428),components:3}]);class ul extends e.E{constructor(t){const e=i;super(),this[e(3331)]=c(),this.tileManager=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this[e(782)]=t[e(481)][e(782)]*2**this.deltaZoom,t[e(338)]=!0,t[e(782)]=this[e(782)]}destruct(){const t=i;this[t(590)][t(338)]=!1,this.tileManager.tileSize=null}getSource(){const t=i;return this[t(590)][t(481)]}update(t,r){const o=i;this.tileManager.update(t,r),this[o(575)]=[];const n={};for(const i of X(t,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this[o(590)]._source[o(1473)]}))n[i[o(2133)]]=!0,this[o(575)].push(i[o(2133)]),this._tiles[i.key]||(i[o(521)]=new Float64Array(16),e.c8(i[o(521)],0,e.a8,e.a8,0,0,1),this._tiles[i.key]=new _o(i,this[o(782)]),this._lastTilesetChange=c());for(const t in this[o(2563)])n[t]||delete this[o(2563)][t]}freeRtt(t){const e=i;for(const i in this._tiles){const r=this[e(2563)][i];(!t||r[e(3533)][e(2586)](t)||r[e(3533)].isChildOf(t)||t.isChildOf(r[e(3533)]))&&(r.rtt=[])}}[i(2929)](){return this._renderableTilesKeys[i(1920)]((t=>this.getTileByID(t)))}[i(1946)](t){return this[i(2563)][t]}getTerrainCoords(t,e){return e?this[i(1514)](t,e):this._getTerrainCoordsForRegularTile(t)}_getTerrainCoordsForRegularTile(t){const r=i,o={};for(const i of this._renderableTilesKeys){const n=this[r(2563)][i].tileID,s=t[r(2621)](),a=e.bn();if(n[r(842)][r(2586)](t.canonical))e.c8(a,0,e.a8,e.a8,0,0,1);else if(n[r(842)].isChildOf(t[r(842)])){const i=n[r(842)].z-t.canonical.z,o=n.canonical.x-(n.canonical.x>>i<<i),s=n[r(842)].y-(n[r(842)].y>>i<<i),l=e.a8>>i;e.c8(a,0,l,l,0,0,1),e.S(a,a,[-o*l,-s*l,0])}else{if(!t[r(842)].isChildOf(n[r(842)]))continue;{const i=t[r(842)].z-n.canonical.z,o=t[r(842)].x-(t.canonical.x>>i<<i),s=t[r(842)].y-(t.canonical.y>>i<<i),l=e.a8>>i;e.c8(a,0,e.a8,e.a8,0,0,1),e.S(a,a,[o*l,s*l,0]),e.U(a,a,[1/2**i,1/2**i,0])}}s.terrainRttPosMatrix32f=new Float32Array(a),o[i]=s}return o}[i(1514)](t,r){const o=i,n={};for(const i of this[o(575)]){const s=this[o(2563)][i].tileID;if(!this._isWithinTileRanges(s,r))continue;const a=t.clone(),l=e.bn();if(s[o(842)].z===t.canonical.z){const i=t[o(842)].x-s.canonical.x+t[o(317)]*(1<<t.canonical.z),r=t[o(842)].y-s.canonical.y;e.c8(l,0,e.a8,e.a8,0,0,1),e.S(l,l,[i*e.a8,r*e.a8,0])}else if(s.canonical.z>t.canonical.z){const i=s[o(842)].z-t[o(842)].z,r=s[o(842)].x-(s[o(842)].x>>i<<i)+t[o(317)]*(1<<s[o(842)].z),n=s.canonical.y-(s.canonical.y>>i<<i),a=t[o(842)].x-(s.canonical.x>>i),c=t.canonical.y-(s.canonical.y>>i),h=e.a8>>i;e.c8(l,0,h,h,0,0,1),e.S(l,l,[-r*h+a*e.a8,-n*h+c*e.a8,0])}else{const i=t.canonical.z-s[o(842)].z,r=t[o(842)].x-(t.canonical.x>>i<<i)+t.wrap*(1<<t.canonical.z),n=t[o(842)].y-(t.canonical.y>>i<<i),a=(t[o(842)].x>>i)-s[o(842)].x,c=(t.canonical.y>>i)-s[o(842)].y,h=e.a8<<i;e.c8(l,0,h,h,0,0,1),e.S(l,l,[r*e.a8+a*h,n*e.a8+c*h,0])}a[o(521)]=new Float32Array(l),n[i]=a}return n}[i(1520)](t,e){const r=i,o=this.tileManager._source;let n=t[r(903)]-this.deltaZoom;if(n>o[r(615)]&&(n=o.maxzoom),n<o.minzoom)return;this._sourceTileCache[t[r(2133)]]||(this[r(3214)][t[r(2133)]]=t.scaledTo(n).key);let s=this[r(962)](this[r(3214)][t[r(2133)]]);if(!(null==s?void 0:s[r(941)])&&e)for(;n>=o.minzoom&&!(null==s?void 0:s[r(941)]);)s=this[r(962)](t[r(2193)](n--).key);return s}findTileInCaches(t){const e=i;let r=this[e(590)].getTileByID(t);return r||(r=this[e(590)][e(1053)].getByKey(t),r)}anyTilesAfterTime(t=Date[i(812)]()){return this[i(3331)]>=t}[i(942)](t,e){const r=i,o=e[t.canonical.z];return!!o&&(t.wrap>o.minWrap||t.wrap<o.maxWrap||t.canonical.x>=o.minTileXWrapped&&t.canonical.x<=o[r(2274)]&&t[r(842)].y>=o.minTileY&&t.canonical.y<=o.maxTileY)}}class dl{constructor(t,e,r){const o=i;this[o(2011)]={},this.painter=t,this.tileManager=new ul(e),this[o(1666)]=r,this[o(3552)]="number"==typeof r.exaggeration?r.exaggeration:1,this[o(341)]=2,this.meshSize=128,this._demMatrixCache={},this[o(1704)]=[],this._coordsTextureSize=1024}[i(2642)](t,r,o,n=e.a8){const s=i;var a;if(!(r>=0&&r<n&&o>=0&&o<n))return 0;const l=this[s(3497)](t),c=null===(a=l.tile)||void 0===a?void 0:a.dem;if(!c)return 0;const h=e.cH([],[r/n*e.a8,o/n*e.a8],l.u_terrain_matrix),u=[h[0]*c[s(2725)],h[1]*c.dim],d=Math.floor(u[0]),p=Math.floor(u[1]),f=u[0]-d,m=u[1]-p;return c.get(d,p)*(1-f)*(1-m)+c[s(1445)](d+1,p)*f*(1-m)+c[s(1445)](d,p+1)*(1-f)*m+c.get(d+1,p+1)*f*m}getElevationForLngLatZoom(t,r){const o=i;if(!e.cI(r,t[o(317)]()))return 0;const{tileID:n,mercatorX:s,mercatorY:a}=this[o(2635)](t,r);return this.getElevation(n,s%e.a8,a%e.a8,e.a8)}getElevationForLngLat(t,e){const r=i,o=X(e,{maxzoom:this.tileManager[r(615)],minzoom:this[r(590)].minzoom,tileSize:512,terrain:this});let n=0;for(const t of o)t[r(842)].z>n&&(n=Math.min(t[r(842)].z,this[r(590)].maxzoom));return this.getElevationForLngLatZoom(t,n)}[i(870)](t,r,o,n=e.a8){return this[i(2642)](t,r,o,n)*this.exaggeration}getTerrainData(t){const r=i;if(!this._emptyDemTexture){const t=this.painter[r(1249)],i=new e.R({width:1,height:1},new Uint8Array(4));this[r(356)]=new e.T(t,i,t.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(t,new e.R({width:1,height:1}),t.gl[r(3468)],{premultiply:!1}),this[r(825)][r(2211)](t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this[r(2984)]=e.au([])}const o=this.tileManager[r(1520)](t,!0);if(o&&o[r(941)]&&(!o[r(2128)]||o.needsTerrainPrepare)){const t=this.painter.context;o[r(2128)]=this.painter.getTileTexture(o.dem.stride),o.demTexture?o.demTexture[r(1923)](o[r(941)].getPixels(),{premultiply:!1}):o[r(2128)]=new e.T(t,o.dem[r(3043)](),t.gl[r(3468)],{premultiply:!1}),o[r(2128)][r(2211)](t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),o.needsTerrainPrepare=!1}const n=o&&o[r(2289)]()+o.tileID.key+t.key;if(n&&!this[r(3349)][n]){const i=this[r(590)][r(1321)]().maxzoom;let n=t.canonical.z-o[r(3533)][r(842)].z;t.overscaledZ>t.canonical.z&&(t[r(842)].z>=i?n=t.canonical.z-i:e.w(r(766)));const s=t.canonical.x-(t[r(842)].x>>n<<n),a=t.canonical.y-(t.canonical.y>>n<<n),l=e.cJ(new Float64Array(16),[1/(e.a8<<n),1/(e.a8<<n),0]);e.S(l,l,[s*e.a8,a*e.a8,0]),this._demMatrixCache[t[r(2133)]]={matrix:l,coord:t}}return{u_depth:2,u_terrain:3,u_terrain_dim:o&&o.dem&&o[r(941)].dim||1,u_terrain_matrix:n?this[r(3349)][t[r(2133)]].matrix:this._emptyDemMatrix,u_terrain_unpack:o&&o[r(941)]&&o.dem[r(996)]()||this[r(3033)],u_terrain_exaggeration:this[r(3552)],texture:(o&&o.demTexture||this._emptyDemTexture)[r(600)],depthTexture:(this[r(608)]||this._emptyDepthTexture).texture,tile:o}}getFramebuffer(t){const r=i,o=this[r(1258)],n=o.width/devicePixelRatio,s=o[r(3282)]/devicePixelRatio;return!this._fbo||this._fbo.width===n&&this[r(1095)][r(3282)]===s||(this[r(1095)][r(2355)](),this._fboCoordsTexture.destroy(),this[r(608)][r(2355)](),delete this[r(1095)],delete this[r(608)],delete this[r(2963)]),this._fboCoordsTexture||(this[r(2963)]=new e.T(o.context,{width:n,height:s,data:null},o[r(1249)].gl.RGBA,{premultiply:!1}),this._fboCoordsTexture[r(2211)](o.context.gl[r(3128)],o.context.gl[r(2557)])),this._fboDepthTexture||(this[r(608)]=new e.T(o.context,{width:n,height:s,data:null},o[r(1249)].gl[r(3468)],{premultiply:!1}),this._fboDepthTexture[r(2211)](o.context.gl.NEAREST,o.context.gl[r(2557)])),this[r(1095)]||(this._fbo=o.context[r(947)](n,s,!0,!1),this._fbo.depthAttachment[r(571)](o.context[r(1629)](o[r(1249)].gl[r(1753)],n,s))),this[r(1095)][r(2535)].set(r(3335)===t?this._fboCoordsTexture[r(600)]:this._fboDepthTexture[r(600)]),this._fbo}getCoordsTexture(){const t=i,r=this[t(1258)][t(1249)];if(this._coordsTexture)return this[t(3405)];const o=new Uint8Array(this[t(3562)]*this._coordsTextureSize*4);for(let e=0,i=0;e<this[t(3562)];e++)for(let t=0;t<this._coordsTextureSize;t++,i+=4)o[i+0]=255&t,o[i+1]=255&e,o[i+2]=t>>8<<4|e>>8,o[i+3]=0;const n=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(o[t(2841)])),s=new e.T(r,n,r.gl[t(3468)],{premultiply:!1});return s[t(2211)](r.gl.NEAREST,r.gl[t(2557)]),this[t(3405)]=s,s}[i(432)](t){const r=i;this[r(1258)][r(426)](!0);const o=new Uint8Array(4),n=this[r(1258)][r(1249)],s=n.gl,a=Math[r(3291)](t.x*this.painter[r(3105)]/devicePixelRatio),l=Math.round(t.y*this[r(1258)].pixelRatio/devicePixelRatio),c=Math.round(this.painter.height/devicePixelRatio);n[r(2582)].set(this.getFramebuffer(r(3335))[r(717)]),s.readPixels(a,c-l-1,1,1,s[r(3468)],s.UNSIGNED_BYTE,o),n.bindFramebuffer.set(null);const h=o[0]+(o[2]>>4<<8),u=o[1]+((15&o[2])<<8),d=this[r(1704)][255-o[3]],p=d&&this.tileManager.getTileByID(d);if(!p)return null;const f=this._coordsTextureSize,m=(1<<p[r(3533)].canonical.z)*f;return new e.ac((p.tileID[r(842)].x*f+h)/m+p[r(3533)].wrap,(p.tileID.canonical.y*f+u)/m,this[r(870)](p[r(3533)],h,u,f))}depthAtPoint(t){const e=i,r=new Uint8Array(4),o=this.painter.context,n=o.gl;return o[e(2582)][e(571)](this.getFramebuffer("depth")[e(717)]),n.readPixels(t.x,this.painter[e(3282)]/devicePixelRatio-t.y-1,1,1,n[e(3468)],n[e(1884)],r),o[e(2582)][e(571)](null),(r[0]/16777216+r[1]/65536+r[2]/256+r[3])/256}[i(1395)](t){const r=i;var o;const n=(null===(o=this.painter[r(1048)][r(3645)])||void 0===o?void 0:o.transitionState)>0,s=n&&0===t[r(842)].y,a=n&&t.canonical.y===(1<<t.canonical.z)-1,l="m_"+(s?"n":"")+"_"+(a?"s":"");if(this[r(2011)][l])return this._meshCache[l];const c=this.painter.context,h=new e.cK,u=new e.a$,d=this[r(1964)],p=e.a8/d,f=d*d;for(let t=0;t<=d;t++)for(let e=0;e<=d;e++)h.emplaceBack(e*p,t*p,0);for(let t=0;t<f;t+=d+1)for(let e=0;e<d;e++)u[r(2225)](e+t,d+e+t+1,d+e+t+2),u[r(2225)](e+t,d+e+t+2,e+t+1);const m=h[r(953)],_=m+(d+1),y=(d+1)*d,g=s?e.bu:0,v=s?0:1,x=a?e.bv:e.a8,b=a?0:1;for(let t=0;t<=d;t++)h.emplaceBack(t*p,g,v);for(let t=0;t<=d;t++)h[r(2225)](t*p,x,b);for(let t=0;t<d;t++)u[r(2225)](y+t,_+t,_+t+1),u[r(2225)](y+t,_+t+1,y+t+1),u[r(2225)](0+t,m+t+1,m+t),u.emplaceBack(0+t,0+t+1,m+t+1);const w=h.length,T=w+2*(d+1);for(const t of[0,1])for(let i=0;i<=d;i++)for(const o of[0,1])h[r(2225)](t*e.a8,i*p,o);for(let t=0;t<2*d;t+=2)u.emplaceBack(w+t,w+t+1,w+t+3),u.emplaceBack(w+t,w+t+3,w+t+2),u.emplaceBack(T+t,T+t+3,T+t+1),u.emplaceBack(T+t,T+t+2,T+t+3);const S=new Jo(c[r(476)](h,Ri.members),c[r(2778)](u),e.a_.simpleSegment(0,0,h.length,u.length));return this[r(2011)][l]=S,S}[i(2603)](t){return 2*Math.PI*e.bH/Math.pow(2,Math[i(2153)](t,0))/5}[i(2920)](t,r){const o=i;var n;if(!e.cI(r,t[o(317)]()))return 0;const{tileID:s}=this._getOverscaledTileIDFromLngLatZoom(t,r);return null!==(n=this[o(1338)](s)[o(3308)])&&void 0!==n?n:0}getMinMaxElevation(t){const e=i,r=this[e(3497)](t)[e(1804)],o={minElevation:null,maxElevation:null};return r&&r.dem&&(o.minElevation=r.dem.min*this[e(3552)],o.maxElevation=r.dem[e(2153)]*this.exaggeration),o}_getOverscaledTileIDFromLngLatZoom(t,r){const o=i,n=e.ac[o(1677)](t.wrap()),s=(1<<r)*e.a8,a=n.x*s,l=n.y*s,c=Math.floor(a/e.a8),h=Math[o(2700)](l/e.a8);return{tileID:new e.a5(r,0,r,c,h),mercatorX:a,mercatorY:l}}}class pl{constructor(t,e,r){const o=i;this._context=t,this._size=e,this[o(1432)]=r,this._objects=[],this[o(1086)]=[],this._stamp=0}destruct(){const t=i;for(const e of this._objects)e[t(600)].destroy(),e[t(473)][t(2355)]()}[i(314)](t){const r=i,o=this._context.createFramebuffer(this[r(1432)],this[r(1432)],!0,!0),n=new e.T(this._context,{width:this._tileSize,height:this[r(1432)],data:null},this[r(2630)].gl.RGBA);return n[r(2211)](this[r(2630)].gl[r(1661)],this[r(2630)].gl.CLAMP_TO_EDGE),this._context[r(3530)]&&this._context.gl.texParameterf(this._context.gl[r(2541)],this._context[r(3530)][r(2242)],this[r(2630)][r(1503)]),o.depthAttachment.set(this[r(2630)].createRenderbuffer(this._context.gl.DEPTH_STENCIL,this[r(1432)],this[r(1432)])),o.colorAttachment.set(n.texture),{id:t,fbo:o,texture:n,stamp:-1,inUse:!1}}getObjectForId(t){return this._objects[t]}useObject(t){const e=i;t[e(1850)]=!0,this._recentlyUsed=this[e(1086)].filter((e=>t.id!==e)),this[e(1086)][e(2315)](t.id)}[i(1262)](t){t.stamp=++this._stamp}[i(2857)](){const t=i;for(const e of this[t(1086)])if(!this._objects[e][t(1850)])return this[t(1040)][e];if(this._objects[t(953)]>=this._size)throw new Error(t(764));const e=this._createObject(this._objects[t(953)]);return this._objects[t(2315)](e),e}[i(2690)](t){t[i(1850)]=!1}[i(810)](){const t=i;for(const e of this[t(1040)])this.freeObject(e)}[i(2472)](){const t=i;return!(this[t(1040)][t(953)]<this._size)&&!1===this[t(1040)].some((t=>!t.inUse))}}const fl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class ml{constructor(t,e){const r=i;this[r(1258)]=t,this[r(3245)]=e,this.pool=new pl(t[r(1249)],30,e.tileManager[r(782)]*e.qualityFactor)}[i(3508)](){this[i(1245)].destruct()}getTexture(t){const e=i;return this.pool[e(846)](t[e(3329)][this._stacks[e(953)]-1].id).texture}prepareForRender(t,e){const r=i;this._stacks=[],this._prevType=null,this[r(550)]=[],this[r(3247)]=this[r(3245)][r(590)][r(2929)](),this[r(3206)]=t[r(2373)][r(2397)]((i=>!t._layers[i].isHidden(e))),this[r(3286)]={};for(const e in t.tileManagers){this._coordsAscending[e]={};const i=t[r(1217)][e].getVisibleCoordinates(),o=t.tileManagers[e].getSource(),n=o instanceof lo?o.terrainTileRanges:null;for(const t of i){const i=this.terrain[r(590)][r(678)](t,n);for(const t in i)this[r(3286)][e][t]||(this[r(3286)][e][t]=[]),this[r(3286)][e][t][r(2315)](i[t])}}this._coordsAscendingStr={};for(const e of t._order){const i=t[r(3557)][e],o=i[r(1841)];if(fl[i.type]&&!this[r(415)][o]){this[r(415)][o]={};for(const t in this[r(3286)][o])this._coordsAscendingStr[o][t]=this[r(3286)][o][t][r(1920)]((t=>t[r(2133)])).sort().join()}}for(const t of this._renderableTiles)for(const e in this._coordsAscendingStr){const i=this._coordsAscendingStr[e][t.tileID[r(2133)]];i&&i!==t[r(2307)][e]&&(t.rtt=[])}}[i(1216)](t,r){const o=i;if(t.isHidden(this.painter[o(1847)][o(3512)]))return!1;const n=Object[o(2132)](Object[o(2132)]({},r),{isRenderingToTexture:!0}),s=t[o(2784)],a=this[o(1258)],l=this._renderableLayerIds[this[o(3206)].length-1]===t.id;if(fl[s]&&(this[o(2178)]&&fl[this[o(2178)]]||this._stacks[o(2315)]([]),this._prevType=s,this[o(474)][this._stacks[o(953)]-1].push(t.id),!l))return!0;if(fl[this._prevType]||fl[s]&&l){this._prevType=s;const t=this[o(474)].length-1,i=this[o(474)][t]||[];for(const r of this[o(3247)]){if(this[o(1245)].isFull()&&(Oe(this.painter,this.terrain,this._rttTiles,n),this[o(550)]=[],this[o(1245)].freeAllObjects()),this._rttTiles[o(2315)](r),r.rtt[t]){const e=this[o(1245)][o(846)](r[o(3329)][t].id);if(e[o(3407)]===r.rtt[t].stamp){this[o(1245)].useObject(e);continue}}const s=this.pool.getOrCreateFreeObject();this.pool.useObject(s),this[o(1245)].stampObject(s),r.rtt[t]={id:s.id,stamp:s[o(3407)]},a[o(1249)].bindFramebuffer[o(571)](s.fbo.framebuffer),a.context[o(1499)]({color:e.bs[o(1158)],stencil:0}),a.currentStencilSource=void 0;for(let t=0;t<i.length;t++){const e=a.style._layers[i[t]],l=e[o(1841)]?this._coordsAscending[e.source][r[o(3533)][o(2133)]]:[r.tileID];a.context[o(3657)][o(571)]([0,0,s.fbo[o(1422)],s.fbo[o(3282)]]),a._renderTileClippingMasks(e,l,!0),a.renderLayer(a,a[o(1048)][o(1217)][e.source],e,l,n),e.source&&(r.rttCoords[e[o(1841)]]=this._coordsAscendingStr[e[o(1841)]][r[o(3533)][o(2133)]])}}return Oe(this[o(1258)],this[o(3245)],this._rttTiles,n),this._rttTiles=[],this[o(1245)].freeAllObjects(),fl[s]}return!1}}const _l=/^style_[A-Za-z0-9_]+$/,yl={"AttributionControl.ToggleAttribution":i(545),"AttributionControl.MapFeedback":i(3031),"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":i(3249),"GeolocateControl.LocationNotAvailable":i(1574),"LogoControl.Title":"Maptec logo","Map.Title":i(1941),"Marker.Title":"Map marker","NavigationControl.ResetBearing":i(502),"NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":i(2257),"Popup.Close":i(3236),"ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":i(2258),"GlobeControl.Disable":i(974),"TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":i(1132),"CooperativeGesturesHandler.WindowsHelpText":"Hold Ctrl and scroll wheel to zoom the map","CooperativeGesturesHandler.MacHelpText":i(3477),"CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},gl=i(890),vl=[2,2],xl=[2,2],bl=[i(1024),"dblclick","mousedown",i(817),i(1598),i(424),"mouseleave","mouseover","mouseout","contextmenu",i(2075),i(3684),"touchcancel"],wl=new Set([i(837),i(401),"GeometryCollection","Point","MultiPoint","LineString",i(689),i(2064),"MultiPolygon"]),Tl=t=>{const e=i;if(e(837)===t[e(2784)])return t;if("Feature"===t[e(2784)])return{type:"FeatureCollection",features:[t]};if("GeometryCollection"===t.type){const i=[];for(const r of t.geometries)i[e(2315)]({type:"Feature",properties:{},geometry:r});return{type:"FeatureCollection",features:i}}return{type:e(837),features:[{type:e(401),properties:{},geometry:t}]}},Sl=[i(1254),["==",[i(2827)],"Point"],["==",["geometry-type"],i(1094)]],Pl=[i(3401),Sl,[i(1254),[i(3401),["has","symbolIconImage"],["!=",[i(684),["get",i(3593)]],""]],[i(3401),["has",i(2791)],["!=",["to-string",["get",i(2791)]],""]]]],Il=[i(3401),Sl,["!",["any",["all",[i(2863),"symbolIconImage"],["!=",[i(684),["get",i(3593)]],""]],[i(3401),["has","symbolText"],["!=",["to-string",["get",i(2791)]],""]]]]],Cl=["all",Sl,[i(2863),i(3072)]],Ml=[i(1254),["==",["geometry-type"],i(3670)],["==",[i(2827)],i(689)]],Al=["any",["==",["geometry-type"],i(2064)],["==",["geometry-type"],i(2990)]],kl={symbolIconImage:"symbolIconImage",symbolText:"symbolText",heading:i(1652),iconSize:"iconSize",textSize:i(3566),iconOpacity:"iconOpacity",textColor:i(3326),textOpacity:i(3182),textHaloColor:"textHaloColor",textHaloWidth:"textHaloWidth",textHaloBlur:i(2440),textOffset:"textOffset",textRadialOffset:"textRadialOffset",textJustify:"textJustify",textAnchor:i(1497),circleRadius:"circleRadius",circleColor:i(914),circleOpacity:"circleOpacity",circleStrokeWidth:i(2592),circleStrokeColor:"circleStrokeColor",circleStrokeOpacity:i(682),strokeColor:i(1438),strokeOpacity:"strokeOpacity",strokeWeight:"strokeWeight",strokeDasharray:"strokeDasharray",fillColor:"fillColor",fillOpacity:i(3450)},El=new globalThis.Map;class zl extends e.E{constructor(t){const r=i;var o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C,M,A,k,E,z,D,L,O,R,F,j,B,V,N;if(super(),this._map=null,this[r(2378)]=[],this._visible=!0,this._circleStyleFieldSetExplicitlyByApi={},this._lineStyleFieldSetExplicitlyByApi={},this._polygonStyleFieldSetExplicitlyByApi={},this._symbolStyleFieldSetExplicitlyByApi={},this._hoverFeatureIdentifierSet=new Set,this._dataBeforeHoverStyleApplied=null,this[r(318)]=null,this[r(2456)]=t.id||r(1386)+e.ai(),!t.data)throw new Error(r(1490));if("object"!=typeof t.data||null===t[r(3100)])throw new Error(r(2550));if(!wl[r(2863)](t[r(3100)][r(2784)]))throw new Error(r(3385));this._data=Tl(t.data);const G=null!==(o=t[r(3641)])&&void 0!==o?o:{};this[r(3475)]={iconSize:null!==(n=G[r(2844)])&&void 0!==n?n:1,heading:null!==(s=G[r(1652)])&&void 0!==s?s:0,iconOpacity:null!==(a=G.iconOpacity)&&void 0!==a?a:1,iconAllowOverlap:null===(l=G.iconAllowOverlap)||void 0===l||l,iconIgnorePlacement:null!==(c=G[r(1139)])&&void 0!==c&&c,textOptional:null===(h=G.textOptional)||void 0===h||h,iconOptional:null===(u=G[r(2900)])||void 0===u||u,textSize:null!==(d=G.textSize)&&void 0!==d?d:12,textColor:null!==(p=G[r(3326)])&&void 0!==p?p:r(555),textOpacity:null!==(f=G.textOpacity)&&void 0!==f?f:1,textHaloColor:null!==(m=G.textHaloColor)&&void 0!==m?m:"#ffffff",textHaloWidth:null!==(_=G.textHaloWidth)&&void 0!==_?_:0,textHaloBlur:null!==(y=G.textHaloBlur)&&void 0!==y?y:0,textOffset:null!==(g=G[r(2510)])&&void 0!==g?g:[0,0],textAnchor:null!==(v=G[r(1497)])&&void 0!==v?v:"top",textVariableAnchor:Array.isArray(G[r(1279)])&&G[r(1279)][r(953)]>0?[...G[r(1279)]]:void 0,textRadialOffset:G[r(330)],textJustify:G[r(599)],textAllowOverlap:null===(x=G[r(1900)])||void 0===x||x,textIgnorePlacement:null!==(b=G.textIgnorePlacement)&&void 0!==b&&b};const U=null!==(w=t.circleStyle)&&void 0!==w?w:{},q=null!==(T=U.circleColor)&&void 0!==T?T:r(2633);this._circleStyle={circleRadius:null!==(S=U.circleRadius)&&void 0!==S?S:8,circleColor:q,circleOpacity:null!==(P=U.circleOpacity)&&void 0!==P?P:1,circleStrokeWidth:null!==(I=U[r(2592)])&&void 0!==I?I:0,circleStrokeColor:null!==(C=U[r(2811)])&&void 0!==C?C:gl},this._pointClusterOptions=function(t,e){const i=r;var o,n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C;return t?{enabled:null===(o=t[i(1235)])||void 0===o||o,clusterRadiusPixels:null!==(n=t[i(2697)])&&void 0!==n?n:e[i(2697)],clusterMaxZoom:null!==(s=t[i(2562)])&&void 0!==s?s:e[i(2562)],clusterMinPoints:null!==(a=t[i(1539)])&&void 0!==a?a:e[i(1539)],clusterFillColor:null!==(l=t[i(1802)])&&void 0!==l?l:e.clusterFillColor,clusterStrokeWidth:null!==(c=t.clusterStrokeWidth)&&void 0!==c?c:e[i(1988)],clusterStrokeColor:null!==(h=t[i(1771)])&&void 0!==h?h:e[i(1771)],showClusterPointCount:null!==(u=t.showClusterPointCount)&&void 0!==u?u:e.showClusterPointCount,clusterPointCountTextSize:null!==(d=t[i(3619)])&&void 0!==d?d:e.clusterPointCountTextSize,clusterPointCountTextColor:null!==(p=t.clusterPointCountTextColor)&&void 0!==p?p:e.clusterPointCountTextColor,clusterPointCountTextHaloColor:null!==(f=t[i(948)])&&void 0!==f?f:e.clusterPointCountTextHaloColor,clusterPointCountTextHaloWidth:null!==(m=t[i(2420)])&&void 0!==m?m:e[i(2420)],clusterPointCountTextOffset:null!==(_=t[i(1587)])&&void 0!==_?_:e[i(1587)],clusterPointCountTextAnchor:null!==(y=t[i(2860)])&&void 0!==y?y:e[i(2860)],clusterPointCountTextHaloBlur:null!==(g=t[i(2726)])&&void 0!==g?g:e[i(2726)],clusterPointCountTextOpacity:null!==(v=t.clusterPointCountTextOpacity)&&void 0!==v?v:e.clusterPointCountTextOpacity,clusterPointCountTextFont:null!==(x=t[i(2227)])&&void 0!==x?x:e.clusterPointCountTextFont,clusterPointCountTextAllowOverlap:null!==(b=t[i(1236)])&&void 0!==b?b:e[i(1236)],clusterPointCountTextIgnorePlacement:null!==(w=t.clusterPointCountTextIgnorePlacement)&&void 0!==w?w:e.clusterPointCountTextIgnorePlacement,clusterIconImage:null!==(T=t.clusterIconImage)&&void 0!==T?T:e[i(2901)],clusterIconSize:null!==(S=t.clusterIconSize)&&void 0!==S?S:e[i(2559)],clusterIconAllowOverlap:null!==(P=t.clusterIconAllowOverlap)&&void 0!==P?P:e[i(1420)],clusterIconIgnorePlacement:null!==(I=t[i(2804)])&&void 0!==I?I:e.clusterIconIgnorePlacement,clusterHideCircleForClusters:null!==(C=t.clusterHideCircleForClusters)&&void 0!==C?C:e.clusterHideCircleForClusters}:e}(t[r(505)],{enabled:!1,clusterRadiusPixels:50,clusterMinPoints:2,clusterFillColor:r(1534),clusterStrokeWidth:2,clusterStrokeColor:gl,showClusterPointCount:!0,clusterPointCountTextSize:12,clusterPointCountTextColor:"#ffffff",clusterPointCountTextHaloColor:gl,clusterPointCountTextHaloWidth:0,clusterPointCountTextOffset:[0,0],clusterPointCountTextAnchor:r(1972),clusterPointCountTextHaloBlur:0,clusterPointCountTextOpacity:1,clusterPointCountTextFont:[],clusterPointCountTextAllowOverlap:!1,clusterPointCountTextIgnorePlacement:!1,clusterIconImage:"",clusterIconSize:1,clusterIconAllowOverlap:!1,clusterIconIgnorePlacement:!1,clusterHideCircleForClusters:!1});const Z=null!==(M=t[r(2861)])&&void 0!==M?M:{};this[r(742)]={strokeColor:null!==(A=Z[r(1438)])&&void 0!==A?A:r(3553),strokeWeight:null!==(k=Z[r(425)])&&void 0!==k?k:4,strokeOpacity:null!==(E=Z.strokeOpacity)&&void 0!==E?E:1,strokeCap:null!==(z=Z[r(2551)])&&void 0!==z?z:"butt",strokeJoin:null!==(D=Z.strokeJoin)&&void 0!==D?D:"miter",strokeDasharray:null!==(L=Z[r(2036)])&&void 0!==L?L:vl,strokeGradient:ti(Z.strokeGradient)};const W=null!==(O=t[r(1205)])&&void 0!==O?O:{};this._polygonStyle={fillColor:null!==(R=W[r(3685)])&&void 0!==R?R:r(3115),fillOpacity:null!==(F=W.fillOpacity)&&void 0!==F?F:1,strokeColor:null!==(j=W[r(1438)])&&void 0!==j?j:"#2e7d32",strokeWeight:null!==(B=W[r(425)])&&void 0!==B?B:2,strokeOpacity:null!==(V=W[r(471)])&&void 0!==V?V:1,strokeDasharray:null!==(N=W[r(2036)])&&void 0!==N?N:xl},this[r(375)]=t.hoverStyle?ei(t[r(3219)]):null,this._sourceId=this._id+r(895),this._fillLayerId=this[r(2456)]+"-fill",this._polygonOutlineSolidLayerId=this._id+r(904),this._polygonOutlineDashedLayerId=this[r(2456)]+r(3239),this[r(311)]=this._id+r(3461),this._lineLayerDashedId=this[r(2456)]+"-line-string-dashed",this[r(999)]=this._id+r(2634),this._symbolLayerId=this[r(2456)]+"-symbol",this._clusterIconLayerId=this._id+"-cluster-icon",this._clusterCountLayerId=this[r(2456)]+r(2774)}on(t,e){return super.on(t,e)}off(t,e){return super.off(t,e)}once(t,e){return super[i(2143)](t,e)}[i(3163)](t){const e=i;return this[e(830)]=t,this[e(318)]=t=>{this[e(579)](t)},t.on("styleimagemissing",this._styleImageMissingHandler),this[e(2485)](),this[e(3608)](),this}[i(2435)](){const t=i;if(!this[t(830)])return this;this._detachMapLayerPointerForwarding(),this[t(318)]&&(this._map[t(1002)](t(2117),this[t(318)]),this[t(318)]=null);const e=[this[t(3324)],this._clusterCountLayerId,this[t(1471)],this._circleLayerId,this._lineLayerDashedId,this[t(311)],this._polygonOutlineDashedLayerId,this._polygonOutlineSolidLayerId,this._fillLayerId];for(const i of e)this._map[t(518)](i)&&this[t(830)][t(327)](i);return this._map[t(1321)](this._sourceId)&&this[t(830)].removeSource(this._sourceId),this[t(830)]=null,this}[i(579)](t){const o=this[i(830)];o&&oi(t.id)&&function(t,i){e._(this,void 0,void 0,(function*(){const o=r;if(t[o(2016)](i))return;if(!oi(i))return;let n=El.get(i);n||(n=(()=>e._(this,void 0,void 0,(function*(){const e=o;try{if(t.hasImage(i))return;const o=function(t){const e=r,i=t[e(2768)]();if(/^https?:\/\//i.test(i)||i[e(619)]("//")||i.startsWith("data:")||i.startsWith(e(2364))||i.startsWith("file:"))return t;if("undefined"!=typeof URL&&"undefined"!=typeof window&&window[e(3664)])try{return new URL(t,window.location.href)[e(745)]}catch(e){return t}return t}(i);if(function(t){const e=r;return t[e(2768)]()[e(1575)]()[e(619)](e(3157))||/\.svg(\?|#|$)/i.test(t)}(i)){let r;if(i[e(2768)]()[e(1575)]().startsWith(e(3157)))r=i;else{const t=yield fetch(o);if(!t.ok)throw new Error("SVG fetch failed: HTTP "+t.status);r="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(yield t[e(2800)]())}const n=new Image;yield new Promise(((t,i)=>{const o=e;n[o(1628)]=()=>{t()},n.onerror=()=>{i(new Error(o(2583)))},n[o(1861)]=r})),ni(n),si(t,i,n)}else{const r=yield t[e(1778)](o);ni(r),si(t,i,r)}}catch(t){}finally{El[e(2647)](i)}})))(),El[o(571)](i,n)),yield n}))}(o,t.id)}get id(){return this._id}_ensureClusterFeatureArgument(t){const e=i;if(null==t)throw new Error("The first argument must be a GeoJSON Feature.");if(e(2112)!=typeof t)throw new Error(e(1895));const r=t;if("Feature"!==r[e(2784)])throw new Error(e(2547));if(null==r.geometry)throw new Error("The first argument must be a GeoJSON Feature with a geometry.")}[i(1559)](t,e){const r=i;if(r(2534)!=typeof t||!Number[r(3588)](t))throw new Error(r(2271));if("number"!=typeof e||!Number.isFinite(e))throw new Error("leafOffset must be a finite number.");if(!Number[r(2669)](t)||t<0)throw new Error("leafLimit must be a non-negative integer.");if(!Number.isInteger(e)||e<0)throw new Error("leafOffset must be a non-negative integer.")}_getClusterIdentifierFromClusterFeature(t){const e=i;var r;const o=null===(r=t.properties)||void 0===r?void 0:r[e(1368)];if(null==o)return Promise[e(2135)](new Error("The feature is not a cluster: properties.cluster_id is missing."));const n=Number(o);return Number.isNaN(n)?Promise.reject(new Error(e(1118))):Promise[e(2849)](n)}[i(3036)](t){const e=i;try{this[e(1352)](t)}catch(t){return Promise[e(2135)](t)}return this[e(2576)](t)[e(2654)]((t=>{const i=e,r=this._getGeoJSONSourceOrNull();return r?this[i(2622)][i(1235)]?r.getClusterExpansionZoom(t):Promise.reject(new Error(i(2021))):Promise[i(2135)](new Error(i(2529)))}))}[i(369)](t,e,r){const o=i;try{this[o(1352)](t),this._ensureClusterLeavesLimitAndOffsetAreValid(e,r)}catch(t){return Promise.reject(t)}return this[o(2576)](t)[o(2654)]((t=>{const i=o,n=this._getGeoJSONSourceOrNull();return n?this[i(2622)].enabled?n[i(369)](t,e,r):Promise[i(2135)](new Error(i(2021))):Promise[i(2135)](new Error(i(2529)))}))}getClusterChildren(t){try{this._ensureClusterFeatureArgument(t)}catch(t){return Promise.reject(t)}return this._getClusterIdentifierFromClusterFeature(t).then((t=>{const e=r,i=this[e(3353)]();return i?this._pointClusterOptions.enabled?i.getClusterChildren(t):Promise.reject(new Error(e(2021))):Promise[e(2135)](new Error("GeoJSONOverlay is not attached to a map or source is missing."))}))}get[i(3100)](){return this._data}set data(t){const e=i;this._data=Tl(t),this._hoverFeatureIdentifierSet.clear(),this._dataBeforeHoverStyleApplied=null,this[e(439)](),this[e(2773)]()}get[i(3404)](){return this[i(3289)]}set visible(t){const e=i;this[e(3289)]!==t&&(this[e(3289)]=t,this._applyVisibilityToOverlayLayers())}setSymbolStyle(t){const e=i;for(const[i,r]of Object.entries(t))void 0!==r&&(this[e(3475)][i]=r,this[e(585)][i]=!0);return this._applySymbolStyleToSymbolLayer(),this}[i(504)](t){const e=i;for(const[i,r]of Object.entries(t))void 0!==r&&(this[e(1685)][i]=r,this[e(2334)][i]=!0);return this._applyCircleStyleToCircleLayer(),this}setClusterOptions(t){const e=i;return this._pointClusterOptions=function(t,e){const i=Object.assign({},e);for(const[e,r]of Object.entries(t))void 0!==r&&(i[e]=r);return i}(t,this[e(2622)]),this._applyClusterOptionsToGeoJSONSource(),this[e(2281)](),this[e(2496)](),this._applyClusterCountSymbolLayerStyle(),this}[i(3252)](t){const e=i,r=Object.assign({},t);void 0!==r[e(1545)]&&(r.strokeGradient=ti(r[e(1545)]));for(const[t,i]of Object.entries(r))void 0!==i&&(this[e(742)][t]=i,this._lineStyleFieldSetExplicitlyByApi[t]=!0);return this[e(1173)](),this._applyLineLayoutToLineLayers(),this}[i(1761)](t){const e=i;for(const[i,r]of Object.entries(t))void 0!==r&&(this[e(3577)][i]=r,this[e(1256)][i]=!0);return this[e(2101)](),this}setHoverStyle(t,e){const o=i,n=function(t){const e=r;return!(!t||e(2112)!=typeof t||Array[e(2667)](t))&&Object[e(2007)](t)[e(1096)]((t=>null!=t))}(t);if(n&&(this[o(375)]=ei(t)),void 0===e)return n?(this[o(375)]&&this[o(2813)].size>0&&this[o(3112)](),this):(this._hoverStyle=null,this[o(2813)][o(1499)](),this[o(463)](),this);const s=function(t){const e=new Set;for(const i of t)e.add(String(i));return e}(e);if(0===s[o(863)])return this;if(n)for(const t of s)this[o(2813)][o(2926)](t);else for(const t of s)this[o(2813)][o(2647)](t);return this._applyHoverStyleToFeatureCollection(),this}[i(3112)](){const t=i;this._hoverStyle&&0!==this._hoverFeatureIdentifierSet[t(863)]?(this[t(1591)]||(this._dataBeforeHoverStyleApplied=JSON[t(3578)](JSON[t(2796)](this[t(2026)]))),this._data=function(e,i,o){const n=t,s=e.features.map((t=>{const e=r;var n;return null==t.id?t:o[e(2863)](String(t.id))?Object[e(2132)](Object[e(2132)]({},t),{properties:Object[e(2132)](Object.assign({},null!==(n=t[e(1594)])&&void 0!==n?n:{}),i)}):t}));return Object[n(2132)](Object[n(2132)]({},e),{features:s})}(this._dataBeforeHoverStyleApplied,this._hoverStyle,this._hoverFeatureIdentifierSet),this[t(439)](),this._syncOverlayLayersToData()):this._restoreDataAfterHoverStyle()}_restoreDataAfterHoverStyle(){const t=i;this[t(1591)]&&(this._data=this[t(1591)],this[t(1591)]=null,this[t(439)](),this[t(2773)]())}[i(439)](){const t=i;if(!this[t(830)])return;const e=this[t(830)].getSource(this[t(3053)]);e&&"geojson"===e.type&&e[t(3063)](this[t(2026)])}_getGeoJSONSourceOrNull(){const t=i;if(!this[t(830)])return null;const e=this._map.getSource(this._sourceId);return e&&t(1830)===e.type?e:null}[i(326)](){const t=i,e=this[t(3353)]();if(!e)return;if(!this[t(2622)].enabled)return void e[t(3595)]({cluster:!1});const r=this._pointClusterOptions;e.setClusterOptions({cluster:!0,clusterRadius:r.clusterRadiusPixels,clusterMaxZoom:r.clusterMaxZoom})}[i(3319)](){const t=i;return this._pointClusterOptions[t(1235)]?[t(1254),[t(3401),Il,["!",[t(2863),"point_count"]]],Cl]:Il}_getPointSymbolLayerFilter(){const t=i;return this[t(2622)].enabled?["all",Pl,["!",[t(2863),t(3072)]]]:Pl}_removeClusterCountLayerIfPresent(){const t=i;var e;(null===(e=this._map)||void 0===e?void 0:e[t(518)](this._clusterCountLayerId))&&this._map.removeLayer(this[t(864)])}_applyPointLayerFiltersAndClusterCountLayer(){const t=i;if(!this._map)return;const e=Ye(this._data);if(this[t(830)].getLayer(this._circleLayerId)&&this[t(830)][t(1889)](this[t(999)],this._getPointCircleLayerFilter()),this._map.getLayer(this[t(3324)])&&this._map.setFilter(this._symbolLayerId,this._getPointSymbolLayerFilter()),e.hasPoint&&this[t(2622)].enabled&&this[t(2622)][t(2115)])if(this._map[t(518)](this._clusterCountLayerId))this[t(1973)]();else{const e=this._map.getLayer(this._symbolLayerId)?this._symbolLayerId:void 0;this[t(3225)](e)}else this[t(553)]();this._syncClusterIconLayer()}[i(2710)](){const t=i;if(this._map)return this[t(830)].getLayer(this._clusterCountLayerId)?this[t(864)]:this[t(830)].getLayer(this[t(3324)])?this._symbolLayerId:void 0}[i(3260)](){const t=i;var e;(null===(e=this[t(830)])||void 0===e?void 0:e[t(518)](this._clusterIconLayerId))&&this[t(830)][t(327)](this._clusterIconLayerId)}_clusterIconSymbolLayoutProperties(){const t=i,e=this._pointClusterOptions;return{"icon-image":[t(3474),e.clusterIconImage[t(2768)]()],"icon-size":e.clusterIconSize,"icon-rotate":0,"icon-rotation-alignment":"map","icon-pitch-alignment":"map","icon-allow-overlap":e[t(1420)],"icon-ignore-placement":e.clusterIconIgnorePlacement}}_clusterIconSymbolPaintProperties(){return{"icon-opacity":1}}_syncClusterIconLayer(){const t=i;if(!this._map)return;const e=Ye(this[t(2026)]),r=this[t(2622)][t(2901)][t(2768)]();if(!(e[t(3081)]&&this._pointClusterOptions.enabled&&r.length>0))return void this[t(3260)]();if(!this._map[t(518)](this._clusterIconLayerId))return void this[t(830)].addLayer({id:this[t(1471)],type:t(1078),source:this._sourceId,filter:Je(),layout:this._clusterIconSymbolLayoutProperties(),paint:this._clusterIconSymbolPaintProperties()},this[t(2710)]());const o=this._clusterIconSymbolLayoutProperties(),n=this[t(820)]();for(const[e,i]of Object.entries(o))this[t(830)].setLayoutProperty(this._clusterIconLayerId,e,i);for(const[e,i]of Object[t(1197)](n))this[t(830)].setPaintProperty(this[t(1471)],e,i)}[i(1662)](){const t=i,e=this._pointClusterOptions,r={"text-field":[t(684),["get",t(3072)]],"text-size":e.clusterPointCountTextSize,"text-anchor":e.clusterPointCountTextAnchor,"text-offset":e[t(1587)],"text-allow-overlap":e.clusterPointCountTextAllowOverlap,"text-ignore-placement":e.clusterPointCountTextIgnorePlacement};return e.clusterPointCountTextFont.length>0&&(r[t(1712)]=e[t(2227)]),r}_clusterCountSymbolPaintProperties(){const t=i,e=this[t(2622)];return{"text-color":e.clusterPointCountTextColor,"text-halo-color":e[t(2420)]>0||e[t(2726)]>0?e[t(948)]:e[t(2671)],"text-halo-width":e.clusterPointCountTextHaloWidth,"text-halo-blur":e[t(2726)],"text-opacity":e[t(3038)]}}[i(1973)](){const t=i;var e;if(!(null===(e=this._map)||void 0===e?void 0:e.getLayer(this._clusterCountLayerId)))return;const r=this._clusterCountSymbolLayoutProperties(),o=this._clusterCountSymbolPaintProperties();for(const[e,i]of Object.entries(r))this._map[t(1122)](this[t(864)],e,i);for(const[e,i]of Object[t(1197)](o))this._map[t(1449)](this[t(864)],e,i)}_addClusterCountLayer(t){const e=i;this[e(830)]&&!this[e(830)][e(518)](this._clusterCountLayerId)&&this[e(830)][e(1049)]({id:this._clusterCountLayerId,type:e(1078),source:this[e(3053)],filter:Je(),layout:this._clusterCountSymbolLayoutProperties(),paint:this._clusterCountSymbolPaintProperties()},t)}_overlayLayerIdsOrderedBottomToTop(){const t=i;return[this._fillLayerId,this._polygonOutlineSolidLayerId,this[t(2131)],this[t(311)],this._lineLayerDashedId,this[t(999)],this[t(1471)],this._clusterCountLayerId,this[t(3324)]]}[i(1567)](){const t=i;if(!this[t(830)])return;const e=this[t(3289)]?"visible":t(3322);for(const i of this._overlayLayerIdsOrderedBottomToTop())this[t(830)].getLayer(i)&&this._map.setLayoutProperty(i,"visibility",e)}_applySymbolStyleToSymbolLayer(){const t=i;var e;if(!(null===(e=this[t(830)])||void 0===e?void 0:e.getLayer(this._symbolLayerId)))return;const r=this._symbolLayoutProperties(),o=this[t(1117)]();for(const[e,i]of Object.entries(r))this._map[t(1122)](this._symbolLayerId,e,i);void 0===this[t(3475)].textRadialOffset&&this[t(830)].setLayoutProperty(this._symbolLayerId,t(2042),null),void 0===this._symbolStyle.textJustify&&this._map.setLayoutProperty(this._symbolLayerId,t(2722),null);const n=Array[t(2667)](this._symbolStyle.textVariableAnchor)&&this[t(3475)].textVariableAnchor[t(953)]>0;this._map[t(1122)](this._symbolLayerId,n?"text-anchor":t(2819),null);for(const[e,i]of Object.entries(o))this[t(830)][t(1449)](this[t(3324)],e,i)}_applyPaintToLayerIfPresent(t,e){const r=i;var o;if(null===(o=this._map)||void 0===o?void 0:o.getLayer(t))for(const[i,o]of Object.entries(e))this[r(830)].setPaintProperty(t,i,o)}[i(1967)](t,e){var r;if(null===(r=this._map)||void 0===r?void 0:r[i(518)](t))for(const[i,r]of Object.entries(e))this._map.setLayoutProperty(t,i,r)}[i(2496)](){this._applyPaintToLayerIfPresent(this._circleLayerId,this._circlePaintProperties())}[i(1173)](){const t=i;this[t(1558)](this[t(311)],this._linePaintPropertiesSolid()),this[t(1558)](this[t(1213)],this._linePaintPropertiesDashed())}[i(1458)](){const t=i;this._applyLayoutToLayerIfPresent(this[t(311)],this._lineLayoutProperties()),this[t(1967)](this._lineLayerDashedId,this._lineLayoutProperties())}[i(2101)](){const t=i;this._applyPaintToLayerIfPresent(this._fillLayerId,this[t(2462)]()),this._applyPaintToLayerIfPresent(this[t(705)],this[t(3378)]()),this._applyPaintToLayerIfPresent(this._polygonOutlineDashedLayerId,this._polygonOutlinePaintPropertiesDashed())}[i(2522)](){const t=i,e=kl,r=this._polygonStyle,o=this._polygonStyleFieldSetExplicitlyByApi;return{"line-color":ii(e.strokeColor,r[t(1438)],Boolean(o[t(1438)])),"line-opacity":ii(e.strokeOpacity,r.strokeOpacity,Boolean(o.strokeOpacity)),"line-width":ii(e.strokeWeight,r.strokeWeight,Boolean(o[t(425)]))}}[i(3378)](){return this[i(2522)]()}[i(3088)](){const t=i;var e;const r=kl,o=(null===(e=this._polygonStyle.strokeDasharray)||void 0===e?void 0:e[t(953)])?this[t(3577)][t(2036)]:xl;return Object.assign(Object[t(2132)]({},this._polygonOutlineStrokePaintProperties()),{"line-dasharray":ii(r.strokeDasharray,o,Boolean(this[t(1256)][t(2036)]))})}[i(1682)](){const t=i,e=kl,r=this[t(742)],o=this[t(2831)],n=void 0===r.strokeGradient?void 0:function(e){const i=t,r=[i(1874),[i(534)],[i(1958)]];for(const t of e)r.push(t[i(2651)],t.color);return r}(r.strokeGradient),s={"line-color":ii(e[t(1438)],r.strokeColor,Boolean(o[t(1438)])),"line-opacity":ii(e.strokeOpacity,r.strokeOpacity,Boolean(o[t(471)])),"line-width":ii(e.strokeWeight,r[t(425)],Boolean(o.strokeWeight))};return void 0!==n&&(s["line-gradient"]=n),s}_linePaintPropertiesSolid(){return this._lineStrokePaintProperties()}_lineLayoutProperties(){return{"line-cap":this._lineStyle.strokeCap,"line-join":this[i(742)].strokeJoin}}_linePaintPropertiesDashed(){const t=i;var e;const r=kl,o=(null===(e=this._lineStyle[t(2036)])||void 0===e?void 0:e.length)?this._lineStyle.strokeDasharray:vl;return void 0!==this[t(742)].strokeGradient?this[t(1682)]():Object[t(2132)](Object[t(2132)]({},this[t(1682)]()),{"line-dasharray":ii(r.strokeDasharray,o,Boolean(this._lineStyleFieldSetExplicitlyByApi[t(2036)]))})}_circlePaintProperties(){const t=i,e=kl,r=this._circleStyle,o=this[t(2334)];if(!this._pointClusterOptions[t(1235)])return{"circle-radius":ii(e.circleRadius,r[t(683)],Boolean(o[t(683)])),"circle-color":ii(e[t(914)],r.circleColor,Boolean(o[t(914)])),"circle-opacity":ii(e.circleOpacity,r[t(2245)],Boolean(o[t(2245)])),"circle-stroke-width":ii(e[t(2592)],r[t(2592)],Boolean(o.circleStrokeWidth)),"circle-stroke-color":ii(e.circleStrokeColor,r[t(2811)],Boolean(o[t(2811)])),"circle-stroke-opacity":Qe(e.circleStrokeOpacity,1)};const n=this[t(2622)],s=ii(e.circleOpacity,r[t(2245)],Boolean(o.circleOpacity)),a=Qe(e.circleStrokeOpacity,1),l=n[t(2933)]?["literal",0]:s,c=n.clusterHideCircleForClusters?[t(3474),0]:a;return{"circle-radius":[t(408),["has",t(3072)],[t(977),["get",t(3072)],18,100,24,750,32],ii(e.circleRadius,r[t(683)],Boolean(o[t(683)]))],"circle-color":[t(408),[t(2863),t(3072)],(h=n[t(1802)],Array.isArray(h)?h:[t(3474),h]),ii(e.circleColor,r.circleColor,Boolean(o[t(914)]))],"circle-opacity":["case",[t(2863),t(3072)],l,s],"circle-stroke-width":[t(408),["has","point_count"],[t(3474),n.clusterStrokeWidth],ii(e[t(2592)],r.circleStrokeWidth,Boolean(o[t(2592)]))],"circle-stroke-color":["case",[t(2863),t(3072)],["literal",n[t(1771)]],ii(e.circleStrokeColor,r[t(2811)],Boolean(o.circleStrokeColor))],"circle-stroke-opacity":["case",[t(2863),t(3072)],c,a]};var h}[i(2462)](){const t=i,e=kl,r=this._polygonStyle,o=this[t(1256)];return{"fill-color":ii(e.fillColor,r[t(3685)],Boolean(o.fillColor)),"fill-opacity":ii(e.fillOpacity,r[t(3450)],Boolean(o[t(3450)]))}}_symbolLayoutProperties(){const t=i,e=kl,r=this._symbolStyle,o=this._symbolStyleFieldSetExplicitlyByApi,n=Array[t(2667)](r[t(1279)])&&r[t(1279)].length>0,s={"icon-image":[t(3099),[t(1445),e[t(3593)]],[t(3474),""]],"text-field":["coalesce",["get",e[t(2791)]],["literal",""]],"icon-rotate":ri(e.heading,r.heading,Boolean(o[t(1652)])),"icon-rotation-alignment":t(1920),"icon-pitch-alignment":t(1920),"icon-size":ri(e.iconSize,r[t(2844)],Boolean(o.iconSize)),"text-size":ri(e.textSize,r.textSize,Boolean(o.textSize)),"icon-overlap":r[t(3084)]?"always":"never","text-overlap":r[t(1900)]?"always":t(899),"icon-allow-overlap":r.iconAllowOverlap,"icon-ignore-placement":r[t(1139)],"text-optional":r.textOptional,"icon-optional":r.iconOptional,"text-offset":ii(e.textOffset,r[t(2510)],Boolean(o.textOffset)),"text-allow-overlap":r[t(1900)],"text-ignore-placement":r.textIgnorePlacement};return n?s[t(2819)]=[...r.textVariableAnchor]:s["text-anchor"]=ii(e[t(1497)],r.textAnchor,Boolean(o.textAnchor)),void 0!==r.textRadialOffset&&(s["text-radial-offset"]=ri(e.textRadialOffset,r.textRadialOffset,Boolean(o[t(330)]))),void 0!==r.textJustify&&(s[t(2722)]=ii(e[t(599)],r[t(599)],Boolean(o[t(599)]))),s}_symbolPaintProperties(){const t=i,e=kl,r=this[t(3475)],o=this._symbolStyleFieldSetExplicitlyByApi;return{"icon-opacity":ii(e.iconOpacity,r.iconOpacity,Boolean(o.iconOpacity)),"text-color":ii(e[t(3326)],r.textColor,Boolean(o.textColor)),"text-opacity":ii(e.textOpacity,r[t(3182)],Boolean(o.textOpacity)),"text-halo-color":ii(e.textHaloColor,r[t(1157)],Boolean(o[t(1157)])),"text-halo-width":ii(e.textHaloWidth,r.textHaloWidth,Boolean(o[t(1161)])),"text-halo-blur":ii(e[t(2440)],r[t(2440)],Boolean(o[t(2440)]))}}_addFillLayer(t){const e=i;this[e(830)]&&!this[e(830)].getLayer(this[e(3632)])&&this._map[e(1049)]({id:this._fillLayerId,type:e(1082),source:this._sourceId,filter:Al,paint:this._fillPaintProperties()},t)}[i(3638)](t){const e=i;this[e(830)]&&!this._map.getLayer(this._polygonOutlineSolidLayerId)&&this._map[e(1049)]({id:this[e(705)],type:e(1097),source:this[e(3053)],filter:$e("solid"),paint:this._polygonOutlinePaintPropertiesSolid()},t)}_addPolygonOutlineDashedLayer(t){const e=i;this[e(830)]&&!this._map[e(518)](this[e(2131)])&&this._map[e(1049)]({id:this._polygonOutlineDashedLayerId,type:e(1097),source:this[e(3053)],filter:$e(e(2665)),paint:this[e(3088)]()},t)}[i(1278)](t){const e=i;this._map&&!this._map[e(518)](this[e(311)])&&this._map[e(1049)]({id:this._lineLayerSolidId,type:"line",source:this[e(3053)],filter:Ke(e(3643)),layout:this[e(2694)](),paint:this._linePaintPropertiesSolid()},t)}[i(1286)](t){const e=i;this[e(830)]&&!this._map[e(518)](this._lineLayerDashedId)&&this[e(830)][e(1049)]({id:this[e(1213)],type:"line",source:this[e(3053)],filter:Ke("dashed"),layout:this[e(2694)](),paint:this[e(650)]()},t)}[i(1807)](t){const e=i;this._map&&!this[e(830)][e(518)](this[e(999)])&&this._map.addLayer({id:this._circleLayerId,type:e(3217),source:this._sourceId,filter:this[e(3319)](),paint:this._circlePaintProperties()},t)}[i(2314)](t){const e=i;this[e(830)]&&!this._map.getLayer(this[e(3324)])&&this._map[e(1049)]({id:this[e(3324)],type:"symbol",source:this[e(3053)],filter:this._getPointSymbolLayerFilter(),layout:this._symbolLayoutProperties(),paint:this._symbolPaintProperties()},t)}[i(2773)](){const t=i;if(!this._map)return;const e=Ye(this[t(2026)]);if(e[t(2103)]||(this[t(830)][t(518)](this[t(705)])&&this[t(830)].removeLayer(this._polygonOutlineSolidLayerId),this[t(830)].getLayer(this[t(2131)])&&this._map[t(327)](this[t(2131)]),this[t(830)].getLayer(this[t(3632)])&&this._map.removeLayer(this[t(3632)])),e.hasLine||(this._map.getLayer(this[t(311)])&&this[t(830)].removeLayer(this[t(311)]),this._map[t(518)](this[t(1213)])&&this[t(830)][t(327)](this[t(1213)])),e.hasPoint||(this[t(830)].getLayer(this[t(3324)])&&this._map.removeLayer(this[t(3324)]),this._map[t(518)](this[t(864)])&&this[t(830)][t(327)](this[t(864)]),this[t(830)][t(518)](this._clusterIconLayerId)&&this[t(830)].removeLayer(this[t(1471)]),this._map[t(518)](this._circleLayerId)&&this._map.removeLayer(this[t(999)])),e.hasPolygon&&!this[t(830)][t(518)](this._fillLayerId)){const e=[this[t(3324)],this._circleLayerId,this._lineLayerDashedId,this._lineLayerSolidId].find((t=>this._map.getLayer(t)));this[t(1754)](e),this._addPolygonOutlineSolidLayer(e),this._addPolygonOutlineDashedLayer(e)}if(e.hasLine){let e;this[t(830)][t(518)](this._symbolLayerId)?e=this[t(3324)]:this._map[t(518)](this[t(999)])&&(e=this[t(999)]),this[t(830)].getLayer(this._lineLayerSolidId)||this[t(1278)](e),this._map[t(518)](this._lineLayerDashedId)||this[t(1286)](e)}if(e.hasPoint){if(!this._map.getLayer(this._circleLayerId)){const e=this[t(830)][t(518)](this[t(3324)])?this._symbolLayerId:void 0;this[t(1807)](e)}this._map[t(518)](this._symbolLayerId)||this._addSymbolLayer(),this[t(2281)]()}this._applyVisibilityToOverlayLayers()}[i(2485)](){const t=i;if(!this[t(830)])return;const e=this._pointClusterOptions,r={type:t(1830),data:this._data,lineMetrics:!0};e.enabled&&(r.cluster=!0,r[t(3363)]=e.clusterRadiusPixels,r.clusterMaxZoom=e.clusterMaxZoom,r.clusterMinPoints=e.clusterMinPoints),this._map[t(1387)](this._sourceId,r),this._syncOverlayLayersToData()}[i(3598)](){const t=i;return this._map?[this._symbolLayerId,this[t(864)],this._clusterIconLayerId,this[t(999)],this[t(1213)],this._lineLayerSolidId,this._polygonOutlineDashedLayerId,this._polygonOutlineSolidLayerId,this[t(3632)]].filter((e=>this._map[t(518)](e))):[]}_attachMapLayerPointerForwarding(){const t=i;if(!this._map)return;const e=this[t(3598)]();if(0!==e.length)for(const i of bl)this[t(2378)].push(this._map.on(i,e,(t=>this.fire(t))))}_detachMapLayerPointerForwarding(){const t=i;for(const e of this[t(2378)])e.unsubscribe();this._layerPointerSubscriptions=[]}}t[i(3542)]=void 0,(Ir=t[i(3542)]||(t.CircleOverlayType={})).Circle=i(3217),Ir.Wave="wave",Ir.RadarScan="radarScan";const Dl=["has","point_count"],Ll=new Set(["circle-radius",i(478),i(1618),"circle-stroke-color","circle-stroke-width",i(3551),"circle-overlay-body-radius",i(1369),i(2134)]),Ol=Math.PI/180,Rl=180/Math.PI,Fl=1e3,jl="#ffffff",Bl=[i(1024),"dblclick",i(1476),"mouseup",i(1598),"mouseenter",i(1894),"mouseover",i(3596),i(487),i(2075),i(3684),i(2579)];class Vl extends e.E{constructor(r={}){const o=i;var n,s,a,l,c,h,u,d,p,f,m,_,y,g,v,x,b;super(),this[o(830)]=null,this._resourceContext=null,this[o(2378)]=[],this[o(808)]=null,this._visible=!0,this[o(2785)]=!1,this._clusterRangeRadius=50,this._clusterFillColor="#1976d2",this._clusterRadiusPixels=18,this._clusterStrokeWidth=2,this[o(1710)]=o(890),this[o(1849)]=!0,this._clusterPointCountTextSize=12,this[o(1961)]=jl,this[o(2456)]=r.id||"circle-overlay-"+e.ai(),this[o(791)]=this[o(596)](null!==(n=r[o(1309)])&&void 0!==n?n:[]),this[o(404)]=null!==(s=r[o(3456)])&&void 0!==s?s:10,this._unit=null!==(a=r[o(2204)])&&void 0!==a?a:o(430),this[o(1441)]=null!==(l=r[o(3685)])&&void 0!==l?l:"#3FB1CE",this[o(777)]=null!==(c=r.fillOpacity)&&void 0!==c?c:1,this[o(1446)]=r.strokeColor,this[o(3196)]=r[o(471)],this[o(3023)]=r[o(700)],this._strokeDasharray=r[o(2036)],this[o(1939)]=null!==(h=r[o(2967)])&&void 0!==h&&h,this._innerShadowColor=r.innerShadowColor,this._innerShadowOpacity=r.innerShadowOpacity,this._innerShadowWidth=r[o(2728)],this[o(2750)]=null!==(u=r[o(1486)])&&void 0!==u&&u,this[o(1924)]=r.glowColor,this[o(3666)]=r[o(383)],this[o(2413)]=null!==(d=r.type)&&void 0!==d?d:t.CircleOverlayType.Circle,this[o(2688)]=ai(r[o(2468)]),this[o(1777)]=r[o(1576)],this[o(627)]=r.gradient,this[o(3662)]=64,this._enableCluster=null!==(p=r.enableCluster)&&void 0!==p&&p,this[o(2864)]=null!==(f=r.clusterRangeRadius)&&void 0!==f?f:50,this[o(2282)]=r.clusterMaxZoom,this._clusterFillColor=null!==(m=r.clusterFillColor)&&void 0!==m?m:"#1976d2",this[o(382)]=null!==(_=r.clusterRadiusPixels)&&void 0!==_?_:18,this._clusterStrokeWidth=null!==(y=r[o(1988)])&&void 0!==y?y:2,this._clusterStrokeColor=null!==(g=r[o(1771)])&&void 0!==g?g:o(890),this._showClusterPointCount=null===(v=r[o(2115)])||void 0===v||v,this[o(1394)]=null!==(x=r[o(3619)])&&void 0!==x?x:12,this[o(1961)]=null!==(b=r[o(2671)])&&void 0!==b?b:jl,this[o(3053)]=this._id+"-overlay-source",this[o(3632)]=this._id+o(3425),this[o(864)]=this._id+o(2774),this[o(2044)]=this._id+o(2555)}on(t,e){return super.on(t,e)}off(t,e){return super[i(1002)](t,e)}[i(2143)](t,e){return super.once(t,e)}_addTo(t,e){const r=i;if(!e)throw new Error(r(1004));return this[r(830)]=t,this._resourceContext=e,this._createManagedResources(),this[r(2324)](),this._updateVisibility(),this[r(3608)](),this._syncRadarAnimationLoop(),this}[i(2435)](){const t=i;return this[t(830)]?(this[t(1718)](),this[t(2516)](),this._removeManagedResources(),this[t(1398)]=null,this[t(830)]=null,this):this}_updateManagedVisibility(){this[i(580)]()}get id(){return this._id}get radius(){return this[i(404)]}set[i(3456)](t){const e=i;this._radius=t,this[e(2324)]()}get[i(2204)](){return this[i(3527)]}get[i(3685)](){return this._fillColor}set fillColor(t){const e=i;this[e(1441)]=t,this[e(1466)]()}get[i(3450)](){return this[i(777)]}set fillOpacity(t){const e=i;this[e(777)]=t,this[e(1466)]()}get[i(1438)](){return this[i(1446)]}set[i(1438)](t){this._strokeColor=t,this._applyPaint()}get[i(471)](){return this._strokeOpacity}set strokeOpacity(t){const e=i;this[e(3196)]=t,this[e(1466)]()}get[i(700)](){return this._strokeWidth}set strokeWidth(t){this[i(3023)]=t,this._applyPaint()}get[i(2036)](){return this._strokeDasharray}set strokeDasharray(t){const e=i;this._strokeDasharray=t,this[e(830)]&&(this._isPixelCircle()?console[e(2561)]("Pixel circles do not support stroke dasharray"):this[e(1466)]())}get innerShadow(){return this._innerShadow}set[i(2967)](t){const e=i;this[e(1939)]=t,this[e(1466)]()}get[i(2009)](){return this[i(2617)]}set innerShadowColor(t){const e=i;this[e(2617)]=t,this[e(1466)]()}get innerShadowOpacity(){return this._innerShadowOpacity}set[i(2922)](t){const e=i;this[e(1852)]=t,this[e(1466)]()}get[i(2728)](){return this._innerShadowWidth}set innerShadowWidth(t){this._innerShadowWidth=t,this._applyPaint()}get[i(1486)](){return this._outerGlow}set[i(1486)](t){const e=i;this._outerGlow=t,this[e(1466)]()}get glowColor(){return this[i(1924)]}set[i(622)](t){const e=i;this[e(1924)]=t,this[e(1466)]()}get[i(383)](){return this._glowRadius}set[i(383)](t){const e=i;this._glowRadius=t,this[e(1466)]()}get type(){return this._type}set[i(2784)](t){const e=i;this[e(2413)]=t,this._applyPaint(),this[e(1423)]()}get[i(2468)](){if(void 0!==this._effectDuration)return Fl/this[i(2688)]}set speed(t){this[i(2688)]=ai(t),this._applyPaint()}get[i(1576)](){return this[i(1777)]}set[i(1576)](t){const e=i;this._effectWaveCount=t,this[e(1466)]()}get[i(2648)](){return this[i(627)]}set[i(2648)](t){const e=i;this[e(627)]=t,this[e(1466)]()}get[i(3404)](){return this._visible}set[i(3404)](t){const e=i;this[e(3289)]!==t&&(this[e(3289)]=t,this[e(580)](),this._syncRadarAnimationLoop())}get[i(1309)](){return this._normalizeCenterItems(this[i(791)])}set[i(1309)](t){this._centers=this._normalizeCenterItems(t),this._syncGeoJSON()}[i(3296)](t){const e=i;return void 0!==t.centers&&(this[e(1309)]=t.centers),void 0!==t[e(3456)]&&(this[e(404)]=t[e(3456)]),void 0!==t.unit&&(this[e(3527)]=t[e(2204)]),void 0!==t.fillColor&&(this._fillColor=t.fillColor),void 0!==t[e(3450)]&&(this[e(777)]=t[e(3450)]),void 0!==t.strokeColor&&(this._strokeColor=t.strokeColor),void 0!==t[e(471)]&&(this._strokeOpacity=t.strokeOpacity),void 0!==t[e(700)]&&(this._strokeWidth=t.strokeWidth),void 0!==t[e(2036)]&&(this._strokeDasharray=t[e(2036)]),void 0!==t.innerShadow&&(this._innerShadow=t.innerShadow),void 0!==t.innerShadowColor&&(this[e(2617)]=t[e(2009)]),void 0!==t.innerShadowOpacity&&(this._innerShadowOpacity=t.innerShadowOpacity),void 0!==t[e(2728)]&&(this[e(445)]=t[e(2728)]),void 0!==t[e(1486)]&&(this._outerGlow=t[e(1486)]),void 0!==t.glowColor&&(this._glowColor=t[e(622)]),void 0!==t[e(383)]&&(this[e(3666)]=t.glowRadius),void 0!==t[e(2784)]&&(this[e(2413)]=t[e(2784)]),void 0!==t[e(2468)]&&(this._effectDuration=ai(t[e(2468)])),void 0!==t[e(1576)]&&(this._effectWaveCount=t.waveCount),void 0!==t[e(2648)]&&(this[e(627)]=t[e(2648)]),void 0!==t.enableCluster&&(this._enableCluster=t.enableCluster),void 0!==t[e(2759)]&&(this._clusterRangeRadius=t[e(2759)]),void 0!==t.clusterMaxZoom&&(this[e(2282)]=t.clusterMaxZoom),void 0!==t.clusterFillColor&&(this[e(1479)]=t[e(1802)]),void 0!==t.clusterRadiusPixels&&(this[e(382)]=t.clusterRadiusPixels),void 0!==t.clusterStrokeWidth&&(this._clusterStrokeWidth=t[e(1988)]),void 0!==t.clusterStrokeColor&&(this._clusterStrokeColor=t[e(1771)]),void 0!==t.showClusterPointCount&&(this[e(1849)]=t[e(2115)]),void 0!==t.clusterPointCountTextSize&&(this._clusterPointCountTextSize=t.clusterPointCountTextSize),void 0!==t.clusterPointCountTextColor&&(this[e(1961)]=t[e(2671)]),this[e(3199)](),this[e(2324)](),this[e(1423)](),this}[i(2123)](){const t=i;this._resourceContext&&(this._isPixelCircle()?this[t(2763)]():this[t(1015)]())}_createPixelCircleResources(){const t=i;this[t(1435)](this[t(2906)]()),this[t(1137)](),this._isClusteringActive()&&this._showClusterPointCount&&this._createClusterCountLayer()}_isClusteringActive(){const t=i;return this._isPixelCircle()&&this[t(2785)]}_createManagedGeoJSONSource(t){const e=i;if(!this[e(1398)]||this[e(1398)].hasSource(this._sourceId))return;const r={type:e(1830),data:t};this[e(1401)]()&&(r.cluster=!0,r.clusterRadius=this._clusterRangeRadius,r.clusterMaxZoom=this[e(2282)]),this[e(1398)][e(1387)](this._sourceId,r)}_syncClusterSourceOptions(){const t=i;if(!this[t(830)])return;const e=this._map[t(1321)](this[t(3053)]);if(!e||"geojson"!==e[t(2784)])return;const r=e;this._isClusteringActive()?r[t(3595)]({cluster:!0,clusterRadius:this._clusterRangeRadius,clusterMaxZoom:this[t(2282)]}):r[t(3595)]({cluster:!1})}_createSinglePixelCircleLayer(){const t=i;this._resourceContext&&!this._resourceContext.hasLayer(this[t(3632)])&&this._resourceContext.addLayer({id:this._fillLayerId,type:t(631),source:this._sourceId,paint:this._pixelCirclePaintProperties()})}_createClusterCountLayer(){const t=i;this[t(1398)]&&!this[t(1398)][t(2767)](this._clusterCountLayerId)&&this[t(1398)].addLayer({id:this[t(864)],type:t(1078),source:this._sourceId,filter:Dl,layout:this._clusterCountLayerLayout(),paint:this._clusterCountLayerPaint()})}[i(3295)](){const t=i;return{"text-field":["to-string",[t(1445),t(3072)]],"text-size":this._clusterPointCountTextSize,"text-anchor":t(1972)}}_clusterCountLayerPaint(){return{"text-color":this[i(1961)]}}_applyClusterCountLayerStyle(){const t=i;if(!this._resourceContext||!this[t(1398)][t(2767)](this[t(864)]))return;const e=this._clusterCountLayerLayout();for(const i in e)this._resourceContext.setLayoutProperty(this[t(864)],i,e[i],{validate:!1});const r=this[t(449)]();for(const e in r)this[t(1398)].setPaintProperty(this._clusterCountLayerId,e,r[e],{validate:!1})}[i(3036)](t){const e=i;var r;if(!this._isClusteringActive())return Promise[e(2135)](new Error(e(1824)));if(!this[e(830)])return Promise[e(2135)](new Error(e(3625)));const o=null===(r=t.properties)||void 0===r?void 0:r[e(1368)];if(null==o)return Promise[e(2135)](new Error("The feature is not a cluster."));const n=Number(o);if(Number[e(2721)](n))return Promise.reject(new Error(e(1705)));const s=this._map.getSource(this._sourceId);return s&&"geojson"===s.type?s.getClusterExpansionZoom(n):Promise[e(2135)](new Error("CircleOverlay source is missing."))}[i(1015)](){const t=i;this._createManagedGeoJSONSource(this[t(1859)]()),this._createGeoFillLayer(),this[t(2935)]()&&this[t(2150)]()}[i(3315)](){const t=i;this[t(1398)]&&!this._resourceContext.hasLayer(this[t(3632)])&&this[t(1398)][t(1049)]({id:this._fillLayerId,type:"polygon-overlay",source:this._sourceId,paint:{"fill-color":this[t(1441)],"fill-opacity":this._fillOpacity}})}_createGeoStrokeLineLayer(){const t=i;this[t(1398)]&&(this._resourceContext.hasLayer(this._strokeLayerId)||this[t(1398)][t(1049)]({id:this[t(2044)],type:"polyline-overlay",source:this._sourceId,layout:{"line-cap":t(3291),"line-join":"round"},paint:{}}),this._applyGeoStrokePaint())}_syncToMap(){this._resourceContext&&(this._applyPaint(),this._syncGeoJSON())}[i(2948)](){const t=i;this._resourceContext&&(this[t(2602)]()?this._resourceContext[t(1413)](this._sourceId,this[t(2906)]()):this._resourceContext.setSourceData(this._sourceId,this[t(1859)]()))}[i(1466)](){this._resourceContext&&(this._isPixelCircle()?this._applyPixelCirclePaint():(this._applyGeoFillPaint(),this._syncGeoStrokeLineLayer()))}[i(557)](){const t=i;this._resourceContext&&this._resourceContext.hasLayer(this[t(3632)])&&(this[t(609)](this._fillLayerId,this._pixelCirclePaintProperties()),this[t(3614)]())}[i(609)](t,e){const r=i;if(this._resourceContext)for(const i in e)this[r(1398)][r(1449)](t,i,e[i],{validate:!1})}_caseByCluster(t,e){const r=i;return[r(408),["has",r(3072)],e,t]}[i(1925)](){const t=i;if(!this[t(1401)]())return this._pointCirclePaintProperties();const e=this._pointCirclePaintProperties(),r=this[t(457)](),o={};for(const i in e)o[i]=Ll[t(2863)](i)?this[t(2286)](e[i],r[i]):e[i];return o}[i(457)](){const t=i;return{"circle-radius":(e=this._clusterRadiusPixels,[t(977),["get","point_count"],e,100,e+6,750,e+14]),"circle-color":this[t(1479)],"circle-opacity":1,"circle-pitch-alignment":"map","circle-stroke-color":this._clusterStrokeColor,"circle-stroke-width":this[t(3484)],"circle-stroke-opacity":1,"circle-overlay-body-radius":0,"circle-overlay-blur-color":"rgba(0, 0, 0, 0)","circle-overlay-in-shadow-width":0,"circle-overlay-in-shadow-color":t(827),"circle-overlay-in-shadow-opacity":0,"circle-radar-enabled":0,"circle-radar-type":0,"circle-radar-color":this._clusterFillColor,"circle-radar-opacity":0,"circle-radar-radius":0,"circle-radar-width":0,"circle-radar-duration":1e3,"circle-radar-wave-count":1,"circle-radar-gradient":0};var e}[i(2326)](){const e=i;var r,o,n,s,a,l,c,h,u,d,p;const f=null!==(r=this._strokeWidth)&&void 0!==r?r:0,m=this._outerGlow&&0!==this._glowRadius,_=m?null!==(o=this[e(3666)])&&void 0!==o?o:10:0,y=m?this._radius+f+_:this[e(404)],g=m?this._radius:0,v=m?null!==(n=this._glowColor)&&void 0!==n?n:"#ffffff":e(542),x=this._innerShadow&&null!==(s=this._innerShadowWidth)&&void 0!==s?s:0,b=this[e(1939)]&&null!==(a=this[e(2617)])&&void 0!==a?a:"#000000",w=this._innerShadow?null!==(l=this[e(1852)])&&void 0!==l?l:.35:0,T=this._type!==t.CircleOverlayType.Circle,S=T?this[e(404)]:0,P=null!==(c=this._effectWaveCount)&&void 0!==c?c:3,I=Math.max(this[e(404)]/Math[e(2153)](8*P,1),2),C=f>0?null!==(h=this._strokeOpacity)&&void 0!==h?h:1:0;return{"circle-radius":y,"circle-color":this._fillColor,"circle-opacity":T?0:this[e(777)],"circle-pitch-alignment":e(1920),"circle-stroke-color":null!==(u=this[e(1446)])&&void 0!==u?u:e(827),"circle-stroke-opacity":C,"circle-stroke-width":f,"circle-overlay-body-radius":g,"circle-overlay-blur-color":v,"circle-overlay-in-shadow-width":x,"circle-overlay-in-shadow-color":b,"circle-overlay-in-shadow-opacity":w,"circle-radar-enabled":T?1:0,"circle-radar-type":this._type===t.CircleOverlayType.RadarScan?2:1,"circle-radar-color":this._fillColor,"circle-radar-opacity":T?this[e(777)]:0,"circle-radar-radius":S,"circle-radar-width":I,"circle-radar-duration":null!==(d=this[e(2688)])&&void 0!==d?d:1e3,"circle-radar-wave-count":P,"circle-radar-gradient":null!==(p=this[e(627)])&&void 0!==p?p:.5}}[i(2058)](){const t=i;this[t(1398)]&&this._resourceContext[t(2767)](this._fillLayerId)&&(this._resourceContext.setPaintProperty(this._fillLayerId,t(2645),this._fillColor),this._resourceContext[t(1449)](this[t(3632)],"fill-opacity",this._fillOpacity))}_applyGeoStrokePaint(){const t=i;var e,r,o;this._resourceContext&&this[t(1398)][t(2767)](this[t(2044)])&&(this[t(1398)].setPaintProperty(this[t(2044)],"line-color",null!==(e=this._strokeColor)&&void 0!==e?e:null),this._resourceContext[t(1449)](this[t(2044)],t(712),null!==(r=this[t(3196)])&&void 0!==r?r:null),this[t(1398)].setPaintProperty(this._strokeLayerId,"line-width",null!==(o=this[t(3023)])&&void 0!==o?o:null),this[t(1398)].setPaintProperty(this[t(2044)],t(1195),this[t(2337)]&&this[t(2337)][t(953)]>0?this[t(2337)]:null))}_syncGeoStrokeLineLayer(){const t=i;if(!this[t(1398)]||this[t(2602)]())return;const e=this[t(3371)](),r=this[t(2935)]();return r&&!e?(this[t(2150)](),this._updateVisibility(),void this._refreshLayerPointerForwarding()):!r&&e?(this._resourceContext[t(327)](this._strokeLayerId),void this._refreshLayerPointerForwarding()):void(r&&e&&this[t(2201)]())}_removeManagedResources(){const t=i;var e;null===(e=this[t(1398)])||void 0===e||e[t(1227)]()}[i(580)](){const t=i;if(!this[t(1398)])return;const e=this._visible&&this._resourceContext[t(3404)]?"visible":t(3322);this[t(1398)].hasLayer(this[t(3632)])&&this._resourceContext[t(1122)](this._fillLayerId,t(581),e,{validate:!1}),this._resourceContext.hasLayer(this._strokeLayerId)&&this._resourceContext.setLayoutProperty(this._strokeLayerId,t(581),e,{validate:!1}),this._resourceContext[t(2767)](this[t(864)])&&this[t(1398)].setLayoutProperty(this[t(864)],t(581),e,{validate:!1})}[i(2602)](){return"pixels"===this._unit}[i(2906)](){return{type:"FeatureCollection",features:this._centers[i(1920)](((t,e)=>this._createPointFeature(t,e)))}}_createPointFeature(t,e){const r=i;return{type:r(401),id:e,properties:this[r(1735)](e),geometry:{type:"Point",coordinates:this[r(1808)](t)}}}[i(1859)](){const t=i;return{type:t(837),features:this[t(791)][t(1920)](((e,i)=>this[t(2365)](e,i)))}}_createCircleFeature(t,e){const r=i,o=this[r(1808)](t),n=[];for(let t=0;t<=this._steps;t++)n[r(2315)](this._destination(o,this[r(404)],360*t/this._steps));return{type:r(401),id:e,properties:this._propertiesForDataItem(e),geometry:{type:r(2064),coordinates:[n]}}}_propertiesForDataItem(t){return{circleOverlayItemIndex:t}}_convertToCoordinates(t){const i=e.X.convert(t);return[i.longitude,i.latitude]}_destination(t,e,r){const o=i,n=e/6371008.8,s=t[0]%360*Ol,a=t[1]%360*Ol,l=r%360*Ol,c=Math[o(2574)](Math[o(1741)](a)*Math.cos(n)+Math.cos(a)*Math[o(1741)](n)*Math[o(3602)](l));return[(s+Math[o(2275)](Math.sin(l)*Math[o(1741)](n)*Math.cos(a),Math.cos(n)-Math[o(1741)](a)*Math[o(1741)](c)))%(2*Math.PI)*Rl,c%(2*Math.PI)*Rl]}_syncRadarAnimationLoop(){const e=i;this[e(830)]&&this._isPixelCircle()&&this[e(3289)]&&this._type!==t[e(3542)][e(2158)]?this._startRadarAnimationLoop():this._stopRadarAnimationLoop()}_startRadarAnimationLoop(){const e=i;if(null!==this[e(808)]||"undefined"==typeof requestAnimationFrame)return;const r=()=>{const i=e;this[i(808)]=null,this[i(830)]&&this[i(2602)]()&&this._visible&&this._type!==t.CircleOverlayType.Circle&&(this._map[i(1106)](),this._radarAnimationFrameId=requestAnimationFrame(r))};this._radarAnimationFrameId=requestAnimationFrame(r)}[i(1718)](){null!==this._radarAnimationFrameId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this[i(808)]),this._radarAnimationFrameId=null)}[i(3371)](){const t=i;return!(!this[t(1398)]||!this[t(1398)][t(2767)](this._strokeLayerId))}[i(2935)](){const t=i;return void 0!==this[t(1446)]||void 0!==this[t(3196)]||void 0!==this._strokeWidth||Array[t(2667)](this._strokeDasharray)&&this[t(2337)][t(953)]>0}[i(1443)](){const t=i;var e;if(this[t(2602)]()){const i=[this._fillLayerId];return(null===(e=this._resourceContext)||void 0===e?void 0:e[t(2767)](this[t(864)]))&&i.push(this[t(864)]),i}const r=[this._fillLayerId];return this._hasGeoStrokeLayer()&&r[t(2315)](this[t(2044)]),r}[i(3051)](){return this._interactionLayerIds()}_refreshLayerPointerForwarding(){this._detachMapLayerPointerForwarding(),this._attachMapLayerPointerForwarding()}[i(3608)](){const t=i;if(!this[t(830)])return;const e=this._interactionLayerIds();for(const i of Bl)this._layerPointerSubscriptions[t(2315)](this[t(830)].on(i,e,(e=>this[t(1430)](e))))}[i(2516)](){const t=i;for(const e of this[t(2378)])e.unsubscribe();this[t(2378)]=[]}[i(596)](t){const r=i;return t[r(1920)]((t=>e.X[r(1029)](t)))}}class Nl{constructor(t={}){this._implementation=new Vl(t)}on(t,e){return this._implementation.on(t,e)}off(t,e){return this[i(1788)].off(t,e),this}once(t,e){const r=i;return void 0===e?this[r(1788)].once(t):(this[r(1788)][r(2143)](t,e),this)}[i(3163)](t,e){return this._implementation[i(3163)](t,e),this}[i(2435)](){return this._implementation[i(2435)](),this}[i(1046)](){this[i(1788)]._updateManagedVisibility()}get id(){return this[i(1788)].id}get[i(1309)](){return this[i(1788)].centers}set centers(t){this._implementation.centers=t}get[i(3456)](){return this._implementation[i(3456)]}set[i(3456)](t){this._implementation[i(3456)]=t}get[i(2204)](){return this[i(1788)].unit}get fillColor(){return this._implementation.fillColor}set fillColor(t){this[i(1788)].fillColor=t}get[i(3450)](){return this._implementation.fillOpacity}set[i(3450)](t){this._implementation.fillOpacity=t}get[i(1438)](){const t=i;return this[t(1788)][t(1438)]}set[i(1438)](t){this[i(1788)].strokeColor=t}get strokeOpacity(){return this._implementation.strokeOpacity}set strokeOpacity(t){this._implementation.strokeOpacity=t}get[i(700)](){return this._implementation.strokeWidth}set strokeWidth(t){const e=i;this[e(1788)][e(700)]=t}get[i(2036)](){const t=i;return this[t(1788)][t(2036)]}set strokeDasharray(t){this._implementation.strokeDasharray=t}get[i(2967)](){return this[i(1788)].innerShadow}set innerShadow(t){this[i(1788)].innerShadow=t}get[i(2009)](){return this[i(1788)].innerShadowColor}set innerShadowColor(t){this._implementation.innerShadowColor=t}get[i(2922)](){const t=i;return this[t(1788)][t(2922)]}set innerShadowOpacity(t){this[i(1788)].innerShadowOpacity=t}get[i(2728)](){const t=i;return this[t(1788)][t(2728)]}set[i(2728)](t){this._implementation.innerShadowWidth=t}get[i(1486)](){return this._implementation[i(1486)]}set[i(1486)](t){this._implementation[i(1486)]=t}get[i(622)](){return this[i(1788)].glowColor}set glowColor(t){this._implementation[i(622)]=t}get glowRadius(){return this._implementation[i(383)]}set[i(383)](t){this._implementation[i(383)]=t}get type(){return this._implementation.type}set[i(2784)](t){this._implementation.type=t}get[i(2468)](){const t=i;return this[t(1788)][t(2468)]}set speed(t){this[i(1788)].speed=t}get waveCount(){return this._implementation.waveCount}set waveCount(t){const e=i;this[e(1788)][e(1576)]=t}get gradient(){const t=i;return this[t(1788)][t(2648)]}set gradient(t){this._implementation[i(2648)]=t}get[i(3404)](){return this._implementation[i(3404)]}set[i(3404)](t){const e=i;this[e(1788)][e(3404)]=t}setOptions(t){return this[i(1788)].setOptions(t),this}getClusterExpansionZoom(t){return this._implementation[i(3036)](t)}[i(3051)](){const t=i;return this[t(1788)][t(3051)]()}_getBounds(){const t=i;if(t(2534)!=typeof this.radius||Number[t(2721)](this[t(3456)]))throw new Error("Map.flyTo: CircleOverlay 的 radius 必须是有效数字。");if("pixels"===this[t(2204)])throw new Error(t(1290));const r=new io;for(const i of this.centers)r[t(875)](io.fromLngLat(e.X[t(1029)](i),this[t(3456)]));return r}}const Gl=["click","dblclick","mousedown","mouseup",i(1598),"mouseenter",i(1894),"mouseover",i(3596),"contextmenu","touchstart","touchend",i(2579)];class Ul extends e.E{constructor(t){const r=i;var o,n,s,a,l,c,h,u,d;super(),this._map=null,this._layerPointerSubscriptions=[],this._ownsDirectionImage=!1,this._directionImageCustom=!1,this._visible=!0,this[r(2456)]=t.id||"polyline-overlay-"+e.ai(),this[r(753)]=t.positions,this[r(1446)]=null!==(o=t.strokeColor)&&void 0!==o?o:"#3FB1CE",this._strokeWeight=null!==(n=t.strokeWeight)&&void 0!==n?n:2,this[r(3196)]=null!==(s=t.strokeOpacity)&&void 0!==s?s:1,this[r(2337)]=t.strokeDasharray,this[r(592)]=li(t.strokeGradient),this[r(2923)]=null!==(a=t.strokeCap)&&void 0!==a?a:"butt",this[r(1462)]=null!==(l=t[r(3146)])&&void 0!==l?l:"miter",this._showDirection=null!==(c=t[r(3041)])&&void 0!==c&&c,this[r(2065)]=null!==(h=t.directionColor)&&void 0!==h?h:r(2176),this._directionImage=t.directionImage,this._directionImageGap=null!==(u=t.directionImageGap)&&void 0!==u?u:1,this._depthTest=null===(d=t[r(1621)])||void 0===d||d,this._featureProperties=t[r(1594)]?Object[r(2132)]({},t[r(1594)]):{},this._sourceId=this._id+"-source",this[r(2379)]=this._id+"-polyline-overlay"}on(t,e){return super.on(t,e)}off(t,e){return super.off(t,e)}[i(2143)](t,e){return super[i(2143)](t,e)}_addTo(t){const e=i;return this[e(830)]=t,this[e(2485)](),this._attachMapLayerPointerForwarding(),this}_remove(){const t=i;return this[t(830)]?(this._detachMapLayerPointerForwarding(),this._map.getLayer(this._lineLayerId)&&this[t(830)][t(327)](this._lineLayerId),this._map.getSource(this._sourceId)&&this[t(830)].removeSource(this._sourceId),this._removeOwnedDirectionImage(),this._map=null,this):this}get id(){return this._id}get[i(1536)](){return this[i(753)]}set positions(t){this._positions=t,this._updatePolyline()}[i(3131)](){const t=i,e=new io;for(const i of this._positions)e[t(875)](i);return e}get strokeColor(){return this[i(1446)]}set[i(1438)](t){const e=i;this[e(1446)]=t,this._updatePaintProperty(this._lineLayerId,e(2959),t)}get strokeWeight(){return this[i(1303)]}set strokeWeight(t){const e=i;this._strokeWeight=t,this[e(805)](this._lineLayerId,"line-width",t)}get strokeOpacity(){return this._strokeOpacity}set strokeOpacity(t){const e=i;this[e(3196)]=t,this._updatePaintProperty(this[e(2379)],"line-opacity",t)}get[i(2036)](){return this[i(2337)]}set[i(2036)](t){const e=i;this._strokeDasharray=t,this[e(805)](this._lineLayerId,e(1195),void 0===this._strokeGradient?t:void 0)}get[i(1545)](){return this[i(592)]}set[i(1545)](t){const e=i;this._strokeGradient=li(t);const r=void 0===this._strokeGradient?void 0:ci(this[e(592)]);this._updatePaintProperty(this[e(2379)],"line-gradient",r),this[e(805)](this[e(2379)],"line-dasharray",void 0===this[e(592)]?this._strokeDasharray:void 0)}get[i(2551)](){return this[i(2923)]}set[i(2551)](t){const e=i;this._strokeCap=t,this[e(397)](this._lineLayerId,e(3375),t)}get[i(3146)](){return this[i(1462)]}set strokeJoin(t){const e=i;this[e(1462)]=t,this[e(397)](this[e(2379)],"line-join",t)}get showDirection(){return this[i(2530)]}set[i(3041)](t){this[i(2530)]!==t&&(this._showDirection=t,this._applyDirectionPaintProperties())}get[i(1954)](){return this[i(2065)]}set directionColor(t){const e=i;this._directionColor=t,this._updatePaintProperty(this._lineLayerId,e(3008),t)}get directionImage(){return this._directionImage}set[i(1614)](t){this[i(2893)]=t,this._applyDirectionPaintProperties()}get[i(588)](){return this[i(1252)]}set[i(588)](t){const e=i;this._directionImageGap=t,this._updatePaintProperty(this._lineLayerId,e(2145),t)}get depthTest(){return this._depthTest}set[i(1621)](t){const e=i;this._depthTest!==t&&(this[e(1739)]=t,this._updatePaintProperty(this[e(2379)],e(3480),t))}get[i(3404)](){return this._visible}set[i(3404)](t){const e=i;this[e(3289)]!==t&&(this[e(3289)]=t,this._updateVisibility())}[i(3296)](t){const e=i;return void 0!==t[e(1536)]&&(this[e(1536)]=t.positions),void 0!==t[e(1438)]&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWeight&&(this.strokeWeight=t.strokeWeight),void 0!==t[e(471)]&&(this.strokeOpacity=t[e(471)]),void 0!==t.strokeDasharray&&(this[e(2036)]=t[e(2036)]),void 0!==t.strokeCap&&(this[e(2551)]=t[e(2551)]),void 0!==t[e(3146)]&&(this.strokeJoin=t.strokeJoin),void 0!==t[e(1545)]&&(this.strokeGradient=t.strokeGradient),void 0!==t.showDirection&&(this[e(3041)]=t[e(3041)]),void 0!==t.directionColor&&(this[e(1954)]=t.directionColor),void 0!==t.directionImage&&(this.directionImage=t.directionImage),void 0!==t.directionImageGap&&(this[e(588)]=t[e(588)]),void 0!==t[e(1594)]&&(this[e(2043)]=Object.assign({},t[e(1594)]),this[e(784)]()),this}_updateVisibility(){const t=i;if(!this._map)return;const e=this[t(3289)]?t(3404):"none";this[t(830)][t(518)](this._lineLayerId)&&this._map[t(1122)](this._lineLayerId,t(581),e)}[i(1808)](){const t=i;return this._positions[t(1920)]((e=>Array[t(2667)](e)?[e[0],e[1]]:"longitude"in e&&t(2329)in e?[e.longitude,e[t(2329)]]:[0,0]))}[i(3332)](){const t=i,e=this._convertToCoordinates();return{type:"Feature",properties:Object[t(2132)]({},this[t(2043)]),geometry:{type:t(3670),coordinates:e}}}_addLayers(){const t=i;if(!this[t(830)])return;const e=this[t(3332)]();this._map[t(1387)](this._sourceId,{type:"geojson",data:e,lineMetrics:!0});const r=this[t(519)](),o={"line-color":this[t(1446)],"line-opacity":this[t(3196)],"line-width":this._strokeWeight,"line-direction-color":this._directionColor,"line-direction-opacity":this._showDirection&&r?1:0,"line-direction-gap":this[t(1252)],"line-direction-custom-image":this._directionImageCustom?1:0,"line-depth-test":this[t(1739)]};r&&(o[t(1457)]=r),this[t(592)]?o["line-gradient"]=ci(this._strokeGradient):this._strokeDasharray&&(o[t(1195)]=this._strokeDasharray),this._map.addLayer({id:this._lineLayerId,type:"polyline-overlay",source:this._sourceId,layout:{"line-cap":this[t(2923)],"line-join":this._strokeJoin},paint:o})}_updatePolyline(){const t=i;if(!this[t(830)])return;const e=this._map[t(1321)](this._sourceId);if(!e||t(1830)!==e.type)return;const r=this[t(3332)]();e[t(3063)](r)}[i(805)](t,e,r){const o=i;this._map&&this._map[o(518)](t)&&this[o(830)].setPaintProperty(t,e,r)}[i(397)](t,e,r){const o=i;this[o(830)]&&this[o(830)][o(518)](t)&&this[o(830)][o(1122)](t,e,r)}_applyDirectionPaintProperties(){const t=i;if(!this._map||!this[t(830)][t(518)](this._lineLayerId))return;const e=!!this._directionImageId,r=this[t(519)]();r&&this._updatePaintProperty(this._lineLayerId,t(1457),r),this._updatePaintProperty(this[t(2379)],"line-direction-color",this[t(2065)]),this[t(805)](this._lineLayerId,"line-direction-opacity",this._showDirection&&r?1:0),this[t(805)](this[t(2379)],"line-direction-gap",this[t(1252)]),this[t(805)](this[t(2379)],t(1062),this._directionImageCustom?1:0),this._showDirection&&r&&!e&&this[t(784)]()}_ensureDirectionImage(){const t=i;var e;if(!this._map||!this._showDirection)return this._directionImageId;if(t(629)==typeof this._directionImage)return this[t(1943)](),this._directionImageId=this[t(2893)],this[t(2148)]=!0,this._directionImageId;const r=null!==(e=function(e){const i=t;if(e&&i(629)!=typeof e){if(e instanceof HTMLCanvasElement){const t=e.getContext("2d");if(!t)return;return t.getImageData(0,0,e.width,e[i(3282)])}return e}}(this._directionImage))&&void 0!==e?e:function(){const e=t,i=document[e(2737)](e(1174));i[e(1422)]=64,i[e(3282)]=64;const r=i[e(582)]("2d");return r?(r.fillStyle=e(2176),r[e(531)](),r.moveTo(8,56),r[e(1928)](32,36),r.lineTo(58,56),r.lineTo(58,36),r.lineTo(32,14),r[e(1928)](8,36),r.fill(),r[e(1698)](0,0,64,64)):new ImageData(new Uint8ClampedArray(16384),64,64)}(),o=this._id+t(3473);return this._removeOwnedDirectionImage(o),this._map.addImage(o,r),this[t(1455)]=o,this[t(2179)]=!0,this[t(2148)]=void 0!==this._directionImage,this[t(1455)]}[i(1943)](t){const e=i;if(this._map&&this[e(2179)]&&this[e(1455)]){if(this[e(1455)]===t)return this[e(830)].hasImage(this._directionImageId)&&this[e(830)].removeImage(this._directionImageId),void(this._ownsDirectionImage=!1);this._map.hasImage(this._directionImageId)&&this[e(830)].removeImage(this._directionImageId),this._ownsDirectionImage=!1}}[i(1443)](){return[this._lineLayerId]}[i(3608)](){const t=i;if(!this._map)return;const e=this._interactionLayerIds();for(const i of Gl)this._layerPointerSubscriptions[t(2315)](this[t(830)].on(i,e,(e=>this[t(1430)](e))))}[i(2516)](){const t=i;for(const e of this[t(2378)])e.unsubscribe();this._layerPointerSubscriptions=[]}}const ql=[i(1024),"dblclick","mousedown",i(817),"mousemove",i(424),"mouseleave","mouseover","mouseout","contextmenu","touchstart",i(3684),i(2579)];class Zl extends e.E{constructor(t){const r=i;var o,n,s,a,l;super(),this[r(830)]=null,this[r(2378)]=[],this._visible=!0,this._id=t.id||r(607)+e.ai(),this._positions=t[r(1536)],this[r(1441)]=null!==(o=t[r(3685)])&&void 0!==o?o:"#3FB1CE",this._fillOpacity=null!==(n=t.fillOpacity)&&void 0!==n?n:.5,this._strokeColor=null!==(s=t[r(1438)])&&void 0!==s?s:"#3FB1CE",this[r(1303)]=null!==(a=t.strokeWeight)&&void 0!==a?a:2,this._strokeOpacity=null!==(l=t[r(471)])&&void 0!==l?l:1,this[r(2337)]=t[r(2036)],this[r(2043)]=t[r(1594)]?Object[r(2132)]({},t.properties):{},this[r(3053)]=this[r(2456)]+"-source",this._fillLayerId=this[r(2456)]+"-polygon-overlay-fill",this._strokeLayerId=this._id+r(2682)}on(t,e){return super.on(t,e)}off(t,e){return super[i(1002)](t,e)}once(t,e){return super[i(2143)](t,e)}_addTo(t){const e=i;return this[e(830)]=t,this._addLayers(),this[e(3608)](),this}[i(2435)](){const t=i;return this[t(830)]?(this[t(2516)](),this._map.getLayer(this._fillLayerId)&&this._map.removeLayer(this._fillLayerId),this[t(830)][t(518)](this[t(2044)])&&this._map.removeLayer(this._strokeLayerId),this._map.getSource(this._sourceId)&&this._map.removeSource(this[t(3053)]),this._map=null,this):this}get id(){return this[i(2456)]}get[i(1536)](){return this[i(753)]}set positions(t){this._positions=t,this._updatePolygon()}get fillColor(){return this[i(1441)]}set fillColor(t){const e=i;this[e(1441)]=t,this[e(805)](this[e(3632)],"fill-color",t)}get[i(3450)](){return this[i(777)]}set fillOpacity(t){const e=i;this._fillOpacity=t,this._updatePaintProperty(this[e(3632)],"fill-opacity",t)}get strokeColor(){return this._strokeColor}set[i(1438)](t){this._strokeColor=t,this._updatePaintProperty(this._strokeLayerId,"line-color",t)}get strokeWeight(){return this[i(1303)]}set strokeWeight(t){const e=i;this._strokeWeight=t,this._updatePaintProperty(this[e(2044)],e(2766),t)}get strokeOpacity(){return this._strokeOpacity}set[i(471)](t){const e=i;this._strokeOpacity=t,this._updatePaintProperty(this[e(2044)],e(712),t)}get strokeDasharray(){return this[i(2337)]}set[i(2036)](t){this._strokeDasharray=t,this._updatePaintProperty(this._strokeLayerId,"line-dasharray",t)}[i(3296)](t){const e=i;return void 0!==t.positions&&(this[e(1536)]=t[e(1536)]),void 0!==t[e(3685)]&&(this.fillColor=t[e(3685)]),void 0!==t[e(3450)]&&(this.fillOpacity=t.fillOpacity),void 0!==t.strokeColor&&(this.strokeColor=t[e(1438)]),void 0!==t[e(425)]&&(this.strokeWeight=t.strokeWeight),void 0!==t.strokeOpacity&&(this[e(471)]=t.strokeOpacity),void 0!==t.strokeDasharray&&(this[e(2036)]=t[e(2036)]),void 0!==t.properties&&(this[e(2043)]=Object.assign({},t[e(1594)]),this[e(3379)]()),this}get visible(){return this._visible}set[i(3404)](t){const e=i;this[e(3289)]!==t&&(this[e(3289)]=t,this[e(580)]())}_getBounds(){const t=new io;return hi(t,this._positions),t}_updateVisibility(){const t=i;if(!this._map)return;const e=this[t(3289)]?"visible":"none";this[t(830)].getLayer(this._fillLayerId)&&this._map[t(1122)](this._fillLayerId,t(581),e),this[t(830)].getLayer(this._strokeLayerId)&&this._map.setLayoutProperty(this[t(2044)],"visibility",e)}[i(3191)](){const t=i;return 0!==this._positions.length&&Array.isArray(this[t(753)][0])&&Array[t(2667)](this[t(753)][0][0])}_convertPoint(t){const e=i;return Array.isArray(t)?[t[0],t[1]]:e(3396)in t&&e(2329)in t?[t[e(3396)],t.latitude]:[0,0]}[i(2615)](t){const e=i,r=t[e(1920)]((t=>this[e(2216)](t)));if(r.length>0){const t=r[0],i=r[r.length-1];t[0]===i[0]&&t[1]===i[1]||r[e(2315)]([t[0],t[1]])}return r}_createPolygonGeoJSON(){const t=i;let e;return e=this._isMultiRing()?this[t(753)].map((e=>this[t(2615)](e))):[this[t(2615)](this._positions)],{type:"Feature",properties:Object[t(2132)]({},this[t(2043)]),geometry:{type:t(2064),coordinates:e}}}[i(2485)](){const t=i;if(!this[t(830)])return;const e=this._createPolygonGeoJSON();this[t(830)][t(1387)](this[t(3053)],{type:t(1830),data:e}),this[t(830)][t(1049)]({id:this._fillLayerId,type:t(1082),source:this[t(3053)],paint:{"fill-color":this[t(1441)],"fill-opacity":this[t(777)]}});const r={"line-color":this._strokeColor,"line-opacity":this[t(3196)],"line-width":this[t(1303)]};this._strokeDasharray&&(r["line-dasharray"]=this._strokeDasharray),this[t(830)][t(1049)]({id:this._strokeLayerId,type:t(1097),source:this[t(3053)],paint:r})}_updatePolygon(){const t=i;if(!this._map)return;const e=this[t(830)].getSource(this._sourceId);if(!e||"geojson"!==e.type)return;const r=this[t(1724)]();e.setData(r)}[i(805)](t,e,r){const o=i;this[o(830)]&&this[o(830)][o(518)](t)&&this._map.setPaintProperty(t,e,r)}[i(1443)](){return[this[i(3632)],this._strokeLayerId]}[i(3608)](){const t=i;if(!this._map)return;const e=this._interactionLayerIds();for(const i of ql)this._layerPointerSubscriptions[t(2315)](this._map.on(i,e,(e=>this[t(1430)](e))))}[i(2516)](){const t=i;for(const e of this[t(2378)])e[t(1651)]();this[t(2378)]=[]}}const Wl=["click","dblclick",i(1476),i(817),i(1598),"mouseenter","mouseleave","mouseover",i(3596),i(487),"touchstart","touchend","touchcancel"];class Hl extends e.E{constructor(t){const r=i;var o,n,s,a;super(),this[r(830)]=null,this._layerPointerSubscriptions=[],this[r(3289)]=!0,this._id=t.id||"prism-overlay-"+e.ai(),this._positions=t.positions,this[r(2019)]=this._normalizeAltitude(t[r(1660)]),this[r(1571)]=null!==(o=t.topColor)&&void 0!==o?o:"#EAE9E9",this._topOpacity=null!==(n=t.topOpacity)&&void 0!==n?n:1,this[r(2074)]=null!==(s=t.sideColor)&&void 0!==s?s:r(3197),this[r(535)]=null!==(a=t.sideOpacity)&&void 0!==a?a:.85,this._topPattern=t[r(1159)],this[r(2080)]=t.sidePattern,this[r(2043)]=t.properties?Object[r(2132)]({},t[r(1594)]):{},this._sourceId=this._id+"-source",this._layerId=this[r(2456)]+r(3668)}on(t,e){return super.on(t,e)}off(t,e){return super.off(t,e)}once(t,e){return super.once(t,e)}get id(){return this._id}get[i(1536)](){return this._positions}set[i(1536)](t){this[i(753)]=t,this._updatePrism()}get[i(1660)](){return this[i(2019)]}set[i(1660)](t){const e=i,r=this[e(524)](t);this[e(2019)]!==r&&(this[e(2019)]=r,this[e(564)]())}get[i(2720)](){return this._topColor}set[i(2720)](t){const e=i;this._topColor=t,this._updatePaintProperty(e(3529),t)}get[i(345)](){return this._topOpacity}set topOpacity(t){const e=i;this[e(3266)]=t,this[e(805)](e(2940),t)}get sideColor(){return this[i(2074)]}set[i(536)](t){const e=i;this._sideColor=t,this[e(805)](e(3393),t)}get sideOpacity(){return this._sideOpacity}set[i(3554)](t){this._sideOpacity=t,this._updatePaintProperty("side-fill-opacity",t)}get[i(1159)](){return this._topPattern}set[i(1159)](t){const e=i;this._topPattern=t,this._updatePatternProperty(e(1493),t)}get[i(2712)](){return this._sidePattern}set sidePattern(t){const e=i;this._sidePattern=t,this[e(3478)]("side-fill-pattern",t)}get[i(3404)](){return this[i(3289)]}set[i(3404)](t){this[i(3289)]!==t&&(this._visible=t,this._updateVisibility())}setOptions(t){const e=i;return void 0!==t[e(1536)]&&(this[e(1536)]=t[e(1536)]),void 0!==t.altitude&&(this.altitude=t[e(1660)]),void 0!==t.topColor&&(this[e(2720)]=t[e(2720)]),void 0!==t.topOpacity&&(this.topOpacity=t[e(345)]),void 0!==t.sideColor&&(this[e(536)]=t.sideColor),void 0!==t[e(3554)]&&(this[e(3554)]=t[e(3554)]),void 0!==t[e(1159)]&&(this[e(1159)]=t[e(1159)]),void 0!==t.sidePattern&&(this.sidePattern=t.sidePattern),void 0!==t.properties&&(this[e(2043)]=Object.assign({},t.properties),this[e(802)]()),this}_addTo(t){return this._map=t,this._addLayer(),this._attachMapLayerPointerForwarding(),this}[i(2435)](){const t=i;return this[t(830)]?(this[t(2516)](),this[t(830)][t(518)](this._layerId)&&this[t(830)].removeLayer(this._layerId),this[t(830)][t(1321)](this._sourceId)&&this._map[t(381)](this[t(3053)]),this[t(830)]=null,this):this}_normalizeAltitude(t){const e=i;return void 0!==t&&Number[e(3588)](t)?Math[e(2153)](0,t):0}[i(2216)](t){const e=i;return Array.isArray(t)?[t[0],t[1]]:"longitude"in t&&e(2329)in t?[t[e(3396)],t.latitude]:[0,0]}[i(736)](t){const e=i;return Array[e(2667)](t)?e(2534)==typeof t[0]&&e(2534)==typeof t[1]:!!t&&e(2112)==typeof t&&"longitude"in t&&"latitude"in t}[i(2111)](t){const e=i;return Array.isArray(t)&&(0===t.length||this[e(736)](t[0]))}[i(1484)](t){const e=i;return Array.isArray(t)&&(0===t.length||this[e(2111)](t[0]))}[i(2788)](){const t=i;return this._isRingDefinition(this[t(753)])?[[this._positions]]:Array[t(2667)](this[t(753)])&&this[t(753)].length>0&&this._isPolygonDefinition(this._positions[0])?this[t(753)]:Array[t(2667)](this._positions)?this[t(753)].map((t=>[t])):[]}_convertRing(t){const e=t.map((t=>this._convertPoint(t)));if(e.length>0){const t=e[0],i=e[e.length-1];t[0]===i[0]&&t[1]===i[1]||e.push([t[0],t[1]])}return e}[i(589)](){const t=i;return{type:t(837),features:this._getPolygonDefinitions().map(((e,i)=>({type:t(401),properties:Object.assign(Object.assign({},this[t(2043)]),{prismIndex:i}),geometry:{type:"Polygon",coordinates:e.map((t=>this._convertRing(t)))}})))}}_addLayer(){const t=i;if(!this[t(830)])return;this._map.addSource(this[t(3053)],{type:t(1830),data:this._createPrismGeoJSON()});const e={"top-fill-color":this[t(1571)],"top-fill-opacity":this._topOpacity,"side-fill-color":this._sideColor,"side-fill-opacity":this._sideOpacity,"extrusion-height":this._altitude,"extrusion-base":0,"extrusion-vertical-gradient":!0};this[t(3015)]&&(e[t(1493)]=this[t(3015)]),this._sidePattern&&(e[t(1566)]=this._sidePattern),this._map.addLayer({id:this._layerId,type:t(1880),source:this[t(3053)],layout:{visibility:this._visible?t(3404):"none"},paint:e})}[i(802)](){const t=i;if(!this._map)return;const e=this._map.getSource(this._sourceId);e&&t(1830)===e[t(2784)]&&e.setData(this[t(589)]())}_updateAltitude(){this._updatePaintProperty(i(2233),this._altitude)}[i(805)](t,e){const r=i;this[r(830)]&&this[r(830)].getLayer(this._layerId)&&this._map.setPaintProperty(this._layerId,t,e)}_updatePatternProperty(t,e){const r=i;this._map&&this._map[r(518)](this[r(2952)])&&this[r(830)][r(1449)](this._layerId,t,e||void 0)}_updateVisibility(){const t=i;if(!this._map)return;const e=this[t(3289)]?"visible":"none";this._map[t(518)](this._layerId)&&this._map[t(1122)](this._layerId,t(581),e)}[i(1443)](){const t=i;return this[t(830)]?[this._layerId][t(2397)]((e=>{const i=t;var r;return Boolean(null===(r=this[i(830)])||void 0===r?void 0:r[i(518)](e))})):[]}[i(3608)](){const t=i;if(!this._map)return;const e=this[t(1443)]();for(const i of Wl)this[t(2378)].push(this[t(830)].on(i,e,(t=>this.fire(t))))}[i(2516)](){const t=i;for(const e of this[t(2378)])e[t(1651)]();this[t(2378)]=[]}}const Xl={0:i(1745),.1:i(1232),.5:"rgb(250, 250, 56)",1:i(960)},Yl=[i(1024),i(367),i(1476),i(817),i(1598),i(424),"mouseleave","mouseover",i(3596),"contextmenu","touchstart","touchend","touchcancel"];class Jl extends e.E{constructor(t){const r=i;var o,n,s,a,l,c;if(super(),this._map=null,this._layerPointerSubscriptions=[],!Array[r(2667)](t.points))throw new Error(r(2885));if(this._id=t.id||"heatmap-overlay-"+e.ai(),this[r(2198)]=t.points[r(1920)]((t=>Object.assign({},t))),this._radius=null!==(o=t.radius)&&void 0!==o?o:30,this._minimumWeight=null!==(n=t[r(1050)])&&void 0!==n?n:0,this._maximumWeight=null!==(s=t[r(573)])&&void 0!==s?s:ui(this._points),this._intensity=null!==(a=t.intensity)&&void 0!==a?a:1,this._opacity=null!==(l=t.opacity)&&void 0!==l?l:1,this._gradient=di(t[r(2648)]),this._minzoom=t.minzoom,this._maxzoom=t[r(615)],this[r(3289)]=null===(c=t[r(3404)])||void 0===c||c,this._radius<1)throw new Error("radius must be greater than or equal to 1");this._sourceId=this._id+r(1533),this[r(2952)]=this[r(2456)]+r(1450)}on(t,e){return super.on(t,e)}off(t,e){return super.off(t,e)}[i(2143)](t,e){return super[i(2143)](t,e)}get id(){return this._id}get[i(1182)](){const t=i;return this[t(2198)][t(1920)]((e=>({position:e[t(1288)],weight:e.weight,properties:e.properties?Object[t(2132)]({},e[t(1594)]):void 0})))}set points(t){const e=i;if(!Array.isArray(t))throw new Error("points must be an array of HeatmapOverlayPoint");this[e(2198)]=t.map((t=>Object.assign({},t))),(void 0===this[e(350)]||Number.isNaN(this._maximumWeight))&&(this[e(350)]=ui(this._points)),this[e(2948)]()}get radius(){return this._radius}set[i(3456)](t){const e=i;if(t<1)throw new Error(e(3070));this[e(404)]=t,this[e(805)]("heatmap-radius",this[e(404)])}get minimumWeight(){return this[i(1347)]}set[i(1050)](t){this._minimumWeight=t,this._syncGeoJSON()}get[i(573)](){return this[i(350)]}set[i(573)](t){const e=i;this._maximumWeight=t,this[e(2948)]()}get[i(1079)](){return this._intensity}set intensity(t){const e=i;this._intensity=t,this._updatePaintProperty(e(2235),this[e(2532)])}get[i(2941)](){return this[i(1519)]}set[i(2941)](t){const e=i;this[e(1519)]=t,this._updatePaintProperty(e(2723),this[e(1519)])}get[i(2648)](){return Object[i(2132)]({},this._gradient)}set[i(2648)](t){this[i(3652)]=di(t),this._updatePaintProperty("heatmap-color",pi(this._gradient))}get visible(){return this[i(3289)]}set visible(t){const e=i;this[e(3289)]!==t&&(this[e(3289)]=t,this._updateVisibility())}setOptions(t){const e=i;return void 0!==t[e(1182)]&&(this.points=t[e(1182)]),void 0!==t[e(3456)]&&(this.radius=t.radius),void 0!==t[e(1050)]&&(this.minimumWeight=t.minimumWeight),void 0!==t.maximumWeight&&(this[e(573)]=t.maximumWeight),void 0!==t[e(1079)]&&(this[e(1079)]=t[e(1079)]),void 0!==t[e(2941)]&&(this.opacity=t[e(2941)]),void 0!==t.gradient&&(this[e(2648)]=t[e(2648)]),void 0!==t[e(3404)]&&(this.visible=t.visible),void 0===t.minzoom&&void 0===t.maxzoom||(void 0!==t[e(2045)]&&(this[e(2411)]=t.minzoom),void 0!==t[e(615)]&&(this._maxzoom=t[e(615)]),this[e(982)]()),this}_addTo(t){const e=i;return this._map=t,this[e(2485)](),this[e(3608)](),this}[i(2435)](){const t=i;return this[t(830)]?(this._detachMapLayerPointerForwarding(),this._map[t(518)](this[t(2952)])&&this._map[t(327)](this[t(2952)]),this._map.getSource(this[t(3053)])&&this._map[t(381)](this._sourceId),this._map=null,this):this}_getBounds(){const t=i,e=new io;for(const i of this[t(2198)])e.extend(i[t(1288)]);return e}_addLayers(){const t=i;if(!this._map)return;this[t(830)].addSource(this[t(3053)],{type:t(1830),data:fi(this._points,this[t(1347)],this._maximumWeight)});const e=Object[t(2132)](Object.assign({id:this._layerId,type:"heatmap",source:this._sourceId,paint:{"heatmap-weight":[t(1445),"weight"],"heatmap-radius":this._radius,"heatmap-intensity":this[t(2532)],"heatmap-color":pi(this[t(3652)]),"heatmap-opacity":this._opacity},layout:{visibility:this[t(3289)]?t(3404):"none"}},void 0!==this._minzoom?{minzoom:this[t(2411)]}:{}),void 0!==this._maxzoom?{maxzoom:this[t(3343)]}:{});this._map.addLayer(e)}_syncGeoJSON(){const t=i;if(!this[t(830)])return;const e=this._map.getSource(this[t(3053)]);e&&t(1830)===e.type&&e.setData(fi(this[t(2198)],this[t(1347)],this[t(350)]))}_updatePaintProperty(t,e){const r=i;this[r(830)]&&this[r(830)].getLayer(this[r(2952)])&&this[r(830)].setPaintProperty(this[r(2952)],t,e)}[i(580)](){const t=i;this._map&&this[t(830)].getLayer(this._layerId)&&this._map.setLayoutProperty(this._layerId,t(581),this._visible?"visible":"none")}_updateZoomRange(){const t=i;this._map&&this[t(830)].getLayer(this[t(2952)])&&void 0!==this[t(2411)]&&void 0!==this[t(3343)]&&this[t(830)][t(1495)](this._layerId,this[t(2411)],this[t(3343)])}[i(3608)](){const t=i;if(!this._map)return;const e=[this[t(2952)]];for(const i of Yl)this._layerPointerSubscriptions[t(2315)](this._map.on(i,e,(t=>this.fire(t))))}[i(2516)](){const t=i;for(const t of this._layerPointerSubscriptions)t.unsubscribe();this[t(2378)]=[]}}class Kl{constructor(t){const r=i;Fi.add(this),ji[r(571)](this,void 0),Bi[r(571)](this,new Map),e.cL(this,ji,t,"f"),this._overlays=new Map,this[r(3289)]=!0}get[i(3404)](){return this._visible}set[i(3404)](t){const r=i;if(this._visible!==t){this._visible=t;for(const t of this[r(2829)][r(3680)]())e.cM(this,Fi,"m",qi)[r(3054)](this,t)}}get[i(2627)](){return this[i(475)]()}addOverlay(t){const r=i;if(Array.isArray(t))return t[r(1920)]((t=>this[r(2702)](t)));const o=t,n=mi(o);if(this[r(2829)].has(n))throw new Error("Overlay with "+("string"==typeof o.id?r(1102)+o.id+'"':r(3057))+r(1549));const s=e.cM(this,Fi,"m",Vi).call(this,n);let a;if(o[r(3163)]&&r(2770)==typeof o[r(3163)])a=o[r(3163)](e.cM(this,ji,"f"),s);else{if(!o[r(2957)]||"function"!=typeof o[r(2957)])throw new Error(r(3290));a=o.addTo(e.cM(this,ji,"f"))}return this._overlays.set(n,o),e.cM(this,Fi,"m",qi).call(this,n),a||t}removeOverlay(t){const r=i,o=mi(t),n=this[r(2829)].get(o);return!!n&&(n[r(2435)]&&"function"==typeof n[r(2435)]?n._remove():n[r(2591)]&&r(2770)==typeof n[r(2591)]&&n[r(2591)](),e.cM(this,Fi,"m",Gi).call(this,o),this._overlays[r(2647)](o),!0)}removeOverlayById(t){const e=i,r=this[e(2829)][e(1445)](t);return!!r&&this.removeOverlay(r)}[i(836)](t){return this._overlays.get(t)}[i(475)](){const t=i;return Array.from(this[t(2829)][t(2007)]())}[i(3019)](){const t=i;for(const e of this.getOverlays())this[t(1461)](e)}}ji=new WeakMap,Bi=new WeakMap,Fi=new WeakSet,Vi=function(t){const r=i;e.cM(this,Fi,"m",Ni)[r(3054)](this,t);const o=this;return{get visible(){return o[r(3289)]},addSource:(i,o)=>{const n=r;e.cM(this,ji,"f")[n(1321)](i)||e.cM(this,ji,"f").addSource(i,o),e.cM(this,Fi,"m",Ni).call(this,t).sourceIds.add(i)},addLayer:(i,o)=>{const n=r,s=String(i.id);e.cM(this,ji,"f").getLayer(s)||(e.cM(this,ji,"f")[n(2368)](),e.cM(this,ji,"f")[n(1048)][n(1049)](i,o,{validate:!1}),e.cM(this,ji,"f")._update(!0)),e.cM(this,Fi,"m",Ni)[n(3054)](this,t).layerIds[n(2926)](s),e.cM(this,Fi,"m",Zi).call(this,s)},removeLayer:i=>{e.cM(this,Fi,"m",Ui).call(this,t,i)},hasSource:t=>!!e.cM(this,ji,"f").getSource(t),hasLayer:t=>!!e.cM(this,ji,"f").getLayer(t),setSourceData:(t,i)=>{const o=r,n=e.cM(this,ji,"f")[o(1321)](t);n&&o(1830)===n[o(2784)]&&n.setData(i)},setPaintProperty:(t,i,r,o)=>{e.cM(this,ji,"f").getLayer(t)&&e.cM(this,ji,"f").setPaintProperty(t,i,r,o)},setLayoutProperty:(t,i,o,n)=>{const s=r;e.cM(this,ji,"f")[s(518)](t)&&e.cM(this,ji,"f")[s(1122)](t,i,o,n)},releaseManagedResources:()=>{e.cM(this,Fi,"m",Gi).call(this,t)}}},Ni=function(t){const r=i;let o=e.cM(this,Bi,"f")[r(1445)](t);return o||(o={sourceIds:new Set,layerIds:new Set},e.cM(this,Bi,"f").set(t,o)),o},Gi=function(t){const r=i,o=e.cM(this,Bi,"f").get(t);if(!o)return;const n=Array[r(699)](o[r(958)])[r(3025)]();for(const t of n)e.cM(this,ji,"f")[r(518)](t)&&e.cM(this,ji,"f").removeLayer(t);for(const t of o[r(2824)])e.cM(this,ji,"f").getSource(t)&&e.cM(this,ji,"f").removeSource(t);e.cM(this,Bi,"f")[r(2647)](t)},Ui=function(t,r){const o=i;var n;e.cM(this,ji,"f").getLayer(r)&&e.cM(this,ji,"f").removeLayer(r),null===(n=e.cM(this,Bi,"f").get(t))||void 0===n||n[o(958)].delete(r)},qi=function(t){const r=i,o=this._overlays[r(1445)](t);if(null==o?void 0:o._updateManagedVisibility)return void o[r(1046)]();const n=e.cM(this,Bi,"f")[r(1445)](t);if(n)for(const t of n[r(958)])e.cM(this,Fi,"m",Zi).call(this,t)},Zi=function(t){const r=i;if(!e.cM(this,ji,"f").getLayer(t))return;const o=this._visible?r(3404):"none";e.cM(this,ji,"f").setLayoutProperty(t,"visibility",o,{validate:!1})};class $l{constructor(t){const e=i;var r,o,n,s;this._speed=null!==(r=null==t?void 0:t.speed)&&void 0!==r?r:1,this._loop=null!==(o=null==t?void 0:t.loop)&&void 0!==o&&o,this._startTime=null!==(n=null==t?void 0:t[e(1905)])&&void 0!==n?n:0,this._endTime=null!==(s=null==t?void 0:t.endTime)&&void 0!==s?s:0,this[e(2489)]=this._startTime,this._state="idle",this[e(796)]=null,this._pauseOffset=0}get speed(){return this._speed}set[i(2468)](t){this[i(1979)]=Math.max(.1,Math.min(5,t))}get loop(){return this[i(3312)]}set[i(349)](t){this[i(3312)]=t}get[i(1905)](){return this._startTime}set[i(1905)](t){const e=i;this._startTime=t,this._currentTime<this._startTime&&(this[e(2489)]=this[e(2734)])}get[i(813)](){return this._endTime}set[i(813)](t){const e=i;this._endTime=t,this._currentTime>this[e(3544)]&&(this[e(2489)]=this[e(3544)])}get[i(2643)](){return this[i(2489)]}set[i(2643)](t){const e=i;this[e(2489)]=Math[e(2153)](this[e(2734)],Math[e(1141)](this[e(3544)],t)),this._pauseOffset=this._currentTime}get[i(3158)](){return this[i(868)]}play(){const t=i;"playing"!==this._state&&(t(1396)===this._state&&(this._currentTime=this._startTime),this[t(868)]=t(3300),this[t(796)]=performance[t(812)]()-this._pauseOffset)}pause(){const t=i;t(3300)===this[t(868)]&&(this[t(868)]=t(2147),null!==this[t(796)]&&(this._pauseOffset=performance[t(812)]()-this[t(796)]),this._startTimestamp=null)}[i(1898)](){const t=i;this[t(868)]=t(3216),this[t(2489)]=this[t(2734)],this._startTimestamp=null,this._pauseOffset=0}update(t){const e=i;if(e(3300)!==this._state||null===this._startTimestamp)return this[e(2489)];let r=this[e(2734)]+(t-this[e(796)])*this._speed;return r>=this[e(3544)]&&(this._loop?r=this[e(2734)]+(r-this[e(2734)])%(this[e(3544)]-this[e(2734)]):(r=this[e(3544)],this[e(868)]=e(1396),this._startTimestamp=null)),this[e(2489)]=r,this._currentTime}[i(1415)](){const t=i;return this[t(3544)]-this[t(2734)]}}class Ql{constructor(t){const e=i;this.map=t,this[e(702)]={},this[e(3299)]=new $l({speed:1,loop:!1})}add(t){const e=i;var r;this.tracks[t.id]=t;const o=t;return null===(r=o._setMap)||void 0===r||r[e(3054)](o,this[e(1920)]),this.timeline.endTime=Math[e(2153)](this[e(3299)][e(813)],t[e(3168)]),o}remove(t){return!!this[i(702)][t]&&(delete this.tracks[t],this.recalculateEndTime(),!0)}[i(1445)](t){return this.tracks[t]}[i(1291)](){const t=i;return Object[t(2007)](this[t(702)])}getByType(t){return Object[i(2007)](this.tracks).filter((e=>e.type===t))}[i(1923)](t){const e=i;for(const i of Object.values(this.tracks))i.enabled&&i[e(1923)](t)}get[i(3158)](){return this[i(3299)].state}[i(2355)](){const t=i;this[t(3299)].stop(),this[t(702)]={}}[i(1225)](){const t=i;let e=0;for(const i of Object[t(2007)](this.tracks)){const r=i[t(3168)];i.enabled&&r>e&&(e=r)}this.timeline[t(813)]=e}}const tc=Cr,ec={hash:!1,interactive:!0,bearingSnap:7,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!0,preserveDrawingBuffer:!1,powerPreference:i(1110),failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,language:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0};let ic=class extends Ea{constructor(t){const o=i;var n;e.cN[o(584)](e.cO[o(325)]);const s=Object[o(2132)](Object.assign(Object[o(2132)]({},ec),t),{canvasContextAttributes:Object[o(2132)](Object[o(2132)]({},ec[o(1990)]),t[o(1990)])});if(null!=s[o(1630)]&&null!=s[o(1239)]&&s[o(1630)]>s.maxZoom)throw new Error(o(1833));if(null!=s.minPitch&&null!=s[o(3421)]&&s[o(1042)]>s[o(3421)])throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=s[o(1042)]&&s[o(1042)]<0)throw new Error(o(458));if(null!=s.maxPitch&&s[o(3421)]>85)throw new Error("maxPitch must be less than or equal to 85");const l=new sn,c=new an;if(void 0!==s[o(1630)]&&l[o(3689)](s[o(1630)]),void 0!==s[o(1239)]&&l[o(922)](s.maxZoom),void 0!==s[o(1042)]&&l[o(641)](s[o(1042)]),void 0!==s[o(3421)]&&l.setMaxPitch(s[o(3421)]),void 0!==s.renderWorldCopies&&l[o(494)](s.renderWorldCopies),null!==s.transformConstrain&&l.setConstrainOverride(s[o(2493)]),super(l,c,{bearingSnap:s.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this[o(1784)]=new hl,this._controls=[],this[o(672)]=e.ai(),this[o(3498)]={style:null,images:null},this[o(2650)]=t=>{const i=o;t.preventDefault(),this[i(1475)]&&(this[i(1475)].abort(),this[i(1475)]=null),this.painter[i(2355)]();for(const t of Object.values(this[i(1048)][i(3557)]))if(i(1645)===t[i(2784)]&&console.warn(i(1633)+t.id+i(513)),t[i(1091)])for(const[e]of Object[i(1197)](t._listeners))console[i(2561)]("Custom layer with id '"+t.id+"' had event listeners for event '"+e+"' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.");this._lostContextStyle=this._getStyleAndImages(),this[i(1048)].destroy(),this[i(1048)]=null,this.fire(new e.o(i(1099),{originalEvent:t}))},this._contextRestored=t=>{const i=o;this._lostContextStyle[i(1048)]&&this[i(2977)](this[i(3498)].style,{diff:!1}),this._lostContextStyle.images&&(this.style[i(1829)].images=this[i(3498)][i(2437)]),this[i(3498)]={style:null,images:null},this[i(1760)](),this[i(2820)](),this._update(),this[i(2491)](),this[i(1430)](new e.o("webglcontextrestored",{originalEvent:t}))},this[o(3528)]=t=>{const e=o;if(t.target===this._container)return this[e(835)][e(2446)]=0,this[e(835)].scrollLeft=0,!1},this._onCanvasPointerEnter=t=>{this.fire(new wa("mouseenter",this,t))},this._onCanvasPointerLeave=t=>{this.fire(new wa(o(1894),this,t))},this._onWindowOnline=()=>{this._update()},this[o(387)]=new Kl(this),this._interactive=!0,this._maxTileCacheSize=s[o(2295)],this[o(3479)]=s[o(2212)],this[o(3228)]=Object[o(2132)]({},s[o(1990)]),this._trackResize=!0===s.trackResize,this[o(3525)]=s[o(1489)],this._centerClampedToGround=s[o(1935)],this[o(1246)]=!0===s.refreshExpiredTiles,this._fadeDuration=s[o(1316)],this._crossSourceCollisions=!0===s[o(862)],this._collectResourceTiming=!0===s.collectResourceTiming,this._locale=Object[o(2132)](Object[o(2132)]({},yl),s.locale),this[o(3496)]=(null===(n=s.language)||void 0===n?void 0:n[o(2768)]())||null,this._clickTolerance=s[o(1071)],this._overridePixelRatio=s[o(3105)],this[o(1335)]=s.maxCanvasSize,this[o(1871)]=s[o(2765)],this[o(1538)]=s[o(1538)],this[o(2493)]=s[o(2493)],this.cancelPendingTileRequestsWhileZooming=!0===s.cancelPendingTileRequestsWhileZooming,void 0!==s.reduceMotion&&(zr[o(2687)]=s.reduceMotion),this[o(1452)]=ki.addThrottleControl((()=>this[o(967)]())),this[o(1700)]=new Vr(s.transformRequest),this.animation=new Ql(this),o(629)==typeof s[o(2184)]){if(this._container=document.getElementById(s.container),!this[o(835)])throw new Error(o(1103)+s.container+o(1531))}else{if(!(s[o(2184)]instanceof HTMLElement))throw new Error(o(3587));this[o(835)]=s[o(2184)]}s[o(964)]&&(this[o(964)]=s.maxBounds),this._setupContainer(),this._setupPainter(),(Er||(Er=function(){return e._(this,void 0,void 0,(function*(){const t=r;var i;const o={success:!1,code:-1,message:""};if(!e.c.API_KEY)return o[t(831)]="未设置 Maptec.apiKey,请在初始化地图前赋值。",o;if(t(2770)!=typeof fetch)return o[t(1981)]=-2,o[t(831)]=t(1327),o;const n=t(2354)!=typeof AbortController?new AbortController:null;let s;n&&(s=setTimeout((()=>n.abort()),3e3));try{const r=yield fetch(e.c[t(1017)]+"/api/"+e.c[t(3464)]+t(3339),{method:"GET",headers:a({acceptJson:!0}),signal:null!==(i=null==n?void 0:n[t(2388)])&&void 0!==i?i:null});if(!r.ok)return o[t(1981)]=r.status,o[t(831)]="鉴权服务返回 HTTP "+r[t(2279)],o;const s=yield r[t(2104)]();o[t(2180)]=!0===s[t(3100)],o[t(1981)]=s.code,o[t(831)]=o.success?"鉴权成功":"鉴权失败,请检查apiKey是否正确。"}catch(e){const i=e instanceof Error&&t(1358)===e[t(1814)];o.code=i?-3:-4,o.message=i?"鉴权请求超时(>3s)":e instanceof Error?e[t(831)]:"网络错误"}finally{null!=s&&clearTimeout(s)}return o}))}(),Er)).then((t=>{this._authResult=t,t.success?this._finishInitialization(s):this._showAuthErrorOverlay(t)}))}_finishInitialization(t){const r=i;var o,n;if(this.handlers=new sl(this,t),this.on(r(709),(()=>this[r(437)](!1))),this.on("moveend",(()=>this._update(!1))),this.on(r(3512),(()=>this[r(437)](!0))),this.on(r(3245),(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),this[r(2143)](r(3216),(()=>{this._idleTriggered=!0})),r(2354)!=typeof window){addEventListener(r(355),this[r(797)],!1);let t=!1;const e=Fe((t=>{const e=r;this[e(3126)]&&!this._removed&&(this[e(2820)](t),this[e(968)]())}),50);this._resizeObserver=new ResizeObserver((i=>{t?e(i):t=!0})),this._resizeObserver[r(3044)](this[r(835)])}this[r(483)]=t[r(565)]&&new fa(r(629)==typeof t[r(565)]&&t[r(565)]||void 0).addTo(this),this[r(483)]&&this._hash._onHashChange()||(this[r(2808)]({center:t[r(1972)],elevation:t[r(1708)],zoom:t[r(3512)],bearing:t.bearing,pitch:t[r(882)]}),t[r(2459)]&&(this[r(2820)](),super.fitBounds(t.bounds,e.e({},t[r(3281)],{duration:0}))));const s="string"==typeof t.style||!("globe"===(null===(n=null===(o=t.style)||void 0===o?void 0:o.projection)||void 0===n?void 0:n.type));this.resize(null,s),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t[r(310)],this.on(r(3354),(()=>{const t=r;if(s||this._resizeTransform(),this[t(1847)].unmodified){const i=e.W(this.style[t(1919)],["center",t(3512),t(1121),t(882)]);this[t(2808)](i)}this._setMapLanguage(this[t(3496)])})),t[r(1048)]&&this[r(2977)](t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),!!t.isHawkeyeMap||this.addControl(new ll,t[r(988)]),this[r(1834)](new cl,t[r(2340)]),this.on("data",(t=>{const i=r;this._update("style"===t[i(2596)]),this[i(1430)](new e.o(t.dataType+i(3100),t))})),this.on("dataloading",(t=>{this[r(1430)](new e.o(t.dataType+"dataloading",t))})),this.on("dataabort",(t=>{this[r(1430)](new e.o("sourcedataabort",t))}))}_getMapId(){return this._mapId}[i(1104)](t,e){const r=i;return this.style.setGlobalStateProperty(t,e),this[r(437)](!0)}getGlobalState(){return this.style[i(1127)]()}[i(1834)](t,r){const o=i,n=t;if(void 0===r&&(r=n[o(3617)]?n[o(3617)]():"top-right"),!n||!n[o(3540)])return this.fire(new e.n(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=n.onAdd(this);this[o(626)].push(n);const a=this[o(2254)][r];return a?(-1!==r.indexOf("bottom")?a.insertBefore(s,a[o(1012)]):a.appendChild(s),this):this.fire(new e.n(new Error("Invalid argument to map.addControl(). Position must be one of: top-left, top-right, bottom-left, bottom-right. Received: "+r)))}removeControl(t){const r=i;if(!t||!t.onRemove)return this.fire(new e.n(new Error(r(2816))));if(t instanceof cl||t instanceof ll)return this;const o=this._controls.indexOf(t);return o>-1&&this._controls[r(1657)](o,1),t[r(1593)](this),this}get[i(2403)](){return this[i(387)]}[i(2702)](t){const r=i;if(!t)return this.fire(new e.n(new Error("Invalid argument to map.addOverlay(). Argument must be a valid overlay.")));if(Array.isArray(t)){const e=[];for(const i of t)e[r(2315)](this.addOverlay(i));return e}if(!this[r(2818)])return this[r(2143)]("load",(()=>{this.addOverlay(t)})),t;try{return this._overlayManager[r(2702)](t)}catch(t){return this[r(1430)](new e.n(new Error(t instanceof Error?t[r(831)]:r(2848))))}}[i(1461)](t){const r=i;if(!t)return this.fire(new e.n(new Error(r(3020))));if(Array.isArray(t)){for(const e of t)this[r(1461)](e);return this}return this._overlayManager[r(1461)](t)?this:this[r(1430)](new e.n(new Error(r(845))))}getOverlayById(t){return this._overlayManager[i(836)](t)}[i(475)](){return this._overlayManager.getOverlays()}[i(2614)](t){return this._overlayManager.removeOverlayById(t),this}[i(2079)](t){const e=i;return this[e(626)][e(2887)](t)>-1}coveringTiles(t){return X(this.transform,t)}calculateCameraOptionsFromTo(t,e,r,o){return null==o&&this.terrain&&(o=this.terrain.getElevationForLngLat(r,this[i(1847)])),super.calculateCameraOptionsFromTo(t,e,r,o)}[i(2820)](t,r=!0){const o=i;if(null!==this._lostContextStyle[o(1048)])return this;this[o(2491)](r);const n=!this._moving;return n&&(this[o(1898)](),this.fire(new e.o(o(1944),t)).fire(new e.o(o(709),t))),this[o(1430)](new e.o(o(2820),t)),n&&this.fire(new e.o(o(2443),t)),this}[i(2491)](t=!0){const e=i,[r,o]=this[e(1390)](),n=this._getClampedPixelRatio(r,o);if(this._resizeCanvas(r,o,n),this[e(1258)][e(2820)](r,o,n),this[e(1258)][e(3241)]()){const t=this[e(1258)].context.gl;this[e(1335)]=[t[e(2127)],t[e(2107)]];const i=this[e(3472)](r,o);this._resizeCanvas(r,o,i),this[e(1258)].resize(r,o,i)}this[e(761)](t)}_resizeTransform(t=!0){const e=i;var r;const[o,n]=this[e(1390)]();this.transform[e(2820)](o,n,t),null===(r=this[e(2175)])||void 0===r||r.resize(o,n,t)}_getClampedPixelRatio(t,e){const r=i,{0:o,1:n}=this._maxCanvasSize,s=this.getPixelRatio(),a=t*s,l=e*s;return Math[r(1141)](a>o?o/a:1,l>n?n/l:1)*s}[i(983)](){var t;return null!==(t=this[i(1019)])&&void 0!==t?t:devicePixelRatio}setPixelRatio(t){this._overridePixelRatio=t,this.resize()}get[i(3440)](){return this[i(3496)]}set language(t){this._language=(null==t?void 0:t.trim())||null,this._setMapLanguage(this._language)}[i(1876)](){return this.transform.getBounds()}get[i(964)](){const t=i;return this[t(1847)][t(946)]()}set maxBounds(t){this[i(1847)].setMaxBounds(io.convert(null!=t?t:null)),this._update()}get minZoom(){const t=i;return this[t(1847)][t(1630)]}set[i(1630)](t){const e=i,r=null==t?-2:t;if(!(r>=-2&&r<=this.transform.maxZoom))throw new Error("minZoom must be between -2 and the current maxZoom, inclusive");{const t=this[e(2795)]();t.setMinZoom(r),this._applyUpdatedTransform(t),this._update()}}get[i(1239)](){return this.transform[i(1239)]}set[i(1239)](t){const e=i,r=null==t?22:t;if(!(r>=this.transform.minZoom))throw new Error(e(3074));{const t=this[e(2795)]();t.setMaxZoom(r),this._applyUpdatedTransform(t),this[e(437)]()}}get[i(1042)](){const t=i;return this[t(1847)][t(1042)]}set minPitch(t){const e=i,r=null==t?0:t;if(r<0)throw new Error("minPitch must be greater than or equal to 0");if(!(r>=0&&r<=this.transform[e(3421)]))throw new Error(e(1882));this.transform.setMinPitch(r),this[e(437)](),this.pitch<r&&(this[e(882)]=r)}get[i(3421)](){return this.transform[i(3421)]}set[i(3421)](t){const e=i;let r=null==t?60:t;if(r<0&&(console.warn("maxPitch setter: 输入值 "+r+e(1516)),r=0),r>85&&(console.warn("maxPitch setter: 输入值 "+r+e(1860)),r=85),!(r>=this.transform[e(1042)]))throw new Error(e(2833));this.transform[e(2580)](r),this[e(437)](),this[e(882)]>r&&(this[e(882)]=r)}getRenderWorldCopies(){return this.transform[i(2356)]}[i(494)](t){const e=i;return this[e(1847)].setRenderWorldCopies(t),this[e(437)]()}[i(3153)](t){const e=i;return this[e(1847)][e(566)](t),this._update()}project(t){const r=i;return this.transform.locationToScreenPoint(e.X.convert(t),this.style&&this[r(3245)])}unproject(t){const r=i;return this.transform[r(643)](e.P.convert(t),this[r(3245)])}[i(967)](){var t;return this._moving||(null===(t=this.handlers)||void 0===t?void 0:t[i(967)]())}[i(877)](){var t;return this._zooming||(null===(t=this.handlers)||void 0===t?void 0:t.isZooming())}[i(928)](){var t;return this._rotating||(null===(t=this.handlers)||void 0===t?void 0:t[i(928)]())}[i(541)](t,e,r){const o=i;if(o(424)===t||o(2672)===t){let i=!1;const n=n=>{const s=o,a=e[s(2397)]((t=>this[s(518)](t))),l=0!==a[s(953)]?this[s(2447)](n.point,{layers:a}):[];l[s(953)]?i||(i=!0,r[s(3054)](this,new wa(t,this,n.originalEvent,{features:l}))):i=!1};return{layers:e,listener:r,delegates:{mousemove:n,mouseout:()=>{i=!1}}}}if(o(1894)===t||"mouseout"===t){let i=!1;const n=n=>{const s=o,a=e.filter((t=>this[s(518)](t)));(0!==a.length?this.queryRenderedFeatures(n[s(2965)],{layers:a}):[])[s(953)]?i=!0:i&&(i=!1,r[s(3054)](this,new wa(t,this,n.originalEvent)))},s=e=>{i&&(i=!1,r[o(3054)](this,new wa(t,this,e.originalEvent)))};return{layers:e,listener:r,delegates:{mousemove:n,mouseout:s}}}{const i=t=>{const i=o,n=e[i(2397)]((t=>this.getLayer(t))),s=0!==n[i(953)]?this.queryRenderedFeatures(t.point,{layers:n}):[];s[i(953)]&&(t.features=s,r.call(this,t),delete t[i(2794)])};return{layers:e,listener:r,delegates:{[t]:i}}}}[i(2400)](t,e){const r=i;this._delegatedListeners=this._delegatedListeners||{},this[r(829)][t]=this[r(829)][t]||[],this._delegatedListeners[t][r(2315)](e)}_removeDelegatedListener(t,e,r){const o=i;if(!this._delegatedListeners||!this._delegatedListeners[t])return;const n=this[o(829)][t];for(let t=0;t<n[o(953)];t++){const i=n[t];if(i[o(690)]===r&&i.layers.length===e[o(953)]&&i[o(1643)].every((t=>e[o(3446)](t)))){for(const t in i.delegates)this[o(1002)](t,i.delegates[t]);return void n[o(1657)](t,1)}}}on(t,e,r){const o=i;if(void 0===r)return super.on(t,e);const n=o(629)==typeof e?[e]:e,s=this[o(541)](t,n,r);this._saveDelegatedListener(t,s);for(const t in s[o(2909)])this.on(t,s.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(t,n,r)}}}[i(2143)](t,e,r){const o=i;if(void 0===r)return super[o(2143)](t,e);const n=o(629)==typeof e?[e]:e,s=this._createDelegatedListener(t,n,r);for(const e in s.delegates){const i=s[o(2909)][e];s[o(2909)][e]=(...e)=>{this[o(2262)](t,n,r),i(...e)}}this._saveDelegatedListener(t,s);for(const t in s[o(2909)])this.once(t,s.delegates[t]);return this}[i(1002)](t,e,r){const o=i;return void 0===r?super[o(1002)](t,e):(this[o(2262)](t,o(629)==typeof e?[e]:e,r),this)}[i(1430)](t,e){return super.fire(t,e)}queryRenderedFeatures(t,r){const o=i;if(!this[o(1048)])return[];let n;const s=t instanceof e.P||Array.isArray(t),a=s?t:[[0,0],[this[o(1847)][o(1422)],this[o(1847)].height]];let l=r||(s?{}:t)||{};if(l=this[o(1714)](l),a instanceof e.P||o(2534)==typeof a[0])n=[e.P[o(1029)](a)];else{const t=e.P.convert(a[0]),i=e.P.convert(a[1]);n=[t,new e.P(i.x,t.y),i,new e.P(t.x,i.y),t]}return this.style.queryRenderedFeatures(n,l,this[o(1847)])}_styleLayerIdsForOverlay(t){const e=i,r=this.style;if(!r||!t||"object"!=typeof t)return[];const o=t=>t[e(2397)]((t=>{return i=t,Boolean(r[e(518)](i));var i}));return t instanceof zl?o([t[e(3632)],t._polygonOutlineSolidLayerId,t[e(2131)],t[e(311)],t[e(1213)],t._circleLayerId,t[e(1471)],t._clusterCountLayerId,t._symbolLayerId]):t instanceof Nl?o(t[e(3051)]()):t instanceof Ul?o([t._lineLayerId]):t instanceof Zl?o([t[e(3632)],t[e(2044)]]):t instanceof Hl||t instanceof Jl?o([t._layerId]):[]}[i(1714)](t){const r=i,{overlays:o,layers:n}=t,s=e.b_(t,[r(2627),"layers"]);if(null==o||0===o[r(953)])return Object.assign({layers:n},s);const a=new Set;for(const t of o)for(const e of this._styleLayerIdsForOverlay(t))a[r(2926)](e);return Object[r(2132)](Object.assign({},s),{layers:Array.from(a)})}querySourceFeatures(t,e){const r=i;return this[r(1048)][r(492)](t,e)}[i(2183)](t){return this._setStyle(He(t))}[i(2977)](t,r){const o=i;return o(629)==typeof t&&(t=He(t)),!1!==(r=e.e({},{localIdeographFontFamily:this[o(3011)],validate:this[o(1221)]},r)).diff&&r.localIdeographFontFamily===this[o(3011)]&&this.style&&t?(this[o(2341)](t,r),this):(this._localIdeographFontFamily=r[o(2412)],this[o(2199)](t,r))}setTransformRequest(t){return this._requestManager[i(3093)](t),this}_getUIString(t){const e=i,r=this[e(2191)][t];if(null==r)throw new Error(e(1184)+t+"'");return r}_setMapLanguage(t){const e=i;if(!this.style)return;const r=(null==t?void 0:t.trim())||null;if(!r)return;const o=(this[e(1440)]().layers||[]).filter((t=>this._isNameSymbolLayer(t)));for(const t of o)this.style[e(1122)](t.id,"text-field",this._createLanguageTextFieldExpression(r),{validate:!1});o[e(953)]>0&&this[e(437)](!0)}[i(1580)](t){const e=i;if(e(1078)!==t[e(2784)]||!t[e(413)]||!(e(1624)in t.layout))return!1;const r=t.layout[e(1624)];return"string"==typeof r?r.includes("{name}")||r.includes("name"):Array.isArray(r)&&JSON[e(2796)](r)[e(3446)](e(1814))}_createLanguageTextFieldExpression(t){const e=i;if("local"===t)return[e(1445),"name"];const r=t[e(462)]("-")[0];return["coalesce",...Array.from(new Set(["name:"+t,e(3427)+t,e(2209)+r,e(3427)+r])).map((t=>[e(1445),t])),["get",e(1814)]]}[i(2199)](t,e){const r=i;var o,n;if(e.transformStyle&&this.style&&!this[r(1048)][r(1408)])return void this[r(1048)].once("style.load",(()=>this._updateStyle(t,e)));const s=this.style&&e.transformStyle?this[r(1048)].serialize():void 0;return this.style&&(this.style[r(3686)](null),this[r(1048)]._remove(!t)),t?(this.style=new kn(this,e||{}),this.style.setEventedParent(this,{style:this[r(1048)]}),"string"==typeof t?this[r(1048)][r(3109)](t,e,s):this.style.loadJSON(t,e,s),this):(null===(n=null===(o=this.style)||void 0===o?void 0:o.projection)||void 0===n||n.destroy(),delete this.style,this)}[i(2368)](){const t=i;this.style||(this.style=new kn(this,{}),this[t(1048)].setEventedParent(this,{style:this.style}),this[t(1048)][t(1155)]())}[i(2341)](t,r){const o=i;if(o(629)==typeof t){const i=this._requestManager[o(399)](t,o(572));e.l(i,new AbortController)[o(2654)]((t=>{const i=o;let n=t[i(3100)],s=r;if(n&&i(2112)==typeof n&&i(3100)in n&&(i(2279)in n||"code"in n)){if(void 0!==n[i(1981)]&&200!==n.code)return void this.fire(new e.n(new Error("Style service error: code="+n.code)));if(void 0!==n[i(2279)]&&"OK"!==n[i(2279)])return void this[i(1430)](new e.n(new Error("Style service error: status="+n[i(2279)])));n=n[i(3100)],s=Object[i(2132)](Object[i(2132)]({},r),{validate:!1})}this[i(3493)](n,s)})).catch((t=>{t&&this.fire(new e.n(t))}))}else"object"==typeof t&&this._updateDiff(t,r)}[i(3493)](t,r){const o=i;try{this[o(1048)].setState(t,r)&&this._update(!0)}catch(i){e.w(o(563)+(i[o(831)]||i[o(3240)]||i)+o(3487)),this[o(2199)](t,r)}}getStyle(){const t=i;if(this[t(1048)])return this[t(1048)].serialize()}[i(2091)](){const t=i;return this.style?{style:this.style.serialize(),images:this[t(1048)].imageManager.cloneImages()}:{style:null,images:{}}}[i(1131)](){const t=i;return this.style?this[t(1048)][t(3340)]():e.w("There is no style added to the map.")}[i(1387)](t,e){const r=i;return this._lazyInitEmptyStyle(),this.style[r(1387)](t,e),this[r(437)](!0)}isSourceLoaded(t){const r=i,o=this.style&&this[r(1048)].tileManagers[t];if(void 0!==o)return o.loaded();this.fire(new e.n(new Error(r(1547)+t+"'")))}[i(3248)](t){const r=i;if(this.style._checkLoaded(),this[r(1223)]&&this[r(1048)][r(1002)]("data",this[r(1223)]),t){const i=this[r(1048)][r(1217)][t.source];if(!i)throw new Error(r(1748)+t[r(1841)]);null===this.terrain&&i[r(2964)]();for(const i in this[r(1048)][r(3557)]){const o=this.style[r(3557)][i];"hillshade"===o.type&&o[r(1841)]===t[r(1841)]&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),r(816)===o.type&&o[r(1841)]===t.source&&e.w(r(1229))}this.terrain=new dl(this.painter,i,t),this[r(1258)].renderToTexture=new ml(this[r(1258)],this[r(3245)]),this.transform.setMinElevationForCurrentTile(this[r(3245)].getMinTileElevationForLngLatZoom(this.transform[r(1972)],this[r(1847)].tileZoom)),this.transform.setElevation(this[r(3245)][r(3380)](this.transform.center,this[r(1847)][r(2752)])),this[r(1223)]=e=>{const i=r;var o;"style"===e[i(2596)]?this[i(3245)][i(590)][i(1380)]():"source"===e[i(2596)]&&e.tile&&(e.sourceId!==t.source||this._elevationFreeze||(this.transform[i(2661)](this[i(3245)][i(2920)](this[i(1847)][i(1972)],this[i(1847)].tileZoom)),this[i(1910)]&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this[i(1847)][i(1972)],this[i(1847)][i(2752)]))),i(1873)===(null===(o=e.source)||void 0===o?void 0:o[i(2784)])?this[i(3245)].tileManager[i(1380)]():this.terrain.tileManager.freeRtt(e[i(1804)][i(3533)]))},this.style.on("data",this[r(1223)])}else this.terrain&&this[r(3245)][r(590)].destruct(),this.terrain=null,this.painter[r(3108)]&&this.painter.renderToTexture.destruct(),this[r(1258)][r(3108)]=null,this.transform[r(2661)](0),this[r(1910)]&&this[r(1847)][r(1119)](0);return this.fire(new e.o(r(3245),{terrain:t})),this}getTerrain(){const t=i;var e,r;return null!==(r=null===(e=this[t(3245)])||void 0===e?void 0:e[t(1666)])&&void 0!==r?r:null}[i(1482)](){const t=i,e=this.style&&this.style.tileManagers;for(const i of Object.values(e))if(!i[t(1482)]())return!1;return!0}[i(381)](t){return this.style[i(381)](t),this._update(!0)}getSource(t){return this.style.getSource(t)}setSourceTileLodParams(t,e,r){const o=i;if(r){const i=this.getSource(r);if(!i)throw new Error(o(2744)+r+'", cannot set LOD parameters');i[o(1473)]=Z(Math.max(1,t),Math.max(1,e))}else for(const i in this[o(1048)][o(1217)])this[o(1048)].tileManagers[i].getSource().calculateTileZoom=Z(Math[o(2153)](1,t),Math.max(1,e));return this[o(437)](!0),this}[i(3628)](t,r){const o=i,n=this[o(1048)][o(1217)][t];if(!n)throw new Error('There is no tile manager with ID "'+t+o(1342));void 0===r?n[o(2964)](!0):n.refreshTiles(r[o(1920)]((t=>new e.af(t.z,t.x,t.y))))}addImage(t,r,o={}){const n=i,{pixelRatio:s=1,sdf:a=!1,stretchX:l,stretchY:c,content:h,textFitWidth:u,textFitHeight:d}=o;if(this[n(2368)](),r instanceof HTMLImageElement||e.b(r)){const{width:i,height:o,data:p}=zr[n(1698)](r);return this[n(1048)][n(1112)](t,{data:new e.R({width:i,height:o},p),pixelRatio:s,stretchX:l,stretchY:c,content:h,textFitWidth:u,textFitHeight:d,sdf:a,version:0}),this}if(void 0===r[n(1422)]||void 0===r.height)return this[n(1430)](new e.n(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:i,height:o,data:p}=r,f=r;return this[n(1048)][n(1112)](t,{data:new e.R({width:i,height:o},new Uint8Array(p)),pixelRatio:s,stretchX:l,stretchY:c,content:h,textFitWidth:u,textFitHeight:d,sdf:a,version:0,userImage:f}),f[n(3540)]&&f.onAdd(this,t),this}}[i(1679)](t,r){const o=i,n=this[o(1048)].getImage(t);if(!n)return this.fire(new e.n(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const s=r instanceof HTMLImageElement||e.b(r)?zr.getImageData(r):r,{width:a,height:l,data:c}=s;if(void 0===a||void 0===l)return this[o(1430)](new e.n(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(a!==n[o(3100)][o(1422)]||l!==n[o(3100)][o(3282)])return this.fire(new e.n(new Error("The width and height of the updated image must be that same as the previous version of the image")));const h=!(r instanceof HTMLImageElement||e.b(r));return n[o(3100)][o(3486)](c,h),this[o(1048)].updateImage(t,n),this}getImage(t){return this.style[i(3388)](t)}[i(2016)](t){const r=i;return t?!!this.style.getImage(t):(this[r(1430)](new e.n(new Error("Missing required image id"))),!1)}removeImage(t){this[i(1048)].removeImage(t)}[i(1778)](t){const r=i;return ki.getImage(this[r(1700)][r(399)](t,"Image"),new AbortController).then((t=>{const{data:i}=t;return null==i?Promise.reject(new Error("Failed to load an image from the provided URL")):i instanceof HTMLImageElement||e.b(i)?i:Promise.reject(new Error("Loaded image has an unsupported type"))}))}listImages(){const t=i;return this[t(1048)][t(3130)]()}addCustomLayer(t,e){const r=i;return this._lazyInitEmptyStyle(),t.type=r(1645),this[r(1048)].addLayer(t,e),this[r(437)](!0)}[i(422)](t){const e=i;return this[e(1048)][e(327)]("string"==typeof t?t:t.id),this[e(437)](!0)}addLayer(t,e){return this[i(2368)](),this.style.addLayer(t,e),this._update(!0)}[i(1517)](t,e){const r=i;return this[r(1048)][r(1517)](t,e),this[r(437)](!0)}[i(327)](t){return this.style[i(327)](t),this._update(!0)}getLayer(t){const e=i;return this[e(1048)][e(518)](t)}[i(3107)](){return this[i(1048)].getLayersOrder()}setLayerZoomRange(t,e,r){const o=i;return this[o(1048)].setLayerZoomRange(t,e,r),this[o(437)](!0)}setFilter(t,e,r={}){const o=i;return this.style.setFilter(t,e,r),this[o(437)](!0)}getFilter(t){return this.style[i(2090)](t)}setPaintProperty(t,e,r,o={}){return this[i(1048)].setPaintProperty(t,e,r,o),this._update(!0)}[i(654)](t,e){return this.style[i(654)](t,e)}setLayoutProperty(t,e,i,r={}){return this.style.setLayoutProperty(t,e,i,r),this._update(!0)}[i(3660)](t,e){return this.style.getLayoutProperty(t,e)}[i(1219)](t,e={}){const r=i;return this._lazyInitEmptyStyle(),this.style[r(1219)](t,e),this[r(437)](!0)}[i(1329)](){const t=i;return this[t(1048)][t(1676)]()}addSprite(t,e,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(t,e,i,(t=>{t||this._update(!0)})),this}removeSprite(t){const e=i;return this._lazyInitEmptyStyle(),this[e(1048)].removeSprite(t),this._update(!0)}getSprite(){return this.style.getSprite()}[i(1620)](t,e={}){const r=i;return this._lazyInitEmptyStyle(),this[r(1048)].setSprite(t,e,(t=>{t||this[r(437)](!0)})),this}setLight(t,e={}){const r=i;return this._lazyInitEmptyStyle(),this.style.setLight(t,e),this[r(437)](!0)}getLight(){return this.style[i(1039)]()}[i(776)](t,e={}){const r=i;return this._lazyInitEmptyStyle(),this.style[r(776)](t,e),this[r(437)](!0)}[i(3201)](){return this.style.getSky()}[i(361)](t,e){return this[i(1048)].setFeatureState(t,e),this._update()}removeFeatureState(t,e){const r=i;return this[r(1048)].removeFeatureState(t,e),this[r(437)]()}[i(2873)](t){const e=i;return this[e(1048)][e(2873)](t)}getContainer(){return this[i(835)]}[i(2903)](){return this[i(2818)]}[i(2165)](){return this[i(738)]}_containerDimensions(){const t=i;let e=0,r=0;return this[t(835)]&&(e=this._container.clientWidth||400,r=this[t(835)].clientHeight||300),[e,r]}_setupContainer(){const t=i,e=this[t(835)];e[t(2975)][t(2926)](t(1336));const r=this._canvasContainer=Lr[t(325)](t(523),"maptec-canvas-container",e);this._interactive&&r[t(2975)][t(2926)](t(1437)),this[t(738)]=Lr[t(325)]("canvas",t(3136),r),this[t(738)].addEventListener(t(424),this._onCanvasPointerEnter,!1),this[t(738)][t(2689)](t(1894),this._onCanvasPointerLeave,!1),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener(t(1827),this._contextRestored,!1),this._canvas[t(1507)]("tabindex",this[t(1997)]?"0":"-1"),this._canvas[t(1507)](t(1756),this[t(1762)]("Map.Title")),this[t(738)][t(1507)](t(3568),"region");const o=this[t(1390)](),n=this._getClampedPixelRatio(o[0],o[1]);this._resizeCanvas(o[0],o[1],n);const s=this._controlContainer=Lr[t(325)]("div",t(2569),e),a=this[t(2254)]={};[t(2830),"top-right","bottom-left",t(3032)][t(799)]((e=>{a[e]=Lr.create(t(523),"maptec-ctrl-"+e+" ",s)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}[i(1209)](t){const e=i;if(!this[e(835)])return;e(3208)===window.getComputedStyle(this[e(835)]).position&&(this[e(835)][e(1048)].position=e(1250));const r=document[e(2737)](e(523));r.className=e(3238),r[e(1048)].cssText=[e(1247),"inset:0",e(470),e(664),"flex-direction:column",e(3162),e(3654),"background:#fff",e(2809),e(3224),e(2505),e(328),"padding:24px",e(740)][e(2533)](";");const o=document[e(2737)](e(523));o.style[e(1991)]=[e(2921),e(3183),"border-radius:50%","background:#bbb","color:#fff",e(664),e(3162),"justify-content:center",e(1776),e(2421),e(1066),"flex-shrink:0"][e(2533)](";"),o.textContent="!";const n=document[e(2737)]("p");n[e(1048)].cssText="margin:0;font-size:14px;color:#333;line-height:1.6;white-space:nowrap;",n.textContent="此页面未能正确加载 Maptec 地图。请打开浏览器控制了解详情。",r.appendChild(o),r[e(1324)](n),this._container[e(1324)](r),this[e(3250)]()}[i(3250)](){!function(t){const e=r,i="undefined"!=typeof window?window.location[e(745)]:e(2927),o="undefined"!=typeof window?window[e(3664)][e(3122)]:e(2927);console[e(640)](e(2526)),console.log(e(616),i),console[e(1163)](e(448),o),console.log(e(1601),l()),console[e(1163)](e(724),null!=t?t:"(尚未完成)"),console.groupEnd()}(this._authResult)}_resizeCanvas(t,e,r){const o=i;this._canvas.width=Math.floor(r*t),this[o(738)].height=Math.floor(r*e),this._canvas[o(1048)].width=t+"px",this[o(738)][o(1048)].height=e+"px"}_setupPainter(){const t=i,e=Object.assign(Object[t(2132)]({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let r=null;this._canvas.addEventListener("webglcontextcreationerror",(i=>{const o=t;r={requestedAttributes:e},i&&(r[o(1251)]=i.statusMessage,r[o(2784)]=i[o(2784)])}),{once:!0});let o=null;if(o=this._canvasContextAttributes.contextType?this[t(738)].getContext(this._canvasContextAttributes.contextType,e):this[t(738)][t(582)]("webgl2",e)||this[t(738)][t(582)]("webgl",e),!o){const e="Failed to initialize WebGL";throw r?(r[t(831)]=e,new Error(JSON.stringify(r))):new Error(e)}this.painter=new pa(o,this.transform),Or[t(932)](o)}[i(1542)](t,r){const o=i;super.migrateProjection(t,r),this[o(1258)].transform=t,this.fire(new e.o("projectiontransition",{newProjection:this.style.projection.name}))}[i(3340)](){const t=i;return!this[t(436)]&&!this._sourcesDirty&&!!this[t(1048)]&&this.style.loaded()}_update(t){const e=i;return this[e(1048)]&&this[e(1048)]._loaded?(this._styleDirty=this._styleDirty||t,this[e(1356)]=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}[i(459)](t){const r=i;var o,n,s,a,l;const h=this._idleTriggered?this._fadeDuration:0,u=(null===(o=this[r(1048)].projection)||void 0===o?void 0:o.transitionState)>0;if(this.painter[r(1249)].setDirty(),this[r(1258)][r(3391)](),this[r(1784)][r(2431)](t),this._removed)return;this[r(1136)].update(t);let d=!1;if(this.style&&this[r(436)]){this._styleDirty=!1;const t=this[r(1847)].zoom,i=c();this[r(1048)][r(2747)].update(t,i);const o=new e.K(t,{now:i,fadeDuration:h,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=o.crossFadingFactor();1===n&&n===this._crossFadingFactor||(d=!0,this[r(1063)]=n),this[r(1048)].update(o)}const p=(null===(n=this[r(1048)].projection)||void 0===n?void 0:n.transitionState)>0!==u;null===(s=this[r(1048)].projection)||void 0===s||s.setErrorQueryLatitudeDegrees(this.transform.center.latitude),this.transform.setTransitionState(null===(a=this.style[r(3645)])||void 0===a?void 0:a.transitionState,null===(l=this.style[r(3645)])||void 0===l?void 0:l[r(2842)]),this.style&&(this[r(1356)]||p)&&(this[r(1356)]=!1,this.style[r(2291)](this[r(1847)])),this[r(3245)]?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform[r(2661)](this.terrain[r(2920)](this.transform.center,this.transform[r(2752)])),!this[r(1819)]&&this._centerClampedToGround&&this.transform.setElevation(this[r(3245)][r(3380)](this[r(1847)][r(1972)],this.transform[r(2752)]))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this[r(1048)]._updatePlacement(this.transform,this.showCollisionBoxes,h,this[r(2995)],p),this.painter.render(this[r(1048)],{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this[r(928)](),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:h,showPadding:this[r(3211)]}),this.fire(new e.o("render")),this.loaded()&&!this._loaded&&(this[r(1408)]=!0,e.cN[r(584)](e.cO[r(3103)]),this.fire(new e.o(r(3103)))),this.style&&(this[r(1048)].hasTransitions()||d)&&(this[r(436)]=!0),this[r(1048)]&&!this[r(1200)]&&this.style._releaseSymbolFadeTiles();const f=this[r(1356)]||this[r(436)]||this[r(1200)];return f||this._repaint?this.triggerRepaint():!this[r(967)]()&&this[r(3340)]()&&this[r(1430)](new e.o("idle")),!this[r(1408)]||this[r(1404)]||f||(this[r(1404)]=!0,e.cN.mark(e.cO.fullLoad)),this}redraw(){const t=i;return this.style&&(this[t(1475)]&&(this[t(1475)][t(970)](),this[t(1475)]=null),this[t(459)](0)),this}remove(){const t=i;var r,o;this[t(483)]&&this._hash[t(2591)](),this[t(387)].removeAll();for(const e of this._controls)e[t(1593)](this);this[t(626)]=[],this._frameRequest&&(this._frameRequest[t(970)](),this[t(1475)]=null),this[t(1784)][t(1499)](),this[t(1136)].destroy(),this.painter[t(2355)](),null===(r=this.handlers)||void 0===r||r[t(2355)](),delete this[t(3483)],this[t(2977)](null),t(2354)!=typeof window&&removeEventListener("online",this[t(797)],!1),ki.removeThrottleControl(this[t(1452)]),null===(o=this._resizeObserver)||void 0===o||o[t(2716)]();const n=this[t(1258)].context.gl.getExtension(t(3481));(null==n?void 0:n.loseContext)&&n[t(2442)](),this[t(738)][t(841)](t(1827),this[t(850)],!1),this._canvas[t(841)](t(1099),this._contextLost,!1),this._canvas.removeEventListener("mouseenter",this[t(1255)],!1),this[t(738)].removeEventListener("mouseleave",this._onCanvasPointerLeave,!1),Lr[t(2591)](this[t(2818)]),Lr[t(2591)](this[t(1825)]),this._container.removeEventListener(t(1477),this[t(3528)],!1),this[t(835)].classList.remove("maptec-map"),e.cN.clearMetrics(),this._removed=!0,this.fire(new e.o(t(2355)))}destroy(){this[i(2591)]()}[i(1106)](){const t=i;this.style&&!this[t(1475)]&&(this._frameRequest=new AbortController,zr.frame(this[t(1475)],(i=>{const r=t;e.cN[r(2735)](i),this._frameRequest=null;try{this[r(459)](i)}catch(t){if(!e.a0(t)&&t[r(831)]!==ia)throw t}}),(()=>{})))}get[i(1107)](){return!!this._showTileBoundaries}set[i(1107)](t){const e=i;this._showTileBoundaries!==t&&(this[e(1983)]=t,this[e(437)]())}get[i(3211)](){return!!this[i(3066)]}set showPadding(t){this._showPadding!==t&&(this[i(3066)]=t,this._update())}get[i(3106)](){return!!this._showCollisionBoxes}set showCollisionBoxes(t){const e=i;this[e(3125)]!==t&&(this[e(3125)]=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){const e=i;this[e(319)]!==t&&(this[e(319)]=t,this[e(437)]())}get[i(1586)](){return!!this._repaint}set repaint(t){this[i(3408)]!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set[i(1041)](t){this._vertices=t,this._update()}get[i(1537)](){return tc}getCameraTargetElevation(){return this.transform[i(1708)]}[i(1411)](){return this.style[i(1411)]()}[i(649)](t){const e=i;return this._lazyInitEmptyStyle(),this[e(1048)].setProjection(t),this._update(!0)}get[i(1280)](){const t=i;return{center:this[t(1972)],zoom:this[t(3512)],bearing:this.bearing,pitch:this[t(882)]}}set[i(1280)](t){const e=i;var r,o,n,s;const a=this.viewState,l={center:null!==(r=t.center)&&void 0!==r?r:a.center,zoom:null!==(o=t.zoom)&&void 0!==o?o:a.zoom,bearing:null!==(n=t.bearing)&&void 0!==n?n:a[e(1121)],pitch:null!==(s=t.pitch)&&void 0!==s?s:a[e(882)]};this[e(2808)](l)}[i(3558)](){const t=i;return[["dragPan",this.dragPan],[t(2755),this[t(2755)]],[t(3514),this.doubleClickZoom],["scrollZoom",this.scrollZoom],["keyboard",this[t(1654)]],[t(2812),this.boxZoom]]}get interactive(){const t=i;return Object.fromEntries(this[t(3558)]()[t(1920)]((([t,e])=>[t,e.isEnabled()])))}set[i(905)](t){const e=i;for(const[i,r]of this[e(3558)]()){const o=t[i];void 0!==o&&(o?r[e(1573)]():r.disable())}}};const rc={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class oc{constructor(){const t=i;this[t(1551)]=()=>{const e=t,i=this[e(830)][e(3512)],r=i===this[e(830)][e(1239)],o=i===this[e(830)][e(1630)];this[e(3583)][e(2008)]=r,this[e(3203)][e(2008)]=o,this[e(3583)][e(1507)](e(1058),r[e(2289)]()),this._zoomOutButton[e(1507)](e(1058),o[e(2289)]())},this._rotateCompassArrow=()=>{const e=t;this[e(456)][e(1048)][e(1847)]=this[e(1666)].visualizePitch&&this.options[e(389)]?"scale("+1/Math[e(2916)](Math[e(3602)](this[e(830)].transform[e(1809)]),.5)+") rotateZ("+-this._map[e(1847)][e(3579)]+e(2790)+this._map[e(1847)][e(882)]+"deg) rotateZ("+-this[e(830)][e(1847)].bearing+e(1810):this.options[e(1648)]?"scale("+1/Math[e(2916)](Math[e(3602)](this._map[e(1847)].pitchInRadians),.5)+") rotateX("+this[e(830)][e(1847)][e(882)]+e(3145)+-this._map[e(1847)].bearing+e(1810):this.options.visualizeRoll?e(3510)+(-this._map.transform.bearing-this[e(830)][e(1847)].roll)+e(1810):e(3510)+-this[e(830)][e(1847)].bearing+e(1810)},this[t(606)]=(e,i)=>{const r=t,o=this[r(830)]._getUIString(r(2061)+i);e[r(2695)]=o,e.setAttribute("aria-label",o)},this[t(1666)]=e.e({},rc),this._container=Lr.create(t(523),t(546)),this[t(835)][t(1048)].boxShadow=t(3322),this._container[t(1048)].borderRadius="14px",this[t(835)][t(2689)]("contextmenu",(t=>t.preventDefault())),this[t(1666)][t(2979)]&&!this[t(1666)][t(2840)]&&this._container[t(2975)][t(2926)](t(2786)),this.options[t(2840)]&&(this[t(3583)]=this._createButton(t(551),(e=>Ea.prototype.zoomIn[t(3054)](this._map,{},{originalEvent:e}))),this._applyDefaultStyle(this._zoomInButton),Lr[t(325)]("span",t(3600),this._zoomInButton).setAttribute("aria-hidden","true"),this[t(3203)]=this._createButton(t(2119),(e=>Ea.prototype[t(1154)][t(3054)](this[t(830)],{},{originalEvent:e}))),this._applyDefaultStyle(this._zoomOutButton),Lr.create(t(2441),"maptec-ctrl-icon",this[t(3203)]).setAttribute(t(909),t(985))),this.options[t(2979)]&&(this[t(3399)]=this[t(547)](t(2222),(e=>{const i=t;this.options[i(1648)]?this._map[i(2874)]({},{originalEvent:e}):this._map[i(987)]({},{originalEvent:e})})),this._applyDefaultStyle(this._compass),this._compassIcon=Lr[t(325)](t(2441),t(3600),this._compass),this._compassIcon[t(1507)](t(909),t(985)))}onAdd(t){const e=i;return this[e(830)]=t,this[e(1666)][e(2840)]&&(this._setButtonTitle(this[e(3583)],e(431)),this[e(606)](this[e(3203)],e(447)),this[e(830)].on(e(3512),this[e(1551)]),this[e(1551)]()),this[e(1666)][e(2979)]&&(this._setButtonTitle(this._compass,"ResetBearing"),this[e(1666)].visualizePitch&&this._map.on(e(882),this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on(e(3579),this._rotateCompassArrow),this._map.on("rotate",this[e(3155)]),this._rotateCompassArrow(),this[e(3174)]=new nc(this._map,this[e(3399)],this[e(1666)][e(1648)])),this[e(835)]}[i(1593)](){const t=i;Lr[t(2591)](this._container),this.options.showZoom&&this[t(830)][t(1002)]("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options[t(1648)]&&this[t(830)].off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map[t(1002)](t(3579),this._rotateCompassArrow),this._map[t(1002)](t(1752),this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(t,e){const r=i,o=Lr.create("button",t,this._container);return o[r(2784)]=r(1625),o[r(2689)]("click",e),o}[i(1509)](t){const e=i;t[e(1048)][e(1422)]=e(1308),t.style.height=e(1308),t.style[e(1022)]=e(1088),t[e(1048)][e(3400)]="8px",t[e(1048)][e(3147)]="none",t[e(1048)][e(1302)]=e(1088)}}class nc{constructor(t,o,n=!1){const s=i;this.mousedown=t=>{const e=r;this[e(503)](t,Lr.mousePos(this.element,t)),Lr[e(2689)](window,"mousemove",this.mousemove),Lr[e(2689)](window,e(817),this[e(817)])},this[s(1598)]=t=>{const e=s;this[e(709)](t,Lr[e(574)](this[e(1172)],t))},this[s(817)]=t=>{this[s(1444)].dragEnd(t),this.offTemp()},this[s(2075)]=t=>{const e=s;1!==t[e(1805)].length?this.reset():(this[e(303)]=this._lastPos=Lr[e(936)](this[e(1172)],t.targetTouches)[0],this.startMove(t,this._startPos),Lr.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),Lr[e(2689)](window,"touchend",this[e(3684)]))},this.touchmove=t=>{const e=s;1!==t.targetTouches[e(953)]?this.reset():(this[e(3151)]=Lr.touchPos(this[e(1172)],t[e(1805)])[0],this.move(t,this._lastPos))},this[s(3684)]=t=>{const e=s;0===t[e(1805)][e(953)]&&this._startPos&&this[e(3151)]&&this._startPos.dist(this._lastPos)<this[e(3420)]&&this.element[e(1024)](),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{const t=s;this[t(1444)].reset(),delete this[t(303)],delete this._lastPos,this[t(1723)]()},this._clickTolerance=10,this[s(1172)]=o;const a=new Ba;this._rotatePitchHandler=new Da({clickTolerance:3,move:(t,i)=>{const r=s,a=o.getBoundingClientRect(),l=new e.P((a.bottom-a[r(3419)])/2,(a[r(465)]-a[r(2367)])/2);return{bearingDelta:e.cD(new e.P(t.x,i.y),i,l),pitchDelta:n?-.5*(i.y-t.y):void 0}},moveStateManager:a,enable:!0,assignEvents:()=>{}}),this[s(1920)]=t,Lr.addEventListener(o,"mousedown",this[s(1476)]),Lr[s(2689)](o,"touchstart",this[s(2075)],{passive:!1}),Lr.addEventListener(o,s(2579),this[s(2181)])}[i(503)](t,e){const r=i;this._rotatePitchHandler[r(3502)](t,e),Lr[r(818)]()}move(t,e){const r=i,o=this.map,{bearingDelta:n,pitchDelta:s}=this._rotatePitchHandler[r(1938)](t,e)||{};n&&(o[r(1121)]=o.bearing+n),s&&(o[r(882)]=o.pitch+s)}off(){const t=i,e=this[t(1172)];Lr[t(841)](e,t(1476),this[t(1476)]),Lr.removeEventListener(e,"touchstart",this[t(2075)],{passive:!1}),Lr[t(841)](window,"touchmove",this[t(3175)],{passive:!1}),Lr[t(841)](window,"touchend",this.touchend),Lr.removeEventListener(e,t(2579),this[t(2181)]),this.offTemp()}[i(1723)](){const t=i;Lr.enableDrag(),Lr[t(841)](window,t(1598),this.mousemove),Lr[t(841)](window,t(817),this[t(817)]),Lr.removeEventListener(window,"touchmove",this[t(3175)],{passive:!1}),Lr.removeEventListener(window,t(3684),this[t(3684)])}}const sc={maxWidth:100,unit:i(907)};class ac{constructor(t){const e=i;this._onMove=()=>{_i(this._map,this._container,this.options)},this[e(3285)]=t=>{this[e(1666)].unit=t,_i(this._map,this._container,this.options)},this[e(1666)]=Object[e(2132)](Object.assign({},sc),t)}getDefaultPosition(){return"bottom-left"}[i(3540)](t){const e=i;return this[e(830)]=t,this._container=Lr.create("div",e(2336),t[e(3431)]()),this._map.on(e(709),this[e(1782)]),this._onMove(),this._container}[i(1593)](){const t=i;Lr[t(2591)](this[t(835)]),this._map.off("move",this._onMove),this._map=void 0}}class lc extends e.E{constructor(){const t=i;super(),this[t(1508)]=()=>{const e=t;var i;let r=window.document.fullscreenElement||window[e(3016)].mozFullScreenElement||window[e(3016)][e(3205)]||window[e(3016)][e(2463)];for(;null===(i=null==r?void 0:r[e(1323)])||void 0===i?void 0:i.fullscreenElement;)r=r[e(1323)].fullscreenElement;r===this._container!==this[e(2406)]&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{const e=t;this._isFullscreen()?this._exitFullscreen():this[e(2240)]()},this[t(2406)]=!1,"onfullscreenchange"in document?this[t(1241)]="fullscreenchange":t(779)in document?this[t(1241)]="mozfullscreenchange":"onwebkitfullscreenchange"in document?this[t(1241)]="webkitfullscreenchange":t(804)in document&&(this._fullscreenchange=t(1202))}[i(3540)](t){const e=i;return this._map=t,this._container||(this[e(835)]=this[e(830)][e(3431)]()),this[e(1825)]=Lr[e(325)](e(523),e(546)),this._controlContainer.style.boxShadow=e(3322),this._controlContainer.style[e(1302)]="14px",this._setupUI(),this._controlContainer}onRemove(){const t=i;Lr.remove(this[t(1825)]),this._map=null,window[t(3016)].removeEventListener(this[t(1241)],this[t(1508)])}[i(3159)](){const t=i,e=this[t(3377)]=Lr.create("button","maptec-ctrl-fullscreen",this._controlContainer);this[t(1509)](e),Lr.create(t(2441),t(3600),e)[t(1507)](t(909),t(985)),e.type="button",this[t(2781)](),this._fullscreenButton[t(2689)](t(1024),this._onClickFullscreen),window.document.addEventListener(this[t(1241)],this[t(1508)])}_applyDefaultStyle(t){const e=i;t.style.width=e(1308),t[e(1048)].height="36px",t[e(1048)].padding=e(1088),t.style.margin="8px",t.style.border=e(3322),t[e(1048)][e(1302)]="8px"}_updateTitle(){const t=i,e=this._getTitle();this[t(3377)][t(1507)]("aria-label",e),this._fullscreenButton.title=e}[i(3034)](){const t=i;return this[t(830)]._getUIString(this[t(1897)]()?t(3357):"FullscreenControl.Enter")}[i(1897)](){return this._fullscreen}[i(2461)](){const t=i;this._fullscreen=!this._fullscreen,this[t(3377)][t(2975)][t(3611)](t(2088)),this._fullscreenButton[t(2975)].toggle("maptec-ctrl-fullscreen"),this[t(2781)](),this[t(2406)]?(this.fire(new e.o(t(493))),this._prevCooperativeGesturesEnabled=this[t(830)].cooperativeGestures[t(3610)](),this[t(830)][t(897)][t(620)]()):(this[t(1430)](new e.o("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map[t(897)].enable())}_exitFullscreen(){const t=i;window[t(3016)][t(1758)]?window.document[t(1758)]():window[t(3016)].mozCancelFullScreen?window.document.mozCancelFullScreen():window[t(3016)][t(2686)]?window.document[t(2686)]():window.document[t(1765)]?window[t(3016)][t(1765)]():this._togglePseudoFullScreen()}[i(2240)](){const t=i;this._container.requestFullscreen?this[t(835)].requestFullscreen():this._container.mozRequestFullScreen?this[t(835)].mozRequestFullScreen():this._container[t(3014)]?this[t(835)][t(3014)]():this[t(835)][t(1721)]?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){const t=i;this[t(835)].classList.toggle(t(3194)),this[t(2461)](),this._map[t(2820)]()}}class cc{constructor(){const t=i;this[t(2608)]=()=>{const e=t;if(!this[e(456)])return;const i=this[e(830)].pitch;this[e(456)].style.transform=e(900)+-this._map[e(1121)]+"deg)";const r=Math.abs(i)>.1;if(this[e(2269)])if(this._compassIconInner.classList.toggle("is-3d",r),r){const t=Math.max(.5,Math[e(3602)](i*Math.PI/180));this._compassIconInner[e(1048)].transform=e(2415)+t+")"}else this._compassIconInner.style[e(1847)]=e(2783)},this[t(1607)]=e=>{const i=t;e[i(911)](),e[i(3346)](),this._map[i(1121)]=this[i(830)].bearing-this[i(1666)].rotationStep},this._rotateRight=e=>{const i=t;e.preventDefault(),e[i(3346)](),this._map.bearing=this._map[i(1121)]+this[i(1666)].rotationStep},this[t(1783)]=e=>{const i=t;e[i(911)](),e.stopPropagation();const r=function(t){let e=t%360;return e<=-180&&(e+=360),e>180&&(e-=360),e}(this[i(830)][i(1121)]);if(!(Math[i(1201)](r)<.5))return void this[i(830)].easeTo({bearing:0,duration:500});const o=Math[i(1201)](this._map.pitch)>.1;this[i(830)][i(1665)]({pitch:o?0:60,duration:500})},this[t(1666)]={position:"top-right",width:56,height:56,rotationStep:15}}[i(3617)](){return this[i(1666)].position||"top-right"}onAdd(t){const e=i;this._map=t,this[e(835)]=Lr[e(325)](e(523),"maptec-ctrl maptec-ctrl-compass-circle");const r=this[e(1666)][e(1422)],o=this[e(1666)].height;this._container[e(1048)][e(1422)]=r+"px",this._container.style[e(3282)]=o+"px";const n=Lr.create(e(1625),"maptec-ctrl-compass-btn",this._container);return n[e(2784)]="button",this[e(606)](n,"ResetBearing"),n[e(2689)]("click",this[e(1783)]),n[e(1048)][e(1422)]=r+"px",n.style[e(3282)]=o+"px",this[e(456)]=Lr.create(e(523),"maptec-ctrl-compass-icon",n),this._compassIcon.style.width=r+"px",this._compassIcon[e(1048)].height=o+"px",this._compassIconInner=Lr.create("div",e(1857),n),this._map.on("rotate",this._updateRotation),this[e(830)].on("pitch",this._updateRotation),this[e(2608)](),this[e(835)]}onRemove(){const t=i;Lr.remove(this._container),this._map&&(this._map[t(1002)]("rotate",this[t(2608)]),this[t(830)].off(t(882),this[t(2608)])),this._map=void 0}[i(606)](t,e){const r=i,o=this._map[r(1762)]("NavigationControl."+e);t.setAttribute(r(1756),o),t[r(2695)]=o}}class hc{_tuneOverviewText(){const t=i;var e;if(!this[t(1074)])return;const r=this._overviewMap[t(1440)](),o=null==r?void 0:r[t(1643)];if(o)for(const i of o)if(i&&t(1078)===i.type&&(null===(e=i.layout)||void 0===e?void 0:e["text-field"]))try{this._overviewMap.setLayoutProperty(i.id,"text-size",10)}catch(t){}}constructor(t){const r=i;var o,n,s;this[r(1074)]=null,this[r(1617)]=r(1920),this._mapEventHandlers=[],this[r(769)]=[],this[r(2825)]=!1,this[r(484)]=null,this[r(511)]=null,this[r(2986)]=null,this[r(2954)]=null,this[r(2241)]=null,this._onOverviewPointerDown=null,this[r(1210)]=null,this._onOverviewPointerUp=null,this[r(1295)]=null;const a=null!=t?t:{};this.options={zoomDiff:null!==(o=a[r(3586)])&&void 0!==o?o:4,overviewBoxColor:a[r(2866)]||r(1930),width:null!==(n=a[r(1422)])&&void 0!==n?n:"150px",height:null!==(s=a.height)&&void 0!==s?s:"100px"},this[r(2904)]=r(1541)+e.ai()}[i(3617)](){return i(3032)}onAdd(t){const e=i;this._map=t,this._container=Lr[e(325)](e(523),e(2219));const r=e(2534)==typeof this[e(1666)].height?this.options.height+"px":this[e(1666)][e(3282)];this[e(835)].style[e(1422)]=e(2534)==typeof this.options[e(1422)]?this.options[e(1422)]+"px":this.options.width,this[e(835)][e(1048)][e(3282)]=r;const o=t[e(1440)]();this._overviewMap=new ic({container:this[e(835)],style:o,center:t[e(1972)],zoom:t[e(3512)]-this.options[e(3586)],interactive:!1,isHawkeyeMap:!0,canvasContextAttributes:{preserveDrawingBuffer:!0}}),requestAnimationFrame((()=>{const t=e;var i;if(this[t(1074)]&&this._container&&this._container.parentNode){this[t(1074)].resize();const e=this[t(835)][t(2973)](t(3414));null===(i=null==e?void 0:e.parentElement)||void 0===i||i.remove()}}));const n=()=>{const t=e;var i,r,o,n,s,a,l;this[t(1074)]&&(null===(i=this._overviewMap.dragPan)||void 0===i||i[t(620)](),null===(r=this[t(1074)].scrollZoom)||void 0===r||r.disable(),null===(o=this._overviewMap[t(2812)])||void 0===o||o.disable(),null===(n=this._overviewMap[t(3514)])||void 0===n||n[t(620)](),null===(s=this[t(1074)].dragRotate)||void 0===s||s[t(620)](),null===(a=this._overviewMap.keyboard)||void 0===a||a[t(620)](),null===(l=this._overviewMap[t(2802)])||void 0===l||l[t(620)]())};n();const s=()=>{const i=e;if(!this[i(1074)])return;const r=t[i(1440)]();this[i(1074)]._setStyle(r),this[i(1074)].once("style.load",(()=>this._tuneOverviewText()))};t.on(e(3354),s),this[e(1064)][e(2315)]({event:"style.load",handler:s});const a=()=>{const t=e;var i;if(!this._overviewMap)return;n();const r=this._container[t(2973)](t(3414));null===(i=null==r?void 0:r.parentElement)||void 0===i||i.remove(),this._tuneOverviewText(),this._overviewMap[t(1387)](this[t(2904)],{type:"geojson",data:{type:t(401),geometry:{type:"Polygon",coordinates:[]},properties:null}}),this[t(1074)].addLayer({id:this._overviewBoxSourceId,type:"line",source:this._overviewBoxSourceId,paint:{"line-color":this.options[t(2866)],"line-width":1},layout:{visibility:t(3404)}}),this[t(2538)]()};this[e(1074)].on("load",a),this._overviewMapEventHandlers.push({event:"load",handler:a});const l=()=>{const i=e;this._overviewMap&&(this._overviewMap[i(1972)]=t[i(1972)],this._updateOverviewBox())},c=()=>{const i=e;i(1920)===this[i(1617)]&&this[i(1074)]&&(this[i(1074)].center=t[i(1972)],this[i(1074)][i(3512)]=t.zoom-this.options.zoomDiff,this[i(2538)]())},h=()=>{const i=e;this._overviewMap&&(t[i(1972)]=this[i(1074)][i(1972)],this[i(2538)]())},u=()=>{this[e(1617)]="map"},d=()=>{this[e(1617)]="overviewmap"};t.on(e(1917),l),t.on(e(3512),c),t.on(e(709),c),t.on(e(2672),u),this._mapEventHandlers[e(2315)]({event:e(1917),handler:l},{event:e(3512),handler:c},{event:e(709),handler:c},{event:"mouseover",handler:u}),this._overviewMap&&(this[e(1074)].on(e(1917),h),this._overviewMap.on(e(2672),d),this._overviewMapEventHandlers.push({event:"drag",handler:h},{event:e(2672),handler:d}));const p=t=>{const i=e,r=this[i(835)].getBoundingClientRect();return[t[i(1526)]-r[i(2367)],t[i(744)]-r[i(3419)]]},f=t=>{const i=e;if(!this._overviewMap||!this._lastOverviewBoxCoords||this._lastOverviewBoxCoords[i(953)]<4)return!1;const[r,o]=p(t);return((t,e)=>{const r=i;let o=!1;for(let i=0,n=e[r(953)]-1;i<e[r(953)];n=i++){const r=e[i].x,s=e[i].y,a=e[n].y;s>t.y!=a>t.y&&t.x<(e[n].x-r)*(t.y-s)/(a-s||1e-12)+r&&(o=!o)}return o})({x:r,y:o},this._lastOverviewBoxCoords[i(1557)](0,-1).map((t=>this._overviewMap.project({longitude:t[0],latitude:t[1]})))[i(1920)]((t=>({x:t.x,y:t.y}))))},m=t=>{const i=e;var r,o;if(!this._isDraggingInOverview)return;this[i(2825)]=!1;const n=this._dragBoxDelta,s=this._mainDragStartCenter;this._overviewDragStartLngLat=null,this._mainDragStartCenter=null,this[i(2986)]=null,this[i(2954)]=null;try{null===(o=(r=this._container).releasePointerCapture)||void 0===o||o.call(r,t[i(3321)])}catch(t){}if(n&&s){const t=[s.longitude+n.longitude,s[i(2329)]+n.latitude],e=450;let r=this._overviewMap?2:1;const o=()=>{r-=1,r<=0&&this[i(2538)]()},a=(t,e,r)=>{(null==t?void 0:t.once)?t[i(2143)](e,r):t.on(e,(function i(){r(),t.off(e,i)}))};this[i(1074)]&&(this._overviewMap[i(1665)]({center:t,duration:e}),a(this[i(1074)],"moveend",o)),this._map.easeTo({center:t,duration:e}),a(this._map,i(2443),o)}else this._updateOverviewBox();t[i(911)]()};return this[e(835)][e(1048)][e(3646)]="none",this._container.addEventListener(e(2570),(t=>t.preventDefault()),{passive:!1}),this[e(835)][e(2689)](e(367),(t=>t[e(911)]())),this[e(2996)]=t=>{const i=e;var r,o;if(!this[i(1074)])return;if("number"==typeof t[i(1625)]&&0!==t[i(1625)])return;if(!f(t))return;this._isDraggingInOverview=!0;const[n,s]=p(t),a=this[i(1074)].unproject([n,s]);this[i(484)]={longitude:a.longitude,latitude:a[i(2329)]};const l=this._map.center;this._mainDragStartCenter={longitude:l[i(3396)],latitude:l[i(2329)]},this._dragBoxDelta={longitude:0,latitude:0},this._dragBoxStartCoords=this[i(2241)]?this._lastOverviewBoxCoords.map((t=>[t[0],t[1]])):null,null===(o=(r=this[i(835)]).setPointerCapture)||void 0===o||o[i(3054)](r,t[i(3321)]),t[i(911)]()},this[e(1210)]=t=>{const i=e;if(!this[i(1074)])return;if(!this._isDraggingInOverview)return void(this[i(835)][i(1048)][i(906)]=f(t)?i(3589):"");if(!this._isDraggingInOverview||!this[i(484)]||!this[i(2986)])return;const[r,o]=p(t),n=this[i(1074)].unproject([r,o]),s=n.longitude-this._overviewDragStartLngLat.longitude,a=n[i(2329)]-this._overviewDragStartLngLat[i(2329)];this[i(2954)]={longitude:s,latitude:a};const l=this._overviewMap.getSource(this._overviewBoxSourceId);if(l){const t=this[i(2986)][i(1920)]((t=>[t[0]+s,t[1]+a]));this._lastOverviewBoxCoords=t,l.setData({type:i(401),geometry:{type:"Polygon",coordinates:[t]},properties:null})}t.preventDefault()},this[e(1293)]=m,this._onOverviewPointerCancel=m,this._container.addEventListener("pointerdown",this[e(2996)]),this[e(835)].addEventListener(e(464),this[e(1210)]),this[e(835)][e(2689)]("pointerup",this._onOverviewPointerUp),this[e(835)][e(2689)](e(1663),this[e(1295)]),this[e(835)]}onRemove(t){const e=i;if(this[e(830)])for(const{event:t,handler:i}of this[e(1064)])this._map[e(1002)](t,i);if(this._overviewMap){for(const{event:t,handler:i}of this._overviewMapEventHandlers)this[e(1074)].off(t,i);this[e(1074)].remove(),this[e(1074)]=null}this[e(835)]&&this[e(835)].parentNode&&(this._onOverviewPointerDown&&this._container[e(841)](e(3017),this[e(2996)]),this._onOverviewPointerMove&&this[e(835)][e(841)]("pointermove",this[e(1210)]),this[e(1293)]&&this[e(835)][e(841)](e(3573),this._onOverviewPointerUp),this[e(1295)]&&this._container.removeEventListener("pointercancel",this[e(1295)]),this._container[e(537)].removeChild(this._container)),this._map=void 0,this[e(1064)]=[],this._overviewMapEventHandlers=[],this._onOverviewPointerDown=null,this[e(1210)]=null,this[e(1293)]=null,this._onOverviewPointerCancel=null}[i(2538)](){const t=i;if(!this[t(830)]||!this._overviewMap)return;const e=this._map.getBounds(),r=e.getSouthWest(),o=e[t(3618)]();this._lastOverviewBoxCoords=[[r[t(3396)],o.latitude],[o.longitude,o[t(2329)]],[o[t(3396)],r.latitude],[r.longitude,r.latitude],[r.longitude,o.latitude]];const n=this._overviewMap.getSource(this._overviewBoxSourceId);n&&n[t(3063)]({type:t(401),geometry:{type:t(2064),coordinates:[[[r.longitude,o.latitude],[o.longitude,o.latitude],[o[t(3396)],r[t(2329)]],[r.longitude,r.latitude],[r.longitude,o[t(2329)]]]]},properties:null})}}const uc={center:i(1867),top:"translate(-50%,0)","top-left":i(2113),"top-right":"translate(-100%,0)",bottom:i(472),"bottom-left":"translate(0,-100%)","bottom-right":i(692),left:"translate(0,-50%)",right:"translate(-100%,-50%)"},dc={closeButton:!0,closeOnClick:!1,focusAfterOpen:!0,className:"",maxWidth:i(1791),subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},pc=["a[href]","[tabindex]:not([tabindex='-1'])",i(1196),"button:not([disabled])","input:not([disabled])",i(2875),i(2087)][i(2533)](", ");class fc extends e.E{constructor(t){const r=i;super(),this[r(3087)]=()=>{const t=r;if(void 0===this[t(1666)][t(1317)])return;const e=this.position;e&&(this[t(835)][t(1048)].opacity=this._map.transform.isLocationOccluded(e)?""+this[t(1666)].locationOccludedOpacity:"")},this._remove=()=>(this[r(835)]&&(Lr[r(2591)](this._container),delete this._container),this._map&&(this._map[r(1002)]("move",this[r(437)]),this[r(830)].off("move",this[r(2408)]),this[r(830)][r(1002)](r(1024),this[r(2408)]),this[r(830)][r(1002)](r(2355),this._remove),this._map[r(1002)]("mousemove",this._onMouseMove),this[r(830)].off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this[r(830)][r(2818)][r(2975)][r(2591)]("maptec-track-pointer"),delete this[r(830)],this[r(1430)](new e.o(r(364)))),this),this._onMouseUp=t=>{this._update(t.point)},this._onMouseMove=t=>{this._update(t[r(2965)])},this[r(3582)]=t=>{this[r(437)](t.point)},this._update=t=>{const e=r;if(!this._map||!this[e(1169)]&&!this._trackPointer||!this[e(532)])return;if(!this[e(835)]){if(this[e(835)]=Lr[e(325)]("div",e(3050),this._map.getContainer()),this._tip=Lr.create("div","maptec-popup-tip",this[e(835)]),this._container.appendChild(this._content),this.options[e(2568)])for(const t of this[e(1666)][e(2568)].split(" "))this._container[e(2975)].add(t);this[e(2277)]&&this._closeButton[e(1507)](e(1756),this[e(830)][e(1762)]("Popup.Close")),this._trackPointer&&this._container.classList.add(e(2503))}if(this[e(1666)][e(3039)]&&this[e(835)].style.maxWidth!==this.options.maxWidth&&(this[e(835)][e(1048)].maxWidth=this[e(1666)].maxWidth),this[e(1169)]&&(this[e(1169)]=gi(this[e(1169)],this._flatPos,this._map[e(1847)],this._trackPointer)),this._trackPointer&&!t)return;const i=this._flatPos=this._screenAnchorPoint=this._trackPointer&&t?t:this._map.project(this._position);this[e(830)].terrain&&(this._flatPos=this._trackPointer&&t?t:this[e(830)].transform[e(2985)](this[e(1169)]));let o=this[e(1666)][e(716)];const n=xi(this[e(1666)].offset);if(!o){const t=this._container[e(2930)],r=this._container.offsetHeight,s=function(t){const i=e;var r,o,n,s;return t?{top:null!==(r=t[i(3419)])&&void 0!==r?r:0,right:null!==(o=t[i(465)])&&void 0!==o?o:0,bottom:null!==(n=t.bottom)&&void 0!==n?n:0,left:null!==(s=t.left)&&void 0!==s?s:0}:{top:0,right:0,bottom:0,left:0}}(this[e(1666)][e(1022)]);let a;a=i.y+n[e(611)].y<r+s.top?["top"]:i.y>this[e(830)][e(1847)].height-r-s[e(611)]?["bottom"]:[],i.x<t/2+s[e(2367)]?a.push("left"):i.x>this[e(830)][e(1847)].width-t/2-s.right&&a.push("right"),o=0===a.length?"bottom":a.join("-")}let s=i.add(n[o]);this[e(1666)][e(3522)]||(s=s.round()),Lr[e(2955)](this[e(835)],uc[o]+e(1036)+s.x+"px,"+s.y+"px)"),vi(this[e(835)],o,"popup"),this[e(3087)]()},this[r(2408)]=()=>{this._remove()},this[r(1666)]=e.e(Object.create(dc),t),this[r(3368)]=!1,t&&t[r(1288)]&&(this._position=e.X.convert(t[r(1288)])),t&&t.html&&(this.html=t.html),t&&t[r(2800)]&&(this.text=t[r(2800)])}_addTo(t){const r=i;if(this[r(3263)]())throw new Error(r(2515));return this._map&&this[r(2435)](),this[r(830)]=t,this.options[r(768)]&&this._map.on("click",this._onClose),this[r(1666)].closeOnMove&&this[r(830)].on(r(709),this._onClose),this[r(830)].on("destroy",this._remove),this[r(437)](),this[r(2316)](),this[r(346)]?(this[r(830)].on(r(1598),this[r(3040)]),this[r(830)].on(r(817),this._onMouseUp),this._container&&this[r(835)][r(2975)][r(2926)]("maptec-popup-track-pointer"),this[r(830)][r(2818)].classList[r(2926)](r(1552))):this._map.on(r(709),this[r(437)]),this.fire(new e.o("open")),this}[i(3263)](){return this._destroyed}isOpen(){return!!this._map}[i(2355)](){const t=i;this._destroyed=!0,this[t(2435)](),this._content&&(this[t(532)]=null),this[t(835)]&&(this[t(835)]=null),this._position=void 0,this._screenAnchorPoint=null,this[t(662)]=null}get[i(1288)](){return this._position}set[i(1288)](t){const r=i;this._position=e.X.convert(t),this._screenAnchorPoint=null,this._flatPos=null,this._trackPointer=!1,this[r(437)](),this._map&&(this[r(830)].on("move",this._update),this[r(830)].off(r(1598),this[r(3040)]),this[r(835)]&&this._container.classList.remove("maptec-popup-track-pointer"),this._map[r(2818)][r(2975)].remove(r(1552)))}trackPointer(){const t=i;return this._trackPointer=!0,this._screenAnchorPoint=null,this._flatPos=null,this[t(437)](),this[t(830)]&&(this._map.off("move",this._update),this[t(830)].on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this[t(835)]&&this._container[t(2975)][t(2926)](t(2503)),this[t(830)][t(2818)].classList[t(2926)]("maptec-track-pointer")),this}[i(775)](){return this._container}get[i(2800)](){const t=i;return this[t(1666)][t(2800)]}set[i(2800)](t){const e=i;this[e(1666)][e(2800)]=t,this[e(1666)].html=void 0,this[e(642)](document[e(1803)](t))}get html(){return this.options[i(1890)]}set html(t){const e=i;this.options.html=t,this.options[e(2800)]=void 0;const r=document.createDocumentFragment(),o=document.createElement("body");let n;for(o[e(1858)]=t;n=o.firstChild,n;)r.appendChild(n);this[e(642)](r)}get[i(3039)](){return this.options.maxWidth}set[i(3039)](t){const e=i;this[e(1666)][e(3039)]=t,this[e(437)]()}[i(1357)](t){const e=i;return this.options.text=void 0,this.options[e(1890)]=void 0,this._replacePopupBody(t)}_replacePopupBody(t){const e=i;if(this[e(532)])for(;this[e(532)].hasChildNodes();)this[e(532)][e(1012)]&&this._content.removeChild(this._content.firstChild);else this._content=Lr.create(e(523),e(758));return this._content.appendChild(t),this[e(2572)](),this._update(),this[e(2316)](),this}addClassName(t){const e=i;return this._container&&this._container[e(2975)][e(2926)](t),this}[i(892)](t){const e=i;return this._container&&this[e(835)].classList[e(2591)](t),this}get offset(){return this.options[i(1817)]}set[i(1817)](t){const e=i;this[e(1666)][e(1817)]=t,this[e(437)]()}toggleClassName(t){const e=i;if(this._container)return this[e(835)][e(2975)].toggle(t)}setSubpixelPositioning(t){return this[i(1666)].subpixelPositioning=t,this}get[i(1022)](){return this[i(1666)].padding}set[i(1022)](t){const e=i;this[e(1666)][e(1022)]=t,this[e(437)]()}on(t,e){return super.on(t,e)}off(t,e){return super.off(t,e)}once(t,e){return super.once(t,e)}_createCloseButton(){const t=i;this[t(1666)][t(1069)]&&(this._closeButton=Lr.create("button","maptec-popup-close-button",this[t(532)]),this[t(2277)].type=t(1625),this[t(2277)][t(1858)]=t(2542),this._closeButton[t(2689)]("click",this._onClose))}_focusFirstElement(){const t=i;if(!this.options.focusAfterOpen||!this[t(835)])return;const e=this._container.querySelector(pc);e&&e[t(2743)]()}}class mc extends e.E{constructor(t){const r=i;var o;if(super(),this[r(604)]=null,this._onKeyPress=t=>{const e=r,i=t.code,o=t[e(3412)]||t[e(548)];"Space"!==i&&e(1343)!==i&&32!==o&&13!==o||this[e(2097)]()},this[r(1168)]=t=>{const e=r,i=t.originalEvent.target,o=this._element;this[e(604)]&&(i===o||o.contains(i))&&this[e(2097)]()},this._update=t=>{const e=r;if(!this._map)return;if(null==this._position)return;const i=this._map.loaded()&&!this[e(830)].isMoving();("terrain"===(null==t?void 0:t[e(2784)])||e(1364)===(null==t?void 0:t.type)&&!i)&&this._map[e(2143)]("render",this._update),this._position=gi(this._position,this._flatPos,this._map[e(1847)]),this[e(662)]=this[e(2202)]=this[e(830)].project(this._position)._add(this[e(1959)]),this[e(830)][e(3245)]&&(this._flatPos=this[e(830)][e(1847)].locationToScreenPoint(this._position)._add(this._offset));let o="";e(3657)===this._rotationAlignment||"auto"===this._rotationAlignment?o="rotateZ("+this._rotation+e(1810):e(1920)===this[e(2675)]&&(o="rotateZ("+(this._rotation-this[e(830)][e(1121)])+"deg)");let n="";"viewport"===this._pitchAlignment||e(2817)===this._pitchAlignment?n=e(2623):e(1920)===this[e(2798)]&&(n="rotateX("+this[e(830)].pitch+"deg)"),this[e(2585)]||t&&"moveend"!==t[e(2784)]||(this._screenPosition=this._screenPosition[e(3291)]()),Lr.setTransform(this._element,uc[this._anchor]+" translate("+this._screenPosition.x+"px, "+this[e(2202)].y+e(2641)+n+" "+o),zr[e(1820)](new AbortController)[e(2654)]((()=>{this._updateOpacity(t&&"moveend"===t[e(2784)])}))[e(2304)]((()=>{}))},this[r(1782)]=t=>{const i=r;if(!this[i(952)]){const e=this[i(3420)]||this._map[i(3420)];this[i(952)]=t.point[i(2395)](this._pointerdownPos)>=e}this[i(952)]&&(this[i(2202)]=t.point[i(1276)](this._positionDelta),this[i(1288)]=this[i(830)][i(3504)](this[i(2202)]),this[i(978)][i(1048)][i(497)]=i(3322),i(993)===this._state&&(this._state="active",this[i(1430)](new e.o(i(2478)))),this[i(1430)](new e.o(i(1917))))},this._onUp=()=>{const t=r;this[t(978)].style[t(497)]=t(2817),this._positionDelta=null,this[t(2837)]=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this[t(830)][t(1002)](t(3175),this._onMove),"active"===this._state&&this[t(1430)](new e.o("dragend")),this[t(868)]="inactive"},this[r(2050)]=t=>{const e=r;this._element[e(2287)](t.originalEvent.target)&&(t[e(911)](),this._positionDelta=t.point.sub(this[e(2202)]).add(this._offset),this._pointerdownPos=t.point,this[e(868)]=e(993),this._map.on(e(1598),this[e(1782)]),this._map.on("touchmove",this._onMove),this._map[e(2143)](e(817),this[e(2228)]),this._map[e(2143)](e(3684),this[e(2228)]))},this._anchor=t&&t.anchor||r(1972),this[r(2558)]=t&&t.color||"#3FB1CE",this._scale=t&&t[r(354)]||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this[r(2585)]=t&&t.subpixelPositioning||!1,this[r(952)]=!1,this._state=r(2782),this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t[r(696)]||r(2817),this[r(2798)]=t&&t[r(3257)]&&r(2817)!==t[r(3257)]?t.pitchAlignment:this._rotationAlignment,this._applyOpacityUpdate(null==t?void 0:t[r(2941)],null==t?void 0:t.opacityWhenCovered),t&&t[r(1288)]&&(this[r(1288)]=t.position),t&&t[r(1172)])this[r(978)]=t.element,this._offset=e.P.convert(t&&t[r(1817)]||[0,0]);else{this._defaultMarker=!0,this[r(978)]=Lr[r(325)](r(523));const i=Lr[r(1738)](r(3511),r(570)),o=41,n=27;i[r(2553)](null,"display",r(2194)),i.setAttributeNS(null,r(3282),o+"px"),i[r(2553)](null,"width",n+"px"),i.setAttributeNS(null,"viewBox",r(2010)+n+" "+o);const s=Lr[r(1738)](r(3511),"g");s.setAttributeNS(null,r(1966),r(3322)),s[r(2553)](null,r(3659),"1"),s[r(2553)](null,r(1474),r(3322)),s[r(2553)](null,"fill-rule","evenodd");const a=Lr[r(1738)]("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule",r(1832));const l=Lr.createNS(r(3511),"g");l.setAttributeNS(null,"transform",r(2056)),l.setAttributeNS(null,"fill","#000000");const c=[{rx:"10.5",ry:r(1877)},{rx:"10.5",ry:r(1877)},{rx:r(2715),ry:"4.77275007"},{rx:"8.5",ry:r(1750)},{rx:"7.5",ry:"3.81822308"},{rx:r(577),ry:r(1434)},{rx:r(3271),ry:"2.86367051"},{rx:r(3679),ry:"2.38636864"}];for(const t of c){const e=Lr.createNS("http://www.w3.org/2000/svg",r(1667));e.setAttributeNS(null,"opacity","0.04"),e.setAttributeNS(null,"cx","10.5"),e.setAttributeNS(null,"cy",r(832)),e.setAttributeNS(null,"rx",t.rx),e.setAttributeNS(null,"ry",t.ry),l[r(1324)](e)}const h=Lr[r(1738)]("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,r(1474),this._color);const u=Lr[r(1738)]("http://www.w3.org/2000/svg","path");u[r(2553)](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"),h.appendChild(u);const d=Lr.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,r(2941),r(2912)),d.setAttributeNS(null,r(1474),"#000000");const p=Lr[r(1738)](r(3511),r(3156));p.setAttributeNS(null,"d",r(2419)),d.appendChild(p);const f=Lr.createNS(r(3511),"g");f[r(2553)](null,r(1847),"translate(6.0, 7.0)"),f.setAttributeNS(null,r(1474),r(586));const m=Lr[r(1738)](r(3511),"g");m[r(2553)](null,r(1847),r(949));const _=Lr.createNS("http://www.w3.org/2000/svg","circle");_[r(2553)](null,"fill",r(827)),_[r(2553)](null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_[r(2553)](null,"cy","5.5"),_.setAttributeNS(null,"r",r(943));const y=Lr.createNS(r(3511),r(3217));y[r(2553)](null,r(1474),"#FFFFFF"),y.setAttributeNS(null,"cx",r(3271)),y.setAttributeNS(null,"cy",r(3271)),y.setAttributeNS(null,"r","5.4999962"),m.appendChild(_),m[r(1324)](y),a[r(1324)](l),a[r(1324)](h),a.appendChild(d),a.appendChild(f),a[r(1324)](m),i[r(1324)](a),i.setAttributeNS(null,"height",o*this[r(1563)]+"px"),i[r(2553)](null,"width",n*this._scale+"px"),this[r(978)].appendChild(i),this[r(1959)]=e.P[r(1029)](t&&t.offset||[0,-14])}if(this[r(978)][r(2975)].add(r(646)),this._element[r(1048)][r(497)]="auto",this._element[r(2689)]("dragstart",(t=>{t.preventDefault()})),this[r(978)][r(2689)]("click",(t=>{this.fire(new e.o(r(1024),{originalEvent:t}))})),this._element.addEventListener("dblclick",(t=>{this.fire(new e.o(r(367),{originalEvent:t}))})),this[r(978)][r(2689)]("mousedown",(t=>{const i=r;this[i(1430)](new e.o(i(1476),{originalEvent:t})),t[i(911)]()})),this[r(978)][r(2689)]("mouseup",(t=>{this[r(1430)](new e.o("mouseup",{originalEvent:t}))})),this._element.addEventListener(r(424),(t=>{this[r(1430)](new e.o("mouseenter",{originalEvent:t}))})),this._element[r(2689)](r(1894),(t=>{this.fire(new e.o(r(1894),{originalEvent:t}))})),this[r(978)].addEventListener(r(2672),(t=>{const i=r;this[i(1430)](new e.o(i(2672),{originalEvent:t}))})),this._element.addEventListener("mouseout",(t=>{const i=r;this[i(1430)](new e.o(i(3596),{originalEvent:t}))})),this._element.addEventListener("contextmenu",(t=>{this.fire(new e.o(r(487),{originalEvent:t}))})),this._element[r(2689)]("touchstart",(t=>{const i=r;this[i(1430)](new e.o(i(2075),{originalEvent:t}))}),{passive:!1}),this[r(978)].addEventListener(r(3684),(t=>{this.fire(new e.o(r(3684),{originalEvent:t}))})),this._element.addEventListener(r(2579),(t=>{const i=r;this[i(1430)](new e.o(i(2579),{originalEvent:t}))})),vi(this._element,this._anchor,"marker"),t&&t.className)for(const e of t[r(2568)].split(" "))this[r(978)][r(2975)][r(2926)](e);this.popup=null!==(o=null==t?void 0:t[r(3177)])&&void 0!==o?o:null}[i(3163)](t){const e=i;if(this.isDestroyed())throw new Error("不能添加已销毁的点标记。请创建新的 Marker 实例。");return this[e(2435)](),this[e(830)]=t,this._element.hasAttribute(e(1756))||this[e(978)][e(1507)](e(1756),t[e(1762)]("Marker.Title")),this._element[e(874)](e(3568))||this[e(978)][e(1507)]("role","button"),t[e(2903)]()[e(1324)](this._element),t.on("move",this._update),t.on(e(2443),this._update),t.on("terrain",this._update),t.on("projectiontransition",this._update),this[e(2285)]=this[e(1713)],this._update(),this[e(830)].on("click",this._onMapClick),this}[i(2435)](){const t=i;return this[t(514)]&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this[t(830)].off(t(1024),this._onMapClick),this[t(830)].off(t(709),this._update),this[t(830)].off(t(2443),this._update),this._map.off("terrain",this[t(437)]),this[t(830)][t(1002)]("projectiontransition",this[t(437)]),this[t(830)][t(1002)]("mousedown",this._addDragHandler),this[t(830)][t(1002)](t(2075),this._addDragHandler),this._map[t(1002)](t(817),this[t(2228)]),this[t(830)].off(t(3684),this._onUp),this[t(830)][t(1002)]("mousemove",this[t(1782)]),this._map[t(1002)](t(3175),this[t(1782)]),delete this._map),Lr[t(2591)](this[t(978)]),this[t(604)]&&this._popup[t(2435)](),this}isDestroyed(){return null==this._element}[i(2355)](){const t=i;this._remove(),this._element&&(this[t(978)]=null),this[t(2273)]&&(this[t(2273)]=null),this[t(604)]&&(this[t(604)]=null),this[t(1169)]=void 0,this[t(2202)]=null,this._offset=null}get position(){return this._position}set position(t){const r=i;this._position=e.X.convert(t),this[r(2202)]=null,this[r(604)]&&(this[r(604)][r(1288)]=this[r(1169)]),this[r(437)]()}getElement(){return this._element}get[i(3177)](){return this._popup}set[i(3177)](t){const e=i;if(this._popup&&(this[e(604)][e(2435)](),this[e(604)]=null,this[e(978)][e(841)]("keypress",this._onKeyPress),this._originalTabIndex||this[e(978)][e(2363)](e(2276))),t){if(!("offset"in t.options)){const i=38.1,r=13.5,o=Math.abs(r)/Math.SQRT2;t.options.offset=this[e(2273)]?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-i],"bottom-left":[o,-1*(i-r+o)],"bottom-right":[-o,-1*(i-r+o)],left:[r,-1*(i-r)],right:[-r,-1*(i-r)]}:this[e(1959)]}this[e(604)]=t,this[e(2280)]=this._element[e(1273)]("tabindex"),this[e(2280)]||this[e(978)].setAttribute("tabindex","0"),this._element[e(2689)](e(2937),this._onKeyPress)}}[i(2196)](t){return this._subpixelPositioning=t,this}togglePopup(){const t=i,e=this._popup;if(!this._map)return this;if(this._element[t(1048)][t(2941)]===this[t(920)])return this;if(!e)return this;if(e[t(998)]())this._map[t(1461)](e);else{if(!this[t(1169)])return this;e[t(1288)]=this[t(1169)],this._map.addOverlay(e)}return this}on(t,e){return super.on(t,e)}off(t,e){return super[i(1002)](t,e)}once(t,e){return super.once(t,e)}_updateOpacity(t=!1){const r=i;var o,n;if(null==this[r(1169)])return;const s=null===(o=this._map)||void 0===o?void 0:o.terrain,a=this[r(830)].transform[r(926)](this._position);if(!s||a){const t=a?this[r(920)]:this[r(1519)];return void(this[r(978)][r(1048)].opacity!==t&&(this[r(978)][r(1048)].opacity=t))}if(t)this[r(514)]=null;else{if(this._opacityTimeout)return;this[r(514)]=setTimeout((()=>{this[r(514)]=null}),100)}const l=this._map,c=l[r(3245)][r(653)](this._screenPosition),h=l[r(3245)].getElevationForLngLat(this[r(1169)],l.transform);if(l[r(1847)][r(2265)](this._position,h)-c<.006)return void(this._element.style.opacity=this._opacity);const u=-this[r(1959)].y/l.transform.pixelsPerMeter,d=Math[r(1741)](l.pitch*Math.PI/180)*u,p=l[r(3245)][r(653)](new e.P(this[r(2202)].x,this[r(2202)].y-this._offset.y)),f=l[r(1847)][r(2265)](this._position,h+d)-p>.006;(null===(n=this[r(604)])||void 0===n?void 0:n[r(998)]())&&f&&this[r(604)][r(2435)](),this._element[r(1048)][r(2941)]=f?this._opacityWhenCovered:this._opacity}get[i(1817)](){return this._offset}set offset(t){this[i(1959)]=e.P.convert(t),this._update()}[i(1899)](t){this._element[i(2975)].add(t)}removeClassName(t){const e=i;this._element[e(2975)][e(2591)](t)}[i(2040)](t){return this._element.classList[i(3611)](t)}get draggable(){return this[i(1713)]}set draggable(t){const e=i;this._draggable=!!t,this[e(830)]&&(this[e(1713)]?(this[e(830)].on(e(1476),this[e(2050)]),this[e(830)].on(e(2075),this._addDragHandler)):(this._map[e(1002)](e(1476),this[e(2050)]),this._map[e(1002)](e(2075),this[e(2050)])))}get rotation(){return this[i(2846)]}set rotation(t){const e=i;this[e(2846)]=t||0,this[e(437)]()}get rotationAlignment(){return this._rotationAlignment}set[i(696)](t){const e=i;this._rotationAlignment=t||e(2817),this[e(437)]()}get pitchAlignment(){return this._pitchAlignment}set pitchAlignment(t){const e=i;this[e(2798)]=t&&"auto"!==t?t:this[e(2675)],this._update()}get opacity(){const t=parseFloat(this[i(1519)]);return Number.isFinite(t)?t:1}set[i(2941)](t){this._applyOpacityUpdate(void 0===t?void 0:t,void 0)}_opacityNumberToCssString(t){return Number.isFinite(t)?String(Math.min(1,Math.max(0,t))):"1"}[i(843)](t,e){const r=i;(void 0===this._opacity||void 0===t&&void 0===e)&&(this[r(1519)]="1",this._opacityWhenCovered=r(2748)),void 0!==t&&(this._opacity=this._opacityNumberToCssString(t)),void 0!==e&&(this._opacityWhenCovered=this._opacityNumberToCssString(e)),this._map&&this._updateOpacity(!0)}}class _c{constructor(t={}){const r=i;this[r(3496)]=t.language||"en",this[r(3521)]=t[r(1030)],this._apiUrl=e.c[r(1017)],this[r(552)]=e.c.SERVER_VERSION,this[r(3173)]=t[r(2455)]||1e4}_buildHeaders(t=!0){return a({contentTypeJson:t})}[i(1268)](t){const r=i,o=e.X.convert(t);return{latitude:o[r(2329)],longitude:o.longitude}}_toApiLocationArea(t){const e=i;if("center"in t)return{center:this._toApiLatLng(t.center),radius:t[e(3456)]};const r=io[e(1029)](t);return{northeast:{latitude:r[e(3235)](),longitude:r[e(2320)]()},southwest:{latitude:r[e(1330)](),longitude:r[e(2699)]()}}}[i(801)](t){const e=i;if(!t||"object"!=typeof t)return t;const r=Object.assign({},t);if(r.location&&"object"==typeof r[e(3664)]){const{latitude:t,longitude:e}=r.location;"number"==typeof t&&"number"==typeof e&&(r.location={longitude:e,latitude:t})}if(r.viewport&&e(2112)==typeof r.viewport){const t=r[e(3657)];if(t[e(3272)]&&t.northeast){const i=t.southwest,o=t.northeast;e(2534)==typeof i[e(2329)]&&e(2534)==typeof i.longitude&&e(2534)==typeof o.latitude&&"number"==typeof o.longitude&&(r.viewport=[[i[e(3396)],i[e(2329)]],[o.longitude,o.latitude]])}else if(t.low&&t[e(1669)]){const i=t.low,o=t.high;"number"==typeof i[e(2329)]&&"number"==typeof i.longitude&&"number"==typeof o[e(2329)]&&e(2534)==typeof o[e(3396)]&&(r.viewport=[[i.longitude,i.latitude],[o.longitude,o[e(2329)]]])}}return r}search(t,e,r){const o=i;var n;let s,a;if(o(2770)==typeof e&&void 0===r)s=e,a=void 0;else{if(o(2112)!=typeof e||null===e||o(2770)!=typeof r)throw new Error(o(530));a=e,s=r}const l=a?Object.assign({},a):{};l[o(1326)]=t;const c=null!==(n=null==a?void 0:a.pageSize)&&void 0!==n?n:20;l[o(3135)]=c,l.region=void 0!==(null==a?void 0:a[o(1030)])&&""!==(null==a?void 0:a[o(1030)])?a.region:this[o(3521)],l.language=void 0!==(null==a?void 0:a.language)&&""!==(null==a?void 0:a.language)?a[o(3440)]:this[o(3496)],l[o(2784)]||delete l.type,l.pageToken||delete l[o(3264)],l[o(3231)]||delete l[o(3231)],(null==a?void 0:a.locationBias)?l.locationBias=this._toApiLocationArea(a[o(1044)]):delete l[o(1044)],(null==a?void 0:a.locationLimit)?l[o(2564)]=this[o(1183)](a.locationLimit):delete l[o(2564)],this._doSearchText(l,s)}searchNearby(t,e){const r=i,o=Object[r(2132)]({},t),n=t[r(2564)],s=null!=n[r(3456)]?n.radius:500;o[r(2564)]={center:this._toApiLatLng(n.center),radius:s},o.types=void 0!==t.types?t[r(1579)]:"",o.resultLimit=t.resultLimit||20,o.rank=t[r(3231)]||r(2434),o.region=void 0!==t[r(1030)]&&""!==t[r(1030)]?t[r(1030)]:this._region;const a=t[r(3440)]||this._language;a&&a[r(2768)]()?o.language=a:delete o.language,this[r(2616)](o,e)}[i(2732)](t,e){const r=i,o=t[r(1326)],n=t[r(363)],s=t[r(1579)],a=t.locationBias,l=t[r(2564)],c=t[r(2629)]||20,h=t[r(3440)]||this._language,u=t[r(1030)]||this._region,d=Object.assign({},t);d.query=o,d.types=s||"",d[r(2629)]=c,d[r(3440)]=h,d[r(1030)]=u||"",null!=n?d[r(363)]=n:r(363)in d&&delete d.sessionToken,a?d[r(1044)]=this._toApiLocationArea(a):r(1044)in d&&delete d.locationBias,l?d.locationLimit=this[r(1183)](l):"locationLimit"in d&&delete d[r(2564)],this[r(1451)](d,e)}[i(1957)](t,e){const r=i,o=t[r(593)],n=Object[r(2132)]({},t);delete n[r(593)];const s=t[r(1030)]||this[r(3521)];n[r(3440)]=t.language||this[r(3496)],n.region=s;const a=t[r(363)];null!=a?n[r(363)]=a:delete n[r(363)],this._doGetPlaceDetails(o,n,e)}_doSearchText(t,i){return e._(this,void 0,void 0,(function*(){const e=r;var o;const n=this[e(2476)]+e(1728)+this[e(552)]+"/text",s=new AbortController,a=setTimeout((()=>s[e(970)]()),this._timeout);try{const r=yield fetch(n,{method:e(765),headers:this._buildHeaders(),body:JSON.stringify(t),signal:s.signal});if(clearTimeout(a),!r.ok)return void i(new Error("HTTP error! status: "+r[e(2279)]));const l=yield r[e(2104)]();(null===(o=null==l?void 0:l.places)||void 0===o?void 0:o.length)&&(l[e(499)]=l[e(499)].map((t=>this[e(801)](t)))),i(null,l)}catch(t){clearTimeout(a),t instanceof Error?i("AbortError"===t.name?new Error("请求超时("+this[e(3173)]+"ms)"):t):i(new Error("未知错误"))}}))}_doSearchNearby(t,i){return e._(this,void 0,void 0,(function*(){const e=r;var o;const n=this[e(2476)]+"/search/"+this._version+e(1483),s=new AbortController,a=setTimeout((()=>s.abort()),this._timeout);try{const r=yield fetch(n,{method:"POST",headers:this[e(1577)](),body:JSON.stringify(t),signal:s.signal});if(clearTimeout(a),!r.ok)return void i(new Error("HTTP error! status: "+r[e(2279)]));const l=yield r.json();(null===(o=null==l?void 0:l[e(499)])||void 0===o?void 0:o.length)&&(l[e(499)]=l.places.map((t=>this[e(801)](t)))),i(null,l)}catch(t){clearTimeout(a),t instanceof Error?i(e(1358)===t.name?new Error("请求超时("+this[e(3173)]+"ms)"):t):i(new Error(e(2946)))}}))}[i(1451)](t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=this[e(2476)]+"/search/"+this._version+e(2877),n=new AbortController,s=setTimeout((()=>n[e(970)]()),this[e(3173)]);try{const r=yield fetch(o,{method:e(765),headers:this[e(1577)](),body:JSON[e(2796)](t),signal:n.signal});if(clearTimeout(s),!r.ok)return void i(new Error("HTTP error! status: "+r.status));const a=yield r.json();i(null,a)}catch(t){clearTimeout(s),t instanceof Error?i(e(1358)===t[e(1814)]?new Error(e(3672)+this._timeout+e(2821)):t):i(new Error(e(2946)))}}))}[i(486)](t,i,o){return e._(this,void 0,void 0,(function*(){const e=r,n=Object[e(3680)](i)[e(1920)]((t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])))[e(2533)]("&"),s=this._apiUrl+e(1728)+this._version+e(1977)+encodeURIComponent(t)+(n?"?"+n:""),a=new AbortController,l=setTimeout((()=>a.abort()),this[e(3173)]);try{const t=yield fetch(s,{method:e(3314),headers:this._buildHeaders(!1),signal:a[e(2388)]});if(clearTimeout(l),!t.ok)return void o(new Error("HTTP error! status: "+t.status));const i=yield t.json();(null==i?void 0:i[e(499)])&&(i[e(499)]=this[e(801)](i.places)),o(null,i)}catch(t){clearTimeout(l),t instanceof Error?o("AbortError"===t.name?new Error("请求超时("+this[e(3173)]+"ms)"):t):o(new Error("未知错误"))}}))}}class yc{constructor(t={}){const r=i;this._language=t[r(3440)]||"en",this._region=t.region,this[r(2476)]=e.c[r(1017)],this._version=e.c.SERVER_VERSION,this[r(3173)]=t[r(2455)]||1e4}_buildHeaders(){return a({contentTypeJson:!0})}_getLanguage(t){return t||this[i(3496)]}[i(1590)](t){return t||this._region}_toApiLatLng(t){const i=e.X.convert(t);return{latitude:i.latitude,longitude:i.longitude}}_buildQueryString(t){const e=i,r=Object[e(3680)](t);return r[e(953)]?r[e(1920)]((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&"):""}[i(2084)](t,i,o){return e._(this,void 0,void 0,(function*(){const e=r,n=this[e(1207)](i),s=""+this._apiUrl+t+(n?"?"+n:""),a=new AbortController,l=setTimeout((()=>a[e(970)]()),this._timeout);try{const t=yield fetch(s,{method:"GET",headers:this._buildHeaders(),signal:a[e(2388)]});if(clearTimeout(l),!t.ok)return void o(new Error("HTTP error! status: "+t[e(2279)]));const i=yield t[e(2104)]();Array[e(2667)](i.results)||(i.results=[]),o(null,i)}catch(t){clearTimeout(l),t instanceof Error?o(e(1358)===t[e(1814)]?new Error("请求超时("+this[e(3173)]+e(2821)):t):o(new Error(e(2946)))}}))}[i(348)](t,e,r){const o=i;let n,s;if(o(2770)==typeof e&&void 0===r)n={address:t},s=e;else{if("object"!=typeof e||null===e||o(2770)!=typeof r)throw new Error(o(2618));n=Object.assign({address:t},e),s=r}const a=this[o(549)](n.language),l=this._getRegion(n.region),c={};n.address&&(c[o(1454)]=n.address),n[o(1061)]&&(c.components=n.components),a&&(c[o(3440)]=a),l&&(c.region=l),n.locationBias&&(c[o(1044)]=JSON[o(2796)](n.locationBias)),this[o(2084)](o(1728)+this._version+"/geocode",c,s)}[i(2980)](t,e,r){const o=i;let n,s;if("function"==typeof e&&void 0===r)n={location:t},s=e;else{if("object"!=typeof e||null===e||"function"!=typeof r)throw new Error(o(1051));n=Object.assign({location:t},e),s=r}if(!n[o(3664)])throw new Error(o(1003));const a=this._getLanguage(n.language),l=this._getRegion(n[o(1030)]),c={},{latitude:h,longitude:u}=this._toApiLatLng(n.location);c[o(3664)]=h+","+u,n.resultType&&(c[o(2999)]=n.resultType),n[o(1215)]&&(c.locationType=n.locationType),a&&(c[o(3440)]=a),l&&(c.region=l),this[o(2084)](o(1728)+this[o(552)]+o(636),c,s)}}class gc{constructor(t,r){const o=i;var n,s,a,l;this[o(2724)]=[],this[o(1218)]=o(2208),this._map=t.map,this[o(2476)]=e.c.SERVER_URL,this._serverVersion=e.c.SERVER_VERSION,this[o(3173)]=null!==(n=t.timeout)&&void 0!==n?n:1e4,this[o(1446)]=null!==(s=t.strokeColor)&&void 0!==s?s:"#3FB1CE",this._strokeWeight=null!==(a=t.strokeWeight)&&void 0!==a?a:6,this[o(2234)]=null===(l=t.enableDrawRoute)||void 0===l||l,this._mode=r}[i(1499)](){const t=i;for(const e of this[t(2724)])e&&this[t(830)][t(1461)](e);this._polylines=[]}setStyle(t){const e=i;null!=t.strokeColor&&(this[e(1446)]=t.strokeColor),null!=t[e(425)]&&(this._strokeWeight=t.strokeWeight);for(const i of this[e(2724)])i&&(null!=t[e(1438)]&&(i.strokeColor=t[e(1438)]),null!=t[e(425)]&&(i[e(425)]=t.strokeWeight))}[i(2296)](t){this._polylines.forEach(((e,i)=>{const o=r;e&&(i===t?(e.strokeColor=this[o(1446)],e[o(425)]=this._strokeWeight,this._map.moveLayer(e._lineLayerId)):(e[o(1438)]=this._inactiveColor,e.strokeWeight=this._strokeWeight))}))}_toLocationParam(t,e,i){const o="string"==typeof t?{placeId:t}:(()=>{const e=r,i=this._toLngLat(t);return{location:{latitude:i.latitude,longitude:i[e(3396)]}}})();return void 0!==e&&(o.bearing=e),void 0!==i&&(o.radius=i),o}_searchImpl(t,e,r,o){const n=i;var s;const a={origin:this._toLocationParam(t,null==r?void 0:r[n(1121)],null==r?void 0:r[n(3456)]),destination:this._toLocationParam(e,void 0,null==r?void 0:r[n(3456)]),mode:this[n(3117)]};(null===(s=null==r?void 0:r.waypoints)||void 0===s?void 0:s[n(953)])&&(a.waypoints=r[n(2814)][n(1920)]((t=>{const e=this._toLngLat(t);return{location:{latitude:e.latitude,longitude:e.longitude}}}))),(null==r?void 0:r[n(2013)])&&(a[n(2013)]=r[n(2013)]),(null==r?void 0:r.strategy)&&(a.strategy=r.strategy),void 0!==(null==r?void 0:r.alternatives)&&(a.alternatives=r.alternatives),(null==r?void 0:r.language)&&(a.language=r[n(3440)]),(null==r?void 0:r.units)&&(a[n(691)]=r[n(691)]),(null==r?void 0:r.vehicleSpec)&&(a[n(1948)]=r[n(1948)]),(null==r?void 0:r[n(1963)])&&(a[n(1963)]=r[n(1963)]),this._doSearch(a,o)}[i(3114)](t,i){return e._(this,void 0,void 0,(function*(){const e=r;var o;const n=this[e(2476)]+"/routes/"+this._serverVersion+e(1388),s=new AbortController,l=setTimeout((()=>s[e(970)]()),this[e(3173)]);try{const r=a({contentTypeJson:!0}),c=yield fetch(n,{method:e(765),headers:r,body:JSON.stringify(t),signal:s.signal});if(clearTimeout(l),!c.ok)return void i(new Error("HTTP error! status: "+c[e(2279)]));const h=yield c[e(2104)]();if("OK"===h[e(2279)]&&(null===(o=h.routes)||void 0===o?void 0:o[e(953)])){for(const t of h[e(756)])t[e(3288)]&&(t.path=this._decodePolyline(t[e(3288)]),delete t.overviewPolyline);this._enableDrawRoute&&this._drawRoutes(h[e(756)])}i(null,h)}catch(t){clearTimeout(l),t instanceof Error?i(e(1358)===t.name?new Error("请求超时("+this._timeout+"ms)"):t):i(new Error(e(2946)))}}))}_drawRoutes(t){const e=i;this[e(1499)](),this._polylines=new Array(t[e(953)])[e(1474)](null);for(let i=t.length-1;i>=0;i--){const{path:r}=t[i];if(!(null==r?void 0:r.length))continue;const o=new Ul({positions:r,strokeColor:0===i?this[e(1446)]:this[e(1218)],strokeWeight:this[e(1303)]});this._map[e(2702)](o),this._polylines[i]=o}}[i(2203)](t){const e=i,r=[];let o=0,n=0,s=0;for(;o<t.length;)n+=this._decodeChunk(t,o,(t=>{o=t})),s+=this._decodeChunk(t,o,(t=>{o=t})),r[e(2315)]({latitude:n/1e5,longitude:s/1e5});return r}[i(2393)](t,e,i){let r,o=0,n=0,s=e;do{r=t.charCodeAt(s++)-63,n|=(31&r)<<o,o+=5}while(r>=32);return i(s),1&n?~(n>>1):n>>1}_toLngLat(t){return e.X.convert(t)}}class vc extends gc{constructor(t){super(t,"driving")}[i(1374)](t,e,r,o){const n=i;let s,a;if("function"==typeof r&&void 0===o)a=r;else{if(n(2112)!=typeof r||null===r||n(2770)!=typeof o)throw new Error(n(2691));s=r,a=o}this._searchImpl(t,e,s,a)}}class xc extends gc{constructor(t){super(t,i(1417))}search(t,e,r,o){const n=i;let s,a;if(n(2770)==typeof r&&void 0===o)a=r;else{if(n(2112)!=typeof r||null===r||"function"!=typeof o)throw n(2770)==typeof r&&"object"==typeof o?new Error("TruckDriving.search 参数顺序已变更,请使用 search(origin, destination, options, callback)。"):new Error("TruckDriving.search 参数无法识别,请使用 search(origin, destination, callback) 或 search(origin, destination, options, callback)。");s=r,a=o}this._searchImpl(t,e,s,a)}}for(function(t){const e=i;t[t.Unknown=0]="Unknown",t[t.Mvt=1]=e(2771),t[t.Png=2]=e(2155),t[t[e(1283)]=3]="Jpeg",t[t.Webp=4]=e(1406),t[t[e(2302)]=5]="Avif"}(Wi||(Wi={})),Hi=Uint8Array,Xi=Uint16Array,Yi=Int32Array,Ji=new Hi([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ki=new Hi([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$i=new Hi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ir=(tr=(Qi=function(t,e){var i,r,o,n=new Xi(31);for(i=0;i<31;++i)n[i]=e+=1<<t[i-1];for(r=new Yi(n[30]),i=1;i<30;++i)for(o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r:r}})(Ji,2)).r,(er=tr.b)[28]=258,ir[258]=28,rr=Qi(Ki,0),or=rr.b,nr=new Xi(32768),sr=0;sr<32768;++sr)nr[sr]=((65280&(ar=(61680&(ar=(52428&(ar=(43690&sr)>>1|(21845&sr)<<1))>>2|(13107&ar)<<2))>>4|(3855&ar)<<4))>>8|(255&ar)<<8)>>1;for(lr=function(t,e,r){for(var o,n,s,a,l,c,h,u=t[i(953)],d=0,p=new Xi(e);d<u;++d)t[d]&&++p[t[d]-1];for(o=new Xi(e),d=1;d<e;++d)o[d]=o[d-1]+p[d-1]<<1;if(r){for(n=new Xi(1<<e),s=15-e,d=0;d<u;++d)if(t[d])for(a=d<<4|t[d],l=e-t[d],h=(c=o[t[d]-1]++<<l)|(1<<l)-1;c<=h;++c)n[nr[c]>>s]=a}else for(n=new Xi(u),d=0;d<u;++d)t[d]&&(n[d]=nr[o[t[d]-1]++]>>15-t[d]);return n},cr=new Hi(288),sr=0;sr<144;++sr)cr[sr]=8;for(sr=144;sr<256;++sr)cr[sr]=9;for(sr=256;sr<280;++sr)cr[sr]=7;for(sr=280;sr<288;++sr)cr[sr]=8;for(hr=new Hi(32),sr=0;sr<32;++sr)hr[sr]=5;ur=lr(cr,9,1),dr=lr(hr,5,1),pr=function(t){var e,i=t[0];for(e=1;e<t.length;++e)t[e]>i&&(i=t[e]);return i},fr=function(t,e,i){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(7&e)&i},mr=function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(7&e)},_r=function(t){return(t+7)/8|0},yr=function(t,e,r){const o=i;return(null==r||r>t[o(953)])&&(r=t[o(953)]),new Hi(t[o(856)](e,r))},gr=[i(2308),i(3028),i(2777),i(3559),i(3261),i(3490),,"no callback",i(755),"extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],vr=function(t,e,r){const o=i;var n=new Error(e||gr[t]);if(n[o(1981)]=t,Error[o(790)]&&Error.captureStackTrace(n,vr),!r)throw n;return n},xr=function(t,e,o,n){const s=i;var a,l,c,h,u,d,p,f,m,_,y,g,v,x,b,w,T,S,P,I,C,M,A,k,E,z,D,L,O,R,F,j,B,V,N,G,U,q,Z,W,H,X=t.length;if(!X||e.f&&!e.l)return o||new Hi(0);l=(a=!o)||2!=e.i,c=e.i,a&&(o=new Hi(3*X)),h=function(t){var e,i=o[r(953)];t>i&&((e=new Hi(Math.max(2*i,t))).set(o),o=e)},u=e.f||0,d=e.p||0,p=e.b||0,f=e.l,m=e.d,_=e.m,y=e.n,g=8*X;do{if(!f){if(u=fr(t,d,1),v=fr(t,d+1,3),d+=3,!v){if((w=(x=_r(d)+4)+(b=t[x-4]|t[x-3]<<8))>X){c&&vr(0);break}l&&h(p+b),o[s(571)](t.subarray(x,w),p),e.b=p+=b,e.p=d=8*w,e.f=u;continue}if(1==v)f=ur,m=dr,_=9,y=5;else if(2==v){for(T=fr(t,d,31)+257,S=fr(t,d+10,15)+4,P=T+fr(t,d+5,31)+1,d+=14,I=new Hi(P),C=new Hi(19),M=0;M<S;++M)C[$i[M]]=fr(t,d+3*M,7);for(d+=3*S,k=(1<<(A=pr(C)))-1,E=lr(C,A,1),M=0;M<P;)if(d+=15&(z=E[fr(t,d,k)]),(x=z>>4)<16)I[M++]=x;else for(D=0,L=0,16==x?(L=3+fr(t,d,3),d+=2,D=I[M-1]):17==x?(L=3+fr(t,d,7),d+=3):18==x&&(L=11+fr(t,d,127),d+=7);L--;)I[M++]=D;O=I.subarray(0,T),R=I.subarray(T),_=pr(O),y=pr(R),f=lr(O,_,1),m=lr(R,y,1)}else vr(1);if(d>g){c&&vr(0);break}}for(l&&h(p+131072),F=(1<<_)-1,j=(1<<y)-1,B=d;;B=d){if(V=(D=f[mr(t,d)&F])>>4,(d+=15&D)>g){c&&vr(0);break}if(D||vr(2),V<256)o[p++]=V;else{if(256==V){B=d,f=null;break}if(N=V-254,V>264&&(N=fr(t,d,(1<<(G=Ji[M=V-257]))-1)+er[M],d+=G),q=(U=m[mr(t,d)&j])>>4,U||vr(3),d+=15&U,R=or[q],q>3&&(G=Ki[q],R+=mr(t,d)&(1<<G)-1,d+=G),d>g){c&&vr(0);break}if(l&&h(p+131072),Z=p+N,p<R)for(W=0-R,H=Math.min(R,Z),W+p<0&&vr(3);p<H;++p)o[p]=n[W+p];for(;p<Z;++p)o[p]=o[p-R]}}e.l=f,e.p=B,e.b=p,e.f=u,f&&(u=1,e.m=_,e.d=m,e.n=y)}while(!u);return p!=o[s(953)]&&a?yr(o,0,p):o[s(856)](0,p)},br=new Hi(0),wr=function(t){var e,i,r;for(31==t[0]&&139==t[1]&&8==t[2]||vr(6,"invalid gzip data"),i=10,4&(e=t[3])&&(i+=2+(t[10]|t[11]<<8)),r=(e>>3&1)+(e>>4&1);r>0;r-=!t[i++]);return i+(2&e)},Tr=function(t){var e=t[i(953)];return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Sr=function(t,e){const r=i;return(8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31)&&vr(6,"invalid zlib data"),1==(t[1]>>5&1)&&vr(6,r(3373)+(32&t[1]?"need":"unexpected")+" dictionary"),2+(t[1]>>3&4)},Pr=i(2354)!=typeof TextDecoder&&new TextDecoder;try{Pr.decode(br,{stream:!0})}catch(t){}class bc extends Error{}class wc{constructor(){const t=i;var e,r;this[t(2288)]=new Map,this.decompress=Ii,this[t(1996)]=!1;let o="";"undefined"!=typeof navigator&&(o=null!==(r=null===(e=globalThis.navigator)||void 0===e?void 0:e.userAgent)&&void 0!==r?r:"");const n=o[t(2887)](t(809))>-1,s=/Chrome|Chromium|Edg|OPR|Brave/.test(o);this[t(2030)]=n&&s}[i(1702)](t,i,o,n,s){return e._(this,void 0,void 0,(function*(){const a=r,l=new Headers;let c;l.set(a(2436),"bytes="+i+"-"+(i+o-1));try{let e;this.mustReload?e="reload":this.chromeWindowsNoCache&&(e=a(815)),c=yield fetch(t,{signal:n.signal,cache:e,headers:l})}catch(i){if(e.a0(i))throw i;throw new e.cP(0,"Failed to fetch: "+i[a(831)],t,new Blob)}if(0===i&&416===c[a(2279)]){const e=c.headers.get("Content-Range");if(!e||!e[a(619)](a(3092)))throw new Error(a(3386));const i=+e[a(3243)](8);c=yield fetch(t,{signal:n[a(2388)],cache:"reload",headers:{range:a(1801)+(i-1)}})}let h=c.headers.get(a(2122));if((null==h?void 0:h[a(619)]("W/"))&&(h=null),416===c.status||s&&h&&h!==s)throw this[a(1996)]=!0,new bc("Server returned non-matching ETag "+s+a(1914));if(c[a(2279)]>=300){const i=yield c.blob();throw new e.cP(c[a(2279)],c.statusText,t,i)}const u=c.headers.get(a(1835));if(200===c.status&&(!u||+u>o))throw new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield c[a(1772)](),etag:h||void 0,cacheControl:c.headers.get("Cache-Control")||void 0,expires:c[a(2086)][a(1445)](a(3415))||void 0}}))}[i(1272)](t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=t;let n,s=this.cache.get(o);if(null==s?void 0:s[e(2733)])return s[e(2733)];if((null==s?void 0:s[e(668)])?n={data:s[e(668)]}:(n=yield this.fetchRange(t,0,16384,i),s||(s={},this.cache.set(o,s)),s[e(668)]=n.data),19792!==new DataView(n[e(3100)]).getUint16(0,!0))throw new Error("Wrong magic number for PMTiles archive");const a=function(t,i){const r=e,o=new DataView(t),n=o[r(2038)](7);if(n>3)throw new Error("Archive is spec version "+n+r(302));return{specVersion:n,rootDirectoryOffset:Ti(o,8),rootDirectoryLength:Ti(o,16),jsonMetadataOffset:Ti(o,24),jsonMetadataLength:Ti(o,32),leafDirectoryOffset:Ti(o,40),leafDirectoryLength:Ti(o,48),tileDataOffset:Ti(o,56),tileDataLength:Ti(o,64),numAddressedTiles:Ti(o,72),numTileEntries:Ti(o,80),numTileContents:Ti(o,88),clustered:1===o.getUint8(96),internalCompression:o[r(2038)](97),tileCompression:o[r(2038)](98),tileType:o[r(2038)](99),minZoom:o.getUint8(100),maxZoom:o.getUint8(101),minLon:o[r(1749)](102,!0)/1e7,minLat:o.getInt32(106,!0)/1e7,maxLon:o[r(1749)](110,!0)/1e7,maxLat:o.getInt32(114,!0)/1e7,centerZoom:o[r(2038)](118),centerLon:o.getInt32(119,!0)/1e7,centerLat:o.getInt32(123,!0)/1e7,etag:i}}(n[e(3100)].slice(0,127),n.etag);return s||(s={},this[e(2288)].set(o,s)),s.header=a,a}))}[i(3591)](t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=t;let n=this[e(2288)].get(o);if(null==n?void 0:n[e(2918)])return n[e(2918)];const s=yield this[e(1272)](t,i);let a;const l=this[e(2288)].get(o);a=(null==l?void 0:l.headerData)?l[e(668)]:(yield this.fetchRange(t,0,16384,i,s.etag))[e(3100)];const c=a[e(1557)](s[e(1464)],s.rootDirectoryOffset+s.rootDirectoryLength),h=Si(yield this.decompress(c,s.internalCompression));return n||(n={},this.cache[e(571)](o,n)),n.rootDirectory=h,h}))}getDirectory(t,i,o,n,s){return e._(this,void 0,void 0,(function*(){const e=r,a=yield this.fetchRange(t,i,o,s,n.etag),l=Si(yield this[e(2290)](a.data,n.internalCompression));if(0===l.length)throw new Error("Empty directory is invalid");return l}))}getMetadataAttempt(t,i){return e._(this,void 0,void 0,(function*(){const e=r,o=t;let n=this.cache.get(o);if(null==n?void 0:n[e(1978)])return n[e(1978)];const s=yield this.getHeader(t,i),a=yield this.fetchRange(t,s[e(1382)],s[e(3447)],i,s[e(2162)]),l=yield this.decompress(a[e(3100)],s[e(1176)]),c=new TextDecoder(e(1297)),h=JSON[e(3578)](c.decode(l));return n||(n={},this.cache.set(o,n)),n.metadata=h,h}))}[i(1259)](t,i){return e._(this,void 0,void 0,(function*(){const e=r;try{return yield this.getMetadataAttempt(t,i)}catch(r){if(r instanceof bc)return this.clearCache(t),yield this[e(2711)](t,i);throw r}}))}getTileJson(t,i,o){return e._(this,void 0,void 0,(function*(){const e=r,n=yield this.getHeader(t,o),s=yield this.getMetadata(t,o),a=(l=n[e(1194)])===Wi.Mvt?e(1481):l===Wi.Png?e(2386):l===Wi[e(1283)]?".jpg":l===Wi.Webp?e(2063):l===Wi.Avif?e(1409):"";var l;return{tilejson:"3.0.0",scheme:"xyz",tiles:[i+"/{z}/{x}/{y}"+a],vector_layers:s[e(1554)],attribution:s[e(2020)],description:s[e(2867)],name:s[e(1814)],version:s.version,bounds:[n[e(2460)],n[e(2433)],n.maxLon,n[e(2736)]],center:[n[e(2425)],n[e(3227)],n.centerZoom],minzoom:n.minZoom,maxzoom:n[e(1239)]}}))}getTileAttempt(t,i,o,n,s){return e._(this,void 0,void 0,(function*(){const e=r,a=function(t,e,i){if(t>26)throw new Error("Tile zoom level exceeds max safe number limit (26)");if(e>=1<<t||i>=1<<t)throw new Error("tile x/y outside zoom level bounds");let r=((1<<t)*(1<<t)-1)/3,o=t-1,[n,s]=[e,i];for(let t=1<<o;t>0;t>>=1){const e=n&t,i=s&t;r+=(3*e^i)*(1<<o),[n,s]=(a=t,l=n,c=s,0===i?0!==e?[a-1-c,a-1-l]:[c,l]:[l,c]),o--}var a,l,c;return r}(i,o,n),l=yield this[e(1272)](t,s);if(i<l.minZoom||i>l.maxZoom)return null;let c=l.rootDirectoryOffset,h=l[e(663)];for(let i=0;i<=3;i++){let r;r=0===i?yield this.getRootDirectory(t,s):yield this[e(2031)](t,c,h,l,s);const o=Pi(r,a);if(!o)return null;if(o[e(732)]>0){const i=yield this[e(1702)](t,l.tileDataOffset+o.offset,o[e(953)],s,l.etag);return yield this.decompress(i.data,l.tileCompression)}c=l.leafDirectoryOffset+o[e(1817)],h=o[e(953)]}throw new Error(e(313))}))}[i(1192)](t,i,r,o,n){return e._(this,void 0,void 0,(function*(){try{return yield this.getTileAttempt(t,i,r,o,n)}catch(e){if(e instanceof bc)return this.clearCache(t),yield this.getTileAttempt(t,i,r,o,n);throw e}}))}[i(3546)](t){const e=i;t?this.cache[e(2647)](t):this[e(2288)].clear()}}const Tc=new Map,Sc=1e3;class Pc{constructor(t,r){const o=i;var n,s,a,l;this._endTimeMilliseconds=0,this._startTimeMilliseconds=0,this._isPlaying=!1,this.id=o(2410)+e.ai(),this.type=t,this.enabled=null===(n=null==r?void 0:r.enabled)||void 0===n||n,this.keyframes=[],this.defaultInterpolation=null!==(s=null==r?void 0:r[o(3362)])&&void 0!==s?s:o(534),this._loop=null!==(a=null==r?void 0:r[o(349)])&&void 0!==a&&a,this[o(2305)]=null==r?void 0:r[o(2305)],this[o(2879)]=null==r?void 0:r[o(2879)],this.onComplete=null==r?void 0:r[o(3606)],this._timeline=new $l({speed:null!==(l=null==r?void 0:r[o(2468)])&&void 0!==l?l:1,loop:this[o(3312)]})}get[i(3158)](){const t=i;return this[t(1734)][t(3158)]}get[i(1905)](){return this._startTimeMilliseconds/Sc}get endTime(){return this._endTimeMilliseconds/Sc}get[i(2643)](){const t=i;return this.getLoopedTime(this[t(1734)][t(2643)])/Sc}set[i(2643)](t){const e=i;this._timeline[e(2643)]=Math.max(this[e(1367)],Math.min(this[e(3168)],t*Sc))}get[i(1415)](){const t=i;return this[t(1734)][t(1415)]()/Sc}get speed(){return this._timeline[i(2468)]}set[i(2468)](t){this[i(1734)].speed=t}get[i(349)](){return this._loop}set[i(349)](t){const e=i;if(this._loop=t,this[e(1734)][e(349)]=t,t&&"playing"===this._timeline.state&&this._timeline[e(2643)]>=this._endTimeMilliseconds){const t=this._endTimeMilliseconds-this._startTimeMilliseconds;t>0&&(this._timeline[e(2643)]=this[e(1367)]+(this._timeline[e(2643)]-this[e(1367)])%t)}}play(){const t=i;var e;this._isPlaying||(this[t(2239)]=!0,null===(e=this[t(2305)])||void 0===e||e.call(this)),this._timeline.play()}pause(){const t=i;this[t(2239)]&&(this[t(2239)]=!1),this._timeline[t(1994)]()}stop(){const t=i;this._isPlaying=!1,this[t(1734)][t(1898)](),this[t(1734)].currentTime=this[t(1367)]}reset(){const t=i;this[t(1734)][t(2643)]=this[t(1367)]}[i(1923)](t){}_complete(){const t=i;var e;this[t(2239)]&&(this._isPlaying=!1,null===(e=this.onComplete)||void 0===e||e[t(3054)](this))}addKeyframe(t){const e=i;var r,o,n,s;this[e(2151)].push(Object.assign(Object[e(2132)]({},t),{time:t.time*Sc})),this.keyframes[e(1696)](((t,i)=>t[e(2221)]-i[e(2221)])),this._startTimeMilliseconds=null!==(o=null===(r=this[e(2151)][0])||void 0===r?void 0:r.time)&&void 0!==o?o:0,this._endTimeMilliseconds=null!==(s=null===(n=this[e(2151)][this[e(2151)][e(953)]-1])||void 0===n?void 0:n.time)&&void 0!==s?s:0,this[e(1734)][e(813)]=this[e(3168)]}addKeyframes(t){const e=i;var r,o,n,s;this[e(2151)].push(...t.map((t=>Object[e(2132)](Object[e(2132)]({},t),{time:t[e(2221)]*Sc})))),this.keyframes[e(1696)](((t,i)=>t.time-i[e(2221)])),this._startTimeMilliseconds=null!==(o=null===(r=this[e(2151)][0])||void 0===r?void 0:r[e(2221)])&&void 0!==o?o:0,this._endTimeMilliseconds=null!==(s=null===(n=this[e(2151)][this[e(2151)].length-1])||void 0===n?void 0:n[e(2221)])&&void 0!==s?s:0,this[e(1734)][e(813)]=this[e(3168)]}[i(3417)](t){const e=i;var r,o,n,s;const a=t*Sc,l=this[e(2151)].findIndex((t=>t[e(2221)]===a));return-1!==l&&(this[e(2151)].splice(l,1),this[e(1367)]=null!==(o=null===(r=this.keyframes[0])||void 0===r?void 0:r[e(2221)])&&void 0!==o?o:0,this._endTimeMilliseconds=null!==(s=null===(n=this[e(2151)][this[e(2151)].length-1])||void 0===n?void 0:n.time)&&void 0!==s?s:0,this[e(1734)][e(813)]=this[e(3168)],!0)}getKeyframes(){return[...this.keyframes]}clearKeyframes(){const t=i;this[t(2151)]=[],this._startTimeMilliseconds=0,this[t(3168)]=0,this._timeline.endTime=0}[i(1410)](t){if(!this._loop)return t;const e=this._endTimeMilliseconds-this._startTimeMilliseconds;return e<=0?t:this._startTimeMilliseconds+Math.max(0,(t-this._startTimeMilliseconds)%e)}findKeyframes(t){const e=i;if(0===this.keyframes[e(953)])return[null,null];if(t<=this.keyframes[0].time)return[null,this.keyframes[0]];if(t>=this[e(2151)][this[e(2151)][e(953)]-1].time)return[this.keyframes[this.keyframes[e(953)]-1],null];for(let i=0;i<this[e(2151)][e(953)]-1;i++){const r=this[e(2151)][i],o=this[e(2151)][i+1];if(t>=r[e(2221)]&&t<=o[e(2221)])return[r,o]}return[null,null]}[i(3037)](t){const e=i;if(!this[e(2239)]||!this.onUpdate)return;const r=this._endTimeMilliseconds-this[e(1367)];let o=r>0?(t-this._startTimeMilliseconds)/r:0;o=Math.round(1e4*o)/1e4,this[e(2879)]({time:Math.round(t/Sc*100)/100,duration:Math.round(r/Sc*100)/100,progress:Math.max(0,Math.min(1,o))})}}class Ic extends Pc{constructor(t,e){const r=i;super("camera",e),this[r(2524)]=0,this._iteration=1,this._currentIteration=0,this._delayStartTime=null,this._isDelayComplete=!1,this[r(3549)](t,e)}play(){const t=i;!this._isPlaying&&!this[t(921)]&&this[t(2524)]>0&&(this[t(2389)]=performance.now(),this._isDelayComplete=!1),super[t(2028)]()}update(t){const e=i;if(!this[e(921)]&&this[e(2524)]>0){if(null===this._delayStartTime&&(this._delayStartTime=t),t-this[e(2389)]<this[e(2524)])return;this._isDelayComplete=!0}if(!this._isPlaying)return;const r=this[e(1734)].update(t);this._apply(r),e(1396)===this[e(1734)][e(3158)]&&(this._currentIteration++,e(704)===this._iteration||this._currentIteration<this[e(1337)]?(this._timeline.stop(),this._timeline.currentTime=0,this[e(1734)][e(2028)]()):this[e(3301)]())}_apply(t){const r=i,[o,n]=this.findKeyframes(t);if(!o&&!n)return;if(!n)return void this[r(807)](o[r(1372)]);if(!o)return void this[r(807)](n.value);const s=n[r(2221)]-o.time,a=s>0?(t-o[r(2221)])/s:0,l=n[r(3362)]||this[r(2962)],c={};if(void 0!==o[r(1372)].center&&void 0!==n[r(1372)][r(1972)]){const t=e.X[r(1029)](o[r(1372)][r(1972)]),i=e.X[r(1029)](n.value[r(1972)]);c.center=new e.X(Ci(a,t.longitude,i[r(3396)],l),Ci(a,t.latitude,i.latitude,l))}else void 0!==o[r(1372)].center?c[r(1972)]=o[r(1372)][r(1972)]:void 0!==n.value.center&&(c[r(1972)]=n.value.center);void 0!==o[r(1372)][r(3512)]&&void 0!==n.value.zoom?c[r(3512)]=Ci(a,o.value[r(3512)],n.value.zoom,l):void 0!==o.value.zoom?c.zoom=o[r(1372)][r(3512)]:void 0!==n[r(1372)][r(3512)]&&(c[r(3512)]=n[r(1372)][r(3512)]),void 0!==o.value[r(1121)]&&void 0!==n.value[r(1121)]?c.bearing=Ci(a,o.value.bearing,n[r(1372)].bearing,l):void 0!==o[r(1372)][r(1121)]?c[r(1121)]=o.value.bearing:void 0!==n.value[r(1121)]&&(c[r(1121)]=n.value.bearing),void 0!==o[r(1372)][r(882)]&&void 0!==n.value[r(882)]?c.pitch=Ci(a,o.value.pitch,n[r(1372)][r(882)],l):void 0!==o[r(1372)].pitch?c[r(882)]=o[r(1372)][r(882)]:void 0!==n.value.pitch&&(c.pitch=n.value.pitch),this[r(807)](c),this.fireUpdate(t)}[i(3594)](t){this[i(830)]=t}[i(3549)](t,e){const r=i;var o,n,s;this[r(331)]();const a=null!==(o=null==e?void 0:e.duration)&&void 0!==o?o:10;this[r(2524)]=1e3*(null!==(n=null==e?void 0:e.delay)&&void 0!==n?n:0),this[r(1337)]=null!==(s=null==e?void 0:e.iteration)&&void 0!==s?s:1,this[r(1277)]=0,this[r(2389)]=null,this._isDelayComplete=!1,t[r(799)](((i,o)=>{const n=r,s=(1===t[n(953)]?0:o/(t.length-1))*a,l={};i[n(1972)]&&(l[n(1972)]=i.center),void 0!==i[n(3512)]&&(l[n(3512)]=i.zoom),void 0!==i.pitch&&(l.pitch=i.pitch),void 0!==i[n(1121)]&&(l.bearing=i.bearing),this[n(956)]({time:s,value:l,interpolation:i.interpolation||(null==e?void 0:e[n(3362)])||this[n(2962)]})}))}_applyKeyframeValue(t){const e=i,r={};void 0!==t[e(1972)]&&(r.center=t[e(1972)]),void 0!==t.zoom&&(r[e(3512)]=t.zoom),void 0!==t.bearing&&(r.bearing=t.bearing),void 0!==t.pitch&&(r[e(882)]=t.pitch),Object.keys(r)[e(953)]>0&&this._map&&this[e(830)].jumpTo(r)}}class Cc extends Pc{constructor(t){const e=i;var r,o,n;super("camera",t),this._delay=0,this[e(1337)]=1,this[e(1277)]=0,this[e(2389)]=null,this[e(921)]=!1,this._orbitOptions=t,this._duration=null!==(r=t[e(1415)])&&void 0!==r?r:10,this[e(2524)]=1e3*(null!==(o=t[e(2947)])&&void 0!==o?o:0),this[e(1337)]=null!==(n=t[e(1448)])&&void 0!==n?n:1,this[e(3492)]=t.interpolation}[i(3594)](t){const e=i;this._map=t,this._generateOrbitKeyframes(),this._timeline[e(813)]=this._endTimeMilliseconds}play(){const t=i;!this[t(2239)]&&!this._isDelayComplete&&this._delay>0&&(this._delayStartTime=performance.now(),this[t(921)]=!1),super.play()}update(t){const e=i;if(!this._isDelayComplete&&this._delay>0){if(null===this[e(2389)]&&(this._delayStartTime=t),t-this._delayStartTime<this[e(2524)])return;this._isDelayComplete=!0}if(!this[e(2239)])return;const r=this[e(1734)][e(1923)](t);this[e(495)](r),e(1396)===this[e(1734)].state&&(this._currentIteration++,"INFINITE"===this[e(1337)]||this[e(1277)]<this[e(1337)]?(this[e(1734)].stop(),this._timeline.currentTime=0,this._timeline.play()):this._complete())}[i(495)](t){const r=i,[o,n]=this[r(3644)](t);if(!o&&!n)return;if(!n)return void this[r(807)](o[r(1372)]);if(!o)return void this._applyKeyframeValue(n[r(1372)]);const s=n.time-o[r(2221)],a=s>0?(t-o.time)/s:0,l=n[r(3362)]||this._interpolation||this.defaultInterpolation,c={};if(void 0!==o[r(1372)].center&&void 0!==n.value[r(1972)]){const t=e.X[r(1029)](o.value.center),i=e.X.convert(n.value.center);c.center=new e.X(Ci(a,t[r(3396)],i[r(3396)],l),Ci(a,t.latitude,i.latitude,l))}else void 0!==o.value.center?c.center=o[r(1372)].center:void 0!==n.value[r(1972)]&&(c[r(1972)]=n.value[r(1972)]);void 0!==o.value.zoom&&void 0!==n.value.zoom?c[r(3512)]=Ci(a,o.value[r(3512)],n[r(1372)].zoom,l):void 0!==o.value.zoom?c[r(3512)]=o[r(1372)].zoom:void 0!==n[r(1372)][r(3512)]&&(c.zoom=n[r(1372)][r(3512)]),void 0!==o[r(1372)][r(1121)]&&void 0!==n[r(1372)].bearing?c[r(1121)]=Ci(a,o[r(1372)].bearing,n.value[r(1121)],l):void 0!==o[r(1372)].bearing?c[r(1121)]=o.value.bearing:void 0!==n[r(1372)][r(1121)]&&(c.bearing=n[r(1372)].bearing),void 0!==o.value[r(882)]&&void 0!==n[r(1372)][r(882)]?c.pitch=Ci(a,o.value.pitch,n.value[r(882)],l):void 0!==o.value.pitch?c.pitch=o[r(1372)].pitch:void 0!==n.value[r(882)]&&(c[r(882)]=n.value.pitch),this._applyKeyframeValue(c),this[r(3037)](t)}[i(867)](){const t=i;var r;if(!this._map)return;const{center:o,radius:n,startBearing:s,bearingRange:a}=this._orbitOptions,l=this[t(830)].center,c=o?e.X.convert(o):l?e.X[t(1029)](l):null;if(!c)return;let h=n;void 0===h&&(h=l?this[t(2167)](e.X.convert(l),c):1e3);const u=null!=s?s:null!==(r=this._map[t(1121)])&&void 0!==r?r:0,d=this._map[t(3512)],p=this[t(830)].pitch,f=this[t(2006)]/100,m=this._interpolation||this.defaultInterpolation;for(let e=0;e<=100;e++){const i=u+a*(e/100),r=i*Math.PI/180,o=this._calculatePosition(c,h,r),n={center:[o[t(3396)],o.latitude],bearing:i+180};void 0!==d&&(n.zoom=d),void 0!==p&&(n.pitch=p),this.addKeyframe({time:e*f,value:n,interpolation:m})}}_calculateDistance(t,e){const r=i,o=(e[r(2329)]-t.latitude)*Math.PI/180,n=(e.longitude-t.longitude)*Math.PI/180,s=Math.sin(o/2)*Math[r(1741)](o/2)+Math[r(3602)](t[r(2329)]*Math.PI/180)*Math[r(3602)](e[r(2329)]*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 2*Math[r(2275)](Math.sqrt(s),Math[r(1313)](1-s))*6378137}[i(1306)](t,r,o){const n=i,s=6378137,a=t[n(2329)]*Math.PI/180,l=t.longitude*Math.PI/180,c=Math.asin(Math[n(1741)](a)*Math[n(3602)](r/s)+Math[n(3602)](a)*Math[n(1741)](r/s)*Math.cos(o)),h=l+Math.atan2(Math[n(1741)](o)*Math.sin(r/s)*Math[n(3602)](a),Math.cos(r/s)-Math[n(1741)](a)*Math.sin(c));return new e.X(180*h/Math.PI,180*c/Math.PI)}_applyKeyframeValue(t){const e=i,r={};void 0!==t[e(1972)]&&(r[e(1972)]=t.center),void 0!==t.zoom&&(r.zoom=t[e(3512)]),void 0!==t[e(1121)]&&(r.bearing=t[e(1121)]),void 0!==t[e(882)]&&(r[e(882)]=t.pitch),Object.keys(r)[e(953)]>0&&this._map&&this._map.jumpTo(r)}}class Mc extends Pc{constructor(t,e){const r=i;var o,n;if(super("point",e),this._cumulativeLengths=[],this._autoRotate=!1,this[r(1746)]=0,this._feature=t,this._autoRotate=null!==(o=null==e?void 0:e[r(2578)])&&void 0!==o&&o,this[r(1746)]=null!==(n=null==e?void 0:e[r(2037)])&&void 0!==n?n:0,null==e?void 0:e.path){this._path=e[r(3156)];const t=Mi(e[r(3156)]);this[r(407)]=t[r(733)],void 0!==e.duration&&this[r(1843)](e.duration,e[r(3362)])}}[i(1923)](t){const e=i;if(!this._isPlaying)return;const r=this._timeline[e(1923)](t);this._apply(r),e(1396)===this[e(1734)][e(3158)]&&this[e(3301)]()}[i(495)](t){const r=i,o=this.getLoopedTime(t),[n,s]=this.findKeyframes(o);if(!n&&!s)return;if(!s)return void this._applyKeyframeValue(n[r(1372)]);if(!n)return void this[r(807)](s[r(1372)]);const a=s.time-n[r(2221)],l=a>0?(o-n[r(2221)])/a:0,c=s[r(3362)]||this[r(2962)],h={};if(void 0!==n.value[r(1288)]&&void 0!==s[r(1372)][r(1288)])if(this[r(1887)]&&0===n.time&&s[r(2221)]===this._endTimeMilliseconds){const t=Ci(l,0,1,c),i=this[r(3585)](t);if(h[r(1288)]=new e.X(i[0],i[1]),this[r(2757)]&&this._feature instanceof mc){const e=this._getDirectionAtProgress(t);h.rotation=(e+this._rotateOffset+360)%360}}else{const t=e.X.convert(n.value[r(1288)]),i=e.X.convert(s[r(1372)].position);h.position=new e.X(Ci(l,t.longitude,i[r(3396)],c),Ci(l,t.latitude,i[r(2329)],c))}else void 0!==n[r(1372)][r(1288)]?h[r(1288)]=n[r(1372)].position:void 0!==s[r(1372)].position&&(h[r(1288)]=s.value.position);this._autoRotate||(void 0!==n[r(1372)].rotation&&void 0!==s[r(1372)].rotation?h[r(2865)]=Ci(l,n.value[r(2865)],s.value.rotation,c):void 0!==n.value[r(2865)]?h.rotation=n[r(1372)].rotation:void 0!==s.value[r(2865)]&&(h.rotation=s[r(1372)][r(2865)])),void 0!==n[r(1372)].opacity&&void 0!==s.value.opacity?h[r(2941)]=Ci(l,n[r(1372)][r(2941)],s[r(1372)][r(2941)],c):void 0!==n.value[r(2941)]?h.opacity=n.value[r(2941)]:void 0!==s.value[r(2941)]&&(h[r(2941)]=s[r(1372)][r(2941)]),this[r(807)](h),this.fireUpdate(t)}[i(1843)](t,e){const r=i;this.addKeyframe({time:0,value:{position:this[r(1887)][0]}}),this.addKeyframe({time:t,value:{position:this[r(1887)][this[r(1887)][r(953)]-1]},interpolation:e||this[r(2962)]})}[i(3585)](t){return this._path?function(t,e,i){const o=r;if(t.length<2)return t[0]||[0,0];if(e<=0)return t[0];if(e>=1)return t[t[o(953)]-1];let n=i;n&&0!==n[o(953)]||(n=Mi(t).cumulativeLengths);const s=e*n[n[o(953)]-1];let a=0;for(let t=1;t<n.length;t++)if(n[t]>=s){a=t-1;break}const l=n[a],c=(s-l)/(n[a+1]-l),h=t[a],u=t[a+1];return[h[0]+(u[0]-h[0])*c,h[1]+(u[1]-h[1])*c]}(this._path,t,this._cumulativeLengths):[0,0]}_getDirectionAtProgress(t){const e=i;return!this._path||this[e(1887)].length<2?0:function(t,i,r){const o=e;if(t[o(953)]<2)return 0;if(i<=0)return Ai(t[1][0]-t[0][0],t[1][1]-t[0][1]);if(i>=1)return Ai(t[t.length-1][0]-t[t.length-2][0],t[t.length-1][1]-t[t[o(953)]-2][1]);let n=r;n&&0!==n[o(953)]||(n=Mi(t)[o(733)]);const s=i*n[n.length-1];let a=0;for(let t=1;t<n[o(953)];t++)if(n[t]>=s){a=t-1;break}const l=t[a],c=t[a+1];return Ai(c[0]-l[0],c[1]-l[1])}(this[e(1887)],t,this[e(407)])}[i(807)](t){const e=i;var r;void 0!==t[e(1288)]&&(this._feature instanceof mc?this[e(3095)][e(1288)]=t[e(1288)]:(r=this[e(3095)])instanceof mc||e(2770)!=typeof r.setOptions||this[e(3095)][e(3296)]({centers:[t[e(1288)]]})),void 0!==t[e(2865)]&&this[e(3095)]instanceof mc&&(this[e(3095)].rotation=t[e(2865)]),void 0!==t.opacity&&this._feature instanceof mc&&(this[e(3095)][e(2941)]=t.opacity)}}class Ac extends Pc{constructor(t,e){const r=i;super("polyline",e),this[r(407)]=[],this._isCompleted=!1,this._lastTime=-1,this[r(2106)]=t,this[r(771)]=this._getNormalizedPositions(t.positions);const o=Mi(this._originalPositions);if(this._cumulativeLengths=o[r(733)],void 0!==(null==e?void 0:e.duration)&&(this._addDefaultKeyframes(e.duration,e[r(3362)]),this._originalPositions[r(953)]>0)){const t=this._originalPositions[0];this._polyline.positions=[t,t]}}[i(1923)](t){const e=i;if(!this._isPlaying)return;const r=this[e(1734)][e(1923)](t);this[e(495)](r),"finished"===this[e(1734)][e(3158)]&&this._complete()}[i(2181)](){const t=i;if(this._isCompleted=!1,this[t(771)][t(953)]>0){const e=this[t(771)][0];this._polyline.positions=[e,e]}super[t(2181)]()}[i(495)](t){const e=i;t<this._lastTime&&this[e(2294)]&&(this._isCompleted=!1),this[e(2806)]=t;const r=this[e(1410)](t),[o,n]=this.findKeyframes(r);if(!o&&!n)return;let s;if(n)if(o){const t=n.time-o[e(2221)];void 0!==o.value.progress&&void 0!==n[e(1372)].progress?s=Ci(t>0?(r-o[e(2221)])/t:0,o.value.progress,n.value.progress,n[e(3362)]||this.defaultInterpolation):void 0!==o[e(1372)][e(2651)]?s=o[e(1372)][e(2651)]:void 0!==n[e(1372)].progress&&(s=n.value[e(2651)])}else s=n[e(1372)].progress;else s=o[e(1372)][e(2651)];if(void 0!==s){const i=Math.max(0,Math[e(1141)](1,s));if(i>=1&&!this[e(349)])return this[e(2294)]=!0,void(this._polyline.positions=this._originalPositions);this._polyline[e(1536)]=function(t,i,r){const o=e;if(t.length<2)return t;if(i<=0)return[t[0],t[0]];if(i>=1)return[...t];let n=r;n&&0!==n.length||(n=Mi(t).cumulativeLengths);const s=i*n[n[o(953)]-1];let a=0;for(let t=1;t<n.length;t++)if(n[t]>=s){a=t-1;break}const l=n[a],c=(s-l)/(n[a+1]-l),h=t[a],u=t[a+1],d=[h[0]+(u[0]-h[0])*c,h[1]+(u[1]-h[1])*c],p=[];for(let e=0;e<=a;e++)p[o(2315)](t[e]);return p[o(2315)](d),p}(this._originalPositions,i,this._cumulativeLengths),this.fireUpdate(t)}}_getNormalizedPositions(t){const e=i;return t.map((t=>Array.isArray(t)?[t[0],t[1]]:"longitude"in t&&"latitude"in t?[t.longitude,t[e(2329)]]:[0,0]))}[i(1843)](t,e){const r=i;this.addKeyframe({time:0,value:{progress:0}}),this[r(956)]({time:t,value:{progress:1},interpolation:e||this.defaultInterpolation})}}const kc=Cr;!function(){const t=i;e.cQ(t(467),((i,r)=>e._(this,void 0,void 0,(function*(){const o=t;if("json"===i.type){const t=i.url.substr(10);let n=Tc[o(1445)](t);n||(n=new wc,Tc.set(t,n));try{const e=yield n[o(1272)](t,r);return r.signal.throwIfAborted(),(e[o(2460)]>=e[o(418)]||e.minLat>=e.maxLat)&&console[o(3240)]("Bounds of PMTiles archive "+e[o(2460)]+","+e[o(2433)]+","+e.maxLon+","+e[o(2736)]+" are not valid."),{data:{tiles:[i.url+o(1595)],minzoom:e[o(1630)],maxzoom:e.maxZoom,bounds:[e[o(2460)],e.minLat,e[o(418)],e[o(2736)]]},cacheControl:null,expires:null}}catch(t){if(e.a0(t))throw t;const r=t instanceof Error?t[o(831)]:(null==t?void 0:t.toString())||o(991);throw new e.cP(0,r,i[o(3004)],new Blob)}}const n=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),s=i[o(3004)].match(n);if(!s)throw new Error("Invalid PMTiles protocol URL");const a=s[1],l=s[2],c=s[3],h=s[4];let u=Tc.get(a);u||(u=new wc,Tc[o(571)](a,u));try{const t=yield u.getHeader(a,r),e=yield u[o(1192)](a,+l,+c,+h,r);return r.signal.throwIfAborted(),e?{data:new Uint8Array(e),cacheControl:null,expires:null}:1===t[o(1194)]?{data:new Uint8Array,cacheControl:null,expires:null}:{data:null,cacheControl:null,expires:null}}catch(t){if(e.a0(t))throw t;const r=t instanceof Error?t[o(831)]:(null==t?void 0:t[o(2289)]())||"Failed to load PMTiles tile";throw new e.cP(0,r,i.url,new Blob)}}))))}(),e.cR();const Ec={Map:ic,NavigationControl:oc,ScaleControl:ac,FullscreenControl:lc,CompassControl:cc,HawkeyeControl:hc,Popup:fc,Marker:mc,OverlayManager:Kl,CircleOverlay:Nl,CircleOverlayType:t.CircleOverlayType,PolylineOverlay:Ul,PolygonOverlay:Zl,PrismOverlay:Hl,HeatmapOverlay:Jl,GeoJSONOverlay:zl,PlaceSearch:_c,Geocode:yc,Driving:vc,TruckDriving:xc,LngLat:e.X,LngLatBounds:io,MercatorCoordinate:e.ac,Point:e.P,Event:e.o,KeyboardHandler:Ha,AnimationManager:Ql,AnimationKeyFrameTrack:Pc,CameraKeyFrameTrack:Ic,CameraOrbitKeyFrameTrack:Cc,PointKeyFrameTrack:Mc,PolylineKeyFrameTrack:Ac,get version(){return kc},get apiKey(){return l()},set apiKey(t){e.c.API_KEY=t},get workerCount(){return Kr.workerCount},set workerCount(t){Kr.workerCount=t},get workerUrl(){return e.c.WORKER_URL},set workerUrl(t){e.c[i(1233)]=t}};t[i(1720)]=e.o,t.LngLat=e.X,t.MercatorCoordinate=e.ac,t.Point=e.P,t[i(419)]=e.c,t[i(393)]=Pc,t.AnimationManager=Ql,t.CameraKeyFrameTrack=Ic,t[i(728)]=Cc,t[i(713)]=Nl,t.CompassControl=cc,t[i(1090)]=vc,t[i(1719)]=lc,t[i(1640)]=zl,t.Geocode=yc,t.HawkeyeControl=hc,t.HeatmapOverlay=Jl,t[i(2506)]=Ha,t.LngLatBounds=io,t.Map=ic,t[i(2652)]=wa,t[i(1083)]=Ta,t.MapWheelEvent=Sa,t[i(3073)]=mc,t.NavigationControl=oc,t.OverlayManager=Kl,t.PlaceSearch=_c,t.PointKeyFrameTrack=Mc,t[i(1822)]=Zl,t[i(1733)]=Ac,t.PolylineOverlay=Ul,t.Popup=fc,t[i(1626)]=Hl,t.ScaleControl=ac,t.TruckDriving=xc,t.default=Ec,t.importScriptInWorkers=function(t){e.c[i(1233)]=t},Object[i(3454)](t,i(975),{value:!0})}));var s=t;export{s as default};