PageSourceSearch

https://www.maptiler.com/_next/static/chunks/13ec2deb.b0199b93ec955a0d.js

js maptiler.com collected 2026-09-24 08:40:03 UTC 223,993 bytes, 127 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6425523f-5f1e-47f1-bcd1-52301f1e1877",e._sentryDebugIdIdentifier="sentry-dbid-6425523f-5f1e-47f1-bcd1-52301f1e1877")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1300],{7311:(e,t,r)=>{let a,n,i,o,l;r.d(t,{Dy:()=>q.Dy,jJ:()=>nb});var s,u,p,c,h,d,f,m,y,g,v,b,x,w,S,k,_,A,C,E,L,T,M,P,$,I,j,z,R,O=r(40882),N=r(93234),U=r(23349),q=r(70571),F=r(3823),D=Object.defineProperty,B=e=>{throw TypeError(e)},G=(e,t,r)=>{let a;return(a="symbol"!=typeof t?t+"":t)in e?D(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r},V=(e,t,r)=>t.has(e)||B("Cannot "+r),H=(e,t,r)=>(V(e,t,"read from private field"),r?r.call(e):t.get(e)),K=(e,t,r)=>t.has(e)?B("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,a)=>(V(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),W=(e,t,r)=>(V(e,t,"access private method"),r);typeof window>"u"||(window.requestIdleCallback=window.requestIdleCallback||function(e){let t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)}),O.Marker,O.Popup,O.Style,O.CanvasSource,O.GeoJSONSource,O.ImageSource,O.RasterTileSource,O.RasterDEMTileSource,O.VectorTileSource,O.VideoSource;class Z extends O.NavigationControl{onAdd(e){return super.onAdd(e)}}class J extends O.GeolocateControl{onAdd(e){return super.onAdd(e)}}O.AttributionControl;class Y extends O.LogoControl{onAdd(e){return super.onAdd(e)}}class Q extends O.ScaleControl{onAdd(e){return super.onAdd(e)}}class ee extends O.FullscreenControl{onAdd(e){return super.onAdd(e)}}O.TerrainControl,O.BoxZoomHandler,O.ScrollZoomHandler,O.CooperativeGesturesHandler,O.KeyboardHandler,O.TwoFingersTouchPitchHandler,O.MapWheelEvent,O.MapTouchEvent,O.MapMouseEvent;let et={VISITOR:{code:null,flag:"visitor",name:"Visitor",latin:!0,isMode:!0,geocoding:!1},VISITOR_ENGLISH:{code:null,flag:"visitor_en",name:"Visitor English",latin:!0,isMode:!0,geocoding:!1},STYLE:{code:null,flag:"style",name:"Style",latin:!1,isMode:!0,geocoding:!1},STYLE_LOCK:{code:null,flag:"style_lock",name:"Style Lock",latin:!1,isMode:!0,geocoding:!1},...q.TM};function er(){if(typeof navigator>"u"){let e=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];return(0,q.m_)(e)||et.ENGLISH}return Array.from(new Set(navigator.languages.map(e=>e.split("-")[0]))).map(e=>(0,q.m_)(e)).filter(e=>e)[0]??et.LOCAL}let ea={maptilerLogoURL:"https://api.maptiler.com/resources/logo.svg",maptilerURL:"https://www.maptiler.com/",maptilerApiHost:"api.maptiler.com",telemetryURL:"https://api.maptiler.com/metrics",rtlPluginURL:"https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",primaryLanguage:et.STYLE,secondaryLanguage:et.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(ea);let en=(0,F.A)();class ei extends U{constructor(){super(...arguments),G(this,"primaryLanguage",ea.primaryLanguage),G(this,"secondaryLanguage"),G(this,"session",!0),G(this,"caching",!0),G(this,"telemetry",!0),G(this,"_unit","metric"),G(this,"_apiKey","")}set unit(e){this._unit=e,this.emit("unit",e)}get unit(){return this._unit}set apiKey(e){this._apiKey=e,q.$W.apiKey=e,this.emit("apiKey",e)}get apiKey(){return this._apiKey}set fetch(e){q.$W.fetch=e}get fetch(){return q.$W.fetch}}let eo=new ei;class el extends Y{constructor(e={}){super(e),G(this,"logoURL",""),G(this,"linkURL",""),this.logoURL=e.logoURL??ea.maptilerLogoURL,this.linkURL=e.linkURL??ea.maptilerURL}onAdd(e){this._map=e,this._compact=this.options.compact??!1,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";let t=window.document.createElement("a");return t.style.backgroundRepeat="no-repeat",t.style.cursor="pointer",t.style.display="block",t.style.height="23px",t.style.margin="0 0 -4px -4px",t.style.overflow="hidden",t.style.width="88px",t.style.backgroundImage=`url(${this.logoURL})`,t.style.backgroundSize="100px 30px",t.style.width="100px",t.style.height="30px",t.target="_blank",t.rel="noopener",t.href=this.linkURL,t.setAttribute("aria-label","MapTiler logo"),t.setAttribute("rel","noopener"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}}
1let es="localcache_source",eu="localcache",ep="u">typeof caches,{addProtocol:ec}=O;async function eh(){return a||(a=await caches.open("maptiler_sdk")),a}let ed=0;async function ef(){let e=await eh(),t=await e.keys();for(let r of t.slice(0,Math.max(t.length-1e3,0)))e.delete(r)}async function em(e){if(typeof window>"u")return;let t=O.getRTLTextPluginStatus();if("unavailable"===t||"requested"===t)try{await O.setRTLTextPlugin(e??ea.rtlPluginURL,!0)}catch(e){console.error("Error enabling RTL plugin. It is enabled by default and cannot be unset after. Are you attempting to enable it twice?",e)}}function ey(e,t){let r=null;try{r=new URL(e)}catch{return{url:e}}return r.host===ea.maptilerApiHost&&(r.searchParams.has("key")||r.searchParams.append("key",eo.apiKey),eo.session&&r.searchParams.append("mtsid",en)),{url:function(e,t){if(ep&&eo.caching&&eo.session&&e.host===ea.maptilerApiHost){if("Source"===t&&e.href.includes("tiles.json"))return e.href.replace("https://",`${es}://`);if("Tile"===t||"Glyphs"===t)return e.href.replace("https://",`${eu}://`)}return e.href}(r,t)}}function eg(e){return(t,r)=>{if(null!=e){let a=e(t,r),n=ey((null==a?void 0:a.url)??"",r);return{...a,...n}}return ey(t,r)}}function ev(e,t){return!(!Array.isArray(e)||2!==e.length||"get"!==e[0]||"string"!=typeof e[1]||t&&!e[1].startsWith("name:")||!t&&"name"!==e[1])}var eb={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0}
vendor: 30,863 bytes, line 1
1,clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!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,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};class ex{constructor(e,t,r,a){this.message=(e?`${e}: `:"")+r,a&&(this.identifier=a),null!=t&&t.__line__&&(this.line=t.__line__)}}function ew(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}
1class eS extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class ek{constructor(e,t=[]){for(const[r,a]of(this.parent=e,this.bindings={},t))this.bindings[r]=a}concat(e){return new ek(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}let e_={kind:"null"},eA={kind:"number"},eC={kind:"string"},eE={kind:"boolean"},eL={kind:"color"},eT={kind:"projectionDefinition"},eM={kind:"object"},eP={kind:"value"},e$={kind:"collator"},eI={kind:"formatted"},ej={kind:"padding"},ez={kind:"colorArray"},eR={kind:"numberArray"},eO={kind:"resolvedImage"},eN={kind:"variableAnchorOffsetCollection"};function eU(e,t){return{kind:"array",itemType:e,N:t}}function eq(e){if("array"!==e.kind)return e.kind;{let t=eq(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}}let eF=[e_,eA,eC,eE,eL,eT,eI,eM,eU(eP),ej,eR,ez,eO,eN];function eD(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!eD(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of eF)if(!eD(e,t))return null}}return`Expected ${eq(e)} but found ${eq(t)} instead.`}function eB(e,t){return t.some(t=>t.kind===e.kind)}function eG(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function eV(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let eH=4/29,eK=6/29,eX=6/29*3*(6/29),eW=6/29*(6/29)*(6/29),eZ=Math.PI/180,eJ=180/Math.PI;function eY(e){return(e%=360)<0&&(e+=360),e}function eQ([e,t,r,a]){let n,i;e=e0(e);let o=e1((.2225045*e+.7168786*(t=e0(t))+.0606169*(r=e0(r)))/1);e===t&&t===r?n=i=o:(n=e1((.4360747*e+.3850649*t+.1430804*r)/.96422),i=e1((.0139322*e+.0971045*t+.7141733*r)/.82521));let l=116*o-16;return[l<0?0:l,500*(n-o),200*(o-i),a]}function e0(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function e1(e){return e>eW?Math.pow(e,1/3):e/eX+eH}function e2([e,t,r,a]){let n=(e+16)/116,i=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=+e3(n),[e5(3.1338561*(i=.96422*e3(i))-1.6168667*n-.4906146*(o=.82521*e3(o))),e5(-.9787684*i+1.9161415*n+.033454*o),e5(.0719453*i-.2289914*n+1.4052427*o),a]}function e5(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function e3(e){return e>eK?e*e*e:eX*(e-eH)}let e4=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function e8(e,t){return e4(e,t)?e[t]:void 0}function e6(e){return parseInt(e.padEnd(2,e),16)/255}function e7(e,t){return e9(t?e/100:e,0,1)}function e9(e,t,r){return Math.min(Math.max(t,e),r)}function te(e){return!e.some(Number.isNaN)}let tt={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],ol
1ive:[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]};function tr(e,t,r){return e.map((e,a)=>e+r*(t[a]-e))}class ta{constructor(e,t,r,a=1,n=!0){this.r=e,this.g=t,this.b=r,this.a=a,n||(this.r*=a,this.g*=a,this.b*=a,a||this.overwriteGetter("rgb",[e,t,r,a]))}static parse(e){if(e instanceof ta)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=e8(tt,e);if(t){let[e,r,a]=t;return[e/255,r/255,a/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[e6(e.slice(r,r+=t)),e6(e.slice(r,r+=t)),e6(e.slice(r,r+=t)),e6(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,a,n,i,o,l,s,u,p,c,h]=t,d=[n||" ",l||" ",p].join("");if("  "===d||"  /"===d||",,"===d||",,,"===d){let e=[a,o,u].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[e9(r/t,0,1),e9(i/t,0,1),e9(s/t,0,1),c?e7(+c,h):1];if(te(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,a,n,i,o,l,s,u]=r,p=[a||" ",i||" ",l].join("");if("  "===p||"  /"===p||",,"===p||",,,"===p){let e=[+t,e9(+n,0,100),e9(+o,0,100),s?e7(+s,u):1];if(te(e))return function([e,t,r,a]){function n(a){let n=(a+e/30)%12,i=t*Math.min(r,1-r);return r-i*Math.max(-1,Math.min(n-3,9-n,1))}return e=eY(e),t/=100,r/=100,[n(0),n(8),n(4),a]}(e)}}}(e);if(t)return new ta(...t,!1)}get rgb(){let{r:e,g:t,b:r,a}=this,n=a||1/0;return this.overwriteGetter("rgb",[e/n,t/n,r/n,a])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,a,n]=eQ(e),i=Math.sqrt(r*r+a*a);return[Math.round(1e4*i)?eY(Math.atan2(a,r)*eJ):NaN,i,t,n]}(this.rgb))}get lab(){return this.overwriteGetter("lab",eQ(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,a]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${a})`}static interpolate(e,t,r,a="rgb"){switch(a){case"rgb":{let[a,n,i,o]=tr(e.rgb,t.rgb,r);return new ta(a,n,i,o,!1)}case"hcl":{let a,n,[i,o,l,s]=e.hcl,[u,p,c,h]=t.hcl;if(isNaN(i)||isNaN(u))isNaN(i)?isNaN(u)?a=NaN:(a=u,(1===l||0===l)&&(n=p)):(a=i,(1===c||0===c)&&(n=o));else{let e=u-i;u>i&&e>180?e-=360:u<i&&i-u>180&&(e+=360),a=i+r*e}let[d,f,m,y]=function([e,t,r,a]){return e2([r,Math.cos(e=isNaN(e)?0:e*eZ)*t,Math.sin(e)*t,a])}([a,n??o+r*(p-o),l+r*(c-l),s+r*(h-s)]);return new ta(d,f,m,y,!1)}case"lab":{let[a,n,i,o]=e2(tr(e.lab,t.lab,r));return new ta(a,n,i,o,!1)}}}}ta.black=new ta(0,0,0,1),ta.white=new ta(1,1,1,1),ta.transparent=new ta(0,0,0,0),ta.red=new ta(1,0,0,1);class tn{constructor(e,t,r){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ti=["bottom","center","top"];class to{constructor(e,t,r,a,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=a,this.textColor=n,this.verticalAlign=i}}class tl{constructor(e){this.sections=e}static fromString(e){return new tl([new to(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tl?e:tl.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class ts{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof ts)return e;if("number"==typeof e)return new ts([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new ts(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new ts(tr(e.values,t.values,r))}}class tu{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tu)return e;if("number"==typeof e)return new tu([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tu(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tu(tr(e.values,t.values,r))}}class tp{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tp)return e;if("string"==typeof e){let t=ta.parse(e);return t?new tp([t]):void 0}if(!Array.isArray(e))return;let t=[];for(let r of e){if("string"!=typeof r)return;let e=ta.parse(r);if(!e)return;t.push(e)}return new tp(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,a="rgb"){let n=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let i=0;i<e.values.length;i++)n.push(ta.interpolate(e.values[i],t.values[i],r,a));return new tp(n)}}
1class tc extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}let th=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class td{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof td)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!=0)){for(let t=0;t<e.length;t+=2){let r=e[t],a=e[t+1];if("string"!=typeof r||!th.has(r)||!Array.isArray(a)||2!==a.length||"number"!=typeof a[0]||"number"!=typeof a[1])return}return new td(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){let a=e.values,n=t.values;if(a.length!==n.length)throw new tc(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let i=[];for(let e=0;e<a.length;e+=2){if(a[e]!==n[e])throw new tc(`Cannot interpolate values containing mismatched anchors. from[${e}]: ${a[e]}, to[${e}]: ${n[e]}`);i.push(a[e]);let[t,o]=a[e+1],[l,s]=n[e+1];i.push([t+r*(l-t),o+r*(s-o)])}return new td(i)}}class tf{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new tf({name:e,available:!1}):null}}class tm{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}static interpolate(e,t,r){return new tm(e,t,r)}static parse(e){return e instanceof tm?e:Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]?new tm(e[0],e[1],e[2]):"object"==typeof e&&"string"==typeof e.from&&"string"==typeof e.to&&"number"==typeof e.transition?new tm(e.from,e.to,e.transition):"string"==typeof e?new tm(e,e,1):void 0}}function ty(e,t,r,a){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?typeof a>"u"||"number"==typeof a&&a>=0&&a<=1?null:`Invalid rgba value [${[e,t,r,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof a?[e,t,r,a]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function tg(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof tm||e instanceof ta||e instanceof tn||e instanceof tl||e instanceof ts||e instanceof tu||e instanceof tp||e instanceof td||e instanceof tf)return!0;if(Array.isArray(e)){for(let t of e)if(!tg(t))return!1;return!0}if("object"!=typeof e)return!1;for(let t in e)if(!tg(e[t]))return!1;return!0}function tv(e){if(null===e)return e_;if("string"==typeof e)return eC;if("boolean"==typeof e)return eE;if("number"==typeof e)return eA;if(e instanceof ta)return eL;if(e instanceof tm)return eT;if(e instanceof tn)return e$;if(e instanceof tl)return eI;if(e instanceof ts)return ej;if(e instanceof tu)return eR;if(e instanceof tp)return ez;if(e instanceof td)return eN;if(e instanceof tf)return eO;if(!Array.isArray(e))return eM;{let t,r=e.length;for(let r of e){let e=tv(r);if(t){if(t===e)continue;t=eP;break}t=e}return eU(t||eP,r)}}function tb(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof ta||e instanceof tm||e instanceof tl||e instanceof ts||e instanceof tu||e instanceof tp||e instanceof td||e instanceof tf?e.toString():JSON.stringify(e)}class tx{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!tg(e[1]))return t.error("invalid value");let r=e[1],a=tv(r),n=t.expectedType;return"array"===a.kind&&0===a.N&&n&&"array"===n.kind&&("number"!=typeof n.N||0===n.N)&&(a=n),new tx(a,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let tw={string:eC,number:eA,boolean:eE,object:eM};class tS{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=1,a,n=e[0];if("array"===n){let n,i;if(e.length>2){let a=e[1];if("string"!=typeof a||!(a in tw)||"object"===a)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=tw[a],r++}else n=eP;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);i=e[2],r++}a=eU(n,i)}else{if(!tw[n])throw Error(`Types doesn't contain name = ${n}`);a=tw[n]}let i=[];for(;r<e.length;r++){let a=t.parse(e[r],r,eP);if(!a)return null;i.push(a)}return new tS(a,i)}evaluate(e){for(let t=0;t<this.args.length;t++){let r=this.args[t].evaluate(e);if(!eD(this.type,tv(r)))return r;if(t===this.args.length-1)throw new tc(`Expected value to be of type ${eq(this.t
1ype)}, but found ${eq(tv(r))} instead.`)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let tk={"to-boolean":eE,"to-color":eL,"to-number":eA,"to-string":eC};class t_{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!tk[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let a=tk[r],n=[];for(let r=1;r<e.length;r++){let a=t.parse(e[r],r,eP);if(!a)return null;n.push(a)}return new t_(a,n)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(let a of this.args){if(t=a.evaluate(e),r=null,t instanceof ta)return t;if("string"==typeof t){let r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:ty(t[0],t[1],t[2],t[3])))return new ta(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tc(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let a=ts.parse(t);if(a)return a}throw new tc(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let a=tu.parse(t);if(a)return a}throw new tc(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let a=tp.parse(t);if(a)return a}throw new tc(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let a=td.parse(t);if(a)return a}throw new tc(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let a=Number(t);if(!isNaN(a))return a}throw new tc(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tl.fromString(tb(this.args[0].evaluate(e)));case"resolvedImage":return tf.fromString(tb(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return tb(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let tA=["Unknown","Point","LineString","Polygon"];class tC{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?tA[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(e){let t=this._parseColorCache.get(e);return t||(t=ta.parse(e),this._parseColorCache.set(e,t)),t}}class tE{constructor(e,t,r=[],a,n=new ek,i=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=i,this.expectedType=a,this._isConstant=t}parse(e,t,r,a,n={}){return t?this.concat(t,r,a)._parse(e,n):this._parse(e,n)}_parse(e,t){function r(e,t,r){return"assert"===r?new tS(t,[e]):"coerce"===r?new t_(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),!Array.isArray(e))return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`);{if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let a=e[0];if("string"!=typeof a)return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let n=this.registry[a];if(n){let a=n.parse(e,this);if(!a)return null;if(this.expectedType){let e=this.expectedType,n=a.type;if(("string"===e.kind||"number"===e.kind||"boolean"===e.kind||"object"===e.kind||"array"===e.kind)&&"value"===n.kind)a=r(a,e,t.typeAnnotation||"assert");else if("projectionDefinition"===e.kind&&["string","array"].includes(n.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(n.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(n.kind)||"colorArray"===e.kind&&["value","string","array"].includes(n.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(n.kind))a=r(a,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}if(!(a instanceof tx)&&"resolvedImage"!==a.type.kind&&this._isConstant(a)){let e=new tC;try{a=new tx(a.type,a.evaluate(e))}catch(e){return this.error(e.message),null}}return a}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}}concat(e,t,r){let a="number"==typeof e?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new tE(this.registry,this._isConstant,a,t||null,n,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new eS(r,e))}checkSubtype(e,t){let r=eD(e,t);return r&&this.error(r),r}}class tL{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let a=1;a<e.length-1;a+=2){let n=e[a];if("string"!=typeof n)return t.error(`Expected string, but found ${typeof n} instead.`,a);if(/[^a-zA-Z0-9_]/.test(n))return t.error("Variable names must contain only alphanumeric characters or '_'.",a);let i=t.parse(e[a+1],a+1);if(!i)return null;r.push([n,i])}let a=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return a?new tL(r,a):null}outputDefined(){return this.result.outputDefined()}}class tT{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");let r=e[1];return t.scope.has(r)?new tT(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}class tM{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,eA),a=t.parse(e[2],2,eU(t.expectedType||eP));return r&&a?new tM(a.type.itemType,r,a):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new tc(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new tc(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new tc(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class tP{constructor(e,t){this.type=eE,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,eP),a=t.parse(e[2],2,eP);return r&&a?eB(r.type,[eE,eC,eA,e_,eP])?new tP(r,a):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${eq(r.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!eG(t,["boolean","string","number","null"]))throw new tc(`Expected first argument to be of type boolean, string, number or null, but found ${eq(tv(t))} instead.`);if(!eG(r,["string","array"]))throw new tc(`Expected second argument to be of type array or string, but found ${eq(tv(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class t${constructor(e,t,r){this.type=eA,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,eP),a=t.parse(e[2],2,eP);if(!r||!a)return null;if(!eB(r.type,[eE,eC,eA,e_,eP]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${eq(r.type)} instead`);if(4!==e.length)return new t$(r,a);{let n=t.parse(e[3],3,eA);return n?new t$(r,a,n):null}}evaluate(e){let t,r=this.needle.evaluate(e),a=this.haystack.evaluate(e);if(!eG(r,["boolean","string","number","null"]))throw new tc(`Expected first argument to be of type boolean, string, number or null, but found ${eq(tv(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),eG(a,["string"])){let e=a.indexOf(r,t);return -1===e?-1:[...a.slice(0,e)].length}if(eG(a,["array"]))return a.indexOf(r,t);throw new tc(`Expected second argument to be of type array or string, but found ${eq(tv(a))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class tI{constructor(e,t,r,a,n,i){this.inputType=e,this.type=t,this.input=r,this.cases=a,this.outputs=n,this.otherwise=i}static parse(e,t){let r,a;
1if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");t.expectedType&&"value"!==t.expectedType.kind&&(a=t.expectedType);let n={},i=[];for(let o=2;o<e.length-1;o+=2){let l=e[o],s=e[o+1];Array.isArray(l)||(l=[l]);let u=t.concat(o);if(0===l.length)return u.error("Expected at least one branch label.");for(let e of l){if("number"!=typeof e&&"string"!=typeof e)return u.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,tv(e)))return null}else r=tv(e);if("u">typeof n[String(e)])return u.error("Branch labels must be unique.");n[String(e)]=i.length}let p=t.parse(s,o,a);if(!p)return null;a=a||p.type,i.push(p)}let o=t.parse(e[1],1,eP);if(!o)return null;let l=t.parse(e[e.length-1],e.length-1,a);return!l||"value"!==o.type.kind&&t.concat(1).checkSubtype(r,o.type)?null:new tI(r,a,o,n,i,l)}evaluate(e){let t=this.input.evaluate(e);return(tv(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class tj{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){let r;if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);let a=[];for(let n=1;n<e.length-1;n+=2){let i=t.parse(e[n],n,eE);if(!i)return null;let o=t.parse(e[n+1],n+1,r);if(!o)return null;a.push([i,o]),r=r||o.type}let n=t.parse(e[e.length-1],e.length-1,r);if(!n)return null;if(!r)throw Error("Can't infer output type");return new tj(r,a,n)}evaluate(e){for(let[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}}class tz{constructor(e,t,r,a){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=a}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,eP),a=t.parse(e[2],2,eA);if(!r||!a)return null;if(!eB(r.type,[eU(eP),eC,eP]))return t.error(`Expected first argument to be of type array or string, but found ${eq(r.type)} instead`);if(4!==e.length)return new tz(r.type,r,a);{let n=t.parse(e[3],3,eA);return n?new tz(r.type,r,a,n):null}}evaluate(e){let t,r=this.input.evaluate(e),a=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),eG(r,["string"]))return[...r].slice(a,t).join("");if(eG(r,["array"]))return r.slice(a,t);throw new tc(`Expected first argument to be of type array or string, but found ${eq(tv(r))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function tR(e,t){let r=e.length-1,a=0,n=r,i=0,o,l;for(;a<=n;)if(o=e[i=Math.floor((a+n)/2)],l=e[i+1],o<=t){if(i===r||t<l)return i;a=i+1}else if(o>t)n=i-1;else throw new tc("Input is not a number.");return 0}class tO{constructor(e,t,r){for(const[a,n]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(a),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,eA);if(!r)return null;let a=[],n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let r=1;r<e.length;r+=2){let i=1===r?-1/0:e[r],o=e[r+1],l=r,s=r+1;if("number"!=typeof i)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
1omputed expressions) for the input values.',l);if(a.length&&a[a.length-1][0]>=i)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);let u=t.parse(o,s,n);if(!u)return null;n=n||u.type,a.push([i,u])}return new tO(n,r,a)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);let n=t.length;return a>=t[n-1]?r[n-1].evaluate(e):r[tR(t,a)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var tN=(s=function(){if(c)return p;function e(e,t,r,a){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(a-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=a}return c=1,p=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,a=0;a<8;a++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)<t)return r;var i=this.sampleCurveDerivativeX(r);if(1e-6>Math.abs(i))break;r-=n/i}var o=0,l=1;for(r=e,a=0;a<20&&!(Math.abs((n=this.sampleCurveX(r))-e)<t);a++)e>n?o=r:l=r,r=(l-o)*.5+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},p}())&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s;class tU{constructor(e,t,r,a,n){for(const[i,o]of(this.type=e,this.operator=t,this.interpolation=r,this.input=a,this.labels=[],this.outputs=[],n))this.labels.push(i),this.outputs.push(o)}static interpolationFactor(e,t,r,a){let n=0;if("exponential"===e.name)n=tq(t,e.base,r,a);else if("linear"===e.name)n=tq(t,1,r,a);else if("cubic-bezier"===e.name){let i=e.controlPoints;n=new tN(i[0],i[1],i[2],i[3]).solve(tq(t,1,r,a))}return n}static parse(e,t){let[r,a,n,...i]=e;if(!Array.isArray(a)||0===a.length)return t.error("Expected an interpolation type expression.",1);if("linear"===a[0])a={name:"linear"};else if("exponential"===a[0]){let e=a[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);a={name:"exponential",base:e}}else{if("cubic-bezier"!==a[0])return t.error(`Unknown interpolation type ${String(a[0])}`,1,0);let e=a.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);a={name:"cubic-bezier",controlPoints:e}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,eA)))return null;let o=[],l=null;("interpolate-hcl"===r||"interpolate-lab"===r)&&t.expectedType!=ez?l=eL:t.expectedType&&"value"!==t.expectedType.kind&&(l=t.expectedType);for(let e=0;e<i.length;e+=2){let r=i[e],a=i[e+1],n=e+3,s=e+4;if("number"!=typeof r)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',n);if(o.length&&o[o.length-1][0]>=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);let u=t.parse(a,s,l);if(!u)return null;l=l||u.type,o.push([r,u])}return eV(l,eA)||eV(l,eT)||eV(l,eL)||eV(l,ej)||eV(l,eR)||eV(l,ez)||eV(l,eN)||eV(l,eU(eA))?new tU(l,r,a,n,o):t.error(`Type ${eq(l)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let a=this.input.evaluate(e);if(a<=t[0])return r[0].evaluate(e);let n=t.length;if(a>=t[n-1])return r[n-1].evaluate(e);let i=tR(t,a),o=t[i],l=t[i+1],s=tU.interpolationFactor(this.interpolation,a,o,l),u=r[i].evaluate(e),p=r[i+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return u+s*(p-u);case"color":return ta.interpolate(u,p,s);case"padding":return ts.interpolate(u,p,s);case"colorArray":return tp.interpolate(u,p,s);case"numberArray":return tu.interpolate(u,p,s);case"variableAnchorOffsetCollection":return td.interpolate(u,p,s);case"array":return tr(u,p,s);case"projectionDefinition":return tm.interpolate(u,p,s)}case"interpolate-hcl":switch(this.type.kind){case"color":return ta.interpolate(u,p,s,"hcl");case"colorArray":return tp.interpolate(u,p,s,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ta.interpolate(u,p,s,"lab");case"colorArray":return tp.interpolate(u,p,s,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function tq(e,t,r,a){let n=a-r,i=e-r;return 0===n?0:1===t?i/n:(Math.pow(t,i)-1)/(Math.pow(t,n)-1)}class tF{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null,a=t.expectedType;a&&"value"!==a.kind&&(r=a);let n=[];for(let a of e.slice(1)){let e=t.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,n.push(e)}if(!r)throw Error("No output type");return a&&n.some(e=>eD(a,e.type))?new tF(eP,n):new tF(r,n)}evaluate(e){let t=null,r=0,a;
1for(let n of this.args)if(r++,(t=n.evaluate(e))&&t instanceof tf&&!t.available&&(a||(a=t.name),t=null,r===this.args.length&&(t=a)),null!==t)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function tD(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function tB(e,t,r,a){return 0===a.compare(t,r)}function tG(e,t,r){let a="=="!==e&&"!="!==e;return class n{constructor(e,t,r){this.type=eE,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],i=t.parse(e[1],1,eP);if(!i)return null;if(!tD(r,i.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${eq(i.type)}'.`);let o=t.parse(e[2],2,eP);if(!o)return null;if(!tD(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${eq(o.type)}'.`);if(i.type.kind!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${eq(i.type)}' and '${eq(o.type)}'.`);a&&("value"===i.type.kind&&"value"!==o.type.kind?i=new tS(o.type,[i]):"value"!==i.type.kind&&"value"===o.type.kind&&(o=new tS(i.type,[o])));let l=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(l=t.parse(e[3],3,e$)))return null}return new n(i,o,l)}evaluate(n){let i=this.lhs.evaluate(n),o=this.rhs.evaluate(n);if(a&&this.hasUntypedArgument){let t=tv(i),r=tv(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new tc(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){let e=tv(i),r=tv(o);if("string"!==e.kind||"string"!==r.kind)return t(n,i,o)}return this.collator?r(n,i,o,this.collator.evaluate(n)):t(n,i,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let tV=tG("==",function(e,t,r){return t===r},tB),tH=tG("!=",function(e,t,r){return t!==r},function(e,t,r,a){return!tB(e,t,r,a)}),tK=tG("<",function(e,t,r){return t<r},function(e,t,r,a){return 0>a.compare(t,r)}),tX=tG(">",function(e,t,r){return t>r},function(e,t,r,a){return a.compare(t,r)>0}),tW=tG("<=",function(e,t,r){return t<=r},function(e,t,r,a){return 0>=a.compare(t,r)}),tZ=tG(">=",function(e,t,r){return t>=r},function(e,t,r,a){return a.compare(t,r)>=0});class tJ{constructor(e,t,r){this.type=e$,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let a=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,eE);if(!a)return null;let n=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,eE);if(!n)return null;let i=null;return!r.locale||(i=t.parse(r.locale,1,eC))?new tJ(a,n,i):null}evaluate(e){return new tn(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class tY{constructor(e,t,r,a,n){this.type=eC,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=a,this.maxFractionDigits=n}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,eA);if(!r)return null;let a=e[2];if("object"!=typeof a||Array.isArray(a))return t.error("NumberFormat options argument must be an object.");let n=null;if(a.locale&&!(n=t.parse(a.locale,1,eC)))return null;let i=null;if(a.currency&&!(i=t.parse(a.currency,1,eC)))return null;let o=null;if(a["min-fraction-digits"]&&!(o=t.parse(a["min-fraction-digits"],1,eA)))return null;let l=null;return!a["max-fraction-digits"]||(l=t.parse(a["max-fraction-digits"],1,eA))?new tY(r,n,i,o,l):null}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class tQ{constructor(e){this.type=eI,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let a=[],n=!1;for(let r=1;r<=e.length-1;++r){let i=e[r];if(n&&"object"==typeof i&&!Array.isArray(i)){n=!1;let e=null;if(i["font-scale"]&&!(e=t.parse(i["font-scale"],1,eA)))return null;let r=null;if(i["text-font"]&&!(r=t.parse(i["text-font"],1,eU(eC))))return null;let o=null;
1if(i["text-color"]&&!(o=t.parse(i["text-color"],1,eL)))return null;let l=null;if(i["vertical-align"]){if("string"==typeof i["vertical-align"]&&!ti.includes(i["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${i["vertical-align"]}' instead.`);if(!(l=t.parse(i["vertical-align"],1,eC)))return null}let s=a[a.length-1];s.scale=e,s.font=r,s.textColor=o,s.verticalAlign=l}else{let i=t.parse(e[r],1,eP);if(!i)return null;let o=i.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,a.push({content:i,scale:null,font:null,textColor:null,verticalAlign:null})}}return new tQ(a)}evaluate(e){return new tl(this.sections.map(t=>{let r=t.content.evaluate(e);return tv(r)===eO?new to("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new to(tb(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}class t0{constructor(e){this.type=eO,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,eC);return r?new t0(r):t.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=tf.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}}class t1{constructor(e){this.type=eA,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${eq(r.type)} instead.`):new t1(r):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new tc(`Expected value to be of type string or array, but found ${eq(tv(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}function t2(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180))-90]}function t5(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function t3(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function t4(e,t,r,a){var n,i;let o=[t[0]-e[0],t[1]-e[1]];return 0!=(n=[a[0]-r[0],a[1]-r[1]],n[0]*(i=o)[1]-n[1]*i[0])&&!!(t7(e,t,r,a)&&t7(r,a,e,t))}function t8(e,t,r=!1){let a=!1;for(let o of t)for(let t=0;t<o.length-1;t++){var n,i;if(function(e,t,r){let a=e[0]-t[0],n=e[1]-t[1],i=e[0]-r[0],o=e[1]-r[1];return a*o-i*n==0&&a*i<=0&&n*o<=0}(e,o[t],o[t+1]))return r;n=o[t],i=o[t+1],n[1]>e[1]!=i[1]>e[1]&&e[0]<(i[0]-n[0])*(e[1]-n[1])/(i[1]-n[1])+n[0]&&(a=!a)}return a}function t6(e,t){for(let r of e)if(!t8(r,t))return!1;for(let r=0;r<e.length-1;++r)if(function(e,t,r){for(let a of r)for(let r=0;r<a.length-1;++r)if(t4(e,t,a[r],a[r+1]))return!0;return!1}(e[r],e[r+1],t))return!1;return!0}function t7(e,t,r,a){let n=e[0]-r[0],i=e[1]-r[1],o=t[0]-r[0],l=t[1]-r[1],s=a[0]-r[0],u=a[1]-r[1],p=n*u-s*i,c=o*u-s*l;return p>0&&c<0||p<0&&c>0}function t9(e,t,r){let a=[];for(let n=0;n<e.length;n++){let i=[];for(let a=0;a<e[n].length;a++){let o=function(e,t){let r=(180+e[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,n=Math.pow(2,t.z);return[Math.round(r*n*8192),Math.round(a*n*8192)]}(e[n][a],r);t5(t,o),i.push(o)}a.push(i)}return a}function re(e,t,r){let a=[];for(let n=0;n<e.length;n++){let i=t9(e[n],t,r);a.push(i)}return a}function rt(e,t,r,a){if(e[0]<r[0]||e[0]>r[2]){let t=.5*a,n=e[0]-r[0]>t?-a:r[0]-e[0]>t?a:0;0===n&&(n=e[0]-r[2]>t?-a:r[2]-e[0]>t?a:0),e[0]+=n}t5(t,e)}function rr(e,t,r,a){let n=8192*Math.pow(2,a.z),i=[8192*a.x,8192*a.y],o=[];for(let a of e)for(let e of a){let a=[e.x+i[0],e.y+i[1]];rt(a,t,r,n),o.push(a)}return o}function ra(e,t,r,a){let n=8192*Math.pow(2,a.z),i=[8192*a.x,8192*a.y],o=[];for(let r of e){let e=[];for(let a of r){let r=[a.x+i[0],a.y+i[1]];t5(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=n/2){for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let a of e)rt(a,t,r,n)}return o}class rn{constructor(e,t){this.type=eE,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(tg(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:a}=r.geometry;"Polygon"===t&&e.push(a),"MultiPolygon"===t&&e.push(...a)}if(e.length)return new rn(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new rn(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new rn(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let i=t9(t.coordinates,a,n),o=rr(e.geometry(),r,a,n);if(!t3(r,a))return!1;for(let e of o)if(!t8(e,i))return!1}if("MultiPolygon"===t.type){let i=re(t.coordinates,a,n),o=rr(e.geometry(),r,a,n);if(!t3(r,a))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(t8(e,r))return!0;return!1}(e,i))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let i=t9(t.coordinates,a,n),o=ra(e.geometry(),r,a,n);if(!t3(r,a))return!1;for(let e of o)if(!t6(e,i))return!1}if("MultiPolygon"===t.type){let i=re(t.coordinates,a,n),o=ra(e.geometry(),r,a,n);if(!t3(r,a))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(t6(e,r))return!0;return!1}(e,i))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class ri{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,a=t[e];for(;e>0;){let n=e-1>>1,i=t[n];if(r(a,i)>=0)break;t[e]=i,e=n}t[e]=a}_down(e){let{data:t,compare:r}=this,a=this.length>>1,n=t[e];for(;e<a;){let a=(e<<1)+1,i=a+1;if(i<this.length&&0>r(t[i],t[a])&&(a=i),r(t[a],n)>=0)break;t[e]=t[a],e=a}t[e]=n}}let ro=1/298.257223563*(2-1/298.257223563),rl=Math.PI/180;class rs{constructor(e){const t=6378.137*rl*1e3,r=Math.cos(e*rl),a=1/(1-ro*(1-r*r)),n=Math.sqrt(a);this.kx=t*n*r,this.ky=t*n*a*(1-ro)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,a=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+a*a)}pointOnLine(e,t){let r=1/0,a,n,i,o;for(let l=0;l<e.length-1;l++){let s=e[l][0],u=e[l][1],p=this.wrap(e[l+1][0]-s)*this.kx,c=(e[l+1][1]-u)*this.ky,h=0;(0!==p||0!==c)&&((h=(this.wrap(t[0]-s)*this.kx*p+(t[1]-u)*this.ky*c)/(p*p+c*c))>1?(s=e[l+1][0],u=e[l+1][1]):h>0&&(s+=p/this.kx*h,u+=c/this.ky*h));let d=(p=this.wrap(t[0]-s)*this.kx)*p+(c=(t[1]-u)*this.ky)*c;d<r&&(r=d,a=s,n=u,i=l,o=h)}return{point:[a,n],index:i,t:Math.max(0,Math.min(1,o))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function ru(e,t){return t[0]-e[0]}function rp(e){return e[1]-e[0]+1}function rc(e,t){return e[1]>=e[0]&&e[1]<t}function rh(e,t){if(e[0]>
1e[1])return[null,null];let r=rp(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let a=Math.floor(r/2)-1;return[[e[0],e[0]+a],[e[0]+a+1,e[1]]]}function rd(e,t){if(!rc(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let a=t[0];a<=t[1];++a)t5(r,e[a]);return r}function rf(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)t5(t,e);return t}function rm(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function ry(e,t,r){if(!rm(e)||!rm(t))return NaN;let a=0,n=0;return e[2]<t[0]&&(a=t[0]-e[2]),e[0]>t[2]&&(a=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]<t[1]&&(n=t[1]-e[3]),r.distance([0,0],[a,n])}function rg(e,t,r){let a=r.pointOnLine(t,e);return r.distance(e,a.point)}function rv(e,t,r,a,n){return Math.min(Math.min(rg(e,[r,a],n),rg(t,[r,a],n)),Math.min(rg(r,[e,t],n),rg(a,[e,t],n)))}function rb(e,t){for(let r of e)for(let e of r)if(t8(e,t,!0))return!0;return!1}function rx(e,t,r,a,n,i){if(!i)return;let o=ry(rd(a,i),n,r);o<t&&e.push([o,i,[0,0]])}function rw(e,t,r,a,n,i,o){if(!i||!o)return;let l=ry(rd(a,i),rd(n,o),r);l<t&&e.push([l,i,o])}function rS(e,t,r,a,n=1/0){let i=Math.min(a.distance(e[0],r[0][0]),n);if(0===i)return i;let o=new ri([[0,[0,e.length-1],[0,0]]],ru),l=rf(r);for(;o.length>0;){let n=o.pop();if(n[0]>=i)continue;let s=n[1],u=t?50:100;if(rp(s)<=u){if(!rc(s,e.length))return NaN;if(t){let t=function(e,t,r,a){if(!rc(t,e.length))return NaN;for(let a=t[0];a<=t[1];++a)if(t8(e[a],r,!0))return 0;let n=1/0;for(let i=t[0];i<t[1];++i){let t=e[i],o=e[i+1];for(let e of r)for(let r=0,i=e.length,l=i-1;r<i;l=r++){let i=e[l],s=e[r];if(t4(t,o,i,s))return 0;n=Math.min(n,rv(t,o,i,s,a))}}return n}(e,s,r,a);if(isNaN(t)||0===t)return t;i=Math.min(i,t)}else for(let t=s[0];t<=s[1];++t)if(0===(i=Math.min(i,function(e,t,r){if(t8(e,t,!0))return 0;let a=1/0;for(let n of t){let t=n[0],i=n[n.length-1];if(t!==i&&0===(a=Math.min(a,rg(e,[i,t],r))))break;let o=r.pointOnLine(n,e);if(0===(a=Math.min(a,r.distance(e,o.point))))break}return a}(e[t],r,a))))return 0}else{let r=rh(s,t);rx(o,i,a,e,l,r[0]),rx(o,i,a,e,l,r[1])}}return i}function rk(e,t,r,a,n,i=1/0){let o=Math.min(i,n.distance(e[0],r[0]));if(0===o)return o;let l=new ri([[0,[0,e.length-1],[0,r.length-1]]],ru);for(;l.length>0;){let i=l.pop();if(i[0]>=o)continue;let s=i[1],u=i[2],p=t?50:100,c=a?50:100;if(rp(s)<=p&&rp(u)<=c){if(!rc(s,e.length)&&rc(u,r.length))return NaN;if(t&&a)o=Math.min(o,function(e,t,r,a,n){if(!(rc(t,e.length)&&rc(a,r.length)))return 1/0;let i=1/0;for(let o=t[0];o<t[1];++o){let t=e[o],l=e[o+1];for(let e=a[0];e<a[1];++e){let a=r[e],o=r[e+1];if(t4(t,l,a,o))return 0;i=Math.min(i,rv(t,l,a,o,n))}}return i}(e,s,r,u,n));else if(t&&!a){let t=e.slice(s[0],s[1]+1);for(let e=u[0];e<=u[1];++e)if(0===(o=Math.min(o,rg(r[e],t,n))))return o}else if(!t&&a){let t=r.slice(u[0],u[1]+1);for(let r=s[0];r<=s[1];++r)if(0===(o=Math.min(o,rg(e[r],t,n))))return o}else o=Math.min(o,function(e,t,r,a,n){if(!(rc(t,e.length)&&rc(a,r.length)))return NaN;let i=1/0;for(let o=t[0];o<=t[1];++o)for(let t=a[0];t<=a[1];++t)if(0===(i=Math.min(i,n.distance(e[o],r[t]))))return i;return i}(e,s,r,u,n))}else{let i=rh(s,t),p=rh(u,a);rw(l,o,n,e,r,i[0],p[0]),rw(l,o,n,e,r,i[0],p[1]),rw(l,o,n,e,r,i[1],p[0]),rw(l,o,n,e,r,i[1],p[1])}}return o}function r_(e){return"MultiPolygon"===e.type?e.coordinates.map(e=>({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class rA{constructor(e,t){this.type=eA,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(tg(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new rA(t,t.features.map(e=>r_(e.geometry)).flat());if("Feature"===t.type)return new rA(t,r_(t.geometry));if("type"in t&&"coordinates"in t)return new rA(t,r_(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),a=r.flat().map(t=>t2([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rs(a[0][1]),i=1/0;for(let e of t){switch(e.type){case"Point":i=Math.min(i,rk(a,!1,[e.coordinates],!1,n,i));break;case"LineString":i=Math.min(i,rk(a,!1,e.coordinates,!0,n,i));break;case"Polygon":i=Math.min(i,rS(a,!1,e.coordinates,n,i))}if(0===i)break}return i}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),a=r.flat().map(t=>t2([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rs(a[0][1]),i=1/0;for(let e of t){switch(e.type){case"Point":i=Math.min(i,rk(a,!0,[e.coordinates],!1,n,i));break;case"LineString":i=Math.min(i,rk(a,!0,e.coordinates,!0,n,i));break;case"Polygon":i=Math.min(i,rS(a,!0,e.coordinates,n,i))}if(0===i)break}return i}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let a=(function(e){let t,r;if(e.length<=1)return[e];let a=[];for(let n of e){let e=function(e){let t=0;for(let r=0,a=e.length,n=a-1,i,o;r<a;n=r++)i=e[r],t+=((o=e[n]).x-i.x)*(i.y+o.y);return t}(n);0!==e&&(n.area=Math.abs(e),void 0===r&&(r=e<0),r===e<0?(t&&a.push(t),t=[n]):t.push(n))}return t&&a.push(t),a})(r).map(t=>t.map(t=>t.map(t=>t2([t.x,t.y],e.canonical)))),n=new rs(a[0][0][0][1]),i=1/0;for(let e of t)for(let t of a){switch(e.type){case"Point":i=Math.min(i,rS([e.coordinates],!1,t,n,i)
1);break;case"LineString":i=Math.min(i,rS(e.coordinates,!0,t,n,i));break;case"Polygon":i=Math.min(i,function(e,t,r,a=1/0){let n=rf(e),i=rf(t);if(a!==1/0&&ry(n,i,r)>=a)return a;if(t3(n,i)){if(rb(e,t))return 0}else if(rb(t,e))return 0;let o=1/0;for(let a of e)for(let e=0,n=a.length,i=n-1;e<n;i=e++){let n=a[i],l=a[e];for(let e of t)for(let t=0,a=e.length,i=a-1;t<a;i=t++){let a=e[i],s=e[t];if(t4(n,l,a,s))return 0;o=Math.min(o,rv(n,l,a,s,r))}}return o}(t,e.coordinates,n,i))}if(0===i)return i}return i}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class rC{constructor(e){this.type=eP,this.key=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let r=e[1];return null==r?t.error("Global state property must be defined."):"string"!=typeof r?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new rC(r)}evaluate(e){var t;let r=null==(t=e.globals)?void 0:t.globalState;return r&&0!==Object.keys(r).length?e8(r,this.key):null}eachChild(){}outputDefined(){return!1}}let rE={"==":tV,"!=":tH,">":tX,"<":tK,">=":tZ,"<=":tW,array:tS,at:tM,boolean:tS,case:tj,coalesce:tF,collator:tJ,format:tQ,image:t0,in:tP,"index-of":t$,interpolate:tU,"interpolate-hcl":tU,"interpolate-lab":tU,length:t1,let:tL,literal:tx,match:tI,number:tS,"number-format":tY,object:tS,slice:tz,step:tO,string:tS,"to-boolean":t_,"to-color":t_,"to-number":t_,"to-string":t_,var:tT,within:rn,distance:rA,"global-state":rC};class rL{constructor(e,t,r,a){this.name=e,this.type=t,this._evaluate=r,this.args=a}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],a=rL.definitions[r];if(!a)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let n=Array.isArray(a)?a[0]:a.type,i=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,o=i.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),l=null;for(let[a,i]of o){l=new tE(t.registry,r$,t.path,null,t.scope);let o=[],s=!1;for(let t=1;t<e.length;t++){let r=e[t],n=Array.isArray(a)?a[t-1]:a.type,i=l.parse(r,1+o.length,n);if(!i){s=!0;break}o.push(i)}if(!s){if(Array.isArray(a)&&a.length!==o.length){l.error(`Expected ${a.length} arguments, but found ${o.length} instead.`);continue}for(let e=0;e<o.length;e++){let t=Array.isArray(a)?a[e]:a.type,r=o[e];l.concat(e+1).checkSubtype(t,r.type)}if(0===l.errors.length)return new rL(r,n,i,o)}}if(1===o.length)t.errors.push(...l.errors);else{let r=(o.length?o:i).map(([e])=>{var t;return Array.isArray(t=e)?`(${t.map(eq).join(", ")})`:`(${eq(t.type)}...)`}).join(" | "),a=[];for(let r=1;r<e.length;r++){let n=t.parse(e[r],1+a.length);if(!n)return null;a.push(eq(n.type))}t.error(`Expected arguments of type ${r}, but found (${a.join(", ")}) instead.`)}return null}static register(e,t){for(let r in rL.definitions=t,t)e[r]=rL}}function rT(e,[t,r,a,n]){t=t.evaluate(e),r=r.evaluate(e),a=a.evaluate(e);let i=n?n.evaluate(e):1,o=ty(t,r,a,i);if(o)throw new tc(o);return new ta(t/255,r/255,a/255,i,!1)}function rM(e,t){let r=t[e];return typeof r>"u"?null:r}function rP(e){return{type:e}}function r$(e){if(e instanceof tT)return r$(e.boundExpression);if(e instanceof rL&&"error"===e.name||e instanceof tJ||e instanceof rn||e instanceof rA||e instanceof rC)return!1;let t=e instanceof t_||e instanceof tS,r=!0;return e.eachChild(e=>{r=t?r&&r$(e):r&&e instanceof tx}),!!r&&rI(e)&&rz(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function rI(e){if(e instanceof rL&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof rn||e instanceof rA)return!1;let t=!0;return e.eachChild(e=>{t&&!rI(e)&&(t=!1)}),t}function rj(e){if(e instanceof rL&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!rj(e)&&(t=!1)}),t}function rz(e,t){if(e instanceof rL&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!rz(e,t)&&(r=!1)}),r}function rR(e){return{result:"success",value:e}}function rO(e){return{result:"error",value:e}}function rN(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function rU(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function rq(e){return!!e.expression&&e.expression.interpolated}function rF(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function rD(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&tv(e)===eM}rL.register(rE,{error:[{kind:"error"},[eC],(e,[t])=>{throw new tc(t.evaluate(e))}],typeof:[eC,[eP],(e,[t])=>eq(tv(t.evaluate(e)))],"to-rgba":[eU(eA,4),[eL],(e,[t])=>{let[r,a,n,i]=t.evaluate(e).rgb;return[255*r,255*a,255*n,i]}],rgb:[eL,[eA,eA,eA],rT],rgba:[eL,[eA,eA,eA,eA],rT],has:{type:eE,overloads:[[[eC],(e,[t])=>t.evaluate(e)in e.properties()],[[eC,eM],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:eP,overloads:[[[eC],(e,[t])=>rM(t.evaluate(e),e.properties())],[[eC,eM],(e,[t,r])=>rM(t.evaluate(e),r.evaluate(e))]]},"feature-state":[eP,[eC],(e,[t])=>rM(t.evaluate(e),e.featureState||{})],properties:[eM,[],e=>e.properties()],"geometry-type":[eC,[],e=>e.geometryType()],id:[eP,[],e=>e.id()],zoom:[eA,[],e=>e.globals.zoom],"heatmap-density":[eA,[],e=>e.globals.heatmapDensity||0],elevation:[eA,[],e=>e.globals.elevation||0],"line-progress":[eA,[],e=>e.globals.lineProgress||0],accumulated:[eP,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[eA,rP(eA),(e,t)=>{let r=0;for(let a of t)r+=a.evaluate(e);return r}],"*":[eA,rP(eA),(e,t)=>{let r=1;for(let a of t)r*=a.evaluate(e);return r}],"-":{type:eA,overloads:[[[eA,eA],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[eA],(e,[t])=>-t.evaluate(e)]]},"/":[eA,[eA,eA],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[eA,[eA,eA],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[eA,[],()=>Math.LN2],pi:[eA,[],()=>Math.PI],e:[eA,[],()=>Math.E],"^":[eA,[eA,eA],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[eA,[eA],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))],log2:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[eA,[eA],(e,[t])=>Math.sin(t.evaluate(e))],cos:[eA,[eA],(e,[t])=>Math.cos(t.evaluate(e))],tan:[eA,[eA],(e,[t])=>Math.tan(t.evaluate(e))],asin:[eA,[eA],(e,[t])=>Math.asin(t.evaluate(e))],acos:[eA,[eA],(e,[t])=>Math.acos(t.evaluate(e))],atan:[eA,[eA],(e,[t])=>Math.atan(t.evaluate(e))],min:[eA,rP(eA),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[eA,rP(eA),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[eA,[eA],(e,[t])=>Math.abs(t.evaluate(e))],round:[eA,[eA],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[eA,[eA],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[eA,[eA],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[eE,[eC,eP],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[eE,[eP],(e,[t])=>e.id()===t.value],"filter-type-==":[eE,[eC],(e,[t])=>e.geometryType()===t.value],"filter-<":[eE,[eC,eP],(e,[t,r])=>{let a=e.properties()[t.value],n=r.value;return typeof a==typeof n&&a<n}],"filter-id-<":[eE,[eP],(e,[t])=>{let r=e.id(),a=t.value;return typeof r==typeof a&&r<a}],"filter->":[eE,[eC,eP],(e,[t,r])=>{let a=e.properties()[t.value],n=r.value;return typeof a==typeof n&&a>n}],"filter-id->":[eE,[eP],(e,[t])=>{let r=e.id(),a=t.value;return typeof r==typeof a&&r>a}],"filter-<=":[eE,[eC,eP],(e,[t,r])=>{let a=e.properties()[t.value],n=r.value;return typeof a==typeof n&&a<=n}],"filter-id-<=":[eE,[eP],(e,[t])=>{let r=e.id(),a=t.value;return typeof r==typeof a&&r<=a}],"filter->=":[eE,[eC,eP],(e,[t,r])=>{let a=e.properties()[t.value],n=r.value;return typeof a==typeof n&&a>=n}],"filter-id->=":[eE,[eP],(e,[t])=>{let r=e.id(),a=t.value;return typeof r==typeof a&&r>=a}],"filter-has":[eE,[eP],(e,[t])=>t.value in e.properties()],"filter-has-id":[eE,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[eE,[eU(eC)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[eE,[eU(eP)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[eE,[eC,eU(eP)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[eE,[eC,eU(eP)],(e,[t,r])=>(function(e,t,r,a){for(;r<=a;){let n=r+a>>1;if(t[n]===e)return!0;t[n]>e?a=n-1:r=n+1}
1return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:eE,overloads:[[[eE,eE],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[rP(eE),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:eE,overloads:[[[eE,eE],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[rP(eE),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[eE,[eE],(e,[t])=>!t.evaluate(e)],"is-supported-script":[eE,[eC],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[eC,[eC],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[eC,[eC],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[eC,rP(eP),(e,t)=>t.map(t=>tb(t.evaluate(e))).join("")],"resolved-locale":[eC,[e$],(e,[t])=>t.evaluate(e).resolvedLocale()]});class rB{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new tC,this._defaultValue=t?function(e){if("color"===e.type&&rD(e.default))return new ta(0,0,0,0);switch(e.type){case"color":return ta.parse(e.default)||null;case"padding":return ts.parse(e.default)||null;case"numberArray":return tu.parse(e.default)||null;case"colorArray":return tp.parse(e.default)||null;case"variableAnchorOffsetCollection":return td.parse(e.default)||null;case"projectionDefinition":return tm.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null,this._globalState=r}evaluateWithoutErrorHandling(e,t,r,a,n,i){return this._globalState&&(e=rW(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=a,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,a,n,i){this._globalState&&(e=rW(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=a,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=i||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new tc(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function rG(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in rE}function rV(e,t,r){var a;let n,i=new tE(rE,r$,[],t?(a=t,n={color:eL,string:eC,number:eA,enum:eC,boolean:eE,formatted:eI,padding:ej,numberArray:eR,colorArray:ez,projectionDefinition:eT,resolvedImage:eO,variableAnchorOffsetCollection:eN},"array"===a.type?eU(n[a.value]||eP,a.length):n[a.type]):void 0),o=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return o?rR(new rB(o,t,r)):rO(i.errors)}class rH{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!rj(t.expression),this.globalStateRefs=rX(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,a,n,i){return this._globalState&&(e=rW(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,n,i)}evaluate(e,t,r,a,n,i){return this._globalState&&(e=rW(e,this._globalState)),this._styleExpression.evaluate(e,t,r,a,n,i)}}class rK{constructor(e,t,r,a,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!rj(t.expression),this.globalStateRefs=rX(t.expression),this.interpolationType=a,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,a,n,i){return this._globalState&&(e=rW(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,a,n,i)}evaluate(e,t,r,a,n,i){return this._globalState&&(e=rW(e,this._globalState)),this._styleExpression.evaluate(e,t,r,a,n,i)}interpolationFactor(e,t,r){return this.interpolationType?tU.interpolationFactor(this.interpolationType,e,t,r):0}}function rX(e,t=new Set){return e instanceof rC&&t.add(e.key),e.eachChild(e=>{rX(e,t)}),t}function rW(e,t){let{zoom:r,heatmapDensity:a,elevation:n,lineProgress:i,isSupportedScript:o,accumulated:l}=e??{};return{zoom:r,heatmapDensity:a,elevation:n,lineProgress:i,isSupportedScript:o,accumulated:l,globalState:t}}function rZ(e){let t=e.key,r=e.value;return r?[new ex(t,r,"constants have been deprecated as of v8")]:[]}function rJ(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function rY(e){if(Array.isArray(e))return e.map(rY);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=rY(e[r]);return t}return rJ(e)}function rQ(e){let t=e.key,r=e.value,a=e.valueSpec||{},n=e.objectElementValidators||{},i=e.style,o=e.styleSpec,l=e.validateSpec,s=[],u=rF(r);if("object"!==u)return[new ex(t,r,`object expected, ${u}
1 found`)];for(let e in r){let u,p=e.split(".")[0],c=e8(a,p)||a["*"];if(e8(n,p))u=n[p];else if(e8(a,p)){if(void 0===r[e])continue;u=l}else if(n["*"])u=n["*"];else if(a["*"])u=l;else{s.push(new ex(t,r[e],`unknown property "${e}"`));continue}s=s.concat(u({key:(t&&`${t}.`)+e,value:r[e],valueSpec:c,style:i,styleSpec:o,object:r,objectKey:e,validateSpec:l},r))}for(let e in a)n[e]||a[e].required&&void 0===a[e].default&&void 0===r[e]&&s.push(new ex(t,r,`missing required property "${e}"`));return s}function r0(e){let t=e.value,r=e.valueSpec,a=e.validateSpec,n=e.style,i=e.styleSpec,o=e.key,l=e.arrayElementValidator||a;if("array"!==rF(t))return[new ex(o,t,`array expected, ${rF(t)} found`)];if(r.length&&t.length!==r.length)return[new ex(o,t,`array length ${r.length} expected, length ${t.length} found`)];let s={type:r.value,values:r.values};i.$version<7&&(s.function=r.function),"object"===rF(r.value)&&(s=r.value);let u=[];for(let r=0;r<t.length;r++)u=u.concat(l({array:t,arrayIndex:r,value:t[r],valueSpec:s,validateSpec:e.validateSpec,style:n,styleSpec:i,key:`${o}[${r}]`}));return u}function r1(e){let t=e.key,r=e.value,a=e.valueSpec,n=rF(r);return"number"===n&&r!=r&&(n="NaN"),"number"!==n?[new ex(t,r,`number expected, ${n} found`)]:"minimum"in a&&r<a.minimum?[new ex(t,r,`${r} is less than the minimum value ${a.minimum}`)]:"maximum"in a&&r>a.maximum?[new ex(t,r,`${r} is greater than the maximum value ${a.maximum}`)]:[]}function r2(e){let t=e.valueSpec,r=rJ(e.value.type),a,n={},i,o,l="categorical"!==r&&void 0===e.value.property,s="array"===rF(e.value.stops)&&"array"===rF(e.value.stops[0])&&"object"===rF(e.value.stops[0][0]),u=rQ({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new ex(e.key,e.value,'identity function may not have a "stops" property')];let t=[],a=e.value;return t=t.concat(r0({key:e.key,value:a,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:p})),"array"===rF(a)&&0===a.length&&t.push(new ex(e.key,a,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&l&&u.push(new ex(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new ex(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!rq(e.valueSpec)&&u.push(new ex(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l||rN(e.valueSpec)?l&&!rU(e.valueSpec)&&u.push(new ex(e.key,e.value,"zoom functions not supported")):u.push(new ex(e.key,e.value,"property functions not supported"))),("categorical"===r||s)&&void 0===e.value.property&&u.push(new ex(e.key,e.value,'"property" property is required')),u;function p(e){let r=[],a=e.value,l=e.key;if("array"!==rF(a))return[new ex(l,a,`array expected, ${rF(a)} found`)];if(2!==a.length)return[new ex(l,a,`array length 2 expected, length ${a.length} found`)];if(s){if("object"!==rF(a[0]))return[new ex(l,a,`object expected, ${rF(a[0])} found`)];if(void 0===a[0].zoom)return[new ex(l,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new ex(l,a,"object stop key must have value")];if(o&&o>rJ(a[0].zoom))return[new ex(l,a[0].zoom,"stop zoom values must appear in ascending order")];rJ(a[0].zoom)!==o&&(o=rJ(a[0].zoom),i=void 0,n={}),r=r.concat(rQ({key:`${l}[0]`,value:a[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:r1,value:c}}))}else r=r.concat(c({key:`${l}[0]`,value:a[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},a));return rG(rY(a[1]))?r.concat([new ex(`${l}[1]`,a[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${l}[1]`,value:a[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function c(e,o){let l=rF(e.value),s=rJ(e.value),u=null!==e.value?e.value:o;if(a){if(l!==a)return[new ex(e.key,u,`${l} stop domain type must match previous stop domain type ${a}`)]}else a=l;if("number"!==l&&"string"!==l&&"boolean"!==l)return[new ex(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==l&&"categorical"!==r){let a=`number expected, ${l}
1 found`;return rN(t)&&void 0===r&&(a+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ex(e.key,u,a)]}return"categorical"!==r||"number"!==l||isFinite(s)&&Math.floor(s)===s?"categorical"!==r&&"number"===l&&void 0!==i&&s<i?[new ex(e.key,u,"stop domain values must appear in ascending order")]:(i=s,"categorical"===r&&s in n?[new ex(e.key,u,"stop domain values must be unique")]:(n[s]=!0,[])):[new ex(e.key,u,`integer expected, found ${s}`)]}}function r5(e){let t=("property"===e.expressionContext?function(e,t,r){let a=rV(e,t,r);if("error"===a.result)return a;let n=a.value.expression,i=rI(n);if(!i&&!rN(t))return rO([new eS("","data expressions not supported")]);let o=rz(n,["zoom"]);if(!o&&!rU(t))return rO([new eS("","zoom expressions not supported")]);let l=function e(t){let r=null;if(t instanceof tL)r=e(t.result);else if(t instanceof tF){for(let a of t.args)if(r=e(a))break}else(t instanceof tO||t instanceof tU)&&t.input instanceof rL&&"zoom"===t.input.name&&(r=t);return r instanceof eS||t.eachChild(t=>{let a=e(t);a instanceof eS?r=a:!r&&a?r=new eS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&a&&r!==a&&(r=new eS("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);if(!l&&!o)return rO([new eS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(l instanceof eS)return rO([l]);if(l instanceof tU&&!rq(t))return rO([new eS("",'"interpolate" expressions cannot be used with this property')]);if(!l)return rR(i?new rH("constant",a.value,r):new rH("source",a.value,r));let s=l instanceof tU?l.interpolation:void 0;return rR(i?new rK("camera",a.value,l.labels,s,r):new rK("composite",a.value,l.labels,s,r))}:rV)(rY(e.value),e.valueSpec);if("error"===t.result)return t.value.map(t=>new ex(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new ex(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!rj(r))return[new ex(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!rj(r))return[new ex(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!rz(r,["zoom","feature-state"]))return[new ex(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!rI(r))return[new ex(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function r3(e){let t=e.key,r=e.value,a=rF(r);return"string"!==a?[new ex(t,r,`color expected, ${a} found`)]:ta.parse(String(r))?[]:[new ex(t,r,`color expected, "${r}" found`)]}function r4(e){let t=e.key,r=e.value,a=e.valueSpec,n=[];return Array.isArray(a.values)?-1===a.values.indexOf(rJ(r))&&n.push(new ex(t,r,`expected one of [${a.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(a.values).indexOf(rJ(r))&&n.push(new ex(t,r,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function r8(e){return!function e(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(let r of t.slice(1))if(!e(r)&&"boolean"!=typeof r)return!1;return!0;default:return!0}}(rY(e.value))?function e(t){let r=t.value,a=t.key;if("array"!==rF(r))return[new ex(a,r,`array expected, ${rF(r)} found`)];let n=t.styleSpec,i,o=[];if(r.length<1)return[new ex(a,r,"filter array must have at least 1 element")];switch(o=o.concat(r4({key:`${a}[0]`,value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),rJ(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===rJ(r[1])&&o.push(new ex(a,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&o.push(new ex(a,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(i=rF(r[1]))&&o.push(new ex(`${a}[1]`,r[1],`string expected, ${i} found`));for(let e=2;e<r.length;e++)i=rF(r[e]),"$type"===rJ(r[1])?o=o.concat(r4({key:`${a}[${e}]`,value:r[e],valueSpec:n.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==i&&"number"!==i&&"boolean"!==i&&o.push(new ex(`${a}[${e}]`,r[e],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let n=1;n<r.length;n++)o=o.concat(e({key:`${a}[${n}]`,value:r[n],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":i=rF(r[1]),2!==r.length?o.push(new ex(a,r,`filter array for "${r[0]}" operator must have 2 elements`)):"string"!==i&&o.push(new ex(`${a}[1]`,r[1],`string expected, ${i} found`))}return o}(e):r5(ew({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))}function r6(e,t){let r,a=e.key,n=e.validateSpec,i=e.style,o=e.styleSpec,l=e.value,s=e.objectKey,u=o[`${t}_${e.layerType}`];if(!u)return[];let p=s.match(/^(.*)-transition$/);if("paint"===t&&p&&u[p[1]]&&u[p[1]].transition)return n({key:a,value:l,valueSpec:o.transition,style:i,styleSpec:o});let c=e.valueSpec||u[s];if(!c)return[new ex(a,l,`unknown property "${s}"`)];if("string"===rF(l)&&rN(c)&&!c.tokens&&(r=/^{([^}]+)}$/.exec(l)))return[new ex(a,l,`"${s}" does not support interpolation syntax
2Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(r[1])} }\`.`)];let h=[];return"symbol"===e.layerType&&"text-font"===s&&rD(rY(l))&&"identity"===rJ(l.type)&&h.push(new ex(a,l,'"text-font" does not support identity functions')),h.concat(n({key:e.key,value:l,valueSpec:c,style:i,styleSpec:o,expressionContext:"property",propertyType:t,propertyKey:s}))}function r7(e){return r6(e,"paint")}function r9(e){return r6(e,"layout")}
2function ae(e){let t=[],r=e.value,a=e.key,n=e.style,i=e.styleSpec;if("object"!==rF(r))return[new ex(a,r,`object expected, ${rF(r)} found`)];r.type||r.ref||t.push(new ex(a,r,'either "type" or "ref" is required'));let o=rJ(r.type),l=rJ(r.ref);if(r.id){let i=rJ(r.id);for(let o=0;o<e.arrayIndex;o++){let e=n.layers[o];rJ(e.id)===i&&t.push(new ex(a,r.id,`duplicate layer id "${r.id}", previously used at line ${e.id.__line__}`))}}if("ref"in r){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in r&&t.push(new ex(a,r[e],`"${e}" is prohibited for ref layers`))}),n.layers.forEach(t=>{rJ(t.id)===l&&(e=t)}),e?e.ref?t.push(new ex(a,r.ref,"ref cannot reference another ref layer")):o=rJ(e.type):t.push(new ex(a,r.ref,`ref layer "${l}" not found`))}else if("background"!==o)if(r.source){let e=n.sources&&n.sources[r.source],i=e&&rJ(e.type);e?"vector"===i&&"raster"===o?t.push(new ex(a,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==i&&"hillshade"===o||"raster-dem"!==i&&"color-relief"===o?t.push(new ex(a,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===i&&"raster"!==o?t.push(new ex(a,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==i||r["source-layer"]?"raster-dem"===i&&"hillshade"!==o&&"color-relief"!==o?t.push(new ex(a,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===o&&r.paint&&r.paint["line-gradient"]&&("geojson"!==i||!e.lineMetrics)&&t.push(new ex(a,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ex(a,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ex(a,r.source,`source "${r.source}" not found`))}else t.push(new ex(a,r,'missing required property "source"'));return t=t.concat(rQ({key:a,value:r,valueSpec:i.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${a}.type`,value:r.type,valueSpec:i.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:r8,layout:e=>rQ({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>r9(ew({layerType:o},e))}}),paint:e=>rQ({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>r7(ew({layerType:o},e))}})}}))}function at(e){let t=e.value,r=e.key,a=rF(t);return"string"!==a?[new ex(r,t,`string expected, ${a} found`)]:[]}let ar={promoteId:function({key:e,value:t}){if("string"===rF(t))return at({key:e,value:t});{let r=[];for(let a in t)r.push(...at({key:`${e}.${a}`,value:t[a]}));return r}}};function aa(e){let t,r=e.value,a=e.key,n=e.styleSpec,i=e.style,o=e.validateSpec;if(!r.type)return[new ex(a,r,'"type" is required')];let l=rJ(r.type);switch(l){case"vector":case"raster":return rQ({key:a,value:r,valueSpec:n[`source_${l.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:ar,validateSpec:o});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",a=e.value,n=e.styleSpec,i=n.source_raster_dem,o=e.style,l=[],s=rF(a);if(void 0===a)return l;if("object"!==s)return l.push(new ex("source_raster_dem",a,`object expected, ${s} found`)),l;let u="custom"===rJ(a.encoding),p=["redFactor","greenFactor","blueFactor","baseShift"],c=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in a)!u&&p.includes(t)?l.push(new ex(t,a[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${c} encoding found`)):i[t]?l=l.concat(e.validateSpec({key:t,value:a[t],valueSpec:i[t],validateSpec:e.validateSpec,style:o,styleSpec:n})):l.push(new ex(t,a[t],`unknown property "${t}"`));return l}({sourceName:a,value:r,style:e.style,styleSpec:n,validateSpec:o});case"geojson":if(t=rQ({key:a,value:r,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:o,objectElementValidators:ar}),r.cluster)for(let e in r.clusterProperties){let[n,i]=r.clusterProperties[e],o="string"==typeof n?[n,["accumulated"],["get",e]]:n;t.push(...r5({key:`${a}.${e}.map`,value:i,expressionContext:"cluster-map"})),t.push(...r5({key:`${a}.${e}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return t;case"video":return rQ({key:a,value:r,valueSpec:n.source_video,style:i,validateSpec:o,styleSpec:n});case"image":return rQ({key:a,value:r,valueSpec:n.source_image,style:i,validateSpec:o,styleSpec:n});case"canvas":return[new ex(a,null,"Please use runtime APIs to add canvas sources, rather than 
2including them in stylesheets.","source.canvas")];default:return r4({key:`${a}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function an(e){let t=e.value,r=e.styleSpec,a=r.light,n=e.style,i=[],o=rF(t);if(void 0===t)return i;if("object"!==o)return i.concat([new ex("light",t,`object expected, ${o} found`)]);for(let o in t){let l=o.match(/^(.*)-transition$/);i=l&&a[l[1]]&&a[l[1]].transition?i.concat(e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r})):a[o]?i.concat(e.validateSpec({key:o,value:t[o],valueSpec:a[o],validateSpec:e.validateSpec,style:n,styleSpec:r})):i.concat([new ex(o,t[o],`unknown property "${o}"`)])}return i}function ai(e){let t=e.value,r=e.styleSpec,a=r.sky,n=e.style,i=rF(t);if(void 0===t)return[];if("object"!==i)return[new ex("sky",t,`object expected, ${i} found`)];let o=[];for(let i in t)o=a[i]?o.concat(e.validateSpec({key:i,value:t[i],valueSpec:a[i],style:n,styleSpec:r})):o.concat([new ex(i,t[i],`unknown property "${i}"`)]);return o}function ao(e){let t=e.value,r=e.styleSpec,a=r.terrain,n=e.style,i=[],o=rF(t);if(void 0===t)return i;if("object"!==o)return i.concat([new ex("terrain",t,`object expected, ${o} found`)]);for(let o in t)i=a[o]?i.concat(e.validateSpec({key:o,value:t[o],valueSpec:a[o],validateSpec:e.validateSpec,style:n,styleSpec:r})):i.concat([new ex(o,t[o],`unknown property "${o}"`)]);return i}function al(e){let t=[],r=e.value,a=e.key;if(!Array.isArray(r))return at({key:a,value:r});{let n=[],i=[];for(let o in r){r[o].id&&n.includes(r[o].id)&&t.push(new ex(a,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),n.push(r[o].id),r[o].url&&i.includes(r[o].url)&&t.push(new ex(a,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),i.push(r[o].url);let l={id:{type:"string",required:!0},url:{type:"string",required:!0}};t=t.concat(rQ({key:`${a}[${o}]`,value:r[o],valueSpec:l,validateSpec:e.validateSpec}))}return t}}function as(e){return!!e&&e.constructor===Object}function au(e){return as(e.value)?[]:[new ex(e.key,e.value,`object expected, ${rF(e.value)} found`)]}let ap={"*":()=>[],array:r0,boolean:function(e){let t=e.value,r=e.key,a=rF(t);return"boolean"!==a?[new ex(r,t,`boolean expected, ${a} found`)]:[]},number:r1,color:r3,constants:rZ,enum:r4,filter:r8,function:r2,layer:ae,object:rQ,source:aa,light:an,sky:ai,terrain:ao,projection:function(e){let t=e.value,r=e.styleSpec,a=r.projection,n=e.style,i=rF(t);if(void 0===t)return[];if("object"!==i)return[new ex("projection",t,`object expected, ${i} found`)];let o=[];for(let i in t)o=a[i]?o.concat(e.validateSpec({key:i,value:t[i],valueSpec:a[i],style:n,styleSpec:r})):o.concat([new ex(i,t[i],`unknown property "${i}"`)]);return o},projectionDefinition:function(e){var t;let r=e.key,a=e.value,n=rF(a=a instanceof String?a.valueOf():a);return"array"!==n||Array.isArray(t=a)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(a[0])?["array","string"].includes(n)?[]:[new ex(r,a,`projection expected, invalid type "${n}" found`)]:[new ex(r,a,`projection expected, invalid array ${JSON.stringify(a)} found`)]},string:at,formatted:function(e){return 0===at(e).length?[]:r5(e)},resolvedImage:function(e){return 0===at(e).length?[]:r5(e)},padding:function(e){let t=e.key,r=e.value;if("array"!==rF(r))return r1({key:t,value:r,valueSpec:{}});{if(r.length<1||r.length>4)return[new ex(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let a={type:"number"},n=[];for(let i=0;i<r.length;i++)n=n.concat(e.validateSpec({key:`${t}[${i}]`,value:r[i],validateSpec:e.validateSpec,valueSpec:a}));return n}},numberArray:function(e){let t=e.key,r=e.value;if("array"!==rF(r))return r1({key:t,value:r,valueSpec:{}});{let a={type:"number"};if(r.length<1)return[new ex(t,r,"array length at least 1 expected, length 0 found")];let n=[];for(let i=0;i<r.length;i++)n=n.concat(e.validateSpec({key:`${t}[${i}]`,value:r[i],validateSpec:e.validateSpec,valueSpec:a}));return n}},colorArray:function(e){let t=e.key,r=e.value;if("array"!==rF(r))return r3({key:t,value:r});{if(r.length<1)return[new ex(t,r,"array length at least 1 expected, length 0 found")];let e=[];for(let a=0;a<r.length;a++)e=e.concat(r3({key:`${t}[${a}]`,value:r[a]}));return e}},variableAnchorOffsetCollection:function(e){let t=e.key,r=e.value,a=rF(r),n=e.styleSpec;if("array"!==a||r.length<1||r.length%2!=0)return[new ex(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let i=[];for(let a=0;a<r.length;a+=2)i=(i=i.concat(r4({key:`${t}[${a}]`,value:r[a],valueSpec:n.layout_symbol["text-anchor"]}))).concat(r0({key:`${t}[${a+1}]`,value:r[a+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:n}));return i},sprite:al,state:au,fontFaces:function(e){let t=e.key,r=e.value,a=e.validateSpec,n=e.styleSpec,i=e.style;if(!as(r))return[new ex(t,r,`object expected, ${rF(r)} found`)];let o=[];for(let e in r){let l=r[e],s=rF(l);if("string"===s)o.push(...at({key:`${t}.${e}`,value:l}));else if("array"===s){let r={url:{type:"string",required:!0}
2,"unicode-range":{type:"array",value:"string"}};for(let[s,u]of l.entries())o.push(...rQ({key:`${t}.${e}[${s}]`,value:u,valueSpec:r,styleSpec:n,style:i,validateSpec:a}))}else o.push(new ex(`${t}.${e}`,l,`string or array expected, ${s} found`))}return o}};function ac(e){let t=e.value,r=e.valueSpec,a=e.styleSpec;return e.validateSpec=ac,r.expression&&rD(rJ(t))?r2(e):r.expression&&rG(rY(t))?r5(e):r.type&&ap[r.type]?ap[r.type](e):rQ(ew({},e,{valueSpec:r.type?a[r.type]:r}))}function ah(e){let t=e.value,r=e.key,a=at(e);return a.length||(-1===t.indexOf("{fontstack}")&&a.push(new ex(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&a.push(new ex(r,t,'"glyphs" url must include a "{range}" token'))),a}function ad(e,t=eb){let r=[];return r=r.concat(ac({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:ac,objectElementValidators:{glyphs:ah,"*":()=>[]}})),e.constants&&(r=r.concat(rZ({key:"constants",value:e.constants}))),am(r)}function af(e){return function(t){return e(Object.assign({},t,{validateSpec:ac}))}}function am(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function ay(e){return function(...t){return am(e.apply(this,t))}}function ag(e){if(!e)return{style:q.Gj[q.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0};if("string"==typeof e){let t=function(e){try{let t=JSON.parse(e),r=ad(t);return{isValidJSON:!0,isValidStyle:0===r.length,styleObject:0===r.length?t:null}}catch{return{isValidJSON:!1,isValidStyle:!1,styleObject:null}}}(e);return t.isValidStyle?{style:t.styleObject,requiresUrlMonitoring:!1,isFallback:!1}:t.isValidJSON?{style:q.Gj[q.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}:e.startsWith("http")?{style:e,requiresUrlMonitoring:!0,isFallback:!1}:e.toLowerCase().includes(".json")?{style:function(e){try{return new URL(e).href}catch{}return new URL(e,location.origin).href}(e),requiresUrlMonitoring:!0,isFallback:!1}:{style:(0,q.ub)(e),requiresUrlMonitoring:!0,isFallback:!1}}return e instanceof q.Hu?{style:e.getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:e instanceof q.rF?{style:e.getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:0===ad(e).length?{style:e,requiresUrlMonitoring:!1,isFallback:!1,isJSON:!0}:{style:q.Gj[q.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}}function av(e,t,r){let a=window.document.createElement(e);return void 0!==t&&(a.className=t),r&&r.appendChild(a),a}function ab(e){e.parentNode&&e.parentNode.removeChild(e)}ad.source=ay(af(aa)),ad.sprite=ay(af(al)),ad.glyphs=ay(af(ah)),ad.light=ay(af(an)),ad.sky=ay(af(ai)),ad.terrain=ay(af(ao)),ad.state=ay(af(au)),ad.layer=ay(af(ae)),ad.filter=ay(af(r8)),ad.paintProperty=ay(af(r7)),ad.layoutProperty=ay(af(r9));class ax{constructor(){G(this,"_map"),G(this,"_container"),G(this,"_terrainButton"),function(e,t){for(let r of e)"function"==typeof t[r]&&(t[r]=t[r].bind(t))}(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(e){return this._map=e,this._container=av("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=av("button","maplibregl-ctrl-terrain",this._container),av("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){ab(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){aw(this._map),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.hasTerrain()?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))}}function aw(e){e.hasTerrain()?e.disableTerrain():e.enableTerrain()}class aS extends Z{constructor(e={}){super({showCompass:e.showCompass??!0,showZoom:e.showZoom??!0,visualizePitch:e.visualizePitch??!0}),G(this,"_rotateCompassArrow",()=>{let e=this._map.getBearing(),t=this._map.getPitch(),r=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.cos(Math.PI/180*t)**.5)}) rotateX(${Math.min(70,t)}deg) rotateZ(${-e}deg)`:`rotate(${-e}deg)`;this._compassIcon.style.transform=r}),this._compass&&(this._compass.removeEventListener("click",this._compass.clickFunction),this._compass.addEventListener("click",e=>{0===this._map.getPitch()?this._map.easeTo({pitch:Math.min(this._map.getMaxPitch(),80)}):this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}))}_createButton(e,t){let r=super._createButton(e,t);return r.clickFunction=t,r}}
2let ak=O.Marker,a_=O.LngLat,aA=O.LngLatBounds;class aC extends J{constructor(){super(...arguments),G(this,"lastUpdatedCenter",new a_(0,0)),G(this,"_updateCamera",e=>{var t;let r=new a_(e.coords.longitude,e.coords.latitude),a=e.coords.accuracy,n={bearing:this._map.getBearing(),...this.options.fitBoundsOptions,linear:!0},i=this._map.getZoom();i>((null==(t=this.options.fitBoundsOptions)?void 0:t.maxZoom)??30)&&(n.zoom=i),this._map.fitBounds(aA.fromLngLat(r,a),n,{geolocateSource:!0});let o=!1,l=()=>{o=!0};this._map.once("click",l),this._map.once("dblclick",l),this._map.once("dragstart",l),this._map.once("mousedown",l),this._map.once("touchstart",l),this._map.once("wheel",l),this._map.once("moveend",()=>{this._map.off("click",l),this._map.off("dblclick",l),this._map.off("dragstart",l),this._map.off("mousedown",l),this._map.off("touchstart",l),this._map.off("wheel",l),o||(this.lastUpdatedCenter=this._map.getCenter())})}),G(this,"_finishSetupUI",e=>{if(this._map){if(!1===e){let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=av("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ak({element:this._dotElement}),this._circleElement=av("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ak({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("move",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("moveend",e=>{let t=e.originalEvent&&"resize"===e.originalEvent.type,r=this.lastUpdatedCenter.distanceTo(this._map.getCenter());e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t||!(r>1)||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Event("trackuserlocationend")))})}}),G(this,"_onZoom",()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()})}_updateCircleRadius(){if("BACKGROUND"!==this._watchState&&"ACTIVE_LOCK"!==this._watchState)return;let e=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],t=this._map.project(e),r=this._map.unproject([t.x,t.y]),a=this._map.unproject([t.x+20,t.y]),n=r.distanceTo(a)/20,i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}}class aE{constructor(e,t,r){if(K(this,h),K(this,d),K(this,f),K(this,m),K(this,y),"string"==typeof e){const t=document.querySelector(e);if(!t)throw Error(`No element has been found with selector "${e}
2" when creating an external control.`);X(this,d,t)}else X(this,d,e);t&&X(this,f,e=>{t(H(this,h),H(this,d),e)}),r&&X(this,m,e=>{r(H(this,h),H(this,d),e)}),X(this,y,H(this,d).parentElement)}onAdd(e){return X(this,h,e),H(this,f)&&H(this,d).addEventListener("click",H(this,f)),H(this,m)&&H(this,h).on("render",H(this,m)),ab(H(this,d)),H(this,d)}onRemove(){H(this,f)&&H(this,d).removeEventListener("click",H(this,f)),H(this,m)&&H(this,h).off("render",H(this,m)),H(this,y)?H(this,y).appendChild(H(this,d)):ab(H(this,d))}}h=new WeakMap,d=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakMap;class aL{constructor(){G(this,"map"),G(this,"container"),G(this,"projectionButton")}onAdd(e){return this.map=e,this.container=av("div","maplibregl-ctrl maplibregl-ctrl-group"),this.projectionButton=av("button","maplibregl-ctrl-projection",this.container),av("span","maplibregl-ctrl-icon",this.projectionButton).setAttribute("aria-hidden","true"),this.projectionButton.type="button",this.projectionButton.addEventListener("click",this.toggleProjection.bind(this)),e.on("projectiontransition",this.updateProjectionIcon.bind(this)),this.updateProjectionIcon(),this.container}onRemove(){ab(this.container),this.map.off("projectiontransition",this.updateProjectionIcon),this.map=void 0}toggleProjection(){aT(this.map),this.updateProjectionIcon()}updateProjectionIcon(){this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"),this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"),this.map.isGlobeProjection()?(this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"),this.projectionButton.title="Enable Mercator projection"):(this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"),this.projectionButton.title="Enable Globe projection")}}function aT(e){void 0===e.getProjection()&&e.setProjection({type:"mercator"}),e.isGlobeProjection()?e.setProjection("mercator",{persist:!0}):e.setProjection("globe",{persist:!0})}let aM={"zoom-in":e=>e.zoomIn(),"zoom-out":e=>e.zoomOut(),"toggle-projection":aT,"toggle-terrain":aw,"reset-view":e=>{0===e.getPitch()?e.easeTo({pitch:Math.min(e.getMaxPitch(),80)}):e.resetNorthPitch()},"reset-bearing":e=>{e.rotateTo(0)},"reset-pitch":e=>{e.setPitch(0)},"reset-roll":e=>{e.setRoll(0)}};class aP extends aE{constructor(e,t){if(t&&!(t in aM))throw Error(`data-maptiler-control value "${t}" is invalid.`);super(e,t&&aM[t]),K(this,g),K(this,v,new Map)}onAdd(e){return X(this,g,e),super.onAdd(e)}onRemove(){for(let[e,t]of H(this,v)){let r=e.deref();r&&r.removeEventListener("click",t)}H(this,v).clear(),super.onRemove()}configureGroupItem(e,t){if(!t)return;if(!(t in aM))throw Error(`data-maptiler-control value "${t}" is invalid.`);let r=r=>{aM[t](H(this,g),e,r)};e.addEventListener("click",r),H(this,v).set(new WeakRef(e),r)}}g=new WeakMap,v=new WeakMap,G(aP,"controlCallbacks",aM);class a${constructor(e,t){K(this,A),K(this,b),G(this,"map"),K(this,x),K(this,w),K(this,S),K(this,k,!1),K(this,_),void 0!==e.style&&X(this,k,!0),X(this,b,{zoomAdjust:-4,position:"top-right",...t,forceNoAttributionControl:!0,attributionControl:!1,navigationControl:!1,geolocateControl:!1,maptilerLogo:!1,minimap:!1,hash:!1,pitchAdjust:!1,...e,containerStyle:{border:"1px solid #000",width:"400px",height:"300px",...e.containerStyle??{}}}),void 0!==e.lockZoom&&(H(this,b).minZoom=e.lockZoom,H(this,b).maxZoom=e.lockZoom)}setStyle(e,t){H(this,k)||this.map.setStyle(e,t),W(this,A,E).call(this)}addLayer(e,t){return H(this,k)||this.map.addLayer(e,t),W(this,A,E).call(this),this.map}moveLayer(e,t){return H(this,k)||this.map.moveLayer(e,t),W(this,A,E).call(this),this.map}removeLayer(e){return H(this,k)||this.map.removeLayer(e),W(this,A,E).call(this),this}setLayerZoomRange(e,t,r){return H(this,k)||this.map.setLayerZoomRange(e,t,r),W(this,A,E).call(this),this}setFilter(e,t,r){return H(this,k)||this.map.setFilter(e,t,r),W(this,A,E).call(this),this}setPaintProperty(e,t,r,a){return H(this,k)||this.map.setPaintProperty(e,t,r,a),W(this,A,E).call(this),this}setLayoutProperty(e,t,r,a){return H(this,k)||this.map.setLayoutProperty(e,t,r,a),W(this,A,E).call(this),this}setGlyphs(e,t){return H(this,k)||this.map.setGlyphs(e,t),W(this,A,E).call(this),this}onAdd(e){for(let[t,r]of(X(this,x,e),X(this,w,av("div","maplibregl-ctrl maplibregl-ctrl-group")),Object.entries(H(this,b).containerStyle)))H(this,w).style.setProperty(t,r);return H(this,b).container=H(this,w),H(this,b).zoom=e.getZoom()+H(this,b).zoomAdjust,this.map=new np(H(this,b)),this.map.once("style.load",()=>{this.map.resize()}),this.map.once("load",()=>{W(this,A,C).call(this,H(this,b).parentRect),X(this,_,W(this,A,L).call(this))}),H(this,w)}onRemove(){var e;null==(e=H(this,_))||e.call(this),ab(H(this,w))}}b=new WeakMap,x=new WeakMap,w=new WeakMap,S=new WeakMap,k=new WeakMap,_=new WeakMap,A=new WeakSet,C=function(e){void 0===e||void 0===e.linePaint&&void 0===e.fillPaint||(X(this,S,{type:"Feature",properties:{name:"parentRect"},geometry:{type:"Polygon",coordinates:[[[],[],[],[],[]]]}}),this.map.addSource("parentRect",{type:"geojson",data:H(this,S)}),(void 0!==e.lineLayout||void 0!==e.linePaint)&&this.map.addLayer({id:"parentRectOutline",type:"line",source:"parentRect",layout:{...e.lineLayout},paint:{"line-color":"#FFF","line-width":1,"line-opacity":.85,...e.linePaint}}),void 0!==e.fillPaint&&this.map.addLayer({id:"parentRectFill",type:"fill",s
2ource:"parentRect",layout:{},paint:{"fill-color":"#08F","fill-opacity":.135,...e.fillPaint}}),W(this,A,E).call(this))},E=function(){if(void 0===H(this,S))return;let{devicePixelRatio:e}=window,t=H(this,x).getCanvas(),r=t.width/e,a=t.height/e,n=H(this,x).unproject.bind(H(this,x)),i=n([0,0]),o=n([r,0]),l=n([0,a]),s=n([r,a]);H(this,S).geometry.coordinates=[[l.toArray(),s.toArray(),o.toArray(),i.toArray(),l.toArray()]];let u=this.map.getSource("parentRect");void 0!==u&&u.setData(H(this,S))},L=function(){let{pitchAdjust:e}=H(this,b),t=()=>{i("parent")},r=()=>{i("minimap")},a=()=>{H(this,x).on("move",t),this.map.on("move",r)},n=()=>{H(this,x).off("move",t),this.map.off("move",r)},i=t=>{n();let r="parent"===t?H(this,x):this.map,i="parent"===t?this.map:H(this,x),o=r.getCenter(),l=r.getZoom()+H(this,b).zoomAdjust*("parent"===t?1:-1),s=r.getBearing(),u=r.getPitch();i.jumpTo({center:o,zoom:l,bearing:s,pitch:e?u:0}),W(this,A,E).call(this),a()};return a(),()=>{n()}};class aI{constructor(e,t=2e3){G(this,"map"),G(this,"registeredModules",new Set),G(this,"viewerType"),this.map=e,this.viewerType="Map",setTimeout(async()=>{if(!eo.telemetry)return;let e=this.preparePayload();try{(await fetch(e,{method:"POST"})).ok||console.warn("The metrics could not be sent to MapTiler Cloud")}catch(e){console.warn("The metrics could not be sent to MapTiler Cloud",e)}},Math.max(1e3,t))}registerModule(e,t){this.registeredModules.add(`${e}:${t}`)}registerViewerType(e="Map"){this.viewerType=e}preparePayload(){let e=new URL(ea.telemetryURL);return e.searchParams.append("sdk","3.11.1"),e.searchParams.append("key",eo.apiKey),e.searchParams.append("mtsid",en),e.searchParams.append("session",eo.session?"1":"0"),e.searchParams.append("caching",eo.caching?"1":"0"),e.searchParams.append("lang-updated",this.map.isLanguageUpdated()?"1":"0"),e.searchParams.append("terrain",this.map.getTerrain()?"1":"0"),e.searchParams.append("globe",this.map.isGlobeProjection()?"1":"0"),e.searchParams.append("viewerType",this.viewerType),this.registeredModules.size>0&&e.searchParams.append("modules",Array.from(this.registeredModules).join("|")),e.href}}var aj="u">typeof Float32Array?Float32Array:Array;function az(){var e=new aj(16);return aj!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function aR(e,t,r){var a=Math.sin(r),n=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],u=t[8],p=t[9],c=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*n+u*a,e[5]=o*n+p*a,e[6]=l*n+c*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=p*n-o*a,e[10]=c*n-l*a,e[11]=h*n-s*a,e}function aO(e,t,r){var a=Math.sin(r),n=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],u=t[4],p=t[5],c=t[6],h=t[7];return t!==e&&(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[0]=i*n+u*a,e[1]=o*n+p*a,e[2]=l*n+c*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=p*n-o*a,e[6]=c*n-l*a,e[7]=h*n-s*a,e}var aN=function(e,t,r,a,n){var i=1/Math.tan(t/2);if(e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=n&&n!==1/0){var o=1/(a-n);e[10]=(n+a)*o,e[14]=2*n*a*o}else e[10]=-1,e[14]=-2*a;return e};function aU(){var e=new aj(3);return aj!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function aq(e,t){var r=t[0],a=t[1],n=t[2],i=r*r+a*a+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function aF(e,t,r){var a=t[0],n=t[1],i=t[2],o=r[0],l=r[1],s=r[2];return e[0]=n*s-i*l,e[1]=i*o-a*s,e[2]=a*l-n*o,e}function aD(){if($)return P;$=1;let e=(M||(M=1,T={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],ol
2ive:[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]}),T),t={};for(let r of Object.keys(e))t[e[r]]=r;let r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(let e of(P=r,Object.keys(r))){if(!("channels"in r[e]))throw Error("missing channels property: "+e);if(!("labels"in r[e]))throw Error("missing channel labels property: "+e);if(r[e].labels.length!==r[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:a}=r[e];delete r[e].channels,delete r[e].labels,Object.defineProperty(r[e],"channels",{value:t}),Object.defineProperty(r[e],"labels",{value:a})}return r.rgb.hsl=function(e){let t,r=e[0]/255,a=e[1]/255,n=e[2]/255,i=Math.min(r,a,n),o=Math.max(r,a,n),l=o-i;o===i?t=0:r===o?t=(a-n)/l:a===o?t=2+(n-r)/l:n===o&&(t=4+(r-a)/l),(t=Math.min(60*t,360))<0&&(t+=360);let s=(i+o)/2;return[t,100*(o===i?0:s<=.5?l/(o+i):l/(2-o-i)),100*s]},r.rgb.hsv=function(e){let t,r,a,n,i,o=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(o,l,s),p=u-Math.min(o,l,s),c=function(e){return(u-e)/6/p+.5};return 0===p?(n=0,i=0):(i=p/u,t=c(o),r=c(l),a=c(s),o===u?n=a-r:l===u?n=1/3+t-a:s===u&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*i,100*u]},r.rgb.hwb=function(e){let t=e[0],a=e[1],n=e[2];return[r.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(a,n))*100,100*(n=1-1/255*Math.max(t,Math.max(a,n)))]},r.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,n=Math.min(1-t,1-r,1-a);return[100*((1-t-n)/(1-n)||0),100*((1-r-n)/(1-n)||0),100*((1-a-n)/(1-n)||0),100*n]},r.rgb.keyword=function(r){let a=t[r];if(a)return a;let n=1/0,i;for(let t of Object.keys(e)){let a=e[t],o=(r[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2;o<n&&(n=o,i=t)}return i},r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255;return[100*(.4124*(t=t>.04045?((t+.055)/1.055)**2.4:t/12.92)+.3576*(r=r>.04045?((r+.055)/1.055)**2.4:r/12.92)+.1805*(a=a>.04045?((a+.055)/1.055)**2.4:a/12.92)),100*(.2126*t+.7152*r+.0722*a),100*(.0193*t+.1192*r+.9505*a)]},r.rgb.lab=function(e){let t=r.rgb.xyz(e),a=t[0],n=t[1],i=t[2];return a/=95.047,n/=100,i/=108.883,[116*(n=n>.008856?n**(1/3):7.787*n+16/116)-16,500*((a=a>.008856?a**(1/3):7.787*a+16/116)-n),200*(n-(i=i>.008856?i**(1/3):7.787*i+16/116))]},r.hsl.rgb=function(e){let t,r,a,n=e[0]/360,i=e[1]/100,o=e[2]/100;if(0===i)return[a=255*o,a,a];t=o<.5?o*(1+i):o+i-o*i;let l=2*o-t,s=[0,0,0];for(let e=0;e<3;e++)(r=n+-(1/3*(e-1)))<0&&r++,r>1&&r--,a=6*r<1?l+(t-l)*6*r:2*r<1?t:3*r<2?l+(t-l)*(2/3-r)*6:l,s[e]=255*a;return s},r.hsl.hsv=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,n=r,i=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,n*=i<=1?i:2-i;let o=(a+r)/2;return[t,100*(0===a?2*n/(i+n):2*r/(a+r)),100*o]},r.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,a=e[2]/100,n=Math.floor(t)%6,i=t-Math.floor(t),o=255*a*(1-r),l=255*a*(1-r*i),s=255*a*(1-r*(1-i));switch(a*=255,n){case 0:return[a,s,o];case 1:return[l,a,o];case 2:return[o,a,s];case 3:return[o,l,a];case 4:return[s,o,a];case 5:return[a,o,l]}},r.hsv.hsl=function(e){let t,r,a=e[0],n=e[1]/100,i=e[2]/100,o=Math.max(i,.01);r=(2-n)*i;let l=(2-n)*o;return[a,100*(t=(t=n*o/(l<=1?l:2-l))||0),100*(r/=2)]},r.hwb.rgb=function(e){let t,r,a,n,i=e[0]/360,o=e[1]/100,l=e[2]/100,s=o+l;s>1&&(o/=s,l/=s);let u=Math.floor(6*i),p=1-l;t=6*i-u,(1&u)!=0&&(t=1-t);let c=o+t*(p-o);switch(u){default:case 6:case 0:r=p,a=c,n=o;break;case 1:r=c,a=p,n=o;break;case 2:r=o,a=p,n=c;break;case 3:r=o,a=c,n=p;break;case 4:r=c,a=o,n=p;break;case 5:r=p,a=o,n=c}return[255*r,255*a,255*n]},r.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,a*(1-n)+n))]},r.xyz.rgb=function(e){let t,r,a,n=e[0]/100,i=e[1]/100,o=e[2]/100;return t=(t=3.2406*n+-1.5372*i+-.4986*o)>.0031308?1.055*t**(1/2.4)-.055:12.92*t,r=(r=-.9689*n+1.8758*i+.0415*o)>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=(a=.0557*n+-.204*i+1.057*o)>.0031308?1.055*a**(1/2.4)-.055:12.92*a,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(a=Math.min(Math.max(0,a),1))]},r.xyz.lab=function(e){let t=e[0],r=e[1],a=e[2];return t/=95.047,r/=100,a/=108.883,[116*(r=r>.008856?r**(1/3):7.787*r+16/116)-16,500*((t=t>.008856?t**(1/3):7.787*t+16/116)-r),200*(r-(a=a>.008856?a**(1/3):7.787*a+16/116))]},r.lab.xyz=function(e){let t,r,a,n=e[0],i=e[1],o=e[2];t=i/500+(r=(n+16)/116),a=r-o/200;let l=r**3,s=t**3,u=a**3;return r=(l>.008856?l:(r-16/116)/7.787)*100,[t=(s>.008856?s:(t-16/116)/7.787)*95.047,r,a=(u>.008856?u:(a-16/116)/7.787)*108.883]},r.lab.lch=function(e){let t,r=e[0],a=e[1],n=e[2];return(t=360*Math.atan2(n,a)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(a*a+n*n),t]},r.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI;return[t,r*Math.cos(a),r*Math.sin(a)]},r.rgb.ansi16=function(e,t=null){let[a,n,i]=e,o=null===t?r.rgb.hsv(e)[2]:t;if(0===(o=Math.round(o/50)))return 30;let l=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(a/255));return 2===o&&(l+=60),l},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){let t=e[0],r=e[1],a=e[2];return t===r&&r===a?t<8?16:t>
2248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];let r=(~~(e>50)+1)*.5;return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},r.ansi256.rgb=function(e){let t;if(e>=232){let t=(e-232)*10+8;return[t,t,t]}return[Math.floor((e-=16)/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},r.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));let a=parseInt(r,16);return[a>>16&255,a>>8&255,255&a]},r.rgb.hcg=function(e){let t,r=e[0]/255,a=e[1]/255,n=e[2]/255,i=Math.max(Math.max(r,a),n),o=Math.min(Math.min(r,a),n),l=i-o;return t=l<1?o/(1-l):0,[360*((l<=0?0:i===r?(a-n)/l%6:i===a?2+(n-r)/l:4+(r-a)/l)/6%1),100*l,100*t]},r.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=r<.5?2*t*r:2*t*(1-r),n=0;return a<1&&(n=(r-.5*a)/(1-a)),[e[0],100*a,100*n]},r.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=t*r,n=0;return a<1&&(n=(r-a)/(1-a)),[e[0],100*a,100*n]},r.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100;if(0===r)return[255*a,255*a,255*a];let n=[0,0,0],i=t%1*6,o=i%1,l=1-o,s=0;switch(Math.floor(i)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=l,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=l,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=l}return s=(1-r)*a,[(r*n[0]+s)*255,(r*n[1]+s)*255,(r*n[2]+s)*255]},r.hcg.hsv=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t),a=0;return r>0&&(a=t/r),[e[0],100*a,100*r]},r.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],100*a,100*r]},r.hcg.hwb=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],(r-t)*100,(1-r)*100]},r.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,a=r-t,n=0;return a<1&&(n=(r-a)/(1-a)),[e[0],100*a,100*n]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=function(e){return[0,0,e[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},P}aU();let aB=(u=function(){if(R)return z;R=1;let e=aD(),t=function(){if(j)return I;j=1;let e=aD();return I=function(t){let r=function(t){let r=function(){let t={},r=Object.keys(e);for(let e=r.length,a=0;a<e;a++)t[r[a]]={distance:-1,parent:null};return t}(),a=[t];for(r[t].distance=0;a.length;){let t=a.pop(),n=Object.keys(e[t]);for(let e=n.length,i=0;i<e;i++){let e=n[i],o=r[e];-1===o.distance&&(o.distance=r[t].distance+1,o.parent=t,a.unshift(e))}}return r}(t),a={},n=Object.keys(r);for(let t=n.length,i=0;i<t;i++){let t=n[i];null!==r[t].parent&&(a[t]=function(t,r){let a=[r[t].parent,t],n=e[r[t].parent][t],i=r[t].parent;for(;r[i].parent;)a.unshift(r[i].parent),n=function(e,t){return function(r){return t(e(r))}}(e[r[i].parent][i],n),i=r[i].parent;return n.conversion=a,n}(t,r))}return a}}(),r={};return Object.keys(e).forEach(a=>{r[a]={},Object.defineProperty(r[a],"channels",{value:e[a].channels}),Object.defineProperty(r[a],"labels",{value:e[a].labels});let n=t(a);Object.keys(n).forEach(e=>{let t,i,o=n[e];r[a][e]=(t=function(...e){let t=e[0];if(null==t)return t;t.length>1&&(e=t);let r=o(e);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r},"conversion"in o&&(t.conversion=o.conversion),t),r[a][e].raw=(i=function(...e){let t=e[0];return null==t?t:(t.length>1&&(e=t),o(e))},"conversion"in o&&(i.conversion=o.conversion),i)})}),z=r}
2())&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;function aG({gl:e,type:t,source:r}){let a=e.createShader(t);if(null===a)throw Error("Cannot create shader");if(e.shaderSource(a,r),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS))throw console.error("Shader compilation error:",e.getShaderInfoLog(a)),e.deleteShader(a),Error("Cannot compile shader");return a}function aV({gl:e,vertexShaderSource:t,fragmentShaderSource:r,attributesKeys:a,uniformsKeys:n,vertices:i,indices:o}){let l,s,u=function({gl:e,vertexShaderSource:t,fragmentShaderSource:r}){let a=aG({gl:e,type:e.VERTEX_SHADER,source:t}),n=aG({gl:e,type:e.FRAGMENT_SHADER,source:r}),i=e.createProgram();if(e.attachShader(i,a),e.attachShader(i,n),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw console.error("Error: ",e.getProgramInfoLog(i)),Error("Cannot link shader program");return i}({gl:e,vertexShaderSource:t,fragmentShaderSource:r}),p=a.reduce((t,r)=>(t[r]=e.getAttribLocation(u,`a_${r}`),t),{}),c=n.reduce((t,r)=>(t[r]=function(e,t,r){let a=e.getUniformLocation(t,r);if(null===a)throw Error(`Cannot get uniform location for ${r}`);return a}(e,u,`u_${r}`),t),{}),h=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,h),e.bufferData(e.ARRAY_BUFFER,new Float32Array(i),e.STATIC_DRAW),void 0!==o&&(l=e.createBuffer(),s=o.length,e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,l),e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(o),e.STATIC_DRAW)),{shaderProgram:u,programInfo:{attributesLocations:p,uniformsLocations:c},positionBuffer:h,indexBuffer:l,indexBufferLength:s}}function aH(e){if(!e||"transparent"===e)return[1,1,1,0];try{var t;let r=(t=e,(n=n??document.createElement("canvas").getContext("2d"))?(n.fillStyle=t,n.fillStyle):"#000000"),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(r);if(null!=a&&a.length){let e=!!a[4];return[...aB.hex.rgb(r).map(e=>e/255),e?parseInt(a[4],16)/255:1]}let i=r.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi)??["0","0","0"];if(r.includes("rgb")){let e=r.includes("rgba"),t=[...i.map(e=>parseFloat(e)).map((e,t)=>t<3?e/255:e)];return e||t.push(1),t}}catch{}return console.warn([`[parseColorStringToVec4]: Color ${e} is either not a valid color or its type is not supported, defaulting to black`]),[0,0,0,1]}let aK=[-.5,-.5,.5,.5,-.5,.5,.5,.5,.5,-.5,.5,.5,-.5,-.5,-.5,-.5,.5,-.5,.5,.5,-.5,.5,-.5,-.5,-.5,.5,-.5,-.5,.5,.5,.5,.5,.5,.5,.5,-.5,-.5,-.5,-.5,.5,-.5,-.5,.5,-.5,.5,-.5,-.5,.5,.5,-.5,-.5,.5,.5,-.5,.5,.5,.5,.5,-.5,.5,-.5,-.5,-.5,-.5,-.5,.5,-.5,.5,.5,-.5,.5,-.5],aX=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],aW=`attribute vec3 a_vertexPosition;
3varying vec3 vTextureCoord;
4
5uniform mat4 u_projectionMatrix;
6uniform mat4 u_modelViewMatrix;
7  
8void main(void) {
9  vTextureCoord = vec3(-a_vertexPosition.x, a_vertexPosition.y, a_vertexPosition.z);
10  gl_Position = u_projectionMatrix * u_modelViewMatrix * vec4(a_vertexPosition, 1.0
10);
11}
12`,aZ=`precision mediump float;
13
14varying vec3 vTextureCoord;
15
16%USE_TEXTURE_MACRO_MARKER%
17
18# ifdef USE_TEXTURE
19uniform samplerCube u_cubeSampler;
20uniform float u_fadeOpacity;
21# endif
22
23uniform vec4 u_bgColor;
24
25void main(void) {
26  #ifdef USE_TEXTURE
27  vec4 texColor = textureCube(u_cubeSampler, vTextureCoord);
28
29    gl_FragColor = mix(
30      u_bgColor,
31      texColor,
32      min(texColor.a, u_fadeOpacity)
33    );
34
35    gl_FragColor.a = max(gl_FragColor.a, u_fadeOpacity);
36
37  #else
38  gl_FragColor = u_bgColor;
39  #endif
40}
41`;var aJ=((o=aJ||{}).UNIVERSE_DARK="universe-dark",o);let aY={stars:{color:"hsl(233,100%,92%)",preset:"stars"},space:{color:"hsl(210, 100%, 4%)",preset:"space"},milkyway:{color:"hsl(233,100%,92%)",preset:"milkyway"},"milkyway-subtle":{color:"hsl(233,100%,92%)",preset:"milkyway-subtle"},"milkyway-bright":{color:"hsl(233,100%,92%)",preset:"milkyway-bright"},"milkyway-colored":{color:"black",preset:"milkyway-colored"}};var aQ=((l=aQ||{}).POSITIVE_X="pX",l.NEGATIVE_X="nX",l.POSITIVE_Y="pY",l.NEGATIVE_Y="nY",l.POSITIVE_Z="pZ",l.NEGATIVE_Z="nZ",l);let a0=new Map,a1=new Map;function a2(e){return e?Object.fromEntries(Object.keys(e).sort().map(t=>[t,e[t]])):{}}let a5="https://api.maptiler.com/resources/space",a3=["vertexPosition"],a4=["projectionMatrix","modelViewMatrix","cubeSampler","bgColor","fadeOpacity"],a8="%USE_TEXTURE_MACRO_MARKER%",a6=aY.stars;class a7{constructor(e){G(this,"id","Cubemap Layer"),G(this,"type","custom"),G(this,"renderingMode","3d"),G(this,"map"),G(this,"faces"),G(this,"useCubemapTexture",!0),G(this,"currentFadeOpacity",0),G(this,"cubeMapNeedsUpdate",!1),G(this,"bgColor"),G(this,"previousBgColor",[0,0,0,0]),G(this,"targetBgColor",[0,0,0,0]),G(this,"transitionDelta",0),G(this,"gl"),G(this,"cubemap"),G(this,"texture"),G(this,"currentFacesDefinitionKey",""),G(this,"options"),G(this,"animationActive",!0),G(this,"imageIsAnimating",!1),G(this,"imageFadeInDelta",0);const t=a9(e);if(t.length>0)throw Error(`[CubemapLayer]: Invalid cubemap specification:
42- ${t.join(`
43 - `)}`);const r=function(e,t){if(!a9(e))return{color:"transparent"};if(!0===e)return t;let r={...e};if(e.faces||e.path)return delete r.preset,r;let a=e.preset;if(void 0!==a&&!(a in aY))throw Error(`[CubemapLayer]: Invalid preset "${a}". Available presets: ${Object.keys(aY).join(", ")}`);return{...r,color:r.color??aY[a].color??"hsl(233,100%,92%)"}}(e,a6);this.options=r,this.currentFacesDefinitionKey=JSON.stringify(r.faces??r.preset??r.path),this.bgColor=[0,0,0,0],this.targetBgColor=aH(r.color),this.faces=ne(r),this.useCubemapTexture=null!==this.faces}updateCubemap({facesNeedUpdate:e}={facesNeedUpdate:!0}){this.useCubemapTexture=null!==this.faces;let t=a4.filter(e=>"cubeSampler"!==e&&"fadeOpacity"!==e||this.useCubemapTexture);this.cubemap=aV({gl:this.gl,vertexShaderSource:aW,fragmentShaderSource:this.useCubemapTexture?aZ.replace(a8,"#define USE_TEXTURE"):aZ.replace(a8,""),attributesKeys:a3,uniformsKeys:t,vertices:aK,indices:aX}),this.cubeMapNeedsUpdate=e,this.useCubemapTexture&&this.updateTexture(this.gl,this.faces),this.animateColorChange()}onAdd(e,t){this.map=e,this.gl=t,this.updateCubemap()}onRemove(e,t){let r;this.cubemap&&(this.texture&&((r=a0.get(t))&&(a0.delete(t),t.deleteTexture(r)),this.texture=void 0),t.deleteProgram(this.cubemap.shaderProgram),t.deleteBuffer(this.cubemap.positionBuffer))}updateTexture(e,t){!0===this.cubeMapNeedsUpdate&&!this.imageIsAnimating&&(this.cubeMapNeedsUpdate=!1,this.useCubemapTexture&&function({gl:e,faces:t,onReady:r,forceRefresh:a}){if(a0.get(e)&&!a&&i===JSON.stringify(t))return r(a0.get(e),a1.get(e));i=JSON.stringify(t);let n=a0.get(e)??e.createTexture();if(e.bindTexture(e.TEXTURE_CUBE_MAP,n),!t)return console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");let o=Object.keys(t).length;6!==o?console.warn(`[CubemapLayer][loadCubemapTexture]: Faces should contain exactly 6 images, but found ${o}`):Promise.all(Object.entries(t).map(([e,t])=>new Promise((r,a)=>{if(void 0===t)return void a(Error(`[CubemapLayer][loadCubemapTexture]: Face ${e} is undefined`));let n=new Image;n.crossOrigin="anonymous";let i=()=>{r({image:n,key:e})};
43n.src=t,n.complete&&n.naturalWidth>0?i():n.onload=i,n.onerror=()=>{a(Error(`[CubemapLayer][loadCubemapTexture]: Error loading image ${t}`))}}))).then(t=>{for(let r=0;r<t.length;r++){let a=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE,{image:l,key:s}=t[r]??{};if(!l||!s){console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");continue}let u=function(e,t){if(t===aQ.POSITIVE_X)return e.TEXTURE_CUBE_MAP_POSITIVE_X;if(t===aQ.NEGATIVE_X)return e.TEXTURE_CUBE_MAP_NEGATIVE_X;if(t===aQ.POSITIVE_Y)return e.TEXTURE_CUBE_MAP_POSITIVE_Y;if(t===aQ.NEGATIVE_Y)return e.TEXTURE_CUBE_MAP_NEGATIVE_Y;if(t===aQ.POSITIVE_Z)return e.TEXTURE_CUBE_MAP_POSITIVE_Z;if(t===aQ.NEGATIVE_Z)return e.TEXTURE_CUBE_MAP_NEGATIVE_Z;throw Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${t}`)}(e,s);e.bindTexture(e.TEXTURE_CUBE_MAP,n),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(u,0,a,i,o,l)}e.bindTexture(e.TEXTURE_CUBE_MAP,n),e.generateMipmap(e.TEXTURE_CUBE_MAP),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR);let a=t.map(e=>e.image);r(n,a),a1.set(e,a),a0.set(e,n)}).catch(e=>{console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture",e)})}({gl:e,faces:t,onReady:e=>{this.texture=e,this.animateIn()}}))}prerender(e,t){this.faces&&this.updateTexture(this.gl,this.faces)}animateColorChange(){let e=()=>{var t,r,a,n,i,o,l,s,u,p,c;this.transitionDelta<1&&(requestAnimationFrame(e),this.bgColor=(t=this.previousBgColor,r=this.targetBgColor,a=this.transitionDelta,[(n=t[0],i=r[0],n+(i-n)*a),(o=t[1],l=r[1],o+(l-o)*a),(s=t[2],u=r[2],s+(u-s)*a),(p=t[3],c=r[3],p+(c-p)*a)]),this.transitionDelta+=.075,this.map.triggerRepaint())};requestAnimationFrame(e)}async animateIn(){if(!this.imageIsAnimating){if(!this.animationActive){this.currentFadeOpacity=1,this.imageFadeInDelta=1,this.map.triggerRepaint();return}return new Promise(e=>{this.imageIsAnimating=!0;let t=()=>{(this.imageFadeInDelta=Math.min(this.imageFadeInDelta+.05,1),this.currentFadeOpacity=0+ +this.imageFadeInDelta,this.map.triggerRepaint(),this.imageFadeInDelta<1)?requestAnimationFrame(t):(this.imageIsAnimating=!1,this.imageFadeInDelta=0,e())};requestAnimationFrame(t)})}}async animateOut(){if(!(this.imageIsAnimating||!this.animationActive))return new Promise(e=>{let t=()=>{if(this.imageFadeInDelta=Math.min(this.imageFadeInDelta+.05,1),this.currentFadeOpacity=1+-1*this.imageFadeInDelta,this.map.triggerRepaint(),this.imageFadeInDelta>=1){this.imageIsAnimating=!1,this.imageFadeInDelta=0,e();return}requestAnimationFrame(t)};requestAnimationFrame(t)})}setAnimationActive(e){this.animationActive=e}render(e,t){var r,a,n,i,o,l,s,u,p,c,h;if(!this.map.isGlobeProjection())return;if(void 0===this.map)throw Error("[CubemapLayer]: Map is undefined");if(void 0===this.cubemap)throw Error("[CubemapLayer]: Cubemap is undefined");this.texture,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.DST_ALPHA),e.useProgram(this.cubemap.shaderProgram),e.bindBuffer(e.ARRAY_BUFFER,this.cubemap.positionBuffer),e.vertexAttribPointer(this.cubemap.programInfo.attributesLocations.vertexPosition,3,e.FLOAT,!1,0,0),e.enableVertexAttribArray(this.cubemap.programInfo.attributesLocations.vertexPosition);let d=e.canvas,f=d.clientWidth/d.clientHeight,m=this.map.transform,y=m.fov*(Math.PI/180),g=az();aN(g,y,f,.1,1e4),aO(g,g,m.rollInRadians),aR(g,g,-m.pitchInRadians),aO(g,g,m.bearingInRadians);let v=m.center.lat*Math.PI/180,b=m.center.lng*Math.PI/180;aR(g,g,v),a=Math.sin(r=-b),n=Math.cos(r),i=g[0],o=g[1],l=g[2],s=g[3],u=g[8],p=g[9],c=g[10],h=g[11],g!=g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]),g[0]=i*n-u*a,g[1]=o*n-p*a,g[2]=l*n-c*a,g[3]=s*n-h*a,g[8]=i*a+u*n,g[9]=o*a+p*n,g[10]=l*a+c*n,g[11]=s*a+h*n,e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix,!1,g);let x=az();if(e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix,!1,x),e.uniform4fv(this.cubemap.programInfo.uniformsLocations.bgColor,new Float32Array(this.bgColor)),e.uniform1f(this.cubemap.programInfo.uniformsLocations.fadeOpacity,this.currentFadeOpacity),this.useCubemapTexture&&this.texture&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this.texture),e.uniform1i(this.cubemap.programInfo.uniformsLocations.cubeSampler,0)),void 0===this.cubemap.indexBuffer)throw Error("Index buffer is undefined");if(void 0===this.cubemap.indexBufferLength)throw Error("Index buffer length is undefined");e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.cubemap.indexBuffer),e.drawElements(e.TRIANGLES,this.cubemap.indexBufferLength,e.UNSIGNED_SHORT,0)}setBgColor(e){this.targetBgColor=e,this.previousBgColor=this.bgColor,this.transitionDelta=0}getConfig(){return this.options}shouldUpdate(e){let t=this.getConfig();if(void 0===e&&t)return!0;let r="boolean"==typeof e?e:a2(e),a=a2(t);return JSON.stringify(r)!==JSON.stringify(a)}async setCubemapFaces(e){if(await this.animateOut(),!e.faces&&!e.preset&&!e.path){this.faces=null,this.useCubemapTexture=!1,this.currentFacesDefinitionKey="empty",await this.animateIn();return}this.faces=ne(e),this.currentFacesDefinitionKey=JSON.stringify(e.faces??e.preset??e.path)}async setCubemap(e){let t=a9(e);if(t.length>0)throw Error(`[CubemapLayer]: Invalid cubemap specification:
44- ${t.join(`
45 - `)}`);let r="boolean"==typeof e?a6:e;this.options=r;let a=JSON.stringify(r.faces??r.preset??r.path),n=this.currentFacesDefinitionKey!==a;n&&(await this.setCubemapFaces(r),this.cubeMapNeedsUpdate=!0);let i=aH(r.color);if(r.color&&this.targetBgColor.toString()!==i.toString())this.setBgColor(i);else if(!r.color&&r.preset&&r.preset in aY){let e=aY[r.preset];this.setBgColor(aH(e.color))}this.updateCubemap({facesNeedUpdate:n})}
45show(){this.map.setLayoutProperty(this.id,"visibility","visible")}hide(){this.map.setLayoutProperty(this.id,"visibility","none")}}function a9(e){let t=[];if(typeof e>"u")return t.push("Space specification is undefined."),t;if("boolean"==typeof e)return[];if(0===Object.keys(e).length)return t.push("Space specification is an empty object."),t;let r=["color","preset","path","faces"],a=Object.keys(e).filter(e=>!r.includes(e));if(a.length>0)return t.push(`Space specification contains unsupported properties: ${a.map(e=>`\`${e}\``).join(", ")}. Supported properties: \`color\`, \`preset\`, \`path\`, \`faces\`.`),t;if(!e.path&&!e.preset&&!e.faces&&!e.color)return t.push("Space specification contains neither a path, preset, faces, nor color."),t;!e.preset||e.preset in aY||t.push(`Space preset "${e.preset}" is not a valid preset. Available presets: ${Object.keys(aY).join(", ")}`);let n=Object.keys(e).filter(e=>"color"!==e).filter(e=>"preset"===e||"path"===e||"faces"===e);return n.length>1&&t.push(`Space specification contains multiple properties for cubemap definition: ${n.join(", ")}. Only one of \`path\`, \`preset\`, or \`faces\` should be defined.`),!e.faces||e.faces.pX&&e.faces.nX&&e.faces.pY&&e.faces.nY&&e.faces.pZ&&e.faces.nZ||t.push("Space specification contains faces but one or more of the faces are undefined."),e.faces&&Object.values(e.faces).every(e=>"string"!=typeof e)&&t.push("Space specification contains faces but one or more of the faces are not strings."),t}function ne(e){if(e.faces)return e.faces;if(e.preset)return{pX:`${a5}/${e.preset}/px.webp`,nX:`${a5}/${e.preset}/nx.webp`,pY:`${a5}/${e.preset}/py.webp`,nY:`${a5}/${e.preset}/ny.webp`,pZ:`${a5}/${e.preset}/pz.webp`,nZ:`${a5}/${e.preset}/nz.webp`};if(e.path){let t=e.path.baseUrl,r=e.path.format??"png";return{pX:`${t}/px.${r}`,nX:`${t}/nx.${r}`,pY:`${t}/py.${r}`,nY:`${t}/ny.${r}`,pZ:`${t}/pz.${r}`,nZ:`${t}/nz.${r}`}}return null}let nt=`attribute vec3 a_position;
46
47uniform mat4 u_matrix;
48uniform mat4 u_rotationMatrix;
49
50uniform float u_scale;
51
52varying vec2 v_pos;
53varying float v_scale;
54
55void main() {
56  v_scale = u_scale;
57  v_pos = a_position.xy * u_scale;
58  gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);
59}
60`,nr=`precision mediump float;
61varying vec2 v_pos;
62      
63uniform int u_stopsNumber;
64uniform float u_stops[100];
65uniform vec4 u_colors[100];
66uniform float u_maxDistance;
67
68varying float v_scale;
69
70const float EPSILON = 0.000001;
71
72vec2 center = vec2(0.0, 0.0);
73void main() {
74  float rawDistance = distance(center, v_pos);
75  float distanceFromGlobeEdge = rawDistance - 1.0;
76
77    vec4 color = u_colors[0];
78
79  // if we're further than the max distance, we should not render anything.
80  // This is to always render a circle, otherwise we end up rendering
81  // to the corners of the plane.
82  if (distance(center, v_pos) > u_maxDistance * v_scale) {
83    discard;
84  }
85
86  for (int i = 1; i < 100; i++) {
87    // if we're past the last stop
88    // we should fill to the end with the last stop color
89    if (i >= u_stopsNumber) {
90      color = u_colors[i - 1];
91      break;
92    }
93
94    float scaledStopPosition = u_stops[i] * pow(v_scale, 1.6);
95    float lastStopValue = u_stops[i - 1];
96    float thisStopValue = u_stops[i];
97
98    // this is to avoid blending errors when the stops are the same
99    // eg when you would want a sharp edge between two stops.
100    // \`numbersAreEqual\` will be 1.0 if the numbers are equal, 0.0 if they are not.
101    // We then subtract EPSILON from the last stop making the stop value _almost_ equal
102    // to the next stop but not enough to cause blending issues.
103    // It's more efficient to do this than an if / else statement.
104    float numbersAreEqual = 1.0 - step(EPSILON, abs(lastStopValue - thisStopValue));
105    lastStopValue = lastStopValue - numbersAreEqual * EPSILON;
106
107    float lastScaledStopPosition = lastStopValue * pow(v_scale, 1.6);
108
109    if (distanceFromGlobeEdge <= scaledStopPosition) {
110      float stopBlendFactor = (distanceFromGlobeEdge - lastScaledStopPosition) / (scaledStopPosition - lastScaledStopPosition);
111      color = mix(u_colors[i - 1], u_colors[i], stopBlendFactor);
112      break;
113    }
114  }
115  
116  // gl_FragColor = color;
117  gl_FragColor = vec4(color.rgb * color.a, color.a);
118}
119`,na=["position"],nn=["matrix","rotationMatrix","stopsNumber","stops","colors","maxDistance","scale"],ni=[-2,-2,0,2,-2,0,-2,2,0,2,2,0],no=[[0,"rgba(176, 208, 240, 1)"],[.1,"rgba(98, 168, 229, 0.3)"],[.2,"rgba(98, 168, 229, 0.0)"]];class nl{constructor(e){if(G(this,"id","Halo Layer"),G(this,"type","custom"),G(this,"renderingMode","3d"),G(this,"gradient"),G(this,"scale",0),G(this,"animationDelta",0),G(this,"map"),G(this,"plane"),G(this,"animationActive",!0),"boolean"==typeof e){this.gradient={scale:.9,stops:no};return}const t=nu(e);if(t.length>0)throw Error(`[RadialGradientLayer]: Invalid Halo specification:
120 - ${t.join(`
121 - `)}
122    `);this.gradient={scale:e.scale??.9,stops:e.stops??no}}onAdd(e,t){this.map=e,this.plane=aV({gl:t,vertexShaderSource:nt,fragmentShaderSource:nr,attributesKeys:na,uniformsKeys:nn,vertices:ni}),this.animateIn()}getConfig(){return this.gradient}shouldUpdate(e){let t=this.getConfig();if(void 0===e&&t)return!0;let r="boolean"==typeof e?e:a2(e),a=a2(t);return JSON.stringify(r)!==JSON.stringify(a)}async animateIn(){if(!this.animationActive){this.scale=this.gradient.scale,this.animationDelta=1,this.map.triggerRepaint();return}return new Promise(e=>{this.animationDelta=0;let t=()=>{if(this.animationDelta<=1){this.scale=0+(this.gradient.scale-0)*this.animationDelta,this.animationDelta+=.06,this.map.triggerRepaint(),requestAnimationFrame(t);return}e()};requestAnimationFrame(t)})}async animateOut(){if(this.animationActive)return this.animationDelta=0,new Promise(e=>{let t=()=>{if(this.animationDelta<1){var r;this.scale=(r=this.gradient.scale)+(0-r)*this.animationDelta,this.animationDelta+=.06,this.map.triggerRepaint(),requestAnimationFrame(t);return}e()};t()})}onRemove(e,t){void 0!==this.plane&&(t.deleteProgram(this.plane.shaderProgram),t.deleteBuffer(this.plane.positionBuffer))}prerender(e,t){}render(e,t){var r,a,n,i,o,l,s,u,p,c,h,d,f,m,y,g,v,b,x,w,S,k,_,A,C,E,L,T,M,P,$,I,j,z,R;if(void 0===this.map)throw Error("[RadialGradientLayer]: Map is undefined");if(!this.map.isGlobeProjection())return;if(void 0===this.plane)throw Error("[RadialGradientLayer]: Plane is undefined");e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.useProgram(this.plane.shaderProgram),e.bindBuffer(e.ARRAY_BUFFER,this.plane.positionBuffer);let O=this.plane.programInfo.attributesLocations.position;e.enableVertexAttribArray(O),e.vertexAttribPointer(O,3,e.FLOAT,!1,0,0);let N=az(),U=this.scale;a=(r=[U,U,U])[0],n=r[1],i=r[2],N[0]=N[0]*a,N[1]=N[1]*a,N[2]=N[2]*a,N[3]=N[3]*a,N[4]=N[4]*n,N[5]=N[5]*n,N[6]=N[6]*n,N[7]=N[7]*n,N[8]=N[8]*i,N[9]=N[9]*i,N[10]=N[10]*i,N[11]=N[11]*i,N[12]=N[12],N[13]=N[13],N[14]=N[14],N[15]=N[15];let q=az();o=t.defaultProjectionData.mainMatrix,l=o[0],s=o[1],u=o[2],p=o[3],c=o[4],h=o[5],d=o[6],f=o[7],m=o[8],y=o[9],g=o[10],v=o[11],b=o[12],x=o[13],w=o[14],S=o[15],k=N[0],_=N[1],A=N[2],C=N[3],q[0]=k*l+_*c+A*m+C*b,q[1]=k*s+_*h+A*y+C*x,q[2]=k*u+_*d+A*g+C*w,q[3]=k*p+_*f+A*v+C*S,k=N[4],_=N[5],A=N[6],C=N[7],q[4]=k*l+_*c+A*m+C*b,q[5]=k*s+_*h+A*y+C*x,q[6]=k*u+_*d+A*g+C*w,q[7]=k*p+_*f+A*v+C*S,k=N[8],_=N[9],A=N[10],C=N[11],q[8]=k*l+_*c+A*m+C*b,q[9]=k*s+_*h+A*y+C*x,q[10]=k*u+_*d+A*g+C*w,q[11]=k*p+_*f+A*v+C*S,k=N[12],_=N[13],A=N[14],C=N[15],q[12]=k*l+_*c+A*m+C*b,q[13]=k*s+_*h+A*y+C*x,q[14]=k*u+_*d+A*g+C*w,q[15]=k*p+_*f+A*v+C*S;let F=this.plane.programInfo.uniformsLocations.matrix;e.uniformMatrix4fv(F,!1,q);let D=az(),B=this.map.transform.cameraPosition,G=aq(aU(),B),V=((E=new aj(3))[0]=0,E[1]=1,E[2]=0,E),H=aU();aF(H,V,G),aq(H,H);let K=aU();aF(K,G,H),aq(K,K),L=H[0],T=H[1],M=H[2],P=K[0],$=K[1],I=K[2],j=G[0],z=G[1],R=G[2],D[0]=L,D[1]=T,D[2]=M,D[3]=0,D[4]=P,D[5]=$,D[6]=I,D[7]=0,D[8]=j,D[9]=z,D[10]=R,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1;let X=this.plane.programInfo.uniformsLocations.rotationMatrix;e.uniformMatrix4fv(X,!1,D);let W=this.gradient.stops.length,Z=[],J=[];for(let e=0;e<=W;e++)if(e<W){Z[e]=this.gradient.stops[e][0];let t=aH(this.gradient.stops[e][1]);J.push(...t)}e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber,W),e.uniform1fv(this.plane.programInfo.uniformsLocations.stops,new Float32Array(Z)),e.uniform4fv(this.plane.programInfo.uniformsLocations.colors,new Float32Array(J)),e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance,2),e.uniform1f(this.plane.programInfo.uniformsLocations.scale,U),e.drawArrays(e.TRIANGLE_STRIP,0,4)}async setGradient(e){if(!1===e)return void await this.animateOut();await this.animateOut();let t=nu(e);if(t.length>0)throw Error(`[RadialGradientLayer]: Invalid Halo specification:
123 - ${t.join(`
124 - `)}
125    `);
125!0===e?(this.gradient.scale=.9,this.gradient.stops=no):(this.gradient.scale=e.scale??.9,this.gradient.stops=e.stops??no),await this.animateIn()}setAnimationActive(e){this.animationActive=e}show(){this.map.setLayoutProperty(this.id,"visibility","visible")}hide(){this.map.setLayoutProperty(this.id,"visibility","none")}}let ns=["scale","stops"];function nu(e){var t;let r=[];if("boolean"==typeof e)return[];try{let t=Object.keys(e).filter(e=>!ns.includes(e));t.length>0&&r.push(`Properties ${t.map(e=>`\`${e}\``).join(", ")} are not supported.`)}catch{r.push("Halo specification is not an object.")}return"number"!=typeof e.scale&&r.push("Halo `scale` property is not a number."),e.stops&&0!==e.stops.length&&Array.isArray(e.stops)?null!=(t=e.stops)&&t.some(e=>"number"!=typeof e[0]||"string"!=typeof e[1])&&r.push("Halo `stops` property is not an array of [number, string]"):r.push("Halo `stops` property is not an array."),r}let np=class e extends O.Map{constructor(e){!1!==e.logSDKVersion&&function(){let e="color: #3A1888; background: white; padding: 5px 0; font-weight: bold;",t="color: #FBC935; background: white; padding: 5px; font-weight: bold;",r="color: #F1175D; background: white; padding: 5px 0; font-weight: bold;";console.info("%c❖%c❖%c❖ %cMapTiler SDK JS v3.11.1 %c❖%c❖%c❖",t+"padding-right: 0;",e,r,"color: #333; background: white; padding: 5px 0; font-weight: bold;",r,e,t+"padding-left: 0;")}(),function(e){let t=document.createElement("canvas").getContext("webgl2")?null:"u">typeof WebGL2RenderingContext?"Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed.":"Your browser does not support graphic rendering with WebGL2. The map cannot be displayed.";if(!t)return;let r=null;if("string"==typeof e?r=document.getElementById(e):e instanceof HTMLElement&&(r=e),!r)throw Error("The Map container must be provided.");let a=document.createElement("div");throw a.innerHTML=t,a.classList.add("webgl-warning-div"),r.appendChild(a),Error(t)}(e.container),e.apiKey&&(eo.apiKey=e.apiKey);const{style:t,requiresUrlMonitoring:r,isFallback:a}=ag(e.style);a&&console.warn("Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."),eo.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");const n=location.hash;let i={compact:!1};e.customAttribution?i.customAttribution=e.customAttribution:e.attributionControl&&"object"==typeof e.attributionControl&&(i={...i,...e.attributionControl});const o={...e,style:t,maplibreLogo:!1,transformRequest:eg(e.transformRequest),attributionControl:!0!==e.forceNoAttributionControl&&i};delete o.style,super(o),G(this,"telemetry"),G(this,"space"),G(this,"halo"),G(this,"options"),G(this,"isTerrainEnabled",!1),G(this,"terrainExaggeration",1),G(this,"primaryLanguage"),G(this,"terrainGrowing",!1),G(this,"terrainFlattening",!1),G(this,"minimap"),G(this,"forceLanguageUpdate"),G(this,"languageAlwaysBeenStyle"),G(this,"isReady",!1),G(this,"terrainAnimationDuration",1e3),G(this,"monitoredStyleUrls"),G(this,"styleInProcess",!1),G(this,"curentProjection"),G(this,"originalLabelStyle",new window.Map),G(this,"isStyleLocalized",!1),G(this,"languageIsUpdated",!1),G(this,"spaceboxLoadingState",{styleLoadCallbackSet:!1,styleLoadedCallbackFired:!1}),this.options=e,this.setStyle(t),r&&this.monitorStyleUrl(t);const l=()=>{let e="The distant style could not be loaded.";this.getStyle()?e+=" Leaving the style as is.":(this.setStyle(q.Gj.STREETS),e+=`Loading default MapTiler Cloud style "${q.Gj.STREETS.getDefaultVariant().getId()}" as a fallback.`),console.warn(e)};if(this.on("style.load",()=>{this.styleInProcess=!1,("string"==typeof e.rtlTextPlugin||typeof e.rtlTextPlugin>"u")&&em(e.rtlTextPlugin)}),this.on("error",e=>{if(e.error instanceof O.AJAXError){let t=new URL(e.error.url);t.search="";let r=t.href;this.monitoredStyleUrls&&this.monitoredStyleUrls.has(r)&&(this.monitoredStyleUrls.delete(r),l());return}if(this.styleInProcess)return void l()}),eo.caching&&!ep&&console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"),eo.caching&&ep&&(ec(es,async(e,t)=>{if(!e.url)throw Error("");e.url=e.url.replace(`${es}://`,"https://"),e.signal=t.signal;let r=await fetch(e.url,e),a=await r.json();return a.tiles&&a.tiles.length>0&&(a.tiles[0]+=`&last-modified=${r.headers.get("Last-Modified")}`),{data:a,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires")}}),ec(eu,async(e,t)=>{if(!e.url)throw Error("");e.url=e.url.replace(`${eu}://`,"https://");let r=new URL(e.url),a=new URL(r);a.searchParams.delete("mtsid"),a.searchParams.delete("key");let n=a.toString(),i=new URL(r);i.searchParams.delete("last-modified");let o=i.toString(),l=async e=>({data:await e.arrayBuffer(),cacheControl:e.headers.get("Cache-Control"),expires:e.headers.get("Expires")}),s=await eh(),u=await s.match(n);if(u)return l(u);e.signal=t.signal;let p=await fetch(o,e);return p.status>=200&&p.status<300&&(s.put(n,p.clone()).catch(()=>{}),++ed>100&&(ef(),ed=0)),l(p)})),typeof e.language>"u")this.primaryLanguage=eo.primaryLanguage;else{const t=(0,q.EA)(e.language,et);this.primaryLanguage=t??eo.primaryLanguage}this.forceLanguageUpdate=this.primaryLanguage!==et.STYLE&&this.primaryLanguage!==et.STYLE_LOCK,this.languageAlwaysBeenStyle=this.primaryLanguage===et.STYLE,this.terrainExaggeration=e.terrainExaggeration??this.terrainExaggeration,this.curentProjection=e.projection,this.on("style.load",e=>{"mercator"===this.curentProjection?this.setProjection({type:"mercator"}):"globe"===this.curentProjection&&this.setProjection({type:"globe"})}),this.once("styledata",async()=>{let t;if(e.geolocate&&!e.center&&(!e.hash||!n)){try{if("COUNTRY"===e.geolocate)return void await this.fitToIpBounds()}catch(e){console.warn(e.message)}try{await this.centerOnIpPoint(e.zoom),t=this.getCameraHash()}catch(e){console.warn(e.message)}"granted"===(await navigator.permissions.query({name:"geolocation"})).state&&navigator.geolocation.getCurrentPosition(r=>{t===this.getCameraHash()&&(this.terrain?this.easeTo({center:[r.coords.longitude,r.co
125ords.latitude],zoom:e.zoom||12,duration:2e3}):this.once("terrain",()=>{this.easeTo({center:[r.coords.longitude,r.coords.latitude],zoom:e.zoom||12,duration:2e3})}))},null,{maximumAge:864e5,timeout:5e3,enableHighAccuracy:!1})}}),this.on("styledata",()=>{this.setPrimaryLanguage(this.primaryLanguage)}),this.on("styledata",()=>{null===this.getTerrain()&&this.isTerrainEnabled&&this.enableTerrain(this.terrainExaggeration)}),this.once("load",async()=>{let t={logo:null};try{let e=Object.keys(this.style.tileManagers).map(e=>this.getSource(e)).filter(e=>e&&"url"in e&&"string"==typeof e.url&&e.url.includes("tiles.json")),r=new URL(e[0].url);r.searchParams.has("key")||r.searchParams.append("key",eo.apiKey),t=await (await fetch(r.href)).json()}catch{}if(e.customControls){let t="[data-maptiler-control-group]",r="[data-maptiler-control]",a=e=>{let t=e.dataset.maptilerControl;return("true"===t||""===t)&&(t=void 0),t},n=e=>e.dataset.maptilerPosition,i=[...this._container.ownerDocument.querySelectorAll(t)],o=[...this._container.ownerDocument.querySelectorAll(r)].filter(e=>null===e.closest(t));if("string"==typeof e.customControls){let t=e.customControls;i=i.filter(e=>e.matches(t)||null!==e.closest(t)),o=o.filter(e=>e.matches(t)||null!==e.closest(t))}for(let e of i){let t=new aP(e);for(let i of(this.addControl(t,n(e)),e.querySelectorAll(r)))t.configureGroupItem(i,a(i))}for(let e of o)this.addControl(new aP(e,a(e)),n(e));let l=()=>{let{lng:e,lat:t}=this.getCenter();this._container.style.setProperty("--maptiler-center-lng",String(e)),this._container.style.setProperty("--maptiler-center-lat",String(t)),this._container.style.setProperty("--maptiler-zoom",String(this.getZoom())),this._container.style.setProperty("--maptiler-bearing",String(this.getBearing())),this._container.style.setProperty("--maptiler-pitch",String(this.getPitch())),this._container.style.setProperty("--maptiler-roll",String(this.getRoll())),this._container.style.setProperty("--maptiler-is-globe-projection",String(this.isGlobeProjection())),this._container.style.setProperty("--maptiler-has-terrain",String(this.hasTerrain()))};l(),this.on("render",l)}if(!0!==e.forceNoAttributionControl)if("logo"in t&&t.logo){let r=t.logo;this.addControl(new el({logoURL:r}),e.logoPosition)}else e.maptilerLogo&&this.addControl(new el,e.logoPosition);if(e.scaleControl){let t=!0===e.scaleControl||void 0===e.scaleControl?"bottom-right":e.scaleControl,r=new Q({unit:eo.unit});this.addControl(r,t),eo.on("unit",e=>{r.setUnit(e)})}if(!1!==e.navigationControl){let t=!0===e.navigationControl||void 0===e.navigationControl?"top-right":e.navigationControl;this.addControl(new aS,t)}if(!1!==e.geolocateControl){let t=!0===e.geolocateControl||void 0===e.geolocateControl?"top-right":e.geolocateControl;this.addControl(new aC({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),t)}if(e.terrainControl){let t=!0===e.terrainControl||void 0===e.terrainControl?"top-right":e.terrainControl;this.addControl(new ax,t)}if(e.projectionControl){let t=!0===e.projectionControl||void 0===e.projectionControl?"top-right":e.projectionControl;this.addControl(new aL,t)}if(e.fullscreenControl){let t=!0===e.fullscreenControl||void 0===e.fullscreenControl?"top-right":e.fullscreenControl;this.addControl(new ee({}),t)}this.isReady=!0,this.fire("ready",{target:this})});let s=!1,u=!1,p;this.once("ready",()=>{s=!0,u&&this.fire("loadWithTerrain",p)}),this.once("style.load",()=>{let{minimap:t}=e;if("object"==typeof t){let{zoom:r,center:a,style:n,language:i,apiKey:o,maptilerLogo:l,canvasContextAttributes:s,refreshExpiredTiles:u,maxBounds:p,scrollZoom:c,minZoom:h,maxZoom:d,boxZoom:f,locale:m,fadeDuration:y,crossSourceCollisions:g,clickTolerance:v,bounds:b,fitBoundsOptions:x,pixelRatio:w,validateStyle:S}=e;this.minimap=new a$(t,{zoom:r,center:a,style:n,language:i,apiKey:o,container:"null",maptilerLogo:l,canvasContextAttributes:s,refreshExpiredTiles:u,maxBounds:p,scrollZoom:c,minZoom:h,maxZoom:d,boxZoom:f,locale:m,fadeDuration:y,crossSourceCollisions:g,clickTolerance:v,bounds:b,fitBoundsOptions:x,pixelRatio:w,validateStyle:S}),this.addControl(this.minimap,t.position??"bottom-left")}else!0===t?(this.minimap=new a$({},e),this.addControl(this.minimap,"bottom-left")):void 0!==t&&!1!==t&&(this.minimap=new a$({},e),this.addControl(this.minimap,t))});const c=e=>{e.terrain&&(u=!0,p={type:"loadWithTerrain",target:this,terrain:e.terrain},this.off("terrain",c),s&&this.fire("loadWithTerrain",p))};this.on("terrain",c),e.terrain&&this.enableTerrain(e.terrainExaggeration??this.terrainExaggeration),this.once("load",()=>{this.getCanvas().addEventListener("webglcontextlost",e=>{!0===this._removed?console.warn("[webglcontextlost]","WebGL context lost after map removal. This is harmless."):(console.warn("[webglcontextlost]","Unexpected loss of WebGL context!"),this.fire("webglContextLost",e))});let t=this.getLayersOrder()[0];e.space&&this.initSpace({options:e,before:t}),e.halo&&this.initHalo({options:e,before:t})}),this.telemetry=new aI(this)}getSpace(){return this.space}setSpace(e,t=!0){if(t&&(this.options.space=e),!1===e){this.space=void 0;return}if(this.space){this.space.setCubemap(e),this.getLayer(this.space.id)||this.addLayer(this.space,this.getLayersOrder()[0]);return}this.space=new a7(e),this.once("load",()=>{let e=this.getLayersOrder()[0];this.space&&this.addLayer(this.space,e)})}enableSpaceAnimations(){this.setSpaceAnimationActive(!0)}disableSpaceAnimations(){this.setSpaceAnimationActive(!1)}enableHaloAnimations(){this.setHaloAnimationActive(!0)}disableHaloAnimations(){this.setHaloAnimationActive(!1)}setHaloAnimationActive(e){this.halo?this.halo.setAnimationActive(e):this.once("load",()=>{var t;null==(t=this.halo)||t.setAnimationActive(e)})}setSpaceAnimationActive(e){this.space?this.space.setAnimationActive(e):this.once("load",()=>{var t;null==(t=this.space)||t.setAnimationActive(e)})}setSpaceFromStyle({style:e}){var t,r,a;if(!0!==this.options.space&&"u">typeof this.options.space)return void this.setSpace(this.options.space);let n=null==(r=null==(t=e.metadata)?void 0:t.maptiler)?void 0:r.space;if(!this.options.space&&!n)return void this.setSpace(!1,!1);
125if(JSON.stringify(null==(a=this.space)?void 0:a.getConfig())===JSON.stringify(n)){if(this.space&&!this.getLayer(this.space.id)){let e=this.getLayersOrder()[0];this.addLayer(this.space,e)}return}if(!0===this.options.space)return void this.setSpace(n??!0);if(this.space&&this.isGlobeProjection()){if(!this.getLayer(this.space.id)){let e=this.getLayersOrder()[0];this.addLayer(this.space,e)}this.space.setCubemap(n)}}setHaloFromStyle({style:e}){var t,r,a,n;if(!1===this.options.halo)return;let i=null==(t=e.metadata)?void 0:t.maptiler;if(JSON.stringify(null==(r=this.halo)?void 0:r.getConfig())===JSON.stringify(null==i?void 0:i.halo)){if(this.halo&&!this.getLayer(this.halo.id)){let e=this.getLayersOrder().indexOf((null==(a=this.space)?void 0:a.id)??"")+1,t=this.getLayersOrder()[e];this.addLayer(this.halo,t)}return}if(!(null!=i&&i.halo)&&!this.options.halo)return void this.setHalo({stops:[[0,"transparent"],[.01,"transparent"]],scale:1});if(this.halo){if(!this.getLayer(this.halo.id)){let e=this.getLayersOrder().indexOf((null==(n=this.space)?void 0:n.id)??"")+1,t=this.getLayersOrder()[e];this.addLayer(this.halo,t)}let e=(null==i?void 0:i.halo)??this.options.halo;e&&this.halo.setGradient(e)}}initSpace({options:e=this.options,before:t,spec:r}){if(this.space){this.getLayer(this.space.id)||this.addLayer(this.space,t);return}if(!1!==e.space){if(e.space&&!0!==e.space){this.space=new a7(e.space),this.addLayer(this.space,t);return}r&&(this.space=new a7(r),this.addLayer(this.space,t)),!0===this.options.space&&(this.space=new a7(!0),this.addLayer(this.space,t))}}initHalo({options:e=this.options,before:t,spec:r}){if(!(this.halo&&this.getLayer(this.halo.id))&&!1!==e.halo){if(e.halo&&!0!==e.halo){this.halo=new nl(e.halo),this.addLayer(this.halo,t);return}if(r&&(this.halo=new nl(r),this.addLayer(this.halo,t)),!0===this.options.halo){this.halo=new nl(!0),this.addLayer(this.halo,t);return}}}getHalo(){return this.halo}setHalo(e){if(this.options.halo=e,this.isGlobeProjection()){if(this.halo)return void this.halo.setGradient(e);this.halo=new nl(e),this.once("load",()=>{var e;let t=this.getLayersOrder(),r=t[0],a=t.indexOf((null==(e=this.space)?void 0:e.id)??"")+2,n=t[a];this.halo&&this.addLayer(this.halo,this.space?n:r)})}}recreate(){let t={center:this.getCenter(),zoom:this.getZoom(),bearing:this.getBearing(),pitch:this.getPitch()};this.remove(),Object.assign(this,new e({...this.options})),this.once("load",()=>{this.jumpTo(t)})}setTerrainAnimationDuration(e){this.terrainAnimationDuration=Math.max(e,0)}async onLoadAsync(){return new Promise(e=>{this.loaded()?e(this):this.once("load",()=>{e(this)})})}async onReadyAsync(){return new Promise(e=>{this.isReady?e(this):this.once("ready",()=>{e(this)})})}async onLoadWithTerrainAsync(){return new Promise(e=>{this.isReady&&this.terrain?e(this):this.once("loadWithTerrain",()=>{e(this)})})}monitorStyleUrl(e){typeof this.monitoredStyleUrls>"u"&&(this.monitoredStyleUrls=new Set);let t=new URL(e);t.search="",this.monitoredStyleUrls.add(t.href)}setStyle(e,t){var r,a,n,i,o;this.originalLabelStyle.clear(),null==(r=this.minimap)||r.setStyle(e),this.forceLanguageUpdate=!0,this.once("idle",()=>{this.forceLanguageUpdate=!1});let l=ag(e);
125if(l.requiresUrlMonitoring&&this.monitorStyleUrl(l.style),l.isFallback){if(this.getStyle())return console.warn("[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Keeping the curent style instead."),this;console.warn("[Map.setStyle]: Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style.")}this.spaceboxLoadingState.styleLoadedCallbackFired=!1,this.spaceboxLoadingState.styleLoadCallbackSet=!1;let s=this.getStyle(),u=l.style;try{super.setStyle(l.style,{...t,diff:"string"!=typeof l.style}),this.styleInProcess=!0}catch(e){this.styleInProcess=!1,console.error("[Map.setStyle]: Error while setting style:",e)}let p=()=>{let e=l.style;e.projection&&"mercator"!==e.projection.type?(this.setSpaceFromStyle({style:l.style}),this.setHaloFromStyle({style:l.style})):console.warn("[Map.setStyle]: Neither space nor halo is supported for mercator projection. Ignoring...")},c=e=>{var t,r,a,n;let i=(null==e?void 0:e.target.getStyle())??l.style;if(!this.spaceboxLoadingState.styleLoadedCallbackFired&&(this.spaceboxLoadingState.styleLoadedCallbackFired=!0,this.spaceboxLoadingState.styleLoadCallbackSet=!1,"string"!=typeof i))try{let e=this.getLayersOrder()[0];this.space?this.setSpaceFromStyle({style:i}):this.initSpace({before:e,spec:null==(r=null==(t=i.metadata)?void 0:t.maptiler)?void 0:r.space}),this.halo?this.setHaloFromStyle({style:i}):this.initHalo({before:e,spec:null==(n=null==(a=i.metadata)?void 0:a.maptiler)?void 0:n.halo})}catch(e){console.error(e)}};return"string"==typeof l.style||l.requiresUrlMonitoring?this.once("style.load",c):(requestIdleCallback(()=>{try{c()}catch(e){console.error(e)}}),this.spaceboxLoadingState.styleLoadCallbackSet?((null==(a=null==s?void 0:s.terrain)?void 0:a.source)!==(null==(n=null==u?void 0:u.terrain)?void 0:n.source)||(null==(i=null==s?void 0:s.terrain)?void 0:i.exaggeration)!==(null==(o=null==u?void 0:u.terrain)?void 0:o.exaggeration))&&this.once("terrain",p):(this.once("style.load",c),this.once("projection.change",c),this.spaceboxLoadingState.styleLoadCallbackSet=!0)),this}addLayer(e,t){var r;return null==(r=this.minimap)||r.addLayer(e,t),super.addLayer(e,t)}moveLayer(e,t){var r;return null==(r=this.minimap)||r.moveLayer(e,t),super.moveLayer(e,t)}removeLayer(e){var t;return null==(t=this.minimap)||t.removeLayer(e),super.removeLayer(e)}setLayerZoomRange(e,t,r){var a;return null==(a=this.minimap)||a.setLayerZoomRange(e,t,r),super.setLayerZoomRange(e,t,r)}setFilter(e,t,r){var a;return null==(a=this.minimap)||a.setFilter(e,t,r),super.setFilter(e,t,r)}setPaintProperty(e,t,r,a){var n;return null==(n=this.minimap)||n.setPaintProperty(e,t,r,a),super.setPaintProperty(e,t,r,a)}setLayoutProperty(e,t,r,a){var n;return null==(n=this.minimap)||n.setLayoutProperty(e,t,r,a),super.setLayoutProperty(e,t,r,a)}setGlyphs(e,t){var r;return null==(r=this.minimap)||r.setGlyphs(e,t),super.setGlyphs(e,t)}getStyleLanguage(){return this.style&&this.style.stylesheet&&this.style.stylesheet.metadata&&"object"==typeof this.style.stylesheet.metadata&&"maptiler:language"in this.style.stylesheet.metadata&&"string"==typeof this.style.stylesheet.metadata["maptiler:language"]?(0,q.p3)(this.style.stylesheet.metadata["maptiler:language"]):null}setLanguage(e){var t;null==(t=this.minimap)||t.map.setLanguage(e),this.onStyleReady(()=>{this.setPrimaryLanguage(e)})}setPrimaryLanguage(e){let t=this.getStyleLanguage(),r=(0,q.EA)(e,et);if(!r)return void console.warn(`The language "${r}" is not supported.`);if(!(r.flag===et.STYLE.flag&&t&&(t.flag===et.AUTO.flag||t.flag===et.VISITOR.flag))&&(r.flag!==et.STYLE.flag&&(this.languageAlwaysBeenStyle=!1),this.languageAlwaysBeenStyle||this.primaryLanguage===r&&!this.forceLanguageUpdate))return;if(this.primaryLanguage.flag===et.STYLE_LOCK.flag)return void console.warn("The language cannot be changed because this map has been instantiated with the STYLE_LOCK language flag.");this.primaryLanguage=r;let a=r;if(r.flag===et.STYLE.flag){if(!t)return void console.warn("The style has no default languages or has an invali
125d one.");a=t}let n=et.LOCAL.flag,i=["get",n];i=a.flag===et.VISITOR.flag?["case",["all",["has",n=er().flag],["has",et.LOCAL.flag]],["case",["==",["get",n],["get",et.LOCAL.flag]],["get",et.LOCAL.flag],["format",["get",n],{"font-scale":.8},`
126`,["get",et.LOCAL.flag],{"font-scale":1.1}]],["get",et.LOCAL.flag]]:a.flag===et.VISITOR_ENGLISH.flag?["case",["all",["has",n=et.ENGLISH.flag],["has",et.LOCAL.flag]],["case",["==",["get",n],["get",et.LOCAL.flag]],["get",et.LOCAL.flag],["format",["get",n],{"font-scale":.8},`
127`,["get",et.LOCAL.flag],{"font-scale":1.1}]],["get",et.LOCAL.flag]]:a.flag===et.AUTO.flag?["coalesce",["get",n=er().flag],["get",et.LOCAL.flag]]:a===et.LOCAL?["get",n=et.LOCAL.flag]:["coalesce",["get",n=a.flag],["get",et.LOCAL.flag]];let{layers:o}=this.getStyle(),l=0===this.originalLabelStyle.size;if(l){let e=function(e,t){let r=[];for(let a of e){if("symbol"!==a.type)continue;let{id:e,layout:n}=a;if(!n||!("text-field"in n))continue;let i=t.getLayoutProperty(e,"text-field");if(i)if("string"==typeof i){let e=function(e){var t;let r=/\{name(?::(?<language>\S+))?\}/g,a=[];for(;;){let n=r.exec(e);if(!n)break;let i=(null==(t=n.groups)?void 0:t.language)??null;a.push(i)}return a}(i);r.push(e)}else{let e=function(e){let t=[],r=structuredClone(e),a=e=>{if("string"!=typeof e)for(let n=0;n<e.length;n+=1){var r;let i=Array.isArray(r=e[n])&&2===r.length&&"get"===r[0]&&"string"==typeof r[1]?"name"===r[1].trim()?{isLanguage:!0,localization:null}:r[1].trim().startsWith("name:")?{isLanguage:!0,localization:r[1].trim().split(":").pop()}:null:null;i?t.push(i.localization):a(e[n])}};return a([r]),t}(i);r.push(e)}}let a=r.flat(),n={unlocalized:0,localized:{}};for(let e of a)null===e?n.unlocalized+=1:(e in n.localized||(n.localized[e]=0),n.localized[e]+=1);return n}(o,this);this.isStyleLocalized=Object.keys(e.localized).length>0}for(let e of o){let t;if("symbol"!==e.type)continue;let r=this.getSource(e.source);if(!r||!("url"in r&&"string"==typeof r.url)||new URL(r.url).host!==ea.maptilerApiHost)continue;let{id:a,layout:n}=e;if(n&&"text-field"in n)if(l?(t=this.getLayoutProperty(a,"text-field"),this.originalLabelStyle.set(a,t)):t=this.originalLabelStyle.get(a),"string"==typeof t){let{contains:e,exactMatch:r}=function(e,t){let r=t?/\{name:\S+\}/:/\{name\}/;return{contains:r.test(e),exactMatch:RegExp(`^${r.source}$`).test(e)}}(t,this.isStyleLocalized);if(!e)continue;if(r)this.setLayoutProperty(a,"text-field",i);else{let e=function(e,t,r){let a=e.split(r?/\{name:\S+\}/:/\{name\}/);return["concat",...a.flatMap((e,r)=>r===a.length-1?[e]:[e,t])]}(t,i,this.isStyleLocalized);this.setLayoutProperty(a,"text-field",e)}}else{let e=function(e,t,r){let a=structuredClone(e),n=e=>{if("string"!=typeof e)for(let a=0;a<e.length;a+=1)ev(e[a],r)?e[a]=structuredClone(t):n(e[a])};return ev(a,r)?t:(n(a),a)}(t,i,this.isStyleLocalized);this.setLayoutProperty(a,"text-field",e)}}this.languageIsUpdated=!0}getPrimaryLanguage(){return this.primaryLanguage}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}growTerrain(e){if(!this.terrain)return;let t=performance.now(),r=this.terrain.exaggeration,a=e-r,n=()=>{if(!this.terrain||this.terrainFlattening)return;let i=(performance.now()-t)/this.terrainAnimationDuration;i<.99?(this.terrain.exaggeration=r+(1-(1-i)**4)*a,requestAnimationFrame(n)):(this.terrainGrowing=!1,this.terrainFlattening=!1,this.terrain.exaggeration=e,this.fire("terrainAnimationStop",{terrain:this.terrain})),this._elevationFreeze=!1,this.triggerRepaint()};this.terrainGrowing||this.terrainFlattening||this.fire("terrainAnimationStart",{terrain:this.terrain}),this.terrainGrowing=!0,this.terrainFlattening=!1,requestAnimationFrame(n)}enableTerrain(e=this.terrainExaggeration){if(e<0)return void console.warn("Terrain exaggeration cannot be negative.");let t=r=>{this.terrain&&"data"===r.type&&"source"===r.dataType&&"source"in r&&"maptiler-terrain"===r.sourceId&&"raster-dem"===r.source.type&&r.isSourceLoaded&&(this.off("data",t),this.growTerrain(e))},r=()=>{this.isTerrainEnabled=!0,this.terrainExaggeration=e,this.on("data",t),this.addSource(ea.terrainSourceId,{type:"raster-dem",url:ea.terrainSourceURL}),this.setTerrain({source:ea.terrainSourceId,exaggeration:0})};if(this.getTerrain()){this.isTerrainEnabled=!0,this.growTerrain(e);return}if(this.loaded()||this.isTerrainEnabled)r();else{let e=()=>
127{this.getTerrain()&&this.getSource(ea.terrainSourceId)||r()};this.once("load",()=>{e()}),this.once("moveend",()=>{e()})}}disableTerrain(){if(!this.terrain)return;this.isTerrainEnabled=!1;let e=performance.now(),t=this.terrain.exaggeration,r=()=>{if(!this.terrain||this.terrainGrowing)return;let a=(performance.now()-e)/this.terrainAnimationDuration;(this._elevationFreeze=!1,a<.99)?(this.terrain.exaggeration=t*(1-a)**4,requestAnimationFrame(r)):(this.terrain.exaggeration=0,this.terrainGrowing=!1,this.terrainFlattening=!1,this.setTerrain(),this.getSource(ea.terrainSourceId)&&this.removeSource(ea.terrainSourceId),this.fire("terrainAnimationStop",{terrain:null})),this.triggerRepaint()};this.terrainGrowing||this.terrainFlattening||this.fire("terrainAnimationStart",{terrain:this.terrain}),this.terrainGrowing=!1,this.terrainFlattening=!0,requestAnimationFrame(r)}setTerrainExaggeration(e,t=!0){!t&&this.terrain?(this.terrainExaggeration=e,this.terrain.exaggeration=e,this.triggerRepaint()):this.enableTerrain(e)}onStyleReady(e){this.isStyleLoaded()?e():this.once("styledata",()=>{e()})}async fitToIpBounds(){let e=await q.Re.info();this.fitBounds(e.country_bounds,{duration:0,padding:100})}async centerOnIpPoint(e){let t=await q.Re.info();this.jumpTo({center:[t.longitude??0,t.latitude??0],zoom:e||11})}getCameraHash(){let e=new Float32Array(5),t=this.getCenter();return e[0]=t.lng,e[1]=t.lat,e[2]=this.getZoom(),e[3]=this.getPitch(),e[4]=this.getBearing(),N.o4.fromUint8Array(new Uint8Array(e.buffer))}getSdkConfig(){return eo}getMaptilerSessionId(){return en}setTransformRequest(e){return super.setTransformRequest(eg(e)),this}getProjection(){let e=this.style.getProjection();return void 0===e&&this.style.projection?{type:this.style.projection.name}:e}isGlobeProjection(){let e=this.getProjection();return!!e&&"globe"===e.type}enableGlobeProjection(){this.curentProjection="globe",!0!==this.isGlobeProjection()&&this.setProjection({type:"globe"})}enableMercatorProjection(){this.curentProjection="mercator",!1!==this.isGlobeProjection()&&this.setProjection({type:"mercator"})}setProjection(e,t){return"string"==typeof e&&(e={type:e}),("mercator"===e.type||"globe"===e.type)&&null!=t&&t.persist&&(this.curentProjection=e.type),this.fire("projection.change",{target:this,projection:e}),super.setProjection(e)}forgetPersistedProjection(){return this.curentProjection=void 0,this}isLanguageUpdated(){return this.languageIsUpdated}},nc=Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"),nh=Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"),{Evented:nd}=O,{Evented:nf}=O;function nm(e){let t=e.toString(16);return 1===t.length?`0${t}`:t}class ny extends Array{constructor(e={}){super(),G(this,"min",0),G(this,"max",1),"min"in e&&(this.min=e.min),"max"in e&&(this.max=e.max),"stops"in e&&this.setStops(e.stops,{clone:!1})}static fromArrayDefinition(e){return new ny({stops:e.map(e=>({value:e[0],color:e[1]}))})}setStops(e,t={clone:!0}){let r=t.clone?this.clone():this;r.length=0;let a=1/0,n=-1/0;for(let t=0;t<e.length;t+=1)a=Math.min(a,e[t].value),n=Math.max(n,e[t].value),r.push({value:e[t].value,color:e[t].color.slice()});return r.sort((e,t)=>e.value<t.value?-1:1),this.min=a,this.max=n,r}scale(e,t,r={clone:!0}){let a=r.clone,n=this[0].value,i=this.at(-1).value-n,o=t-e,l=[];for(let t=0;t<this.length;t+=1){let r=(this[t].value-n)/i*o+e;a?l.push({value:r,color:this[t].color.slice()}):this[t].value=r}return a?new ny({stops:l}):this}at(e){return e<0?this[this.length+e]:this[e]}clone(){return new ny({stops:this.getRawColorStops()})}getRawColorStops(){let e=[];for(let t=0;t<this.length;t+=1)e.push({value:this[t].value,color:this[t].color});return e}reverse(e={clone:!0}){let t=e.clone?this.clone():this;for(let e=0;e<~~(t.length/2);e+=1){let r=t[e].color;t[e].color=t.at(-(e+1)).color,t.at(-(e+1)).color=r}return t}getBounds(){return{min:this.min,max:this.max}}getColor(e,t={smooth:!0}){if(e<=this[0].value)return this[0].color;if(e>=this.at(-1).value)return this.at(-1).color;for(let r=0;r<this.length-1;r+=1){if(e>this[r+1].value)continue;let a=this[r].color;if(!t.smooth)return a.slice();let n=this[r].value,i=this[r+1].value,o=this[r+1].color,l=(i-e)/(i-n);return a.map((e,t)=>Math.round(e*l+o[t]*(1-l)))}return[0,0,0]}getColorHex(e,t={smooth:!0,withAlpha:!1}){var r;return r=this.getColor(e,t),`#${nm(r[0])}${nm(r[1])}${nm(r[2])}${4===r.length?nm(r[3]):""}`}getColorRelative(e,t={smooth:!0}){let r=this.getBounds();return this.getColor(r.min+e*(r.max-r.min),t)}getCanvasStrip(e={horizontal:!0,size:512,smooth:!0}){let t=document.createElement("canvas");t.width=e.horizontal?e.size:1,t.height=e.horizontal?1:e.size;let r=t.getContext("2d");if(!r)throw Error("Canvs context is missing");let a=r.getImageData(0,0,t.width,t.height),n=a.data,i=e.size,o=this[0].value,l=(this.at(-1).value-o)/i;for(let t=0;t<i;t+=1){let r=this.getColor(o+t*l,{smooth:e.smooth});n[4*t]=r[0],n[4*t+1]=r[1],n[4*t+2]=r[2],n[4*t+3]=r.length>3?r[3]:255}return r.putImageData(a,0,0),t}
127resample(e,t=15){let r,a=this.getBounds(),n=this.scale(0,1),i=1/(t-1);if("ease-in-square"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(r**2);return{value:r,color:a}});else if("ease-out-square"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(1-(1-r)**2);return{value:r,color:a}});else if("ease-out-sqrt"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(r**.5);return{value:r,color:a}});else if("ease-in-sqrt"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(1-(1-r)**.5);return{value:r,color:a}});else if("ease-out-exp"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(1-2**(-10*r));return{value:r,color:a}});else if("ease-in-exp"===e)r=Array.from({length:t},(e,t)=>{let r=t*i,a=n.getColor(2**(10*r-10));return{value:r,color:a}});else throw Error("Invalid ressampling method.");return new ny({stops:r}).scale(a.min,a.max)}transparentStart(){let e=this.getRawColorStops();for(let t of(e.unshift({value:e[0].value,color:e[0].color.slice()}),e[1].value+=.001,e))3===t.color.length&&t.color.push(255);return e[0].color[3]=0,new ny({stops:e})}hasTransparentStart(){return 4===this[0].color.length&&0===this[0].color[3]}}new ny({stops:[{value:0,color:[0,0,0,0]},{value:1,color:[0,0,0,0]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new ny({stops:[{value:0,color:[0,0,131]},{value:.125,color:[0,60,170]},{value:.375,color:[5,255,255]},{value:.625,color:[255,255,0]},{value:.875,color:[250,0,0]},{value:1,color:[128,0,0]}]}),new ny({stops:[{value:0,color:[255,0,0]},{value:.169,color:[253,255,2]},{value:.173,color:[247,255,2]},{value:.337,color:[0,252,4]},{value:.341,color:[0,252,10]},{value:.506,color:[1,249,255]},{value:.671,color:[2,0,253]},{value:.675,color:[8,0,253]},{value:.839,color:[255,0,251]},{value:.843,color:[255,0,245]},{value:1,color:[255,0,6]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.3,color:[230,0,0]},{value:.6,color:[255,210,0]},{value:1,color:[255,255,255]}]}),new ny({stops:[{value:0,color:[255,0,255]},{value:1,color:[255,255,0]}]}),new ny({stops:[{value:0,color:[0,128,102]},{value:1,color:[255,255,102]}]}),new ny({stops:[{value:0,color:[255,0,0]},{value:1,color:[255,255,0]}]}),new ny({stops:[{value:0,color:[0,0,255]},{value:1,color:[0,255,128]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.376,color:[84,84,116]},{value:.753,color:[169,200,200]},{value:1,color:[255,255,255]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.804,color:[255,160,102]},{value:1,color:[255,199,127]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),new ny({stops:[{value:0,color:[8,29,88]},{value:.125,color:[37,52,148]},{value:.25,color:[34,94,168]},{value:.375,color:[29,145,192]},{value:.5,color:[65,182,196]},{value:.625,color:[127,205,187]},{value:.75,color:[199,233,180]},{value:.875,color:[237,248,217]},{value:1,color:[255,255,217]}]}),new ny({stops:[{value:0,color:[0,68,27]},{value:.125,color:[0,109,44]},{value:.25,color:[35,139,69]},{value:.375,color:[65,171,93]},{value:.5,color:[116,196,118]},{value:.625,color:[161,217,155]},{value:.75,color:[199,233,192]},{value:.875,color:[229,245,224]},{value:1,color:[247,252,245]}]}),new ny({stops:[{value:0,color:[128,0,38]},{value:.125,color:[189,0,38]},{value:.25,color:[227,26,28]},{value:.375,color:[252,78,42]},{value:.5,color:[253,141,60]},{value:.625,color:[254,178,76]},{value:.75,color:[254,217,118]},{value:.875,color:[255,237,160]},{value:1,color:[255,255,204]}]}),new ny({stops:[{value:0,color:[0,0,255]},{value:1,color:[255,0,0]}]}),new ny({stops:[{value:0,color:[5,10,172]},{value:.35,color:[106,137,247]},{value:.5,color:[190,190,190]},{value:.6,color:[220,170,132]},{value:.7,color:[230,145,90]},{value:1,color:[178,10,28]}]}),new ny({stops:[{value:0,color:[0,0,255]},{value:.1,color:[51,153,255]},{value:.2,color:[102,204,255]},{value:.3,color:[153,204,255]},{value:.4,color:[204,204,255]},{value:.5,color:[255,255,255]},{value:.6,color:[255,204,255]},{value:.7,color:[255,153,255]},{value:.8,color:[255,102,204]},{value:.9,color:[255,102,102]},{value:1,color:[255,0,0]}]}),new ny({stops:[{value:0,color:[150,0,90]},{value:.125,color:[0,0,200]},{value:.25,color:[0,25,255]},{value:.375,color:[0,152,255]},{value:.5,color:[44,255,150]},{value:.625,color:[151,255,0]}
127,{value:.75,color:[255,234,0]},{value:.875,color:[255,111,0]},{value:1,color:[255,0,0]}]}),new ny({stops:[{value:0,color:[12,51,131]},{value:.25,color:[10,136,186]},{value:.5,color:[242,211,56]},{value:.75,color:[242,143,56]},{value:1,color:[217,30,30]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.2,color:[230,0,0]},{value:.4,color:[230,210,0]},{value:.7,color:[255,255,255]},{value:1,color:[160,200,255]}]}),new ny({stops:[{value:0,color:[0,0,130]},{value:.1,color:[0,180,180]},{value:.2,color:[40,210,40]},{value:.4,color:[230,230,50]},{value:.6,color:[120,70,20]},{value:1,color:[255,255,255]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.15,color:[30,0,100]},{value:.4,color:[120,0,100]},{value:.6,color:[160,90,0]},{value:.8,color:[230,200,0]},{value:1,color:[255,250,220]}]}),new ny({stops:[{value:0,color:[68,1,84]},{value:.13,color:[71,44,122]},{value:.25,color:[59,81,139]},{value:.38,color:[44,113,142]},{value:.5,color:[33,144,141]},{value:.63,color:[39,173,129]},{value:.75,color:[92,200,99]},{value:.88,color:[170,220,50]},{value:1,color:[253,231,37]}]}),new ny({stops:[{value:0,color:[0,0,4]},{value:.13,color:[31,12,72]},{value:.25,color:[85,15,109]},{value:.38,color:[136,34,106]},{value:.5,color:[186,54,85]},{value:.63,color:[227,89,51]},{value:.75,color:[249,140,10]},{value:.88,color:[249,201,50]},{value:1,color:[252,255,164]}]}),new ny({stops:[{value:0,color:[0,0,4]},{value:.13,color:[28,16,68]},{value:.25,color:[79,18,123]},{value:.38,color:[129,37,129]},{value:.5,color:[181,54,122]},{value:.63,color:[229,80,100]},{value:.75,color:[251,135,97]},{value:.88,color:[254,194,135]},{value:1,color:[252,253,191]}]}),new ny({stops:[{value:0,color:[13,8,135]},{value:.13,color:[75,3,161]},{value:.25,color:[125,3,168]},{value:.38,color:[168,34,150]},{value:.5,color:[203,70,121]},{value:.63,color:[229,107,93]},{value:.75,color:[248,148,65]},{value:.88,color:[253,195,40]},{value:1,color:[240,249,33]}]}),new ny({stops:[{value:0,color:[125,0,179]},{value:.13,color:[172,0,187]},{value:.25,color:[219,0,170]},{value:.38,color:[255,0,130]},{value:.5,color:[255,63,74]},{value:.63,color:[255,123,0]},{value:.75,color:[234,176,0]},{value:.88,color:[190,228,0]},{value:1,color:[147,255,0]}]}),new ny({stops:[{value:0,color:[125,0,179]},{value:.13,color:[116,0,218]},{value:.25,color:[98,74,237]},{value:.38,color:[68,146,231]},{value:.5,color:[0,204,197]},{value:.63,color:[0,247,146]},{value:.75,color:[0,255,88]},{value:.88,color:[40,255,8]},{value:1,color:[147,255,0]}]}),new ny({stops:[{value:0,color:[125,0,179]},{value:.1,color:[199,0,180]},{value:.2,color:[255,0,121]},{value:.3,color:[255,108,0]},{value:.4,color:[222,194,0]},{value:.5,color:[150,255,0]},{value:.6,color:[0,255,55]},{value:.7,color:[0,246,150]},{value:.8,color:[50,167,222]},{value:.9,color:[103,51,235]},{value:1,color:[124,0,186]}]}),new ny({stops:[{value:0,color:[40,26,44]},{value:.13,color:[59,49,90]},{value:.25,color:[64,76,139]},{value:.38,color:[63,110,151]},{value:.5,color:[72,142,158]},{value:.63,color:[85,174,163]},{value:.75,color:[120,206,163]},{value:.88,color:[187,230,172]},{value:1,color:[253,254,204]}]}),new ny({stops:[{value:0,color:[47,15,62]},{value:.13,color:[87,23,86]},{value:.25,color:[130,28,99]},{value:.38,color:[171,41,96]},{value:.5,color:[206,67,86]},{value:.63,color:[230,106,84]},{value:.75,color:[242,149,103]},{value:.88,color:[249,193,135]},{value:1,color:[254,237,176]}]}),new ny({stops:[{value:0,color:[18,36,20]},{value:.13,color:[25,63,41]},{value:.25,color:[24,91,59]},{value:.38,color:[13,119,72]},{value:.5,color:[18,148,80]},{value:.63,color:[80,173,89]},{value:.75,color:[132,196,122]},{value:.88,color:[175,221,162]},{value:1,color:[215,249,208]}]}),new ny({stops:[{value:0,color:[54,14,36]},{value:.13,color:[89,23,80]},{value:.25,color:[110,45,132]},{value:.38,color:[120,77,178]},{value:.5,color:[120,113,213]},{value:.63,color:[115,151,228]},{value:.75,color:[134,185,227]},{value:.88,color:[177,214,227]},{value:1,color:[230,241,241]}]}),new ny({stops:[{value:0,color:[30,4,110]},{value:.13,color:[47,14,176]},{value:.25,color:[41,45,236]},{value:.38,color:[25,99,212]},{value:.5,color:[68,131,200]},{value:.63,color:[114,156,197]}
127,{value:.75,color:[157,181,203]},{value:.88,color:[200,208,216]},{value:1,color:[241,237,236]}]}),new ny({stops:[{value:0,color:[60,9,18]},{value:.13,color:[100,17,27]},{value:.25,color:[142,20,29]},{value:.38,color:[177,43,27]},{value:.5,color:[192,87,63]},{value:.63,color:[205,125,105]},{value:.75,color:[216,162,148]},{value:.88,color:[227,199,193]},{value:1,color:[241,237,236]}]}),new ny({stops:[{value:0,color:[64,5,5]},{value:.13,color:[106,6,15]},{value:.25,color:[144,26,7]},{value:.38,color:[168,64,3]},{value:.5,color:[188,100,4]},{value:.63,color:[206,136,11]},{value:.75,color:[220,174,25]},{value:.88,color:[231,215,44]},{value:1,color:[248,254,105]}]}),new ny({stops:[{value:0,color:[51,20,24]},{value:.13,color:[90,32,35]},{value:.25,color:[129,44,34]},{value:.38,color:[159,68,25]},{value:.5,color:[182,99,19]},{value:.63,color:[199,134,22]},{value:.75,color:[212,171,35]},{value:.88,color:[221,210,54]},{value:1,color:[225,253,75]}]}),new ny({stops:[{value:0,color:[145,105,18]},{value:.13,color:[184,71,38]},{value:.25,color:[186,58,115]},{value:.38,color:[160,71,185]},{value:.5,color:[110,97,218]},{value:.63,color:[50,123,164]},{value:.75,color:[31,131,110]},{value:.88,color:[77,129,34]},{value:1,color:[145,105,18]}]}),new ny({stops:[{value:0,color:[42,24,108]},{value:.13,color:[33,50,162]},{value:.25,color:[15,90,145]},{value:.38,color:[40,118,137]},{value:.5,color:[59,146,135]},{value:.63,color:[79,175,126]},{value:.75,color:[120,203,104]},{value:.88,color:[193,221,100]},{value:1,color:[253,239,154]}]}),new ny({stops:[{value:0,color:[4,35,51]},{value:.13,color:[23,51,122]},{value:.25,color:[85,59,157]},{value:.38,color:[129,79,143]},{value:.5,color:[175,95,130]},{value:.63,color:[222,112,101]},{value:.75,color:[249,146,66]},{value:.88,color:[249,196,65]},{value:1,color:[232,250,91]}]}),new ny({stops:[{value:0,color:[34,31,27]},{value:.13,color:[65,50,41]},{value:.25,color:[98,69,52]},{value:.38,color:[131,89,57]},{value:.5,color:[161,112,59]},{value:.63,color:[185,140,66]},{value:.75,color:[202,174,88]},{value:.88,color:[216,209,126]},{value:1,color:[233,246,171]}]}),new ny({stops:[{value:0,color:[17,32,64]},{value:.13,color:[35,52,116]},{value:.25,color:[29,81,156]},{value:.38,color:[31,113,162]},{value:.5,color:[50,144,169]},{value:.63,color:[87,173,176]},{value:.75,color:[149,196,189]},{value:.88,color:[203,221,211]},{value:1,color:[254,251,230]}]}),new ny({stops:[{value:0,color:[23,35,19]},{value:.13,color:[24,64,38]},{value:.25,color:[11,95,45]},{value:.38,color:[39,123,35]},{value:.5,color:[95,146,12]},{value:.63,color:[152,165,18]},{value:.75,color:[201,186,69]},{value:.88,color:[233,216,137]},{value:1,color:[255,253,205]}]}),new ny({stops:[{value:0,color:[0,0,0]},{value:.07,color:[22,5,59]},{value:.13,color:[60,4,105]},{value:.2,color:[109,1,135]},{value:.27,color:[161,0,147]},{value:.33,color:[210,2,142]},{value:.4,color:[251,11,123]},{value:.47,color:[255,29,97]},{value:.53,color:[255,54,69]},{value:.6,color:[255,85,46]},{value:.67,color:[255,120,34]},{value:.73,color:[255,157,37]},{value:.8,color:[241,191,57]},{value:.87,color:[224,220,93]},{value:.93,color:[218,241,142]},{value:1,color:[227,253,198]}]}),new ny({stops:[{value:0,color:[0,32,77,255]},{value:.125,color:[5,54,110,255]},{value:.25,color:[65,77,108,255]},{value:.375,color:[97,100,111,255]},{value:.5,color:[125,124,121,255]},{value:.625,color:[156,149,120,255]},{value:.75,color:[190,175,111,255]},{value:.875,color:[225,204,94,255]},{value:1,color:[255,235,70,255]}]}),new ny({stops:[{value:0,color:[48,18,59,255]},{value:.125,color:[70,107,227,255]},{value:.25,color:[40,187,236,255]},{value:.375,color:[49,242,153,255]},{value:.5,color:[162,252,60,255]},{value:.625,color:[237,208,58,255]},{value:.75,color:[251,128,34,255]},{value:.875,color:[210,49,5,255]},{value:1,color:[122,4,3,255]}]}),new ny({stops:[{value:0,color:[250,235,221,0]},{value:.133,color:[250,235,221,255]},{value:.266,color:[246,170,130,255]},{value:.4,color:[240,96,67,255]},{value:.533,color:[203,27,79,255]},{value:.666,color:[132,30,90,255]},{value:.8,color:[63,27,68,255]},{value:1,color:[3,5,26,255]}]}),new ny({stops:[{value:0,color:[11,4,5,255]},{value:.125,color:[43,28,53,255]},{value:.25,color:[62,53,107,255]},{value:.375,color:[59,86,152,255]},{value:.5,color:[53,123,162,255]},{value:.625,color:[53,158,170,255]}
127,{value:.75,color:[73,193,173,255]},{value:.875,color:[150,221,181,255]},{value:1,color:[222,245,229,255]}]});O.Map,O.Marker,O.Popup,O.Style,O.CanvasSource,O.GeoJSONSource,O.ImageSource,O.RasterTileSource,O.RasterDEMTileSource,O.VectorTileSource,O.VideoSource,O.NavigationControl,O.GeolocateControl,O.AttributionControl,O.LogoControl,O.ScaleControl,O.FullscreenControl,O.TerrainControl,O.BoxZoomHandler,O.ScrollZoomHandler,O.CooperativeGesturesHandler,O.KeyboardHandler,O.TwoFingersTouchPitchHandler,O.MapWheelEvent,O.MapTouchEvent,O.MapMouseEvent,O.config,O.getVersion;let{setRTLTextPlugin:ng,getRTLTextPluginStatus:nv,LngLat:nb,LngLatBounds:nx,MercatorCoordinate:nw,Evented:nS,AJAXError:nk,prewarm:n_,clearPrewarmedResources:nA,Hash:nC,Point:nE,EdgeInsets:nL,DragRotateHandler:nT,DragPanHandler:nM,TwoFingersTouchZoomRotateHandler:nP,DoubleClickZoomHandler:n$,TwoFingersTouchZoomHandler:nI,TwoFingersTouchRotateHandler:nj,getWorkerCount:nz,setWorkerCount:nR,getMaxParallelImageRequests:nO,setMaxParallelImageRequests:nN,getWorkerUrl:nU,setWorkerUrl:nq,addSourceType:nF,importScriptInWorkers:nD,addProtocol:nB,removeProtocol:nG}=O}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.