@maptiler/sdk 4.0.1 → 4.0.2
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 +928 -915
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/package.json +3 -3
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var _o = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Un = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
5
|
var Mo = (r, e, t) => e in r ? _o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
-
var y = (r, e, t) => Mo(r, typeof e != "symbol" ? e + "" : e, t), Er = (r, e, t) => e.has(r) ||
|
|
7
|
-
var E = (r, e, t) => (Er(r, e, "read from private field"), t ? t.call(r) : e.get(r)),
|
|
6
|
+
var y = (r, e, t) => Mo(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)), W = (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
9
|
import { Base64 as Po } from "js-base64";
|
|
10
10
|
import Ro from "events";
|
|
11
11
|
import * as Ot from "@maptiler/client";
|
|
12
|
-
import { Language as Oo, getLanguageInfoFromCode as
|
|
13
|
-
import { MapStyle as
|
|
14
|
-
import { v4 as
|
|
12
|
+
import { Language as Oo, getLanguageInfoFromCode as Bn, config as Lr, MapStyle as dt, mapStylePresetList as Cr, expandMapStyle as zo, MapStyleVariant as Fo, ReferenceMapStyle as $o, toLanguageInfo as qn, getLanguageInfoFromFlag as No, geolocation as Vn } from "@maptiler/client";
|
|
13
|
+
import { MapStyle as dd, MapStyleVariant as hd, ReferenceMapStyle as md, ServiceError as yd, areSameLanguages as gd, bufferToPixelDataBrowser as vd, canParsePixelData as bd, circumferenceAtLatitude as wd, coordinates as Sd, data as xd, elevation as kd, expandMapStyle as Ed, geolocation as Ld, getAutoLanguage as Cd, getBufferToPixelDataParser as Ad, getLanguageInfoFromCode as Td, getLanguageInfoFromFlag as Id, getLanguageInfoFromKey as _d, getTileCache as Md, isLanguageInfo as Pd, mapStylePresetList as Rd, math as Od, misc as zd, staticMaps as Fd, styleToStyle as $d, toLanguageInfo as Nd } from "@maptiler/client";
|
|
14
|
+
import { v4 as dn } from "uuid";
|
|
15
15
|
(function() {
|
|
16
16
|
typeof window > "u" || (window.requestIdleCallback = window.requestIdleCallback || function(r) {
|
|
17
17
|
const e = Date.now();
|
|
@@ -32,52 +32,52 @@ let jo = class extends k.Marker {
|
|
|
32
32
|
return super.addTo(e);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
class
|
|
35
|
+
class Bp extends k.Popup {
|
|
36
36
|
addTo(e) {
|
|
37
37
|
return super.addTo(e);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class qp extends k.Style {
|
|
41
41
|
constructor(e, t = {}) {
|
|
42
42
|
super(e, t);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
class
|
|
45
|
+
class Vp extends k.CanvasSource {
|
|
46
46
|
onAdd(e) {
|
|
47
47
|
super.onAdd(e);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
class
|
|
50
|
+
class Gp extends k.GeoJSONSource {
|
|
51
51
|
onAdd(e) {
|
|
52
52
|
super.onAdd(e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class Hp extends k.ImageSource {
|
|
56
56
|
onAdd(e) {
|
|
57
57
|
super.onAdd(e);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class Kp extends k.RasterTileSource {
|
|
61
61
|
onAdd(e) {
|
|
62
62
|
super.onAdd(e);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
class
|
|
65
|
+
class Zp extends k.RasterDEMTileSource {
|
|
66
66
|
onAdd(e) {
|
|
67
67
|
super.onAdd(e);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class Xp extends k.VectorTileSource {
|
|
71
71
|
onAdd(e) {
|
|
72
72
|
super.onAdd(e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
class
|
|
75
|
+
class Wp extends k.VideoSource {
|
|
76
76
|
onAdd(e) {
|
|
77
77
|
super.onAdd(e);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
class
|
|
80
|
+
class Ya extends k.NavigationControl {
|
|
81
81
|
onAdd(e) {
|
|
82
82
|
return super.onAdd(e);
|
|
83
83
|
}
|
|
@@ -107,47 +107,47 @@ class qo extends k.FullscreenControl {
|
|
|
107
107
|
return super.onAdd(e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
class
|
|
110
|
+
class Jp extends k.TerrainControl {
|
|
111
111
|
onAdd(e) {
|
|
112
112
|
return super.onAdd(e);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
class
|
|
115
|
+
class Qp extends k.BoxZoomHandler {
|
|
116
116
|
constructor(e, t) {
|
|
117
117
|
super(e, t);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
class
|
|
120
|
+
class ef extends k.ScrollZoomHandler {
|
|
121
121
|
constructor(e, t) {
|
|
122
122
|
super(e, t);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
class
|
|
125
|
+
class tf extends k.CooperativeGesturesHandler {
|
|
126
126
|
constructor(e, t) {
|
|
127
127
|
super(e, t);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class rf extends k.KeyboardHandler {
|
|
131
131
|
constructor(e) {
|
|
132
132
|
super(e);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
class
|
|
135
|
+
class nf extends k.TwoFingersTouchPitchHandler {
|
|
136
136
|
constructor(e) {
|
|
137
137
|
super(e);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
class
|
|
140
|
+
class af extends k.MapWheelEvent {
|
|
141
141
|
constructor(e, t, n) {
|
|
142
142
|
super(e, t, n);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class of extends k.MapTouchEvent {
|
|
146
146
|
constructor(e, t, n) {
|
|
147
147
|
super(e, t, n);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
class
|
|
150
|
+
class sf extends k.MapMouseEvent {
|
|
151
151
|
constructor(e, t, n, a = {}) {
|
|
152
152
|
super(e, t, n, a);
|
|
153
153
|
}
|
|
@@ -201,14 +201,14 @@ const O = {
|
|
|
201
201
|
},
|
|
202
202
|
...Oo
|
|
203
203
|
};
|
|
204
|
-
function
|
|
204
|
+
function Gn() {
|
|
205
205
|
if (typeof navigator > "u") {
|
|
206
|
-
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t =
|
|
206
|
+
const e = Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0], t = Bn(e);
|
|
207
207
|
return t || O.ENGLISH;
|
|
208
208
|
}
|
|
209
|
-
return Array.from(new Set(navigator.languages.map((e) => e.split("-")[0]))).map((e) =>
|
|
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 Y = {
|
|
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 W = {
|
|
|
219
219
|
terrainSourceURL: "https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json",
|
|
220
220
|
terrainSourceId: "maptiler-terrain"
|
|
221
221
|
};
|
|
222
|
-
Object.freeze(
|
|
223
|
-
const ir =
|
|
222
|
+
Object.freeze(Y);
|
|
223
|
+
const ir = dn();
|
|
224
224
|
class Vo extends Ro {
|
|
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", Y.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.
|
|
@@ -312,12 +312,12 @@ class Vo extends Ro {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
const j = new Vo();
|
|
315
|
-
class
|
|
315
|
+
class Hn extends Uo {
|
|
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 ?? Y.maptilerLogoURL, this.linkURL = t.linkURL ?? Y.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 Gn 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", Go = "maptiler_sdk", Ho = 1e3, Ko = 100, Gr = typeof caches < "u", { addProtocol:
|
|
328
|
+
const qr = "localcache_source", Vr = "localcache", Go = "maptiler_sdk", Ho = 1e3, Ko = 100, Gr = typeof caches < "u", { addProtocol: Kn } = k;
|
|
329
329
|
function Zo(r, e) {
|
|
330
|
-
if (Gr && j.caching && j.session && r.host ===
|
|
330
|
+
if (Gr && j.caching && j.session && r.host === Y.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")
|
|
@@ -339,14 +339,14 @@ let Ar;
|
|
|
339
339
|
async function Ja() {
|
|
340
340
|
return Ar || (Ar = await caches.open(Go)), Ar;
|
|
341
341
|
}
|
|
342
|
-
let
|
|
342
|
+
let Zn = 0;
|
|
343
343
|
async function Xo() {
|
|
344
344
|
const r = await Ja(), e = await r.keys(), t = e.slice(0, Math.max(e.length - Ho, 0));
|
|
345
345
|
for (const n of t)
|
|
346
346
|
r.delete(n);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
348
|
+
function Wo() {
|
|
349
|
+
Kn(
|
|
350
350
|
qr,
|
|
351
351
|
async (r, e) => {
|
|
352
352
|
if (!r.url) throw new Error("");
|
|
@@ -360,7 +360,7 @@ function Yo() {
|
|
|
360
360
|
expires: n.headers.get("Expires")
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
|
-
),
|
|
363
|
+
), Kn(Vr, async (r, e) => {
|
|
364
364
|
if (!r.url) throw new Error("");
|
|
365
365
|
r.url = r.url.replace(`${Vr}://`, "https://");
|
|
366
366
|
const t = new URL(r.url), n = new URL(t);
|
|
@@ -378,15 +378,15 @@ function Yo() {
|
|
|
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
|
-
}), ++
|
|
381
|
+
}), ++Zn > Ko && (Xo(), Zn = 0)), s(p);
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
async function
|
|
384
|
+
async function Yo(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 ?? Y.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
|
}
|
|
@@ -395,7 +395,7 @@ function Jo(r, e) {
|
|
|
395
395
|
for (const t of r)
|
|
396
396
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Xn(r, e) {
|
|
399
399
|
let t = null;
|
|
400
400
|
try {
|
|
401
401
|
t = new URL(r);
|
|
@@ -404,20 +404,20 @@ function Zn(r, e) {
|
|
|
404
404
|
url: r
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
return t.host ===
|
|
407
|
+
return t.host === Y.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", j.apiKey), j.session && t.searchParams.append("mtsid", ir)), {
|
|
408
408
|
url: Zo(t, e)
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function Wn(r) {
|
|
412
412
|
return async (e, t) => {
|
|
413
413
|
if (r != null) {
|
|
414
|
-
const n = await r(e, t), a =
|
|
414
|
+
const n = await r(e, t), a = Xn((n == null ? void 0 : n.url) ?? "", t);
|
|
415
415
|
return {
|
|
416
416
|
...n,
|
|
417
417
|
...a
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
return
|
|
420
|
+
return Xn(e, t);
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
function Qa() {
|
|
@@ -433,37 +433,44 @@ function Qo(r) {
|
|
|
433
433
|
}
|
|
434
434
|
return null;
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
const es = {
|
|
437
|
+
antialias: !1,
|
|
438
|
+
preserveDrawingBuffer: !1,
|
|
439
|
+
powerPreference: "high-performance",
|
|
440
|
+
failIfMajorPerformanceCaveat: !1,
|
|
441
|
+
desynchronized: !1
|
|
442
|
+
};
|
|
443
|
+
function ts(r = {}) {
|
|
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.";
|
|
438
445
|
}
|
|
439
|
-
function
|
|
440
|
-
const
|
|
441
|
-
if (!
|
|
442
|
-
let
|
|
443
|
-
if (typeof r == "string" ?
|
|
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)
|
|
444
451
|
throw new Error("The Map container must be provided.");
|
|
445
|
-
const
|
|
446
|
-
throw
|
|
452
|
+
const a = document.createElement("div");
|
|
453
|
+
throw a.innerHTML = t, a.classList.add("webgl-warning-div"), n.appendChild(a), new Error(t);
|
|
447
454
|
}
|
|
448
|
-
function
|
|
455
|
+
function lf(r) {
|
|
449
456
|
const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
|
|
450
457
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
451
458
|
}
|
|
452
|
-
function
|
|
459
|
+
function ns(r, e) {
|
|
453
460
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
454
461
|
return {
|
|
455
462
|
contains: t.test(r),
|
|
456
463
|
exactMatch: new RegExp(`^${t.source}$`).test(r)
|
|
457
464
|
};
|
|
458
465
|
}
|
|
459
|
-
function
|
|
466
|
+
function as(r, e, t) {
|
|
460
467
|
const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
|
|
461
468
|
return ["concat", ...a.flatMap((s, l) => {
|
|
462
|
-
const u =
|
|
469
|
+
const u = is(s);
|
|
463
470
|
return l === a.length - 1 ? [u] : [u, e];
|
|
464
471
|
})];
|
|
465
472
|
}
|
|
466
|
-
function
|
|
473
|
+
function is(r) {
|
|
467
474
|
return typeof r != "string" || !r.includes("{ele}") ? r : [
|
|
468
475
|
"case",
|
|
469
476
|
// if the value contains {ele}
|
|
@@ -486,7 +493,7 @@ function as(r) {
|
|
|
486
493
|
""
|
|
487
494
|
];
|
|
488
495
|
}
|
|
489
|
-
function
|
|
496
|
+
function os(r) {
|
|
490
497
|
var n;
|
|
491
498
|
const e = /\{name(?::(?<language>\S+))?\}/g, t = [];
|
|
492
499
|
for (; ; ) {
|
|
@@ -497,7 +504,7 @@ function is(r) {
|
|
|
497
504
|
}
|
|
498
505
|
return t;
|
|
499
506
|
}
|
|
500
|
-
function
|
|
507
|
+
function ss(r) {
|
|
501
508
|
return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
|
|
502
509
|
isLanguage: !0,
|
|
503
510
|
localization: null
|
|
@@ -506,17 +513,17 @@ function os(r) {
|
|
|
506
513
|
localization: r[1].trim().split(":").pop()
|
|
507
514
|
} : null;
|
|
508
515
|
}
|
|
509
|
-
function
|
|
516
|
+
function ls(r) {
|
|
510
517
|
const e = [], t = structuredClone(r), n = (a) => {
|
|
511
518
|
if (typeof a != "string")
|
|
512
519
|
for (let i = 0; i < a.length; i += 1) {
|
|
513
|
-
const o =
|
|
520
|
+
const o = ss(a[i]);
|
|
514
521
|
o ? e.push(o.localization) : n(a[i]);
|
|
515
522
|
}
|
|
516
523
|
};
|
|
517
524
|
return n([t]), e;
|
|
518
525
|
}
|
|
519
|
-
function
|
|
526
|
+
function us(r, e) {
|
|
520
527
|
const t = [];
|
|
521
528
|
for (const i of r) {
|
|
522
529
|
if (i.type !== "symbol")
|
|
@@ -527,10 +534,10 @@ function ls(r, e) {
|
|
|
527
534
|
const u = e.getLayoutProperty(s, "text-field");
|
|
528
535
|
if (u)
|
|
529
536
|
if (typeof u == "string") {
|
|
530
|
-
const c =
|
|
537
|
+
const c = os(u);
|
|
531
538
|
t.push(c);
|
|
532
539
|
} else {
|
|
533
|
-
const c =
|
|
540
|
+
const c = ls(u);
|
|
534
541
|
t.push(c);
|
|
535
542
|
}
|
|
536
543
|
}
|
|
@@ -542,7 +549,7 @@ function ls(r, e) {
|
|
|
542
549
|
i === null ? a.unlocalized += 1 : (i in a.localized || (a.localized[i] = 0), a.localized[i] += 1);
|
|
543
550
|
return a;
|
|
544
551
|
}
|
|
545
|
-
var
|
|
552
|
+
var cs = 8, ps = {
|
|
546
553
|
version: {
|
|
547
554
|
required: !0,
|
|
548
555
|
type: "enum",
|
|
@@ -620,18 +627,18 @@ var us = 8, cs = {
|
|
|
620
627
|
type: "array",
|
|
621
628
|
value: "layer"
|
|
622
629
|
}
|
|
623
|
-
},
|
|
630
|
+
}, fs = {
|
|
624
631
|
"*": {
|
|
625
632
|
type: "source"
|
|
626
633
|
}
|
|
627
|
-
},
|
|
634
|
+
}, ds = [
|
|
628
635
|
"source_vector",
|
|
629
636
|
"source_raster",
|
|
630
637
|
"source_raster_dem",
|
|
631
638
|
"source_geojson",
|
|
632
639
|
"source_video",
|
|
633
640
|
"source_image"
|
|
634
|
-
],
|
|
641
|
+
], hs = {
|
|
635
642
|
type: {
|
|
636
643
|
required: !0,
|
|
637
644
|
type: "enum",
|
|
@@ -694,7 +701,7 @@ var us = 8, cs = {
|
|
|
694
701
|
"*": {
|
|
695
702
|
type: "*"
|
|
696
703
|
}
|
|
697
|
-
},
|
|
704
|
+
}, ms = {
|
|
698
705
|
type: {
|
|
699
706
|
required: !0,
|
|
700
707
|
type: "enum",
|
|
@@ -751,7 +758,7 @@ var us = 8, cs = {
|
|
|
751
758
|
"*": {
|
|
752
759
|
type: "*"
|
|
753
760
|
}
|
|
754
|
-
},
|
|
761
|
+
}, ys = {
|
|
755
762
|
type: {
|
|
756
763
|
required: !0,
|
|
757
764
|
type: "enum",
|
|
@@ -825,7 +832,7 @@ var us = 8, cs = {
|
|
|
825
832
|
"*": {
|
|
826
833
|
type: "*"
|
|
827
834
|
}
|
|
828
|
-
},
|
|
835
|
+
}, gs = {
|
|
829
836
|
type: {
|
|
830
837
|
required: !0,
|
|
831
838
|
type: "enum",
|
|
@@ -886,7 +893,7 @@ var us = 8, cs = {
|
|
|
886
893
|
promoteId: {
|
|
887
894
|
type: "promoteId"
|
|
888
895
|
}
|
|
889
|
-
},
|
|
896
|
+
}, vs = {
|
|
890
897
|
type: {
|
|
891
898
|
required: !0,
|
|
892
899
|
type: "enum",
|
|
@@ -909,7 +916,7 @@ var us = 8, cs = {
|
|
|
909
916
|
value: "number"
|
|
910
917
|
}
|
|
911
918
|
}
|
|
912
|
-
},
|
|
919
|
+
}, bs = {
|
|
913
920
|
type: {
|
|
914
921
|
required: !0,
|
|
915
922
|
type: "enum",
|
|
@@ -931,7 +938,7 @@ var us = 8, cs = {
|
|
|
931
938
|
value: "number"
|
|
932
939
|
}
|
|
933
940
|
}
|
|
934
|
-
},
|
|
941
|
+
}, ws = {
|
|
935
942
|
id: {
|
|
936
943
|
type: "string",
|
|
937
944
|
required: !0
|
|
@@ -980,7 +987,7 @@ var us = 8, cs = {
|
|
|
980
987
|
paint: {
|
|
981
988
|
type: "paint"
|
|
982
989
|
}
|
|
983
|
-
},
|
|
990
|
+
}, Ss = [
|
|
984
991
|
"layout_fill",
|
|
985
992
|
"layout_line",
|
|
986
993
|
"layout_circle",
|
|
@@ -991,7 +998,7 @@ var us = 8, cs = {
|
|
|
991
998
|
"layout_hillshade",
|
|
992
999
|
"layout_color-relief",
|
|
993
1000
|
"layout_background"
|
|
994
|
-
],
|
|
1001
|
+
], xs = {
|
|
995
1002
|
visibility: {
|
|
996
1003
|
type: "enum",
|
|
997
1004
|
values: {
|
|
@@ -1007,7 +1014,7 @@ var us = 8, cs = {
|
|
|
1007
1014
|
},
|
|
1008
1015
|
"property-type": "data-constant"
|
|
1009
1016
|
}
|
|
1010
|
-
},
|
|
1017
|
+
}, ks = {
|
|
1011
1018
|
"fill-sort-key": {
|
|
1012
1019
|
type: "number",
|
|
1013
1020
|
expression: {
|
|
@@ -1034,7 +1041,7 @@ var us = 8, cs = {
|
|
|
1034
1041
|
},
|
|
1035
1042
|
"property-type": "data-constant"
|
|
1036
1043
|
}
|
|
1037
|
-
},
|
|
1044
|
+
}, Es = {
|
|
1038
1045
|
"circle-sort-key": {
|
|
1039
1046
|
type: "number",
|
|
1040
1047
|
expression: {
|
|
@@ -1061,7 +1068,7 @@ var us = 8, cs = {
|
|
|
1061
1068
|
},
|
|
1062
1069
|
"property-type": "data-constant"
|
|
1063
1070
|
}
|
|
1064
|
-
},
|
|
1071
|
+
}, Ls = {
|
|
1065
1072
|
visibility: {
|
|
1066
1073
|
type: "enum",
|
|
1067
1074
|
values: {
|
|
@@ -1077,7 +1084,7 @@ var us = 8, cs = {
|
|
|
1077
1084
|
},
|
|
1078
1085
|
"property-type": "data-constant"
|
|
1079
1086
|
}
|
|
1080
|
-
},
|
|
1087
|
+
}, Cs = {
|
|
1081
1088
|
"line-cap": {
|
|
1082
1089
|
type: "enum",
|
|
1083
1090
|
values: {
|
|
@@ -1169,7 +1176,7 @@ var us = 8, cs = {
|
|
|
1169
1176
|
},
|
|
1170
1177
|
"property-type": "data-constant"
|
|
1171
1178
|
}
|
|
1172
|
-
},
|
|
1179
|
+
}, As = {
|
|
1173
1180
|
"symbol-placement": {
|
|
1174
1181
|
type: "enum",
|
|
1175
1182
|
values: {
|
|
@@ -2002,7 +2009,7 @@ var us = 8, cs = {
|
|
|
2002
2009
|
},
|
|
2003
2010
|
"property-type": "data-constant"
|
|
2004
2011
|
}
|
|
2005
|
-
},
|
|
2012
|
+
}, Ts = {
|
|
2006
2013
|
visibility: {
|
|
2007
2014
|
type: "enum",
|
|
2008
2015
|
values: {
|
|
@@ -2018,7 +2025,7 @@ var us = 8, cs = {
|
|
|
2018
2025
|
},
|
|
2019
2026
|
"property-type": "data-constant"
|
|
2020
2027
|
}
|
|
2021
|
-
},
|
|
2028
|
+
}, Is = {
|
|
2022
2029
|
visibility: {
|
|
2023
2030
|
type: "enum",
|
|
2024
2031
|
values: {
|
|
@@ -2034,7 +2041,7 @@ var us = 8, cs = {
|
|
|
2034
2041
|
},
|
|
2035
2042
|
"property-type": "data-constant"
|
|
2036
2043
|
}
|
|
2037
|
-
},
|
|
2044
|
+
}, _s = {
|
|
2038
2045
|
type: "boolean",
|
|
2039
2046
|
expression: {
|
|
2040
2047
|
interpolated: !1,
|
|
@@ -2044,7 +2051,7 @@ var us = 8, cs = {
|
|
|
2044
2051
|
]
|
|
2045
2052
|
},
|
|
2046
2053
|
"property-type": "data-driven"
|
|
2047
|
-
},
|
|
2054
|
+
}, Ms = {
|
|
2048
2055
|
type: "enum",
|
|
2049
2056
|
values: {
|
|
2050
2057
|
"==": {},
|
|
@@ -2061,14 +2068,14 @@ var us = 8, cs = {
|
|
|
2061
2068
|
has: {},
|
|
2062
2069
|
"!has": {}
|
|
2063
2070
|
}
|
|
2064
|
-
},
|
|
2071
|
+
}, Ps = {
|
|
2065
2072
|
type: "enum",
|
|
2066
2073
|
values: {
|
|
2067
2074
|
Point: {},
|
|
2068
2075
|
LineString: {},
|
|
2069
2076
|
Polygon: {}
|
|
2070
2077
|
}
|
|
2071
|
-
},
|
|
2078
|
+
}, Rs = {
|
|
2072
2079
|
type: "array",
|
|
2073
2080
|
minimum: 0,
|
|
2074
2081
|
maximum: 24,
|
|
@@ -2077,11 +2084,11 @@ var us = 8, cs = {
|
|
|
2077
2084
|
"color"
|
|
2078
2085
|
],
|
|
2079
2086
|
length: 2
|
|
2080
|
-
},
|
|
2087
|
+
}, Os = {
|
|
2081
2088
|
type: "array",
|
|
2082
2089
|
value: "expression_name",
|
|
2083
2090
|
minimum: 1
|
|
2084
|
-
},
|
|
2091
|
+
}, zs = {
|
|
2085
2092
|
anchor: {
|
|
2086
2093
|
type: "enum",
|
|
2087
2094
|
default: "viewport",
|
|
@@ -2142,7 +2149,7 @@ var us = 8, cs = {
|
|
|
2142
2149
|
},
|
|
2143
2150
|
transition: !0
|
|
2144
2151
|
}
|
|
2145
|
-
},
|
|
2152
|
+
}, Fs = {
|
|
2146
2153
|
"sky-color": {
|
|
2147
2154
|
type: "color",
|
|
2148
2155
|
"property-type": "data-constant",
|
|
@@ -2235,7 +2242,7 @@ var us = 8, cs = {
|
|
|
2235
2242
|
},
|
|
2236
2243
|
transition: !0
|
|
2237
2244
|
}
|
|
2238
|
-
},
|
|
2245
|
+
}, $s = {
|
|
2239
2246
|
source: {
|
|
2240
2247
|
type: "string",
|
|
2241
2248
|
required: !0
|
|
@@ -2245,7 +2252,7 @@ var us = 8, cs = {
|
|
|
2245
2252
|
minimum: 0,
|
|
2246
2253
|
default: 1
|
|
2247
2254
|
}
|
|
2248
|
-
},
|
|
2255
|
+
}, Ns = {
|
|
2249
2256
|
type: {
|
|
2250
2257
|
type: "projectionDefinition",
|
|
2251
2258
|
default: "mercator",
|
|
@@ -2258,7 +2265,7 @@ var us = 8, cs = {
|
|
|
2258
2265
|
]
|
|
2259
2266
|
}
|
|
2260
2267
|
}
|
|
2261
|
-
},
|
|
2268
|
+
}, js = [
|
|
2262
2269
|
"paint_fill",
|
|
2263
2270
|
"paint_line",
|
|
2264
2271
|
"paint_circle",
|
|
@@ -2269,7 +2276,7 @@ var us = 8, cs = {
|
|
|
2269
2276
|
"paint_hillshade",
|
|
2270
2277
|
"paint_color-relief",
|
|
2271
2278
|
"paint_background"
|
|
2272
|
-
],
|
|
2279
|
+
], Ds = {
|
|
2273
2280
|
"fill-antialias": {
|
|
2274
2281
|
type: "boolean",
|
|
2275
2282
|
default: !0,
|
|
@@ -2385,7 +2392,7 @@ var us = 8, cs = {
|
|
|
2385
2392
|
},
|
|
2386
2393
|
"property-type": "cross-faded-data-driven"
|
|
2387
2394
|
}
|
|
2388
|
-
},
|
|
2395
|
+
}, Us = {
|
|
2389
2396
|
"line-opacity": {
|
|
2390
2397
|
type: "number",
|
|
2391
2398
|
default: 1,
|
|
@@ -2577,7 +2584,7 @@ var us = 8, cs = {
|
|
|
2577
2584
|
},
|
|
2578
2585
|
"property-type": "color-ramp"
|
|
2579
2586
|
}
|
|
2580
|
-
},
|
|
2587
|
+
}, Bs = {
|
|
2581
2588
|
"circle-radius": {
|
|
2582
2589
|
type: "number",
|
|
2583
2590
|
default: 5,
|
|
@@ -2750,7 +2757,7 @@ var us = 8, cs = {
|
|
|
2750
2757
|
},
|
|
2751
2758
|
"property-type": "data-driven"
|
|
2752
2759
|
}
|
|
2753
|
-
},
|
|
2760
|
+
}, qs = {
|
|
2754
2761
|
"heatmap-radius": {
|
|
2755
2762
|
type: "number",
|
|
2756
2763
|
default: 30,
|
|
@@ -2841,7 +2848,7 @@ var us = 8, cs = {
|
|
|
2841
2848
|
},
|
|
2842
2849
|
"property-type": "data-constant"
|
|
2843
2850
|
}
|
|
2844
|
-
},
|
|
2851
|
+
}, Vs = {
|
|
2845
2852
|
"icon-opacity": {
|
|
2846
2853
|
type: "number",
|
|
2847
2854
|
default: 1,
|
|
@@ -3105,7 +3112,7 @@ var us = 8, cs = {
|
|
|
3105
3112
|
},
|
|
3106
3113
|
"property-type": "data-constant"
|
|
3107
3114
|
}
|
|
3108
|
-
},
|
|
3115
|
+
}, Gs = {
|
|
3109
3116
|
"raster-opacity": {
|
|
3110
3117
|
type: "number",
|
|
3111
3118
|
default: 1,
|
|
@@ -3234,7 +3241,7 @@ var us = 8, cs = {
|
|
|
3234
3241
|
},
|
|
3235
3242
|
"property-type": "data-constant"
|
|
3236
3243
|
}
|
|
3237
|
-
},
|
|
3244
|
+
}, Hs = {
|
|
3238
3245
|
"hillshade-illumination-direction": {
|
|
3239
3246
|
type: "numberArray",
|
|
3240
3247
|
default: 335,
|
|
@@ -3361,7 +3368,7 @@ var us = 8, cs = {
|
|
|
3361
3368
|
},
|
|
3362
3369
|
"property-type": "data-constant"
|
|
3363
3370
|
}
|
|
3364
|
-
},
|
|
3371
|
+
}, Ks = {
|
|
3365
3372
|
"background-color": {
|
|
3366
3373
|
type: "color",
|
|
3367
3374
|
default: "#000000",
|
|
@@ -3404,7 +3411,7 @@ var us = 8, cs = {
|
|
|
3404
3411
|
},
|
|
3405
3412
|
"property-type": "data-constant"
|
|
3406
3413
|
}
|
|
3407
|
-
},
|
|
3414
|
+
}, Zs = {
|
|
3408
3415
|
duration: {
|
|
3409
3416
|
type: "number",
|
|
3410
3417
|
default: 300,
|
|
@@ -3417,11 +3424,11 @@ var us = 8, cs = {
|
|
|
3417
3424
|
minimum: 0,
|
|
3418
3425
|
units: "milliseconds"
|
|
3419
3426
|
}
|
|
3420
|
-
},
|
|
3427
|
+
}, Xs = {
|
|
3421
3428
|
"*": {
|
|
3422
3429
|
type: "string"
|
|
3423
3430
|
}
|
|
3424
|
-
},
|
|
3431
|
+
}, Ws = {
|
|
3425
3432
|
type: "array",
|
|
3426
3433
|
value: "interpolation_name",
|
|
3427
3434
|
minimum: 1
|
|
@@ -3491,23 +3498,23 @@ var us = 8, cs = {
|
|
|
3491
3498
|
}
|
|
3492
3499
|
}
|
|
3493
3500
|
}
|
|
3494
|
-
},
|
|
3495
|
-
$version:
|
|
3496
|
-
$root:
|
|
3497
|
-
sources:
|
|
3498
|
-
source:
|
|
3499
|
-
source_vector:
|
|
3500
|
-
source_raster:
|
|
3501
|
-
source_raster_dem:
|
|
3502
|
-
source_geojson:
|
|
3503
|
-
source_video:
|
|
3504
|
-
source_image:
|
|
3505
|
-
layer:
|
|
3506
|
-
layout:
|
|
3507
|
-
layout_background:
|
|
3508
|
-
layout_fill:
|
|
3509
|
-
layout_circle:
|
|
3510
|
-
layout_heatmap:
|
|
3501
|
+
}, Js = {
|
|
3502
|
+
$version: cs,
|
|
3503
|
+
$root: ps,
|
|
3504
|
+
sources: fs,
|
|
3505
|
+
source: ds,
|
|
3506
|
+
source_vector: hs,
|
|
3507
|
+
source_raster: ms,
|
|
3508
|
+
source_raster_dem: ys,
|
|
3509
|
+
source_geojson: gs,
|
|
3510
|
+
source_video: vs,
|
|
3511
|
+
source_image: bs,
|
|
3512
|
+
layer: ws,
|
|
3513
|
+
layout: Ss,
|
|
3514
|
+
layout_background: xs,
|
|
3515
|
+
layout_fill: ks,
|
|
3516
|
+
layout_circle: Es,
|
|
3517
|
+
layout_heatmap: Ls,
|
|
3511
3518
|
"layout_fill-extrusion": {
|
|
3512
3519
|
visibility: {
|
|
3513
3520
|
type: "enum",
|
|
@@ -3525,10 +3532,10 @@ var us = 8, cs = {
|
|
|
3525
3532
|
"property-type": "data-constant"
|
|
3526
3533
|
}
|
|
3527
3534
|
},
|
|
3528
|
-
layout_line:
|
|
3529
|
-
layout_symbol:
|
|
3530
|
-
layout_raster:
|
|
3531
|
-
layout_hillshade:
|
|
3535
|
+
layout_line: Cs,
|
|
3536
|
+
layout_symbol: As,
|
|
3537
|
+
layout_raster: Ts,
|
|
3538
|
+
layout_hillshade: Is,
|
|
3532
3539
|
"layout_color-relief": {
|
|
3533
3540
|
visibility: {
|
|
3534
3541
|
type: "enum",
|
|
@@ -3546,9 +3553,9 @@ var us = 8, cs = {
|
|
|
3546
3553
|
"property-type": "data-constant"
|
|
3547
3554
|
}
|
|
3548
3555
|
},
|
|
3549
|
-
filter:
|
|
3550
|
-
filter_operator:
|
|
3551
|
-
geometry_type:
|
|
3556
|
+
filter: _s,
|
|
3557
|
+
filter_operator: Ms,
|
|
3558
|
+
geometry_type: Ps,
|
|
3552
3559
|
function: {
|
|
3553
3560
|
expression: {
|
|
3554
3561
|
type: "expression"
|
|
@@ -3590,14 +3597,14 @@ var us = 8, cs = {
|
|
|
3590
3597
|
required: !1
|
|
3591
3598
|
}
|
|
3592
3599
|
},
|
|
3593
|
-
function_stop:
|
|
3594
|
-
expression:
|
|
3595
|
-
light:
|
|
3596
|
-
sky:
|
|
3597
|
-
terrain:
|
|
3598
|
-
projection:
|
|
3599
|
-
paint:
|
|
3600
|
-
paint_fill:
|
|
3600
|
+
function_stop: Rs,
|
|
3601
|
+
expression: Os,
|
|
3602
|
+
light: zs,
|
|
3603
|
+
sky: Fs,
|
|
3604
|
+
terrain: $s,
|
|
3605
|
+
projection: Ns,
|
|
3606
|
+
paint: js,
|
|
3607
|
+
paint_fill: Ds,
|
|
3601
3608
|
"paint_fill-extrusion": {
|
|
3602
3609
|
"fill-extrusion-opacity": {
|
|
3603
3610
|
type: "number",
|
|
@@ -3728,12 +3735,12 @@ var us = 8, cs = {
|
|
|
3728
3735
|
"property-type": "data-constant"
|
|
3729
3736
|
}
|
|
3730
3737
|
},
|
|
3731
|
-
paint_line:
|
|
3732
|
-
paint_circle:
|
|
3733
|
-
paint_heatmap:
|
|
3734
|
-
paint_symbol:
|
|
3735
|
-
paint_raster:
|
|
3736
|
-
paint_hillshade:
|
|
3738
|
+
paint_line: Us,
|
|
3739
|
+
paint_circle: Bs,
|
|
3740
|
+
paint_heatmap: qs,
|
|
3741
|
+
paint_symbol: Vs,
|
|
3742
|
+
paint_raster: Gs,
|
|
3743
|
+
paint_hillshade: Hs,
|
|
3737
3744
|
"paint_color-relief": {
|
|
3738
3745
|
"color-relief-opacity": {
|
|
3739
3746
|
type: "number",
|
|
@@ -3776,8 +3783,8 @@ var us = 8, cs = {
|
|
|
3776
3783
|
"property-type": "data-constant"
|
|
3777
3784
|
}
|
|
3778
3785
|
},
|
|
3779
|
-
paint_background:
|
|
3780
|
-
transition:
|
|
3786
|
+
paint_background: Ks,
|
|
3787
|
+
transition: Zs,
|
|
3781
3788
|
"property-type": {
|
|
3782
3789
|
"data-driven": {
|
|
3783
3790
|
type: "property-type"
|
|
@@ -3798,8 +3805,8 @@ var us = 8, cs = {
|
|
|
3798
3805
|
type: "property-type"
|
|
3799
3806
|
}
|
|
3800
3807
|
},
|
|
3801
|
-
promoteId:
|
|
3802
|
-
interpolation:
|
|
3808
|
+
promoteId: Xs,
|
|
3809
|
+
interpolation: Ws,
|
|
3803
3810
|
interpolation_name: Ys
|
|
3804
3811
|
};
|
|
3805
3812
|
class w {
|
|
@@ -3818,14 +3825,14 @@ class ve extends Error {
|
|
|
3818
3825
|
super(t), this.message = t, this.key = e;
|
|
3819
3826
|
}
|
|
3820
3827
|
}
|
|
3821
|
-
class
|
|
3828
|
+
class hn {
|
|
3822
3829
|
constructor(e, t = []) {
|
|
3823
3830
|
this.parent = e, this.bindings = {};
|
|
3824
3831
|
for (const [n, a] of t)
|
|
3825
3832
|
this.bindings[n] = a;
|
|
3826
3833
|
}
|
|
3827
3834
|
concat(e) {
|
|
3828
|
-
return new
|
|
3835
|
+
return new hn(this, e);
|
|
3829
3836
|
}
|
|
3830
3837
|
get(e) {
|
|
3831
3838
|
if (this.bindings[e])
|
|
@@ -3840,7 +3847,7 @@ class dn {
|
|
|
3840
3847
|
}
|
|
3841
3848
|
const sr = { kind: "null" }, S = { kind: "number" }, I = { kind: "string" }, P = { kind: "boolean" }, be = { kind: "color" }, lr = {
|
|
3842
3849
|
kind: "projectionDefinition"
|
|
3843
|
-
}, qe = { kind: "object" }, M = { kind: "value" },
|
|
3850
|
+
}, qe = { kind: "object" }, M = { kind: "value" }, Qs = { kind: "error" }, ur = { kind: "collator" }, cr = { kind: "formatted" }, pr = { kind: "padding" }, gt = { kind: "colorArray" }, fr = { kind: "numberArray" }, It = { kind: "resolvedImage" }, dr = {
|
|
3844
3851
|
kind: "variableAnchorOffsetCollection"
|
|
3845
3852
|
};
|
|
3846
3853
|
function J(r, e) {
|
|
@@ -3857,7 +3864,7 @@ function D(r) {
|
|
|
3857
3864
|
} else
|
|
3858
3865
|
return r.kind;
|
|
3859
3866
|
}
|
|
3860
|
-
const
|
|
3867
|
+
const el = [
|
|
3861
3868
|
sr,
|
|
3862
3869
|
S,
|
|
3863
3870
|
I,
|
|
@@ -3883,14 +3890,14 @@ function vt(r, e) {
|
|
|
3883
3890
|
if (r.kind === e.kind)
|
|
3884
3891
|
return null;
|
|
3885
3892
|
if (r.kind === "value") {
|
|
3886
|
-
for (const t of
|
|
3893
|
+
for (const t of el)
|
|
3887
3894
|
if (!vt(t, e))
|
|
3888
3895
|
return null;
|
|
3889
3896
|
}
|
|
3890
3897
|
}
|
|
3891
3898
|
return `Expected ${D(r)} but found ${D(e)} instead.`;
|
|
3892
3899
|
}
|
|
3893
|
-
function
|
|
3900
|
+
function mn(r, e) {
|
|
3894
3901
|
return e.some((t) => t.kind === r.kind);
|
|
3895
3902
|
}
|
|
3896
3903
|
function Ve(r, e) {
|
|
@@ -3899,7 +3906,7 @@ function Ve(r, e) {
|
|
|
3899
3906
|
function Ae(r, e) {
|
|
3900
3907
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3901
3908
|
}
|
|
3902
|
-
const ei = 0.96422, ti = 1, ri = 0.82521, ni = 4 / 29, nt = 6 / 29, ai = 3 * nt * nt,
|
|
3909
|
+
const ei = 0.96422, ti = 1, ri = 0.82521, ni = 4 / 29, nt = 6 / 29, ai = 3 * nt * nt, tl = nt * nt * nt, rl = Math.PI / 180, nl = 180 / Math.PI;
|
|
3903
3910
|
function ii(r) {
|
|
3904
3911
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3905
3912
|
}
|
|
@@ -3915,7 +3922,7 @@ function Tr(r) {
|
|
|
3915
3922
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3916
3923
|
}
|
|
3917
3924
|
function Ir(r) {
|
|
3918
|
-
return r >
|
|
3925
|
+
return r > tl ? Math.pow(r, 1 / 3) : r / ai + ni;
|
|
3919
3926
|
}
|
|
3920
3927
|
function si([r, e, t, n]) {
|
|
3921
3928
|
let a = (r + 16) / 116, i = isNaN(e) ? a : a + e / 500, o = isNaN(t) ? a : a - t / 200;
|
|
@@ -3933,14 +3940,14 @@ function _r(r) {
|
|
|
3933
3940
|
function Mr(r) {
|
|
3934
3941
|
return r > nt ? r * r * r : ai * (r - ni);
|
|
3935
3942
|
}
|
|
3936
|
-
function
|
|
3943
|
+
function al(r) {
|
|
3937
3944
|
const [e, t, n, a] = oi(r), i = Math.sqrt(t * t + n * n);
|
|
3938
|
-
return [Math.round(i * 1e4) ? ii(Math.atan2(n, t) *
|
|
3939
|
-
}
|
|
3940
|
-
function al([r, e, t, n]) {
|
|
3941
|
-
return r = isNaN(r) ? 0 : r * tl, si([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3945
|
+
return [Math.round(i * 1e4) ? ii(Math.atan2(n, t) * nl) : NaN, i, e, a];
|
|
3942
3946
|
}
|
|
3943
3947
|
function il([r, e, t, n]) {
|
|
3948
|
+
return r = isNaN(r) ? 0 : r * rl, si([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3949
|
+
}
|
|
3950
|
+
function ol([r, e, t, n]) {
|
|
3944
3951
|
r = ii(r), e /= 100, t /= 100;
|
|
3945
3952
|
function a(i) {
|
|
3946
3953
|
const o = (i + r / 30) % 12, s = e * Math.min(t, 1 - t);
|
|
@@ -3948,16 +3955,16 @@ function il([r, e, t, n]) {
|
|
|
3948
3955
|
}
|
|
3949
3956
|
return [a(0), a(8), a(4), n];
|
|
3950
3957
|
}
|
|
3951
|
-
const
|
|
3958
|
+
const sl = Object.hasOwn || function(e, t) {
|
|
3952
3959
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
3953
3960
|
};
|
|
3954
3961
|
function ht(r, e) {
|
|
3955
|
-
return
|
|
3962
|
+
return sl(r, e) ? r[e] : void 0;
|
|
3956
3963
|
}
|
|
3957
|
-
function
|
|
3964
|
+
function ll(r) {
|
|
3958
3965
|
if (r = r.toLowerCase().trim(), r === "transparent")
|
|
3959
3966
|
return [0, 0, 0, 0];
|
|
3960
|
-
const e = ht(
|
|
3967
|
+
const e = ht(ul, r);
|
|
3961
3968
|
if (e) {
|
|
3962
3969
|
const [a, i, o] = e;
|
|
3963
3970
|
return [a / 255, i / 255, o / 255, 1];
|
|
@@ -4010,7 +4017,7 @@ function sl(r) {
|
|
|
4010
4017
|
et(+d / C, 0, 1),
|
|
4011
4018
|
g ? Yn(+g, b) : 1
|
|
4012
4019
|
];
|
|
4013
|
-
if (
|
|
4020
|
+
if (Jn(L))
|
|
4014
4021
|
return L;
|
|
4015
4022
|
}
|
|
4016
4023
|
}
|
|
@@ -4046,8 +4053,8 @@ function sl(r) {
|
|
|
4046
4053
|
et(+u, 0, 100),
|
|
4047
4054
|
p ? Yn(+p, f) : 1
|
|
4048
4055
|
];
|
|
4049
|
-
if (
|
|
4050
|
-
return
|
|
4056
|
+
if (Jn(h))
|
|
4057
|
+
return ol(h);
|
|
4051
4058
|
}
|
|
4052
4059
|
}
|
|
4053
4060
|
}
|
|
@@ -4060,10 +4067,10 @@ function Yn(r, e) {
|
|
|
4060
4067
|
function et(r, e, t) {
|
|
4061
4068
|
return Math.min(Math.max(e, r), t);
|
|
4062
4069
|
}
|
|
4063
|
-
function
|
|
4070
|
+
function Jn(r) {
|
|
4064
4071
|
return !r.some(Number.isNaN);
|
|
4065
4072
|
}
|
|
4066
|
-
const
|
|
4073
|
+
const ul = {
|
|
4067
4074
|
aliceblue: [240, 248, 255],
|
|
4068
4075
|
antiquewhite: [250, 235, 215],
|
|
4069
4076
|
aqua: [0, 255, 255],
|
|
@@ -4248,7 +4255,7 @@ class $ {
|
|
|
4248
4255
|
return e;
|
|
4249
4256
|
if (typeof e != "string")
|
|
4250
4257
|
return;
|
|
4251
|
-
const t =
|
|
4258
|
+
const t = ll(e);
|
|
4252
4259
|
if (t)
|
|
4253
4260
|
return new $(...t, !1);
|
|
4254
4261
|
}
|
|
@@ -4267,7 +4274,7 @@ class $ {
|
|
|
4267
4274
|
* @returns Gien color, with reversed alpha blending, in HCL color space.
|
|
4268
4275
|
*/
|
|
4269
4276
|
get hcl() {
|
|
4270
|
-
return this.overwriteGetter("hcl",
|
|
4277
|
+
return this.overwriteGetter("hcl", al(this.rgb));
|
|
4271
4278
|
}
|
|
4272
4279
|
/**
|
|
4273
4280
|
* Used in color interpolation.
|
|
@@ -4328,7 +4335,7 @@ class $ {
|
|
|
4328
4335
|
let x = u - i;
|
|
4329
4336
|
u > i && x > 180 ? x -= 360 : u < i && i - u > 180 && (x += 360), d = i + n * x;
|
|
4330
4337
|
} else isNaN(i) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = i, (p === 1 || p === 0) && (h = o));
|
|
4331
|
-
const [m, g, b, v] =
|
|
4338
|
+
const [m, g, b, v] = il([
|
|
4332
4339
|
d,
|
|
4333
4340
|
h ?? Ge(o, c, n),
|
|
4334
4341
|
Ge(s, p, n),
|
|
@@ -4347,7 +4354,7 @@ $.black = new $(0, 0, 0, 1);
|
|
|
4347
4354
|
$.white = new $(1, 1, 1, 1);
|
|
4348
4355
|
$.transparent = new $(0, 0, 0, 0);
|
|
4349
4356
|
$.red = new $(1, 0, 0, 1);
|
|
4350
|
-
class
|
|
4357
|
+
class yn {
|
|
4351
4358
|
constructor(e, t, n) {
|
|
4352
4359
|
e ? this.sensitivity = t ? "variant" : "case" : this.sensitivity = t ? "accent" : "base", this.locale = n, this.collator = new Intl.Collator(this.locale ? this.locale : [], {
|
|
4353
4360
|
sensitivity: this.sensitivity,
|
|
@@ -4361,7 +4368,7 @@ class mn {
|
|
|
4361
4368
|
return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
|
|
4362
4369
|
}
|
|
4363
4370
|
}
|
|
4364
|
-
const
|
|
4371
|
+
const cl = ["bottom", "center", "top"];
|
|
4365
4372
|
class Hr {
|
|
4366
4373
|
constructor(e, t, n, a, i, o) {
|
|
4367
4374
|
this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = i, this.verticalAlign = o;
|
|
@@ -4500,7 +4507,7 @@ class V extends Error {
|
|
|
4500
4507
|
return this.message;
|
|
4501
4508
|
}
|
|
4502
4509
|
}
|
|
4503
|
-
const
|
|
4510
|
+
const pl = /* @__PURE__ */ new Set([
|
|
4504
4511
|
"center",
|
|
4505
4512
|
"left",
|
|
4506
4513
|
"right",
|
|
@@ -4521,7 +4528,7 @@ class we {
|
|
|
4521
4528
|
if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
|
|
4522
4529
|
for (let t = 0; t < e.length; t += 2) {
|
|
4523
4530
|
const n = e[t], a = e[t + 1];
|
|
4524
|
-
if (typeof n != "string" || !
|
|
4531
|
+
if (typeof n != "string" || !pl.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
|
|
4525
4532
|
return;
|
|
4526
4533
|
}
|
|
4527
4534
|
return new we(e);
|
|
@@ -4578,7 +4585,7 @@ function li(r, e, t, n) {
|
|
|
4578
4585
|
return typeof r == "number" && r >= 0 && r <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof t == "number" && t >= 0 && t <= 255 ? typeof n > "u" || typeof n == "number" && n >= 0 && n <= 1 ? null : `Invalid rgba value [${[r, e, t, n].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof n == "number" ? [r, e, t, n] : [r, e, t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
|
|
4579
4586
|
}
|
|
4580
4587
|
function wt(r) {
|
|
4581
|
-
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof pe || r instanceof $ || r instanceof
|
|
4588
|
+
if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof pe || r instanceof $ || r instanceof yn || r instanceof Ee || r instanceof de || r instanceof he || r instanceof ie || r instanceof we || r instanceof je)
|
|
4582
4589
|
return !0;
|
|
4583
4590
|
if (Array.isArray(r)) {
|
|
4584
4591
|
for (const e of r)
|
|
@@ -4606,7 +4613,7 @@ function H(r) {
|
|
|
4606
4613
|
return be;
|
|
4607
4614
|
if (r instanceof pe)
|
|
4608
4615
|
return lr;
|
|
4609
|
-
if (r instanceof
|
|
4616
|
+
if (r instanceof yn)
|
|
4610
4617
|
return ur;
|
|
4611
4618
|
if (r instanceof Ee)
|
|
4612
4619
|
return cr;
|
|
@@ -4727,7 +4734,7 @@ class fe {
|
|
|
4727
4734
|
return this.args.every((e) => e.outputDefined());
|
|
4728
4735
|
}
|
|
4729
4736
|
}
|
|
4730
|
-
const
|
|
4737
|
+
const Qn = {
|
|
4731
4738
|
"to-boolean": P,
|
|
4732
4739
|
"to-color": be,
|
|
4733
4740
|
"to-number": S,
|
|
@@ -4741,11 +4748,11 @@ class Re {
|
|
|
4741
4748
|
if (e.length < 2)
|
|
4742
4749
|
return t.error("Expected at least one argument.");
|
|
4743
4750
|
const n = e[0];
|
|
4744
|
-
if (!
|
|
4751
|
+
if (!Qn[n])
|
|
4745
4752
|
throw new Error(`Can't parse ${n} as it is not part of the known types`);
|
|
4746
4753
|
if ((n === "to-boolean" || n === "to-string") && e.length !== 2)
|
|
4747
4754
|
return t.error("Expected one argument.");
|
|
4748
|
-
const a =
|
|
4755
|
+
const a = Qn[n], i = [];
|
|
4749
4756
|
for (let o = 1; o < e.length; o++) {
|
|
4750
4757
|
const s = t.parse(e[o], o, M);
|
|
4751
4758
|
if (!s)
|
|
@@ -4840,7 +4847,7 @@ class Re {
|
|
|
4840
4847
|
return this.args.every((e) => e.outputDefined());
|
|
4841
4848
|
}
|
|
4842
4849
|
}
|
|
4843
|
-
const
|
|
4850
|
+
const fl = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4844
4851
|
class ui {
|
|
4845
4852
|
constructor() {
|
|
4846
4853
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = /* @__PURE__ */ new Map(), this.availableImages = null, this.canonical = null;
|
|
@@ -4849,7 +4856,7 @@ class ui {
|
|
|
4849
4856
|
return this.feature && "id" in this.feature ? this.feature.id : null;
|
|
4850
4857
|
}
|
|
4851
4858
|
geometryType() {
|
|
4852
|
-
return this.feature ? typeof this.feature.type == "number" ?
|
|
4859
|
+
return this.feature ? typeof this.feature.type == "number" ? fl[this.feature.type] : this.feature.type : null;
|
|
4853
4860
|
}
|
|
4854
4861
|
geometry() {
|
|
4855
4862
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -4866,7 +4873,7 @@ class ui {
|
|
|
4866
4873
|
}
|
|
4867
4874
|
}
|
|
4868
4875
|
class hr {
|
|
4869
|
-
constructor(e, t, n = [], a, i = new
|
|
4876
|
+
constructor(e, t, n = [], a, i = new hn(), o = []) {
|
|
4870
4877
|
this.registry = e, this.path = n, this.key = n.map((s) => `[${s}]`).join(""), this.scope = i, this.errors = o, this.expectedType = a, this._isConstant = t;
|
|
4871
4878
|
}
|
|
4872
4879
|
/**
|
|
@@ -5005,7 +5012,7 @@ class yr {
|
|
|
5005
5012
|
return !1;
|
|
5006
5013
|
}
|
|
5007
5014
|
}
|
|
5008
|
-
class
|
|
5015
|
+
class gn {
|
|
5009
5016
|
constructor(e, t, n) {
|
|
5010
5017
|
this.type = e, this.index = t, this.input = n;
|
|
5011
5018
|
}
|
|
@@ -5016,7 +5023,7 @@ class yn {
|
|
|
5016
5023
|
if (!n || !a)
|
|
5017
5024
|
return null;
|
|
5018
5025
|
const i = a.type;
|
|
5019
|
-
return new
|
|
5026
|
+
return new gn(i.itemType, n, a);
|
|
5020
5027
|
}
|
|
5021
5028
|
evaluate(e) {
|
|
5022
5029
|
const t = this.index.evaluate(e), n = this.input.evaluate(e);
|
|
@@ -5035,7 +5042,7 @@ class yn {
|
|
|
5035
5042
|
return !1;
|
|
5036
5043
|
}
|
|
5037
5044
|
}
|
|
5038
|
-
class
|
|
5045
|
+
class vn {
|
|
5039
5046
|
constructor(e, t) {
|
|
5040
5047
|
this.type = P, this.needle = e, this.haystack = t;
|
|
5041
5048
|
}
|
|
@@ -5043,7 +5050,7 @@ class gn {
|
|
|
5043
5050
|
if (e.length !== 3)
|
|
5044
5051
|
return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
|
5045
5052
|
const n = t.parse(e[1], 1, M), a = t.parse(e[2], 2, M);
|
|
5046
|
-
return !n || !a ? null :
|
|
5053
|
+
return !n || !a ? null : mn(n.type, [P, I, S, sr, M]) ? new vn(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${D(n.type)} instead`);
|
|
5047
5054
|
}
|
|
5048
5055
|
evaluate(e) {
|
|
5049
5056
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
@@ -5072,7 +5079,7 @@ class Xt {
|
|
|
5072
5079
|
const n = t.parse(e[1], 1, M), a = t.parse(e[2], 2, M);
|
|
5073
5080
|
if (!n || !a)
|
|
5074
5081
|
return null;
|
|
5075
|
-
if (!
|
|
5082
|
+
if (!mn(n.type, [P, I, S, sr, M]))
|
|
5076
5083
|
return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${D(n.type)} instead`);
|
|
5077
5084
|
if (e.length === 4) {
|
|
5078
5085
|
const i = t.parse(e[3], 3, S);
|
|
@@ -5101,7 +5108,7 @@ class Xt {
|
|
|
5101
5108
|
return !1;
|
|
5102
5109
|
}
|
|
5103
5110
|
}
|
|
5104
|
-
class
|
|
5111
|
+
class bn {
|
|
5105
5112
|
constructor(e, t, n, a, i, o) {
|
|
5106
5113
|
this.inputType = e, this.type = t, this.input = n, this.cases = a, this.outputs = i, this.otherwise = o;
|
|
5107
5114
|
}
|
|
@@ -5144,7 +5151,7 @@ class vn {
|
|
|
5144
5151
|
if (!s)
|
|
5145
5152
|
return null;
|
|
5146
5153
|
const l = t.parse(e[e.length - 1], e.length - 1, a);
|
|
5147
|
-
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new
|
|
5154
|
+
return !l || s.type.kind !== "value" && t.concat(1).checkSubtype(n, s.type) ? null : new bn(n, a, s, i, o, l);
|
|
5148
5155
|
}
|
|
5149
5156
|
evaluate(e) {
|
|
5150
5157
|
const t = this.input.evaluate(e);
|
|
@@ -5157,7 +5164,7 @@ class vn {
|
|
|
5157
5164
|
return this.outputs.every((e) => e.outputDefined()) && this.otherwise.outputDefined();
|
|
5158
5165
|
}
|
|
5159
5166
|
}
|
|
5160
|
-
class
|
|
5167
|
+
class wn {
|
|
5161
5168
|
constructor(e, t, n) {
|
|
5162
5169
|
this.type = e, this.branches = t, this.otherwise = n;
|
|
5163
5170
|
}
|
|
@@ -5183,7 +5190,7 @@ class bn {
|
|
|
5183
5190
|
return null;
|
|
5184
5191
|
if (!n)
|
|
5185
5192
|
throw new Error("Can't infer output type");
|
|
5186
|
-
return new
|
|
5193
|
+
return new wn(n, a, i);
|
|
5187
5194
|
}
|
|
5188
5195
|
evaluate(e) {
|
|
5189
5196
|
for (const [t, n] of this.branches)
|
|
@@ -5200,7 +5207,7 @@ class bn {
|
|
|
5200
5207
|
return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
|
|
5201
5208
|
}
|
|
5202
5209
|
}
|
|
5203
|
-
class
|
|
5210
|
+
class Wt {
|
|
5204
5211
|
constructor(e, t, n, a) {
|
|
5205
5212
|
this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
|
|
5206
5213
|
}
|
|
@@ -5210,13 +5217,13 @@ class Yt {
|
|
|
5210
5217
|
const n = t.parse(e[1], 1, M), a = t.parse(e[2], 2, S);
|
|
5211
5218
|
if (!n || !a)
|
|
5212
5219
|
return null;
|
|
5213
|
-
if (!
|
|
5220
|
+
if (!mn(n.type, [J(M), I, M]))
|
|
5214
5221
|
return t.error(`Expected first argument to be of type array or string, but found ${D(n.type)} instead`);
|
|
5215
5222
|
if (e.length === 4) {
|
|
5216
5223
|
const i = t.parse(e[3], 3, S);
|
|
5217
|
-
return i ? new
|
|
5224
|
+
return i ? new Wt(n.type, n, a, i) : null;
|
|
5218
5225
|
} else
|
|
5219
|
-
return new
|
|
5226
|
+
return new Wt(n.type, n, a);
|
|
5220
5227
|
}
|
|
5221
5228
|
evaluate(e) {
|
|
5222
5229
|
const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
|
|
@@ -5300,13 +5307,13 @@ class gr {
|
|
|
5300
5307
|
return this.outputs.every((e) => e.outputDefined());
|
|
5301
5308
|
}
|
|
5302
5309
|
}
|
|
5303
|
-
function
|
|
5310
|
+
function dl(r) {
|
|
5304
5311
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
5305
5312
|
}
|
|
5306
|
-
var Pr,
|
|
5307
|
-
function
|
|
5308
|
-
if (
|
|
5309
|
-
|
|
5313
|
+
var Pr, ea;
|
|
5314
|
+
function hl() {
|
|
5315
|
+
if (ea) return Pr;
|
|
5316
|
+
ea = 1, Pr = r;
|
|
5310
5317
|
function r(e, t, n, a) {
|
|
5311
5318
|
this.cx = 3 * e, this.bx = 3 * (n - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * t, this.by = 3 * (a - t) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = t, this.p2x = n, this.p2y = a;
|
|
5312
5319
|
}
|
|
@@ -5340,7 +5347,7 @@ function dl() {
|
|
|
5340
5347
|
}
|
|
5341
5348
|
}, Pr;
|
|
5342
5349
|
}
|
|
5343
|
-
var
|
|
5350
|
+
var ml = hl(), yl = /* @__PURE__ */ dl(ml);
|
|
5344
5351
|
class Se {
|
|
5345
5352
|
constructor(e, t, n, a, i) {
|
|
5346
5353
|
this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
|
|
@@ -5355,7 +5362,7 @@ class Se {
|
|
|
5355
5362
|
i = Rr(t, 1, n, a);
|
|
5356
5363
|
else if (e.name === "cubic-bezier") {
|
|
5357
5364
|
const o = e.controlPoints;
|
|
5358
|
-
i = new
|
|
5365
|
+
i = new yl(o[0], o[1], o[2], o[3]).solve(Rr(t, 1, n, a));
|
|
5359
5366
|
}
|
|
5360
5367
|
return i;
|
|
5361
5368
|
}
|
|
@@ -5502,43 +5509,43 @@ class St {
|
|
|
5502
5509
|
return this.args.every((e) => e.outputDefined());
|
|
5503
5510
|
}
|
|
5504
5511
|
}
|
|
5505
|
-
function
|
|
5512
|
+
function ta(r, e) {
|
|
5506
5513
|
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";
|
|
5507
5514
|
}
|
|
5508
|
-
function
|
|
5515
|
+
function gl(r, e, t) {
|
|
5509
5516
|
return e === t;
|
|
5510
5517
|
}
|
|
5511
|
-
function
|
|
5518
|
+
function vl(r, e, t) {
|
|
5512
5519
|
return e !== t;
|
|
5513
5520
|
}
|
|
5514
|
-
function
|
|
5521
|
+
function bl(r, e, t) {
|
|
5515
5522
|
return e < t;
|
|
5516
5523
|
}
|
|
5517
|
-
function
|
|
5524
|
+
function wl(r, e, t) {
|
|
5518
5525
|
return e > t;
|
|
5519
5526
|
}
|
|
5520
|
-
function
|
|
5527
|
+
function Sl(r, e, t) {
|
|
5521
5528
|
return e <= t;
|
|
5522
5529
|
}
|
|
5523
|
-
function
|
|
5530
|
+
function xl(r, e, t) {
|
|
5524
5531
|
return e >= t;
|
|
5525
5532
|
}
|
|
5526
5533
|
function pi(r, e, t, n) {
|
|
5527
5534
|
return n.compare(e, t) === 0;
|
|
5528
5535
|
}
|
|
5529
|
-
function
|
|
5536
|
+
function kl(r, e, t, n) {
|
|
5530
5537
|
return !pi(r, e, t, n);
|
|
5531
5538
|
}
|
|
5532
|
-
function
|
|
5539
|
+
function El(r, e, t, n) {
|
|
5533
5540
|
return n.compare(e, t) < 0;
|
|
5534
5541
|
}
|
|
5535
|
-
function
|
|
5542
|
+
function Ll(r, e, t, n) {
|
|
5536
5543
|
return n.compare(e, t) > 0;
|
|
5537
5544
|
}
|
|
5538
|
-
function
|
|
5545
|
+
function Cl(r, e, t, n) {
|
|
5539
5546
|
return n.compare(e, t) <= 0;
|
|
5540
5547
|
}
|
|
5541
|
-
function
|
|
5548
|
+
function Al(r, e, t, n) {
|
|
5542
5549
|
return n.compare(e, t) >= 0;
|
|
5543
5550
|
}
|
|
5544
5551
|
function ut(r, e, t) {
|
|
@@ -5554,12 +5561,12 @@ function ut(r, e, t) {
|
|
|
5554
5561
|
let l = o.parse(i[1], 1, M);
|
|
5555
5562
|
if (!l)
|
|
5556
5563
|
return null;
|
|
5557
|
-
if (!
|
|
5564
|
+
if (!ta(s, l.type))
|
|
5558
5565
|
return o.concat(1).error(`"${s}" comparisons are not supported for type '${D(l.type)}'.`);
|
|
5559
5566
|
let u = o.parse(i[2], 2, M);
|
|
5560
5567
|
if (!u)
|
|
5561
5568
|
return null;
|
|
5562
|
-
if (!
|
|
5569
|
+
if (!ta(s, u.type))
|
|
5563
5570
|
return o.concat(2).error(`"${s}" comparisons are not supported for type '${D(u.type)}'.`);
|
|
5564
5571
|
if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
|
|
5565
5572
|
return o.error(`Cannot compare types '${D(l.type)}' and '${D(u.type)}'.`);
|
|
@@ -5595,7 +5602,7 @@ function ut(r, e, t) {
|
|
|
5595
5602
|
}
|
|
5596
5603
|
};
|
|
5597
5604
|
}
|
|
5598
|
-
const
|
|
5605
|
+
const Tl = ut("==", gl, pi), Il = ut("!=", vl, kl), _l = ut("<", bl, El), Ml = ut(">", wl, Ll), Pl = ut("<=", Sl, Cl), Rl = ut(">=", xl, Al);
|
|
5599
5606
|
class vr {
|
|
5600
5607
|
constructor(e, t, n) {
|
|
5601
5608
|
this.type = ur, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5616,7 +5623,7 @@ class vr {
|
|
|
5616
5623
|
return n.locale && (o = t.parse(n.locale, 1, I), !o) ? null : new vr(a, i, o);
|
|
5617
5624
|
}
|
|
5618
5625
|
evaluate(e) {
|
|
5619
|
-
return new
|
|
5626
|
+
return new yn(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
|
|
5620
5627
|
}
|
|
5621
5628
|
eachChild(e) {
|
|
5622
5629
|
e(this.caseSensitive), e(this.diacriticSensitive), this.locale && e(this.locale);
|
|
@@ -5625,7 +5632,7 @@ class vr {
|
|
|
5625
5632
|
return !1;
|
|
5626
5633
|
}
|
|
5627
5634
|
}
|
|
5628
|
-
class
|
|
5635
|
+
class Sn {
|
|
5629
5636
|
constructor(e, t, n, a, i, o) {
|
|
5630
5637
|
this.type = I, this.number = e, this.locale = t, this.currency = n, this.unit = a, this.minFractionDigits = i, this.maxFractionDigits = o;
|
|
5631
5638
|
}
|
|
@@ -5653,7 +5660,7 @@ class wn {
|
|
|
5653
5660
|
if (a["min-fraction-digits"] && (l = t.parse(a["min-fraction-digits"], 1, S), !l))
|
|
5654
5661
|
return null;
|
|
5655
5662
|
let u = null;
|
|
5656
|
-
return a["max-fraction-digits"] && (u = t.parse(a["max-fraction-digits"], 1, S), !u) ? null : new
|
|
5663
|
+
return a["max-fraction-digits"] && (u = t.parse(a["max-fraction-digits"], 1, S), !u) ? null : new Sn(n, i, o, s, l, u);
|
|
5657
5664
|
}
|
|
5658
5665
|
evaluate(e) {
|
|
5659
5666
|
return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
|
|
@@ -5671,7 +5678,7 @@ class wn {
|
|
|
5671
5678
|
return !1;
|
|
5672
5679
|
}
|
|
5673
5680
|
}
|
|
5674
|
-
class
|
|
5681
|
+
class xn {
|
|
5675
5682
|
constructor(e) {
|
|
5676
5683
|
this.type = cr, this.sections = e;
|
|
5677
5684
|
}
|
|
@@ -5698,7 +5705,7 @@ class Sn {
|
|
|
5698
5705
|
return null;
|
|
5699
5706
|
let p = null;
|
|
5700
5707
|
if (s["vertical-align"]) {
|
|
5701
|
-
if (typeof s["vertical-align"] == "string" && !
|
|
5708
|
+
if (typeof s["vertical-align"] == "string" && !cl.includes(s["vertical-align"]))
|
|
5702
5709
|
return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
|
|
5703
5710
|
if (p = t.parse(s["vertical-align"], 1, I), !p)
|
|
5704
5711
|
return null;
|
|
@@ -5721,7 +5728,7 @@ class Sn {
|
|
|
5721
5728
|
});
|
|
5722
5729
|
}
|
|
5723
5730
|
}
|
|
5724
|
-
return new
|
|
5731
|
+
return new xn(a);
|
|
5725
5732
|
}
|
|
5726
5733
|
evaluate(e) {
|
|
5727
5734
|
const t = (n) => {
|
|
@@ -5738,7 +5745,7 @@ class Sn {
|
|
|
5738
5745
|
return !1;
|
|
5739
5746
|
}
|
|
5740
5747
|
}
|
|
5741
|
-
class
|
|
5748
|
+
class kn {
|
|
5742
5749
|
constructor(e) {
|
|
5743
5750
|
this.type = It, this.input = e;
|
|
5744
5751
|
}
|
|
@@ -5746,7 +5753,7 @@ class xn {
|
|
|
5746
5753
|
if (e.length !== 2)
|
|
5747
5754
|
return t.error("Expected two arguments.");
|
|
5748
5755
|
const n = t.parse(e[1], 1, I);
|
|
5749
|
-
return n ? new
|
|
5756
|
+
return n ? new kn(n) : t.error("No image name provided.");
|
|
5750
5757
|
}
|
|
5751
5758
|
evaluate(e) {
|
|
5752
5759
|
const t = this.input.evaluate(e), n = je.fromString(t);
|
|
@@ -5759,7 +5766,7 @@ class xn {
|
|
|
5759
5766
|
return !1;
|
|
5760
5767
|
}
|
|
5761
5768
|
}
|
|
5762
|
-
class
|
|
5769
|
+
class En {
|
|
5763
5770
|
constructor(e) {
|
|
5764
5771
|
this.type = S, this.input = e;
|
|
5765
5772
|
}
|
|
@@ -5767,7 +5774,7 @@ class kn {
|
|
|
5767
5774
|
if (e.length !== 2)
|
|
5768
5775
|
return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
|
|
5769
5776
|
const n = t.parse(e[1], 1);
|
|
5770
|
-
return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${D(n.type)} instead.`) : new
|
|
5777
|
+
return n ? n.type.kind !== "array" && n.type.kind !== "string" && n.type.kind !== "value" ? t.error(`Expected argument of type string or array, but found ${D(n.type)} instead.`) : new En(n) : null;
|
|
5771
5778
|
}
|
|
5772
5779
|
evaluate(e) {
|
|
5773
5780
|
const t = this.input.evaluate(e);
|
|
@@ -5785,24 +5792,24 @@ class kn {
|
|
|
5785
5792
|
}
|
|
5786
5793
|
}
|
|
5787
5794
|
const xe = 8192;
|
|
5788
|
-
function
|
|
5789
|
-
const t =
|
|
5795
|
+
function Ol(r, e) {
|
|
5796
|
+
const t = zl(r[0]), n = $l(r[1]), a = Math.pow(2, e.z);
|
|
5790
5797
|
return [Math.round(t * a * xe), Math.round(n * a * xe)];
|
|
5791
5798
|
}
|
|
5792
|
-
function
|
|
5799
|
+
function Ln(r, e) {
|
|
5793
5800
|
const t = Math.pow(2, e.z), n = (r[0] / xe + e.x) / t, a = (r[1] / xe + e.y) / t;
|
|
5794
|
-
return [
|
|
5801
|
+
return [Fl(n), Nl(a)];
|
|
5795
5802
|
}
|
|
5796
|
-
function
|
|
5803
|
+
function zl(r) {
|
|
5797
5804
|
return (180 + r) / 360;
|
|
5798
5805
|
}
|
|
5799
|
-
function
|
|
5806
|
+
function Fl(r) {
|
|
5800
5807
|
return r * 360 - 180;
|
|
5801
5808
|
}
|
|
5802
|
-
function
|
|
5809
|
+
function $l(r) {
|
|
5803
5810
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
|
|
5804
5811
|
}
|
|
5805
|
-
function
|
|
5812
|
+
function Nl(r) {
|
|
5806
5813
|
return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
|
|
5807
5814
|
}
|
|
5808
5815
|
function _t(r, e) {
|
|
@@ -5811,18 +5818,18 @@ function _t(r, e) {
|
|
|
5811
5818
|
function xt(r, e) {
|
|
5812
5819
|
return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
|
|
5813
5820
|
}
|
|
5814
|
-
function
|
|
5821
|
+
function jl(r, e, t) {
|
|
5815
5822
|
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];
|
|
5816
5823
|
}
|
|
5817
|
-
function
|
|
5824
|
+
function Dl(r, e, t) {
|
|
5818
5825
|
const n = r[0] - e[0], a = r[1] - e[1], i = r[0] - t[0], o = r[1] - t[1];
|
|
5819
5826
|
return n * o - i * a === 0 && n * i <= 0 && a * o <= 0;
|
|
5820
5827
|
}
|
|
5821
5828
|
function br(r, e, t, n) {
|
|
5822
5829
|
const a = [e[0] - r[0], e[1] - r[1]], i = [n[0] - t[0], n[1] - t[1]];
|
|
5823
|
-
return
|
|
5830
|
+
return Vl(i, a) === 0 ? !1 : !!(ra(r, e, t, n) && ra(t, n, r, e));
|
|
5824
5831
|
}
|
|
5825
|
-
function
|
|
5832
|
+
function Ul(r, e, t) {
|
|
5826
5833
|
for (const n of t)
|
|
5827
5834
|
for (let a = 0; a < n.length - 1; ++a)
|
|
5828
5835
|
if (br(r, e, n[a], n[a + 1]))
|
|
@@ -5833,13 +5840,13 @@ function ct(r, e, t = !1) {
|
|
|
5833
5840
|
let n = !1;
|
|
5834
5841
|
for (const a of e)
|
|
5835
5842
|
for (let i = 0; i < a.length - 1; i++) {
|
|
5836
|
-
if (
|
|
5843
|
+
if (Dl(r, a[i], a[i + 1]))
|
|
5837
5844
|
return t;
|
|
5838
|
-
|
|
5845
|
+
jl(r, a[i], a[i + 1]) && (n = !n);
|
|
5839
5846
|
}
|
|
5840
5847
|
return n;
|
|
5841
5848
|
}
|
|
5842
|
-
function
|
|
5849
|
+
function Bl(r, e) {
|
|
5843
5850
|
for (const t of e)
|
|
5844
5851
|
if (ct(r, t))
|
|
5845
5852
|
return !0;
|
|
@@ -5850,29 +5857,29 @@ function di(r, e) {
|
|
|
5850
5857
|
if (!ct(t, e))
|
|
5851
5858
|
return !1;
|
|
5852
5859
|
for (let t = 0; t < r.length - 1; ++t)
|
|
5853
|
-
if (
|
|
5860
|
+
if (Ul(r[t], r[t + 1], e))
|
|
5854
5861
|
return !1;
|
|
5855
5862
|
return !0;
|
|
5856
5863
|
}
|
|
5857
|
-
function
|
|
5864
|
+
function ql(r, e) {
|
|
5858
5865
|
for (const t of e)
|
|
5859
5866
|
if (di(r, t))
|
|
5860
5867
|
return !0;
|
|
5861
5868
|
return !1;
|
|
5862
5869
|
}
|
|
5863
|
-
function
|
|
5870
|
+
function Vl(r, e) {
|
|
5864
5871
|
return r[0] * e[1] - r[1] * e[0];
|
|
5865
5872
|
}
|
|
5866
|
-
function
|
|
5873
|
+
function ra(r, e, t, n) {
|
|
5867
5874
|
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;
|
|
5868
5875
|
return c > 0 && p < 0 || c < 0 && p > 0;
|
|
5869
5876
|
}
|
|
5870
|
-
function
|
|
5877
|
+
function Cn(r, e, t) {
|
|
5871
5878
|
const n = [];
|
|
5872
5879
|
for (let a = 0; a < r.length; a++) {
|
|
5873
5880
|
const i = [];
|
|
5874
5881
|
for (let o = 0; o < r[a].length; o++) {
|
|
5875
|
-
const s =
|
|
5882
|
+
const s = Ol(r[a][o], t);
|
|
5876
5883
|
_t(e, s), i.push(s);
|
|
5877
5884
|
}
|
|
5878
5885
|
n.push(i);
|
|
@@ -5882,7 +5889,7 @@ function Ln(r, e, t) {
|
|
|
5882
5889
|
function hi(r, e, t) {
|
|
5883
5890
|
const n = [];
|
|
5884
5891
|
for (let a = 0; a < r.length; a++) {
|
|
5885
|
-
const i =
|
|
5892
|
+
const i = Cn(r[a], e, t);
|
|
5886
5893
|
n.push(i);
|
|
5887
5894
|
}
|
|
5888
5895
|
return n;
|
|
@@ -5895,10 +5902,10 @@ function mi(r, e, t, n) {
|
|
|
5895
5902
|
}
|
|
5896
5903
|
_t(e, r);
|
|
5897
5904
|
}
|
|
5898
|
-
function
|
|
5905
|
+
function Gl(r) {
|
|
5899
5906
|
r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
|
|
5900
5907
|
}
|
|
5901
|
-
function
|
|
5908
|
+
function na(r, e, t, n) {
|
|
5902
5909
|
const a = Math.pow(2, n.z) * xe, i = [n.x * xe, n.y * xe], o = [];
|
|
5903
5910
|
for (const s of r)
|
|
5904
5911
|
for (const l of s) {
|
|
@@ -5907,7 +5914,7 @@ function ra(r, e, t, n) {
|
|
|
5907
5914
|
}
|
|
5908
5915
|
return o;
|
|
5909
5916
|
}
|
|
5910
|
-
function
|
|
5917
|
+
function aa(r, e, t, n) {
|
|
5911
5918
|
const a = Math.pow(2, n.z) * xe, i = [n.x * xe, n.y * xe], o = [];
|
|
5912
5919
|
for (const s of r) {
|
|
5913
5920
|
const l = [];
|
|
@@ -5918,17 +5925,17 @@ function na(r, e, t, n) {
|
|
|
5918
5925
|
o.push(l);
|
|
5919
5926
|
}
|
|
5920
5927
|
if (e[2] - e[0] <= a / 2) {
|
|
5921
|
-
|
|
5928
|
+
Gl(e);
|
|
5922
5929
|
for (const s of o)
|
|
5923
5930
|
for (const l of s)
|
|
5924
5931
|
mi(l, e, t, a);
|
|
5925
5932
|
}
|
|
5926
5933
|
return o;
|
|
5927
5934
|
}
|
|
5928
|
-
function
|
|
5935
|
+
function Hl(r, e) {
|
|
5929
5936
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5930
5937
|
if (e.type === "Polygon") {
|
|
5931
|
-
const i =
|
|
5938
|
+
const i = Cn(e.coordinates, n, a), o = na(r.geometry(), t, n, a);
|
|
5932
5939
|
if (!xt(t, n))
|
|
5933
5940
|
return !1;
|
|
5934
5941
|
for (const s of o)
|
|
@@ -5936,19 +5943,19 @@ function Gl(r, e) {
|
|
|
5936
5943
|
return !1;
|
|
5937
5944
|
}
|
|
5938
5945
|
if (e.type === "MultiPolygon") {
|
|
5939
|
-
const i = hi(e.coordinates, n, a), o =
|
|
5946
|
+
const i = hi(e.coordinates, n, a), o = na(r.geometry(), t, n, a);
|
|
5940
5947
|
if (!xt(t, n))
|
|
5941
5948
|
return !1;
|
|
5942
5949
|
for (const s of o)
|
|
5943
|
-
if (!
|
|
5950
|
+
if (!Bl(s, i))
|
|
5944
5951
|
return !1;
|
|
5945
5952
|
}
|
|
5946
5953
|
return !0;
|
|
5947
5954
|
}
|
|
5948
|
-
function
|
|
5955
|
+
function Kl(r, e) {
|
|
5949
5956
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5950
5957
|
if (e.type === "Polygon") {
|
|
5951
|
-
const i =
|
|
5958
|
+
const i = Cn(e.coordinates, n, a), o = aa(r.geometry(), t, n, a);
|
|
5952
5959
|
if (!xt(t, n))
|
|
5953
5960
|
return !1;
|
|
5954
5961
|
for (const s of o)
|
|
@@ -5956,11 +5963,11 @@ function Hl(r, e) {
|
|
|
5956
5963
|
return !1;
|
|
5957
5964
|
}
|
|
5958
5965
|
if (e.type === "MultiPolygon") {
|
|
5959
|
-
const i = hi(e.coordinates, n, a), o =
|
|
5966
|
+
const i = hi(e.coordinates, n, a), o = aa(r.geometry(), t, n, a);
|
|
5960
5967
|
if (!xt(t, n))
|
|
5961
5968
|
return !1;
|
|
5962
5969
|
for (const s of o)
|
|
5963
|
-
if (!
|
|
5970
|
+
if (!ql(s, i))
|
|
5964
5971
|
return !1;
|
|
5965
5972
|
}
|
|
5966
5973
|
return !0;
|
|
@@ -5999,9 +6006,9 @@ class He {
|
|
|
5999
6006
|
evaluate(e) {
|
|
6000
6007
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6001
6008
|
if (e.geometryType() === "Point")
|
|
6002
|
-
return Gl(e, this.geometries);
|
|
6003
|
-
if (e.geometryType() === "LineString")
|
|
6004
6009
|
return Hl(e, this.geometries);
|
|
6010
|
+
if (e.geometryType() === "LineString")
|
|
6011
|
+
return Kl(e, this.geometries);
|
|
6005
6012
|
}
|
|
6006
6013
|
return !1;
|
|
6007
6014
|
}
|
|
@@ -6047,28 +6054,28 @@ class yi {
|
|
|
6047
6054
|
t[e] = i;
|
|
6048
6055
|
}
|
|
6049
6056
|
}
|
|
6050
|
-
function
|
|
6057
|
+
function Zl(r, e) {
|
|
6051
6058
|
if (r.length <= 1)
|
|
6052
6059
|
return [r];
|
|
6053
6060
|
const n = [];
|
|
6054
6061
|
let a, i;
|
|
6055
6062
|
for (const o of r) {
|
|
6056
|
-
const s =
|
|
6063
|
+
const s = Xl(o);
|
|
6057
6064
|
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));
|
|
6058
6065
|
}
|
|
6059
6066
|
return a && n.push(a), n;
|
|
6060
6067
|
}
|
|
6061
|
-
function
|
|
6068
|
+
function Xl(r) {
|
|
6062
6069
|
let e = 0;
|
|
6063
6070
|
for (let t = 0, n = r.length, a = n - 1, i, o; t < n; a = t++)
|
|
6064
6071
|
i = r[t], o = r[a], e += (o.x - i.x) * (i.y + o.y);
|
|
6065
6072
|
return e;
|
|
6066
6073
|
}
|
|
6067
|
-
const
|
|
6068
|
-
class
|
|
6074
|
+
const Wl = 6378.137, ia = 1 / 298.257223563, oa = ia * (2 - ia), sa = Math.PI / 180;
|
|
6075
|
+
class An {
|
|
6069
6076
|
constructor(e) {
|
|
6070
|
-
const t =
|
|
6071
|
-
this.kx = t * i * n, this.ky = t * i * a * (1 -
|
|
6077
|
+
const t = sa * Wl * 1e3, n = Math.cos(e * sa), a = 1 / (1 - oa * (1 - n * n)), i = Math.sqrt(a);
|
|
6078
|
+
this.kx = t * i * n, this.ky = t * i * a * (1 - oa);
|
|
6072
6079
|
}
|
|
6073
6080
|
/**
|
|
6074
6081
|
* Given two points of the form [longitude, latitude], returns the distance.
|
|
@@ -6122,7 +6129,7 @@ const Kr = 100, Zr = 50;
|
|
|
6122
6129
|
function gi(r, e) {
|
|
6123
6130
|
return e[0] - r[0];
|
|
6124
6131
|
}
|
|
6125
|
-
function
|
|
6132
|
+
function Yt(r) {
|
|
6126
6133
|
return r[1] - r[0] + 1;
|
|
6127
6134
|
}
|
|
6128
6135
|
function Ce(r, e) {
|
|
@@ -6131,7 +6138,7 @@ function Ce(r, e) {
|
|
|
6131
6138
|
function Xr(r, e) {
|
|
6132
6139
|
if (r[0] > r[1])
|
|
6133
6140
|
return [null, null];
|
|
6134
|
-
const t =
|
|
6141
|
+
const t = Yt(r);
|
|
6135
6142
|
if (e) {
|
|
6136
6143
|
if (t === 2)
|
|
6137
6144
|
return [r, null];
|
|
@@ -6149,7 +6156,7 @@ function Xr(r, e) {
|
|
|
6149
6156
|
[r[0] + n + 1, r[1]]
|
|
6150
6157
|
];
|
|
6151
6158
|
}
|
|
6152
|
-
function
|
|
6159
|
+
function Wr(r, e) {
|
|
6153
6160
|
if (!Ce(e, r.length))
|
|
6154
6161
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6155
6162
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
@@ -6157,18 +6164,18 @@ function Yr(r, e) {
|
|
|
6157
6164
|
_t(t, r[n]);
|
|
6158
6165
|
return t;
|
|
6159
6166
|
}
|
|
6160
|
-
function
|
|
6167
|
+
function Yr(r) {
|
|
6161
6168
|
const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6162
6169
|
for (const t of r)
|
|
6163
6170
|
for (const n of t)
|
|
6164
6171
|
_t(e, n);
|
|
6165
6172
|
return e;
|
|
6166
6173
|
}
|
|
6167
|
-
function
|
|
6174
|
+
function la(r) {
|
|
6168
6175
|
return r[0] !== -1 / 0 && r[1] !== -1 / 0 && r[2] !== 1 / 0 && r[3] !== 1 / 0;
|
|
6169
6176
|
}
|
|
6170
|
-
function
|
|
6171
|
-
if (!
|
|
6177
|
+
function Tn(r, e, t) {
|
|
6178
|
+
if (!la(r) || !la(e))
|
|
6172
6179
|
return NaN;
|
|
6173
6180
|
let n = 0, a = 0;
|
|
6174
6181
|
return r[2] < e[0] && (n = e[0] - r[2]), r[0] > e[2] && (n = r[0] - e[2]), r[1] > e[3] && (a = r[1] - e[3]), r[3] < e[1] && (a = e[1] - r[3]), t.distance([0, 0], [n, a]);
|
|
@@ -6177,7 +6184,7 @@ function Be(r, e, t) {
|
|
|
6177
6184
|
const n = t.pointOnLine(e, r);
|
|
6178
6185
|
return t.distance(r, n.point);
|
|
6179
6186
|
}
|
|
6180
|
-
function
|
|
6187
|
+
function In(r, e, t, n, a) {
|
|
6181
6188
|
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));
|
|
6182
6189
|
return Math.min(i, o);
|
|
6183
6190
|
}
|
|
@@ -6191,12 +6198,12 @@ function Yl(r, e, t, n, a) {
|
|
|
6191
6198
|
const p = t[c], f = t[c + 1];
|
|
6192
6199
|
if (br(l, u, p, f))
|
|
6193
6200
|
return 0;
|
|
6194
|
-
o = Math.min(o,
|
|
6201
|
+
o = Math.min(o, In(l, u, p, f, a));
|
|
6195
6202
|
}
|
|
6196
6203
|
}
|
|
6197
6204
|
return o;
|
|
6198
6205
|
}
|
|
6199
|
-
function
|
|
6206
|
+
function Jl(r, e, t, n, a) {
|
|
6200
6207
|
if (!(Ce(e, r.length) && Ce(n, t.length)))
|
|
6201
6208
|
return NaN;
|
|
6202
6209
|
let o = 1 / 0;
|
|
@@ -6206,7 +6213,7 @@ function Wl(r, e, t, n, a) {
|
|
|
6206
6213
|
return o;
|
|
6207
6214
|
return o;
|
|
6208
6215
|
}
|
|
6209
|
-
function
|
|
6216
|
+
function Ql(r, e, t) {
|
|
6210
6217
|
if (ct(r, e, !0))
|
|
6211
6218
|
return 0;
|
|
6212
6219
|
let n = 1 / 0;
|
|
@@ -6220,7 +6227,7 @@ function Jl(r, e, t) {
|
|
|
6220
6227
|
}
|
|
6221
6228
|
return n;
|
|
6222
6229
|
}
|
|
6223
|
-
function
|
|
6230
|
+
function eu(r, e, t, n) {
|
|
6224
6231
|
if (!Ce(e, r.length))
|
|
6225
6232
|
return NaN;
|
|
6226
6233
|
for (let i = e[0]; i <= e[1]; ++i)
|
|
@@ -6234,26 +6241,26 @@ function Ql(r, e, t, n) {
|
|
|
6234
6241
|
const f = l[p], d = l[u];
|
|
6235
6242
|
if (br(o, s, f, d))
|
|
6236
6243
|
return 0;
|
|
6237
|
-
a = Math.min(a,
|
|
6244
|
+
a = Math.min(a, In(o, s, f, d, n));
|
|
6238
6245
|
}
|
|
6239
6246
|
}
|
|
6240
6247
|
return a;
|
|
6241
6248
|
}
|
|
6242
|
-
function
|
|
6249
|
+
function ua(r, e) {
|
|
6243
6250
|
for (const t of r)
|
|
6244
6251
|
for (const n of t)
|
|
6245
6252
|
if (ct(n, e, !0))
|
|
6246
6253
|
return !0;
|
|
6247
6254
|
return !1;
|
|
6248
6255
|
}
|
|
6249
|
-
function
|
|
6250
|
-
const a =
|
|
6251
|
-
if (n !== 1 / 0 &&
|
|
6256
|
+
function tu(r, e, t, n = 1 / 0) {
|
|
6257
|
+
const a = Yr(r), i = Yr(e);
|
|
6258
|
+
if (n !== 1 / 0 && Tn(a, i, t) >= n)
|
|
6252
6259
|
return n;
|
|
6253
6260
|
if (xt(a, i)) {
|
|
6254
|
-
if (
|
|
6261
|
+
if (ua(r, e))
|
|
6255
6262
|
return 0;
|
|
6256
|
-
} else if (
|
|
6263
|
+
} else if (ua(e, r))
|
|
6257
6264
|
return 0;
|
|
6258
6265
|
let o = 1 / 0;
|
|
6259
6266
|
for (const s of r)
|
|
@@ -6264,50 +6271,50 @@ function eu(r, e, t, n = 1 / 0) {
|
|
|
6264
6271
|
const b = d[g], v = d[h];
|
|
6265
6272
|
if (br(p, f, b, v))
|
|
6266
6273
|
return 0;
|
|
6267
|
-
o = Math.min(o,
|
|
6274
|
+
o = Math.min(o, In(p, f, b, v, t));
|
|
6268
6275
|
}
|
|
6269
6276
|
}
|
|
6270
6277
|
return o;
|
|
6271
6278
|
}
|
|
6272
|
-
function
|
|
6279
|
+
function ca(r, e, t, n, a, i) {
|
|
6273
6280
|
if (!i)
|
|
6274
6281
|
return;
|
|
6275
|
-
const o =
|
|
6282
|
+
const o = Tn(Wr(n, i), a, t);
|
|
6276
6283
|
o < e && r.push([o, i, [0, 0]]);
|
|
6277
6284
|
}
|
|
6278
6285
|
function $t(r, e, t, n, a, i, o) {
|
|
6279
6286
|
if (!i || !o)
|
|
6280
6287
|
return;
|
|
6281
|
-
const s =
|
|
6288
|
+
const s = Tn(Wr(n, i), Wr(a, o), t);
|
|
6282
6289
|
s < e && r.push([s, i, o]);
|
|
6283
6290
|
}
|
|
6284
6291
|
function Jt(r, e, t, n, a = 1 / 0) {
|
|
6285
6292
|
let i = Math.min(n.distance(r[0], t[0][0]), a);
|
|
6286
6293
|
if (i === 0)
|
|
6287
6294
|
return i;
|
|
6288
|
-
const o = new yi([[0, [0, r.length - 1], [0, 0]]], gi), s =
|
|
6295
|
+
const o = new yi([[0, [0, r.length - 1], [0, 0]]], gi), s = Yr(t);
|
|
6289
6296
|
for (; o.length > 0; ) {
|
|
6290
6297
|
const l = o.pop();
|
|
6291
6298
|
if (l[0] >= i)
|
|
6292
6299
|
continue;
|
|
6293
6300
|
const u = l[1], c = e ? Zr : Kr;
|
|
6294
|
-
if (
|
|
6301
|
+
if (Yt(u) <= c) {
|
|
6295
6302
|
if (!Ce(u, r.length))
|
|
6296
6303
|
return NaN;
|
|
6297
6304
|
if (e) {
|
|
6298
|
-
const p =
|
|
6305
|
+
const p = eu(r, u, t, n);
|
|
6299
6306
|
if (isNaN(p) || p === 0)
|
|
6300
6307
|
return p;
|
|
6301
6308
|
i = Math.min(i, p);
|
|
6302
6309
|
} else
|
|
6303
6310
|
for (let p = u[0]; p <= u[1]; ++p) {
|
|
6304
|
-
const f =
|
|
6311
|
+
const f = Ql(r[p], t, n);
|
|
6305
6312
|
if (i = Math.min(i, f), i === 0)
|
|
6306
6313
|
return 0;
|
|
6307
6314
|
}
|
|
6308
6315
|
} else {
|
|
6309
6316
|
const p = Xr(u, e);
|
|
6310
|
-
|
|
6317
|
+
ca(o, i, n, r, s, p[0]), ca(o, i, n, r, s, p[1]);
|
|
6311
6318
|
}
|
|
6312
6319
|
}
|
|
6313
6320
|
return i;
|
|
@@ -6322,7 +6329,7 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6322
6329
|
if (l[0] >= o)
|
|
6323
6330
|
continue;
|
|
6324
6331
|
const u = l[1], c = l[2], p = e ? Zr : Kr, f = n ? Zr : Kr;
|
|
6325
|
-
if (
|
|
6332
|
+
if (Yt(u) <= p && Yt(c) <= f) {
|
|
6326
6333
|
if (!Ce(u, r.length) && Ce(c, t.length))
|
|
6327
6334
|
return NaN;
|
|
6328
6335
|
let d;
|
|
@@ -6339,7 +6346,7 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6339
6346
|
if (d = Be(r[m], h, a), o = Math.min(o, d), o === 0)
|
|
6340
6347
|
return o;
|
|
6341
6348
|
} else
|
|
6342
|
-
d =
|
|
6349
|
+
d = Jl(r, u, t, c, a), o = Math.min(o, d);
|
|
6343
6350
|
} else {
|
|
6344
6351
|
const d = Xr(u, e), h = Xr(c, n);
|
|
6345
6352
|
$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]);
|
|
@@ -6347,11 +6354,11 @@ function Qt(r, e, t, n, a, i = 1 / 0) {
|
|
|
6347
6354
|
}
|
|
6348
6355
|
return o;
|
|
6349
6356
|
}
|
|
6350
|
-
function
|
|
6351
|
-
const t = r.geometry(), n = t.flat().map((o) =>
|
|
6357
|
+
function ru(r, e) {
|
|
6358
|
+
const t = r.geometry(), n = t.flat().map((o) => Ln([o.x, o.y], r.canonical));
|
|
6352
6359
|
if (t.length === 0)
|
|
6353
6360
|
return NaN;
|
|
6354
|
-
const a = new
|
|
6361
|
+
const a = new An(n[0][1]);
|
|
6355
6362
|
let i = 1 / 0;
|
|
6356
6363
|
for (const o of e) {
|
|
6357
6364
|
switch (o.type) {
|
|
@@ -6370,11 +6377,11 @@ function tu(r, e) {
|
|
|
6370
6377
|
}
|
|
6371
6378
|
return i;
|
|
6372
6379
|
}
|
|
6373
|
-
function
|
|
6374
|
-
const t = r.geometry(), n = t.flat().map((o) =>
|
|
6380
|
+
function nu(r, e) {
|
|
6381
|
+
const t = r.geometry(), n = t.flat().map((o) => Ln([o.x, o.y], r.canonical));
|
|
6375
6382
|
if (t.length === 0)
|
|
6376
6383
|
return NaN;
|
|
6377
|
-
const a = new
|
|
6384
|
+
const a = new An(n[0][1]);
|
|
6378
6385
|
let i = 1 / 0;
|
|
6379
6386
|
for (const o of e) {
|
|
6380
6387
|
switch (o.type) {
|
|
@@ -6393,11 +6400,11 @@ function ru(r, e) {
|
|
|
6393
6400
|
}
|
|
6394
6401
|
return i;
|
|
6395
6402
|
}
|
|
6396
|
-
function
|
|
6403
|
+
function au(r, e) {
|
|
6397
6404
|
const t = r.geometry();
|
|
6398
6405
|
if (t.length === 0 || t[0].length === 0)
|
|
6399
6406
|
return NaN;
|
|
6400
|
-
const n =
|
|
6407
|
+
const n = Zl(t).map((o) => o.map((s) => s.map((l) => Ln([l.x, l.y], r.canonical)))), a = new An(n[0][0][0][1]);
|
|
6401
6408
|
let i = 1 / 0;
|
|
6402
6409
|
for (const o of e)
|
|
6403
6410
|
for (const s of n) {
|
|
@@ -6409,7 +6416,7 @@ function nu(r, e) {
|
|
|
6409
6416
|
i = Math.min(i, Jt(o.coordinates, !0, s, a, i));
|
|
6410
6417
|
break;
|
|
6411
6418
|
case "Polygon":
|
|
6412
|
-
i = Math.min(i,
|
|
6419
|
+
i = Math.min(i, tu(s, o.coordinates, a, i));
|
|
6413
6420
|
break;
|
|
6414
6421
|
}
|
|
6415
6422
|
if (i === 0)
|
|
@@ -6450,11 +6457,11 @@ class Ke {
|
|
|
6450
6457
|
evaluate(e) {
|
|
6451
6458
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6452
6459
|
if (e.geometryType() === "Point")
|
|
6453
|
-
return tu(e, this.geometries);
|
|
6454
|
-
if (e.geometryType() === "LineString")
|
|
6455
6460
|
return ru(e, this.geometries);
|
|
6456
|
-
if (e.geometryType() === "
|
|
6461
|
+
if (e.geometryType() === "LineString")
|
|
6457
6462
|
return nu(e, this.geometries);
|
|
6463
|
+
if (e.geometryType() === "Polygon")
|
|
6464
|
+
return au(e, this.geometries);
|
|
6458
6465
|
}
|
|
6459
6466
|
return NaN;
|
|
6460
6467
|
}
|
|
@@ -6485,35 +6492,35 @@ class Mt {
|
|
|
6485
6492
|
return !1;
|
|
6486
6493
|
}
|
|
6487
6494
|
}
|
|
6488
|
-
const
|
|
6495
|
+
const _n = {
|
|
6489
6496
|
// special forms
|
|
6490
|
-
"==":
|
|
6491
|
-
"!=":
|
|
6492
|
-
">":
|
|
6493
|
-
"<":
|
|
6494
|
-
">=":
|
|
6495
|
-
"<=":
|
|
6497
|
+
"==": Tl,
|
|
6498
|
+
"!=": Il,
|
|
6499
|
+
">": Ml,
|
|
6500
|
+
"<": _l,
|
|
6501
|
+
">=": Rl,
|
|
6502
|
+
"<=": Pl,
|
|
6496
6503
|
array: fe,
|
|
6497
|
-
at:
|
|
6504
|
+
at: gn,
|
|
6498
6505
|
boolean: fe,
|
|
6499
|
-
case:
|
|
6506
|
+
case: wn,
|
|
6500
6507
|
coalesce: St,
|
|
6501
6508
|
collator: vr,
|
|
6502
|
-
format:
|
|
6503
|
-
image:
|
|
6504
|
-
in:
|
|
6509
|
+
format: xn,
|
|
6510
|
+
image: kn,
|
|
6511
|
+
in: vn,
|
|
6505
6512
|
"index-of": Xt,
|
|
6506
6513
|
interpolate: Se,
|
|
6507
6514
|
"interpolate-hcl": Se,
|
|
6508
6515
|
"interpolate-lab": Se,
|
|
6509
|
-
length:
|
|
6516
|
+
length: En,
|
|
6510
6517
|
let: mr,
|
|
6511
6518
|
literal: ot,
|
|
6512
|
-
match:
|
|
6519
|
+
match: bn,
|
|
6513
6520
|
number: fe,
|
|
6514
|
-
"number-format":
|
|
6521
|
+
"number-format": Sn,
|
|
6515
6522
|
object: fe,
|
|
6516
|
-
slice:
|
|
6523
|
+
slice: Wt,
|
|
6517
6524
|
step: gr,
|
|
6518
6525
|
string: fe,
|
|
6519
6526
|
"to-boolean": Re,
|
|
@@ -6576,7 +6583,7 @@ class me {
|
|
|
6576
6583
|
if (s.length === 1)
|
|
6577
6584
|
t.errors.push(...l.errors);
|
|
6578
6585
|
else {
|
|
6579
|
-
const c = (s.length ? s : o).map(([f]) =>
|
|
6586
|
+
const c = (s.length ? s : o).map(([f]) => ou(f)).join(" | "), p = [];
|
|
6580
6587
|
for (let f = 1; f < e.length; f++) {
|
|
6581
6588
|
const d = t.parse(e[f], 1 + p.length);
|
|
6582
6589
|
if (!d)
|
|
@@ -6593,21 +6600,21 @@ class me {
|
|
|
6593
6600
|
e[n] = me;
|
|
6594
6601
|
}
|
|
6595
6602
|
}
|
|
6596
|
-
function
|
|
6603
|
+
function pa(r, [e, t, n, a]) {
|
|
6597
6604
|
e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
|
|
6598
6605
|
const i = a ? a.evaluate(r) : 1, o = li(e, t, n, i);
|
|
6599
6606
|
if (o)
|
|
6600
6607
|
throw new V(o);
|
|
6601
6608
|
return new $(e / 255, t / 255, n / 255, i, !1);
|
|
6602
6609
|
}
|
|
6603
|
-
function
|
|
6610
|
+
function fa(r, e) {
|
|
6604
6611
|
return r in e;
|
|
6605
6612
|
}
|
|
6606
6613
|
function zr(r, e) {
|
|
6607
6614
|
const t = e[r];
|
|
6608
6615
|
return typeof t > "u" ? null : t;
|
|
6609
6616
|
}
|
|
6610
|
-
function
|
|
6617
|
+
function iu(r, e, t, n) {
|
|
6611
6618
|
for (; t <= n; ) {
|
|
6612
6619
|
const a = t + n >> 1;
|
|
6613
6620
|
if (e[a] === r)
|
|
@@ -6619,9 +6626,9 @@ function au(r, e, t, n) {
|
|
|
6619
6626
|
function De(r) {
|
|
6620
6627
|
return { type: r };
|
|
6621
6628
|
}
|
|
6622
|
-
me.register(
|
|
6629
|
+
me.register(_n, {
|
|
6623
6630
|
error: [
|
|
6624
|
-
|
|
6631
|
+
Qs,
|
|
6625
6632
|
[I],
|
|
6626
6633
|
(r, [e]) => {
|
|
6627
6634
|
throw new V(e.evaluate(r));
|
|
@@ -6636,15 +6643,15 @@ me.register(In, {
|
|
|
6636
6643
|
return [t * 255, n * 255, a * 255, i];
|
|
6637
6644
|
}
|
|
6638
6645
|
],
|
|
6639
|
-
rgb: [be, [S, S, S],
|
|
6640
|
-
rgba: [be, [S, S, S, S],
|
|
6646
|
+
rgb: [be, [S, S, S], pa],
|
|
6647
|
+
rgba: [be, [S, S, S, S], pa],
|
|
6641
6648
|
has: {
|
|
6642
6649
|
type: P,
|
|
6643
6650
|
overloads: [
|
|
6644
|
-
[[I], (r, [e]) =>
|
|
6651
|
+
[[I], (r, [e]) => fa(e.evaluate(r), r.properties())],
|
|
6645
6652
|
[
|
|
6646
6653
|
[I, qe],
|
|
6647
|
-
(r, [e, t]) =>
|
|
6654
|
+
(r, [e, t]) => fa(e.evaluate(r), t.evaluate(r))
|
|
6648
6655
|
]
|
|
6649
6656
|
]
|
|
6650
6657
|
},
|
|
@@ -6840,7 +6847,7 @@ me.register(In, {
|
|
|
6840
6847
|
P,
|
|
6841
6848
|
[I, J(M)],
|
|
6842
6849
|
// assumes v is a array literal with values sorted in ascending order and of a single type
|
|
6843
|
-
(r, [e, t]) =>
|
|
6850
|
+
(r, [e, t]) => iu(r.properties()[e.value], t.value, 0, t.value.length - 1)
|
|
6844
6851
|
],
|
|
6845
6852
|
all: {
|
|
6846
6853
|
type: P,
|
|
@@ -6905,7 +6912,7 @@ me.register(In, {
|
|
|
6905
6912
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6906
6913
|
]
|
|
6907
6914
|
});
|
|
6908
|
-
function
|
|
6915
|
+
function ou(r) {
|
|
6909
6916
|
return Array.isArray(r) ? `(${r.map(D).join(", ")})` : `(${D(r.type)}...)`;
|
|
6910
6917
|
}
|
|
6911
6918
|
function er(r) {
|
|
@@ -6988,12 +6995,12 @@ function bi(r) {
|
|
|
6988
6995
|
function R(r) {
|
|
6989
6996
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
6990
6997
|
}
|
|
6991
|
-
function
|
|
6998
|
+
function Mn(r) {
|
|
6992
6999
|
return typeof r == "object" && r !== null && !Array.isArray(r) && H(r) === qe;
|
|
6993
7000
|
}
|
|
6994
|
-
class
|
|
7001
|
+
class su {
|
|
6995
7002
|
constructor(e, t, n) {
|
|
6996
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new ui(), this._defaultValue = t ?
|
|
7003
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new ui(), this._defaultValue = t ? cu(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null, this._globalState = n;
|
|
6997
7004
|
}
|
|
6998
7005
|
evaluateWithoutErrorHandling(e, t, n, a, i, o) {
|
|
6999
7006
|
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);
|
|
@@ -7013,15 +7020,15 @@ class ou {
|
|
|
7013
7020
|
}
|
|
7014
7021
|
}
|
|
7015
7022
|
function wi(r) {
|
|
7016
|
-
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in
|
|
7023
|
+
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in _n;
|
|
7017
7024
|
}
|
|
7018
7025
|
function Si(r, e, t) {
|
|
7019
|
-
const n = new hr(
|
|
7020
|
-
return a ? Jr(new
|
|
7026
|
+
const n = new hr(_n, er, [], e ? uu(e) : void 0), a = n.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
7027
|
+
return a ? Jr(new su(a, e, t)) : tt(n.errors);
|
|
7021
7028
|
}
|
|
7022
|
-
class
|
|
7029
|
+
class da {
|
|
7023
7030
|
constructor(e, t, n) {
|
|
7024
|
-
this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !kt(t.expression), this.globalStateRefs =
|
|
7031
|
+
this.kind = e, this._styleExpression = t, this.isStateDependent = e !== "constant" && !kt(t.expression), this.globalStateRefs = Pn(t.expression), this._globalState = n;
|
|
7025
7032
|
}
|
|
7026
7033
|
evaluateWithoutErrorHandling(e, t, n, a, i, o) {
|
|
7027
7034
|
return this._globalState && (e = st(e, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, i, o);
|
|
@@ -7030,9 +7037,9 @@ class fa {
|
|
|
7030
7037
|
return this._globalState && (e = st(e, this._globalState)), this._styleExpression.evaluate(e, t, n, a, i, o);
|
|
7031
7038
|
}
|
|
7032
7039
|
}
|
|
7033
|
-
class
|
|
7040
|
+
class ha {
|
|
7034
7041
|
constructor(e, t, n, a, i) {
|
|
7035
|
-
this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !kt(t.expression), this.globalStateRefs =
|
|
7042
|
+
this.kind = e, this.zoomStops = n, this._styleExpression = t, this.isStateDependent = e !== "camera" && !kt(t.expression), this.globalStateRefs = Pn(t.expression), this.interpolationType = a, this._globalState = i;
|
|
7036
7043
|
}
|
|
7037
7044
|
evaluateWithoutErrorHandling(e, t, n, a, i, o) {
|
|
7038
7045
|
return this._globalState && (e = st(e, this._globalState)), this._styleExpression.evaluateWithoutErrorHandling(e, t, n, a, i, o);
|
|
@@ -7044,7 +7051,7 @@ class da {
|
|
|
7044
7051
|
return this.interpolationType ? Se.interpolationFactor(this.interpolationType, e, t, n) : 0;
|
|
7045
7052
|
}
|
|
7046
7053
|
}
|
|
7047
|
-
function
|
|
7054
|
+
function lu(r, e, t) {
|
|
7048
7055
|
const n = Si(r, e, t);
|
|
7049
7056
|
if (n.result === "error")
|
|
7050
7057
|
return n;
|
|
@@ -7066,9 +7073,9 @@ function su(r, e, t) {
|
|
|
7066
7073
|
new ve("", '"interpolate" expressions cannot be used with this property')
|
|
7067
7074
|
]);
|
|
7068
7075
|
if (!s)
|
|
7069
|
-
return Jr(i ? new
|
|
7076
|
+
return Jr(i ? new da("constant", n.value, t) : new da("source", n.value, t));
|
|
7070
7077
|
const l = s instanceof Se ? s.interpolation : void 0;
|
|
7071
|
-
return Jr(i ? new
|
|
7078
|
+
return Jr(i ? new ha("camera", n.value, s.labels, l, t) : new ha("composite", n.value, s.labels, l, t));
|
|
7072
7079
|
}
|
|
7073
7080
|
function Vt(r) {
|
|
7074
7081
|
let e = null;
|
|
@@ -7084,12 +7091,12 @@ function Vt(r) {
|
|
|
7084
7091
|
n instanceof ve ? e = n : !e && n ? e = new ve("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : e && n && e !== n && (e = new ve("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
|
|
7085
7092
|
}), e;
|
|
7086
7093
|
}
|
|
7087
|
-
function
|
|
7094
|
+
function Pn(r, e = /* @__PURE__ */ new Set()) {
|
|
7088
7095
|
return r instanceof Mt && e.add(r.key), r.eachChild((t) => {
|
|
7089
|
-
|
|
7096
|
+
Pn(t, e);
|
|
7090
7097
|
}), e;
|
|
7091
7098
|
}
|
|
7092
|
-
function
|
|
7099
|
+
function uu(r) {
|
|
7093
7100
|
const e = {
|
|
7094
7101
|
color: be,
|
|
7095
7102
|
string: I,
|
|
@@ -7106,8 +7113,8 @@ function lu(r) {
|
|
|
7106
7113
|
};
|
|
7107
7114
|
return r.type === "array" ? J(e[r.value] || M, r.length) : e[r.type];
|
|
7108
7115
|
}
|
|
7109
|
-
function
|
|
7110
|
-
if (r.type === "color" &&
|
|
7116
|
+
function cu(r) {
|
|
7117
|
+
if (r.type === "color" && Mn(r.default))
|
|
7111
7118
|
return new $(0, 0, 0, 0);
|
|
7112
7119
|
switch (r.type) {
|
|
7113
7120
|
case "color":
|
|
@@ -7225,7 +7232,7 @@ function oe(r) {
|
|
|
7225
7232
|
a[c] || n[c].required && n[c].default === void 0 && t[c] === void 0 && l.push(new w(e, t, `missing required property "${c}"`));
|
|
7226
7233
|
return l;
|
|
7227
7234
|
}
|
|
7228
|
-
function
|
|
7235
|
+
function Rn(r) {
|
|
7229
7236
|
const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, i = r.styleSpec, o = r.key, s = r.arrayElementValidator || n;
|
|
7230
7237
|
if (R(e) !== "array")
|
|
7231
7238
|
return [new w(o, e, `array expected, ${R(e)} found`)];
|
|
@@ -7284,7 +7291,7 @@ function Ei(r) {
|
|
|
7284
7291
|
];
|
|
7285
7292
|
let g = [];
|
|
7286
7293
|
const b = m.value;
|
|
7287
|
-
return g = g.concat(
|
|
7294
|
+
return g = g.concat(Rn({
|
|
7288
7295
|
key: m.key,
|
|
7289
7296
|
value: b,
|
|
7290
7297
|
valueSpec: m.valueSpec,
|
|
@@ -7383,7 +7390,7 @@ function Ei(r) {
|
|
|
7383
7390
|
}
|
|
7384
7391
|
}
|
|
7385
7392
|
function lt(r) {
|
|
7386
|
-
const e = (r.expressionContext === "property" ?
|
|
7393
|
+
const e = (r.expressionContext === "property" ? lu : Si)(Xe(r.value), r.valueSpec);
|
|
7387
7394
|
if (e.result === "error")
|
|
7388
7395
|
return e.value.map((n) => new w(`${r.key}${n.key}`, r.value, n.message));
|
|
7389
7396
|
const t = e.value.expression || e.value._styleExpression.expression;
|
|
@@ -7411,7 +7418,7 @@ function lt(r) {
|
|
|
7411
7418
|
}
|
|
7412
7419
|
return [];
|
|
7413
7420
|
}
|
|
7414
|
-
function
|
|
7421
|
+
function pu(r) {
|
|
7415
7422
|
const e = r.value, t = r.key, n = R(e);
|
|
7416
7423
|
return n !== "boolean" ? [new w(t, e, `boolean expected, ${n} found`)] : [];
|
|
7417
7424
|
}
|
|
@@ -7423,7 +7430,7 @@ function Et(r) {
|
|
|
7423
7430
|
const e = r.key, t = r.value, n = r.valueSpec, a = [];
|
|
7424
7431
|
return Array.isArray(n.values) ? n.values.indexOf(G(t)) === -1 && a.push(new w(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(G(t)) === -1 && a.push(new w(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
7425
7432
|
}
|
|
7426
|
-
function
|
|
7433
|
+
function On(r) {
|
|
7427
7434
|
return xi(Xe(r.value)) ? lt(Zt({}, r, {
|
|
7428
7435
|
expressionContext: "filter",
|
|
7429
7436
|
valueSpec: { value: "boolean" }
|
|
@@ -7507,7 +7514,7 @@ function Ci(r, e) {
|
|
|
7507
7514
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)
|
|
7508
7515
|
];
|
|
7509
7516
|
const f = [];
|
|
7510
|
-
return r.layerType === "symbol" && s === "text-font" &&
|
|
7517
|
+
return r.layerType === "symbol" && s === "text-font" && Mn(Xe(o)) && G(o.type) === "identity" && f.push(new w(t, o, '"text-font" does not support identity functions')), f.concat(n({
|
|
7511
7518
|
key: r.key,
|
|
7512
7519
|
value: o,
|
|
7513
7520
|
valueSpec: c,
|
|
@@ -7580,7 +7587,7 @@ function Ii(r) {
|
|
|
7580
7587
|
objectKey: "type"
|
|
7581
7588
|
});
|
|
7582
7589
|
},
|
|
7583
|
-
filter:
|
|
7590
|
+
filter: On,
|
|
7584
7591
|
layout(c) {
|
|
7585
7592
|
return oe({
|
|
7586
7593
|
layer: a,
|
|
@@ -7618,7 +7625,7 @@ function $e(r) {
|
|
|
7618
7625
|
const e = r.value, t = r.key, n = R(e);
|
|
7619
7626
|
return n !== "string" ? [new w(t, e, `string expected, ${n} found`)] : [];
|
|
7620
7627
|
}
|
|
7621
|
-
function
|
|
7628
|
+
function fu(r) {
|
|
7622
7629
|
var e;
|
|
7623
7630
|
const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, i = a.source_raster_dem, o = r.style;
|
|
7624
7631
|
let s = [];
|
|
@@ -7639,8 +7646,8 @@ function pu(r) {
|
|
|
7639
7646
|
})) : s.push(new w(d, n[d], `unknown property "${d}"`));
|
|
7640
7647
|
return s;
|
|
7641
7648
|
}
|
|
7642
|
-
const
|
|
7643
|
-
promoteId:
|
|
7649
|
+
const ma = {
|
|
7650
|
+
promoteId: du
|
|
7644
7651
|
};
|
|
7645
7652
|
function _i(r) {
|
|
7646
7653
|
const e = r.value, t = r.key, n = r.styleSpec, a = r.style, i = r.validateSpec;
|
|
@@ -7657,11 +7664,11 @@ function _i(r) {
|
|
|
7657
7664
|
valueSpec: n[`source_${o.replace("-", "_")}`],
|
|
7658
7665
|
style: r.style,
|
|
7659
7666
|
styleSpec: n,
|
|
7660
|
-
objectElementValidators:
|
|
7667
|
+
objectElementValidators: ma,
|
|
7661
7668
|
validateSpec: i
|
|
7662
7669
|
}), s;
|
|
7663
7670
|
case "raster-dem":
|
|
7664
|
-
return s =
|
|
7671
|
+
return s = fu({
|
|
7665
7672
|
sourceName: t,
|
|
7666
7673
|
value: e,
|
|
7667
7674
|
style: r.style,
|
|
@@ -7676,7 +7683,7 @@ function _i(r) {
|
|
|
7676
7683
|
style: a,
|
|
7677
7684
|
styleSpec: n,
|
|
7678
7685
|
validateSpec: i,
|
|
7679
|
-
objectElementValidators:
|
|
7686
|
+
objectElementValidators: ma
|
|
7680
7687
|
}), e.cluster)
|
|
7681
7688
|
for (const l in e.clusterProperties) {
|
|
7682
7689
|
const [u, c] = e.clusterProperties[l], p = typeof u == "string" ? [u, ["accumulated"], ["get", l]] : u;
|
|
@@ -7723,7 +7730,7 @@ function _i(r) {
|
|
|
7723
7730
|
});
|
|
7724
7731
|
}
|
|
7725
7732
|
}
|
|
7726
|
-
function
|
|
7733
|
+
function du({ key: r, value: e }) {
|
|
7727
7734
|
if (R(e) === "string")
|
|
7728
7735
|
return $e({ key: r, value: e });
|
|
7729
7736
|
{
|
|
@@ -7807,13 +7814,13 @@ function Ri(r) {
|
|
|
7807
7814
|
]);
|
|
7808
7815
|
return i;
|
|
7809
7816
|
}
|
|
7810
|
-
function du(r) {
|
|
7811
|
-
return $e(r).length === 0 ? [] : lt(r);
|
|
7812
|
-
}
|
|
7813
7817
|
function hu(r) {
|
|
7814
7818
|
return $e(r).length === 0 ? [] : lt(r);
|
|
7815
7819
|
}
|
|
7816
7820
|
function mu(r) {
|
|
7821
|
+
return $e(r).length === 0 ? [] : lt(r);
|
|
7822
|
+
}
|
|
7823
|
+
function yu(r) {
|
|
7817
7824
|
const e = r.key, t = r.value;
|
|
7818
7825
|
if (R(t) === "array") {
|
|
7819
7826
|
if (t.length < 1 || t.length > 4)
|
|
@@ -7839,7 +7846,7 @@ function mu(r) {
|
|
|
7839
7846
|
valueSpec: {}
|
|
7840
7847
|
});
|
|
7841
7848
|
}
|
|
7842
|
-
function
|
|
7849
|
+
function gu(r) {
|
|
7843
7850
|
const e = r.key, t = r.value;
|
|
7844
7851
|
if (R(t) === "array") {
|
|
7845
7852
|
const a = {
|
|
@@ -7865,7 +7872,7 @@ function yu(r) {
|
|
|
7865
7872
|
valueSpec: {}
|
|
7866
7873
|
});
|
|
7867
7874
|
}
|
|
7868
|
-
function
|
|
7875
|
+
function vu(r) {
|
|
7869
7876
|
const e = r.key, t = r.value;
|
|
7870
7877
|
if (R(t) === "array") {
|
|
7871
7878
|
if (t.length < 1)
|
|
@@ -7885,7 +7892,7 @@ function gu(r) {
|
|
|
7885
7892
|
value: t
|
|
7886
7893
|
});
|
|
7887
7894
|
}
|
|
7888
|
-
function
|
|
7895
|
+
function bu(r) {
|
|
7889
7896
|
const e = r.key, t = r.value, n = R(t), a = r.styleSpec;
|
|
7890
7897
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
|
|
7891
7898
|
return [
|
|
@@ -7897,7 +7904,7 @@ function vu(r) {
|
|
|
7897
7904
|
key: `${e}[${o}]`,
|
|
7898
7905
|
value: t[o],
|
|
7899
7906
|
valueSpec: a.layout_symbol["text-anchor"]
|
|
7900
|
-
})), i = i.concat(
|
|
7907
|
+
})), i = i.concat(Rn({
|
|
7901
7908
|
key: `${e}[${o + 1}]`,
|
|
7902
7909
|
value: t[o + 1],
|
|
7903
7910
|
valueSpec: {
|
|
@@ -7941,7 +7948,7 @@ function Oi(r) {
|
|
|
7941
7948
|
value: t
|
|
7942
7949
|
});
|
|
7943
7950
|
}
|
|
7944
|
-
function
|
|
7951
|
+
function wu(r) {
|
|
7945
7952
|
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, i = R(e);
|
|
7946
7953
|
if (e === void 0)
|
|
7947
7954
|
return [];
|
|
@@ -7962,21 +7969,21 @@ function bu(r) {
|
|
|
7962
7969
|
]);
|
|
7963
7970
|
return o;
|
|
7964
7971
|
}
|
|
7965
|
-
function
|
|
7972
|
+
function Su(r) {
|
|
7966
7973
|
const e = r.key;
|
|
7967
7974
|
let t = r.value;
|
|
7968
7975
|
t = t instanceof String ? t.valueOf() : t;
|
|
7969
7976
|
const n = R(t);
|
|
7970
|
-
return n === "array" && !
|
|
7977
|
+
return n === "array" && !ku(t) && !xu(t) ? [
|
|
7971
7978
|
new w(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)
|
|
7972
7979
|
] : ["array", "string"].includes(n) ? [] : [
|
|
7973
7980
|
new w(e, t, `projection expected, invalid type "${n}" found`)
|
|
7974
7981
|
];
|
|
7975
7982
|
}
|
|
7976
|
-
function
|
|
7983
|
+
function xu(r) {
|
|
7977
7984
|
return !!["interpolate", "step", "literal"].includes(r[0]);
|
|
7978
7985
|
}
|
|
7979
|
-
function
|
|
7986
|
+
function ku(r) {
|
|
7980
7987
|
return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
|
|
7981
7988
|
}
|
|
7982
7989
|
function zi(r) {
|
|
@@ -7987,7 +7994,7 @@ function Fi(r) {
|
|
|
7987
7994
|
new w(r.key, r.value, `object expected, ${R(r.value)} found`)
|
|
7988
7995
|
];
|
|
7989
7996
|
}
|
|
7990
|
-
function
|
|
7997
|
+
function Eu(r) {
|
|
7991
7998
|
const e = r.key, t = r.value, n = r.validateSpec, a = r.styleSpec, i = r.style;
|
|
7992
7999
|
if (!zi(t))
|
|
7993
8000
|
return [new w(e, t, `object expected, ${R(t)} found`)];
|
|
@@ -8024,17 +8031,17 @@ function ku(r) {
|
|
|
8024
8031
|
}
|
|
8025
8032
|
return o;
|
|
8026
8033
|
}
|
|
8027
|
-
const
|
|
8034
|
+
const ya = {
|
|
8028
8035
|
"*"() {
|
|
8029
8036
|
return [];
|
|
8030
8037
|
},
|
|
8031
|
-
array:
|
|
8032
|
-
boolean:
|
|
8038
|
+
array: Rn,
|
|
8039
|
+
boolean: pu,
|
|
8033
8040
|
number: xr,
|
|
8034
8041
|
color: Qr,
|
|
8035
8042
|
constants: ki,
|
|
8036
8043
|
enum: Et,
|
|
8037
|
-
filter:
|
|
8044
|
+
filter: On,
|
|
8038
8045
|
function: Ei,
|
|
8039
8046
|
layer: Ii,
|
|
8040
8047
|
object: oe,
|
|
@@ -8042,22 +8049,22 @@ const ma = {
|
|
|
8042
8049
|
light: Mi,
|
|
8043
8050
|
sky: Pi,
|
|
8044
8051
|
terrain: Ri,
|
|
8045
|
-
projection:
|
|
8046
|
-
projectionDefinition:
|
|
8052
|
+
projection: wu,
|
|
8053
|
+
projectionDefinition: Su,
|
|
8047
8054
|
string: $e,
|
|
8048
|
-
formatted:
|
|
8049
|
-
resolvedImage:
|
|
8050
|
-
padding:
|
|
8051
|
-
numberArray:
|
|
8052
|
-
colorArray:
|
|
8053
|
-
variableAnchorOffsetCollection:
|
|
8055
|
+
formatted: hu,
|
|
8056
|
+
resolvedImage: mu,
|
|
8057
|
+
padding: yu,
|
|
8058
|
+
numberArray: gu,
|
|
8059
|
+
colorArray: vu,
|
|
8060
|
+
variableAnchorOffsetCollection: bu,
|
|
8054
8061
|
sprite: Oi,
|
|
8055
8062
|
state: Fi,
|
|
8056
|
-
fontFaces:
|
|
8063
|
+
fontFaces: Eu
|
|
8057
8064
|
};
|
|
8058
8065
|
function rr(r) {
|
|
8059
8066
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
8060
|
-
return r.validateSpec = rr, t.expression &&
|
|
8067
|
+
return r.validateSpec = rr, t.expression && Mn(G(e)) ? Ei(r) : t.expression && wi(Xe(e)) ? lt(r) : t.type && ya[t.type] ? ya[t.type](r) : oe(Zt({}, r, {
|
|
8061
8068
|
valueSpec: t.type ? n[t.type] : t
|
|
8062
8069
|
}));
|
|
8063
8070
|
}
|
|
@@ -8065,7 +8072,7 @@ function $i(r) {
|
|
|
8065
8072
|
const e = r.value, t = r.key, n = $e(r);
|
|
8066
8073
|
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;
|
|
8067
8074
|
}
|
|
8068
|
-
function se(r, e =
|
|
8075
|
+
function se(r, e = Js) {
|
|
8069
8076
|
let t = [];
|
|
8070
8077
|
return t = t.concat(rr({
|
|
8071
8078
|
key: "",
|
|
@@ -8093,7 +8100,7 @@ se.sky = ge(ye(Pi));
|
|
|
8093
8100
|
se.terrain = ge(ye(Ri));
|
|
8094
8101
|
se.state = ge(ye(Fi));
|
|
8095
8102
|
se.layer = ge(ye(Ii));
|
|
8096
|
-
se.filter = ge(ye(
|
|
8103
|
+
se.filter = ge(ye(On));
|
|
8097
8104
|
se.paintProperty = ge(ye(Ai));
|
|
8098
8105
|
se.layoutProperty = ge(ye(Ti));
|
|
8099
8106
|
function ye(r) {
|
|
@@ -8109,7 +8116,7 @@ function ge(r) {
|
|
|
8109
8116
|
return Ni(r.apply(this, e));
|
|
8110
8117
|
};
|
|
8111
8118
|
}
|
|
8112
|
-
function
|
|
8119
|
+
function ga(r) {
|
|
8113
8120
|
if (!r)
|
|
8114
8121
|
return {
|
|
8115
8122
|
style: dt[Cr[0].referenceStyleID].getDefaultVariant().getExpandedStyleURL(),
|
|
@@ -8118,7 +8125,7 @@ function ya(r) {
|
|
|
8118
8125
|
isFallback: !0
|
|
8119
8126
|
};
|
|
8120
8127
|
if (typeof r == "string") {
|
|
8121
|
-
const t =
|
|
8128
|
+
const t = Cu(r);
|
|
8122
8129
|
return t.isValidStyle ? {
|
|
8123
8130
|
style: t.styleObject,
|
|
8124
8131
|
requiresUrlMonitoring: !1,
|
|
@@ -8129,7 +8136,7 @@ function ya(r) {
|
|
|
8129
8136
|
// default styles don't require URL monitoring
|
|
8130
8137
|
isFallback: !0
|
|
8131
8138
|
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
|
|
8132
|
-
style:
|
|
8139
|
+
style: Lu(r),
|
|
8133
8140
|
requiresUrlMonitoring: !0,
|
|
8134
8141
|
isFallback: !1
|
|
8135
8142
|
} : {
|
|
@@ -8158,14 +8165,14 @@ function ya(r) {
|
|
|
8158
8165
|
isFallback: !0
|
|
8159
8166
|
};
|
|
8160
8167
|
}
|
|
8161
|
-
function
|
|
8168
|
+
function Lu(r) {
|
|
8162
8169
|
try {
|
|
8163
8170
|
return new URL(r).href;
|
|
8164
8171
|
} catch {
|
|
8165
8172
|
}
|
|
8166
8173
|
return new URL(r, location.origin).href;
|
|
8167
8174
|
}
|
|
8168
|
-
function
|
|
8175
|
+
function Cu(r) {
|
|
8169
8176
|
try {
|
|
8170
8177
|
const e = JSON.parse(r), t = se(e);
|
|
8171
8178
|
return {
|
|
@@ -8188,7 +8195,7 @@ function Le(r, e, t) {
|
|
|
8188
8195
|
function Lt(r) {
|
|
8189
8196
|
r.parentNode && r.parentNode.removeChild(r);
|
|
8190
8197
|
}
|
|
8191
|
-
class
|
|
8198
|
+
class Au {
|
|
8192
8199
|
constructor() {
|
|
8193
8200
|
y(this, "_map");
|
|
8194
8201
|
y(this, "_container");
|
|
@@ -8211,7 +8218,7 @@ class Cu {
|
|
|
8211
8218
|
function ji(r) {
|
|
8212
8219
|
r.hasTerrain() ? r.disableTerrain() : r.enableTerrain();
|
|
8213
8220
|
}
|
|
8214
|
-
class
|
|
8221
|
+
class Tu extends Ya {
|
|
8215
8222
|
constructor(t = {}) {
|
|
8216
8223
|
super({
|
|
8217
8224
|
showCompass: t.showCompass ?? !0,
|
|
@@ -8237,11 +8244,11 @@ class Au extends Wa {
|
|
|
8237
8244
|
return a.clickFunction = n, a;
|
|
8238
8245
|
}
|
|
8239
8246
|
}
|
|
8240
|
-
const
|
|
8241
|
-
class
|
|
8247
|
+
const va = k.Marker, ba = k.LngLat, Iu = k.LngLatBounds;
|
|
8248
|
+
class _u extends Do {
|
|
8242
8249
|
constructor() {
|
|
8243
8250
|
super(...arguments);
|
|
8244
|
-
y(this, "lastUpdatedCenter", new
|
|
8251
|
+
y(this, "lastUpdatedCenter", new ba(0, 0));
|
|
8245
8252
|
/**
|
|
8246
8253
|
* Update the camera location to center on the current position
|
|
8247
8254
|
*
|
|
@@ -8250,12 +8257,12 @@ class Iu extends Do {
|
|
|
8250
8257
|
*/
|
|
8251
8258
|
y(this, "_updateCamera", (t) => {
|
|
8252
8259
|
var c;
|
|
8253
|
-
const n = new
|
|
8260
|
+
const n = new ba(t.coords.longitude, t.coords.latitude), a = t.coords.accuracy, o = {
|
|
8254
8261
|
bearing: this._map.getBearing(),
|
|
8255
8262
|
...this.options.fitBoundsOptions,
|
|
8256
8263
|
linear: !0
|
|
8257
8264
|
}, s = this._map.getZoom();
|
|
8258
|
-
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (o.zoom = s), this._map.fitBounds(
|
|
8265
|
+
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (o.zoom = s), this._map.fitBounds(Iu.fromLngLat(n, a), o, {
|
|
8259
8266
|
geolocateSource: !0
|
|
8260
8267
|
// tag this camera change so it won't cause the control to change to background state
|
|
8261
8268
|
});
|
|
@@ -8276,7 +8283,7 @@ class Iu extends Do {
|
|
|
8276
8283
|
const n = this._map._getUIString("GeolocateControl.FindMyLocation");
|
|
8277
8284
|
this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n);
|
|
8278
8285
|
}
|
|
8279
|
-
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = Le("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new
|
|
8286
|
+
this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = Le("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new va({ element: this._dotElement }), this._circleElement = Le("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new va({
|
|
8280
8287
|
element: this._circleElement,
|
|
8281
8288
|
pitchAlignment: "map"
|
|
8282
8289
|
}), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("move", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("moveend", (n) => {
|
|
@@ -8319,18 +8326,18 @@ class Iu extends Do {
|
|
|
8319
8326
|
}
|
|
8320
8327
|
}
|
|
8321
8328
|
var Te, te, Ie, _e, at;
|
|
8322
|
-
class
|
|
8329
|
+
class Mu {
|
|
8323
8330
|
/**
|
|
8324
8331
|
* @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
|
|
8325
8332
|
* @param onClick Function called when the element is clicked
|
|
8326
8333
|
* @param onRender Function called every time the underlying map renders a new state
|
|
8327
8334
|
*/
|
|
8328
8335
|
constructor(e, t, n) {
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8336
|
+
W(this, Te);
|
|
8337
|
+
W(this, te);
|
|
8338
|
+
W(this, Ie);
|
|
8339
|
+
W(this, _e);
|
|
8340
|
+
W(this, at);
|
|
8334
8341
|
if (typeof e == "string") {
|
|
8335
8342
|
const a = document.querySelector(e);
|
|
8336
8343
|
if (!a) throw new Error(`No element has been found with selector "${e}" when creating an external control.`);
|
|
@@ -8351,7 +8358,7 @@ class _u {
|
|
|
8351
8358
|
}
|
|
8352
8359
|
}
|
|
8353
8360
|
Te = new WeakMap(), te = new WeakMap(), Ie = new WeakMap(), _e = new WeakMap(), at = new WeakMap();
|
|
8354
|
-
class
|
|
8361
|
+
class Pu {
|
|
8355
8362
|
constructor() {
|
|
8356
8363
|
y(this, "map");
|
|
8357
8364
|
y(this, "container");
|
|
@@ -8392,7 +8399,7 @@ const pt = {
|
|
|
8392
8399
|
}
|
|
8393
8400
|
};
|
|
8394
8401
|
var At, it;
|
|
8395
|
-
class en extends
|
|
8402
|
+
class en extends Mu {
|
|
8396
8403
|
/**
|
|
8397
8404
|
* Constructs an instance of External Control to have a predefined functionality
|
|
8398
8405
|
* @param controlElement Element to be used as control, specified as reference to element itself
|
|
@@ -8401,8 +8408,8 @@ class en extends _u {
|
|
|
8401
8408
|
constructor(t, n) {
|
|
8402
8409
|
if (n && !(n in pt)) throw new Error(`data-maptiler-control value "${n}" is invalid.`);
|
|
8403
8410
|
super(t, n && pt[n]);
|
|
8404
|
-
|
|
8405
|
-
|
|
8411
|
+
W(this, At);
|
|
8412
|
+
W(this, it, /* @__PURE__ */ new Map());
|
|
8406
8413
|
}
|
|
8407
8414
|
onAdd(t) {
|
|
8408
8415
|
return Q(this, At, t), super.onAdd(t);
|
|
@@ -8432,14 +8439,14 @@ At = new WeakMap(), it = new WeakMap(), y(en, "controlCallbacks", pt);
|
|
|
8432
8439
|
var re, ce, Me, Pe, ne, Tt, K, Ui, ue, Bi;
|
|
8433
8440
|
class Fr {
|
|
8434
8441
|
constructor(e, t) {
|
|
8435
|
-
|
|
8436
|
-
|
|
8442
|
+
W(this, K);
|
|
8443
|
+
W(this, re);
|
|
8437
8444
|
y(this, "map");
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8445
|
+
W(this, ce);
|
|
8446
|
+
W(this, Me);
|
|
8447
|
+
W(this, Pe);
|
|
8448
|
+
W(this, ne, !1);
|
|
8449
|
+
W(this, Tt);
|
|
8443
8450
|
e.style !== void 0 && Q(this, ne, !0), Q(this, re, {
|
|
8444
8451
|
// set defaults
|
|
8445
8452
|
zoomAdjust: -4,
|
|
@@ -8572,7 +8579,7 @@ re = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Pe = new WeakMap(),
|
|
|
8572
8579
|
i();
|
|
8573
8580
|
};
|
|
8574
8581
|
};
|
|
8575
|
-
class
|
|
8582
|
+
class Ru {
|
|
8576
8583
|
/**
|
|
8577
8584
|
*
|
|
8578
8585
|
* @param map : a Map instance
|
|
@@ -8608,7 +8615,7 @@ class Pu {
|
|
|
8608
8615
|
this.viewerType = e;
|
|
8609
8616
|
}
|
|
8610
8617
|
preparePayload() {
|
|
8611
|
-
const e = new URL(
|
|
8618
|
+
const e = new URL(Y.telemetryURL);
|
|
8612
8619
|
return e.searchParams.append("sdk", So()), 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;
|
|
8613
8620
|
}
|
|
8614
8621
|
}
|
|
@@ -8617,30 +8624,30 @@ function yt() {
|
|
|
8617
8624
|
var r = new Ct(16);
|
|
8618
8625
|
return Ct != 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;
|
|
8619
8626
|
}
|
|
8620
|
-
function
|
|
8627
|
+
function Ou(r, e, t, n, a, i, o, s, l, u, c, p, f, d, h, m, g) {
|
|
8621
8628
|
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;
|
|
8622
8629
|
}
|
|
8623
|
-
function
|
|
8630
|
+
function zu(r, e, t) {
|
|
8624
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], C = t[1], L = t[2], A = t[3];
|
|
8625
8632
|
return r[0] = x * n + C * s + L * p + A * m, r[1] = x * a + C * l + L * f + A * g, r[2] = x * i + C * u + L * d + A * b, r[3] = x * o + C * c + L * h + A * v, x = t[4], C = t[5], L = t[6], A = t[7], r[4] = x * n + C * s + L * p + A * m, r[5] = x * a + C * l + L * f + A * g, r[6] = x * i + C * u + L * d + A * b, r[7] = x * o + C * c + L * h + A * v, x = t[8], C = t[9], L = t[10], A = t[11], r[8] = x * n + C * s + L * p + A * m, r[9] = x * a + C * l + L * f + A * g, r[10] = x * i + C * u + L * d + A * b, r[11] = x * o + C * c + L * h + A * v, x = t[12], C = t[13], L = t[14], A = t[15], r[12] = x * n + C * s + L * p + A * m, r[13] = x * a + C * l + L * f + A * g, r[14] = x * i + C * u + L * d + A * b, r[15] = x * o + C * c + L * h + A * v, r;
|
|
8626
8633
|
}
|
|
8627
|
-
function
|
|
8634
|
+
function Fu(r, e, t) {
|
|
8628
8635
|
var n = t[0], a = t[1], i = t[2];
|
|
8629
8636
|
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;
|
|
8630
8637
|
}
|
|
8631
|
-
function
|
|
8638
|
+
function wa(r, e, t) {
|
|
8632
8639
|
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];
|
|
8633
8640
|
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;
|
|
8634
8641
|
}
|
|
8635
|
-
function
|
|
8642
|
+
function $u(r, e, t) {
|
|
8636
8643
|
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];
|
|
8637
8644
|
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;
|
|
8638
8645
|
}
|
|
8639
|
-
function
|
|
8646
|
+
function Sa(r, e, t) {
|
|
8640
8647
|
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];
|
|
8641
8648
|
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;
|
|
8642
8649
|
}
|
|
8643
|
-
function
|
|
8650
|
+
function Nu(r, e, t, n, a) {
|
|
8644
8651
|
var i = 1 / Math.tan(e / 2);
|
|
8645
8652
|
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) {
|
|
8646
8653
|
var o = 1 / (n - a);
|
|
@@ -8649,12 +8656,12 @@ function $u(r, e, t, n, a) {
|
|
|
8649
8656
|
r[10] = -1, r[14] = -2 * n;
|
|
8650
8657
|
return r;
|
|
8651
8658
|
}
|
|
8652
|
-
var
|
|
8659
|
+
var ju = Nu;
|
|
8653
8660
|
function Gt() {
|
|
8654
8661
|
var r = new Ct(3);
|
|
8655
8662
|
return Ct != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
|
|
8656
8663
|
}
|
|
8657
|
-
function
|
|
8664
|
+
function Du(r, e, t) {
|
|
8658
8665
|
var n = new Ct(3);
|
|
8659
8666
|
return n[0] = r, n[1] = e, n[2] = t, n;
|
|
8660
8667
|
}
|
|
@@ -8662,7 +8669,7 @@ function $r(r, e) {
|
|
|
8662
8669
|
var t = e[0], n = e[1], a = e[2], i = t * t + n * n + a * a;
|
|
8663
8670
|
return i > 0 && (i = 1 / Math.sqrt(i)), r[0] = e[0] * i, r[1] = e[1] * i, r[2] = e[2] * i, r;
|
|
8664
8671
|
}
|
|
8665
|
-
function
|
|
8672
|
+
function xa(r, e, t) {
|
|
8666
8673
|
var n = e[0], a = e[1], i = e[2], o = t[0], s = t[1], l = t[2];
|
|
8667
8674
|
return r[0] = a * l - i * s, r[1] = i * o - n * l, r[2] = n * s - a * o, r;
|
|
8668
8675
|
}
|
|
@@ -8675,12 +8682,12 @@ function Sa(r, e, t) {
|
|
|
8675
8682
|
return e;
|
|
8676
8683
|
};
|
|
8677
8684
|
})();
|
|
8678
|
-
function
|
|
8685
|
+
function Uu(r) {
|
|
8679
8686
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8680
8687
|
}
|
|
8681
|
-
var Nr,
|
|
8682
|
-
function
|
|
8683
|
-
return
|
|
8688
|
+
var Nr, ka;
|
|
8689
|
+
function Bu() {
|
|
8690
|
+
return ka || (ka = 1, Nr = {
|
|
8684
8691
|
aliceblue: [240, 248, 255],
|
|
8685
8692
|
antiquewhite: [250, 235, 215],
|
|
8686
8693
|
aqua: [0, 255, 255],
|
|
@@ -8831,11 +8838,11 @@ function Uu() {
|
|
|
8831
8838
|
yellowgreen: [154, 205, 50]
|
|
8832
8839
|
}), Nr;
|
|
8833
8840
|
}
|
|
8834
|
-
var jr,
|
|
8841
|
+
var jr, Ea;
|
|
8835
8842
|
function qi() {
|
|
8836
|
-
if (
|
|
8837
|
-
|
|
8838
|
-
const r =
|
|
8843
|
+
if (Ea) return jr;
|
|
8844
|
+
Ea = 1;
|
|
8845
|
+
const r = Bu(), e = {};
|
|
8839
8846
|
for (const a of Object.keys(r))
|
|
8840
8847
|
e[r[a]] = a;
|
|
8841
8848
|
const t = {
|
|
@@ -9134,10 +9141,10 @@ function qi() {
|
|
|
9134
9141
|
return [(a[0] + a[1] + a[2]) / 3 / 255 * 100];
|
|
9135
9142
|
}, jr;
|
|
9136
9143
|
}
|
|
9137
|
-
var Dr,
|
|
9138
|
-
function
|
|
9139
|
-
if (
|
|
9140
|
-
|
|
9144
|
+
var Dr, La;
|
|
9145
|
+
function qu() {
|
|
9146
|
+
if (La) return Dr;
|
|
9147
|
+
La = 1;
|
|
9141
9148
|
const r = qi();
|
|
9142
9149
|
function e() {
|
|
9143
9150
|
const i = {}, o = Object.keys(r);
|
|
@@ -9182,11 +9189,11 @@ function Bu() {
|
|
|
9182
9189
|
return s;
|
|
9183
9190
|
}, Dr;
|
|
9184
9191
|
}
|
|
9185
|
-
var Ur,
|
|
9186
|
-
function
|
|
9187
|
-
if (
|
|
9188
|
-
|
|
9189
|
-
const r = qi(), e =
|
|
9192
|
+
var Ur, Ca;
|
|
9193
|
+
function Vu() {
|
|
9194
|
+
if (Ca) return Ur;
|
|
9195
|
+
Ca = 1;
|
|
9196
|
+
const r = qi(), e = qu(), t = {}, n = Object.keys(r);
|
|
9190
9197
|
function a(o) {
|
|
9191
9198
|
const s = function(...l) {
|
|
9192
9199
|
const u = l[0];
|
|
@@ -9217,9 +9224,9 @@ function qu() {
|
|
|
9217
9224
|
});
|
|
9218
9225
|
}), Ur = t, Ur;
|
|
9219
9226
|
}
|
|
9220
|
-
var
|
|
9221
|
-
const
|
|
9222
|
-
function
|
|
9227
|
+
var Gu = Vu();
|
|
9228
|
+
const Hu = /* @__PURE__ */ Uu(Gu);
|
|
9229
|
+
function Aa({ gl: r, type: e, source: t }) {
|
|
9223
9230
|
const n = r.createShader(e);
|
|
9224
9231
|
if (n === null)
|
|
9225
9232
|
throw new Error("Cannot create shader");
|
|
@@ -9227,17 +9234,17 @@ function Ca({ gl: r, type: e, source: t }) {
|
|
|
9227
9234
|
throw console.error("Shader compilation error:", r.getShaderInfoLog(n)), r.deleteShader(n), new Error("Cannot compile shader");
|
|
9228
9235
|
return n;
|
|
9229
9236
|
}
|
|
9230
|
-
function
|
|
9231
|
-
const n =
|
|
9237
|
+
function Ku({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
9238
|
+
const n = Aa({
|
|
9232
9239
|
gl: r,
|
|
9233
9240
|
type: r.VERTEX_SHADER,
|
|
9234
9241
|
source: e
|
|
9235
|
-
}), a =
|
|
9242
|
+
}), a = Aa({ gl: r, type: r.FRAGMENT_SHADER, source: t }), i = r.createProgram();
|
|
9236
9243
|
if (r.attachShader(i, n), r.attachShader(i, a), r.linkProgram(i), !r.getProgramParameter(i, r.LINK_STATUS))
|
|
9237
9244
|
throw console.error("Error: ", r.getProgramInfoLog(i)), new Error("Cannot link shader program");
|
|
9238
9245
|
return i;
|
|
9239
9246
|
}
|
|
9240
|
-
function
|
|
9247
|
+
function Zu(r, e, t) {
|
|
9241
9248
|
const n = r.getUniformLocation(e, t);
|
|
9242
9249
|
if (n === null)
|
|
9243
9250
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
@@ -9252,7 +9259,7 @@ function Vi({
|
|
|
9252
9259
|
vertices: i,
|
|
9253
9260
|
indices: o
|
|
9254
9261
|
}) {
|
|
9255
|
-
const s =
|
|
9262
|
+
const s = Ku({ 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] = Zu(r, s, `u_${h}`), d), {}), c = r.createBuffer();
|
|
9256
9263
|
r.bindBuffer(r.ARRAY_BUFFER, c), r.bufferData(r.ARRAY_BUFFER, new Float32Array(i), r.STATIC_DRAW);
|
|
9257
9264
|
let p, f;
|
|
9258
9265
|
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)), {
|
|
@@ -9272,10 +9279,10 @@ function Ht(r) {
|
|
|
9272
9279
|
if (r === "transparent")
|
|
9273
9280
|
return [1, 1, 1, 0];
|
|
9274
9281
|
try {
|
|
9275
|
-
const e =
|
|
9282
|
+
const e = Xu(r), t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);
|
|
9276
9283
|
if (t != null && t.length) {
|
|
9277
9284
|
const a = !!t[4];
|
|
9278
|
-
return [...
|
|
9285
|
+
return [...Hu.hex.rgb(e).map((i) => i / 255), a ? parseInt(t[4], 16) / 255 : 1];
|
|
9279
9286
|
}
|
|
9280
9287
|
const n = e.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi) ?? ["0", "0", "0"];
|
|
9281
9288
|
if (e.includes("rgb")) {
|
|
@@ -9290,10 +9297,10 @@ function Ht(r) {
|
|
|
9290
9297
|
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];
|
|
9291
9298
|
}
|
|
9292
9299
|
let ft;
|
|
9293
|
-
function
|
|
9300
|
+
function Xu(r) {
|
|
9294
9301
|
return ft = ft ?? document.createElement("canvas").getContext("2d"), ft ? (ft.fillStyle = r, ft.fillStyle) : "#000000";
|
|
9295
9302
|
}
|
|
9296
|
-
const
|
|
9303
|
+
const zn = 1, U = zn / 2, B = zn / 2, q = zn / 2, Wu = [-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], Ju = [-U, B, -q, -U, B, q, U, B, q, U, B, -q], Qu = [-U, -B, -q, U, -B, -q, U, -B, q, -U, -B, q], ec = [U, -B, -q, U, B, -q, U, B, q, U, -B, q], tc = [-U, -B, -q, -U, -B, q, -U, B, q, -U, B, -q], rc = [...Wu, ...Yu, ...Ju, ...Qu, ...ec, ...tc], nc = [
|
|
9297
9304
|
// Front
|
|
9298
9305
|
0,
|
|
9299
9306
|
1,
|
|
@@ -9336,7 +9343,7 @@ const On = 1, U = On / 2, B = On / 2, q = On / 2, Xu = [-U, -B, q, U, -B, q, U,
|
|
|
9336
9343
|
20,
|
|
9337
9344
|
22,
|
|
9338
9345
|
23
|
|
9339
|
-
],
|
|
9346
|
+
], ac = `attribute vec3 a_vertexPosition;
|
|
9340
9347
|
varying vec3 vTextureCoord;
|
|
9341
9348
|
|
|
9342
9349
|
uniform mat4 u_projectionMatrix;
|
|
@@ -9346,7 +9353,7 @@ void main(void) {
|
|
|
9346
9353
|
vTextureCoord = vec3(-a_vertexPosition.x, a_vertexPosition.y, a_vertexPosition.z);
|
|
9347
9354
|
gl_Position = u_projectionMatrix * u_modelViewMatrix * vec4(a_vertexPosition, 1.0);
|
|
9348
9355
|
}
|
|
9349
|
-
`,
|
|
9356
|
+
`, Ta = `precision mediump float;
|
|
9350
9357
|
|
|
9351
9358
|
varying vec3 vTextureCoord;
|
|
9352
9359
|
|
|
@@ -9376,7 +9383,7 @@ void main(void) {
|
|
|
9376
9383
|
#endif
|
|
9377
9384
|
}
|
|
9378
9385
|
`;
|
|
9379
|
-
var
|
|
9386
|
+
var ic = /* @__PURE__ */ ((r) => (r.UNIVERSE_DARK = "universe-dark", r))(ic || {});
|
|
9380
9387
|
const ze = {
|
|
9381
9388
|
stars: {
|
|
9382
9389
|
color: "hsl(233,100%,92%)",
|
|
@@ -9405,18 +9412,18 @@ const ze = {
|
|
|
9405
9412
|
};
|
|
9406
9413
|
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 || {});
|
|
9407
9414
|
const rt = /* @__PURE__ */ new Map();
|
|
9408
|
-
function
|
|
9415
|
+
function oc(r) {
|
|
9409
9416
|
const e = rt.get(r);
|
|
9410
9417
|
e && (rt.delete(r), r.deleteTexture(e));
|
|
9411
9418
|
}
|
|
9412
|
-
const
|
|
9413
|
-
let
|
|
9414
|
-
function
|
|
9415
|
-
if (rt.get(r) && !n &&
|
|
9416
|
-
t(rt.get(r),
|
|
9419
|
+
const Ia = /* @__PURE__ */ new Map();
|
|
9420
|
+
let _a;
|
|
9421
|
+
function sc({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
9422
|
+
if (rt.get(r) && !n && _a === JSON.stringify(e)) {
|
|
9423
|
+
t(rt.get(r), Ia.get(r));
|
|
9417
9424
|
return;
|
|
9418
9425
|
}
|
|
9419
|
-
|
|
9426
|
+
_a = JSON.stringify(e);
|
|
9420
9427
|
const a = rt.get(r) ?? r.createTexture();
|
|
9421
9428
|
if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
|
|
9422
9429
|
console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
|
|
@@ -9449,17 +9456,17 @@ function oc({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
|
9449
9456
|
console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");
|
|
9450
9457
|
continue;
|
|
9451
9458
|
}
|
|
9452
|
-
const g =
|
|
9459
|
+
const g = lc(r, m);
|
|
9453
9460
|
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);
|
|
9454
9461
|
}
|
|
9455
9462
|
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);
|
|
9456
9463
|
const l = s.map((u) => u.image);
|
|
9457
|
-
t(a, l),
|
|
9464
|
+
t(a, l), Ia.set(r, l), rt.set(r, a);
|
|
9458
9465
|
}).catch((s) => {
|
|
9459
9466
|
console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
|
|
9460
9467
|
});
|
|
9461
9468
|
}
|
|
9462
|
-
function
|
|
9469
|
+
function lc(r, e) {
|
|
9463
9470
|
if (e === Ue.POSITIVE_X)
|
|
9464
9471
|
return r.TEXTURE_CUBE_MAP_POSITIVE_X;
|
|
9465
9472
|
if (e === Ue.NEGATIVE_X)
|
|
@@ -9474,7 +9481,7 @@ function sc(r, e) {
|
|
|
9474
9481
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
|
|
9475
9482
|
throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
|
|
9476
9483
|
}
|
|
9477
|
-
function
|
|
9484
|
+
function uc(r, e, t) {
|
|
9478
9485
|
return [
|
|
9479
9486
|
Oe(r[0], e[0], t),
|
|
9480
9487
|
Oe(r[1], e[1], t),
|
|
@@ -9491,8 +9498,8 @@ function nr(r) {
|
|
|
9491
9498
|
const e = Object.keys(r).sort().map((t) => [t, r[t]]);
|
|
9492
9499
|
return Object.fromEntries(e);
|
|
9493
9500
|
}
|
|
9494
|
-
const Qe = "https://api.maptiler.com/resources/space",
|
|
9495
|
-
function
|
|
9501
|
+
const Qe = "https://api.maptiler.com/resources/space", cc = ["vertexPosition"], pc = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], Ma = "%USE_TEXTURE_MACRO_MARKER%", fc = "#define USE_TEXTURE", Pa = ze.stars;
|
|
9502
|
+
function dc(r, e) {
|
|
9496
9503
|
if (!tn(r))
|
|
9497
9504
|
return {
|
|
9498
9505
|
color: "transparent"
|
|
@@ -9640,8 +9647,8 @@ class Nt {
|
|
|
9640
9647
|
throw new Error(`[CubemapLayer]: Invalid cubemap specification:
|
|
9641
9648
|
- ${t.join(`
|
|
9642
9649
|
- `)}`);
|
|
9643
|
-
const n =
|
|
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 =
|
|
9650
|
+
const n = dc(e, Pa);
|
|
9651
|
+
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;
|
|
9645
9652
|
}
|
|
9646
9653
|
/**
|
|
9647
9654
|
* Updates the cubemap object with the current faces and shader configuration.
|
|
@@ -9653,16 +9660,16 @@ class Nt {
|
|
|
9653
9660
|
*/
|
|
9654
9661
|
updateCubemap({ facesNeedUpdate: e } = { facesNeedUpdate: !0 }) {
|
|
9655
9662
|
this.useCubemapTexture = this.faces !== null;
|
|
9656
|
-
const t =
|
|
9663
|
+
const t = pc.filter((n) => n === "cubeSampler" || n === "fadeOpacity" ? this.useCubemapTexture : !0);
|
|
9657
9664
|
this.cubemap = Vi({
|
|
9658
9665
|
gl: this.gl,
|
|
9659
|
-
vertexShaderSource:
|
|
9666
|
+
vertexShaderSource: ac,
|
|
9660
9667
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
9661
|
-
fragmentShaderSource: this.useCubemapTexture ?
|
|
9662
|
-
attributesKeys:
|
|
9668
|
+
fragmentShaderSource: this.useCubemapTexture ? Ta.replace(Ma, fc) : Ta.replace(Ma, ""),
|
|
9669
|
+
attributesKeys: cc,
|
|
9663
9670
|
uniformsKeys: t,
|
|
9664
|
-
vertices:
|
|
9665
|
-
indices:
|
|
9671
|
+
vertices: rc,
|
|
9672
|
+
indices: nc
|
|
9666
9673
|
}), this.cubeMapNeedsUpdate = e, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
|
|
9667
9674
|
}
|
|
9668
9675
|
/**
|
|
@@ -9683,7 +9690,7 @@ class Nt {
|
|
|
9683
9690
|
* @param {WebGLRenderingContext | WebGL2RenderingContext} gl - The WebGL context used for rendering.
|
|
9684
9691
|
*/
|
|
9685
9692
|
onRemove(e, t) {
|
|
9686
|
-
this.cubemap && (this.texture && (
|
|
9693
|
+
this.cubemap && (this.texture && (oc(t), this.texture = void 0), t.deleteProgram(this.cubemap.shaderProgram), t.deleteBuffer(this.cubemap.positionBuffer));
|
|
9687
9694
|
}
|
|
9688
9695
|
/**
|
|
9689
9696
|
* Updates the cubemap texture with the provided faces.
|
|
@@ -9696,7 +9703,7 @@ class Nt {
|
|
|
9696
9703
|
if (this.cubeMapNeedsUpdate === !0 && !this.imageIsAnimating) {
|
|
9697
9704
|
if (this.cubeMapNeedsUpdate = !1, !this.useCubemapTexture)
|
|
9698
9705
|
return;
|
|
9699
|
-
|
|
9706
|
+
sc({
|
|
9700
9707
|
gl: e,
|
|
9701
9708
|
faces: t,
|
|
9702
9709
|
onReady: (n) => {
|
|
@@ -9723,7 +9730,7 @@ class Nt {
|
|
|
9723
9730
|
*/
|
|
9724
9731
|
animateColorChange() {
|
|
9725
9732
|
const e = () => {
|
|
9726
|
-
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor =
|
|
9733
|
+
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor = uc(this.previousBgColor, this.targetBgColor, this.transitionDelta), this.transitionDelta += 0.075, this.map.triggerRepaint());
|
|
9727
9734
|
};
|
|
9728
9735
|
requestAnimationFrame(e);
|
|
9729
9736
|
}
|
|
@@ -9790,9 +9797,9 @@ class Nt {
|
|
|
9790
9797
|
throw new Error("[CubemapLayer]: Cubemap is undefined");
|
|
9791
9798
|
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);
|
|
9792
9799
|
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();
|
|
9793
|
-
|
|
9800
|
+
ju(u, l, o, n, a), Sa(u, u, s.rollInRadians), wa(u, u, -s.pitchInRadians), Sa(u, u, s.bearingInRadians);
|
|
9794
9801
|
const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
|
|
9795
|
-
|
|
9802
|
+
wa(u, u, c), $u(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
|
|
9796
9803
|
const f = yt();
|
|
9797
9804
|
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)
|
|
9798
9805
|
throw new Error("Index buffer is undefined");
|
|
@@ -9828,7 +9835,7 @@ class Nt {
|
|
|
9828
9835
|
this.faces = null, this.useCubemapTexture = !1, this.currentFacesDefinitionKey = "empty", await this.animateIn();
|
|
9829
9836
|
return;
|
|
9830
9837
|
}
|
|
9831
|
-
this.faces =
|
|
9838
|
+
this.faces = Ra(e), this.currentFacesDefinitionKey = JSON.stringify(e.faces ?? e.preset ?? e.path);
|
|
9832
9839
|
}
|
|
9833
9840
|
/**
|
|
9834
9841
|
* Sets the cubemap for the layer based on the provided definition.
|
|
@@ -9848,7 +9855,7 @@ class Nt {
|
|
|
9848
9855
|
throw new Error(`[CubemapLayer]: Invalid cubemap specification:
|
|
9849
9856
|
- ${t.join(`
|
|
9850
9857
|
- `)}`);
|
|
9851
|
-
const n = typeof e == "boolean" ?
|
|
9858
|
+
const n = typeof e == "boolean" ? Pa : e;
|
|
9852
9859
|
this.options = n;
|
|
9853
9860
|
const a = JSON.stringify(n.faces ?? n.preset ?? n.path), i = this.currentFacesDefinitionKey !== a;
|
|
9854
9861
|
i && (await this.setCubemapFaces(n), this.cubeMapNeedsUpdate = !0);
|
|
@@ -9897,7 +9904,7 @@ function tn(r) {
|
|
|
9897
9904
|
`Space specification contains multiple properties for cubemap definition: ${a.join(", ")}. Only one of \`path\`, \`preset\`, or \`faces\` should be defined.`
|
|
9898
9905
|
), r.faces && (!r.faces.pX || !r.faces.nX || !r.faces.pY || !r.faces.nY || !r.faces.pZ || !r.faces.nZ) && e.push("Space specification contains faces but one or more of the faces are undefined."), r.faces && Object.values(r.faces).every((i) => typeof i != "string") && e.push("Space specification contains faces but one or more of the faces are not strings."), e;
|
|
9899
9906
|
}
|
|
9900
|
-
function
|
|
9907
|
+
function Ra(r) {
|
|
9901
9908
|
if (r.faces)
|
|
9902
9909
|
return r.faces;
|
|
9903
9910
|
if (r.preset)
|
|
@@ -9922,7 +9929,7 @@ function Pa(r) {
|
|
|
9922
9929
|
}
|
|
9923
9930
|
return null;
|
|
9924
9931
|
}
|
|
9925
|
-
const
|
|
9932
|
+
const hc = `attribute vec3 a_position;
|
|
9926
9933
|
|
|
9927
9934
|
uniform mat4 u_matrix;
|
|
9928
9935
|
uniform mat4 u_rotationMatrix;
|
|
@@ -9937,7 +9944,7 @@ void main() {
|
|
|
9937
9944
|
v_pos = a_position.xy * u_scale;
|
|
9938
9945
|
gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);
|
|
9939
9946
|
}
|
|
9940
|
-
`,
|
|
9947
|
+
`, mc = `precision mediump float;
|
|
9941
9948
|
varying vec2 v_pos;
|
|
9942
9949
|
|
|
9943
9950
|
uniform int u_stopsNumber;
|
|
@@ -9996,7 +10003,7 @@ void main() {
|
|
|
9996
10003
|
// gl_FragColor = color;
|
|
9997
10004
|
gl_FragColor = vec4(color.rgb * color.a, color.a);
|
|
9998
10005
|
}
|
|
9999
|
-
`, ke = 2,
|
|
10006
|
+
`, ke = 2, yc = ["position"], gc = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], vc = [
|
|
10000
10007
|
-ke,
|
|
10001
10008
|
-ke,
|
|
10002
10009
|
0,
|
|
@@ -10013,7 +10020,7 @@ void main() {
|
|
|
10013
10020
|
[0, "rgba(176, 208, 240, 1)"],
|
|
10014
10021
|
[0.1, "rgba(98, 168, 229, 0.3)"],
|
|
10015
10022
|
[0.2, "rgba(98, 168, 229, 0.0)"]
|
|
10016
|
-
], Dt = 0.9,
|
|
10023
|
+
], Dt = 0.9, Oa = 0.06;
|
|
10017
10024
|
class Ut {
|
|
10018
10025
|
/**
|
|
10019
10026
|
* Creates a new RadialGradientLayer instance.
|
|
@@ -10075,7 +10082,7 @@ class Ut {
|
|
|
10075
10082
|
};
|
|
10076
10083
|
return;
|
|
10077
10084
|
}
|
|
10078
|
-
const t =
|
|
10085
|
+
const t = za(e);
|
|
10079
10086
|
if (t.length > 0)
|
|
10080
10087
|
throw new Error(`[RadialGradientLayer]: Invalid Halo specification:
|
|
10081
10088
|
- ${t.join(`
|
|
@@ -10097,11 +10104,11 @@ class Ut {
|
|
|
10097
10104
|
onAdd(e, t) {
|
|
10098
10105
|
this.map = e, this.plane = Vi({
|
|
10099
10106
|
gl: t,
|
|
10100
|
-
vertexShaderSource:
|
|
10101
|
-
fragmentShaderSource:
|
|
10102
|
-
attributesKeys:
|
|
10103
|
-
uniformsKeys:
|
|
10104
|
-
vertices:
|
|
10107
|
+
vertexShaderSource: hc,
|
|
10108
|
+
fragmentShaderSource: mc,
|
|
10109
|
+
attributesKeys: yc,
|
|
10110
|
+
uniformsKeys: gc,
|
|
10111
|
+
vertices: vc
|
|
10105
10112
|
}), this.animateIn();
|
|
10106
10113
|
}
|
|
10107
10114
|
/**
|
|
@@ -10146,7 +10153,7 @@ class Ut {
|
|
|
10146
10153
|
this.animationDelta = 0;
|
|
10147
10154
|
const t = () => {
|
|
10148
10155
|
if (this.animationDelta <= 1) {
|
|
10149
|
-
this.scale = Oe(0, this.gradient.scale, this.animationDelta), this.animationDelta +=
|
|
10156
|
+
this.scale = Oe(0, this.gradient.scale, this.animationDelta), this.animationDelta += Oa, this.map.triggerRepaint(), requestAnimationFrame(t);
|
|
10150
10157
|
return;
|
|
10151
10158
|
}
|
|
10152
10159
|
e();
|
|
@@ -10171,7 +10178,7 @@ class Ut {
|
|
|
10171
10178
|
return this.animationDelta = 0, new Promise((e) => {
|
|
10172
10179
|
const t = () => {
|
|
10173
10180
|
if (this.animationDelta < 1) {
|
|
10174
|
-
this.scale = Oe(this.gradient.scale, 0, this.animationDelta), this.animationDelta +=
|
|
10181
|
+
this.scale = Oe(this.gradient.scale, 0, this.animationDelta), this.animationDelta += Oa, this.map.triggerRepaint(), requestAnimationFrame(t);
|
|
10175
10182
|
return;
|
|
10176
10183
|
}
|
|
10177
10184
|
e();
|
|
@@ -10195,15 +10202,15 @@ class Ut {
|
|
|
10195
10202
|
const n = this.plane.programInfo.attributesLocations.position;
|
|
10196
10203
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 3, e.FLOAT, !1, 0, 0);
|
|
10197
10204
|
const a = yt(), i = this.scale;
|
|
10198
|
-
|
|
10205
|
+
Fu(a, a, [i, i, i]);
|
|
10199
10206
|
const o = yt();
|
|
10200
|
-
|
|
10207
|
+
zu(o, t.defaultProjectionData.mainMatrix, a);
|
|
10201
10208
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
10202
10209
|
e.uniformMatrix4fv(s, !1, o);
|
|
10203
|
-
const l = yt(), u = this.map.transform.cameraPosition, c = $r(Gt(), u), p =
|
|
10204
|
-
|
|
10210
|
+
const l = yt(), u = this.map.transform.cameraPosition, c = $r(Gt(), u), p = Du(0, 1, 0), f = Gt();
|
|
10211
|
+
xa(f, p, c), $r(f, f);
|
|
10205
10212
|
const d = Gt();
|
|
10206
|
-
|
|
10213
|
+
xa(d, c, f), $r(d, d), Ou(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);
|
|
10207
10214
|
const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
10208
10215
|
e.uniformMatrix4fv(h, !1, l);
|
|
10209
10216
|
const m = this.gradient.stops.length, g = [], b = [];
|
|
@@ -10230,7 +10237,7 @@ class Ut {
|
|
|
10230
10237
|
return;
|
|
10231
10238
|
}
|
|
10232
10239
|
await this.animateOut();
|
|
10233
|
-
const t =
|
|
10240
|
+
const t = za(e);
|
|
10234
10241
|
if (t.length > 0)
|
|
10235
10242
|
throw new Error(`[RadialGradientLayer]: Invalid Halo specification:
|
|
10236
10243
|
- ${t.join(`
|
|
@@ -10248,21 +10255,21 @@ class Ut {
|
|
|
10248
10255
|
this.map.setLayoutProperty(this.id, "visibility", "none");
|
|
10249
10256
|
}
|
|
10250
10257
|
}
|
|
10251
|
-
const
|
|
10252
|
-
function
|
|
10258
|
+
const bc = ["scale", "stops"];
|
|
10259
|
+
function za(r) {
|
|
10253
10260
|
var t;
|
|
10254
10261
|
const e = [];
|
|
10255
10262
|
if (typeof r == "boolean")
|
|
10256
10263
|
return [];
|
|
10257
10264
|
try {
|
|
10258
|
-
const n = Object.keys(r).filter((a) => !
|
|
10265
|
+
const n = Object.keys(r).filter((a) => !bc.includes(a));
|
|
10259
10266
|
n.length > 0 && e.push(`Properties ${n.map((a) => `\`${a}\``).join(", ")} are not supported.`);
|
|
10260
10267
|
} catch {
|
|
10261
10268
|
e.push("Halo specification is not an object.");
|
|
10262
10269
|
}
|
|
10263
10270
|
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);
|
|
10264
10271
|
}
|
|
10265
|
-
function
|
|
10272
|
+
function wc() {
|
|
10266
10273
|
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;";
|
|
10267
10274
|
console.info(
|
|
10268
10275
|
`%c❖%c❖%c❖ %cMapTiler SDK JS v${So()} %c❖%c❖%c❖`,
|
|
@@ -10275,14 +10282,14 @@ function bc() {
|
|
|
10275
10282
|
e + "padding-left: 0;"
|
|
10276
10283
|
);
|
|
10277
10284
|
}
|
|
10278
|
-
const
|
|
10285
|
+
const Sc = {
|
|
10279
10286
|
POINT: "POINT",
|
|
10280
10287
|
COUNTRY: "COUNTRY"
|
|
10281
10288
|
};
|
|
10282
10289
|
let Gi = class Hi extends k.Map {
|
|
10283
10290
|
constructor(t) {
|
|
10284
|
-
t.logSDKVersion !== !1 &&
|
|
10285
|
-
const { style: n, requiresUrlMonitoring: a, isFallback: i } =
|
|
10291
|
+
t.logSDKVersion !== !1 && wc(), rs(t.container, t.canvasContextAttributes), t.apiKey && (j.apiKey = t.apiKey);
|
|
10292
|
+
const { style: n, requiresUrlMonitoring: a, isFallback: i } = ga(t.style);
|
|
10286
10293
|
i && console.warn(
|
|
10287
10294
|
"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."
|
|
10288
10295
|
), j.apiKey || console.warn("MapTiler Cloud API key is not set. Visit https://maptiler.com and try Cloud for free!");
|
|
@@ -10298,7 +10305,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10298
10305
|
...t,
|
|
10299
10306
|
style: n,
|
|
10300
10307
|
maplibreLogo: !1,
|
|
10301
|
-
transformRequest:
|
|
10308
|
+
transformRequest: Wn(t.transformRequest),
|
|
10302
10309
|
attributionControl: t.forceNoAttributionControl === !0 ? !1 : s
|
|
10303
10310
|
};
|
|
10304
10311
|
delete l.style;
|
|
@@ -10333,7 +10340,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10333
10340
|
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);
|
|
10334
10341
|
};
|
|
10335
10342
|
if (this.on("style.load", () => {
|
|
10336
|
-
this.styleInProcess = !1, (typeof t.rtlTextPlugin == "string" || typeof t.rtlTextPlugin > "u") &&
|
|
10343
|
+
this.styleInProcess = !1, (typeof t.rtlTextPlugin == "string" || typeof t.rtlTextPlugin > "u") && Yo(t.rtlTextPlugin);
|
|
10337
10344
|
}), this.on("error", (h) => {
|
|
10338
10345
|
if (h.error instanceof k.AJAXError) {
|
|
10339
10346
|
const g = h.error.url, b = new URL(g);
|
|
@@ -10346,10 +10353,10 @@ let Gi = class Hi extends k.Map {
|
|
|
10346
10353
|
u();
|
|
10347
10354
|
return;
|
|
10348
10355
|
}
|
|
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 &&
|
|
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 && Wo(), typeof t.language > "u")
|
|
10350
10357
|
this.primaryLanguage = j.primaryLanguage;
|
|
10351
10358
|
else {
|
|
10352
|
-
const h =
|
|
10359
|
+
const h = qn(t.language, O);
|
|
10353
10360
|
this.primaryLanguage = h ?? j.primaryLanguage;
|
|
10354
10361
|
}
|
|
10355
10362
|
this.forceLanguageUpdate = !(this.primaryLanguage === O.STYLE || this.primaryLanguage === O.STYLE_LOCK), this.languageAlwaysBeenStyle = this.primaryLanguage === O.STYLE, this.terrainExaggeration = t.terrainExaggeration ?? this.terrainExaggeration, this.curentProjection = t.projection, this.on("style.load", (h) => {
|
|
@@ -10358,7 +10365,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10358
10365
|
if (!t.geolocate || t.center || t.hash && o)
|
|
10359
10366
|
return;
|
|
10360
10367
|
try {
|
|
10361
|
-
if (t.geolocate ===
|
|
10368
|
+
if (t.geolocate === Sc.COUNTRY) {
|
|
10362
10369
|
await this.fitToIpBounds();
|
|
10363
10370
|
return;
|
|
10364
10371
|
}
|
|
@@ -10439,8 +10446,8 @@ let Gi = class Hi extends k.Map {
|
|
|
10439
10446
|
if (t.forceNoAttributionControl !== !0)
|
|
10440
10447
|
if ("logo" in h && h.logo) {
|
|
10441
10448
|
const m = h.logo;
|
|
10442
|
-
this.addControl(new
|
|
10443
|
-
} else t.maptilerLogo && this.addControl(new
|
|
10449
|
+
this.addControl(new Hn({ logoURL: m }), t.logoPosition);
|
|
10450
|
+
} else t.maptilerLogo && this.addControl(new Hn(), t.logoPosition);
|
|
10444
10451
|
if (t.scaleControl) {
|
|
10445
10452
|
const m = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, g = new Bo({ unit: j.unit });
|
|
10446
10453
|
this.addControl(g, m), j.on("unit", (b) => {
|
|
@@ -10449,13 +10456,13 @@ let Gi = class Hi extends k.Map {
|
|
|
10449
10456
|
}
|
|
10450
10457
|
if (t.navigationControl !== !1) {
|
|
10451
10458
|
const m = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
|
|
10452
|
-
this.addControl(new
|
|
10459
|
+
this.addControl(new Tu(), m);
|
|
10453
10460
|
}
|
|
10454
10461
|
if (t.geolocateControl !== !1) {
|
|
10455
10462
|
const m = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
|
|
10456
10463
|
this.addControl(
|
|
10457
10464
|
// new maplibregl.GeolocateControl({
|
|
10458
|
-
new
|
|
10465
|
+
new _u({
|
|
10459
10466
|
positionOptions: {
|
|
10460
10467
|
enableHighAccuracy: !0,
|
|
10461
10468
|
maximumAge: 0,
|
|
@@ -10473,11 +10480,11 @@ let Gi = class Hi extends k.Map {
|
|
|
10473
10480
|
}
|
|
10474
10481
|
if (t.terrainControl) {
|
|
10475
10482
|
const m = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
|
|
10476
|
-
this.addControl(new
|
|
10483
|
+
this.addControl(new Au(), m);
|
|
10477
10484
|
}
|
|
10478
10485
|
if (t.projectionControl) {
|
|
10479
10486
|
const m = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
|
|
10480
|
-
this.addControl(new
|
|
10487
|
+
this.addControl(new Pu(), m);
|
|
10481
10488
|
}
|
|
10482
10489
|
if (t.fullscreenControl) {
|
|
10483
10490
|
const m = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
|
|
@@ -10502,8 +10509,8 @@ let Gi = class Hi extends k.Map {
|
|
|
10502
10509
|
refreshExpiredTiles: A,
|
|
10503
10510
|
maxBounds: N,
|
|
10504
10511
|
scrollZoom: le,
|
|
10505
|
-
minZoom:
|
|
10506
|
-
maxZoom:
|
|
10512
|
+
minZoom: We,
|
|
10513
|
+
maxZoom: Ye,
|
|
10507
10514
|
boxZoom: X,
|
|
10508
10515
|
locale: Je,
|
|
10509
10516
|
fadeDuration: ko,
|
|
@@ -10526,8 +10533,8 @@ let Gi = class Hi extends k.Map {
|
|
|
10526
10533
|
refreshExpiredTiles: A,
|
|
10527
10534
|
maxBounds: N,
|
|
10528
10535
|
scrollZoom: le,
|
|
10529
|
-
minZoom:
|
|
10530
|
-
maxZoom:
|
|
10536
|
+
minZoom: We,
|
|
10537
|
+
maxZoom: Ye,
|
|
10531
10538
|
boxZoom: X,
|
|
10532
10539
|
locale: Je,
|
|
10533
10540
|
fadeDuration: ko,
|
|
@@ -10557,7 +10564,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10557
10564
|
});
|
|
10558
10565
|
const h = this.getLayersOrder()[0];
|
|
10559
10566
|
t.space && this.initSpace({ options: t, before: h }), t.halo && this.initHalo({ options: t, before: h });
|
|
10560
|
-
}), this.telemetry = new
|
|
10567
|
+
}), this.telemetry = new Ru(this);
|
|
10561
10568
|
}
|
|
10562
10569
|
getSpace() {
|
|
10563
10570
|
return this.space;
|
|
@@ -10702,7 +10709,11 @@ let Gi = class Hi extends k.Map {
|
|
|
10702
10709
|
return;
|
|
10703
10710
|
}
|
|
10704
10711
|
const i = a;
|
|
10705
|
-
|
|
10712
|
+
if (i) {
|
|
10713
|
+
this.space = new Nt(i), this.addLayer(this.space, n);
|
|
10714
|
+
return;
|
|
10715
|
+
}
|
|
10716
|
+
this.options.space === !0 && (this.space = new Nt(!0), this.addLayer(this.space, n));
|
|
10706
10717
|
}
|
|
10707
10718
|
initHalo({ options: t = this.options, before: n, spec: a }) {
|
|
10708
10719
|
if (this.halo && this.getLayer(this.halo.id) || t.halo === !1) return;
|
|
@@ -10825,7 +10836,7 @@ let Gi = class Hi extends k.Map {
|
|
|
10825
10836
|
this.originalLabelStyle.clear(), (c = this.minimap) == null || c.setStyle(t), this.forceLanguageUpdate = !0, this.once("idle", () => {
|
|
10826
10837
|
this.forceLanguageUpdate = !1;
|
|
10827
10838
|
});
|
|
10828
|
-
const a =
|
|
10839
|
+
const a = ga(t);
|
|
10829
10840
|
if (a.requiresUrlMonitoring && this.monitorStyleUrl(a.style), a.isFallback) {
|
|
10830
10841
|
if (this.getStyle())
|
|
10831
10842
|
return console.warn(
|
|
@@ -11022,7 +11033,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11022
11033
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
11023
11034
|
*/
|
|
11024
11035
|
setPrimaryLanguage(t) {
|
|
11025
|
-
const n = this.getStyleLanguage(), a =
|
|
11036
|
+
const n = this.getStyleLanguage(), a = qn(t, O);
|
|
11026
11037
|
if (!a) {
|
|
11027
11038
|
console.warn(`The language "${a}" is not supported.`);
|
|
11028
11039
|
return;
|
|
@@ -11043,7 +11054,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11043
11054
|
i = n;
|
|
11044
11055
|
}
|
|
11045
11056
|
let o = O.LOCAL.flag, s = ["get", o];
|
|
11046
|
-
i.flag === O.VISITOR.flag ? (o =
|
|
11057
|
+
i.flag === O.VISITOR.flag ? (o = Gn().flag, s = [
|
|
11047
11058
|
"case",
|
|
11048
11059
|
["all", ["has", o], ["has", O.LOCAL.flag]],
|
|
11049
11060
|
[
|
|
@@ -11065,33 +11076,35 @@ let Gi = class Hi extends k.Map {
|
|
|
11065
11076
|
`, ["get", O.LOCAL.flag], { "font-scale": 1.1 }]
|
|
11066
11077
|
],
|
|
11067
11078
|
["get", O.LOCAL.flag]
|
|
11068
|
-
]) : i.flag === O.AUTO.flag ? (o =
|
|
11079
|
+
]) : 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]]);
|
|
11069
11080
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
11070
11081
|
if (u) {
|
|
11071
|
-
const c =
|
|
11082
|
+
const c = us(l, this);
|
|
11072
11083
|
this.isStyleLocalized = Object.keys(c.localized).length > 0;
|
|
11073
11084
|
}
|
|
11074
11085
|
for (const c of l) {
|
|
11075
11086
|
if (c.type !== "symbol")
|
|
11076
11087
|
continue;
|
|
11077
11088
|
const p = c, f = this.getSource(p.source);
|
|
11078
|
-
if (!f || !("url" in f && typeof f.url == "string") || new URL(f.url).host !==
|
|
11089
|
+
if (!f || !("url" in f && typeof f.url == "string") || new URL(f.url).host !== Y.maptilerApiHost)
|
|
11079
11090
|
continue;
|
|
11080
11091
|
const { id: h, layout: m } = p;
|
|
11081
11092
|
if (!m || !("text-field" in m))
|
|
11082
11093
|
continue;
|
|
11083
11094
|
let g;
|
|
11084
11095
|
if (u ? (g = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, g)) : g = this.originalLabelStyle.get(h), typeof g == "string") {
|
|
11085
|
-
const { contains: b, exactMatch: v } =
|
|
11096
|
+
const { contains: b, exactMatch: v } = ns(g, this.isStyleLocalized);
|
|
11086
11097
|
if (!b) continue;
|
|
11087
11098
|
if (v)
|
|
11088
11099
|
this.setLayoutProperty(h, "text-field", s);
|
|
11089
11100
|
else {
|
|
11090
|
-
const x =
|
|
11101
|
+
const x = as(g, s, this.isStyleLocalized);
|
|
11091
11102
|
this.setLayoutProperty(h, "text-field", x);
|
|
11092
11103
|
}
|
|
11093
|
-
} else
|
|
11094
|
-
|
|
11104
|
+
} else {
|
|
11105
|
+
const b = JSON.stringify(g);
|
|
11106
|
+
(b.includes('"name"') || b.includes('"name:')) && this.setLayoutProperty(h, "text-field", s);
|
|
11107
|
+
}
|
|
11095
11108
|
}
|
|
11096
11109
|
this.languageIsUpdated = !0;
|
|
11097
11110
|
}
|
|
@@ -11143,11 +11156,11 @@ let Gi = class Hi extends k.Map {
|
|
|
11143
11156
|
const n = (i) => {
|
|
11144
11157
|
!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));
|
|
11145
11158
|
}, a = () => {
|
|
11146
|
-
this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(
|
|
11159
|
+
this.isTerrainEnabled = !0, this.terrainExaggeration = t, this.on("data", n), this.addSource(Y.terrainSourceId, {
|
|
11147
11160
|
type: "raster-dem",
|
|
11148
|
-
url:
|
|
11161
|
+
url: Y.terrainSourceURL
|
|
11149
11162
|
}), this.setTerrain({
|
|
11150
|
-
source:
|
|
11163
|
+
source: Y.terrainSourceId,
|
|
11151
11164
|
exaggeration: 0
|
|
11152
11165
|
});
|
|
11153
11166
|
};
|
|
@@ -11159,7 +11172,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11159
11172
|
a();
|
|
11160
11173
|
else {
|
|
11161
11174
|
const i = () => {
|
|
11162
|
-
this.getTerrain() && this.getSource(
|
|
11175
|
+
this.getTerrain() && this.getSource(Y.terrainSourceId) || a();
|
|
11163
11176
|
};
|
|
11164
11177
|
this.once(this.style._loaded ? "render" : "load", () => {
|
|
11165
11178
|
i();
|
|
@@ -11183,7 +11196,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11183
11196
|
const o = (1 - i) ** 4, s = n * o;
|
|
11184
11197
|
this.terrain.exaggeration = s, requestAnimationFrame(a);
|
|
11185
11198
|
} else
|
|
11186
|
-
this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(
|
|
11199
|
+
this.terrain.exaggeration = 0, this.terrainGrowing = !1, this.terrainFlattening = !1, this.setTerrain(), this.getSource(Y.terrainSourceId) && this.removeSource(Y.terrainSourceId), this.fire("terrainAnimationStop", { terrain: null });
|
|
11187
11200
|
this.triggerRepaint();
|
|
11188
11201
|
};
|
|
11189
11202
|
!this.terrainGrowing && !this.terrainFlattening && this.fire("terrainAnimationStart", { terrain: this.terrain }), this.terrainGrowing = !1, this.terrainFlattening = !0, requestAnimationFrame(a);
|
|
@@ -11208,14 +11221,14 @@ let Gi = class Hi extends k.Map {
|
|
|
11208
11221
|
});
|
|
11209
11222
|
}
|
|
11210
11223
|
async fitToIpBounds() {
|
|
11211
|
-
const t = await
|
|
11224
|
+
const t = await Vn.info();
|
|
11212
11225
|
this.fitBounds(t.country_bounds, {
|
|
11213
11226
|
duration: 0,
|
|
11214
11227
|
padding: 100
|
|
11215
11228
|
});
|
|
11216
11229
|
}
|
|
11217
11230
|
async centerOnIpPoint(t) {
|
|
11218
|
-
const n = await
|
|
11231
|
+
const n = await Vn.info();
|
|
11219
11232
|
this.jumpTo({
|
|
11220
11233
|
center: [n.longitude ?? 0, n.latitude ?? 0],
|
|
11221
11234
|
zoom: t || 11
|
|
@@ -11253,7 +11266,7 @@ let Gi = class Hi extends k.Map {
|
|
|
11253
11266
|
* map.setTransformRequest((url: string, resourceType: string) => {});
|
|
11254
11267
|
*/
|
|
11255
11268
|
setTransformRequest(t) {
|
|
11256
|
-
return super.setTransformRequest(
|
|
11269
|
+
return super.setTransformRequest(Wn(t)), this;
|
|
11257
11270
|
}
|
|
11258
11271
|
/**
|
|
11259
11272
|
* Gets the {@link ProjectionSpecification}.
|
|
@@ -11302,7 +11315,7 @@ function Bt(r) {
|
|
|
11302
11315
|
}
|
|
11303
11316
|
return delete r.session, r;
|
|
11304
11317
|
}
|
|
11305
|
-
const
|
|
11318
|
+
const uf = {
|
|
11306
11319
|
forward: (r, e = {}) => Ot.geocoding.forward(r, Bt(e)),
|
|
11307
11320
|
reverse: (r, e = {}) => Ot.geocoding.reverse(r, Bt(e)),
|
|
11308
11321
|
byId: (r, e = {}) => Ot.geocoding.byId(r, Bt(e)),
|
|
@@ -11333,7 +11346,7 @@ const Ki = [
|
|
|
11333
11346
|
], Zi = [
|
|
11334
11347
|
"error"
|
|
11335
11348
|
// ErrorEvent
|
|
11336
|
-
], Xi = ["resize"],
|
|
11349
|
+
], Xi = ["resize"], Wi = ["webglcontextlost", "webglcontextrestored"], Yi = [
|
|
11337
11350
|
"moveend",
|
|
11338
11351
|
"movestart",
|
|
11339
11352
|
"move",
|
|
@@ -11359,18 +11372,18 @@ const Ki = [
|
|
|
11359
11372
|
// this is fired on layers, not the map
|
|
11360
11373
|
// keeping it for reference
|
|
11361
11374
|
// "metadata",
|
|
11362
|
-
],
|
|
11375
|
+
], xc = [
|
|
11363
11376
|
...Ki,
|
|
11364
11377
|
...Zi,
|
|
11365
11378
|
...Xi,
|
|
11366
|
-
...Yi,
|
|
11367
11379
|
...Wi,
|
|
11380
|
+
...Yi,
|
|
11368
11381
|
...Ji,
|
|
11369
11382
|
...eo,
|
|
11370
11383
|
...Qi
|
|
11371
|
-
],
|
|
11372
|
-
function
|
|
11373
|
-
|
|
11384
|
+
], kc = ["lngLat", "_defaultPrevented"];
|
|
11385
|
+
function Ec({ map: r, viewer: e, lngLatToPx: t }) {
|
|
11386
|
+
xc.forEach((n) => {
|
|
11374
11387
|
try {
|
|
11375
11388
|
r.on(n, (a) => {
|
|
11376
11389
|
const i = n;
|
|
@@ -11379,13 +11392,13 @@ function kc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11379
11392
|
isOutOfBounds: m ? h[0] < 0 || h[0] > m.width || h[1] < 0 || h[1] > m.height : !0,
|
|
11380
11393
|
imageX: h[0],
|
|
11381
11394
|
imageY: h[1],
|
|
11382
|
-
...Object.fromEntries(Object.entries(a).filter(([v]) => !
|
|
11395
|
+
...Object.fromEntries(Object.entries(a).filter(([v]) => !kc.includes(v)))
|
|
11383
11396
|
};
|
|
11384
11397
|
e.fire(new ae(n, e, d.originalEvent, b));
|
|
11385
11398
|
return;
|
|
11386
11399
|
}
|
|
11387
11400
|
const o = n;
|
|
11388
|
-
if (
|
|
11401
|
+
if (Yi.includes(o)) {
|
|
11389
11402
|
const d = a;
|
|
11390
11403
|
e.fire(new ae(n, e, d.originalEvent, d));
|
|
11391
11404
|
return;
|
|
@@ -11403,7 +11416,7 @@ function kc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11403
11416
|
return;
|
|
11404
11417
|
}
|
|
11405
11418
|
const u = n;
|
|
11406
|
-
if (
|
|
11419
|
+
if (Wi.includes(u)) {
|
|
11407
11420
|
const d = a;
|
|
11408
11421
|
e.fire(new ae(n, e, d.originalEvent, d));
|
|
11409
11422
|
return;
|
|
@@ -11431,7 +11444,7 @@ function kc({ map: r, viewer: e, lngLatToPx: t }) {
|
|
|
11431
11444
|
}
|
|
11432
11445
|
});
|
|
11433
11446
|
}
|
|
11434
|
-
class
|
|
11447
|
+
class Lc extends Error {
|
|
11435
11448
|
constructor(t, n, a) {
|
|
11436
11449
|
const i = `[${a}]: Failed to fetch ${n} at ${t.url}: ${t.status.toString()}: ${t.statusText}`;
|
|
11437
11450
|
super(i);
|
|
@@ -11440,14 +11453,14 @@ class Ec extends Error {
|
|
|
11440
11453
|
this.name = "FetchError", this.message = i, this.status = t.status, this.statusText = t.statusText;
|
|
11441
11454
|
}
|
|
11442
11455
|
}
|
|
11443
|
-
const
|
|
11444
|
-
function
|
|
11456
|
+
const Fa = 85.051129;
|
|
11457
|
+
function Cc(r, e) {
|
|
11445
11458
|
return new fn(e.x / r, e.y / r).toLngLat();
|
|
11446
11459
|
}
|
|
11447
|
-
function
|
|
11460
|
+
function Ac(r) {
|
|
11448
11461
|
return Math.pow(2, r);
|
|
11449
11462
|
}
|
|
11450
|
-
function
|
|
11463
|
+
function Tc(r) {
|
|
11451
11464
|
return Math.log(r) / Math.LN2;
|
|
11452
11465
|
}
|
|
11453
11466
|
function to(r, e, t) {
|
|
@@ -11459,15 +11472,15 @@ function rn(r) {
|
|
|
11459
11472
|
function nn(r) {
|
|
11460
11473
|
return (180 + r) / 360;
|
|
11461
11474
|
}
|
|
11462
|
-
function
|
|
11475
|
+
function $a(r, e, t) {
|
|
11463
11476
|
const n = t - e, a = ((r - e) % n + n) % n + e;
|
|
11464
11477
|
return a === e ? t : a;
|
|
11465
11478
|
}
|
|
11466
|
-
function
|
|
11467
|
-
const t = to(e.lat, -
|
|
11479
|
+
function Ic(r, e) {
|
|
11480
|
+
const t = to(e.lat, -Fa, Fa);
|
|
11468
11481
|
return new xo(nn(e.lng) * r, rn(t) * r);
|
|
11469
11482
|
}
|
|
11470
|
-
const
|
|
11483
|
+
const _c = function(r, e) {
|
|
11471
11484
|
e = to(e, this.minZoom, this.maxZoom);
|
|
11472
11485
|
const t = {
|
|
11473
11486
|
center: new Ne(r.lng, r.lat),
|
|
@@ -11479,33 +11492,33 @@ const Ic = function(r, e) {
|
|
|
11479
11492
|
const X = 179.9999999999;
|
|
11480
11493
|
n = [-X, X];
|
|
11481
11494
|
}
|
|
11482
|
-
const i = this.tileSize *
|
|
11495
|
+
const i = this.tileSize * Ac(t.zoom);
|
|
11483
11496
|
let o = 0, s = i, l = 0, u = i, c = 0, p = 0;
|
|
11484
11497
|
const { x: f, y: d } = this.size, h = 0.5;
|
|
11485
|
-
a && (o = rn(a[1]) * i, s = rn(a[0]) * i, s - o < h * d && (c = h * d / (s - o))), n && (l =
|
|
11486
|
-
const { x: m, y: g } =
|
|
11498
|
+
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 } = Ic(i, r);
|
|
11487
11500
|
let b, v;
|
|
11488
11501
|
const x = Math.min(p || 0, c || 0);
|
|
11489
11502
|
if (x)
|
|
11490
|
-
return t.zoom +=
|
|
11503
|
+
return t.zoom += Tc(x), t;
|
|
11491
11504
|
let C = 0, L = 0;
|
|
11492
11505
|
const A = 1, N = 1 - (s - o) / d, le = 1 - (u - l) / f;
|
|
11493
11506
|
C = Math.max(le, A), L = Math.max(N, A);
|
|
11494
|
-
const
|
|
11507
|
+
const We = 1 - C, Ye = 1 - L;
|
|
11495
11508
|
if (a) {
|
|
11496
|
-
const X =
|
|
11509
|
+
const X = Ye * d / 2;
|
|
11497
11510
|
g - X < o && (v = o + X), g + X > s && (v = s - X);
|
|
11498
11511
|
}
|
|
11499
11512
|
if (n) {
|
|
11500
|
-
const X = m, Je =
|
|
11513
|
+
const X = m, Je = We * f / 2;
|
|
11501
11514
|
X - Je < l && (b = l + Je), X + Je > u && (b = u - Je);
|
|
11502
11515
|
}
|
|
11503
11516
|
if (b !== void 0 || v !== void 0) {
|
|
11504
11517
|
const X = new xo(b ?? m, v ?? g);
|
|
11505
|
-
t.center =
|
|
11518
|
+
t.center = Cc(i, X).wrap();
|
|
11506
11519
|
}
|
|
11507
11520
|
return t;
|
|
11508
|
-
},
|
|
11521
|
+
}, Mc = {
|
|
11509
11522
|
center: "translate(-50%,-50%)",
|
|
11510
11523
|
top: "translate(-50%,0)",
|
|
11511
11524
|
"top-left": "translate(0,0)",
|
|
@@ -11516,7 +11529,7 @@ const Ic = function(r, e) {
|
|
|
11516
11529
|
left: "translate(0,-50%)",
|
|
11517
11530
|
right: "translate(-100%,-50%)"
|
|
11518
11531
|
};
|
|
11519
|
-
function
|
|
11532
|
+
function Pc(r) {
|
|
11520
11533
|
function e(t) {
|
|
11521
11534
|
if (!this._map) return;
|
|
11522
11535
|
const n = this._map.loaded() && !this._map.isMoving();
|
|
@@ -11525,12 +11538,12 @@ function Mc(r) {
|
|
|
11525
11538
|
this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? a = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (a = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);
|
|
11526
11539
|
let i = "";
|
|
11527
11540
|
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());
|
|
11528
|
-
const o = `${
|
|
11541
|
+
const o = `${Mc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${a}`;
|
|
11529
11542
|
this._element.style.transform = o;
|
|
11530
11543
|
}
|
|
11531
11544
|
r._update = e.bind(r);
|
|
11532
11545
|
}
|
|
11533
|
-
class
|
|
11546
|
+
class Rc {
|
|
11534
11547
|
constructor({ imageViewer: e }) {
|
|
11535
11548
|
y(this, "viewer");
|
|
11536
11549
|
y(this, "container");
|
|
@@ -11551,7 +11564,7 @@ class Pc {
|
|
|
11551
11564
|
this.container.remove();
|
|
11552
11565
|
}
|
|
11553
11566
|
}
|
|
11554
|
-
const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented:
|
|
11567
|
+
const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symbol("MapTiler:ImageViewer:Internal:pxToLngLatInternal"), { Evented: Oc } = k, zc = {
|
|
11555
11568
|
style: {
|
|
11556
11569
|
version: 8,
|
|
11557
11570
|
sources: {},
|
|
@@ -11570,14 +11583,14 @@ const ro = Symbol("MapTiler:ImageViewer:Internal:lngLatToPxInternal"), no = Symb
|
|
|
11570
11583
|
terrain: !1,
|
|
11571
11584
|
space: !1,
|
|
11572
11585
|
halo: !1,
|
|
11573
|
-
transformConstrain:
|
|
11574
|
-
},
|
|
11586
|
+
transformConstrain: _c
|
|
11587
|
+
}, Fc = {
|
|
11575
11588
|
debug: !1,
|
|
11576
11589
|
fitToBoundsControl: !0,
|
|
11577
11590
|
navigationControl: !0
|
|
11578
11591
|
};
|
|
11579
|
-
var
|
|
11580
|
-
class
|
|
11592
|
+
var Za, Xa, Wa;
|
|
11593
|
+
class $c extends (Wa = Oc, Xa = ro, Za = no, Wa) {
|
|
11581
11594
|
//#region constructor
|
|
11582
11595
|
/**
|
|
11583
11596
|
* The constructor for the ImageViewer.
|
|
@@ -11654,19 +11667,19 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
11654
11667
|
y(this, "shouldFitImageToViewport", !0);
|
|
11655
11668
|
// aliases for methods that are not exposed by the SDK
|
|
11656
11669
|
// but used internally (ImageMarkers)
|
|
11657
|
-
y(this,
|
|
11658
|
-
y(this,
|
|
11670
|
+
y(this, Xa, this.lngLatToPx.bind(this));
|
|
11671
|
+
y(this, Za, this.pxToLngLat.bind(this));
|
|
11659
11672
|
if (!t.imageUUID)
|
|
11660
11673
|
throw new Error("[ImageViewer]: `imageUUID` is required");
|
|
11661
11674
|
if (typeof t.container != "string" && !(t.container instanceof HTMLElement))
|
|
11662
11675
|
throw new Error("[ImageViewer]: `container` is required and must be a string or HTMLElement");
|
|
11663
11676
|
this.options = {
|
|
11664
|
-
...
|
|
11677
|
+
...Fc,
|
|
11665
11678
|
...t
|
|
11666
11679
|
};
|
|
11667
11680
|
const n = {
|
|
11668
11681
|
...this.options,
|
|
11669
|
-
...
|
|
11682
|
+
...zc
|
|
11670
11683
|
};
|
|
11671
11684
|
delete n.center, this.sdk = new Gi(n), this.sdk.telemetry.registerViewerType("ImageViewer");
|
|
11672
11685
|
const { imageUUID: a, debug: i } = t;
|
|
@@ -11721,11 +11734,11 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
11721
11734
|
var t, n, a;
|
|
11722
11735
|
try {
|
|
11723
11736
|
await this.sdk.onReadyAsync(), await this.fetchImageMetadata(), this.addImageSource(), this.options.navigationControl && this.sdk.addControl(
|
|
11724
|
-
new
|
|
11737
|
+
new Ya({
|
|
11725
11738
|
visualizePitch: !1,
|
|
11726
11739
|
visualizeRoll: !1
|
|
11727
11740
|
})
|
|
11728
|
-
), this.fitToBoundsControlInstance = new
|
|
11741
|
+
), this.fitToBoundsControlInstance = new Rc({ imageViewer: this }), this.options.fitToBoundsControl && this.sdk.addControl(this.fitToBoundsControlInstance), Ec({
|
|
11729
11742
|
map: this.sdk,
|
|
11730
11743
|
viewer: this,
|
|
11731
11744
|
lngLatToPx: (u) => this.lngLatToPx(u)
|
|
@@ -11767,9 +11780,9 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
11767
11780
|
* @returns {Promise<void>}
|
|
11768
11781
|
*/
|
|
11769
11782
|
async fetchImageMetadata() {
|
|
11770
|
-
const t =
|
|
11783
|
+
const t = Nc(this.imageUUID), n = await fetch(t);
|
|
11771
11784
|
if (!n.ok)
|
|
11772
|
-
throw new
|
|
11785
|
+
throw new Lc(n, "image metadata", "ImageViewer");
|
|
11773
11786
|
const a = await n.json();
|
|
11774
11787
|
this.imageMetadata = a, Object.freeze(this.imageMetadata);
|
|
11775
11788
|
}
|
|
@@ -11783,7 +11796,7 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
11783
11796
|
addImageSource() {
|
|
11784
11797
|
if (!this.imageMetadata)
|
|
11785
11798
|
throw this.fire("error", new ae("error", this, null, { error: new Error("[ImageViewer]: Image metadata not found") })), new Error("[ImageViewer]: Image metadata not found");
|
|
11786
|
-
const t =
|
|
11799
|
+
const t = jc(this.imageUUID), n = (s) => Math.pow(2, Math.ceil(Math.log(s) / Math.LN2));
|
|
11787
11800
|
this.imageSize = [this.imageMetadata.width, this.imageMetadata.height], this.paddedSizeMax = Math.max(n(this.imageSize[0]), n(this.imageSize[1]));
|
|
11788
11801
|
const a = this.pxToLngLat([0, 0]), i = this.pxToLngLat(this.imageSize), o = [a.lng, i.lat, i.lng, a.lat];
|
|
11789
11802
|
this.sdk.addSource("image", {
|
|
@@ -12118,7 +12131,7 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
12118
12131
|
* @returns {ImageViewer} The ImageViewer instance.
|
|
12119
12132
|
*/
|
|
12120
12133
|
fitImageBounds([t, n]) {
|
|
12121
|
-
const a = this.pxToLngLat(t), i = this.pxToLngLat(n), o =
|
|
12134
|
+
const a = this.pxToLngLat(t), i = this.pxToLngLat(n), o = Op.convert([a, i]);
|
|
12122
12135
|
return this.sdk.fitBounds(o), this;
|
|
12123
12136
|
}
|
|
12124
12137
|
//#region remove
|
|
@@ -12149,17 +12162,17 @@ class Fc extends (Xa = Rc, Za = ro, Ka = no, Xa) {
|
|
|
12149
12162
|
return t[0] >= a[0][0] && t[0] <= a[1][0] && t[1] >= a[0][1] && t[1] <= a[1][1];
|
|
12150
12163
|
}
|
|
12151
12164
|
}
|
|
12152
|
-
function
|
|
12165
|
+
function Nc(r) {
|
|
12153
12166
|
return `${ao()}/${r}/image.json?key=${j.apiKey}`;
|
|
12154
12167
|
}
|
|
12155
|
-
function
|
|
12168
|
+
function jc(r) {
|
|
12156
12169
|
return `${ao()}/${r}/{z}/{x}/{y}?key=${j.apiKey}`;
|
|
12157
12170
|
}
|
|
12158
12171
|
function ao() {
|
|
12159
12172
|
return "https://api.maptiler.com/images";
|
|
12160
12173
|
}
|
|
12161
|
-
const { Evented:
|
|
12162
|
-
class
|
|
12174
|
+
const { Evented: Dc } = k;
|
|
12175
|
+
class cf extends Dc {
|
|
12163
12176
|
constructor({ ...t }) {
|
|
12164
12177
|
super();
|
|
12165
12178
|
y(this, "viewer");
|
|
@@ -12174,11 +12187,11 @@ class uf extends jc {
|
|
|
12174
12187
|
* @returns {ImageViewerMarker} The ImageViewerMarker instance.
|
|
12175
12188
|
*/
|
|
12176
12189
|
addTo(t) {
|
|
12177
|
-
if (!(t instanceof
|
|
12190
|
+
if (!(t instanceof $c))
|
|
12178
12191
|
throw new Error("[ImageViewerMarker]: an ImageViewerMarker must be added to an instance of ImageViewer");
|
|
12179
|
-
this.viewer = t,
|
|
12192
|
+
this.viewer = t, Vc(this.marker, this, this.viewer[ro]);
|
|
12180
12193
|
const n = this.viewer.getSDKInternal();
|
|
12181
|
-
return this.setPosition(this.position),
|
|
12194
|
+
return this.setPosition(this.position), Pc(this.marker), this.marker.addTo(n), this;
|
|
12182
12195
|
}
|
|
12183
12196
|
/**
|
|
12184
12197
|
* Adds a class name to the ImageViewerMarker.
|
|
@@ -12428,16 +12441,16 @@ class uf extends jc {
|
|
|
12428
12441
|
return this.marker.togglePopup(), this;
|
|
12429
12442
|
}
|
|
12430
12443
|
}
|
|
12431
|
-
const
|
|
12432
|
-
class
|
|
12444
|
+
const Uc = ["dragstart", "drag", "dragend"], Bc = ["lngLat", "_defaultPrevented", "target"];
|
|
12445
|
+
class qc {
|
|
12433
12446
|
constructor(e, t, n) {
|
|
12434
12447
|
y(this, "type");
|
|
12435
12448
|
y(this, "target");
|
|
12436
12449
|
this.type = e, this.target = t, Object.assign(this, n);
|
|
12437
12450
|
}
|
|
12438
12451
|
}
|
|
12439
|
-
function
|
|
12440
|
-
|
|
12452
|
+
function Vc(r, e, t) {
|
|
12453
|
+
Uc.forEach((n) => {
|
|
12441
12454
|
r.on(n, (a) => {
|
|
12442
12455
|
var o, s;
|
|
12443
12456
|
if ((o = a.target) == null ? void 0 : o.getLngLat()) {
|
|
@@ -12446,14 +12459,14 @@ function qc(r, e, t) {
|
|
|
12446
12459
|
}
|
|
12447
12460
|
e.fire(
|
|
12448
12461
|
n,
|
|
12449
|
-
new
|
|
12450
|
-
...Object.fromEntries(Object.entries(a).filter(([l]) => !
|
|
12462
|
+
new qc(n, e, {
|
|
12463
|
+
...Object.fromEntries(Object.entries(a).filter(([l]) => !Bc.includes(l)))
|
|
12451
12464
|
})
|
|
12452
12465
|
);
|
|
12453
12466
|
});
|
|
12454
12467
|
});
|
|
12455
12468
|
}
|
|
12456
|
-
function
|
|
12469
|
+
function Fn(r) {
|
|
12457
12470
|
if (typeof DOMParser < "u") {
|
|
12458
12471
|
const e = new DOMParser().parseFromString(r, "application/xml");
|
|
12459
12472
|
if (e.querySelector("parsererror"))
|
|
@@ -12472,13 +12485,13 @@ function io(r, e) {
|
|
|
12472
12485
|
}
|
|
12473
12486
|
return !1;
|
|
12474
12487
|
}
|
|
12475
|
-
function
|
|
12488
|
+
function Na(r) {
|
|
12476
12489
|
if (typeof XMLSerializer < "u")
|
|
12477
12490
|
return new XMLSerializer().serializeToString(r);
|
|
12478
12491
|
throw new Error("No XML serializer found");
|
|
12479
12492
|
}
|
|
12480
12493
|
function oo(r) {
|
|
12481
|
-
const e = typeof r == "string" ?
|
|
12494
|
+
const e = typeof r == "string" ? Fn(r) : r;
|
|
12482
12495
|
if (!io(e, "gpx"))
|
|
12483
12496
|
throw new Error("The XML document is not valid GPX");
|
|
12484
12497
|
const t = Z(e, "trk"), n = Z(e, "rte"), a = Z(e, "wpt"), i = {
|
|
@@ -12486,54 +12499,54 @@ function oo(r) {
|
|
|
12486
12499
|
features: []
|
|
12487
12500
|
};
|
|
12488
12501
|
for (const o of Array.from(t)) {
|
|
12489
|
-
const s =
|
|
12502
|
+
const s = Zc(o);
|
|
12490
12503
|
s && i.features.push(s);
|
|
12491
12504
|
}
|
|
12492
12505
|
for (const o of Array.from(n)) {
|
|
12493
|
-
const s =
|
|
12506
|
+
const s = Xc(o);
|
|
12494
12507
|
s && i.features.push(s);
|
|
12495
12508
|
}
|
|
12496
12509
|
for (const o of Array.from(a))
|
|
12497
|
-
i.features.push(
|
|
12510
|
+
i.features.push(Wc(o));
|
|
12498
12511
|
return i;
|
|
12499
12512
|
}
|
|
12500
12513
|
function so(r, e) {
|
|
12501
12514
|
let t = r;
|
|
12502
|
-
if (typeof t == "string" && (t =
|
|
12515
|
+
if (typeof t == "string" && (t = Fn(t)), !io(t, "kml"))
|
|
12503
12516
|
throw new Error("The XML document is not valid KML");
|
|
12504
12517
|
const n = {
|
|
12505
12518
|
type: "FeatureCollection",
|
|
12506
12519
|
features: []
|
|
12507
12520
|
}, a = {}, i = {}, o = {}, s = Z(t, "Placemark"), l = Z(t, "Style"), u = Z(t, "StyleMap");
|
|
12508
12521
|
for (const c of Array.from(l)) {
|
|
12509
|
-
const p =
|
|
12522
|
+
const p = Da(e !== void 0 ? e(c) : Na(c)).toString(16);
|
|
12510
12523
|
a[`#${Ze(c, "id")}`] = p, i[p] = c;
|
|
12511
12524
|
}
|
|
12512
12525
|
for (const c of Array.from(u)) {
|
|
12513
|
-
a[`#${Ze(c, "id")}`] =
|
|
12526
|
+
a[`#${Ze(c, "id")}`] = Da(e !== void 0 ? e(c) : Na(c)).toString(16);
|
|
12514
12527
|
const p = Z(c, "Pair"), f = {};
|
|
12515
12528
|
for (const d of Array.from(p))
|
|
12516
12529
|
f[F(_(d, "key")) ?? ""] = F(_(d, "styleUrl"));
|
|
12517
12530
|
o[`#${Ze(c, "id")}`] = f;
|
|
12518
12531
|
}
|
|
12519
12532
|
for (const c of Array.from(s))
|
|
12520
|
-
n.features = n.features.concat(
|
|
12533
|
+
n.features = n.features.concat(Kc(c, a, i, o));
|
|
12521
12534
|
return n;
|
|
12522
12535
|
}
|
|
12523
|
-
function
|
|
12536
|
+
function ja(r) {
|
|
12524
12537
|
if (r === null) return ["#000000", 1];
|
|
12525
12538
|
let e = "", t = 1, n = r;
|
|
12526
12539
|
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];
|
|
12527
12540
|
}
|
|
12528
|
-
function
|
|
12541
|
+
function Gc(r) {
|
|
12529
12542
|
return co(r.split(" "));
|
|
12530
12543
|
}
|
|
12531
|
-
function
|
|
12544
|
+
function Hc(r) {
|
|
12532
12545
|
let e = Z(r, "coord");
|
|
12533
12546
|
const t = [], n = [];
|
|
12534
12547
|
e.length === 0 && (e = Z(r, "gx:coord"));
|
|
12535
12548
|
for (const i of Array.from(e))
|
|
12536
|
-
t.push(
|
|
12549
|
+
t.push(Gc(F(i) ?? ""));
|
|
12537
12550
|
const a = Z(r, "when");
|
|
12538
12551
|
for (const i of Array.from(a)) n.push(F(i));
|
|
12539
12552
|
return {
|
|
@@ -12562,18 +12575,18 @@ function Kt(r) {
|
|
|
12562
12575
|
else if (e[a] === "LineString")
|
|
12563
12576
|
s.push({
|
|
12564
12577
|
type: "LineString",
|
|
12565
|
-
coordinates:
|
|
12578
|
+
coordinates: Ba(F(_(t, "coordinates")) ?? "")
|
|
12566
12579
|
});
|
|
12567
12580
|
else if (e[a] === "Polygon") {
|
|
12568
12581
|
const u = Z(t, "LinearRing"), c = [];
|
|
12569
12582
|
for (o = 0; o < u.length; o++)
|
|
12570
|
-
c.push(
|
|
12583
|
+
c.push(Ba(F(_(u[o], "coordinates")) ?? ""));
|
|
12571
12584
|
s.push({
|
|
12572
12585
|
type: "Polygon",
|
|
12573
12586
|
coordinates: c
|
|
12574
12587
|
});
|
|
12575
12588
|
} else if (e[a] === "Track" || e[a] === "gx:Track") {
|
|
12576
|
-
const u =
|
|
12589
|
+
const u = Hc(t);
|
|
12577
12590
|
s.push({
|
|
12578
12591
|
type: "LineString",
|
|
12579
12592
|
coordinates: u.coords
|
|
@@ -12582,7 +12595,7 @@ function Kt(r) {
|
|
|
12582
12595
|
}
|
|
12583
12596
|
return { geoms: s, coordTimes: l };
|
|
12584
12597
|
}
|
|
12585
|
-
function
|
|
12598
|
+
function Kc(r, e, t, n) {
|
|
12586
12599
|
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");
|
|
12587
12600
|
let d, h = F(_(r, "styleUrl")), m = _(r, "LineStyle"), g = _(r, "PolyStyle");
|
|
12588
12601
|
if (!a.geoms.length) return [];
|
|
@@ -12606,11 +12619,11 @@ function Hc(r, e, t, n) {
|
|
|
12606
12619
|
v && x && (i.timespan = { begin: v, end: x });
|
|
12607
12620
|
}
|
|
12608
12621
|
if (c !== null && (i.timestamp = F(_(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), m !== null) {
|
|
12609
|
-
const v =
|
|
12622
|
+
const v = ja(F(_(m, "color"))), x = v[0], C = v[1], L = Number.parseFloat(F(_(m, "width")) ?? "");
|
|
12610
12623
|
x && (i.stroke = x), Number.isNaN(C) || (i["stroke-opacity"] = C), Number.isNaN(L) || (i["stroke-width"] = L);
|
|
12611
12624
|
}
|
|
12612
12625
|
if (g) {
|
|
12613
|
-
const v =
|
|
12626
|
+
const v = ja(F(_(g, "color"))), x = v[0], C = v[1], L = F(_(g, "fill")), A = F(_(g, "outline"));
|
|
12614
12627
|
x && (i.fill = x), Number.isNaN(C) || (i["fill-opacity"] = C), L && (i["fill-opacity"] = L === "1" ? i["fill-opacity"] || 1 : 0), A && (i["stroke-opacity"] = A === "1" ? i["stroke-opacity"] || 1 : 0);
|
|
12615
12628
|
}
|
|
12616
12629
|
if (p) {
|
|
@@ -12647,7 +12660,7 @@ function lo(r, e) {
|
|
|
12647
12660
|
};
|
|
12648
12661
|
}
|
|
12649
12662
|
}
|
|
12650
|
-
function
|
|
12663
|
+
function Zc(r) {
|
|
12651
12664
|
const e = Z(r, "trkseg"), t = [], n = [], a = [];
|
|
12652
12665
|
let i;
|
|
12653
12666
|
for (let s = 0; s < e.length; s++)
|
|
@@ -12659,7 +12672,7 @@ function Kc(r) {
|
|
|
12659
12672
|
}
|
|
12660
12673
|
if (t.length === 0) return;
|
|
12661
12674
|
const o = {
|
|
12662
|
-
|
|
12675
|
+
...$n(r),
|
|
12663
12676
|
...uo(_(r, "extensions"))
|
|
12664
12677
|
};
|
|
12665
12678
|
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 ? {
|
|
@@ -12678,12 +12691,12 @@ function Kc(r) {
|
|
|
12678
12691
|
}
|
|
12679
12692
|
};
|
|
12680
12693
|
}
|
|
12681
|
-
function
|
|
12694
|
+
function Xc(r) {
|
|
12682
12695
|
const e = lo(r, "rtept");
|
|
12683
12696
|
return e === void 0 ? void 0 : {
|
|
12684
12697
|
type: "Feature",
|
|
12685
12698
|
properties: {
|
|
12686
|
-
|
|
12699
|
+
...$n(r),
|
|
12687
12700
|
...uo(_(r, "extensions"))
|
|
12688
12701
|
},
|
|
12689
12702
|
geometry: {
|
|
@@ -12692,10 +12705,10 @@ function Zc(r) {
|
|
|
12692
12705
|
}
|
|
12693
12706
|
};
|
|
12694
12707
|
}
|
|
12695
|
-
function
|
|
12708
|
+
function Wc(r) {
|
|
12696
12709
|
return {
|
|
12697
12710
|
type: "Feature",
|
|
12698
|
-
properties: {
|
|
12711
|
+
properties: { ...$n(r), ...an(r, ["sym"]) },
|
|
12699
12712
|
geometry: {
|
|
12700
12713
|
type: "Point",
|
|
12701
12714
|
coordinates: fo(r).coordinates
|
|
@@ -12713,7 +12726,7 @@ function uo(r) {
|
|
|
12713
12726
|
}
|
|
12714
12727
|
return e;
|
|
12715
12728
|
}
|
|
12716
|
-
function
|
|
12729
|
+
function $n(r) {
|
|
12717
12730
|
const e = an(r, ["name", "cmt", "desc", "type", "time", "keywords"]), t = Z(r, "link");
|
|
12718
12731
|
if (t.length !== 0) {
|
|
12719
12732
|
e.links = [];
|
|
@@ -12727,7 +12740,7 @@ function Fn(r) {
|
|
|
12727
12740
|
}
|
|
12728
12741
|
return e;
|
|
12729
12742
|
}
|
|
12730
|
-
function
|
|
12743
|
+
function Da(r) {
|
|
12731
12744
|
let e = 0;
|
|
12732
12745
|
if (!r || !r.length) return e;
|
|
12733
12746
|
for (let t = 0; t < r.length; t++)
|
|
@@ -12740,7 +12753,7 @@ function Z(r, e) {
|
|
|
12740
12753
|
function Ze(r, e) {
|
|
12741
12754
|
return r.getAttribute(e);
|
|
12742
12755
|
}
|
|
12743
|
-
function
|
|
12756
|
+
function Ua(r, e) {
|
|
12744
12757
|
return Number.parseFloat(Ze(r, e) ?? "0");
|
|
12745
12758
|
}
|
|
12746
12759
|
function _(r, e) {
|
|
@@ -12766,13 +12779,13 @@ function an(r, e) {
|
|
|
12766
12779
|
function po(r) {
|
|
12767
12780
|
return co(r.replace(/\s*/g, "").split(","));
|
|
12768
12781
|
}
|
|
12769
|
-
function
|
|
12782
|
+
function Ba(r) {
|
|
12770
12783
|
const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
|
|
12771
12784
|
for (const n of e) t.push(po(n));
|
|
12772
12785
|
return t;
|
|
12773
12786
|
}
|
|
12774
12787
|
function fo(r) {
|
|
12775
|
-
const e = [
|
|
12788
|
+
const e = [Ua(r, "lon"), Ua(r, "lat")], t = _(r, "ele"), n = _(r, "gpxtpx:hr") || _(r, "hr"), a = _(r, "time");
|
|
12776
12789
|
let i;
|
|
12777
12790
|
return t && (i = Number.parseFloat(F(t) ?? "0"), Number.isNaN(i) || e.push(i)), {
|
|
12778
12791
|
coordinates: e,
|
|
@@ -12780,10 +12793,10 @@ function fo(r) {
|
|
|
12780
12793
|
heartRate: n !== null ? Number.parseFloat(F(n) ?? "0") : null
|
|
12781
12794
|
};
|
|
12782
12795
|
}
|
|
12783
|
-
function
|
|
12796
|
+
function Jc(r) {
|
|
12784
12797
|
let e = r;
|
|
12785
12798
|
try {
|
|
12786
|
-
typeof e == "string" && (e =
|
|
12799
|
+
typeof e == "string" && (e = Fn(e));
|
|
12787
12800
|
} catch {
|
|
12788
12801
|
return null;
|
|
12789
12802
|
}
|
|
@@ -12797,8 +12810,8 @@ function Wc(r) {
|
|
|
12797
12810
|
}
|
|
12798
12811
|
return null;
|
|
12799
12812
|
}
|
|
12800
|
-
async function
|
|
12801
|
-
const t = e.download ?? !1, n = await
|
|
12813
|
+
async function Qc(r, e = {}) {
|
|
12814
|
+
const t = e.download ?? !1, n = await ep(r);
|
|
12802
12815
|
if (t) {
|
|
12803
12816
|
const a = e.filename ?? "maptiler_screenshot.png", i = document.createElement("a");
|
|
12804
12817
|
i.style.display = "none", document.body.appendChild(i), i.href = URL.createObjectURL(n), i.download = a, i.click(), setTimeout(() => {
|
|
@@ -12807,7 +12820,7 @@ async function Jc(r, e = {}) {
|
|
|
12807
12820
|
}
|
|
12808
12821
|
return n;
|
|
12809
12822
|
}
|
|
12810
|
-
function
|
|
12823
|
+
function ep(r) {
|
|
12811
12824
|
return new Promise((e, t) => {
|
|
12812
12825
|
r.redraw(), r.once("idle", () => {
|
|
12813
12826
|
r.getCanvas().toBlob((n) => {
|
|
@@ -12883,7 +12896,7 @@ function ho(r, e) {
|
|
|
12883
12896
|
function mo(r, e) {
|
|
12884
12897
|
return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
|
|
12885
12898
|
}
|
|
12886
|
-
function
|
|
12899
|
+
function Nn(r) {
|
|
12887
12900
|
const e = r.trimStart(), t = `${e}${" ".repeat(r.length - e.length)}`, n = Array.from(t);
|
|
12888
12901
|
if (!n.every((s) => s === " " || s === "_"))
|
|
12889
12902
|
throw new Error("A dash pattern must be composed only of whitespace and underscore characters.");
|
|
@@ -12959,7 +12972,7 @@ function qt(r) {
|
|
|
12959
12972
|
const e = r.toString(16);
|
|
12960
12973
|
return e.length === 1 ? `0${e}` : e;
|
|
12961
12974
|
}
|
|
12962
|
-
function
|
|
12975
|
+
function tp(r) {
|
|
12963
12976
|
return `#${qt(r[0])}${qt(r[1])}${qt(r[2])}${r.length === 4 ? qt(r[3]) : ""}`;
|
|
12964
12977
|
}
|
|
12965
12978
|
class T extends Array {
|
|
@@ -13053,7 +13066,7 @@ class T extends Array {
|
|
|
13053
13066
|
smooth: !0,
|
|
13054
13067
|
withAlpha: !1
|
|
13055
13068
|
}) {
|
|
13056
|
-
return
|
|
13069
|
+
return tp(this.getColor(t, n));
|
|
13057
13070
|
}
|
|
13058
13071
|
/**
|
|
13059
13072
|
* Get the color of the color ramp at a relative position in [0, 1]
|
|
@@ -13896,7 +13909,7 @@ const vo = {
|
|
|
13896
13909
|
]
|
|
13897
13910
|
})
|
|
13898
13911
|
};
|
|
13899
|
-
async function
|
|
13912
|
+
async function rp(r, e, t = {}) {
|
|
13900
13913
|
var a, i;
|
|
13901
13914
|
if (!e.sourceId && !e.data)
|
|
13902
13915
|
throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
|
|
@@ -13911,18 +13924,18 @@ async function tp(r, e, t = {}) {
|
|
|
13911
13924
|
const s = await (await fetch(n, t)).text();
|
|
13912
13925
|
n = so(s);
|
|
13913
13926
|
} else {
|
|
13914
|
-
const o = Qo(n) ??
|
|
13927
|
+
const o = Qo(n) ?? Jc(n);
|
|
13915
13928
|
o && (n = o);
|
|
13916
13929
|
}
|
|
13917
13930
|
if (!n)
|
|
13918
13931
|
throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
|
|
13919
13932
|
}
|
|
13920
|
-
return
|
|
13933
|
+
return np(r, {
|
|
13921
13934
|
...e,
|
|
13922
13935
|
data: n
|
|
13923
13936
|
});
|
|
13924
13937
|
}
|
|
13925
|
-
function
|
|
13938
|
+
function np(r, e) {
|
|
13926
13939
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13927
13940
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13928
13941
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = {
|
|
@@ -13937,7 +13950,7 @@ function rp(r, e) {
|
|
|
13937
13950
|
const i = e.lineWidth ?? 3, o = e.lineColor ?? kr(), s = e.lineOpacity ?? 1, l = e.lineBlur ?? 0, u = e.lineGapWidth ?? 0;
|
|
13938
13951
|
let c = e.lineDashArray ?? null;
|
|
13939
13952
|
const p = e.outlineWidth ?? 1, f = e.outlineColor ?? "#FFFFFF", d = e.outlineOpacity ?? 1, h = e.outlineBlur ?? 0;
|
|
13940
|
-
if (typeof c == "string" && (c =
|
|
13953
|
+
if (typeof c == "string" && (c = Nn(c)), e.outline === !0) {
|
|
13941
13954
|
const m = `${n}_outline`;
|
|
13942
13955
|
a.polylineOutlineLayerId = m, r.addLayer(
|
|
13943
13956
|
{
|
|
@@ -13988,7 +14001,7 @@ function rp(r, e) {
|
|
|
13988
14001
|
e.beforeId
|
|
13989
14002
|
), a;
|
|
13990
14003
|
}
|
|
13991
|
-
function
|
|
14004
|
+
function ap(r, e) {
|
|
13992
14005
|
if (e.layerId && r.getLayer(e.layerId))
|
|
13993
14006
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
13994
14007
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = {
|
|
@@ -14005,7 +14018,7 @@ function np(r, e) {
|
|
|
14005
14018
|
}
|
|
14006
14019
|
let i = e.outlineDashArray ?? null;
|
|
14007
14020
|
const o = e.outlineWidth ?? 1, s = e.outlineColor ?? "#FFFFFF", l = e.outlineOpacity ?? 1, u = e.outlineBlur ?? 0, c = e.fillColor ?? kr(), p = e.fillOpacity ?? 1, f = e.outlinePosition ?? "center", d = e.pattern ?? null;
|
|
14008
|
-
typeof i == "string" && (i =
|
|
14021
|
+
typeof i == "string" && (i = Nn(i));
|
|
14009
14022
|
const h = (m = null) => {
|
|
14010
14023
|
if (r.addLayer(
|
|
14011
14024
|
{
|
|
@@ -14071,7 +14084,7 @@ function np(r, e) {
|
|
|
14071
14084
|
console.error("Could not load the pattern image.", m.message), h();
|
|
14072
14085
|
}) : h(), a;
|
|
14073
14086
|
}
|
|
14074
|
-
function
|
|
14087
|
+
function ip(r, e) {
|
|
14075
14088
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14076
14089
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14077
14090
|
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, i = 20, o = Array.isArray(e.pointColor) ? e.pointColor : vo.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";
|
|
@@ -14171,12 +14184,12 @@ function ap(r, e) {
|
|
|
14171
14184
|
{ zoom: 16, value: t * 1 }
|
|
14172
14185
|
]) : t;
|
|
14173
14186
|
if (e.property && Array.isArray(e.pointColor)) {
|
|
14174
|
-
const N = Array.from({ length: i }, (le,
|
|
14175
|
-
const
|
|
14187
|
+
const N = Array.from({ length: i }, (le, We) => {
|
|
14188
|
+
const Ye = s.min + We * (s.max - s.min) / (i - 1);
|
|
14176
14189
|
return {
|
|
14177
|
-
value:
|
|
14178
|
-
pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (
|
|
14179
|
-
color: typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(
|
|
14190
|
+
value: Ye,
|
|
14191
|
+
pointRadius: typeof e.pointRadius == "number" ? e.pointRadius : t + (n - t) * (We / (i - 1)) ** 0.5,
|
|
14192
|
+
color: typeof e.pointColor == "string" ? e.pointColor : o.getColorHex(Ye)
|
|
14180
14193
|
};
|
|
14181
14194
|
});
|
|
14182
14195
|
L = ln(N, e.property), A = un(N, e.property, b);
|
|
@@ -14238,7 +14251,7 @@ function ap(r, e) {
|
|
|
14238
14251
|
}
|
|
14239
14252
|
return C;
|
|
14240
14253
|
}
|
|
14241
|
-
function
|
|
14254
|
+
function op(r, e) {
|
|
14242
14255
|
if (e.layerId && r.getLayer(e.layerId))
|
|
14243
14256
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
14244
14257
|
const t = e.sourceId ?? Pt(), n = e.layerId ?? Rt(), a = e.minzoom ?? 0, i = e.maxzoom ?? 23, o = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
@@ -14295,16 +14308,16 @@ function ip(r, e) {
|
|
|
14295
14308
|
e.beforeId
|
|
14296
14309
|
), b;
|
|
14297
14310
|
}
|
|
14298
|
-
const
|
|
14311
|
+
const pf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14299
14312
|
__proto__: null,
|
|
14300
|
-
addHeatmap:
|
|
14301
|
-
addPoint:
|
|
14302
|
-
addPolygon:
|
|
14303
|
-
addPolyline:
|
|
14313
|
+
addHeatmap: op,
|
|
14314
|
+
addPoint: ip,
|
|
14315
|
+
addPolygon: ap,
|
|
14316
|
+
addPolyline: rp,
|
|
14304
14317
|
colorDrivenByProperty: ln,
|
|
14305
14318
|
colorPalettes: on,
|
|
14306
14319
|
computeRampedOutlineWidth: ho,
|
|
14307
|
-
dashArrayMaker:
|
|
14320
|
+
dashArrayMaker: Nn,
|
|
14308
14321
|
generateRandomLayerName: Rt,
|
|
14309
14322
|
generateRandomSourceName: Pt,
|
|
14310
14323
|
getRandomColor: kr,
|
|
@@ -14316,9 +14329,9 @@ const cf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14316
14329
|
radiusDrivenByPropertyHeatmap: yo,
|
|
14317
14330
|
rampedOptionsToLayerPaintSpec: z,
|
|
14318
14331
|
rampedPropertyValueWeight: mo,
|
|
14319
|
-
takeScreenshot:
|
|
14332
|
+
takeScreenshot: Qc
|
|
14320
14333
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14321
|
-
function
|
|
14334
|
+
function sp(...r) {
|
|
14322
14335
|
const e = r[0].length;
|
|
14323
14336
|
return r.every((t) => t.length === e);
|
|
14324
14337
|
}
|
|
@@ -14333,7 +14346,7 @@ function bo(r) {
|
|
|
14333
14346
|
return r.map((e, t, n) => {
|
|
14334
14347
|
if (typeof e == "number")
|
|
14335
14348
|
return e;
|
|
14336
|
-
const [a, i] =
|
|
14349
|
+
const [a, i] = up(n, t), [o, s] = lp(n, t);
|
|
14337
14350
|
if (a === null || i === null)
|
|
14338
14351
|
return n[t + 1];
|
|
14339
14352
|
if (o === null || s === null)
|
|
@@ -14342,36 +14355,36 @@ function bo(r) {
|
|
|
14342
14355
|
return ar(i, s, l);
|
|
14343
14356
|
});
|
|
14344
14357
|
}
|
|
14345
|
-
function
|
|
14358
|
+
function lp(r, e) {
|
|
14346
14359
|
for (let t = e + 1; t < r.length; t++)
|
|
14347
14360
|
if (r[t] !== null)
|
|
14348
14361
|
return [t, r[t]];
|
|
14349
14362
|
return [null, null];
|
|
14350
14363
|
}
|
|
14351
|
-
function
|
|
14364
|
+
function up(r, e) {
|
|
14352
14365
|
for (let t = e - 1; t >= 0; t--)
|
|
14353
14366
|
if (r[t] !== null)
|
|
14354
14367
|
return [t, r[t]];
|
|
14355
14368
|
return [null, null];
|
|
14356
14369
|
}
|
|
14357
|
-
const
|
|
14370
|
+
const cp = {
|
|
14358
14371
|
defaultEasing: "Linear",
|
|
14359
14372
|
pathSmoothing: {
|
|
14360
14373
|
resolution: 20,
|
|
14361
14374
|
epsilon: 5
|
|
14362
14375
|
}
|
|
14363
|
-
},
|
|
14364
|
-
function
|
|
14376
|
+
}, qa = ["MultiPoint", "LineString", "MultiLineString", "Polygon"];
|
|
14377
|
+
function pp(r, e = {}) {
|
|
14365
14378
|
const { defaultEasing: t, pathSmoothing: n, ignoreFields: a } = {
|
|
14366
|
-
...
|
|
14379
|
+
...cp,
|
|
14367
14380
|
...e
|
|
14368
14381
|
}, i = r.geometry, o = r.properties ?? {}, s = o["@easing"];
|
|
14369
14382
|
s || console.warn(`[parseGeoJSONFeatureToKeyframes]: No '@easing' property found in GeoJSON properties, using default easing ${t}`);
|
|
14370
14383
|
const l = o["@delta"];
|
|
14371
14384
|
if (l || console.warn("[parseGeoJSONFeatureToKeyframes]: No '@delta' property found in GeoJSON properties, delta for each frame will default to its index divided by the total"), !i.type)
|
|
14372
14385
|
throw new Error("[parseGeoJSONFeatureToKeyframes]: No geometry found in feature");
|
|
14373
|
-
if (!
|
|
14374
|
-
throw new Error(`[parseGeoJSONFeatureToKeyframes]: Geometry type '${i.type}' is not supported. Accepted types are: ${
|
|
14386
|
+
if (!qa.includes(i.type))
|
|
14387
|
+
throw new Error(`[parseGeoJSONFeatureToKeyframes]: Geometry type '${i.type}' is not supported. Accepted types are: ${qa.join(", ")}`);
|
|
14375
14388
|
const c = i.type !== "LineString" && i.type !== "MultiPoint" ? i.coordinates.flat() : i.coordinates, p = c.map((g) => g.length > 2 ? g[2] : null), f = p.every((g) => g === null), d = Object.entries({
|
|
14376
14389
|
...o,
|
|
14377
14390
|
...!f && { altitude: p }
|
|
@@ -14380,28 +14393,28 @@ function cp(r, e = {}) {
|
|
|
14380
14393
|
[b]: v
|
|
14381
14394
|
}, {}), h = l ?? c.map((g, b) => b / c.length), m = s ?? h.map(() => t ?? "Linear");
|
|
14382
14395
|
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) {
|
|
14383
|
-
const g =
|
|
14396
|
+
const g = fp(c, n.resolution, n.epsilon), b = bo(Va([0, 1], g.length)), v = b.map(() => t ?? "Linear"), x = Object.entries(d).reduce((C, [L, A]) => {
|
|
14384
14397
|
if (!Array.isArray(A))
|
|
14385
14398
|
return C;
|
|
14386
|
-
const N = g.length, le =
|
|
14399
|
+
const N = g.length, le = Va(A, N);
|
|
14387
14400
|
return {
|
|
14388
14401
|
...C,
|
|
14389
14402
|
[L]: le
|
|
14390
14403
|
};
|
|
14391
14404
|
}, {});
|
|
14392
|
-
return
|
|
14405
|
+
return Ga(g, b, v, x);
|
|
14393
14406
|
}
|
|
14394
|
-
return
|
|
14407
|
+
return Ga(c, h, m, d);
|
|
14395
14408
|
}
|
|
14396
|
-
function
|
|
14409
|
+
function Va(r, e) {
|
|
14397
14410
|
const t = r.map((n, a) => {
|
|
14398
14411
|
const i = a / (r.length - 1);
|
|
14399
14412
|
return Math.round(i * (e - 1));
|
|
14400
14413
|
});
|
|
14401
14414
|
return Array.from({ length: e }, (n, a) => t.includes(a) ? r[t.indexOf(a)] : null);
|
|
14402
14415
|
}
|
|
14403
|
-
function
|
|
14404
|
-
if (!
|
|
14416
|
+
function Ga(r, e, t, n = {}) {
|
|
14417
|
+
if (!sp(r, e, t, ...Object.values(n)))
|
|
14405
14418
|
throw new Error(`
|
|
14406
14419
|
[parseGeoJSONFeatureToKeyframes]: If smoothing is not applied, coordinates, deltas, easings and property arrays must be the same length
|
|
14407
14420
|
|
|
@@ -14440,8 +14453,8 @@ function Br(r, e, t, n, a, i, o, s) {
|
|
|
14440
14453
|
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];
|
|
14441
14454
|
s - p > 1e-10 ? r.push([f, d]) : r[r.length - 1] = [f, d];
|
|
14442
14455
|
}
|
|
14443
|
-
function
|
|
14444
|
-
const n = typeof t == "number" ?
|
|
14456
|
+
function fp(r, e = 20, t) {
|
|
14457
|
+
const n = typeof t == "number" ? hp(r, t) : r;
|
|
14445
14458
|
if (n.length < 4) return n;
|
|
14446
14459
|
typeof t == "number" && (n[n.length - 1] = [...r[r.length - 1]]);
|
|
14447
14460
|
const a = [], i = [2 * n[0][0] - n[1][0], 2 * n[0][1] - n[1][1]];
|
|
@@ -14454,15 +14467,15 @@ function pp(r, e = 20, t) {
|
|
|
14454
14467
|
const s = [2 * n[n.length - 1][0] - n[n.length - 2][0], 2 * n[n.length - 1][1] - n[n.length - 2][1]];
|
|
14455
14468
|
return Br(a, n[n.length - 3], n[n.length - 2], n[n.length - 1], s, e, o, 1), a;
|
|
14456
14469
|
}
|
|
14457
|
-
function
|
|
14470
|
+
function dp(r) {
|
|
14458
14471
|
return r.map((e, t) => {
|
|
14459
14472
|
if (t === 0) return 0;
|
|
14460
14473
|
const n = r[t - 1], a = new Ne(e[0], e[1]), i = new Ne(n[0], n[1]);
|
|
14461
14474
|
return a.distanceTo(i);
|
|
14462
14475
|
}).reduce((e, t) => e + t, 0) / r.length;
|
|
14463
14476
|
}
|
|
14464
|
-
function
|
|
14465
|
-
const t =
|
|
14477
|
+
function hp(r, e) {
|
|
14478
|
+
const t = mp(r, dp(r) * e);
|
|
14466
14479
|
if (t.length < 2) return t;
|
|
14467
14480
|
const n = [t[0]];
|
|
14468
14481
|
let a = t[0];
|
|
@@ -14472,7 +14485,7 @@ function dp(r, e) {
|
|
|
14472
14485
|
}
|
|
14473
14486
|
return n.push([...r[r.length - 1]]), n;
|
|
14474
14487
|
}
|
|
14475
|
-
function
|
|
14488
|
+
function mp(r, e = 10) {
|
|
14476
14489
|
if (r.length < 2) return r;
|
|
14477
14490
|
const t = [r[0]];
|
|
14478
14491
|
let n = e;
|
|
@@ -14488,7 +14501,7 @@ function hp(r, e = 10) {
|
|
|
14488
14501
|
const a = r[r.length - 1], i = t[t.length - 1];
|
|
14489
14502
|
return (i[0] !== a[0] || i[1] !== a[1]) && t.push([a[0], a[1]]), t;
|
|
14490
14503
|
}
|
|
14491
|
-
const
|
|
14504
|
+
const Ha = {
|
|
14492
14505
|
animations: new Array(),
|
|
14493
14506
|
running: !1,
|
|
14494
14507
|
/**
|
|
@@ -14545,84 +14558,84 @@ const Ga = {
|
|
|
14545
14558
|
"animationend",
|
|
14546
14559
|
"keyframe",
|
|
14547
14560
|
"iteration"
|
|
14548
|
-
],
|
|
14549
|
-
Linear:
|
|
14550
|
-
QuadraticIn:
|
|
14551
|
-
QuadraticOut:
|
|
14552
|
-
QuadraticInOut:
|
|
14553
|
-
CubicIn:
|
|
14554
|
-
CubicOut:
|
|
14555
|
-
CubicInOut:
|
|
14556
|
-
SinusoidalIn:
|
|
14557
|
-
SinusoidalOut:
|
|
14558
|
-
SinusoidalInOut:
|
|
14559
|
-
ExponentialIn:
|
|
14560
|
-
ExponentialOut:
|
|
14561
|
-
ExponentialInOut:
|
|
14562
|
-
ElasticIn:
|
|
14563
|
-
ElasticOut:
|
|
14564
|
-
ElasticInOut:
|
|
14561
|
+
], yp = {
|
|
14562
|
+
Linear: gp,
|
|
14563
|
+
QuadraticIn: vp,
|
|
14564
|
+
QuadraticOut: bp,
|
|
14565
|
+
QuadraticInOut: wp,
|
|
14566
|
+
CubicIn: Sp,
|
|
14567
|
+
CubicOut: xp,
|
|
14568
|
+
CubicInOut: kp,
|
|
14569
|
+
SinusoidalIn: Ep,
|
|
14570
|
+
SinusoidalOut: Lp,
|
|
14571
|
+
SinusoidalInOut: Cp,
|
|
14572
|
+
ExponentialIn: Ap,
|
|
14573
|
+
ExponentialOut: Tp,
|
|
14574
|
+
ExponentialInOut: Ip,
|
|
14575
|
+
ElasticIn: _p,
|
|
14576
|
+
ElasticOut: Mp,
|
|
14577
|
+
ElasticInOut: Pp,
|
|
14565
14578
|
BounceIn: wo,
|
|
14566
|
-
BounceOut:
|
|
14567
|
-
BounceInOut:
|
|
14579
|
+
BounceOut: jn,
|
|
14580
|
+
BounceInOut: Rp
|
|
14568
14581
|
};
|
|
14569
|
-
function
|
|
14582
|
+
function gp(r) {
|
|
14570
14583
|
return r;
|
|
14571
14584
|
}
|
|
14572
|
-
function
|
|
14585
|
+
function vp(r) {
|
|
14573
14586
|
return r * r;
|
|
14574
14587
|
}
|
|
14575
|
-
function
|
|
14588
|
+
function bp(r) {
|
|
14576
14589
|
return r * (2 - r);
|
|
14577
14590
|
}
|
|
14578
|
-
function
|
|
14591
|
+
function wp(r) {
|
|
14579
14592
|
let e = r * 2;
|
|
14580
14593
|
return e < 1 ? 0.5 * e * e : (e -= 1, -0.5 * (e * (e - 2) - 1));
|
|
14581
14594
|
}
|
|
14582
|
-
function
|
|
14595
|
+
function Sp(r) {
|
|
14583
14596
|
return r * r * r;
|
|
14584
14597
|
}
|
|
14585
|
-
function
|
|
14598
|
+
function xp(r) {
|
|
14586
14599
|
return --r * r * r + 1;
|
|
14587
14600
|
}
|
|
14588
|
-
function
|
|
14601
|
+
function kp(r) {
|
|
14589
14602
|
let e = r * 2;
|
|
14590
14603
|
return e < 1 ? 0.5 * e * e * e : (e -= 2, 0.5 * (e * e * e + 2));
|
|
14591
14604
|
}
|
|
14592
|
-
function
|
|
14605
|
+
function Ep(r) {
|
|
14593
14606
|
return 1 - Math.cos(r * Math.PI / 2);
|
|
14594
14607
|
}
|
|
14595
|
-
function
|
|
14608
|
+
function Lp(r) {
|
|
14596
14609
|
return Math.sin(r * Math.PI / 2);
|
|
14597
14610
|
}
|
|
14598
|
-
function
|
|
14611
|
+
function Cp(r) {
|
|
14599
14612
|
return 0.5 * (1 - Math.cos(Math.PI * r));
|
|
14600
14613
|
}
|
|
14601
|
-
function
|
|
14614
|
+
function Ap(r) {
|
|
14602
14615
|
return r === 0 ? 0 : 1024 ** (r - 1);
|
|
14603
14616
|
}
|
|
14604
|
-
function
|
|
14617
|
+
function Tp(r) {
|
|
14605
14618
|
return r === 1 ? 1 : 1 - 2 ** (-10 * r);
|
|
14606
14619
|
}
|
|
14607
|
-
function
|
|
14620
|
+
function Ip(r) {
|
|
14608
14621
|
if (r === 0) return 0;
|
|
14609
14622
|
if (r === 1) return 1;
|
|
14610
14623
|
const e = r * 2;
|
|
14611
14624
|
return e < 1 ? 0.5 * 1024 ** (e - 1) : 0.5 * (-(2 ** (-10 * (e - 1))) + 2);
|
|
14612
14625
|
}
|
|
14613
|
-
function
|
|
14626
|
+
function _p(r) {
|
|
14614
14627
|
let e = 0.1;
|
|
14615
14628
|
const t = 0.4;
|
|
14616
14629
|
let n;
|
|
14617
14630
|
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)));
|
|
14618
14631
|
}
|
|
14619
|
-
function
|
|
14632
|
+
function Mp(r) {
|
|
14620
14633
|
let e = 0.1;
|
|
14621
14634
|
const t = 0.4;
|
|
14622
14635
|
let n;
|
|
14623
14636
|
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);
|
|
14624
14637
|
}
|
|
14625
|
-
function
|
|
14638
|
+
function Pp(r) {
|
|
14626
14639
|
let e = 0.1;
|
|
14627
14640
|
const t = 0.4;
|
|
14628
14641
|
let n;
|
|
@@ -14638,9 +14651,9 @@ function Mp(r) {
|
|
|
14638
14651
|
return e * 2 ** (-10 * i) * Math.sin((i - n) * (2 * Math.PI) / t) * 0.5 + 1;
|
|
14639
14652
|
}
|
|
14640
14653
|
function wo(r) {
|
|
14641
|
-
return 1 -
|
|
14654
|
+
return 1 - jn(1 - r);
|
|
14642
14655
|
}
|
|
14643
|
-
function
|
|
14656
|
+
function jn(r) {
|
|
14644
14657
|
if (r < 1 / 2.75)
|
|
14645
14658
|
return 7.5625 * r * r;
|
|
14646
14659
|
if (r < 2 / 2.75) {
|
|
@@ -14653,10 +14666,10 @@ function Nn(r) {
|
|
|
14653
14666
|
const e = r - 2.625 / 2.75;
|
|
14654
14667
|
return 7.5625 * e * e + 0.984375;
|
|
14655
14668
|
}
|
|
14656
|
-
function
|
|
14657
|
-
return r < 0.5 ? wo(r * 2) * 0.5 :
|
|
14669
|
+
function Rp(r) {
|
|
14670
|
+
return r < 0.5 ? wo(r * 2) * 0.5 : jn(r * 2 - 1) * 0.5 + 0.5;
|
|
14658
14671
|
}
|
|
14659
|
-
class
|
|
14672
|
+
class Dn {
|
|
14660
14673
|
constructor({ keyframes: e, duration: t, iterations: n, manualMode: a, delay: i }) {
|
|
14661
14674
|
y(this, "playing", !1);
|
|
14662
14675
|
/**
|
|
@@ -14714,8 +14727,8 @@ class jn {
|
|
|
14714
14727
|
...c,
|
|
14715
14728
|
props: o.reduce((f, d) => (f[d] = u[d][p], f), {}),
|
|
14716
14729
|
easing: c.easing ?? "Linear",
|
|
14717
|
-
id:
|
|
14718
|
-
})), this.duration = t, this.iterations = n, this.delay = i ?? 0, this.playbackRate = 1, this.effectiveDuration = t / this.playbackRate, this.currentTime = 0, this.currentDelta = 0, a ||
|
|
14730
|
+
id: dn()
|
|
14731
|
+
})), this.duration = t, this.iterations = n, this.delay = i ?? 0, this.playbackRate = 1, this.effectiveDuration = t / this.playbackRate, this.currentTime = 0, this.currentDelta = 0, a || Ha.add(this);
|
|
14719
14732
|
}
|
|
14720
14733
|
/**
|
|
14721
14734
|
* Indicates if the animation is currently playing
|
|
@@ -14800,7 +14813,7 @@ class jn {
|
|
|
14800
14813
|
(o == null ? void 0 : o.id) !== this.currentKeyframe && this.emitEvent("keyframe", o, i), this.currentKeyframe = o == null ? void 0 : o.id;
|
|
14801
14814
|
const s = Object.keys((o == null ? void 0 : o.props) ?? {}).reduce((l, u) => {
|
|
14802
14815
|
if (o && i) {
|
|
14803
|
-
const c = o.props[u], p = i.props[u], f = (this.currentDelta - o.delta) / (i.delta - o.delta), h = (
|
|
14816
|
+
const c = o.props[u], p = i.props[u], f = (this.currentDelta - o.delta) / (i.delta - o.delta), h = (yp[o.easing] ?? ((m) => m))(f);
|
|
14804
14817
|
l[u] = ar(c, p, h);
|
|
14805
14818
|
}
|
|
14806
14819
|
return o && !i && (l[u] = o.props[u]), l;
|
|
@@ -14922,7 +14935,7 @@ class jn {
|
|
|
14922
14935
|
* @returns A new animation instance with the same properties as this one
|
|
14923
14936
|
*/
|
|
14924
14937
|
clone() {
|
|
14925
|
-
return new
|
|
14938
|
+
return new Dn({
|
|
14926
14939
|
keyframes: structuredClone(this.keyframes),
|
|
14927
14940
|
duration: this.duration,
|
|
14928
14941
|
iterations: this.iterations
|
|
@@ -14932,11 +14945,11 @@ class jn {
|
|
|
14932
14945
|
* Destroys the animation instance, removing all event listeners and stopping playback
|
|
14933
14946
|
*/
|
|
14934
14947
|
destroy() {
|
|
14935
|
-
this.stop(), this.listeners = pn.reduce((e, t) => (e[t] = [], e), {}),
|
|
14948
|
+
this.stop(), this.listeners = pn.reduce((e, t) => (e[t] = [], e), {}), Ha.remove(this);
|
|
14936
14949
|
}
|
|
14937
14950
|
}
|
|
14938
|
-
const
|
|
14939
|
-
class
|
|
14951
|
+
const Ka = "animated-route-layer";
|
|
14952
|
+
class ff {
|
|
14940
14953
|
constructor({
|
|
14941
14954
|
keyframes: e,
|
|
14942
14955
|
source: t,
|
|
@@ -14953,7 +14966,7 @@ class pf {
|
|
|
14953
14966
|
manualUpdate: c = !1
|
|
14954
14967
|
}) {
|
|
14955
14968
|
/** Unique ID for the layer */
|
|
14956
|
-
y(this, "id", `${
|
|
14969
|
+
y(this, "id", `${Ka}-${dn()}`);
|
|
14957
14970
|
y(this, "type", "custom");
|
|
14958
14971
|
/** The MaptilerAnimation instance that handles the animation */
|
|
14959
14972
|
y(this, "animationInstance", null);
|
|
@@ -15010,10 +15023,10 @@ class pf {
|
|
|
15010
15023
|
*/
|
|
15011
15024
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
15012
15025
|
async onAdd(e) {
|
|
15013
|
-
if (this.map = e, this.map.getLayersOrder().some((n) => n.includes(
|
|
15026
|
+
if (this.map = e, this.map.getLayersOrder().some((n) => n.includes(Ka) && this.id !== n))
|
|
15014
15027
|
throw new Error("[AnimatedRouteLayer.onAdd]: Currently, you can only have one active AnimatedRouteLayer at a time. Please remove the existing one before adding a new one.");
|
|
15015
15028
|
const t = await this.getMaptilerAnimationOptions();
|
|
15016
|
-
this.animationInstance = new
|
|
15029
|
+
this.animationInstance = new Dn({
|
|
15017
15030
|
...t,
|
|
15018
15031
|
manualMode: this.manualUpdate
|
|
15019
15032
|
}), this.animationInstance.addEventListener("timeupdate", this.update), Object.entries(this.enquedEventHandlers).forEach(([n, a]) => {
|
|
@@ -15137,7 +15150,7 @@ class pf {
|
|
|
15137
15150
|
throw new Error("[AnimatedRouteLayer.onAdd]: The first feature in the source data is not a valid GeoJSON of type `Feature`");
|
|
15138
15151
|
const a = n;
|
|
15139
15152
|
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);
|
|
15140
|
-
const i =
|
|
15153
|
+
const i = pp(a, {
|
|
15141
15154
|
pathSmoothing: this.cameraMaptilerAnimationOptions ? this.cameraMaptilerAnimationOptions.pathSmoothing : !1,
|
|
15142
15155
|
defaultEasing: this.easing
|
|
15143
15156
|
}), o = this.duration, s = this.iterations, l = this.delay, u = this.autoplay;
|
|
@@ -15176,195 +15189,195 @@ class pf {
|
|
|
15176
15189
|
}
|
|
15177
15190
|
}
|
|
15178
15191
|
function So() {
|
|
15179
|
-
return "4.0.
|
|
15192
|
+
return "4.0.2";
|
|
15180
15193
|
}
|
|
15181
|
-
const
|
|
15182
|
-
setRTLTextPlugin:
|
|
15183
|
-
getRTLTextPluginStatus:
|
|
15194
|
+
const df = k.Map, hf = k.Marker, mf = k.Popup, yf = k.Style, gf = k.CanvasSource, vf = k.GeoJSONSource, bf = k.ImageSource, wf = k.RasterTileSource, Sf = k.RasterDEMTileSource, xf = k.VectorTileSource, kf = k.VideoSource, Ef = k.NavigationControl, Lf = k.GeolocateControl, Cf = k.AttributionControl, Af = k.LogoControl, Tf = k.ScaleControl, If = k.FullscreenControl, _f = k.TerrainControl, Mf = k.BoxZoomHandler, Pf = k.ScrollZoomHandler, Rf = k.CooperativeGesturesHandler, Of = k.KeyboardHandler, zf = k.TwoFingersTouchPitchHandler, Ff = k.MapWheelEvent, $f = k.MapTouchEvent, Nf = k.MapMouseEvent, jf = k.config, Df = k.getVersion, {
|
|
15195
|
+
setRTLTextPlugin: Uf,
|
|
15196
|
+
getRTLTextPluginStatus: Bf,
|
|
15184
15197
|
LngLat: Ne,
|
|
15185
|
-
LngLatBounds:
|
|
15198
|
+
LngLatBounds: Op,
|
|
15186
15199
|
MercatorCoordinate: fn,
|
|
15187
|
-
Evented:
|
|
15188
|
-
AJAXError:
|
|
15189
|
-
prewarm:
|
|
15190
|
-
clearPrewarmedResources:
|
|
15191
|
-
Hash:
|
|
15200
|
+
Evented: qf,
|
|
15201
|
+
AJAXError: Vf,
|
|
15202
|
+
prewarm: Gf,
|
|
15203
|
+
clearPrewarmedResources: Hf,
|
|
15204
|
+
Hash: Kf,
|
|
15192
15205
|
Point: xo,
|
|
15193
|
-
EdgeInsets:
|
|
15194
|
-
DragRotateHandler:
|
|
15195
|
-
DragPanHandler:
|
|
15206
|
+
EdgeInsets: Zf,
|
|
15207
|
+
DragRotateHandler: Xf,
|
|
15208
|
+
DragPanHandler: Wf,
|
|
15196
15209
|
TwoFingersTouchZoomRotateHandler: Yf,
|
|
15197
|
-
DoubleClickZoomHandler:
|
|
15198
|
-
TwoFingersTouchZoomHandler:
|
|
15199
|
-
TwoFingersTouchRotateHandler:
|
|
15200
|
-
getWorkerCount:
|
|
15201
|
-
setWorkerCount:
|
|
15202
|
-
getMaxParallelImageRequests:
|
|
15203
|
-
setMaxParallelImageRequests:
|
|
15204
|
-
getWorkerUrl:
|
|
15205
|
-
setWorkerUrl:
|
|
15206
|
-
addSourceType:
|
|
15207
|
-
importScriptInWorkers:
|
|
15208
|
-
addProtocol:
|
|
15209
|
-
removeProtocol:
|
|
15210
|
+
DoubleClickZoomHandler: Jf,
|
|
15211
|
+
TwoFingersTouchZoomHandler: Qf,
|
|
15212
|
+
TwoFingersTouchRotateHandler: ed,
|
|
15213
|
+
getWorkerCount: td,
|
|
15214
|
+
setWorkerCount: rd,
|
|
15215
|
+
getMaxParallelImageRequests: nd,
|
|
15216
|
+
setMaxParallelImageRequests: ad,
|
|
15217
|
+
getWorkerUrl: id,
|
|
15218
|
+
setWorkerUrl: od,
|
|
15219
|
+
addSourceType: sd,
|
|
15220
|
+
importScriptInWorkers: ld,
|
|
15221
|
+
addProtocol: ud,
|
|
15222
|
+
removeProtocol: cd
|
|
15210
15223
|
} = k;
|
|
15211
15224
|
export {
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15225
|
+
Vf as AJAXError,
|
|
15226
|
+
Ka as ANIM_LAYER_PREFIX,
|
|
15227
|
+
ff as AnimatedRouteLayer,
|
|
15215
15228
|
Yp as AttributionControl,
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15229
|
+
Cf as AttributionControlMLGL,
|
|
15230
|
+
Qp as BoxZoomHandler,
|
|
15231
|
+
Mf as BoxZoomHandlerMLGL,
|
|
15232
|
+
Vp as CanvasSource,
|
|
15233
|
+
gf as CanvasSourceMLGL,
|
|
15221
15234
|
T as ColorRamp,
|
|
15222
15235
|
vo as ColorRampCollection,
|
|
15223
|
-
|
|
15224
|
-
|
|
15236
|
+
tf as CooperativeGesturesHandler,
|
|
15237
|
+
Rf as CooperativeGesturesHandlerMLGL,
|
|
15225
15238
|
Ue as CubemapFaceNames,
|
|
15226
|
-
|
|
15239
|
+
ic as CubemapImagesPresets,
|
|
15227
15240
|
Nt as CubemapLayer,
|
|
15228
15241
|
Le as DOMcreate,
|
|
15229
15242
|
Lt as DOMremove,
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
15234
|
-
|
|
15243
|
+
Jf as DoubleClickZoomHandler,
|
|
15244
|
+
Wf as DragPanHandler,
|
|
15245
|
+
Xf as DragRotateHandler,
|
|
15246
|
+
Zf as EdgeInsets,
|
|
15247
|
+
qf as Evented,
|
|
15235
15248
|
qo as FullscreenControl,
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15249
|
+
If as FullscreenControlMLGL,
|
|
15250
|
+
Gp as GeoJSONSource,
|
|
15251
|
+
vf as GeoJSONSourceMLGL,
|
|
15239
15252
|
Do as GeolocateControl,
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15253
|
+
Lf as GeolocateControlMLGL,
|
|
15254
|
+
Sc as GeolocationType,
|
|
15255
|
+
Kf as Hash,
|
|
15256
|
+
Hp as ImageSource,
|
|
15257
|
+
bf as ImageSourceMLGL,
|
|
15258
|
+
$c as ImageViewer,
|
|
15246
15259
|
ae as ImageViewerEvent,
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15260
|
+
cf as ImageViewerMarker,
|
|
15261
|
+
qc as ImageViewerMarkerEvent,
|
|
15262
|
+
rf as KeyboardHandler,
|
|
15263
|
+
Of as KeyboardHandlerMLGL,
|
|
15251
15264
|
O as Language,
|
|
15252
15265
|
Ne as LngLat,
|
|
15253
|
-
|
|
15266
|
+
Op as LngLatBounds,
|
|
15254
15267
|
Uo as LogoControl,
|
|
15255
|
-
|
|
15268
|
+
Af as LogoControlMLGL,
|
|
15256
15269
|
Gi as Map,
|
|
15257
|
-
|
|
15258
|
-
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15270
|
+
df as MapMLGL,
|
|
15271
|
+
sf as MapMouseEvent,
|
|
15272
|
+
Nf as MapMouseEventMLGL,
|
|
15273
|
+
dd as MapStyle,
|
|
15274
|
+
hd as MapStyleVariant,
|
|
15275
|
+
of as MapTouchEvent,
|
|
15276
|
+
$f as MapTouchEventMLGL,
|
|
15277
|
+
af as MapWheelEvent,
|
|
15278
|
+
Ff as MapWheelEventMLGL,
|
|
15279
|
+
Dn as MaptilerAnimation,
|
|
15280
|
+
Mu as MaptilerCustomControl,
|
|
15268
15281
|
en as MaptilerExternalControl,
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15282
|
+
_u as MaptilerGeolocateControl,
|
|
15283
|
+
Hn as MaptilerLogoControl,
|
|
15284
|
+
Tu as MaptilerNavigationControl,
|
|
15285
|
+
Pu as MaptilerProjectionControl,
|
|
15286
|
+
Au as MaptilerTerrainControl,
|
|
15274
15287
|
jo as Marker,
|
|
15275
|
-
|
|
15288
|
+
hf as MarkerMLGL,
|
|
15276
15289
|
fn as MercatorCoordinate,
|
|
15277
|
-
|
|
15278
|
-
|
|
15290
|
+
Ef as NavigationControMLGL,
|
|
15291
|
+
Ya as NavigationControl,
|
|
15279
15292
|
xo as Point,
|
|
15280
|
-
|
|
15281
|
-
|
|
15293
|
+
Bp as Popup,
|
|
15294
|
+
mf as PopupMLGL,
|
|
15282
15295
|
Ut as RadialGradientLayer,
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15286
|
-
|
|
15287
|
-
|
|
15296
|
+
Zp as RasterDEMTileSource,
|
|
15297
|
+
Sf as RasterDEMTileSourceMLGL,
|
|
15298
|
+
Kp as RasterTileSource,
|
|
15299
|
+
wf as RasterTileSourceMLGL,
|
|
15300
|
+
md as ReferenceMapStyle,
|
|
15288
15301
|
Bo as ScaleControl,
|
|
15289
|
-
|
|
15290
|
-
|
|
15291
|
-
|
|
15302
|
+
Tf as ScaleControlMLGL,
|
|
15303
|
+
ef as ScrollZoomHandler,
|
|
15304
|
+
Pf as ScrollZoomHandlerMLGL,
|
|
15292
15305
|
Vo as SdkConfig,
|
|
15293
|
-
|
|
15294
|
-
|
|
15295
|
-
|
|
15296
|
-
|
|
15297
|
-
|
|
15298
|
-
|
|
15299
|
-
|
|
15300
|
-
|
|
15301
|
-
|
|
15306
|
+
yd as ServiceError,
|
|
15307
|
+
qp as Style,
|
|
15308
|
+
yf as StyleMLGL,
|
|
15309
|
+
_f as TerrainControMLGL,
|
|
15310
|
+
Jp as TerrainControl,
|
|
15311
|
+
nf as TwoFingersTouchPitchHandler,
|
|
15312
|
+
zf as TwoFingersTouchPitchHandlerMLGL,
|
|
15313
|
+
ed as TwoFingersTouchRotateHandler,
|
|
15314
|
+
Qf as TwoFingersTouchZoomHandler,
|
|
15302
15315
|
Yf as TwoFingersTouchZoomRotateHandler,
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15316
|
+
Xp as VectorTileSource,
|
|
15317
|
+
xf as VectorTileSourceMLGL,
|
|
15318
|
+
Wp as VideoSource,
|
|
15319
|
+
kf as VideoSourceMLGL,
|
|
15320
|
+
ud as addProtocol,
|
|
15321
|
+
sd as addSourceType,
|
|
15322
|
+
gd as areSameLanguages,
|
|
15323
|
+
vd as bufferToPixelDataBrowser,
|
|
15324
|
+
bd as canParsePixelData,
|
|
15325
|
+
wd as circumferenceAtLatitude,
|
|
15326
|
+
Hf as clearPrewarmedResources,
|
|
15314
15327
|
j as config,
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15328
|
+
jf as configMLGL,
|
|
15329
|
+
Sd as coordinates,
|
|
15330
|
+
fp as createBezierPathFromCoordinates,
|
|
15318
15331
|
ze as cubemapPresets,
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15332
|
+
xd as data,
|
|
15333
|
+
lf as displayWebGLContextLostWarning,
|
|
15334
|
+
kd as elevation,
|
|
15335
|
+
Ed as expandMapStyle,
|
|
15336
|
+
uf as geocoding,
|
|
15337
|
+
Ld as geolocation,
|
|
15338
|
+
Cd as getAutoLanguage,
|
|
15339
|
+
dp as getAverageDistance,
|
|
15340
|
+
Gn as getBrowserLanguage,
|
|
15341
|
+
Ad as getBufferToPixelDataParser,
|
|
15342
|
+
Td as getLanguageInfoFromCode,
|
|
15343
|
+
Id as getLanguageInfoFromFlag,
|
|
15344
|
+
_d as getLanguageInfoFromKey,
|
|
15345
|
+
Df as getMapLibreVersion,
|
|
15346
|
+
nd as getMaxParallelImageRequests,
|
|
15347
|
+
Bf as getRTLTextPluginStatus,
|
|
15348
|
+
Md as getTileCache,
|
|
15336
15349
|
So as getVersion,
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15350
|
+
ts as getWebGLSupportError,
|
|
15351
|
+
td as getWorkerCount,
|
|
15352
|
+
id as getWorkerUrl,
|
|
15340
15353
|
oo as gpx,
|
|
15341
|
-
|
|
15354
|
+
Jc as gpxOrKml,
|
|
15342
15355
|
io as hasChildNodeWithName,
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15356
|
+
pf as helpers,
|
|
15357
|
+
ld as importScriptInWorkers,
|
|
15358
|
+
Pd as isLanguageInfo,
|
|
15346
15359
|
so as kml,
|
|
15347
15360
|
ar as lerp,
|
|
15348
15361
|
bo as lerpArrayValues,
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15362
|
+
Rd as mapStylePresetList,
|
|
15363
|
+
Od as math,
|
|
15364
|
+
zd as misc,
|
|
15365
|
+
pp as parseGeoJSONFeatureToKeyframes,
|
|
15366
|
+
Gf as prewarm,
|
|
15367
|
+
cd as removeProtocol,
|
|
15368
|
+
mp as resamplePath,
|
|
15369
|
+
ad as setMaxParallelImageRequests,
|
|
15370
|
+
Uf as setRTLTextPlugin,
|
|
15371
|
+
rd as setWorkerCount,
|
|
15372
|
+
od as setWorkerUrl,
|
|
15373
|
+
hp as simplifyPath,
|
|
15374
|
+
Fd as staticMaps,
|
|
15375
|
+
Fn as str2xml,
|
|
15376
|
+
Va as stretchNumericalArray,
|
|
15377
|
+
$d as styleToStyle,
|
|
15378
|
+
Nd as toLanguageInfo,
|
|
15366
15379
|
Di as toggleProjection,
|
|
15367
15380
|
ji as toggleTerrain,
|
|
15368
|
-
|
|
15381
|
+
Na as xml2str
|
|
15369
15382
|
};
|
|
15370
15383
|
//# sourceMappingURL=maptiler-sdk.mjs.map
|