@maptiler/sdk 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as maplibre_gl from 'maplibre-gl';
2
- import maplibre_gl__default, { MapOptions as MapOptions$1, StyleSpecification, ControlPosition, StyleOptions, LogoOptions as LogoOptions$1 } from 'maplibre-gl';
2
+ import maplibre_gl__default, { MapOptions as MapOptions$1, StyleSpecification, ControlPosition, StyleOptions, Map as Map$1, LogoOptions as LogoOptions$1 } from 'maplibre-gl';
3
3
  export * from 'maplibre-gl';
4
4
  import * as _mapbox_mapbox_gl_supported from '@mapbox/mapbox-gl-supported';
5
5
  import { FetchFunction, ReferenceMapStyle, MapStyleVariant } from '@maptiler/client';
@@ -254,10 +254,10 @@ declare type MapOptions = Omit<MapOptions$1, "style" | "maplibreLogo"> & {
254
254
  * The Map class can be instanciated to display a map in a `<div>`
255
255
  */
256
256
  declare class Map extends maplibre_gl__default.Map {
257
- private languageShouldUpdate;
258
- private isStyleInitialized;
259
257
  private isTerrainEnabled;
260
258
  private terrainExaggeration;
259
+ private primaryLanguage;
260
+ private secondaryLanguage;
261
261
  constructor(options: MapOptions);
262
262
  /**
263
263
  * Update the style of the map.
@@ -282,11 +282,21 @@ declare class Map extends maplibre_gl__default.Map {
282
282
  */
283
283
  setPrimaryLanguage(language?: LanguageString): void;
284
284
  /**
285
- * Define the secondary language of the map.
285
+ * Define the secondary language of the map. Note that this is not supported by all the map styles
286
286
  * Note that most styles do not allow a secondary language and this function only works if the style allows (no force adding)
287
287
  * @param language
288
288
  */
289
289
  setSecondaryLanguage(language?: LanguageString): void;
290
+ /**
291
+ * Get the primary language
292
+ * @returns
293
+ */
294
+ getPrimaryLanguage(): LanguageString;
295
+ /**
296
+ * Get the secondary language
297
+ * @returns
298
+ */
299
+ getSecondaryLanguage(): LanguageString;
290
300
  /**
291
301
  * Get the exaggeration factor applied to the terrain
292
302
  * @returns
@@ -337,14 +347,149 @@ declare class Map extends maplibre_gl__default.Map {
337
347
  getMaptilerSessionId(): string;
338
348
  }
339
349
 
340
- declare const GeolocateControl$1: typeof maplibre_gl.GeolocateControl;
350
+ /**
351
+ * This is an extension of MapLibre Marker to make it fully type compatible with the SDK
352
+ */
353
+
354
+ declare class Marker extends maplibre_gl__default.Marker {
355
+ addTo(map: Map | Map$1): this;
356
+ }
357
+
358
+ /**
359
+ * This is an extension of MapLibre Popup to make it fully type compatible with the SDK
360
+ */
361
+
362
+ declare class Popup extends maplibre_gl__default.Popup {
363
+ addTo(map: Map | Map$1): this;
364
+ }
365
+
366
+ /**
367
+ * This is an extension of MapLibre Style to make it fully type compatible with the SDK
368
+ */
369
+
370
+ declare class Style extends maplibre_gl__default.Style {
371
+ constructor(map: Map, options?: StyleOptions);
372
+ }
373
+
374
+ /**
375
+ * This is an extension of MapLibre CanvasSource to make it fully type compatible with the SDK
376
+ */
377
+
378
+ declare class CanvasSource extends maplibre_gl__default.CanvasSource {
379
+ onAdd(map: Map | Map$1): void;
380
+ }
381
+
382
+ /**
383
+ * This is an extension of MapLibre GeoJSONSource to make it fully type compatible with the SDK
384
+ */
385
+
386
+ declare class GeoJSONSource extends maplibre_gl__default.GeoJSONSource {
387
+ onAdd(map: Map | Map$1): void;
388
+ }
389
+
390
+ /**
391
+ * This is an extension of MapLibre ImageSource to make it fully type compatible with the SDK
392
+ */
393
+
394
+ declare class ImageSource extends maplibre_gl__default.ImageSource {
395
+ onAdd(map: Map | Map$1): void;
396
+ }
397
+
398
+ /**
399
+ * This is an extension of MapLibre RasterTileSource to make it fully type compatible with the SDK
400
+ */
401
+
402
+ declare class RasterTileSource extends maplibre_gl__default.RasterTileSource {
403
+ onAdd(map: Map | Map$1): void;
404
+ }
405
+
406
+ /**
407
+ * This is an extension of MapLibre RasterDEMTileSource to make it fully type compatible with the SDK
408
+ */
409
+
410
+ declare class RasterDEMTileSource extends maplibre_gl__default.RasterDEMTileSource {
411
+ onAdd(map: Map | Map$1): void;
412
+ }
413
+
414
+ /**
415
+ * This is an extension of MapLibre VectorTileSource to make it fully type compatible with the SDK
416
+ */
417
+
418
+ declare class VectorTileSource extends maplibre_gl__default.VectorTileSource {
419
+ onAdd(map: Map | Map$1): void;
420
+ }
421
+
422
+ /**
423
+ * This is an extension of MapLibre VideoSource to make it fully type compatible with the SDK
424
+ */
425
+
426
+ declare class VideoSource extends maplibre_gl__default.VideoSource {
427
+ onAdd(map: Map | Map$1): void;
428
+ }
429
+
430
+ /**
431
+ * This is an extension of MapLibre NavigationControl to make it fully type compatible with the SDK
432
+ */
433
+
434
+ declare class NavigationControl extends maplibre_gl__default.NavigationControl {
435
+ onAdd(map: Map | Map$1): HTMLElement;
436
+ }
437
+
438
+ /**
439
+ * This is an extension of MapLibre GeolocateControl to make it fully type compatible with the SDK
440
+ */
441
+
442
+ declare class GeolocateControl extends maplibre_gl__default.GeolocateControl {
443
+ onAdd(map: Map | Map$1): HTMLElement;
444
+ }
445
+
446
+ /**
447
+ * This is an extension of MapLibre AttributionControl to make it fully type compatible with the SDK
448
+ */
449
+
450
+ declare class AttributionControl extends maplibre_gl__default.AttributionControl {
451
+ onAdd(map: Map | Map$1): HTMLElement;
452
+ }
453
+
454
+ /**
455
+ * This is an extension of MapLibre LogoControl to make it fully type compatible with the SDK
456
+ */
457
+
458
+ declare class LogoControl extends maplibre_gl__default.LogoControl {
459
+ onAdd(map: Map | Map$1): HTMLElement;
460
+ }
461
+
462
+ /**
463
+ * This is an extension of MapLibre ScaleControl to make it fully type compatible with the SDK
464
+ */
465
+
466
+ declare class ScaleControl extends maplibre_gl__default.ScaleControl {
467
+ onAdd(map: Map | Map$1): HTMLElement;
468
+ }
469
+
470
+ /**
471
+ * This is an extension of MapLibre FullscreenControl to make it fully type compatible with the SDK
472
+ */
473
+
474
+ declare class FullscreenControl extends maplibre_gl__default.FullscreenControl {
475
+ onAdd(map: Map | Map$1): HTMLElement;
476
+ }
477
+
478
+ /**
479
+ * This is an extension of MapLibre TerrainControl to make it fully type compatible with the SDK
480
+ */
481
+
482
+ declare class TerrainControl extends maplibre_gl__default.TerrainControl {
483
+ onAdd(map: Map | Map$1): HTMLElement;
484
+ }
485
+
341
486
  /**
342
487
  * The MaptilerGeolocateControl is an extension of the original GeolocateControl
343
488
  * with a few changes. In this version, the active mode persists as long as the
344
489
  * location is still centered. This means it's robust to rotation, pitch and zoom.
345
490
  *
346
491
  */
347
- declare class MaptilerGeolocateControl extends GeolocateControl$1 {
492
+ declare class MaptilerGeolocateControl extends GeolocateControl {
348
493
  private lastUpdatedCenter;
349
494
  /**
350
495
  * Update the camera location to center on the current position
@@ -366,7 +511,7 @@ declare type LogoOptions = LogoOptions$1 & {
366
511
  * This LogoControl extends the MapLibre LogoControl but instead can use any image URL and
367
512
  * any link URL. By default this is using MapTiler logo and URL.
368
513
  */
369
- declare class MaptilerLogoControl extends maplibre_gl__default.LogoControl {
514
+ declare class MaptilerLogoControl extends LogoControl {
370
515
  private logoURL;
371
516
  private linkURL;
372
517
  constructor(options?: LogoOptions);
@@ -571,28 +716,6 @@ declare class Point {
571
716
  declare const supported: _mapbox_mapbox_gl_supported.IsSupported;
572
717
  declare const setRTLTextPlugin: (url: string, callback: (error?: Error) => void, deferred?: boolean) => void;
573
718
  declare const getRTLTextPluginStatus: () => string;
574
- declare const NavigationControl: typeof maplibre_gl.NavigationControl;
575
- declare const GeolocateControl: typeof maplibre_gl.GeolocateControl;
576
- declare const AttributionControl: typeof maplibre_gl.AttributionControl;
577
- declare const LogoControl: typeof maplibre_gl.LogoControl;
578
- declare const ScaleControl: typeof maplibre_gl.ScaleControl;
579
- declare const FullscreenControl: typeof maplibre_gl.FullscreenControl;
580
- declare const TerrainControl: typeof maplibre_gl.TerrainControl;
581
- declare const Popup: typeof maplibre_gl.Popup;
582
- declare const Marker: typeof maplibre_gl.Marker;
583
- declare const Style: typeof maplibre_gl.Style;
584
- declare const LngLat: typeof maplibre_gl.LngLat;
585
- declare const LngLatBounds: typeof maplibre_gl.LngLatBounds;
586
- declare const MercatorCoordinate: typeof maplibre_gl.MercatorCoordinate;
587
- declare const Evented: typeof maplibre_gl.Evented;
588
- declare const AJAXError: typeof maplibre_gl.AJAXError;
589
- declare const CanvasSource: typeof maplibre_gl.CanvasSource;
590
- declare const GeoJSONSource: typeof maplibre_gl.GeoJSONSource;
591
- declare const ImageSource: typeof maplibre_gl.ImageSource;
592
- declare const RasterDEMTileSource: typeof maplibre_gl.RasterDEMTileSource;
593
- declare const RasterTileSource: typeof maplibre_gl.RasterTileSource;
594
- declare const VectorTileSource: typeof maplibre_gl.VectorTileSource;
595
- declare const VideoSource: typeof maplibre_gl.VideoSource;
596
719
  declare const prewarm: () => void;
597
720
  declare const clearPrewarmedResources: () => void;
598
721
  declare const version: string;
@@ -603,4 +726,51 @@ declare const workerUrl: string;
603
726
  declare const addProtocol: (customProtocol: string, loadFn: (requestParameters: maplibre_gl.RequestParameters, callback: maplibre_gl.ResponseCallback<any>) => maplibre_gl.Cancelable) => void;
604
727
  declare const removeProtocol: (customProtocol: string) => void;
605
728
 
606
- export { AJAXError, AttributionControl, CanvasSource, Evented, FullscreenControl, GeoJSONSource, GeolocateControl, GeolocationType, ImageSource, Language, LanguageKey, LanguageString, LngLat, LngLatBounds, LogoControl, Map, MapOptions, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerTerrainControl, Marker, Matrix2, MercatorCoordinate, NavigationControl, Point, Popup, RasterDEMTileSource, RasterTileSource, ScaleControl, SdkConfig, Style, TerrainControl, Unit, VectorTileSource, VideoSource, addProtocol, clearPrewarmedResources, clearStorage, config, getRTLTextPluginStatus, maxParallelImageRequests, prewarm, removeProtocol, setRTLTextPlugin, supported, version, workerCount, workerUrl };
729
+ declare const NavigationControlMLGL: typeof maplibre_gl.NavigationControl;
730
+ declare type NavigationControlMLGL = InstanceType<typeof NavigationControlMLGL>;
731
+ declare const GeolocateControlMLGL: typeof maplibre_gl.GeolocateControl;
732
+ declare type GeolocateControlMLGL = InstanceType<typeof GeolocateControlMLGL>;
733
+ declare const AttributionControlMLGL: typeof maplibre_gl.AttributionControl;
734
+ declare type AttributionControlMLGL = InstanceType<typeof AttributionControlMLGL>;
735
+ declare const LogoControlMLGL: typeof maplibre_gl.LogoControl;
736
+ declare type LogoControlMLGL = InstanceType<typeof LogoControlMLGL>;
737
+ declare const ScaleControlMLGL: typeof maplibre_gl.ScaleControl;
738
+ declare type ScaleControlMLGL = InstanceType<typeof ScaleControlMLGL>;
739
+ declare const FullscreenControlMLGL: typeof maplibre_gl.FullscreenControl;
740
+ declare type FullscreenControlMLGL = InstanceType<typeof FullscreenControlMLGL>;
741
+ declare const TerrainControlMLGL: typeof maplibre_gl.TerrainControl;
742
+ declare type TerrainControlMLGL = InstanceType<typeof TerrainControlMLGL>;
743
+ declare const MarkerMLGL: typeof maplibre_gl.Marker;
744
+ declare type MarkerMLGL = InstanceType<typeof MarkerMLGL>;
745
+ declare const PopupMLGL: typeof maplibre_gl.Popup;
746
+ declare type PopupMLGL = InstanceType<typeof PopupMLGL>;
747
+ declare const StyleMLGL: typeof maplibre_gl.Style;
748
+ declare type StyleMLGL = InstanceType<typeof StyleMLGL>;
749
+ declare const LngLat: typeof maplibre_gl.LngLat;
750
+ declare type LngLat = InstanceType<typeof LngLat>;
751
+ declare const LngLatBounds: typeof maplibre_gl.LngLatBounds;
752
+ declare type LngLatBounds = InstanceType<typeof LngLatBounds>;
753
+ declare const MercatorCoordinate: typeof maplibre_gl.MercatorCoordinate;
754
+ declare type MercatorCoordinate = InstanceType<typeof MercatorCoordinate>;
755
+ declare const Evented: typeof maplibre_gl.Evented;
756
+ declare type Evented = InstanceType<typeof Evented>;
757
+ declare const AJAXError: typeof maplibre_gl.AJAXError;
758
+ declare type AJAXError = InstanceType<typeof AJAXError>;
759
+ declare const CanvasSourceMLGL: typeof maplibre_gl.CanvasSource;
760
+ declare type CanvasSourceMLGL = InstanceType<typeof CanvasSourceMLGL>;
761
+ declare const GeoJSONSourceMLGL: typeof maplibre_gl.GeoJSONSource;
762
+ declare type GeoJSONSourceMLGL = InstanceType<typeof GeoJSONSourceMLGL>;
763
+ declare const ImageSourceMLGL: typeof maplibre_gl.ImageSource;
764
+ declare type ImageSourceMLGL = InstanceType<typeof ImageSourceMLGL>;
765
+ declare const RasterDEMTileSourceMLGL: typeof maplibre_gl.RasterDEMTileSource;
766
+ declare type RasterDEMTileSourceMLGL = InstanceType<typeof RasterDEMTileSourceMLGL>;
767
+ declare const RasterTileSourceMLGL: typeof maplibre_gl.RasterTileSource;
768
+ declare type RasterTileSourceMLGL = InstanceType<typeof RasterTileSourceMLGL>;
769
+ declare const VectorTileSourceMLGL: typeof maplibre_gl.VectorTileSource;
770
+ declare type VectorTileSourceMLGL = InstanceType<typeof VectorTileSourceMLGL>;
771
+ declare const VideoSourceMLGL: typeof maplibre_gl.VideoSource;
772
+ declare type VideoSourceMLGL = InstanceType<typeof VideoSourceMLGL>;
773
+ declare const MapMLGL: typeof maplibre_gl.Map;
774
+ declare type MapMLGL = InstanceType<typeof MapMLGL>;
775
+
776
+ export { AJAXError, AttributionControl, AttributionControlMLGL, CanvasSource, CanvasSourceMLGL, Evented, FullscreenControl, FullscreenControlMLGL, GeoJSONSource, GeoJSONSourceMLGL, GeolocateControl, GeolocateControlMLGL, GeolocationType, ImageSource, ImageSourceMLGL, Language, LanguageKey, LanguageString, LngLat, LngLatBounds, LogoControl, LogoControlMLGL, Map, MapMLGL, MapOptions, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerTerrainControl, Marker, MarkerMLGL, Matrix2, MercatorCoordinate, NavigationControl, NavigationControlMLGL, Point, Popup, PopupMLGL, RasterDEMTileSource, RasterDEMTileSourceMLGL, RasterTileSource, RasterTileSourceMLGL, ScaleControl, ScaleControlMLGL, SdkConfig, Style, StyleMLGL, TerrainControl, TerrainControlMLGL, Unit, VectorTileSource, VectorTileSourceMLGL, VideoSource, VideoSourceMLGL, addProtocol, clearPrewarmedResources, clearStorage, config, getRTLTextPluginStatus, maxParallelImageRequests, prewarm, removeProtocol, setRTLTextPlugin, supported, version, workerCount, workerUrl };
@@ -1 +1 @@
1
- import y from"maplibre-gl";export*from"maplibre-gl";import{Base64 as D}from"js-base64";import{v4 as z}from"uuid";import F from"events";import{config as x,expandMapStyle as V,MapStyleVariant as Z,ReferenceMapStyle as q,MapStyle as J,mapStylePresetList as W,geolocation as v}from"@maptiler/client";import{LanguageGeocoding as oe,MapStyle as ne,MapStyleVariant as se,ReferenceMapStyle as le,ServiceError as ce,coordinates as he,data as ue,geocoding as ge,geolocation as pe,staticMaps as de}from"@maptiler/client";const S={AUTO:"auto",LATIN:"latin",NON_LATIN:"nonlatin",LOCAL:"",ALBANIAN:"sq",AMHARIC:"am",ARABIC:"ar",ARMENIAN:"hy",AZERBAIJANI:"az",BASQUE:"eu",BELORUSSIAN:"be",BOSNIAN:"bs",BRETON:"br",BULGARIAN:"bg",CATALAN:"ca",CHINESE:"zh",CORSICAN:"co",CROATIAN:"hr",CZECH:"cs",DANISH:"da",DUTCH:"nl",ENGLISH:"en",ESPERANTO:"eo",ESTONIAN:"et",FINNISH:"fi",FRENCH:"fr",FRISIAN:"fy",GEORGIAN:"ka",GERMAN:"de",GREEK:"el",HEBREW:"he",HINDI:"hi",HUNGARIAN:"hu",ICELANDIC:"is",INDONESIAN:"id",IRISH:"ga",ITALIAN:"it",JAPANESE:"ja",JAPANESE_HIRAGANA:"ja-Hira",JAPANESE_KANA:"ja_kana",JAPANESE_LATIN:"ja_rm",JAPANESE_2018:"ja-Latn",KANNADA:"kn",KAZAKH:"kk",KOREAN:"ko",KOREAN_LATIN:"ko-Latn",KURDISH:"ku",ROMAN_LATIN:"la",LATVIAN:"lv",LITHUANIAN:"lt",LUXEMBOURGISH:"lb",MACEDONIAN:"mk",MALAYALAM:"ml",MALTESE:"mt",NORWEGIAN:"no",OCCITAN:"oc",POLISH:"pl",PORTUGUESE:"pt",ROMANIAN:"ro",ROMANSH:"rm",RUSSIAN:"ru",SCOTTISH_GAELIC:"gd",SERBIAN_CYRILLIC:"sr",SERBIAN_LATIN:"sr-Latn",SLOVAK:"sk",SLOVENE:"sl",SPANISH:"es",SWEDISH:"sv",TAMIL:"ta",TELUGU:"te",THAI:"th",TURKISH:"tr",UKRAINIAN:"uk",WELSH:"cy"},Y=new Set(Object.values(S));function E(r){return Y.has(r)}const X=new Set(Object.values(S));function T(){if(typeof navigator>"u")return Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];const r=Array.from(new Set(navigator.languages.map(t=>t.split("-")[0]))).filter(t=>X.has(t));return r.length?r[0]:S.LATIN}class N extends F{constructor(){super(),this.primaryLanguage=S.AUTO,this.secondaryLanguage=null,this.session=!0,this._unit="metric",this._apiKey=""}set unit(t){this._unit=t,this.emit("unit",t)}get unit(){return this._unit}set apiKey(t){this._apiKey=t,x.apiKey=t,this.emit("apiKey",t)}get apiKey(){return this._apiKey}set fetch(t){x.fetch=t}get fetch(){return x.fetch}}const p=new N,d={maptilerLogoURL:"https://api.maptiler.com/resources/logo.svg",maptilerURL:"https://www.maptiler.com/",maptilerApiHost:"api.maptiler.com",rtlPluginURL:"https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",primaryLanguage:S.AUTO,secondaryLanguage:S.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(d);class I extends y.LogoControl{constructor(t={}){var e,o;super(t),this.logoURL="",this.linkURL="",this.logoURL=(e=t.logoURL)!=null?e:d.maptilerLogoURL,this.linkURL=(o=t.linkURL)!=null?o:d.maptilerURL}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";const e=window.document.createElement("a");return e.style.backgroundRepeat="no-repeat",e.style.cursor="pointer",e.style.display="block",e.style.height="23px",e.style.margin="0 0 -4px -4px",e.style.overflow="hidden",e.style.width="88px",e.style.backgroundImage=`url(${this.logoURL})`,e.style.backgroundSize="100px 30px",e.style.width="100px",e.style.height="30px",e.target="_blank",e.rel="noopener nofollow",e.href=this.linkURL,e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}}function Q(){y.getRTLTextPluginStatus()==="unavailable"&&y.setRTLTextPlugin(d.rtlPluginURL,null,!0)}function tt(r,t){r.forEach(e=>{!t[e]||(t[e]=t[e].bind(t))})}function A(r,t,e){const o=window.document.createElement(r);return t!==void 0&&(o.className=t),e&&e.appendChild(o),o}function et(r){r.parentNode&&r.parentNode.removeChild(r)}function w(r){return r?typeof r=="string"||r instanceof String?!r.startsWith("http")&&r.toLowerCase().includes(".json")?r:V(r):r instanceof Z?r.getExpandedStyleURL():r instanceof q?r.getDefaultVariant().getExpandedStyleURL():r:J[W[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL()}class R{constructor(){tt(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(t){return this._map=t,this._container=A("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=A("button","maplibregl-ctrl-terrain",this._container),A("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(){et(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.hasTerrain()?this._map.disableTerrain():this._map.enableTerrain(),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.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}}class rt extends y.NavigationControl{constructor(){super({showCompass:!0,showZoom:!0,visualizePitch:!0}),this._compass.removeEventListener("click",this._compass.clickFunction),this._compass.addEventListener("click",t=>{this._map.getPitch()===0?this._map.easeTo({pitch:Math.min(this._map.getMaxPitch(),80)}):this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})})}_createButton(t,e){const o=super._createButton(t,e);return o.clickFunction=e,o}_rotateCompassArrow(){const t=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5))}) rotateX(${Math.min(70,this._map.transform.pitch)}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=t}}var it=Object.defineProperty,at=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,O=(r,t,e)=>t in r?it(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,lt=(r,t)=>{for(var e in t||(t={}))nt.call(t,e)&&O(r,e,t[e]);if(P)for(var e of P(t))st.call(t,e)&&O(r,e,t[e]);return r},ct=(r,t)=>at(r,ot(t));const ht=y.GeolocateControl,U=y.Marker,M=y.LngLat;class k extends ht{constructor(){super(...arguments),this.lastUpdatedCenter=new M(0,0)}_updateCamera(t){const e=new M(t.coords.longitude,t.coords.latitude),o=t.coords.accuracy,c=this._map.getBearing(),u=ct(lt({bearing:c},this.options.fitBoundsOptions),{linear:!0}),s=this._map.getZoom();s>this.options.fitBoundsOptions.maxZoom&&(u.zoom=s),this._map.fitBounds(e.toBounds(o),u,{geolocateSource:!0});let i=!1;const a=()=>{i=!0};this._map.once("click",a),this._map.once("dblclick",a),this._map.once("dragstart",a),this._map.once("mousedown",a),this._map.once("touchstart",a),this._map.once("wheel",a),this._map.once("moveend",()=>{this._map.off("click",a),this._map.off("dblclick",a),this._map.off("dragstart",a),this._map.off("mousedown",a),this._map.off("touchstart",a),this._map.off("wheel",a),!i&&(this.lastUpdatedCenter=this._map.getCenter())})}_setupUI(t){if(this.lastUpdatedCenter=this._map.getCenter(),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=A("button","maplibregl-ctrl-geolocate",this._container),A("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){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.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=A("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new U(this._dotElement),this._circleElement=A("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new U({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 o=e.originalEvent&&e.originalEvent.type==="resize",c=this.lastUpdatedCenter.distanceTo(this._map.getCenter());!e.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!o&&c>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")))})}_updateCircleRadius(){if(this._watchState!=="BACKGROUND"&&this._watchState!=="ACTIVE_LOCK")return;const t=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],e=this._map.project(t),o=this._map.unproject([e.x,e.y]),c=this._map.unproject([e.x+20,e.y]),u=o.distanceTo(c)/20,s=Math.ceil(2*this._accuracy/u);this._circleElement.style.width=`${s}px`,this._circleElement.style.height=`${s}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}}var ut=Object.defineProperty,gt=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,$=(r,t,e)=>t in r?ut(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,H=(r,t)=>{for(var e in t||(t={}))dt.call(t,e)&&$(r,e,t[e]);if(B)for(var e of B(t))mt.call(t,e)&&$(r,e,t[e]);return r},j=(r,t)=>gt(r,pt(t)),C=(r,t,e)=>new Promise((o,c)=>{var u=a=>{try{i(e.next(a))}catch(g){c(g)}},s=a=>{try{i(e.throw(a))}catch(g){c(g)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(u,s);i((e=e.apply(r,t)).next())});const K=z(),G={POINT:"POINT",COUNTRY:"COUNTRY"};class yt extends y.Map{constructor(t){var e;t.apiKey&&(p.apiKey=t.apiKey);const o=w(t.style),c=location.hash;p.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!"),super(j(H({},t),{style:o,maplibreLogo:!1,transformRequest:s=>{let i=null;try{i=new URL(s)}catch{return{url:s,headers:{}}}return i.host===d.maptilerApiHost&&(i.searchParams.has("key")||i.searchParams.append("key",p.apiKey),p.session&&i.searchParams.append("mtsid",K)),{url:i.href,headers:{}}}})),this.languageShouldUpdate=!1,this.isStyleInitialized=!1,this.isTerrainEnabled=!1,this.terrainExaggeration=1,this.once("styledata",()=>C(this,null,function*(){if(t.geolocate===!1||t.center||t.hash&&!!c)return;try{if(t.geolocate===G.COUNTRY){yield this.fitToIpBounds();return}}catch(i){console.warn(i.message)}let s=null;try{yield this.centerOnIpPoint(t.zoom),s=this.getCameraHash()}catch(i){console.warn(i.message)}(yield navigator.permissions.query({name:"geolocation"})).state==="granted"&&navigator.geolocation.getCurrentPosition(i=>{s===this.getCameraHash()&&this.easeTo({center:[i.coords.longitude,i.coords.latitude],zoom:t.zoom||12,duration:2e3})},null,{maximumAge:24*3600*1e3,timeout:5e3,enableHighAccuracy:!1})})),this.on("styledataloading",()=>{this.languageShouldUpdate=!!p.primaryLanguage||!!p.secondaryLanguage});let u=!0;this.on("styledata",()=>{t.language&&u?this.setPrimaryLanguage(t.language):p.primaryLanguage&&(this.languageShouldUpdate||!this.isStyleInitialized)&&this.setPrimaryLanguage(p.primaryLanguage),p.secondaryLanguage&&(this.languageShouldUpdate||!this.isStyleInitialized)&&this.setSecondaryLanguage(p.secondaryLanguage),this.languageShouldUpdate=!1,this.isStyleInitialized=!0,u=!1}),this.on("styledata",()=>{this.getTerrain()===null&&this.isTerrainEnabled&&this.enableTerrain(this.terrainExaggeration)}),this.once("load",()=>C(this,null,function*(){Q()})),this.once("load",()=>C(this,null,function*(){let s={logo:null};try{const i=Object.keys(this.style.sourceCaches).map(g=>this.getSource(g)).filter(g=>typeof g.url=="string"&&g.url.includes("tiles.json")),a=new URL(i[0].url);a.searchParams.has("key")||a.searchParams.append("key",p.apiKey),s=yield(yield fetch(a.href)).json()}catch{}if("logo"in s&&s.logo){const i=s.logo;this.addControl(new I({logoURL:i}),t.logoPosition),t.attributionControl===!1&&this.addControl(new y.AttributionControl(t))}else t.maptilerLogo&&this.addControl(new I,t.logoPosition);if(t.scaleControl){const i=t.scaleControl===!0||t.scaleControl===void 0?"bottom-right":t.scaleControl,a=new y.ScaleControl({unit:p.unit});this.addControl(a,i),p.on("unit",g=>{a.setUnit(g)})}if(t.navigationControl!==!1){const i=t.navigationControl===!0||t.navigationControl===void 0?"top-right":t.navigationControl;this.addControl(new rt,i)}if(t.geolocateControl!==!1){const i=t.geolocateControl===!0||t.geolocateControl===void 0?"top-right":t.geolocateControl;this.addControl(new k({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),i)}if(t.terrainControl){const i=t.terrainControl===!0||t.terrainControl===void 0?"top-right":t.terrainControl;this.addControl(new R,i)}if(t.fullscreenControl){const i=t.fullscreenControl===!0||t.fullscreenControl===void 0?"top-right":t.fullscreenControl;this.addControl(new y.FullscreenControl({}),i)}})),t.terrain&&this.enableTerrain((e=t.terrainExaggeration)!=null?e:this.terrainExaggeration)}setStyle(t,e){return super.setStyle(w(t),e)}setLanguage(t=d.primaryLanguage){if(t===S.AUTO)return this.setLanguage(T());this.setPrimaryLanguage(t)}setPrimaryLanguage(t=d.primaryLanguage){!E(t)||this.onStyleReady(()=>{if(t===S.AUTO)return this.setPrimaryLanguage(T());const e=this.getStyle().layers,o=/^\s*{\s*name\s*(:\s*(\S*))?\s*}$/,c=/^\s*name\s*(:\s*(\S*))?\s*$/,u=/^\s*{\s*name\s*(:\s*(\S*))?\s*}(\s*){\s*name\s*(:\s*(\S*))?\s*}$/,s=/^(.*)({\s*name\s*(:\s*(\S*))?\s*})(.*)$/,i=t?`name:${t}`:"name",a=["case",["has",i],["get",i],["get","name:latin"]];for(let g=0;g<e.length;g+=1){const h=e[g],f=h.layout;if(!f||!f["text-field"])continue;const n=this.getLayoutProperty(h.id,"text-field");let m;if(Array.isArray(n)&&n.length>=2&&n[0].trim().toLowerCase()==="concat"){const l=n.slice();for(let L=0;L<n.length;L+=1){const _=n[L];if((typeof _=="string"||_ instanceof String)&&o.exec(_.toString())){l[L]=a;break}else if(Array.isArray(_)&&_.length>=2&&_[0].trim().toLowerCase()==="get"&&c.exec(_[1].toString())){l[L]=a;break}else if(Array.isArray(_)&&_.length===4&&_[0].trim().toLowerCase()==="case"){l[L]=a;break}}this.setLayoutProperty(h.id,"text-field",l)}else if(Array.isArray(n)&&n.length>=2&&n[0].trim().toLowerCase()==="get"&&c.exec(n[1].toString())){const l=a;this.setLayoutProperty(h.id,"text-field",l)}else if((typeof n=="string"||n instanceof String)&&o.exec(n.toString())){const l=a;this.setLayoutProperty(h.id,"text-field",l)}else if(Array.isArray(n)&&n.length===4&&n[0].trim().toLowerCase()==="case"){const l=a;this.setLayoutProperty(h.id,"text-field",l)}else if((typeof n=="string"||n instanceof String)&&(m=u.exec(n.toString()))!==null){const l=`{${i}}${m[3]}{name${m[4]||""}}`;this.setLayoutProperty(h.id,"text-field",l)}else if((typeof n=="string"||n instanceof String)&&(m=s.exec(n.toString()))!==null){const l=`${m[1]}{${i}}${m[5]}`;this.setLayoutProperty(h.id,"text-field",l)}}})}setSecondaryLanguage(t=d.secondaryLanguage){!E(t)||this.onStyleReady(()=>{if(t===S.AUTO)return this.setSecondaryLanguage(T());const e=this.getStyle().layers,o=/^\s*{\s*name\s*(:\s*(\S*))?\s*}$/,c=/^\s*name\s*(:\s*(\S*))?\s*$/,u=/^\s*{\s*name\s*(:\s*(\S*))?\s*}(\s*){\s*name\s*(:\s*(\S*))?\s*}$/;let s;for(let i=0;i<e.length;i+=1){const a=e[i],g=a.layout;if(!g||!g["text-field"])continue;const h=this.getLayoutProperty(a.id,"text-field");let f;if(Array.isArray(h)&&h.length>=2&&h[0].trim().toLowerCase()==="concat"){f=h.slice();let n=0;for(let m=0;m<h.length;m+=1){const l=h[m];if((typeof l=="string"||l instanceof String)&&o.exec(l.toString())){if(n===1){f[m]=`{name:${t}}`;break}n+=1}else if(Array.isArray(l)&&l.length>=2&&l[0].trim().toLowerCase()==="get"&&c.exec(l[1].toString())){if(n===1){f[m][1]=`name:${t}`;break}n+=1}else if(Array.isArray(l)&&l.length===4&&l[0].trim().toLowerCase()==="case"){if(n===1){f[m]=["get",`name:${t}`];break}n+=1}}this.setLayoutProperty(a.id,"text-field",f)}else if((typeof h=="string"||h instanceof String)&&(s=u.exec(h.toString()))!==null){const n=t?`name:${t}`:"name";f=`{name${s[1]||""}}${s[3]}{${n}}`,this.setLayoutProperty(a.id,"text-field",f)}}})}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}enableTerrain(t=this.terrainExaggeration){if(t<0){console.warn("Terrain exaggeration cannot be negative.");return}const e=this.getTerrain(),o=()=>{this.isTerrainEnabled=!0,this.terrainExaggeration=t,this.addSource(d.terrainSourceId,{type:"raster-dem",url:d.terrainSourceURL}),this.setTerrain({source:d.terrainSourceId,exaggeration:t})};if(e){this.setTerrain(j(H({},e),{exaggeration:t}));return}this.loaded()||this.isTerrainEnabled?o():this.once("load",()=>{this.getTerrain()&&this.getSource(d.terrainSourceId)||o()})}disableTerrain(){this.isTerrainEnabled=!1,this.setTerrain(null),this.getSource(d.terrainSourceId)&&this.removeSource(d.terrainSourceId)}setTerrainExaggeration(t){this.enableTerrain(t)}onStyleReady(t){this.isStyleLoaded()?t():this.once("styledata",()=>{t()})}fitToIpBounds(){return C(this,null,function*(){const t=yield v.info();this.fitBounds(t.country_bounds,{duration:0,padding:100})})}centerOnIpPoint(t){return C(this,null,function*(){const e=yield v.info();this.jumpTo({center:[e.longitude,e.latitude],zoom:t||11})})}getCameraHash(){const t=new Float32Array(5),e=this.getCenter();return t[0]=e.lng,t[1]=e.lat,t[2]=this.getZoom(),t[3]=this.getPitch(),t[4]=this.getBearing(),D.fromUint8Array(new Uint8Array(t.buffer))}getSdkConfig(){return p}getMaptilerSessionId(){return K}}class b{constructor(t,e){this.x=t,this.y=e}_matMult(t){const e=t[0]*this.x+t[1]*this.y,o=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=o,this}_add(t){return this.x+=t.x,this.y+=t.y,this}_sub(t){return this.x-=t.x,this.y-=t.y,this}_mult(t){return this.x*=t,this.y*=t,this}_div(t){return this.x/=t,this.y/=t,this}_multByPoint(t){return this.x*=t.x,this.y*=t.y,this}_divByPoint(t){return this.x/=t.x,this.y/=t.y,this}_unit(){return this._div(this.mag()),this}_perp(){const t=this.y;return this.y=this.x,this.x=-t,this}_rotate(t){const e=Math.cos(t),o=Math.sin(t),c=e*this.x-o*this.y,u=o*this.x+e*this.y;return this.x=c,this.y=u,this}_rotateAround(t,e){const o=Math.cos(t),c=Math.sin(t),u=e.x+o*(this.x-e.x)-c*(this.y-e.y),s=e.y+c*(this.x-e.x)+o*(this.y-e.y);return this.x=u,this.y=s,this}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}clone(){return new b(this.x,this.y)}add(t){return this.clone()._add(t)}sub(t){return this.clone()._sub(t)}multByPoint(t){return this.clone()._multByPoint(t)}divByPoint(t){return this.clone()._divByPoint(t)}mult(t){return this.clone()._mult(t)}div(t){return this.clone()._div(t)}rotate(t){return this.clone()._rotate(t)}rotateAround(t,e){return this.clone()._rotateAround(t,e)}matMult(t){return this.clone()._matMult(t)}unit(){return this.clone()._unit()}perp(){return this.clone()._perp()}round(){return this.clone()._round()}mag(){return Math.sqrt(this.x*this.x+this.y*this.y)}equals(t){return this.x===t.x&&this.y===t.y}dist(t){return Math.sqrt(this.distSqr(t))}distSqr(t){const e=t.x-this.x,o=t.y-this.y;return e*e+o*o}angle(){return Math.atan2(this.y,this.x)}angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)}angleWith(t){return this.angleWithSep(t.x,t.y)}angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)}static convert(t){return t instanceof b?t:Array.isArray(t)?new b(t[0],t[1]):t}}const{supported:ft,setRTLTextPlugin:_t,getRTLTextPluginStatus:St,NavigationControl:At,GeolocateControl:Lt,AttributionControl:Ct,LogoControl:bt,ScaleControl:xt,FullscreenControl:Tt,TerrainControl:It,Popup:vt,Marker:Et,Style:Nt,LngLat:wt,LngLatBounds:Rt,MercatorCoordinate:Pt,Evented:Ot,AJAXError:Ut,CanvasSource:Mt,GeoJSONSource:kt,ImageSource:Bt,RasterDEMTileSource:$t,RasterTileSource:Ht,VectorTileSource:jt,VideoSource:Kt,prewarm:Gt,clearPrewarmedResources:Dt,version:zt,workerCount:Ft,maxParallelImageRequests:Vt,clearStorage:Zt,workerUrl:qt,addProtocol:Jt,removeProtocol:Wt}=y;export{Ut as AJAXError,Ct as AttributionControl,Mt as CanvasSource,Ot as Evented,Tt as FullscreenControl,kt as GeoJSONSource,Lt as GeolocateControl,G as GeolocationType,Bt as ImageSource,S as Language,oe as LanguageGeocoding,wt as LngLat,Rt as LngLatBounds,bt as LogoControl,yt as Map,ne as MapStyle,se as MapStyleVariant,k as MaptilerGeolocateControl,I as MaptilerLogoControl,R as MaptilerTerrainControl,Et as Marker,Pt as MercatorCoordinate,At as NavigationControl,b as Point,vt as Popup,$t as RasterDEMTileSource,Ht as RasterTileSource,le as ReferenceMapStyle,xt as ScaleControl,N as SdkConfig,ce as ServiceError,Nt as Style,It as TerrainControl,jt as VectorTileSource,Kt as VideoSource,Jt as addProtocol,Dt as clearPrewarmedResources,Zt as clearStorage,p as config,he as coordinates,ue as data,ge as geocoding,pe as geolocation,St as getRTLTextPluginStatus,Vt as maxParallelImageRequests,Gt as prewarm,Wt as removeProtocol,_t as setRTLTextPlugin,de as staticMaps,ft as supported,zt as version,Ft as workerCount,qt as workerUrl};
1
+ import n from"maplibre-gl";export*from"maplibre-gl";import{Base64 as q}from"js-base64";import{v4 as W}from"uuid";import Y from"events";import{config as T,expandMapStyle as X,MapStyleVariant as Q,ReferenceMapStyle as tt,MapStyle as et,mapStylePresetList as rt,geolocation as v}from"@maptiler/client";import{LanguageGeocoding as me,MapStyle as ye,MapStyleVariant as Ae,ReferenceMapStyle as Le,ServiceError as Se,coordinates as fe,data as _e,geocoding as Ce,geolocation as xe,staticMaps as Te}from"@maptiler/client";const S={AUTO:"auto",LATIN:"latin",NON_LATIN:"nonlatin",LOCAL:"",ALBANIAN:"sq",AMHARIC:"am",ARABIC:"ar",ARMENIAN:"hy",AZERBAIJANI:"az",BASQUE:"eu",BELORUSSIAN:"be",BOSNIAN:"bs",BRETON:"br",BULGARIAN:"bg",CATALAN:"ca",CHINESE:"zh",CORSICAN:"co",CROATIAN:"hr",CZECH:"cs",DANISH:"da",DUTCH:"nl",ENGLISH:"en",ESPERANTO:"eo",ESTONIAN:"et",FINNISH:"fi",FRENCH:"fr",FRISIAN:"fy",GEORGIAN:"ka",GERMAN:"de",GREEK:"el",HEBREW:"he",HINDI:"hi",HUNGARIAN:"hu",ICELANDIC:"is",INDONESIAN:"id",IRISH:"ga",ITALIAN:"it",JAPANESE:"ja",JAPANESE_HIRAGANA:"ja-Hira",JAPANESE_KANA:"ja_kana",JAPANESE_LATIN:"ja_rm",JAPANESE_2018:"ja-Latn",KANNADA:"kn",KAZAKH:"kk",KOREAN:"ko",KOREAN_LATIN:"ko-Latn",KURDISH:"ku",ROMAN_LATIN:"la",LATVIAN:"lv",LITHUANIAN:"lt",LUXEMBOURGISH:"lb",MACEDONIAN:"mk",MALAYALAM:"ml",MALTESE:"mt",NORWEGIAN:"no",OCCITAN:"oc",POLISH:"pl",PORTUGUESE:"pt",ROMANIAN:"ro",ROMANSH:"rm",RUSSIAN:"ru",SCOTTISH_GAELIC:"gd",SERBIAN_CYRILLIC:"sr",SERBIAN_LATIN:"sr-Latn",SLOVAK:"sk",SLOVENE:"sl",SPANISH:"es",SWEDISH:"sv",TAMIL:"ta",TELUGU:"te",THAI:"th",TURKISH:"tr",UKRAINIAN:"uk",WELSH:"cy"},at=new Set(Object.values(S));function E(r){return at.has(r)}const nt=new Set(Object.values(S));function b(){if(typeof navigator>"u")return Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0];const r=Array.from(new Set(navigator.languages.map(t=>t.split("-")[0]))).filter(t=>nt.has(t));return r.length?r[0]:S.LATIN}class N extends Y{constructor(){super(),this.primaryLanguage=S.AUTO,this.secondaryLanguage=null,this.session=!0,this._unit="metric",this._apiKey=""}set unit(t){this._unit=t,this.emit("unit",t)}get unit(){return this._unit}set apiKey(t){this._apiKey=t,T.apiKey=t,this.emit("apiKey",t)}get apiKey(){return this._apiKey}set fetch(t){T.fetch=t}get fetch(){return T.fetch}}const y=new N,p={maptilerLogoURL:"https://api.maptiler.com/resources/logo.svg",maptilerURL:"https://www.maptiler.com/",maptilerApiHost:"api.maptiler.com",rtlPluginURL:"https://cdn.maptiler.com/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.min.js",primaryLanguage:S.AUTO,secondaryLanguage:S.LOCAL,terrainSourceURL:"https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",terrainSourceId:"maptiler-terrain"};Object.freeze(p);class w extends n.LogoControl{onAdd(t){return super.onAdd(t)}}class I extends w{constructor(t={}){var e,i;super(t),this.logoURL="",this.linkURL="",this.logoURL=(e=t.logoURL)!=null?e:p.maptilerLogoURL,this.linkURL=(i=t.linkURL)!=null?i:p.maptilerURL}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=window.document.createElement("div"),this._container.className="maplibregl-ctrl";const e=window.document.createElement("a");return e.style.backgroundRepeat="no-repeat",e.style.cursor="pointer",e.style.display="block",e.style.height="23px",e.style.margin="0 0 -4px -4px",e.style.overflow="hidden",e.style.width="88px",e.style.backgroundImage=`url(${this.logoURL})`,e.style.backgroundSize="100px 30px",e.style.width="100px",e.style.height="30px",e.target="_blank",e.rel="noopener nofollow",e.href=this.linkURL,e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}}function ot(){n.getRTLTextPluginStatus()==="unavailable"&&n.setRTLTextPlugin(p.rtlPluginURL,null,!0)}function it(r,t){r.forEach(e=>{!t[e]||(t[e]=t[e].bind(t))})}function f(r,t,e){const i=window.document.createElement(r);return t!==void 0&&(i.className=t),e&&e.appendChild(i),i}function st(r){r.parentNode&&r.parentNode.removeChild(r)}function R(r){return r?typeof r=="string"||r instanceof String?!r.startsWith("http")&&r.toLowerCase().includes(".json")?r:X(r):r instanceof Q?r.getExpandedStyleURL():r instanceof tt?r.getDefaultVariant().getExpandedStyleURL():r:et[rt[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL()}class P{constructor(){it(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(t){return this._map=t,this._container=f("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=f("button","maplibregl-ctrl-terrain",this._container),f("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(){st(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.hasTerrain()?this._map.disableTerrain():this._map.enableTerrain(),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.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}}class M extends n.NavigationControl{onAdd(t){return super.onAdd(t)}}class lt extends M{constructor(){super({showCompass:!0,showZoom:!0,visualizePitch:!0}),this._compass.removeEventListener("click",this._compass.clickFunction),this._compass.addEventListener("click",t=>{this._map.getPitch()===0?this._map.easeTo({pitch:Math.min(this._map.getMaxPitch(),80)}):this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})})}_createButton(t,e){const i=super._createButton(t,e);return i.clickFunction=e,i}_rotateCompassArrow(){const t=this.options.visualizePitch?`scale(${Math.min(1.5,1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5))}) rotateX(${Math.min(70,this._map.transform.pitch)}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=t}}class O extends n.GeolocateControl{onAdd(t){return super.onAdd(t)}}var ct=Object.defineProperty,ht=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,k=(r,t,e)=>t in r?ct(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,pt=(r,t)=>{for(var e in t||(t={}))dt.call(t,e)&&k(r,e,t[e]);if(U)for(var e of U(t))gt.call(t,e)&&k(r,e,t[e]);return r},mt=(r,t)=>ht(r,ut(t));const B=n.Marker,$=n.LngLat;class G extends O{constructor(){super(...arguments),this.lastUpdatedCenter=new $(0,0)}_updateCamera(t){const e=new $(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,h=this._map.getBearing(),g=mt(pt({bearing:h},this.options.fitBoundsOptions),{linear:!0}),l=this._map.getZoom();l>this.options.fitBoundsOptions.maxZoom&&(g.zoom=l),this._map.fitBounds(e.toBounds(i),g,{geolocateSource:!0});let a=!1;const o=()=>{a=!0};this._map.once("click",o),this._map.once("dblclick",o),this._map.once("dragstart",o),this._map.once("mousedown",o),this._map.once("touchstart",o),this._map.once("wheel",o),this._map.once("moveend",()=>{this._map.off("click",o),this._map.off("dblclick",o),this._map.off("dragstart",o),this._map.off("mousedown",o),this._map.off("touchstart",o),this._map.off("wheel",o),!a&&(this.lastUpdatedCenter=this._map.getCenter())})}_setupUI(t){if(this.lastUpdatedCenter=this._map.getCenter(),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=f("button","maplibregl-ctrl-geolocate",this._container),f("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){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.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=f("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new B(this._dotElement),this._circleElement=f("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new B({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 i=e.originalEvent&&e.originalEvent.type==="resize",h=this.lastUpdatedCenter.distanceTo(this._map.getCenter());!e.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!i&&h>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")))})}_updateCircleRadius(){if(this._watchState!=="BACKGROUND"&&this._watchState!=="ACTIVE_LOCK")return;const t=[this._lastKnownPosition.coords.longitude,this._lastKnownPosition.coords.latitude],e=this._map.project(t),i=this._map.unproject([e.x,e.y]),h=this._map.unproject([e.x+20,e.y]),g=i.distanceTo(h)/20,l=Math.ceil(2*this._accuracy/g);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}}class H extends n.AttributionControl{onAdd(t){return super.onAdd(t)}}class j extends n.ScaleControl{onAdd(t){return super.onAdd(t)}}class K extends n.FullscreenControl{onAdd(t){return super.onAdd(t)}}var yt=Object.defineProperty,At=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,V=(r,t,e)=>t in r?yt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,F=(r,t)=>{for(var e in t||(t={}))St.call(t,e)&&V(r,e,t[e]);if(D)for(var e of D(t))ft.call(t,e)&&V(r,e,t[e]);return r},z=(r,t)=>At(r,Lt(t)),C=(r,t,e)=>new Promise((i,h)=>{var g=o=>{try{a(e.next(o))}catch(d){h(d)}},l=o=>{try{a(e.throw(o))}catch(d){h(d)}},a=o=>o.done?i(o.value):Promise.resolve(o.value).then(g,l);a((e=e.apply(r,t)).next())});const J=W(),Z={POINT:"POINT",COUNTRY:"COUNTRY"};class _t extends n.Map{constructor(t){var e,i;t.apiKey&&(y.apiKey=t.apiKey);const h=R(t.style),g=location.hash;y.apiKey||console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!"),super(z(F({},t),{style:h,maplibreLogo:!1,transformRequest:l=>{let a=null;try{a=new URL(l)}catch{return{url:l,headers:{}}}return a.host===p.maptilerApiHost&&(a.searchParams.has("key")||a.searchParams.append("key",y.apiKey),y.session&&a.searchParams.append("mtsid",J)),{url:a.href,headers:{}}}})),this.isTerrainEnabled=!1,this.terrainExaggeration=1,this.primaryLanguage=null,this.secondaryLanguage=null,this.primaryLanguage=(e=t.language)!=null?e:y.primaryLanguage,this.secondaryLanguage=y.secondaryLanguage,this.once("styledata",()=>C(this,null,function*(){if(!t.geolocate||t.center||t.hash&&!!g)return;try{if(t.geolocate===Z.COUNTRY){yield this.fitToIpBounds();return}}catch(a){console.warn(a.message)}let l=null;try{yield this.centerOnIpPoint(t.zoom),l=this.getCameraHash()}catch(a){console.warn(a.message)}(yield navigator.permissions.query({name:"geolocation"})).state==="granted"&&navigator.geolocation.getCurrentPosition(a=>{l===this.getCameraHash()&&this.easeTo({center:[a.coords.longitude,a.coords.latitude],zoom:t.zoom||12,duration:2e3})},null,{maximumAge:24*3600*1e3,timeout:5e3,enableHighAccuracy:!1})})),this.on("styledata",()=>{this.setPrimaryLanguage(this.primaryLanguage),this.setSecondaryLanguage(this.secondaryLanguage)}),this.on("styledata",()=>{this.getTerrain()===null&&this.isTerrainEnabled&&this.enableTerrain(this.terrainExaggeration)}),this.once("load",()=>C(this,null,function*(){ot()})),this.once("load",()=>C(this,null,function*(){let l={logo:null};try{const a=Object.keys(this.style.sourceCaches).map(d=>this.getSource(d)).filter(d=>typeof d.url=="string"&&d.url.includes("tiles.json")),o=new URL(a[0].url);o.searchParams.has("key")||o.searchParams.append("key",y.apiKey),l=yield(yield fetch(o.href)).json()}catch{}if("logo"in l&&l.logo){const a=l.logo;this.addControl(new I({logoURL:a}),t.logoPosition),t.attributionControl===!1&&this.addControl(new H(t))}else t.maptilerLogo&&this.addControl(new I,t.logoPosition);if(t.scaleControl){const a=t.scaleControl===!0||t.scaleControl===void 0?"bottom-right":t.scaleControl,o=new j({unit:y.unit});this.addControl(o,a),y.on("unit",d=>{o.setUnit(d)})}if(t.navigationControl!==!1){const a=t.navigationControl===!0||t.navigationControl===void 0?"top-right":t.navigationControl;this.addControl(new lt,a)}if(t.geolocateControl!==!1){const a=t.geolocateControl===!0||t.geolocateControl===void 0?"top-right":t.geolocateControl;this.addControl(new G({positionOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!0,showAccuracyCircle:!0,showUserLocation:!0}),a)}if(t.terrainControl){const a=t.terrainControl===!0||t.terrainControl===void 0?"top-right":t.terrainControl;this.addControl(new P,a)}if(t.fullscreenControl){const a=t.fullscreenControl===!0||t.fullscreenControl===void 0?"top-right":t.fullscreenControl;this.addControl(new K({}),a)}})),t.terrain&&this.enableTerrain((i=t.terrainExaggeration)!=null?i:this.terrainExaggeration)}setStyle(t,e){return super.setStyle(R(t),e)}setLanguage(t=p.primaryLanguage){if(t===S.AUTO)return this.setLanguage(b());this.setPrimaryLanguage(t)}setPrimaryLanguage(t=p.primaryLanguage){!E(t)||(this.primaryLanguage=t,this.onStyleReady(()=>{if(t===S.AUTO)return this.setPrimaryLanguage(b());const e=this.getStyle().layers,i=/^\s*{\s*name\s*(:\s*(\S*))?\s*}$/,h=/^\s*name\s*(:\s*(\S*))?\s*$/,g=/^\s*{\s*name\s*(:\s*(\S*))?\s*}(\s*){\s*name\s*(:\s*(\S*))?\s*}$/,l=/^(.*)({\s*name\s*(:\s*(\S*))?\s*})(.*)$/,a=t?`name:${t}`:"name",o=["case",["has",a],["get",a],["get","name:latin"]];for(let d=0;d<e.length;d+=1){const u=e[d],A=u.layout;if(!A||!A["text-field"])continue;const s=this.getLayoutProperty(u.id,"text-field");let m;if(Array.isArray(s)&&s.length>=2&&s[0].trim().toLowerCase()==="concat"){const c=s.slice();for(let _=0;_<s.length;_+=1){const L=s[_];if((typeof L=="string"||L instanceof String)&&i.exec(L.toString())){c[_]=o;break}else if(Array.isArray(L)&&L.length>=2&&L[0].trim().toLowerCase()==="get"&&h.exec(L[1].toString())){c[_]=o;break}else if(Array.isArray(L)&&L.length===4&&L[0].trim().toLowerCase()==="case"){c[_]=o;break}}this.setLayoutProperty(u.id,"text-field",c)}else if(Array.isArray(s)&&s.length>=2&&s[0].trim().toLowerCase()==="get"&&h.exec(s[1].toString())){const c=o;this.setLayoutProperty(u.id,"text-field",c)}else if((typeof s=="string"||s instanceof String)&&i.exec(s.toString())){const c=o;this.setLayoutProperty(u.id,"text-field",c)}else if(Array.isArray(s)&&s.length===4&&s[0].trim().toLowerCase()==="case"){const c=o;this.setLayoutProperty(u.id,"text-field",c)}else if((typeof s=="string"||s instanceof String)&&(m=g.exec(s.toString()))!==null){const c=`{${a}}${m[3]}{name${m[4]||""}}`;this.setLayoutProperty(u.id,"text-field",c)}else if((typeof s=="string"||s instanceof String)&&(m=l.exec(s.toString()))!==null){const c=`${m[1]}{${a}}${m[5]}`;this.setLayoutProperty(u.id,"text-field",c)}}}))}setSecondaryLanguage(t=p.secondaryLanguage){!E(t)||(this.secondaryLanguage=t,this.onStyleReady(()=>{if(t===S.AUTO)return this.setSecondaryLanguage(b());const e=this.getStyle().layers,i=/^\s*{\s*name\s*(:\s*(\S*))?\s*}$/,h=/^\s*name\s*(:\s*(\S*))?\s*$/,g=/^\s*{\s*name\s*(:\s*(\S*))?\s*}(\s*){\s*name\s*(:\s*(\S*))?\s*}$/;let l;for(let a=0;a<e.length;a+=1){const o=e[a],d=o.layout;if(!d||!d["text-field"])continue;const u=this.getLayoutProperty(o.id,"text-field");let A;if(Array.isArray(u)&&u.length>=2&&u[0].trim().toLowerCase()==="concat"){A=u.slice();let s=0;for(let m=0;m<u.length;m+=1){const c=u[m];if((typeof c=="string"||c instanceof String)&&i.exec(c.toString())){if(s===1){A[m]=`{name:${t}}`;break}s+=1}else if(Array.isArray(c)&&c.length>=2&&c[0].trim().toLowerCase()==="get"&&h.exec(c[1].toString())){if(s===1){A[m][1]=`name:${t}`;break}s+=1}else if(Array.isArray(c)&&c.length===4&&c[0].trim().toLowerCase()==="case"){if(s===1){A[m]=["get",`name:${t}`];break}s+=1}}this.setLayoutProperty(o.id,"text-field",A)}else if((typeof u=="string"||u instanceof String)&&(l=g.exec(u.toString()))!==null){const s=t?`name:${t}`:"name";A=`{name${l[1]||""}}${l[3]}{${s}}`,this.setLayoutProperty(o.id,"text-field",A)}}}))}getPrimaryLanguage(){return this.primaryLanguage}getSecondaryLanguage(){return this.secondaryLanguage}getTerrainExaggeration(){return this.terrainExaggeration}hasTerrain(){return this.isTerrainEnabled}enableTerrain(t=this.terrainExaggeration){if(t<0){console.warn("Terrain exaggeration cannot be negative.");return}const e=this.getTerrain(),i=()=>{this.isTerrainEnabled=!0,this.terrainExaggeration=t,this.addSource(p.terrainSourceId,{type:"raster-dem",url:p.terrainSourceURL}),this.setTerrain({source:p.terrainSourceId,exaggeration:t})};if(e){this.setTerrain(z(F({},e),{exaggeration:t}));return}this.loaded()||this.isTerrainEnabled?i():this.once("load",()=>{this.getTerrain()&&this.getSource(p.terrainSourceId)||i()})}disableTerrain(){this.isTerrainEnabled=!1,this.setTerrain(null),this.getSource(p.terrainSourceId)&&this.removeSource(p.terrainSourceId)}setTerrainExaggeration(t){this.enableTerrain(t)}onStyleReady(t){this.isStyleLoaded()?t():this.once("styledata",()=>{t()})}fitToIpBounds(){return C(this,null,function*(){const t=yield v.info();this.fitBounds(t.country_bounds,{duration:0,padding:100})})}centerOnIpPoint(t){return C(this,null,function*(){const e=yield v.info();this.jumpTo({center:[e.longitude,e.latitude],zoom:t||11})})}getCameraHash(){const t=new Float32Array(5),e=this.getCenter();return t[0]=e.lng,t[1]=e.lat,t[2]=this.getZoom(),t[3]=this.getPitch(),t[4]=this.getBearing(),q.fromUint8Array(new Uint8Array(t.buffer))}getSdkConfig(){return y}getMaptilerSessionId(){return J}}class Ct extends n.Marker{addTo(t){return super.addTo(t)}}class xt extends n.Popup{addTo(t){return super.addTo(t)}}class Tt extends n.Style{constructor(t,e={}){super(t,e)}}class bt extends n.CanvasSource{onAdd(t){super.onAdd(t)}}class It extends n.GeoJSONSource{onAdd(t){super.onAdd(t)}}class vt extends n.ImageSource{onAdd(t){super.onAdd(t)}}class Et extends n.RasterTileSource{onAdd(t){super.onAdd(t)}}class Nt extends n.RasterDEMTileSource{onAdd(t){super.onAdd(t)}}class wt extends n.VectorTileSource{onAdd(t){super.onAdd(t)}}class Rt extends n.VideoSource{onAdd(t){super.onAdd(t)}}class Pt extends n.TerrainControl{onAdd(t){return super.onAdd(t)}}class x{constructor(t,e){this.x=t,this.y=e}_matMult(t){const e=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=i,this}_add(t){return this.x+=t.x,this.y+=t.y,this}_sub(t){return this.x-=t.x,this.y-=t.y,this}_mult(t){return this.x*=t,this.y*=t,this}_div(t){return this.x/=t,this.y/=t,this}_multByPoint(t){return this.x*=t.x,this.y*=t.y,this}_divByPoint(t){return this.x/=t.x,this.y/=t.y,this}_unit(){return this._div(this.mag()),this}_perp(){const t=this.y;return this.y=this.x,this.x=-t,this}_rotate(t){const e=Math.cos(t),i=Math.sin(t),h=e*this.x-i*this.y,g=i*this.x+e*this.y;return this.x=h,this.y=g,this}_rotateAround(t,e){const i=Math.cos(t),h=Math.sin(t),g=e.x+i*(this.x-e.x)-h*(this.y-e.y),l=e.y+h*(this.x-e.x)+i*(this.y-e.y);return this.x=g,this.y=l,this}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}clone(){return new x(this.x,this.y)}add(t){return this.clone()._add(t)}sub(t){return this.clone()._sub(t)}multByPoint(t){return this.clone()._multByPoint(t)}divByPoint(t){return this.clone()._divByPoint(t)}mult(t){return this.clone()._mult(t)}div(t){return this.clone()._div(t)}rotate(t){return this.clone()._rotate(t)}rotateAround(t,e){return this.clone()._rotateAround(t,e)}matMult(t){return this.clone()._matMult(t)}unit(){return this.clone()._unit()}perp(){return this.clone()._perp()}round(){return this.clone()._round()}mag(){return Math.sqrt(this.x*this.x+this.y*this.y)}equals(t){return this.x===t.x&&this.y===t.y}dist(t){return Math.sqrt(this.distSqr(t))}distSqr(t){const e=t.x-this.x,i=t.y-this.y;return e*e+i*i}angle(){return Math.atan2(this.y,this.x)}angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)}angleWith(t){return this.angleWithSep(t.x,t.y)}angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)}static convert(t){return t instanceof x?t:Array.isArray(t)?new x(t[0],t[1]):t}}const{supported:Mt,setRTLTextPlugin:Ot,getRTLTextPluginStatus:Ut,LngLat:kt,LngLatBounds:Bt,MercatorCoordinate:$t,Evented:Gt,AJAXError:Ht,prewarm:jt,clearPrewarmedResources:Kt,version:Dt,workerCount:Vt,maxParallelImageRequests:Ft,clearStorage:zt,workerUrl:Jt,addProtocol:Zt,removeProtocol:qt}=n,Wt=n.Map,Yt=n.Marker,Xt=n.Popup,Qt=n.Style,te=n.CanvasSource,ee=n.GeoJSONSource,re=n.ImageSource,ae=n.RasterTileSource,ne=n.RasterDEMTileSource,oe=n.VectorTileSource,ie=n.VideoSource;n.NavigationControl,n.GeolocateControl,n.AttributionControl,n.LogoControl,n.ScaleControl,n.FullscreenControl,n.TerrainControl;export{Ht as AJAXError,H as AttributionControl,bt as CanvasSource,te as CanvasSourceMLGL,Gt as Evented,K as FullscreenControl,It as GeoJSONSource,ee as GeoJSONSourceMLGL,O as GeolocateControl,Z as GeolocationType,vt as ImageSource,re as ImageSourceMLGL,S as Language,me as LanguageGeocoding,kt as LngLat,Bt as LngLatBounds,w as LogoControl,_t as Map,Wt as MapMLGL,ye as MapStyle,Ae as MapStyleVariant,G as MaptilerGeolocateControl,I as MaptilerLogoControl,P as MaptilerTerrainControl,Ct as Marker,Yt as MarkerMLGL,$t as MercatorCoordinate,M as NavigationControl,x as Point,xt as Popup,Xt as PopupMLGL,Nt as RasterDEMTileSource,ne as RasterDEMTileSourceMLGL,Et as RasterTileSource,ae as RasterTileSourceMLGL,Le as ReferenceMapStyle,j as ScaleControl,N as SdkConfig,Se as ServiceError,Tt as Style,Qt as StyleMLGL,Pt as TerrainControl,wt as VectorTileSource,oe as VectorTileSourceMLGL,Rt as VideoSource,ie as VideoSourceMLGL,Zt as addProtocol,Kt as clearPrewarmedResources,zt as clearStorage,y as config,fe as coordinates,_e as data,Ce as geocoding,xe as geolocation,Ut as getRTLTextPluginStatus,Ft as maxParallelImageRequests,jt as prewarm,qt as removeProtocol,Ot as setRTLTextPlugin,Te as staticMaps,Mt as supported,Dt as version,Vt as workerCount,Jt as workerUrl};