@maptiler/sdk 3.4.1-rc3 → 3.5.0-rc1
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/eslint.mjs +1 -1
- package/dist/maptiler-sdk.mjs +958 -964
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/src/custom-layers/CubemapLayer/CubemapLayer.d.ts +1 -1
- package/dist/src/custom-layers/CubemapLayer/loadCubemapTexture.d.ts +4 -4
- package/eslint.config.mjs +1 -1
- package/package.json +1 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Eo = Object.defineProperty;
|
|
2
2
|
var dn = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var S = (r, e, t) =>
|
|
5
|
+
var To = (r, e, t) => e in r ? Eo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var S = (r, e, t) => To(r, typeof e != "symbol" ? e + "" : e, t), tr = (r, e, t) => e.has(r) || dn("Cannot " + t);
|
|
7
7
|
var P = (r, e, t) => (tr(r, e, "read from private field"), t ? t.call(r) : e.get(r)), be = (r, e, t) => e.has(r) ? dn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), _e = (r, e, t, n) => (tr(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), H = (r, e, t) => (tr(r, e, "access private method"), t);
|
|
8
8
|
import k from "maplibre-gl";
|
|
9
|
-
import { Language as
|
|
10
|
-
import { MapStyle as
|
|
11
|
-
import
|
|
12
|
-
import { v4 as
|
|
13
|
-
import { Base64 as
|
|
9
|
+
import { Language as _o, getLanguageInfoFromCode as hn, config as rr, MapStyle as Qe, mapStylePresetList as nr, expandMapStyle as Mo, MapStyleVariant as Io, ReferenceMapStyle as Po, toLanguageInfo as yn, getLanguageInfoFromFlag as Ro, geolocation as mn } from "@maptiler/client";
|
|
10
|
+
import { MapStyle as _p, MapStyleVariant as Mp, ReferenceMapStyle as Ip, ServiceError as Pp, areSameLanguages as Rp, bufferToPixelDataBrowser as zp, circumferenceAtLatitude as Fp, coordinates as $p, data as Op, elevation as Np, expandMapStyle as jp, geocoding as Dp, geolocation as Up, getAutoLanguage as Bp, getBufferToPixelDataParser as qp, getLanguageInfoFromCode as Gp, getLanguageInfoFromFlag as Vp, getLanguageInfoFromKey as Hp, getTileCache as Kp, isLanguageInfo as Xp, mapStylePresetList as Wp, math as Zp, misc as Yp, staticMaps as Jp, styleToStyle as Qp, toLanguageInfo as ef } from "@maptiler/client";
|
|
11
|
+
import zo from "events";
|
|
12
|
+
import { v4 as Fo } from "uuid";
|
|
13
|
+
import { Base64 as $o } from "js-base64";
|
|
14
14
|
const R = {
|
|
15
15
|
/**
|
|
16
16
|
* Language mode to display labels in both the local language and the language of the visitor's device, concatenated.
|
|
@@ -58,7 +58,7 @@ const R = {
|
|
|
58
58
|
isMode: !0,
|
|
59
59
|
geocoding: !1
|
|
60
60
|
},
|
|
61
|
-
...
|
|
61
|
+
..._o
|
|
62
62
|
};
|
|
63
63
|
function gn() {
|
|
64
64
|
if (typeof navigator > "u") {
|
|
@@ -79,8 +79,8 @@ const V = {
|
|
|
79
79
|
terrainSourceId: "maptiler-terrain"
|
|
80
80
|
};
|
|
81
81
|
Object.freeze(V);
|
|
82
|
-
const
|
|
83
|
-
class
|
|
82
|
+
const jr = Fo();
|
|
83
|
+
class Oo extends zo {
|
|
84
84
|
constructor() {
|
|
85
85
|
super(...arguments);
|
|
86
86
|
/**
|
|
@@ -170,8 +170,8 @@ class $o extends Ro {
|
|
|
170
170
|
return rr.fetch;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const D = new
|
|
174
|
-
function
|
|
173
|
+
const D = new Oo(), xr = "localcache_source", kr = "localcache", No = "maptiler_sdk", jo = 1e3, Do = 100, Cr = typeof caches < "u", { addProtocol: vn } = k;
|
|
174
|
+
function Uo(r, e) {
|
|
175
175
|
if (Cr && D.caching && D.session && r.host === V.maptilerApiHost) {
|
|
176
176
|
if (e === "Source" && r.href.includes("tiles.json"))
|
|
177
177
|
return r.href.replace("https://", `${xr}://`);
|
|
@@ -181,16 +181,16 @@ function Do(r, e) {
|
|
|
181
181
|
return r.href;
|
|
182
182
|
}
|
|
183
183
|
let ar;
|
|
184
|
-
async function
|
|
185
|
-
return ar || (ar = await caches.open(
|
|
184
|
+
async function da() {
|
|
185
|
+
return ar || (ar = await caches.open(No)), ar;
|
|
186
186
|
}
|
|
187
187
|
let bn = 0;
|
|
188
|
-
async function
|
|
189
|
-
const r = await
|
|
188
|
+
async function Bo() {
|
|
189
|
+
const r = await da(), e = await r.keys(), t = e.slice(0, Math.max(e.length - jo, 0));
|
|
190
190
|
for (const n of t)
|
|
191
191
|
r.delete(n);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function qo() {
|
|
194
194
|
vn(
|
|
195
195
|
xr,
|
|
196
196
|
async (r, e) => {
|
|
@@ -216,17 +216,17 @@ function Bo() {
|
|
|
216
216
|
data: await f.arrayBuffer(),
|
|
217
217
|
cacheControl: f.headers.get("Cache-Control"),
|
|
218
218
|
expires: f.headers.get("Expires")
|
|
219
|
-
}), l = await
|
|
219
|
+
}), l = await da(), u = await l.match(a);
|
|
220
220
|
if (u)
|
|
221
221
|
return s(u);
|
|
222
222
|
const c = r;
|
|
223
223
|
c.signal = e.signal;
|
|
224
224
|
const p = await fetch(i, c);
|
|
225
225
|
return p.status >= 200 && p.status < 300 && (l.put(a, p.clone()).catch(() => {
|
|
226
|
-
}), ++bn >
|
|
226
|
+
}), ++bn > Do && (Bo(), bn = 0)), s(p);
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Go() {
|
|
230
230
|
if (typeof window > "u") return;
|
|
231
231
|
const r = k.getRTLTextPluginStatus();
|
|
232
232
|
if (r === "unavailable" || r === "requested")
|
|
@@ -235,7 +235,7 @@ function qo() {
|
|
|
235
235
|
} catch {
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Vo(r, e) {
|
|
239
239
|
for (const t of r)
|
|
240
240
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
241
241
|
}
|
|
@@ -248,8 +248,8 @@ function wn(r, e) {
|
|
|
248
248
|
url: r
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", D.apiKey), D.session && t.searchParams.append("mtsid",
|
|
252
|
-
url:
|
|
251
|
+
return t.host === V.maptilerApiHost && (t.searchParams.has("key") || t.searchParams.append("key", D.apiKey), D.session && t.searchParams.append("mtsid", jr)), {
|
|
252
|
+
url: Uo(t, e)
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
function Sn(r) {
|
|
@@ -264,24 +264,24 @@ function Sn(r) {
|
|
|
264
264
|
return wn(e, t);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function ha() {
|
|
268
268
|
return Math.random().toString(36).substring(2);
|
|
269
269
|
}
|
|
270
270
|
function Ot(r) {
|
|
271
271
|
return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(r);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Ho(r) {
|
|
274
274
|
try {
|
|
275
275
|
return JSON.parse(r);
|
|
276
276
|
} catch {
|
|
277
277
|
}
|
|
278
278
|
return null;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Ko() {
|
|
281
281
|
return document.createElement("canvas").getContext("webgl2") ? null : typeof WebGL2RenderingContext < "u" ? "Graphic rendering with WebGL2 has been disabled or is not supported by your graphic card. The map cannot be displayed." : "Your browser does not support graphic rendering with WebGL2. The map cannot be displayed.";
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const e =
|
|
283
|
+
function Xo(r) {
|
|
284
|
+
const e = Ko();
|
|
285
285
|
if (!e) return;
|
|
286
286
|
let t = null;
|
|
287
287
|
if (typeof r == "string" ? t = document.getElementById(r) : r instanceof HTMLElement && (t = r), !t)
|
|
@@ -289,14 +289,14 @@ function Ko(r) {
|
|
|
289
289
|
const n = document.createElement("div");
|
|
290
290
|
throw n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n), new Error(e);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function tc(r) {
|
|
293
293
|
const e = "The WebGL context was lost.", t = r.getContainer(), n = document.createElement("div");
|
|
294
294
|
n.innerHTML = e, n.classList.add("webgl-warning-div"), t.appendChild(n);
|
|
295
295
|
}
|
|
296
296
|
function xn(r, e) {
|
|
297
297
|
return !(!Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" || e && !r[1].startsWith("name:") || !e && r[1] !== "name");
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Wo(r, e, t) {
|
|
300
300
|
const n = structuredClone(r), a = (o) => {
|
|
301
301
|
if (typeof o != "string")
|
|
302
302
|
for (let i = 0; i < o.length; i += 1)
|
|
@@ -304,18 +304,18 @@ function Xo(r, e, t) {
|
|
|
304
304
|
};
|
|
305
305
|
return xn(n, t) ? e : (a(n), n);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Zo(r, e) {
|
|
308
308
|
const t = e ? /\{name:\S+\}/ : /\{name\}/;
|
|
309
309
|
return {
|
|
310
310
|
contains: t.test(r),
|
|
311
311
|
exactMatch: new RegExp(`^${t.source}$`).test(r)
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Yo(r, e, t) {
|
|
315
315
|
const n = t ? /\{name:\S+\}/ : /\{name\}/, a = r.split(n);
|
|
316
316
|
return ["concat", ...a.flatMap((s, l) => l === a.length - 1 ? [s] : [s, e])];
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Jo(r) {
|
|
319
319
|
var n;
|
|
320
320
|
const e = /\{name(?::(?<language>\S+))?\}/g, t = [];
|
|
321
321
|
for (; ; ) {
|
|
@@ -326,7 +326,7 @@ function Yo(r) {
|
|
|
326
326
|
}
|
|
327
327
|
return t;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Qo(r) {
|
|
330
330
|
return !Array.isArray(r) || r.length !== 2 || r[0] !== "get" || typeof r[1] != "string" ? null : r[1].trim() === "name" ? {
|
|
331
331
|
isLanguage: !0,
|
|
332
332
|
localization: null
|
|
@@ -335,17 +335,17 @@ function Jo(r) {
|
|
|
335
335
|
localization: r[1].trim().split(":").pop()
|
|
336
336
|
} : null;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ei(r) {
|
|
339
339
|
const e = [], t = structuredClone(r), n = (a) => {
|
|
340
340
|
if (typeof a != "string")
|
|
341
341
|
for (let o = 0; o < a.length; o += 1) {
|
|
342
|
-
const i =
|
|
342
|
+
const i = Qo(a[o]);
|
|
343
343
|
i ? e.push(i.localization) : n(a[o]);
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
346
|
return n([t]), e;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function ti(r, e) {
|
|
349
349
|
const t = [];
|
|
350
350
|
for (const o of r) {
|
|
351
351
|
if (o.type !== "symbol")
|
|
@@ -356,10 +356,10 @@ function ei(r, e) {
|
|
|
356
356
|
const u = e.getLayoutProperty(s, "text-field");
|
|
357
357
|
if (u)
|
|
358
358
|
if (typeof u == "string") {
|
|
359
|
-
const c =
|
|
359
|
+
const c = Jo(u);
|
|
360
360
|
t.push(c);
|
|
361
361
|
} else {
|
|
362
|
-
const c =
|
|
362
|
+
const c = ei(u);
|
|
363
363
|
t.push(c);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
@@ -371,132 +371,132 @@ function ei(r, e) {
|
|
|
371
371
|
o === null ? a.unlocalized += 1 : (o in a.localized || (a.localized[o] = 0), a.localized[o] += 1);
|
|
372
372
|
return a;
|
|
373
373
|
}
|
|
374
|
-
let
|
|
374
|
+
let rc = class extends k.Marker {
|
|
375
375
|
addTo(e) {
|
|
376
376
|
return super.addTo(e);
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
|
-
class
|
|
379
|
+
class ac extends k.Popup {
|
|
380
380
|
addTo(e) {
|
|
381
381
|
return super.addTo(e);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
class
|
|
384
|
+
class oc extends k.Style {
|
|
385
385
|
constructor(e, t = {}) {
|
|
386
386
|
super(e, t);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
class
|
|
389
|
+
class ic extends k.CanvasSource {
|
|
390
390
|
onAdd(e) {
|
|
391
391
|
super.onAdd(e);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
class
|
|
394
|
+
class sc extends k.GeoJSONSource {
|
|
395
395
|
onAdd(e) {
|
|
396
396
|
super.onAdd(e);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
class
|
|
399
|
+
class lc extends k.ImageSource {
|
|
400
400
|
onAdd(e) {
|
|
401
401
|
super.onAdd(e);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
class
|
|
404
|
+
class uc extends k.RasterTileSource {
|
|
405
405
|
onAdd(e) {
|
|
406
406
|
super.onAdd(e);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class cc extends k.RasterDEMTileSource {
|
|
410
410
|
onAdd(e) {
|
|
411
411
|
super.onAdd(e);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
class
|
|
414
|
+
class pc extends k.VectorTileSource {
|
|
415
415
|
onAdd(e) {
|
|
416
416
|
super.onAdd(e);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
class
|
|
419
|
+
class fc extends k.VideoSource {
|
|
420
420
|
onAdd(e) {
|
|
421
421
|
super.onAdd(e);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class ri extends k.NavigationControl {
|
|
425
425
|
onAdd(e) {
|
|
426
426
|
return super.onAdd(e);
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
class
|
|
429
|
+
class ni extends k.GeolocateControl {
|
|
430
430
|
onAdd(e) {
|
|
431
431
|
return super.onAdd(e);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
class
|
|
434
|
+
class dc extends k.AttributionControl {
|
|
435
435
|
onAdd(e) {
|
|
436
436
|
return super.onAdd(e);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
class
|
|
439
|
+
class ai extends k.LogoControl {
|
|
440
440
|
onAdd(e) {
|
|
441
441
|
return super.onAdd(e);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class oi extends k.ScaleControl {
|
|
445
445
|
onAdd(e) {
|
|
446
446
|
return super.onAdd(e);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
class
|
|
449
|
+
class ii extends k.FullscreenControl {
|
|
450
450
|
onAdd(e) {
|
|
451
451
|
return super.onAdd(e);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
class
|
|
454
|
+
class hc extends k.TerrainControl {
|
|
455
455
|
onAdd(e) {
|
|
456
456
|
return super.onAdd(e);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
class
|
|
459
|
+
class yc extends k.BoxZoomHandler {
|
|
460
460
|
constructor(e, t) {
|
|
461
461
|
super(e, t);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class mc extends k.ScrollZoomHandler {
|
|
465
465
|
constructor(e, t) {
|
|
466
466
|
super(e, t);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class gc extends k.CooperativeGesturesHandler {
|
|
470
470
|
constructor(e, t) {
|
|
471
471
|
super(e, t);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
class
|
|
474
|
+
class vc extends k.KeyboardHandler {
|
|
475
475
|
constructor(e) {
|
|
476
476
|
super(e);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
class
|
|
479
|
+
class bc extends k.TwoFingersTouchPitchHandler {
|
|
480
480
|
constructor(e) {
|
|
481
481
|
super(e);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
class
|
|
484
|
+
class wc extends k.MapWheelEvent {
|
|
485
485
|
constructor(e, t, n) {
|
|
486
486
|
super(e, t, n);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
class
|
|
489
|
+
class Sc extends k.MapTouchEvent {
|
|
490
490
|
constructor(e, t, n) {
|
|
491
491
|
super(e, t, n);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class xc extends k.MapMouseEvent {
|
|
495
495
|
constructor(e, t, n, a = {}) {
|
|
496
496
|
super(e, t, n, a);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
class kn extends
|
|
499
|
+
class kn extends ai {
|
|
500
500
|
constructor(t = {}) {
|
|
501
501
|
super(t);
|
|
502
502
|
S(this, "logoURL", "");
|
|
@@ -509,7 +509,7 @@ class kn extends ni {
|
|
|
509
509
|
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;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
var
|
|
512
|
+
var si = 8, li = {
|
|
513
513
|
version: {
|
|
514
514
|
required: !0,
|
|
515
515
|
type: "enum",
|
|
@@ -583,18 +583,18 @@ var ii = 8, si = {
|
|
|
583
583
|
type: "array",
|
|
584
584
|
value: "layer"
|
|
585
585
|
}
|
|
586
|
-
},
|
|
586
|
+
}, ui = {
|
|
587
587
|
"*": {
|
|
588
588
|
type: "source"
|
|
589
589
|
}
|
|
590
|
-
},
|
|
590
|
+
}, ci = [
|
|
591
591
|
"source_vector",
|
|
592
592
|
"source_raster",
|
|
593
593
|
"source_raster_dem",
|
|
594
594
|
"source_geojson",
|
|
595
595
|
"source_video",
|
|
596
596
|
"source_image"
|
|
597
|
-
],
|
|
597
|
+
], pi = {
|
|
598
598
|
type: {
|
|
599
599
|
required: !0,
|
|
600
600
|
type: "enum",
|
|
@@ -649,7 +649,7 @@ var ii = 8, si = {
|
|
|
649
649
|
"*": {
|
|
650
650
|
type: "*"
|
|
651
651
|
}
|
|
652
|
-
},
|
|
652
|
+
}, fi = {
|
|
653
653
|
type: {
|
|
654
654
|
required: !0,
|
|
655
655
|
type: "enum",
|
|
@@ -706,7 +706,7 @@ var ii = 8, si = {
|
|
|
706
706
|
"*": {
|
|
707
707
|
type: "*"
|
|
708
708
|
}
|
|
709
|
-
},
|
|
709
|
+
}, di = {
|
|
710
710
|
type: {
|
|
711
711
|
required: !0,
|
|
712
712
|
type: "enum",
|
|
@@ -780,7 +780,7 @@ var ii = 8, si = {
|
|
|
780
780
|
"*": {
|
|
781
781
|
type: "*"
|
|
782
782
|
}
|
|
783
|
-
},
|
|
783
|
+
}, hi = {
|
|
784
784
|
type: {
|
|
785
785
|
required: !0,
|
|
786
786
|
type: "enum",
|
|
@@ -841,7 +841,7 @@ var ii = 8, si = {
|
|
|
841
841
|
promoteId: {
|
|
842
842
|
type: "promoteId"
|
|
843
843
|
}
|
|
844
|
-
},
|
|
844
|
+
}, yi = {
|
|
845
845
|
type: {
|
|
846
846
|
required: !0,
|
|
847
847
|
type: "enum",
|
|
@@ -864,7 +864,7 @@ var ii = 8, si = {
|
|
|
864
864
|
value: "number"
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
},
|
|
867
|
+
}, mi = {
|
|
868
868
|
type: {
|
|
869
869
|
required: !0,
|
|
870
870
|
type: "enum",
|
|
@@ -886,7 +886,7 @@ var ii = 8, si = {
|
|
|
886
886
|
value: "number"
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
},
|
|
889
|
+
}, gi = {
|
|
890
890
|
id: {
|
|
891
891
|
type: "string",
|
|
892
892
|
required: !0
|
|
@@ -935,7 +935,7 @@ var ii = 8, si = {
|
|
|
935
935
|
paint: {
|
|
936
936
|
type: "paint"
|
|
937
937
|
}
|
|
938
|
-
},
|
|
938
|
+
}, vi = [
|
|
939
939
|
"layout_fill",
|
|
940
940
|
"layout_line",
|
|
941
941
|
"layout_circle",
|
|
@@ -946,7 +946,7 @@ var ii = 8, si = {
|
|
|
946
946
|
"layout_hillshade",
|
|
947
947
|
"layout_color-relief",
|
|
948
948
|
"layout_background"
|
|
949
|
-
],
|
|
949
|
+
], bi = {
|
|
950
950
|
visibility: {
|
|
951
951
|
type: "enum",
|
|
952
952
|
values: {
|
|
@@ -956,7 +956,7 @@ var ii = 8, si = {
|
|
|
956
956
|
default: "visible",
|
|
957
957
|
"property-type": "constant"
|
|
958
958
|
}
|
|
959
|
-
},
|
|
959
|
+
}, wi = {
|
|
960
960
|
"fill-sort-key": {
|
|
961
961
|
type: "number",
|
|
962
962
|
expression: {
|
|
@@ -977,7 +977,7 @@ var ii = 8, si = {
|
|
|
977
977
|
default: "visible",
|
|
978
978
|
"property-type": "constant"
|
|
979
979
|
}
|
|
980
|
-
},
|
|
980
|
+
}, Si = {
|
|
981
981
|
"circle-sort-key": {
|
|
982
982
|
type: "number",
|
|
983
983
|
expression: {
|
|
@@ -998,7 +998,7 @@ var ii = 8, si = {
|
|
|
998
998
|
default: "visible",
|
|
999
999
|
"property-type": "constant"
|
|
1000
1000
|
}
|
|
1001
|
-
},
|
|
1001
|
+
}, xi = {
|
|
1002
1002
|
visibility: {
|
|
1003
1003
|
type: "enum",
|
|
1004
1004
|
values: {
|
|
@@ -1008,7 +1008,7 @@ var ii = 8, si = {
|
|
|
1008
1008
|
default: "visible",
|
|
1009
1009
|
"property-type": "constant"
|
|
1010
1010
|
}
|
|
1011
|
-
},
|
|
1011
|
+
}, ki = {
|
|
1012
1012
|
"line-cap": {
|
|
1013
1013
|
type: "enum",
|
|
1014
1014
|
values: {
|
|
@@ -1094,7 +1094,7 @@ var ii = 8, si = {
|
|
|
1094
1094
|
default: "visible",
|
|
1095
1095
|
"property-type": "constant"
|
|
1096
1096
|
}
|
|
1097
|
-
},
|
|
1097
|
+
}, Ci = {
|
|
1098
1098
|
"symbol-placement": {
|
|
1099
1099
|
type: "enum",
|
|
1100
1100
|
values: {
|
|
@@ -1921,7 +1921,7 @@ var ii = 8, si = {
|
|
|
1921
1921
|
default: "visible",
|
|
1922
1922
|
"property-type": "constant"
|
|
1923
1923
|
}
|
|
1924
|
-
},
|
|
1924
|
+
}, Li = {
|
|
1925
1925
|
visibility: {
|
|
1926
1926
|
type: "enum",
|
|
1927
1927
|
values: {
|
|
@@ -1931,7 +1931,7 @@ var ii = 8, si = {
|
|
|
1931
1931
|
default: "visible",
|
|
1932
1932
|
"property-type": "constant"
|
|
1933
1933
|
}
|
|
1934
|
-
},
|
|
1934
|
+
}, Ai = {
|
|
1935
1935
|
visibility: {
|
|
1936
1936
|
type: "enum",
|
|
1937
1937
|
values: {
|
|
@@ -1941,10 +1941,10 @@ var ii = 8, si = {
|
|
|
1941
1941
|
default: "visible",
|
|
1942
1942
|
"property-type": "constant"
|
|
1943
1943
|
}
|
|
1944
|
-
},
|
|
1944
|
+
}, Ei = {
|
|
1945
1945
|
type: "array",
|
|
1946
1946
|
value: "*"
|
|
1947
|
-
},
|
|
1947
|
+
}, Ti = {
|
|
1948
1948
|
type: "enum",
|
|
1949
1949
|
values: {
|
|
1950
1950
|
"==": {},
|
|
@@ -1961,14 +1961,14 @@ var ii = 8, si = {
|
|
|
1961
1961
|
has: {},
|
|
1962
1962
|
"!has": {}
|
|
1963
1963
|
}
|
|
1964
|
-
},
|
|
1964
|
+
}, _i = {
|
|
1965
1965
|
type: "enum",
|
|
1966
1966
|
values: {
|
|
1967
1967
|
Point: {},
|
|
1968
1968
|
LineString: {},
|
|
1969
1969
|
Polygon: {}
|
|
1970
1970
|
}
|
|
1971
|
-
},
|
|
1971
|
+
}, Mi = {
|
|
1972
1972
|
type: "array",
|
|
1973
1973
|
minimum: 0,
|
|
1974
1974
|
maximum: 24,
|
|
@@ -1981,7 +1981,7 @@ var ii = 8, si = {
|
|
|
1981
1981
|
type: "array",
|
|
1982
1982
|
value: "*",
|
|
1983
1983
|
minimum: 1
|
|
1984
|
-
},
|
|
1984
|
+
}, Pi = {
|
|
1985
1985
|
anchor: {
|
|
1986
1986
|
type: "enum",
|
|
1987
1987
|
default: "viewport",
|
|
@@ -2042,7 +2042,7 @@ var ii = 8, si = {
|
|
|
2042
2042
|
},
|
|
2043
2043
|
transition: !0
|
|
2044
2044
|
}
|
|
2045
|
-
},
|
|
2045
|
+
}, Ri = {
|
|
2046
2046
|
"sky-color": {
|
|
2047
2047
|
type: "color",
|
|
2048
2048
|
"property-type": "data-constant",
|
|
@@ -2135,7 +2135,7 @@ var ii = 8, si = {
|
|
|
2135
2135
|
},
|
|
2136
2136
|
transition: !0
|
|
2137
2137
|
}
|
|
2138
|
-
},
|
|
2138
|
+
}, zi = {
|
|
2139
2139
|
source: {
|
|
2140
2140
|
type: "string",
|
|
2141
2141
|
required: !0
|
|
@@ -2145,7 +2145,7 @@ var ii = 8, si = {
|
|
|
2145
2145
|
minimum: 0,
|
|
2146
2146
|
default: 1
|
|
2147
2147
|
}
|
|
2148
|
-
},
|
|
2148
|
+
}, Fi = {
|
|
2149
2149
|
type: {
|
|
2150
2150
|
type: "projectionDefinition",
|
|
2151
2151
|
default: "mercator",
|
|
@@ -2158,7 +2158,7 @@ var ii = 8, si = {
|
|
|
2158
2158
|
]
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
|
-
},
|
|
2161
|
+
}, $i = [
|
|
2162
2162
|
"paint_fill",
|
|
2163
2163
|
"paint_line",
|
|
2164
2164
|
"paint_circle",
|
|
@@ -2169,7 +2169,7 @@ var ii = 8, si = {
|
|
|
2169
2169
|
"paint_hillshade",
|
|
2170
2170
|
"paint_color-relief",
|
|
2171
2171
|
"paint_background"
|
|
2172
|
-
],
|
|
2172
|
+
], Oi = {
|
|
2173
2173
|
"fill-antialias": {
|
|
2174
2174
|
type: "boolean",
|
|
2175
2175
|
default: !0,
|
|
@@ -2285,7 +2285,7 @@ var ii = 8, si = {
|
|
|
2285
2285
|
},
|
|
2286
2286
|
"property-type": "cross-faded-data-driven"
|
|
2287
2287
|
}
|
|
2288
|
-
},
|
|
2288
|
+
}, Ni = {
|
|
2289
2289
|
"line-opacity": {
|
|
2290
2290
|
type: "number",
|
|
2291
2291
|
default: 1,
|
|
@@ -2649,7 +2649,7 @@ var ii = 8, si = {
|
|
|
2649
2649
|
},
|
|
2650
2650
|
"property-type": "data-driven"
|
|
2651
2651
|
}
|
|
2652
|
-
},
|
|
2652
|
+
}, Di = {
|
|
2653
2653
|
"heatmap-radius": {
|
|
2654
2654
|
type: "number",
|
|
2655
2655
|
default: 30,
|
|
@@ -2740,7 +2740,7 @@ var ii = 8, si = {
|
|
|
2740
2740
|
},
|
|
2741
2741
|
"property-type": "data-constant"
|
|
2742
2742
|
}
|
|
2743
|
-
},
|
|
2743
|
+
}, Ui = {
|
|
2744
2744
|
"icon-opacity": {
|
|
2745
2745
|
type: "number",
|
|
2746
2746
|
default: 1,
|
|
@@ -3004,7 +3004,7 @@ var ii = 8, si = {
|
|
|
3004
3004
|
},
|
|
3005
3005
|
"property-type": "data-constant"
|
|
3006
3006
|
}
|
|
3007
|
-
},
|
|
3007
|
+
}, Bi = {
|
|
3008
3008
|
"raster-opacity": {
|
|
3009
3009
|
type: "number",
|
|
3010
3010
|
default: 1,
|
|
@@ -3118,7 +3118,7 @@ var ii = 8, si = {
|
|
|
3118
3118
|
},
|
|
3119
3119
|
"property-type": "data-constant"
|
|
3120
3120
|
}
|
|
3121
|
-
},
|
|
3121
|
+
}, qi = {
|
|
3122
3122
|
"hillshade-illumination-direction": {
|
|
3123
3123
|
type: "numberArray",
|
|
3124
3124
|
default: 335,
|
|
@@ -3230,7 +3230,7 @@ var ii = 8, si = {
|
|
|
3230
3230
|
},
|
|
3231
3231
|
"property-type": "data-constant"
|
|
3232
3232
|
}
|
|
3233
|
-
},
|
|
3233
|
+
}, Gi = {
|
|
3234
3234
|
"background-color": {
|
|
3235
3235
|
type: "color",
|
|
3236
3236
|
default: "#000000",
|
|
@@ -3273,7 +3273,7 @@ var ii = 8, si = {
|
|
|
3273
3273
|
},
|
|
3274
3274
|
"property-type": "data-constant"
|
|
3275
3275
|
}
|
|
3276
|
-
},
|
|
3276
|
+
}, Vi = {
|
|
3277
3277
|
duration: {
|
|
3278
3278
|
type: "number",
|
|
3279
3279
|
default: 300,
|
|
@@ -3286,27 +3286,27 @@ var ii = 8, si = {
|
|
|
3286
3286
|
minimum: 0,
|
|
3287
3287
|
units: "milliseconds"
|
|
3288
3288
|
}
|
|
3289
|
-
},
|
|
3289
|
+
}, Hi = {
|
|
3290
3290
|
"*": {
|
|
3291
3291
|
type: "string"
|
|
3292
3292
|
}
|
|
3293
|
-
},
|
|
3294
|
-
$version:
|
|
3295
|
-
$root:
|
|
3296
|
-
sources:
|
|
3297
|
-
source:
|
|
3298
|
-
source_vector:
|
|
3299
|
-
source_raster:
|
|
3300
|
-
source_raster_dem:
|
|
3301
|
-
source_geojson:
|
|
3302
|
-
source_video:
|
|
3303
|
-
source_image:
|
|
3304
|
-
layer:
|
|
3305
|
-
layout:
|
|
3306
|
-
layout_background:
|
|
3307
|
-
layout_fill:
|
|
3308
|
-
layout_circle:
|
|
3309
|
-
layout_heatmap:
|
|
3293
|
+
}, Ki = {
|
|
3294
|
+
$version: si,
|
|
3295
|
+
$root: li,
|
|
3296
|
+
sources: ui,
|
|
3297
|
+
source: ci,
|
|
3298
|
+
source_vector: pi,
|
|
3299
|
+
source_raster: fi,
|
|
3300
|
+
source_raster_dem: di,
|
|
3301
|
+
source_geojson: hi,
|
|
3302
|
+
source_video: yi,
|
|
3303
|
+
source_image: mi,
|
|
3304
|
+
layer: gi,
|
|
3305
|
+
layout: vi,
|
|
3306
|
+
layout_background: bi,
|
|
3307
|
+
layout_fill: wi,
|
|
3308
|
+
layout_circle: Si,
|
|
3309
|
+
layout_heatmap: xi,
|
|
3310
3310
|
"layout_fill-extrusion": {
|
|
3311
3311
|
visibility: {
|
|
3312
3312
|
type: "enum",
|
|
@@ -3318,10 +3318,10 @@ var ii = 8, si = {
|
|
|
3318
3318
|
"property-type": "constant"
|
|
3319
3319
|
}
|
|
3320
3320
|
},
|
|
3321
|
-
layout_line:
|
|
3322
|
-
layout_symbol:
|
|
3323
|
-
layout_raster:
|
|
3324
|
-
layout_hillshade:
|
|
3321
|
+
layout_line: ki,
|
|
3322
|
+
layout_symbol: Ci,
|
|
3323
|
+
layout_raster: Li,
|
|
3324
|
+
layout_hillshade: Ai,
|
|
3325
3325
|
"layout_color-relief": {
|
|
3326
3326
|
visibility: {
|
|
3327
3327
|
type: "enum",
|
|
@@ -3333,9 +3333,9 @@ var ii = 8, si = {
|
|
|
3333
3333
|
"property-type": "constant"
|
|
3334
3334
|
}
|
|
3335
3335
|
},
|
|
3336
|
-
filter:
|
|
3337
|
-
filter_operator:
|
|
3338
|
-
geometry_type:
|
|
3336
|
+
filter: Ei,
|
|
3337
|
+
filter_operator: Ti,
|
|
3338
|
+
geometry_type: _i,
|
|
3339
3339
|
function: {
|
|
3340
3340
|
expression: {
|
|
3341
3341
|
type: "expression"
|
|
@@ -3377,14 +3377,14 @@ var ii = 8, si = {
|
|
|
3377
3377
|
required: !1
|
|
3378
3378
|
}
|
|
3379
3379
|
},
|
|
3380
|
-
function_stop:
|
|
3380
|
+
function_stop: Mi,
|
|
3381
3381
|
expression: Ii,
|
|
3382
|
-
light:
|
|
3383
|
-
sky:
|
|
3384
|
-
terrain:
|
|
3385
|
-
projection:
|
|
3386
|
-
paint:
|
|
3387
|
-
paint_fill:
|
|
3382
|
+
light: Pi,
|
|
3383
|
+
sky: Ri,
|
|
3384
|
+
terrain: zi,
|
|
3385
|
+
projection: Fi,
|
|
3386
|
+
paint: $i,
|
|
3387
|
+
paint_fill: Oi,
|
|
3388
3388
|
"paint_fill-extrusion": {
|
|
3389
3389
|
"fill-extrusion-opacity": {
|
|
3390
3390
|
type: "number",
|
|
@@ -3515,12 +3515,12 @@ var ii = 8, si = {
|
|
|
3515
3515
|
"property-type": "data-constant"
|
|
3516
3516
|
}
|
|
3517
3517
|
},
|
|
3518
|
-
paint_line:
|
|
3518
|
+
paint_line: Ni,
|
|
3519
3519
|
paint_circle: ji,
|
|
3520
|
-
paint_heatmap:
|
|
3521
|
-
paint_symbol:
|
|
3522
|
-
paint_raster:
|
|
3523
|
-
paint_hillshade:
|
|
3520
|
+
paint_heatmap: Di,
|
|
3521
|
+
paint_symbol: Ui,
|
|
3522
|
+
paint_raster: Bi,
|
|
3523
|
+
paint_hillshade: qi,
|
|
3524
3524
|
"paint_color-relief": {
|
|
3525
3525
|
"color-relief-opacity": {
|
|
3526
3526
|
type: "number",
|
|
@@ -3548,8 +3548,8 @@ var ii = 8, si = {
|
|
|
3548
3548
|
"property-type": "color-ramp"
|
|
3549
3549
|
}
|
|
3550
3550
|
},
|
|
3551
|
-
paint_background:
|
|
3552
|
-
transition:
|
|
3551
|
+
paint_background: Gi,
|
|
3552
|
+
transition: Vi,
|
|
3553
3553
|
"property-type": {
|
|
3554
3554
|
"data-driven": {
|
|
3555
3555
|
type: "property-type"
|
|
@@ -3570,7 +3570,7 @@ var ii = 8, si = {
|
|
|
3570
3570
|
type: "property-type"
|
|
3571
3571
|
}
|
|
3572
3572
|
},
|
|
3573
|
-
promoteId:
|
|
3573
|
+
promoteId: Hi
|
|
3574
3574
|
};
|
|
3575
3575
|
class g {
|
|
3576
3576
|
constructor(e, t, n, a) {
|
|
@@ -3608,7 +3608,7 @@ class Dr {
|
|
|
3608
3608
|
return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
3611
|
-
const
|
|
3611
|
+
const Nt = { kind: "null" }, b = { kind: "number" }, M = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, jt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Xi = { kind: "error" }, Dt = { kind: "collator" }, Ut = { kind: "formatted" }, Bt = { kind: "padding" }, nt = { kind: "colorArray" }, qt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, Gt = { kind: "variableAnchorOffsetCollection" };
|
|
3612
3612
|
function Z(r, e) {
|
|
3613
3613
|
return {
|
|
3614
3614
|
kind: "array",
|
|
@@ -3616,20 +3616,20 @@ function Z(r, e) {
|
|
|
3616
3616
|
N: e
|
|
3617
3617
|
};
|
|
3618
3618
|
}
|
|
3619
|
-
function
|
|
3619
|
+
function N(r) {
|
|
3620
3620
|
if (r.kind === "array") {
|
|
3621
|
-
const e =
|
|
3621
|
+
const e = N(r.itemType);
|
|
3622
3622
|
return typeof r.N == "number" ? `array<${e}, ${r.N}>` : r.itemType.kind === "value" ? "array" : `array<${e}>`;
|
|
3623
3623
|
} else
|
|
3624
3624
|
return r.kind;
|
|
3625
3625
|
}
|
|
3626
|
-
const
|
|
3627
|
-
|
|
3626
|
+
const Wi = [
|
|
3627
|
+
Nt,
|
|
3628
3628
|
b,
|
|
3629
|
-
|
|
3629
|
+
M,
|
|
3630
3630
|
_,
|
|
3631
3631
|
de,
|
|
3632
|
-
|
|
3632
|
+
jt,
|
|
3633
3633
|
Ut,
|
|
3634
3634
|
Re,
|
|
3635
3635
|
Z(T),
|
|
@@ -3649,12 +3649,12 @@ function at(r, e) {
|
|
|
3649
3649
|
if (r.kind === e.kind)
|
|
3650
3650
|
return null;
|
|
3651
3651
|
if (r.kind === "value") {
|
|
3652
|
-
for (const t of
|
|
3652
|
+
for (const t of Wi)
|
|
3653
3653
|
if (!at(t, e))
|
|
3654
3654
|
return null;
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
|
-
return `Expected ${
|
|
3657
|
+
return `Expected ${N(r)} but found ${N(e)} instead.`;
|
|
3658
3658
|
}
|
|
3659
3659
|
function Ur(r, e) {
|
|
3660
3660
|
return e.some((t) => t.kind === r.kind);
|
|
@@ -3665,15 +3665,15 @@ function ze(r, e) {
|
|
|
3665
3665
|
function we(r, e) {
|
|
3666
3666
|
return r.kind === "array" && e.kind === "array" ? r.itemType.kind === e.itemType.kind && typeof r.N == "number" : r.kind === e.kind;
|
|
3667
3667
|
}
|
|
3668
|
-
const
|
|
3669
|
-
function
|
|
3668
|
+
const ya = 0.96422, ma = 1, ga = 0.82521, va = 4 / 29, qe = 6 / 29, ba = 3 * qe * qe, Zi = qe * qe * qe, Yi = Math.PI / 180, Ji = 180 / Math.PI;
|
|
3669
|
+
function wa(r) {
|
|
3670
3670
|
return r = r % 360, r < 0 && (r += 360), r;
|
|
3671
3671
|
}
|
|
3672
|
-
function
|
|
3672
|
+
function Sa([r, e, t, n]) {
|
|
3673
3673
|
r = or(r), e = or(e), t = or(t);
|
|
3674
3674
|
let a, o;
|
|
3675
|
-
const i = ir((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) /
|
|
3676
|
-
r === e && e === t ? a = o = i : (a = ir((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) /
|
|
3675
|
+
const i = ir((0.2225045 * r + 0.7168786 * e + 0.0606169 * t) / ma);
|
|
3676
|
+
r === e && e === t ? a = o = i : (a = ir((0.4360747 * r + 0.3850649 * e + 0.1430804 * t) / ya), o = ir((0.0139322 * r + 0.0971045 * e + 0.7141733 * t) / ga));
|
|
3677
3677
|
const s = 116 * i - 16;
|
|
3678
3678
|
return [s < 0 ? 0 : s, 500 * (a - i), 200 * (i - o), n];
|
|
3679
3679
|
}
|
|
@@ -3681,11 +3681,11 @@ function or(r) {
|
|
|
3681
3681
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
3682
3682
|
}
|
|
3683
3683
|
function ir(r) {
|
|
3684
|
-
return r >
|
|
3684
|
+
return r > Zi ? Math.pow(r, 1 / 3) : r / ba + va;
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3686
|
+
function xa([r, e, t, n]) {
|
|
3687
3687
|
let a = (r + 16) / 116, o = isNaN(e) ? a : a + e / 500, i = isNaN(t) ? a : a - t / 200;
|
|
3688
|
-
return a =
|
|
3688
|
+
return a = ma * lr(a), o = ya * lr(o), i = ga * lr(i), [
|
|
3689
3689
|
sr(3.1338561 * o - 1.6168667 * a - 0.4906146 * i),
|
|
3690
3690
|
// D50 -> sRGB
|
|
3691
3691
|
sr(-0.9787684 * o + 1.9161415 * a + 0.033454 * i),
|
|
@@ -3697,33 +3697,33 @@ function sr(r) {
|
|
|
3697
3697
|
return r = r <= 304e-5 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055, r < 0 ? 0 : r > 1 ? 1 : r;
|
|
3698
3698
|
}
|
|
3699
3699
|
function lr(r) {
|
|
3700
|
-
return r > qe ? r * r * r :
|
|
3700
|
+
return r > qe ? r * r * r : ba * (r - va);
|
|
3701
3701
|
}
|
|
3702
|
-
function
|
|
3703
|
-
const [e, t, n, a] =
|
|
3704
|
-
return [Math.round(o * 1e4) ?
|
|
3705
|
-
}
|
|
3706
|
-
function Qi([r, e, t, n]) {
|
|
3707
|
-
return r = isNaN(r) ? 0 : r * Zi, Sa([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3702
|
+
function Qi(r) {
|
|
3703
|
+
const [e, t, n, a] = Sa(r), o = Math.sqrt(t * t + n * n);
|
|
3704
|
+
return [Math.round(o * 1e4) ? wa(Math.atan2(n, t) * Ji) : NaN, o, e, a];
|
|
3708
3705
|
}
|
|
3709
3706
|
function es([r, e, t, n]) {
|
|
3710
|
-
r =
|
|
3707
|
+
return r = isNaN(r) ? 0 : r * Yi, xa([t, Math.cos(r) * e, Math.sin(r) * e, n]);
|
|
3708
|
+
}
|
|
3709
|
+
function ts([r, e, t, n]) {
|
|
3710
|
+
r = wa(r), e /= 100, t /= 100;
|
|
3711
3711
|
function a(o) {
|
|
3712
3712
|
const i = (o + r / 30) % 12, s = e * Math.min(t, 1 - t);
|
|
3713
3713
|
return t - s * Math.max(-1, Math.min(i - 3, 9 - i, 1));
|
|
3714
3714
|
}
|
|
3715
3715
|
return [a(0), a(8), a(4), n];
|
|
3716
3716
|
}
|
|
3717
|
-
const
|
|
3717
|
+
const rs = Object.hasOwn || function(e, t) {
|
|
3718
3718
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
3719
3719
|
};
|
|
3720
3720
|
function et(r, e) {
|
|
3721
|
-
return
|
|
3721
|
+
return rs(r, e) ? r[e] : void 0;
|
|
3722
3722
|
}
|
|
3723
|
-
function
|
|
3723
|
+
function ns(r) {
|
|
3724
3724
|
if (r = r.toLowerCase().trim(), r === "transparent")
|
|
3725
3725
|
return [0, 0, 0, 0];
|
|
3726
|
-
const e = et(
|
|
3726
|
+
const e = et(as, r);
|
|
3727
3727
|
if (e) {
|
|
3728
3728
|
const [a, o, i] = e;
|
|
3729
3729
|
return [a / 255, o / 255, i / 255, 1];
|
|
@@ -3813,7 +3813,7 @@ function rs(r) {
|
|
|
3813
3813
|
p ? Cn(+p, f) : 1
|
|
3814
3814
|
];
|
|
3815
3815
|
if (Ln(h))
|
|
3816
|
-
return
|
|
3816
|
+
return ts(h);
|
|
3817
3817
|
}
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
@@ -3829,7 +3829,7 @@ function Ue(r, e, t) {
|
|
|
3829
3829
|
function Ln(r) {
|
|
3830
3830
|
return !r.some(Number.isNaN);
|
|
3831
3831
|
}
|
|
3832
|
-
const
|
|
3832
|
+
const as = {
|
|
3833
3833
|
aliceblue: [240, 248, 255],
|
|
3834
3834
|
antiquewhite: [250, 235, 215],
|
|
3835
3835
|
aqua: [0, 255, 255],
|
|
@@ -4014,7 +4014,7 @@ class F {
|
|
|
4014
4014
|
return e;
|
|
4015
4015
|
if (typeof e != "string")
|
|
4016
4016
|
return;
|
|
4017
|
-
const t =
|
|
4017
|
+
const t = ns(e);
|
|
4018
4018
|
if (t)
|
|
4019
4019
|
return new F(...t, !1);
|
|
4020
4020
|
}
|
|
@@ -4033,7 +4033,7 @@ class F {
|
|
|
4033
4033
|
* @returns Gien color, with reversed alpha blending, in HCL color space.
|
|
4034
4034
|
*/
|
|
4035
4035
|
get hcl() {
|
|
4036
|
-
return this.overwriteGetter("hcl",
|
|
4036
|
+
return this.overwriteGetter("hcl", Qi(this.rgb));
|
|
4037
4037
|
}
|
|
4038
4038
|
/**
|
|
4039
4039
|
* Used in color interpolation.
|
|
@@ -4041,7 +4041,7 @@ class F {
|
|
|
4041
4041
|
* @returns Gien color, with reversed alpha blending, in LAB color space.
|
|
4042
4042
|
*/
|
|
4043
4043
|
get lab() {
|
|
4044
|
-
return this.overwriteGetter("lab",
|
|
4044
|
+
return this.overwriteGetter("lab", Sa(this.rgb));
|
|
4045
4045
|
}
|
|
4046
4046
|
/**
|
|
4047
4047
|
* Lazy getter pattern. When getter is called for the first time lazy value
|
|
@@ -4094,7 +4094,7 @@ class F {
|
|
|
4094
4094
|
let x = u - o;
|
|
4095
4095
|
u > o && x > 180 ? x -= 360 : u < o && o - u > 180 && (x += 360), d = o + n * x;
|
|
4096
4096
|
} else isNaN(o) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = o, (p === 1 || p === 0) && (h = i));
|
|
4097
|
-
const [y, m, w, v] =
|
|
4097
|
+
const [y, m, w, v] = es([
|
|
4098
4098
|
d,
|
|
4099
4099
|
h ?? Le(i, c, n),
|
|
4100
4100
|
Le(s, p, n),
|
|
@@ -4103,7 +4103,7 @@ class F {
|
|
|
4103
4103
|
return new F(y, m, w, v, !1);
|
|
4104
4104
|
}
|
|
4105
4105
|
case "lab": {
|
|
4106
|
-
const [o, i, s, l] =
|
|
4106
|
+
const [o, i, s, l] = xa(Ve(e.lab, t.lab, n));
|
|
4107
4107
|
return new F(o, i, s, l, !1);
|
|
4108
4108
|
}
|
|
4109
4109
|
}
|
|
@@ -4124,7 +4124,7 @@ class Br {
|
|
|
4124
4124
|
return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
|
|
4125
4125
|
}
|
|
4126
4126
|
}
|
|
4127
|
-
const
|
|
4127
|
+
const os = ["bottom", "center", "top"];
|
|
4128
4128
|
class Lr {
|
|
4129
4129
|
constructor(e, t, n, a, o, i) {
|
|
4130
4130
|
this.text = e, this.image = t, this.scale = n, this.fontStack = a, this.textColor = o, this.verticalAlign = i;
|
|
@@ -4255,7 +4255,7 @@ class X {
|
|
|
4255
4255
|
return new X(o);
|
|
4256
4256
|
}
|
|
4257
4257
|
}
|
|
4258
|
-
class
|
|
4258
|
+
class j extends Error {
|
|
4259
4259
|
constructor(e) {
|
|
4260
4260
|
super(e), this.name = "RuntimeError";
|
|
4261
4261
|
}
|
|
@@ -4263,7 +4263,7 @@ class N extends Error {
|
|
|
4263
4263
|
return this.message;
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
4266
|
-
const
|
|
4266
|
+
const is = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
|
|
4267
4267
|
class ue {
|
|
4268
4268
|
constructor(e) {
|
|
4269
4269
|
this.values = e.slice();
|
|
@@ -4274,7 +4274,7 @@ class ue {
|
|
|
4274
4274
|
if (!(!Array.isArray(e) || e.length < 1 || e.length % 2 !== 0)) {
|
|
4275
4275
|
for (let t = 0; t < e.length; t += 2) {
|
|
4276
4276
|
const n = e[t], a = e[t + 1];
|
|
4277
|
-
if (typeof n != "string" || !
|
|
4277
|
+
if (typeof n != "string" || !is.has(n) || !Array.isArray(a) || a.length !== 2 || typeof a[0] != "number" || typeof a[1] != "number")
|
|
4278
4278
|
return;
|
|
4279
4279
|
}
|
|
4280
4280
|
return new ue(e);
|
|
@@ -4286,11 +4286,11 @@ class ue {
|
|
|
4286
4286
|
static interpolate(e, t, n) {
|
|
4287
4287
|
const a = e.values, o = t.values;
|
|
4288
4288
|
if (a.length !== o.length)
|
|
4289
|
-
throw new
|
|
4289
|
+
throw new j(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);
|
|
4290
4290
|
const i = [];
|
|
4291
4291
|
for (let s = 0; s < a.length; s += 2) {
|
|
4292
4292
|
if (a[s] !== o[s])
|
|
4293
|
-
throw new
|
|
4293
|
+
throw new j(`Cannot interpolate values containing mismatched anchors. from[${s}]: ${a[s]}, to[${s}]: ${o[s]}`);
|
|
4294
4294
|
i.push(a[s]);
|
|
4295
4295
|
const [l, u] = a[s + 1], [c, p] = o[s + 1];
|
|
4296
4296
|
i.push([Le(l, c, n), Le(u, p, n)]);
|
|
@@ -4327,7 +4327,7 @@ class ie {
|
|
|
4327
4327
|
return new ie(e, e, 1);
|
|
4328
4328
|
}
|
|
4329
4329
|
}
|
|
4330
|
-
function
|
|
4330
|
+
function ka(r, e, t, n) {
|
|
4331
4331
|
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.`;
|
|
4332
4332
|
}
|
|
4333
4333
|
function ot(r) {
|
|
@@ -4348,9 +4348,9 @@ function ot(r) {
|
|
|
4348
4348
|
}
|
|
4349
4349
|
function B(r) {
|
|
4350
4350
|
if (r === null)
|
|
4351
|
-
return
|
|
4351
|
+
return Nt;
|
|
4352
4352
|
if (typeof r == "string")
|
|
4353
|
-
return
|
|
4353
|
+
return M;
|
|
4354
4354
|
if (typeof r == "boolean")
|
|
4355
4355
|
return _;
|
|
4356
4356
|
if (typeof r == "number")
|
|
@@ -4358,7 +4358,7 @@ function B(r) {
|
|
|
4358
4358
|
if (r instanceof F)
|
|
4359
4359
|
return de;
|
|
4360
4360
|
if (r instanceof ie)
|
|
4361
|
-
return
|
|
4361
|
+
return jt;
|
|
4362
4362
|
if (r instanceof Br)
|
|
4363
4363
|
return Dt;
|
|
4364
4364
|
if (r instanceof me)
|
|
@@ -4419,7 +4419,7 @@ class He {
|
|
|
4419
4419
|
}
|
|
4420
4420
|
}
|
|
4421
4421
|
const wt = {
|
|
4422
|
-
string:
|
|
4422
|
+
string: M,
|
|
4423
4423
|
number: b,
|
|
4424
4424
|
boolean: _,
|
|
4425
4425
|
object: Re
|
|
@@ -4468,7 +4468,7 @@ class se {
|
|
|
4468
4468
|
const n = this.args[t].evaluate(e);
|
|
4469
4469
|
if (at(this.type, B(n))) {
|
|
4470
4470
|
if (t === this.args.length - 1)
|
|
4471
|
-
throw new
|
|
4471
|
+
throw new j(`Expected value to be of type ${N(this.type)}, but found ${N(B(n))} instead.`);
|
|
4472
4472
|
} else return n;
|
|
4473
4473
|
}
|
|
4474
4474
|
throw new Error();
|
|
@@ -4484,7 +4484,7 @@ const An = {
|
|
|
4484
4484
|
"to-boolean": _,
|
|
4485
4485
|
"to-color": de,
|
|
4486
4486
|
"to-number": b,
|
|
4487
|
-
"to-string":
|
|
4487
|
+
"to-string": M
|
|
4488
4488
|
};
|
|
4489
4489
|
class ke {
|
|
4490
4490
|
constructor(e, t) {
|
|
@@ -4520,10 +4520,10 @@ class ke {
|
|
|
4520
4520
|
const o = e.parseColor(t);
|
|
4521
4521
|
if (o)
|
|
4522
4522
|
return o;
|
|
4523
|
-
} else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n =
|
|
4523
|
+
} else if (Array.isArray(t) && (t.length < 3 || t.length > 4 ? n = `Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.` : n = ka(t[0], t[1], t[2], t[3]), !n))
|
|
4524
4524
|
return new F(t[0] / 255, t[1] / 255, t[2] / 255, t[3]);
|
|
4525
4525
|
}
|
|
4526
|
-
throw new
|
|
4526
|
+
throw new j(n || `Could not parse color from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4527
4527
|
}
|
|
4528
4528
|
case "padding": {
|
|
4529
4529
|
let t;
|
|
@@ -4533,7 +4533,7 @@ class ke {
|
|
|
4533
4533
|
if (a)
|
|
4534
4534
|
return a;
|
|
4535
4535
|
}
|
|
4536
|
-
throw new
|
|
4536
|
+
throw new j(`Could not parse padding from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4537
4537
|
}
|
|
4538
4538
|
case "numberArray": {
|
|
4539
4539
|
let t;
|
|
@@ -4543,7 +4543,7 @@ class ke {
|
|
|
4543
4543
|
if (a)
|
|
4544
4544
|
return a;
|
|
4545
4545
|
}
|
|
4546
|
-
throw new
|
|
4546
|
+
throw new j(`Could not parse numberArray from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4547
4547
|
}
|
|
4548
4548
|
case "colorArray": {
|
|
4549
4549
|
let t;
|
|
@@ -4553,7 +4553,7 @@ class ke {
|
|
|
4553
4553
|
if (a)
|
|
4554
4554
|
return a;
|
|
4555
4555
|
}
|
|
4556
|
-
throw new
|
|
4556
|
+
throw new j(`Could not parse colorArray from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4557
4557
|
}
|
|
4558
4558
|
case "variableAnchorOffsetCollection": {
|
|
4559
4559
|
let t;
|
|
@@ -4563,7 +4563,7 @@ class ke {
|
|
|
4563
4563
|
if (a)
|
|
4564
4564
|
return a;
|
|
4565
4565
|
}
|
|
4566
|
-
throw new
|
|
4566
|
+
throw new j(`Could not parse variableAnchorOffsetCollection from value '${typeof t == "string" ? t : JSON.stringify(t)}'`);
|
|
4567
4567
|
}
|
|
4568
4568
|
case "number": {
|
|
4569
4569
|
let t = null;
|
|
@@ -4574,7 +4574,7 @@ class ke {
|
|
|
4574
4574
|
if (!isNaN(a))
|
|
4575
4575
|
return a;
|
|
4576
4576
|
}
|
|
4577
|
-
throw new
|
|
4577
|
+
throw new j(`Could not convert ${JSON.stringify(t)} to number.`);
|
|
4578
4578
|
}
|
|
4579
4579
|
case "formatted":
|
|
4580
4580
|
return me.fromString(tt(this.args[0].evaluate(e)));
|
|
@@ -4593,8 +4593,8 @@ class ke {
|
|
|
4593
4593
|
return this.args.every((e) => e.outputDefined());
|
|
4594
4594
|
}
|
|
4595
4595
|
}
|
|
4596
|
-
const
|
|
4597
|
-
class
|
|
4596
|
+
const ss = ["Unknown", "Point", "LineString", "Polygon"];
|
|
4597
|
+
class Ca {
|
|
4598
4598
|
constructor() {
|
|
4599
4599
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = /* @__PURE__ */ new Map(), this.availableImages = null, this.canonical = null;
|
|
4600
4600
|
}
|
|
@@ -4602,7 +4602,7 @@ class ka {
|
|
|
4602
4602
|
return this.feature && "id" in this.feature ? this.feature.id : null;
|
|
4603
4603
|
}
|
|
4604
4604
|
geometryType() {
|
|
4605
|
-
return this.feature ? typeof this.feature.type == "number" ?
|
|
4605
|
+
return this.feature ? typeof this.feature.type == "number" ? ss[this.feature.type] : this.feature.type : null;
|
|
4606
4606
|
}
|
|
4607
4607
|
geometry() {
|
|
4608
4608
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -4658,7 +4658,7 @@ class Vt {
|
|
|
4658
4658
|
return null;
|
|
4659
4659
|
}
|
|
4660
4660
|
if (!(i instanceof He) && i.type.kind !== "resolvedImage" && this._isConstant(i)) {
|
|
4661
|
-
const s = new
|
|
4661
|
+
const s = new Ca();
|
|
4662
4662
|
try {
|
|
4663
4663
|
i = new He(i.type, i.evaluate(s));
|
|
4664
4664
|
} catch (l) {
|
|
@@ -4774,11 +4774,11 @@ class qr {
|
|
|
4774
4774
|
evaluate(e) {
|
|
4775
4775
|
const t = this.index.evaluate(e), n = this.input.evaluate(e);
|
|
4776
4776
|
if (t < 0)
|
|
4777
|
-
throw new
|
|
4777
|
+
throw new j(`Array index out of bounds: ${t} < 0.`);
|
|
4778
4778
|
if (t >= n.length)
|
|
4779
|
-
throw new
|
|
4779
|
+
throw new j(`Array index out of bounds: ${t} > ${n.length - 1}.`);
|
|
4780
4780
|
if (t !== Math.floor(t))
|
|
4781
|
-
throw new
|
|
4781
|
+
throw new j(`Array index must be an integer, but found ${t} instead.`);
|
|
4782
4782
|
return n[t];
|
|
4783
4783
|
}
|
|
4784
4784
|
eachChild(e) {
|
|
@@ -4796,16 +4796,16 @@ class Gr {
|
|
|
4796
4796
|
if (e.length !== 3)
|
|
4797
4797
|
return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
|
4798
4798
|
const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
|
|
4799
|
-
return !n || !a ? null : Ur(n.type, [_,
|
|
4799
|
+
return !n || !a ? null : Ur(n.type, [_, M, b, Nt, T]) ? new Gr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
|
|
4800
4800
|
}
|
|
4801
4801
|
evaluate(e) {
|
|
4802
4802
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
4803
4803
|
if (!n)
|
|
4804
4804
|
return !1;
|
|
4805
4805
|
if (!ze(t, ["boolean", "string", "number", "null"]))
|
|
4806
|
-
throw new
|
|
4806
|
+
throw new j(`Expected first argument to be of type boolean, string, number or null, but found ${N(B(t))} instead.`);
|
|
4807
4807
|
if (!ze(n, ["string", "array"]))
|
|
4808
|
-
throw new
|
|
4808
|
+
throw new j(`Expected second argument to be of type array or string, but found ${N(B(n))} instead.`);
|
|
4809
4809
|
return n.indexOf(t) >= 0;
|
|
4810
4810
|
}
|
|
4811
4811
|
eachChild(e) {
|
|
@@ -4825,8 +4825,8 @@ class _t {
|
|
|
4825
4825
|
const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
|
|
4826
4826
|
if (!n || !a)
|
|
4827
4827
|
return null;
|
|
4828
|
-
if (!Ur(n.type, [_,
|
|
4829
|
-
return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${
|
|
4828
|
+
if (!Ur(n.type, [_, M, b, Nt, T]))
|
|
4829
|
+
return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${N(n.type)} instead`);
|
|
4830
4830
|
if (e.length === 4) {
|
|
4831
4831
|
const o = t.parse(e[3], 3, b);
|
|
4832
4832
|
return o ? new _t(n, a, o) : null;
|
|
@@ -4836,7 +4836,7 @@ class _t {
|
|
|
4836
4836
|
evaluate(e) {
|
|
4837
4837
|
const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
|
|
4838
4838
|
if (!ze(t, ["boolean", "string", "number", "null"]))
|
|
4839
|
-
throw new
|
|
4839
|
+
throw new j(`Expected first argument to be of type boolean, string, number or null, but found ${N(B(t))} instead.`);
|
|
4840
4840
|
let a;
|
|
4841
4841
|
if (this.fromIndex && (a = this.fromIndex.evaluate(e)), ze(n, ["string"])) {
|
|
4842
4842
|
const o = n.indexOf(t, a);
|
|
@@ -4844,7 +4844,7 @@ class _t {
|
|
|
4844
4844
|
} else {
|
|
4845
4845
|
if (ze(n, ["array"]))
|
|
4846
4846
|
return n.indexOf(t, a);
|
|
4847
|
-
throw new
|
|
4847
|
+
throw new j(`Expected second argument to be of type array or string, but found ${N(B(n))} instead.`);
|
|
4848
4848
|
}
|
|
4849
4849
|
}
|
|
4850
4850
|
eachChild(e) {
|
|
@@ -4953,7 +4953,7 @@ class Hr {
|
|
|
4953
4953
|
return this.branches.every(([e, t]) => t.outputDefined()) && this.otherwise.outputDefined();
|
|
4954
4954
|
}
|
|
4955
4955
|
}
|
|
4956
|
-
class
|
|
4956
|
+
class Mt {
|
|
4957
4957
|
constructor(e, t, n, a) {
|
|
4958
4958
|
this.type = e, this.input = t, this.beginIndex = n, this.endIndex = a;
|
|
4959
4959
|
}
|
|
@@ -4963,13 +4963,13 @@ class It {
|
|
|
4963
4963
|
const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, b);
|
|
4964
4964
|
if (!n || !a)
|
|
4965
4965
|
return null;
|
|
4966
|
-
if (!Ur(n.type, [Z(T),
|
|
4967
|
-
return t.error(`Expected first argument to be of type array or string, but found ${
|
|
4966
|
+
if (!Ur(n.type, [Z(T), M, T]))
|
|
4967
|
+
return t.error(`Expected first argument to be of type array or string, but found ${N(n.type)} instead`);
|
|
4968
4968
|
if (e.length === 4) {
|
|
4969
4969
|
const o = t.parse(e[3], 3, b);
|
|
4970
|
-
return o ? new
|
|
4970
|
+
return o ? new Mt(n.type, n, a, o) : null;
|
|
4971
4971
|
} else
|
|
4972
|
-
return new
|
|
4972
|
+
return new Mt(n.type, n, a);
|
|
4973
4973
|
}
|
|
4974
4974
|
evaluate(e) {
|
|
4975
4975
|
const t = this.input.evaluate(e), n = this.beginIndex.evaluate(e);
|
|
@@ -4978,7 +4978,7 @@ class It {
|
|
|
4978
4978
|
return [...t].slice(n, a).join("");
|
|
4979
4979
|
if (ze(t, ["array"]))
|
|
4980
4980
|
return t.slice(n, a);
|
|
4981
|
-
throw new
|
|
4981
|
+
throw new j(`Expected first argument to be of type array or string, but found ${N(B(t))} instead.`);
|
|
4982
4982
|
}
|
|
4983
4983
|
eachChild(e) {
|
|
4984
4984
|
e(this.input), e(this.beginIndex), this.endIndex && e(this.endIndex);
|
|
@@ -4987,7 +4987,7 @@ class It {
|
|
|
4987
4987
|
return !1;
|
|
4988
4988
|
}
|
|
4989
4989
|
}
|
|
4990
|
-
function
|
|
4990
|
+
function La(r, e) {
|
|
4991
4991
|
const t = r.length - 1;
|
|
4992
4992
|
let n = 0, a = t, o = 0, i, s;
|
|
4993
4993
|
for (; n <= a; )
|
|
@@ -4998,7 +4998,7 @@ function Ca(r, e) {
|
|
|
4998
4998
|
} else if (i > e)
|
|
4999
4999
|
a = o - 1;
|
|
5000
5000
|
else
|
|
5001
|
-
throw new
|
|
5001
|
+
throw new j("Input is not a number.");
|
|
5002
5002
|
return 0;
|
|
5003
5003
|
}
|
|
5004
5004
|
class Xt {
|
|
@@ -5041,7 +5041,7 @@ class Xt {
|
|
|
5041
5041
|
const o = t.length;
|
|
5042
5042
|
if (a >= t[o - 1])
|
|
5043
5043
|
return n[o - 1].evaluate(e);
|
|
5044
|
-
const i =
|
|
5044
|
+
const i = La(t, a);
|
|
5045
5045
|
return n[i].evaluate(e);
|
|
5046
5046
|
}
|
|
5047
5047
|
eachChild(e) {
|
|
@@ -5053,11 +5053,11 @@ class Xt {
|
|
|
5053
5053
|
return this.outputs.every((e) => e.outputDefined());
|
|
5054
5054
|
}
|
|
5055
5055
|
}
|
|
5056
|
-
function
|
|
5056
|
+
function ls(r) {
|
|
5057
5057
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
5058
5058
|
}
|
|
5059
5059
|
var ur, En;
|
|
5060
|
-
function
|
|
5060
|
+
function us() {
|
|
5061
5061
|
if (En) return ur;
|
|
5062
5062
|
En = 1, ur = r;
|
|
5063
5063
|
function r(e, t, n, a) {
|
|
@@ -5093,7 +5093,7 @@ function ls() {
|
|
|
5093
5093
|
}
|
|
5094
5094
|
}, ur;
|
|
5095
5095
|
}
|
|
5096
|
-
var
|
|
5096
|
+
var cs = us(), ps = /* @__PURE__ */ ls(cs);
|
|
5097
5097
|
class he {
|
|
5098
5098
|
constructor(e, t, n, a, o) {
|
|
5099
5099
|
this.type = e, this.operator = t, this.interpolation = n, this.input = a, this.labels = [], this.outputs = [];
|
|
@@ -5108,7 +5108,7 @@ class he {
|
|
|
5108
5108
|
o = cr(t, 1, n, a);
|
|
5109
5109
|
else if (e.name === "cubic-bezier") {
|
|
5110
5110
|
const i = e.controlPoints;
|
|
5111
|
-
o = new
|
|
5111
|
+
o = new ps(i[0], i[1], i[2], i[3]).solve(cr(t, 1, n, a));
|
|
5112
5112
|
}
|
|
5113
5113
|
return o;
|
|
5114
5114
|
}
|
|
@@ -5156,7 +5156,7 @@ class he {
|
|
|
5156
5156
|
return null;
|
|
5157
5157
|
l = l || h.type, s.push([c, h]);
|
|
5158
5158
|
}
|
|
5159
|
-
return !we(l, b) && !we(l,
|
|
5159
|
+
return !we(l, b) && !we(l, jt) && !we(l, de) && !we(l, Bt) && !we(l, qt) && !we(l, nt) && !we(l, Gt) && !we(l, Z(b)) ? t.error(`Type ${N(l)} is not interpolatable.`) : new he(l, n, a, o, s);
|
|
5160
5160
|
}
|
|
5161
5161
|
evaluate(e) {
|
|
5162
5162
|
const t = this.labels, n = this.outputs;
|
|
@@ -5168,7 +5168,7 @@ class he {
|
|
|
5168
5168
|
const o = t.length;
|
|
5169
5169
|
if (a >= t[o - 1])
|
|
5170
5170
|
return n[o - 1].evaluate(e);
|
|
5171
|
-
const i =
|
|
5171
|
+
const i = La(t, a), s = t[i], l = t[i + 1], u = he.interpolationFactor(this.interpolation, a, s, l), c = n[i].evaluate(e), p = n[i + 1].evaluate(e);
|
|
5172
5172
|
switch (this.operator) {
|
|
5173
5173
|
case "interpolate":
|
|
5174
5174
|
switch (this.type.kind) {
|
|
@@ -5257,45 +5257,45 @@ class it {
|
|
|
5257
5257
|
function Tn(r, e) {
|
|
5258
5258
|
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";
|
|
5259
5259
|
}
|
|
5260
|
-
function
|
|
5260
|
+
function fs(r, e, t) {
|
|
5261
5261
|
return e === t;
|
|
5262
5262
|
}
|
|
5263
|
-
function
|
|
5263
|
+
function ds(r, e, t) {
|
|
5264
5264
|
return e !== t;
|
|
5265
5265
|
}
|
|
5266
|
-
function
|
|
5266
|
+
function hs(r, e, t) {
|
|
5267
5267
|
return e < t;
|
|
5268
5268
|
}
|
|
5269
|
-
function
|
|
5269
|
+
function ys(r, e, t) {
|
|
5270
5270
|
return e > t;
|
|
5271
5271
|
}
|
|
5272
|
-
function
|
|
5272
|
+
function ms(r, e, t) {
|
|
5273
5273
|
return e <= t;
|
|
5274
5274
|
}
|
|
5275
|
-
function
|
|
5275
|
+
function gs(r, e, t) {
|
|
5276
5276
|
return e >= t;
|
|
5277
5277
|
}
|
|
5278
|
-
function
|
|
5278
|
+
function Aa(r, e, t, n) {
|
|
5279
5279
|
return n.compare(e, t) === 0;
|
|
5280
5280
|
}
|
|
5281
|
-
function gs(r, e, t, n) {
|
|
5282
|
-
return !La(r, e, t, n);
|
|
5283
|
-
}
|
|
5284
5281
|
function vs(r, e, t, n) {
|
|
5285
|
-
return
|
|
5282
|
+
return !Aa(r, e, t, n);
|
|
5286
5283
|
}
|
|
5287
5284
|
function bs(r, e, t, n) {
|
|
5288
|
-
return n.compare(e, t)
|
|
5285
|
+
return n.compare(e, t) < 0;
|
|
5289
5286
|
}
|
|
5290
5287
|
function ws(r, e, t, n) {
|
|
5291
|
-
return n.compare(e, t)
|
|
5288
|
+
return n.compare(e, t) > 0;
|
|
5292
5289
|
}
|
|
5293
5290
|
function Ss(r, e, t, n) {
|
|
5291
|
+
return n.compare(e, t) <= 0;
|
|
5292
|
+
}
|
|
5293
|
+
function xs(r, e, t, n) {
|
|
5294
5294
|
return n.compare(e, t) >= 0;
|
|
5295
5295
|
}
|
|
5296
5296
|
function Xe(r, e, t) {
|
|
5297
5297
|
const n = r !== "==" && r !== "!=";
|
|
5298
|
-
return class
|
|
5298
|
+
return class Ea {
|
|
5299
5299
|
constructor(o, i, s) {
|
|
5300
5300
|
this.type = _, this.lhs = o, this.rhs = i, this.collator = s, this.hasUntypedArgument = o.type.kind === "value" || i.type.kind === "value";
|
|
5301
5301
|
}
|
|
@@ -5307,14 +5307,14 @@ function Xe(r, e, t) {
|
|
|
5307
5307
|
if (!l)
|
|
5308
5308
|
return null;
|
|
5309
5309
|
if (!Tn(s, l.type))
|
|
5310
|
-
return i.concat(1).error(`"${s}" comparisons are not supported for type '${
|
|
5310
|
+
return i.concat(1).error(`"${s}" comparisons are not supported for type '${N(l.type)}'.`);
|
|
5311
5311
|
let u = i.parse(o[2], 2, T);
|
|
5312
5312
|
if (!u)
|
|
5313
5313
|
return null;
|
|
5314
5314
|
if (!Tn(s, u.type))
|
|
5315
|
-
return i.concat(2).error(`"${s}" comparisons are not supported for type '${
|
|
5315
|
+
return i.concat(2).error(`"${s}" comparisons are not supported for type '${N(u.type)}'.`);
|
|
5316
5316
|
if (l.type.kind !== u.type.kind && l.type.kind !== "value" && u.type.kind !== "value")
|
|
5317
|
-
return i.error(`Cannot compare types '${
|
|
5317
|
+
return i.error(`Cannot compare types '${N(l.type)}' and '${N(u.type)}'.`);
|
|
5318
5318
|
n && (l.type.kind === "value" && u.type.kind !== "value" ? l = new se(u.type, [l]) : l.type.kind !== "value" && u.type.kind === "value" && (u = new se(l.type, [u])));
|
|
5319
5319
|
let c = null;
|
|
5320
5320
|
if (o.length === 4) {
|
|
@@ -5323,14 +5323,14 @@ function Xe(r, e, t) {
|
|
|
5323
5323
|
if (c = i.parse(o[3], 3, Dt), !c)
|
|
5324
5324
|
return null;
|
|
5325
5325
|
}
|
|
5326
|
-
return new
|
|
5326
|
+
return new Ea(l, u, c);
|
|
5327
5327
|
}
|
|
5328
5328
|
evaluate(o) {
|
|
5329
5329
|
const i = this.lhs.evaluate(o), s = this.rhs.evaluate(o);
|
|
5330
5330
|
if (n && this.hasUntypedArgument) {
|
|
5331
5331
|
const l = B(i), u = B(s);
|
|
5332
5332
|
if (l.kind !== u.kind || !(l.kind === "string" || l.kind === "number"))
|
|
5333
|
-
throw new
|
|
5333
|
+
throw new j(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`);
|
|
5334
5334
|
}
|
|
5335
5335
|
if (this.collator && !n && this.hasUntypedArgument) {
|
|
5336
5336
|
const l = B(i), u = B(s);
|
|
@@ -5347,7 +5347,7 @@ function Xe(r, e, t) {
|
|
|
5347
5347
|
}
|
|
5348
5348
|
};
|
|
5349
5349
|
}
|
|
5350
|
-
const
|
|
5350
|
+
const ks = Xe("==", fs, Aa), Cs = Xe("!=", ds, vs), Ls = Xe("<", hs, bs), As = Xe(">", ys, ws), Es = Xe("<=", ms, Ss), Ts = Xe(">=", gs, xs);
|
|
5351
5351
|
class Wt {
|
|
5352
5352
|
constructor(e, t, n) {
|
|
5353
5353
|
this.type = Dt, this.locale = n, this.caseSensitive = e, this.diacriticSensitive = t;
|
|
@@ -5365,7 +5365,7 @@ class Wt {
|
|
|
5365
5365
|
if (!o)
|
|
5366
5366
|
return null;
|
|
5367
5367
|
let i = null;
|
|
5368
|
-
return n.locale && (i = t.parse(n.locale, 1,
|
|
5368
|
+
return n.locale && (i = t.parse(n.locale, 1, M), !i) ? null : new Wt(a, o, i);
|
|
5369
5369
|
}
|
|
5370
5370
|
evaluate(e) {
|
|
5371
5371
|
return new Br(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null);
|
|
@@ -5379,7 +5379,7 @@ class Wt {
|
|
|
5379
5379
|
}
|
|
5380
5380
|
class Kr {
|
|
5381
5381
|
constructor(e, t, n, a, o) {
|
|
5382
|
-
this.type =
|
|
5382
|
+
this.type = M, this.number = e, this.locale = t, this.currency = n, this.minFractionDigits = a, this.maxFractionDigits = o;
|
|
5383
5383
|
}
|
|
5384
5384
|
static parse(e, t) {
|
|
5385
5385
|
if (e.length !== 3)
|
|
@@ -5391,10 +5391,10 @@ class Kr {
|
|
|
5391
5391
|
if (typeof a != "object" || Array.isArray(a))
|
|
5392
5392
|
return t.error("NumberFormat options argument must be an object.");
|
|
5393
5393
|
let o = null;
|
|
5394
|
-
if (a.locale && (o = t.parse(a.locale, 1,
|
|
5394
|
+
if (a.locale && (o = t.parse(a.locale, 1, M), !o))
|
|
5395
5395
|
return null;
|
|
5396
5396
|
let i = null;
|
|
5397
|
-
if (a.currency && (i = t.parse(a.currency, 1,
|
|
5397
|
+
if (a.currency && (i = t.parse(a.currency, 1, M), !i))
|
|
5398
5398
|
return null;
|
|
5399
5399
|
let s = null;
|
|
5400
5400
|
if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
|
|
@@ -5437,16 +5437,16 @@ class Xr {
|
|
|
5437
5437
|
if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, b), !l))
|
|
5438
5438
|
return null;
|
|
5439
5439
|
let u = null;
|
|
5440
|
-
if (s["text-font"] && (u = t.parse(s["text-font"], 1, Z(
|
|
5440
|
+
if (s["text-font"] && (u = t.parse(s["text-font"], 1, Z(M)), !u))
|
|
5441
5441
|
return null;
|
|
5442
5442
|
let c = null;
|
|
5443
5443
|
if (s["text-color"] && (c = t.parse(s["text-color"], 1, de), !c))
|
|
5444
5444
|
return null;
|
|
5445
5445
|
let p = null;
|
|
5446
5446
|
if (s["vertical-align"]) {
|
|
5447
|
-
if (typeof s["vertical-align"] == "string" && !
|
|
5447
|
+
if (typeof s["vertical-align"] == "string" && !os.includes(s["vertical-align"]))
|
|
5448
5448
|
return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);
|
|
5449
|
-
if (p = t.parse(s["vertical-align"], 1,
|
|
5449
|
+
if (p = t.parse(s["vertical-align"], 1, M), !p)
|
|
5450
5450
|
return null;
|
|
5451
5451
|
}
|
|
5452
5452
|
const f = a[a.length - 1];
|
|
@@ -5485,7 +5485,7 @@ class Wr {
|
|
|
5485
5485
|
static parse(e, t) {
|
|
5486
5486
|
if (e.length !== 2)
|
|
5487
5487
|
return t.error("Expected two arguments.");
|
|
5488
|
-
const n = t.parse(e[1], 1,
|
|
5488
|
+
const n = t.parse(e[1], 1, M);
|
|
5489
5489
|
return n ? new Wr(n) : t.error("No image name provided.");
|
|
5490
5490
|
}
|
|
5491
5491
|
evaluate(e) {
|
|
@@ -5507,7 +5507,7 @@ class Zr {
|
|
|
5507
5507
|
if (e.length !== 2)
|
|
5508
5508
|
return t.error(`Expected 1 argument, but found ${e.length - 1} instead.`);
|
|
5509
5509
|
const n = t.parse(e[1], 1);
|
|
5510
|
-
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 ${
|
|
5510
|
+
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 ${N(n.type)} instead.`) : new Zr(n) : null;
|
|
5511
5511
|
}
|
|
5512
5512
|
evaluate(e) {
|
|
5513
5513
|
const t = this.input.evaluate(e);
|
|
@@ -5515,7 +5515,7 @@ class Zr {
|
|
|
5515
5515
|
return [...t].length;
|
|
5516
5516
|
if (Array.isArray(t))
|
|
5517
5517
|
return t.length;
|
|
5518
|
-
throw new
|
|
5518
|
+
throw new j(`Expected value to be of type string or array, but found ${N(B(t))} instead.`);
|
|
5519
5519
|
}
|
|
5520
5520
|
eachChild(e) {
|
|
5521
5521
|
e(this.input);
|
|
@@ -5525,24 +5525,24 @@ class Zr {
|
|
|
5525
5525
|
}
|
|
5526
5526
|
}
|
|
5527
5527
|
const ye = 8192;
|
|
5528
|
-
function
|
|
5529
|
-
const t =
|
|
5528
|
+
function _s(r, e) {
|
|
5529
|
+
const t = Ms(r[0]), n = Ps(r[1]), a = Math.pow(2, e.z);
|
|
5530
5530
|
return [Math.round(t * a * ye), Math.round(n * a * ye)];
|
|
5531
5531
|
}
|
|
5532
5532
|
function Yr(r, e) {
|
|
5533
5533
|
const t = Math.pow(2, e.z), n = (r[0] / ye + e.x) / t, a = (r[1] / ye + e.y) / t;
|
|
5534
|
-
return [Is(n),
|
|
5534
|
+
return [Is(n), Rs(a)];
|
|
5535
5535
|
}
|
|
5536
|
-
function
|
|
5536
|
+
function Ms(r) {
|
|
5537
5537
|
return (180 + r) / 360;
|
|
5538
5538
|
}
|
|
5539
5539
|
function Is(r) {
|
|
5540
5540
|
return r * 360 - 180;
|
|
5541
5541
|
}
|
|
5542
|
-
function
|
|
5542
|
+
function Ps(r) {
|
|
5543
5543
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
|
|
5544
5544
|
}
|
|
5545
|
-
function
|
|
5545
|
+
function Rs(r) {
|
|
5546
5546
|
return 360 / Math.PI * Math.atan(Math.exp((180 - r * 360) * Math.PI / 180)) - 90;
|
|
5547
5547
|
}
|
|
5548
5548
|
function dt(r, e) {
|
|
@@ -5551,10 +5551,10 @@ function dt(r, e) {
|
|
|
5551
5551
|
function st(r, e) {
|
|
5552
5552
|
return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]);
|
|
5553
5553
|
}
|
|
5554
|
-
function
|
|
5554
|
+
function zs(r, e, t) {
|
|
5555
5555
|
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];
|
|
5556
5556
|
}
|
|
5557
|
-
function
|
|
5557
|
+
function Fs(r, e, t) {
|
|
5558
5558
|
const n = r[0] - e[0], a = r[1] - e[1], o = r[0] - t[0], i = r[1] - t[1];
|
|
5559
5559
|
return n * i - o * a === 0 && n * o <= 0 && a * i <= 0;
|
|
5560
5560
|
}
|
|
@@ -5562,7 +5562,7 @@ function Zt(r, e, t, n) {
|
|
|
5562
5562
|
const a = [e[0] - r[0], e[1] - r[1]], o = [n[0] - t[0], n[1] - t[1]];
|
|
5563
5563
|
return js(o, a) === 0 ? !1 : !!(_n(r, e, t, n) && _n(t, n, r, e));
|
|
5564
5564
|
}
|
|
5565
|
-
function
|
|
5565
|
+
function $s(r, e, t) {
|
|
5566
5566
|
for (const n of t)
|
|
5567
5567
|
for (let a = 0; a < n.length - 1; ++a)
|
|
5568
5568
|
if (Zt(r, e, n[a], n[a + 1]))
|
|
@@ -5573,30 +5573,30 @@ function We(r, e, t = !1) {
|
|
|
5573
5573
|
let n = !1;
|
|
5574
5574
|
for (const a of e)
|
|
5575
5575
|
for (let o = 0; o < a.length - 1; o++) {
|
|
5576
|
-
if (
|
|
5576
|
+
if (Fs(r, a[o], a[o + 1]))
|
|
5577
5577
|
return t;
|
|
5578
|
-
|
|
5578
|
+
zs(r, a[o], a[o + 1]) && (n = !n);
|
|
5579
5579
|
}
|
|
5580
5580
|
return n;
|
|
5581
5581
|
}
|
|
5582
|
-
function
|
|
5582
|
+
function Os(r, e) {
|
|
5583
5583
|
for (const t of e)
|
|
5584
5584
|
if (We(r, t))
|
|
5585
5585
|
return !0;
|
|
5586
5586
|
return !1;
|
|
5587
5587
|
}
|
|
5588
|
-
function
|
|
5588
|
+
function Ta(r, e) {
|
|
5589
5589
|
for (const t of r)
|
|
5590
5590
|
if (!We(t, e))
|
|
5591
5591
|
return !1;
|
|
5592
5592
|
for (let t = 0; t < r.length - 1; ++t)
|
|
5593
|
-
if (
|
|
5593
|
+
if ($s(r[t], r[t + 1], e))
|
|
5594
5594
|
return !1;
|
|
5595
5595
|
return !0;
|
|
5596
5596
|
}
|
|
5597
|
-
function
|
|
5597
|
+
function Ns(r, e) {
|
|
5598
5598
|
for (const t of e)
|
|
5599
|
-
if (
|
|
5599
|
+
if (Ta(r, t))
|
|
5600
5600
|
return !0;
|
|
5601
5601
|
return !1;
|
|
5602
5602
|
}
|
|
@@ -5612,14 +5612,14 @@ function Jr(r, e, t) {
|
|
|
5612
5612
|
for (let a = 0; a < r.length; a++) {
|
|
5613
5613
|
const o = [];
|
|
5614
5614
|
for (let i = 0; i < r[a].length; i++) {
|
|
5615
|
-
const s =
|
|
5615
|
+
const s = _s(r[a][i], t);
|
|
5616
5616
|
dt(e, s), o.push(s);
|
|
5617
5617
|
}
|
|
5618
5618
|
n.push(o);
|
|
5619
5619
|
}
|
|
5620
5620
|
return n;
|
|
5621
5621
|
}
|
|
5622
|
-
function
|
|
5622
|
+
function _a(r, e, t) {
|
|
5623
5623
|
const n = [];
|
|
5624
5624
|
for (let a = 0; a < r.length; a++) {
|
|
5625
5625
|
const o = Jr(r[a], e, t);
|
|
@@ -5627,7 +5627,7 @@ function Ta(r, e, t) {
|
|
|
5627
5627
|
}
|
|
5628
5628
|
return n;
|
|
5629
5629
|
}
|
|
5630
|
-
function
|
|
5630
|
+
function Ma(r, e, t, n) {
|
|
5631
5631
|
if (r[0] < t[0] || r[0] > t[2]) {
|
|
5632
5632
|
const a = n * 0.5;
|
|
5633
5633
|
let o = r[0] - t[0] > a ? -n : t[0] - r[0] > a ? n : 0;
|
|
@@ -5635,19 +5635,19 @@ function _a(r, e, t, n) {
|
|
|
5635
5635
|
}
|
|
5636
5636
|
dt(e, r);
|
|
5637
5637
|
}
|
|
5638
|
-
function
|
|
5638
|
+
function Ds(r) {
|
|
5639
5639
|
r[0] = r[1] = 1 / 0, r[2] = r[3] = -1 / 0;
|
|
5640
5640
|
}
|
|
5641
|
-
function
|
|
5641
|
+
function Mn(r, e, t, n) {
|
|
5642
5642
|
const a = Math.pow(2, n.z) * ye, o = [n.x * ye, n.y * ye], i = [];
|
|
5643
5643
|
for (const s of r)
|
|
5644
5644
|
for (const l of s) {
|
|
5645
5645
|
const u = [l.x + o[0], l.y + o[1]];
|
|
5646
|
-
|
|
5646
|
+
Ma(u, e, t, a), i.push(u);
|
|
5647
5647
|
}
|
|
5648
5648
|
return i;
|
|
5649
5649
|
}
|
|
5650
|
-
function
|
|
5650
|
+
function In(r, e, t, n) {
|
|
5651
5651
|
const a = Math.pow(2, n.z) * ye, o = [n.x * ye, n.y * ye], i = [];
|
|
5652
5652
|
for (const s of r) {
|
|
5653
5653
|
const l = [];
|
|
@@ -5658,17 +5658,17 @@ function Mn(r, e, t, n) {
|
|
|
5658
5658
|
i.push(l);
|
|
5659
5659
|
}
|
|
5660
5660
|
if (e[2] - e[0] <= a / 2) {
|
|
5661
|
-
|
|
5661
|
+
Ds(e);
|
|
5662
5662
|
for (const s of i)
|
|
5663
5663
|
for (const l of s)
|
|
5664
|
-
|
|
5664
|
+
Ma(l, e, t, a);
|
|
5665
5665
|
}
|
|
5666
5666
|
return i;
|
|
5667
5667
|
}
|
|
5668
|
-
function
|
|
5668
|
+
function Us(r, e) {
|
|
5669
5669
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5670
5670
|
if (e.type === "Polygon") {
|
|
5671
|
-
const o = Jr(e.coordinates, n, a), i =
|
|
5671
|
+
const o = Jr(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
|
|
5672
5672
|
if (!st(t, n))
|
|
5673
5673
|
return !1;
|
|
5674
5674
|
for (const s of i)
|
|
@@ -5676,31 +5676,31 @@ function Ds(r, e) {
|
|
|
5676
5676
|
return !1;
|
|
5677
5677
|
}
|
|
5678
5678
|
if (e.type === "MultiPolygon") {
|
|
5679
|
-
const o =
|
|
5679
|
+
const o = _a(e.coordinates, n, a), i = Mn(r.geometry(), t, n, a);
|
|
5680
5680
|
if (!st(t, n))
|
|
5681
5681
|
return !1;
|
|
5682
5682
|
for (const s of i)
|
|
5683
|
-
if (
|
|
5683
|
+
if (!Os(s, o))
|
|
5684
5684
|
return !1;
|
|
5685
5685
|
}
|
|
5686
5686
|
return !0;
|
|
5687
5687
|
}
|
|
5688
|
-
function
|
|
5688
|
+
function Bs(r, e) {
|
|
5689
5689
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0], n = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = r.canonicalID();
|
|
5690
5690
|
if (e.type === "Polygon") {
|
|
5691
|
-
const o = Jr(e.coordinates, n, a), i =
|
|
5691
|
+
const o = Jr(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
|
|
5692
5692
|
if (!st(t, n))
|
|
5693
5693
|
return !1;
|
|
5694
5694
|
for (const s of i)
|
|
5695
|
-
if (!
|
|
5695
|
+
if (!Ta(s, o))
|
|
5696
5696
|
return !1;
|
|
5697
5697
|
}
|
|
5698
5698
|
if (e.type === "MultiPolygon") {
|
|
5699
|
-
const o =
|
|
5699
|
+
const o = _a(e.coordinates, n, a), i = In(r.geometry(), t, n, a);
|
|
5700
5700
|
if (!st(t, n))
|
|
5701
5701
|
return !1;
|
|
5702
5702
|
for (const s of i)
|
|
5703
|
-
if (!
|
|
5703
|
+
if (!Ns(s, o))
|
|
5704
5704
|
return !1;
|
|
5705
5705
|
}
|
|
5706
5706
|
return !0;
|
|
@@ -5739,9 +5739,9 @@ class Fe {
|
|
|
5739
5739
|
evaluate(e) {
|
|
5740
5740
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
5741
5741
|
if (e.geometryType() === "Point")
|
|
5742
|
-
return Ds(e, this.geometries);
|
|
5743
|
-
if (e.geometryType() === "LineString")
|
|
5744
5742
|
return Us(e, this.geometries);
|
|
5743
|
+
if (e.geometryType() === "LineString")
|
|
5744
|
+
return Bs(e, this.geometries);
|
|
5745
5745
|
}
|
|
5746
5746
|
return !1;
|
|
5747
5747
|
}
|
|
@@ -5787,27 +5787,27 @@ class Ia {
|
|
|
5787
5787
|
t[e] = o;
|
|
5788
5788
|
}
|
|
5789
5789
|
}
|
|
5790
|
-
function
|
|
5790
|
+
function qs(r, e) {
|
|
5791
5791
|
if (r.length <= 1)
|
|
5792
5792
|
return [r];
|
|
5793
5793
|
const n = [];
|
|
5794
5794
|
let a, o;
|
|
5795
5795
|
for (const i of r) {
|
|
5796
|
-
const s =
|
|
5796
|
+
const s = Gs(i);
|
|
5797
5797
|
s !== 0 && (i.area = Math.abs(s), o === void 0 && (o = s < 0), o === s < 0 ? (a && n.push(a), a = [i]) : a.push(i));
|
|
5798
5798
|
}
|
|
5799
5799
|
return a && n.push(a), n;
|
|
5800
5800
|
}
|
|
5801
|
-
function
|
|
5801
|
+
function Gs(r) {
|
|
5802
5802
|
let e = 0;
|
|
5803
5803
|
for (let t = 0, n = r.length, a = n - 1, o, i; t < n; a = t++)
|
|
5804
5804
|
o = r[t], i = r[a], e += (i.x - o.x) * (o.y + i.y);
|
|
5805
5805
|
return e;
|
|
5806
5806
|
}
|
|
5807
|
-
const
|
|
5807
|
+
const Vs = 6378.137, Pn = 1 / 298.257223563, Rn = Pn * (2 - Pn), zn = Math.PI / 180;
|
|
5808
5808
|
class Qr {
|
|
5809
5809
|
constructor(e) {
|
|
5810
|
-
const t = zn *
|
|
5810
|
+
const t = zn * Vs * 1e3, n = Math.cos(e * zn), a = 1 / (1 - Rn * (1 - n * n)), o = Math.sqrt(a);
|
|
5811
5811
|
this.kx = t * o * n, this.ky = t * o * a * (1 - Rn);
|
|
5812
5812
|
}
|
|
5813
5813
|
/**
|
|
@@ -5859,10 +5859,10 @@ class Qr {
|
|
|
5859
5859
|
}
|
|
5860
5860
|
}
|
|
5861
5861
|
const Ar = 100, Er = 50;
|
|
5862
|
-
function
|
|
5862
|
+
function Pa(r, e) {
|
|
5863
5863
|
return e[0] - r[0];
|
|
5864
5864
|
}
|
|
5865
|
-
function
|
|
5865
|
+
function It(r) {
|
|
5866
5866
|
return r[1] - r[0] + 1;
|
|
5867
5867
|
}
|
|
5868
5868
|
function ve(r, e) {
|
|
@@ -5871,7 +5871,7 @@ function ve(r, e) {
|
|
|
5871
5871
|
function Tr(r, e) {
|
|
5872
5872
|
if (r[0] > r[1])
|
|
5873
5873
|
return [null, null];
|
|
5874
|
-
const t =
|
|
5874
|
+
const t = It(r);
|
|
5875
5875
|
if (e) {
|
|
5876
5876
|
if (t === 2)
|
|
5877
5877
|
return [r, null];
|
|
@@ -5897,7 +5897,7 @@ function _r(r, e) {
|
|
|
5897
5897
|
dt(t, r[n]);
|
|
5898
5898
|
return t;
|
|
5899
5899
|
}
|
|
5900
|
-
function
|
|
5900
|
+
function Mr(r) {
|
|
5901
5901
|
const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
5902
5902
|
for (const t of r)
|
|
5903
5903
|
for (const n of t)
|
|
@@ -5921,7 +5921,7 @@ function tn(r, e, t, n, a) {
|
|
|
5921
5921
|
const o = Math.min(Pe(r, [t, n], a), Pe(e, [t, n], a)), i = Math.min(Pe(t, [r, e], a), Pe(n, [r, e], a));
|
|
5922
5922
|
return Math.min(o, i);
|
|
5923
5923
|
}
|
|
5924
|
-
function
|
|
5924
|
+
function Hs(r, e, t, n, a) {
|
|
5925
5925
|
if (!(ve(e, r.length) && ve(n, t.length)))
|
|
5926
5926
|
return 1 / 0;
|
|
5927
5927
|
let i = 1 / 0;
|
|
@@ -5936,7 +5936,7 @@ function Vs(r, e, t, n, a) {
|
|
|
5936
5936
|
}
|
|
5937
5937
|
return i;
|
|
5938
5938
|
}
|
|
5939
|
-
function
|
|
5939
|
+
function Ks(r, e, t, n, a) {
|
|
5940
5940
|
if (!(ve(e, r.length) && ve(n, t.length)))
|
|
5941
5941
|
return NaN;
|
|
5942
5942
|
let i = 1 / 0;
|
|
@@ -5946,7 +5946,7 @@ function Hs(r, e, t, n, a) {
|
|
|
5946
5946
|
return i;
|
|
5947
5947
|
return i;
|
|
5948
5948
|
}
|
|
5949
|
-
function
|
|
5949
|
+
function Xs(r, e, t) {
|
|
5950
5950
|
if (We(r, e, !0))
|
|
5951
5951
|
return 0;
|
|
5952
5952
|
let n = 1 / 0;
|
|
@@ -5960,7 +5960,7 @@ function Ks(r, e, t) {
|
|
|
5960
5960
|
}
|
|
5961
5961
|
return n;
|
|
5962
5962
|
}
|
|
5963
|
-
function
|
|
5963
|
+
function Ws(r, e, t, n) {
|
|
5964
5964
|
if (!ve(e, r.length))
|
|
5965
5965
|
return NaN;
|
|
5966
5966
|
for (let o = e[0]; o <= e[1]; ++o)
|
|
@@ -5986,8 +5986,8 @@ function $n(r, e) {
|
|
|
5986
5986
|
return !0;
|
|
5987
5987
|
return !1;
|
|
5988
5988
|
}
|
|
5989
|
-
function
|
|
5990
|
-
const a =
|
|
5989
|
+
function Zs(r, e, t, n = 1 / 0) {
|
|
5990
|
+
const a = Mr(r), o = Mr(e);
|
|
5991
5991
|
if (n !== 1 / 0 && en(a, o, t) >= n)
|
|
5992
5992
|
return n;
|
|
5993
5993
|
if (st(a, o)) {
|
|
@@ -6025,23 +6025,23 @@ function Pt(r, e, t, n, a = 1 / 0) {
|
|
|
6025
6025
|
let o = Math.min(n.distance(r[0], t[0][0]), a);
|
|
6026
6026
|
if (o === 0)
|
|
6027
6027
|
return o;
|
|
6028
|
-
const i = new Ia([[0, [0, r.length - 1], [0, 0]]],
|
|
6028
|
+
const i = new Ia([[0, [0, r.length - 1], [0, 0]]], Pa), s = Mr(t);
|
|
6029
6029
|
for (; i.length > 0; ) {
|
|
6030
6030
|
const l = i.pop();
|
|
6031
6031
|
if (l[0] >= o)
|
|
6032
6032
|
continue;
|
|
6033
6033
|
const u = l[1], c = e ? Er : Ar;
|
|
6034
|
-
if (
|
|
6034
|
+
if (It(u) <= c) {
|
|
6035
6035
|
if (!ve(u, r.length))
|
|
6036
6036
|
return NaN;
|
|
6037
6037
|
if (e) {
|
|
6038
|
-
const p =
|
|
6038
|
+
const p = Ws(r, u, t, n);
|
|
6039
6039
|
if (isNaN(p) || p === 0)
|
|
6040
6040
|
return p;
|
|
6041
6041
|
o = Math.min(o, p);
|
|
6042
6042
|
} else
|
|
6043
6043
|
for (let p = u[0]; p <= u[1]; ++p) {
|
|
6044
|
-
const f =
|
|
6044
|
+
const f = Xs(r[p], t, n);
|
|
6045
6045
|
if (o = Math.min(o, f), o === 0)
|
|
6046
6046
|
return 0;
|
|
6047
6047
|
}
|
|
@@ -6056,18 +6056,18 @@ function Rt(r, e, t, n, a, o = 1 / 0) {
|
|
|
6056
6056
|
let i = Math.min(o, a.distance(r[0], t[0]));
|
|
6057
6057
|
if (i === 0)
|
|
6058
6058
|
return i;
|
|
6059
|
-
const s = new Ia([[0, [0, r.length - 1], [0, t.length - 1]]],
|
|
6059
|
+
const s = new Ia([[0, [0, r.length - 1], [0, t.length - 1]]], Pa);
|
|
6060
6060
|
for (; s.length > 0; ) {
|
|
6061
6061
|
const l = s.pop();
|
|
6062
6062
|
if (l[0] >= i)
|
|
6063
6063
|
continue;
|
|
6064
6064
|
const u = l[1], c = l[2], p = e ? Er : Ar, f = n ? Er : Ar;
|
|
6065
|
-
if (
|
|
6065
|
+
if (It(u) <= p && It(c) <= f) {
|
|
6066
6066
|
if (!ve(u, r.length) && ve(c, t.length))
|
|
6067
6067
|
return NaN;
|
|
6068
6068
|
let d;
|
|
6069
6069
|
if (e && n)
|
|
6070
|
-
d =
|
|
6070
|
+
d = Hs(r, u, t, c, a), i = Math.min(i, d);
|
|
6071
6071
|
else if (e && !n) {
|
|
6072
6072
|
const h = r.slice(u[0], u[1] + 1);
|
|
6073
6073
|
for (let y = c[0]; y <= c[1]; ++y)
|
|
@@ -6079,7 +6079,7 @@ function Rt(r, e, t, n, a, o = 1 / 0) {
|
|
|
6079
6079
|
if (d = Pe(r[y], h, a), i = Math.min(i, d), i === 0)
|
|
6080
6080
|
return i;
|
|
6081
6081
|
} else
|
|
6082
|
-
d =
|
|
6082
|
+
d = Ks(r, u, t, c, a), i = Math.min(i, d);
|
|
6083
6083
|
} else {
|
|
6084
6084
|
const d = Tr(u, e), h = Tr(c, n);
|
|
6085
6085
|
St(s, i, a, r, t, d[0], h[0]), St(s, i, a, r, t, d[0], h[1]), St(s, i, a, r, t, d[1], h[0]), St(s, i, a, r, t, d[1], h[1]);
|
|
@@ -6087,7 +6087,7 @@ function Rt(r, e, t, n, a, o = 1 / 0) {
|
|
|
6087
6087
|
}
|
|
6088
6088
|
return i;
|
|
6089
6089
|
}
|
|
6090
|
-
function
|
|
6090
|
+
function Ys(r, e) {
|
|
6091
6091
|
const t = r.geometry(), n = t.flat().map((i) => Yr([i.x, i.y], r.canonical));
|
|
6092
6092
|
if (t.length === 0)
|
|
6093
6093
|
return NaN;
|
|
@@ -6110,7 +6110,7 @@ function Zs(r, e) {
|
|
|
6110
6110
|
}
|
|
6111
6111
|
return o;
|
|
6112
6112
|
}
|
|
6113
|
-
function
|
|
6113
|
+
function Js(r, e) {
|
|
6114
6114
|
const t = r.geometry(), n = t.flat().map((i) => Yr([i.x, i.y], r.canonical));
|
|
6115
6115
|
if (t.length === 0)
|
|
6116
6116
|
return NaN;
|
|
@@ -6133,11 +6133,11 @@ function Ys(r, e) {
|
|
|
6133
6133
|
}
|
|
6134
6134
|
return o;
|
|
6135
6135
|
}
|
|
6136
|
-
function
|
|
6136
|
+
function Qs(r, e) {
|
|
6137
6137
|
const t = r.geometry();
|
|
6138
6138
|
if (t.length === 0 || t[0].length === 0)
|
|
6139
6139
|
return NaN;
|
|
6140
|
-
const n =
|
|
6140
|
+
const n = qs(t).map((i) => i.map((s) => s.map((l) => Yr([l.x, l.y], r.canonical)))), a = new Qr(n[0][0][0][1]);
|
|
6141
6141
|
let o = 1 / 0;
|
|
6142
6142
|
for (const i of e)
|
|
6143
6143
|
for (const s of n) {
|
|
@@ -6149,7 +6149,7 @@ function Js(r, e) {
|
|
|
6149
6149
|
o = Math.min(o, Pt(i.coordinates, !0, s, a, o));
|
|
6150
6150
|
break;
|
|
6151
6151
|
case "Polygon":
|
|
6152
|
-
o = Math.min(o,
|
|
6152
|
+
o = Math.min(o, Zs(s, i.coordinates, a, o));
|
|
6153
6153
|
break;
|
|
6154
6154
|
}
|
|
6155
6155
|
if (o === 0)
|
|
@@ -6190,11 +6190,11 @@ class $e {
|
|
|
6190
6190
|
evaluate(e) {
|
|
6191
6191
|
if (e.geometry() != null && e.canonicalID() != null) {
|
|
6192
6192
|
if (e.geometryType() === "Point")
|
|
6193
|
-
return Zs(e, this.geometries);
|
|
6194
|
-
if (e.geometryType() === "LineString")
|
|
6195
6193
|
return Ys(e, this.geometries);
|
|
6196
|
-
if (e.geometryType() === "
|
|
6194
|
+
if (e.geometryType() === "LineString")
|
|
6197
6195
|
return Js(e, this.geometries);
|
|
6196
|
+
if (e.geometryType() === "Polygon")
|
|
6197
|
+
return Qs(e, this.geometries);
|
|
6198
6198
|
}
|
|
6199
6199
|
return NaN;
|
|
6200
6200
|
}
|
|
@@ -6227,12 +6227,12 @@ class ht {
|
|
|
6227
6227
|
}
|
|
6228
6228
|
const rn = {
|
|
6229
6229
|
// special forms
|
|
6230
|
-
"==":
|
|
6231
|
-
"!=":
|
|
6232
|
-
">":
|
|
6233
|
-
"<":
|
|
6234
|
-
">=":
|
|
6235
|
-
"<=":
|
|
6230
|
+
"==": ks,
|
|
6231
|
+
"!=": Cs,
|
|
6232
|
+
">": As,
|
|
6233
|
+
"<": Ls,
|
|
6234
|
+
">=": Ts,
|
|
6235
|
+
"<=": Es,
|
|
6236
6236
|
array: se,
|
|
6237
6237
|
at: qr,
|
|
6238
6238
|
boolean: se,
|
|
@@ -6253,7 +6253,7 @@ const rn = {
|
|
|
6253
6253
|
number: se,
|
|
6254
6254
|
"number-format": Kr,
|
|
6255
6255
|
object: se,
|
|
6256
|
-
slice:
|
|
6256
|
+
slice: Mt,
|
|
6257
6257
|
step: Xt,
|
|
6258
6258
|
string: se,
|
|
6259
6259
|
"to-boolean": ke,
|
|
@@ -6313,12 +6313,12 @@ class le {
|
|
|
6313
6313
|
if (s.length === 1)
|
|
6314
6314
|
t.errors.push(...l.errors);
|
|
6315
6315
|
else {
|
|
6316
|
-
const c = (s.length ? s : i).map(([f]) =>
|
|
6316
|
+
const c = (s.length ? s : i).map(([f]) => tl(f)).join(" | "), p = [];
|
|
6317
6317
|
for (let f = 1; f < e.length; f++) {
|
|
6318
6318
|
const d = t.parse(e[f], 1 + p.length);
|
|
6319
6319
|
if (!d)
|
|
6320
6320
|
return null;
|
|
6321
|
-
p.push(
|
|
6321
|
+
p.push(N(d.type));
|
|
6322
6322
|
}
|
|
6323
6323
|
t.error(`Expected arguments of type ${c}, but found (${p.join(", ")}) instead.`);
|
|
6324
6324
|
}
|
|
@@ -6330,21 +6330,21 @@ class le {
|
|
|
6330
6330
|
e[n] = le;
|
|
6331
6331
|
}
|
|
6332
6332
|
}
|
|
6333
|
-
function
|
|
6333
|
+
function Nn(r, [e, t, n, a]) {
|
|
6334
6334
|
e = e.evaluate(r), t = t.evaluate(r), n = n.evaluate(r);
|
|
6335
|
-
const o = a ? a.evaluate(r) : 1, i =
|
|
6335
|
+
const o = a ? a.evaluate(r) : 1, i = ka(e, t, n, o);
|
|
6336
6336
|
if (i)
|
|
6337
|
-
throw new
|
|
6337
|
+
throw new j(i);
|
|
6338
6338
|
return new F(e / 255, t / 255, n / 255, o, !1);
|
|
6339
6339
|
}
|
|
6340
|
-
function
|
|
6340
|
+
function jn(r, e) {
|
|
6341
6341
|
return r in e;
|
|
6342
6342
|
}
|
|
6343
6343
|
function fr(r, e) {
|
|
6344
6344
|
const t = e[r];
|
|
6345
6345
|
return typeof t > "u" ? null : t;
|
|
6346
6346
|
}
|
|
6347
|
-
function
|
|
6347
|
+
function el(r, e, t, n) {
|
|
6348
6348
|
for (; t <= n; ) {
|
|
6349
6349
|
const a = t + n >> 1;
|
|
6350
6350
|
if (e[a] === r)
|
|
@@ -6353,21 +6353,21 @@ function Qs(r, e, t, n) {
|
|
|
6353
6353
|
}
|
|
6354
6354
|
return !1;
|
|
6355
6355
|
}
|
|
6356
|
-
function
|
|
6356
|
+
function Me(r) {
|
|
6357
6357
|
return { type: r };
|
|
6358
6358
|
}
|
|
6359
6359
|
le.register(rn, {
|
|
6360
6360
|
error: [
|
|
6361
|
-
|
|
6362
|
-
[
|
|
6361
|
+
Xi,
|
|
6362
|
+
[M],
|
|
6363
6363
|
(r, [e]) => {
|
|
6364
|
-
throw new
|
|
6364
|
+
throw new j(e.evaluate(r));
|
|
6365
6365
|
}
|
|
6366
6366
|
],
|
|
6367
6367
|
typeof: [
|
|
6368
|
-
|
|
6368
|
+
M,
|
|
6369
6369
|
[T],
|
|
6370
|
-
(r, [e]) =>
|
|
6370
|
+
(r, [e]) => N(B(e.evaluate(r)))
|
|
6371
6371
|
],
|
|
6372
6372
|
"to-rgba": [
|
|
6373
6373
|
Z(b, 4),
|
|
@@ -6380,23 +6380,23 @@ le.register(rn, {
|
|
|
6380
6380
|
rgb: [
|
|
6381
6381
|
de,
|
|
6382
6382
|
[b, b, b],
|
|
6383
|
-
|
|
6383
|
+
Nn
|
|
6384
6384
|
],
|
|
6385
6385
|
rgba: [
|
|
6386
6386
|
de,
|
|
6387
6387
|
[b, b, b, b],
|
|
6388
|
-
|
|
6388
|
+
Nn
|
|
6389
6389
|
],
|
|
6390
6390
|
has: {
|
|
6391
6391
|
type: _,
|
|
6392
6392
|
overloads: [
|
|
6393
6393
|
[
|
|
6394
|
-
[
|
|
6395
|
-
(r, [e]) =>
|
|
6394
|
+
[M],
|
|
6395
|
+
(r, [e]) => jn(e.evaluate(r), r.properties())
|
|
6396
6396
|
],
|
|
6397
6397
|
[
|
|
6398
|
-
[
|
|
6399
|
-
(r, [e, t]) =>
|
|
6398
|
+
[M, Re],
|
|
6399
|
+
(r, [e, t]) => jn(e.evaluate(r), t.evaluate(r))
|
|
6400
6400
|
]
|
|
6401
6401
|
]
|
|
6402
6402
|
},
|
|
@@ -6404,18 +6404,18 @@ le.register(rn, {
|
|
|
6404
6404
|
type: T,
|
|
6405
6405
|
overloads: [
|
|
6406
6406
|
[
|
|
6407
|
-
[
|
|
6407
|
+
[M],
|
|
6408
6408
|
(r, [e]) => fr(e.evaluate(r), r.properties())
|
|
6409
6409
|
],
|
|
6410
6410
|
[
|
|
6411
|
-
[
|
|
6411
|
+
[M, Re],
|
|
6412
6412
|
(r, [e, t]) => fr(e.evaluate(r), t.evaluate(r))
|
|
6413
6413
|
]
|
|
6414
6414
|
]
|
|
6415
6415
|
},
|
|
6416
6416
|
"feature-state": [
|
|
6417
6417
|
T,
|
|
6418
|
-
[
|
|
6418
|
+
[M],
|
|
6419
6419
|
(r, [e]) => fr(e.evaluate(r), r.featureState || {})
|
|
6420
6420
|
],
|
|
6421
6421
|
properties: [
|
|
@@ -6424,7 +6424,7 @@ le.register(rn, {
|
|
|
6424
6424
|
(r) => r.properties()
|
|
6425
6425
|
],
|
|
6426
6426
|
"geometry-type": [
|
|
6427
|
-
|
|
6427
|
+
M,
|
|
6428
6428
|
[],
|
|
6429
6429
|
(r) => r.geometryType()
|
|
6430
6430
|
],
|
|
@@ -6460,7 +6460,7 @@ le.register(rn, {
|
|
|
6460
6460
|
],
|
|
6461
6461
|
"+": [
|
|
6462
6462
|
b,
|
|
6463
|
-
|
|
6463
|
+
Me(b),
|
|
6464
6464
|
(r, e) => {
|
|
6465
6465
|
let t = 0;
|
|
6466
6466
|
for (const n of e)
|
|
@@ -6470,7 +6470,7 @@ le.register(rn, {
|
|
|
6470
6470
|
],
|
|
6471
6471
|
"*": [
|
|
6472
6472
|
b,
|
|
6473
|
-
|
|
6473
|
+
Me(b),
|
|
6474
6474
|
(r, e) => {
|
|
6475
6475
|
let t = 1;
|
|
6476
6476
|
for (const n of e)
|
|
@@ -6573,12 +6573,12 @@ le.register(rn, {
|
|
|
6573
6573
|
],
|
|
6574
6574
|
min: [
|
|
6575
6575
|
b,
|
|
6576
|
-
|
|
6576
|
+
Me(b),
|
|
6577
6577
|
(r, e) => Math.min(...e.map((t) => t.evaluate(r)))
|
|
6578
6578
|
],
|
|
6579
6579
|
max: [
|
|
6580
6580
|
b,
|
|
6581
|
-
|
|
6581
|
+
Me(b),
|
|
6582
6582
|
(r, e) => Math.max(...e.map((t) => t.evaluate(r)))
|
|
6583
6583
|
],
|
|
6584
6584
|
abs: [
|
|
@@ -6606,7 +6606,7 @@ le.register(rn, {
|
|
|
6606
6606
|
],
|
|
6607
6607
|
"filter-==": [
|
|
6608
6608
|
_,
|
|
6609
|
-
[
|
|
6609
|
+
[M, T],
|
|
6610
6610
|
(r, [e, t]) => r.properties()[e.value] === t.value
|
|
6611
6611
|
],
|
|
6612
6612
|
"filter-id-==": [
|
|
@@ -6616,12 +6616,12 @@ le.register(rn, {
|
|
|
6616
6616
|
],
|
|
6617
6617
|
"filter-type-==": [
|
|
6618
6618
|
_,
|
|
6619
|
-
[
|
|
6619
|
+
[M],
|
|
6620
6620
|
(r, [e]) => r.geometryType() === e.value
|
|
6621
6621
|
],
|
|
6622
6622
|
"filter-<": [
|
|
6623
6623
|
_,
|
|
6624
|
-
[
|
|
6624
|
+
[M, T],
|
|
6625
6625
|
(r, [e, t]) => {
|
|
6626
6626
|
const n = r.properties()[e.value], a = t.value;
|
|
6627
6627
|
return typeof n == typeof a && n < a;
|
|
@@ -6637,7 +6637,7 @@ le.register(rn, {
|
|
|
6637
6637
|
],
|
|
6638
6638
|
"filter->": [
|
|
6639
6639
|
_,
|
|
6640
|
-
[
|
|
6640
|
+
[M, T],
|
|
6641
6641
|
(r, [e, t]) => {
|
|
6642
6642
|
const n = r.properties()[e.value], a = t.value;
|
|
6643
6643
|
return typeof n == typeof a && n > a;
|
|
@@ -6653,7 +6653,7 @@ le.register(rn, {
|
|
|
6653
6653
|
],
|
|
6654
6654
|
"filter-<=": [
|
|
6655
6655
|
_,
|
|
6656
|
-
[
|
|
6656
|
+
[M, T],
|
|
6657
6657
|
(r, [e, t]) => {
|
|
6658
6658
|
const n = r.properties()[e.value], a = t.value;
|
|
6659
6659
|
return typeof n == typeof a && n <= a;
|
|
@@ -6669,7 +6669,7 @@ le.register(rn, {
|
|
|
6669
6669
|
],
|
|
6670
6670
|
"filter->=": [
|
|
6671
6671
|
_,
|
|
6672
|
-
[
|
|
6672
|
+
[M, T],
|
|
6673
6673
|
(r, [e, t]) => {
|
|
6674
6674
|
const n = r.properties()[e.value], a = t.value;
|
|
6675
6675
|
return typeof n == typeof a && n >= a;
|
|
@@ -6695,7 +6695,7 @@ le.register(rn, {
|
|
|
6695
6695
|
],
|
|
6696
6696
|
"filter-type-in": [
|
|
6697
6697
|
_,
|
|
6698
|
-
[Z(
|
|
6698
|
+
[Z(M)],
|
|
6699
6699
|
(r, [e]) => e.value.indexOf(r.geometryType()) >= 0
|
|
6700
6700
|
],
|
|
6701
6701
|
"filter-id-in": [
|
|
@@ -6705,15 +6705,15 @@ le.register(rn, {
|
|
|
6705
6705
|
],
|
|
6706
6706
|
"filter-in-small": [
|
|
6707
6707
|
_,
|
|
6708
|
-
[
|
|
6708
|
+
[M, Z(T)],
|
|
6709
6709
|
// assumes v is an array literal
|
|
6710
6710
|
(r, [e, t]) => t.value.indexOf(r.properties()[e.value]) >= 0
|
|
6711
6711
|
],
|
|
6712
6712
|
"filter-in-large": [
|
|
6713
6713
|
_,
|
|
6714
|
-
[
|
|
6714
|
+
[M, Z(T)],
|
|
6715
6715
|
// assumes v is a array literal with values sorted in ascending order and of a single type
|
|
6716
|
-
(r, [e, t]) =>
|
|
6716
|
+
(r, [e, t]) => el(r.properties()[e.value], t.value, 0, t.value.length - 1)
|
|
6717
6717
|
],
|
|
6718
6718
|
all: {
|
|
6719
6719
|
type: _,
|
|
@@ -6723,7 +6723,7 @@ le.register(rn, {
|
|
|
6723
6723
|
(r, [e, t]) => e.evaluate(r) && t.evaluate(r)
|
|
6724
6724
|
],
|
|
6725
6725
|
[
|
|
6726
|
-
|
|
6726
|
+
Me(_),
|
|
6727
6727
|
(r, e) => {
|
|
6728
6728
|
for (const t of e)
|
|
6729
6729
|
if (!t.evaluate(r))
|
|
@@ -6741,7 +6741,7 @@ le.register(rn, {
|
|
|
6741
6741
|
(r, [e, t]) => e.evaluate(r) || t.evaluate(r)
|
|
6742
6742
|
],
|
|
6743
6743
|
[
|
|
6744
|
-
|
|
6744
|
+
Me(_),
|
|
6745
6745
|
(r, e) => {
|
|
6746
6746
|
for (const t of e)
|
|
6747
6747
|
if (t.evaluate(r))
|
|
@@ -6758,7 +6758,7 @@ le.register(rn, {
|
|
|
6758
6758
|
],
|
|
6759
6759
|
"is-supported-script": [
|
|
6760
6760
|
_,
|
|
6761
|
-
[
|
|
6761
|
+
[M],
|
|
6762
6762
|
// At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant
|
|
6763
6763
|
(r, [e]) => {
|
|
6764
6764
|
const t = r.globals && r.globals.isSupportedScript;
|
|
@@ -6766,28 +6766,28 @@ le.register(rn, {
|
|
|
6766
6766
|
}
|
|
6767
6767
|
],
|
|
6768
6768
|
upcase: [
|
|
6769
|
-
|
|
6770
|
-
[
|
|
6769
|
+
M,
|
|
6770
|
+
[M],
|
|
6771
6771
|
(r, [e]) => e.evaluate(r).toUpperCase()
|
|
6772
6772
|
],
|
|
6773
6773
|
downcase: [
|
|
6774
|
-
|
|
6775
|
-
[
|
|
6774
|
+
M,
|
|
6775
|
+
[M],
|
|
6776
6776
|
(r, [e]) => e.evaluate(r).toLowerCase()
|
|
6777
6777
|
],
|
|
6778
6778
|
concat: [
|
|
6779
|
-
|
|
6780
|
-
|
|
6779
|
+
M,
|
|
6780
|
+
Me(T),
|
|
6781
6781
|
(r, e) => e.map((t) => tt(t.evaluate(r))).join("")
|
|
6782
6782
|
],
|
|
6783
6783
|
"resolved-locale": [
|
|
6784
|
-
|
|
6784
|
+
M,
|
|
6785
6785
|
[Dt],
|
|
6786
6786
|
(r, [e]) => e.evaluate(r).resolvedLocale()
|
|
6787
6787
|
]
|
|
6788
6788
|
});
|
|
6789
|
-
function
|
|
6790
|
-
return Array.isArray(r) ? `(${r.map(
|
|
6789
|
+
function tl(r) {
|
|
6790
|
+
return Array.isArray(r) ? `(${r.map(N).join(", ")})` : `(${N(r.type)}...)`;
|
|
6791
6791
|
}
|
|
6792
6792
|
function zt(r) {
|
|
6793
6793
|
if (r instanceof Kt)
|
|
@@ -6844,7 +6844,7 @@ function Jt(r, e) {
|
|
|
6844
6844
|
t && !Jt(n, e) && (t = !1);
|
|
6845
6845
|
}), t;
|
|
6846
6846
|
}
|
|
6847
|
-
function
|
|
6847
|
+
function Ir(r) {
|
|
6848
6848
|
return { result: "success", value: r };
|
|
6849
6849
|
}
|
|
6850
6850
|
function Be(r) {
|
|
@@ -6853,21 +6853,21 @@ function Be(r) {
|
|
|
6853
6853
|
function Ft(r) {
|
|
6854
6854
|
return r["property-type"] === "data-driven" || r["property-type"] === "cross-faded-data-driven";
|
|
6855
6855
|
}
|
|
6856
|
-
function
|
|
6856
|
+
function Ra(r) {
|
|
6857
6857
|
return !!r.expression && r.expression.parameters.indexOf("zoom") > -1;
|
|
6858
6858
|
}
|
|
6859
|
-
function
|
|
6859
|
+
function za(r) {
|
|
6860
6860
|
return !!r.expression && r.expression.interpolated;
|
|
6861
6861
|
}
|
|
6862
|
-
function
|
|
6862
|
+
function I(r) {
|
|
6863
6863
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
6864
6864
|
}
|
|
6865
6865
|
function nn(r) {
|
|
6866
6866
|
return typeof r == "object" && r !== null && !Array.isArray(r) && B(r) === Re;
|
|
6867
6867
|
}
|
|
6868
|
-
class
|
|
6868
|
+
class rl {
|
|
6869
6869
|
constructor(e, t) {
|
|
6870
|
-
this.expression = e, this._warningHistory = {}, this._evaluator = new
|
|
6870
|
+
this.expression = e, this._warningHistory = {}, this._evaluator = new Ca(), this._defaultValue = t ? ol(t) : null, this._enumValues = t && t.type === "enum" ? t.values : null;
|
|
6871
6871
|
}
|
|
6872
6872
|
evaluateWithoutErrorHandling(e, t, n, a, o, i) {
|
|
6873
6873
|
return this._evaluator.globals = e, this._evaluator.feature = t, this._evaluator.featureState = n, this._evaluator.canonical = a, this._evaluator.availableImages = o || null, this._evaluator.formattedSection = i, this.expression.evaluate(this._evaluator);
|
|
@@ -6879,19 +6879,19 @@ class tl {
|
|
|
6879
6879
|
if (s == null || typeof s == "number" && s !== s)
|
|
6880
6880
|
return this._defaultValue;
|
|
6881
6881
|
if (this._enumValues && !(s in this._enumValues))
|
|
6882
|
-
throw new
|
|
6882
|
+
throw new j(`Expected value to be one of ${Object.keys(this._enumValues).map((l) => JSON.stringify(l)).join(", ")}, but found ${JSON.stringify(s)} instead.`);
|
|
6883
6883
|
return s;
|
|
6884
6884
|
} catch (s) {
|
|
6885
6885
|
return this._warningHistory[s.message] || (this._warningHistory[s.message] = !0, typeof console < "u" && console.warn(s.message)), this._defaultValue;
|
|
6886
6886
|
}
|
|
6887
6887
|
}
|
|
6888
6888
|
}
|
|
6889
|
-
function
|
|
6889
|
+
function Fa(r) {
|
|
6890
6890
|
return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in rn;
|
|
6891
6891
|
}
|
|
6892
|
-
function
|
|
6893
|
-
const t = new Vt(rn, zt, [], e ?
|
|
6894
|
-
return n ?
|
|
6892
|
+
function $a(r, e) {
|
|
6893
|
+
const t = new Vt(rn, zt, [], e ? al(e) : void 0), n = t.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
|
6894
|
+
return n ? Ir(new rl(n, e)) : Be(t.errors);
|
|
6895
6895
|
}
|
|
6896
6896
|
class Dn {
|
|
6897
6897
|
constructor(e, t) {
|
|
@@ -6918,27 +6918,27 @@ class Un {
|
|
|
6918
6918
|
return this.interpolationType ? he.interpolationFactor(this.interpolationType, e, t, n) : 0;
|
|
6919
6919
|
}
|
|
6920
6920
|
}
|
|
6921
|
-
function
|
|
6922
|
-
const t =
|
|
6921
|
+
function nl(r, e) {
|
|
6922
|
+
const t = $a(r, e);
|
|
6923
6923
|
if (t.result === "error")
|
|
6924
6924
|
return t;
|
|
6925
6925
|
const n = t.value.expression, a = Yt(n);
|
|
6926
6926
|
if (!a && !Ft(e))
|
|
6927
6927
|
return Be([new fe("", "data expressions not supported")]);
|
|
6928
6928
|
const o = Jt(n, ["zoom"]);
|
|
6929
|
-
if (!o && !
|
|
6929
|
+
if (!o && !Ra(e))
|
|
6930
6930
|
return Be([new fe("", "zoom expressions not supported")]);
|
|
6931
6931
|
const i = Ct(n);
|
|
6932
6932
|
if (!i && !o)
|
|
6933
6933
|
return Be([new fe("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
|
|
6934
6934
|
if (i instanceof fe)
|
|
6935
6935
|
return Be([i]);
|
|
6936
|
-
if (i instanceof he && !
|
|
6936
|
+
if (i instanceof he && !za(e))
|
|
6937
6937
|
return Be([new fe("", '"interpolate" expressions cannot be used with this property')]);
|
|
6938
6938
|
if (!i)
|
|
6939
|
-
return
|
|
6939
|
+
return Ir(a ? new Dn("constant", t.value) : new Dn("source", t.value));
|
|
6940
6940
|
const s = i instanceof he ? i.interpolation : void 0;
|
|
6941
|
-
return
|
|
6941
|
+
return Ir(a ? new Un("camera", t.value, i.labels, s) : new Un("composite", t.value, i.labels, s));
|
|
6942
6942
|
}
|
|
6943
6943
|
function Ct(r) {
|
|
6944
6944
|
let e = null;
|
|
@@ -6959,24 +6959,24 @@ function an(r, e = /* @__PURE__ */ new Set()) {
|
|
|
6959
6959
|
an(t, e);
|
|
6960
6960
|
}), e;
|
|
6961
6961
|
}
|
|
6962
|
-
function
|
|
6962
|
+
function al(r) {
|
|
6963
6963
|
const e = {
|
|
6964
6964
|
color: de,
|
|
6965
|
-
string:
|
|
6965
|
+
string: M,
|
|
6966
6966
|
number: b,
|
|
6967
|
-
enum:
|
|
6967
|
+
enum: M,
|
|
6968
6968
|
boolean: _,
|
|
6969
6969
|
formatted: Ut,
|
|
6970
6970
|
padding: Bt,
|
|
6971
6971
|
numberArray: qt,
|
|
6972
6972
|
colorArray: nt,
|
|
6973
|
-
projectionDefinition:
|
|
6973
|
+
projectionDefinition: jt,
|
|
6974
6974
|
resolvedImage: ft,
|
|
6975
6975
|
variableAnchorOffsetCollection: Gt
|
|
6976
6976
|
};
|
|
6977
6977
|
return r.type === "array" ? Z(e[r.value] || T, r.length) : e[r.type];
|
|
6978
6978
|
}
|
|
6979
|
-
function
|
|
6979
|
+
function ol(r) {
|
|
6980
6980
|
if (r.type === "color" && nn(r.default))
|
|
6981
6981
|
return new F(0, 0, 0, 0);
|
|
6982
6982
|
switch (r.type) {
|
|
@@ -6996,7 +6996,7 @@ function al(r) {
|
|
|
6996
6996
|
return r.default === void 0 ? null : r.default;
|
|
6997
6997
|
}
|
|
6998
6998
|
}
|
|
6999
|
-
function
|
|
6999
|
+
function Oa(r) {
|
|
7000
7000
|
if (r === !0 || r === !1)
|
|
7001
7001
|
return !0;
|
|
7002
7002
|
if (!Array.isArray(r) || r.length === 0)
|
|
@@ -7020,27 +7020,27 @@ function $a(r) {
|
|
|
7020
7020
|
case "any":
|
|
7021
7021
|
case "all":
|
|
7022
7022
|
for (const e of r.slice(1))
|
|
7023
|
-
if (
|
|
7023
|
+
if (!Oa(e) && typeof e != "boolean")
|
|
7024
7024
|
return !1;
|
|
7025
7025
|
return !0;
|
|
7026
7026
|
default:
|
|
7027
7027
|
return !0;
|
|
7028
7028
|
}
|
|
7029
7029
|
}
|
|
7030
|
-
function
|
|
7030
|
+
function Na(r) {
|
|
7031
7031
|
const e = r.key, t = r.value;
|
|
7032
7032
|
return t ? [new g(e, t, "constants have been deprecated as of v8")] : [];
|
|
7033
7033
|
}
|
|
7034
7034
|
function U(r) {
|
|
7035
7035
|
return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r;
|
|
7036
7036
|
}
|
|
7037
|
-
function
|
|
7037
|
+
function Ne(r) {
|
|
7038
7038
|
if (Array.isArray(r))
|
|
7039
|
-
return r.map(
|
|
7039
|
+
return r.map(Ne);
|
|
7040
7040
|
if (r instanceof Object && !(r instanceof Number || r instanceof String || r instanceof Boolean)) {
|
|
7041
7041
|
const e = {};
|
|
7042
7042
|
for (const t in r)
|
|
7043
|
-
e[t] =
|
|
7043
|
+
e[t] = Ne(r[t]);
|
|
7044
7044
|
return e;
|
|
7045
7045
|
}
|
|
7046
7046
|
return U(r);
|
|
@@ -7048,7 +7048,7 @@ function je(r) {
|
|
|
7048
7048
|
function te(r) {
|
|
7049
7049
|
const e = r.key, t = r.value, n = r.valueSpec || {}, a = r.objectElementValidators || {}, o = r.style, i = r.styleSpec, s = r.validateSpec;
|
|
7050
7050
|
let l = [];
|
|
7051
|
-
const u =
|
|
7051
|
+
const u = I(t);
|
|
7052
7052
|
if (u !== "object")
|
|
7053
7053
|
return [new g(e, t, `object expected, ${u} found`)];
|
|
7054
7054
|
for (const c in t) {
|
|
@@ -7083,8 +7083,8 @@ function te(r) {
|
|
|
7083
7083
|
}
|
|
7084
7084
|
function on(r) {
|
|
7085
7085
|
const e = r.value, t = r.valueSpec, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.key, s = r.arrayElementValidator || n;
|
|
7086
|
-
if (
|
|
7087
|
-
return [new g(i, e, `array expected, ${
|
|
7086
|
+
if (I(e) !== "array")
|
|
7087
|
+
return [new g(i, e, `array expected, ${I(e)} found`)];
|
|
7088
7088
|
if (t.length && e.length !== t.length)
|
|
7089
7089
|
return [new g(i, e, `array length ${t.length} expected, length ${e.length} found`)];
|
|
7090
7090
|
if (t["min-length"] && e.length < t["min-length"])
|
|
@@ -7093,7 +7093,7 @@ function on(r) {
|
|
|
7093
7093
|
type: t.value,
|
|
7094
7094
|
values: t.values
|
|
7095
7095
|
};
|
|
7096
|
-
o.$version < 7 && (l.function = t.function),
|
|
7096
|
+
o.$version < 7 && (l.function = t.function), I(t.value) === "object" && (l = t.value);
|
|
7097
7097
|
let u = [];
|
|
7098
7098
|
for (let c = 0; c < e.length; c++)
|
|
7099
7099
|
u = u.concat(s({
|
|
@@ -7110,13 +7110,13 @@ function on(r) {
|
|
|
7110
7110
|
}
|
|
7111
7111
|
function Qt(r) {
|
|
7112
7112
|
const e = r.key, t = r.value, n = r.valueSpec;
|
|
7113
|
-
let a =
|
|
7113
|
+
let a = I(t);
|
|
7114
7114
|
return a === "number" && t !== t && (a = "NaN"), a !== "number" ? [new g(e, t, `number expected, ${a} found`)] : "minimum" in n && t < n.minimum ? [new g(e, t, `${t} is less than the minimum value ${n.minimum}`)] : "maximum" in n && t > n.maximum ? [new g(e, t, `${t} is greater than the maximum value ${n.maximum}`)] : [];
|
|
7115
7115
|
}
|
|
7116
7116
|
function ja(r) {
|
|
7117
7117
|
const e = r.valueSpec, t = U(r.value.type);
|
|
7118
7118
|
let n, a = {}, o, i;
|
|
7119
|
-
const s = t !== "categorical" && r.value.property === void 0, l = !s, u =
|
|
7119
|
+
const s = t !== "categorical" && r.value.property === void 0, l = !s, u = I(r.value.stops) === "array" && I(r.value.stops[0]) === "array" && I(r.value.stops[0][0]) === "object", c = te({
|
|
7120
7120
|
key: r.key,
|
|
7121
7121
|
value: r.value,
|
|
7122
7122
|
valueSpec: r.styleSpec.function,
|
|
@@ -7128,7 +7128,7 @@ function ja(r) {
|
|
|
7128
7128
|
default: h
|
|
7129
7129
|
}
|
|
7130
7130
|
});
|
|
7131
|
-
return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !
|
|
7131
|
+
return t === "identity" && s && c.push(new g(r.key, r.value, 'missing required property "property"')), t !== "identity" && !r.value.stops && c.push(new g(r.key, r.value, 'missing required property "stops"')), t === "exponential" && r.valueSpec.expression && !za(r.valueSpec) && c.push(new g(r.key, r.value, "exponential functions not supported")), r.styleSpec.$version >= 8 && (l && !Ft(r.valueSpec) ? c.push(new g(r.key, r.value, "property functions not supported")) : s && !Ra(r.valueSpec) && c.push(new g(r.key, r.value, "zoom functions not supported"))), (t === "categorical" || u) && r.value.property === void 0 && c.push(new g(r.key, r.value, '"property" property is required')), c;
|
|
7132
7132
|
function p(y) {
|
|
7133
7133
|
if (t === "identity")
|
|
7134
7134
|
return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
|
|
@@ -7142,18 +7142,18 @@ function ja(r) {
|
|
|
7142
7142
|
style: y.style,
|
|
7143
7143
|
styleSpec: y.styleSpec,
|
|
7144
7144
|
arrayElementValidator: f
|
|
7145
|
-
})),
|
|
7145
|
+
})), I(w) === "array" && w.length === 0 && m.push(new g(y.key, w, "array must have at least one stop")), m;
|
|
7146
7146
|
}
|
|
7147
7147
|
function f(y) {
|
|
7148
7148
|
let m = [];
|
|
7149
7149
|
const w = y.value, v = y.key;
|
|
7150
|
-
if (
|
|
7151
|
-
return [new g(v, w, `array expected, ${
|
|
7150
|
+
if (I(w) !== "array")
|
|
7151
|
+
return [new g(v, w, `array expected, ${I(w)} found`)];
|
|
7152
7152
|
if (w.length !== 2)
|
|
7153
7153
|
return [new g(v, w, `array length 2 expected, length ${w.length} found`)];
|
|
7154
7154
|
if (u) {
|
|
7155
|
-
if (
|
|
7156
|
-
return [new g(v, w, `object expected, ${
|
|
7155
|
+
if (I(w[0]) !== "object")
|
|
7156
|
+
return [new g(v, w, `object expected, ${I(w[0])} found`)];
|
|
7157
7157
|
if (w[0].zoom === void 0)
|
|
7158
7158
|
return [new g(v, w, "object stop key must have zoom")];
|
|
7159
7159
|
if (w[0].value === void 0)
|
|
@@ -7177,7 +7177,7 @@ function ja(r) {
|
|
|
7177
7177
|
style: y.style,
|
|
7178
7178
|
styleSpec: y.styleSpec
|
|
7179
7179
|
}, w));
|
|
7180
|
-
return
|
|
7180
|
+
return Fa(Ne(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
|
|
7181
7181
|
key: `${v}[1]`,
|
|
7182
7182
|
value: w[1],
|
|
7183
7183
|
valueSpec: e,
|
|
@@ -7187,7 +7187,7 @@ function ja(r) {
|
|
|
7187
7187
|
}));
|
|
7188
7188
|
}
|
|
7189
7189
|
function d(y, m) {
|
|
7190
|
-
const w =
|
|
7190
|
+
const w = I(y.value), v = U(y.value), x = y.value !== null ? y.value : m;
|
|
7191
7191
|
if (!n)
|
|
7192
7192
|
n = w;
|
|
7193
7193
|
else if (w !== n)
|
|
@@ -7212,7 +7212,7 @@ function ja(r) {
|
|
|
7212
7212
|
}
|
|
7213
7213
|
}
|
|
7214
7214
|
function Ke(r) {
|
|
7215
|
-
const e = (r.expressionContext === "property" ?
|
|
7215
|
+
const e = (r.expressionContext === "property" ? nl : $a)(Ne(r.value), r.valueSpec);
|
|
7216
7216
|
if (e.result === "error")
|
|
7217
7217
|
return e.value.map((n) => new g(`${r.key}${n.key}`, r.value, n.message));
|
|
7218
7218
|
const t = e.value.expression || e.value._styleExpression.expression;
|
|
@@ -7230,12 +7230,12 @@ function Ke(r) {
|
|
|
7230
7230
|
}
|
|
7231
7231
|
return [];
|
|
7232
7232
|
}
|
|
7233
|
-
function
|
|
7234
|
-
const e = r.value, t = r.key, n =
|
|
7233
|
+
function il(r) {
|
|
7234
|
+
const e = r.value, t = r.key, n = I(e);
|
|
7235
7235
|
return n !== "boolean" ? [new g(t, e, `boolean expected, ${n} found`)] : [];
|
|
7236
7236
|
}
|
|
7237
7237
|
function Pr(r) {
|
|
7238
|
-
const e = r.key, t = r.value, n =
|
|
7238
|
+
const e = r.key, t = r.value, n = I(t);
|
|
7239
7239
|
return n !== "string" ? [new g(e, t, `color expected, ${n} found`)] : F.parse(String(t)) ? [] : [new g(e, t, `color expected, "${t}" found`)];
|
|
7240
7240
|
}
|
|
7241
7241
|
function ut(r) {
|
|
@@ -7243,15 +7243,15 @@ function ut(r) {
|
|
|
7243
7243
|
return Array.isArray(n.values) ? n.values.indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${n.values.join(", ")}], ${JSON.stringify(t)} found`)) : Object.keys(n.values).indexOf(U(t)) === -1 && a.push(new g(e, t, `expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(t)} found`)), a;
|
|
7244
7244
|
}
|
|
7245
7245
|
function sn(r) {
|
|
7246
|
-
return
|
|
7246
|
+
return Oa(Ne(r.value)) ? Ke(Tt({}, r, {
|
|
7247
7247
|
expressionContext: "filter",
|
|
7248
7248
|
valueSpec: { value: "boolean" }
|
|
7249
|
-
})) :
|
|
7249
|
+
})) : Da(r);
|
|
7250
7250
|
}
|
|
7251
|
-
function
|
|
7251
|
+
function Da(r) {
|
|
7252
7252
|
const e = r.value, t = r.key;
|
|
7253
|
-
if (
|
|
7254
|
-
return [new g(t, e, `array expected, ${
|
|
7253
|
+
if (I(e) !== "array")
|
|
7254
|
+
return [new g(t, e, `array expected, ${I(e)} found`)];
|
|
7255
7255
|
const n = r.styleSpec;
|
|
7256
7256
|
let a, o = [];
|
|
7257
7257
|
if (e.length < 1)
|
|
@@ -7275,9 +7275,9 @@ function Na(r) {
|
|
|
7275
7275
|
/* falls through */
|
|
7276
7276
|
case "in":
|
|
7277
7277
|
case "!in":
|
|
7278
|
-
e.length >= 2 && (a =
|
|
7278
|
+
e.length >= 2 && (a = I(e[1]), a !== "string" && o.push(new g(`${t}[1]`, e[1], `string expected, ${a} found`)));
|
|
7279
7279
|
for (let i = 2; i < e.length; i++)
|
|
7280
|
-
a =
|
|
7280
|
+
a = I(e[i]), U(e[1]) === "$type" ? o = o.concat(ut({
|
|
7281
7281
|
key: `${t}[${i}]`,
|
|
7282
7282
|
value: e[i],
|
|
7283
7283
|
valueSpec: n.geometry_type,
|
|
@@ -7289,7 +7289,7 @@ function Na(r) {
|
|
|
7289
7289
|
case "all":
|
|
7290
7290
|
case "none":
|
|
7291
7291
|
for (let i = 1; i < e.length; i++)
|
|
7292
|
-
o = o.concat(
|
|
7292
|
+
o = o.concat(Da({
|
|
7293
7293
|
key: `${t}[${i}]`,
|
|
7294
7294
|
value: e[i],
|
|
7295
7295
|
style: r.style,
|
|
@@ -7298,12 +7298,12 @@ function Na(r) {
|
|
|
7298
7298
|
break;
|
|
7299
7299
|
case "has":
|
|
7300
7300
|
case "!has":
|
|
7301
|
-
a =
|
|
7301
|
+
a = I(e[1]), e.length !== 2 ? o.push(new g(t, e, `filter array for "${e[0]}" operator must have 2 elements`)) : a !== "string" && o.push(new g(`${t}[1]`, e[1], `string expected, ${a} found`));
|
|
7302
7302
|
break;
|
|
7303
7303
|
}
|
|
7304
7304
|
return o;
|
|
7305
7305
|
}
|
|
7306
|
-
function
|
|
7306
|
+
function Ua(r, e) {
|
|
7307
7307
|
const t = r.key, n = r.validateSpec, a = r.style, o = r.styleSpec, i = r.value, s = r.objectKey, l = o[`${e}_${r.layerType}`];
|
|
7308
7308
|
if (!l)
|
|
7309
7309
|
return [];
|
|
@@ -7320,11 +7320,11 @@ function Da(r, e) {
|
|
|
7320
7320
|
if (!c)
|
|
7321
7321
|
return [new g(t, i, `unknown property "${s}"`)];
|
|
7322
7322
|
let p;
|
|
7323
|
-
if (
|
|
7323
|
+
if (I(i) === "string" && Ft(c) && !c.tokens && (p = /^{([^}]+)}$/.exec(i)))
|
|
7324
7324
|
return [new g(t, i, `"${s}" does not support interpolation syntax
|
|
7325
7325
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(p[1])} }\`.`)];
|
|
7326
7326
|
const f = [];
|
|
7327
|
-
return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && nn(
|
|
7327
|
+
return r.layerType === "symbol" && (s === "text-field" && a && !a.glyphs && f.push(new g(t, i, 'use of "text-field" requires a style "glyphs" property')), s === "text-font" && nn(Ne(i)) && U(i.type) === "identity" && f.push(new g(t, i, '"text-font" does not support identity functions'))), f.concat(n({
|
|
7328
7328
|
key: r.key,
|
|
7329
7329
|
value: i,
|
|
7330
7330
|
valueSpec: c,
|
|
@@ -7335,17 +7335,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7335
7335
|
propertyKey: s
|
|
7336
7336
|
}));
|
|
7337
7337
|
}
|
|
7338
|
-
function Ua(r) {
|
|
7339
|
-
return Da(r, "paint");
|
|
7340
|
-
}
|
|
7341
7338
|
function Ba(r) {
|
|
7342
|
-
return
|
|
7339
|
+
return Ua(r, "paint");
|
|
7343
7340
|
}
|
|
7344
7341
|
function qa(r) {
|
|
7342
|
+
return Ua(r, "layout");
|
|
7343
|
+
}
|
|
7344
|
+
function Ga(r) {
|
|
7345
7345
|
let e = [];
|
|
7346
7346
|
const t = r.value, n = r.key, a = r.style, o = r.styleSpec;
|
|
7347
|
-
if (
|
|
7348
|
-
return [new g(n, t, `object expected, ${
|
|
7347
|
+
if (I(t) !== "object")
|
|
7348
|
+
return [new g(n, t, `object expected, ${I(t)} found`)];
|
|
7349
7349
|
!t.type && !t.ref && e.push(new g(n, t, 'either "type" or "ref" is required'));
|
|
7350
7350
|
let i = U(t.type);
|
|
7351
7351
|
const s = U(t.ref);
|
|
@@ -7407,7 +7407,7 @@ function qa(r) {
|
|
|
7407
7407
|
validateSpec: l.validateSpec,
|
|
7408
7408
|
objectElementValidators: {
|
|
7409
7409
|
"*"(u) {
|
|
7410
|
-
return
|
|
7410
|
+
return qa(Tt({ layerType: i }, u));
|
|
7411
7411
|
}
|
|
7412
7412
|
}
|
|
7413
7413
|
});
|
|
@@ -7422,7 +7422,7 @@ function qa(r) {
|
|
|
7422
7422
|
validateSpec: l.validateSpec,
|
|
7423
7423
|
objectElementValidators: {
|
|
7424
7424
|
"*"(u) {
|
|
7425
|
-
return
|
|
7425
|
+
return Ba(Tt({ layerType: i }, u));
|
|
7426
7426
|
}
|
|
7427
7427
|
}
|
|
7428
7428
|
});
|
|
@@ -7430,15 +7430,15 @@ function qa(r) {
|
|
|
7430
7430
|
}
|
|
7431
7431
|
})), e;
|
|
7432
7432
|
}
|
|
7433
|
-
function
|
|
7434
|
-
const e = r.value, t = r.key, n =
|
|
7433
|
+
function je(r) {
|
|
7434
|
+
const e = r.value, t = r.key, n = I(e);
|
|
7435
7435
|
return n !== "string" ? [new g(t, e, `string expected, ${n} found`)] : [];
|
|
7436
7436
|
}
|
|
7437
|
-
function
|
|
7437
|
+
function sl(r) {
|
|
7438
7438
|
var e;
|
|
7439
7439
|
const t = (e = r.sourceName) !== null && e !== void 0 ? e : "", n = r.value, a = r.styleSpec, o = a.source_raster_dem, i = r.style;
|
|
7440
7440
|
let s = [];
|
|
7441
|
-
const l =
|
|
7441
|
+
const l = I(n);
|
|
7442
7442
|
if (n === void 0)
|
|
7443
7443
|
return s;
|
|
7444
7444
|
if (l !== "object")
|
|
@@ -7456,9 +7456,9 @@ function il(r) {
|
|
|
7456
7456
|
return s;
|
|
7457
7457
|
}
|
|
7458
7458
|
const Bn = {
|
|
7459
|
-
promoteId:
|
|
7459
|
+
promoteId: ll
|
|
7460
7460
|
};
|
|
7461
|
-
function
|
|
7461
|
+
function Va(r) {
|
|
7462
7462
|
const e = r.value, t = r.key, n = r.styleSpec, a = r.style, o = r.validateSpec;
|
|
7463
7463
|
if (!e.type)
|
|
7464
7464
|
return [new g(t, e, '"type" is required')];
|
|
@@ -7477,7 +7477,7 @@ function Ga(r) {
|
|
|
7477
7477
|
validateSpec: o
|
|
7478
7478
|
}), s;
|
|
7479
7479
|
case "raster-dem":
|
|
7480
|
-
return s =
|
|
7480
|
+
return s = sl({
|
|
7481
7481
|
sourceName: t,
|
|
7482
7482
|
value: e,
|
|
7483
7483
|
style: r.style,
|
|
@@ -7535,20 +7535,20 @@ function Ga(r) {
|
|
|
7535
7535
|
});
|
|
7536
7536
|
}
|
|
7537
7537
|
}
|
|
7538
|
-
function
|
|
7539
|
-
if (
|
|
7540
|
-
return
|
|
7538
|
+
function ll({ key: r, value: e }) {
|
|
7539
|
+
if (I(e) === "string")
|
|
7540
|
+
return je({ key: r, value: e });
|
|
7541
7541
|
{
|
|
7542
7542
|
const t = [];
|
|
7543
7543
|
for (const n in e)
|
|
7544
|
-
t.push(...
|
|
7544
|
+
t.push(...je({ key: `${r}.${n}`, value: e[n] }));
|
|
7545
7545
|
return t;
|
|
7546
7546
|
}
|
|
7547
7547
|
}
|
|
7548
|
-
function
|
|
7548
|
+
function Ha(r) {
|
|
7549
7549
|
const e = r.value, t = r.styleSpec, n = t.light, a = r.style;
|
|
7550
7550
|
let o = [];
|
|
7551
|
-
const i =
|
|
7551
|
+
const i = I(e);
|
|
7552
7552
|
if (e === void 0)
|
|
7553
7553
|
return o;
|
|
7554
7554
|
if (i !== "object")
|
|
@@ -7573,8 +7573,8 @@ function Va(r) {
|
|
|
7573
7573
|
}
|
|
7574
7574
|
return o;
|
|
7575
7575
|
}
|
|
7576
|
-
function
|
|
7577
|
-
const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o =
|
|
7576
|
+
function Ka(r) {
|
|
7577
|
+
const e = r.value, t = r.styleSpec, n = t.sky, a = r.style, o = I(e);
|
|
7578
7578
|
if (e === void 0)
|
|
7579
7579
|
return [];
|
|
7580
7580
|
if (o !== "object")
|
|
@@ -7590,10 +7590,10 @@ function Ha(r) {
|
|
|
7590
7590
|
})) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
|
|
7591
7591
|
return i;
|
|
7592
7592
|
}
|
|
7593
|
-
function
|
|
7593
|
+
function Xa(r) {
|
|
7594
7594
|
const e = r.value, t = r.styleSpec, n = t.terrain, a = r.style;
|
|
7595
7595
|
let o = [];
|
|
7596
|
-
const i =
|
|
7596
|
+
const i = I(e);
|
|
7597
7597
|
if (e === void 0)
|
|
7598
7598
|
return o;
|
|
7599
7599
|
if (i !== "object")
|
|
@@ -7609,15 +7609,15 @@ function Ka(r) {
|
|
|
7609
7609
|
})) : o = o.concat([new g(s, e[s], `unknown property "${s}"`)]);
|
|
7610
7610
|
return o;
|
|
7611
7611
|
}
|
|
7612
|
-
function ll(r) {
|
|
7613
|
-
return Ne(r).length === 0 ? [] : Ke(r);
|
|
7614
|
-
}
|
|
7615
7612
|
function ul(r) {
|
|
7616
|
-
return
|
|
7613
|
+
return je(r).length === 0 ? [] : Ke(r);
|
|
7617
7614
|
}
|
|
7618
7615
|
function cl(r) {
|
|
7616
|
+
return je(r).length === 0 ? [] : Ke(r);
|
|
7617
|
+
}
|
|
7618
|
+
function pl(r) {
|
|
7619
7619
|
const e = r.key, t = r.value;
|
|
7620
|
-
if (
|
|
7620
|
+
if (I(t) === "array") {
|
|
7621
7621
|
if (t.length < 1 || t.length > 4)
|
|
7622
7622
|
return [new g(e, t, `padding requires 1 to 4 values; ${t.length} values found`)];
|
|
7623
7623
|
const a = {
|
|
@@ -7639,9 +7639,9 @@ function cl(r) {
|
|
|
7639
7639
|
valueSpec: {}
|
|
7640
7640
|
});
|
|
7641
7641
|
}
|
|
7642
|
-
function
|
|
7642
|
+
function fl(r) {
|
|
7643
7643
|
const e = r.key, t = r.value;
|
|
7644
|
-
if (
|
|
7644
|
+
if (I(t) === "array") {
|
|
7645
7645
|
const a = {
|
|
7646
7646
|
type: "number"
|
|
7647
7647
|
};
|
|
@@ -7663,9 +7663,9 @@ function pl(r) {
|
|
|
7663
7663
|
valueSpec: {}
|
|
7664
7664
|
});
|
|
7665
7665
|
}
|
|
7666
|
-
function
|
|
7666
|
+
function dl(r) {
|
|
7667
7667
|
const e = r.key, t = r.value;
|
|
7668
|
-
if (
|
|
7668
|
+
if (I(t) === "array") {
|
|
7669
7669
|
if (t.length < 1)
|
|
7670
7670
|
return [new g(e, t, "array length at least 1 expected, length 0 found")];
|
|
7671
7671
|
let a = [];
|
|
@@ -7681,8 +7681,8 @@ function fl(r) {
|
|
|
7681
7681
|
value: t
|
|
7682
7682
|
});
|
|
7683
7683
|
}
|
|
7684
|
-
function
|
|
7685
|
-
const e = r.key, t = r.value, n =
|
|
7684
|
+
function hl(r) {
|
|
7685
|
+
const e = r.key, t = r.value, n = I(t), a = r.styleSpec;
|
|
7686
7686
|
if (n !== "array" || t.length < 1 || t.length % 2 !== 0)
|
|
7687
7687
|
return [new g(e, t, "variableAnchorOffsetCollection requires a non-empty array of even length")];
|
|
7688
7688
|
let o = [];
|
|
@@ -7704,7 +7704,7 @@ function dl(r) {
|
|
|
7704
7704
|
}));
|
|
7705
7705
|
return o;
|
|
7706
7706
|
}
|
|
7707
|
-
function
|
|
7707
|
+
function Wa(r) {
|
|
7708
7708
|
let e = [];
|
|
7709
7709
|
const t = r.value, n = r.key;
|
|
7710
7710
|
if (Array.isArray(t)) {
|
|
@@ -7730,13 +7730,13 @@ function Xa(r) {
|
|
|
7730
7730
|
}
|
|
7731
7731
|
return e;
|
|
7732
7732
|
} else
|
|
7733
|
-
return
|
|
7733
|
+
return je({
|
|
7734
7734
|
key: n,
|
|
7735
7735
|
value: t
|
|
7736
7736
|
});
|
|
7737
7737
|
}
|
|
7738
|
-
function
|
|
7739
|
-
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o =
|
|
7738
|
+
function yl(r) {
|
|
7739
|
+
const e = r.value, t = r.styleSpec, n = t.projection, a = r.style, o = I(e);
|
|
7740
7740
|
if (e === void 0)
|
|
7741
7741
|
return [];
|
|
7742
7742
|
if (o !== "object")
|
|
@@ -7752,25 +7752,25 @@ function hl(r) {
|
|
|
7752
7752
|
})) : i = i.concat([new g(s, e[s], `unknown property "${s}"`)]);
|
|
7753
7753
|
return i;
|
|
7754
7754
|
}
|
|
7755
|
-
function
|
|
7755
|
+
function ml(r) {
|
|
7756
7756
|
const e = r.key;
|
|
7757
7757
|
let t = r.value;
|
|
7758
7758
|
t = t instanceof String ? t.valueOf() : t;
|
|
7759
|
-
const n =
|
|
7760
|
-
return n === "array" && !
|
|
7759
|
+
const n = I(t);
|
|
7760
|
+
return n === "array" && !vl(t) && !gl(t) ? [new g(e, t, `projection expected, invalid array ${JSON.stringify(t)} found`)] : ["array", "string"].includes(n) ? [] : [new g(e, t, `projection expected, invalid type "${n}" found`)];
|
|
7761
7761
|
}
|
|
7762
|
-
function
|
|
7762
|
+
function gl(r) {
|
|
7763
7763
|
return !!["interpolate", "step", "literal"].includes(r[0]);
|
|
7764
7764
|
}
|
|
7765
|
-
function
|
|
7765
|
+
function vl(r) {
|
|
7766
7766
|
return Array.isArray(r) && r.length === 3 && typeof r[0] == "string" && typeof r[1] == "string" && typeof r[2] == "number";
|
|
7767
7767
|
}
|
|
7768
|
-
function
|
|
7768
|
+
function bl(r) {
|
|
7769
7769
|
return !!r && r.constructor === Object;
|
|
7770
7770
|
}
|
|
7771
|
-
function
|
|
7772
|
-
return
|
|
7773
|
-
new g(r.key, r.value, `object expected, ${
|
|
7771
|
+
function Za(r) {
|
|
7772
|
+
return bl(r.value) ? [] : [
|
|
7773
|
+
new g(r.key, r.value, `object expected, ${I(r.value)} found`)
|
|
7774
7774
|
];
|
|
7775
7775
|
}
|
|
7776
7776
|
const qn = {
|
|
@@ -7778,42 +7778,42 @@ const qn = {
|
|
|
7778
7778
|
return [];
|
|
7779
7779
|
},
|
|
7780
7780
|
array: on,
|
|
7781
|
-
boolean:
|
|
7781
|
+
boolean: il,
|
|
7782
7782
|
number: Qt,
|
|
7783
7783
|
color: Pr,
|
|
7784
|
-
constants:
|
|
7784
|
+
constants: Na,
|
|
7785
7785
|
enum: ut,
|
|
7786
7786
|
filter: sn,
|
|
7787
7787
|
function: ja,
|
|
7788
|
-
layer:
|
|
7788
|
+
layer: Ga,
|
|
7789
7789
|
object: te,
|
|
7790
|
-
source:
|
|
7791
|
-
light:
|
|
7792
|
-
sky:
|
|
7793
|
-
terrain:
|
|
7794
|
-
projection:
|
|
7795
|
-
projectionDefinition:
|
|
7796
|
-
string:
|
|
7797
|
-
formatted:
|
|
7798
|
-
resolvedImage:
|
|
7799
|
-
padding:
|
|
7800
|
-
numberArray:
|
|
7801
|
-
colorArray:
|
|
7802
|
-
variableAnchorOffsetCollection:
|
|
7803
|
-
sprite:
|
|
7804
|
-
state:
|
|
7790
|
+
source: Va,
|
|
7791
|
+
light: Ha,
|
|
7792
|
+
sky: Ka,
|
|
7793
|
+
terrain: Xa,
|
|
7794
|
+
projection: yl,
|
|
7795
|
+
projectionDefinition: ml,
|
|
7796
|
+
string: je,
|
|
7797
|
+
formatted: ul,
|
|
7798
|
+
resolvedImage: cl,
|
|
7799
|
+
padding: pl,
|
|
7800
|
+
numberArray: fl,
|
|
7801
|
+
colorArray: dl,
|
|
7802
|
+
variableAnchorOffsetCollection: hl,
|
|
7803
|
+
sprite: Wa,
|
|
7804
|
+
state: Za
|
|
7805
7805
|
};
|
|
7806
7806
|
function $t(r) {
|
|
7807
7807
|
const e = r.value, t = r.valueSpec, n = r.styleSpec;
|
|
7808
|
-
return r.validateSpec = $t, t.expression && nn(U(e)) ? ja(r) : t.expression &&
|
|
7808
|
+
return r.validateSpec = $t, t.expression && nn(U(e)) ? ja(r) : t.expression && Fa(Ne(e)) ? Ke(r) : t.type && qn[t.type] ? qn[t.type](r) : te(Tt({}, r, {
|
|
7809
7809
|
valueSpec: t.type ? n[t.type] : t
|
|
7810
7810
|
}));
|
|
7811
7811
|
}
|
|
7812
|
-
function
|
|
7813
|
-
const e = r.value, t = r.key, n =
|
|
7812
|
+
function Ya(r) {
|
|
7813
|
+
const e = r.value, t = r.key, n = je(r);
|
|
7814
7814
|
return n.length || (e.indexOf("{fontstack}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{fontstack}" token')), e.indexOf("{range}") === -1 && n.push(new g(t, e, '"glyphs" url must include a "{range}" token'))), n;
|
|
7815
7815
|
}
|
|
7816
|
-
function Y(r, e =
|
|
7816
|
+
function Y(r, e = Ki) {
|
|
7817
7817
|
let t = [];
|
|
7818
7818
|
return t = t.concat($t({
|
|
7819
7819
|
key: "",
|
|
@@ -7823,27 +7823,27 @@ function Y(r, e = Hi) {
|
|
|
7823
7823
|
style: r,
|
|
7824
7824
|
validateSpec: $t,
|
|
7825
7825
|
objectElementValidators: {
|
|
7826
|
-
glyphs:
|
|
7826
|
+
glyphs: Ya,
|
|
7827
7827
|
"*"() {
|
|
7828
7828
|
return [];
|
|
7829
7829
|
}
|
|
7830
7830
|
}
|
|
7831
|
-
})), r.constants && (t = t.concat(
|
|
7831
|
+
})), r.constants && (t = t.concat(Na({
|
|
7832
7832
|
key: "constants",
|
|
7833
7833
|
value: r.constants
|
|
7834
|
-
}))),
|
|
7835
|
-
}
|
|
7836
|
-
Y.source = pe(ce(
|
|
7837
|
-
Y.sprite = pe(ce(
|
|
7838
|
-
Y.glyphs = pe(ce(
|
|
7839
|
-
Y.light = pe(ce(
|
|
7840
|
-
Y.sky = pe(ce(
|
|
7841
|
-
Y.terrain = pe(ce(
|
|
7842
|
-
Y.state = pe(ce(
|
|
7843
|
-
Y.layer = pe(ce(
|
|
7834
|
+
}))), Ja(t);
|
|
7835
|
+
}
|
|
7836
|
+
Y.source = pe(ce(Va));
|
|
7837
|
+
Y.sprite = pe(ce(Wa));
|
|
7838
|
+
Y.glyphs = pe(ce(Ya));
|
|
7839
|
+
Y.light = pe(ce(Ha));
|
|
7840
|
+
Y.sky = pe(ce(Ka));
|
|
7841
|
+
Y.terrain = pe(ce(Xa));
|
|
7842
|
+
Y.state = pe(ce(Za));
|
|
7843
|
+
Y.layer = pe(ce(Ga));
|
|
7844
7844
|
Y.filter = pe(ce(sn));
|
|
7845
|
-
Y.paintProperty = pe(ce(
|
|
7846
|
-
Y.layoutProperty = pe(ce(
|
|
7845
|
+
Y.paintProperty = pe(ce(Ba));
|
|
7846
|
+
Y.layoutProperty = pe(ce(qa));
|
|
7847
7847
|
function ce(r) {
|
|
7848
7848
|
return function(e) {
|
|
7849
7849
|
return r({
|
|
@@ -7852,12 +7852,12 @@ function ce(r) {
|
|
|
7852
7852
|
});
|
|
7853
7853
|
};
|
|
7854
7854
|
}
|
|
7855
|
-
function
|
|
7855
|
+
function Ja(r) {
|
|
7856
7856
|
return [].concat(r).sort((e, t) => e.line - t.line);
|
|
7857
7857
|
}
|
|
7858
7858
|
function pe(r) {
|
|
7859
7859
|
return function(...e) {
|
|
7860
|
-
return
|
|
7860
|
+
return Ja(r.apply(this, e));
|
|
7861
7861
|
};
|
|
7862
7862
|
}
|
|
7863
7863
|
function Gn(r) {
|
|
@@ -7869,7 +7869,7 @@ function Gn(r) {
|
|
|
7869
7869
|
isFallback: !0
|
|
7870
7870
|
};
|
|
7871
7871
|
if (typeof r == "string") {
|
|
7872
|
-
const t =
|
|
7872
|
+
const t = Sl(r);
|
|
7873
7873
|
return t.isValidStyle ? {
|
|
7874
7874
|
style: t.styleObject,
|
|
7875
7875
|
requiresUrlMonitoring: !1,
|
|
@@ -7880,11 +7880,11 @@ function Gn(r) {
|
|
|
7880
7880
|
// default styles don't require URL monitoring
|
|
7881
7881
|
isFallback: !0
|
|
7882
7882
|
} : r.startsWith("http") ? { style: r, requiresUrlMonitoring: !0, isFallback: !1 } : r.toLowerCase().includes(".json") ? {
|
|
7883
|
-
style:
|
|
7883
|
+
style: wl(r),
|
|
7884
7884
|
requiresUrlMonitoring: !0,
|
|
7885
7885
|
isFallback: !1
|
|
7886
7886
|
} : {
|
|
7887
|
-
style:
|
|
7887
|
+
style: Mo(r),
|
|
7888
7888
|
requiresUrlMonitoring: !0,
|
|
7889
7889
|
isFallback: !1
|
|
7890
7890
|
};
|
|
@@ -7893,7 +7893,7 @@ function Gn(r) {
|
|
|
7893
7893
|
style: r.getExpandedStyleURL(),
|
|
7894
7894
|
requiresUrlMonitoring: !1,
|
|
7895
7895
|
isFallback: !1
|
|
7896
|
-
} : r instanceof
|
|
7896
|
+
} : r instanceof Po ? {
|
|
7897
7897
|
style: r.getDefaultVariant().getExpandedStyleURL(),
|
|
7898
7898
|
requiresUrlMonitoring: !1,
|
|
7899
7899
|
isFallback: !1
|
|
@@ -7908,14 +7908,14 @@ function Gn(r) {
|
|
|
7908
7908
|
isFallback: !0
|
|
7909
7909
|
};
|
|
7910
7910
|
}
|
|
7911
|
-
function
|
|
7911
|
+
function wl(r) {
|
|
7912
7912
|
try {
|
|
7913
7913
|
return new URL(r).href;
|
|
7914
7914
|
} catch {
|
|
7915
7915
|
}
|
|
7916
7916
|
return new URL(r, location.origin).href;
|
|
7917
7917
|
}
|
|
7918
|
-
function
|
|
7918
|
+
function Sl(r) {
|
|
7919
7919
|
try {
|
|
7920
7920
|
const e = JSON.parse(r), t = Y(e);
|
|
7921
7921
|
return {
|
|
@@ -7938,12 +7938,12 @@ function ge(r, e, t) {
|
|
|
7938
7938
|
function ln(r) {
|
|
7939
7939
|
r.parentNode && r.parentNode.removeChild(r);
|
|
7940
7940
|
}
|
|
7941
|
-
class
|
|
7941
|
+
class xl {
|
|
7942
7942
|
constructor() {
|
|
7943
7943
|
S(this, "_map");
|
|
7944
7944
|
S(this, "_container");
|
|
7945
7945
|
S(this, "_terrainButton");
|
|
7946
|
-
|
|
7946
|
+
Vo(["_toggleTerrain", "_updateTerrainIcon"], this);
|
|
7947
7947
|
}
|
|
7948
7948
|
onAdd(e) {
|
|
7949
7949
|
return this._map = e, this._container = ge("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = ge("button", "maplibregl-ctrl-terrain", this._container), ge("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
|
|
@@ -7958,7 +7958,7 @@ class Sl {
|
|
|
7958
7958
|
this._terrainButton.classList.remove("maplibregl-ctrl-terrain"), this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"), this._map.hasTerrain() ? (this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"), this._terrainButton.title = this._map._getUIString("TerrainControl.Disable")) : (this._terrainButton.classList.add("maplibregl-ctrl-terrain"), this._terrainButton.title = this._map._getUIString("TerrainControl.Enable"));
|
|
7959
7959
|
}
|
|
7960
7960
|
}
|
|
7961
|
-
class
|
|
7961
|
+
class kl extends ri {
|
|
7962
7962
|
constructor(t = {}) {
|
|
7963
7963
|
super({
|
|
7964
7964
|
showCompass: t.showCompass ?? !0,
|
|
@@ -7984,8 +7984,8 @@ class xl extends ti {
|
|
|
7984
7984
|
return a.clickFunction = n, a;
|
|
7985
7985
|
}
|
|
7986
7986
|
}
|
|
7987
|
-
const Vn = k.Marker, Hn = k.LngLat,
|
|
7988
|
-
class
|
|
7987
|
+
const Vn = k.Marker, Hn = k.LngLat, Cl = k.LngLatBounds;
|
|
7988
|
+
class Ll extends ni {
|
|
7989
7989
|
constructor() {
|
|
7990
7990
|
super(...arguments);
|
|
7991
7991
|
S(this, "lastUpdatedCenter", new Hn(0, 0));
|
|
@@ -8002,7 +8002,7 @@ class Cl extends ri {
|
|
|
8002
8002
|
...this.options.fitBoundsOptions,
|
|
8003
8003
|
linear: !0
|
|
8004
8004
|
}, s = this._map.getZoom();
|
|
8005
|
-
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(
|
|
8005
|
+
s > (((c = this.options.fitBoundsOptions) == null ? void 0 : c.maxZoom) ?? 30) && (i.zoom = s), this._map.fitBounds(Cl.fromLngLat(n, a), i, {
|
|
8006
8006
|
geolocateSource: !0
|
|
8007
8007
|
// tag this camera change so it won't cause the control to change to background state
|
|
8008
8008
|
});
|
|
@@ -8065,7 +8065,7 @@ class Cl extends ri {
|
|
|
8065
8065
|
}
|
|
8066
8066
|
}
|
|
8067
8067
|
}
|
|
8068
|
-
var K, oe, Se, xe, W, pt, q,
|
|
8068
|
+
var K, oe, Se, xe, W, pt, q, Qa, J, eo;
|
|
8069
8069
|
class dr {
|
|
8070
8070
|
constructor(e, t) {
|
|
8071
8071
|
be(this, q);
|
|
@@ -8132,10 +8132,10 @@ class dr {
|
|
|
8132
8132
|
_e(this, oe, e), _e(this, Se, ge("div", "maplibregl-ctrl maplibregl-ctrl-group"));
|
|
8133
8133
|
for (const [t, n] of Object.entries(P(this, K).containerStyle))
|
|
8134
8134
|
P(this, Se).style.setProperty(t, n);
|
|
8135
|
-
return P(this, K).container = P(this, Se), P(this, K).zoom = e.getZoom() + P(this, K).zoomAdjust, this.map = new
|
|
8135
|
+
return P(this, K).container = P(this, Se), P(this, K).zoom = e.getZoom() + P(this, K).zoomAdjust, this.map = new Pu(P(this, K)), this.map.once("style.load", () => {
|
|
8136
8136
|
this.map.resize();
|
|
8137
8137
|
}), this.map.once("load", () => {
|
|
8138
|
-
H(this, q,
|
|
8138
|
+
H(this, q, Qa).call(this, P(this, K).parentRect), _e(this, pt, H(this, q, eo).call(this));
|
|
8139
8139
|
}), P(this, Se);
|
|
8140
8140
|
}
|
|
8141
8141
|
onRemove() {
|
|
@@ -8143,7 +8143,7 @@ class dr {
|
|
|
8143
8143
|
(e = P(this, pt)) == null || e.call(this), ln(P(this, Se));
|
|
8144
8144
|
}
|
|
8145
8145
|
}
|
|
8146
|
-
K = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), xe = new WeakMap(), W = new WeakMap(), pt = new WeakMap(), q = new WeakSet(),
|
|
8146
|
+
K = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), xe = new WeakMap(), W = new WeakMap(), pt = new WeakMap(), q = new WeakSet(), Qa = function(e) {
|
|
8147
8147
|
e === void 0 || e.linePaint === void 0 && e.fillPaint === void 0 || (_e(this, xe, {
|
|
8148
8148
|
type: "Feature",
|
|
8149
8149
|
properties: {
|
|
@@ -8186,7 +8186,7 @@ K = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), xe = new WeakMap(), W
|
|
|
8186
8186
|
P(this, xe).geometry.coordinates = [[l.toArray(), u.toArray(), s.toArray(), i.toArray(), l.toArray()]];
|
|
8187
8187
|
const c = this.map.getSource("parentRect");
|
|
8188
8188
|
c !== void 0 && c.setData(P(this, xe));
|
|
8189
|
-
},
|
|
8189
|
+
}, eo = function() {
|
|
8190
8190
|
const { pitchAdjust: e } = P(this, K), t = () => {
|
|
8191
8191
|
i("parent");
|
|
8192
8192
|
}, n = () => {
|
|
@@ -8209,7 +8209,7 @@ K = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), xe = new WeakMap(), W
|
|
|
8209
8209
|
o();
|
|
8210
8210
|
};
|
|
8211
8211
|
};
|
|
8212
|
-
class
|
|
8212
|
+
class Al {
|
|
8213
8213
|
constructor() {
|
|
8214
8214
|
S(this, "map");
|
|
8215
8215
|
S(this, "container");
|
|
@@ -8228,28 +8228,28 @@ class Ll {
|
|
|
8228
8228
|
this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
|
|
8229
8229
|
}
|
|
8230
8230
|
}
|
|
8231
|
-
const
|
|
8232
|
-
name:
|
|
8233
|
-
version:
|
|
8234
|
-
description:
|
|
8235
|
-
author:
|
|
8231
|
+
const El = "@maptiler/sdk", Tl = "3.5.0-rc1", _l = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", Ml = "MapTiler", Il = "dist/maptiler-sdk.mjs", Pl = "dist/maptiler-sdk.d.ts", Rl = "dist/maptiler-sdk.css", zl = "module", Fl = "dist/maptiler-sdk.mjs", $l = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, Ol = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Nl = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Dl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Ul = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: "npm run build-css && vite -c vite.config-dev.ts", "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Bl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, ql = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.3.2", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, Gl = {
|
|
8232
|
+
name: El,
|
|
8233
|
+
version: Tl,
|
|
8234
|
+
description: _l,
|
|
8235
|
+
author: Ml,
|
|
8236
8236
|
module: Il,
|
|
8237
|
-
types:
|
|
8238
|
-
style:
|
|
8239
|
-
type:
|
|
8240
|
-
main:
|
|
8241
|
-
exports:
|
|
8242
|
-
keywords:
|
|
8243
|
-
homepage:
|
|
8237
|
+
types: Pl,
|
|
8238
|
+
style: Rl,
|
|
8239
|
+
type: zl,
|
|
8240
|
+
main: Fl,
|
|
8241
|
+
exports: $l,
|
|
8242
|
+
keywords: Ol,
|
|
8243
|
+
homepage: Nl,
|
|
8244
8244
|
license: jl,
|
|
8245
|
-
repository:
|
|
8246
|
-
scripts:
|
|
8245
|
+
repository: Dl,
|
|
8246
|
+
scripts: Ul,
|
|
8247
8247
|
"lint-staged": { "*.ts": "npm run lint:fix" },
|
|
8248
8248
|
"ts-typecheck": { "*.ts": "npm tsc --noEmit" },
|
|
8249
|
-
devDependencies:
|
|
8250
|
-
dependencies:
|
|
8249
|
+
devDependencies: Bl,
|
|
8250
|
+
dependencies: ql
|
|
8251
8251
|
};
|
|
8252
|
-
class
|
|
8252
|
+
class Vl {
|
|
8253
8253
|
/**
|
|
8254
8254
|
*
|
|
8255
8255
|
* @param map : a Map instance
|
|
@@ -8282,7 +8282,7 @@ class Gl {
|
|
|
8282
8282
|
}
|
|
8283
8283
|
preparePayload() {
|
|
8284
8284
|
const e = new URL(V.telemetryURL);
|
|
8285
|
-
return e.searchParams.append("sdk",
|
|
8285
|
+
return e.searchParams.append("sdk", Gl.version), e.searchParams.append("key", D.apiKey), e.searchParams.append("mtsid", jr), e.searchParams.append("session", D.session ? "1" : "0"), e.searchParams.append("caching", D.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"), this.registeredModules.size > 0 && e.searchParams.append("modules", Array.from(this.registeredModules).join("|")), e.href;
|
|
8286
8286
|
}
|
|
8287
8287
|
}
|
|
8288
8288
|
var ct = typeof Float32Array < "u" ? Float32Array : Array;
|
|
@@ -8295,14 +8295,14 @@ function rt() {
|
|
|
8295
8295
|
var r = new ct(16);
|
|
8296
8296
|
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;
|
|
8297
8297
|
}
|
|
8298
|
-
function
|
|
8298
|
+
function Hl(r, e, t, n, a, o, i, s, l, u, c, p, f, d, h, y, m) {
|
|
8299
8299
|
return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = o, r[5] = i, 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] = y, r[15] = m, r;
|
|
8300
8300
|
}
|
|
8301
|
-
function
|
|
8301
|
+
function Kl(r, e, t) {
|
|
8302
8302
|
var n = e[0], a = e[1], o = e[2], i = 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], y = e[12], m = e[13], w = e[14], v = e[15], x = t[0], A = t[1], L = t[2], $ = t[3];
|
|
8303
8303
|
return r[0] = x * n + A * s + L * p + $ * y, r[1] = x * a + A * l + L * f + $ * m, r[2] = x * o + A * u + L * d + $ * w, r[3] = x * i + A * c + L * h + $ * v, x = t[4], A = t[5], L = t[6], $ = t[7], r[4] = x * n + A * s + L * p + $ * y, r[5] = x * a + A * l + L * f + $ * m, r[6] = x * o + A * u + L * d + $ * w, r[7] = x * i + A * c + L * h + $ * v, x = t[8], A = t[9], L = t[10], $ = t[11], r[8] = x * n + A * s + L * p + $ * y, r[9] = x * a + A * l + L * f + $ * m, r[10] = x * o + A * u + L * d + $ * w, r[11] = x * i + A * c + L * h + $ * v, x = t[12], A = t[13], L = t[14], $ = t[15], r[12] = x * n + A * s + L * p + $ * y, r[13] = x * a + A * l + L * f + $ * m, r[14] = x * o + A * u + L * d + $ * w, r[15] = x * i + A * c + L * h + $ * v, r;
|
|
8304
8304
|
}
|
|
8305
|
-
function
|
|
8305
|
+
function Xl(r, e, t) {
|
|
8306
8306
|
var n = t[0], a = t[1], o = t[2];
|
|
8307
8307
|
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] * o, r[9] = e[9] * o, r[10] = e[10] * o, r[11] = e[11] * o, r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
8308
8308
|
}
|
|
@@ -8310,7 +8310,7 @@ function Kn(r, e, t) {
|
|
|
8310
8310
|
var n = Math.sin(t), a = Math.cos(t), o = e[4], i = e[5], s = e[6], l = e[7], u = e[8], c = e[9], p = e[10], f = e[11];
|
|
8311
8311
|
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] = o * a + u * n, r[5] = i * a + c * n, r[6] = s * a + p * n, r[7] = l * a + f * n, r[8] = u * a - o * n, r[9] = c * a - i * n, r[10] = p * a - s * n, r[11] = f * a - l * n, r;
|
|
8312
8312
|
}
|
|
8313
|
-
function
|
|
8313
|
+
function Wl(r, e, t) {
|
|
8314
8314
|
var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[8], c = e[9], p = e[10], f = e[11];
|
|
8315
8315
|
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] = o * a - u * n, r[1] = i * a - c * n, r[2] = s * a - p * n, r[3] = l * a - f * n, r[8] = o * n + u * a, r[9] = i * n + c * a, r[10] = s * n + p * a, r[11] = l * n + f * a, r;
|
|
8316
8316
|
}
|
|
@@ -8318,16 +8318,16 @@ function Xn(r, e, t) {
|
|
|
8318
8318
|
var n = Math.sin(t), a = Math.cos(t), o = e[0], i = e[1], s = e[2], l = e[3], u = e[4], c = e[5], p = e[6], f = e[7];
|
|
8319
8319
|
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] = o * a + u * n, r[1] = i * a + c * n, r[2] = s * a + p * n, r[3] = l * a + f * n, r[4] = u * a - o * n, r[5] = c * a - i * n, r[6] = p * a - s * n, r[7] = f * a - l * n, r;
|
|
8320
8320
|
}
|
|
8321
|
-
function
|
|
8321
|
+
function Zl(r, e, t, n, a) {
|
|
8322
8322
|
var o = 1 / Math.tan(e / 2), i;
|
|
8323
8323
|
return r[0] = o / t, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = o, 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 ? (i = 1 / (n - a), r[10] = (a + n) * i, r[14] = 2 * a * n * i) : (r[10] = -1, r[14] = -2 * n), r;
|
|
8324
8324
|
}
|
|
8325
|
-
var
|
|
8325
|
+
var Yl = Zl;
|
|
8326
8326
|
function Lt() {
|
|
8327
8327
|
var r = new ct(3);
|
|
8328
8328
|
return ct != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r;
|
|
8329
8329
|
}
|
|
8330
|
-
function
|
|
8330
|
+
function Jl(r, e, t) {
|
|
8331
8331
|
var n = new ct(3);
|
|
8332
8332
|
return n[0] = r, n[1] = e, n[2] = t, n;
|
|
8333
8333
|
}
|
|
@@ -8348,11 +8348,11 @@ function Wn(r, e, t) {
|
|
|
8348
8348
|
return e;
|
|
8349
8349
|
};
|
|
8350
8350
|
})();
|
|
8351
|
-
function
|
|
8351
|
+
function Ql(r) {
|
|
8352
8352
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
8353
8353
|
}
|
|
8354
8354
|
var yr, Zn;
|
|
8355
|
-
function
|
|
8355
|
+
function eu() {
|
|
8356
8356
|
return Zn || (Zn = 1, yr = {
|
|
8357
8357
|
aliceblue: [240, 248, 255],
|
|
8358
8358
|
antiquewhite: [250, 235, 215],
|
|
@@ -8505,10 +8505,10 @@ function Ql() {
|
|
|
8505
8505
|
}), yr;
|
|
8506
8506
|
}
|
|
8507
8507
|
var mr, Yn;
|
|
8508
|
-
function
|
|
8508
|
+
function to() {
|
|
8509
8509
|
if (Yn) return mr;
|
|
8510
8510
|
Yn = 1;
|
|
8511
|
-
const r =
|
|
8511
|
+
const r = eu(), e = {};
|
|
8512
8512
|
for (const a of Object.keys(r))
|
|
8513
8513
|
e[r[a]] = a;
|
|
8514
8514
|
const t = {
|
|
@@ -8808,10 +8808,10 @@ function eo() {
|
|
|
8808
8808
|
}, mr;
|
|
8809
8809
|
}
|
|
8810
8810
|
var gr, Jn;
|
|
8811
|
-
function
|
|
8811
|
+
function tu() {
|
|
8812
8812
|
if (Jn) return gr;
|
|
8813
8813
|
Jn = 1;
|
|
8814
|
-
const r =
|
|
8814
|
+
const r = to();
|
|
8815
8815
|
function e() {
|
|
8816
8816
|
const o = {}, i = Object.keys(r);
|
|
8817
8817
|
for (let s = i.length, l = 0; l < s; l++)
|
|
@@ -8856,10 +8856,10 @@ function eu() {
|
|
|
8856
8856
|
}, gr;
|
|
8857
8857
|
}
|
|
8858
8858
|
var vr, Qn;
|
|
8859
|
-
function
|
|
8859
|
+
function ru() {
|
|
8860
8860
|
if (Qn) return vr;
|
|
8861
8861
|
Qn = 1;
|
|
8862
|
-
const r =
|
|
8862
|
+
const r = to(), e = tu(), t = {}, n = Object.keys(r);
|
|
8863
8863
|
function a(i) {
|
|
8864
8864
|
const s = function(...l) {
|
|
8865
8865
|
const u = l[0];
|
|
@@ -8890,8 +8890,8 @@ function tu() {
|
|
|
8890
8890
|
});
|
|
8891
8891
|
}), vr = t, vr;
|
|
8892
8892
|
}
|
|
8893
|
-
var
|
|
8894
|
-
const
|
|
8893
|
+
var nu = ru();
|
|
8894
|
+
const au = /* @__PURE__ */ Ql(nu);
|
|
8895
8895
|
function ea({ gl: r, type: e, source: t }) {
|
|
8896
8896
|
const n = r.createShader(e);
|
|
8897
8897
|
if (n === null)
|
|
@@ -8900,7 +8900,7 @@ function ea({ gl: r, type: e, source: t }) {
|
|
|
8900
8900
|
throw console.error("Shader compilation error:", r.getShaderInfoLog(n)), r.deleteShader(n), new Error("Cannot compile shader");
|
|
8901
8901
|
return n;
|
|
8902
8902
|
}
|
|
8903
|
-
function
|
|
8903
|
+
function ou({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
8904
8904
|
const n = ea({
|
|
8905
8905
|
gl: r,
|
|
8906
8906
|
type: r.VERTEX_SHADER,
|
|
@@ -8910,13 +8910,13 @@ function au({ gl: r, vertexShaderSource: e, fragmentShaderSource: t }) {
|
|
|
8910
8910
|
throw console.error("Error: ", r.getProgramInfoLog(o)), new Error("Cannot link shader program");
|
|
8911
8911
|
return o;
|
|
8912
8912
|
}
|
|
8913
|
-
function
|
|
8913
|
+
function iu(r, e, t) {
|
|
8914
8914
|
const n = r.getUniformLocation(e, t);
|
|
8915
8915
|
if (n === null)
|
|
8916
8916
|
throw new Error(`Cannot get uniform location for ${t}`);
|
|
8917
8917
|
return n;
|
|
8918
8918
|
}
|
|
8919
|
-
function
|
|
8919
|
+
function ro({
|
|
8920
8920
|
gl: r,
|
|
8921
8921
|
vertexShaderSource: e,
|
|
8922
8922
|
fragmentShaderSource: t,
|
|
@@ -8925,7 +8925,7 @@ function to({
|
|
|
8925
8925
|
vertices: o,
|
|
8926
8926
|
indices: i
|
|
8927
8927
|
}) {
|
|
8928
|
-
const s =
|
|
8928
|
+
const s = ou({ 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] = iu(r, s, `u_${h}`), d), {}), c = r.createBuffer();
|
|
8929
8929
|
r.bindBuffer(r.ARRAY_BUFFER, c), r.bufferData(r.ARRAY_BUFFER, new Float32Array(o), r.STATIC_DRAW);
|
|
8930
8930
|
let p, f;
|
|
8931
8931
|
return i !== void 0 && (p = r.createBuffer(), f = i.length, r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, p), r.bufferData(r.ELEMENT_ARRAY_BUFFER, new Uint16Array(i), r.STATIC_DRAW)), {
|
|
@@ -8945,10 +8945,10 @@ function At(r) {
|
|
|
8945
8945
|
if (r === "transparent")
|
|
8946
8946
|
return [1, 1, 1, 0];
|
|
8947
8947
|
try {
|
|
8948
|
-
const e =
|
|
8948
|
+
const e = su(r), t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);
|
|
8949
8949
|
if (t != null && t.length) {
|
|
8950
8950
|
const a = !!t[4];
|
|
8951
|
-
return [...
|
|
8951
|
+
return [...au.hex.rgb(e).map((o) => o / 255), a ? parseInt(t[4], 16) / 255 : 1];
|
|
8952
8952
|
}
|
|
8953
8953
|
const n = e.match(/(\d\.\d(\d+)?|\d{3}|\d{2}|\d{1})/gi) ?? ["0", "0", "0"];
|
|
8954
8954
|
if (e.includes("rgb")) {
|
|
@@ -8963,10 +8963,10 @@ function At(r) {
|
|
|
8963
8963
|
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];
|
|
8964
8964
|
}
|
|
8965
8965
|
let Ye;
|
|
8966
|
-
function
|
|
8966
|
+
function su(r) {
|
|
8967
8967
|
return Ye = Ye ?? document.createElement("canvas").getContext("2d"), Ye ? (Ye.fillStyle = r, Ye.fillStyle) : "#000000";
|
|
8968
8968
|
}
|
|
8969
|
-
const un = 1, re = un / 2, ne = un / 2, ae = un / 2,
|
|
8969
|
+
const un = 1, re = un / 2, ne = un / 2, ae = un / 2, lu = [-0.5, -0.5, ae, re, -0.5, ae, re, ne, ae, -0.5, ne, ae], uu = [-0.5, -0.5, -0.5, -0.5, ne, -0.5, re, ne, -0.5, re, -0.5, -0.5], cu = [-0.5, ne, -0.5, -0.5, ne, ae, re, ne, ae, re, ne, -0.5], pu = [-0.5, -0.5, -0.5, re, -0.5, -0.5, re, -0.5, ae, -0.5, -0.5, ae], fu = [re, -0.5, -0.5, re, ne, -0.5, re, ne, ae, re, -0.5, ae], du = [-0.5, -0.5, -0.5, -0.5, -0.5, ae, -0.5, ne, ae, -0.5, ne, -0.5], hu = [...lu, ...uu, ...cu, ...pu, ...fu, ...du], yu = [
|
|
8970
8970
|
// Front
|
|
8971
8971
|
0,
|
|
8972
8972
|
1,
|
|
@@ -9009,7 +9009,7 @@ const un = 1, re = un / 2, ne = un / 2, ae = un / 2, su = [-0.5, -0.5, ae, re, -
|
|
|
9009
9009
|
20,
|
|
9010
9010
|
22,
|
|
9011
9011
|
23
|
|
9012
|
-
],
|
|
9012
|
+
], mu = `attribute vec3 a_vertexPosition;
|
|
9013
9013
|
varying vec3 vTextureCoord;
|
|
9014
9014
|
|
|
9015
9015
|
uniform mat4 u_projectionMatrix;
|
|
@@ -9049,7 +9049,7 @@ void main(void) {
|
|
|
9049
9049
|
#endif
|
|
9050
9050
|
}
|
|
9051
9051
|
`;
|
|
9052
|
-
var
|
|
9052
|
+
var gu = /* @__PURE__ */ ((r) => (r.UNIVERSE_DARK = "universe-dark", r))(gu || {});
|
|
9053
9053
|
const Ge = {
|
|
9054
9054
|
stars: {
|
|
9055
9055
|
color: "hsl(233,100%,92%)",
|
|
@@ -9076,12 +9076,10 @@ const Ge = {
|
|
|
9076
9076
|
preset: "milkyway-colored"
|
|
9077
9077
|
}
|
|
9078
9078
|
};
|
|
9079
|
-
var
|
|
9080
|
-
let br, ra;
|
|
9081
|
-
function
|
|
9082
|
-
|
|
9083
|
-
return br;
|
|
9084
|
-
ra = JSON.stringify(e);
|
|
9079
|
+
var Ie = /* @__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))(Ie || {});
|
|
9080
|
+
let br, ra, na;
|
|
9081
|
+
function vu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
|
|
9082
|
+
br && !n && na === JSON.stringify(e) && t(br, ra), na = JSON.stringify(e);
|
|
9085
9083
|
const a = r.createTexture();
|
|
9086
9084
|
if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
|
|
9087
9085
|
console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
|
|
@@ -9092,36 +9090,43 @@ function gu({ gl: r, faces: e, onLoadedCallback: t, forceRefresh: n }) {
|
|
|
9092
9090
|
console.warn(`[CubemapLayer][loadCubemapTexture]: Faces should contain exactly 6 images, but found ${o}`);
|
|
9093
9091
|
return;
|
|
9094
9092
|
}
|
|
9095
|
-
|
|
9096
|
-
if (
|
|
9097
|
-
console.warn(`[CubemapLayer][loadCubemapTexture]: Face ${
|
|
9093
|
+
const i = Object.entries(e).map(([s, l]) => new Promise((u, c) => {
|
|
9094
|
+
if (l === void 0) {
|
|
9095
|
+
console.warn(`[CubemapLayer][loadCubemapTexture]: Face ${s} is undefined`);
|
|
9098
9096
|
return;
|
|
9099
9097
|
}
|
|
9100
|
-
const
|
|
9101
|
-
if (
|
|
9102
|
-
const
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9098
|
+
const p = bu(r, s);
|
|
9099
|
+
if (p) {
|
|
9100
|
+
const d = r.RGBA, h = r.RGBA, y = r.UNSIGNED_BYTE, m = new Image();
|
|
9101
|
+
m.crossOrigin = "anonymous";
|
|
9102
|
+
const w = () => {
|
|
9103
|
+
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(p, 0, d, h, y, m), u(m);
|
|
9104
|
+
};
|
|
9105
|
+
m.src = l, m.complete && m.naturalWidth > 0 ? w() : m.onload = w, m.onerror = () => {
|
|
9106
|
+
c(new Error(`[CubemapLayer][loadCubemapTexture]: Error loading image ${l}`));
|
|
9107
|
+
};
|
|
9106
9108
|
}
|
|
9107
|
-
})
|
|
9109
|
+
}));
|
|
9110
|
+
Promise.all(i).then((s) => {
|
|
9111
|
+
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), t(a, s), ra = s, br = a;
|
|
9112
|
+
});
|
|
9108
9113
|
}
|
|
9109
|
-
function
|
|
9110
|
-
if (e ===
|
|
9114
|
+
function bu(r, e) {
|
|
9115
|
+
if (e === Ie.POSITIVE_X)
|
|
9111
9116
|
return r.TEXTURE_CUBE_MAP_POSITIVE_X;
|
|
9112
|
-
if (e ===
|
|
9117
|
+
if (e === Ie.NEGATIVE_X)
|
|
9113
9118
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_X;
|
|
9114
|
-
if (e ===
|
|
9119
|
+
if (e === Ie.POSITIVE_Y)
|
|
9115
9120
|
return r.TEXTURE_CUBE_MAP_POSITIVE_Y;
|
|
9116
|
-
if (e ===
|
|
9121
|
+
if (e === Ie.NEGATIVE_Y)
|
|
9117
9122
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Y;
|
|
9118
|
-
if (e ===
|
|
9123
|
+
if (e === Ie.POSITIVE_Z)
|
|
9119
9124
|
return r.TEXTURE_CUBE_MAP_POSITIVE_Z;
|
|
9120
|
-
if (e ===
|
|
9125
|
+
if (e === Ie.NEGATIVE_Z)
|
|
9121
9126
|
return r.TEXTURE_CUBE_MAP_NEGATIVE_Z;
|
|
9122
9127
|
throw new Error(`[CubemapLayer][loadCubemapTexture]: Invalid key ${e}`);
|
|
9123
9128
|
}
|
|
9124
|
-
function
|
|
9129
|
+
function wu(r, e, t) {
|
|
9125
9130
|
return [
|
|
9126
9131
|
Ce(r[0], e[0], t),
|
|
9127
9132
|
Ce(r[1], e[1], t),
|
|
@@ -9132,12 +9137,11 @@ function bu(r, e, t) {
|
|
|
9132
9137
|
function Ce(r, e, t) {
|
|
9133
9138
|
return r + (e - r) * t;
|
|
9134
9139
|
}
|
|
9135
|
-
const De = "https://api.maptiler.com/resources/space",
|
|
9136
|
-
function
|
|
9140
|
+
const De = "https://api.maptiler.com/resources/space", Su = ["vertexPosition"], xu = ["projectionMatrix", "modelViewMatrix", "cubeSampler", "bgColor", "fadeOpacity"], aa = "%USE_TEXTURE_MACRO_MARKER%", ku = "#define USE_TEXTURE", Cu = Ge.stars;
|
|
9141
|
+
function Lu(r, e) {
|
|
9137
9142
|
if (r === !0)
|
|
9138
9143
|
return e;
|
|
9139
9144
|
const t = {
|
|
9140
|
-
...e,
|
|
9141
9145
|
...r
|
|
9142
9146
|
};
|
|
9143
9147
|
if (r.faces || r.path)
|
|
@@ -9272,8 +9276,8 @@ class wr {
|
|
|
9272
9276
|
* @private
|
|
9273
9277
|
*/
|
|
9274
9278
|
S(this, "imageFadeInDelta", 0);
|
|
9275
|
-
const t =
|
|
9276
|
-
this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = At(t.color), this.faces =
|
|
9279
|
+
const t = Lu(e, Cu);
|
|
9280
|
+
this.options = t, this.currentFacesDefinitionKey = JSON.stringify(t.faces ?? t.preset ?? t.path), this.bgColor = [0, 0, 0, 0], this.targetBgColor = At(t.color), this.faces = oa(t), this.useCubemapTexture = this.faces !== null;
|
|
9277
9281
|
}
|
|
9278
9282
|
/**
|
|
9279
9283
|
* Updates the cubemap object with the current faces and shader configuration.
|
|
@@ -9285,17 +9289,17 @@ class wr {
|
|
|
9285
9289
|
*/
|
|
9286
9290
|
updateCubemap() {
|
|
9287
9291
|
this.useCubemapTexture = this.faces !== null;
|
|
9288
|
-
const e =
|
|
9289
|
-
this.cubemap =
|
|
9292
|
+
const e = xu.filter((t) => t === "cubeSampler" || t === "fadeOpacity" ? this.useCubemapTexture : !0);
|
|
9293
|
+
this.cubemap = ro({
|
|
9290
9294
|
gl: this.gl,
|
|
9291
|
-
vertexShaderSource:
|
|
9295
|
+
vertexShaderSource: mu,
|
|
9292
9296
|
// Because we only want to use the read the texture in gl if we're supposed to
|
|
9293
|
-
fragmentShaderSource: this.useCubemapTexture ? ta.replace(
|
|
9294
|
-
attributesKeys:
|
|
9297
|
+
fragmentShaderSource: this.useCubemapTexture ? ta.replace(aa, ku) : ta.replace(aa, ""),
|
|
9298
|
+
attributesKeys: Su,
|
|
9295
9299
|
uniformsKeys: e,
|
|
9296
|
-
vertices:
|
|
9297
|
-
indices:
|
|
9298
|
-
}), this.cubeMapNeedsUpdate = !0, this.animateColorChange();
|
|
9300
|
+
vertices: hu,
|
|
9301
|
+
indices: yu
|
|
9302
|
+
}), this.cubeMapNeedsUpdate = !0, this.useCubemapTexture && this.updateTexture(this.gl, this.faces), this.animateColorChange();
|
|
9299
9303
|
}
|
|
9300
9304
|
/**
|
|
9301
9305
|
* Called when the layer is added to the map.
|
|
@@ -9325,14 +9329,14 @@ class wr {
|
|
|
9325
9329
|
* @param {CubemapFaces} faces - The cubemap faces to be loaded into the texture.
|
|
9326
9330
|
*/
|
|
9327
9331
|
updateTexture(e, t) {
|
|
9328
|
-
if (this.cubeMapNeedsUpdate === !0) {
|
|
9332
|
+
if (this.cubeMapNeedsUpdate === !0 && !this.imageIsAnimating) {
|
|
9329
9333
|
if (this.cubeMapNeedsUpdate = !1, !this.useCubemapTexture)
|
|
9330
9334
|
return;
|
|
9331
|
-
|
|
9335
|
+
vu({
|
|
9332
9336
|
gl: e,
|
|
9333
9337
|
faces: t,
|
|
9334
|
-
|
|
9335
|
-
this.animateIn();
|
|
9338
|
+
onReady: (n) => {
|
|
9339
|
+
this.texture = n, this.animateIn();
|
|
9336
9340
|
}
|
|
9337
9341
|
});
|
|
9338
9342
|
}
|
|
@@ -9345,7 +9349,7 @@ class wr {
|
|
|
9345
9349
|
* @param {CustomRenderMethodInput} _options - Additional options for the render method.
|
|
9346
9350
|
*/
|
|
9347
9351
|
prerender(e, t) {
|
|
9348
|
-
this.faces && this.updateTexture(
|
|
9352
|
+
this.faces && this.updateTexture(this.gl, this.faces);
|
|
9349
9353
|
}
|
|
9350
9354
|
/**
|
|
9351
9355
|
* Lerps the background color transition of the cubemap layer.
|
|
@@ -9355,7 +9359,7 @@ class wr {
|
|
|
9355
9359
|
*/
|
|
9356
9360
|
animateColorChange() {
|
|
9357
9361
|
const e = () => {
|
|
9358
|
-
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor =
|
|
9362
|
+
this.transitionDelta < 1 && (requestAnimationFrame(e), this.bgColor = wu(this.previousBgColor, this.targetBgColor, this.transitionDelta), this.transitionDelta += 0.075, this.map.triggerRepaint());
|
|
9359
9363
|
};
|
|
9360
9364
|
requestAnimationFrame(e);
|
|
9361
9365
|
}
|
|
@@ -9367,9 +9371,10 @@ class wr {
|
|
|
9367
9371
|
animateIn() {
|
|
9368
9372
|
if (this.imageIsAnimating)
|
|
9369
9373
|
return;
|
|
9374
|
+
this.imageIsAnimating = !0;
|
|
9370
9375
|
const e = () => {
|
|
9371
9376
|
if (this.imageFadeInDelta = Math.min(this.imageFadeInDelta + 0.05, 1), this.currentFadeOpacity = Ce(0, 1, this.imageFadeInDelta), this.map.triggerRepaint(), this.imageFadeInDelta < 1) {
|
|
9372
|
-
|
|
9377
|
+
requestAnimationFrame(e);
|
|
9373
9378
|
return;
|
|
9374
9379
|
}
|
|
9375
9380
|
this.imageIsAnimating = !1, this.imageFadeInDelta = 0;
|
|
@@ -9409,9 +9414,9 @@ class wr {
|
|
|
9409
9414
|
throw new Error("[CubemapLayer]: Cubemap is undefined");
|
|
9410
9415
|
this.texture === void 0 && process.env.NODE_ENV === "development" && console.warn("[CubemapLayer]: Texture is undefined, no texture will be rendered to cubemap"), 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);
|
|
9411
9416
|
const n = 0.1, a = 1e4, o = e.canvas, i = o.clientWidth / o.clientHeight, s = this.map.transform, l = s.fov * (Math.PI / 180), u = rt();
|
|
9412
|
-
|
|
9417
|
+
Yl(u, l, i, n, a), Xn(u, u, s.rollInRadians), Kn(u, u, -s.pitchInRadians), Xn(u, u, s.bearingInRadians);
|
|
9413
9418
|
const c = s.center.lat * Math.PI / 180, p = s.center.lng * Math.PI / 180;
|
|
9414
|
-
Kn(u, u, c),
|
|
9419
|
+
Kn(u, u, c), Wl(u, u, -p), e.uniformMatrix4fv(this.cubemap.programInfo.uniformsLocations.projectionMatrix, !1, u);
|
|
9415
9420
|
const f = rt();
|
|
9416
9421
|
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)
|
|
9417
9422
|
throw new Error("Index buffer is undefined");
|
|
@@ -9431,10 +9436,10 @@ class wr {
|
|
|
9431
9436
|
}
|
|
9432
9437
|
async setCubemapFaces(e) {
|
|
9433
9438
|
if (await this.animateOut(), !e.faces && !e.preset && !e.path) {
|
|
9434
|
-
this.faces = null, this.useCubemapTexture = !1, this.currentFacesDefinitionKey = "", this.animateIn();
|
|
9439
|
+
this.faces = null, this.useCubemapTexture = !1, this.currentFacesDefinitionKey = "empty", this.animateIn();
|
|
9435
9440
|
return;
|
|
9436
9441
|
}
|
|
9437
|
-
this.faces =
|
|
9442
|
+
this.faces = oa(e), this.currentFacesDefinitionKey = JSON.stringify(e.faces ?? e.preset ?? e.path);
|
|
9438
9443
|
}
|
|
9439
9444
|
/**
|
|
9440
9445
|
* Sets the cubemap for the layer based on the provided definition.
|
|
@@ -9451,7 +9456,7 @@ class wr {
|
|
|
9451
9456
|
async setCubemap(e) {
|
|
9452
9457
|
this.options = e;
|
|
9453
9458
|
const t = JSON.stringify(e.faces ?? e.preset ?? e.path);
|
|
9454
|
-
this.currentFacesDefinitionKey !== t && await this.setCubemapFaces(e);
|
|
9459
|
+
this.currentFacesDefinitionKey !== t && (await this.setCubemapFaces(e), this.cubeMapNeedsUpdate = !0);
|
|
9455
9460
|
const n = At(e.color);
|
|
9456
9461
|
if (e.color && this.targetBgColor.toString() !== n.toString())
|
|
9457
9462
|
this.setBgColor(n);
|
|
@@ -9476,7 +9481,7 @@ class wr {
|
|
|
9476
9481
|
this.map.setLayoutProperty(this.id, "visibility", "none");
|
|
9477
9482
|
}
|
|
9478
9483
|
}
|
|
9479
|
-
function
|
|
9484
|
+
function oa(r) {
|
|
9480
9485
|
if (r.faces)
|
|
9481
9486
|
return r.faces;
|
|
9482
9487
|
if (r.preset)
|
|
@@ -9501,7 +9506,7 @@ function aa(r) {
|
|
|
9501
9506
|
}
|
|
9502
9507
|
return null;
|
|
9503
9508
|
}
|
|
9504
|
-
const
|
|
9509
|
+
const Au = `attribute vec3 a_position;
|
|
9505
9510
|
|
|
9506
9511
|
uniform mat4 u_matrix;
|
|
9507
9512
|
uniform mat4 u_rotationMatrix;
|
|
@@ -9516,7 +9521,7 @@ void main() {
|
|
|
9516
9521
|
v_pos = a_position.xy * u_scale;
|
|
9517
9522
|
gl_Position = u_matrix * u_rotationMatrix * vec4(a_position, 1.0);
|
|
9518
9523
|
}
|
|
9519
|
-
`,
|
|
9524
|
+
`, Eu = `precision mediump float;
|
|
9520
9525
|
varying vec2 v_pos;
|
|
9521
9526
|
|
|
9522
9527
|
uniform int u_stopsNumber;
|
|
@@ -9569,7 +9574,7 @@ void main() {
|
|
|
9569
9574
|
// gl_FragColor = color;
|
|
9570
9575
|
gl_FragColor = vec4(color.rgb * color.a, color.a);
|
|
9571
9576
|
}
|
|
9572
|
-
`, Je = 2,
|
|
9577
|
+
`, Je = 2, Tu = ["position"], _u = ["matrix", "rotationMatrix", "stopsNumber", "stops", "colors", "maxDistance", "scale"], Mu = [
|
|
9573
9578
|
-2,
|
|
9574
9579
|
-2,
|
|
9575
9580
|
0,
|
|
@@ -9582,14 +9587,14 @@ void main() {
|
|
|
9582
9587
|
Je,
|
|
9583
9588
|
Je,
|
|
9584
9589
|
0
|
|
9585
|
-
],
|
|
9590
|
+
], ia = {
|
|
9586
9591
|
scale: 0.9,
|
|
9587
9592
|
stops: [
|
|
9588
9593
|
[0, "rgba(176, 208, 240, 1)"],
|
|
9589
9594
|
[0.1, "rgba(98, 168, 229, 0.3)"],
|
|
9590
9595
|
[0.2, "rgba(98, 168, 229, 0.0)"]
|
|
9591
9596
|
]
|
|
9592
|
-
},
|
|
9597
|
+
}, sa = 0.075;
|
|
9593
9598
|
class Sr {
|
|
9594
9599
|
/**
|
|
9595
9600
|
* Creates a new RadialGradientLayer instance.
|
|
@@ -9639,11 +9644,11 @@ class Sr {
|
|
|
9639
9644
|
*/
|
|
9640
9645
|
S(this, "plane");
|
|
9641
9646
|
if (typeof e == "boolean") {
|
|
9642
|
-
this.gradient =
|
|
9647
|
+
this.gradient = ia;
|
|
9643
9648
|
return;
|
|
9644
9649
|
}
|
|
9645
9650
|
this.gradient = {
|
|
9646
|
-
...
|
|
9651
|
+
...ia,
|
|
9647
9652
|
...e
|
|
9648
9653
|
};
|
|
9649
9654
|
}
|
|
@@ -9656,13 +9661,13 @@ class Sr {
|
|
|
9656
9661
|
* @returns void
|
|
9657
9662
|
*/
|
|
9658
9663
|
onAdd(e, t) {
|
|
9659
|
-
this.map = e, this.plane =
|
|
9664
|
+
this.map = e, this.plane = ro({
|
|
9660
9665
|
gl: t,
|
|
9661
|
-
vertexShaderSource:
|
|
9662
|
-
fragmentShaderSource:
|
|
9663
|
-
attributesKeys:
|
|
9664
|
-
uniformsKeys:
|
|
9665
|
-
vertices:
|
|
9666
|
+
vertexShaderSource: Au,
|
|
9667
|
+
fragmentShaderSource: Eu,
|
|
9668
|
+
attributesKeys: Tu,
|
|
9669
|
+
uniformsKeys: _u,
|
|
9670
|
+
vertices: Mu
|
|
9666
9671
|
}), this.animateIn();
|
|
9667
9672
|
}
|
|
9668
9673
|
/**
|
|
@@ -9682,7 +9687,7 @@ class Sr {
|
|
|
9682
9687
|
this.animationDelta = 0;
|
|
9683
9688
|
const t = () => {
|
|
9684
9689
|
if (this.animationDelta < 1) {
|
|
9685
|
-
this.scale = Ce(0, this.gradient.scale, this.animationDelta), this.animationDelta +=
|
|
9690
|
+
this.scale = Ce(0, this.gradient.scale, this.animationDelta), this.animationDelta += sa, this.map.triggerRepaint(), requestAnimationFrame(t);
|
|
9686
9691
|
return;
|
|
9687
9692
|
}
|
|
9688
9693
|
e();
|
|
@@ -9706,7 +9711,7 @@ class Sr {
|
|
|
9706
9711
|
return this.animationDelta = 0, new Promise((e) => {
|
|
9707
9712
|
const t = () => {
|
|
9708
9713
|
if (this.animationDelta < 1) {
|
|
9709
|
-
this.scale = Ce(this.gradient.scale, 0, this.animationDelta), this.animationDelta +=
|
|
9714
|
+
this.scale = Ce(this.gradient.scale, 0, this.animationDelta), this.animationDelta += sa, this.map.triggerRepaint(), requestAnimationFrame(t);
|
|
9710
9715
|
return;
|
|
9711
9716
|
}
|
|
9712
9717
|
e();
|
|
@@ -9728,15 +9733,15 @@ class Sr {
|
|
|
9728
9733
|
const n = this.plane.programInfo.attributesLocations.position;
|
|
9729
9734
|
e.enableVertexAttribArray(n), e.vertexAttribPointer(n, 3, e.FLOAT, !1, 0, 0);
|
|
9730
9735
|
const a = rt(), o = this.scale;
|
|
9731
|
-
|
|
9736
|
+
Xl(a, a, [o, o, o]);
|
|
9732
9737
|
const i = rt();
|
|
9733
|
-
|
|
9738
|
+
Kl(i, t.defaultProjectionData.mainMatrix, a);
|
|
9734
9739
|
const s = this.plane.programInfo.uniformsLocations.matrix;
|
|
9735
9740
|
e.uniformMatrix4fv(s, !1, i);
|
|
9736
|
-
const l = rt(), u = this.map.transform.cameraPosition, c = hr(Lt(), u), p =
|
|
9741
|
+
const l = rt(), u = this.map.transform.cameraPosition, c = hr(Lt(), u), p = Jl(0, 1, 0), f = Lt();
|
|
9737
9742
|
Wn(f, p, c), hr(f, f);
|
|
9738
9743
|
const d = Lt();
|
|
9739
|
-
Wn(d, c, f), hr(d, d),
|
|
9744
|
+
Wn(d, c, f), hr(d, d), Hl(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);
|
|
9740
9745
|
const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
|
|
9741
9746
|
e.uniformMatrix4fv(h, !1, l);
|
|
9742
9747
|
const y = this.gradient.stops.length, m = [], w = [];
|
|
@@ -9770,15 +9775,15 @@ class Sr {
|
|
|
9770
9775
|
function xt(r) {
|
|
9771
9776
|
var a;
|
|
9772
9777
|
const { map: e, property: t } = r, n = e.getStyle();
|
|
9773
|
-
return n ? (a = n.metadata) != null && a.maptiler ? n.metadata.maptiler[t] ? n.metadata.maptiler[t] : null : (console.warn(`[extractCustomLayerStyle]: No custom layer metadata found in the style for property \`${t}\`. The property will use default values.`), null) : (console.warn("[extractCustomLayerStyle]: `Map.getStyle()` is returning undefined, are you initiating before style is ready?"), null);
|
|
9778
|
+
return n ? (a = n.metadata) != null && a.maptiler ? n.metadata.maptiler[t] ? n.metadata.maptiler[t] : null : (console.warn(`[extractCustomLayerStyle]: No custom layer metadata found in the style for property \`${t}\`. The property will use default values.`), null) : (process.env.NODE_ENV === "development" && console.warn("[extractCustomLayerStyle]: `Map.getStyle()` is returning undefined, are you initiating before style is ready?"), null);
|
|
9774
9779
|
}
|
|
9775
9780
|
const Iu = {
|
|
9776
9781
|
POINT: "POINT",
|
|
9777
9782
|
COUNTRY: "COUNTRY"
|
|
9778
9783
|
};
|
|
9779
|
-
let
|
|
9784
|
+
let Pu = class no extends k.Map {
|
|
9780
9785
|
constructor(t) {
|
|
9781
|
-
|
|
9786
|
+
Xo(t.container), t.apiKey && (D.apiKey = t.apiKey);
|
|
9782
9787
|
const { style: n, requiresUrlMonitoring: a, isFallback: o } = Gn(t.style);
|
|
9783
9788
|
o && console.warn(
|
|
9784
9789
|
"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."
|
|
@@ -9839,7 +9844,7 @@ let Mu = class ro extends k.Map {
|
|
|
9839
9844
|
u();
|
|
9840
9845
|
return;
|
|
9841
9846
|
}
|
|
9842
|
-
}), D.caching && !Cr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), D.caching && Cr &&
|
|
9847
|
+
}), D.caching && !Cr && console.warn("The cache API is only available in secure contexts. More info at https://developer.mozilla.org/en-US/docs/Web/API/Cache"), D.caching && Cr && qo(), typeof t.language > "u")
|
|
9843
9848
|
this.primaryLanguage = D.primaryLanguage;
|
|
9844
9849
|
else {
|
|
9845
9850
|
const h = yn(t.language, R);
|
|
@@ -9909,20 +9914,20 @@ let Mu = class ro extends k.Map {
|
|
|
9909
9914
|
this.addControl(new kn({ logoURL: y }), t.logoPosition);
|
|
9910
9915
|
} else t.maptilerLogo && this.addControl(new kn(), t.logoPosition);
|
|
9911
9916
|
if (t.scaleControl) {
|
|
9912
|
-
const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new
|
|
9917
|
+
const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new oi({ unit: D.unit });
|
|
9913
9918
|
this.addControl(m, y), D.on("unit", (w) => {
|
|
9914
9919
|
m.setUnit(w);
|
|
9915
9920
|
});
|
|
9916
9921
|
}
|
|
9917
9922
|
if (t.navigationControl !== !1) {
|
|
9918
9923
|
const y = t.navigationControl === !0 || t.navigationControl === void 0 ? "top-right" : t.navigationControl;
|
|
9919
|
-
this.addControl(new
|
|
9924
|
+
this.addControl(new kl(), y);
|
|
9920
9925
|
}
|
|
9921
9926
|
if (t.geolocateControl !== !1) {
|
|
9922
9927
|
const y = t.geolocateControl === !0 || t.geolocateControl === void 0 ? "top-right" : t.geolocateControl;
|
|
9923
9928
|
this.addControl(
|
|
9924
9929
|
// new maplibregl.GeolocateControl({
|
|
9925
|
-
new
|
|
9930
|
+
new Ll({
|
|
9926
9931
|
positionOptions: {
|
|
9927
9932
|
enableHighAccuracy: !0,
|
|
9928
9933
|
maximumAge: 0,
|
|
@@ -9940,15 +9945,15 @@ let Mu = class ro extends k.Map {
|
|
|
9940
9945
|
}
|
|
9941
9946
|
if (t.terrainControl) {
|
|
9942
9947
|
const y = t.terrainControl === !0 || t.terrainControl === void 0 ? "top-right" : t.terrainControl;
|
|
9943
|
-
this.addControl(new
|
|
9948
|
+
this.addControl(new xl(), y);
|
|
9944
9949
|
}
|
|
9945
9950
|
if (t.projectionControl) {
|
|
9946
9951
|
const y = t.projectionControl === !0 || t.projectionControl === void 0 ? "top-right" : t.projectionControl;
|
|
9947
|
-
this.addControl(new
|
|
9952
|
+
this.addControl(new Al(), y);
|
|
9948
9953
|
}
|
|
9949
9954
|
if (t.fullscreenControl) {
|
|
9950
9955
|
const y = t.fullscreenControl === !0 || t.fullscreenControl === void 0 ? "top-right" : t.fullscreenControl;
|
|
9951
|
-
this.addControl(new
|
|
9956
|
+
this.addControl(new ii({}), y);
|
|
9952
9957
|
}
|
|
9953
9958
|
this.isReady = !0, this.fire("ready", { target: this });
|
|
9954
9959
|
});
|
|
@@ -9971,15 +9976,15 @@ let Mu = class ro extends k.Map {
|
|
|
9971
9976
|
scrollZoom: Ze,
|
|
9972
9977
|
minZoom: gt,
|
|
9973
9978
|
maxZoom: vt,
|
|
9974
|
-
boxZoom:
|
|
9975
|
-
locale:
|
|
9976
|
-
fadeDuration:
|
|
9977
|
-
crossSourceCollisions:
|
|
9978
|
-
clickTolerance:
|
|
9979
|
-
bounds:
|
|
9980
|
-
fitBoundsOptions:
|
|
9981
|
-
pixelRatio:
|
|
9982
|
-
validateStyle:
|
|
9979
|
+
boxZoom: vo,
|
|
9980
|
+
locale: bo,
|
|
9981
|
+
fadeDuration: wo,
|
|
9982
|
+
crossSourceCollisions: So,
|
|
9983
|
+
clickTolerance: xo,
|
|
9984
|
+
bounds: ko,
|
|
9985
|
+
fitBoundsOptions: Co,
|
|
9986
|
+
pixelRatio: Lo,
|
|
9987
|
+
validateStyle: Ao
|
|
9983
9988
|
} = t;
|
|
9984
9989
|
this.minimap = new dr(h, {
|
|
9985
9990
|
zoom: y,
|
|
@@ -9995,15 +10000,15 @@ let Mu = class ro extends k.Map {
|
|
|
9995
10000
|
scrollZoom: Ze,
|
|
9996
10001
|
minZoom: gt,
|
|
9997
10002
|
maxZoom: vt,
|
|
9998
|
-
boxZoom:
|
|
9999
|
-
locale:
|
|
10000
|
-
fadeDuration:
|
|
10001
|
-
crossSourceCollisions:
|
|
10002
|
-
clickTolerance:
|
|
10003
|
-
bounds:
|
|
10004
|
-
fitBoundsOptions:
|
|
10005
|
-
pixelRatio:
|
|
10006
|
-
validateStyle:
|
|
10003
|
+
boxZoom: vo,
|
|
10004
|
+
locale: bo,
|
|
10005
|
+
fadeDuration: wo,
|
|
10006
|
+
crossSourceCollisions: So,
|
|
10007
|
+
clickTolerance: xo,
|
|
10008
|
+
bounds: ko,
|
|
10009
|
+
fitBoundsOptions: Co,
|
|
10010
|
+
pixelRatio: Lo,
|
|
10011
|
+
validateStyle: Ao
|
|
10007
10012
|
}), this.addControl(this.minimap, h.position ?? "bottom-left");
|
|
10008
10013
|
} else h === !0 ? (this.minimap = new dr({}, t), this.addControl(this.minimap, "bottom-left")) : h !== void 0 && h !== !1 && (this.minimap = new dr({}, t), this.addControl(this.minimap, h));
|
|
10009
10014
|
});
|
|
@@ -10024,7 +10029,7 @@ let Mu = class ro extends k.Map {
|
|
|
10024
10029
|
});
|
|
10025
10030
|
const h = this.getLayersOrder()[0];
|
|
10026
10031
|
this.initSpace({ options: t, before: h }), this.initHalo({ options: t, before: h });
|
|
10027
|
-
}), this.telemetry = new
|
|
10032
|
+
}), this.telemetry = new Vl(this);
|
|
10028
10033
|
}
|
|
10029
10034
|
getSpace() {
|
|
10030
10035
|
return this.space;
|
|
@@ -10050,39 +10055,29 @@ let Mu = class ro extends k.Map {
|
|
|
10050
10055
|
var o, i;
|
|
10051
10056
|
if (!((i = (o = t.metadata) == null ? void 0 : o.maptiler) != null && i.space))
|
|
10052
10057
|
return;
|
|
10053
|
-
const n = t.metadata.maptiler.space
|
|
10058
|
+
const n = t.metadata.maptiler.space;
|
|
10059
|
+
(() => {
|
|
10054
10060
|
if (this.space) {
|
|
10055
|
-
|
|
10056
|
-
|
|
10061
|
+
if (!this.getLayer(this.space.id)) {
|
|
10062
|
+
const s = this.getLayersOrder()[0];
|
|
10063
|
+
this.addLayer(this.space, s);
|
|
10064
|
+
}
|
|
10065
|
+
this.space.setCubemap(n);
|
|
10057
10066
|
}
|
|
10058
|
-
};
|
|
10059
|
-
if (!this.styleInProcess) {
|
|
10060
|
-
a();
|
|
10061
|
-
return;
|
|
10062
|
-
}
|
|
10063
|
-
this.once("style.load", () => {
|
|
10064
|
-
a();
|
|
10065
|
-
});
|
|
10067
|
+
})();
|
|
10066
10068
|
}
|
|
10067
10069
|
setHaloFromStyle({ style: t }) {
|
|
10068
10070
|
var o;
|
|
10069
10071
|
const n = (o = t.metadata) == null ? void 0 : o.maptiler;
|
|
10070
10072
|
if (!(n != null && n.halo))
|
|
10071
10073
|
return;
|
|
10072
|
-
|
|
10074
|
+
(() => {
|
|
10073
10075
|
var i;
|
|
10074
10076
|
if (this.halo) {
|
|
10075
10077
|
const s = this.getLayersOrder().indexOf(((i = this.space) == null ? void 0 : i.id) ?? "") + 1, l = this.getLayersOrder()[s];
|
|
10076
10078
|
this.addLayer(this.halo, l), this.halo.setGradient(n.halo);
|
|
10077
10079
|
}
|
|
10078
|
-
};
|
|
10079
|
-
if (!this.styleInProcess) {
|
|
10080
|
-
a();
|
|
10081
|
-
return;
|
|
10082
|
-
}
|
|
10083
|
-
this.once("style.load", () => {
|
|
10084
|
-
a();
|
|
10085
|
-
});
|
|
10080
|
+
})();
|
|
10086
10081
|
}
|
|
10087
10082
|
setSpaceFromCurrentStyle() {
|
|
10088
10083
|
const t = xt({ map: this, property: "space" });
|
|
@@ -10145,7 +10140,7 @@ let Mu = class ro extends k.Map {
|
|
|
10145
10140
|
bearing: this.getBearing(),
|
|
10146
10141
|
pitch: this.getPitch()
|
|
10147
10142
|
};
|
|
10148
|
-
this.remove(), Object.assign(this, new
|
|
10143
|
+
this.remove(), Object.assign(this, new no({ ...this.options })), this.once("load", () => {
|
|
10149
10144
|
this.jumpTo(t);
|
|
10150
10145
|
});
|
|
10151
10146
|
}
|
|
@@ -10237,7 +10232,12 @@ let Mu = class ro extends k.Map {
|
|
|
10237
10232
|
"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."
|
|
10238
10233
|
);
|
|
10239
10234
|
}
|
|
10240
|
-
this.styleInProcess = !0
|
|
10235
|
+
this.styleInProcess = !0;
|
|
10236
|
+
try {
|
|
10237
|
+
super.setStyle(a.style, n);
|
|
10238
|
+
} catch (s) {
|
|
10239
|
+
console.error("[Map.setStyle]: Error while setting style:", s);
|
|
10240
|
+
}
|
|
10241
10241
|
const o = this.getLayersOrder()[0];
|
|
10242
10242
|
if (typeof a.style != "string" && !a.requiresUrlMonitoring) {
|
|
10243
10243
|
if (this.halo) {
|
|
@@ -10252,16 +10252,10 @@ let Mu = class ro extends k.Map {
|
|
|
10252
10252
|
this.initSpace({ before: o });
|
|
10253
10253
|
return this;
|
|
10254
10254
|
}
|
|
10255
|
-
this.once("style.load", () => {
|
|
10255
|
+
return this.once("style.load", () => {
|
|
10256
10256
|
const s = this.getLayersOrder()[0];
|
|
10257
10257
|
this.space ? this.setSpaceFromCurrentStyle() : this.initSpace({ before: s }), this.halo ? this.setHaloFromCurrentStyle() : this.initHalo({ before: s });
|
|
10258
|
-
});
|
|
10259
|
-
try {
|
|
10260
|
-
super.setStyle(a.style, n);
|
|
10261
|
-
} catch (s) {
|
|
10262
|
-
console.error("[Map.setStyle]: Error while setting style:", s);
|
|
10263
|
-
}
|
|
10264
|
-
return this;
|
|
10258
|
+
}), this;
|
|
10265
10259
|
}
|
|
10266
10260
|
/**
|
|
10267
10261
|
* Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
|
|
@@ -10402,7 +10396,7 @@ let Mu = class ro extends k.Map {
|
|
|
10402
10396
|
return (a = this.minimap) == null || a.setGlyphs(t, n), super.setGlyphs(t, n);
|
|
10403
10397
|
}
|
|
10404
10398
|
getStyleLanguage() {
|
|
10405
|
-
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ?
|
|
10399
|
+
return !this.style || !this.style.stylesheet || !this.style.stylesheet.metadata || typeof this.style.stylesheet.metadata != "object" ? null : "maptiler:language" in this.style.stylesheet.metadata && typeof this.style.stylesheet.metadata["maptiler:language"] == "string" ? Ro(this.style.stylesheet.metadata["maptiler:language"]) : null;
|
|
10406
10400
|
}
|
|
10407
10401
|
/**
|
|
10408
10402
|
* Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
@@ -10463,7 +10457,7 @@ let Mu = class ro extends k.Map {
|
|
|
10463
10457
|
]) : o.flag === R.AUTO.flag ? (i = gn().flag, s = ["coalesce", ["get", i], ["get", R.LOCAL.flag]]) : o === R.LOCAL ? (i = R.LOCAL.flag, s = ["get", i]) : (i = o.flag, s = ["coalesce", ["get", i], ["get", R.LOCAL.flag]]);
|
|
10464
10458
|
const { layers: l } = this.getStyle(), u = this.originalLabelStyle.size === 0;
|
|
10465
10459
|
if (u) {
|
|
10466
|
-
const c =
|
|
10460
|
+
const c = ti(l, this);
|
|
10467
10461
|
this.isStyleLocalized = Object.keys(c.localized).length > 0;
|
|
10468
10462
|
}
|
|
10469
10463
|
for (const c of l) {
|
|
@@ -10477,16 +10471,16 @@ let Mu = class ro extends k.Map {
|
|
|
10477
10471
|
continue;
|
|
10478
10472
|
let m;
|
|
10479
10473
|
if (u ? (m = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, m)) : m = this.originalLabelStyle.get(h), typeof m == "string") {
|
|
10480
|
-
const { contains: w, exactMatch: v } =
|
|
10474
|
+
const { contains: w, exactMatch: v } = Zo(m, this.isStyleLocalized);
|
|
10481
10475
|
if (!w) continue;
|
|
10482
10476
|
if (v)
|
|
10483
10477
|
this.setLayoutProperty(h, "text-field", s);
|
|
10484
10478
|
else {
|
|
10485
|
-
const x =
|
|
10479
|
+
const x = Yo(m, s, this.isStyleLocalized);
|
|
10486
10480
|
this.setLayoutProperty(h, "text-field", x);
|
|
10487
10481
|
}
|
|
10488
10482
|
} else {
|
|
10489
|
-
const w =
|
|
10483
|
+
const w = Wo(m, s, this.isStyleLocalized);
|
|
10490
10484
|
this.setLayoutProperty(h, "text-field", w);
|
|
10491
10485
|
}
|
|
10492
10486
|
}
|
|
@@ -10611,7 +10605,7 @@ let Mu = class ro extends k.Map {
|
|
|
10611
10605
|
}
|
|
10612
10606
|
getCameraHash() {
|
|
10613
10607
|
const t = new Float32Array(5), n = this.getCenter();
|
|
10614
|
-
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(),
|
|
10608
|
+
return t[0] = n.lng, t[1] = n.lat, t[2] = this.getZoom(), t[3] = this.getPitch(), t[4] = this.getBearing(), $o.fromUint8Array(new Uint8Array(t.buffer));
|
|
10615
10609
|
}
|
|
10616
10610
|
/**
|
|
10617
10611
|
* Get the SDK config object.
|
|
@@ -10627,7 +10621,7 @@ let Mu = class ro extends k.Map {
|
|
|
10627
10621
|
* @returns
|
|
10628
10622
|
*/
|
|
10629
10623
|
getMaptilerSessionId() {
|
|
10630
|
-
return
|
|
10624
|
+
return jr;
|
|
10631
10625
|
}
|
|
10632
10626
|
/**
|
|
10633
10627
|
* Updates the requestManager's transform request with a new function.
|
|
@@ -10681,7 +10675,7 @@ function cn(r) {
|
|
|
10681
10675
|
}
|
|
10682
10676
|
throw new Error("No XML parser found");
|
|
10683
10677
|
}
|
|
10684
|
-
function
|
|
10678
|
+
function ao(r, e) {
|
|
10685
10679
|
if (!r.hasChildNodes())
|
|
10686
10680
|
return !1;
|
|
10687
10681
|
for (const t of Array.from(r.childNodes)) {
|
|
@@ -10691,68 +10685,68 @@ function no(r, e) {
|
|
|
10691
10685
|
}
|
|
10692
10686
|
return !1;
|
|
10693
10687
|
}
|
|
10694
|
-
function
|
|
10688
|
+
function la(r) {
|
|
10695
10689
|
if (typeof XMLSerializer < "u")
|
|
10696
10690
|
return new XMLSerializer().serializeToString(r);
|
|
10697
10691
|
throw new Error("No XML serializer found");
|
|
10698
10692
|
}
|
|
10699
|
-
function
|
|
10693
|
+
function oo(r) {
|
|
10700
10694
|
const e = typeof r == "string" ? cn(r) : r;
|
|
10701
|
-
if (!
|
|
10695
|
+
if (!ao(e, "gpx"))
|
|
10702
10696
|
throw new Error("The XML document is not valid GPX");
|
|
10703
10697
|
const t = G(e, "trk"), n = G(e, "rte"), a = G(e, "wpt"), o = {
|
|
10704
10698
|
type: "FeatureCollection",
|
|
10705
10699
|
features: []
|
|
10706
10700
|
};
|
|
10707
10701
|
for (const i of Array.from(t)) {
|
|
10708
|
-
const s =
|
|
10702
|
+
const s = $u(i);
|
|
10709
10703
|
s && o.features.push(s);
|
|
10710
10704
|
}
|
|
10711
10705
|
for (const i of Array.from(n)) {
|
|
10712
|
-
const s =
|
|
10706
|
+
const s = Ou(i);
|
|
10713
10707
|
s && o.features.push(s);
|
|
10714
10708
|
}
|
|
10715
10709
|
for (const i of Array.from(a))
|
|
10716
|
-
o.features.push(
|
|
10710
|
+
o.features.push(Nu(i));
|
|
10717
10711
|
return o;
|
|
10718
10712
|
}
|
|
10719
|
-
function
|
|
10713
|
+
function io(r, e) {
|
|
10720
10714
|
let t = r;
|
|
10721
|
-
if (typeof t == "string" && (t = cn(t)), !
|
|
10715
|
+
if (typeof t == "string" && (t = cn(t)), !ao(t, "kml"))
|
|
10722
10716
|
throw new Error("The XML document is not valid KML");
|
|
10723
10717
|
const n = {
|
|
10724
10718
|
type: "FeatureCollection",
|
|
10725
10719
|
features: []
|
|
10726
10720
|
}, a = {}, o = {}, i = {}, s = G(t, "Placemark"), l = G(t, "Style"), u = G(t, "StyleMap");
|
|
10727
10721
|
for (const c of Array.from(l)) {
|
|
10728
|
-
const p =
|
|
10722
|
+
const p = ca(e !== void 0 ? e(c) : la(c)).toString(16);
|
|
10729
10723
|
a[`#${Oe(c, "id")}`] = p, o[p] = c;
|
|
10730
10724
|
}
|
|
10731
10725
|
for (const c of Array.from(u)) {
|
|
10732
|
-
a[`#${Oe(c, "id")}`] =
|
|
10726
|
+
a[`#${Oe(c, "id")}`] = ca(e !== void 0 ? e(c) : la(c)).toString(16);
|
|
10733
10727
|
const p = G(c, "Pair"), f = {};
|
|
10734
10728
|
for (const d of Array.from(p))
|
|
10735
10729
|
f[O(E(d, "key")) ?? ""] = O(E(d, "styleUrl"));
|
|
10736
10730
|
i[`#${Oe(c, "id")}`] = f;
|
|
10737
10731
|
}
|
|
10738
10732
|
for (const c of Array.from(s))
|
|
10739
|
-
n.features = n.features.concat(
|
|
10733
|
+
n.features = n.features.concat(Fu(c, a, o, i));
|
|
10740
10734
|
return n;
|
|
10741
10735
|
}
|
|
10742
|
-
function
|
|
10736
|
+
function ua(r) {
|
|
10743
10737
|
if (r === null) return ["#000000", 1];
|
|
10744
10738
|
let e = "", t = 1, n = r;
|
|
10745
10739
|
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];
|
|
10746
10740
|
}
|
|
10747
|
-
function Pu(r) {
|
|
10748
|
-
return lo(r.split(" "));
|
|
10749
|
-
}
|
|
10750
10741
|
function Ru(r) {
|
|
10742
|
+
return uo(r.split(" "));
|
|
10743
|
+
}
|
|
10744
|
+
function zu(r) {
|
|
10751
10745
|
let e = G(r, "coord");
|
|
10752
10746
|
const t = [], n = [];
|
|
10753
10747
|
e.length === 0 && (e = G(r, "gx:coord"));
|
|
10754
10748
|
for (const o of Array.from(e))
|
|
10755
|
-
t.push(
|
|
10749
|
+
t.push(Ru(O(o) ?? ""));
|
|
10756
10750
|
const a = G(r, "when");
|
|
10757
10751
|
for (const o of Array.from(a)) n.push(O(o));
|
|
10758
10752
|
return {
|
|
@@ -10776,23 +10770,23 @@ function Et(r) {
|
|
|
10776
10770
|
if (t = n[o], e[a] === "Point")
|
|
10777
10771
|
s.push({
|
|
10778
10772
|
type: "Point",
|
|
10779
|
-
coordinates:
|
|
10773
|
+
coordinates: co(O(E(t, "coordinates")) ?? "")
|
|
10780
10774
|
});
|
|
10781
10775
|
else if (e[a] === "LineString")
|
|
10782
10776
|
s.push({
|
|
10783
10777
|
type: "LineString",
|
|
10784
|
-
coordinates:
|
|
10778
|
+
coordinates: fa(O(E(t, "coordinates")) ?? "")
|
|
10785
10779
|
});
|
|
10786
10780
|
else if (e[a] === "Polygon") {
|
|
10787
10781
|
const u = G(t, "LinearRing"), c = [];
|
|
10788
10782
|
for (i = 0; i < u.length; i++)
|
|
10789
|
-
c.push(
|
|
10783
|
+
c.push(fa(O(E(u[i], "coordinates")) ?? ""));
|
|
10790
10784
|
s.push({
|
|
10791
10785
|
type: "Polygon",
|
|
10792
10786
|
coordinates: c
|
|
10793
10787
|
});
|
|
10794
10788
|
} else if (e[a] === "Track" || e[a] === "gx:Track") {
|
|
10795
|
-
const u =
|
|
10789
|
+
const u = zu(t);
|
|
10796
10790
|
s.push({
|
|
10797
10791
|
type: "LineString",
|
|
10798
10792
|
coordinates: u.coords
|
|
@@ -10801,7 +10795,7 @@ function Et(r) {
|
|
|
10801
10795
|
}
|
|
10802
10796
|
return { geoms: s, coordTimes: l };
|
|
10803
10797
|
}
|
|
10804
|
-
function
|
|
10798
|
+
function Fu(r, e, t, n) {
|
|
10805
10799
|
const a = Et(r), o = {}, i = O(E(r, "name")), s = O(E(r, "address")), l = O(E(r, "description")), u = E(r, "TimeSpan"), c = E(r, "TimeStamp"), p = E(r, "ExtendedData"), f = E(r, "visibility");
|
|
10806
10800
|
let d, h = O(E(r, "styleUrl")), y = E(r, "LineStyle"), m = E(r, "PolyStyle");
|
|
10807
10801
|
if (!a.geoms.length) return [];
|
|
@@ -10825,11 +10819,11 @@ function zu(r, e, t, n) {
|
|
|
10825
10819
|
v && x && (o.timespan = { begin: v, end: x });
|
|
10826
10820
|
}
|
|
10827
10821
|
if (c !== null && (o.timestamp = O(E(c, "when")) ?? (/* @__PURE__ */ new Date()).toISOString()), y !== null) {
|
|
10828
|
-
const v =
|
|
10822
|
+
const v = ua(O(E(y, "color"))), x = v[0], A = v[1], L = Number.parseFloat(O(E(y, "width")) ?? "");
|
|
10829
10823
|
x && (o.stroke = x), Number.isNaN(A) || (o["stroke-opacity"] = A), Number.isNaN(L) || (o["stroke-width"] = L);
|
|
10830
10824
|
}
|
|
10831
10825
|
if (m) {
|
|
10832
|
-
const v =
|
|
10826
|
+
const v = ua(O(E(m, "color"))), x = v[0], A = v[1], L = O(E(m, "fill")), $ = O(E(m, "outline"));
|
|
10833
10827
|
x && (o.fill = x), Number.isNaN(A) || (o["fill-opacity"] = A), L && (o["fill-opacity"] = L === "1" ? o["fill-opacity"] || 1 : 0), $ && (o["stroke-opacity"] = $ === "1" ? o["stroke-opacity"] || 1 : 0);
|
|
10834
10828
|
}
|
|
10835
10829
|
if (p) {
|
|
@@ -10850,13 +10844,13 @@ function zu(r, e, t, n) {
|
|
|
10850
10844
|
};
|
|
10851
10845
|
return Oe(r, "id") && (w.id = Oe(r, "id") ?? void 0), [w];
|
|
10852
10846
|
}
|
|
10853
|
-
function
|
|
10847
|
+
function so(r, e) {
|
|
10854
10848
|
const t = G(r, e), n = [], a = [];
|
|
10855
10849
|
let o = [];
|
|
10856
10850
|
const i = t.length;
|
|
10857
10851
|
if (!(i < 2)) {
|
|
10858
10852
|
for (let s = 0; s < i; s++) {
|
|
10859
|
-
const l =
|
|
10853
|
+
const l = po(t[s]);
|
|
10860
10854
|
n.push(l.coordinates), l.time && a.push(l.time), (l.heartRate || o.length) && (o.length === 0 && (o = new Array(s).fill(null)), o.push(l.heartRate));
|
|
10861
10855
|
}
|
|
10862
10856
|
return {
|
|
@@ -10866,11 +10860,11 @@ function io(r, e) {
|
|
|
10866
10860
|
};
|
|
10867
10861
|
}
|
|
10868
10862
|
}
|
|
10869
|
-
function
|
|
10863
|
+
function $u(r) {
|
|
10870
10864
|
const e = G(r, "trkseg"), t = [], n = [], a = [];
|
|
10871
10865
|
let o;
|
|
10872
10866
|
for (let s = 0; s < e.length; s++)
|
|
10873
|
-
if (o =
|
|
10867
|
+
if (o = so(e[s], "trkpt"), o !== void 0 && (o.line && t.push(o.line), o.times && o.times.length && n.push(o.times), a.length || o.heartRates && o.heartRates.length)) {
|
|
10874
10868
|
if (!a.length)
|
|
10875
10869
|
for (let l = 0; l < s; l++)
|
|
10876
10870
|
a.push(new Array(t[l].length).fill(null));
|
|
@@ -10879,7 +10873,7 @@ function Fu(r) {
|
|
|
10879
10873
|
if (t.length === 0) return;
|
|
10880
10874
|
const i = {
|
|
10881
10875
|
...pn(r),
|
|
10882
|
-
...
|
|
10876
|
+
...lo(E(r, "extensions"))
|
|
10883
10877
|
};
|
|
10884
10878
|
return n.length !== 0 && (i.coordTimes = t.length === 1 ? n[0] : n), a.length !== 0 && (i.heartRates = t.length === 1 ? a[0] : a), t.length === 1 ? {
|
|
10885
10879
|
type: "Feature",
|
|
@@ -10897,13 +10891,13 @@ function Fu(r) {
|
|
|
10897
10891
|
}
|
|
10898
10892
|
};
|
|
10899
10893
|
}
|
|
10900
|
-
function
|
|
10901
|
-
const e =
|
|
10894
|
+
function Ou(r) {
|
|
10895
|
+
const e = so(r, "rtept");
|
|
10902
10896
|
return e === void 0 ? void 0 : {
|
|
10903
10897
|
type: "Feature",
|
|
10904
10898
|
properties: {
|
|
10905
10899
|
...pn(r),
|
|
10906
|
-
...
|
|
10900
|
+
...lo(E(r, "extensions"))
|
|
10907
10901
|
},
|
|
10908
10902
|
geometry: {
|
|
10909
10903
|
type: "LineString",
|
|
@@ -10911,17 +10905,17 @@ function $u(r) {
|
|
|
10911
10905
|
}
|
|
10912
10906
|
};
|
|
10913
10907
|
}
|
|
10914
|
-
function
|
|
10908
|
+
function Nu(r) {
|
|
10915
10909
|
return {
|
|
10916
10910
|
type: "Feature",
|
|
10917
10911
|
properties: { ...pn(r), ...Rr(r, ["sym"]) },
|
|
10918
10912
|
geometry: {
|
|
10919
10913
|
type: "Point",
|
|
10920
|
-
coordinates:
|
|
10914
|
+
coordinates: po(r).coordinates
|
|
10921
10915
|
}
|
|
10922
10916
|
};
|
|
10923
10917
|
}
|
|
10924
|
-
function
|
|
10918
|
+
function lo(r) {
|
|
10925
10919
|
const e = {};
|
|
10926
10920
|
if (r) {
|
|
10927
10921
|
const t = E(r, "line");
|
|
@@ -10946,7 +10940,7 @@ function pn(r) {
|
|
|
10946
10940
|
}
|
|
10947
10941
|
return e;
|
|
10948
10942
|
}
|
|
10949
|
-
function
|
|
10943
|
+
function ca(r) {
|
|
10950
10944
|
let e = 0;
|
|
10951
10945
|
if (!r || !r.length) return e;
|
|
10952
10946
|
for (let t = 0; t < r.length; t++)
|
|
@@ -10959,7 +10953,7 @@ function G(r, e) {
|
|
|
10959
10953
|
function Oe(r, e) {
|
|
10960
10954
|
return r.getAttribute(e);
|
|
10961
10955
|
}
|
|
10962
|
-
function
|
|
10956
|
+
function pa(r, e) {
|
|
10963
10957
|
return Number.parseFloat(Oe(r, e) ?? "0");
|
|
10964
10958
|
}
|
|
10965
10959
|
function E(r, e) {
|
|
@@ -10969,7 +10963,7 @@ function E(r, e) {
|
|
|
10969
10963
|
function ju(r) {
|
|
10970
10964
|
return r.normalize && r.normalize(), r;
|
|
10971
10965
|
}
|
|
10972
|
-
function
|
|
10966
|
+
function uo(r) {
|
|
10973
10967
|
return r.map(Number.parseFloat).map((e) => Number.isNaN(e) ? null : e);
|
|
10974
10968
|
}
|
|
10975
10969
|
function O(r) {
|
|
@@ -10982,16 +10976,16 @@ function Rr(r, e) {
|
|
|
10982
10976
|
n = E(r, e[a]), n && (t[e[a]] = O(n) ?? "");
|
|
10983
10977
|
return t;
|
|
10984
10978
|
}
|
|
10985
|
-
function
|
|
10986
|
-
return
|
|
10979
|
+
function co(r) {
|
|
10980
|
+
return uo(r.replace(/\s*/g, "").split(","));
|
|
10987
10981
|
}
|
|
10988
|
-
function
|
|
10982
|
+
function fa(r) {
|
|
10989
10983
|
const e = r.replace(/^\s*|\s*$/g, "").split(/\s+/), t = [];
|
|
10990
|
-
for (const n of e) t.push(
|
|
10984
|
+
for (const n of e) t.push(co(n));
|
|
10991
10985
|
return t;
|
|
10992
10986
|
}
|
|
10993
|
-
function
|
|
10994
|
-
const e = [
|
|
10987
|
+
function po(r) {
|
|
10988
|
+
const e = [pa(r, "lon"), pa(r, "lat")], t = E(r, "ele"), n = E(r, "gpxtpx:hr") || E(r, "hr"), a = E(r, "time");
|
|
10995
10989
|
let o;
|
|
10996
10990
|
return t && (o = Number.parseFloat(O(t) ?? "0"), Number.isNaN(o) || e.push(o)), {
|
|
10997
10991
|
coordinates: e,
|
|
@@ -10999,7 +10993,7 @@ function co(r) {
|
|
|
10999
10993
|
heartRate: n !== null ? Number.parseFloat(O(n) ?? "0") : null
|
|
11000
10994
|
};
|
|
11001
10995
|
}
|
|
11002
|
-
function
|
|
10996
|
+
function Du(r) {
|
|
11003
10997
|
let e = r;
|
|
11004
10998
|
try {
|
|
11005
10999
|
typeof e == "string" && (e = cn(e));
|
|
@@ -11007,17 +11001,17 @@ function Nu(r) {
|
|
|
11007
11001
|
return null;
|
|
11008
11002
|
}
|
|
11009
11003
|
try {
|
|
11010
|
-
return
|
|
11004
|
+
return oo(e);
|
|
11011
11005
|
} catch {
|
|
11012
11006
|
}
|
|
11013
11007
|
try {
|
|
11014
|
-
return
|
|
11008
|
+
return io(e);
|
|
11015
11009
|
} catch {
|
|
11016
11010
|
}
|
|
11017
11011
|
return null;
|
|
11018
11012
|
}
|
|
11019
|
-
async function
|
|
11020
|
-
const t = e.download ?? !1, n = await
|
|
11013
|
+
async function Uu(r, e = {}) {
|
|
11014
|
+
const t = e.download ?? !1, n = await Bu(r);
|
|
11021
11015
|
if (t) {
|
|
11022
11016
|
const a = e.filename ?? "maptiler_screenshot.png", o = document.createElement("a");
|
|
11023
11017
|
o.style.display = "none", document.body.appendChild(o), o.href = URL.createObjectURL(n), o.download = a, o.click(), setTimeout(() => {
|
|
@@ -11026,7 +11020,7 @@ async function Du(r, e = {}) {
|
|
|
11026
11020
|
}
|
|
11027
11021
|
return n;
|
|
11028
11022
|
}
|
|
11029
|
-
function
|
|
11023
|
+
function Bu(r) {
|
|
11030
11024
|
return new Promise((e, t) => {
|
|
11031
11025
|
r.redraw(), r.once("idle", () => {
|
|
11032
11026
|
r.getCanvas().toBlob((n) => {
|
|
@@ -11063,10 +11057,10 @@ function er() {
|
|
|
11063
11057
|
return zr[~~(Math.random() * zr.length)][~~(Math.random() * 4)];
|
|
11064
11058
|
}
|
|
11065
11059
|
function yt() {
|
|
11066
|
-
return `maptiler_source_${
|
|
11060
|
+
return `maptiler_source_${ha()}`;
|
|
11067
11061
|
}
|
|
11068
11062
|
function mt() {
|
|
11069
|
-
return `maptiler_layer_${
|
|
11063
|
+
return `maptiler_layer_${ha()}`;
|
|
11070
11064
|
}
|
|
11071
11065
|
function Fr(r, e) {
|
|
11072
11066
|
if (e <= r[0].zoom)
|
|
@@ -11086,7 +11080,7 @@ function Ae(r) {
|
|
|
11086
11080
|
function z(r) {
|
|
11087
11081
|
return ["interpolate", ["linear"], ["zoom"], ...r.flatMap((e) => [e.zoom, e.value])];
|
|
11088
11082
|
}
|
|
11089
|
-
function
|
|
11083
|
+
function fo(r, e) {
|
|
11090
11084
|
if (typeof e == "number" && typeof r == "number")
|
|
11091
11085
|
return 2 * e + r;
|
|
11092
11086
|
if (typeof e == "number" && Array.isArray(r))
|
|
@@ -11099,7 +11093,7 @@ function po(r, e) {
|
|
|
11099
11093
|
}
|
|
11100
11094
|
return 0;
|
|
11101
11095
|
}
|
|
11102
|
-
function
|
|
11096
|
+
function ho(r, e) {
|
|
11103
11097
|
return ["interpolate", ["linear"], ["get", e], ...r.flatMap((t) => [t.propertyValue, t.value])];
|
|
11104
11098
|
}
|
|
11105
11099
|
function fn(r) {
|
|
@@ -11135,7 +11129,7 @@ function Or(r, e, t = !0) {
|
|
|
11135
11129
|
["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])]
|
|
11136
11130
|
] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.value, n.pointRadius])];
|
|
11137
11131
|
}
|
|
11138
|
-
function
|
|
11132
|
+
function yo(r, e, t = !0) {
|
|
11139
11133
|
return t ? [
|
|
11140
11134
|
"interpolate",
|
|
11141
11135
|
["linear"],
|
|
@@ -11152,7 +11146,7 @@ function ho(r, e, t = !0) {
|
|
|
11152
11146
|
["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])]
|
|
11153
11147
|
] : ["interpolate", ["linear"], ["get", e], ...r.flatMap((n) => [n.propertyValue, n.value])];
|
|
11154
11148
|
}
|
|
11155
|
-
function
|
|
11149
|
+
function Nr(r, e) {
|
|
11156
11150
|
return r.every((t) => t.color[3] === r[0].color[3]) ? r[0].color[3] ? r[0].color[3] / 255 : 1 : [
|
|
11157
11151
|
"interpolate",
|
|
11158
11152
|
["linear"],
|
|
@@ -11163,7 +11157,7 @@ function jr(r, e) {
|
|
|
11163
11157
|
})
|
|
11164
11158
|
];
|
|
11165
11159
|
}
|
|
11166
|
-
function
|
|
11160
|
+
function mo(r, e = 10) {
|
|
11167
11161
|
return [
|
|
11168
11162
|
"interpolate",
|
|
11169
11163
|
["linear"],
|
|
@@ -11178,7 +11172,7 @@ function kt(r) {
|
|
|
11178
11172
|
const e = r.toString(16);
|
|
11179
11173
|
return e.length === 1 ? `0${e}` : e;
|
|
11180
11174
|
}
|
|
11181
|
-
function
|
|
11175
|
+
function qu(r) {
|
|
11182
11176
|
return `#${kt(r[0])}${kt(r[1])}${kt(r[2])}${r.length === 4 ? kt(r[3]) : ""}`;
|
|
11183
11177
|
}
|
|
11184
11178
|
class C extends Array {
|
|
@@ -11272,7 +11266,7 @@ class C extends Array {
|
|
|
11272
11266
|
smooth: !0,
|
|
11273
11267
|
withAlpha: !1
|
|
11274
11268
|
}) {
|
|
11275
|
-
return
|
|
11269
|
+
return qu(this.getColor(t, n));
|
|
11276
11270
|
}
|
|
11277
11271
|
/**
|
|
11278
11272
|
* Get the color of the color ramp at a relative position in [0, 1]
|
|
@@ -11359,7 +11353,7 @@ class C extends Array {
|
|
|
11359
11353
|
return this[0].color.length === 4 && this[0].color[3] === 0;
|
|
11360
11354
|
}
|
|
11361
11355
|
}
|
|
11362
|
-
const
|
|
11356
|
+
const go = {
|
|
11363
11357
|
/**
|
|
11364
11358
|
* A fully transparent [0, 0, 0, 0] colorramp to hide data.
|
|
11365
11359
|
* Defined in interval [0, 1], without unit.
|
|
@@ -12115,7 +12109,7 @@ const mo = {
|
|
|
12115
12109
|
]
|
|
12116
12110
|
})
|
|
12117
12111
|
};
|
|
12118
|
-
async function
|
|
12112
|
+
async function Gu(r, e, t = {}) {
|
|
12119
12113
|
var a, o;
|
|
12120
12114
|
if (!e.sourceId && !e.data)
|
|
12121
12115
|
throw new Error("Creating a polyline layer requires an existing .sourceId or a valid .data property");
|
|
@@ -12125,23 +12119,23 @@ async function qu(r, e, t = {}) {
|
|
|
12125
12119
|
n = `https://api.maptiler.com/data/${e.data}/features.json?key=${D.apiKey}`;
|
|
12126
12120
|
else if (((a = n.split(".").pop()) == null ? void 0 : a.toLowerCase().trim()) === "gpx") {
|
|
12127
12121
|
const s = await (await fetch(n, t)).text();
|
|
12128
|
-
n =
|
|
12122
|
+
n = oo(s);
|
|
12129
12123
|
} else if (((o = n.split(".").pop()) == null ? void 0 : o.toLowerCase().trim()) === "kml") {
|
|
12130
12124
|
const s = await (await fetch(n, t)).text();
|
|
12131
|
-
n =
|
|
12125
|
+
n = io(s);
|
|
12132
12126
|
} else {
|
|
12133
|
-
const i =
|
|
12127
|
+
const i = Ho(n) ?? Du(n);
|
|
12134
12128
|
i && (n = i);
|
|
12135
12129
|
}
|
|
12136
12130
|
if (!n)
|
|
12137
12131
|
throw new Error("Polyline data was provided as string but is incompatible with valid formats.");
|
|
12138
12132
|
}
|
|
12139
|
-
return
|
|
12133
|
+
return Vu(r, {
|
|
12140
12134
|
...e,
|
|
12141
12135
|
data: n
|
|
12142
12136
|
});
|
|
12143
12137
|
}
|
|
12144
|
-
function
|
|
12138
|
+
function Vu(r, e) {
|
|
12145
12139
|
if (e.layerId && r.getLayer(e.layerId))
|
|
12146
12140
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
12147
12141
|
const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = {
|
|
@@ -12172,7 +12166,7 @@ function Gu(r, e) {
|
|
|
12172
12166
|
paint: {
|
|
12173
12167
|
"line-opacity": typeof d == "number" ? d : z(d),
|
|
12174
12168
|
"line-color": typeof f == "string" ? f : Ae(f),
|
|
12175
|
-
"line-width":
|
|
12169
|
+
"line-width": fo(o, p),
|
|
12176
12170
|
"line-blur": typeof h == "number" ? h : z(h)
|
|
12177
12171
|
}
|
|
12178
12172
|
},
|
|
@@ -12207,7 +12201,7 @@ function Gu(r, e) {
|
|
|
12207
12201
|
e.beforeId
|
|
12208
12202
|
), a;
|
|
12209
12203
|
}
|
|
12210
|
-
function
|
|
12204
|
+
function Hu(r, e) {
|
|
12211
12205
|
if (e.layerId && r.getLayer(e.layerId))
|
|
12212
12206
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
12213
12207
|
const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = {
|
|
@@ -12290,13 +12284,13 @@ function Vu(r, e) {
|
|
|
12290
12284
|
console.error("Could not load the pattern image.", y.message), h();
|
|
12291
12285
|
}) : h(), a;
|
|
12292
12286
|
}
|
|
12293
|
-
function
|
|
12287
|
+
function Ku(r, e) {
|
|
12294
12288
|
if (e.layerId && r.getLayer(e.layerId))
|
|
12295
12289
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
12296
|
-
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor :
|
|
12290
|
+
const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : go.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? yt(), u = e.layerId ?? mt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
|
|
12297
12291
|
let m;
|
|
12298
12292
|
const w = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
|
|
12299
|
-
typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = z(e.pointOpacity) : e.cluster ? m =
|
|
12293
|
+
typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = z(e.pointOpacity) : e.cluster ? m = Nr(i, "point_count") : e.property ? m = Nr(i, e.property) : m = z([
|
|
12300
12294
|
{ zoom: v, value: 0 },
|
|
12301
12295
|
{ zoom: v + 0.25, value: 1 },
|
|
12302
12296
|
{ zoom: x - 0.25, value: 1 },
|
|
@@ -12457,7 +12451,7 @@ function Hu(r, e) {
|
|
|
12457
12451
|
}
|
|
12458
12452
|
return A;
|
|
12459
12453
|
}
|
|
12460
|
-
function
|
|
12454
|
+
function Xu(r, e) {
|
|
12461
12455
|
if (e.layerId && r.getLayer(e.layerId))
|
|
12462
12456
|
throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
|
|
12463
12457
|
const t = e.sourceId ?? yt(), n = e.layerId ?? mt(), a = e.minzoom ?? 0, o = e.maxzoom ?? 23, i = e.zoomCompensation ?? !0, s = e.opacity ?? [
|
|
@@ -12466,7 +12460,7 @@ function Ku(r, e) {
|
|
|
12466
12460
|
{ zoom: o - 0.25, value: 1 },
|
|
12467
12461
|
{ zoom: o, value: 0 }
|
|
12468
12462
|
];
|
|
12469
|
-
let l = Array.isArray(e.colorRamp) ? e.colorRamp :
|
|
12463
|
+
let l = Array.isArray(e.colorRamp) ? e.colorRamp : go.TURBO.transparentStart();
|
|
12470
12464
|
const u = l.getBounds();
|
|
12471
12465
|
(u.min !== 0 || u.max !== 1) && (l = l.scale(0, 1)), l.hasTransparentStart() || (l = l.transparentStart());
|
|
12472
12466
|
const c = e.intensity ?? [
|
|
@@ -12475,7 +12469,7 @@ function Ku(r, e) {
|
|
|
12475
12469
|
{ zoom: 16, value: 1 }
|
|
12476
12470
|
], p = e.property ?? null, f = e.weight ?? 1;
|
|
12477
12471
|
let d = 1;
|
|
12478
|
-
p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d =
|
|
12472
|
+
p ? typeof f == "number" ? (d = f, typeof e.weight == "number" && console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`")) : Array.isArray(f) ? d = ho(f, p) : console.warn("The option `.property` is ignored when `.propertyValueWeights` is not of type `PropertyValueWeights`") : typeof f == "number" ? d = f : Array.isArray(f) && console.warn("The options `.propertyValueWeights` can only be used when `.property` is provided.");
|
|
12479
12473
|
const h = [
|
|
12480
12474
|
{ zoom: 0, value: 50 * 0.025 },
|
|
12481
12475
|
{ zoom: 2, value: 50 * 0.05 },
|
|
@@ -12484,7 +12478,7 @@ function Ku(r, e) {
|
|
|
12484
12478
|
{ zoom: 16, value: 50 }
|
|
12485
12479
|
], y = e.radius ?? (i ? h : 10);
|
|
12486
12480
|
let m = 1;
|
|
12487
|
-
typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m =
|
|
12481
|
+
typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = yo(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = z(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = z(h);
|
|
12488
12482
|
const w = {
|
|
12489
12483
|
heatmapLayerId: n,
|
|
12490
12484
|
heatmapSourceId: t
|
|
@@ -12506,7 +12500,7 @@ function Ku(r, e) {
|
|
|
12506
12500
|
paint: {
|
|
12507
12501
|
"heatmap-weight": d,
|
|
12508
12502
|
"heatmap-intensity": typeof c == "number" ? c : z(c),
|
|
12509
|
-
"heatmap-color":
|
|
12503
|
+
"heatmap-color": mo(l),
|
|
12510
12504
|
"heatmap-radius": m,
|
|
12511
12505
|
"heatmap-opacity": typeof s == "number" ? s : z(s)
|
|
12512
12506
|
}
|
|
@@ -12514,200 +12508,200 @@ function Ku(r, e) {
|
|
|
12514
12508
|
e.beforeId
|
|
12515
12509
|
), w;
|
|
12516
12510
|
}
|
|
12517
|
-
const
|
|
12511
|
+
const kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12518
12512
|
__proto__: null,
|
|
12519
|
-
addHeatmap:
|
|
12520
|
-
addPoint:
|
|
12521
|
-
addPolygon:
|
|
12522
|
-
addPolyline:
|
|
12513
|
+
addHeatmap: Xu,
|
|
12514
|
+
addPoint: Ku,
|
|
12515
|
+
addPolygon: Hu,
|
|
12516
|
+
addPolyline: Gu,
|
|
12523
12517
|
colorDrivenByProperty: $r,
|
|
12524
12518
|
colorPalettes: zr,
|
|
12525
|
-
computeRampedOutlineWidth:
|
|
12519
|
+
computeRampedOutlineWidth: fo,
|
|
12526
12520
|
dashArrayMaker: fn,
|
|
12527
12521
|
generateRandomLayerName: mt,
|
|
12528
12522
|
generateRandomSourceName: yt,
|
|
12529
12523
|
getRandomColor: er,
|
|
12530
|
-
heatmapIntensityFromColorRamp:
|
|
12524
|
+
heatmapIntensityFromColorRamp: mo,
|
|
12531
12525
|
lerpZoomNumberValues: Fr,
|
|
12532
|
-
opacityDrivenByProperty:
|
|
12526
|
+
opacityDrivenByProperty: Nr,
|
|
12533
12527
|
paintColorOptionsToPaintSpec: Ae,
|
|
12534
12528
|
radiusDrivenByProperty: Or,
|
|
12535
|
-
radiusDrivenByPropertyHeatmap:
|
|
12529
|
+
radiusDrivenByPropertyHeatmap: yo,
|
|
12536
12530
|
rampedOptionsToLayerPaintSpec: z,
|
|
12537
|
-
rampedPropertyValueWeight:
|
|
12538
|
-
takeScreenshot:
|
|
12531
|
+
rampedPropertyValueWeight: ho,
|
|
12532
|
+
takeScreenshot: Uu
|
|
12539
12533
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12540
|
-
|
|
12541
|
-
function
|
|
12542
|
-
return "3.
|
|
12543
|
-
}
|
|
12544
|
-
const
|
|
12545
|
-
setRTLTextPlugin:
|
|
12546
|
-
getRTLTextPluginStatus:
|
|
12547
|
-
LngLat:
|
|
12548
|
-
LngLatBounds:
|
|
12549
|
-
MercatorCoordinate:
|
|
12550
|
-
Evented:
|
|
12551
|
-
AJAXError:
|
|
12552
|
-
prewarm:
|
|
12553
|
-
clearPrewarmedResources:
|
|
12554
|
-
Hash:
|
|
12555
|
-
Point:
|
|
12556
|
-
EdgeInsets:
|
|
12557
|
-
DragRotateHandler:
|
|
12558
|
-
DragPanHandler:
|
|
12559
|
-
TwoFingersTouchZoomRotateHandler:
|
|
12560
|
-
DoubleClickZoomHandler:
|
|
12561
|
-
TwoFingersTouchZoomHandler:
|
|
12562
|
-
TwoFingersTouchRotateHandler:
|
|
12563
|
-
getWorkerCount:
|
|
12564
|
-
setWorkerCount:
|
|
12565
|
-
getMaxParallelImageRequests:
|
|
12566
|
-
setMaxParallelImageRequests:
|
|
12567
|
-
getWorkerUrl:
|
|
12568
|
-
setWorkerUrl:
|
|
12569
|
-
addSourceType:
|
|
12570
|
-
importScriptInWorkers:
|
|
12571
|
-
addProtocol:
|
|
12572
|
-
removeProtocol:
|
|
12534
|
+
Go();
|
|
12535
|
+
function Cc() {
|
|
12536
|
+
return "3.5.0-rc1";
|
|
12537
|
+
}
|
|
12538
|
+
const Lc = k.Map, Ac = k.Marker, Ec = k.Popup, Tc = k.Style, _c = k.CanvasSource, Mc = k.GeoJSONSource, Ic = k.ImageSource, Pc = k.RasterTileSource, Rc = k.RasterDEMTileSource, zc = k.VectorTileSource, Fc = k.VideoSource, $c = k.NavigationControl, Oc = k.GeolocateControl, Nc = k.AttributionControl, jc = k.LogoControl, Dc = k.ScaleControl, Uc = k.FullscreenControl, Bc = k.TerrainControl, qc = k.BoxZoomHandler, Gc = k.ScrollZoomHandler, Vc = k.CooperativeGesturesHandler, Hc = k.KeyboardHandler, Kc = k.TwoFingersTouchPitchHandler, Xc = k.MapWheelEvent, Wc = k.MapTouchEvent, Zc = k.MapMouseEvent, Yc = k.config, Jc = k.getVersion, {
|
|
12539
|
+
setRTLTextPlugin: Qc,
|
|
12540
|
+
getRTLTextPluginStatus: ep,
|
|
12541
|
+
LngLat: tp,
|
|
12542
|
+
LngLatBounds: rp,
|
|
12543
|
+
MercatorCoordinate: np,
|
|
12544
|
+
Evented: ap,
|
|
12545
|
+
AJAXError: op,
|
|
12546
|
+
prewarm: ip,
|
|
12547
|
+
clearPrewarmedResources: sp,
|
|
12548
|
+
Hash: lp,
|
|
12549
|
+
Point: up,
|
|
12550
|
+
EdgeInsets: cp,
|
|
12551
|
+
DragRotateHandler: pp,
|
|
12552
|
+
DragPanHandler: fp,
|
|
12553
|
+
TwoFingersTouchZoomRotateHandler: dp,
|
|
12554
|
+
DoubleClickZoomHandler: hp,
|
|
12555
|
+
TwoFingersTouchZoomHandler: yp,
|
|
12556
|
+
TwoFingersTouchRotateHandler: mp,
|
|
12557
|
+
getWorkerCount: gp,
|
|
12558
|
+
setWorkerCount: vp,
|
|
12559
|
+
getMaxParallelImageRequests: bp,
|
|
12560
|
+
setMaxParallelImageRequests: wp,
|
|
12561
|
+
getWorkerUrl: Sp,
|
|
12562
|
+
setWorkerUrl: xp,
|
|
12563
|
+
addSourceType: kp,
|
|
12564
|
+
importScriptInWorkers: Cp,
|
|
12565
|
+
addProtocol: Lp,
|
|
12566
|
+
removeProtocol: Ap
|
|
12573
12567
|
} = k;
|
|
12574
12568
|
export {
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12569
|
+
op as AJAXError,
|
|
12570
|
+
dc as AttributionControl,
|
|
12571
|
+
Nc as AttributionControlMLGL,
|
|
12572
|
+
yc as BoxZoomHandler,
|
|
12573
|
+
qc as BoxZoomHandlerMLGL,
|
|
12574
|
+
ic as CanvasSource,
|
|
12575
|
+
_c as CanvasSourceMLGL,
|
|
12582
12576
|
C as ColorRamp,
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12577
|
+
go as ColorRampCollection,
|
|
12578
|
+
gc as CooperativeGesturesHandler,
|
|
12579
|
+
Vc as CooperativeGesturesHandlerMLGL,
|
|
12580
|
+
Ie as CubemapFaceNames,
|
|
12581
|
+
gu as CubemapImagesPresets,
|
|
12588
12582
|
wr as CubemapLayer,
|
|
12589
12583
|
ge as DOMcreate,
|
|
12590
12584
|
ln as DOMremove,
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12585
|
+
hp as DoubleClickZoomHandler,
|
|
12586
|
+
fp as DragPanHandler,
|
|
12587
|
+
pp as DragRotateHandler,
|
|
12588
|
+
cp as EdgeInsets,
|
|
12589
|
+
ap as Evented,
|
|
12590
|
+
ii as FullscreenControl,
|
|
12591
|
+
Uc as FullscreenControlMLGL,
|
|
12592
|
+
sc as GeoJSONSource,
|
|
12593
|
+
Mc as GeoJSONSourceMLGL,
|
|
12594
|
+
ni as GeolocateControl,
|
|
12595
|
+
Oc as GeolocateControlMLGL,
|
|
12602
12596
|
Iu as GeolocationType,
|
|
12603
|
-
|
|
12604
|
-
|
|
12597
|
+
lp as Hash,
|
|
12598
|
+
lc as ImageSource,
|
|
12605
12599
|
Ic as ImageSourceMLGL,
|
|
12606
|
-
|
|
12607
|
-
|
|
12600
|
+
vc as KeyboardHandler,
|
|
12601
|
+
Hc as KeyboardHandlerMLGL,
|
|
12608
12602
|
R as Language,
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12603
|
+
tp as LngLat,
|
|
12604
|
+
rp as LngLatBounds,
|
|
12605
|
+
ai as LogoControl,
|
|
12612
12606
|
jc as LogoControlMLGL,
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12607
|
+
Pu as Map,
|
|
12608
|
+
Lc as MapMLGL,
|
|
12609
|
+
xc as MapMouseEvent,
|
|
12610
|
+
Zc as MapMouseEventMLGL,
|
|
12611
|
+
_p as MapStyle,
|
|
12612
|
+
Mp as MapStyleVariant,
|
|
12613
|
+
Sc as MapTouchEvent,
|
|
12614
|
+
Wc as MapTouchEventMLGL,
|
|
12615
|
+
wc as MapWheelEvent,
|
|
12616
|
+
Xc as MapWheelEventMLGL,
|
|
12617
|
+
Ll as MaptilerGeolocateControl,
|
|
12624
12618
|
kn as MaptilerLogoControl,
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12619
|
+
kl as MaptilerNavigationControl,
|
|
12620
|
+
Al as MaptilerProjectionControl,
|
|
12621
|
+
xl as MaptilerTerrainControl,
|
|
12622
|
+
rc as Marker,
|
|
12623
|
+
Ac as MarkerMLGL,
|
|
12624
|
+
np as MercatorCoordinate,
|
|
12625
|
+
$c as NavigationControMLGL,
|
|
12626
|
+
ri as NavigationControl,
|
|
12627
|
+
up as Point,
|
|
12628
|
+
ac as Popup,
|
|
12629
|
+
Ec as PopupMLGL,
|
|
12636
12630
|
Sr as RadialGradientLayer,
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12631
|
+
cc as RasterDEMTileSource,
|
|
12632
|
+
Rc as RasterDEMTileSourceMLGL,
|
|
12633
|
+
uc as RasterTileSource,
|
|
12634
|
+
Pc as RasterTileSourceMLGL,
|
|
12641
12635
|
Ip as ReferenceMapStyle,
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12636
|
+
oi as ScaleControl,
|
|
12637
|
+
Dc as ScaleControlMLGL,
|
|
12638
|
+
mc as ScrollZoomHandler,
|
|
12639
|
+
Gc as ScrollZoomHandlerMLGL,
|
|
12640
|
+
Oo as SdkConfig,
|
|
12641
|
+
Pp as ServiceError,
|
|
12642
|
+
oc as Style,
|
|
12643
|
+
Tc as StyleMLGL,
|
|
12644
|
+
Bc as TerrainControMLGL,
|
|
12645
|
+
hc as TerrainControl,
|
|
12646
|
+
bc as TwoFingersTouchPitchHandler,
|
|
12647
|
+
Kc as TwoFingersTouchPitchHandlerMLGL,
|
|
12648
|
+
mp as TwoFingersTouchRotateHandler,
|
|
12649
|
+
yp as TwoFingersTouchZoomHandler,
|
|
12650
|
+
dp as TwoFingersTouchZoomRotateHandler,
|
|
12651
|
+
pc as VectorTileSource,
|
|
12652
|
+
zc as VectorTileSourceMLGL,
|
|
12653
|
+
fc as VideoSource,
|
|
12654
|
+
Fc as VideoSourceMLGL,
|
|
12655
|
+
Lp as addProtocol,
|
|
12656
|
+
kp as addSourceType,
|
|
12657
|
+
Rp as areSameLanguages,
|
|
12658
|
+
zp as bufferToPixelDataBrowser,
|
|
12659
|
+
Fp as circumferenceAtLatitude,
|
|
12660
|
+
sp as clearPrewarmedResources,
|
|
12667
12661
|
D as config,
|
|
12668
|
-
|
|
12669
|
-
|
|
12662
|
+
Yc as configMLGL,
|
|
12663
|
+
$p as coordinates,
|
|
12670
12664
|
Ge as cubemapPresets,
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12665
|
+
Op as data,
|
|
12666
|
+
tc as displayWebGLContextLostWarning,
|
|
12667
|
+
Np as elevation,
|
|
12674
12668
|
jp as expandMapStyle,
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12669
|
+
Dp as geocoding,
|
|
12670
|
+
Up as geolocation,
|
|
12671
|
+
Bp as getAutoLanguage,
|
|
12678
12672
|
gn as getBrowserLanguage,
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12673
|
+
qp as getBufferToPixelDataParser,
|
|
12674
|
+
Gp as getLanguageInfoFromCode,
|
|
12675
|
+
Vp as getLanguageInfoFromFlag,
|
|
12676
|
+
Hp as getLanguageInfoFromKey,
|
|
12677
|
+
Jc as getMapLibreVersion,
|
|
12678
|
+
bp as getMaxParallelImageRequests,
|
|
12679
|
+
ep as getRTLTextPluginStatus,
|
|
12680
|
+
Kp as getTileCache,
|
|
12681
|
+
Cc as getVersion,
|
|
12682
|
+
Ko as getWebGLSupportError,
|
|
12683
|
+
gp as getWorkerCount,
|
|
12684
|
+
Sp as getWorkerUrl,
|
|
12685
|
+
oo as gpx,
|
|
12686
|
+
Du as gpxOrKml,
|
|
12687
|
+
ao as hasChildNodeWithName,
|
|
12688
|
+
kc as helpers,
|
|
12689
|
+
Cp as importScriptInWorkers,
|
|
12690
|
+
Xp as isLanguageInfo,
|
|
12691
|
+
io as kml,
|
|
12692
|
+
Wp as mapStylePresetList,
|
|
12693
|
+
Zp as math,
|
|
12694
|
+
Yp as misc,
|
|
12695
|
+
ip as prewarm,
|
|
12696
|
+
Ap as removeProtocol,
|
|
12697
|
+
wp as setMaxParallelImageRequests,
|
|
12698
|
+
Qc as setRTLTextPlugin,
|
|
12699
|
+
vp as setWorkerCount,
|
|
12700
|
+
xp as setWorkerUrl,
|
|
12701
|
+
Jp as staticMaps,
|
|
12708
12702
|
cn as str2xml,
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12703
|
+
Qp as styleToStyle,
|
|
12704
|
+
ef as toLanguageInfo,
|
|
12705
|
+
la as xml2str
|
|
12712
12706
|
};
|
|
12713
12707
|
//# sourceMappingURL=maptiler-sdk.mjs.map
|