@maptiler/sdk 4.0.2 → 4.0.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maptiler-sdk.mjs +895 -905
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/package.json +1 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var To = Object.defineProperty;
|
|
2
2
|
var Un = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var y = (r, e, t) =>
|
|
7
|
-
var E = (r, e, t) => (Er(r, e, "read from private field"), t ? t.call(r) : e.get(r)),
|
|
5
|
+
var Io = (r, e, t) => e in r ? To(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var y = (r, e, t) => Io(r, typeof e != "symbol" ? e + "" : e, t), Er = (r, e, t) => e.has(r) || Un("Cannot " + t);
|
|
7
|
+
var E = (r, e, t) => (Er(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? Un("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), Q = (r, e, t, n) => (Er(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), ee = (r, e, t) => (Er(r, e, "access private method"), t);
|
|
8
8
|
import k from "maplibre-gl";
|
|
9
|
-
import { Base64 as
|
|
10
|
-
import
|
|
9
|
+
import { Base64 as _o } from "js-base64";
|
|
10
|
+
import Mo from "events";
|
|
11
11
|
import * as Ot from "@maptiler/client";
|
|
12
|
-
import { Language as
|
|
13
|
-
import { MapStyle as
|
|
12
|
+
import { Language as Po, getLanguageInfoFromCode as Bn, config as Lr, MapStyle as dt, mapStylePresetList as Ar, expandMapStyle as Ro, MapStyleVariant as Oo, ReferenceMapStyle as zo, toLanguageInfo as qn, getLanguageInfoFromFlag as Fo, geolocation as Vn } from "@maptiler/client";
|
|
13
|
+
import { MapStyle as fd, MapStyleVariant as dd, ReferenceMapStyle as hd, ServiceError as md, areSameLanguages as yd, bufferToPixelDataBrowser as gd, canParsePixelData as vd, circumferenceAtLatitude as bd, coordinates as wd, data as Sd, elevation as xd, expandMapStyle as kd, geolocation as Ed, getAutoLanguage as Ld, getBufferToPixelDataParser as Ad, getLanguageInfoFromCode as Cd, getLanguageInfoFromFlag as Td, getLanguageInfoFromKey as Id, getTileCache as _d, isLanguageInfo as Md, mapStylePresetList as Pd, math as Rd, misc as Od, staticMaps as zd, styleToStyle as Fd, toLanguageInfo as $d } from "@maptiler/client";
|
|
14
14
|
import { v4 as dn } from "uuid";
|
|
15
15
|
(function() {
|
|
16
16
|
typeof window > "u" || (window.requestIdleCallback = window.requestIdleCallback || function(r) {
|
|
@@ -27,62 +27,62 @@ import { v4 as dn } from "uuid";
|
|
|
27
27
|
clearTimeout(r);
|
|
28
28
|
});
|
|
29
29
|
})();
|
|
30
|
-
let
|
|
30
|
+
let $o = class extends k.Marker {
|
|
31
31
|
addTo(e) {
|
|
32
32
|
return super.addTo(e);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
class
|
|
35
|
+
class Up extends k.Popup {
|
|
36
36
|
addTo(e) {
|
|
37
37
|
return super.addTo(e);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class Bp extends k.Style {
|
|
41
41
|
constructor(e, t = {}) {
|
|
42
42
|
super(e, t);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
class
|
|
45
|
+
class qp extends k.CanvasSource {
|
|
46
46
|
onAdd(e) {
|
|
47
47
|
super.onAdd(e);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
class
|
|
50
|
+
class Vp extends k.GeoJSONSource {
|
|
51
51
|
onAdd(e) {
|
|
52
52
|
super.onAdd(e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class Gp extends k.ImageSource {
|
|
56
56
|
onAdd(e) {
|
|
57
57
|
super.onAdd(e);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class Hp extends k.RasterTileSource {
|
|
61
61
|
onAdd(e) {
|
|
62
62
|
super.onAdd(e);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
class
|
|
65
|
+
class Kp extends k.RasterDEMTileSource {
|
|
66
66
|
onAdd(e) {
|
|
67
67
|
super.onAdd(e);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class Zp extends k.VectorTileSource {
|
|
71
71
|
onAdd(e) {
|
|
72
72
|
super.onAdd(e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
class
|
|
75
|
+
class Xp extends k.VideoSource {
|
|
76
76
|
onAdd(e) {
|
|
77
77
|
super.onAdd(e);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
class
|
|
80
|
+
class Wa extends k.NavigationControl {
|
|
81
81
|
onAdd(e) {
|
|
82
82
|
return super.onAdd(e);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
class
|
|
85
|
+
class No extends k.GeolocateControl {
|
|
86
86
|
onAdd(e) {
|
|
87
87
|
return super.onAdd(e);
|
|
88
88
|
}
|
|
@@ -92,62 +92,62 @@ class Yp extends k.AttributionControl {
|
|
|
92
92
|
return super.onAdd(e);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
class
|
|
95
|
+
class jo extends k.LogoControl {
|
|
96
96
|
onAdd(e) {
|
|
97
97
|
return super.onAdd(e);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class Do extends k.ScaleControl {
|
|
101
101
|
onAdd(e) {
|
|
102
102
|
return super.onAdd(e);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
class
|
|
105
|
+
class Uo extends k.FullscreenControl {
|
|
106
106
|
onAdd(e) {
|
|
107
107
|
return super.onAdd(e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
class
|
|
110
|
+
class Wp extends k.TerrainControl {
|
|
111
111
|
onAdd(e) {
|
|
112
112
|
return super.onAdd(e);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
class
|
|
115
|
+
class Jp extends k.BoxZoomHandler {
|
|
116
116
|
constructor(e, t) {
|
|
117
117
|
super(e, t);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class Qp extends k.ScrollZoomHandler {
|
|
121
121
|
constructor(e, t) {
|
|
122
122
|
super(e, t);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
class
|
|
125
|
+
class ef extends k.CooperativeGesturesHandler {
|
|
126
126
|
constructor(e, t) {
|
|
127
127
|
super(e, t);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class tf extends k.KeyboardHandler {
|
|
131
131
|
constructor(e) {
|
|
132
132
|
super(e);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
class
|
|
135
|
+
class rf extends k.TwoFingersTouchPitchHandler {
|
|
136
136
|
constructor(e) {
|
|
137
137
|
super(e);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
class
|
|
140
|
+
class nf extends k.MapWheelEvent {
|
|
141
141
|
constructor(e, t, n) {
|
|
142
142
|
super(e, t, n);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class af extends k.MapTouchEvent {
|
|
146
146
|
constructor(e, t, n) {
|
|
147
147
|
super(e, t, n);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
class
|
|
150
|
+
class of extends k.MapMouseEvent {
|
|
151
151
|
constructor(e, t, n, a = {}) {
|
|
152
152
|
super(e, t, n, a);
|
|
153
153
|
}
|
|
@@ -199,7 +199,7 @@ const O = {
|
|
|
199
199
|
isMode: !0,
|
|
200
200
|
geocoding: !1
|
|
201
201
|
},
|
|
202
|
-
...
|
|
202
|
+
...Po
|
|
203
203
|
};
|
|
204
204
|
function Gn() {
|
|
205
205
|
if (typeof navigator > "u") {
|
|
@@ -208,7 +208,7 @@ function Gn() {
|
|
|
208
208
|
}
|
|
209
209
|
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) => Bn(e)).filter((e) => e)[0] ?? O.LOCAL;
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const W = {
|
|
212
212
|
maptilerLogoURL: "https://api.maptiler.com/resources/logo.svg",
|
|
213
213
|
maptilerURL: "https://www.maptiler.com/",
|
|
214
214
|
maptilerApiHost: "api.maptiler.com",
|
|
@@ -219,15 +219,15 @@ const Y = {
|
|
|
219
219
|
terrainSourceURL: "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",
|
|
220
220
|
terrainSourceId: "maptiler-terrain"
|
|
221
221
|
};
|
|
222
|
-
Object.freeze(
|
|
222
|
+
Object.freeze(W);
|
|
223
223
|
const ir = dn();
|
|
224
|
-
class
|
|
224
|
+
class Bo extends Mo {
|
|
225
225
|
constructor() {
|
|
226
226
|
super(...arguments);
|
|
227
227
|
/**
|
|
228
228
|
* The primary language. By default, the language of the web browser is used.
|
|
229
229
|
*/
|
|
230
|
-
y(this, "primaryLanguage",
|
|
230
|
+
y(this, "primaryLanguage", W.primaryLanguage);
|
|
231
231
|
/**
|
|
232
232
|
* The secondary language, to overwrite the default language defined in the map style.
|
|
233
233
|
* This settings is highly dependant on the style compatibility and may not work in most cases.
|
|
@@ -311,13 +311,13 @@ class Vo extends Ro {
|
|
|
311
311
|
return Lr.fetch;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
const j = new
|
|
315
|
-
class Hn extends
|
|
314
|
+
const j = new Bo();
|
|
315
|
+
class Hn extends jo {
|
|
316
316
|
constructor(t = {}) {
|
|
317
317
|
super(t);
|
|
318
318
|
y(this, "logoURL", "");
|
|
319
319
|
y(this, "linkURL", "");
|
|
320
|
-
this.logoURL = t.logoURL ??
|
|
320
|
+
this.logoURL = t.logoURL ?? W.maptilerLogoURL, this.linkURL = t.linkURL ?? W.maptilerURL;
|
|
321
321
|
}
|
|
322
322
|
onAdd(t) {
|
|
323
323
|
this._map = t, this._compact = this.options.compact ?? !1, this._container = window.document.createElement("div"), this._container.className = "maplibregl-ctrl";
|
|
@@ -325,9 +325,9 @@ class Hn extends Uo {
|
|
|
325
325
|
return n.style.backgroundRepeat = "no-repeat", n.style.cursor = "pointer", n.style.display = "block", n.style.height = "23px", n.style.margin = "0 0 -4px -4px", n.style.overflow = "hidden", n.style.width = "88px", n.style.backgroundImage = `url(${this.logoURL})`, n.style.backgroundSize = "100px 30px", n.style.width = "100px", n.style.height = "30px", n.target = "_blank", n.rel = "noopener", n.href = this.linkURL, n.setAttribute("aria-label", "MapTiler logo"), n.setAttribute("rel", "noopener"), this._container.appendChild(n), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
const qr = "localcache_source", Vr = "localcache",
|
|
329
|
-
function
|
|
330
|
-
if (Gr && j.caching && j.session && r.host ===
|
|
328
|
+
const qr = "localcache_source", Vr = "localcache", qo = "maptiler_sdk", Vo = 1e3, Go = 100, Gr = typeof caches < "u", { addProtocol: Kn } = k;
|
|
329
|
+
function Ho(r, e) {
|
|
330
|
+
if (Gr && j.caching && j.session && r.host === W.maptilerApiHost) {
|
|
331
331
|
if (e === "Source" && r.href.includes("tiles.json"))
|
|
332
332
|
return r.href.replace("https://", `${qr}://`);
|
|
333
333
|
if (e === "Tile" || e === "Glyphs")
|
|
@@ -335,17 +335,17 @@ function Zo(r, e) {
|
|
|
335
335
|
}
|
|
336
336
|
return r.href;
|
|
337
337
|
}
|
|
338
|
-
let
|
|
338
|
+
let Cr;
|
|
339
339
|
async function Ja() {
|
|
340
|
-
return
|
|
340
|
+
return Cr || (Cr = await caches.open(qo)), Cr;
|
|
341
341
|
}
|
|
342
342
|
let Zn = 0;
|
|
343
|
-
async function
|
|
344
|
-
const r = await Ja(), e = await r.keys(), t = e.slice(0, Math.max(e.length -
|
|
343
|
+
async function Ko() {
|
|
344
|
+
const r = await Ja(), e = await r.keys(), t = e.slice(0, Math.max(e.length - Vo, 0));
|
|
345
345
|
for (const n of t)
|
|
346
346
|
r.delete(n);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Zo() {
|
|
349
349
|
Kn(
|
|
350
350
|
qr,
|
|
351
351
|
async (r, e) => {
|
|
@@ -378,20 +378,20 @@ function Wo() {
|
|
|
378
378
|
c.signal = e.signal;
|
|
379
379
|
const p = await fetch(o, c);
|
|
380
380
|
return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
|
|
381
|
-
}), ++Zn >
|
|
381
|
+
}), ++Zn > Go && (Ko(), Zn = 0)), s(p);
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
async function
|
|
384
|
+
async function Xo(r) {
|
|
385
385
|
if (typeof window > "u") return;
|
|
386
386
|
const e = k.getRTLTextPluginStatus();
|
|
387
387
|
if (e === "unavailable" || e === "requested")
|
|
388
388
|
try {
|
|
389
|
-
await k.setRTLTextPlugin(r ??
|
|
389
|
+
await k.setRTLTextPlugin(r ?? W.rtlPluginURL, !0);
|
|
390
390
|
} catch (t) {
|
|
391
391
|
console.error("Error enabling RTL plugin. It is enabled by default and cannot be unset after. Are you attempting to enable it twice?", t);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Yo(r, e) {
|
|
395
395
|
for (const t of r)
|
|
396
396
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
397
397
|
}
|
|
@@ -404,11 +404,11 @@ function Xn(r, e) {
|
|
|
404
404
|
url: r
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
return t.host ===
|
|
408
|
-
url:
|
|
407
|
+
return t.host === W.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", j.apiKey), j.session && t.searchParams.append("mtsid", ir)), {
|
|
408
|
+
url: Ho(t, e)
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function Yn(r) {
|
|
412
412
|
return async (e, t) => {
|
|
413
413
|
if (r != null) {
|
|
414
414
|
const n = await r(e, t), a = Xn((n == null ? void 0 : n.url) ?? "", t);
|
|
@@ -426,51 +426,44 @@ function Qa() {
|
|
|
426
426
|
function or(r) {
|
|
427
427
|
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(r);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Wo(r) {
|
|
430
430
|
try {
|
|
431
431
|
return JSON.parse(r);
|
|
432
432
|
} catch {
|
|
433
433
|
}
|
|
434
434
|
return null;
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
return document.createElement("canvas").getContext("webgl2", { ...es, ...r }) ? 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.";
|
|
445
|
-
}
|
|
446
|
-
function rs(r, e) {
|
|
447
|
-
const t = ts(e);
|
|
448
|
-
if (!t) return;
|
|
449
|
-
let n = null;
|
|
450
|
-
if (typeof r == "string" ? n = document.getElementById(r) : r instanceof HTMLElement && (n = r), !n)
|
|
436
|
+
function Jo() {
|
|
437
|
+
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.";
|
|
438
|
+
}
|
|
439
|
+
function Qo(r) {
|
|
440
|
+
const e = Jo();
|
|
441
|
+
if (!e) return;
|
|
442
|
+
let t = null;
|
|
443
|
+
if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
|
|
451
444
|
throw new Error("The Map container must be provided.");
|
|
452
|
-
const
|
|
453
|
-
throw
|
|
445
|
+
const n = document.createElement("div");
|
|
446
|
+
throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
|
|
454
447
|
}
|
|
455
|
-
function
|
|
448
|
+
function sf(r) {
|
|
456
449
|
const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
|
|
457
450
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
458
451
|
}
|
|
459
|
-
function
|
|
452
|
+
function es(r, e) {
|
|
460
453
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
461
454
|
return {
|
|
462
455
|
contains: t.test(r),
|
|
463
456
|
exactMatch: new RegExp(`^${t.source}$`).test(r)
|
|
464
457
|
};
|
|
465
458
|
}
|
|
466
|
-
function
|
|
459
|
+
function ts(r, e, t) {
|
|
467
460
|
const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
|
|
468
461
|
return ["concat", ...a.flatMap((s, l) => {
|
|
469
|
-
const u =
|
|
462
|
+
const u = rs(s);
|
|
470
463
|
return l === a.length - 1 ? [u] : [u, e];
|
|
471
464
|
})];
|
|
472
465
|
}
|
|
473
|
-
function
|
|
466
|
+
function rs(r) {
|
|
474
467
|
return typeof r != "string" || !r.includes("{ele}") ? r : [
|
|
475
468
|
"case",
|
|
476
469
|
// if the value contains {ele}
|
|
@@ -493,7 +486,7 @@ function is(r) {
|
|
|
493
486
|
""
|
|
494
487
|
];
|
|
495
488
|
}
|
|
496
|
-
function
|
|
489
|
+
function ns(r) {
|
|
497
490
|
var n;
|
|
498
491
|
const e = /\{name(?::(?<language>\S+))?\}/g, t = [];
|
|
499
492
|
for (; ; ) {
|
|
@@ -504,7 +497,7 @@ function os(r) {
|
|
|
504
497
|
}
|
|
505
498
|
return t;
|
|
506
499
|
}
|
|
507
|
-
function
|
|
500
|
+
function as(r) {
|
|
508
501
|
return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
|
|
509
502
|
isLanguage: !0,
|
|
510
503
|
localization: null
|
|
@@ -513,17 +506,17 @@ function ss(r) {
|
|
|
513
506
|
localization: r[1].trim().split(":").pop()
|
|
514
507
|
} : null;
|
|
515
508
|
}
|
|
516
|
-
function
|
|
509
|
+
function is(r) {
|
|
517
510
|
const e = [], t = structuredClone(r), n = (a) => {
|
|
518
511
|
if (typeof a != "string")
|
|
519
512
|
for (let i = 0; i < a.length; i += 1) {
|
|
520
|
-
const o =
|
|
513
|
+
const o = as(a[i]);
|
|
521
514
|
o ? e.push(o.localization) : n(a[i]);
|
|
522
515
|
}
|
|
523
516
|
};
|
|
524
517
|
return n([t]), e;
|
|
525
518
|
}
|
|
526
|
-
function
|
|
519
|
+
function os(r, e) {
|
|
527
520
|
const t = [];
|
|
528
521
|
for (const i of r) {
|
|
529
522
|
if (i.type !== "symbol")
|
|
@@ -534,10 +527,10 @@ function us(r, e) {
|
|
|
534
527
|
const u = e.getLayoutProperty(s, "text-field");
|
|
535
528
|
if (u)
|
|
536
529
|
if (typeof u == "string") {
|
|
537
|
-
const c =
|
|
530
|
+
const c = ns(u);
|
|
538
531
|
t.push(c);
|
|
539
532
|
} else {
|
|
540
|
-
const c =
|
|
533
|
+
const c = is(u);
|
|
541
534
|
t.push(c);
|
|
542
535
|
}
|
|
543
536
|
}
|
|
@@ -549,7 +542,7 @@ function us(r, e) {
|
|
|
549
542
|
i === null ? a.unlocalized += 1 : (i in a.localized || (a.localized[i] = 0), a.localized[i] += 1);
|
|
550
543
|
return a;
|
|
551
544
|
}
|
|
552
|
-
var
|
|
545
|
+
var ss = 8, ls = {
|
|
553
546
|
version: {
|
|
554
547
|
required: !0,
|
|
555
548
|
type: "enum",
|
|
@@ -627,18 +620,18 @@ var cs = 8, ps = {
|
|
|
627
620
|
type: "array",
|
|
628
621
|
value: "layer"
|
|
629
622
|
}
|
|
630
|
-
},
|
|
623
|
+
}, us = {
|
|
631
624
|
"*": {
|
|
632
625
|
type: "source"
|
|
633
626
|
}
|
|
634
|
-
},
|
|
627
|
+
}, cs = [
|
|
635
628
|
"source_vector",
|
|
636
629
|
"source_raster",
|
|
637
630
|
"source_raster_dem",
|
|
638
631
|
"source_geojson",
|
|
639
632
|
"source_video",
|
|
640
633
|
"source_image"
|
|
641
|
-
],
|
|
634
|
+
], ps = {
|
|
642
635
|
type: {
|
|
643
636
|
required: !0,
|
|
644
637
|
type: "enum",
|
|
@@ -701,7 +694,7 @@ var cs = 8, ps = {
|
|
|
701
694
|
"*": {
|
|
702
695
|
type: "*"
|
|
703
696
|
}
|
|
704
|
-
},
|
|
697
|
+
}, fs = {
|
|
705
698
|
type: {
|
|
706
699
|
required: !0,
|
|
707
700
|
type: "enum",
|
|
@@ -758,7 +751,7 @@ var cs = 8, ps = {
|
|
|
758
751
|
"*": {
|
|
759
752
|
type: "*"
|
|
760
753
|
}
|
|
761
|
-
},
|
|
754
|
+
}, ds = {
|
|
762
755
|
type: {
|
|
763
756
|
required: !0,
|
|
764
757
|
type: "enum",
|
|
@@ -832,7 +825,7 @@ var cs = 8, ps = {
|
|
|
832
825
|
"*": {
|
|
833
826
|
type: "*"
|
|
834
827
|
}
|
|
835
|
-
},
|
|
828
|
+
}, hs = {
|
|
836
829
|
type: {
|
|
837
830
|
required: !0,
|
|
838
831
|
type: "enum",
|
|
@@ -893,7 +886,7 @@ var cs = 8, ps = {
|
|
|
893
886
|
promoteId: {
|
|
894
887
|
type: "promoteId"
|
|
895
888
|
}
|
|
896
|
-
},
|
|
889
|
+
}, ms = {
|
|
897
890
|
type: {
|
|
898
891
|
required: !0,
|
|
899
892
|
type: "enum",
|
|
@@ -916,7 +909,7 @@ var cs = 8, ps = {
|
|
|
916
909
|
value: "number"
|
|
917
910
|
}
|
|
918
911
|
}
|
|
919
|
-
},
|
|
912
|
+
}, ys = {
|
|
920
913
|
type: {
|
|
921
914
|
required: !0,
|
|
922
915
|
type: "enum",
|
|
@@ -938,7 +931,7 @@ var cs = 8, ps = {
|
|
|
938
931
|
value: "number"
|
|
939
932
|
}
|
|
940
933
|
}
|
|
941
|
-
},
|
|
934
|
+
}, gs = {
|
|
942
935
|
id: {
|
|
943
936
|
type: "string",
|
|
944
937
|
required: !0
|
|
@@ -987,7 +980,7 @@ var cs = 8, ps = {
|
|
|
987
980
|
paint: {
|
|
988
981
|
type: "paint"
|
|
989
982
|
}
|
|
990
|
-
},
|
|
983
|
+
}, vs = [
|
|
991
984
|
"layout_fill",
|
|
992
985
|
"layout_line",
|
|
993
986
|
"layout_circle",
|
|
@@ -998,7 +991,7 @@ var cs = 8, ps = {
|
|
|
998
991
|
"layout_hillshade",
|
|
999
992
|
"layout_color-relief",
|
|
1000
993
|
"layout_background"
|
|
1001
|
-
],
|
|
994
|
+
], bs = {
|
|
1002
995
|
visibility: {
|
|
1003
996
|
type: "enum",
|
|
1004
997
|
values: {
|
|
@@ -1014,7 +1007,7 @@ var cs = 8, ps = {
|
|
|
1014
1007
|
},
|
|
1015
1008
|
"property-type": "data-constant"
|
|
1016
1009
|
}
|
|
1017
|
-
},
|
|
1010
|
+
}, ws = {
|
|
1018
1011
|
"fill-sort-key": {
|
|
1019
1012
|
type: "number",
|
|
1020
1013
|
expression: {
|
|
@@ -1041,7 +1034,7 @@ var cs = 8, ps = {
|
|
|
1041
1034
|
},
|
|
1042
1035
|
"property-type": "data-constant"
|
|
1043
1036
|
}
|
|
1044
|
-
},
|
|
1037
|
+
}, Ss = {
|
|
1045
1038
|
"circle-sort-key": {
|
|
1046
1039
|
type: "number",
|
|
1047
1040
|
expression: {
|
|
@@ -1068,7 +1061,7 @@ var cs = 8, ps = {
|
|
|
1068
1061
|
},
|
|
1069
1062
|
"property-type": "data-constant"
|
|
1070
1063
|
}
|
|
1071
|
-
},
|
|
1064
|
+
}, xs = {
|
|
1072
1065
|
visibility: {
|
|
1073
1066
|
type: "enum",
|
|
1074
1067
|
values: {
|
|
@@ -1084,7 +1077,7 @@ var cs = 8, ps = {
|
|
|
1084
1077
|
},
|
|
1085
1078
|
"property-type": "data-constant"
|
|
1086
1079
|
}
|
|
1087
|
-
},
|
|
1080
|
+
}, ks = {
|
|
1088
1081
|
"line-cap": {
|
|
1089
1082
|
type: "enum",
|
|
1090
1083
|
values: {
|
|
@@ -1176,7 +1169,7 @@ var cs = 8, ps = {
|
|
|
1176
1169
|
},
|
|
1177
1170
|
"property-type": "data-constant"
|
|
1178
1171
|
}
|
|
1179
|
-
},
|
|
1172
|
+
}, Es = {
|
|
1180
1173
|
"symbol-placement": {
|
|
1181
1174
|
type: "enum",
|
|
1182
1175
|
values: {
|
|
@@ -2009,7 +2002,7 @@ var cs = 8, ps = {
|
|
|
2009
2002
|
},
|
|
2010
2003
|
"property-type": "data-constant"
|
|
2011
2004
|
}
|
|
2012
|
-
},
|
|
2005
|
+
}, Ls = {
|
|
2013
2006
|
visibility: {
|
|
2014
2007
|
type: "enum",
|
|
2015
2008
|
values: {
|
|
@@ -2025,7 +2018,7 @@ var cs = 8, ps = {
|
|
|
2025
2018
|
},
|
|
2026
2019
|
"property-type": "data-constant"
|
|
2027
2020
|
}
|
|
2028
|
-
},
|
|
2021
|
+
}, As = {
|
|
2029
2022
|
visibility: {
|
|
2030
2023
|
type: "enum",
|
|
2031
2024
|
values: {
|
|
@@ -2041,7 +2034,7 @@ var cs = 8, ps = {
|
|
|
2041
2034
|
},
|
|
2042
2035
|
"property-type": "data-constant"
|
|
2043
2036
|
}
|
|
2044
|
-
},
|
|
2037
|
+
}, Cs = {
|
|
2045
2038
|
type: "boolean",
|
|
2046
2039
|
expression: {
|
|
2047
2040
|
interpolated: !1,
|
|
@@ -2051,7 +2044,7 @@ var cs = 8, ps = {
|
|
|
2051
2044
|
]
|
|
2052
2045
|
},
|
|
2053
2046
|
"property-type": "data-driven"
|
|
2054
|
-
},
|
|
2047
|
+
}, Ts = {
|
|
2055
2048
|
type: "enum",
|
|
2056
2049
|
values: {
|
|
2057
2050
|
"==": {},
|
|
@@ -2068,14 +2061,14 @@ var cs = 8, ps = {
|
|
|
2068
2061
|
has: {},
|
|
2069
2062
|
"!has": {}
|
|
2070
2063
|
}
|
|
2071
|
-
},
|
|
2064
|
+
}, Is = {
|
|
2072
2065
|
type: "enum",
|
|
2073
2066
|
values: {
|
|
2074
2067
|
Point: {},
|
|
2075
2068
|
LineString: {},
|
|
2076
2069
|
Polygon: {}
|
|
2077
2070
|
}
|
|
2078
|
-
},
|
|
2071
|
+
}, _s = {
|
|
2079
2072
|
type: "array",
|
|
2080
2073
|
minimum: 0,
|
|
2081
2074
|
maximum: 24,
|
|
@@ -2084,11 +2077,11 @@ var cs = 8, ps = {
|
|
|
2084
2077
|
"color"
|
|
2085
2078
|
],
|
|
2086
2079
|
length: 2
|
|
2087
|
-
},
|
|
2080
|
+
}, Ms = {
|
|
2088
2081
|
type: "array",
|
|
2089
2082
|
value: "expression_name",
|
|
2090
2083
|
minimum: 1
|
|
2091
|
-
},
|
|
2084
|
+
}, Ps = {
|
|
2092
2085
|
anchor: {
|
|
2093
2086
|
type: "enum",
|
|
2094
2087
|
default: "viewport",
|
|
@@ -2149,7 +2142,7 @@ var cs = 8, ps = {
|
|
|
2149
2142
|
},
|
|
2150
2143
|
transition: !0
|
|
2151
2144
|
}
|
|
2152
|
-
},
|
|
2145
|
+
}, Rs = {
|
|
2153
2146
|
"sky-color": {
|
|
2154
2147
|
type: "color",
|
|
2155
2148
|
"property-type": "data-constant",
|
|
@@ -2242,7 +2235,7 @@ var cs = 8, ps = {
|
|
|
2242
2235
|
},
|
|
2243
2236
|
transition: !0
|
|
2244
2237
|
}
|
|
2245
|
-
},
|
|
2238
|
+
}, Os = {
|
|
2246
2239
|
source: {
|
|
2247
2240
|
type: "string",
|
|
2248
2241
|
required: !0
|
|
@@ -2252,7 +2245,7 @@ var cs = 8, ps = {
|
|
|
2252
2245
|
minimum: 0,
|
|
2253
2246
|
default: 1
|
|
2254
2247
|
}
|
|
2255
|
-
},
|
|
2248
|
+
}, zs = {
|
|
2256
2249
|
type: {
|
|
2257
2250
|
type: "projectionDefinition",
|
|
2258
2251
|
default: "mercator",
|
|
@@ -2265,7 +2258,7 @@ var cs = 8, ps = {
|
|
|
2265
2258
|
]
|
|
2266
2259
|
}
|
|
2267
2260
|
}
|
|
2268
|
-
},
|
|
2261
|
+
}, Fs = [
|
|
2269
2262
|
"paint_fill",
|
|
2270
2263
|
"paint_line",
|
|
2271
2264
|
"paint_circle",
|
|
@@ -2276,7 +2269,7 @@ var cs = 8, ps = {
|
|
|
2276
2269
|
"paint_hillshade",
|
|
2277
2270
|
"paint_color-relief",
|
|
2278
2271
|
"paint_background"
|
|
2279
|
-
],
|
|
2272
|
+
], $s = {
|
|
2280
2273
|
"fill-antialias": {
|
|
2281
2274
|
type: "boolean",
|
|
2282
2275
|
default: !0,
|
|
@@ -2392,7 +2385,7 @@ var cs = 8, ps = {
|
|
|
2392
2385
|
},
|
|
2393
2386
|
"property-type": "cross-faded-data-driven"
|
|
2394
2387
|
}
|
|
2395
|
-
},
|
|
2388
|
+
}, Ns = {
|
|
2396
2389
|
"line-opacity": {
|
|
2397
2390
|
type: "number",
|
|
2398
2391
|
default: 1,
|
|
@@ -2584,7 +2577,7 @@ var cs = 8, ps = {
|
|
|
2584
2577
|
},
|
|
2585
2578
|
"property-type": "color-ramp"
|
|
2586
2579
|
}
|
|
2587
|
-
},
|
|
2580
|
+
}, js = {
|
|
2588
2581
|
"circle-radius": {
|
|
2589
2582
|
type: "number",
|
|
2590
2583
|
default: 5,
|
|
@@ -2757,7 +2750,7 @@ var cs = 8, ps = {
|
|
|
2757
2750
|
},
|
|
2758
2751
|
"property-type": "data-driven"
|
|
2759
2752
|
}
|
|
2760
|
-
},
|
|
2753
|
+
}, Ds = {
|
|
2761
2754
|
"heatmap-radius": {
|
|
2762
2755
|
type: "number",
|
|
2763
2756
|
default: 30,
|
|
@@ -2848,7 +2841,7 @@ var cs = 8, ps = {
|
|
|
2848
2841
|
},
|
|
2849
2842
|
"property-type": "data-constant"
|
|
2850
2843
|
}
|
|
2851
|
-
},
|
|
2844
|
+
}, Us = {
|
|
2852
2845
|
"icon-opacity": {
|
|
2853
2846
|
type: "number",
|
|
2854
2847
|
default: 1,
|
|
@@ -3112,7 +3105,7 @@ var cs = 8, ps = {
|
|
|
3112
3105
|
},
|
|
3113
3106
|
"property-type": "data-constant"
|
|
3114
3107
|
}
|
|
3115
|
-
},
|
|
3108
|
+
}, Bs = {
|
|
3116
3109
|
"raster-opacity": {
|
|
3117
3110
|
type: "number",
|
|
3118
3111
|
default: 1,
|
|
@@ -3241,7 +3234,7 @@ var cs = 8, ps = {
|
|
|
3241
3234
|
},
|
|
3242
3235
|
"property-type": "data-constant"
|
|
3243
3236
|
}
|
|
3244
|
-
},
|
|
3237
|
+
}, qs = {
|
|
3245
3238
|
"hillshade-illumination-direction": {
|
|
3246
3239
|
type: "numberArray",
|
|
3247
3240
|
default: 335,
|
|
@@ -3368,7 +3361,7 @@ var cs = 8, ps = {
|
|
|
3368
3361
|
},
|
|
3369
3362
|
"property-type": "data-constant"
|
|
3370
3363
|
}
|
|
3371
|
-
},
|
|
3364
|
+
}, Vs = {
|
|
3372
3365
|
"background-color": {
|
|
3373
3366
|
type: "color",
|
|
3374
3367
|
default: "#000000",
|
|
@@ -3411,7 +3404,7 @@ var cs = 8, ps = {
|
|
|
3411
3404
|
},
|
|
3412
3405
|
"property-type": "data-constant"
|
|
3413
3406
|
}
|
|
3414
|
-
},
|
|
3407
|
+
}, Gs = {
|
|
3415
3408
|
duration: {
|
|
3416
3409
|
type: "number",
|
|
3417
3410
|
default: 300,
|
|
@@ -3424,15 +3417,15 @@ var cs = 8, ps = {
|
|
|
3424
3417
|
minimum: 0,
|
|
3425
3418
|
units: "milliseconds"
|
|
3426
3419
|
}
|
|
3427
|
-
},
|
|
3420
|
+
}, Hs = {
|
|
3428
3421
|
"*": {
|
|
3429
3422
|
type: "string"
|
|
3430
3423
|
}
|
|
3431
|
-
},
|
|
3424
|
+
}, Ks = {
|
|
3432
3425
|
type: "array",
|
|
3433
3426
|
value: "interpolation_name",
|
|
3434
3427
|
minimum: 1
|
|
3435
|
-
},
|
|
3428
|
+
}, Zs = {
|
|
3436
3429
|
type: "enum",
|
|
3437
3430
|
values: {
|
|
3438
3431
|
linear: {
|
|
@@ -3498,23 +3491,23 @@ var cs = 8, ps = {
|
|
|
3498
3491
|
}
|
|
3499
3492
|
}
|
|
3500
3493
|
}
|
|
3501
|
-
},
|
|
3502
|
-
$version:
|
|
3503
|
-
$root:
|
|
3504
|
-
sources:
|
|
3505
|
-
source:
|
|
3506
|
-
source_vector:
|
|
3507
|
-
source_raster:
|
|
3508
|
-
source_raster_dem:
|
|
3509
|
-
source_geojson:
|
|
3510
|
-
source_video:
|
|
3511
|
-
source_image:
|
|
3512
|
-
layer:
|
|
3513
|
-
layout:
|
|
3514
|
-
layout_background:
|
|
3515
|
-
layout_fill:
|
|
3516
|
-
layout_circle:
|
|
3517
|
-
layout_heatmap:
|
|
3494
|
+
}, Xs = {
|
|
3495
|
+
$version: ss,
|
|
3496
|
+
$root: ls,
|
|
3497
|
+
sources: us,
|
|
3498
|
+
source: cs,
|
|
3499
|
+
source_vector: ps,
|
|
3500
|
+
source_raster: fs,
|
|
3501
|
+
source_raster_dem: ds,
|
|
3502
|
+
source_geojson: hs,
|
|
3503
|
+
source_video: ms,
|
|
3504
|
+
source_image: ys,
|
|
3505
|
+
layer: gs,
|
|
3506
|
+
layout: vs,
|
|
3507
|
+
layout_background: bs,
|
|
3508
|
+
layout_fill: ws,
|
|
3509
|
+
layout_circle: Ss,
|
|
3510
|
+
layout_heatmap: xs,
|
|
3518
3511
|
"layout_fill-extrusion": {
|
|
3519
3512
|
visibility: {
|
|
3520
3513
|
type: "enum",
|
|
@@ -3532,10 +3525,10 @@ var cs = 8, ps = {
|
|
|
3532
3525
|
"property-type": "data-constant"
|
|
3533
3526
|
}
|
|
3534
3527
|
},
|
|
3535
|
-
layout_line:
|
|
3536
|
-
layout_symbol:
|
|
3537
|
-
layout_raster:
|
|
3538
|
-
layout_hillshade:
|
|
3528
|
+
layout_line: ks,
|
|
3529
|
+
layout_symbol: Es,
|
|
3530
|
+
layout_raster: Ls,
|
|
3531
|
+
layout_hillshade: As,
|
|
3539
3532
|
"layout_color-relief": {
|
|
3540
3533
|
visibility: {
|
|
3541
3534
|
type: "enum",
|
|
@@ -3553,9 +3546,9 @@ var cs = 8, ps = {
|
|
|
3553
3546
|
"property-type": "data-constant"
|
|
3554
3547
|
}
|
|
3555
3548
|
},
|
|
3556
|
-
filter:
|
|
3557
|
-
filter_operator:
|
|
3558
|
-
geometry_type:
|
|
3549
|
+
filter: Cs,
|
|
3550
|
+
filter_operator: Ts,
|
|
3551
|
+
geometry_type: Is,
|
|
3559
3552
|
function: {
|
|
3560
3553
|
expression: {
|
|
3561
3554
|
type: "expression"
|
|
@@ -3597,14 +3590,14 @@ var cs = 8, ps = {
|
|
|
3597
3590
|
required: !1
|
|
3598
3591
|
}
|
|
3599
3592
|
},
|
|
3600
|
-
function_stop:
|
|
3601
|
-
expression:
|
|
3602
|
-
light:
|
|
3603
|
-
sky:
|
|
3604
|
-
terrain:
|
|
3605
|
-
projection:
|
|
3606
|
-
paint:
|
|
3607
|
-
paint_fill:
|
|
3593
|
+
function_stop: _s,
|
|
3594
|
+
expression: Ms,
|
|
3595
|
+
light: Ps,
|
|
3596
|
+
sky: Rs,
|
|
3597
|
+
terrain: Os,
|
|
3598
|
+
projection: zs,
|
|
3599
|
+
paint: Fs,
|
|
3600
|
+
paint_fill: $s,
|
|
3608
3601
|
"paint_fill-extrusion": {
|
|
3609
3602
|
"fill-extrusion-opacity": {
|
|
3610
3603
|
type: "number",
|
|
@@ -3735,12 +3728,12 @@ var cs = 8, ps = {
|
|
|
3735
3728
|
"property-type": "data-constant"
|
|
3736
3729
|
}
|
|
3737
3730
|
},
|
|
3738
|
-
paint_line:
|
|
3739
|
-
paint_circle:
|
|
3740
|
-
paint_heatmap:
|
|
3741
|
-
paint_symbol:
|
|
3742
|
-
paint_raster:
|
|
3743
|
-
paint_hillshade:
|
|
3731
|
+
paint_line: Ns,
|
|
3732
|
+
paint_circle: js,
|
|
3733
|
+
paint_heatmap: Ds,
|
|
3734
|
+
paint_symbol: Us,
|
|
3735
|
+
paint_raster: Bs,
|
|
3736
|
+
paint_hillshade: qs,
|
|
3744
3737
|
"paint_color-relief": {
|
|
3745
3738
|
"color-relief-opacity": {
|
|
3746
3739
|
type: "number",
|
|
@@ -3783,8 +3776,8 @@ var cs = 8, ps = {
|
|
|
3783
3776
|
"property-type": "data-constant"
|
|
3784
3777
|
}
|
|
3785
3778
|
},
|
|
3786
|
-
paint_background:
|
|
3787
|
-
transition:
|
|
3779
|
+
paint_background: Vs,
|
|
3780
|
+
transition: Gs,
|
|
3788
3781
|
"property-type": {
|
|
3789
3782
|
"data-driven": {
|
|
3790
3783
|
type: "property-type"
|
|
@@ -3805,9 +3798,9 @@ var cs = 8, ps = {
|
|
|
3805
3798
|
type: "property-type"
|
|
3806
3799
|
}
|
|
3807
3800
|
},
|
|
3808
|
-
promoteId:
|
|
3809
|
-
interpolation:
|
|
3810
|
-
interpolation_name:
|
|
3801
|
+
promoteId: Hs,
|
|
3802
|
+
interpolation: Ks,
|
|
3803
|
+
interpolation_name: Zs
|
|
3811
3804
|
};
|
|
3812
3805
|
class w {
|
|
3813
3806
|
constructor(e, t, n, a) {
|
|
@@ -3847,7 +3840,7 @@ class hn {
|
|
|
3847
3840
|
}
|
|
3848
3841
|
const sr = { kind: "null" }, S = { kind: "number" }, I = { kind: "string" }, P = { kind: "boolean" }, be = { kind: "color" }, lr = {
|
|
3849
3842
|
kind: "projectionDefinition"
|
|
3850
|
-
}, qe = { kind: "object" }, M = { kind: "value" },
|
|
3843
|
+
}, qe = { kind: "object" }, M = { kind: "value" }, Ys = { kind: "error" }, ur = { kind: "collator" }, cr = { kind: "formatted" }, pr = { kind: "padding" }, gt = { kind: "colorArray" }, fr = { kind: "numberArray" }, It = { kind: "resolvedImage" }, dr = {
|
|
3851
3844
|
kind: "variableAnchorOffsetCollection"
|
|
3852
3845
|
};
|
|
3853
3846
|
function J(r, e) {
|
|
@@ -3864,7 +3857,7 @@ function D(r) {
|
|
|
3864
3857
|
} else
|
|
3865
3858
|
return r.kind;
|
|
3866
3859
|
}
|
|
3867
|
-
const
|
|
3860
|
+
const Ws = [
|
|
3868
3861
|
sr,
|
|
3869
3862
|
S,
|
|
3870
3863
|
I,
|
|
@@ -3890,7 +3883,7 @@ function vt(r, e) {
|
|
|
3890
3883
|
if (r.kind === e.kind)
|
|
3891
3884
|
return null;
|
|
3892
3885
|
if (r.kind === "value") {
|
|
3893
|
-
for (const t of
|
|
3886
|
+
for (const t of Ws)
|
|
3894
3887
|
if (!vt(t, e))
|
|
3895
3888
|
return null;
|
|
3896
3889
|
}
|
|
@@ -3903,10 +3896,10 @@ function mn(r, e) {
|
|
|
3903
3896
|
function Ve(r, e) {
|
|
3904
3897
|
return e.some((t) => t === "null" ? r === null : t === "array" ? Array.isArray(r) : t === "object" ? r && !Array.isArray(r) && typeof r == "object" : t === typeof r);
|
|
3905
3898
|
}
|
|
3906
|
-
function
|
|
3899
|
+
function Ce(r, e) {
|
|
3907
3900
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3908
3901
|
}
|
|
3909
|
-
const ei = 0.96422, ti = 1, ri = 0.82521, ni = 4 / 29, nt = 6 / 29, ai = 3 * nt * nt,
|
|
3902
|
+
const ei = 0.96422, ti = 1, ri = 0.82521, ni = 4 / 29, nt = 6 / 29, ai = 3 * nt * nt, Js = nt * nt * nt, Qs = Math.PI / 180, el = 180 / Math.PI;
|
|
3910
3903
|
function ii(r) {
|
|
3911
3904
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3912
3905
|
}
|
|
@@ -3922,7 +3915,7 @@ function Tr(r) {
|
|
|
3922
3915
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3923
3916
|
}
|
|
3924
3917
|
function Ir(r) {
|
|
3925
|
-
return r >
|
|
3918
|
+
return r > Js ? Math.pow(r, 1 / 3) : r / ai + ni;
|
|
3926
3919
|
}
|
|
3927
3920
|
function si([r, e, t, n]) {
|
|
3928
3921
|
let a = (r + 16) / 116, i = isNaN(e) ? a : a + e / 500, o = isNaN(t) ? a : a - t / 200;
|
|
@@ -3940,14 +3933,14 @@ function _r(r) {
|
|
|
3940
3933
|
function Mr(r) {
|
|
3941
3934
|
return r > nt ? r * r * r : ai * (r - ni);
|
|
3942
3935
|
}
|
|
3943
|
-
function
|
|
3936
|
+
function tl(r) {
|
|
3944
3937
|
const [e, t, n, a] = oi(r), i = Math.sqrt(t * t + n * n);
|
|
3945
|
-
return [Math.round(i * 1e4) ? ii(Math.atan2(n, t) *
|
|
3938
|
+
return [Math.round(i * 1e4) ? ii(Math.atan2(n, t) * el) : NaN, i, e, a];
|
|
3946
3939
|
}
|
|
3947
|
-
function
|
|
3948
|
-
return r = isNaN(r) ? 0 : r *
|
|
3940
|
+
function rl([r, e, t, n]) {
|
|
3941
|
+
return r = isNaN(r) ? 0 : r * Qs, si([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3949
3942
|
}
|
|
3950
|
-
function
|
|
3943
|
+
function nl([r, e, t, n]) {
|
|
3951
3944
|
r = ii(r), e /= 100, t /= 100;
|
|
3952
3945
|
function a(i) {
|
|
3953
3946
|
const o = (i + r / 30) % 12, s = e * Math.min(t, 1 - t);
|
|
@@ -3955,16 +3948,16 @@ function ol([r, e, t, n]) {
|
|
|
3955
3948
|
}
|
|
3956
3949
|
return [a(0), a(8), a(4), n];
|
|
3957
3950
|
}
|
|
3958
|
-
const
|
|
3951
|
+
const al = Object.hasOwn || function(e, t) {
|
|
3959
3952
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
3960
3953
|
};
|
|
3961
3954
|
function ht(r, e) {
|
|
3962
|
-
return
|
|
3955
|
+
return al(r, e) ? r[e] : void 0;
|
|
3963
3956
|
}
|
|
3964
|
-
function
|
|
3957
|
+
function il(r) {
|
|
3965
3958
|
if (r = r.toLowerCase().trim(), r === "transparent")
|
|
3966
3959
|
return [0, 0, 0, 0];
|
|
3967
|
-
const e = ht(
|
|
3960
|
+
const e = ht(ol, r);
|
|
3968
3961
|
if (e) {
|
|
3969
3962
|
const [a, i, o] = e;
|
|
3970
3963
|
return [a / 255, i / 255, o / 255, 1];
|
|
@@ -4009,13 +4002,13 @@ function ll(r) {
|
|
|
4009
4002
|
// % (optional)
|
|
4010
4003
|
] = i, v = [u || " ", f || " ", m].join("");
|
|
4011
4004
|
if (v === " " || v === " /" || v === ",," || v === ",,,") {
|
|
4012
|
-
const x = [l, p, h].join(""),
|
|
4013
|
-
if (
|
|
4005
|
+
const x = [l, p, h].join(""), A = x === "%%%" ? 100 : x === "" ? 255 : 0;
|
|
4006
|
+
if (A) {
|
|
4014
4007
|
const L = [
|
|
4015
|
-
et(+s /
|
|
4016
|
-
et(+c /
|
|
4017
|
-
et(+d /
|
|
4018
|
-
g ?
|
|
4008
|
+
et(+s / A, 0, 1),
|
|
4009
|
+
et(+c / A, 0, 1),
|
|
4010
|
+
et(+d / A, 0, 1),
|
|
4011
|
+
g ? Wn(+g, b) : 1
|
|
4019
4012
|
];
|
|
4020
4013
|
if (Jn(L))
|
|
4021
4014
|
return L;
|
|
@@ -4051,17 +4044,17 @@ function ll(r) {
|
|
|
4051
4044
|
+i,
|
|
4052
4045
|
et(+s, 0, 100),
|
|
4053
4046
|
et(+u, 0, 100),
|
|
4054
|
-
p ?
|
|
4047
|
+
p ? Wn(+p, f) : 1
|
|
4055
4048
|
];
|
|
4056
4049
|
if (Jn(h))
|
|
4057
|
-
return
|
|
4050
|
+
return nl(h);
|
|
4058
4051
|
}
|
|
4059
4052
|
}
|
|
4060
4053
|
}
|
|
4061
4054
|
function zt(r) {
|
|
4062
4055
|
return parseInt(r.padEnd(2, r), 16) / 255;
|
|
4063
4056
|
}
|
|
4064
|
-
function
|
|
4057
|
+
function Wn(r, e) {
|
|
4065
4058
|
return et(e ? r / 100 : r, 0, 1);
|
|
4066
4059
|
}
|
|
4067
4060
|
function et(r, e, t) {
|
|
@@ -4070,7 +4063,7 @@ function et(r, e, t) {
|
|
|
4070
4063
|
function Jn(r) {
|
|
4071
4064
|
return !r.some(Number.isNaN);
|
|
4072
4065
|
}
|
|
4073
|
-
const
|
|
4066
|
+
const ol = {
|
|
4074
4067
|
aliceblue: [240, 248, 255],
|
|
4075
4068
|
antiquewhite: [250, 235, 215],
|
|
4076
4069
|
aqua: [0, 255, 255],
|
|
@@ -4255,7 +4248,7 @@ class $ {
|
|
|
4255
4248
|
return e;
|
|
4256
4249
|
if (typeof e != "string")
|
|
4257
4250
|
return;
|
|
4258
|
-
const t =
|
|
4251
|
+
const t = il(e);
|
|
4259
4252
|
if (t)
|
|
4260
4253
|
return new $(...t, !1);
|
|
4261
4254
|
}
|
|
@@ -4274,7 +4267,7 @@ class $ {
|
|
|
4274
4267
|
* @returns Gien color, with reversed alpha blending, in HCL color space.
|
|
4275
4268
|
*/
|
|
4276
4269
|
get hcl() {
|
|
4277
|
-
return this.overwriteGetter("hcl",
|
|
4270
|
+
return this.overwriteGetter("hcl", tl(this.rgb));
|
|
4278
4271
|
}
|
|
4279
4272
|
/**
|
|
4280
4273
|
* Used in color interpolation.
|
|
@@ -4335,7 +4328,7 @@ class $ {
|
|
|
4335
4328
|
let x = u - i;
|
|
4336
4329
|
u > i && x > 180 ? x -= 360 : u < i && i - u > 180 && (x += 360), d = i + n * x;
|
|
4337
4330
|
} else isNaN(i) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = i, (p === 1 || p === 0) && (h = o));
|
|
4338
|
-
const [m, g, b, v] =
|
|
4331
|
+
const [m, g, b, v] = rl([
|
|
4339
4332
|
d,
|
|
4340
4333
|
h ?? Ge(o, c, n),
|
|
4341
4334
|
Ge(s, p, n),
|
|
@@ -4368,7 +4361,7 @@ class yn {
|
|
|
4368
4361
|
return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
|
|
4369
4362
|
}
|
|
4370
4363
|
}
|
|
4371
|
-
const
|
|
4364
|
+
const sl = ["bottom", "center", "top"];
|
|
4372
4365
|
class Hr {
|
|
4373
4366
|
constructor(e, t, n, a, i, o) {
|
|
4374
4367
|
this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = i, this.verticalAlign = o;
|
|
@@ -4507,7 +4500,7 @@ class V extends Error {
|
|
|
4507
4500
|
return this.message;
|
|
4508
4501
|
}
|
|
4509
4502
|
}
|
|
4510
|
-
const
|
|
4503
|
+
const ll = /* @__PURE__ */ new Set([
|
|
4511
4504
|
"center",
|
|
4512
4505
|
"left",
|
|
4513
4506
|
"right",
|
|
@@ -4528,7 +4521,7 @@ class we {
|
|
|
4528
4521
|
if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
|
|
4529
4522
|
for (let t = 0; t < e.length; t += 2) {
|
|
4530
4523
|
const n = e[t], a = e[t + 1];
|
|
4531
|
-
if (typeof n != "string" || !
|
|
4524
|
+
if (typeof n != "string" || !ll.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
|
|
4532
4525
|
return;
|
|
4533
4526
|
}
|
|
4534
4527
|
return new we(e);
|
|
@@ -4847,7 +4840,7 @@ class Re {
|
|
|
4847
4840
|
return this.args.every((e) => e.outputDefined());
|
|
4848
4841
|
}
|
|
4849
4842
|
}
|
|
4850
|
-
const
|
|
4843
|
+
const ul = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4851
4844
|
class ui {
|
|
4852
4845
|
constructor() {
|
|
4853
4846
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = /* @__PURE__ */ new Map(), this.availableImages = null, this.canonical = null;
|
|
@@ -4856,7 +4849,7 @@ class ui {
|
|
|
4856
4849
|
return this.feature && "id" in this.feature ? this.feature.id : null;
|
|
4857
4850
|
}
|
|
4858
4851
|
geometryType() {
|
|
4859
|
-
return this.feature ? typeof this.feature.type == "number" ?
|
|
4852
|
+
return this.feature ? typeof this.feature.type == "number" ? ul[this.feature.type] : this.feature.type : null;
|
|
4860
4853
|
}
|
|
4861
4854
|
geometry() {
|
|
4862
4855
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -5207,7 +5200,7 @@ class wn {
|
|
|
5207
5200
|
return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
|
|
5208
5201
|
}
|
|
5209
5202
|
}
|
|
5210
|
-
class
|
|
5203
|
+
class Yt {
|
|
5211
5204
|
constructor(e, t, n, a) {
|
|
5212
5205
|
this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
|
|
5213
5206
|
}
|
|
@@ -5221,9 +5214,9 @@ class Wt {
|
|
|
5221
5214
|
return t.error(`Expected first argument to be of type array or string, but found ${D(n.type)} instead`);
|
|
5222
5215
|
if (e.length === 4) {
|
|
5223
5216
|
const i = t.parse(e[3], 3, S);
|
|
5224
|
-
return i ? new
|
|
5217
|
+
return i ? new Yt(n.type, n, a, i) : null;
|
|
5225
5218
|
} else
|
|
5226
|
-
return new
|
|
5219
|
+
return new Yt(n.type, n, a);
|
|
5227
5220
|
}
|
|
5228
5221
|
evaluate(e) {
|
|
5229
5222
|
const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
|
|
@@ -5307,11 +5300,11 @@ class gr {
|
|
|
5307
5300
|
return this.outputs.every((e) => e.outputDefined());
|
|
5308
5301
|
}
|
|
5309
5302
|
}
|
|
5310
|
-
function
|
|
5303
|
+
function cl(r) {
|
|
5311
5304
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
5312
5305
|
}
|
|
5313
5306
|
var Pr, ea;
|
|
5314
|
-
function
|
|
5307
|
+
function pl() {
|
|
5315
5308
|
if (ea) return Pr;
|
|
5316
5309
|
ea = 1, Pr = r;
|
|
5317
5310
|
function r(e, t, n, a) {
|
|
@@ -5347,7 +5340,7 @@ function hl() {
|
|
|
5347
5340
|
}
|
|
5348
5341
|
}, Pr;
|
|
5349
5342
|
}
|
|
5350
|
-
var
|
|
5343
|
+
var fl = pl(), dl = /* @__PURE__ */ cl(fl);
|
|
5351
5344
|
class Se {
|
|
5352
5345
|
constructor(e, t, n, a, i) {
|
|
5353
5346
|
this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
|
|
@@ -5362,7 +5355,7 @@ class Se {
|
|
|
5362
5355
|
i = Rr(t, 1, n, a);
|
|
5363
5356
|
else if (e.name === "cubic-bezier") {
|
|
5364
5357
|
const o = e.controlPoints;
|
|
5365
|
-
i = new
|
|
5358
|
+
i = new dl(o[0], o[1], o[2], o[3]).solve(Rr(t, 1, n, a));
|
|
5366
5359
|
}
|
|
5367
5360
|
return i;
|
|
5368
5361
|
}
|
|
@@ -5410,7 +5403,7 @@ class Se {
|
|
|
5410
5403
|
return null;
|
|
5411
5404
|
l = l || h.type, s.push([c, h]);
|
|
5412
5405
|
}
|
|
5413
|
-
return !
|
|
5406
|
+
return !Ce(l, S) && !Ce(l, lr) && !Ce(l, be) && !Ce(l, pr) && !Ce(l, fr) && !Ce(l, gt) && !Ce(l, dr) && !Ce(l, J(S)) ? t.error(`Type ${D(l)} is not interpolatable.`) : new Se(l, n, a, i, s);
|
|
5414
5407
|
}
|
|
5415
5408
|
evaluate(e) {
|
|
5416
5409
|
const t = this.labels, n = this.outputs;
|
|
@@ -5512,40 +5505,40 @@ class St {
|
|
|
5512
5505
|
function ta(r, e) {
|
|
5513
5506
|
return r === "==" || r === "!=" ? e.kind === "boolean" || e.kind === "string" || e.kind === "number" || e.kind === "null" || e.kind === "value" : e.kind === "string" || e.kind === "number" || e.kind === "value";
|
|
5514
5507
|
}
|
|
5515
|
-
function
|
|
5508
|
+
function hl(r, e, t) {
|
|
5516
5509
|
return e === t;
|
|
5517
5510
|
}
|
|
5518
|
-
function
|
|
5511
|
+
function ml(r, e, t) {
|
|
5519
5512
|
return e !== t;
|
|
5520
5513
|
}
|
|
5521
|
-
function
|
|
5514
|
+
function yl(r, e, t) {
|
|
5522
5515
|
return e < t;
|
|
5523
5516
|
}
|
|
5524
|
-
function
|
|
5517
|
+
function gl(r, e, t) {
|
|
5525
5518
|
return e > t;
|
|
5526
5519
|
}
|
|
5527
|
-
function
|
|
5520
|
+
function vl(r, e, t) {
|
|
5528
5521
|
return e <= t;
|
|
5529
5522
|
}
|
|
5530
|
-
function
|
|
5523
|
+
function bl(r, e, t) {
|
|
5531
5524
|
return e >= t;
|
|
5532
5525
|
}
|
|
5533
5526
|
function pi(r, e, t, n) {
|
|
5534
5527
|
return n.compare(e, t) === 0;
|
|
5535
5528
|
}
|
|
5536
|
-
function
|
|
5529
|
+
function wl(r, e, t, n) {
|
|
5537
5530
|
return !pi(r, e, t, n);
|
|
5538
5531
|
}
|
|
5539
|
-
function
|
|
5532
|
+
function Sl(r, e, t, n) {
|
|
5540
5533
|
return n.compare(e, t) < 0;
|
|
5541
5534
|
}
|
|
5542
|
-
function
|
|
5535
|
+
function xl(r, e, t, n) {
|
|
5543
5536
|
return n.compare(e, t) > 0;
|
|
5544
5537
|
}
|
|
5545
|
-
function
|
|
5538
|
+
function kl(r, e, t, n) {
|
|
5546
5539
|
return n.compare(e, t) <= 0;
|
|
5547
5540
|
}
|
|
5548
|
-
function
|
|
5541
|
+
function El(r, e, t, n) {
|
|
5549
5542
|
return n.compare(e, t) >= 0;
|
|
5550
5543
|
}
|
|
5551
5544
|
function ut(r, e, t) {
|
|
@@ -5602,7 +5595,7 @@ function ut(r, e, t) {
|
|
|
5602
5595
|
}
|
|
5603
5596
|
};
|
|
5604
5597
|
}
|
|
5605
|
-
const
|
|
5598
|
+
const Ll = ut("==", hl, pi), Al = ut("!=", ml, wl), Cl = ut("<", yl, Sl), Tl = ut(">", gl, xl), Il = ut("<=", vl, kl), _l = ut(">=", bl, El);
|
|
5606
5599
|
class vr {
|
|
5607
5600
|
constructor(e, t, n) {
|
|
5608
5601
|
this.type = ur, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5705,7 +5698,7 @@ class xn {
|
|
|
5705
5698
|
return null;
|
|
5706
5699
|
let p = null;
|
|
5707
5700
|
if (s["vertical-align"]) {
|
|
5708
|
-
if (typeof s["vertical-align"] == "string" && !
|
|
5701
|
+
if (typeof s["vertical-align"] == "string" && !sl.includes(s["vertical-align"]))
|
|
5709
5702
|
return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
|
|
5710
5703
|
if (p = t.parse(s["vertical-align"], 1, I), !p)
|
|
5711
5704
|
return null;
|
|
@@ -5792,24 +5785,24 @@ class En {
|
|
|
5792
5785
|
}
|
|
5793
5786
|
}
|
|
5794
5787
|
const xe = 8192;
|
|
5795
|
-
function
|
|
5796
|
-
const t =
|
|
5788
|
+
function Ml(r, e) {
|
|
5789
|
+
const t = Pl(r[0]), n = Ol(r[1]), a = Math.pow(2, e.z);
|
|
5797
5790
|
return [Math.round(t * a * xe), Math.round(n * a * xe)];
|
|
5798
5791
|
}
|
|
5799
5792
|
function Ln(r, e) {
|
|
5800
5793
|
const t = Math.pow(2, e.z), n = (r[0] / xe + e.x) / t, a = (r[1] / xe + e.y) / t;
|
|
5801
|
-
return [
|
|
5794
|
+
return [Rl(n), zl(a)];
|
|
5802
5795
|
}
|
|
5803
|
-
function
|
|
5796
|
+
function Pl(r) {
|
|
5804
5797
|
return (180 + r) / 360;
|
|
5805
5798
|
}
|
|
5806
|
-
function
|
|
5799
|
+
function Rl(r) {
|
|
5807
5800
|
return r * 360 - 180;
|
|
5808
5801
|
}
|
|
5809
|
-
function
|
|
5802
|
+
function Ol(r) {
|
|
5810
5803
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
|
|
5811
5804
|
}
|
|
5812
|
-
function
|
|
5805
|
+
function zl(r) {
|
|
5813
5806
|
return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
|
|
5814
5807
|
}
|
|
5815
5808
|
function _t(r, e) {
|
|
@@ -5818,18 +5811,18 @@ function _t(r, e) {
|
|
|
5818
5811
|
function xt(r, e) {
|
|
5819
5812
|
return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
|
|
5820
5813
|
}
|
|
5821
|
-
function
|
|
5814
|
+
function Fl(r, e, t) {
|
|
5822
5815
|
return e[1] > r[1] != t[1] > r[1] && r[0] < (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]) + e[0];
|
|
5823
5816
|
}
|
|
5824
|
-
function
|
|
5817
|
+
function $l(r, e, t) {
|
|
5825
5818
|
const n = r[0] - e[0], a = r[1] - e[1], i = r[0] - t[0], o = r[1] - t[1];
|
|
5826
5819
|
return n * o - i * a === 0 && n * i <= 0 && a * o <= 0;
|
|
5827
5820
|
}
|
|
5828
5821
|
function br(r, e, t, n) {
|
|
5829
5822
|
const a = [e[0] - r[0], e[1] - r[1]], i = [n[0] - t[0], n[1] - t[1]];
|
|
5830
|
-
return
|
|
5823
|
+
return Ul(i, a) === 0 ? !1 : !!(ra(r, e, t, n) && ra(t, n, r, e));
|
|
5831
5824
|
}
|
|
5832
|
-
function
|
|
5825
|
+
function Nl(r, e, t) {
|
|
5833
5826
|
for (const n of t)
|
|
5834
5827
|
for (let a = 0; a < n.length - 1; ++a)
|
|
5835
5828
|
if (br(r, e, n[a], n[a + 1]))
|
|
@@ -5840,13 +5833,13 @@ function ct(r, e, t = !1) {
|
|
|
5840
5833
|
let n = !1;
|
|
5841
5834
|
for (const a of e)
|
|
5842
5835
|
for (let i = 0; i < a.length - 1; i++) {
|
|
5843
|
-
if (
|
|
5836
|
+
if ($l(r, a[i], a[i + 1]))
|
|
5844
5837
|
return t;
|
|
5845
|
-
|
|
5838
|
+
Fl(r, a[i], a[i + 1]) && (n = !n);
|
|
5846
5839
|
}
|
|
5847
5840
|
return n;
|
|
5848
5841
|
}
|
|
5849
|
-
function
|
|
5842
|
+
function jl(r, e) {
|
|
5850
5843
|
for (const t of e)
|
|
5851
5844
|
if (ct(r, t))
|
|
5852
5845
|
return !0;
|
|
@@ -5857,29 +5850,29 @@ function di(r, e) {
|
|
|
5857
5850
|
if (!ct(t, e))
|
|
5858
5851
|
return !1;
|
|
5859
5852
|
for (let t = 0; t < r.length - 1; ++t)
|
|
5860
|
-
if (
|
|
5853
|
+
if (Nl(r[t], r[t + 1], e))
|
|
5861
5854
|
return !1;
|
|
5862
5855
|
return !0;
|
|
5863
5856
|
}
|
|
5864
|
-
function
|
|
5857
|
+
function Dl(r, e) {
|
|
5865
5858
|
for (const t of e)
|
|
5866
5859
|
if (di(r, t))
|
|
5867
5860
|
return !0;
|
|
5868
5861
|
return !1;
|
|
5869
5862
|
}
|
|
5870
|
-
function
|
|
5863
|
+
function Ul(r, e) {
|
|
5871
5864
|
return r[0] * e[1] - r[1] * e[0];
|
|
5872
5865
|
}
|
|
5873
5866
|
function ra(r, e, t, n) {
|
|
5874
5867
|
const a = r[0] - t[0], i = r[1] - t[1], o = e[0] - t[0], s = e[1] - t[1], l = n[0] - t[0], u = n[1] - t[1], c = a * u - l * i, p = o * u - l * s;
|
|
5875
5868
|
return c > 0 && p < 0 || c < 0 && p > 0;
|
|
5876
5869
|
}
|
|
5877
|
-
function
|
|
5870
|
+
function An(r, e, t) {
|
|
5878
5871
|
const n = [];
|
|
5879
5872
|
for (let a = 0; a < r.length; a++) {
|
|
5880
5873
|
const i = [];
|
|
5881
5874
|
for (let o = 0; o < r[a].length; o++) {
|
|
5882
|
-
const s =
|
|
5875
|
+
const s = Ml(r[a][o], t);
|
|
5883
5876
|
_t(e, s), i.push(s);
|
|
5884
5877
|
}
|
|
5885
5878
|
n.push(i);
|
|
@@ -5889,7 +5882,7 @@ function Cn(r, e, t) {
|
|
|
5889
5882
|
function hi(r, e, t) {
|
|
5890
5883
|
const n = [];
|
|
5891
5884
|
for (let a = 0; a < r.length; a++) {
|
|
5892
|
-
const i =
|
|
5885
|
+
const i = An(r[a], e, t);
|
|
5893
5886
|
n.push(i);
|
|
5894
5887
|
}
|
|
5895
5888
|
return n;
|
|
@@ -5902,7 +5895,7 @@ function mi(r, e, t, n) {
|
|
|
5902
5895
|
}
|
|
5903
5896
|
_t(e, r);
|
|
5904
5897
|
}
|
|
5905
|
-
function
|
|
5898
|
+
function Bl(r) {
|
|
5906
5899
|
r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
|
|
5907
5900
|
}
|
|
5908
5901
|
function na(r, e, t, n) {
|
|
@@ -5925,17 +5918,17 @@ function aa(r, e, t, n) {
|
|
|
5925
5918
|
o.push(l);
|
|
5926
5919
|
}
|
|
5927
5920
|
if (e[2] - e[0] <= a / 2) {
|
|
5928
|
-
|
|
5921
|
+
Bl(e);
|
|
5929
5922
|
for (const s of o)
|
|
5930
5923
|
for (const l of s)
|
|
5931
5924
|
mi(l, e, t, a);
|
|
5932
5925
|
}
|
|
5933
5926
|
return o;
|
|
5934
5927
|
}
|
|
5935
|
-
function
|
|
5928
|
+
function ql(r, e) {
|
|
5936
5929
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5937
5930
|
if (e.type === "Polygon") {
|
|
5938
|
-
const i =
|
|
5931
|
+
const i = An(e.coordinates, n, a), o = na(r.geometry(), t, n, a);
|
|
5939
5932
|
if (!xt(t, n))
|
|
5940
5933
|
return !1;
|
|
5941
5934
|
for (const s of o)
|
|
@@ -5947,15 +5940,15 @@ function Hl(r, e) {
|
|
|
5947
5940
|
if (!xt(t, n))
|
|
5948
5941
|
return !1;
|
|
5949
5942
|
for (const s of o)
|
|
5950
|
-
if (!
|
|
5943
|
+
if (!jl(s, i))
|
|
5951
5944
|
return !1;
|
|
5952
5945
|
}
|
|
5953
5946
|
return !0;
|
|
5954
5947
|
}
|
|
5955
|
-
function
|
|
5948
|
+
function Vl(r, e) {
|
|
5956
5949
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5957
5950
|
if (e.type === "Polygon") {
|
|
5958
|
-
const i =
|
|
5951
|
+
const i = An(e.coordinates, n, a), o = aa(r.geometry(), t, n, a);
|
|
5959
5952
|
if (!xt(t, n))
|
|
5960
5953
|
return !1;
|
|
5961
5954
|
for (const s of o)
|
|
@@ -5967,7 +5960,7 @@ function Kl(r, e) {
|
|
|
5967
5960
|
if (!xt(t, n))
|
|
5968
5961
|
return !1;
|
|
5969
5962
|
for (const s of o)
|
|
5970
|
-
if (!
|
|
5963
|
+
if (!Dl(s, i))
|
|
5971
5964
|
return !1;
|
|
5972
5965
|
}
|
|
5973
5966
|
return !0;
|
|
@@ -6006,9 +5999,9 @@ class He {
|
|
|
6006
5999
|
evaluate(e) {
|
|
6007
6000
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6008
6001
|
if (e.geometryType() === "Point")
|
|
6009
|
-
return
|
|
6002
|
+
return ql(e, this.geometries);
|
|
6010
6003
|
if (e.geometryType() === "LineString")
|
|
6011
|
-
return
|
|
6004
|
+
return Vl(e, this.geometries);
|
|
6012
6005
|
}
|
|
6013
6006
|
return !1;
|
|
6014
6007
|
}
|
|
@@ -6054,27 +6047,27 @@ class yi {
|
|
|
6054
6047
|
t[e] = i;
|
|
6055
6048
|
}
|
|
6056
6049
|
}
|
|
6057
|
-
function
|
|
6050
|
+
function Gl(r, e) {
|
|
6058
6051
|
if (r.length <= 1)
|
|
6059
6052
|
return [r];
|
|
6060
6053
|
const n = [];
|
|
6061
6054
|
let a, i;
|
|
6062
6055
|
for (const o of r) {
|
|
6063
|
-
const s =
|
|
6056
|
+
const s = Hl(o);
|
|
6064
6057
|
s !== 0 && (o.area = Math.abs(s), i === void 0 && (i = s < 0), i === s < 0 ? (a && n.push(a), a = [o]) : a.push(o));
|
|
6065
6058
|
}
|
|
6066
6059
|
return a && n.push(a), n;
|
|
6067
6060
|
}
|
|
6068
|
-
function
|
|
6061
|
+
function Hl(r) {
|
|
6069
6062
|
let e = 0;
|
|
6070
6063
|
for (let t = 0, n = r.length, a = n - 1, i, o; t < n; a = t++)
|
|
6071
6064
|
i = r[t], o = r[a], e += (o.x - i.x) * (i.y + o.y);
|
|
6072
6065
|
return e;
|
|
6073
6066
|
}
|
|
6074
|
-
const
|
|
6075
|
-
class
|
|
6067
|
+
const Kl = 6378.137, ia = 1 / 298.257223563, oa = ia * (2 - ia), sa = Math.PI / 180;
|
|
6068
|
+
class Cn {
|
|
6076
6069
|
constructor(e) {
|
|
6077
|
-
const t = sa *
|
|
6070
|
+
const t = sa * Kl * 1e3, n = Math.cos(e * sa), a = 1 / (1 - oa * (1 - n * n)), i = Math.sqrt(a);
|
|
6078
6071
|
this.kx = t * i * n, this.ky = t * i * a * (1 - oa);
|
|
6079
6072
|
}
|
|
6080
6073
|
/**
|
|
@@ -6129,16 +6122,16 @@ const Kr = 100, Zr = 50;
|
|
|
6129
6122
|
function gi(r, e) {
|
|
6130
6123
|
return e[0] - r[0];
|
|
6131
6124
|
}
|
|
6132
|
-
function
|
|
6125
|
+
function Wt(r) {
|
|
6133
6126
|
return r[1] - r[0] + 1;
|
|
6134
6127
|
}
|
|
6135
|
-
function
|
|
6128
|
+
function Ae(r, e) {
|
|
6136
6129
|
return r[1] >= r[0] && r[1] < e;
|
|
6137
6130
|
}
|
|
6138
6131
|
function Xr(r, e) {
|
|
6139
6132
|
if (r[0] > r[1])
|
|
6140
6133
|
return [null, null];
|
|
6141
|
-
const t =
|
|
6134
|
+
const t = Wt(r);
|
|
6142
6135
|
if (e) {
|
|
6143
6136
|
if (t === 2)
|
|
6144
6137
|
return [r, null];
|
|
@@ -6156,15 +6149,15 @@ function Xr(r, e) {
|
|
|
6156
6149
|
[r[0] + n + 1, r[1]]
|
|
6157
6150
|
];
|
|
6158
6151
|
}
|
|
6159
|
-
function
|
|
6160
|
-
if (!
|
|
6152
|
+
function Yr(r, e) {
|
|
6153
|
+
if (!Ae(e, r.length))
|
|
6161
6154
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6162
6155
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6163
6156
|
for (let n = e[0]; n <= e[1]; ++n)
|
|
6164
6157
|
_t(t, r[n]);
|
|
6165
6158
|
return t;
|
|
6166
6159
|
}
|
|
6167
|
-
function
|
|
6160
|
+
function Wr(r) {
|
|
6168
6161
|
const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6169
6162
|
for (const t of r)
|
|
6170
6163
|
for (const n of t)
|
|
@@ -6188,8 +6181,8 @@ function In(r, e, t, n, a) {
|
|
|
6188
6181
|
const i = Math.min(Be(r, [t, n], a), Be(e, [t, n], a)), o = Math.min(Be(t, [r, e], a), Be(n, [r, e], a));
|
|
6189
6182
|
return Math.min(i, o);
|
|
6190
6183
|
}
|
|
6191
|
-
function
|
|
6192
|
-
if (!(
|
|
6184
|
+
function Zl(r, e, t, n, a) {
|
|
6185
|
+
if (!(Ae(e, r.length) && Ae(n, t.length)))
|
|
6193
6186
|
return 1 / 0;
|
|
6194
6187
|
let o = 1 / 0;
|
|
6195
6188
|
for (let s = e[0]; s < e[1]; ++s) {
|
|
@@ -6203,8 +6196,8 @@ function Yl(r, e, t, n, a) {
|
|
|
6203
6196
|
}
|
|
6204
6197
|
return o;
|
|
6205
6198
|
}
|
|
6206
|
-
function
|
|
6207
|
-
if (!(
|
|
6199
|
+
function Xl(r, e, t, n, a) {
|
|
6200
|
+
if (!(Ae(e, r.length) && Ae(n, t.length)))
|
|
6208
6201
|
return NaN;
|
|
6209
6202
|
let o = 1 / 0;
|
|
6210
6203
|
for (let s = e[0]; s <= e[1]; ++s)
|
|
@@ -6213,7 +6206,7 @@ function Jl(r, e, t, n, a) {
|
|
|
6213
6206
|
return o;
|
|
6214
6207
|
return o;
|
|
6215
6208
|
}
|
|
6216
|
-
function
|
|
6209
|
+
function Yl(r, e, t) {
|
|
6217
6210
|
if (ct(r, e, !0))
|
|
6218
6211
|
return 0;
|
|
6219
6212
|
let n = 1 / 0;
|
|
@@ -6227,8 +6220,8 @@ function Ql(r, e, t) {
|
|
|
6227
6220
|
}
|
|
6228
6221
|
return n;
|
|
6229
6222
|
}
|
|
6230
|
-
function
|
|
6231
|
-
if (!
|
|
6223
|
+
function Wl(r, e, t, n) {
|
|
6224
|
+
if (!Ae(e, r.length))
|
|
6232
6225
|
return NaN;
|
|
6233
6226
|
for (let i = e[0]; i <= e[1]; ++i)
|
|
6234
6227
|
if (ct(r[i], t, !0))
|
|
@@ -6253,8 +6246,8 @@ function ua(r, e) {
|
|
|
6253
6246
|
return !0;
|
|
6254
6247
|
return !1;
|
|
6255
6248
|
}
|
|
6256
|
-
function
|
|
6257
|
-
const a =
|
|
6249
|
+
function Jl(r, e, t, n = 1 / 0) {
|
|
6250
|
+
const a = Wr(r), i = Wr(e);
|
|
6258
6251
|
if (n !== 1 / 0 && Tn(a, i, t) >= n)
|
|
6259
6252
|
return n;
|
|
6260
6253
|
if (xt(a, i)) {
|
|
@@ -6279,36 +6272,36 @@ function tu(r, e, t, n = 1 / 0) {
|
|
|
6279
6272
|
function ca(r, e, t, n, a, i) {
|
|
6280
6273
|
if (!i)
|
|
6281
6274
|
return;
|
|
6282
|
-
const o = Tn(
|
|
6275
|
+
const o = Tn(Yr(n, i), a, t);
|
|
6283
6276
|
o < e && r.push([o, i, [0, 0]]);
|
|
6284
6277
|
}
|
|
6285
6278
|
function $t(r, e, t, n, a, i, o) {
|
|
6286
6279
|
if (!i || !o)
|
|
6287
6280
|
return;
|
|
6288
|
-
const s = Tn(
|
|
6281
|
+
const s = Tn(Yr(n, i), Yr(a, o), t);
|
|
6289
6282
|
s < e && r.push([s, i, o]);
|
|
6290
6283
|
}
|
|
6291
6284
|
function Jt(r, e, t, n, a = 1 / 0) {
|
|
6292
6285
|
let i = Math.min(n.distance(r[0], t[0][0]), a);
|
|
6293
6286
|
if (i === 0)
|
|
6294
6287
|
return i;
|
|
6295
|
-
const o = new yi([[0, [0, r.length - 1], [0, 0]]], gi), s =
|
|
6288
|
+
const o = new yi([[0, [0, r.length - 1], [0, 0]]], gi), s = Wr(t);
|
|
6296
6289
|
for (; o.length > 0; ) {
|
|
6297
6290
|
const l = o.pop();
|
|
6298
6291
|
if (l[0] >= i)
|
|
6299
6292
|
continue;
|
|
6300
6293
|
const u = l[1], c = e ? Zr : Kr;
|
|
6301
|
-
if (
|
|
6302
|
-
if (!
|
|
6294
|
+
if (Wt(u) <= c) {
|
|
6295
|
+
if (!Ae(u, r.length))
|
|
6303
6296
|
return NaN;
|
|
6304
6297
|
if (e) {
|
|
6305
|
-
const p =
|
|
6298
|
+
const p = Wl(r, u, t, n);
|
|
6306
6299
|
if (isNaN(p) || p === 0)
|
|
6307
6300
|
return p;
|
|
6308
6301
|
i = Math.min(i, p);
|
|
6309
6302
|
} else
|
|
6310
6303
|
for (let p = u[0]; p <= u[1]; ++p) {
|
|
6311
|
-
const f =
|
|
6304
|
+
const f = Yl(r[p], t, n);
|
|
6312
6305
|
if (i = Math.min(i, f), i === 0)
|
|
6313
6306
|
return 0;
|
|
6314
6307
|
}
|
|
@@ -6329,12 +6322,12 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6329
6322
|
if (l[0] >= o)
|
|
6330
6323
|
continue;
|
|
6331
6324
|
const u = l[1], c = l[2], p = e ? Zr : Kr, f = n ? Zr : Kr;
|
|
6332
|
-
if (
|
|
6333
|
-
if (!
|
|
6325
|
+
if (Wt(u) <= p && Wt(c) <= f) {
|
|
6326
|
+
if (!Ae(u, r.length) && Ae(c, t.length))
|
|
6334
6327
|
return NaN;
|
|
6335
6328
|
let d;
|
|
6336
6329
|
if (e && n)
|
|
6337
|
-
d =
|
|
6330
|
+
d = Zl(r, u, t, c, a), o = Math.min(o, d);
|
|
6338
6331
|
else if (e && !n) {
|
|
6339
6332
|
const h = r.slice(u[0], u[1] + 1);
|
|
6340
6333
|
for (let m = c[0]; m <= c[1]; ++m)
|
|
@@ -6346,7 +6339,7 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6346
6339
|
if (d = Be(r[m], h, a), o = Math.min(o, d), o === 0)
|
|
6347
6340
|
return o;
|
|
6348
6341
|
} else
|
|
6349
|
-
d =
|
|
6342
|
+
d = Xl(r, u, t, c, a), o = Math.min(o, d);
|
|
6350
6343
|
} else {
|
|
6351
6344
|
const d = Xr(u, e), h = Xr(c, n);
|
|
6352
6345
|
$t(s, o, a, r, t, d[0], h[0]), $t(s, o, a, r, t, d[0], h[1]), $t(s, o, a, r, t, d[1], h[0]), $t(s, o, a, r, t, d[1], h[1]);
|
|
@@ -6354,11 +6347,11 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6354
6347
|
}
|
|
6355
6348
|
return o;
|
|
6356
6349
|
}
|
|
6357
|
-
function
|
|
6350
|
+
function Ql(r, e) {
|
|
6358
6351
|
const t = r.geometry(), n = t.flat().map((o) => Ln([o.x, o.y], r.canonical));
|
|
6359
6352
|
if (t.length === 0)
|
|
6360
6353
|
return NaN;
|
|
6361
|
-
const a = new
|
|
6354
|
+
const a = new Cn(n[0][1]);
|
|
6362
6355
|
let i = 1 / 0;
|
|
6363
6356
|
for (const o of e) {
|
|
6364
6357
|
switch (o.type) {
|
|
@@ -6377,11 +6370,11 @@ function ru(r, e) {
|
|
|
6377
6370
|
}
|
|
6378
6371
|
return i;
|
|
6379
6372
|
}
|
|
6380
|
-
function
|
|
6373
|
+
function eu(r, e) {
|
|
6381
6374
|
const t = r.geometry(), n = t.flat().map((o) => Ln([o.x, o.y], r.canonical));
|
|
6382
6375
|
if (t.length === 0)
|
|
6383
6376
|
return NaN;
|
|
6384
|
-
const a = new
|
|
6377
|
+
const a = new Cn(n[0][1]);
|
|
6385
6378
|
let i = 1 / 0;
|
|
6386
6379
|
for (const o of e) {
|
|
6387
6380
|
switch (o.type) {
|
|
@@ -6400,11 +6393,11 @@ function nu(r, e) {
|
|
|
6400
6393
|
}
|
|
6401
6394
|
return i;
|
|
6402
6395
|
}
|
|
6403
|
-
function
|
|
6396
|
+
function tu(r, e) {
|
|
6404
6397
|
const t = r.geometry();
|
|
6405
6398
|
if (t.length === 0 || t[0].length === 0)
|
|
6406
6399
|
return NaN;
|
|
6407
|
-
const n =
|
|
6400
|
+
const n = Gl(t).map((o) => o.map((s) => s.map((l) => Ln([l.x, l.y], r.canonical)))), a = new Cn(n[0][0][0][1]);
|
|
6408
6401
|
let i = 1 / 0;
|
|
6409
6402
|
for (const o of e)
|
|
6410
6403
|
for (const s of n) {
|
|
@@ -6416,7 +6409,7 @@ function au(r, e) {
|
|
|
6416
6409
|
i = Math.min(i, Jt(o.coordinates, !0, s, a, i));
|
|
6417
6410
|
break;
|
|
6418
6411
|
case "Polygon":
|
|
6419
|
-
i = Math.min(i,
|
|
6412
|
+
i = Math.min(i, Jl(s, o.coordinates, a, i));
|
|
6420
6413
|
break;
|
|
6421
6414
|
}
|
|
6422
6415
|
if (i === 0)
|
|
@@ -6457,11 +6450,11 @@ class Ke {
|
|
|
6457
6450
|
evaluate(e) {
|
|
6458
6451
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6459
6452
|
if (e.geometryType() === "Point")
|
|
6460
|
-
return
|
|
6453
|
+
return Ql(e, this.geometries);
|
|
6461
6454
|
if (e.geometryType() === "LineString")
|
|
6462
|
-
return
|
|
6455
|
+
return eu(e, this.geometries);
|
|
6463
6456
|
if (e.geometryType() === "Polygon")
|
|
6464
|
-
return
|
|
6457
|
+
return tu(e, this.geometries);
|
|
6465
6458
|
}
|
|
6466
6459
|
return NaN;
|
|
6467
6460
|
}
|
|
@@ -6494,12 +6487,12 @@ class Mt {
|
|
|
6494
6487
|
}
|
|
6495
6488
|
const _n = {
|
|
6496
6489
|
// special forms
|
|
6497
|
-
"==":
|
|
6498
|
-
"!=":
|
|
6499
|
-
">":
|
|
6500
|
-
"<":
|
|
6501
|
-
">=":
|
|
6502
|
-
"<=":
|
|
6490
|
+
"==": Ll,
|
|
6491
|
+
"!=": Al,
|
|
6492
|
+
">": Tl,
|
|
6493
|
+
"<": Cl,
|
|
6494
|
+
">=": _l,
|
|
6495
|
+
"<=": Il,
|
|
6503
6496
|
array: fe,
|
|
6504
6497
|
at: gn,
|
|
6505
6498
|
boolean: fe,
|
|
@@ -6520,7 +6513,7 @@ const _n = {
|
|
|
6520
6513
|
number: fe,
|
|
6521
6514
|
"number-format": Sn,
|
|
6522
6515
|
object: fe,
|
|
6523
|
-
slice:
|
|
6516
|
+
slice: Yt,
|
|
6524
6517
|
step: gr,
|
|
6525
6518
|
string: fe,
|
|
6526
6519
|
"to-boolean": Re,
|
|
@@ -6583,7 +6576,7 @@ class me {
|
|
|
6583
6576
|
if (s.length === 1)
|
|
6584
6577
|
t.errors.push(...l.errors);
|
|
6585
6578
|
else {
|
|
6586
|
-
const c = (s.length ? s : o).map(([f]) =>
|
|
6579
|
+
const c = (s.length ? s : o).map(([f]) => nu(f)).join(" | "), p = [];
|
|
6587
6580
|
for (let f = 1; f < e.length; f++) {
|
|
6588
6581
|
const d = t.parse(e[f], 1 + p.length);
|
|
6589
6582
|
if (!d)
|
|
@@ -6614,7 +6607,7 @@ function zr(r, e) {
|
|
|
6614
6607
|
const t = e[r];
|
|
6615
6608
|
return typeof t > "u" ? null : t;
|
|
6616
6609
|
}
|
|
6617
|
-
function
|
|
6610
|
+
function ru(r, e, t, n) {
|
|
6618
6611
|
for (; t <= n; ) {
|
|
6619
6612
|
const a = t + n >> 1;
|
|
6620
6613
|
if (e[a] === r)
|
|
@@ -6628,7 +6621,7 @@ function De(r) {
|
|
|
6628
6621
|
}
|
|
6629
6622
|
me.register(_n, {
|
|
6630
6623
|
error: [
|
|
6631
|
-
|
|
6624
|
+
Ys,
|
|
6632
6625
|
[I],
|
|
6633
6626
|
(r, [e]) => {
|
|
6634
6627
|
throw new V(e.evaluate(r));
|
|
@@ -6847,7 +6840,7 @@ me.register(_n, {
|
|
|
6847
6840
|
P,
|
|
6848
6841
|
[I, J(M)],
|
|
6849
6842
|
// assumes v is a array literal with values sorted in ascending order and of a single type
|
|
6850
|
-
(r, [e, t]) =>
|
|
6843
|
+
(r, [e, t]) => ru(r.properties()[e.value], t.value, 0, t.value.length - 1)
|
|
6851
6844
|
],
|
|
6852
6845
|
all: {
|
|
6853
6846
|
type: P,
|
|
@@ -6912,7 +6905,7 @@ me.register(_n, {
|
|
|
6912
6905
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6913
6906
|
]
|
|
6914
6907
|
});
|
|
6915
|
-
function
|
|
6908
|
+
function nu(r) {
|
|
6916
6909
|
return Array.isArray(r) ? `(${r.map(D).join(", ")})` : `(${D(r.type)}...)`;
|
|
6917
6910
|
}
|
|
6918
6911
|
function er(r) {
|
|
@@ -6998,9 +6991,9 @@ function R(r) {
|
|
|
6998
6991
|
function Mn(r) {
|
|
6999
6992
|
return typeof r == "object" && r !== null && !Array.isArray(r) && H(r) === qe;
|
|
7000
6993
|
}
|
|
7001
|
-
class
|
|
6994
|
+
class au {
|
|
7002
6995
|
constructor(e, t, n) {
|
|
7003
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new ui(), this._defaultValue = t ?
|
|
6996
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new ui(), this._defaultValue = t ? su(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null, this._globalState = n;
|
|
7004
6997
|
}
|
|
7005
6998
|
evaluateWithoutErrorHandling(e, t, n, a, i, o) {
|
|
7006
6999
|
return this._globalState && (e = st(e, this._globalState)), this._evaluator.globals = e, this._evaluator.feature = t, this._evaluator.featureState = n, this._evaluator.canonical = a, this._evaluator.availableImages = i || null, this._evaluator.formattedSection = o, this.expression.evaluate(this._evaluator);
|
|
@@ -7023,8 +7016,8 @@ function wi(r) {
|
|
|
7023
7016
|
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in _n;
|
|
7024
7017
|
}
|
|
7025
7018
|
function Si(r, e, t) {
|
|
7026
|
-
const n = new hr(_n, er, [], e ?
|
|
7027
|
-
return a ? Jr(new
|
|
7019
|
+
const n = new hr(_n, er, [], e ? ou(e) : void 0), a = n.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
7020
|
+
return a ? Jr(new au(a, e, t)) : tt(n.errors);
|
|
7028
7021
|
}
|
|
7029
7022
|
class da {
|
|
7030
7023
|
constructor(e, t, n) {
|
|
@@ -7051,7 +7044,7 @@ class ha {
|
|
|
7051
7044
|
return this.interpolationType ? Se.interpolationFactor(this.interpolationType, e, t, n) : 0;
|
|
7052
7045
|
}
|
|
7053
7046
|
}
|
|
7054
|
-
function
|
|
7047
|
+
function iu(r, e, t) {
|
|
7055
7048
|
const n = Si(r, e, t);
|
|
7056
7049
|
if (n.result === "error")
|
|
7057
7050
|
return n;
|
|
@@ -7096,7 +7089,7 @@ function Pn(r, e = /* @__PURE__ */ new Set()) {
|
|
|
7096
7089
|
Pn(t, e);
|
|
7097
7090
|
}), e;
|
|
7098
7091
|
}
|
|
7099
|
-
function
|
|
7092
|
+
function ou(r) {
|
|
7100
7093
|
const e = {
|
|
7101
7094
|
color: be,
|
|
7102
7095
|
string: I,
|
|
@@ -7113,7 +7106,7 @@ function uu(r) {
|
|
|
7113
7106
|
};
|
|
7114
7107
|
return r.type === "array" ? J(e[r.value] || M, r.length) : e[r.type];
|
|
7115
7108
|
}
|
|
7116
|
-
function
|
|
7109
|
+
function su(r) {
|
|
7117
7110
|
if (r.type === "color" && Mn(r.default))
|
|
7118
7111
|
return new $(0, 0, 0, 0);
|
|
7119
7112
|
switch (r.type) {
|
|
@@ -7367,8 +7360,8 @@ function Ei(r) {
|
|
|
7367
7360
|
new w(m.key, x, "stop domain value must be a number, string, or boolean")
|
|
7368
7361
|
];
|
|
7369
7362
|
if (b !== "number" && t !== "categorical") {
|
|
7370
|
-
let
|
|
7371
|
-
return tr(e) && t === void 0 && (
|
|
7363
|
+
let A = `number expected, ${b} found`;
|
|
7364
|
+
return tr(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new w(m.key, x, A)];
|
|
7372
7365
|
}
|
|
7373
7366
|
return t === "categorical" && b === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [
|
|
7374
7367
|
new w(m.key, x, `integer expected, found ${v}`)
|
|
@@ -7390,7 +7383,7 @@ function Ei(r) {
|
|
|
7390
7383
|
}
|
|
7391
7384
|
}
|
|
7392
7385
|
function lt(r) {
|
|
7393
|
-
const e = (r.expressionContext === "property" ?
|
|
7386
|
+
const e = (r.expressionContext === "property" ? iu : Si)(Xe(r.value), r.valueSpec);
|
|
7394
7387
|
if (e.result === "error")
|
|
7395
7388
|
return e.value.map((n) => new w(`${r.key}${n.key}`, r.value, n.message));
|
|
7396
7389
|
const t = e.value.expression || e.value._styleExpression.expression;
|
|
@@ -7418,7 +7411,7 @@ function lt(r) {
|
|
|
7418
7411
|
}
|
|
7419
7412
|
return [];
|
|
7420
7413
|
}
|
|
7421
|
-
function
|
|
7414
|
+
function lu(r) {
|
|
7422
7415
|
const e = r.value, t = r.key, n = R(e);
|
|
7423
7416
|
return n !== "boolean" ? [new w(t, e, `boolean expected, ${n} found`)] : [];
|
|
7424
7417
|
}
|
|
@@ -7491,7 +7484,7 @@ function Li(r) {
|
|
|
7491
7484
|
}
|
|
7492
7485
|
return i;
|
|
7493
7486
|
}
|
|
7494
|
-
function
|
|
7487
|
+
function Ai(r, e) {
|
|
7495
7488
|
const t = r.key, n = r.validateSpec, a = r.style, i = r.styleSpec, o = r.value, s = r.objectKey, l = i[`${e}_${r.layerType}`];
|
|
7496
7489
|
if (!l)
|
|
7497
7490
|
return [];
|
|
@@ -7525,11 +7518,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7525
7518
|
propertyKey: s
|
|
7526
7519
|
}));
|
|
7527
7520
|
}
|
|
7528
|
-
function
|
|
7529
|
-
return
|
|
7521
|
+
function Ci(r) {
|
|
7522
|
+
return Ai(r, "paint");
|
|
7530
7523
|
}
|
|
7531
7524
|
function Ti(r) {
|
|
7532
|
-
return
|
|
7525
|
+
return Ai(r, "layout");
|
|
7533
7526
|
}
|
|
7534
7527
|
function Ii(r) {
|
|
7535
7528
|
var e, t;
|
|
@@ -7613,7 +7606,7 @@ function Ii(r) {
|
|
|
7613
7606
|
validateSpec: c.validateSpec,
|
|
7614
7607
|
objectElementValidators: {
|
|
7615
7608
|
"*"(p) {
|
|
7616
|
-
return
|
|
7609
|
+
return Ci(Zt({ layerType: l }, p));
|
|
7617
7610
|
}
|
|
7618
7611
|
}
|
|
7619
7612
|
});
|
|
@@ -7625,7 +7618,7 @@ function $e(r) {
|
|
|
7625
7618
|
const e = r.value, t = r.key, n = R(e);
|
|
7626
7619
|
return n !== "string" ? [new w(t, e, `string expected, ${n} found`)] : [];
|
|
7627
7620
|
}
|
|
7628
|
-
function
|
|
7621
|
+
function uu(r) {
|
|
7629
7622
|
var e;
|
|
7630
7623
|
const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, i = a.source_raster_dem, o = r.style;
|
|
7631
7624
|
let s = [];
|
|
@@ -7647,7 +7640,7 @@ function fu(r) {
|
|
|
7647
7640
|
return s;
|
|
7648
7641
|
}
|
|
7649
7642
|
const ma = {
|
|
7650
|
-
promoteId:
|
|
7643
|
+
promoteId: cu
|
|
7651
7644
|
};
|
|
7652
7645
|
function _i(r) {
|
|
7653
7646
|
const e = r.value, t = r.key, n = r.styleSpec, a = r.style, i = r.validateSpec;
|
|
@@ -7668,7 +7661,7 @@ function _i(r) {
|
|
|
7668
7661
|
validateSpec: i
|
|
7669
7662
|
}), s;
|
|
7670
7663
|
case "raster-dem":
|
|
7671
|
-
return s =
|
|
7664
|
+
return s = uu({
|
|
7672
7665
|
sourceName: t,
|
|
7673
7666
|
value: e,
|
|
7674
7667
|
style: r.style,
|
|
@@ -7730,7 +7723,7 @@ function _i(r) {
|
|
|
7730
7723
|
});
|
|
7731
7724
|
}
|
|
7732
7725
|
}
|
|
7733
|
-
function
|
|
7726
|
+
function cu({ key: r, value: e }) {
|
|
7734
7727
|
if (R(e) === "string")
|
|
7735
7728
|
return $e({ key: r, value: e });
|
|
7736
7729
|
{
|
|
@@ -7814,13 +7807,13 @@ function Ri(r) {
|
|
|
7814
7807
|
]);
|
|
7815
7808
|
return i;
|
|
7816
7809
|
}
|
|
7817
|
-
function
|
|
7810
|
+
function pu(r) {
|
|
7818
7811
|
return $e(r).length === 0 ? [] : lt(r);
|
|
7819
7812
|
}
|
|
7820
|
-
function
|
|
7813
|
+
function fu(r) {
|
|
7821
7814
|
return $e(r).length === 0 ? [] : lt(r);
|
|
7822
7815
|
}
|
|
7823
|
-
function
|
|
7816
|
+
function du(r) {
|
|
7824
7817
|
const e = r.key, t = r.value;
|
|
7825
7818
|
if (R(t) === "array") {
|
|
7826
7819
|
if (t.length < 1 || t.length > 4)
|
|
@@ -7846,7 +7839,7 @@ function yu(r) {
|
|
|
7846
7839
|
valueSpec: {}
|
|
7847
7840
|
});
|
|
7848
7841
|
}
|
|
7849
|
-
function
|
|
7842
|
+
function hu(r) {
|
|
7850
7843
|
const e = r.key, t = r.value;
|
|
7851
7844
|
if (R(t) === "array") {
|
|
7852
7845
|
const a = {
|
|
@@ -7872,7 +7865,7 @@ function gu(r) {
|
|
|
7872
7865
|
valueSpec: {}
|
|
7873
7866
|
});
|
|
7874
7867
|
}
|
|
7875
|
-
function
|
|
7868
|
+
function mu(r) {
|
|
7876
7869
|
const e = r.key, t = r.value;
|
|
7877
7870
|
if (R(t) === "array") {
|
|
7878
7871
|
if (t.length < 1)
|
|
@@ -7892,7 +7885,7 @@ function vu(r) {
|
|
|
7892
7885
|
value: t
|
|
7893
7886
|
});
|
|
7894
7887
|
}
|
|
7895
|
-
function
|
|
7888
|
+
function yu(r) {
|
|
7896
7889
|
const e = r.key, t = r.value, n = R(t), a = r.styleSpec;
|
|
7897
7890
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
|
|
7898
7891
|
return [
|
|
@@ -7948,7 +7941,7 @@ function Oi(r) {
|
|
|
7948
7941
|
value: t
|
|
7949
7942
|
});
|
|
7950
7943
|
}
|
|
7951
|
-
function
|
|
7944
|
+
function gu(r) {
|
|
7952
7945
|
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, i = R(e);
|
|
7953
7946
|
if (e === void 0)
|
|
7954
7947
|
return [];
|
|
@@ -7969,21 +7962,21 @@ function wu(r) {
|
|
|
7969
7962
|
]);
|
|
7970
7963
|
return o;
|
|
7971
7964
|
}
|
|
7972
|
-
function
|
|
7965
|
+
function vu(r) {
|
|
7973
7966
|
const e = r.key;
|
|
7974
7967
|
let t = r.value;
|
|
7975
7968
|
t = t instanceof String ? t.valueOf() : t;
|
|
7976
7969
|
const n = R(t);
|
|
7977
|
-
return n === "array" && !
|
|
7970
|
+
return n === "array" && !wu(t) && !bu(t) ? [
|
|
7978
7971
|
new w(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)
|
|
7979
7972
|
] : ["array", "string"].includes(n) ? [] : [
|
|
7980
7973
|
new w(e, t, `projection expected, invalid type "${n}" found`)
|
|
7981
7974
|
];
|
|
7982
7975
|
}
|
|
7983
|
-
function
|
|
7976
|
+
function bu(r) {
|
|
7984
7977
|
return !!["interpolate", "step", "literal"].includes(r[0]);
|
|
7985
7978
|
}
|
|
7986
|
-
function
|
|
7979
|
+
function wu(r) {
|
|
7987
7980
|
return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
|
|
7988
7981
|
}
|
|
7989
7982
|
function zi(r) {
|
|
@@ -7994,7 +7987,7 @@ function Fi(r) {
|
|
|
7994
7987
|
new w(r.key, r.value, `object expected, ${R(r.value)} found`)
|
|
7995
7988
|
];
|
|
7996
7989
|
}
|
|
7997
|
-
function
|
|
7990
|
+
function Su(r) {
|
|
7998
7991
|
const e = r.key, t = r.value, n = r.validateSpec, a = r.styleSpec, i = r.style;
|
|
7999
7992
|
if (!zi(t))
|
|
8000
7993
|
return [new w(e, t, `object expected, ${R(t)} found`)];
|
|
@@ -8036,7 +8029,7 @@ const ya = {
|
|
|
8036
8029
|
return [];
|
|
8037
8030
|
},
|
|
8038
8031
|
array: Rn,
|
|
8039
|
-
boolean:
|
|
8032
|
+
boolean: lu,
|
|
8040
8033
|
number: xr,
|
|
8041
8034
|
color: Qr,
|
|
8042
8035
|
constants: ki,
|
|
@@ -8049,18 +8042,18 @@ const ya = {
|
|
|
8049
8042
|
light: Mi,
|
|
8050
8043
|
sky: Pi,
|
|
8051
8044
|
terrain: Ri,
|
|
8052
|
-
projection:
|
|
8053
|
-
projectionDefinition:
|
|
8045
|
+
projection: gu,
|
|
8046
|
+
projectionDefinition: vu,
|
|
8054
8047
|
string: $e,
|
|
8055
|
-
formatted:
|
|
8056
|
-
resolvedImage:
|
|
8057
|
-
padding:
|
|
8058
|
-
numberArray:
|
|
8059
|
-
colorArray:
|
|
8060
|
-
variableAnchorOffsetCollection:
|
|
8048
|
+
formatted: pu,
|
|
8049
|
+
resolvedImage: fu,
|
|
8050
|
+
padding: du,
|
|
8051
|
+
numberArray: hu,
|
|
8052
|
+
colorArray: mu,
|
|
8053
|
+
variableAnchorOffsetCollection: yu,
|
|
8061
8054
|
sprite: Oi,
|
|
8062
8055
|
state: Fi,
|
|
8063
|
-
fontFaces:
|
|
8056
|
+
fontFaces: Su
|
|
8064
8057
|
};
|
|
8065
8058
|
function rr(r) {
|
|
8066
8059
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
@@ -8072,7 +8065,7 @@ function $i(r) {
|
|
|
8072
8065
|
const e = r.value, t = r.key, n = $e(r);
|
|
8073
8066
|
return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new w(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new w(t, e, '"glyphs" url must include a "{range}" token'))), n;
|
|
8074
8067
|
}
|
|
8075
|
-
function se(r, e =
|
|
8068
|
+
function se(r, e = Xs) {
|
|
8076
8069
|
let t = [];
|
|
8077
8070
|
return t = t.concat(rr({
|
|
8078
8071
|
key: "",
|
|
@@ -8101,7 +8094,7 @@ se.terrain = ge(ye(Ri));
|
|
|
8101
8094
|
se.state = ge(ye(Fi));
|
|
8102
8095
|
se.layer = ge(ye(Ii));
|
|
8103
8096
|
se.filter = ge(ye(On));
|
|
8104
|
-
se.paintProperty = ge(ye(
|
|
8097
|
+
se.paintProperty = ge(ye(Ci));
|
|
8105
8098
|
se.layoutProperty = ge(ye(Ti));
|
|
8106
8099
|
function ye(r) {
|
|
8107
8100
|
return function(e) {
|
|
@@ -8119,37 +8112,37 @@ function ge(r) {
|
|
|
8119
8112
|
function ga(r) {
|
|
8120
8113
|
if (!r)
|
|
8121
8114
|
return {
|
|
8122
|
-
style: dt[
|
|
8115
|
+
style: dt[Ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
8123
8116
|
requiresUrlMonitoring: !1,
|
|
8124
8117
|
// default styles don't require URL monitoring
|
|
8125
8118
|
isFallback: !0
|
|
8126
8119
|
};
|
|
8127
8120
|
if (typeof r == "string") {
|
|
8128
|
-
const t =
|
|
8121
|
+
const t = ku(r);
|
|
8129
8122
|
return t.isValidStyle ? {
|
|
8130
8123
|
style: t.styleObject,
|
|
8131
8124
|
requiresUrlMonitoring: !1,
|
|
8132
8125
|
isFallback: !1
|
|
8133
8126
|
} : t.isValidJSON ? {
|
|
8134
|
-
style: dt[
|
|
8127
|
+
style: dt[Ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
8135
8128
|
requiresUrlMonitoring: !1,
|
|
8136
8129
|
// default styles don't require URL monitoring
|
|
8137
8130
|
isFallback: !0
|
|
8138
8131
|
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
|
|
8139
|
-
style:
|
|
8132
|
+
style: xu(r),
|
|
8140
8133
|
requiresUrlMonitoring: !0,
|
|
8141
8134
|
isFallback: !1
|
|
8142
8135
|
} : {
|
|
8143
|
-
style:
|
|
8136
|
+
style: Ro(r),
|
|
8144
8137
|
requiresUrlMonitoring: !0,
|
|
8145
8138
|
isFallback: !1
|
|
8146
8139
|
};
|
|
8147
8140
|
}
|
|
8148
|
-
return r instanceof
|
|
8141
|
+
return r instanceof Oo ? {
|
|
8149
8142
|
style: r.getExpandedStyleURL(),
|
|
8150
8143
|
requiresUrlMonitoring: !1,
|
|
8151
8144
|
isFallback: !1
|
|
8152
|
-
} : r instanceof
|
|
8145
|
+
} : r instanceof zo ? {
|
|
8153
8146
|
style: r.getDefaultVariant().getExpandedStyleURL(),
|
|
8154
8147
|
requiresUrlMonitoring: !1,
|
|
8155
8148
|
isFallback: !1
|
|
@@ -8159,20 +8152,20 @@ function ga(r) {
|
|
|
8159
8152
|
isFallback: !1,
|
|
8160
8153
|
isJSON: !0
|
|
8161
8154
|
} : {
|
|
8162
|
-
style: dt[
|
|
8155
|
+
style: dt[Ar[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
8163
8156
|
requiresUrlMonitoring: !1,
|
|
8164
8157
|
// default styles don't require URL monitoring
|
|
8165
8158
|
isFallback: !0
|
|
8166
8159
|
};
|
|
8167
8160
|
}
|
|
8168
|
-
function
|
|
8161
|
+
function xu(r) {
|
|
8169
8162
|
try {
|
|
8170
8163
|
return new URL(r).href;
|
|
8171
8164
|
} catch {
|
|
8172
8165
|
}
|
|
8173
8166
|
return new URL(r, location.origin).href;
|
|
8174
8167
|
}
|
|
8175
|
-
function
|
|
8168
|
+
function ku(r) {
|
|
8176
8169
|
try {
|
|
8177
8170
|
const e = JSON.parse(r), t = se(e);
|
|
8178
8171
|
return {
|
|
@@ -8195,12 +8188,12 @@ function Le(r, e, t) {
|
|
|
8195
8188
|
function Lt(r) {
|
|
8196
8189
|
r.parentNode && r.parentNode.removeChild(r);
|
|
8197
8190
|
}
|
|
8198
|
-
class
|
|
8191
|
+
class Eu {
|
|
8199
8192
|
constructor() {
|
|
8200
8193
|
y(this, "_map");
|
|
8201
8194
|
y(this, "_container");
|
|
8202
8195
|
y(this, "_terrainButton");
|
|
8203
|
-
|
|
8196
|
+
Yo(["_toggleTerrain", "_updateTerrainIcon"], this);
|
|
8204
8197
|
}
|
|
8205
8198
|
onAdd(e) {
|
|
8206
8199
|
return this._map = e, this._container = Le("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = Le("button", "maplibregl-ctrl-terrain", this._container), Le("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;
|
|
@@ -8218,7 +8211,7 @@ class Au {
|
|
|
8218
8211
|
function ji(r) {
|
|
8219
8212
|
r.hasTerrain() ? r.disableTerrain() : r.enableTerrain();
|
|
8220
8213
|
}
|
|
8221
|
-
class
|
|
8214
|
+
class Lu extends Wa {
|
|
8222
8215
|
constructor(t = {}) {
|
|
8223
8216
|
super({
|
|
8224
8217
|
showCompass: t.showCompass ?? !0,
|
|
@@ -8244,8 +8237,8 @@ class Tu extends Ya {
|
|
|
8244
8237
|
return a.clickFunction = n, a;
|
|
8245
8238
|
}
|
|
8246
8239
|
}
|
|
8247
|
-
const va = k.Marker, ba = k.LngLat,
|
|
8248
|
-
class
|
|
8240
|
+
const va = k.Marker, ba = k.LngLat, Au = k.LngLatBounds;
|
|
8241
|
+
class Cu extends No {
|
|
8249
8242
|
constructor() {
|
|
8250
8243
|
super(...arguments);
|
|
8251
8244
|
y(this, "lastUpdatedCenter", new ba(0, 0));
|
|
@@ -8262,7 +8255,7 @@ class _u extends Do {
|
|
|
8262
8255
|
...this.options.fitBoundsOptions,
|
|
8263
8256
|
linear: !0
|
|
8264
8257
|
}, s = this._map.getZoom();
|
|
8265
|
-
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (o.zoom = s), this._map.fitBounds(
|
|
8258
|
+
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (o.zoom = s), this._map.fitBounds(Au.fromLngLat(n, a), o, {
|
|
8266
8259
|
geolocateSource: !0
|
|
8267
8260
|
// tag this camera change so it won't cause the control to change to background state
|
|
8268
8261
|
});
|
|
@@ -8326,18 +8319,18 @@ class _u extends Do {
|
|
|
8326
8319
|
}
|
|
8327
8320
|
}
|
|
8328
8321
|
var Te, te, Ie, _e, at;
|
|
8329
|
-
class
|
|
8322
|
+
class Tu {
|
|
8330
8323
|
/**
|
|
8331
8324
|
* @param selectorOrElement Element to be used as control, specified as either reference to element itself or a CSS selector to find the element in DOM
|
|
8332
8325
|
* @param onClick Function called when the element is clicked
|
|
8333
8326
|
* @param onRender Function called every time the underlying map renders a new state
|
|
8334
8327
|
*/
|
|
8335
8328
|
constructor(e, t, n) {
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8329
|
+
Y(this, Te);
|
|
8330
|
+
Y(this, te);
|
|
8331
|
+
Y(this, Ie);
|
|
8332
|
+
Y(this, _e);
|
|
8333
|
+
Y(this, at);
|
|
8341
8334
|
if (typeof e == "string") {
|
|
8342
8335
|
const a = document.querySelector(e);
|
|
8343
8336
|
if (!a) throw new Error(`No element has been found with selector "${e}" when creating an external control.`);
|
|
@@ -8358,7 +8351,7 @@ class Mu {
|
|
|
8358
8351
|
}
|
|
8359
8352
|
}
|
|
8360
8353
|
Te = new WeakMap(), te = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), at = new WeakMap();
|
|
8361
|
-
class
|
|
8354
|
+
class Iu {
|
|
8362
8355
|
constructor() {
|
|
8363
8356
|
y(this, "map");
|
|
8364
8357
|
y(this, "container");
|
|
@@ -8398,8 +8391,8 @@ const pt = {
|
|
|
8398
8391
|
r.setRoll(0);
|
|
8399
8392
|
}
|
|
8400
8393
|
};
|
|
8401
|
-
var
|
|
8402
|
-
class en extends
|
|
8394
|
+
var Ct, it;
|
|
8395
|
+
class en extends Tu {
|
|
8403
8396
|
/**
|
|
8404
8397
|
* Constructs an instance of External Control to have a predefined functionality
|
|
8405
8398
|
* @param controlElement Element to be used as control, specified as reference to element itself
|
|
@@ -8408,11 +8401,11 @@ class en extends Mu {
|
|
|
8408
8401
|
constructor(t, n) {
|
|
8409
8402
|
if (n && !(n in pt)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8410
8403
|
super(t, n && pt[n]);
|
|
8411
|
-
|
|
8412
|
-
|
|
8404
|
+
Y(this, Ct);
|
|
8405
|
+
Y(this, it, /* @__PURE__ */ new Map());
|
|
8413
8406
|
}
|
|
8414
8407
|
onAdd(t) {
|
|
8415
|
-
return Q(this,
|
|
8408
|
+
return Q(this, Ct, t), super.onAdd(t);
|
|
8416
8409
|
}
|
|
8417
8410
|
onRemove() {
|
|
8418
8411
|
for (const [t, n] of E(this, it)) {
|
|
@@ -8430,23 +8423,23 @@ class en extends Mu {
|
|
|
8430
8423
|
if (!n) return;
|
|
8431
8424
|
if (!(n in pt)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8432
8425
|
const a = (i) => {
|
|
8433
|
-
pt[n](E(this,
|
|
8426
|
+
pt[n](E(this, Ct), t, i);
|
|
8434
8427
|
};
|
|
8435
8428
|
t.addEventListener("click", a), E(this, it).set(new WeakRef(t), a);
|
|
8436
8429
|
}
|
|
8437
8430
|
}
|
|
8438
|
-
|
|
8431
|
+
Ct = new WeakMap(), it = new WeakMap(), y(en, "controlCallbacks", pt);
|
|
8439
8432
|
var re, ce, Me, Pe, ne, Tt, K, Ui, ue, Bi;
|
|
8440
8433
|
class Fr {
|
|
8441
8434
|
constructor(e, t) {
|
|
8442
|
-
|
|
8443
|
-
|
|
8435
|
+
Y(this, K);
|
|
8436
|
+
Y(this, re);
|
|
8444
8437
|
y(this, "map");
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8438
|
+
Y(this, ce);
|
|
8439
|
+
Y(this, Me);
|
|
8440
|
+
Y(this, Pe);
|
|
8441
|
+
Y(this, ne, !1);
|
|
8442
|
+
Y(this, Tt);
|
|
8450
8443
|
e.style !== void 0 && Q(this, ne, !0), Q(this, re, {
|
|
8451
8444
|
// set defaults
|
|
8452
8445
|
zoomAdjust: -4,
|
|
@@ -8579,7 +8572,7 @@ re = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Pe = new WeakMap(),
|
|
|
8579
8572
|
i();
|
|
8580
8573
|
};
|
|
8581
8574
|
};
|
|
8582
|
-
class
|
|
8575
|
+
class _u {
|
|
8583
8576
|
/**
|
|
8584
8577
|
*
|
|
8585
8578
|
* @param map : a Map instance
|
|
@@ -8615,23 +8608,23 @@ class Ru {
|
|
|
8615
8608
|
this.viewerType = e;
|
|
8616
8609
|
}
|
|
8617
8610
|
preparePayload() {
|
|
8618
|
-
const e = new URL(
|
|
8619
|
-
return e.searchParams.append("sdk",
|
|
8611
|
+
const e = new URL(W.telemetryURL);
|
|
8612
|
+
return e.searchParams.append("sdk", bo()), e.searchParams.append("key", j.apiKey), e.searchParams.append("mtsid", ir), e.searchParams.append("session", j.session ? "1" : "0"), e.searchParams.append("caching", j.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;
|
|
8620
8613
|
}
|
|
8621
8614
|
}
|
|
8622
|
-
var
|
|
8615
|
+
var At = typeof Float32Array < "u" ? Float32Array : Array;
|
|
8623
8616
|
function yt() {
|
|
8624
|
-
var r = new
|
|
8625
|
-
return
|
|
8617
|
+
var r = new At(16);
|
|
8618
|
+
return At != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0), r[0] = 1, r[5] = 1, r[10] = 1, r[15] = 1, r;
|
|
8626
8619
|
}
|
|
8627
|
-
function
|
|
8620
|
+
function Mu(r, e, t, n, a, i, o, s, l, u, c, p, f, d, h, m, g) {
|
|
8628
8621
|
return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = i, r[5] = o, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = f, r[12] = d, r[13] = h, r[14] = m, r[15] = g, r;
|
|
8629
8622
|
}
|
|
8630
|
-
function
|
|
8631
|
-
var n = e[0], a = e[1], i = e[2], o = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], m = e[12], g = e[13], b = e[14], v = e[15], x = t[0],
|
|
8632
|
-
return r[0] = x * n +
|
|
8623
|
+
function Pu(r, e, t) {
|
|
8624
|
+
var n = e[0], a = e[1], i = e[2], o = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], m = e[12], g = e[13], b = e[14], v = e[15], x = t[0], A = t[1], L = t[2], C = t[3];
|
|
8625
|
+
return r[0] = x * n + A * s + L * p + C * m, r[1] = x * a + A * l + L * f + C * g, r[2] = x * i + A * u + L * d + C * b, r[3] = x * o + A * c + L * h + C * v, x = t[4], A = t[5], L = t[6], C = t[7], r[4] = x * n + A * s + L * p + C * m, r[5] = x * a + A * l + L * f + C * g, r[6] = x * i + A * u + L * d + C * b, r[7] = x * o + A * c + L * h + C * v, x = t[8], A = t[9], L = t[10], C = t[11], r[8] = x * n + A * s + L * p + C * m, r[9] = x * a + A * l + L * f + C * g, r[10] = x * i + A * u + L * d + C * b, r[11] = x * o + A * c + L * h + C * v, x = t[12], A = t[13], L = t[14], C = t[15], r[12] = x * n + A * s + L * p + C * m, r[13] = x * a + A * l + L * f + C * g, r[14] = x * i + A * u + L * d + C * b, r[15] = x * o + A * c + L * h + C * v, r;
|
|
8633
8626
|
}
|
|
8634
|
-
function
|
|
8627
|
+
function Ru(r, e, t) {
|
|
8635
8628
|
var n = t[0], a = t[1], i = t[2];
|
|
8636
8629
|
return r[0] = e[0] * n, r[1] = e[1] * n, r[2] = e[2] * n, r[3] = e[3] * n, r[4] = e[4] * a, r[5] = e[5] * a, r[6] = e[6] * a, r[7] = e[7] * a, r[8] = e[8] * i, r[9] = e[9] * i, r[10] = e[10] * i, r[11] = e[11] * i, r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
8637
8630
|
}
|
|
@@ -8639,7 +8632,7 @@ function wa(r, e, t) {
|
|
|
8639
8632
|
var n = Math.sin(t), a = Math.cos(t), i = e[4], o = e[5], s = e[6], l = e[7], u = e[8], c = e[9], p = e[10], f = e[11];
|
|
8640
8633
|
return e !== r && (r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[4] = i * a + u * n, r[5] = o * a + c * n, r[6] = s * a + p * n, r[7] = l * a + f * n, r[8] = u * a - i * n, r[9] = c * a - o * n, r[10] = p * a - s * n, r[11] = f * a - l * n, r;
|
|
8641
8634
|
}
|
|
8642
|
-
function
|
|
8635
|
+
function Ou(r, e, t) {
|
|
8643
8636
|
var n = Math.sin(t), a = Math.cos(t), i = e[0], o = e[1], s = e[2], l = e[3], u = e[8], c = e[9], p = e[10], f = e[11];
|
|
8644
8637
|
return e !== r && (r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[0] = i * a - u * n, r[1] = o * a - c * n, r[2] = s * a - p * n, r[3] = l * a - f * n, r[8] = i * n + u * a, r[9] = o * n + c * a, r[10] = s * n + p * a, r[11] = l * n + f * a, r;
|
|
8645
8638
|
}
|
|
@@ -8647,7 +8640,7 @@ function Sa(r, e, t) {
|
|
|
8647
8640
|
var n = Math.sin(t), a = Math.cos(t), i = e[0], o = e[1], s = e[2], l = e[3], u = e[4], c = e[5], p = e[6], f = e[7];
|
|
8648
8641
|
return e !== r && (r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15]), r[0] = i * a + u * n, r[1] = o * a + c * n, r[2] = s * a + p * n, r[3] = l * a + f * n, r[4] = u * a - i * n, r[5] = c * a - o * n, r[6] = p * a - s * n, r[7] = f * a - l * n, r;
|
|
8649
8642
|
}
|
|
8650
|
-
function
|
|
8643
|
+
function zu(r, e, t, n, a) {
|
|
8651
8644
|
var i = 1 / Math.tan(e / 2);
|
|
8652
8645
|
if (r[0] = i / t, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = i, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = -1, r[12] = 0, r[13] = 0, r[15] = 0, a != null && a !== 1 / 0) {
|
|
8653
8646
|
var o = 1 / (n - a);
|
|
@@ -8656,13 +8649,13 @@ function Nu(r, e, t, n, a) {
|
|
|
8656
8649
|
r[10] = -1, r[14] = -2 * n;
|
|
8657
8650
|
return r;
|
|
8658
8651
|
}
|
|
8659
|
-
var
|
|
8652
|
+
var Fu = zu;
|
|
8660
8653
|
function Gt() {
|
|
8661
|
-
var r = new
|
|
8662
|
-
return
|
|
8654
|
+
var r = new At(3);
|
|
8655
|
+
return At != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
|
|
8663
8656
|
}
|
|
8664
|
-
function
|
|
8665
|
-
var n = new
|
|
8657
|
+
function $u(r, e, t) {
|
|
8658
|
+
var n = new At(3);
|
|
8666
8659
|
return n[0] = r, n[1] = e, n[2] = t, n;
|
|
8667
8660
|
}
|
|
8668
8661
|
function $r(r, e) {
|
|
@@ -8682,11 +8675,11 @@ function xa(r, e, t) {
|
|
|
8682
8675
|
return e;
|
|
8683
8676
|
};
|
|
8684
8677
|
})();
|
|
8685
|
-
function
|
|
8678
|
+
function Nu(r) {
|
|
8686
8679
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8687
8680
|
}
|
|
8688
8681
|
var Nr, ka;
|
|
8689
|
-
function
|
|
8682
|
+
function ju() {
|
|
8690
8683
|
return ka || (ka = 1, Nr = {
|
|
8691
8684
|
aliceblue: [240, 248, 255],
|
|
8692
8685
|
antiquewhite: [250, 235, 215],
|
|
@@ -8842,7 +8835,7 @@ var jr, Ea;
|
|
|
8842
8835
|
function qi() {
|
|
8843
8836
|
if (Ea) return jr;
|
|
8844
8837
|
Ea = 1;
|
|
8845
|
-
const r =
|
|
8838
|
+
const r = ju(), e = {};
|
|
8846
8839
|
for (const a of Object.keys(r))
|
|
8847
8840
|
e[r[a]] = a;
|
|
8848
8841
|
const t = {
|
|
@@ -9142,7 +9135,7 @@ function qi() {
|
|
|
9142
9135
|
}, jr;
|
|
9143
9136
|
}
|
|
9144
9137
|
var Dr, La;
|
|
9145
|
-
function
|
|
9138
|
+
function Du() {
|
|
9146
9139
|
if (La) return Dr;
|
|
9147
9140
|
La = 1;
|
|
9148
9141
|
const r = qi();
|
|
@@ -9189,11 +9182,11 @@ function qu() {
|
|
|
9189
9182
|
return s;
|
|
9190
9183
|
}, Dr;
|
|
9191
9184
|
}
|
|
9192
|
-
var Ur,
|
|
9193
|
-
function
|
|
9194
|
-
if (
|
|
9195
|
-
|
|
9196
|
-
const r = qi(), e =
|
|
9185
|
+
var Ur, Aa;
|
|
9186
|
+
function Uu() {
|
|
9187
|
+
if (Aa) return Ur;
|
|
9188
|
+
Aa = 1;
|
|
9189
|
+
const r = qi(), e = Du(), t = {}, n = Object.keys(r);
|
|
9197
9190
|
function a(o) {
|
|
9198
9191
|
const s = function(...l) {
|
|
9199
9192
|
const u = l[0];
|
|
@@ -9224,9 +9217,9 @@ function Vu() {
|
|
|
9224
9217
|
});
|
|
9225
9218
|
}), Ur = t, Ur;
|
|
9226
9219
|
}
|
|
9227
|
-
var
|
|
9228
|
-
const
|
|
9229
|
-
function
|
|
9220
|
+
var Bu = Uu();
|
|
9221
|
+
const qu = /* @__PURE__ */ Nu(Bu);
|
|
9222
|
+
function Ca({ gl: r, type: e, source: t }) {
|
|
9230
9223
|
const n = r.createShader(e);
|
|
9231
9224
|
if (n === null)
|
|
9232
9225
|
throw new Error("Cannot create shader");
|
|
@@ -9234,17 +9227,17 @@ function Aa({ gl: r, type: e, source: t }) {
|
|
|
9234
9227
|
throw console.error("Shader compilation error:", r.getShaderInfoLog(n)), r.deleteShader(n), new Error("Cannot compile shader");
|
|
9235
9228
|
return n;
|
|
9236
9229
|
}
|
|
9237
|
-
function
|
|
9238
|
-
const n =
|
|
9230
|
+
function Vu({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
9231
|
+
const n = Ca({
|
|
9239
9232
|
gl: r,
|
|
9240
9233
|
type: r.VERTEX_SHADER,
|
|
9241
9234
|
source: e
|
|
9242
|
-
}), a =
|
|
9235
|
+
}), a = Ca({ gl: r, type: r.FRAGMENT_SHADER, source: t }), i = r.createProgram();
|
|
9243
9236
|
if (r.attachShader(i, n), r.attachShader(i, a), r.linkProgram(i), !r.getProgramParameter(i, r.LINK_STATUS))
|
|
9244
9237
|
throw console.error("Error: ", r.getProgramInfoLog(i)), new Error("Cannot link shader program");
|
|
9245
9238
|
return i;
|
|
9246
9239
|
}
|
|
9247
|
-
function
|
|
9240
|
+
function Gu(r, e, t) {
|
|
9248
9241
|
const n = r.getUniformLocation(e, t);
|
|
9249
9242
|
if (n === null)
|
|
9250
9243
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
@@ -9259,7 +9252,7 @@ function Vi({
|
|
|
9259
9252
|
vertices: i,
|
|
9260
9253
|
indices: o
|
|
9261
9254
|
}) {
|
|
9262
|
-
const s =
|
|
9255
|
+
const s = Vu({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }), l = n.reduce((d, h) => (d[h] = r.getAttribLocation(s, `a_${h}`), d), {}), u = a.reduce((d, h) => (d[h] = Gu(r, s, `u_${h}`), d), {}), c = r.createBuffer();
|
|
9263
9256
|
r.bindBuffer(r.ARRAY_BUFFER, c), r.bufferData(r.ARRAY_BUFFER, new Float32Array(i), r.STATIC_DRAW);
|
|
9264
9257
|
let p, f;
|
|
9265
9258
|
return o !== void 0 && (p = r.createBuffer(), f = o.length, r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, p), r.bufferData(r.ELEMENT_ARRAY_BUFFER, new Uint16Array(o), r.STATIC_DRAW)), {
|
|
@@ -9279,10 +9272,10 @@ function Ht(r) {
|
|
|
9279
9272
|
if (r === "transparent")
|
|
9280
9273
|
return [1, 1, 1, 0];
|
|
9281
9274
|
try {
|
|
9282
|
-
const e =
|
|
9275
|
+
const e = Hu(r), t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);
|
|
9283
9276
|
if (t != null && t.length) {
|
|
9284
9277
|
const a = !!t[4];
|
|
9285
|
-
return [...
|
|
9278
|
+
return [...qu.hex.rgb(e).map((i) => i / 255), a ? parseInt(t[4], 16) / 255 : 1];
|
|
9286
9279
|
}
|
|
9287
9280
|
const n = e.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi) ?? ["0", "0", "0"];
|
|
9288
9281
|
if (e.includes("rgb")) {
|
|
@@ -9297,10 +9290,10 @@ function Ht(r) {
|
|
|
9297
9290
|
return console.warn([`[parseColorStringToVec4]: Color ${r} is either not a valid color or its type is not supported, defaulting to black`]), [0, 0, 0, 1];
|
|
9298
9291
|
}
|
|
9299
9292
|
let ft;
|
|
9300
|
-
function
|
|
9293
|
+
function Hu(r) {
|
|
9301
9294
|
return ft = ft ?? document.createElement("canvas").getContext("2d"), ft ? (ft.fillStyle = r, ft.fillStyle) : "#000000";
|
|
9302
9295
|
}
|
|
9303
|
-
const zn = 1, U = zn / 2, B = zn / 2, q = zn / 2,
|
|
9296
|
+
const zn = 1, U = zn / 2, B = zn / 2, q = zn / 2, Ku = [-U, -B, q, U, -B, q, U, B, q, -U, B, q], Zu = [-U, -B, -q, -U, B, -q, U, B, -q, U, -B, -q], Xu = [-U, B, -q, -U, B, q, U, B, q, U, B, -q], Yu = [-U, -B, -q, U, -B, -q, U, -B, q, -U, -B, q], Wu = [U, -B, -q, U, B, -q, U, B, q, U, -B, q], Ju = [-U, -B, -q, -U, -B, q, -U, B, q, -U, B, -q], Qu = [...Ku, ...Zu, ...Xu, ...Yu, ...Wu, ...Ju], ec = [
|
|
9304
9297
|
// Front
|
|
9305
9298
|
0,
|
|
9306
9299
|
1,
|
|
@@ -9343,7 +9336,7 @@ const zn = 1, U = zn / 2, B = zn / 2, q = zn / 2, Wu = [-U, -B, q, U, -B, q, U,
|
|
|
9343
9336
|
20,
|
|
9344
9337
|
22,
|
|
9345
9338
|
23
|
|
9346
|
-
],
|
|
9339
|
+
], tc = `attribute vec3 a_vertexPosition;
|
|
9347
9340
|
varying vec3 vTextureCoord;
|
|
9348
9341
|
|
|
9349
9342
|
uniform mat4 u_projectionMatrix;
|
|
@@ -9383,7 +9376,7 @@ void main(void) {
|
|
|
9383
9376
|
#endif
|
|
9384
9377
|
}
|
|
9385
9378
|
`;
|
|
9386
|
-
var
|
|
9379
|
+
var rc = /* @__PURE__ */ ((r) => (r.UNIVERSE_DARK = "universe-dark", r))(rc || {});
|
|
9387
9380
|
const ze = {
|
|
9388
9381
|
stars: {
|
|
9389
9382
|
color: "hsl(233,100%,92%)",
|
|
@@ -9412,13 +9405,13 @@ const ze = {
|
|
|
9412
9405
|
};
|
|
9413
9406
|
var Ue = /* @__PURE__ */ ((r) => (r.POSITIVE_X = "pX", r.NEGATIVE_X = "nX", r.POSITIVE_Y = "pY", r.NEGATIVE_Y = "nY", r.POSITIVE_Z = "pZ", r.NEGATIVE_Z = "nZ", r))(Ue || {});
|
|
9414
9407
|
const rt = /* @__PURE__ */ new Map();
|
|
9415
|
-
function
|
|
9408
|
+
function nc(r) {
|
|
9416
9409
|
const e = rt.get(r);
|
|
9417
9410
|
e && (rt.delete(r), r.deleteTexture(e));
|
|
9418
9411
|
}
|
|
9419
9412
|
const Ia = /* @__PURE__ */ new Map();
|
|
9420
9413
|
let _a;
|
|
9421
|
-
function
|
|
9414
|
+
function ac({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
9422
9415
|
if (rt.get(r) && !n && _a === JSON.stringify(e)) {
|
|
9423
9416
|
t(rt.get(r), Ia.get(r));
|
|
9424
9417
|
return;
|
|
@@ -9456,7 +9449,7 @@ function sc({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
|
9456
9449
|
console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");
|
|
9457
9450
|
continue;
|
|
9458
9451
|
}
|
|
9459
|
-
const g =
|
|
9452
|
+
const g = ic(r, m);
|
|
9460
9453
|
r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texImage2D(g, 0, p, f, d, h);
|
|
9461
9454
|
}
|
|
9462
9455
|
r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR);
|
|
@@ -9466,7 +9459,7 @@ function sc({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
|
9466
9459
|
console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
|
|
9467
9460
|
});
|
|
9468
9461
|
}
|
|
9469
|
-
function
|
|
9462
|
+
function ic(r, e) {
|
|
9470
9463
|
if (e === Ue.POSITIVE_X)
|
|
9471
9464
|
return r.TEXTURE_CUBE_MAP_POSITIVE_X;
|
|
9472
9465
|
if (e === Ue.NEGATIVE_X)
|
|
@@ -9481,7 +9474,7 @@ function lc(r, e) {
|
|
|
9481
9474
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
|
|
9482
9475
|
throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
|
|
9483
9476
|
}
|
|
9484
|
-
function
|
|
9477
|
+
function oc(r, e, t) {
|
|
9485
9478
|
return [
|
|
9486
9479
|
Oe(r[0], e[0], t),
|
|
9487
9480
|
Oe(r[1], e[1], t),
|
|
@@ -9498,8 +9491,8 @@ function nr(r) {
|
|
|
9498
9491
|
const e = Object.keys(r).sort().map((t) => [t, r[t]]);
|
|
9499
9492
|
return Object.fromEntries(e);
|
|
9500
9493
|
}
|
|
9501
|
-
const Qe = "https://api.maptiler.com/resources/space",
|
|
9502
|
-
function
|
|
9494
|
+
const Qe = "https://api.maptiler.com/resources/space", sc = ["vertexPosition"], lc = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], Ma = "%USE_TEXTURE_MACRO_MARKER%", uc = "#define USE_TEXTURE", Pa = ze.stars;
|
|
9495
|
+
function cc(r, e) {
|
|
9503
9496
|
if (!tn(r))
|
|
9504
9497
|
return {
|
|
9505
9498
|
color: "transparent"
|
|
@@ -9647,7 +9640,7 @@ class Nt {
|
|
|
9647
9640
|
throw new Error(`[CubemapLayer]: Invalid cubemap specification:
|
|
9648
9641
|
- ${t.join(`
|
|
9649
9642
|
- `)}`);
|
|
9650
|
-
const n =
|
|
9643
|
+
const n = cc(e, Pa);
|
|
9651
9644
|
this.options = n, this.currentFacesDefinitionKey = JSON.stringify(n.faces ?? n.preset ?? n.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = Ht(n.color), this.faces = Ra(n), this.useCubemapTexture = this.faces !== null;
|
|
9652
9645
|
}
|
|
9653
9646
|
/**
|
|
@@ -9660,16 +9653,16 @@ class Nt {
|
|
|
9660
9653
|
*/
|
|
9661
9654
|
updateCubemap({ facesNeedUpdate: e } = { facesNeedUpdate: !0 }) {
|
|
9662
9655
|
this.useCubemapTexture = this.faces !== null;
|
|
9663
|
-
const t =
|
|
9656
|
+
const t = lc.filter((n) => n === "cubeSampler" || n === "fadeOpacity" ? this.useCubemapTexture : !0);
|
|
9664
9657
|
this.cubemap = Vi({
|
|
9665
9658
|
gl: this.gl,
|
|
9666
|
-
vertexShaderSource:
|
|
9659
|
+
vertexShaderSource: tc,
|
|
9667
9660
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
9668
|
-
fragmentShaderSource: this.useCubemapTexture ? Ta.replace(Ma,
|
|
9669
|
-
attributesKeys:
|
|
9661
|
+
fragmentShaderSource: this.useCubemapTexture ? Ta.replace(Ma, uc) : Ta.replace(Ma, ""),
|
|
9662
|
+
attributesKeys: sc,
|
|
9670
9663
|
uniformsKeys: t,
|
|
9671
|
-
vertices:
|
|
9672
|
-
indices:
|
|
9664
|
+
vertices: Qu,
|
|
9665
|
+
indices: ec
|
|
9673
9666
|
}), this.cubeMapNeedsUpdate = e, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
|
|
9674
9667
|
}
|
|
9675
9668
|
/**
|
|
@@ -9690,7 +9683,7 @@ class Nt {
|
|
|
9690
9683
|
* @param {WebGLRenderingContext | WebGL2RenderingContext} gl - The WebGL context used for rendering.
|
|
9691
9684
|
*/
|
|
9692
9685
|
onRemove(e, t) {
|
|
9693
|
-
this.cubemap && (this.texture && (
|
|
9686
|
+
this.cubemap && (this.texture && (nc(t), this.texture = void 0), t.deleteProgram(this.cubemap.shaderProgram), t.deleteBuffer(this.cubemap.positionBuffer));
|
|
9694
9687
|
}
|
|
9695
9688
|
/**
|
|
9696
9689
|
* Updates the cubemap texture with the provided faces.
|
|
@@ -9703,7 +9696,7 @@ class Nt {
|
|
|
9703
9696
|
if (this.cubeMapNeedsUpdate === !0 && !this.imageIsAnimating) {
|
|
9704
9697
|
if (this.cubeMapNeedsUpdate = !1, !this.useCubemapTexture)
|
|
9705
9698
|
return;
|
|
9706
|
-
|
|
9699
|
+
ac({
|
|
9707
9700
|
gl: e,
|
|
9708
9701
|
faces: t,
|
|
9709
9702
|
onReady: (n) => {
|
|
@@ -9730,7 +9723,7 @@ class Nt {
|
|
|
9730
9723
|
*/
|
|
9731
9724
|
animateColorChange() {
|
|
9732
9725
|
const e = () => {
|
|
9733
|
-
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor =
|
|
9726
|
+
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor = oc(this.previousBgColor, this.targetBgColor, this.transitionDelta), this.transitionDelta += 0.075, this.map.triggerRepaint());
|
|
9734
9727
|
};
|
|
9735
9728
|
requestAnimationFrame(e);
|
|
9736
9729
|
}
|
|
@@ -9797,9 +9790,9 @@ class Nt {
|
|
|
9797
9790
|
throw new Error("[CubemapLayer]: Cubemap is undefined");
|
|
9798
9791
|
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);
|
|
9799
9792
|
const n = 0.1, a = 1e4, i = e.canvas, o = i.clientWidth / i.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = yt();
|
|
9800
|
-
|
|
9793
|
+
Fu(u, l, o, n, a), Sa(u, u, s.rollInRadians), wa(u, u, -s.pitchInRadians), Sa(u, u, s.bearingInRadians);
|
|
9801
9794
|
const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
|
|
9802
|
-
wa(u, u, c),
|
|
9795
|
+
wa(u, u, c), Ou(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
|
|
9803
9796
|
const f = yt();
|
|
9804
9797
|
if (e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.modelViewMatrix, !1, f), 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)), this.cubemap.indexBuffer === void 0)
|
|
9805
9798
|
throw new Error("Index buffer is undefined");
|
|
@@ -9929,7 +9922,7 @@ function Ra(r) {
|
|
|
9929
9922
|
}
|
|
9930
9923
|
return null;
|
|
9931
9924
|
}
|
|
9932
|
-
const
|
|
9925
|
+
const pc = `attribute vec3 a_position;
|
|
9933
9926
|
|
|
9934
9927
|
uniform mat4 u_matrix;
|
|
9935
9928
|
uniform mat4 u_rotationMatrix;
|
|
@@ -9944,7 +9937,7 @@ void main() {
|
|
|
9944
9937
|
v_pos = a_position.xy * u_scale;
|
|
9945
9938
|
gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);
|
|
9946
9939
|
}
|
|
9947
|
-
`,
|
|
9940
|
+
`, fc = `precision mediump float;
|
|
9948
9941
|
varying vec2 v_pos;
|
|
9949
9942
|
|
|
9950
9943
|
uniform int u_stopsNumber;
|
|
@@ -10003,7 +9996,7 @@ void main() {
|
|
|
10003
9996
|
// gl_FragColor = color;
|
|
10004
9997
|
gl_FragColor = vec4(color.rgb * color.a, color.a);
|
|
10005
9998
|
}
|
|
10006
|
-
`, ke = 2,
|
|
9999
|
+
`, ke = 2, dc = ["position"], hc = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], mc = [
|
|
10007
10000
|
-ke,
|
|
10008
10001
|
-ke,
|
|
10009
10002
|
0,
|
|
@@ -10104,11 +10097,11 @@ class Ut {
|
|
|
10104
10097
|
onAdd(e, t) {
|
|
10105
10098
|
this.map = e, this.plane = Vi({
|
|
10106
10099
|
gl: t,
|
|
10107
|
-
vertexShaderSource:
|
|
10108
|
-
fragmentShaderSource:
|
|
10109
|
-
attributesKeys:
|
|
10110
|
-
uniformsKeys:
|
|
10111
|
-
vertices:
|
|
10100
|
+
vertexShaderSource: pc,
|
|
10101
|
+
fragmentShaderSource: fc,
|
|
10102
|
+
attributesKeys: dc,
|
|
10103
|
+
uniformsKeys: hc,
|
|
10104
|
+
vertices: mc
|
|
10112
10105
|
}), this.animateIn();
|
|
10113
10106
|
}
|
|
10114
10107
|
/**
|
|
@@ -10202,15 +10195,15 @@ class Ut {
|
|
|
10202
10195
|
const n = this.plane.programInfo.attributesLocations.position;
|
|
10203
10196
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 3, e.FLOAT, !1, 0, 0);
|
|
10204
10197
|
const a = yt(), i = this.scale;
|
|
10205
|
-
|
|
10198
|
+
Ru(a, a, [i, i, i]);
|
|
10206
10199
|
const o = yt();
|
|
10207
|
-
|
|
10200
|
+
Pu(o, t.defaultProjectionData.mainMatrix, a);
|
|
10208
10201
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
10209
10202
|
e.uniformMatrix4fv(s, !1, o);
|
|
10210
|
-
const l = yt(), u = this.map.transform.cameraPosition, c = $r(Gt(), u), p =
|
|
10203
|
+
const l = yt(), u = this.map.transform.cameraPosition, c = $r(Gt(), u), p = $u(0, 1, 0), f = Gt();
|
|
10211
10204
|
xa(f, p, c), $r(f, f);
|
|
10212
10205
|
const d = Gt();
|
|
10213
|
-
xa(d, c, f), $r(d, d),
|
|
10206
|
+
xa(d, c, f), $r(d, d), Mu(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
|
|
10214
10207
|
const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
10215
10208
|
e.uniformMatrix4fv(h, !1, l);
|
|
10216
10209
|
const m = this.gradient.stops.length, g = [], b = [];
|
|
@@ -10255,24 +10248,24 @@ class Ut {
|
|
|
10255
10248
|
this.map.setLayoutProperty(this.id, "visibility", "none");
|
|
10256
10249
|
}
|
|
10257
10250
|
}
|
|
10258
|
-
const
|
|
10251
|
+
const yc = ["scale", "stops"];
|
|
10259
10252
|
function za(r) {
|
|
10260
10253
|
var t;
|
|
10261
10254
|
const e = [];
|
|
10262
10255
|
if (typeof r == "boolean")
|
|
10263
10256
|
return [];
|
|
10264
10257
|
try {
|
|
10265
|
-
const n = Object.keys(r).filter((a) => !
|
|
10258
|
+
const n = Object.keys(r).filter((a) => !yc.includes(a));
|
|
10266
10259
|
n.length > 0 && e.push(`Properties ${n.map((a) => `\`${a}\``).join(", ")} are not supported.`);
|
|
10267
10260
|
} catch {
|
|
10268
10261
|
e.push("Halo specification is not an object.");
|
|
10269
10262
|
}
|
|
10270
10263
|
return typeof r.scale != "number" && e.push("Halo `scale` property is not a number."), !r.stops || r.stops.length === 0 || !Array.isArray(r.stops) ? (e.push("Halo `stops` property is not an array."), e) : ((t = r.stops) != null && t.some((n) => typeof n[0] != "number" || typeof n[1] != "string") && e.push("Halo `stops` property is not an array of [number, string]"), e);
|
|
10271
10264
|
}
|
|
10272
|
-
function
|
|
10265
|
+
function gc() {
|
|
10273
10266
|
const r = "color: #3A1888; background: white; padding: 5px 0; font-weight: bold;", e = "color: #FBC935; background: white; padding: 5px; font-weight: bold;", t = "color: #F1175D; background: white; padding: 5px 0; font-weight: bold;";
|
|
10274
10267
|
console.info(
|
|
10275
|
-
`%c❖%c❖%c❖ %cMapTiler SDK JS v${
|
|
10268
|
+
`%c❖%c❖%c❖ %cMapTiler SDK JS v${bo()} %c❖%c❖%c❖`,
|
|
10276
10269
|
e + "padding-right: 0;",
|
|
10277
10270
|
r,
|
|
10278
10271
|
t,
|
|
@@ -10282,13 +10275,13 @@ function wc() {
|
|
|
10282
10275
|
e + "padding-left: 0;"
|
|
10283
10276
|
);
|
|
10284
10277
|
}
|
|
10285
|
-
const
|
|
10278
|
+
const vc = {
|
|
10286
10279
|
POINT: "POINT",
|
|
10287
10280
|
COUNTRY: "COUNTRY"
|
|
10288
10281
|
};
|
|
10289
10282
|
let Gi = class Hi extends k.Map {
|
|
10290
10283
|
constructor(t) {
|
|
10291
|
-
t.logSDKVersion !== !1 &&
|
|
10284
|
+
t.logSDKVersion !== !1 && gc(), Qo(t.container), t.apiKey && (j.apiKey = t.apiKey);
|
|
10292
10285
|
const { style: n, requiresUrlMonitoring: a, isFallback: i } = ga(t.style);
|
|
10293
10286
|
i && console.warn(
|
|
10294
10287
|
"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."
|
|
@@ -10305,7 +10298,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10305
10298
|
...t,
|
|
10306
10299
|
style: n,
|
|
10307
10300
|
maplibreLogo: !1,
|
|
10308
|
-
transformRequest:
|
|
10301
|
+
transformRequest: Yn(t.transformRequest),
|
|
10309
10302
|
attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
|
|
10310
10303
|
};
|
|
10311
10304
|
delete l.style;
|
|
@@ -10340,7 +10333,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10340
10333
|
this.getStyle() ? h += " Leaving the style as is." : (this.setStyle(dt.STREETS), h += `Loading default MapTiler Cloud style "${dt.STREETS.getDefaultVariant().getId()}" as a fallback.`), console.warn(h);
|
|
10341
10334
|
};
|
|
10342
10335
|
if (this.on("style.load", () => {
|
|
10343
|
-
this.styleInProcess = !1, (typeof t.rtlTextPlugin == "string" || typeof t.rtlTextPlugin > "u") &&
|
|
10336
|
+
this.styleInProcess = !1, (typeof t.rtlTextPlugin == "string" || typeof t.rtlTextPlugin > "u") && Xo(t.rtlTextPlugin);
|
|
10344
10337
|
}), this.on("error", (h) => {
|
|
10345
10338
|
if (h.error instanceof k.AJAXError) {
|
|
10346
10339
|
const g = h.error.url, b = new URL(g);
|
|
@@ -10353,7 +10346,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10353
10346
|
u();
|
|
10354
10347
|
return;
|
|
10355
10348
|
}
|
|
10356
|
-
}), j.caching && !Gr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), j.caching && Gr &&
|
|
10349
|
+
}), j.caching && !Gr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), j.caching && Gr && Zo(), typeof t.language > "u")
|
|
10357
10350
|
this.primaryLanguage = j.primaryLanguage;
|
|
10358
10351
|
else {
|
|
10359
10352
|
const h = qn(t.language, O);
|
|
@@ -10365,7 +10358,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10365
10358
|
if (!t.geolocate || t.center || t.hash && o)
|
|
10366
10359
|
return;
|
|
10367
10360
|
try {
|
|
10368
|
-
if (t.geolocate ===
|
|
10361
|
+
if (t.geolocate === vc.COUNTRY) {
|
|
10369
10362
|
await this.fitToIpBounds();
|
|
10370
10363
|
return;
|
|
10371
10364
|
}
|
|
@@ -10418,28 +10411,28 @@ let Gi = class Hi extends k.Map {
|
|
|
10418
10411
|
} catch {
|
|
10419
10412
|
}
|
|
10420
10413
|
if (t.customControls) {
|
|
10421
|
-
const m = "[data-maptiler-control-group]", g = "[data-maptiler-control]", b = (
|
|
10422
|
-
let N =
|
|
10414
|
+
const m = "[data-maptiler-control-group]", g = "[data-maptiler-control]", b = (C) => {
|
|
10415
|
+
let N = C.dataset.maptilerControl;
|
|
10423
10416
|
return (N === "true" || N === "") && (N = void 0), N;
|
|
10424
|
-
}, v = (
|
|
10425
|
-
let x = [...this._container.ownerDocument.querySelectorAll(m)],
|
|
10426
|
-
(
|
|
10417
|
+
}, v = (C) => C.dataset.maptilerPosition;
|
|
10418
|
+
let x = [...this._container.ownerDocument.querySelectorAll(m)], A = [...this._container.ownerDocument.querySelectorAll(g)].filter(
|
|
10419
|
+
(C) => C.closest(m) === null
|
|
10427
10420
|
);
|
|
10428
10421
|
if (typeof t.customControls == "string") {
|
|
10429
|
-
const
|
|
10430
|
-
x = x.filter((N) => N.matches(
|
|
10422
|
+
const C = t.customControls;
|
|
10423
|
+
x = x.filter((N) => N.matches(C) || N.closest(C) !== null), A = A.filter((N) => N.matches(C) || N.closest(C) !== null);
|
|
10431
10424
|
}
|
|
10432
|
-
for (const
|
|
10433
|
-
const N = new en(
|
|
10434
|
-
this.addControl(N, v(
|
|
10435
|
-
for (const le of
|
|
10425
|
+
for (const C of x) {
|
|
10426
|
+
const N = new en(C);
|
|
10427
|
+
this.addControl(N, v(C));
|
|
10428
|
+
for (const le of C.querySelectorAll(g))
|
|
10436
10429
|
N.configureGroupItem(le, b(le));
|
|
10437
10430
|
}
|
|
10438
|
-
for (const
|
|
10439
|
-
this.addControl(new en(
|
|
10431
|
+
for (const C of A)
|
|
10432
|
+
this.addControl(new en(C, b(C)), v(C));
|
|
10440
10433
|
const L = () => {
|
|
10441
|
-
const { lng:
|
|
10442
|
-
this._container.style.setProperty("--maptiler-center-lng", String(
|
|
10434
|
+
const { lng: C, lat: N } = this.getCenter();
|
|
10435
|
+
this._container.style.setProperty("--maptiler-center-lng", String(C)), this._container.style.setProperty("--maptiler-center-lat", String(N)), 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()));
|
|
10443
10436
|
};
|
|
10444
10437
|
L(), this.on("render", L);
|
|
10445
10438
|
}
|
|
@@ -10449,20 +10442,20 @@ let Gi = class Hi extends k.Map {
|
|
|
10449
10442
|
this.addControl(new Hn({ logoURL: m }), t.logoPosition);
|
|
10450
10443
|
} else t.maptilerLogo && this.addControl(new Hn(), t.logoPosition);
|
|
10451
10444
|
if (t.scaleControl) {
|
|
10452
|
-
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, g = new
|
|
10445
|
+
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, g = new Do({ unit: j.unit });
|
|
10453
10446
|
this.addControl(g, m), j.on("unit", (b) => {
|
|
10454
10447
|
g.setUnit(b);
|
|
10455
10448
|
});
|
|
10456
10449
|
}
|
|
10457
10450
|
if (t.navigationControl !== !1) {
|
|
10458
10451
|
const m = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
|
|
10459
|
-
this.addControl(new
|
|
10452
|
+
this.addControl(new Lu(), m);
|
|
10460
10453
|
}
|
|
10461
10454
|
if (t.geolocateControl !== !1) {
|
|
10462
10455
|
const m = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
|
|
10463
10456
|
this.addControl(
|
|
10464
10457
|
// new maplibregl.GeolocateControl({
|
|
10465
|
-
new
|
|
10458
|
+
new Cu({
|
|
10466
10459
|
positionOptions: {
|
|
10467
10460
|
enableHighAccuracy: !0,
|
|
10468
10461
|
maximumAge: 0,
|
|
@@ -10480,15 +10473,15 @@ let Gi = class Hi extends k.Map {
|
|
|
10480
10473
|
}
|
|
10481
10474
|
if (t.terrainControl) {
|
|
10482
10475
|
const m = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
|
|
10483
|
-
this.addControl(new
|
|
10476
|
+
this.addControl(new Eu(), m);
|
|
10484
10477
|
}
|
|
10485
10478
|
if (t.projectionControl) {
|
|
10486
10479
|
const m = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
|
|
10487
|
-
this.addControl(new
|
|
10480
|
+
this.addControl(new Iu(), m);
|
|
10488
10481
|
}
|
|
10489
10482
|
if (t.fullscreenControl) {
|
|
10490
10483
|
const m = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
|
|
10491
|
-
this.addControl(new
|
|
10484
|
+
this.addControl(new Uo({}), m);
|
|
10492
10485
|
}
|
|
10493
10486
|
this.isReady = !0, this.fire("ready", { target: this });
|
|
10494
10487
|
});
|
|
@@ -10504,22 +10497,22 @@ let Gi = class Hi extends k.Map {
|
|
|
10504
10497
|
style: b,
|
|
10505
10498
|
language: v,
|
|
10506
10499
|
apiKey: x,
|
|
10507
|
-
maptilerLogo:
|
|
10500
|
+
maptilerLogo: A,
|
|
10508
10501
|
canvasContextAttributes: L,
|
|
10509
|
-
refreshExpiredTiles:
|
|
10502
|
+
refreshExpiredTiles: C,
|
|
10510
10503
|
maxBounds: N,
|
|
10511
10504
|
scrollZoom: le,
|
|
10512
|
-
minZoom:
|
|
10513
|
-
maxZoom:
|
|
10505
|
+
minZoom: Ye,
|
|
10506
|
+
maxZoom: We,
|
|
10514
10507
|
boxZoom: X,
|
|
10515
10508
|
locale: Je,
|
|
10516
|
-
fadeDuration:
|
|
10517
|
-
crossSourceCollisions:
|
|
10518
|
-
clickTolerance:
|
|
10519
|
-
bounds:
|
|
10520
|
-
fitBoundsOptions:
|
|
10521
|
-
pixelRatio:
|
|
10522
|
-
validateStyle:
|
|
10509
|
+
fadeDuration: So,
|
|
10510
|
+
crossSourceCollisions: xo,
|
|
10511
|
+
clickTolerance: ko,
|
|
10512
|
+
bounds: Eo,
|
|
10513
|
+
fitBoundsOptions: Lo,
|
|
10514
|
+
pixelRatio: Ao,
|
|
10515
|
+
validateStyle: Co
|
|
10523
10516
|
} = t;
|
|
10524
10517
|
this.minimap = new Fr(h, {
|
|
10525
10518
|
zoom: m,
|
|
@@ -10528,22 +10521,22 @@ let Gi = class Hi extends k.Map {
|
|
|
10528
10521
|
language: v,
|
|
10529
10522
|
apiKey: x,
|
|
10530
10523
|
container: "null",
|
|
10531
|
-
maptilerLogo:
|
|
10524
|
+
maptilerLogo: A,
|
|
10532
10525
|
canvasContextAttributes: L,
|
|
10533
|
-
refreshExpiredTiles:
|
|
10526
|
+
refreshExpiredTiles: C,
|
|
10534
10527
|
maxBounds: N,
|
|
10535
10528
|
scrollZoom: le,
|
|
10536
|
-
minZoom:
|
|
10537
|
-
maxZoom:
|
|
10529
|
+
minZoom: Ye,
|
|
10530
|
+
maxZoom: We,
|
|
10538
10531
|
boxZoom: X,
|
|
10539
10532
|
locale: Je,
|
|
10540
|
-
fadeDuration:
|
|
10541
|
-
crossSourceCollisions:
|
|
10542
|
-
clickTolerance:
|
|
10543
|
-
bounds:
|
|
10544
|
-
fitBoundsOptions:
|
|
10545
|
-
pixelRatio:
|
|
10546
|
-
validateStyle:
|
|
10533
|
+
fadeDuration: So,
|
|
10534
|
+
crossSourceCollisions: xo,
|
|
10535
|
+
clickTolerance: ko,
|
|
10536
|
+
bounds: Eo,
|
|
10537
|
+
fitBoundsOptions: Lo,
|
|
10538
|
+
pixelRatio: Ao,
|
|
10539
|
+
validateStyle: Co
|
|
10547
10540
|
}), this.addControl(this.minimap, h.position ?? "bottom-left");
|
|
10548
10541
|
} else h === !0 ? (this.minimap = new Fr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new Fr({}, t), this.addControl(this.minimap, h));
|
|
10549
10542
|
});
|
|
@@ -10564,7 +10557,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10564
10557
|
});
|
|
10565
10558
|
const h = this.getLayersOrder()[0];
|
|
10566
10559
|
t.space && this.initSpace({ options: t, before: h }), t.halo && this.initHalo({ options: t, before: h });
|
|
10567
|
-
}), this.telemetry = new
|
|
10560
|
+
}), this.telemetry = new _u(this);
|
|
10568
10561
|
}
|
|
10569
10562
|
getSpace() {
|
|
10570
10563
|
return this.space;
|
|
@@ -10861,12 +10854,12 @@ let Gi = class Hi extends k.Map {
|
|
|
10861
10854
|
}
|
|
10862
10855
|
this.setSpaceFromStyle({ style: a.style }), this.setHaloFromStyle({ style: a.style });
|
|
10863
10856
|
}, l = (m) => {
|
|
10864
|
-
var b, v, x,
|
|
10857
|
+
var b, v, x, A;
|
|
10865
10858
|
const g = (m == null ? void 0 : m.target.getStyle()) ?? a.style;
|
|
10866
10859
|
if (!this.spaceboxLoadingState.styleLoadedCallbackFired && (this.spaceboxLoadingState.styleLoadedCallbackFired = !0, this.spaceboxLoadingState.styleLoadCallbackSet = !1, typeof g != "string"))
|
|
10867
10860
|
try {
|
|
10868
10861
|
const L = this.getLayersOrder()[0];
|
|
10869
|
-
this.space ? this.setSpaceFromStyle({ style: g }) : this.initSpace({ before: L, spec: (v = (b = g.metadata) == null ? void 0 : b.maptiler) == null ? void 0 : v.space }), this.halo ? this.setHaloFromStyle({ style: g }) : this.initHalo({ before: L, spec: (
|
|
10862
|
+
this.space ? this.setSpaceFromStyle({ style: g }) : this.initSpace({ before: L, spec: (v = (b = g.metadata) == null ? void 0 : b.maptiler) == null ? void 0 : v.space }), this.halo ? this.setHaloFromStyle({ style: g }) : this.initHalo({ before: L, spec: (A = (x = g.metadata) == null ? void 0 : x.maptiler) == null ? void 0 : A.halo });
|
|
10870
10863
|
} catch (L) {
|
|
10871
10864
|
console.error(L);
|
|
10872
10865
|
}
|
|
@@ -11018,7 +11011,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11018
11011
|
return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
|
|
11019
11012
|
}
|
|
11020
11013
|
getStyleLanguage() {
|
|
11021
|
-
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ?
|
|
11014
|
+
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? Fo(this.style.stylesheet.metadata["maptiler:language"]) : null;
|
|
11022
11015
|
}
|
|
11023
11016
|
/**
|
|
11024
11017
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
@@ -11079,26 +11072,26 @@ let Gi = class Hi extends k.Map {
|
|
|
11079
11072
|
]) : i.flag === O.AUTO.flag ? (o = Gn().flag, s = ["coalesce", ["get", o], ["get", O.LOCAL.flag]]) : i === O.LOCAL ? (o = O.LOCAL.flag, s = ["get", o]) : (o = i.flag, s = ["coalesce", ["get", o], ["get", O.LOCAL.flag]]);
|
|
11080
11073
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
11081
11074
|
if (u) {
|
|
11082
|
-
const c =
|
|
11075
|
+
const c = os(l, this);
|
|
11083
11076
|
this.isStyleLocalized = Object.keys(c.localized).length > 0;
|
|
11084
11077
|
}
|
|
11085
11078
|
for (const c of l) {
|
|
11086
11079
|
if (c.type !== "symbol")
|
|
11087
11080
|
continue;
|
|
11088
11081
|
const p = c, f = this.getSource(p.source);
|
|
11089
|
-
if (!f || !("url" in f && typeof f.url == "string") || new URL(f.url).host !==
|
|
11082
|
+
if (!f || !("url" in f && typeof f.url == "string") || new URL(f.url).host !== W.maptilerApiHost)
|
|
11090
11083
|
continue;
|
|
11091
11084
|
const { id: h, layout: m } = p;
|
|
11092
11085
|
if (!m || !("text-field" in m))
|
|
11093
11086
|
continue;
|
|
11094
11087
|
let g;
|
|
11095
11088
|
if (u ? (g = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, g)) : g = this.originalLabelStyle.get(h), typeof g == "string") {
|
|
11096
|
-
const { contains: b, exactMatch: v } =
|
|
11089
|
+
const { contains: b, exactMatch: v } = es(g, this.isStyleLocalized);
|
|
11097
11090
|
if (!b) continue;
|
|
11098
11091
|
if (v)
|
|
11099
11092
|
this.setLayoutProperty(h, "text-field", s);
|
|
11100
11093
|
else {
|
|
11101
|
-
const x =
|
|
11094
|
+
const x = ts(g, s, this.isStyleLocalized);
|
|
11102
11095
|
this.setLayoutProperty(h, "text-field", x);
|
|
11103
11096
|
}
|
|
11104
11097
|
} else {
|
|
@@ -11156,11 +11149,11 @@ let Gi = class Hi extends k.Map {
|
|
|
11156
11149
|
const n = (i) => {
|
|
11157
11150
|
!this.terrain || i.type !== "data" || i.dataType !== "source" || !("source" in i) || i.sourceId !== "maptiler-terrain" || i.source.type !== "raster-dem" || i.isSourceLoaded && (this.off("data", n), this.growTerrain(t));
|
|
11158
11151
|
}, a = () => {
|
|
11159
|
-
this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(
|
|
11152
|
+
this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(W.terrainSourceId, {
|
|
11160
11153
|
type: "raster-dem",
|
|
11161
|
-
url:
|
|
11154
|
+
url: W.terrainSourceURL
|
|
11162
11155
|
}), this.setTerrain({
|
|
11163
|
-
source:
|
|
11156
|
+
source: W.terrainSourceId,
|
|
11164
11157
|
exaggeration: 0
|
|
11165
11158
|
});
|
|
11166
11159
|
};
|
|
@@ -11172,7 +11165,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11172
11165
|
a();
|
|
11173
11166
|
else {
|
|
11174
11167
|
const i = () => {
|
|
11175
|
-
this.getTerrain() && this.getSource(
|
|
11168
|
+
this.getTerrain() && this.getSource(W.terrainSourceId) || a();
|
|
11176
11169
|
};
|
|
11177
11170
|
this.once(this.style._loaded ? "render" : "load", () => {
|
|
11178
11171
|
i();
|
|
@@ -11196,7 +11189,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11196
11189
|
const o = (1 - i) ** 4, s = n * o;
|
|
11197
11190
|
this.terrain.exaggeration = s, requestAnimationFrame(a);
|
|
11198
11191
|
} else
|
|
11199
|
-
this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(
|
|
11192
|
+
this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(W.terrainSourceId) && this.removeSource(W.terrainSourceId), this.fire("terrainAnimationStop", { terrain: null });
|
|
11200
11193
|
this.triggerRepaint();
|
|
11201
11194
|
};
|
|
11202
11195
|
!this.terrainGrowing && !this.terrainFlattening && this.fire("terrainAnimationStart", { terrain: this.terrain }), this.terrainGrowing = !1, this.terrainFlattening = !0, requestAnimationFrame(a);
|
|
@@ -11236,7 +11229,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11236
11229
|
}
|
|
11237
11230
|
getCameraHash() {
|
|
11238
11231
|
const t = new Float32Array(5), n = this.getCenter();
|
|
11239
|
-
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(),
|
|
11232
|
+
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), _o.fromUint8Array(new Uint8Array(t.buffer));
|
|
11240
11233
|
}
|
|
11241
11234
|
/**
|
|
11242
11235
|
* Get the SDK config object.
|
|
@@ -11266,7 +11259,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11266
11259
|
* map.setTransformRequest((url: string, resourceType: string) => {});
|
|
11267
11260
|
*/
|
|
11268
11261
|
setTransformRequest(t) {
|
|
11269
|
-
return super.setTransformRequest(
|
|
11262
|
+
return super.setTransformRequest(Yn(t)), this;
|
|
11270
11263
|
}
|
|
11271
11264
|
/**
|
|
11272
11265
|
* Gets the {@link ProjectionSpecification}.
|
|
@@ -11315,7 +11308,7 @@ function Bt(r) {
|
|
|
11315
11308
|
}
|
|
11316
11309
|
return delete r.session, r;
|
|
11317
11310
|
}
|
|
11318
|
-
const
|
|
11311
|
+
const lf = {
|
|
11319
11312
|
forward: (r, e = {}) => Ot.geocoding.forward(r, Bt(e)),
|
|
11320
11313
|
reverse: (r, e = {}) => Ot.geocoding.reverse(r, Bt(e)),
|
|
11321
11314
|
byId: (r, e = {}) => Ot.geocoding.byId(r, Bt(e)),
|
|
@@ -11346,7 +11339,7 @@ const Ki = [
|
|
|
11346
11339
|
], Zi = [
|
|
11347
11340
|
"error"
|
|
11348
11341
|
// ErrorEvent
|
|
11349
|
-
], Xi = ["resize"],
|
|
11342
|
+
], Xi = ["resize"], Yi = ["webglcontextlost", "webglcontextrestored"], Wi = [
|
|
11350
11343
|
"moveend",
|
|
11351
11344
|
"movestart",
|
|
11352
11345
|
"move",
|
|
@@ -11372,18 +11365,18 @@ const Ki = [
|
|
|
11372
11365
|
// this is fired on layers, not the map
|
|
11373
11366
|
// keeping it for reference
|
|
11374
11367
|
// "metadata",
|
|
11375
|
-
],
|
|
11368
|
+
], bc = [
|
|
11376
11369
|
...Ki,
|
|
11377
11370
|
...Zi,
|
|
11378
11371
|
...Xi,
|
|
11379
|
-
...Wi,
|
|
11380
11372
|
...Yi,
|
|
11373
|
+
...Wi,
|
|
11381
11374
|
...Ji,
|
|
11382
11375
|
...eo,
|
|
11383
11376
|
...Qi
|
|
11384
|
-
],
|
|
11385
|
-
function
|
|
11386
|
-
|
|
11377
|
+
], wc = ["lngLat", "_defaultPrevented"];
|
|
11378
|
+
function Sc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
11379
|
+
bc.forEach((n) => {
|
|
11387
11380
|
try {
|
|
11388
11381
|
r.on(n, (a) => {
|
|
11389
11382
|
const i = n;
|
|
@@ -11392,13 +11385,13 @@ function Ec({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11392
11385
|
isOutOfBounds: m ? h[0] < 0 || h[0] > m.width || h[1] < 0 || h[1] > m.height : !0,
|
|
11393
11386
|
imageX: h[0],
|
|
11394
11387
|
imageY: h[1],
|
|
11395
|
-
...Object.fromEntries(Object.entries(a).filter(([v]) => !
|
|
11388
|
+
...Object.fromEntries(Object.entries(a).filter(([v]) => !wc.includes(v)))
|
|
11396
11389
|
};
|
|
11397
11390
|
e.fire(new ae(n, e, d.originalEvent, b));
|
|
11398
11391
|
return;
|
|
11399
11392
|
}
|
|
11400
11393
|
const o = n;
|
|
11401
|
-
if (
|
|
11394
|
+
if (Wi.includes(o)) {
|
|
11402
11395
|
const d = a;
|
|
11403
11396
|
e.fire(new ae(n, e, d.originalEvent, d));
|
|
11404
11397
|
return;
|
|
@@ -11416,7 +11409,7 @@ function Ec({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11416
11409
|
return;
|
|
11417
11410
|
}
|
|
11418
11411
|
const u = n;
|
|
11419
|
-
if (
|
|
11412
|
+
if (Yi.includes(u)) {
|
|
11420
11413
|
const d = a;
|
|
11421
11414
|
e.fire(new ae(n, e, d.originalEvent, d));
|
|
11422
11415
|
return;
|
|
@@ -11444,7 +11437,7 @@ function Ec({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11444
11437
|
}
|
|
11445
11438
|
});
|
|
11446
11439
|
}
|
|
11447
|
-
class
|
|
11440
|
+
class xc extends Error {
|
|
11448
11441
|
constructor(t, n, a) {
|
|
11449
11442
|
const i = `[${a}]: Failed to fetch ${n} at ${t.url}: ${t.status.toString()}: ${t.statusText}`;
|
|
11450
11443
|
super(i);
|
|
@@ -11454,13 +11447,13 @@ class Lc extends Error {
|
|
|
11454
11447
|
}
|
|
11455
11448
|
}
|
|
11456
11449
|
const Fa = 85.051129;
|
|
11457
|
-
function
|
|
11450
|
+
function kc(r, e) {
|
|
11458
11451
|
return new fn(e.x / r, e.y / r).toLngLat();
|
|
11459
11452
|
}
|
|
11460
|
-
function
|
|
11453
|
+
function Ec(r) {
|
|
11461
11454
|
return Math.pow(2, r);
|
|
11462
11455
|
}
|
|
11463
|
-
function
|
|
11456
|
+
function Lc(r) {
|
|
11464
11457
|
return Math.log(r) / Math.LN2;
|
|
11465
11458
|
}
|
|
11466
11459
|
function to(r, e, t) {
|
|
@@ -11476,11 +11469,11 @@ function $a(r, e, t) {
|
|
|
11476
11469
|
const n = t - e, a = ((r - e) % n + n) % n + e;
|
|
11477
11470
|
return a === e ? t : a;
|
|
11478
11471
|
}
|
|
11479
|
-
function
|
|
11472
|
+
function Ac(r, e) {
|
|
11480
11473
|
const t = to(e.lat, -Fa, Fa);
|
|
11481
|
-
return new
|
|
11474
|
+
return new wo(nn(e.lng) * r, rn(t) * r);
|
|
11482
11475
|
}
|
|
11483
|
-
const
|
|
11476
|
+
const Cc = function(r, e) {
|
|
11484
11477
|
e = to(e, this.minZoom, this.maxZoom);
|
|
11485
11478
|
const t = {
|
|
11486
11479
|
center: new Ne(r.lng, r.lat),
|
|
@@ -11492,33 +11485,33 @@ const _c = function(r, e) {
|
|
|
11492
11485
|
const X = 179.9999999999;
|
|
11493
11486
|
n = [-X, X];
|
|
11494
11487
|
}
|
|
11495
|
-
const i = this.tileSize *
|
|
11488
|
+
const i = this.tileSize * Ec(t.zoom);
|
|
11496
11489
|
let o = 0, s = i, l = 0, u = i, c = 0, p = 0;
|
|
11497
11490
|
const { x: f, y: d } = this.size, h = 0.5;
|
|
11498
11491
|
a && (o = rn(a[1]) * i, s = rn(a[0]) * i, s - o < h * d && (c = h * d / (s - o))), n && (l = $a(nn(n[0]) * i, 0, i), u = $a(nn(n[1]) * i, 0, i), u < l && (u += i), u - l < h * f && (p = h * f / (u - l)));
|
|
11499
|
-
const { x: m, y: g } =
|
|
11492
|
+
const { x: m, y: g } = Ac(i, r);
|
|
11500
11493
|
let b, v;
|
|
11501
11494
|
const x = Math.min(p || 0, c || 0);
|
|
11502
11495
|
if (x)
|
|
11503
|
-
return t.zoom +=
|
|
11504
|
-
let
|
|
11505
|
-
const
|
|
11506
|
-
|
|
11507
|
-
const
|
|
11496
|
+
return t.zoom += Lc(x), t;
|
|
11497
|
+
let A = 0, L = 0;
|
|
11498
|
+
const C = 1, N = 1 - (s - o) / d, le = 1 - (u - l) / f;
|
|
11499
|
+
A = Math.max(le, C), L = Math.max(N, C);
|
|
11500
|
+
const Ye = 1 - A, We = 1 - L;
|
|
11508
11501
|
if (a) {
|
|
11509
|
-
const X =
|
|
11502
|
+
const X = We * d / 2;
|
|
11510
11503
|
g - X < o && (v = o + X), g + X > s && (v = s - X);
|
|
11511
11504
|
}
|
|
11512
11505
|
if (n) {
|
|
11513
|
-
const X = m, Je =
|
|
11506
|
+
const X = m, Je = Ye * f / 2;
|
|
11514
11507
|
X - Je < l && (b = l + Je), X + Je > u && (b = u - Je);
|
|
11515
11508
|
}
|
|
11516
11509
|
if (b !== void 0 || v !== void 0) {
|
|
11517
|
-
const X = new
|
|
11518
|
-
t.center =
|
|
11510
|
+
const X = new wo(b ?? m, v ?? g);
|
|
11511
|
+
t.center = kc(i, X).wrap();
|
|
11519
11512
|
}
|
|
11520
11513
|
return t;
|
|
11521
|
-
},
|
|
11514
|
+
}, Tc = {
|
|
11522
11515
|
center: "translate(-50%,-50%)",
|
|
11523
11516
|
top: "translate(-50%,0)",
|
|
11524
11517
|
"top-left": "translate(0,0)",
|
|
@@ -11529,7 +11522,7 @@ const _c = function(r, e) {
|
|
|
11529
11522
|
left: "translate(0,-50%)",
|
|
11530
11523
|
right: "translate(-100%,-50%)"
|
|
11531
11524
|
};
|
|
11532
|
-
function
|
|
11525
|
+
function Ic(r) {
|
|
11533
11526
|
function e(t) {
|
|
11534
11527
|
if (!this._map) return;
|
|
11535
11528
|
const n = this._map.loaded() && !this._map.isMoving();
|
|
@@ -11538,12 +11531,12 @@ function Pc(r) {
|
|
|
11538
11531
|
this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? a = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (a = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);
|
|
11539
11532
|
let i = "";
|
|
11540
11533
|
this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? i = "rotateX(0deg)" : this._pitchAlignment === "map" && (i = `rotateX(${this._map.getPitch()}deg)`), !this._subpixelPositioning && (!t || t.type === "moveend") && (this._pos = this._pos.round());
|
|
11541
|
-
const o = `${
|
|
11534
|
+
const o = `${Tc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${a}`;
|
|
11542
11535
|
this._element.style.transform = o;
|
|
11543
11536
|
}
|
|
11544
11537
|
r._update = e.bind(r);
|
|
11545
11538
|
}
|
|
11546
|
-
class
|
|
11539
|
+
class _c {
|
|
11547
11540
|
constructor({ imageViewer: e }) {
|
|
11548
11541
|
y(this, "viewer");
|
|
11549
11542
|
y(this, "container");
|
|
@@ -11564,7 +11557,7 @@ class Rc {
|
|
|
11564
11557
|
this.container.remove();
|
|
11565
11558
|
}
|
|
11566
11559
|
}
|
|
11567
|
-
const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented:
|
|
11560
|
+
const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented: Mc } = k, Pc = {
|
|
11568
11561
|
style: {
|
|
11569
11562
|
version: 8,
|
|
11570
11563
|
sources: {},
|
|
@@ -11583,14 +11576,14 @@ const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symb
|
|
|
11583
11576
|
terrain: !1,
|
|
11584
11577
|
space: !1,
|
|
11585
11578
|
halo: !1,
|
|
11586
|
-
transformConstrain:
|
|
11587
|
-
},
|
|
11579
|
+
transformConstrain: Cc
|
|
11580
|
+
}, Rc = {
|
|
11588
11581
|
debug: !1,
|
|
11589
11582
|
fitToBoundsControl: !0,
|
|
11590
11583
|
navigationControl: !0
|
|
11591
11584
|
};
|
|
11592
|
-
var Za, Xa,
|
|
11593
|
-
class
|
|
11585
|
+
var Za, Xa, Ya;
|
|
11586
|
+
class Oc extends (Ya = Mc, Xa = ro, Za = no, Ya) {
|
|
11594
11587
|
//#region constructor
|
|
11595
11588
|
/**
|
|
11596
11589
|
* The constructor for the ImageViewer.
|
|
@@ -11674,12 +11667,12 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
11674
11667
|
if (typeof t.container != "string" && !(t.container instanceof HTMLElement))
|
|
11675
11668
|
throw new Error("[ImageViewer]: `container` is required and must be a string or HTMLElement");
|
|
11676
11669
|
this.options = {
|
|
11677
|
-
...
|
|
11670
|
+
...Rc,
|
|
11678
11671
|
...t
|
|
11679
11672
|
};
|
|
11680
11673
|
const n = {
|
|
11681
11674
|
...this.options,
|
|
11682
|
-
...
|
|
11675
|
+
...Pc
|
|
11683
11676
|
};
|
|
11684
11677
|
delete n.center, this.sdk = new Gi(n), this.sdk.telemetry.registerViewerType("ImageViewer");
|
|
11685
11678
|
const { imageUUID: a, debug: i } = t;
|
|
@@ -11734,11 +11727,11 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
11734
11727
|
var t, n, a;
|
|
11735
11728
|
try {
|
|
11736
11729
|
await this.sdk.onReadyAsync(), await this.fetchImageMetadata(), this.addImageSource(), this.options.navigationControl && this.sdk.addControl(
|
|
11737
|
-
new
|
|
11730
|
+
new Wa({
|
|
11738
11731
|
visualizePitch: !1,
|
|
11739
11732
|
visualizeRoll: !1
|
|
11740
11733
|
})
|
|
11741
|
-
), this.fitToBoundsControlInstance = new
|
|
11734
|
+
), this.fitToBoundsControlInstance = new _c({ imageViewer: this }), this.options.fitToBoundsControl && this.sdk.addControl(this.fitToBoundsControlInstance), Sc({
|
|
11742
11735
|
map: this.sdk,
|
|
11743
11736
|
viewer: this,
|
|
11744
11737
|
lngLatToPx: (u) => this.lngLatToPx(u)
|
|
@@ -11780,9 +11773,9 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
11780
11773
|
* @returns {Promise<void>}
|
|
11781
11774
|
*/
|
|
11782
11775
|
async fetchImageMetadata() {
|
|
11783
|
-
const t =
|
|
11776
|
+
const t = zc(this.imageUUID), n = await fetch(t);
|
|
11784
11777
|
if (!n.ok)
|
|
11785
|
-
throw new
|
|
11778
|
+
throw new xc(n, "image metadata", "ImageViewer");
|
|
11786
11779
|
const a = await n.json();
|
|
11787
11780
|
this.imageMetadata = a, Object.freeze(this.imageMetadata);
|
|
11788
11781
|
}
|
|
@@ -11796,7 +11789,7 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
11796
11789
|
addImageSource() {
|
|
11797
11790
|
if (!this.imageMetadata)
|
|
11798
11791
|
throw this.fire("error", new ae("error", this, null, { error: new Error("[ImageViewer]: Image metadata not found") })), new Error("[ImageViewer]: Image metadata not found");
|
|
11799
|
-
const t =
|
|
11792
|
+
const t = Fc(this.imageUUID), n = (s) => Math.pow(2, Math.ceil(Math.log(s) / Math.LN2));
|
|
11800
11793
|
this.imageSize = [this.imageMetadata.width, this.imageMetadata.height], this.paddedSizeMax = Math.max(n(this.imageSize[0]), n(this.imageSize[1]));
|
|
11801
11794
|
const a = this.pxToLngLat([0, 0]), i = this.pxToLngLat(this.imageSize), o = [a.lng, i.lat, i.lng, a.lat];
|
|
11802
11795
|
this.sdk.addSource("image", {
|
|
@@ -12131,7 +12124,7 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
12131
12124
|
* @returns {ImageViewer} The ImageViewer instance.
|
|
12132
12125
|
*/
|
|
12133
12126
|
fitImageBounds([t, n]) {
|
|
12134
|
-
const a = this.pxToLngLat(t), i = this.pxToLngLat(n), o =
|
|
12127
|
+
const a = this.pxToLngLat(t), i = this.pxToLngLat(n), o = Rp.convert([a, i]);
|
|
12135
12128
|
return this.sdk.fitBounds(o), this;
|
|
12136
12129
|
}
|
|
12137
12130
|
//#region remove
|
|
@@ -12162,23 +12155,23 @@ class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
|
12162
12155
|
return t[0] >= a[0][0] && t[0] <= a[1][0] && t[1] >= a[0][1] && t[1] <= a[1][1];
|
|
12163
12156
|
}
|
|
12164
12157
|
}
|
|
12165
|
-
function
|
|
12158
|
+
function zc(r) {
|
|
12166
12159
|
return `${ao()}/${r}/image.json?key=${j.apiKey}`;
|
|
12167
12160
|
}
|
|
12168
|
-
function
|
|
12161
|
+
function Fc(r) {
|
|
12169
12162
|
return `${ao()}/${r}/{z}/{x}/{y}?key=${j.apiKey}`;
|
|
12170
12163
|
}
|
|
12171
12164
|
function ao() {
|
|
12172
12165
|
return "https://api.maptiler.com/images";
|
|
12173
12166
|
}
|
|
12174
|
-
const { Evented:
|
|
12175
|
-
class
|
|
12167
|
+
const { Evented: $c } = k;
|
|
12168
|
+
class uf extends $c {
|
|
12176
12169
|
constructor({ ...t }) {
|
|
12177
12170
|
super();
|
|
12178
12171
|
y(this, "viewer");
|
|
12179
12172
|
y(this, "marker");
|
|
12180
12173
|
y(this, "position", [0, 0]);
|
|
12181
|
-
this.marker = new
|
|
12174
|
+
this.marker = new $o(t);
|
|
12182
12175
|
}
|
|
12183
12176
|
/**
|
|
12184
12177
|
* Adds the ImageViewerMarker to an instance of ImageViewer.
|
|
@@ -12187,11 +12180,11 @@ class cf extends Dc {
|
|
|
12187
12180
|
* @returns {ImageViewerMarker} The ImageViewerMarker instance.
|
|
12188
12181
|
*/
|
|
12189
12182
|
addTo(t) {
|
|
12190
|
-
if (!(t instanceof
|
|
12183
|
+
if (!(t instanceof Oc))
|
|
12191
12184
|
throw new Error("[ImageViewerMarker]: an ImageViewerMarker must be added to an instance of ImageViewer");
|
|
12192
|
-
this.viewer = t,
|
|
12185
|
+
this.viewer = t, Uc(this.marker, this, this.viewer[ro]);
|
|
12193
12186
|
const n = this.viewer.getSDKInternal();
|
|
12194
|
-
return this.setPosition(this.position),
|
|
12187
|
+
return this.setPosition(this.position), Ic(this.marker), this.marker.addTo(n), this;
|
|
12195
12188
|
}
|
|
12196
12189
|
/**
|
|
12197
12190
|
* Adds a class name to the ImageViewerMarker.
|
|
@@ -12441,16 +12434,16 @@ class cf extends Dc {
|
|
|
12441
12434
|
return this.marker.togglePopup(), this;
|
|
12442
12435
|
}
|
|
12443
12436
|
}
|
|
12444
|
-
const
|
|
12445
|
-
class
|
|
12437
|
+
const Nc = ["dragstart", "drag", "dragend"], jc = ["lngLat", "_defaultPrevented", "target"];
|
|
12438
|
+
class Dc {
|
|
12446
12439
|
constructor(e, t, n) {
|
|
12447
12440
|
y(this, "type");
|
|
12448
12441
|
y(this, "target");
|
|
12449
12442
|
this.type = e, this.target = t, Object.assign(this, n);
|
|
12450
12443
|
}
|
|
12451
12444
|
}
|
|
12452
|
-
function
|
|
12453
|
-
|
|
12445
|
+
function Uc(r, e, t) {
|
|
12446
|
+
Nc.forEach((n) => {
|
|
12454
12447
|
r.on(n, (a) => {
|
|
12455
12448
|
var o, s;
|
|
12456
12449
|
if ((o = a.target) == null ? void 0 : o.getLngLat()) {
|
|
@@ -12459,8 +12452,8 @@ function Vc(r, e, t) {
|
|
|
12459
12452
|
}
|
|
12460
12453
|
e.fire(
|
|
12461
12454
|
n,
|
|
12462
|
-
new
|
|
12463
|
-
...Object.fromEntries(Object.entries(a).filter(([l]) => !
|
|
12455
|
+
new Dc(n, e, {
|
|
12456
|
+
...Object.fromEntries(Object.entries(a).filter(([l]) => !jc.includes(l)))
|
|
12464
12457
|
})
|
|
12465
12458
|
);
|
|
12466
12459
|
});
|
|
@@ -12490,7 +12483,7 @@ function Na(r) {
|
|
|
12490
12483
|
return new XMLSerializer().serializeToString(r);
|
|
12491
12484
|
throw new Error("No XML serializer found");
|
|
12492
12485
|
}
|
|
12493
|
-
function
|
|
12486
|
+
function Bc(r) {
|
|
12494
12487
|
const e = typeof r == "string" ? Fn(r) : r;
|
|
12495
12488
|
if (!io(e, "gpx"))
|
|
12496
12489
|
throw new Error("The XML document is not valid GPX");
|
|
@@ -12499,18 +12492,18 @@ function oo(r) {
|
|
|
12499
12492
|
features: []
|
|
12500
12493
|
};
|
|
12501
12494
|
for (const o of Array.from(t)) {
|
|
12502
|
-
const s =
|
|
12495
|
+
const s = Kc(o);
|
|
12503
12496
|
s && i.features.push(s);
|
|
12504
12497
|
}
|
|
12505
12498
|
for (const o of Array.from(n)) {
|
|
12506
|
-
const s =
|
|
12499
|
+
const s = Zc(o);
|
|
12507
12500
|
s && i.features.push(s);
|
|
12508
12501
|
}
|
|
12509
12502
|
for (const o of Array.from(a))
|
|
12510
|
-
i.features.push(
|
|
12503
|
+
i.features.push(Xc(o));
|
|
12511
12504
|
return i;
|
|
12512
12505
|
}
|
|
12513
|
-
function
|
|
12506
|
+
function qc(r, e) {
|
|
12514
12507
|
let t = r;
|
|
12515
12508
|
if (typeof t == "string" && (t = Fn(t)), !io(t, "kml"))
|
|
12516
12509
|
throw new Error("The XML document is not valid KML");
|
|
@@ -12530,7 +12523,7 @@ function so(r, e) {
|
|
|
12530
12523
|
o[`#${Ze(c, "id")}`] = f;
|
|
12531
12524
|
}
|
|
12532
12525
|
for (const c of Array.from(s))
|
|
12533
|
-
n.features = n.features.concat(
|
|
12526
|
+
n.features = n.features.concat(Hc(c, a, i, o));
|
|
12534
12527
|
return n;
|
|
12535
12528
|
}
|
|
12536
12529
|
function ja(r) {
|
|
@@ -12538,15 +12531,15 @@ function ja(r) {
|
|
|
12538
12531
|
let e = "", t = 1, n = r;
|
|
12539
12532
|
return n.startsWith("#") && (n = n.substring(1)), (n.length === 6 || n.length === 3) && (e = n), n.length === 8 && (t = Number.parseInt(n.substring(0, 2), 16) / 255, e = `#${n.substring(6, 8)}${n.substring(4, 6)}${n.substring(2, 4)}`), [e ?? "#000000", t ?? 1];
|
|
12540
12533
|
}
|
|
12541
|
-
function
|
|
12542
|
-
return
|
|
12534
|
+
function Vc(r) {
|
|
12535
|
+
return lo(r.split(" "));
|
|
12543
12536
|
}
|
|
12544
|
-
function
|
|
12537
|
+
function Gc(r) {
|
|
12545
12538
|
let e = Z(r, "coord");
|
|
12546
12539
|
const t = [], n = [];
|
|
12547
12540
|
e.length === 0 && (e = Z(r, "gx:coord"));
|
|
12548
12541
|
for (const i of Array.from(e))
|
|
12549
|
-
t.push(
|
|
12542
|
+
t.push(Vc(F(i) ?? ""));
|
|
12550
12543
|
const a = Z(r, "when");
|
|
12551
12544
|
for (const i of Array.from(a)) n.push(F(i));
|
|
12552
12545
|
return {
|
|
@@ -12570,7 +12563,7 @@ function Kt(r) {
|
|
|
12570
12563
|
if (t = n[i], e[a] === "Point")
|
|
12571
12564
|
s.push({
|
|
12572
12565
|
type: "Point",
|
|
12573
|
-
coordinates:
|
|
12566
|
+
coordinates: uo(F(_(t, "coordinates")) ?? "")
|
|
12574
12567
|
});
|
|
12575
12568
|
else if (e[a] === "LineString")
|
|
12576
12569
|
s.push({
|
|
@@ -12586,7 +12579,7 @@ function Kt(r) {
|
|
|
12586
12579
|
coordinates: c
|
|
12587
12580
|
});
|
|
12588
12581
|
} else if (e[a] === "Track" || e[a] === "gx:Track") {
|
|
12589
|
-
const u =
|
|
12582
|
+
const u = Gc(t);
|
|
12590
12583
|
s.push({
|
|
12591
12584
|
type: "LineString",
|
|
12592
12585
|
coordinates: u.coords
|
|
@@ -12595,7 +12588,7 @@ function Kt(r) {
|
|
|
12595
12588
|
}
|
|
12596
12589
|
return { geoms: s, coordTimes: l };
|
|
12597
12590
|
}
|
|
12598
|
-
function
|
|
12591
|
+
function Hc(r, e, t, n) {
|
|
12599
12592
|
const a = Kt(r), i = {}, o = F(_(r, "name")), s = F(_(r, "address")), l = F(_(r, "description")), u = _(r, "TimeSpan"), c = _(r, "TimeStamp"), p = _(r, "ExtendedData"), f = _(r, "visibility");
|
|
12600
12593
|
let d, h = F(_(r, "styleUrl")), m = _(r, "LineStyle"), g = _(r, "PolyStyle");
|
|
12601
12594
|
if (!a.geoms.length) return [];
|
|
@@ -12606,9 +12599,9 @@ function Kc(r, e, t, n) {
|
|
|
12606
12599
|
m || (m = _(v, "LineStyle")), g || (g = _(v, "PolyStyle"));
|
|
12607
12600
|
const x = _(v, "IconStyle");
|
|
12608
12601
|
if (x) {
|
|
12609
|
-
const
|
|
12610
|
-
if (
|
|
12611
|
-
const L = F(_(
|
|
12602
|
+
const A = _(x, "Icon");
|
|
12603
|
+
if (A) {
|
|
12604
|
+
const L = F(_(A, "href"));
|
|
12612
12605
|
L && (i.icon = L);
|
|
12613
12606
|
}
|
|
12614
12607
|
}
|
|
@@ -12619,12 +12612,12 @@ function Kc(r, e, t, n) {
|
|
|
12619
12612
|
v && x && (i.timespan = { begin: v, end: x });
|
|
12620
12613
|
}
|
|
12621
12614
|
if (c !== null && (i.timestamp = F(_(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
|
|
12622
|
-
const v = ja(F(_(m, "color"))), x = v[0],
|
|
12623
|
-
x && (i.stroke = x), Number.isNaN(
|
|
12615
|
+
const v = ja(F(_(m, "color"))), x = v[0], A = v[1], L = Number.parseFloat(F(_(m, "width")) ?? "");
|
|
12616
|
+
x && (i.stroke = x), Number.isNaN(A) || (i["stroke-opacity"] = A), Number.isNaN(L) || (i["stroke-width"] = L);
|
|
12624
12617
|
}
|
|
12625
12618
|
if (g) {
|
|
12626
|
-
const v = ja(F(_(g, "color"))), x = v[0],
|
|
12627
|
-
x && (i.fill = x), Number.isNaN(
|
|
12619
|
+
const v = ja(F(_(g, "color"))), x = v[0], A = v[1], L = F(_(g, "fill")), C = F(_(g, "outline"));
|
|
12620
|
+
x && (i.fill = x), Number.isNaN(A) || (i["fill-opacity"] = A), L && (i["fill-opacity"] = L === "1" ? i["fill-opacity"] || 1 : 0), C && (i["stroke-opacity"] = C === "1" ? i["stroke-opacity"] || 1 : 0);
|
|
12628
12621
|
}
|
|
12629
12622
|
if (p) {
|
|
12630
12623
|
const v = Z(p, "Data"), x = Z(p, "SimpleData");
|
|
@@ -12644,13 +12637,13 @@ function Kc(r, e, t, n) {
|
|
|
12644
12637
|
};
|
|
12645
12638
|
return Ze(r, "id") && (b.id = Ze(r, "id") ?? void 0), [b];
|
|
12646
12639
|
}
|
|
12647
|
-
function
|
|
12640
|
+
function oo(r, e) {
|
|
12648
12641
|
const t = Z(r, e), n = [], a = [];
|
|
12649
12642
|
let i = [];
|
|
12650
12643
|
const o = t.length;
|
|
12651
12644
|
if (!(o < 2)) {
|
|
12652
12645
|
for (let s = 0; s < o; s++) {
|
|
12653
|
-
const l =
|
|
12646
|
+
const l = co(t[s]);
|
|
12654
12647
|
n.push(l.coordinates), l.time && a.push(l.time), (l.heartRate || i.length) && (i.length === 0 && (i = new Array(s).fill(null)), i.push(l.heartRate));
|
|
12655
12648
|
}
|
|
12656
12649
|
return {
|
|
@@ -12660,11 +12653,11 @@ function lo(r, e) {
|
|
|
12660
12653
|
};
|
|
12661
12654
|
}
|
|
12662
12655
|
}
|
|
12663
|
-
function
|
|
12656
|
+
function Kc(r) {
|
|
12664
12657
|
const e = Z(r, "trkseg"), t = [], n = [], a = [];
|
|
12665
12658
|
let i;
|
|
12666
12659
|
for (let s = 0; s < e.length; s++)
|
|
12667
|
-
if (i =
|
|
12660
|
+
if (i = oo(e[s], "trkpt"), i !== void 0 && (i.line && t.push(i.line), i.times && i.times.length && n.push(i.times), a.length || i.heartRates && i.heartRates.length)) {
|
|
12668
12661
|
if (!a.length)
|
|
12669
12662
|
for (let l = 0; l < s; l++)
|
|
12670
12663
|
a.push(new Array(t[l].length).fill(null));
|
|
@@ -12673,7 +12666,7 @@ function Zc(r) {
|
|
|
12673
12666
|
if (t.length === 0) return;
|
|
12674
12667
|
const o = {
|
|
12675
12668
|
...$n(r),
|
|
12676
|
-
...
|
|
12669
|
+
...so(_(r, "extensions"))
|
|
12677
12670
|
};
|
|
12678
12671
|
return n.length !== 0 && (o.coordTimes = t.length === 1 ? n[0] : n), a.length !== 0 && (o.heartRates = t.length === 1 ? a[0] : a), t.length === 1 ? {
|
|
12679
12672
|
type: "Feature",
|
|
@@ -12691,13 +12684,13 @@ function Zc(r) {
|
|
|
12691
12684
|
}
|
|
12692
12685
|
};
|
|
12693
12686
|
}
|
|
12694
|
-
function
|
|
12695
|
-
const e =
|
|
12687
|
+
function Zc(r) {
|
|
12688
|
+
const e = oo(r, "rtept");
|
|
12696
12689
|
return e === void 0 ? void 0 : {
|
|
12697
12690
|
type: "Feature",
|
|
12698
12691
|
properties: {
|
|
12699
12692
|
...$n(r),
|
|
12700
|
-
...
|
|
12693
|
+
...so(_(r, "extensions"))
|
|
12701
12694
|
},
|
|
12702
12695
|
geometry: {
|
|
12703
12696
|
type: "LineString",
|
|
@@ -12705,17 +12698,17 @@ function Xc(r) {
|
|
|
12705
12698
|
}
|
|
12706
12699
|
};
|
|
12707
12700
|
}
|
|
12708
|
-
function
|
|
12701
|
+
function Xc(r) {
|
|
12709
12702
|
return {
|
|
12710
12703
|
type: "Feature",
|
|
12711
12704
|
properties: { ...$n(r), ...an(r, ["sym"]) },
|
|
12712
12705
|
geometry: {
|
|
12713
12706
|
type: "Point",
|
|
12714
|
-
coordinates:
|
|
12707
|
+
coordinates: co(r).coordinates
|
|
12715
12708
|
}
|
|
12716
12709
|
};
|
|
12717
12710
|
}
|
|
12718
|
-
function
|
|
12711
|
+
function so(r) {
|
|
12719
12712
|
const e = {};
|
|
12720
12713
|
if (r) {
|
|
12721
12714
|
const t = _(r, "line");
|
|
@@ -12763,7 +12756,7 @@ function _(r, e) {
|
|
|
12763
12756
|
function Yc(r) {
|
|
12764
12757
|
return r.normalize && r.normalize(), r;
|
|
12765
12758
|
}
|
|
12766
|
-
function
|
|
12759
|
+
function lo(r) {
|
|
12767
12760
|
return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
|
|
12768
12761
|
}
|
|
12769
12762
|
function F(r) {
|
|
@@ -12776,15 +12769,15 @@ function an(r, e) {
|
|
|
12776
12769
|
n = _(r, e[a]), n && (t[e[a]] = F(n) ?? "");
|
|
12777
12770
|
return t;
|
|
12778
12771
|
}
|
|
12779
|
-
function
|
|
12780
|
-
return
|
|
12772
|
+
function uo(r) {
|
|
12773
|
+
return lo(r.replace(/\s*/g, "").split(","));
|
|
12781
12774
|
}
|
|
12782
12775
|
function Ba(r) {
|
|
12783
12776
|
const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
|
|
12784
|
-
for (const n of e) t.push(
|
|
12777
|
+
for (const n of e) t.push(uo(n));
|
|
12785
12778
|
return t;
|
|
12786
12779
|
}
|
|
12787
|
-
function
|
|
12780
|
+
function co(r) {
|
|
12788
12781
|
const e = [Ua(r, "lon"), Ua(r, "lat")], t = _(r, "ele"), n = _(r, "gpxtpx:hr") || _(r, "hr"), a = _(r, "time");
|
|
12789
12782
|
let i;
|
|
12790
12783
|
return t && (i = Number.parseFloat(F(t) ?? "0"), Number.isNaN(i) || e.push(i)), {
|
|
@@ -12793,7 +12786,7 @@ function fo(r) {
|
|
|
12793
12786
|
heartRate: n !== null ? Number.parseFloat(F(n) ?? "0") : null
|
|
12794
12787
|
};
|
|
12795
12788
|
}
|
|
12796
|
-
function
|
|
12789
|
+
function Wc(r) {
|
|
12797
12790
|
let e = r;
|
|
12798
12791
|
try {
|
|
12799
12792
|
typeof e == "string" && (e = Fn(e));
|
|
@@ -12801,17 +12794,17 @@ function Jc(r) {
|
|
|
12801
12794
|
return null;
|
|
12802
12795
|
}
|
|
12803
12796
|
try {
|
|
12804
|
-
return
|
|
12797
|
+
return Bc(e);
|
|
12805
12798
|
} catch {
|
|
12806
12799
|
}
|
|
12807
12800
|
try {
|
|
12808
|
-
return
|
|
12801
|
+
return qc(e);
|
|
12809
12802
|
} catch {
|
|
12810
12803
|
}
|
|
12811
12804
|
return null;
|
|
12812
12805
|
}
|
|
12813
|
-
async function
|
|
12814
|
-
const t = e.download ?? !1, n = await
|
|
12806
|
+
async function Jc(r, e = {}) {
|
|
12807
|
+
const t = e.download ?? !1, n = await Qc(r);
|
|
12815
12808
|
if (t) {
|
|
12816
12809
|
const a = e.filename ?? "maptiler_screenshot.png", i = document.createElement("a");
|
|
12817
12810
|
i.style.display = "none", document.body.appendChild(i), i.href = URL.createObjectURL(n), i.download = a, i.click(), setTimeout(() => {
|
|
@@ -12820,7 +12813,7 @@ async function Qc(r, e = {}) {
|
|
|
12820
12813
|
}
|
|
12821
12814
|
return n;
|
|
12822
12815
|
}
|
|
12823
|
-
function
|
|
12816
|
+
function Qc(r) {
|
|
12824
12817
|
return new Promise((e, t) => {
|
|
12825
12818
|
r.redraw(), r.once("idle", () => {
|
|
12826
12819
|
r.getCanvas().toBlob((n) => {
|
|
@@ -12880,7 +12873,7 @@ function Fe(r) {
|
|
|
12880
12873
|
function z(r) {
|
|
12881
12874
|
return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
|
|
12882
12875
|
}
|
|
12883
|
-
function
|
|
12876
|
+
function po(r, e) {
|
|
12884
12877
|
if (typeof e == "number" && typeof r == "number")
|
|
12885
12878
|
return 2 * e + r;
|
|
12886
12879
|
if (typeof e == "number" && Array.isArray(r))
|
|
@@ -12893,7 +12886,7 @@ function ho(r, e) {
|
|
|
12893
12886
|
}
|
|
12894
12887
|
return 0;
|
|
12895
12888
|
}
|
|
12896
|
-
function
|
|
12889
|
+
function fo(r, e) {
|
|
12897
12890
|
return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
|
|
12898
12891
|
}
|
|
12899
12892
|
function Nn(r) {
|
|
@@ -12929,7 +12922,7 @@ function un(r, e, t = !0) {
|
|
|
12929
12922
|
["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
|
|
12930
12923
|
] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
|
|
12931
12924
|
}
|
|
12932
|
-
function
|
|
12925
|
+
function ho(r, e, t = !0) {
|
|
12933
12926
|
return t ? [
|
|
12934
12927
|
"interpolate",
|
|
12935
12928
|
["linear"],
|
|
@@ -12957,7 +12950,7 @@ function cn(r, e) {
|
|
|
12957
12950
|
})
|
|
12958
12951
|
];
|
|
12959
12952
|
}
|
|
12960
|
-
function
|
|
12953
|
+
function mo(r, e = 10) {
|
|
12961
12954
|
return [
|
|
12962
12955
|
"interpolate",
|
|
12963
12956
|
["linear"],
|
|
@@ -12972,7 +12965,7 @@ function qt(r) {
|
|
|
12972
12965
|
const e = r.toString(16);
|
|
12973
12966
|
return e.length === 1 ? `0${e}` : e;
|
|
12974
12967
|
}
|
|
12975
|
-
function
|
|
12968
|
+
function ep(r) {
|
|
12976
12969
|
return `#${qt(r[0])}${qt(r[1])}${qt(r[2])}${r.length === 4 ? qt(r[3]) : ""}`;
|
|
12977
12970
|
}
|
|
12978
12971
|
class T extends Array {
|
|
@@ -13066,7 +13059,7 @@ class T extends Array {
|
|
|
13066
13059
|
smooth: !0,
|
|
13067
13060
|
withAlpha: !1
|
|
13068
13061
|
}) {
|
|
13069
|
-
return
|
|
13062
|
+
return ep(this.getColor(t, n));
|
|
13070
13063
|
}
|
|
13071
13064
|
/**
|
|
13072
13065
|
* Get the color of the color ramp at a relative position in [0, 1]
|
|
@@ -13153,7 +13146,7 @@ class T extends Array {
|
|
|
13153
13146
|
return this[0].color.length === 4 && this[0].color[3] === 0;
|
|
13154
13147
|
}
|
|
13155
13148
|
}
|
|
13156
|
-
const
|
|
13149
|
+
const yo = {
|
|
13157
13150
|
/**
|
|
13158
13151
|
* A fully transparent [0, 0, 0, 0] colorramp to hide data.
|
|
13159
13152
|
* Defined in interval [0, 1], without unit.
|
|
@@ -13909,33 +13902,30 @@ const vo = {
|
|
|
13909
13902
|
]
|
|
13910
13903
|
})
|
|
13911
13904
|
};
|
|
13912
|
-
async function
|
|
13913
|
-
var a, i;
|
|
13905
|
+
async function tp(r, e, t = {}) {
|
|
13914
13906
|
if (!e.sourceId && !e.data)
|
|
13915
13907
|
throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
|
|
13916
13908
|
let n = e.data;
|
|
13917
13909
|
if (typeof n == "string") {
|
|
13918
13910
|
if (or(n))
|
|
13919
|
-
n = `https://api.maptiler.com/data/${
|
|
13920
|
-
else
|
|
13921
|
-
|
|
13922
|
-
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
const o = Qo(n) ?? Jc(n);
|
|
13928
|
-
o && (n = o);
|
|
13911
|
+
n = `https://api.maptiler.com/data/${n}/features.json?key=${j.apiKey}`;
|
|
13912
|
+
else {
|
|
13913
|
+
if (/^(?:\w+:|\.|\/)/.test(n)) {
|
|
13914
|
+
const a = await fetch(n, t);
|
|
13915
|
+
if (!a.ok) throw new Error(`Failed to fetch polyline data: fetching URL ${n} failed with status ${String(a.status)}.`);
|
|
13916
|
+
n = await a.text();
|
|
13917
|
+
}
|
|
13918
|
+
n = Wo(n) ?? Wc(n) ?? "";
|
|
13929
13919
|
}
|
|
13930
13920
|
if (!n)
|
|
13931
|
-
throw new Error("
|
|
13921
|
+
throw new Error("Failed to parse polyline data: expected GeoJSON, GPX, or KML.");
|
|
13932
13922
|
}
|
|
13933
|
-
return
|
|
13923
|
+
return rp(r, {
|
|
13934
13924
|
...e,
|
|
13935
13925
|
data: n
|
|
13936
13926
|
});
|
|
13937
13927
|
}
|
|
13938
|
-
function
|
|
13928
|
+
function rp(r, e) {
|
|
13939
13929
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13940
13930
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13941
13931
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = {
|
|
@@ -13966,7 +13956,7 @@ function np(r, e) {
|
|
|
13966
13956
|
paint: {
|
|
13967
13957
|
"line-opacity": typeof d == "number" ? d : z(d),
|
|
13968
13958
|
"line-color": typeof f == "string" ? f : Fe(f),
|
|
13969
|
-
"line-width":
|
|
13959
|
+
"line-width": po(i, p),
|
|
13970
13960
|
"line-blur": typeof h == "number" ? h : z(h)
|
|
13971
13961
|
}
|
|
13972
13962
|
},
|
|
@@ -14001,7 +13991,7 @@ function np(r, e) {
|
|
|
14001
13991
|
e.beforeId
|
|
14002
13992
|
), a;
|
|
14003
13993
|
}
|
|
14004
|
-
function
|
|
13994
|
+
function np(r, e) {
|
|
14005
13995
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14006
13996
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14007
13997
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = {
|
|
@@ -14084,10 +14074,10 @@ function ap(r, e) {
|
|
|
14084
14074
|
console.error("Could not load the pattern image.", m.message), h();
|
|
14085
14075
|
}) : h(), a;
|
|
14086
14076
|
}
|
|
14087
|
-
function
|
|
14077
|
+
function ap(r, e) {
|
|
14088
14078
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14089
14079
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14090
|
-
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, i = 20, o = Array.isArray(e.pointColor) ? e.pointColor :
|
|
14080
|
+
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, i = 20, o = Array.isArray(e.pointColor) ? e.pointColor : yo.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = o.getBounds(), l = e.sourceId ?? Pt(), u = e.layerId ?? Rt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, m = e.outlineColor ?? "#FFFFFF";
|
|
14091
14081
|
let g;
|
|
14092
14082
|
const b = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
|
|
14093
14083
|
typeof e.pointOpacity == "number" ? g = e.pointOpacity : Array.isArray(e.pointOpacity) ? g = z(e.pointOpacity) : e.cluster ? g = cn(o, "point_count") : e.property ? g = cn(o, e.property) : g = z([
|
|
@@ -14096,7 +14086,7 @@ function ip(r, e) {
|
|
|
14096
14086
|
{ zoom: x - 0.25, value: 1 },
|
|
14097
14087
|
{ zoom: x, value: 0 }
|
|
14098
14088
|
]);
|
|
14099
|
-
const
|
|
14089
|
+
const A = {
|
|
14100
14090
|
pointLayerId: u,
|
|
14101
14091
|
clusterLayerId: "",
|
|
14102
14092
|
labelLayerId: "",
|
|
@@ -14111,8 +14101,8 @@ function ip(r, e) {
|
|
|
14111
14101
|
});
|
|
14112
14102
|
}
|
|
14113
14103
|
if (a) {
|
|
14114
|
-
|
|
14115
|
-
const L = Array.from({ length: i }, (
|
|
14104
|
+
A.clusterLayerId = `${u}_cluster`;
|
|
14105
|
+
const L = Array.from({ length: i }, (C, N) => {
|
|
14116
14106
|
const le = s.min + N * (s.max - s.min) / (i - 1);
|
|
14117
14107
|
return {
|
|
14118
14108
|
value: le,
|
|
@@ -14122,7 +14112,7 @@ function ip(r, e) {
|
|
|
14122
14112
|
});
|
|
14123
14113
|
r.addLayer(
|
|
14124
14114
|
{
|
|
14125
|
-
id:
|
|
14115
|
+
id: A.clusterLayerId,
|
|
14126
14116
|
type: "circle",
|
|
14127
14117
|
source: l,
|
|
14128
14118
|
filter: ["has", "point_count"],
|
|
@@ -14146,7 +14136,7 @@ function ip(r, e) {
|
|
|
14146
14136
|
e.beforeId
|
|
14147
14137
|
), r.addLayer(
|
|
14148
14138
|
{
|
|
14149
|
-
id:
|
|
14139
|
+
id: A.pointLayerId,
|
|
14150
14140
|
type: "circle",
|
|
14151
14141
|
source: l,
|
|
14152
14142
|
filter: ["!", ["has", "point_count"]],
|
|
@@ -14170,7 +14160,7 @@ function ip(r, e) {
|
|
|
14170
14160
|
e.beforeId
|
|
14171
14161
|
);
|
|
14172
14162
|
} else {
|
|
14173
|
-
let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : kr(),
|
|
14163
|
+
let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : kr(), C = typeof e.pointRadius == "number" ? b ? z([
|
|
14174
14164
|
{ zoom: 0, value: e.pointRadius * 0.025 },
|
|
14175
14165
|
{ zoom: 2, value: e.pointRadius * 0.05 },
|
|
14176
14166
|
{ zoom: 4, value: e.pointRadius * 0.1 },
|
|
@@ -14184,19 +14174,19 @@ function ip(r, e) {
|
|
|
14184
14174
|
{ zoom: 16, value: t * 1 }
|
|
14185
14175
|
]) : t;
|
|
14186
14176
|
if (e.property && Array.isArray(e.pointColor)) {
|
|
14187
|
-
const N = Array.from({ length: i }, (le,
|
|
14188
|
-
const
|
|
14177
|
+
const N = Array.from({ length: i }, (le, Ye) => {
|
|
14178
|
+
const We = s.min + Ye * (s.max - s.min) / (i - 1);
|
|
14189
14179
|
return {
|
|
14190
|
-
value:
|
|
14191
|
-
pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (
|
|
14192
|
-
color: typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(
|
|
14180
|
+
value: We,
|
|
14181
|
+
pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (Ye / (i - 1)) ** 0.5,
|
|
14182
|
+
color: typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(We)
|
|
14193
14183
|
};
|
|
14194
14184
|
});
|
|
14195
|
-
L = ln(N, e.property),
|
|
14185
|
+
L = ln(N, e.property), C = un(N, e.property, b);
|
|
14196
14186
|
}
|
|
14197
14187
|
r.addLayer(
|
|
14198
14188
|
{
|
|
14199
|
-
id:
|
|
14189
|
+
id: A.pointLayerId,
|
|
14200
14190
|
type: "circle",
|
|
14201
14191
|
source: l,
|
|
14202
14192
|
layout: {
|
|
@@ -14209,7 +14199,7 @@ function ip(r, e) {
|
|
|
14209
14199
|
// scale with camera distance regardless of viewport/biewport alignement
|
|
14210
14200
|
"circle-color": L,
|
|
14211
14201
|
"circle-opacity": g,
|
|
14212
|
-
"circle-radius":
|
|
14202
|
+
"circle-radius": C,
|
|
14213
14203
|
...f && {
|
|
14214
14204
|
"circle-stroke-opacity": typeof d == "number" ? d : z(d),
|
|
14215
14205
|
"circle-stroke-width": typeof h == "number" ? h : z(h),
|
|
@@ -14223,18 +14213,18 @@ function ip(r, e) {
|
|
|
14223
14213
|
);
|
|
14224
14214
|
}
|
|
14225
14215
|
if (c !== !1 && (e.cluster || e.property)) {
|
|
14226
|
-
|
|
14227
|
-
const L = e.labelColor ?? "#fff",
|
|
14216
|
+
A.labelLayerId = `${u}_label`;
|
|
14217
|
+
const L = e.labelColor ?? "#fff", C = e.labelSize ?? 12;
|
|
14228
14218
|
r.addLayer(
|
|
14229
14219
|
{
|
|
14230
|
-
id:
|
|
14220
|
+
id: A.labelLayerId,
|
|
14231
14221
|
type: "symbol",
|
|
14232
14222
|
source: l,
|
|
14233
14223
|
filter: ["has", e.cluster ? "point_count" : e.property],
|
|
14234
14224
|
layout: {
|
|
14235
14225
|
"text-field": e.cluster ? "{point_count_abbreviated}" : `{${e.property}}`,
|
|
14236
14226
|
"text-font": ["Noto Sans Regular"],
|
|
14237
|
-
"text-size":
|
|
14227
|
+
"text-size": C,
|
|
14238
14228
|
"text-pitch-alignment": p ? "viewport" : "map",
|
|
14239
14229
|
"symbol-sort-key": ["/", 1, ["get", e.cluster ? "point_count" : e.property]]
|
|
14240
14230
|
// so that the largest value goes on top
|
|
@@ -14249,9 +14239,9 @@ function ip(r, e) {
|
|
|
14249
14239
|
e.beforeId
|
|
14250
14240
|
);
|
|
14251
14241
|
}
|
|
14252
|
-
return
|
|
14242
|
+
return A;
|
|
14253
14243
|
}
|
|
14254
|
-
function
|
|
14244
|
+
function ip(r, e) {
|
|
14255
14245
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14256
14246
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14257
14247
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = e.minzoom ?? 0, i = e.maxzoom ?? 23, o = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
@@ -14260,7 +14250,7 @@ function op(r, e) {
|
|
|
14260
14250
|
{ zoom: i - 0.25, value: 1 },
|
|
14261
14251
|
{ zoom: i, value: 0 }
|
|
14262
14252
|
];
|
|
14263
|
-
let l = Array.isArray(e.colorRamp) ? e.colorRamp :
|
|
14253
|
+
let l = Array.isArray(e.colorRamp) ? e.colorRamp : yo.TURBO.transparentStart();
|
|
14264
14254
|
const u = l.getBounds();
|
|
14265
14255
|
(u.min !== 0 || u.max !== 1) && (l = l.scale(0, 1)), l.hasTransparentStart() || (l = l.transparentStart());
|
|
14266
14256
|
const c = e.intensity ?? [
|
|
@@ -14269,7 +14259,7 @@ function op(r, e) {
|
|
|
14269
14259
|
{ zoom: 16, value: 1 }
|
|
14270
14260
|
], p = e.property ?? null, f = e.weight ?? 1;
|
|
14271
14261
|
let d = 1;
|
|
14272
|
-
p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d =
|
|
14262
|
+
p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d = fo(f, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof f == "number" ? d = f : Array.isArray(f) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
|
|
14273
14263
|
const h = [
|
|
14274
14264
|
{ zoom: 0, value: 50 * 0.025 },
|
|
14275
14265
|
{ zoom: 2, value: 50 * 0.05 },
|
|
@@ -14278,7 +14268,7 @@ function op(r, e) {
|
|
|
14278
14268
|
{ zoom: 16, value: 50 }
|
|
14279
14269
|
], m = e.radius ?? (o ? h : 10);
|
|
14280
14270
|
let g = 1;
|
|
14281
|
-
typeof m == "number" ? g = m : Array.isArray(m) && "zoom" in m[0] ? g = z(m) : p && Array.isArray(m) && "propertyValue" in m[0] ? g =
|
|
14271
|
+
typeof m == "number" ? g = m : Array.isArray(m) && "zoom" in m[0] ? g = z(m) : p && Array.isArray(m) && "propertyValue" in m[0] ? g = ho(m, p, o) : !p && Array.isArray(m) && "propertyValue" in m[0] ? (g = z(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : g = z(h);
|
|
14282
14272
|
const b = {
|
|
14283
14273
|
heatmapLayerId: n,
|
|
14284
14274
|
heatmapSourceId: t
|
|
@@ -14300,7 +14290,7 @@ function op(r, e) {
|
|
|
14300
14290
|
paint: {
|
|
14301
14291
|
"heatmap-weight": d,
|
|
14302
14292
|
"heatmap-intensity": typeof c == "number" ? c : z(c),
|
|
14303
|
-
"heatmap-color":
|
|
14293
|
+
"heatmap-color": mo(l),
|
|
14304
14294
|
"heatmap-radius": g,
|
|
14305
14295
|
"heatmap-opacity": typeof s == "number" ? s : z(s)
|
|
14306
14296
|
}
|
|
@@ -14308,37 +14298,37 @@ function op(r, e) {
|
|
|
14308
14298
|
e.beforeId
|
|
14309
14299
|
), b;
|
|
14310
14300
|
}
|
|
14311
|
-
const
|
|
14301
|
+
const cf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14312
14302
|
__proto__: null,
|
|
14313
|
-
addHeatmap:
|
|
14314
|
-
addPoint:
|
|
14315
|
-
addPolygon:
|
|
14316
|
-
addPolyline:
|
|
14303
|
+
addHeatmap: ip,
|
|
14304
|
+
addPoint: ap,
|
|
14305
|
+
addPolygon: np,
|
|
14306
|
+
addPolyline: tp,
|
|
14317
14307
|
colorDrivenByProperty: ln,
|
|
14318
14308
|
colorPalettes: on,
|
|
14319
|
-
computeRampedOutlineWidth:
|
|
14309
|
+
computeRampedOutlineWidth: po,
|
|
14320
14310
|
dashArrayMaker: Nn,
|
|
14321
14311
|
generateRandomLayerName: Rt,
|
|
14322
14312
|
generateRandomSourceName: Pt,
|
|
14323
14313
|
getRandomColor: kr,
|
|
14324
|
-
heatmapIntensityFromColorRamp:
|
|
14314
|
+
heatmapIntensityFromColorRamp: mo,
|
|
14325
14315
|
lerpZoomNumberValues: sn,
|
|
14326
14316
|
opacityDrivenByProperty: cn,
|
|
14327
14317
|
paintColorOptionsToPaintSpec: Fe,
|
|
14328
14318
|
radiusDrivenByProperty: un,
|
|
14329
|
-
radiusDrivenByPropertyHeatmap:
|
|
14319
|
+
radiusDrivenByPropertyHeatmap: ho,
|
|
14330
14320
|
rampedOptionsToLayerPaintSpec: z,
|
|
14331
|
-
rampedPropertyValueWeight:
|
|
14332
|
-
takeScreenshot:
|
|
14321
|
+
rampedPropertyValueWeight: fo,
|
|
14322
|
+
takeScreenshot: Jc
|
|
14333
14323
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14334
|
-
function
|
|
14324
|
+
function op(...r) {
|
|
14335
14325
|
const e = r[0].length;
|
|
14336
14326
|
return r.every((t) => t.length === e);
|
|
14337
14327
|
}
|
|
14338
14328
|
function ar(r, e, t) {
|
|
14339
14329
|
return r + (e - r) * t;
|
|
14340
14330
|
}
|
|
14341
|
-
function
|
|
14331
|
+
function go(r) {
|
|
14342
14332
|
if (r.length === 0)
|
|
14343
14333
|
throw new Error("[lerpArrayValues]: Array empty, nothing to interpolate");
|
|
14344
14334
|
if (r.every((e) => e === null))
|
|
@@ -14346,7 +14336,7 @@ function bo(r) {
|
|
|
14346
14336
|
return r.map((e, t, n) => {
|
|
14347
14337
|
if (typeof e == "number")
|
|
14348
14338
|
return e;
|
|
14349
|
-
const [a, i] =
|
|
14339
|
+
const [a, i] = lp(n, t), [o, s] = sp(n, t);
|
|
14350
14340
|
if (a === null || i === null)
|
|
14351
14341
|
return n[t + 1];
|
|
14352
14342
|
if (o === null || s === null)
|
|
@@ -14355,28 +14345,28 @@ function bo(r) {
|
|
|
14355
14345
|
return ar(i, s, l);
|
|
14356
14346
|
});
|
|
14357
14347
|
}
|
|
14358
|
-
function
|
|
14348
|
+
function sp(r, e) {
|
|
14359
14349
|
for (let t = e + 1; t < r.length; t++)
|
|
14360
14350
|
if (r[t] !== null)
|
|
14361
14351
|
return [t, r[t]];
|
|
14362
14352
|
return [null, null];
|
|
14363
14353
|
}
|
|
14364
|
-
function
|
|
14354
|
+
function lp(r, e) {
|
|
14365
14355
|
for (let t = e - 1; t >= 0; t--)
|
|
14366
14356
|
if (r[t] !== null)
|
|
14367
14357
|
return [t, r[t]];
|
|
14368
14358
|
return [null, null];
|
|
14369
14359
|
}
|
|
14370
|
-
const
|
|
14360
|
+
const up = {
|
|
14371
14361
|
defaultEasing: "Linear",
|
|
14372
14362
|
pathSmoothing: {
|
|
14373
14363
|
resolution: 20,
|
|
14374
14364
|
epsilon: 5
|
|
14375
14365
|
}
|
|
14376
14366
|
}, qa = ["MultiPoint", "LineString", "MultiLineString", "Polygon"];
|
|
14377
|
-
function
|
|
14367
|
+
function cp(r, e = {}) {
|
|
14378
14368
|
const { defaultEasing: t, pathSmoothing: n, ignoreFields: a } = {
|
|
14379
|
-
...
|
|
14369
|
+
...up,
|
|
14380
14370
|
...e
|
|
14381
14371
|
}, i = r.geometry, o = r.properties ?? {}, s = o["@easing"];
|
|
14382
14372
|
s || console.warn(`[parseGeoJSONFeatureToKeyframes]: No '@easing' property found in GeoJSON properties, using default easing ${t}`);
|
|
@@ -14393,12 +14383,12 @@ function pp(r, e = {}) {
|
|
|
14393
14383
|
[b]: v
|
|
14394
14384
|
}, {}), h = l ?? c.map((g, b) => b / c.length), m = s ?? h.map(() => t ?? "Linear");
|
|
14395
14385
|
if (c.some((g) => g.length > 2) && console.warn("[parseGeoJSONFeatureToKeyframes]: Smoothing is not supported for 3D paths, only 2D smoothing will be applied, ignoring altitude"), n) {
|
|
14396
|
-
const g =
|
|
14397
|
-
if (!Array.isArray(
|
|
14398
|
-
return
|
|
14399
|
-
const N = g.length, le = Va(
|
|
14386
|
+
const g = pp(c, n.resolution, n.epsilon), b = go(Va([0, 1], g.length)), v = b.map(() => t ?? "Linear"), x = Object.entries(d).reduce((A, [L, C]) => {
|
|
14387
|
+
if (!Array.isArray(C))
|
|
14388
|
+
return A;
|
|
14389
|
+
const N = g.length, le = Va(C, N);
|
|
14400
14390
|
return {
|
|
14401
|
-
...
|
|
14391
|
+
...A,
|
|
14402
14392
|
[L]: le
|
|
14403
14393
|
};
|
|
14404
14394
|
}, {});
|
|
@@ -14414,7 +14404,7 @@ function Va(r, e) {
|
|
|
14414
14404
|
return Array.from({ length: e }, (n, a) => t.includes(a) ? r[t.indexOf(a)] : null);
|
|
14415
14405
|
}
|
|
14416
14406
|
function Ga(r, e, t, n = {}) {
|
|
14417
|
-
if (!
|
|
14407
|
+
if (!op(r, e, t, ...Object.values(n)))
|
|
14418
14408
|
throw new Error(`
|
|
14419
14409
|
[parseGeoJSONFeatureToKeyframes]: If smoothing is not applied, coordinates, deltas, easings and property arrays must be the same length
|
|
14420
14410
|
|
|
@@ -14453,8 +14443,8 @@ function Br(r, e, t, n, a, i, o, s) {
|
|
|
14453
14443
|
const f = (1 - s) ** 3 * t[0] + 3 * (1 - s) ** 2 * s * l[0] + 3 * (1 - s) * s ** 2 * u[0] + s ** 3 * n[0], d = (1 - s) ** 3 * t[1] + 3 * (1 - s) ** 2 * s * l[1] + 3 * (1 - s) * s ** 2 * u[1] + s ** 3 * n[1];
|
|
14454
14444
|
s - p > 1e-10 ? r.push([f, d]) : r[r.length - 1] = [f, d];
|
|
14455
14445
|
}
|
|
14456
|
-
function
|
|
14457
|
-
const n = typeof t == "number" ?
|
|
14446
|
+
function pp(r, e = 20, t) {
|
|
14447
|
+
const n = typeof t == "number" ? dp(r, t) : r;
|
|
14458
14448
|
if (n.length < 4) return n;
|
|
14459
14449
|
typeof t == "number" && (n[n.length - 1] = [...r[r.length - 1]]);
|
|
14460
14450
|
const a = [], i = [2 * n[0][0] - n[1][0], 2 * n[0][1] - n[1][1]];
|
|
@@ -14467,15 +14457,15 @@ function fp(r, e = 20, t) {
|
|
|
14467
14457
|
const s = [2 * n[n.length - 1][0] - n[n.length - 2][0], 2 * n[n.length - 1][1] - n[n.length - 2][1]];
|
|
14468
14458
|
return Br(a, n[n.length - 3], n[n.length - 2], n[n.length - 1], s, e, o, 1), a;
|
|
14469
14459
|
}
|
|
14470
|
-
function
|
|
14460
|
+
function fp(r) {
|
|
14471
14461
|
return r.map((e, t) => {
|
|
14472
14462
|
if (t === 0) return 0;
|
|
14473
14463
|
const n = r[t - 1], a = new Ne(e[0], e[1]), i = new Ne(n[0], n[1]);
|
|
14474
14464
|
return a.distanceTo(i);
|
|
14475
14465
|
}).reduce((e, t) => e + t, 0) / r.length;
|
|
14476
14466
|
}
|
|
14477
|
-
function
|
|
14478
|
-
const t =
|
|
14467
|
+
function dp(r, e) {
|
|
14468
|
+
const t = hp(r, fp(r) * e);
|
|
14479
14469
|
if (t.length < 2) return t;
|
|
14480
14470
|
const n = [t[0]];
|
|
14481
14471
|
let a = t[0];
|
|
@@ -14485,7 +14475,7 @@ function hp(r, e) {
|
|
|
14485
14475
|
}
|
|
14486
14476
|
return n.push([...r[r.length - 1]]), n;
|
|
14487
14477
|
}
|
|
14488
|
-
function
|
|
14478
|
+
function hp(r, e = 10) {
|
|
14489
14479
|
if (r.length < 2) return r;
|
|
14490
14480
|
const t = [r[0]];
|
|
14491
14481
|
let n = e;
|
|
@@ -14558,84 +14548,84 @@ const Ha = {
|
|
|
14558
14548
|
"animationend",
|
|
14559
14549
|
"keyframe",
|
|
14560
14550
|
"iteration"
|
|
14561
|
-
],
|
|
14562
|
-
Linear:
|
|
14563
|
-
QuadraticIn:
|
|
14564
|
-
QuadraticOut:
|
|
14565
|
-
QuadraticInOut:
|
|
14566
|
-
CubicIn:
|
|
14567
|
-
CubicOut:
|
|
14568
|
-
CubicInOut:
|
|
14569
|
-
SinusoidalIn:
|
|
14570
|
-
SinusoidalOut:
|
|
14571
|
-
SinusoidalInOut:
|
|
14551
|
+
], mp = {
|
|
14552
|
+
Linear: yp,
|
|
14553
|
+
QuadraticIn: gp,
|
|
14554
|
+
QuadraticOut: vp,
|
|
14555
|
+
QuadraticInOut: bp,
|
|
14556
|
+
CubicIn: wp,
|
|
14557
|
+
CubicOut: Sp,
|
|
14558
|
+
CubicInOut: xp,
|
|
14559
|
+
SinusoidalIn: kp,
|
|
14560
|
+
SinusoidalOut: Ep,
|
|
14561
|
+
SinusoidalInOut: Lp,
|
|
14572
14562
|
ExponentialIn: Ap,
|
|
14573
|
-
ExponentialOut:
|
|
14574
|
-
ExponentialInOut:
|
|
14575
|
-
ElasticIn:
|
|
14576
|
-
ElasticOut:
|
|
14577
|
-
ElasticInOut:
|
|
14578
|
-
BounceIn:
|
|
14563
|
+
ExponentialOut: Cp,
|
|
14564
|
+
ExponentialInOut: Tp,
|
|
14565
|
+
ElasticIn: Ip,
|
|
14566
|
+
ElasticOut: _p,
|
|
14567
|
+
ElasticInOut: Mp,
|
|
14568
|
+
BounceIn: vo,
|
|
14579
14569
|
BounceOut: jn,
|
|
14580
|
-
BounceInOut:
|
|
14570
|
+
BounceInOut: Pp
|
|
14581
14571
|
};
|
|
14582
|
-
function
|
|
14572
|
+
function yp(r) {
|
|
14583
14573
|
return r;
|
|
14584
14574
|
}
|
|
14585
|
-
function
|
|
14575
|
+
function gp(r) {
|
|
14586
14576
|
return r * r;
|
|
14587
14577
|
}
|
|
14588
|
-
function
|
|
14578
|
+
function vp(r) {
|
|
14589
14579
|
return r * (2 - r);
|
|
14590
14580
|
}
|
|
14591
|
-
function
|
|
14581
|
+
function bp(r) {
|
|
14592
14582
|
let e = r * 2;
|
|
14593
14583
|
return e < 1 ? 0.5 * e * e : (e -= 1, -0.5 * (e * (e - 2) - 1));
|
|
14594
14584
|
}
|
|
14595
|
-
function
|
|
14585
|
+
function wp(r) {
|
|
14596
14586
|
return r * r * r;
|
|
14597
14587
|
}
|
|
14598
|
-
function
|
|
14588
|
+
function Sp(r) {
|
|
14599
14589
|
return --r * r * r + 1;
|
|
14600
14590
|
}
|
|
14601
|
-
function
|
|
14591
|
+
function xp(r) {
|
|
14602
14592
|
let e = r * 2;
|
|
14603
14593
|
return e < 1 ? 0.5 * e * e * e : (e -= 2, 0.5 * (e * e * e + 2));
|
|
14604
14594
|
}
|
|
14605
|
-
function
|
|
14595
|
+
function kp(r) {
|
|
14606
14596
|
return 1 - Math.cos(r * Math.PI / 2);
|
|
14607
14597
|
}
|
|
14608
|
-
function
|
|
14598
|
+
function Ep(r) {
|
|
14609
14599
|
return Math.sin(r * Math.PI / 2);
|
|
14610
14600
|
}
|
|
14611
|
-
function
|
|
14601
|
+
function Lp(r) {
|
|
14612
14602
|
return 0.5 * (1 - Math.cos(Math.PI * r));
|
|
14613
14603
|
}
|
|
14614
14604
|
function Ap(r) {
|
|
14615
14605
|
return r === 0 ? 0 : 1024 ** (r - 1);
|
|
14616
14606
|
}
|
|
14617
|
-
function
|
|
14607
|
+
function Cp(r) {
|
|
14618
14608
|
return r === 1 ? 1 : 1 - 2 ** (-10 * r);
|
|
14619
14609
|
}
|
|
14620
|
-
function
|
|
14610
|
+
function Tp(r) {
|
|
14621
14611
|
if (r === 0) return 0;
|
|
14622
14612
|
if (r === 1) return 1;
|
|
14623
14613
|
const e = r * 2;
|
|
14624
14614
|
return e < 1 ? 0.5 * 1024 ** (e - 1) : 0.5 * (-(2 ** (-10 * (e - 1))) + 2);
|
|
14625
14615
|
}
|
|
14626
|
-
function
|
|
14616
|
+
function Ip(r) {
|
|
14627
14617
|
let e = 0.1;
|
|
14628
14618
|
const t = 0.4;
|
|
14629
14619
|
let n;
|
|
14630
14620
|
return r === 0 ? 0 : r === 1 ? 1 : (e < 1 ? (e = 1, n = t / 4) : n = t * Math.asin(1 / e) / (2 * Math.PI), r -= 1, -(e * 2 ** (10 * r) * Math.sin((r - n) * (2 * Math.PI) / t)));
|
|
14631
14621
|
}
|
|
14632
|
-
function
|
|
14622
|
+
function _p(r) {
|
|
14633
14623
|
let e = 0.1;
|
|
14634
14624
|
const t = 0.4;
|
|
14635
14625
|
let n;
|
|
14636
14626
|
return r === 0 ? 0 : r === 1 ? 1 : (e < 1 ? (e = 1, n = t / 4) : n = t * Math.asin(1 / e) / (2 * Math.PI), e * 2 ** (-10 * r) * Math.sin((r - n) * (2 * Math.PI) / t) + 1);
|
|
14637
14627
|
}
|
|
14638
|
-
function
|
|
14628
|
+
function Mp(r) {
|
|
14639
14629
|
let e = 0.1;
|
|
14640
14630
|
const t = 0.4;
|
|
14641
14631
|
let n;
|
|
@@ -14650,7 +14640,7 @@ function Pp(r) {
|
|
|
14650
14640
|
const i = a - 1;
|
|
14651
14641
|
return e * 2 ** (-10 * i) * Math.sin((i - n) * (2 * Math.PI) / t) * 0.5 + 1;
|
|
14652
14642
|
}
|
|
14653
|
-
function
|
|
14643
|
+
function vo(r) {
|
|
14654
14644
|
return 1 - jn(1 - r);
|
|
14655
14645
|
}
|
|
14656
14646
|
function jn(r) {
|
|
@@ -14666,8 +14656,8 @@ function jn(r) {
|
|
|
14666
14656
|
const e = r - 2.625 / 2.75;
|
|
14667
14657
|
return 7.5625 * e * e + 0.984375;
|
|
14668
14658
|
}
|
|
14669
|
-
function
|
|
14670
|
-
return r < 0.5 ?
|
|
14659
|
+
function Pp(r) {
|
|
14660
|
+
return r < 0.5 ? vo(r * 2) * 0.5 : jn(r * 2 - 1) * 0.5 + 0.5;
|
|
14671
14661
|
}
|
|
14672
14662
|
class Dn {
|
|
14673
14663
|
constructor({ keyframes: e, duration: t, iterations: n, manualMode: a, delay: i }) {
|
|
@@ -14722,7 +14712,7 @@ class Dn {
|
|
|
14722
14712
|
for (const [f, d] of Object.entries(p))
|
|
14723
14713
|
f in c || (c[f] = []), c[f].push(d);
|
|
14724
14714
|
return c;
|
|
14725
|
-
}, {}), u = Object.entries(l).reduce((c, [p, f]) => (c[p] =
|
|
14715
|
+
}, {}), u = Object.entries(l).reduce((c, [p, f]) => (c[p] = go(f), c), {});
|
|
14726
14716
|
this.keyframes = s.map((c, p) => ({
|
|
14727
14717
|
...c,
|
|
14728
14718
|
props: o.reduce((f, d) => (f[d] = u[d][p], f), {}),
|
|
@@ -14813,7 +14803,7 @@ class Dn {
|
|
|
14813
14803
|
(o == null ? void 0 : o.id) !== this.currentKeyframe && this.emitEvent("keyframe", o, i), this.currentKeyframe = o == null ? void 0 : o.id;
|
|
14814
14804
|
const s = Object.keys((o == null ? void 0 : o.props) ?? {}).reduce((l, u) => {
|
|
14815
14805
|
if (o && i) {
|
|
14816
|
-
const c = o.props[u], p = i.props[u], f = (this.currentDelta - o.delta) / (i.delta - o.delta), h = (
|
|
14806
|
+
const c = o.props[u], p = i.props[u], f = (this.currentDelta - o.delta) / (i.delta - o.delta), h = (mp[o.easing] ?? ((m) => m))(f);
|
|
14817
14807
|
l[u] = ar(c, p, h);
|
|
14818
14808
|
}
|
|
14819
14809
|
return o && !i && (l[u] = o.props[u]), l;
|
|
@@ -14949,7 +14939,7 @@ class Dn {
|
|
|
14949
14939
|
}
|
|
14950
14940
|
}
|
|
14951
14941
|
const Ka = "animated-route-layer";
|
|
14952
|
-
class
|
|
14942
|
+
class pf {
|
|
14953
14943
|
constructor({
|
|
14954
14944
|
keyframes: e,
|
|
14955
14945
|
source: t,
|
|
@@ -15150,7 +15140,7 @@ class ff {
|
|
|
15150
15140
|
throw new Error("[AnimatedRouteLayer.onAdd]: The first feature in the source data is not a valid GeoJSON of type `Feature`");
|
|
15151
15141
|
const a = n;
|
|
15152
15142
|
a.properties["@duration"] && (this.duration = a.properties["@duration"] ?? 1e3), a.properties["@iterations"] && (this.iterations = a.properties["@iterations"] ?? 0), a.properties["@delay"] && (this.delay = a.properties["@delay"] ?? 0), a.properties["@autoplay"] && (this.autoplay = a.properties["@autoplay"] ?? !1);
|
|
15153
|
-
const i =
|
|
15143
|
+
const i = cp(a, {
|
|
15154
15144
|
pathSmoothing: this.cameraMaptilerAnimationOptions ? this.cameraMaptilerAnimationOptions.pathSmoothing : !1,
|
|
15155
15145
|
defaultEasing: this.easing
|
|
15156
15146
|
}), o = this.duration, s = this.iterations, l = this.delay, u = this.autoplay;
|
|
@@ -15188,194 +15178,194 @@ class ff {
|
|
|
15188
15178
|
render() {
|
|
15189
15179
|
}
|
|
15190
15180
|
}
|
|
15191
|
-
function
|
|
15192
|
-
return "4.0.
|
|
15181
|
+
function bo() {
|
|
15182
|
+
return "4.0.3-rc.1";
|
|
15193
15183
|
}
|
|
15194
|
-
const
|
|
15195
|
-
setRTLTextPlugin:
|
|
15196
|
-
getRTLTextPluginStatus:
|
|
15184
|
+
const ff = k.Map, df = k.Marker, hf = k.Popup, mf = k.Style, yf = k.CanvasSource, gf = k.GeoJSONSource, vf = k.ImageSource, bf = k.RasterTileSource, wf = k.RasterDEMTileSource, Sf = k.VectorTileSource, xf = k.VideoSource, kf = k.NavigationControl, Ef = k.GeolocateControl, Lf = k.AttributionControl, Af = k.LogoControl, Cf = k.ScaleControl, Tf = k.FullscreenControl, If = k.TerrainControl, _f = k.BoxZoomHandler, Mf = k.ScrollZoomHandler, Pf = k.CooperativeGesturesHandler, Rf = k.KeyboardHandler, Of = k.TwoFingersTouchPitchHandler, zf = k.MapWheelEvent, Ff = k.MapTouchEvent, $f = k.MapMouseEvent, Nf = k.config, jf = k.getVersion, {
|
|
15185
|
+
setRTLTextPlugin: Df,
|
|
15186
|
+
getRTLTextPluginStatus: Uf,
|
|
15197
15187
|
LngLat: Ne,
|
|
15198
|
-
LngLatBounds:
|
|
15188
|
+
LngLatBounds: Rp,
|
|
15199
15189
|
MercatorCoordinate: fn,
|
|
15200
|
-
Evented:
|
|
15201
|
-
AJAXError:
|
|
15202
|
-
prewarm:
|
|
15203
|
-
clearPrewarmedResources:
|
|
15204
|
-
Hash:
|
|
15205
|
-
Point:
|
|
15206
|
-
EdgeInsets:
|
|
15207
|
-
DragRotateHandler:
|
|
15208
|
-
DragPanHandler:
|
|
15190
|
+
Evented: Bf,
|
|
15191
|
+
AJAXError: qf,
|
|
15192
|
+
prewarm: Vf,
|
|
15193
|
+
clearPrewarmedResources: Gf,
|
|
15194
|
+
Hash: Hf,
|
|
15195
|
+
Point: wo,
|
|
15196
|
+
EdgeInsets: Kf,
|
|
15197
|
+
DragRotateHandler: Zf,
|
|
15198
|
+
DragPanHandler: Xf,
|
|
15209
15199
|
TwoFingersTouchZoomRotateHandler: Yf,
|
|
15210
|
-
DoubleClickZoomHandler:
|
|
15211
|
-
TwoFingersTouchZoomHandler:
|
|
15212
|
-
TwoFingersTouchRotateHandler:
|
|
15213
|
-
getWorkerCount:
|
|
15214
|
-
setWorkerCount:
|
|
15215
|
-
getMaxParallelImageRequests:
|
|
15216
|
-
setMaxParallelImageRequests:
|
|
15217
|
-
getWorkerUrl:
|
|
15218
|
-
setWorkerUrl:
|
|
15219
|
-
addSourceType:
|
|
15220
|
-
importScriptInWorkers:
|
|
15221
|
-
addProtocol:
|
|
15222
|
-
removeProtocol:
|
|
15200
|
+
DoubleClickZoomHandler: Wf,
|
|
15201
|
+
TwoFingersTouchZoomHandler: Jf,
|
|
15202
|
+
TwoFingersTouchRotateHandler: Qf,
|
|
15203
|
+
getWorkerCount: ed,
|
|
15204
|
+
setWorkerCount: td,
|
|
15205
|
+
getMaxParallelImageRequests: rd,
|
|
15206
|
+
setMaxParallelImageRequests: nd,
|
|
15207
|
+
getWorkerUrl: ad,
|
|
15208
|
+
setWorkerUrl: id,
|
|
15209
|
+
addSourceType: od,
|
|
15210
|
+
importScriptInWorkers: sd,
|
|
15211
|
+
addProtocol: ld,
|
|
15212
|
+
removeProtocol: ud
|
|
15223
15213
|
} = k;
|
|
15224
15214
|
export {
|
|
15225
|
-
|
|
15215
|
+
qf as AJAXError,
|
|
15226
15216
|
Ka as ANIM_LAYER_PREFIX,
|
|
15227
|
-
|
|
15217
|
+
pf as AnimatedRouteLayer,
|
|
15228
15218
|
Yp as AttributionControl,
|
|
15229
|
-
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
15219
|
+
Lf as AttributionControlMLGL,
|
|
15220
|
+
Jp as BoxZoomHandler,
|
|
15221
|
+
_f as BoxZoomHandlerMLGL,
|
|
15222
|
+
qp as CanvasSource,
|
|
15223
|
+
yf as CanvasSourceMLGL,
|
|
15234
15224
|
T as ColorRamp,
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15225
|
+
yo as ColorRampCollection,
|
|
15226
|
+
ef as CooperativeGesturesHandler,
|
|
15227
|
+
Pf as CooperativeGesturesHandlerMLGL,
|
|
15238
15228
|
Ue as CubemapFaceNames,
|
|
15239
|
-
|
|
15229
|
+
rc as CubemapImagesPresets,
|
|
15240
15230
|
Nt as CubemapLayer,
|
|
15241
15231
|
Le as DOMcreate,
|
|
15242
15232
|
Lt as DOMremove,
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15251
|
-
|
|
15252
|
-
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
|
|
15233
|
+
Wf as DoubleClickZoomHandler,
|
|
15234
|
+
Xf as DragPanHandler,
|
|
15235
|
+
Zf as DragRotateHandler,
|
|
15236
|
+
Kf as EdgeInsets,
|
|
15237
|
+
Bf as Evented,
|
|
15238
|
+
Uo as FullscreenControl,
|
|
15239
|
+
Tf as FullscreenControlMLGL,
|
|
15240
|
+
Vp as GeoJSONSource,
|
|
15241
|
+
gf as GeoJSONSourceMLGL,
|
|
15242
|
+
No as GeolocateControl,
|
|
15243
|
+
Ef as GeolocateControlMLGL,
|
|
15244
|
+
vc as GeolocationType,
|
|
15245
|
+
Hf as Hash,
|
|
15246
|
+
Gp as ImageSource,
|
|
15247
|
+
vf as ImageSourceMLGL,
|
|
15248
|
+
Oc as ImageViewer,
|
|
15259
15249
|
ae as ImageViewerEvent,
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15250
|
+
uf as ImageViewerMarker,
|
|
15251
|
+
Dc as ImageViewerMarkerEvent,
|
|
15252
|
+
tf as KeyboardHandler,
|
|
15253
|
+
Rf as KeyboardHandlerMLGL,
|
|
15264
15254
|
O as Language,
|
|
15265
15255
|
Ne as LngLat,
|
|
15266
|
-
|
|
15267
|
-
|
|
15256
|
+
Rp as LngLatBounds,
|
|
15257
|
+
jo as LogoControl,
|
|
15268
15258
|
Af as LogoControlMLGL,
|
|
15269
15259
|
Gi as Map,
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15260
|
+
ff as MapMLGL,
|
|
15261
|
+
of as MapMouseEvent,
|
|
15262
|
+
$f as MapMouseEventMLGL,
|
|
15263
|
+
fd as MapStyle,
|
|
15264
|
+
dd as MapStyleVariant,
|
|
15265
|
+
af as MapTouchEvent,
|
|
15266
|
+
Ff as MapTouchEventMLGL,
|
|
15267
|
+
nf as MapWheelEvent,
|
|
15268
|
+
zf as MapWheelEventMLGL,
|
|
15279
15269
|
Dn as MaptilerAnimation,
|
|
15280
|
-
|
|
15270
|
+
Tu as MaptilerCustomControl,
|
|
15281
15271
|
en as MaptilerExternalControl,
|
|
15282
|
-
|
|
15272
|
+
Cu as MaptilerGeolocateControl,
|
|
15283
15273
|
Hn as MaptilerLogoControl,
|
|
15284
|
-
|
|
15285
|
-
|
|
15286
|
-
|
|
15287
|
-
|
|
15288
|
-
|
|
15274
|
+
Lu as MaptilerNavigationControl,
|
|
15275
|
+
Iu as MaptilerProjectionControl,
|
|
15276
|
+
Eu as MaptilerTerrainControl,
|
|
15277
|
+
$o as Marker,
|
|
15278
|
+
df as MarkerMLGL,
|
|
15289
15279
|
fn as MercatorCoordinate,
|
|
15290
|
-
|
|
15291
|
-
|
|
15292
|
-
|
|
15293
|
-
|
|
15294
|
-
|
|
15280
|
+
kf as NavigationControMLGL,
|
|
15281
|
+
Wa as NavigationControl,
|
|
15282
|
+
wo as Point,
|
|
15283
|
+
Up as Popup,
|
|
15284
|
+
hf as PopupMLGL,
|
|
15295
15285
|
Ut as RadialGradientLayer,
|
|
15296
|
-
|
|
15297
|
-
|
|
15298
|
-
|
|
15299
|
-
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15286
|
+
Kp as RasterDEMTileSource,
|
|
15287
|
+
wf as RasterDEMTileSourceMLGL,
|
|
15288
|
+
Hp as RasterTileSource,
|
|
15289
|
+
bf as RasterTileSourceMLGL,
|
|
15290
|
+
hd as ReferenceMapStyle,
|
|
15291
|
+
Do as ScaleControl,
|
|
15292
|
+
Cf as ScaleControlMLGL,
|
|
15293
|
+
Qp as ScrollZoomHandler,
|
|
15294
|
+
Mf as ScrollZoomHandlerMLGL,
|
|
15295
|
+
Bo as SdkConfig,
|
|
15296
|
+
md as ServiceError,
|
|
15297
|
+
Bp as Style,
|
|
15298
|
+
mf as StyleMLGL,
|
|
15299
|
+
If as TerrainControMLGL,
|
|
15300
|
+
Wp as TerrainControl,
|
|
15301
|
+
rf as TwoFingersTouchPitchHandler,
|
|
15302
|
+
Of as TwoFingersTouchPitchHandlerMLGL,
|
|
15303
|
+
Qf as TwoFingersTouchRotateHandler,
|
|
15304
|
+
Jf as TwoFingersTouchZoomHandler,
|
|
15315
15305
|
Yf as TwoFingersTouchZoomRotateHandler,
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
|
|
15306
|
+
Zp as VectorTileSource,
|
|
15307
|
+
Sf as VectorTileSourceMLGL,
|
|
15308
|
+
Xp as VideoSource,
|
|
15309
|
+
xf as VideoSourceMLGL,
|
|
15310
|
+
ld as addProtocol,
|
|
15311
|
+
od as addSourceType,
|
|
15312
|
+
yd as areSameLanguages,
|
|
15313
|
+
gd as bufferToPixelDataBrowser,
|
|
15314
|
+
vd as canParsePixelData,
|
|
15315
|
+
bd as circumferenceAtLatitude,
|
|
15316
|
+
Gf as clearPrewarmedResources,
|
|
15327
15317
|
j as config,
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15318
|
+
Nf as configMLGL,
|
|
15319
|
+
wd as coordinates,
|
|
15320
|
+
pp as createBezierPathFromCoordinates,
|
|
15331
15321
|
ze as cubemapPresets,
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15336
|
-
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15322
|
+
Sd as data,
|
|
15323
|
+
sf as displayWebGLContextLostWarning,
|
|
15324
|
+
xd as elevation,
|
|
15325
|
+
kd as expandMapStyle,
|
|
15326
|
+
lf as geocoding,
|
|
15327
|
+
Ed as geolocation,
|
|
15328
|
+
Ld as getAutoLanguage,
|
|
15329
|
+
fp as getAverageDistance,
|
|
15340
15330
|
Gn as getBrowserLanguage,
|
|
15341
15331
|
Ad as getBufferToPixelDataParser,
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15332
|
+
Cd as getLanguageInfoFromCode,
|
|
15333
|
+
Td as getLanguageInfoFromFlag,
|
|
15334
|
+
Id as getLanguageInfoFromKey,
|
|
15335
|
+
jf as getMapLibreVersion,
|
|
15336
|
+
rd as getMaxParallelImageRequests,
|
|
15337
|
+
Uf as getRTLTextPluginStatus,
|
|
15338
|
+
_d as getTileCache,
|
|
15339
|
+
bo as getVersion,
|
|
15340
|
+
Jo as getWebGLSupportError,
|
|
15341
|
+
ed as getWorkerCount,
|
|
15342
|
+
ad as getWorkerUrl,
|
|
15343
|
+
Bc as gpx,
|
|
15344
|
+
Wc as gpxOrKml,
|
|
15355
15345
|
io as hasChildNodeWithName,
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15346
|
+
cf as helpers,
|
|
15347
|
+
sd as importScriptInWorkers,
|
|
15348
|
+
Md as isLanguageInfo,
|
|
15349
|
+
qc as kml,
|
|
15360
15350
|
ar as lerp,
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15351
|
+
go as lerpArrayValues,
|
|
15352
|
+
Pd as mapStylePresetList,
|
|
15353
|
+
Rd as math,
|
|
15354
|
+
Od as misc,
|
|
15355
|
+
cp as parseGeoJSONFeatureToKeyframes,
|
|
15356
|
+
Vf as prewarm,
|
|
15357
|
+
ud as removeProtocol,
|
|
15358
|
+
hp as resamplePath,
|
|
15359
|
+
nd as setMaxParallelImageRequests,
|
|
15360
|
+
Df as setRTLTextPlugin,
|
|
15361
|
+
td as setWorkerCount,
|
|
15362
|
+
id as setWorkerUrl,
|
|
15363
|
+
dp as simplifyPath,
|
|
15364
|
+
zd as staticMaps,
|
|
15375
15365
|
Fn as str2xml,
|
|
15376
15366
|
Va as stretchNumericalArray,
|
|
15377
|
-
|
|
15378
|
-
|
|
15367
|
+
Fd as styleToStyle,
|
|
15368
|
+
$d as toLanguageInfo,
|
|
15379
15369
|
Di as toggleProjection,
|
|
15380
15370
|
ji as toggleTerrain,
|
|
15381
15371
|
Na as xml2str
|