PageSourceSearch

https://taw.jensens.com/fe0912fa-768024211180c85c9a5b.js

js jensens.com collected 2026-09-25 00:02:37 UTC 289,466 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkheaps_go_web_guest=self.webpackChunkheaps_go_web_guest||[]).push([[5075],{65154:function(e,t,r){r.r(t),r.d(t,{AJAXError:function(){return Rl},ANIM_LAYER_PREFIX:function(){return Js},AnimatedRouteLayer:function(){return Ys},AttributionControl:function(){return _},AttributionControlMLGL:function(){return dl},BoxZoomHandler:function(){return z},BoxZoomHandlerMLGL:function(){return vl},CanvasSource:function(){return b},CanvasSourceMLGL:function(){return ol},ColorRamp:function(){return Ms},ColorRampCollection:function(){return Is},CooperativeGesturesHandler:function(){return $},CooperativeGesturesHandlerMLGL:function(){return wl},CubemapFaceNames:function(){return Oa},CubemapImagesPresets:function(){return Ra},CubemapLayer:function(){return Za},DOMcreate:function(){return Lo},DOMremove:function(){return Ao},DoubleClickZoomHandler:function(){return ql},DragPanHandler:function(){return Ul},DragRotateHandler:function(){return Dl},EdgeInsets:function(){return Nl},Evented:function(){return zl},FullscreenControl:function(){return I},FullscreenControlMLGL:function(){return yl},GeoJSONSource:function(){return w},GeoJSONSourceMLGL:function(){return al},GeolocateControl:function(){return E},GeolocateControlMLGL:function(){return hl},GeolocationType:function(){return ai},Hash:function(){return jl},ImageSource:function(){return x},ImageSourceMLGL:function(){return il},ImageViewer:function(){return Ri},ImageViewerEvent:function(){return si},ImageViewerMarker:function(){return Oi},ImageViewerMarkerEvent:function(){return Ni},KeyboardHandler:function(){return O},KeyboardHandlerMLGL:function(){return xl},Language:function(){return U},LngLat:function(){return Ml},LngLatBounds:function(){return Il},LogoControl:function(){return T},LogoControlMLGL:function(){return fl},Map:function(){return ii},MapMLGL:function(){return el},MapMouseEvent:function(){return D},MapMouseEventMLGL:function(){return Al},MapStyle:function(){return i.Gj},MapStyleVariant:function(){return i.Hu},MapTouchEvent:function(){return N},MapTouchEventMLGL:function(){return Ll},MapWheelEvent:function(){return F},MapWheelEventMLGL:function(){return kl},MaptilerAnimation:function(){return Xs},MaptilerCustomControl:function(){return Fo},MaptilerExternalControl:function(){return ea},MaptilerGeolocateControl:function(){return Po},MaptilerLogoControl:function(){return W},MaptilerNavigationControl:function(){return _o},MaptilerProjectionControl:function(){return No},MaptilerTerrainControl:function(){return Co},Marker:function(){return y},MarkerMLGL:function(){return tl},MercatorCoordinate:function(){return Pl},NavigationControMLGL:function(){return pl},NavigationControl:function(){return C},Point:function(){return Fl},Popup:function(){return g},PopupMLGL:function(){return rl},RadialGradientLayer:function(){return ri},RasterDEMTileSource:function(){return k},RasterDEMTileSourceMLGL:function(){return ll},RasterTileSource:function(){return S},RasterTileSourceMLGL:function(){return sl},ReferenceMapStyle:function(){return i.rF},ScaleControl:function(){return M},ScaleControlMLGL:function(){return ml},ScrollZoomHandler:function(){return R},ScrollZoomHandlerMLGL:function(){return bl},SdkConfig:function(){return V},ServiceError:function(){return i._7},Style:function(){return v},StyleMLGL:function(){return nl},TerrainControMLGL:function(){return gl},TerrainControl:function(){return P},TwoFingersTouchPitchHandler:function(){return j},TwoFingersTouchPitchHandlerMLGL:function(){return Sl},TwoFingersTouchRotateHandler:function(){return Vl},TwoFingersTouchZoomHandler:function(){return Gl},TwoFingersTouchZoomRotateHandler:function(){return Bl},VectorTileSource:function(){return L},VectorTileSourceMLGL:function(){return ul},VideoSource:function(){return A},VideoSourceMLGL:function(){return cl},addProtocol:function(){return eu},addSourceType:function(){return Yl},areSameLanguages:function(){return i.Io},bufferToPixelDataBrowser:function(){return i.iV},canParsePixelData:function(){return i.QB},circumferenceAtLatitude:function(){return i.Hy},clearPrewarmedResources:function(){return Ol},config:function(){return H},configMLGL:function(){return Cl},coordinates:function(){return i.G8},createBezierPathFromCoordinates:function(){return Us},cubemapPresets:function(){return $a},data:function(){return i.p},displayWebGLContextLostWarning:function(){return le},elevation:function(){return i.ET},expandMapStyle:function(){return i.ub},geocoding:function(){return i.G0},geolocation:function(){return i.Re},getAutoLanguage:function(){return i.IS},getAverageDistance:function(){return Bs},getBrowserLanguage:function(){return B},getBufferToPixelDataParser:function(){return i.jO},getLanguageInfoFromCode:function(){return i.m_},getLanguageInfoFromFlag:function(){return i.p3},getLanguageInfoFromKey:function(){return i.qy},getMapLibreVersion:function(){return El},getMaxParallelImageRequests:function(){return Zl},getRTLTextPluginStatus:function(){return Tl},getTileCache:function(){return i.Lq},getVersion:function(){return Qs},getWebGLSupportError:function(){return se},getWorkerCount:function(){return Hl},getWorkerUrl:function(){return Xl},gpx:function(){return qi},gpxOrKml:function(){return ds},hasChildNodeWithName:function(){return Ui},helpers:function(){return Ps},importScriptInWorkers:function(){return Ql},isLanguageInfo:function(){return i.h5},kml:function(){return Gi},lerp:function(){return zs},lerpArrayValues:function(){return Rs},mapStylePresetList:function(){return i.N0},math:function(){return i.Dy},misc:function(){return i.Lr},parseGeoJSONFeatureToKeyframes:function(){return js},prewarm:function(){return $l},removeProtocol:function(){return tu},resamplePath:function(){return Gs}
1,setMaxParallelImageRequests:function(){return Kl},setRTLTextPlugin:function(){return _l},setWorkerCount:function(){return Wl},setWorkerUrl:function(){return Jl},simplifyPath:function(){return qs},staticMaps:function(){return i.gZ},str2xml:function(){return Di},stretchNumericalArray:function(){return Fs},styleToStyle:function(){return i.oP},toLanguageInfo:function(){return i.EA},toggleProjection:function(){return Do},toggleTerrain:function(){return Eo},xml2str:function(){return Bi}});var n=r(16443),o=r(13293),a=r(37007),i=r(51884),s=r(25279),l=Object.defineProperty,u=e=>{throw TypeError(e)},c=(e,t,r)=>((e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),p=(e,t,r)=>t.has(e)||u("Cannot "+r),h=(e,t,r)=>(p(e,t,"read from private field"),r?r.call(e):t.get(e)),d=(e,t,r)=>t.has(e)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),f=(e,t,r,n)=>(p(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),m=(e,t,r)=>(p(e,t,"access private method"),r);window.requestIdleCallback=window.requestIdleCallback||function(e){var 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)};let y=class extends n.Marker{addTo(e){return super.addTo(e)}};class g extends n.Popup{addTo(e){return super.addTo(e)}}class v extends n.Style{constructor(e,t={}){super(e,t)}}class b extends n.CanvasSource{onAdd(e){super.onAdd(e)}}class w extends n.GeoJSONSource{onAdd(e){super.onAdd(e)}}class x extends n.ImageSource{onAdd(e){super.onAdd(e)}}class S extends n.RasterTileSource{onAdd(e){super.onAdd(e)}}class k extends n.RasterDEMTileSource{onAdd(e){super.onAdd(e)}}class L extends n.VectorTileSource{onAdd(e){super.onAdd(e)}}class A extends n.VideoSource{onAdd(e){super.onAdd(e)}}class C extends n.NavigationControl{onAdd(e){return super.onAdd(e)}}class E extends n.GeolocateControl{onAdd(e){return super.onAdd(e)}}class _ extends n.AttributionControl{onAdd(e){return super.onAdd(e)}}class T extends n.LogoControl{onAdd(e){return super.onAdd(e)}}class M extends n.ScaleControl{onAdd(e){return super.onAdd(e)}}class I extends n.FullscreenControl{onAdd(e){return super.onAdd(e)}}class P extends n.TerrainControl{onAdd(e){return super.onAdd(e)}}class z extends n.BoxZoomHandler{constructor(e,t){super(e,t)}}class R extends n.ScrollZoomHandler{constructor(e,t){super(e,t)}}class $ extends n.CooperativeGesturesHandler{constructor(e,t){super(e,t)}}class O extends n.KeyboardHandler{constructor(e){super(e)}}class j extends n.TwoFingersTouchPitchHandler{constructor(e){super(e)}}class F extends n.MapWheelEvent{constructor(e,t,r){super(e,t,r)}}class N extends n.MapTouchEvent{constructor(e,t,r){super(e,t,r)}}class D extends n.MapMouseEvent{constructor(e,t,r,n={}){super(e,t,r,n)}}const U={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},...i.TM};function B(){if(typeof navigator>"u"){const e=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];return(0,i.m_)(e)||U.ENGLISH}return Array.from(new Set(navigator.languages.map((e=>e.split("-")[0])))).map((e=>(0,i.m_)(e))).filter((e=>e))[0]??U.LOCAL}const q={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:U.STYLE,secondaryLanguage:U.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(q);const G=(0,s.A)();class V extends a{constructor(){super(...arguments),c(this,"primaryLanguage",q.primaryLanguage),c(this,"secondaryLanguage"),c(this,"session",!0),c(this,"cac
1hing",!0),c(this,"telemetry",!0),c(this,"_unit","metric"),c(this,"_apiKey","")}set unit(e){this._unit=e,this.emit("unit",e)}get unit(){return this._unit}set apiKey(e){this._apiKey=e,i.$W.apiKey=e,this.emit("apiKey",e)}get apiKey(){return this._apiKey}set fetch(e){i.$W.fetch=e}get fetch(){return i.$W.fetch}}const H=new V;class W extends T{constructor(e={}){super(e),c(this,"logoURL",""),c(this,"linkURL",""),this.logoURL=e.logoURL??q.maptilerLogoURL,this.linkURL=e.linkURL??q.maptilerURL}onAdd(e){this._map=e,this._compact=this.options.compact??!1,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";const 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}}const Z="localcache_source",K="localcache",X=typeof caches<"u",{addProtocol:J}=n;function Y(e,t){if(X&&H.caching&&H.session&&e.host===q.maptilerApiHost){if("Source"===t&&e.href.includes("tiles.json"))return e.href.replace("https://",`${Z}://`);if("Tile"===t||"Glyphs"===t)return e.href.replace("https://",`${K}://`)}return e.href}let Q;async function ee(){return Q||(Q=await caches.open("maptiler_sdk")),Q}let te=0;function re(){J(Z,(async(e,t)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${Z}://`,"https://");const r=e;r.signal=t.signal;const n=await fetch(e.url,r),o=await n.json();return o.tiles&&o.tiles.length>0&&(o.tiles[0]+=`&last-modified=${n.headers.get("Last-Modified")}`),{data:o,cacheControl:n.headers.get("Cache-Control"),expires:n.headers.get("Expires")}})),J(K,(async(e,t)=>{if(!e.url)throw new Error("");e.url=e.url.replace(`${K}://`,"https://");const r=new URL(e.url),n=new URL(r);n.searchParams.delete("mtsid"),n.searchParams.delete("key");const o=n.toString(),a=new URL(r);a.searchParams.delete("last-modified");const i=a.toString(),s=async e=>({data:await e.arrayBuffer(),cacheControl:e.headers.get("Cache-Control"),expires:e.headers.get("Expires")}),l=await ee(),u=await l.match(o);if(u)return s(u);const c=e;c.signal=t.signal;const p=await fetch(i,c);return p.status>=200&&p.status<300&&(l.put(o,p.clone()).catch((()=>{})),++te>100&&(async function(){const e=await ee(),t=await e.keys(),r=t.slice(0,Math.max(t.length-1e3,0));for(const n of r)e.delete(n)}(),te=0)),s(p)}))}function ne(e,t){let r=null;try{r=new URL(e)}catch{return{url:e}}return r.host===q.maptilerApiHost&&(r.searchParams.has("key")||r.searchParams.append("key",H.apiKey),H.session&&r.searchParams.append("mtsid",G)),{url:Y(r,t)}}function oe(e){return(t,r)=>{if(null!=e){const n=e(t,r),o=ne((null==n?void 0:n.url)??"",r);return{...n,...o}}return ne(t,r)}}function ae(){return Math.random().toString(36).substring(2)}function ie(e){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(e)}function se(){return document.createElement("canvas").getContext("webgl2")?null:typeof WebGL2RenderingContext<"u"?"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."}function le(e){const t=e.getContainer(),r=document.createElement("div");r.innerHTML="The WebGL context was lost.",r.classList.add("webgl-warning-div"),t.appendChild(r)}function ue(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])}function ce(e,t,r){const n=structuredClone(e),o=e=>{if("string"!=typeof e)for(let n=0;n<e.length;n+=1)ue(e[n],r)?e[n]=structuredClone(t):o(e[n])};return ue(n,r)?t:(o(n),n)}function pe(e,t){const r=t?/\{name:\S+\}/:/\{name\}/;
vendor: 6,181 bytes, line 1
1return{contains:r.test(e),exactMatch:new RegExp(`^${r.source}$`).test(e)}}function he(e,t,r){const n=r?/\{name:\S+\}/:/\{name\}/,o=e.split(n);return["concat",...o.flatMap(((e,r)=>r===o.length-1?[e]:[e,t]))]}function de(e){var t;const r=/\{name(?::(?<language>\S+))?\}/g,n=[];for(;;){const o=r.exec(e);if(!o)break;const a=(null==(t=o.groups)?void 0:t.language)??null;n.push(a)}return n}function fe(e){return Array.isArray(e)&&2===e.length&&"get"===e[0]&&"string"==typeof e[1]?"name"===e[1].trim()?{isLanguage:!0,localization:null}:e[1].trim().startsWith("name:")?{isLanguage:!0,localization:e[1].trim().split(":").pop()}:null:null}function me(e){const t=[],r=structuredClone(e),n=e=>{if("string"!=typeof e)for(let r=0;r<e.length;r+=1){const o=fe(e[r]);o?t.push(o.localization):n(e[r])}};return n([r]),t}var ye={$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},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:{}
vendor: 15,829 bytes, line 1
1,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
vendor: 8,689 bytes, line 1
1"},"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"},
1"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 ge{constructor(e,t,r,n){this.message=(e?`${e}: `:"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)}}function ve(e,...t){for(const r of t)for(const t in r)e[t]=r[t];return e}
vendor: 8,734 bytes, line 1
1class be extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class we{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[r,n]of t)this.bindings[r]=n}concat(e){return new we(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const xe={kind:"null"},Se={kind:"number"},ke={kind:"string"},Le={kind:"boolean"},Ae={kind:"color"},Ce={kind:"projectionDefinition"},Ee={kind:"object"},_e={kind:"value"},Te={kind:"collator"},Me={kind:"formatted"},Ie={kind:"padding"},Pe={kind:"colorArray"},ze={kind:"numberArray"},Re={kind:"resolvedImage"},$e={kind:"variableAnchorOffsetCollection"};function Oe(e,t){return{kind:"array",itemType:e,N:t}}function je(e){if("array"===e.kind){const t=je(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const Fe=[xe,Se,ke,Le,Ae,Ce,Me,Ee,Oe(_e),Ie,ze,Pe,Re,$e];function Ne(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Ne(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of Fe)if(!Ne(e,t))return null}return`Expected ${je(e)} but found ${je(t)} instead.`}function De(e,t){return t.some((t=>t.kind===e.kind))}function Ue(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 Be(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}const qe=.96422,Ge=.82521,Ve=4/29,He=6/29,We=3*He*He,Ze=He*He*He,Ke=Math.PI/180,Xe=180/Math.PI;function Je(e){return(e%=360)<0&&(e+=360),e}function Ye([e,t,r,n]){let o,a;const i=et((.2225045*(e=Qe(e))+.7168786*(t=Qe(t))+.0606169*(r=Qe(r)))/1);e===t&&t===r?o=a=i:(o=et((.4360747*e+.3850649*t+.1430804*r)/qe),a=et((.0139322*e+.0971045*t+.7141733*r)/Ge));const s=116*i-16;return[s<0?0:s,500*(o-i),200*(i-a),n]}function Qe(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function et(e){return e>Ze?Math.pow(e,1/3):e/We+Ve}function tt([e,t,r,n]){let o=(e+16)/116,a=isNaN(t)?o:o+t/500,i=isNaN(r)?o:o-r/200;return o=1*nt(o),a=qe*nt(a),i=Ge*nt(i),[rt(3.1338561*a-1.6168667*o-.4906146*i),rt(-.9787684*a+1.9161415*o+.033454*i),rt(.0719453*a-.2289914*o+1.4052427*i),n]}function rt(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function nt(e){return e>He?e*e*e:We*(e-Ve)}const ot=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function at(e,t){return ot(e,t)?e[t]:void 0}function it(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];const t=at(pt,e);if(t){const[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){const t=e.length<6?1:2;let r=1;return[st(e.slice(r,r+=t)),st(e.slice(r,r+=t)),st(e.slice(r,r+=t)),st(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){const t=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,r=e.match(t);if(r){const[e,t,n,o,a,i,s,l,u,c,p,h]=r,d=[o||" ",s||" ",c].join("");if("  "===d||"  /"===d||",,"===d||",,,"===d){const e=[n,i,u].join(""),r="%%%"===e?100:""===e?255:0;if(r){const e=[ut(+t/r,0,1),ut(+a/r,0,1),ut(+l/r,0,1),p?lt(+p,h):1];if(ct(e))return e}}return}}const r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){const[e,t,n,o,a,i,s,l,u]=r,c=[n||" ",a||" ",s].join("");if("  "===c||"  /"===c||",,"===c||",,,"===c){const e=[+t,ut(+o,0,100),ut(+i,0,100),l?lt(+l,u):1];if(ct(e))return function([e,t,r,n]){function o(n){const o=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(o-3,9-o,1))}return e=Je(e),t/=100,r/=100,[o(0),o(8),o(4),n]}(e)}}}function st(e){return parseInt(e.padEnd(2,e),16)/255}function lt(e,t){return ut(t?e/100:e,0,1)}function ut(e,t,r){return Math.min(Math.max(t,e),r)}function ct(e){return!e.some(Number.isNaN)}const pt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function ht(e,t,r){return e+r*(t-e)}function dt(e,t,r){return e.map(((e,n)=>ht(e,t[n],r)))}class ft{constructor(e,t,r,n=1,o=!0){this.r=e,this.g=t,this.b=r,this.a=n,o||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static parse(e){if(e instanceof ft)return e;if("string"!=typeof e)return;const t=it(e);return t?new ft(...t,!1):void 0}get rgb(){const{r:e,g:t,b:r,a:n}=this,o=n||1/0;return this.overwriteGetter("rgb",[e/o,t/o,r/o,n])}get hcl(){return this.overwriteGetter("hcl",function(e){const[t,r,n,o]=Ye(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?Je(Math.atan2(n,r)*Xe):NaN,a,t,o]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Ye(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map((e=>Math.round(255*e))).join(",")},${n})`}static interpolate(e,t,r,n="rgb"){switch(n){case"rgb":{const[n,o,a,i]=dt(e.rgb,t.rgb,r);return new ft(n,o,a,i,!1)}case"hcl":{const[n,o,a,i]=e.hcl,[s,l,u,c]=t.hcl;let p,h;if(isNaN(n)||isNaN(s))isNaN(n)?isNaN(s)?p=NaN:(p=s,(1===a||0===a)&&(h=l)):(p=n,
1(1===u||0===u)&&(h=o));else{let e=s-n;s>n&&e>180?e-=360:s<n&&n-s>180&&(e+=360),p=n+r*e}const[d,f,m,y]=function([e,t,r,n]){return e=isNaN(e)?0:e*Ke,tt([r,Math.cos(e)*t,Math.sin(e)*t,n])}([p,h??ht(o,l,r),ht(a,u,r),ht(i,c,r)]);return new ft(d,f,m,y,!1)}case"lab":{const[n,o,a,i]=tt(dt(e.lab,t.lab,r));return new ft(n,o,a,i,!1)}}}}ft.black=new ft(0,0,0,1),ft.white=new ft(1,1,1,1),ft.transparent=new ft(0,0,0,0),ft.red=new ft(1,0,0,1);class mt{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const yt=["bottom","center","top"];class gt{constructor(e,t,r,n,o,a){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=o,this.verticalAlign=a}}class vt{constructor(e){this.sections=e}static fromString(e){return new vt([new gt(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 vt?e:vt.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}}class bt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof bt)return e;if("number"==typeof e)return new bt([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const 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 bt(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new bt(dt(e.values,t.values,r))}}class wt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof wt)return e;if("number"==typeof e)return new wt([e]);if(Array.isArray(e)){for(const t of e)if("number"!=typeof t)return;return new wt(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new wt(dt(e.values,t.values,r))}}class xt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof xt)return e;if("string"==typeof e){const t=ft.parse(e);return t?new xt([t]):void 0}if(!Array.isArray(e))return;const t=[];for(const r of e){if("string"!=typeof r)return;const e=ft.parse(r);if(!e)return;t.push(e)}return new xt(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,n="rgb"){const o=[];if(e.values.length!=t.values.length)throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let a=0;a<e.values.length;a++)o.push(ft.interpolate(e.values[a],t.values[a],r,n));return new xt(o)}}class St extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}const kt=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Lt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Lt)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t<e.length;t+=2){const r=e[t],n=e[t+1];if("string"!=typeof r||!kt.has(r)||!Array.isArray(n)||2!==n.length||"number"!=typeof n[0]||"number"!=typeof n[1])return}return new Lt(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){const n=e.values,o=t.values;if(n.length!==o.length)throw new St(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);const a=[];for(let i=0;i<n.length;i+=2){if(n[i]!==o[i])throw new St(`Cannot interpolate values containing mismatched anchors. from[${i}]: ${n[i]}, to[${i}]: ${o[i]}`);a.push(n[i]);const[e,t]=n[i+1],[s,l]=o[i+1];a.push([ht(e,s,r),ht(t,l,r)])}return new Lt(a)}}class At{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new At({name:e,available:!1}):null}}class Ct{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}static interpolate(e,t,r){return new Ct(e,t,r)}static parse(e){return e instanceof Ct?e:Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]?new Ct(e[0],e[1],e[2]):"object"==typeof e&&"string"==typeof e.from&&"string"==typeof e.to&&"number"==typeof e.transition?new Ct(e.from,e.to,e.transition):"string"==typeof e?new Ct(e,e,1):void 0}}function Et(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?typeof n>"u"||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function _t(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof Ct||e instanceof ft||e instanceof mt||e instanceof vt||e instanceof bt||e instanceof wt||e instanceof xt||e instanceof Lt||e instanceof At)return!0;
vendor: 22,099 bytes, line 1
1if(Array.isArray(e)){for(const t of e)if(!_t(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!_t(e[t]))return!1;return!0}return!1}function Tt(e){if(null===e)return xe;if("string"==typeof e)return ke;if("boolean"==typeof e)return Le;if("number"==typeof e)return Se;if(e instanceof ft)return Ae;if(e instanceof Ct)return Ce;if(e instanceof mt)return Te;if(e instanceof vt)return Me;if(e instanceof bt)return Ie;if(e instanceof wt)return ze;if(e instanceof xt)return Pe;if(e instanceof Lt)return $e;if(e instanceof At)return Re;if(Array.isArray(e)){const t=e.length;let r;for(const n of e){const e=Tt(n);if(r){if(r===e)continue;r=_e;break}r=e}return Oe(r||_e,t)}return Ee}function Mt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof ft||e instanceof Ct||e instanceof vt||e instanceof bt||e instanceof wt||e instanceof xt||e instanceof Lt||e instanceof At?e.toString():JSON.stringify(e)}class It{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(!_t(e[1]))return t.error("invalid value");const r=e[1];let n=Tt(r);const o=t.expectedType;return"array"===n.kind&&0===n.N&&o&&"array"===o.kind&&("number"!=typeof o.N||0===o.N)&&(n=o),new It(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Pt={string:ke,number:Se,boolean:Le,object:Ee};class zt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1;const o=e[0];if("array"===o){let o,a;if(e.length>2){const r=e[1];if("string"!=typeof r||!(r in Pt)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Pt[r],n++}else o=_e;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);a=e[2],n++}r=Oe(o,a)}else{if(!Pt[o])throw new Error(`Types doesn't contain name = ${o}`);r=Pt[o]}const a=[];for(;n<e.length;n++){const r=t.parse(e[n],n,_e);if(!r)return null;a.push(r)}return new zt(r,a)}evaluate(e){for(let t=0;t<this.args.length;t++){const r=this.args[t].evaluate(e);if(!Ne(this.type,Tt(r)))return r;if(t===this.args.length-1)throw new St(`Expected value to be of type ${je(this.type)}, but found ${je(Tt(r))} instead.`)}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const Rt={"to-boolean":Le,"to-color":Ae,"to-number":Se,"to-string":ke};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.");const r=e[0];if(!Rt[r])throw new 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.");const n=Rt[r],o=[];for(let a=1;a<e.length;a++){const r=t.parse(e[a],a,_e);if(!r)return null;o.push(r)}return new $t(n,o)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(const n of this.args){if(t=n.evaluate(e),r=null,t instanceof ft)return t;if("string"==typeof t){const 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.`:Et(t[0],t[1],t[2],t[3]),!r))return new ft(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new St(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const r of this.args){t=r.evaluate(e);const n=bt.parse(t);if(n)return n}throw new St(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(const r of this.args){t=r.evaluate(e);const n=wt.parse(t);if(n)return n}throw new St(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(const r of this.args){t=r.evaluate(e);const n=xt.parse(t);if(n)return n}throw new St(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const r of this.args){t=r.evaluate(e);const n=Lt.parse(t);if(n)return n}throw new St(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const r of this.args){if(t=r.evaluate(e),null===t)return 0;const n=Number(t);if(!isNaN(n))return n}throw new St(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return vt.fromString(Mt(this.args[0].evaluate(e)));case"resolvedImage":return At.fromString(Mt(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return Mt(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const Ot=["Unknown","Point","LineString","Polygon"];class jt{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?Ot[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=ft.parse(e),this._parseColorCache.set(e,t)),t}}class Ft{constructor(e,t,r=[],n,o=new we,a=[]){this.registry=e,this.path=r,this.key=r.map((e=>`[${e}]`)).join(""),this.scope=o,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,o={}){return t?this.concat(t,r,n)._parse(e,o):this._parse(e,o)}_parse(e,t){function r(e,t,r){return"assert"===r?new zt(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)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=e[0];if("string"!=typeof o)return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const a=this.registry[o];if(a){let o=a.parse(e,this);if(!o)return null;if(this.expectedType){const e=this.expectedType,n=o.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==n.kind){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))o=r(o,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}else o=r(o,e,t.typeAnnotation||"assert")}if(!(o instanceof It)&&"resolvedImage"!==o.type.kind&&this._isConstant(o)){const e=new jt;try{o=new It(o.type,o.evaluate(e))}catch(n){return this.error(n.message),null}}return o}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}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.`)}concat(e,t,r){const n="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new Ft(this.registry,this._isConstant,n,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new be(r,e))}checkSubtype(e,t){const r=Ne(e,t);return r&&this.error(r),r}}class Nt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let o=1;o<e.length-1;o+=2){const n=e[o];if("string"!=typeof n)return t.error(`Expected string, but found ${typeof n} instead.`,o);if(/[^a-zA-Z0-9_]/.test(n))return t.error("Variable names must contain only alphanumeric characters or '_'.",o);const a=t.parse(e[o+1],o+1);if(!a)return null;r.push([n,a])}const n=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return n?new Nt(r,n):null}outputDefined(){return this.result.outputDefined()}}class Dt{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new Dt(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 Ut{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.`);const r=t.parse(e[1],1,Se),n=t.parse(e[2],2,Oe(t.expectedType||_e));if(!r||!n)return null;const o=n.type;return new Ut(o.itemType,r,n)}evaluate(e){const t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new St(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new St(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new St(`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 Bt{constructor(e,t){this.type=Le,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,_e),n=t.parse(e[2],2,_e);return r&&n?De(r.type,[Le,ke,Se,xe,_e])?new Bt(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${je(r.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Ue(t,["boolean","string","number","null"]))throw new St(`Expected first argument to be of type boolean, string, number or null, but found ${je(Tt(t))} instead.`);if(!Ue(r,["string","array"]))throw new St(`Expected second argument to be of type array or string, but found ${je(Tt(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class qt{constructor(e,t,r){this.type=Se,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.`);const r=t.parse(e[1],1,_e),n=t.parse(e[2],2,_e);if(!r||!n)return null;if(!De(r.type,[Le,ke,Se,xe,_e]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${je(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,Se);return o?new qt(r,n,o):null}return new qt(r,n)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Ue(t,["boolean","string","number","null"]))throw new St(`Expected first argument to be of type boolean, string, number or null, but found ${je(Tt(t))} instead.`);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),Ue(r,["string"])){const e=r.indexOf(t,n);return-1===e?-1:[...r.slice(0,e)].length}if(Ue(r,["array"]))return r.indexOf(t,n);throw new St(`Expected second argument to be of type array or string, but found ${je(Tt(r))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Gt{constructor(e,t,r,n,o,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=o,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const o={},a=[];for(let l=2;l<e.length-1;l+=2){let i=e[l];const s=e[l+1];Array.isArray(i)||(i=[i]);const u=t.concat(l);if(0===i.length)return u.error("Expected at least one branch label.");for(const e of i){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,Tt(e)))return null}else r=Tt(e);if(typeof o[String(e)]<"u")return u.error("Branch labels must be unique.");o[String(e)]=a.length}const c=t.parse(s,l,n);if(!c)return null;n=n||c.type,a.push(c)}const i=t.parse(e[1],1,_e);if(!i)return null;const s=t.parse(e[e.length-1],e.length-1,n);return!s||"value"!==i.type.kind&&t.concat(1).checkSubtype(r,i.type)?null:new Gt(r,n,i,o,a,s)}evaluate(e){const t=this.input.evaluate(e);return(Tt(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 Vt{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const n=[];for(let a=1;a<e.length-1;a+=2){const o=t.parse(e[a],a,Le);if(!o)return null;const i=t.parse(e[a+1],a+1,r);if(!i)return null;n.push([o,i]),r=r||i.type}const o=t.parse(e[e.length-1],e.length-1,r);if(!o)return null;if(!r)throw new Error("Can't infer output type");return new Vt(r,n,o)}evaluate(e){for(const[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[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 Ht{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,_e),n=t.parse(e[2],2,Se);if(!r||!n)return null;if(!De(r.type,[Oe(_e),ke,_e]))return t.error(`Expected first argument to be of type array or string, but found ${je(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,Se);return o?new Ht(r.type,r,n,o):null}return new Ht(r.type,r,n)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);let n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),Ue(t,["string"]))return[...t].slice(r,n).join("");if(Ue(t,["array"]))return t.slice(r,n);throw new St(`Expected first argument to be of type array or string, but found ${je(Tt(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function Wt(e,t){const r=e.length-1;let n,o,a=0,i=r,s=0;for(;a<=i;)if(s=Math.floor((a+i)/2),n=e[s],o=e[s+1],n<=t){if(s===r||t<o)return s;a=s+1}else{if(!(n>t))throw new St("Input is not a number.");i=s-1}return 0}class Zt{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[n,o]of r)this.labels.push(n),this.outputs.push(o)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,Se);if(!r)return null;const n=[];let o=null;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);for(let a=1;a<e.length;a+=2){const r=1===a?-1/0:e[a],i=e[a+1],s=a,l=a+1;if("number"!=typeof r)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(n.length&&n[n.length-1][0]>=r)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=t.parse(i,l,o);if(!u)return null;o=o||u.type,n.push([r,u])}return new Zt(o,r,n)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);return r[Wt(t,n)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt,Jt;var Yt=function(){if(Jt)return Xt;function e(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}return Jt=1,Xt=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,n=0;n<8;n++){var o=this.sampleCurveX(r)-e;if(Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r-=o/a}var i=0,s=1;for(r=e,n=0;n<20&&(o=this.sampleCurveX(r),!(Math.abs(o-e)<t));n++)e>o?i=r:s=r,r=.5*(s-i)+i;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},Xt}(),Qt=Kt(Yt);class er{constructor(e,t,r,n,o){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[a,i]of o)this.labels.push(a),this.outputs.push(i)}static interpolationFactor(e,t,r,n){let o=0;if("exponential"===e.name)o=tr(t,e.base,r,n);else if("linear"===e.name)o=tr(t,1,r,n);else if("cubic-bezier"===e.name){const a=e.controlPoints;o=new Qt(a[0],a[1],a[2],a[3]).solve(tr(t,1,r,n))}return o}static parse(e,t){let[r,n,o,...a]=e;if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const e=n[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:e}}else{if("cubic-bezier"!==n[0])return t.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const e=n.slice(1);if(4!==e.length||e.some((e=>"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,Se),!o)return null;const i=[];let s=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||t.expectedType==Pe?t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType):s=Ae;for(let l=0;l<a.length;l+=2){const e=a[l],r=a[l+1],n=l+3,o=l+4;if("number"!=typeof e)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(i.length&&i[i.length-1][0]>=e)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);const u=t.parse(r,o,s);if(!u)return null;s=s||u.type,i.push([e,u])}return Be(s,Se)||Be(s,Ce)||Be(s,Ae)||Be(s,Ie)||Be(s,ze)||Be(s,Pe)||Be(s,$e)||Be(s,Oe(Se))?new er(s,r,n,o,i):t.error(`Type ${je(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);const a=Wt(t,n),i=t[a],s=t[a+1],l=er.interpolationFactor(this.interpolation,n,i,s),u=r[a].evaluate(e),c=r[a+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ht(u,c,l);case"color":return ft.interpolate(u,c,l);case"padding":return bt.interpolate(u,c,l);case"colorArray":return xt.interpolate(u,c,l);case"numberArray":return wt.interpolate(u,c,l);case"variableAnchorOffsetCollection":return Lt.interpolate(u,c,l);case"array":return dt(u,c,l);case"projectionDefinition":return Ct.interpolate(u,c,l)}case"interpolate-hcl":switch(this.type.kind){case"color":return ft.interpolate(u,c,l,"hcl");case"colorArray":return xt.interpolate(u,c,l,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ft.interpolate(u,c,l,"lab");case"colorArray":return xt.interpolate(u,c,l,"lab")}}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function tr(e,t,r,n){const o=n-r,a=e-r;return 0===o?0:1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1)}class rr{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;const n=t.expectedType;n&&"value"!==n.kind&&(r=n);const o=[];for(const a of e.slice(1)){const e=t.parse(a,1+o.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,o.push(e)}if(!r)throw new Error("No output type");return n&&o.some((e=>Ne(n,e.type)))?new rr(_e,o):new rr(r,o)}evaluate(e){let t,r=null,n=0;for(const o of this.args)if(n++,r=o.evaluate(e),r&&r instanceof At&&!r.available&&(t||(t=r.name),r=null,n===this.args.length&&(r=t)),null!==r)break;return r}
vendor: 4,706 bytes, line 1
1eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}function nr(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 or(e,t,r,n){return 0===n.compare(t,r)}function ar(e,t,r){const n="=="!==e&&"!="!==e;return class o{constructor(e,t,r){this.type=Le,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const r=e[0];let a=t.parse(e[1],1,_e);if(!a)return null;if(!nr(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${je(a.type)}'.`);let i=t.parse(e[2],2,_e);if(!i)return null;if(!nr(r,i.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${je(i.type)}'.`);if(a.type.kind!==i.type.kind&&"value"!==a.type.kind&&"value"!==i.type.kind)return t.error(`Cannot compare types '${je(a.type)}' and '${je(i.type)}'.`);n&&("value"===a.type.kind&&"value"!==i.type.kind?a=new zt(i.type,[a]):"value"!==a.type.kind&&"value"===i.type.kind&&(i=new zt(a.type,[i])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==i.type.kind&&"value"!==a.type.kind&&"value"!==i.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,Te),!s)return null}return new o(a,i,s)}evaluate(o){const a=this.lhs.evaluate(o),i=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const t=Tt(a),r=Tt(i);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new St(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const e=Tt(a),r=Tt(i);if("string"!==e.kind||"string"!==r.kind)return t(o,a,i)}return this.collator?r(o,a,i,this.collator.evaluate(o)):t(o,a,i)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}const ir=ar("==",(function(e,t,r){return t===r}),or),sr=ar("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!or(0,t,r,n)})),lr=ar("<",(function(e,t,r){return t<r}),(function(e,t,r,n){return n.compare(t,r)<0})),ur=ar(">",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),cr=ar("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),pr=ar(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0}));class hr{constructor(e,t,r){this.type=Te,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");const r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");const n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Le);if(!n)return null;const o=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Le);if(!o)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,ke),!a)?null:new hr(n,o,a)}evaluate(e){return new mt(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 dr{constructor(e,t,r,n,o){this.type=ke,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=o}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Se);if(!r)return null;const n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let o=null;if(n.locale&&(o=t.parse(n.locale,1,ke),!o))return null;let a=null;if(n.currency&&(a=t.parse(n.currency,1,ke),!a))return null;let i=null;if(n["min-fraction-digits"]&&(i=t.parse(n["min-fraction-digits"],1,Se),!i))return null;let s=null;return n["max-fraction-digits"]&&(s=t.parse(n["max-fraction-digits"],1,Se),!s)?null:new dr(r,o,a,i,s)}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}}
vendor: 15,336 bytes, line 1
1class fr{constructor(e){this.type=Me,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");const n=[];let o=!1;for(let a=1;a<=e.length-1;++a){const r=e[a];if(o&&"object"==typeof r&&!Array.isArray(r)){o=!1;let e=null;if(r["font-scale"]&&(e=t.parse(r["font-scale"],1,Se),!e))return null;let a=null;if(r["text-font"]&&(a=t.parse(r["text-font"],1,Oe(ke)),!a))return null;let i=null;if(r["text-color"]&&(i=t.parse(r["text-color"],1,Ae),!i))return null;let s=null;if(r["vertical-align"]){if("string"==typeof r["vertical-align"]&&!yt.includes(r["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${r["vertical-align"]}' instead.`);if(s=t.parse(r["vertical-align"],1,ke),!s)return null}const l=n[n.length-1];l.scale=e,l.font=a,l.textColor=i,l.verticalAlign=s}else{const r=t.parse(e[a],1,_e);if(!r)return null;const i=r.type.kind;if("string"!==i&&"value"!==i&&"null"!==i&&"resolvedImage"!==i)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,n.push({content:r,scale:null,font:null,textColor:null,verticalAlign:null})}}return new fr(n)}evaluate(e){return new vt(this.sections.map((t=>{const r=t.content.evaluate(e);return Tt(r)===Re?new gt("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new gt(Mt(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(const 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 mr{constructor(e){this.type=Re,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ke);return r?new mr(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=At.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}}class yr{constructor(e){this.type=Se,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${je(r.type)} instead.`):new yr(r):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new St(`Expected value to be of type string or array, but found ${je(Tt(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const gr=8192;function vr(e,t){const r=function(e){return(180+e)/360}(e[0]),n=function(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}(e[1]),o=Math.pow(2,t.z);return[Math.round(r*o*gr),Math.round(n*o*gr)]}function br(e,t){const r=Math.pow(2,t.z),n=(e[0]/gr+t.x)/r,o=(e[1]/gr+t.y)/r;return[wr(n),xr(o)]}function wr(e){return 360*e-180}function xr(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function Sr(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 kr(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Lr(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Ar(e,t,r){const n=e[0]-t[0],o=e[1]-t[1],a=e[0]-r[0],i=e[1]-r[1];return n*i-a*o==0&&n*a<=0&&o*i<=0}function Cr(e,t,r,n){const o=[t[0]-e[0],t[1]-e[1]];return 0!==function(e,t){return e[0]*t[1]-e[1]*t[0]}([n[0]-r[0],n[1]-r[1]],o)&&!(!Pr(e,t,r,n)||!Pr(r,n,e,t))}function Er(e,t,r){for(const n of r)for(let r=0;r<n.length-1;++r)if(Cr(e,t,n[r],n[r+1]))return!0;return!1}function _r(e,t,r=!1){let n=!1;for(const o of t)for(let t=0;t<o.length-1;t++){if(Ar(e,o[t],o[t+1]))return r;Lr(e,o[t],o[t+1])&&(n=!n)}return n}function Tr(e,t){for(const r of t)if(_r(e,r))return!0;return!1}function Mr(e,t){for(const r of e)if(!_r(r,t))return!1;for(let r=0;r<e.length-1;++r)if(Er(e[r],e[r+1],t))return!1;return!0}function Ir(e,t){for(const r of t)if(Mr(e,r))return!0;return!1}function Pr(e,t,r,n){const o=e[0]-r[0],a=e[1]-r[1],i=t[0]-r[0],s=t[1]-r[1],l=n[0]-r[0],u=n[1]-r[1],c=o*u-l*a,p=i*u-l*s;return c>0&&p<0||c<0&&p>0}function zr(e,t,r){const n=[];for(let o=0;o<e.length;o++){const a=[];for(let n=0;n<e[o].length;n++){const i=vr(e[o][n],r);Sr(t,i),a.push(i)}n.push(a)}return n}function Rr(e,t,r){const n=[];for(let o=0;o<e.length;o++){const a=zr(e[o],t,r);n.push(a)}return n}function $r(e,t,r,n){if(e[0]<r[0]||e[0]>r[2]){const t=.5*n;let o=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===o&&(o=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=o}Sr(t,e)}function Or(e,t,r,n){const o=Math.pow(2,n.z)*gr,a=[n.x*gr,n.y*gr],i=[];for(const s of e)for(const e of s){const n=[e.x+a[0],e.y+a[1]];$r(n,t,r,o),i.push(n)}return i}function jr(e,t,r,n){const o=Math.pow(2,n.z)*gr,a=[n.x*gr,n.y*gr],i=[];for(const s of e){const e=[];for(const r of s){const n=[r.x+a[0],r.y+a[1]];Sr(t,n),e.push(n)}i.push(e)}if(t[2]-t[0]<=o/2){!function(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}(t);for(const e of i)for(const n of e)$r(n,t,r,o)}return i}class Fr{constructor(e,t){this.type=Le,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(_t(e[1])){const t=e[1];if("FeatureCollection"===t.type){const e=[];for(const r of t.features){const{type:t,coordinates:n}=r.geometry;"Polygon"===t&&e.push(n),"MultiPolygon"===t&&e.push(...n)}if(e.length){return new Fr(t,{type:"MultiPolygon",coordinates:e})}}else if("Feature"===t.type){const e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new Fr(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new Fr(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){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],o=e.canonicalID();if("Polygon"===t.type){const a=zr(t.coordinates,n,o),i=Or(e.geometry(),r,n,o);if(!kr(r,n))return!1;for(const e of i)if(!_r(e,a))return!1}if("MultiPolygon"===t.type){const a=Rr(t.coordinates,n,o),i=Or(e.geometry(),r,n,o);if(!kr(r,n))return!1;for(const e of i)if(!Tr(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){const r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],o=e.canonicalID();if("Polygon"===t.type){const a=zr(t.coordinates,n,o),i=jr(e.geometry(),r,n,o);if(!kr(r,n))return!1;for(const e of i)if(!Mr(e,a))return!1}if("MultiPolygon"===t.type){const a=Rr(t.coordinates,n,o),i=jr(e.geometry(),r,n,o);if(!kr(r,n))return!1;for(const e of i)if(!Ir(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Nr{constructor(e=[],t=(e,t)=>e<t?-1:e>t?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;const 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){const{data:t,compare:r}=this,n=t[e];for(;e>0;){const o=e-1>>1,a=t[o];if(r(n,a)>=0)break;t[e]=a,e=o}t[e]=n}_down(e){const{data:t,compare:r}=this,n=this.length>>1,o=t[e];for(;e<n;){let n=1+(e<<1);const a=n+1;if(a<this.length&&r(t[a],t[n])<0&&(n=a),r(t[n],o)>=0)break;t[e]=t[n],e=n}t[e]=o}}function Dr(e){let t=0;for(let r,n,o=0,a=e.length,i=a-1;o<a;i=o++)r=e[o],n=e[i],t+=(n.x-r.x)*(r.y+n.y);return t}const Ur=1/298.257223563,Br=Ur*(2-Ur),qr=Math.PI/180;class Gr{constructor(e){const t=6378.137*qr*1e3,r=Math.cos(e*qr),n=1/(1-Br*(1-r*r)),o=Math.sqrt(n);this.kx=t*o*r,this.ky=t*o*n*(1-Br)}distance(e,t){const r=this.wrap(e[0]-t[0])*this.kx,n=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+n*n)}pointOnLine(e,t){let r,n,o,a,i=1/0;for(let s=0;s<e.length-1;s++){let l=e[s][0],u=e[s][1],c=this.wrap(e[s+1][0]-l)*this.kx,p=(e[s+1][1]-u)*this.ky,h=0;(0!==c||0!==p)&&(h=(this.wrap(t[0]-l)*this.kx*c+(t[1]-u)*this.ky*p)/(c*c+p*p),h>1?(l=e[s+1][0],u=e[s+1][1]):h>0&&(l+=c/this.kx*h,u+=p/this.ky*h)),c=this.wrap(t[0]-l)*this.kx,p=(t[1]-u)*this.ky;const d=c*c+p*p;d<i&&(i=d,r=l,n=u,o=s,a=h)}return{point:[r,n],index:o,t:Math.max(0,Math.min(1,a))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function Vr(e,t){return t[0]-e[0]}function Hr(e){return e[1]-e[0]+1}function Wr(e,t){return e[1]>=e[0]&&e[1]<t}function Zr(e,t){if(e[0]>e[1])return[null,null];const r=Hr(e);if(t){if(2===r)return[e,null];const t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];const n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function Kr(e,t){if(!Wr(t,e.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)Sr(r,e[n]);return r}function Xr(e){const t=[1/0,1/0,-1/0,-1/0];for(const r of e)for(const e of r)Sr(t,e);return t}function Jr(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Yr(e,t,r){if(!Jr(e)||!Jr(t))return NaN;let n=0,o=0;return e[2]<t[0]&&(n=t[0]-e[2]),e[0]>t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(o=e[1]-t[3]),e[3]<t[1]&&(o=t[1]-e[3]),r.distance([0,0],[n,o])}function Qr(e,t,r){const n=r.pointOnLine(t,e);return r.distance(e,n.point)}function en(e,t,r,n,o){const a=Math.min(Qr(e,[r,n],o),Qr(t,[r,n],o)),i=Math.min(Qr(r,[e,t],o),Qr(n,[e,t],o));return Math.min(a,i)}function tn(e,t,r,n,o){if(!Wr(t,e.length)||!Wr(n,r.length))return 1/0;let a=1/0;for(let i=t[0];i<t[1];++i){const t=e[i],s=e[i+1];for(let e=n[0];e<n[1];++e){const n=r[e],i=r[e+1];if(Cr(t,s,n,i))return 0;a=Math.min(a,en(t,s,n,i,o))}}return a}function rn(e,t,r,n,o){if(!Wr(t,e.length)||!Wr(n,r.length))return NaN;let a=1/0;for(let i=t[0];i<=t[1];++i)for(let t=n[0];t<=n[1];++t)if(a=Math.min(a,o.distance(e[i],r[t])),0===a)return a;return a}function nn(e,t,r){if(_r(e,t,!0))return 0;let n=1/0;for(const o of t){const t=o[0],a=o[o.length-1];if(t!==a&&(n=Math.min(n,Qr(e,[a,t],r)),0===n))return n;const i=r.pointOnLine(o,e);if(n=Math.min(n,r.distance(e,i.point)),0===n)return n}return n}function on(e,t,r,n){if(!Wr(t,e.length))return NaN;for(let a=t[0];a<=t[1];++a)if(_r(e[a],r,!0))return 0;let o=1/0;for(let a=t[0];a<t[1];++a){const t=e[a],i=e[a+1];for(const e of r)for(let r=0,a=e.length,s=a-1;r<a;s=r++){const a=e[s],l=e[r];if(Cr(t,i,a,l))return 0;o=Math.min(o,en(t,i,a,l,n))}}return o}function an(e,t){for(const r of e)for(const e of r)if(_r(e,t,!0))return!0;return!1}function sn(e,t,r,n=1/0){const o=Xr(e),a=Xr(t);if(n!==1/0&&Yr(o,a,r)>=n)return n;if(kr(o,a)){if(an(e,t))return 0}else if(an(t,e))return 0;let i=1/0;for(const s of e)for(let e=0,n=s.length,o=n-1;e<n;o=e++){const n=s[o],a=s[e];for(const e of t)for(let t=0,o=e.length,s=o-1;t<o;s=t++){const o=e[s],l=e[t];if(Cr(n,a,o,l))return 0;i=Math.min(i,en(n,a,o,l,r))}}return i}function ln(e,t,r,n,o,a){if(!a)return;const i=Yr(Kr(n,a),o,r);i<t&&e.push([i,a,[0,0]])}function un(e,t,r,n,o,a,i){if(!a||!i)return;const s=Yr(Kr(n,a),Kr(o,i),r);s<t&&e.push([s,a,i])}function cn(e,t,r,n,o=1/0){let a=Math.min(n.distance(e[0],r[0][0]),o);if(0===a)return a;const i=new Nr([[0,[0,e.length-1],[0,0]]],Vr),s=Xr(r);for(;i.length>0;){const o=i.pop();if(o[0]>=a)continue;const l=o[1],u=t?50:100;if(Hr(l)<=u){if(!Wr(l,e.length))return NaN;if(t){const t=on(e,l,r,n);if(isNaN(t)||0===t)return t;a=Math.min(a,t)}else for(let t=l[0];t<=l[1];++t){const o=nn(e[t],r,n);if(a=Math.min(a,o),0===a)return 0}}else{const r=Zr(l,t);ln(i,a,n,e,s,r[0]),ln(i,a,n,e,s,r[1])}}return a}function pn(e,t,r,n,o,a=1/0){let i=Math.min(a,o.distance(e[0],r[0]));if(0===i)return i;const s=new Nr([[0,[0,e.length-1],[0,r.length-1]]],Vr);for(;s.length>0;){const a=s.pop();if(a[0]>=i)continue;const l=a[1],u=a[2],c=t?50:100,p=n?50:100;if(Hr(l)<=c&&Hr(u)<=p){if(!Wr(l,e.length)&&Wr(u,r.length))return NaN;let a;if(t&&n)a=tn(e,l,r,u,o),i=Math.min(i,a);else if(t&&!n){const t=e.slice(l[0],l[1]+1);for(let e=u[0];e<=u[1];++e)if(a=Qr(r[e],t,o),i=Math.min(i,a),0===i)return i}else if(!t&&n){const t=r.slice(u[0],u[1]+1);for(let r=l[0];r<=l[1];++r)if(a=Qr(e[r],t,o),i=Math.min(i,a),0===i)return i}else a=rn(e,l,r,u,o),i=Math.min(i,a)}else{const a=Zr(l,t),c=Zr(u,n);un(s,i,o,e,r,a[0],c[0]),un(s,i,o,e,r,a[0],c[1]),un(s,i,o,e,r,a[1],c[0]),un(s,i,o,e,r,a[1],c[1])}}return i}function hn(e,t){const r=e.geometry();if(0===r.length||0===r[0].length)return NaN;const n=function(e){if(e.length<=1)return[e];const t=[];let r,n;for(const o of e){const e=Dr(o);0!==e&&(o.area=Math.abs(e),void 0===n&&(n=e<0),n===e<0?(r&&t.push(r),r=[o]):r.push(o))}return r&&t.push(r),t}(r).map((t=>t.map((t=>t.map((t=>br([t.x,t.y],e.canonical))))))),o=new Gr(n[0][0][0][1]);let a=1/0;for(const i of t)for(const e of n){switch(i.type){case"Point":a=Math.min(a,cn([i.coordinates],!1,e,o,a));break;case"LineString":a=Math.min(a,cn(i.coordinates,!0,e,o,a));break;case"Polygon":a=Math.min(a,sn(e,i.coordinates,o,a))}if(0===a)return a}return a}function dn(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 fn{constructor(e,t){this.type=Se,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(_t(e[1])){const t=e[1];if("FeatureCollection"===t.type)return new fn(t,t.features.map((e=>dn(e.geometry))).flat());if("Feature"===t.type)return new fn(t,dn(t.geometry));if("type"in t&&"coordinates"in t)return new fn(t,dn(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){const r=e.geometry(),n=r.flat().map((t=>br([t.x,t.y],e.canonical)));if(0===r.length)return NaN;const o=new Gr(n[0][1]);let a=1/0;for(const i of t){switch(i.type){case"Point":a=Math.min(a,pn(n,!1,[i.coordinates],!1,o,a));break;case"LineString":a=Math.min(a,pn(n,!1,i.coordinates,!0,o,a));break;case"Polygon":a=Math.min(a,cn(n,!1,i.coordinates,o,a))}if(0===a)return a}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){const r=e.geometry(),n=r.flat().map((t=>br([t.x,t.y],e.canonical)));if(0===r.length)return NaN;const o=new Gr(n[0][1]);let a=1/0;for(const i of t){switch(i.type){case"Point":a=Math.min(a,pn(n,!0,[i.coordinates],!1,o,a));break;case"LineString":a=Math.min(a,pn(n,!0,i.coordinates,!0,o,a));break;case"Polygon":a=Math.min(a,cn(n,!0,i.coordinates,o,a))}if(0===a)return a}return a}(e,this.geometries);if("Polygon"===e.geometryType())return hn(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class mn{constructor(e){this.type=_e,this.key=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=e[1];return null==r?t.error("Global state property must be defined."):"str
1ing"!=typeof r?t.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new mn(r)}evaluate(e){var t;const r=null===(t=e.globals)||void 0===t?void 0:t.globalState;return r&&0!==Object.keys(r).length?at(r,this.key):null}eachChild(){}outputDefined(){return!1}}const yn={"==":ir,"!=":sr,">":ur,"<":lr,">=":pr,"<=":cr,array:zt,at:Ut,boolean:zt,case:Vt,coalesce:rr,collator:hr,format:fr,image:mr,in:Bt,"index-of":qt,interpolate:er,"interpolate-hcl":er,"interpolate-lab":er,length:yr,let:Nt,literal:It,match:Gt,number:zt,"number-format":dr,object:zt,slice:Ht,step:Zt,string:zt,"to-boolean":$t,"to-color":$t,"to-number":$t,"to-string":$t,var:Dt,within:Fr,distance:fn,"global-state":mn};class gn{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const r=e[0],n=gn.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,i=a.filter((([t])=>!Array.isArray(t)||t.length===e.length-1));let s=null;for(const[l,u]of i){s=new Ft(t.registry,Sn,t.path,null,t.scope);const n=[];let a=!1;for(let t=1;t<e.length;t++){const r=e[t],o=Array.isArray(l)?l[t-1]:l.type,i=s.parse(r,1+n.length,o);if(!i){a=!0;break}n.push(i)}if(!a){if(Array.isArray(l)&&l.length!==n.length){s.error(`Expected ${l.length} arguments, but found ${n.length} instead.`);continue}for(let e=0;e<n.length;e++){const t=Array.isArray(l)?l[e]:l.type,r=n[e];s.concat(e+1).checkSubtype(t,r.type)}if(0===s.errors.length)return new gn(r,o,u,n)}}if(1===i.length)t.errors.push(...s.errors);else{const r=(i.length?i:a).map((([e])=>{return t=e,Array.isArray(t)?`(${t.map(je).join(", ")})`:`(${je(t.type)}...)`;var t})).join(" | "),n=[];for(let o=1;o<e.length;o++){const r=t.parse(e[o],1+n.length);if(!r)return null;n.push(je(r.type))}t.error(`Expected arguments of type ${r}, but found (${n.join(", ")}) instead.`)}return null}static register(e,t){gn.definitions=t;for(const r in t)e[r]=gn}}function vn(e,[t,r,n,o]){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);const a=o?o.evaluate(e):1,i=Et(t,r,n,a);if(i)throw new St(i);return new ft(t/255,r/255,n/255,a,!1)}function bn(e,t){return e in t}function wn(e,t){const r=t[e];return typeof r>"u"?null:r}function xn(e){return{type:e}}function Sn(e){if(e instanceof Dt)return Sn(e.boundExpression);if(e instanceof gn&&"error"===e.name)return!1;if(e instanceof hr)return!1;if(e instanceof Fr)return!1;if(e instanceof fn)return!1;if(e instanceof mn)return!1;const t=e instanceof $t||e instanceof zt;let r=!0;return e.eachChild((e=>{r=t?r&&Sn(e):r&&e instanceof It})),!!r&&(kn(e)&&An(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]))}function kn(e){if(e instanceof gn){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Fr||e instanceof fn)return!1;let t=!0;return e.eachChild((e=>{t&&!kn(e)&&(t=!1)})),t}function Ln(e){if(e instanceof gn&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!Ln(e)&&(t=!1)})),t}function An(e,t){if(e instanceof gn&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild((e=>{r&&!An(e,t)&&(r=!1)})),r}function Cn(e){return{result:"success",value:e}}function En(e){return{result:"error",value:e}}function _n(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Tn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Mn(e){return!!e.expression&&e.expression.interpolated}function In(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Pn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&Tt(e)===Ee}gn.register(yn,{error:[{kind:"error"},[ke],(e,[t])=>{throw new St(t.evaluate(e))}],typeof:[ke,[_e],(e,[t])=>je(Tt(t.evaluate(e)))],"to-rgba":[Oe(Se,4),[Ae],(e,[t])=>{const[r,n,o,a]=t.evaluate(e).rgb;return[255*r,255*n,255*o,a]}],rgb:[Ae,[Se,Se,Se],vn],rgba:[Ae,[Se,Se,Se,Se],vn],has:{type:Le,overloads:[[[ke],(e,[t])=>bn(t.evaluate(e),e.properties())],[[ke,Ee],(e,[t,r])=>bn(t.evaluate(e),r.evaluate(e))]]},get:{type:_e,overloads:[[[ke],(e,[t])=>wn(t.evaluate(e),e.properties())],[[ke,Ee],(e,[t,r])=>wn(t.evaluate(e),r.evaluate(e))]]},"feature-state":[_e,[ke],(e,[t])=>wn(t.evaluate(e),e.featureState||{})],properties:[Ee,[],e=>e.properties()],"geometry-type":[ke,[],e=>e.geometryType()],id:[_e,[],e=>e.id()],zoom:[Se,[],e=>e.globals.zoom],"heatmap-density":[Se,[],e=>e.globals.heatmapDensity||0],elevation:[Se,[],e=>e.globals.elevation||0],"line-progress":[Se,[],e=>e.globals.lineProgress||0],accumulated:[_e,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[Se,xn(Se),(e,t)=>{let r=0;for(const n of t)r+=n.evaluate(e);return r}],"*":[Se,xn(Se),(e,t)=>{let r=1;for(const n of t)r*=n.evaluate(e);return r}],"-":{type:Se,overloads:[[[Se,Se],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[Se],(e,[t])=>-t.evaluate(e)]]},"/":[Se,[Se,Se],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[Se,[Se,Se],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[Se,[],()=>Math.LN2],pi:[Se,[],()=>Math.PI],e:[Se,[],()=>Math.E],"^":[Se,[Se,Se],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[Se,[Se],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[Se,[Se],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[Se,[Se],(e,[t])=>Math.log(t.evaluate(e))],log2:[Se,[Se],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[Se,[Se],(e,[t])=>Math.sin(t.evaluate(e))],cos:[Se,[Se],(e,[t])=>Math.cos(t.evaluate(e))],tan:[Se,[Se],(e,[t])=>Math.tan(t.evaluate(e))],asin:[Se,[Se],(e,[t])=>Math.asin(t.evaluate(e))],acos:[Se,[Se],(e,[t])=>Math.acos(t.evaluate(e))],atan:[Se,[Se],(e,[t])=>Math.atan(t.evaluate(e))],min:[Se,xn(Se),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[Se,xn(Se),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[Se,[Se],(e,[t])=>Math.abs(t.evaluate(e))],round:[Se,[Se],(e,[t])=>{const r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Se,[Se],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[Se,[Se],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[Le,[ke,_e],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[Le,[_e],(e,[t])=>e.id()===t.value],"filter-type-==":[Le,[ke],(e,[t])=>e.geometryType()===t.value],"filter-<":[Le,[ke,_e],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n<o}],"filter-id-<":[Le,[_e],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r<n}],"filter->":[Le,[ke,_e],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>o}],"filter-id->":[Le,[_e],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[Le,[ke,_e],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Le,[_e],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[Le,[ke,_e],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[Le,[_e],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[Le,[_e],(e,[t])=>t.value in e.properties()],"filter-has-id":[Le,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[Le,[Oe(ke)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[Le,[Oe(_e)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[Le,[ke,Oe(_e)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[Le,[ke,Oe(_e)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){const o=r+n>>1;if(t[o]===e)return!0;t[o]>e?n=o-1:r=o+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:Le,overloads:[[[Le,Le],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[xn(Le),(e,t)=>{for(const r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:Le,overloads:[[[Le,Le],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[xn(Le),(e,t)=>{for(const r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[Le,[Le],(e,[t])=>!t.evaluate(e)],"is-supported-script":[Le,[ke],(e,[t])=>{const r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ke,[ke],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ke,[ke],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ke,xn(_e),(e,t)=>t.map((t=>Mt(t.evaluate(e)))).join("")],"resolved-locale":[ke,[Te],(e,[t])=>t.evaluate(e).resolvedLocale()]});class zn{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new jt,this._defaultValue=t?function(e){if("color"===e.type&&Pn(e.default))return new ft(0,0,0,0);switch(e.type){case"color":return ft.parse(e.default)||null;case"padding":return bt.parse(e.default)||null;case"numberArray":return wt.parse(e.default)||null;case"colorArray":return xt.parse(e.default)||null;case"variableAnchorOffsetCollection":return Lt.parse(e.default)||null;case"projectionDefinition":return Ct.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,n,o,a){return this._globalState&&(e=Un(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,o,a){this._globalState&&(e=Un(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new St(`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(i){return this._warningHistory[i.message]||(this._warningHistory[i.message]=!0,typeof console<"u"&&console.warn(i.message)),this._defaultValue}}}function Rn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in yn}function $n(e,t,r){const n=new Ft(yn,Sn,[],t?function(e){const t={color:Ae,string:ke,number:Se,enum:ke,boolean:Le,formatted:Me,padding:Ie,numberArray:ze,colorArray:Pe,projectionDefinition:Ce,resolvedImage:Re,variableAnchorOffsetCollection:$e};return"array"===e.type?Oe(t[e.value]||_e,e.length):t[e.type]}(t):void 0),o=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return o?Cn(new zn(o,t,r)):En(n.errors)}class On{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Ln(t.expression),this.globalStateRefs=Dn(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,n,o,a){return this._globalState&&(e=Un(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,a)}evaluate(e,t,r,n,o,a){return this._globalState&&(e=Un(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,o,a)}}class jn{constructor(e,t,r,n,o){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Ln(t.expression),this.globalStateRefs=Dn(t.expression),this.interpolationType=n,this._globalState=o}evaluateWithoutErrorHandling(e,t,r,n,o,a){return this._globalState&&(e=Un(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,a)}evaluate(e,t,r,n,o,a){return this._globalState&&(e=Un(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,o,a)}interpolationFactor(e,t,r){return this.interpolationType?er.interpolationFactor(this.interpolationType,e,t,r):0}}function Fn(e,t,r){const n=$n(e,t,r);if("error"===n.result)return n;const o=n.value.expression,a=kn(o);if(!a&&!_n(t))return En([new be("","data expressions not supported")]);const i=An(o,["zoom"]);if(!i&&!Tn(t))return En([new be("","zoom expressions not supported")]);const s=Nn(o);if(!s&&!i)return En([new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof be)return En([s]);if(s instanceof er&&!Mn(t))return En([new be("",'"interpolate" expressions cannot be used with this property')]);if(!s)return Cn(new On(a?"constant":"source",n.value,r));const l=s instanceof er?s.interpolation:void 0;return Cn(new jn(a?"camera":"composite",n.value,s.labels,l,r))}function Nn(e){let t=null;if(e instanceof Nt)t=Nn(e.result);else if(e instanceof rr){for(const r of e.args)if(t=Nn(r),t)break}else(e instanceof Zt||e instanceof er)&&e.input instanceof gn&&"zoom"===e.input.name&&(t=e);return t instanceof be||e.eachChild((e=>{const r=Nn(e);r instanceof be?t=r:!t&&r?t=new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function Dn(e,t=new Set){return e instanceof mn&&t.add(e.key),e.eachChild((e=>{Dn(e,t)})),t}function Un(e,t){const{zoom:r,heatmapDensity:n,elevation:o,lineProgress:a,isSupportedScript:i,accumulated:s}=e??{};return{zoom:r,heatmapDensity:n,elevation:o,lineProgress:a,isSupportedScript:i,accumulated:s,globalState:t}}function Bn(e){if(!0===e||!1===e)return!0;
vendor: 8,108 bytes, line 1
1if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!Bn(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}function qn(e){const t=e.key,r=e.value;return r?[new ge(t,r,"constants have been deprecated as of v8")]:[]}function Gn(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Vn(e){if(Array.isArray(e))return e.map(Vn);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const r in e)t[r]=Vn(e[r]);return t}return Gn(e)}function Hn(e){const t=e.key,r=e.value,n=e.valueSpec||{},o=e.objectElementValidators||{},a=e.style,i=e.styleSpec,s=e.validateSpec;let l=[];const u=In(r);if("object"!==u)return[new ge(t,r,`object expected, ${u} found`)];for(const c in r){const e=c.split(".")[0],u=at(n,e)||n["*"];let p;if(at(o,e))p=o[e];else if(at(n,e)){if(void 0===r[c])continue;p=s}else if(o["*"])p=o["*"];else{if(!n["*"]){l.push(new ge(t,r[c],`unknown property "${c}"`));continue}p=s}l=l.concat(p({key:(t&&`${t}.`)+c,value:r[c],valueSpec:u,style:a,styleSpec:i,object:r,objectKey:c,validateSpec:s},r))}for(const c in n)o[c]||n[c].required&&void 0===n[c].default&&void 0===r[c]&&l.push(new ge(t,r,`missing required property "${c}"`));return l}function Wn(e){const t=e.value,r=e.valueSpec,n=e.validateSpec,o=e.style,a=e.styleSpec,i=e.key,s=e.arrayElementValidator||n;if("array"!==In(t))return[new ge(i,t,`array expected, ${In(t)} found`)];if(r.length&&t.length!==r.length)return[new ge(i,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),"object"===In(r.value)&&(l=r.value);let u=[];for(let c=0;c<t.length;c++)u=u.concat(s({array:t,arrayIndex:c,value:t[c],valueSpec:l,validateSpec:e.validateSpec,style:o,styleSpec:a,key:`${i}[${c}]`}));return u}function Zn(e){const t=e.key,r=e.value,n=e.valueSpec;let o=In(r);return"number"===o&&r!=r&&(o="NaN"),"number"!==o?[new ge(t,r,`number expected, ${o} found`)]:"minimum"in n&&r<n.minimum?[new ge(t,r,`${r} is less than the minimum value ${n.minimum}`)]:"maximum"in n&&r>n.maximum?[new ge(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]}function Kn(e){const t=e.valueSpec,r=Gn(e.value.type);let n,o,a,i={};const s="categorical"!==r&&void 0===e.value.property,l=!s,u="array"===In(e.value.stops)&&"array"===In(e.value.stops[0])&&"object"===In(e.value.stops[0][0]),c=Hn({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 ge(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const n=e.value;return t=t.concat(Wn({key:e.key,value:n,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:p})),"array"===In(n)&&0===n.length&&t.push(new ge(e.key,n,"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&&s&&c.push(new ge(e.key,e.value,'missing required property "property"')),"identity"!==r&&!e.value.stops&&c.push(new ge(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!Mn(e.valueSpec)&&c.push(new ge(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!_n(e.valueSpec)?c.push(new ge(e.key,e.value,"property functions not supported")):s&&!Tn(e.valueSpec)&&c.push(new ge(e.key,e.value,"zoom functions not supported"))),("categorical"===r||u)&&void 0===e.value.property&&c.push(new ge(e.key,e.value,'"property" property is required')),c;function p(e){let r=[];const n=e.value,s=e.key;if("array"!==In(n))return[new ge(s,n,`array expected, ${In(n)} found`)];if(2!==n.length)return[new ge(s,n,`array length 2 expected, length ${n.length} found`)];if(u){if("object"!==In(n[0]))return[new ge(s,n,`object expected, ${In(n[0])} found`)];if(void 0===n[0].zoom)return[new ge(s,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new ge(s,n,"object stop key must have value")];if(a&&a>Gn(n[0].zoom))return[new ge(s,n[0].zoom,"stop zoom values must appear in ascending order")];Gn(n[0].zoom)!==a&&(a=Gn(n[0].zoom),o=void 0,i={}),r=r.concat(Hn({key:`${s}[0]`,value:n[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Zn,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:n[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},n));return Rn(Vn(n[1]))?r.concat([new ge(`${s}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:n[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,a){const s=In(e.value),l=Gn(e.value),u=null!==e.value?e.value:a;if(n){if(s!==n)return[new ge(e.key,u,`${s} stop domain type must match previous stop domain type ${n}`)]}else n=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new ge(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let n=`number expected, ${s} found`;return _n(t)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ge(e.key,u,n)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==o&&l<o?[new ge(e.key,u,"stop domain values must appear in ascending order")]:(o=l,"categorical"===r&&l in i?[new ge(e.key,u,"stop domain values must be unique")]:(i[l]=!0,[])):[new ge(e.key,u,`integer expected, found ${l}`)]}}function Xn(e){const t=("property"===e.expressionContext?Fn:$n)(Vn(e.value),e.valueSpec);if("error"===t.result)return t.value.map((t=>new ge(`${e.key}${t.key}`,e.value,t.message)));const r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new ge(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&&!Ln(r))return[new ge(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!Ln(r))return[new ge(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!An(r,["zoom","feature-state"]))return[new ge(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!kn(r))return[new ge(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Jn(e){const t=e.key,r=e.value,n=In(r);return"string"!==n?[new ge(t,r,`color expected, ${n} found`)]:ft.parse(String(r))?[]:[new ge(t,r,`color expected, "${r}" found`)]}function Yn(e){const t=e.key,r=e.value,n=e.valueSpec,o=[];return Array.isArray(n.values)?-1===n.values.indexOf(Gn(r))&&o.push(new ge(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Gn(r))&&o.push(new ge(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),o}function Qn(e){return Bn(Vn(e.value))?Xn(ve({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):eo(e)}function eo(e){const t=e.value,r=e.key;if("array"!==In(t))return[new ge(r,t,`array expected, ${In(t)} found`)];const n=e.styleSpec;let o,a=[];if(t.length<1)return[new ge(r,t,"filter array must have at least 1 element")];
1switch(a=a.concat(Yn({key:`${r}[0]`,value:t[0],valueSpec:n.filter_operator,style:e.style,styleSpec:e.styleSpec})),Gn(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===Gn(t[1])&&a.push(new ge(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&a.push(new ge(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(o=In(t[1]),"string"!==o&&a.push(new ge(`${r}[1]`,t[1],`string expected, ${o} found`)));for(let i=2;i<t.length;i++)o=In(t[i]),"$type"===Gn(t[1])?a=a.concat(Yn({key:`${r}[${i}]`,value:t[i],valueSpec:n.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&a.push(new ge(`${r}[${i}]`,t[i],`string, number, or boolean expected, ${o} found`));break;case"any":case"all":case"none":for(let n=1;n<t.length;n++)a=a.concat(eo({key:`${r}[${n}]`,value:t[n],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":o=In(t[1]),2!==t.length?a.push(new ge(r,t,`filter array for "${t[0]}" operator must have 2 elements`)):"string"!==o&&a.push(new ge(`${r}[1]`,t[1],`string expected, ${o} found`))}return a}function to(e,t){const r=e.key,n=e.validateSpec,o=e.style,a=e.styleSpec,i=e.value,s=e.objectKey,l=a[`${t}_${e.layerType}`];if(!l)return[];const u=s.match(/^(.*)-transition$/);if("paint"===t&&u&&l[u[1]]&&l[u[1]].transition)return n({key:r,value:i,valueSpec:a.transition,style:o,styleSpec:a});const c=e.valueSpec||l[s];if(!c)return[new ge(r,i,`unknown property "${s}"`)];let p;if("string"===In(i)&&_n(c)&&!c.tokens&&(p=/^{([^}]+)}$/.exec(i)))return[new ge(r,i,`"${s}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];const h=[];return"symbol"===e.layerType&&"text-font"===s&&Pn(Vn(i))&&"identity"===Gn(i.type)&&h.push(new ge(r,i,'"text-font" does not support identity functions')),h.concat(n({key:e.key,value:i,valueSpec:c,style:o,styleSpec:a,expressionContext:"property",propertyType:t,propertyKey:s}))}function ro(e){return to(e,"paint")}function no(e){return to(e,"layout")}function oo(e){let t=[];const r=e.value,n=e.key,o=e.style,a=e.styleSpec;if("object"!==In(r))return[new ge(n,r,`object expected, ${In(r)} found`)];!r.type&&!r.ref&&t.push(new ge(n,r,'either "type" or "ref" is required'));let i=Gn(r.type);const s=Gn(r.ref);if(r.id){const a=Gn(r.id);for(let i=0;i<e.arrayIndex;i++){const e=o.layers[i];Gn(e.id)===a&&t.push(new ge(n,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 ge(n,r[e],`"${e}" is prohibited for ref layers`))})),o.layers.forEach((t=>{Gn(t.id)===s&&(e=t)})),e?e.ref?t.push(new ge(n,r.ref,"ref cannot reference another ref layer")):i=Gn(e.type):t.push(new ge(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==i)if(r.source){const e=o.sources&&o.sources[r.source],a=e&&Gn(e.type);e?"vector"===a&&"raster"===i?t.push(new ge(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===i||"raster-dem"!==a&&"color-relief"===i?t.push(new ge(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==i?t.push(new ge(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==i&&"color-relief"!==i?t.push(new ge(n,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===i&&r.paint&&r.paint["line-gradient"]&&("geojson"!==a||!e.lineMetrics)&&t.push(new ge(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ge(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ge(n,r.source,`source "${r.source}" not found`))}else t.push(new ge(n,r,'missing required property "source"'));return t=t.concat(Hn({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"})},filter:Qn,layout(e){return Hn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(e){return no(ve({layerType:i},e))}}})},paint(e){return Hn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(e){return ro(ve({layerType:i},e))}}})}}})),t}function ao(e){const t=e.value,r=e.key,n=In(t);return"string"!==n?[new ge(r,t,`string expected, ${n} found`)]:[]}const io={promoteId:function({key:e,value:t}
vendor: 2,301 bytes, line 1
1){if("string"===In(t))return ao({key:e,value:t});{const r=[];for(const n in t)r.push(...ao({key:`${e}.${n}`,value:t[n]}));return r}}};function so(e){const t=e.value,r=e.key,n=e.styleSpec,o=e.style,a=e.validateSpec;if(!t.type)return[new ge(r,t,'"type" is required')];const i=Gn(t.type);let s;switch(i){case"vector":case"raster":return s=Hn({key:r,value:t,valueSpec:n[`source_${i.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:io,validateSpec:a}),s;case"raster-dem":return s=function(e){var t;const r=null!==(t=e.sourceName)&&void 0!==t?t:"",n=e.value,o=e.styleSpec,a=o.source_raster_dem,i=e.style;let s=[];const l=In(n);if(void 0===n)return s;if("object"!==l)return s.push(new ge("source_raster_dem",n,`object expected, ${l} found`)),s;const u="custom"===Gn(n.encoding),c=["redFactor","greenFactor","blueFactor","baseShift"],p=e.value.encoding?`"${e.value.encoding}"`:"Default";for(const h in n)!u&&c.includes(h)?s.push(new ge(h,n[h],`In "${r}": "${h}" is only valid when "encoding" is set to "custom". ${p} encoding found`)):a[h]?s=s.concat(e.validateSpec({key:h,value:n[h],valueSpec:a[h],validateSpec:e.validateSpec,style:i,styleSpec:o})):s.push(new ge(h,n[h],`unknown property "${h}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a}),s;case"geojson":if(s=Hn({key:r,value:t,valueSpec:n.source_geojson,style:o,styleSpec:n,validateSpec:a,objectElementValidators:io}),t.cluster)for(const e in t.clusterProperties){const[n,o]=t.clusterProperties[e],a="string"==typeof n?[n,["accumulated"],["get",e]]:n;s.push(...Xn({key:`${r}.${e}.map`,value:o,expressionContext:"cluster-map"})),s.push(...Xn({key:`${r}.${e}.reduce`,value:a,expressionContext:"cluster-reduce"}))}return s;case"video":return Hn({key:r,value:t,valueSpec:n.source_video,style:o,validateSpec:a,styleSpec:n});case"image":return Hn({key:r,value:t,valueSpec:n.source_image,style:o,validateSpec:a,styleSpec:n});case"canvas":return[new ge(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yn({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function lo(e){const t=e.value,r=e.styleSpec,n=r.light,o=e.style;let a=[];const i=In(t);if(void 0===t)return a;
1if("object"!==i)return a=a.concat([new ge("light",t,`object expected, ${i} found`)]),a;for(const s in t){const i=s.match(/^(.*)-transition$/);a=i&&n[i[1]]&&n[i[1]].transition?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,validateSpec:e.validateSpec,style:o,styleSpec:r})):n[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],validateSpec:e.validateSpec,style:o,styleSpec:r})):a.concat([new ge(s,t[s],`unknown property "${s}"`)])}return a}function uo(e){const t=e.value,r=e.styleSpec,n=r.sky,o=e.style,a=In(t);if(void 0===t)return[];if("object"!==a)return[new ge("sky",t,`object expected, ${a} found`)];let i=[];for(const s in t)i=n[s]?i.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],style:o,styleSpec:r})):i.concat([new ge(s,t[s],`unknown property "${s}"`)]);return i}function co(e){const t=e.value,r=e.styleSpec,n=r.terrain,o=e.style;let a=[];const i=In(t);if(void 0===t)return a;if("object"!==i)return a=a.concat([new ge("terrain",t,`object expected, ${i} found`)]),a;for(const s in t)a=n[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],validateSpec:e.validateSpec,style:o,styleSpec:r})):a.concat([new ge(s,t[s],`unknown property "${s}"`)]);return a}function po(e){let t=[];const r=e.value,n=e.key;if(Array.isArray(r)){const o=[],a=[];for(const i in r){r[i].id&&o.includes(r[i].id)&&t.push(new ge(n,r,`all the sprites' ids must be unique, but ${r[i].id} is duplicated`)),o.push(r[i].id),r[i].url&&a.includes(r[i].url)&&t.push(new ge(n,r,`all the sprites' URLs must be unique, but ${r[i].url} is duplicated`)),a.push(r[i].url);const s={id:{type:"string",required:!0},url:{type:"string",required:!0}};t=t.concat(Hn({key:`${n}[${i}]`,value:r[i],valueSpec:s,validateSpec:e.validateSpec}))}return t}return ao({key:n,value:r})}function ho(e){return!!e&&e.constructor===Object}function fo(e){return ho(e.value)?[]:[new ge(e.key,e.value,`object expected, ${In(e.value)} found`)]}const mo={"*"(){return[]},array:Wn,boolean:function(e){const t=e.value,r=e.key,n=In(t);return"boolean"!==n?[new ge(r,t,`boolean expected, ${n} found`)]:[]},number:Zn,color:Jn,constants:qn,enum:Yn,filter:Qn,function:Kn,layer:oo,object:Hn,source:so,light:lo,sky:uo,terrain:co,projection:function(e){const t=e.value,r=e.styleSpec,n=r.projection,o=e.style,a=In(t);if(void 0===t)return[];if("object"!==a)return[new ge("projection",t,`object expected, ${a} found`)];let i=[];for(const s in t)i=n[s]?i.concat(e.validateSpec({key:s,value:t[s],valueSpec:n[s],style:o,styleSpec:r})):i.concat([new ge(s,t[s],`unknown property "${s}"`)]);return i},projectionDefinition:function(e){const t=e.key;let r=e.value;r=r instanceof String?r.valueOf():r;const n=In(r);return"array"!==n||function(e){return Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]}(r)||function(e){return!!["interpolate","step","literal"].includes(e[0])}(r)?["array","string"].includes(n)?[]:[new ge(t,r,`projection expected, invalid type "${n}" found`)]:[new ge(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:ao,formatted:function(e){return 0===ao(e).length?[]:Xn(e)},resolvedImage:function(e){return 0===ao(e).length?[]:Xn(e)},padding:function(e){const t=e.key,r=e.value;if("array"===In(r)){if(r.length<1||r.length>4)return[new ge(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const n={type:"number"};let o=[];for(let a=0;a<r.length;a++)o=o.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return o}return Zn({key:t,value:r,valueSpec:{}})},numberArray:function(e){const t=e.key,r=e.value;if("array"===In(r)){const n={type:"number"};if(r.length<1)return[new ge(t,r,"array length at least 1 expected, length 0 found")];let o=[];for(let a=0;a<r.length;a++)o=o.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return o}return Zn({key:t,value:r,valueSpec:{}})},colorArray:function(e){const t=e.key,r=e.value;if("array"===In(r)){if(r.length<1)return[new ge(t,r,"array length at least 1 expected, length 0 found")];let e=[];for(let n=0;n<r.length;n++)e=e.concat(Jn({key:`${t}[${n}]`,value:r[n]}));return e}return Jn({key:t,value:r})},variableAnchorOffsetCollection:function(e){const t=e.key,r=e.value,n=In(r),o=e.styleSpec;if("array"!==n||r.length<1||r.length%2!=0)return[new ge(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let a=[];for(let i=0;i<r.length;
1i+=2)a=a.concat(Yn({key:`${t}[${i}]`,value:r[i],valueSpec:o.layout_symbol["text-anchor"]})),a=a.concat(Wn({key:`${t}[${i+1}]`,value:r[i+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:o}));return a},sprite:po,state:fo,fontFaces:function(e){const t=e.key,r=e.value,n=e.validateSpec,o=e.styleSpec,a=e.style;if(!ho(r))return[new ge(t,r,`object expected, ${In(r)} found`)];const i=[];for(const s in r){const e=r[s],l=In(e);if("string"===l)i.push(...ao({key:`${t}.${s}`,value:e}));else if("array"===l){const r={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(const[l,u]of e.entries())i.push(...Hn({key:`${t}.${s}[${l}]`,value:u,valueSpec:r,styleSpec:o,style:a,validateSpec:n}))}else i.push(new ge(`${t}.${s}`,e,`string or array expected, ${l} found`))}return i}};function yo(e){const t=e.value,r=e.valueSpec,n=e.styleSpec;return e.validateSpec=yo,r.expression&&Pn(Gn(t))?Kn(e):r.expression&&Rn(Vn(t))?Xn(e):r.type&&mo[r.type]?mo[r.type](e):Hn(ve({},e,{valueSpec:r.type?n[r.type]:r}))}function go(e){const t=e.value,r=e.key,n=ao(e);return n.length||(-1===t.indexOf("{fontstack}")&&n.push(new ge(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&n.push(new ge(r,t,'"glyphs" url must include a "{range}" token'))),n}function vo(e,t=ye){let r=[];return r=r.concat(yo({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:yo,objectElementValidators:{glyphs:go,"*"(){return[]}}})),e.constants&&(r=r.concat(qn({key:"constants",value:e.constants}))),wo(r)}function bo(e){return function(t){return e(Object.assign({},t,{validateSpec:yo}))}}function wo(e){return[].concat(e).sort(((e,t)=>e.line-t.line))}function xo(e){return function(...t){return wo(e.apply(this,t))}}function So(e){if(!e)return{style:i.Gj[i.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0};if("string"==typeof e){const t=function(e){try{const t=JSON.parse(e),r=vo(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:i.Gj[i.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}:e.startsWith("http")?{style:e,requiresUrlMonitoring:!0,isFallback:!1}:e.toLowerCase().includes(".json")?{style:ko(e),requiresUrlMonitoring:!0,isFallback:!1}:{style:(0,i.ub)(e),requiresUrlMonitoring:!0,isFallback:!1}}return e instanceof i.Hu?{style:e.getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:e instanceof i.rF?{style:e.getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!1}:0===vo(e).length?{style:e,requiresUrlMonitoring:!1,isFallback:!1,isJSON:!0}:{style:i.Gj[i.N0[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),requiresUrlMonitoring:!1,isFallback:!0}}function ko(e){try{return new URL(e).href}catch{}return new URL(e,location.origin).href}function Lo(e,t,r){const n=window.document.createElement(e);return void 0!==t&&(n.className=t),r&&r.appendChild(n),n}function Ao(e){e.parentNode&&e.parentNode.removeChild(e)}vo.source=xo(bo(so)),vo.sprite=xo(bo(po)),vo.glyphs=xo(bo(go)),vo.light=xo(bo(lo)),vo.sky=xo(bo(uo)),vo.terrain=xo(bo(co)),vo.state=xo(bo(fo)),vo.layer=xo(bo(oo)),vo.filter=xo(bo(Qn)),vo.paintProperty=xo(bo(ro)),vo.layoutProperty=xo(bo(no));class Co{constructor(){c(this,"_map"),c(this,"_container"),c(this,"_terrainButton"),function(e,t){for(const r of e)"function"==typeof t[r]&&(t[r]=t[r].bind(t))}(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(e){return this._map=e,this._container=Lo("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=Lo("button","maplibregl-ctrl-terrain",this._container),Lo("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(){Ao(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){Eo(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 Eo(e){e.hasTerrain()?e.disableTerrain():e.enableTerrain()}class _o extends C{constructor(e={}){super({showCompass:e.showCompass??!0,showZoom:e.showZoom??!0,visualizePitch:e.visualizePitch??!0}),c(this,"_rotateCompassArrow",(()=>{const e=this._map.getBearing(),t=this._map.getPitch(),r=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.cos(t*(Math.PI/180)
1)**.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){const r=super._createButton(e,t);return r.clickFunction=t,r}}const To=n.Marker,Mo=n.LngLat,Io=n.LngLatBounds;class Po extends E{constructor(){super(...arguments),c(this,"lastUpdatedCenter",new Mo(0,0)),c(this,"_updateCamera",(e=>{var t;const r=new Mo(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,o={bearing:this._map.getBearing(),...this.options.fitBoundsOptions,linear:!0},a=this._map.getZoom();a>((null==(t=this.options.fitBoundsOptions)?void 0:t.maxZoom)??30)&&(o.zoom=a),this._map.fitBounds(Io.fromLngLat(r,n),o,{geolocateSource:!0});let i=!1;const s=()=>{i=!0};this._map.once("click",s),this._map.once("dblclick",s),this._map.once("dragstart",s),this._map.once("mousedown",s),this._map.once("touchstart",s),this._map.once("wheel",s),this._map.once("moveend",(()=>{this._map.off("click",s),this._map.off("dblclick",s),this._map.off("dragstart",s),this._map.off("mousedown",s),this._map.off("touchstart",s),this._map.off("wheel",s),!i&&(this.lastUpdatedCenter=this._map.getCenter())}))})),c(this,"_finishSetupUI",(e=>{if(this._map){if(!1===e){const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{const 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=Lo("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new To({element:this._dotElement}),this._circleElement=Lo("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new To({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=>{const 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")))}))}})),c(this,"_onZoom",(()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}))}_updateCircleRadius(){if("BACKGROUND"!==this._watchState&&"ACTIVE_LOCK"!==this._watchState)return;const e=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],t=this._map.project(e),r=this._map.unproject([t.x,t.y]),n=this._map.unproject([t.x+20,t.y]),o=r.distanceTo(n)/20,a=Math.ceil(2*this._accuracy/o);this._circleElement.style.width=`${a}px`,this._circleElement.style.height=`${a}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;
1case"ACTIVE_ERROR":case"BACKGROUND_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}}var zo,Ro,$o,Oo,jo;class Fo{constructor(e,t,r){if(d(this,zo),d(this,Ro),d(this,$o),d(this,Oo),d(this,jo),"string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`No element has been found with selector "${e}" when creating an external control.`);f(this,Ro,t)}else f(this,Ro,e);t&&f(this,$o,(e=>{t(h(this,zo),h(this,Ro),e)})),r&&f(this,Oo,(e=>{r(h(this,zo),h(this,Ro),e)})),f(this,jo,h(this,Ro).parentElement)}onAdd(e){return f(this,zo,e),h(this,$o)&&h(this,Ro).addEventListener("click",h(this,$o)),h(this,Oo)&&h(this,zo).on("render",h(this,Oo)),Ao(h(this,Ro)),h(this,Ro)}onRemove(){h(this,$o)&&h(this,Ro).removeEventListener("click",h(this,$o)),h(this,Oo)&&h(this,zo).off("render",h(this,Oo)),h(this,jo)?h(this,jo).appendChild(h(this,Ro)):Ao(h(this,Ro))}}zo=new WeakMap,Ro=new WeakMap,$o=new WeakMap,Oo=new WeakMap,jo=new WeakMap;class No{constructor(){c(this,"map"),c(this,"container"),c(this,"projectionButton")}onAdd(e){return this.map=e,this.container=Lo("div","maplibregl-ctrl maplibregl-ctrl-group"),this.projectionButton=Lo("button","maplibregl-ctrl-projection",this.container),Lo("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(){Ao(this.container),this.map.off("projectiontransition",this.updateProjectionIcon),this.map=void 0}toggleProjection(){Do(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 Do(e){void 0===e.getProjection()&&e.setProjection({type:"mercator"}),e.isGlobeProjection()?e.setProjection("mercator",{persist:!0}):e.setProjection("globe",{persist:!0})}const Uo={"zoom-in":e=>e.zoomIn(),"zoom-out":e=>e.zoomOut(),"toggle-projection":Do,"toggle-terrain":Eo,"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)}};var Bo,qo,Go,Vo,Ho,Wo,Zo,Ko,Xo,Jo,Yo,Qo;class ea extends Fo{constructor(e,t){if(t&&!(t in Uo))throw new Error(`data-maptiler-control value "${t}" is invalid.`);super(e,t&&Uo[t]),d(this,Bo),d(this,qo,new Map)}onAdd(e){return f(this,Bo,e),super.onAdd(e)}onRemove(){for(const[e,t]of h(this,qo)){const r=e.deref();r&&r.removeEventListener("click",t)}h(this,qo).clear(),super.onRemove()}configureGroupItem(e,t){if(!t)return;if(!(t in Uo))throw new Error(`data-maptiler-control value "${t}" is invalid.`);const r=r=>{Uo[t](h(this,Bo),e,r)};e.addEventListener("click",r),h(this,qo).set(new WeakRef(e),r)}}Bo=new WeakMap,qo=new WeakMap,c(ea,"controlCallbacks",Uo);class ta{constructor(e,t){d(this,Xo),d(this,Go),c(this,"map"),d(this,Vo),d(this,Ho),d(this,Wo),d(this,Zo,!1),d(this,Ko),void 0!==e.style&&f(this,Zo,!0),f(this,Go,{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,Go).minZoom=e.lockZoom,h(this,Go).maxZoom=e.lockZoom)}setStyle(e,t){h(this,Zo)||this.map.setStyle(e,t),m(this,Xo,Yo).call(this)}addLayer(e,t){return h(this,Zo)||this.map.addLayer(e,t),m(this,Xo,Yo).call(this),this.map}moveLayer(e,t){return h(this,Zo)||this.map.moveLayer(e,t),m(this,Xo,Yo).call(this),this.map}removeLayer(e){return h(this,Zo)||this.map.removeLayer(e),m(this,Xo,Yo).call(this),this}
vendor: 4,380 bytes, line 1
1setLayerZoomRange(e,t,r){return h(this,Zo)||this.map.setLayerZoomRange(e,t,r),m(this,Xo,Yo).call(this),this}setFilter(e,t,r){return h(this,Zo)||this.map.setFilter(e,t,r),m(this,Xo,Yo).call(this),this}setPaintProperty(e,t,r,n){return h(this,Zo)||this.map.setPaintProperty(e,t,r,n),m(this,Xo,Yo).call(this),this}setLayoutProperty(e,t,r,n){return h(this,Zo)||this.map.setLayoutProperty(e,t,r,n),m(this,Xo,Yo).call(this),this}setGlyphs(e,t){return h(this,Zo)||this.map.setGlyphs(e,t),m(this,Xo,Yo).call(this),this}onAdd(e){f(this,Vo,e),f(this,Ho,Lo("div","maplibregl-ctrl maplibregl-ctrl-group"));for(const[t,r]of Object.entries(h(this,Go).containerStyle))h(this,Ho).style.setProperty(t,r);return h(this,Go).container=h(this,Ho),h(this,Go).zoom=e.getZoom()+h(this,Go).zoomAdjust,this.map=new ii(h(this,Go)),this.map.once("style.load",(()=>{this.map.resize()})),this.map.once("load",(()=>{m(this,Xo,Jo).call(this,h(this,Go).parentRect),f(this,Ko,m(this,Xo,Qo).call(this))})),h(this,Ho)}onRemove(){var e;null==(e=h(this,Ko))||e.call(this),Ao(h(this,Ho))}}Go=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Wo=new WeakMap,Zo=new WeakMap,Ko=new WeakMap,Xo=new WeakSet,Jo=function(e){void 0===e||void 0===e.linePaint&&void 0===e.fillPaint||(f(this,Wo,{type:"Feature",properties:{name:"parentRect"},geometry:{type:"Polygon",coordinates:[[[],[],[],[],[]]]}}),this.map.addSource("parentRect",{type:"geojson",data:h(this,Wo)}),(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",source:"parentRect",layout:{},paint:{"fill-color":"#08F","fill-opacity":.135,...e.fillPaint}}),m(this,Xo,Yo).call(this))},Yo=function(){if(void 0===h(this,Wo))return;const{devicePixelRatio:e}=window,t=h(this,Vo).getCanvas(),r=t.width/e,n=t.height/e,o=h(this,Vo).unproject.bind(h(this,Vo)),a=o([0,0]),i=o([r,0]),s=o([0,n]),l=o([r,n]);h(this,Wo).geometry.coordinates=[[s.toArray(),l.toArray(),i.toArray(),a.toArray(),s.toArray()]];const u=this.map.getSource("parentRect");void 0!==u&&u.setData(h(this,Wo))},Qo=function(){const{pitchAdjust:e}=h(this,Go),t=()=>{a("parent")},r=()=>{a("minimap")},n=()=>{h(this,Vo).on("move",t),this.map.on("move",r)},o=()=>{h(this,Vo).off("move",t),this.map.off("move",r)},a=t=>{o();const r="parent"===t?h(this,Vo):this.map,a="parent"===t?this.map:h(this,Vo),i=r.getCenter(),s=r.getZoom()+h(this,Go).zoomAdjust*("parent"===t?1:-1),l=r.getBearing(),u=r.getPitch();a.jumpTo({center:i,zoom:s,bearing:l,pitch:e?u:0}),m(this,Xo,Yo).call(this),n()};return n(),()=>{o()}};class ra{constructor(e,t=2e3){c(this,"map"),c(this,"registeredModules",new Set),c(this,"viewerType"),this.map=e,this.viewerType="Map",setTimeout((async()=>{if(!H.telemetry)return;const e=this.preparePayload();try{(await fetch(e,{method:"POST"})).ok||console.warn("The metrics could not be sent to MapTiler Cloud")}catch(t){console.warn("The metrics could not be sent to MapTiler Cloud",t)}}),Math.max(1e3,t))}registerModule(e,t){this.registeredModules.add(`${e}:${t}`)}registerViewerType(e="Map"){this.viewerType=e}preparePayload(){const e=new URL(q.telemetryURL);return e.searchParams.append("sdk","3.11.0"),e.searchParams.append("key",H.apiKey),e.searchParams.append("mtsid",G),e.searchParams.append("session",H.session?"1":"0"),e.searchParams.append("caching",H.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 na=typeof Float32Array<"u"?Float32Array:Array;function oa(){var e=new na(16);return na!=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 aa(e,t,r){var n=Math.sin(r),o=Math.cos(r),a=t[4],i=t[5],s=t[6],l=t[7],u=t[8],c=t[9],p=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]=a*o+u*n,e[5]=i*o+c*n,e[6]=s*o+p*n,e[7]=l*o+h*n,e[8]=u*o-a*n,e[9]=c*o-i*n,e[10
1]=p*o-s*n,e[11]=h*o-l*n,e}function ia(e,t,r){var n=Math.sin(r),o=Math.cos(r),a=t[0],i=t[1],s=t[2],l=t[3],u=t[4],c=t[5],p=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]=a*o+u*n,e[1]=i*o+c*n,e[2]=s*o+p*n,e[3]=l*o+h*n,e[4]=u*o-a*n,e[5]=c*o-i*n,e[6]=p*o-s*n,e[7]=h*o-l*n,e}var sa,la,ua,ca,pa,ha,da,fa,ma=function(e,t,r,n,o){var a=1/Math.tan(t/2);if(e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,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!=o&&o!==1/0){var i=1/(n-o);e[10]=(o+n)*i,e[14]=2*o*n*i}else e[10]=-1,e[14]=-2*n;return e};function ya(){var e=new na(3);return na!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ga(e,t){var r=t[0],n=t[1],o=t[2],a=r*r+n*n+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function va(e,t,r){var n=t[0],o=t[1],a=t[2],i=r[0],s=r[1],l=r[2];return e[0]=o*l-a*s,e[1]=a*i-n*l,e[2]=n*s-o*i,e}function ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wa(){if(ca)return ua;ca=1;const e=(la||(la=1,sa={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),sa),t={};for(const o of Object.keys(e))t[e[o]]=o;const 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"]}};ua=r;for(const o of Object.keys(r)){if(!("channels"in r[o]))throw new Error("missing channels property: "+o);if(!("labels"in r[o]))throw new Error("missing channel labels property: "+o);if(r[o].labels.length!==r[o].channels)throw new Error("channel and label counts mismatch: "+o);const{channels:e,labels:t}=r[o];delete r[o].channels,delete r[o].labels,Object.defineProperty(r[o],"channels",{value:e}),Object.defineProperty(r[o],"labels",{value:t})}function n(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return r.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),a=Math.max(t,r,n),i=a-o;let s,l;a===o?s=0:t===a?s=(r-n)/i:r===a?s=2+(n-t)/i:n===a&&(s=4+(t-r)/i),s=Math.min(60*s,360),s<0&&(s+=360);const u=(o+a)/2;return l=a===o?0:u<=.5?i/(a+o):i/(2-a-o),[s,100*l,100*u]},r.rgb.hsv=function(e){let t,r,n,o,a;const i=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(i,s,l),c=u-Math.min(i,s,l),p=function(e){return(u-e)/6/c+.5};return 0===c?(o=0,a=0):(a=c/u,t=p(i),r=p(s),n=p(l),i===u?o=n-r:s===u?o=1/3+t-n:l===u&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*u]},r.rgb.hwb=function(e){const t=e[0],n=e[1];let o=e[2];const a=r.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(n,o));return o=1-1/255*Math.max(t,Math.max(n,o)),[a,100*i,100*o]},r.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n);return[100*((1-t-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},r.rgb.keyword=function(r){const o=t[r];if(o)return o;let a,i=1/0;for(const t of Object.keys(e)){const o=n(r,e[t]);o<i&&(i=o,a=t)}return a}
vendor: 7,316 bytes, line 1
1,r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},r.rgb.lab=function(e){const t=r.rgb.xyz(e);let n=t[0],o=t[1],a=t[2];n/=95.047,o/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*o-16,500*(n-o),200*(o-a)]},r.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,a,i;if(0===r)return i=255*n,[i,i,i];o=n<.5?n*(1+r):n+r-n*r;const s=2*n-o,l=[0,0,0];for(let u=0;u<3;u++)a=t+1/3*-(u-1),a<0&&a++,a>1&&a--,i=6*a<1?s+6*(o-s)*a:2*a<1?o:3*a<2?s+(o-s)*(2/3-a)*6:s,l[u]=255*i;return l},r.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=a<=1?a:2-a;return[t,100*(0===n?2*o/(a+o):2*r/(n+r)),100*((n+r)/2)]},r.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),i=255*n*(1-r),s=255*n*(1-r*a),l=255*n*(1-r*(1-a));switch(n*=255,o){case 0:return[n,l,i];case 1:return[s,n,i];case 2:return[i,n,l];case 3:return[i,s,n];case 4:return[l,i,n];case 5:return[n,i,s]}},r.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let a,i;i=(2-r)*n;const s=(2-r)*o;return a=r*o,a/=s<=1?s:2-s,a=a||0,i/=2,[t,100*a,100*i]},r.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let a;o>1&&(r/=o,n/=o);const i=Math.floor(6*t),s=1-n;a=6*t-i,1&i&&(a=1-a);const l=r+a*(s-r);let u,c,p;switch(i){default:case 6:case 0:u=s,c=l,p=r;break;case 1:u=l,c=s,p=r;break;case 2:u=r,c=s,p=l;break;case 3:u=r,c=l,p=s;break;case 4:u=l,c=r,p=s;break;case 5:u=s,c=r,p=l}return[255*u,255*c,255*p]},r.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},r.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,a,i;return o=3.2406*t+-1.5372*r+-.4986*n,a=-.9689*t+1.8758*r+.0415*n,i=.0557*t+-.204*r+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),i=Math.min(Math.max(0,i),1),[255*o,255*a,255*i]},r.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},r.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const o=r**3,a=t**3,i=n**3;return r=o>.008856?o:(r-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,n=i>.008856?i:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},r.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=360*Math.atan2(n,r)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(r*r+n*n),o]},r.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},r.rgb.ansi16=function(e,t=null){const[n,o,a]=e;let i=null===t?r.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let s=30+(Math.round(a/255)<<2|Math.round(o/255)<<1|Math.round(n/255));return 2===i&&(s+=60),s},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/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,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},r.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},r.rgb.hex=function(e){const 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){const 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(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},r.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),i=o-a;let s,l;return s=i<1?a/(1-i):0,l=i<=0?0:o===t?(r-n)/i%6:o===r?2+(n-t)/i:4+(t-r)/i,l/=6,l%=1,[360*l,100*i,100*s]},r.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},r.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},r.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const o=[0,0,0],a=t%1*6,i=a%1,s=1-i;let l=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-r)*n,[255*(r*o[0]+l),255*(r*o[1]+l),255*(r*o[2]+l)]},r.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},r.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},r.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},r.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},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){const 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]},ua}function xa(){if(ha)return pa;ha=1;const e=wa();function t(t){const r=function(){const t={},r=Object.keys(e);for(let e=r.length,n=0;n<e;n++)t[r[n]]={distance:-1,parent:null};return t}(),n=[t];for(r[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(e[t]);for(let e=o.length,a=0;a<e;a++){const e=o[a],i=r[e];-1===i.distance&&(i.distance=r[t].distance+1,i.parent=t,n.unshift(e))}}return r}function r(e,t){return function(r){return t(e(r))}}function n(t,n){const o=[n[t].parent,t];let a=e[n[t].parent][t],i=n[t].parent;for(;n[i].parent;)o.unshift(n[i].parent),a=r(e[n[i].parent][i],a),i=n[i].parent;return a.conversion=o,a}return pa=function(e){const r=t(e),o={},a=Object.keys(r);for(let t=a.length,i=0;i<t;i++){const e=a[i];null!==r[e].parent&&(o[e]=n(e,r))}return o}}ya();var Sa=function(){if(fa)return da;fa=1;const e=wa(),t=xa(),r={};return Object.keys(e).forEach((n=>{r[n]={},Object.defineProperty(r[n],"channels",{value:e[n].channels}),Object.defineProperty(r[n],"labels",{value:e[n].labels});const o=t(n);
1Object.keys(o).forEach((e=>{const t=o[e];r[n][e]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,o=0;o<e;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(t),r[n][e].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),da=r}();const ka=ba(Sa);function La({gl:e,type:t,source:r}){const n=e.createShader(t);if(null===n)throw new Error("Cannot create shader");if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw console.error("Shader compilation error:",e.getShaderInfoLog(n)),e.deleteShader(n),new Error("Cannot compile shader");return n}function Aa({gl:e,vertexShaderSource:t,fragmentShaderSource:r,attributesKeys:n,uniformsKeys:o,vertices:a,indices:i}){const s=function({gl:e,vertexShaderSource:t,fragmentShaderSource:r}){const n=La({gl:e,type:e.VERTEX_SHADER,source:t}),o=La({gl:e,type:e.FRAGMENT_SHADER,source:r}),a=e.createProgram();if(e.attachShader(a,n),e.attachShader(a,o),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw console.error("Error: ",e.getProgramInfoLog(a)),new Error("Cannot link shader program");return a}({gl:e,vertexShaderSource:t,fragmentShaderSource:r}),l=n.reduce(((t,r)=>(t[r]=e.getAttribLocation(s,`a_${r}`),t)),{}),u=o.reduce(((t,r)=>(t[r]=function(e,t,r){const n=e.getUniformLocation(t,r);if(null===n)throw new Error(`Cannot get uniform location for ${r}`);return n}(e,s,`u_${r}`),t)),{}),c=e.createBuffer();let p,h;return e.bindBuffer(e.ARRAY_BUFFER,c),e.bufferData(e.ARRAY_BUFFER,new Float32Array(a),e.STATIC_DRAW),void 0!==i&&(p=e.createBuffer(),h=i.length,e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,p),e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(i),e.STATIC_DRAW)),{shaderProgram:s,programInfo:{attributesLocations:l,uniformsLocations:u},positionBuffer:c,indexBuffer:p,indexBufferLength:h}}function Ca(e){if(!e)return[1,1,1,0];if("transparent"===e)return[1,1,1,0];try{const t=function(e){return Ea=Ea??document.createElement("canvas").getContext("2d"),Ea?(Ea.fillStyle=e,Ea.fillStyle):"#000000"}(e),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);if(null!=r&&r.length){const e=!!r[4];return[...ka.hex.rgb(t).map((e=>e/255)),e?parseInt(r[4],16)/255:1]}const n=t.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi)??["0","0","0"];if(t.includes("rgb")){const e=t.includes("rgba"),r=[...n.map((e=>parseFloat(e))).map(((e,t)=>t<3?e/255:e))];return e||r.push(1),r}}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 Ea;const _a=.5,Ta=.5,Ma=.5,Ia=[...[-_a,-Ta,Ma,_a,-Ta,Ma,_a,Ta,Ma,-_a,Ta,Ma],...[-_a,-Ta,-Ma,-_a,Ta,-Ma,_a,Ta,-Ma,_a,-Ta,-Ma],...[-_a,Ta,-Ma,-_a,Ta,Ma,_a,Ta,Ma,_a,Ta,-Ma],...[-_a,-Ta,-Ma,_a,-Ta,-Ma,_a,-Ta,Ma,-_a,-Ta,Ma],...[_a,-Ta,-Ma,_a,Ta,-Ma,_a,Ta,Ma,_a,-Ta,Ma],...[-_a,-Ta,-Ma,-_a,-Ta,Ma,-_a,Ta,Ma,-_a,Ta,-Ma]],Pa=[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],za="precision mediump float;\n\nvarying vec3 vTextureCoord;\n\n%USE_TEXTURE_MACRO_MARKER%\n\n# ifdef USE_TEXTURE\nuniform samplerCube u_cubeSampler;\nuniform float u_fadeOpacity;\n# endif\n\nuniform vec4 u_bgColor;\n\nvoid main(void) {\n  #ifdef USE_TEXTURE\n  vec4 texColor = textureCube(u_cubeSampler, vTextureCoord);\n\n    gl_FragColor = mix(\n      u_bgColor,\n      texColor,\n      min(texColor.a, u_fadeOpacity)\n    );\n\n    gl_FragColor.a = max(gl_FragColor.a, u_fadeOpacity);\n\n  #else\n  gl_FragColor = u_bgColor;\n  #endif\n}\n";var Ra=(e=>(e.UNIVERSE_DARK="universe-dark",e))(Ra||{});const $a={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 Oa=(e=>(e.POSITIVE_X="pX",e.NEGATIVE_X="nX",e.POSITIVE_Y="pY",e.NEGATIVE_Y="nY",e.POSITIVE_Z="pZ",e.NEGATIVE_Z="nZ",e))(Oa||{});const ja=new Map;const Fa=new Map;let Na;function Da(e,t){if(t===Oa.POSITIVE_X)return e.TEXTURE_CUBE_MAP_POSITIVE_X;if(t===Oa.NEGATIVE_X)return e.TEXTURE_CUBE_MAP_NEGATIVE_X;if(t===Oa.POSITIVE_Y)return e.TEXTURE_CUBE_MAP_POSITIVE_Y;if(t===Oa.NEGATIVE_Y)return e.TEXTURE_CUBE_MAP_NEGATIVE_Y;if(t===Oa.POSITIVE_Z)return e.TEXTURE_CUBE_MAP_POSITIVE_Z;if(t===Oa.NEGATIVE_Z)return e.TEXTURE_CUBE_MAP_NEGATIVE_Z;throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${t}`)}function Ua(e,t,r){return e+(t-e)*r}function Ba(e){if(!e)return{};const t=Object.keys(e).sort().map((t=>[t,e[t]]));return Object.fromEntries(t)}const qa="https://api.maptiler.com/resources/space",Ga=["vertexPosition"],Va=["projectionMatrix","modelViewMatrix","cubeSampler","bgColor","fadeOpacity"],Ha="%USE_TEXTURE_MACRO_MARKER%",Wa=$a.stars;class Za{constructor(e){c(this,"id","Cubemap Layer"),c(this,"type","custom"),c(this,"renderingMode","3d"),c(this,"map"),c(this,"faces"),c(this,"useCubemapTexture",!0),c(this,"currentFadeOpacity",0),c(this,"cubeMapNeedsUpdate",!1),c(this,"bgColor"),c(this,"previousBgColor",[0,0,0,0]),c(this,"targetBgColor",[0,0,0,0]),c(this,"transitionDelta",0),c(this,"gl"),c(this,"cubemap"),c(this,"texture"),c(this,"currentFacesDefinitionKey",""),c(this,"options"),c(this,"animationActive",!0),c(this,"imageIsAnimating",!1),c(this,"imageFadeInDelta",0);const t=Ka(e);if(t.length>0)throw new Error(`[CubemapLayer]: Invalid cubemap specification:\n- ${t.join("\n - ")}`);const r=function(e,t){if(!Ka(e))return{color:"transparent"};if(!0===e)return t;const r={...e};if(e.faces||e.path)return delete r.preset,r;const n=e.preset;if(void 0!==n&&!(n in $a))throw new Error(`[CubemapLayer]: Invalid preset "${n}". Available presets: ${Object.keys($a).join(", ")}`);return{...r,color:r.color??$a[n].color??"hsl(233,100%,92%)"}}(e,Wa);this.options=r,this.currentFacesDefinitionKey=JSON.stringify(r.faces??r.preset??r.path),this.bgColor=[0,0,0,0],this.targetBgColor=Ca(r.color),this.faces=Xa(r),this.useCubemapTexture=null!==this.faces}updateCubemap({facesNeedUpdate:e}={facesNeedUpdate:!0}){this.useCubemapTexture=null!==this.faces;const t=Va.filter((e=>"cubeSampler"!==e&&"fadeOpacity"!==e||this.useCubemapTexture));this.cubemap=Aa({gl:this.gl,vertexShaderSource:"attribute vec3 a_vertexPosition;\nvarying vec3 vTextureCoord;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_modelViewMatrix;\n  \nvoid main(void) {\n  vTextureCoord = vec3(-a_vertexPosition.x, a_vertexPosition.y, a_vertexPosition.z);\n  gl_Position = u_projectionMatrix * u_modelViewMatrix * vec4(a_vertexPosition, 1.0
1);\n}\n",fragmentShaderSource:this.useCubemapTexture?za.replace(Ha,"#define USE_TEXTURE"):za.replace(Ha,""),attributesKeys:Ga,uniformsKeys:t,vertices:Ia,indices:Pa}),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){this.cubemap&&(this.texture&&(function(e){const t=ja.get(e);t&&(ja.delete(e),e.deleteTexture(t))}(t),this.texture=void 0),t.deleteProgram(this.cubemap.shaderProgram),t.deleteBuffer(this.cubemap.positionBuffer))}updateTexture(e,t){if(!0===this.cubeMapNeedsUpdate&&!this.imageIsAnimating){if(this.cubeMapNeedsUpdate=!1,!this.useCubemapTexture)return;!function({gl:e,faces:t,onReady:r,forceRefresh:n}){if(ja.get(e)&&!n&&Na===JSON.stringify(t))return void r(ja.get(e),Fa.get(e));Na=JSON.stringify(t);const o=ja.get(e)??e.createTexture();if(e.bindTexture(e.TEXTURE_CUBE_MAP,o),!t)return void console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");const a=Object.keys(t).length;if(6!==a)return void console.warn(`[CubemapLayer][loadCubemapTexture]: Faces should contain exactly 6 images, but found ${a}`);const i=Object.entries(t).map((([e,t])=>new Promise(((r,n)=>{const o=e;if(void 0===t)return void n(new Error(`[CubemapLayer][loadCubemapTexture]: Face ${e} is undefined`));const a=new Image;a.crossOrigin="anonymous";const i=()=>{r({image:a,key:o})};a.src=t,a.complete&&a.naturalWidth>0?i():a.onload=i,a.onerror=()=>{n(new Error(`[CubemapLayer][loadCubemapTexture]: Error loading image ${t}`))}}))));Promise.all(i).then((t=>{for(let r=0;r<t.length;r++){const n=e.RGBA,a=e.RGBA,i=e.UNSIGNED_BYTE,{image:s,key:l}=t[r]??{};if(!s||!l){console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");continue}const u=Da(e,l);e.bindTexture(e.TEXTURE_CUBE_MAP,o),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,n,a,i,s)}e.bindTexture(e.TEXTURE_CUBE_MAP,o),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);const n=t.map((e=>e.image));r(o,n),Fa.set(e,n),ja.set(e,o)})).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(){const e=()=>{this.transitionDelta<1&&(requestAnimationFrame(e),this.bgColor=function(e,t,r){return[Ua(e[0],t[0],r),Ua(e[1],t[1],r),Ua(e[2],t[2],r),Ua(e[3],t[3],r)]}(this.previousBgColor,this.targetBgColor,this.transitionDelta),this.transitionDelta+=.075,this.map.triggerRepaint())};requestAnimationFrame(e)}async animateIn(){if(!this.imageIsAnimating)return this.animationActive?new Promise((e=>{this.imageIsAnimating=!0;const t=()=>{this.imageFadeInDelta=Math.min(this.imageFadeInDelta+.05,1),this.currentFadeOpacity=Ua(0,1,this.imageFadeInDelta),this.map.triggerRepaint(),this.imageFadeInDelta<1?requestAnimationFrame(t):(this.imageIsAnimating=!1,this.imageFadeInDelta=0,e())};requestAnimationFrame(t)})):(this.currentFadeOpacity=1,this.imageFadeInDelta=1,void this.map.triggerRepaint())}async animateOut(){if(!this.imageIsAnimating&&this.animationActive)return new Promise((e=>{const t=()=>{if(this.imageFadeInDelta=Math.min(this.imageFadeInDelta+.05,1),this.currentFadeOpacity=Ua(1,0,this.imageFadeInDelta),this.map.triggerRepaint(),this.imageFadeInDelta>=1)return this.imageIsAnimating=!1,this.imageFadeInDelta=0,void e();requestAnimationFrame(t)};requestAnimationFrame(t)}))}setAnimationActive(e){this.animationActive=e}render(e,t){if(!this.map.isGlobeProjection())return;if(void 0===this.map)throw new Error("[CubemapLayer]: Map is undefined");if(void 0===this.cubemap)throw new 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);const r=e.canvas,n=r.clientWidth/r.clientHeight,o=this.map.transform,a=o.fov*(Math.PI/180),i=oa();ma(i,a,n,.1,1e4),ia(i,i,o.rollInRadians),aa(i,i,-o.pitchInRadians),ia(i,i,o.bearingInRadians);const s=o.center.lat*Math.PI/180,l=o.center.lng*Math.PI/180;aa(i,i,s),function(e,t,r){var n=Math.sin(r),o=Math.cos(r),a=t[0],i=t[1],s=t[2],l=t[3],u=t[8],c=t[9],p=t[10],h=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*o-u*n,e[1]=i*o-c*n,e[2]=s*o-p*n,e[3]=l*o-h*n,e[8]=a*n+u*o,e[9]=i*n+c*o,e[10]=s*n+p*o,e[11]=l*n+h*o}(i,i,-l),e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix,!1,i);const u=oa();if(e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix,!1,u),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 new Error("Index buffer is undefined");if(void 0===this.cubemap.indexBufferLength)throw new 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){const t=this.getConfig();if(void 0===e&&t)return!0;const r="boolean"==typeof e?e:Ba(e),n=Ba(t);return JSON.stringify(r)!==JSON.stringify(n)}async setCubemapFaces(e){if(await this.animateOut(),!e.faces&&!e.preset&&!e.path)return this.faces=null,this.useCubemapTexture=!1,this.currentFacesDefinitionKey="empty",void await this.animateIn();this.faces=Xa(e),this.currentFacesDefinitionKey=JSON.stringify(e.faces??e.preset??e.path)}async setCubemap(e){const t=Ka(e);if(t.length>0)throw new Error(`[CubemapLayer]: Invalid cubemap specification:\n- ${t.join("\n - ")}`);const r="boolean"==typeof e?Wa:e;this.options=r;const n=JSON.stringify(r.faces??r.preset??r.path),o=this.currentFacesDefinitionKey!==n;o&&(await this.setCubemapFaces(r),this.cubeMapNeedsUpdate=!0);const a=Ca(r.color);if(r.color&&this.targetBgColor.toString()!==a.toString())this.setBgColor(a);else if(!r.color&&r.preset&&r.preset in $a){const e=$a[r.preset];this.setBgColor(Ca(e.color))}this.updateCubemap({facesNeedUpdate:o})}
1show(){this.map.setLayoutProperty(this.id,"visibility","visible")}hide(){this.map.setLayoutProperty(this.id,"visibility","none")}}function Ka(e){const 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;const r=["color","preset","path","faces"],n=Object.keys(e).filter((e=>!r.includes(e)));if(n.length>0)return t.push(`Space specification contains unsupported properties: ${n.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 $a)&&t.push(`Space preset "${e.preset}" is not a valid preset. Available presets: ${Object.keys($a).join(", ")}`);const o=Object.keys(e).filter((e=>"color"!==e)).filter((e=>"preset"===e||"path"===e||"faces"===e));return o.length>1&&t.push(`Space specification contains multiple properties for cubemap definition: ${o.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 Xa(e){if(e.faces)return e.faces;if(e.preset)return{pX:`${qa}/${e.preset}/px.webp`,nX:`${qa}/${e.preset}/nx.webp`,pY:`${qa}/${e.preset}/py.webp`,nY:`${qa}/${e.preset}/ny.webp`,pZ:`${qa}/${e.preset}/pz.webp`,nZ:`${qa}/${e.preset}/nz.webp`};if(e.path){const 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}const Ja=["position"],Ya=["matrix","rotationMatrix","stopsNumber","stops","colors","maxDistance","scale"],Qa=[-2,-2,0,2,-2,0,-2,2,0,2,2,0],ei=[[0,"rgba(176, 208, 240, 1)"],[.1,"rgba(98, 168, 229, 0.3)"],[.2,"rgba(98, 168, 229, 0.0)"]],ti=.9;class ri{constructor(e){if(c(this,"id","Halo Layer"),c(this,"type","custom"),c(this,"renderingMode","3d"),c(this,"gradient"),c(this,"scale",0),c(this,"animationDelta",0),c(this,"map"),c(this,"plane"),c(this,"animationActive",!0),"boolean"==typeof e)return void(this.gradient={scale:ti,stops:ei});const t=oi(e);if(t.length>0)throw new Error(`[RadialGradientLayer]: Invalid Halo specification:\n - ${t.join("\n - ")}\n    `);this.gradient={scale:e.scale??ti,stops:e.stops??ei}}onAdd(e,t){this.map=e,this.plane=Aa({gl:t,vertexShaderSource:"attribute vec3 a_position;\n\nuniform mat4 u_matrix;\nuniform mat4 u_rotationMatrix;\n\nuniform float u_scale;\n\nvarying vec2 v_pos;\nvarying float v_scale;\n\nvoid main() {\n  v_scale = u_scale;\n  v_pos = a_position.xy * u_scale;\n  gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);\n}\n",fragmentShaderSource:"precision mediump float;\nvarying vec2 v_pos;\n      \nuniform int u_stopsNumber;\nuniform float u_stops[100];\nuniform vec4 u_colors[100];\nuniform float u_maxDistance;\n\nvarying float v_scale;\n\nconst float EPSILON = 0.000001;\n\nvec2 center = vec2(0.0, 0.0);\nvoid main() {\n  float rawDistance = distance(center, v_pos);\n  float distanceFromGlobeEdge = rawDistance - 1.0;\n\n    vec4 color = u_colors[0];\n\n  // if we're further than the max distance, we should not render anything.\n  // This is to always render a circle, otherwise we end up rendering\n  // to the corners of the plane.\n  if (distance(center, v_pos) > u_maxDistance * v_scale) {\n    discard;\n  }\n\n  for (int i = 1; i < 100; i++) {\n    // if we're past the last stop\n    // we should fill to the end with the last stop color\n    if (i >= u_stopsNumber) {\n      color = u_colors[i - 1];\n      break;\n    }\n\n    float scaledStopPosition = u_stops[i] * pow(v_scale, 1.6);\n    float lastStopValue = u_stops[i - 1];\n    float thisStopValue = u_stops[i];\n\n    // this is to avoid blending errors when the stops are the same\n    // eg when you would want a sharp edge between two stops.\n    // `numbersAreEqual` will be 1.0 if the numbers are equal, 0.0 if they are not.\n    // We then subtract EPSILON from the last stop making the stop value _almost_ equal\n    // to the next stop but not enough to cause blending issues.\n    // It's more efficient to do this than an if / else statement.\n    float numbersAreEqual = 1.0 - step(EPSILON, abs(lastStopValue - thisStopValue));\n    lastStopValue = lastStopValue - numbersAreEqual * EPSILON;\n\n    float lastScaledStopPosition = lastStopValue * pow(v_scale, 1.6);\n\n    if (distanceFromGlobeEdge <= scaledStopPosition) {\n      float stopBlendFactor = (distanceFromGlobeEdge - lastScaledStopPosition) / (scaledStopPosition - lastScaledStopPosition);\n      color = mix(u_colors[i - 1], u_colors[i], stopBlendFactor);\n      break;\n    }\n  }\n  \n  // gl_FragColor = color;
1\n  gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n",attributesKeys:Ja,uniformsKeys:Ya,vertices:Qa}),this.animateIn()}getConfig(){return this.gradient}shouldUpdate(e){const t=this.getConfig();if(void 0===e&&t)return!0;const r="boolean"==typeof e?e:Ba(e),n=Ba(t);return JSON.stringify(r)!==JSON.stringify(n)}async animateIn(){return this.animationActive?new Promise((e=>{this.animationDelta=0;const t=()=>{if(this.animationDelta<=1)return this.scale=Ua(0,this.gradient.scale,this.animationDelta),this.animationDelta+=.06,this.map.triggerRepaint(),void requestAnimationFrame(t);e()};requestAnimationFrame(t)})):(this.scale=this.gradient.scale,this.animationDelta=1,void this.map.triggerRepaint())}async animateOut(){if(this.animationActive)return this.animationDelta=0,new Promise((e=>{const t=()=>{if(this.animationDelta<1)return this.scale=Ua(this.gradient.scale,0,this.animationDelta),this.animationDelta+=.06,this.map.triggerRepaint(),void requestAnimationFrame(t);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){if(void 0===this.map)throw new Error("[RadialGradientLayer]: Map is undefined");if(!this.map.isGlobeProjection())return;if(void 0===this.plane)throw new 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);const r=this.plane.programInfo.attributesLocations.position;e.enableVertexAttribArray(r),e.vertexAttribPointer(r,3,e.FLOAT,!1,0,0);const n=oa(),o=this.scale;!function(e,t,r){var n=r[0],o=r[1],a=r[2];e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]}(n,n,[o,o,o]);const a=oa();!function(e,t,r){var n=t[0],o=t[1],a=t[2],i=t[3],s=t[4],l=t[5],u=t[6],c=t[7],p=t[8],h=t[9],d=t[10],f=t[11],m=t[12],y=t[13],g=t[14],v=t[15],b=r[0],w=r[1],x=r[2],S=r[3];e[0]=b*n+w*s+x*p+S*m,e[1]=b*o+w*l+x*h+S*y,e[2]=b*a+w*u+x*d+S*g,e[3]=b*i+w*c+x*f+S*v,b=r[4],w=r[5],x=r[6],S=r[7],e[4]=b*n+w*s+x*p+S*m,e[5]=b*o+w*l+x*h+S*y,e[6]=b*a+w*u+x*d+S*g,e[7]=b*i+w*c+x*f+S*v,b=r[8],w=r[9],x=r[10],S=r[11],e[8]=b*n+w*s+x*p+S*m,e[9]=b*o+w*l+x*h+S*y,e[10]=b*a+w*u+x*d+S*g,e[11]=b*i+w*c+x*f+S*v,b=r[12],w=r[13],x=r[14],S=r[15],e[12]=b*n+w*s+x*p+S*m,e[13]=b*o+w*l+x*h+S*y,e[14]=b*a+w*u+x*d+S*g,e[15]=b*i+w*c+x*f+S*v}(a,t.defaultProjectionData.mainMatrix,n);const i=this.plane.programInfo.uniformsLocations.matrix;e.uniformMatrix4fv(i,!1,a);const s=oa(),l=this.map.transform.cameraPosition,u=ga(ya(),l),c=function(e,t,r){var n=new na(3);return n[0]=e,n[1]=t,n[2]=r,n}(0,1,0),p=ya();va(p,c,u),ga(p,p);const h=ya();va(h,u,p),ga(h,h),function(e,t,r,n,o,a,i,s,l,u,c,p,h,d,f,m,y){e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=a,e[5]=i,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=p,e[11]=h,e[12]=d,e[13]=f,e[14]=m,e[15]=y}(s,p[0],p[1],p[2],0,h[0],h[1],h[2],0,u[0],u[1],u[2],0,0,0,0,1);const d=this.plane.programInfo.uniformsLocations.rotationMatrix;e.uniformMatrix4fv(d,!1,s);const f=this.gradient.stops.length,m=[],y=[];for(let g=0;g<=f;g++)if(g<f){m[g]=this.gradient.stops[g][0];const e=Ca(this.gradient.stops[g][1]);y.push(...e)}e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber,f),e.uniform1fv(this.plane.programInfo.uniformsLocations.stops,new Float32Array(m)),e.uniform4fv(this.plane.programInfo.uniformsLocations.colors,new Float32Array(y)),e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance,2),e.uniform1f(this.plane.programInfo.uniformsLocations.scale,o),e.drawArrays(e.TRIANGLE_STRIP,0,4)}async setGradient(e){if(!1===e)return void await this.animateOut();await this.animateOut();const t=oi(e);if(t.length>0)throw new Error(`[RadialGradientLayer]: Invalid Halo specification:\n - ${t.join("\n - ")}\n    `);
1!0===e?(this.gradient.scale=ti,this.gradient.stops=ei):(this.gradient.scale=e.scale??ti,this.gradient.stops=e.stops??ei),await this.animateIn()}setAnimationActive(e){this.animationActive=e}show(){this.map.setLayoutProperty(this.id,"visibility","visible")}hide(){this.map.setLayoutProperty(this.id,"visibility","none")}}const ni=["scale","stops"];function oi(e){var t;const r=[];if("boolean"==typeof e)return[];try{const t=Object.keys(e).filter((e=>!ni.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):(r.push("Halo `stops` property is not an array."),r)}const ai={POINT:"POINT",COUNTRY:"COUNTRY"};let ii=class e extends n.Map{constructor(e){!1!==e.logSDKVersion&&function(){const 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.0 %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){const t=se();if(!t)return;let r=null;if("string"==typeof e?r=document.getElementById(e):e instanceof HTMLElement&&(r=e),!r)throw new Error("The Map container must be provided.");const n=document.createElement("div");throw n.innerHTML=t,n.classList.add("webgl-warning-div"),r.appendChild(n),new Error(t)}(e.container),e.apiKey&&(H.apiKey=e.apiKey);const{style:t,requiresUrlMonitoring:r,isFallback:o}=So(e.style);o&&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."),H.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");const a=location.hash;let s={compact:!1};e.customAttribution?s.customAttribution=e.customAttribution:e.attributionControl&&"object"==typeof e.attributionControl&&(s={...s,...e.attributionControl});const l={...e,style:t,maplibreLogo:!1,transformRequest:oe(e.transformRequest),attributionControl:!0!==e.forceNoAttributionControl&&s};delete l.style,super(l),c(this,"telemetry"),c(this,"space"),c(this,"halo"),c(this,"options"),c(this,"isTerrainEnabled",!1),c(this,"terrainExaggeration",1),c(this,"primaryLanguage"),c(this,"terrainGrowing",!1),c(this,"terrainFlattening",!1),c(this,"minimap"),c(this,"forceLanguageUpdate"),c(this,"languageAlwaysBeenStyle"),c(this,"isReady",!1),c(this,"terrainAnimationDuration",1e3),c(this,"monitoredStyleUrls"),c(this,"styleInProcess",!1),c(this,"curentProjection"),c(this,"originalLabelStyle",new window.Map),c(this,"isStyleLocalized",!1),c(this,"languageIsUpdated",!1),c(this,"spaceboxLoadingState",{styleLoadCallbackSet:!1,styleLoadedCallbackFired:!1}),this.options=e,this.setStyle(t),r&&this.monitorStyleUrl(t);const u=()=>{let e="The distant style could not be loaded.";this.getStyle()?e+=" Leaving the style as is.":(this.setStyle(i.Gj.STREETS),e+=`Loading default MapTiler Cloud style "${i.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")&&async function(t){if(typeof window>"u")return;const r=n.getRTLTextPluginStatus();if("unavailable"===r||"requested"===r)try{await n.setRTLTextPlugin(t??q.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)}}(e.rtlTextPlugin)})),this.on("error",(e=>{if(e.error instanceof n.AJAXError){const t=e.error.url,r=new URL(t);r.search="";const n=r.href;this.monitoredStyleUrls&&this.monitoredStyleUrls.has(n)&&(this.monitoredStyleUrls.delete(n),u())}else this.styleInProcess&&u()})),H.caching&&!X&&console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"),H.caching&&X&&re(),typeof e.language>"u")this.primaryLanguage=H.primaryLanguage;else{const t=(0,i.EA)(e.language,U);this.primaryLanguage=t??H.primaryLanguage}this.forceLanguageUpdate=!(this.primaryLanguage===U.STYLE||this.primaryLanguage===U.STYLE_LOCK),this.languageAlwaysBeenStyle=this.primaryLanguage===U.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()=>
1{if(!e.geolocate||e.center||e.hash&&a)return;try{if(e.geolocate===ai.COUNTRY)return void await this.fitToIpBounds()}catch(r){console.warn(r.message)}let t;try{await this.centerOnIpPoint(e.zoom),t=this.getCameraHash()}catch(r){console.warn(r.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.coords.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{const 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",H.apiKey),t=await(await fetch(r.href)).json()}catch{}if(e.customControls){const t="[data-maptiler-control-group]",r="[data-maptiler-control]",n=e=>{let t=e.dataset.maptilerControl;return("true"===t||""===t)&&(t=void 0),t},o=e=>e.dataset.maptilerPosition;let a=[...this._container.ownerDocument.querySelectorAll(t)],i=[...this._container.ownerDocument.querySelectorAll(r)].filter((e=>null===e.closest(t)));if("string"==typeof e.customControls){const t=e.customControls;a=a.filter((e=>e.matches(t)||null!==e.closest(t))),i=i.filter((e=>e.matches(t)||null!==e.closest(t)))}for(const e of a){const t=new ea(e);this.addControl(t,o(e));for(const o of e.querySelectorAll(r))t.configureGroupItem(o,n(o))}for(const e of i)this.addControl(new ea(e,n(e)),o(e));const s=()=>{const{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()))};s(),this.on("render",s)}if(!0!==e.forceNoAttributionControl)if("logo"in t&&t.logo){const r=t.logo;this.addControl(new W({logoURL:r}),e.logoPosition)}else e.maptilerLogo&&this.addControl(new W,e.logoPosition);if(e.scaleControl){const t=!0===e.scaleControl||void 0===e.scaleControl?"bottom-right":e.scaleControl,r=new M({unit:H.unit});this.addControl(r,t),H.on("unit",(e=>{r.setUnit(e)}))}if(!1!==e.navigationControl){const t=!0===e.navigationControl||void 0===e.navigationControl?"top-right":e.navigationControl;this.addControl(new _o,t)}if(!1!==e.geolocateControl){const t=!0===e.geolocateControl||void 0===e.geolocateControl?"top-right":e.geolocateControl;this.addControl(new Po({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),t)}if(e.terrainControl){const t=!0===e.terrainControl||void 0===e.terrainControl?"top-right":e.terrainControl;this.addControl(new Co,t)}if(e.projectionControl){const t=!0===e.projectionControl||void 0===e.projectionControl?"top-right":e.projectionControl;this.addControl(new No,t)}if(e.fullscreenControl){const t=!0===e.fullscreenControl||void 0===e.fullscreenControl?"top-right":e.fullscreenControl;this.addControl(new I({}),t)}this.isReady=!0,this.fire("ready",{target:this})}));let p,h=!1,d=!1;this.once("ready",(()=>{h=!0,d&&this.fire("loadWithTerrain",p)})),this.once("style.load",(()=>{const{minimap:t}=e;if("object"==typeof t){const{zoom:r,center:n,style:o,language:a,apiKey:i,maptilerLogo:s,canvasContextAttributes:l,refreshExpiredTiles:u,max
1Bounds:c,scrollZoom:p,minZoom:h,maxZoom:d,boxZoom:f,locale:m,fadeDuration:y,crossSourceCollisions:g,clickTolerance:v,bounds:b,fitBoundsOptions:w,pixelRatio:x,validateStyle:S}=e;this.minimap=new ta(t,{zoom:r,center:n,style:o,language:a,apiKey:i,container:"null",maptilerLogo:s,canvasContextAttributes:l,refreshExpiredTiles:u,maxBounds:c,scrollZoom:p,minZoom:h,maxZoom:d,boxZoom:f,locale:m,fadeDuration:y,crossSourceCollisions:g,clickTolerance:v,bounds:b,fitBoundsOptions:w,pixelRatio:x,validateStyle:S}),this.addControl(this.minimap,t.position??"bottom-left")}else!0===t?(this.minimap=new ta({},e),this.addControl(this.minimap,"bottom-left")):void 0!==t&&!1!==t&&(this.minimap=new ta({},e),this.addControl(this.minimap,t))}));const f=e=>{e.terrain&&(d=!0,p={type:"loadWithTerrain",target:this,terrain:e.terrain},this.off("terrain",f),h&&this.fire("loadWithTerrain",p))};this.on("terrain",f),e.terrain&&this.enableTerrain(e.terrainExaggeration??this.terrainExaggeration),this.once("load",(()=>{this.getCanvas().addEventListener("webglcontextlost",(e=>{!0!==this._removed?(console.warn("[webglcontextlost]","Unexpected loss of WebGL context!"),this.fire("webglContextLost",e)):console.warn("[webglcontextlost]","WebGL context lost after map removal. This is harmless.")}));const t=this.getLayersOrder()[0];e.space&&this.initSpace({options:e,before:t}),e.halo&&this.initHalo({options:e,before:t})})),this.telemetry=new ra(this)}getSpace(){return this.space}setSpace(e,t=!0){if(t&&(this.options.space=e),!1!==e)return this.space?(this.space.setCubemap(e),void(this.getLayer(this.space.id)||this.addLayer(this.space,this.getLayersOrder()[0]))):(this.space=new Za(e),void this.once("load",(()=>{const e=this.getLayersOrder()[0];this.space&&this.addLayer(this.space,e)})));this.space=void 0}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,n;if(!0!==this.options.space&&typeof this.options.space<"u")return void this.setSpace(this.options.space);const o=null==(r=null==(t=e.metadata)?void 0:t.maptiler)?void 0:r.space;if(this.options.space||o){if(JSON.stringify(null==(n=this.space)?void 0:n.getConfig())!==JSON.stringify(o))if(!0!==this.options.space){if(this.space&&this.isGlobeProjection()){if(!this.getLayer(this.space.id)){const e=this.getLayersOrder()[0];this.addLayer(this.space,e)}this.space.setCubemap(o)}}else this.setSpace(o??!0);else if(this.space&&!this.getLayer(this.space.id)){const e=this.getLayersOrder()[0];this.addLayer(this.space,e)}}else this.setSpace(!1,!1)}setHaloFromStyle({style:e}){var t,r,n;if(!1===this.options.halo)return;const o=null==(t=e.metadata)?void 0:t.maptiler;if(JSON.stringify(null==(r=this.halo)?void 0:r.getConfig())!==JSON.stringify(null==o?void 0:o.halo))null!=o&&o.halo||this.options.halo?(()=>{var e;if(this.halo){if(!this.getLayer(this.halo.id)){const t=this.getLayersOrder().indexOf((null==(e=this.space)?void 0:e.id)??"")+1,r=this.getLayersOrder()[t];this.addLayer(this.halo,r)}const t=(null==o?void 0:o.halo)??this.options.halo;t&&this.halo.setGradient(t)}})():this.setHalo({stops:[[0,"transparent"],[.01,"transparent"]],scale:1});else if(this.halo&&!this.getLayer(this.halo.id)){const e=this.getLayersOrder().indexOf((null==(n=this.space)?void 0:n.id)??"")+1,t=this.getLayersOrder()[e];this.addLayer(this.halo,t)}}initSpace({options:e=this.options,before:t,spec:r}){if(this.space)return void(this.getLayer(this.space.id)||this.addLayer(this.space,t));if(!1===e.space)return;if(e.space&&!0!==e.space)return this.space=new Za(e.space),void this.addLayer(this.space,t);const n=r;n&&(this.space=new Za(n),this.addLayer(this.space,t)),!0===this.options.space&&(this.space=new Za(!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)return;const n=r;return e.halo&&!0!==e.halo?(this.halo=new ri(e.halo),void this.addLayer(this.halo,t)):(n&&(this.halo=new ri(n),this.addLayer(this.halo,t)),!0===this.options.halo?(this.halo=new ri(!0),void this.addLayer(this.halo,t)):void 0)}getHalo(){return this.halo}
1setHalo(e){if(this.options.halo=e,this.isGlobeProjection()){if(this.halo)return void this.halo.setGradient(e);this.halo=new ri(e),this.once("load",(()=>{var e;const t=this.getLayersOrder(),r=t[0],n=t.indexOf((null==(e=this.space)?void 0:e.id)??"")+2,o=t[n];this.halo&&this.addLayer(this.halo,this.space?o:r)}))}}recreate(){const 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);const t=new URL(e);t.search="",this.monitoredStyleUrls.add(t.href)}setStyle(e,t){var r,n,o,a,i;this.originalLabelStyle.clear(),null==(r=this.minimap)||r.setStyle(e),this.forceLanguageUpdate=!0,this.once("idle",(()=>{this.forceLanguageUpdate=!1}));const s=So(e);if(s.requiresUrlMonitoring&&this.monitorStyleUrl(s.style),s.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;const l=this.getStyle(),u=s.style;try{super.setStyle(s.style,{...t,diff:"string"!=typeof s.style}),this.styleInProcess=!0}catch(p){this.styleInProcess=!1,console.error("[Map.setStyle]: Error while setting style:",p)}const c=e=>{var t,r,n,o;const a=(null==e?void 0:e.target.getStyle())??s.style;if(!this.spaceboxLoadingState.styleLoadedCallbackFired&&(this.spaceboxLoadingState.styleLoadedCallbackFired=!0,this.spaceboxLoadingState.styleLoadCallbackSet=!1,"string"!=typeof a))try{const e=this.getLayersOrder()[0];this.space?this.setSpaceFromStyle({style:a}):this.initSpace({before:e,spec:null==(r=null==(t=a.metadata)?void 0:t.maptiler)?void 0:r.space}),this.halo?this.setHaloFromStyle({style:a}):this.initHalo({before:e,spec:null==(o=null==(n=a.metadata)?void 0:n.maptiler)?void 0:o.halo})}catch(i){console.error(i)}};return"string"==typeof s.style||s.requiresUrlMonitoring?(this.once("style.load",c),this):(requestIdleCallback((()=>{try{c()}catch(p){console.error(p)}})),this.spaceboxLoadingState.styleLoadCallbackSet?(null==(n=null==l?void 0:l.terrain)?void 0:n.source)!==(null==(o=null==u?void 0:u.terrain)?void 0:o.source)||(null==(a=null==l?void 0:l.terrain)?void 0:a.exaggeration)!==(null==(i=null==u?void 0:u.terrain)?void 0:i.exaggeration)?(this.once("terrain",(()=>{const e=s.style;e.projection&&"mercator"!==e.projection.type?(this.setSpaceFromStyle({style:s.style}),this.setHaloFromStyle({style:s.style})):console.warn("[Map.setStyle]: Neither space nor halo is supported for mercator projection. Ignoring...")})),this):this:(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 n;return null==(n=this.minimap)||n.setLayerZoomRange(e,t,r),super.setLayerZoomRange(e,t,r)}setFilter(e,t,r){var n;return null==(n=this.minimap)||n.setFilter(e,t,r),super.setFilter(e,t,r)}setPaintProperty(e,t,r,n){var o;return null==(o=this.minimap)||o.setPaintProperty(e,t,r,n),super.setPaintProperty(e,t,r,n)}setLayoutProperty(e,t,r,n){var o;return null==(o=this.minimap)||o.setLayoutProperty(e,t,r,n),super.setLayoutProperty(e,t,r,n)}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,i.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)}
vendor: 1,754 bytes, line 1
1))}setPrimaryLanguage(e){const t=this.getStyleLanguage(),r=(0,i.EA)(e,U);if(!r)return void console.warn(`The language "${r}" is not supported.`);if((r.flag!==U.STYLE.flag||!t||t.flag!==U.AUTO.flag&&t.flag!==U.VISITOR.flag)&&(r.flag!==U.STYLE.flag&&(this.languageAlwaysBeenStyle=!1),this.languageAlwaysBeenStyle||this.primaryLanguage===r&&!this.forceLanguageUpdate))return;if(this.primaryLanguage.flag===U.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 n=r;if(r.flag===U.STYLE.flag){if(!t)return void console.warn("The style has no default languages or has an invalid one.");n=t}let o=U.LOCAL.flag,a=["get",o];n.flag===U.VISITOR.flag?(o=B().flag,a=["case",["all",["has",o],["has",U.LOCAL.flag]],["case",["==",["get",o],["get",U.LOCAL.flag]],["get",U.LOCAL.flag],["format",["get",o],{"font-scale":.8},"\n",["get",U.LOCAL.flag],{"font-scale":1.1}]],["get",U.LOCAL.flag]]):n.flag===U.VISITOR_ENGLISH.flag?(o=U.ENGLISH.flag,a=["case",["all",["has",o],["has",U.LOCAL.flag]],["case",["==",["get",o],["get",U.LOCAL.flag]],["get",U.LOCAL.flag],["format",["get",o],{"font-scale":.8},"\n",["get",U.LOCAL.flag],{"font-scale":1.1}]],["get",U.LOCAL.flag]]):n.flag===U.AUTO.flag?(o=B().flag,a=["coalesce",["get",o],["get",U.LOCAL.flag]]):n===U.LOCAL?(o=U.LOCAL.flag,a=["get",o]):(o=n.flag,a=["coalesce",["get",o],["get",U.LOCAL.flag]]);const{layers:s}=this.getStyle(),l=0===this.originalLabelStyle.size;if(l){const e=function(e,t){const r=[];for(const a of e){if("symbol"!==a.type)continue;const e=a,{id:n,layout:o}=e;if(!o||!("text-field"in o))continue;const i=t.getLayoutProperty(n,"text-field");if(i)if("string"==typeof i){const e=de(i);
1r.push(e)}else{const e=me(i);r.push(e)}}const n=r.flat(),o={unlocalized:0,localized:{}};for(const a of n)null===a?o.unlocalized+=1:(a in o.localized||(o.localized[a]=0),o.localized[a]+=1);return o}(s,this);this.isStyleLocalized=Object.keys(e.localized).length>0}for(const i of s){if("symbol"!==i.type)continue;const e=i,t=this.getSource(e.source);if(!t||!("url"in t)||"string"!=typeof t.url||new URL(t.url).host!==q.maptilerApiHost)continue;const{id:r,layout:n}=e;if(!n||!("text-field"in n))continue;let o;if(l?(o=this.getLayoutProperty(r,"text-field"),this.originalLabelStyle.set(r,o)):o=this.originalLabelStyle.get(r),"string"==typeof o){const{contains:e,exactMatch:t}=pe(o,this.isStyleLocalized);if(!e)continue;if(t)this.setLayoutProperty(r,"text-field",a);else{const e=he(o,a,this.isStyleLocalized);this.setLayoutProperty(r,"text-field",e)}}else{const e=ce(o,a,this.isStyleLocalized);this.setLayoutProperty(r,"text-field",e)}}this.languageIsUpdated=!0}getPrimaryLanguage(){return this.primaryLanguage}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}growTerrain(e){if(!this.terrain)return;const t=performance.now(),r=this.terrain.exaggeration,n=e-r,o=()=>{if(!this.terrain||this.terrainFlattening)return;const a=(performance.now()-t)/this.terrainAnimationDuration;if(a<.99){const e=r+(1-(1-a)**4)*n;this.terrain.exaggeration=e,requestAnimationFrame(o)}else 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(o)}enableTerrain(e=this.terrainExaggeration){if(e<0)return void console.warn("Terrain exaggeration cannot be negative.");const 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(q.terrainSourceId,{type:"raster-dem",url:q.terrainSourceURL}),this.setTerrain({source:q.terrainSourceId,exaggeration:0})};if(this.getTerrain())return this.isTerrainEnabled=!0,void this.growTerrain(e);if(this.loaded()||this.isTerrainEnabled)r();else{const e=()=>{this.getTerrain()&&this.getSource(q.terrainSourceId)||r()};this.once("load",(()=>{e()})),this.once("moveend",(()=>{e()}))}}disableTerrain(){if(!this.terrain)return;this.isTerrainEnabled=!1;const e=performance.now(),t=this.terrain.exaggeration,r=()=>{if(!this.terrain||this.terrainGrowing)return;const n=(performance.now()-e)/this.terrainAnimationDuration;if(this._elevationFreeze=!1,n<.99){const e=t*(1-n)**4;this.terrain.exaggeration=e,requestAnimationFrame(r)}else this.terrain.exaggeration=0,this.terrainGrowing=!1,this.terrainFlattening=!1,this.setTerrain(),this.get
1Source(q.terrainSourceId)&&this.removeSource(q.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(){const e=await i.Re.info();this.fitBounds(e.country_bounds,{duration:0,padding:100})}async centerOnIpPoint(e){const t=await i.Re.info();this.jumpTo({center:[t.longitude??0,t.latitude??0],zoom:e||11})}getCameraHash(){const 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(),o.o4.fromUint8Array(new Uint8Array(e.buffer))}getSdkConfig(){return H}getMaptilerSessionId(){return G}setTransformRequest(e){return super.setTransformRequest(oe(e)),this}getProjection(){const e=this.style.getProjection();return void 0===e&&this.style.projection?{type:this.style.projection.name}:e}isGlobeProjection(){const 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}};class si{constructor(e,t,r,n={}){c(this,"type"),c(this,"target"),c(this,"originalEvent"),c(this,"imageX"),c(this,"imageY"),c(this,"isOutOfBounds"),this.type=e,this.target=t,this.originalEvent=r??null,Object.assign(this,n)}}const li=["idle","render","load","remove","idle"],ui=["error"],ci=["resize"],pi=["webglcontextlost","webglcontextrestored"],hi=["moveend","movestart","move","zoomend","zoomstart","zoom","rotatestart","rotateend","rotate","dragstart","dragend","drag","boxzoomcancel","boxzoomend","boxzoomstart"],di=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseover","contextmenu","touchstart","touchend","touchmove","touchcancel"],fi=["cooperativegestureprevented"],mi=["data","dataloading","sourcedata","sourcedataloading","dataabort","sourcedataabort"],yi=[...li,...ui,...ci,...pi,...hi,...di,...mi,...fi],gi=["lngLat","_defaultPrevented"];class vi extends Error{constructor(e,t,r){const n=`[${r}]: Failed to fetch ${t} at ${e.url}: ${e.status.toString()}: ${e.statusText}`;super(n),c(this,"status"),c(this,"statusText"),this.name="FetchError",this.message=n,this.status=e.status,this.statusText=e.statusText}}const bi=85.051129;function wi(e,t,r){return Math.min(r,Math.max(t,e))}function xi(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Si(e){return(180+e)/360}function ki(e,t,r){const n=r-t,o=((e-t)%n+n)%n+t;return o===t?r:o}const Li={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class Ai{constructor({imageViewer:e}){if(c(this,"viewer"),c(this,"container"),c(this,"handleClick",(()=>{this.viewer.fitImageToViewport({ease:!0})})),!e)throw new Error("ImageViewerFitImageToBoundsControl: an instance of 'ImageViewer' is required");this.viewer=e}onAdd(e){const t=document.createElement("button");this.container=document.createElement("div"),this.container.classList.add("maplibregl-ctrl","maplibregl-ctrl-group"),t.classList.add("maplibregl-ctrl-fit-image-to-bounds");const r=document.createElement("span");return r.classList.add("maplibregl-ctrl-icon"),t.title="Zoom image to viewport bounds",t.appendChild(r),t.addEventListener("click",this.handleClick),this.container.appendChild(t),this.container}onRemove(){this.container.remove()}}const Ci=Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"),Ei=Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"),{Evented:_i}=n,Ti={style:{version:8,sources:{},layers:[]},minPitch:0,maxPitch:0,pitch:0,bearing:0,projection:"mercator",geolocateControl:!1,navigationControl:!1,projectionControl:!1,hash:!1,renderWorldCopies:!1,terrain:!1,space:!1,halo:!1,transformConstrain:function(e,t){t=wi(t,this.minZoom,this.maxZoom);const r={center:new Ml(e.lng,e.lat),zoom:t};let n=this.lngRange;const o=this.latRange;if(null===n){const e=179.9999999999;n=[-e,e]}const a=this.tileSize*function(e){return Math.pow(2,e)}(r.zoom);let i=0,s=a,l=0,u=a,c=0,p=0;const{x:h,y:d}=this.size,f=.5;o&&(i=xi(o[1])*a,s=xi(o[0])*a,s-i<f*d&&(c=f*d/(s-i))),n&&(l=ki(Si(n[0])*a,0,a),u=ki(Si(n[1])*a,0,a),u<l&&(u+=a),u-l<f*h&&(p=f*h/(u-l)));const{x:m,y:y}=function(e,t){const r=wi(t.lat,-bi,bi);return new Fl(Si(t.lng)*e,xi(r)*e)}(a,e);let g,v;const b=Math.min(p||0,c||0);if(b)return r.zoom+=function(e){return Math.log(e)/Math.LN2}(b),r;let w=0,x=0;const S=1-(s-i)/d,k=1-(u-l)/h;w=Math.max(k,1),x=Math.max(S,1);if(o){const e=(1-x)*d/2;y-e<i&&(v=i+e),y+e>s&&(v=s-e)}if(n){const e=(1-w)*h/2;m-e<l&&(g=l+e),m+e>u&&(g=u-e)}if(void 0!==g||void 0!==v){const e=new Fl(g??m,v??y);r.center=function(e,t){return new Pl(t.x/e,t.y/e).toLngLat()}(a,e).wrap()}return r}},Mi={debug:!1,fitToBoundsControl:!0,navigationControl:!0};var Ii,Pi,zi;class Ri extends(zi=_i,Pi=Ci,Ii=Ei,zi){constructor(e){if(super(),c(this,"imageUUID"),c(this,"debug"),c(this,"imageMetadata"),c(this,"sdk"),c(this,"options"),c(this,"imageSize"),c(this,"paddedSizeMax"),c(this,"fitToBoundsControlInstance"),c(this,"shouldFitImageToViewport",!0),c(this,Pi,this.lngLatToPx.bind(this)),c(this,Ii,this.pxToLngLat.bind(this)),!e.imageUUID)throw new Error("[ImageViewer]: `imageUUID` is required");if("string"!=typeof e.container&&!(e.container instanceof HTMLElement))throw new Error("[ImageViewer]: `container` is required and must be a string or HTMLElement");this.options={...Mi,...e};const t={...this.options,...Ti};delete t.center,this.sdk=new ii(t),this.sdk.telemetry.registerViewerType("ImageViewer");const{imageUUID:r,debug:n}=e;this.imageUUID=r,this.debug=n??!1,this.debug&&(this.sdk.showTileBoundaries=this.debug,this.sdk.showPadding=this.debug,this.sdk.showCollisionBoxes=this.debug,this.sdk.repaint=this.debug),this.init()}get version(){return this.sdk.version}async onReadyAsync(){try{await Promise.race([new Promise(((e,t)=>{this.once("imageviewerready",(t=>{e(t)})),this.once("imagevieweriniterror",(e=>{t(e.error)}))}
1)),new Promise(((e,t)=>{setTimeout((()=>{t(new Error("Timeout waiting for image viewer to be ready"))}),5e3)}))])}catch(e){throw e}}async init(){var e,t,r;try{await this.sdk.onReadyAsync(),await this.fetchImageMetadata(),this.addImageSource(),this.options.navigationControl&&this.sdk.addControl(new C({visualizePitch:!1,visualizeRoll:!1})),this.fitToBoundsControlInstance=new Ai({imageViewer:this}),this.options.fitToBoundsControl&&this.sdk.addControl(this.fitToBoundsControlInstance),function({map:e,viewer:t,lngLatToPx:n}){yi.forEach((o=>{try{e.on(o,(e=>{const r=o;if(di.includes(r)){const r=e,a=r.lngLat&&n(r.lngLat),i=t.getImageMetadata(),s={isOutOfBounds:!i||a[0]<0||a[0]>i.width||a[1]<0||a[1]>i.height,imageX:a[0],imageY:a[1],...Object.fromEntries(Object.entries(e).filter((([e])=>!gi.includes(e))))};return void t.fire(new si(o,t,r.originalEvent,s))}const a=o;if(hi.includes(a)){const r=e;return void t.fire(new si(o,t,r.originalEvent,r))}const i=o;if(ui.includes(i)){const r=e;return void t.fire(new si(o,t,null,r))}const s=o;if(ci.includes(s)){const r=e;return void t.fire(new si(o,t,null,r))}const l=o;if(pi.includes(l)){const r=e;return void t.fire(new si(o,t,r.originalEvent,r))}const u=o;if(mi.includes(u)){const r=e;return void t.fire(new si(o,t,null,r))}const c=o;if(fi.includes(c)){const r=e;return void t.fire(new si(o,t,null,r))}const p=o;li.includes(p)&&t.fire(new si(o,t))}))}catch(r){console.error(`Error forwarding event to ImageViewer, event of type "${o}" is not supported`,r)}}))}({map:this.sdk,viewer:this,lngLatToPx:e=>this.lngLatToPx(e)});const{center:n,zoom:o,bearing:a}=this.options,i=n??[((null==(e=this.imageMetadata)?void 0:e.width)??0)/2,((null==(t=this.imageMetadata)?void 0:t.height)??0)/2];this.setCenter(i),this.setBearing(a??0),this.options.zoom?this.setZoom(o??(null==(r=this.imageMetadata)?void 0:r.maxzoom)??5):this.fitImageToViewport(),this.sdk.on("wheel",(()=>{this.shouldFitImageToViewport=!1})),this.sdk.on("touchstart",(()=>{this.shouldFitImageToViewport=!1})),this.sdk.on("drag",(()=>{this.shouldFitImageToViewport=!1})),this.sdk.on("resize",(()=>{var e,t;const r=this.getCenter(),n=(null==(e=this.imageMetadata)?void 0:e.width)??0,o=(null==(t=this.imageMetadata)?void 0:t.height)??0;this.shouldFitImageToViewport&&this.fitImageToViewport(),(r[0]!==n/2||r[1]!==o/2)&&this.setCenter(r)})),this.fire("imageviewerready",new si("imageviewerready",this))}catch(n){this.fire("imagevieweriniterror",{error:n})}}fitImageToViewport({ease:e=!1}={}){if(!this.imageMetadata)throw new Error("[ImageViewer]: Image metadata not found");const t=this.pxToLngLat([0,0]),r=this.pxToLngLat([this.imageMetadata.width??0,this.imageMetadata.height??0]),n=this.sdk.cameraForBounds([t,r],{padding:50});n&&(e?this.sdk.easeTo({...n,pitch:0},null):this.sdk.jumpTo({...n,pitch:0},null)),this.shouldFitImageToViewport=!0}async fetchImageMetadata(){const e=function(e){return`https://api.maptiler.com/images/${e}/image.json?key=${H.apiKey}`}(this.imageUUID),t=await fetch(e);if(!t.ok)throw new vi(t,"image metadata","ImageViewer");const r=await t.json();this.imageMetadata=r,Object.freeze(this.imageMetadata)}addImageSource(){if(!this.imageMetadata)throw this.fire("error",new si("error",this,null,{error:new Error("[ImageViewer]: Image metadata not found")})),new Error("[ImageViewer]: Image metadata not found");const e=function(e){return`https://api.maptiler.com/images/${e}/{z}/{x}/{y}?key=${H.apiKey}`}(this.imageUUID),t=e=>Math.pow(2,Math.ceil(Math.log(e)/Math.LN2));this.imageSize=[this.imageMetadata.width,this.imageMetadata.height],this.paddedSizeMax=Math.max(t(this.imageSize[0]),t(this.imageSize[1]));const r=this.pxToLngLat([0,0]),n=this.pxToLngLat(this.imageSize),o=[r.lng,n.lat,n.lng,r.lat];this.sdk.addSource("image",{...this.imageMetadata,type:"raster",bounds:o,tiles:[e]}),this.sdk.addLayer({id:"image",type:"raster",source:"image"})}triggerRepaint(){this.sdk.triggerRepaint()}get scrollZoom(){return this.sdk.scrollZoom}set scrollZoom(e){this.sdk.scrollZoom=e}get boxZoom(){return this.sdk.boxZoom}set boxZoom(e){this.sdk.boxZoom=e}get dragPan(){return this.sdk.dragPan}set dragPan(e){this.sdk.dragPan=e}get keyboard(){return this.sdk.keyboard}set keyboard(e){this.sdk.keyboard=e}get doubleClickZoom(){return this.sdk.doubleClickZoom}set doubleClickZoom(e){this.sdk.doubleClickZoom=e}get touchZoomRotate(){return this.sdk.touchZoomRotate}set touchZoomRotate(e){this.sdk.touchZoomRotate=e}get cooperativeGestures(){return this.sdk.cooperativeGestures}set cooperativeGestures(e){this.sdk.cooperativeGestures=e}lngLatToPx(e){if(!this.paddedSizeMax){const e="[ImageViewer]: Unable to convert LngLat to px, padded size max not set";throw this.fire("error",new si("error",this,null,{error:new Error(e)})),new Error(e)}const t=Pl.fromLngLat(e);return[t.x*this.paddedSizeMax,t.y*this.paddedSizeMax]}pxToLngLat(e){if(!this.paddedSizeMax){const e="[ImageViewer]: Unable to convert px to LngLat, padded size max not set";throw this.fire("error",new si("error",this,null,{error:new Error(e)})),new Error(e)}return new Pl(e[0]/this.paddedSizeMax,e[1]/this.paddedSizeMax).toLngLat()}getSDKInternal(){return this.sdk}getCanvas(){return this.sdk.getCanvas()}flyTo(e,t){const r=this.pxToLngLat(e.center);return this.sdk.flyTo({...e,pitch:0,center:r},t),this}jumpTo(e,t){const r=this.pxToLngLat(e.center);return this.sdk.jumpTo({...e,pitch:0,center:r},t),this}setZoom(e){return this.sdk.setZoom(e),this}getZoom(){return this.sdk.getZoom()}getCenter(){const e=this.sdk.getCenter();return this.lngLatToPx(e)}setCenter(e){return this.sdk.setCenter(this.pxToLngLat(e)),this}setBearing(e){return this.sdk.setBearing(e),this}getBearing(){return this.sdk.getBearing()}panBy(e,t,r){return this.sdk.panBy(e,{...t,pitch:0},r),this}panTo(e,t,r){return this.sdk.panTo(this.pxToLngLat(e),{...t,pitch:0},r),this}getImageMetadata(){return this.imageMetadata}getImageBounds(){const e=this.sdk.getBounds().toArray().map((e=>this.lngLatToPx(Ml.convert(e))));return[[e[0][0],e[1][1]],[e[1][0],e[0][1]]]}fitImageBounds([e,t]){const r=this.pxToLngLat(e),n=this.pxToLngLat(t),o=Il.convert([r,n]);return this.sdk.fitBounds(o),this}remove(){this.fire("beforeremove",new si("beforeremove",this)),this.sdk.remove(),this._listeners&&Object.entries(this._listeners).forEac
1h((([e,t])=>{t.forEach((t=>{this.off(e,t)}))})),this._oneTimeListeners&&Object.entries(this._oneTimeListeners).forEach((([e,t])=>{t.forEach((t=>{this.off(e,t)}))}))}pointIsWithinImageBounds(e){const t=this.getImageMetadata();if(!t)return!1;const r=[[0,0],[t.width,t.height]];return e[0]>=r[0][0]&&e[0]<=r[1][0]&&e[1]>=r[0][1]&&e[1]<=r[1][1]}}const{Evented:$i}=n;class Oi extends $i{constructor({...e}){super(),c(this,"viewer"),c(this,"marker"),c(this,"position",[0,0]),this.marker=new y(e)}addTo(e){if(!(e instanceof Ri))throw new Error("[ImageViewerMarker]: an ImageViewerMarker must be added to an instance of ImageViewer");this.viewer=e,function(e,t,r){ji.forEach((n=>{e.on(n,(e=>{var o,a;if(null==(o=e.target)?void 0:o.getLngLat()){const n=r(null==(a=e.target)?void 0:a.getLngLat());t.setPosition(n)}t.fire(n,new Ni(n,t,{...Object.fromEntries(Object.entries(e).filter((([e])=>!Fi.includes(e))))}))}))}))}(this.marker,this,this.viewer[Ci]);const t=this.viewer.getSDKInternal();return this.setPosition(this.position),function(e){e._update=function(e){if(!this._map)return;const t=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==e?void 0:e.type)||"render"===(null==e?void 0:e.type)&&!t)&&this._map.once("render",this._update),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?n="rotateX(0deg)":"map"===this._pitchAlignment&&(n=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!e||"moveend"===e.type)&&(this._pos=this._pos.round());const o=`${Li[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${r}`;this._element.style.transform=o}.bind(e)}(this.marker),this.marker.addTo(t),this}addClassName(e){return this.marker.addClassName(e),this}getElement(){return this.marker.getElement()}getPosition(){return this.position}getOffset(){return this.marker.getOffset()}getPitchAlignment(){return this.marker.getPitchAlignment()}getPopup(){return this.marker.getPopup()}getRotation(){return this.marker.getRotation()}getRotationAlignment(){return this.marker.getRotationAlignment()}isDraggable(){return this.marker.isDraggable()}fire(e,t){return super.fire(e,t),this}off(e,t){return super.off(e,t),this}on(e,t){return super.on(e,t)}isWithinImageBounds(){return this.viewer.pointIsWithinImageBounds(this.position)}remove(){return this.marker.remove(),this.marker._listeners&&Object.entries(this.marker._listeners).forEach((([e,t])=>{t.forEach((t=>{this.off(e,t)}))})),this.marker._oneTimeListeners&&Object.entries(this.marker._oneTimeListeners).forEach((([e,t])=>{t.forEach((t=>{this.off(e,t)}))})),this}removeClassName(e){return this.marker.removeClassName(e),this}setDraggable(e){return this.marker.setDraggable(e),this}setPosition(e){if(this.position[0]=e[0],this.position[1]=e[1],!this.viewer)return this;const t=this.viewer[Ei](e);return this.marker.setLngLat(t),this}setOffset(e){return this.marker.setOffset(e),this}setOpacity(e,t){return this.marker.setOpacity(e,t),this}setPitchAlignment(e){return this.marker.setPitchAlignment(e),this}setPopup(e){return this.marker.setPopup(e),this}setRotation(e){return this.marker.setRotation(e),this}setRotationAlignment(e){return this.marker.setRotationAlignment(e),this}setSubpixelPositioning(e){return this.marker.setSubpixelPositioning(e),this}toggleClassName(e){return this.marker.toggleClassName(e),this}togglePopup(){return this.marker.togglePopup(),this}}const ji=["dragstart","drag","dragend"],Fi=["lngLat","_defaultPrevented","target"];class Ni{constructor(e,t,r){c(this,"type"),c(this,"target"),this.type=e,this.target=t,Object.assign(this,r)}}function Di(e){if(typeof DOMParser<"u"){const t=(new DOMParser).parseFromString(e,"application/xml");if(t.querySelector("parsererror"))throw new Error("The provided string is not val
1id XML");return t}throw new Error("No XML parser found")}function Ui(e,t){if(!e.hasChildNodes())return!1;for(const r of Array.from(e.childNodes)){const e=r.nodeName;if("string"==typeof e&&e.trim().toLowerCase()===t.toLowerCase())return!0}return!1}function Bi(e){if(typeof XMLSerializer<"u")return(new XMLSerializer).serializeToString(e);throw new Error("No XML serializer found")}function qi(e){const t="string"==typeof e?Di(e):e;if(!Ui(t,"gpx"))throw new Error("The XML document is not valid GPX");const r=ns(t,"trk"),n=ns(t,"rte"),o=ns(t,"wpt"),a={type:"FeatureCollection",features:[]};for(const i of Array.from(r)){const e=Ji(i);e&&a.features.push(e)}for(const i of Array.from(n)){const e=Yi(i);e&&a.features.push(e)}for(const i of Array.from(o))a.features.push(Qi(i));return a}function Gi(e,t){let r=e;if("string"==typeof r&&(r=Di(r)),!Ui(r,"kml"))throw new Error("The XML document is not valid KML");const n={type:"FeatureCollection",features:[]},o={},a={},i={},s=ns(r,"Placemark"),l=ns(r,"Style"),u=ns(r,"StyleMap");for(const c of Array.from(l)){const e=rs(void 0!==t?t(c):Bi(c)).toString(16);o[`#${os(c,"id")}`]=e,a[e]=c}for(const c of Array.from(u)){o[`#${os(c,"id")}`]=rs(void 0!==t?t(c):Bi(c)).toString(16);const e=ns(c,"Pair"),r={};for(const t of Array.from(e))r[ls(is(t,"key"))??""]=ls(is(t,"styleUrl"));i[`#${os(c,"id")}`]=r}for(const c of Array.from(s))n.features=n.features.concat(Ki(c,o,a,i));return n}function Vi(e){if(null===e)return["#000000",1];let t="",r=1,n=e;return n.startsWith("#")&&(n=n.substring(1)),(6===n.length||3===n.length)&&(t=n),8===n.length&&(r=Number.parseInt(n.substring(0,2),16)/255,t=`#${n.substring(6,8)}${n.substring(4,6)}${n.substring(2,4)}`),[t??"#000000",r??1]}function Hi(e){return ss(e.split(" "))}function Wi(e){let t=ns(e,"coord");const r=[],n=[];0===t.length&&(t=ns(e,"gx:coord"));for(const a of Array.from(t))r.push(Hi(ls(a)??""));const o=ns(e,"when");for(const a of Array.from(o))n.push(ls(a));return{coords:r,times:n}}function Zi(e){const t=["Polygon","LineString","Point","Track","gx:Track"];let r,n,o,a,i;const s=[],l=[];if(null!==is(e,"MultiGeometry"))return Zi(is(e,"MultiGeometry"));if(null!==is(e,"MultiTrack"))return Zi(is(e,"MultiTrack"));if(null!==is(e,"gx:MultiTrack"))return Zi(is(e,"gx:MultiTrack"));for(o=0;o<t.length;o++)if(n=ns(e,t[o]),n)for(a=0;a<n.length;a++)if(r=n[a],"Point"===t[o])s.push({type:"Point",coordinates:cs(ls(is(r,"coordinates"))??"")});else if("LineString"===t[o])s.push({type:"LineString",coordinates:ps(ls(is(r,"coordinates"))??"")});else if("Polygon"===t[o]){const e=ns(r,"LinearRing"),t=[];for(i=0;i<e.length;i++)t.push(ps(ls(is(e[i],"coordinates"))??""));s.push({type:"Polygon",coordinates:t})}else if("Track"===t[o]||"gx:Track"===t[o]){const e=Wi(r);s.push({type:"LineString",coordinates:e.coords}),e.times.length&&l.push(e.times)}return{geoms:s,coordTimes:l}}function Ki(e,t,r,n){const o=Zi(e),a={},i=ls(is(e,"name")),s=ls(is(e,"address")),l=ls(is(e,"description")),u=is(e,"TimeSpan"),c=is(e,"TimeStamp"),p=is(e,"ExtendedData"),h=is(e,"visibility");let d,f=ls(is(e,"styleUrl")),m=is(e,"LineStyle"),y=is(e,"PolyStyle");if(!o.geoms.length)return[];if(i&&(a.name=i),s&&(a.address=s),f){f.startsWith("#")||(f=`#${f}`),a.styleUrl=f,t[f]&&(a.styleHash=t[f]),n[f]&&(a.styleMapHash=n[f],a.styleHash=t[n[f].normal??""]);const e=r[a.styleHash??""];if(e){m||(m=is(e,"LineStyle")),y||(y=is(e,"PolyStyle"));const t=is(e,"IconStyle");if(t){const e=is(t,"Icon");if(e){const t=ls(is(e,"href"));t&&(a.icon=t)}}}}if(l&&(a.description=l),u){const e=ls(is(u,"begin")),t=ls(is(u,"end"));e&&t&&(a.timespan={begin:e,end:t})}if(null!==c&&(a.timestamp=ls(is(c,"when"))??(new Date).toISOString()),null!==m){const e=Vi(ls(is(m,"color"))),t=e[0],r=e[1],n=Number.parseFloat(ls(is(m,"width"))??"");t&&(a.stroke=t),Number.isNaN(r)||(a["stroke-opacity"]=r),Number.isNaN(n)||(a["stroke-width"]=n)}if(y){const e=Vi(ls(is(y,"color"))),t=e[0],r=e[1],n=ls(is(y,"fill")),o=ls(is(y,"outline"));t&&(a.fill=t),Number.isNaN(r)||(a["fill-opacity"]=r),n&&(a["fill-opacity"]="1"===n?a["fill-opacity"]||1:0),o&&(a["stroke-opacity"]="1"===o?a["stroke-opacity"]||1:0)}if(p){const e=ns(p,"Data"),t=ns(p,"SimpleData");for(d=0;d<e.length;d++)a[e[d].getAttribute("name")??""]=ls(is(e[d],"value"))??"";for(d=0;d<t.length;d++)a[t[d].getAttribute("name")??""]=ls(t[d])??""}
1null!==h&&(a.visibility=ls(h)??""),0!==o.coordTimes.length&&(a.coordTimes=1===o.coordTimes.length?o.coordTimes[0]:o.coordTimes);const g={type:"Feature",geometry:1===o.geoms.length?o.geoms[0]:{type:"GeometryCollection",geometries:o.geoms},properties:a};return os(e,"id")&&(g.id=os(e,"id")??void 0),[g]}function Xi(e,t){const r=ns(e,t),n=[],o=[];let a=[];const i=r.length;if(!(i<2)){for(let e=0;e<i;e++){const t=hs(r[e]);n.push(t.coordinates),t.time&&o.push(t.time),(t.heartRate||a.length)&&(0===a.length&&(a=new Array(e).fill(null)),a.push(t.heartRate))}return{line:n,times:o,heartRates:a}}}function Ji(e){const t=ns(e,"trkseg"),r=[],n=[],o=[];let a;for(let s=0;s<t.length;s++)if(a=Xi(t[s],"trkpt"),void 0!==a&&(a.line&&r.push(a.line),a.times&&a.times.length&&n.push(a.times),o.length||a.heartRates&&a.heartRates.length)){if(!o.length)for(let e=0;e<s;e++)o.push(new Array(r[e].length).fill(null));a.heartRates&&a.heartRates.length?o.push(a.heartRates):o.push(new Array(a.line.length).fill(null))}if(0===r.length)return;const i={...ts(e),...es(is(e,"extensions"))};return 0!==n.length&&(i.coordTimes=1===r.length?n[0]:n),0!==o.length&&(i.heartRates=1===r.length?o[0]:o),1===r.length?{type:"Feature",properties:i,geometry:{type:"LineString",coordinates:r[0]}}:{type:"Feature",properties:i,geometry:{type:"MultiLineString",coordinates:r}}}function Yi(e){const t=Xi(e,"rtept");return void 0===t?void 0:{type:"Feature",properties:{...ts(e),...es(is(e,"extensions"))},geometry:{type:"LineString",coordinates:t.line}}}function Qi(e){return{type:"Feature",properties:{...ts(e),...us(e,["sym"])},geometry:{type:"Point",coordinates:hs(e).coordinates}}}function es(e){const t={};if(e){const r=is(e,"line");if(r){const e=ls(is(r,"color")),n=Number.parseFloat(ls(is(r,"opacity"))??"0"),o=Number.parseFloat(ls(is(r,"width"))??"0");e&&(t.stroke=e),Number.isNaN(n)||(t["stroke-opacity"]=n),Number.isNaN(o)||(t["stroke-width"]=96*o/25.4)}}return t}function ts(e){const t=us(e,["name","cmt","desc","type","time","keywords"]),r=ns(e,"link");if(0!==r.length){t.links=[];for(const e of Array.from(r)){const r={href:os(e,"href"),...us(e,["text","type"])};t.links.push(r)}}return t}function rs(e){let t=0;if(!e||!e.length)return t;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}function ns(e,t){return e.getElementsByTagName(t)}function os(e,t){return e.getAttribute(t)}function as(e,t){return Number.parseFloat(os(e,t)??"0")}function is(e,t){const r=ns(e,t);return r.length?r[0]:null}function ss(e){return e.map(Number.parseFloat).map((e=>Number.isNaN(e)?null:e))}function ls(e){return e&&function(e){e.normalize&&e.normalize()}(e),e&&e.textContent}function us(e,t){const r={};let n,o;for(o=0;o<t.length;o++)n=is(e,t[o]),n&&(r[t[o]]=ls(n)??"");return r}function cs(e){return ss(e.replace(/\s*/g,"").split(","))}function ps(e){const t=e.replace(/^\s*|\s*$/g,"").split(/\s+/),r=[];for(const n of t)r.push(cs(n));return r}function hs(e){const t=[as(e,"lon"),as(e,"lat")],r=is(e,"ele"),n=is(e,"gpxtpx:hr")||is(e,"hr"),o=is(e,"time");let a;return r&&(a=Number.parseFloat(ls(r)??"0"),Number.isNaN(a)||t.push(a)),{coordinates:t,time:o?ls(o):null,heartRate:null!==n?Number.parseFloat(ls(n)??"0"):null}}function ds(e){let t=e;try{"string"==typeof t&&(t=Di(t))}catch{return null}try{return qi(t)}catch{}try{return Gi(t)}catch{}return null}const fs=[["#1D5B79","#468B97","#EF6262","#F3AA60"],["#614BC3","#33BBC5","#85E6C5","#C8FFE0"],["#461959","#7A316F","#CD6688","#AED8CC"],["#0079FF","#00DFA2","#F6FA70","#FF0060"],["#39B5E0","#A31ACB","#FF78F0","#F5EA5A"],["#37E2D5","#590696","#C70A80","#FBCB0A"],["#FFD36E","#FFF56D","#99FFCD","#9FB4FF"],["#00EAD3","#FFF5B7","#FF449F","#005F99"],["#10A19D","#540375","#FF7000","#FFBF00"]];function ms(){return fs[~~(Math.random()*fs.length)][~~(4*Math.random())]}function ys(){return`maptiler_source_${ae()}`}function gs(){return`maptiler_layer_${ae()}`}function vs(e,t){if(t<=e[0].zoom)return e[0].value;if(t>=e[e.length-1].zoom)return e[e.length-1].value;for(let r=0;r<e.length-1;r+=1)if(t>=e[r].zoom&&t<e[r+1].zoom){const n=e[r+1].zoom-e[r].zoom,o=(t-e[r].zoom)/n;return o*e[r+1].value+(1-o)*e[r].value}return 0}function bs(e){return["interpolate",["linear"],["zoom"],...e.flatMap((e=>[e.zoom,e.value]))]}function ws(e){return["interpolate",["linear"],["zoom"],...e.flatMap((e=>[e.zoom,e.value]))]}function xs(e,t){if("number"==typeof t&&"number"==typeof e)return 2*t+e;if("number"==typeof t&&Array.isArray(e))return["interpolate",["linear"],["zoom"],...e.flatMap((e=>[e.zoom,2*t+e.value]))];if("number"==typeof e&&Array.isArray(t))return["interpolate",["linear"],["zoom"],...t.flatMap((t=>[t.zoom,2*t.value+e]))];if(Array.isArray(e)&&Array.isArray(t)){return["interpolate",["linear"],["zoom"],...Array.from(new Set([...e.map((e=>e.zoom)),...t.map((e=>e.zoom))])).sort(((e,t)=>e<t?-1:1)).flatMap((r=>[r,2*vs(t,r)+vs(e,r)]))]}return 0}function Ss(e,t){return["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,e.value]))]}function ks(e){const t=e.trimStart(),r=`${t}${" ".repeat(e.length-t.length)}`,n=Array.from(r);
1if(!n.every((e=>" "===e||"_"===e)))throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");if(!n.some((e=>"_"===e))||!n.some((e=>" "===e)))throw new Error("A dash pattern must contain at least one underscore and one whitespace character");const o=[1];for(let a=1;a<n.length;a+=1){n[a-1]===n[a]?o[o.length-1]+=1:o.push(1)}return o}function Ls(e,t){return["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,e.color]))]}function As(e,t,r=!0){return r?["interpolate",["linear"],["zoom"],0,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,.025*e.pointRadius]))],2,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,.05*e.pointRadius]))],4,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,.1*e.pointRadius]))],8,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,.25*e.pointRadius]))],16,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,e.pointRadius]))]]:["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.value,e.pointRadius]))]}function Cs(e,t,r=!0){return r?["interpolate",["linear"],["zoom"],0,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,.025*e.value]))],2,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,.05*e.value]))],4,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,.1*e.value]))],8,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,.25*e.value]))],16,["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,e.value]))]]:["interpolate",["linear"],["get",t],...e.flatMap((e=>[e.propertyValue,e.value]))]}function Es(e,t){return e.every((t=>t.color[3]===e[0].color[3]))?e[0].color[3]?e[0].color[3]/255:1:["interpolate",["linear"],["get",t],...e.getRawColorStops().flatMap((e=>{const t=e.value,r=e.color;return[t,4===r.length?r[3]/255:1]}))]}function _s(e,t=10){return["interpolate",["linear"],["heatmap-density"],...Array.from({length:t+1},((r,n)=>{const o=n/t;return[o,e.getColorHex(o)]})).flat()]}function Ts(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}class Ms extends Array{constructor(e={}){super(),c(this,"min",0),c(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 Ms({stops:e.map((e=>({value:e[0],color:e[1]})))})}setStops(e,t={clone:!0}){const r=t.clone?this.clone():this;r.length=0;let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let a=0;a<e.length;a+=1)n=Math.min(n,e[a].value),o=Math.max(o,e[a].value),r.push({value:e[a].value,color:e[a].color.slice()});return r.sort(((e,t)=>e.value<t.value?-1:1)),this.min=n,this.max=o,r}scale(e,t,r={clone:!0}){const n=r.clone,o=this[0].value,a=this.at(-1).value-o,i=t-e,s=[];for(let l=0;l<this.length;l+=1){const t=(this[l].value-o)/a*i+e;n?s.push({value:t,color:this[l].color.slice()}):this[l].value=t}return n?new Ms({stops:s}):this}at(e){return e<0?this[this.length+e]:this[e]}clone(){return new Ms({stops:this.getRawColorStops()})}getRawColorStops(){const 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}){const t=e.clone?this.clone():this;for(let r=0;r<~~(t.length/2);r+=1){const e=t[r].color;t[r].color=t.at(-(r+1)).color,t.at(-(r+1)).color=e}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;const n=this[r].color;if(!t.smooth)return n.slice();const o=this[r].value,a=this[r+1].value,i=this[r+1].color,s=(a-e)/(a-o);return n.map(((e,t)=>Math.round(e*s+i[t]*(1-s))))}return[0,0,0]}getColorHex(e,t={smooth:!0,withAlpha:!1}){return function(e){return`#${Ts(e[0])}${Ts(e[1])}${Ts(e[2])}${4===e.length?Ts(e[3]):""}`}(this.getColor(e,t))}getColorRelative(e,t={smooth:!0}){const r=this.getBounds();return this.getColor(r.min+e*(r.max-r.min),t)}getCanvasStrip(e={horizontal:!0,size:512,smooth:!0}){const t=document.createElement("canvas");t.width=e.horizontal?e.size:1,t.height=e.horizontal?1:e.size;const r=t.getContext("2d");if(!r)throw new Error("Canvs context is missing");const n=r.getImageData(0,0,t.width,t.height),o=n.data,a=e.size,i=this[0].value,s=(this.at(-1).value-i)/a;for(let l=0;l<a;l+=1){const t=this.getColor(i+l*s,{smooth:e.smooth});o[4*l]=t[0],o[4*l+1]=t[1],o[4*l+2]=t[2],o[4*l+3]=t.length>3?t[3]:255}return r.putImageData(n,0,0),t}
vendor: 4,426 bytes, line 1
1resample(e,t=15){const r=this.getBounds(),n=this.scale(0,1),o=1/(t-1);let a;if("ease-in-square"===e)a=Array.from({length:t},((e,t)=>{const r=t*o,a=r**2;return{value:r,color:n.getColor(a)}}));else if("ease-out-square"===e)a=Array.from({length:t},((e,t)=>{const r=t*o,a=1-(1-r)**2;return{value:r,color:n.getColor(a)}}));else if("ease-out-sqrt"===e)a=Array.from({length:t},((e,t)=>{const r=t*o,a=r**.5;return{value:r,color:n.getColor(a)}}));else if("ease-in-sqrt"===e)a=Array.from({length:t},((e,t)=>{const r=t*o,a=1-(1-r)**.5;return{value:r,color:n.getColor(a)}}));else if("ease-out-exp"===e)a=Array.from({length:t},((e,t)=>{const r=t*o,a=1-2**(-10*r);return{value:r,color:n.getColor(a)}}));else{if("ease-in-exp"!==e)throw new Error("Invalid ressampling method.");a=Array.from({length:t},((e,t)=>{const r=t*o,a=2**(10*r-10);return{value:r,color:n.getColor(a)}}))}return new Ms({stops:a}).scale(r.min,r.max)}transparentStart(){const e=this.getRawColorStops();e.unshift({value:e[0].value,color:e[0].color.slice()}),e[1].value+=.001;for(const t of e)3===t.color.length&&t.color.push(255);return e[0].color[3]=0,new Ms({stops:e})}hasTransparentStart(){return 4===this[0].color.length&&0===this[0].color[3]}}const Is={NULL:new Ms({stops:[{value:0,color:[0,0,0,0]},{value:1,color:[0,0,0,0]}]}),GRAY:new Ms({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),JET:new Ms({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]}]}),HSV:new Ms({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]}]}),HOT:new Ms({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]}]}),SPRING:new Ms({stops:[{value:0,color:[255,0,255]},{value:1,color:[255,255,0]}]}),SUMMER:new Ms({stops:[{value:0,color:[0,128,102]},{value:1,color:[255,255,102]}]}),AUTOMN:new Ms({stops:[{value:0,color:[255,0,0]},{value:1,color:[255,255,0]}]}),WINTER:new Ms({stops:[{value:0,color:[0,0,255]},{value:1,color:[0,255,128]}]}),BONE:new Ms({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]}]}),COPPER:new Ms({stops:[{value:0,color:[0,0,0]},{value:.804,color:[255,160,102]},{value:1,color:[255,199,127]}]}),GREYS:new Ms({stops:[{value:0,color:[0,0,0]},{value:1,color:[255,255,255]}]}),YIGNBU:new Ms({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]}]}),GREENS:new Ms({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]}]}),YIORRD:new Ms({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]}]}),BLUERED:new Ms({stops:[{value:0,color:[0,0,255]},{value:1,color:[255,0,0]}]}),RDBU:new Ms({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]}]}),PICNIC:new Ms({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]}]}),RAINBOW:new Ms({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]}
1,{value:.75,color:[255,234,0]},{value:.875,color:[255,111,0]},{value:1,color:[255,0,0]}]}),PORTLAND:new Ms({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]}]}),BLACKBODY:new Ms({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]}]}),EARTH:new Ms({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]}]}),ELECTRIC:new Ms({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]}]}),VIRIDIS:new Ms({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]}]}),INFERNO:new Ms({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]}]}),MAGMA:new Ms({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]}]}),PLASMA:new Ms({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]}]}),WARM:new Ms({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]}]}),COOL:new Ms({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]}]}),RAINBOW_SOFT:new Ms({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]}]}),BATHYMETRY:new Ms({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]}]}),CDOM:new Ms({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]}]}),CHLOROPHYLL:new Ms({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]}]}),DENSITY:new Ms({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]}]}),FREESURFACE_BLUE:new Ms({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]}
1,{value:.75,color:[157,181,203]},{value:.88,color:[200,208,216]},{value:1,color:[241,237,236]}]}),FREESURFACE_RED:new Ms({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]}]}),OXYGEN:new Ms({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]}]}),PAR:new Ms({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]}]}),PHASE:new Ms({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]}]}),SALINITY:new Ms({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]}]}),TEMPERATURE:new Ms({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]}]}),TURBIDITY:new Ms({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]}]}),VELOCITY_BLUE:new Ms({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]}]}),VELOCITY_GREEN:new Ms({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]}]}),CUBEHELIX:new Ms({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]}]}),CIVIDIS:new Ms({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]}]}),TURBO:new Ms({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]}]}),ROCKET:new Ms({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]}]}),MAKO:new Ms({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]}
1,{value:.75,color:[73,193,173,255]},{value:.875,color:[150,221,181,255]},{value:1,color:[222,245,229,255]}]})};const Ps=Object.freeze(Object.defineProperty({__proto__:null,addHeatmap:function(e,t){if(t.layerId&&e.getLayer(t.layerId))throw new Error(`A layer already exists with the layer id: ${t.layerId}`);const r=t.sourceId??ys(),n=t.layerId??gs(),o=t.minzoom??0,a=t.maxzoom??23,i=t.zoomCompensation??!0,s=t.opacity??[{zoom:o,value:0},{zoom:o+.25,value:1},{zoom:a-.25,value:1},{zoom:a,value:0}];let l=Array.isArray(t.colorRamp)?t.colorRamp:Is.TURBO.transparentStart();const u=l.getBounds();(0!==u.min||1!==u.max)&&(l=l.scale(0,1)),l.hasTransparentStart()||(l=l.transparentStart());const c=t.intensity??[{zoom:0,value:.01},{zoom:4,value:.2},{zoom:16,value:1}],p=t.property??null,h=t.weight??1;let d=1;p?"number"==typeof h?(d=h,"number"==typeof t.weight&&console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")):Array.isArray(h)?d=Ss(h,p):console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`"):"number"==typeof h?d=h:Array.isArray(h)&&console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");const f=[{zoom:0,value:1.25},{zoom:2,value:2.5},{zoom:4,value:5},{zoom:8,value:12.5},{zoom:16,value:50}],m=t.radius??(i?f:10);let y=1;"number"==typeof m?y=m:Array.isArray(m)&&"zoom"in m[0]?y=ws(m):p&&Array.isArray(m)&&"propertyValue"in m[0]?y=Cs(m,p,i):!p&&Array.isArray(m)&&"propertyValue"in m[0]?(y=ws(f),console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")):y=ws(f);const g={heatmapLayerId:n,heatmapSourceId:r};if(t.data&&!e.getSource(r)){let n=t.data;"string"==typeof n&&ie(n)&&(n=`https://api.maptiler.com/data/${n}/features.json?key=${H.apiKey}`),e.addSource(r,{type:"geojson",data:n})}return e.addLayer({id:n,type:"heatmap",source:r,minzoom:o,maxzoom:a,paint:{"heatmap-weight":d,"heatmap-intensity":"number"==typeof c?c:ws(c),"heatmap-color":_s(l),"heatmap-radius":y,"heatmap-opacity":"number"==typeof s?s:ws(s)}},t.beforeId),g},addPoint:function(e,t){if(t.layerId&&e.getLayer(t.layerId))throw new Error(`A layer already exists with the layer id: ${t.layerId}`);const r=t.minPointRadius??10,n=t.maxPointRadius??50,o=t.cluster??!1,a=20,i=Array.isArray(t.pointColor)?t.pointColor:Is.TURBO.scale(10,t.cluster?1e4:1e3).resample("ease-out-square"),s=i.getBounds(),l=t.sourceId??ys(),u=t.layerId??gs(),c=t.showLabel??o,p=t.alignOnViewport??!0,h=t.outline??!1,d=t.outlineOpacity??1,f=t.outlineWidth??1,m=t.outlineColor??"#FFFFFF";let y;const g=t.zoomCompensation??!0,v=t.minzoom??0,b=t.maxzoom??23;y="number"==typeof t.pointOpacity?t.pointOpacity:Array.isArray(t.pointOpacity)?ws(t.pointOpacity):t.cluster?Es(i,"point_count"):t.property?Es(i,t.property):ws([{zoom:v,value:0},{zoom:v+.25,value:1},{zoom:b-.25,value:1},{zoom:b,value:0}]);const w={pointLayerId:u,clusterLayerId:"",labelLayerId:"",pointSourceId:l};if(t.data&&!e.getSource(l)){let r=t.data;"string"==typeof r&&ie(r)&&(r=`https://api.maptiler.com/data/${r}/features.json?key=${H.apiKey}`),e.addSource(l,{type:"geojson",data:r,cluster:o})}if(o){w.clusterLayerId=`${u}_cluster`;const o=Array.from({length:a},((e,t)=>{const o=s.min+t*(s.max-s.min)/19;return{value:o,pointRadius:r+(n-r)*(t/19)**.5,color:i.getColorHex(o)}}));e.addLayer({id:w.clusterLayerId,type:"circle",source:l,filter:["has","point_count"],paint:{"circle-color":"string"==typeof t.pointColor?t.pointColor:Ls(o,"point_count"),"circle-radius":"number"==typeof t.pointRadius?t.pointRadius:Array.isArray(t.pointRadius)?ws(t.pointRadius):As(o,"point_count",!1),"circle-pitch-alignment":p?"viewport":"map","circle-pitch-scale":"map","circle-opacity":y,...h&&{"circle-stroke-opacity":"number"==typeof d?d:ws(d),"circle-stroke-width":"number"==typeof f?f:ws(f),"circle-stroke-color":"string"==typeof m?m:bs(m)}},minzoom:v,maxzoom:b},t.beforeId),e.addLayer({id:w.pointLayerId,type:"circle",source:l,filter:["!",["has","point_count"]],paint:{"circle-pitch-alignment":p?"viewport":"map","circle-pitch-scale":"map","circle-color":"string"==typeof t.pointColor?t.pointColor:i.getColorHex(i.getBounds().min),"circle-radius":"number"==typeof t.pointRadius?t.pointRadius:Array.isArray(t.pointRadius)?ws(t.pointRadius):.75*o[0].pointRadius,"circle-opacity":y,...h&&{"circle-stroke-opacity":"number"==typeof d?d:ws(d),"circle-stroke-width":"number"==typeof f?f:ws(f),"circle-stroke-color":"string"==typeof m?m:bs(m)}},minzoom:v,maxzoom:b},t.beforeId)}else{let o="string"==typeof t.pointColor?t.pointColor:Array.isArray(t.pointColor)?t.pointColor.getColorHex(t.pointColor.getBounds().min):ms(),u="number"==typeof t.pointRadius?g?ws([{zoom:0,value:.025*t.pointRadius},{zoom:2,value:.05*t.pointRadius},{zoom:4,value:.1*t.pointRadius},{zoom:8,value:.25*t.pointRadius},{zoom:16,value:1*t.pointRadius}]):t.pointRadius:Array.isArray(t.pointRadius)?ws(t.pointRadius):g?ws([{zoom:0,value:.05*r},{zoom:2,value:.1*r},{zoom:4,value:.2*r},{zoom:8,value:.5*r},{zoom:16,value:1*r}]):r;if(t.property&&Array.isArray(t.pointColor)){const e=Array.from({length:a},((e,o)=>{const a=s.min+o*(s.max-s.min)/19;return{value:a,pointRadius:"number"==typeof t.pointRadius?t.pointRadius:r+(n-r)*(o/19)**.5,color:"string"==typeof t.pointColor?t.pointColor:i.getColorHex(a)}}));o=Ls(e,t.property),u=As(e,t.property,g)}
1e.addLayer({id:w.pointLayerId,type:"circle",source:l,layout:{"circle-sort-key":t.property?["/",1,["get",t.property]]:0},paint:{"circle-pitch-alignment":p?"viewport":"map","circle-pitch-scale":"map","circle-color":o,"circle-opacity":y,"circle-radius":u,...h&&{"circle-stroke-opacity":"number"==typeof d?d:ws(d),"circle-stroke-width":"number"==typeof f?f:ws(f),"circle-stroke-color":"string"==typeof m?m:bs(m)}},minzoom:v,maxzoom:b},t.beforeId)}if(!1!==c&&(t.cluster||t.property)){w.labelLayerId=`${u}_label`;const r=t.labelColor??"#fff",n=t.labelSize??12;e.addLayer({id:w.labelLayerId,type:"symbol",source:l,filter:["has",t.cluster?"point_count":t.property],layout:{"text-field":t.cluster?"{point_count_abbreviated}":`{${t.property}}`,"text-font":["Noto Sans Regular"],"text-size":n,"text-pitch-alignment":p?"viewport":"map","symbol-sort-key":["/",1,["get",t.cluster?"point_count":t.property]]},paint:{"text-color":r,"text-opacity":y},minzoom:v,maxzoom:b},t.beforeId)}return w},addPolygon:function(e,t){if(t.layerId&&e.getLayer(t.layerId))throw new Error(`A layer already exists with the layer id: ${t.layerId}`);const r=t.sourceId??ys(),n=t.layerId??gs(),o={polygonLayerId:n,polygonOutlineLayerId:t.outline?`${n}_outline`:"",polygonSourceId:r};if(t.data&&!e.getSource(r)){let n=t.data;"string"==typeof n&&ie(n)&&(n=`https://api.maptiler.com/data/${n}/features.json?key=${H.apiKey}`),e.addSource(r,{type:"geojson",data:n})}let a=t.outlineDashArray??null;const i=t.outlineWidth??1,s=t.outlineColor??"#FFFFFF",l=t.outlineOpacity??1,u=t.outlineBlur??0,c=t.fillColor??ms(),p=t.fillOpacity??1,h=t.outlinePosition??"center",d=t.pattern??null;"string"==typeof a&&(a=ks(a));const f=(d=null)=>{if(e.addLayer({id:n,type:"fill",source:r,minzoom:t.minzoom??0,maxzoom:t.maxzoom??23,paint:{"fill-color":"string"==typeof c?c:bs(c),"fill-opacity":"number"==typeof p?p:ws(p),...d&&{"fill-pattern":d}}},t.beforeId),!0===t.outline){let n;n="inside"===h?"number"==typeof i?.5*i:ws(i.map((({zoom:e,value:t})=>({zoom:e,value:.5*t})))):"outside"===h?"number"==typeof i?-.5*i:ws(i.map((e=>({zoom:e.zoom,value:-.5*e.value})))):0,e.addLayer({id:o.polygonOutlineLayerId,type:"line",source:r,layout:{"line-join":t.outlineJoin??"round","line-cap":t.outlineCap??"butt"},minzoom:t.minzoom??0,maxzoom:t.maxzoom??23,paint:{"line-opacity":"number"==typeof l?l:ws(l),"line-color":"string"==typeof s?s:bs(s),"line-width":"number"==typeof i?i:ws(i),"line-blur":"number"==typeof u?u:ws(u),"line-offset":n,...a&&{"line-dasharray":a}}},t.beforeId)}};return d?e.hasImage(d)?f(d):e.loadImage(d).then((t=>{e.addImage(d,t.data),f(d)})).catch((e=>{console.error("Could not load the pattern image.",e.message),f()})):f(),o},addPolyline:async function(e,t,r={}){var n,o;if(!t.sourceId&&!t.data)throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");let a=t.data;if("string"==typeof a){if(ie(a))a=`https://api.maptiler.com/data/${t.data}/features.json?key=${H.apiKey}`;else if("gpx"===(null==(n=a.split(".").pop())?void 0:n.toLowerCase().trim())){a=qi(await(await fetch(a,r)).text())}else if("kml"===(null==(o=a.split(".").pop())?void 0:o.toLowerCase().trim())){a=Gi(await(await fetch(a,r)).text())}else{const e=function(e){try{return JSON.parse(e)}catch{}return null}(a)??ds(a);e&&(a=e)}if(!a)throw new Error("Polyline data was provided as string but is incompatible with valid formats.")}return function(e,t){if(t.layerId&&e.getLayer(t.layerId))throw new Error(`A layer already exists with the layer id: ${t.layerId}`);const r=t.sourceId??ys(),n=t.layerId??gs(),o={polylineLayerId:n,polylineOutlineLayerId:"",polylineSourceId:r};t.data&&!e.getSource(r)&&e.addSource(r,{type:"geojson",data:t.data});const a=t.lineWidth??3,i=t.lineColor??ms(),s=t.lineOpacity??1,l=t.lineBlur??0,u=t.lineGapWidth??0;let c=t.lineDashArray??null;const p=t.outlineWidth??1,h=t.outlineColor??"#FFFFFF",d=t.outlineOpacity??1,f=t.outlineBlur??0;if("string"==typeof c&&(c=ks(c)),!0===t.outline){const i=`${n}_outline`;o.polylineOutlineLayerId=i,e.addLayer({id:i,type:"line",source:r,layout:{"line-join":t.lineJoin??"round","line-cap":t.lineCap??"round"},minzoom:t.minzoom??0,maxzoom:t.maxzoom??23,paint:{"line-opacity":"number"==typeof d?d:ws(d),"line-color":"string"==typeof h?h:bs(h),"line-width":xs(a,p),"line-blur"
1:"number"==typeof f?f:ws(f)}},t.beforeId)}return e.addLayer({id:n,type:"line",source:r,layout:{"line-join":t.lineJoin??"round","line-cap":t.lineCap??"round"},minzoom:t.minzoom??0,maxzoom:t.maxzoom??23,paint:{"line-opacity":"number"==typeof s?s:ws(s),"line-color":"string"==typeof i?i:bs(i),"line-width":"number"==typeof a?a:ws(a),"line-blur":"number"==typeof l?l:ws(l),"line-gap-width":"number"==typeof u?u:ws(u),...c&&{"line-dasharray":c}}},t.beforeId),o}(e,{...t,data:a})},colorDrivenByProperty:Ls,colorPalettes:fs,computeRampedOutlineWidth:xs,dashArrayMaker:ks,generateRandomLayerName:gs,generateRandomSourceName:ys,getRandomColor:ms,heatmapIntensityFromColorRamp:_s,lerpZoomNumberValues:vs,opacityDrivenByProperty:Es,paintColorOptionsToPaintSpec:bs,radiusDrivenByProperty:As,radiusDrivenByPropertyHeatmap:Cs,rampedOptionsToLayerPaintSpec:ws,rampedPropertyValueWeight:Ss,takeScreenshot:async function(e,t={}){const r=t.download??!1,n=await function(e){return new Promise(((t,r)=>{e.redraw(),e.once("idle",(()=>{e.getCanvas().toBlob((e=>{e?t(e):r(Error("Screenshot could not be created."))}),"image/png")}))}))}(e);if(r){const e=t.filename??"maptiler_screenshot.png",r=document.createElement("a");r.style.display="none",document.body.appendChild(r),r.href=URL.createObjectURL(n),r.download=e,r.click(),setTimeout((()=>{document.body.removeChild(r),URL.revokeObjectURL(r.href)}),0)}return n}},Symbol.toStringTag,{value:"Module"}));function zs(e,t,r){return e+(t-e)*r}function Rs(e){if(0===e.length)throw new Error("[lerpArrayValues]: Array empty, nothing to interpolate");if(e.every((e=>null===e)))throw new Error("[lerpArrayValues]: Cannot interpolate an array where all values are `null`");return e.map(((e,t,r)=>{if("number"==typeof e)return e;const[n,o]=function(e,t){for(let r=t-1;r>=0;r--)if(null!==e[r])return[r,e[r]];return[null,null]}(r,t),[a,i]=function(e,t){for(let r=t+1;r<e.length;r++)if(null!==e[r])return[r,e[r]];return[null,null]}(r,t);if(null===n||null===o)return r[t+1];if(null===a||null===i)return o;return zs(o,i,(t-n)/(a-n))}))}const $s={defaultEasing:"Linear",pathSmoothing:{resolution:20,epsilon:5}},Os=["MultiPoint","LineString","MultiLineString","Polygon"];function js(e,t={}){const{defaultEasing:r,pathSmoothing:n,ignoreFields:o}={...$s,...t},a=e.geometry,i=e.properties??{},s=i["@easing"];s||console.warn(`[parseGeoJSONFeatureToKeyframes]: No '@easing' property found in GeoJSON properties, using default easing ${r}`);const l=i["@delta"];if(l||console.warn("[parseGeoJSONFeatureToKeyframes]: No '@delta' property found in GeoJSON properties, delta for each frame will default to its index divided by the total"),!a.type)throw new Error("[parseGeoJSONFeatureToKeyframes]: No geometry found in feature");if(!Os.includes(a.type))throw new Error(`[parseGeoJSONFeatureToKeyframes]: Geometry type '${a.type}' is not supported. Accepted types are: ${Os.join(", ")}`);const u="LineString"!==a.type&&"MultiPoint"!==a.type?a.coordinates.flat():a.coordinates,c=u.map((e=>e.length>2?e[2]:null)),p=c.every((e=>null===e)),h=Object.entries({...i,...!p&&{altitude:c}}).reduce(((e,[t,r])=>t.startsWith("@")||null!=o&&o.includes(t)?e:{...e,[t]:r}),{}),d=l??u.map(((e,t)=>t/u.length)),f=s??d.map((()=>r??"Linear"));if(u.some((e=>e.length>2))&&console.warn("[parseGeoJSONFeatureToKeyframes]: Smoothing is not supported for 3D paths, only 2D smoothing will be applied, ignoring altitude"),n){const e=Us(u,n.resolution,n.epsilon),t=Rs(Fs([0,1],e.length)),o=t.map((()=>r??"Linear")),a=Object.entries(h).reduce(((t,[r,n])=>{if(!Array.isArray(n))return t;const o=Fs(n,e.length);return{...t,[r]:o}}),{});return Ns(e,t,o,a)}return Ns(u,d,f,h)}function Fs(e,t){const r=e.map(((r,n)=>{const o=n/(e.length-1);return Math.round(o*(t-1))}));return Array.from({length:t},((t,n)=>r.includes(n)?e[r.indexOf(n)]:null))}function Ns(e,t,r,n={}){if(!function(...e){const t=e[0].length;return e.every((e=>e.length===t))}(e,t,r,...Object.values(n)))throw new Error(`\n      [parseGeoJSONFeatureToKeyframes]: If smoothing is not applied, coordinates, deltas, easings and property arrays must be the same length\n\n      Coordinates: ${e.length}\n      Deltas: ${t.length}\n      Easing: ${r.length}\n      Properties:\n        ${Object.entries(n).map((([e,t])=>`"${e}": ${t.length}`)).join(",\n        ")}\n    `);const o=e.some((e=>e.length>2));return e.map(((e,a)=>{const i=t[a],s=r[a];return{props:{...Object.entries(n).reduce(((e,[t,r])=>({...e,[t]:r[a]})),{}),lng:e[0],lat:e[1],...o&&{altitude:e[2]??null}},delta:i,easing:s}}))}function Ds(e,t,r,n,o,a,i,s){const l=[r[0]+(n[0]-t[0])/6,r[1]+(n[1]-t[1])/6],u=[n[0]-(o[0]-r[0])/6,n[1]-(o[1]-r[1])/6],c=1/a;let p=i-c;for(let f=i;f<=s;f+=c){const t=(1-f)**3*r[0]+3*(1-f)**2*f*l[0]+3*(1-f)*f**2*u[0]+f**3*n[0],o=(1-f)**3*r[1]+3*(1-f)**2*f*l[1]+3*(1-f)*f**2*u[1]+f**3*n[1];e.push([t,o]),p=f}const h=(1-s)**3*r[0]+3*(1-s)**2*s*l[0]+3*(1-s)*s**2*u[0]+s**3*n[0],d=(1-s)**3*r[1]+3*(1-s)**2*s*l[1]+3*(1-s)*s**2*u[1]+s**3*n[1];s-p>1e-10?e.push([h,d]):e[e.length-1]=[h,d]}function Us(e,t=20,r){const n="number"==typeof r?qs(e,r):e;if(n.length<4)return n;"number"==typeof r&&(n[n.length-1]=[...e[e.length-1]]);const o=[];Ds(o,[2*n[0][0]-n[1][0],2*n[0][1]-n[1][1]],n[0],n[1],n[2],t,0,1);const a=1/t;for(let s=1;s<n.length-2;s++){Ds(o,n[s-1],n[s],n[s+1],n[s+2],t,a,1)}const i=[2*n[n.length-1][0]-n[n.length-2][0],2*n[n.length-1][1]-n[n.length-2][1]];return Ds(o,n[n.length-3],n[n.length-2],n[n.length-1],i,t,a,1),o}function Bs(e){return e.map(((t,r)=>{if(0===r)return 0;const n=e[r-1],o=new Ml(t[0],t[1]),a=new Ml(n[0],n[1]);return o.distanceTo(a)})).reduce(((e,t)=>e+t),0)/e.length}function qs(e,t){const r=Gs(e,Bs(e)*t);if(r.length<2)return r;const n=[r[0]];let o=r[0];for(let a=1;a<r.length;a++){const e=r[a],i=new Ml(o[0],o[1]),s=new Ml(e[0],e[1]);i.distanceTo(s)>=t&&(n.push(e),o=e)}return n.push([...e[e.length-1]]),n}function Gs(e,t=10){if(e.length<2)return e;const r=[e[0]];let n=t;for(let i=0;i<e.length-1;){const o=Ml.convert(e[i]),a=Ml.convert(e[i+1]),s=o.distanceTo(a);if(s<n)n-=s,i++;else{const l=n/s,u=[zs(o.lng,a.lng,l),zs(o.lat,a.lat,l)];r.push(u),e[i]=u,n=t}}const o=e[e.length-1],a=r[r.length-1];return(a[0]!==o[0]||a[1]!==o[1])&&r.push([o[0],o[1]]),r}const Vs={animations:new Array,running:!1,add(e){this.animations.push(e),this.running||(this.running=!0,this.start())},remove(e){this.animations=this.animations.filter((t=>t!==e)),0===this.animations.length&&this.stop()},stop(){this.running=!1}
1,start(){if(!this.running)return;const e=()=>{0!==this.animations.length?(this.animations.forEach((e=>{e.isPlaying&&e.updateInternal()})),requestAnimationFrame(e)):this.running=!1};e()}},Hs=["pause","reset","play","stop","timeupdate","scrub","playbackratechange","animationstart","animationend","keyframe","iteration"],Ws={Linear:function(e){return e},QuadraticIn:function(e){return e*e},QuadraticOut:function(e){return e*(2-e)},QuadraticInOut:function(e){let t=2*e;return t<1?.5*t*t:(t-=1,-.5*(t*(t-2)-1))},CubicIn:function(e){return e*e*e},CubicOut:function(e){return--e*e*e+1},CubicInOut:function(e){let t=2*e;return t<1?.5*t*t*t:(t-=2,.5*(t*t*t+2))},SinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},SinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},SinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},ExponentialIn:function(e){return 0===e?0:1024**(e-1)},ExponentialOut:function(e){return 1===e?1:1-2**(-10*e)},ExponentialInOut:function(e){if(0===e)return 0;if(1===e)return 1;const t=2*e;return t<1?.5*1024**(t-1):.5*(2-2**(-10*(t-1)))},ElasticIn:function(e){let t=.1;let r;return 0===e?0:1===e?1:(t<1?(t=1,r=.1):r=.4*Math.asin(1/t)/(2*Math.PI),e-=1,-t*2**(10*e)*Math.sin((e-r)*(2*Math.PI)/.4))},ElasticOut:function(e){let t=.1;let r;return 0===e?0:1===e?1:(t<1?(t=1,r=.1):r=.4*Math.asin(1/t)/(2*Math.PI),t*2**(-10*e)*Math.sin((e-r)*(2*Math.PI)/.4)+1)},ElasticInOut:function(e){let t=.1;const r=.4;let n;if(0===e)return 0;if(1===e)return 1;t<1?(t=1,n=.1):n=r*Math.asin(1/t)/(2*Math.PI);const o=2*e;if(o<1){const e=o-1;return t*2**(10*e)*Math.sin((e-n)*(2*Math.PI)/r)*-.5}const a=o-1;return t*2**(-10*a)*Math.sin((a-n)*(2*Math.PI)/r)*.5+1},BounceIn:Zs,BounceOut:Ks,BounceInOut:function(e){return e<.5?.5*Zs(2*e):.5*Ks(2*e-1)+.5}};function Zs(e){return 1-Ks(1-e)}function Ks(e){if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){const t=e-.5454545454545454;return 7.5625*t*t+.75}if(e<2.5/2.75){const t=e-.8181818181818182;return 7.5625*t*t+.9375}const t=e-2.625/2.75;return 7.5625*t*t+.984375}class Xs{constructor({keyframes:e,duration:t,iterations:r,manualMode:n,delay:o}){c(this,"playing",!1),c(this,"iterations"),c(this,"currentIteration",0),c(this,"keyframes"),c(this,"currentKeyframe"),c(this,"duration"),c(this,"effectiveDuration"),c(this,"playbackRate"),c(this,"currentTime"),c(this,"currentDelta"),c(this,"animationStartTime",0),c(this,"lastFrameAt",0),c(this,"delay",0),c(this,"delayTimeoutID"),c(this,"listeners",Hs.reduce(((e,t)=>(e[t]=[],e)),{})),c(this,"previousProps");const a=e.map((({props:e})=>Object.keys(e))).flat().reduce(((e,t)=>(t&&!e.includes(t)&&e.push(t),e)),[]),i=e.sort(((e,t)=>e.delta-t.delta)).map((e=>{const t=a.reduce(((e,t)=>t in e?e:{...e,[t]:null}),e.props);return{...e,props:t}})),s=i.map((({props:e})=>e)).reduce(((e,t)=>{for(const[r,n]of Object.entries(t))r in e||(e[r]=[]),e[r].push(n);return e}),{}),l=Object.entries(s).reduce(((e,[t,r])=>(e[t]=Rs(r),e)),{});this.keyframes=i.map(((e,t)=>({...e,props:a.reduce(((e,r)=>(e[r]=l[r][t],e)),{}),easing:e.easing??"Linear",id:crypto.randomUUID()}))),this.duration=t,this.iterations=r,this.delay=o??0,this.playbackRate=1,this.effectiveDuration=t/this.playbackRate,this.currentTime=0,this.currentDelta=0,n||Vs.add(this)}get isPlaying(){return this.playing}play(){if(this.playing)return this;if(this.delayTimeoutID)return this;const e=()=>{this.playing=!0,this.animationStartTime=performance.now(),this.lastFrameAt=this.animationStartTime,this.emitEvent("play")};return this.delay>0?this.delayTimeoutID=window.setTimeout((()=>{e(),this.delayTimeoutID=void 0}),this.delay/this.playbackRate):e(),this}pause(){return this.playing=!1,this.emitEvent("pause"),this}stop(e=!1){return this.playing=!1,e||this.emitEvent("stop"),this}reset(e=!0){return this.stop(!0),window.clearTimeout(this.delayTimeoutID),this.currentTime=0,this.currentDelta=this.playbackRate<0?1:0,this.emitEvent("reset"),this.update(!1,!0),e||this.play(),this}updateInternal(){return this.playing?this.update(!1):this}update(e=!0,t=!1){const r=performance.now();if(this.currentDelta>=1||this.currentDelta<0){if(this.emitEvent("animationend"),!(0===this.iterations||this.currentIteration<this.iterations))return this.stop(),this;this.reset(e)}if(!t){const t=e?16:r-this.lastFrameAt,n=r-this.animationStartTime;this.lastFrameAt=r;const o=n*this.playbackRate;this.currentTime=o,this.currentDelta+=t/this.effectiveDuration}this.currentDelta>1&&(this.currentIteration=1),this.currentDelta<0&&(this.currentDelta=0);const{next:n,current:o}=this.getCurrentAndNextKeyFramesAtDelta(this.currentDelta);(null==o?void 0:o.id)!==this.currentKeyframe&&this.emitEvent("keyframe",o,n),this.currentKeyframe=null==o?void 0:o.id;const a=Object.keys((null==o?void 0:o.props)??{}).reduce(((e,t)=>{if(o&&n){const r=o.props[t],a=n.props[t],i=(this.currentDelta-o.delta)/(n.delta-o.delta),s=(Ws[o.easing]??(e=>e))(i);e[t]=zs(r,a,s)}return o&&!n&&(e[t]=o.props[t]),e}),{});return this.previousProps||(this.previousProps=this.keyframes[0].props),this.emitEvent("timeupdate",o,n,a,this.previousProps),(this.currentDelta>=1||this.currentDelta<0)&&!t&&(this.currentIteration+=1,this.emitEvent("iteration",null,null,{})),this.previousProps={...a},this}getCurrentAndNextKeyFramesAtTime(e){return this.getCurrentAndNextKeyFramesAtDelta(e/this.effectiveDuration)}getCurrentAndNextKeyFramesAtDelta(e){const t=this.keyframes.find((t=>t.delta>e))??null;return{current:this.keyframes.findLast((t=>
1t.delta<=e))??null,next:t}}getCurrentTime(){return this.currentTime}setCurrentTime(e){if(e>this.effectiveDuration)throw new Error("Cannot set time greater than duration");return this.currentTime=e,this.currentDelta=e/this.effectiveDuration,this.emitEvent("scrub"),this}getCurrentDelta(){return this.currentDelta}setCurrentDelta(e){if(e>1)throw new Error("Cannot set delta greater than 1");return this.animationStartTime=performance.now(),this.lastFrameAt=this.animationStartTime,this.currentDelta=e,this.currentTime=e*this.effectiveDuration,this.update(!1,!0),this.emitEvent("scrub"),this}setPlaybackRate(e){return this.playbackRate=e,this.effectiveDuration=this.duration/this.playbackRate,this.emitEvent("playbackratechange"),this}getPlaybackRate(){return this.playbackRate}addEventListener(e,t){return e in this.listeners?(this.listeners[e].push(t),this):(console.warn(`Event type ${e} does not exist, ignoring`),this)}removeEventListener(e,t){return e in this.listeners?(this.listeners[e]=this.listeners[e].filter((e=>e!==t)),this):(console.warn(`Event type ${e} does not exist, ignoring`),this)}emitEvent(e,t,r,n={},o){this.listeners[e].forEach((a=>{a({type:e,target:this,currentTime:this.currentTime,currentDelta:this.currentDelta,playbackRate:this.playbackRate,keyframe:t,nextKeyframe:r??t,props:n,previousProps:o??n})}))}clone(){return new Xs({keyframes:structuredClone(this.keyframes),duration:this.duration,iterations:this.iterations})}destroy(){this.stop(),this.listeners=Hs.reduce(((e,t)=>(e[t]=[],e)),{}),Vs.remove(this)}}const Js="animated-route-layer";class Ys{constructor({keyframes:e,source:t,duration:r,iterations:n,easing:o,delay:a,cameraAnimation:i={},pathStrokeAnimation:l={activeColor:[255,0,0,1],inactiveColor:[0,0,255,1]},autoplay:u,manualUpdate:p=!1}){c(this,"id",`${Js}-${(0,s.A)()}`),c(this,"type","custom"),c(this,"animationInstance",null),c(this,"keyframes",null),c(this,"source",null),c(this,"duration"),c(this,"iterations"),c(this,"delay"),c(this,"easing"),c(this,"map"),c(this,"cameraMaptilerAnimationOptions"),c(this,"pathStrokeAnimation"),c(this,"autoplay",!1),c(this,"manualUpdate",!1),c(this,"enquedEventHandlers",Hs.reduce(((e,t)=>(e[t]=[],e)),{})),c(this,"enquedCommands",[]),this.keyframes=e??null,this.source=t??null,r&&(this.duration=r),n&&(this.iterations=n),a&&(this.delay=a),this.easing=o,this.cameraMaptilerAnimationOptions=!!i&&{pathSmoothing:{resolution:20,epsilon:5},follow:!0,...i&&i},l&&(this.pathStrokeAnimation=l),this.autoplay=u??!1,this.manualUpdate=p,this.update=this.update.bind(this)}async onAdd(e){if(this.map=e,this.map.getLayersOrder().some((e=>e.includes(Js)&&this.id!==e)))throw new Error("[AnimatedRouteLayer.onAdd]: Currently, you can only have one active AnimatedRouteLayer at a time. Please remove the existing one before adding a new one.");const t=await this.getMaptilerAnimationOptions();this.animationInstance=new Xs({...t,manualMode:this.manualUpdate}),this.animationInstance.addEventListener("timeupdate",this.update),Object.entries(this.enquedEventHandlers).forEach((([e,t])=>{const r=e;t.forEach((e=>{var t;null==(t=this.animationInstance)||t.addEventListener(r,e)})),this.enquedEventHandlers[r]=[]})),this.enquedCommands.forEach((e=>{e()})),this.enquedCommands=[],this.autoplay&&this.animationInstance.play()}frameAdvance(){return this.animationInstance&&this.manualUpdate&&this.animationInstance.update(!0),this}addEventListener(e,t){return this.animationInstance?(this.animationInstance.addEventListener(e,t),this):(this.enquedEventHandlers[e].push(t),this)}removeEventListener(e,t){return this.animationInstance?(this.animationInstance.removeEventListener(e,t),this):this}updateManual(){this.animationInstance&&this.manualUpdate&&this.animationInstance.update(!0)}update(e){const{props:t,currentDelta:r}=e;if(this.source&&this.pathStrokeAnimation){const{activeColor:e,inactiveColor:t}=this.pathStrokeAnimation;r>=1?this.map.setPaintProperty(this.source.layerID,"line-gradient",["interpolate",["linear"],["line-progress"],0,["rgba",...e],1,["rgba",...e]]):this.map.setPaintProperty(this.source.layerID,"line-gradient",["interpolate",["linear"],["line-progress"],0,["rgba",...e],1e-4+r,["rgba",...e],11e-5+r,["rgba",...t],1,["rgba",...t]])}if(t&&this.cameraMaptilerAnimationOptions&&this.cameraMaptilerAnimationOptions.follow){const{lng:e,lat:r,bearing:n,zoom:o,pitch:a,elevation:i}=t;this.map.jumpTo({center:[e,r],pitch:a??this.map.getPitch(),zoom:o??this.map.getZoom(),bearing:n??this.map.getBearing(),elevation:i??this.map.getCenterElevation()})}}play(){return this.animationInstance?(this.animationInstance.play(),this):(this.enquedCommands.push((()=>{var e;null==(e=this.animationInstance)||e.play()})),this)}pause(){return this.animationInstance?(this.animationInstance.pause(),this):(this.enquedCommands.push((()=>{var e;null==(e=this.animationInstance)||e.pause()})),this)}async getMaptilerAnimationOptions(){const e=this.map;if(this.source){const t=e.getSource(this.source.id);if(t){let e=await(null==t?void 0:t.getData());if(!e)throw new Error("[AnimatedRouteLayer.onAdd]: No feature found in source data");if("FeatureCollection"===e.type&&(console.warn("[AnimatedRouteLayer.onAdd]: FeatureCollection found in source data, only single geojson features are currently supported, first feature will be used"),e=e.features[0]),"Feature"!==e.type)throw new Error("[AnimatedRouteLayer.onAdd]: The first feature in the source data is not a valid GeoJSON of type `Feature`");const r=e;r.properties["@duration"]&&(this.duration=r.properties["@duration"]??1e3),r.properties["@iterations"]&&(this.iterations=r.properties["@iterations"]??0),r.properties["@delay"]&&(this.delay=r.properties["@delay"]??0),r.properties["@autoplay"]&&(this.autoplay=r.properties["@autoplay"]??!1);return{keyframes:js(r,{pathSmoothing:!!this.cameraMaptilerAnimationOptions&&this.cameraMaptilerAnimationOptions.pathSmoothing,defaultEasing:this.easing}),duration:this.duration,iterations:this.iterations,delay:this.delay,autoplay:this.autoplay}}}if(this.keyframes)return{keyframes:this.keyframes,duration:this.duration,iterations:this.iterations,delay:this.delay,autoplay:this.autoplay};throw new Error("[AnimatedRouteLayer.onAdd]: No keyframes or source provided")}onRemove(){var e;null==(e=this.animationInstance)||e.destroy()}render(){}}function Qs(){return"3.11.0"}const el=n.Map,tl=n.Marker,rl=n.Popup,nl=n.Style,ol=n.CanvasSource,al=n.GeoJSONSource,il=n.ImageSource,sl=n.RasterTileSource,ll=n.RasterDEMTileSource,ul=n.VectorTileSource,cl=n.VideoSource,pl=n.NavigationControl,hl=n.GeolocateControl,dl=n.AttributionControl,fl=n.LogoControl,ml=n.ScaleControl,yl=n.FullscreenControl,gl=n.TerrainControl,vl=n.BoxZoomHandler,bl=n.ScrollZoomHandler,wl=n.CooperativeGesturesHandler,xl=n.KeyboardHandler,Sl=n.TwoFingersTouchPitchHandler,kl=n.MapWheelEvent,Ll=n.MapTouchEvent,Al=n.MapMouseEvent,Cl=n.config,El=n.getVersion,{setRTLTextPlugin:_l,getRTLTextPluginStatus:Tl,LngLat:Ml,LngLatBounds:Il,MercatorCoordinate:Pl,Evented:zl,AJAXError:Rl,prewarm:$l,clearPrewarmedResources:Ol,Hash:jl,Point:Fl,EdgeInsets:Nl,DragRotateHandler:Dl,DragPanHandler:Ul,TwoFingersTouchZoomRotateHandler:Bl,DoubleClickZoomHandler:ql,TwoFingersTouchZoomHandler:Gl,TwoFingersTouchRotateHandler:Vl,getWorkerCount:Hl,setWorkerCount:Wl,getMaxParallelImageRequests:Zl,setMaxParallelImageRequests:Kl,getWorkerUrl:Xl,setWorkerUrl:Jl,addSourceType:Yl,importScriptInWorkers:Ql,addProtocol:eu,removeProtocol:tu}=n}}]);
2//# sourceMappingURL=fe0912fa-768024211180c85c9a5b.js.map

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.