@opengis/partsmap 0.0.62 → 0.0.63
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/PartsMap.js +1072 -1075
- package/dist/PartsMap.umd.cjs +28 -28
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/PartsMap.js
CHANGED
@@ -3,40 +3,40 @@ var js = {};
|
|
3
3
|
function qd(g) {
|
4
4
|
return Math.floor(Math.abs(g) + 0.5) * (g >= 0 ? 1 : -1);
|
5
5
|
}
|
6
|
-
function mc(g, w,
|
7
|
-
g = qd(g *
|
6
|
+
function mc(g, w, C) {
|
7
|
+
g = qd(g * C), w = qd(w * C);
|
8
8
|
var E = (g - w) * 2;
|
9
9
|
E < 0 && (E = -E - 1);
|
10
|
-
for (var
|
11
|
-
|
12
|
-
return
|
10
|
+
for (var N = ""; E >= 32; )
|
11
|
+
N += String.fromCharCode((32 | E & 31) + 63), E /= 32;
|
12
|
+
return N += String.fromCharCode((E | 0) + 63), N;
|
13
13
|
}
|
14
14
|
js.decode = function(g, w) {
|
15
|
-
for (var
|
15
|
+
for (var C = 0, E = 0, N = 0, X = [], T = 0, c = 0, _e = null, ye, ve, ae = Math.pow(10, Number.isInteger(w) ? w : 5); C < g.length; ) {
|
16
16
|
_e = null, T = 1, c = 0;
|
17
17
|
do
|
18
|
-
_e = g.charCodeAt(
|
18
|
+
_e = g.charCodeAt(C++) - 63, c += (_e & 31) * T, T *= 32;
|
19
19
|
while (_e >= 32);
|
20
20
|
ye = c & 1 ? (-c - 1) / 2 : c / 2, T = 1, c = 0;
|
21
21
|
do
|
22
|
-
_e = g.charCodeAt(
|
22
|
+
_e = g.charCodeAt(C++) - 63, c += (_e & 31) * T, T *= 32;
|
23
23
|
while (_e >= 32);
|
24
|
-
ve = c & 1 ? (-c - 1) / 2 : c / 2, E += ye,
|
24
|
+
ve = c & 1 ? (-c - 1) / 2 : c / 2, E += ye, N += ve, X.push([E / ae, N / ae]);
|
25
25
|
}
|
26
26
|
return X;
|
27
27
|
};
|
28
28
|
js.encode = function(g, w) {
|
29
29
|
if (!g.length)
|
30
30
|
return "";
|
31
|
-
for (var
|
32
|
-
var X = g[
|
33
|
-
E += mc(X[0], T[0],
|
31
|
+
for (var C = Math.pow(10, Number.isInteger(w) ? w : 5), E = mc(g[0][0], 0, C) + mc(g[0][1], 0, C), N = 1; N < g.length; N++) {
|
32
|
+
var X = g[N], T = g[N - 1];
|
33
|
+
E += mc(X[0], T[0], C), E += mc(X[1], T[1], C);
|
34
34
|
}
|
35
35
|
return E;
|
36
36
|
};
|
37
37
|
function lp(g) {
|
38
|
-
for (var w = [],
|
39
|
-
var E = g[
|
38
|
+
for (var w = [], C = 0; C < g.length; C++) {
|
39
|
+
var E = g[C].slice();
|
40
40
|
w.push([E[1], E[0]]);
|
41
41
|
}
|
42
42
|
return w;
|
@@ -47,10 +47,10 @@ js.fromGeoJSON = function(g, w) {
|
|
47
47
|
return js.encode(lp(g.coordinates), w);
|
48
48
|
};
|
49
49
|
js.toGeoJSON = function(g, w) {
|
50
|
-
var
|
50
|
+
var C = js.decode(g, w);
|
51
51
|
return {
|
52
52
|
type: "LineString",
|
53
|
-
coordinates: lp(
|
53
|
+
coordinates: lp(C)
|
54
54
|
};
|
55
55
|
};
|
56
56
|
var Um = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
@@ -63,17 +63,17 @@ var cp = { exports: {} };
|
|
63
63
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.5.2/LICENSE.txt
|
64
64
|
*/
|
65
65
|
(function(g, w) {
|
66
|
-
(function(
|
66
|
+
(function(C, E) {
|
67
67
|
g.exports = E();
|
68
68
|
})(Um, function() {
|
69
|
-
var
|
70
|
-
function
|
69
|
+
var C = {}, E = {};
|
70
|
+
function N(T, c, _e) {
|
71
71
|
if (E[T] = _e, T === "index") {
|
72
72
|
var ye = "var sharedModule = {}; (" + E.shared + ")(sharedModule); (" + E.worker + ")(sharedModule);", ve = {};
|
73
|
-
return E.shared(ve), E.index(
|
73
|
+
return E.shared(ve), E.index(C, ve), typeof window < "u" && C.setWorkerUrl(window.URL.createObjectURL(new Blob([ye], { type: "text/javascript" }))), C;
|
74
74
|
}
|
75
75
|
}
|
76
|
-
|
76
|
+
N("shared", ["exports"], function(T) {
|
77
77
|
function c(i, e, r, s) {
|
78
78
|
return new (r || (r = Promise))(function(l, d) {
|
79
79
|
function p(x) {
|
@@ -3641,14 +3641,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
3641
3641
|
function b(i, e = 1) {
|
3642
3642
|
let r = 0, s = 0;
|
3643
3643
|
return { members: i.map((l) => {
|
3644
|
-
const d = m[l.type].BYTES_PER_ELEMENT, p = r =
|
3644
|
+
const d = m[l.type].BYTES_PER_ELEMENT, p = r = P(r, Math.max(e, d)), f = l.components || 1;
|
3645
3645
|
return s = Math.max(s, d), r += d * f, { name: l.name, type: l.type, components: f, offset: p };
|
3646
|
-
}), size:
|
3646
|
+
}), size: P(r, Math.max(s, e)), alignment: e };
|
3647
3647
|
}
|
3648
|
-
function
|
3648
|
+
function P(i, e) {
|
3649
3649
|
return Math.ceil(i / e) * e;
|
3650
3650
|
}
|
3651
|
-
class
|
3651
|
+
class A extends v {
|
3652
3652
|
_refreshViews() {
|
3653
3653
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
3654
3654
|
}
|
@@ -3661,7 +3661,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
3661
3661
|
return this.int16[l + 0] = r, this.int16[l + 1] = s, e;
|
3662
3662
|
}
|
3663
3663
|
}
|
3664
|
-
|
3664
|
+
A.prototype.bytesPerElement = 4, Be("StructArrayLayout2i4", A);
|
3665
3665
|
class L extends v {
|
3666
3666
|
_refreshViews() {
|
3667
3667
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
@@ -3690,7 +3690,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
3690
3690
|
}
|
3691
3691
|
}
|
3692
3692
|
B.prototype.bytesPerElement = 8, Be("StructArrayLayout4i8", B);
|
3693
|
-
class
|
3693
|
+
class V extends v {
|
3694
3694
|
_refreshViews() {
|
3695
3695
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
3696
3696
|
}
|
@@ -3703,7 +3703,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
3703
3703
|
return this.int16[_ + 0] = r, this.int16[_ + 1] = s, this.int16[_ + 2] = l, this.int16[_ + 3] = d, this.int16[_ + 4] = p, this.int16[_ + 5] = f, e;
|
3704
3704
|
}
|
3705
3705
|
}
|
3706
|
-
|
3706
|
+
V.prototype.bytesPerElement = 12, Be("StructArrayLayout2i4i12", V);
|
3707
3707
|
class Z extends v {
|
3708
3708
|
_refreshViews() {
|
3709
3709
|
this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
|
@@ -4225,13 +4225,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
4225
4225
|
}
|
4226
4226
|
}
|
4227
4227
|
Be("FeatureIndexArray", sr);
|
4228
|
-
class In extends
|
4228
|
+
class In extends A {
|
4229
4229
|
}
|
4230
|
-
class So extends
|
4230
|
+
class So extends A {
|
4231
4231
|
}
|
4232
|
-
class Hn extends
|
4232
|
+
class Hn extends A {
|
4233
4233
|
}
|
4234
|
-
class Pn extends
|
4234
|
+
class Pn extends V {
|
4235
4235
|
}
|
4236
4236
|
class To extends Z {
|
4237
4237
|
}
|
@@ -8215,7 +8215,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8215
8215
|
}, T.o = Za, T.p = Ju, T.q = o, T.r = Zc, T.s = pn, T.t = Ma, T.u = Me, T.v = he, T.w = hi, T.x = Rr, T.y = function([i, e, r]) {
|
8216
8216
|
return e += 90, e *= Math.PI / 180, r *= Math.PI / 180, { x: i * Math.cos(e) * Math.sin(r), y: i * Math.sin(e) * Math.sin(r), z: i * Math.cos(r) };
|
8217
8217
|
}, T.z = $i;
|
8218
|
-
}),
|
8218
|
+
}), N("worker", ["./shared"], function(T) {
|
8219
8219
|
class c {
|
8220
8220
|
constructor(z) {
|
8221
8221
|
this.keyCache = {}, z && this.replace(z);
|
@@ -9264,7 +9264,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9264
9264
|
}
|
9265
9265
|
}
|
9266
9266
|
return T.i(self) && (self.worker = new yr(self)), yr;
|
9267
|
-
}),
|
9267
|
+
}), N("index", ["exports", "./shared"], function(T, c) {
|
9268
9268
|
var _e = "4.5.2";
|
9269
9269
|
let ye, ve;
|
9270
9270
|
const ae = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (u) => new Promise((t, n) => {
|
@@ -9370,23 +9370,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9370
9370
|
return a[b] = v, b;
|
9371
9371
|
}, u.removeThrottleControl = (v) => {
|
9372
9372
|
delete a[v], m();
|
9373
|
-
}, u.getImage = (v, b,
|
9374
|
-
dt.supported && (v.headers || (v.headers = {}), v.headers.accept = "image/webp,*/*"), c.e(v, { type: "image" }), t.push({ abortController: b, requestParameters: v, supportImageRefresh:
|
9373
|
+
}, u.getImage = (v, b, P = !0) => new Promise((A, L) => {
|
9374
|
+
dt.supported && (v.headers || (v.headers = {}), v.headers.accept = "image/webp,*/*"), c.e(v, { type: "image" }), t.push({ abortController: b, requestParameters: v, supportImageRefresh: P, state: "queued", onError: (B) => {
|
9375
9375
|
L(B);
|
9376
9376
|
}, onSuccess: (B) => {
|
9377
|
-
|
9377
|
+
A(B);
|
9378
9378
|
} }), m();
|
9379
9379
|
});
|
9380
9380
|
const h = (v) => c._(this, void 0, void 0, function* () {
|
9381
9381
|
v.state = "running";
|
9382
|
-
const { requestParameters: b, supportImageRefresh:
|
9382
|
+
const { requestParameters: b, supportImageRefresh: P, onError: A, onSuccess: L, abortController: B } = v, V = P === !1 && !c.i(self) && !c.g(b.url) && (!b.headers || Object.keys(b.headers).reduce((H, K) => H && K === "accept", !0));
|
9383
9383
|
n++;
|
9384
|
-
const Z =
|
9384
|
+
const Z = V ? y(b, B) : c.m(b, B);
|
9385
9385
|
try {
|
9386
9386
|
const H = yield Z;
|
9387
9387
|
delete v.abortController, v.state = "completed", H.data instanceof HTMLImageElement || c.b(H.data) ? L(H) : H.data && L({ data: yield (j = H.data, typeof createImageBitmap == "function" ? c.d(j) : c.f(j)), cacheControl: H.cacheControl, expires: H.expires });
|
9388
9388
|
} catch (H) {
|
9389
|
-
delete v.abortController,
|
9389
|
+
delete v.abortController, A(H);
|
9390
9390
|
} finally {
|
9391
9391
|
n--, m();
|
9392
9392
|
}
|
@@ -9397,17 +9397,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9397
9397
|
return !1;
|
9398
9398
|
})() ? c.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : c.a.MAX_PARALLEL_IMAGE_REQUESTS;
|
9399
9399
|
for (let b = n; b < v && t.length > 0; b++) {
|
9400
|
-
const
|
9401
|
-
|
9400
|
+
const P = t.shift();
|
9401
|
+
P.abortController.signal.aborted ? b-- : h(P);
|
9402
9402
|
}
|
9403
|
-
}, y = (v, b) => new Promise((
|
9404
|
-
const L = new Image(), B = v.url,
|
9405
|
-
|
9406
|
-
L.src = "",
|
9403
|
+
}, y = (v, b) => new Promise((P, A) => {
|
9404
|
+
const L = new Image(), B = v.url, V = v.credentials;
|
9405
|
+
V && V === "include" ? L.crossOrigin = "use-credentials" : (V && V === "same-origin" || !c.s(B)) && (L.crossOrigin = "anonymous"), b.signal.addEventListener("abort", () => {
|
9406
|
+
L.src = "", A(c.c());
|
9407
9407
|
}), L.fetchPriority = "high", L.onload = () => {
|
9408
|
-
L.onerror = L.onload = null,
|
9408
|
+
L.onerror = L.onload = null, P({ data: L });
|
9409
9409
|
}, L.onerror = () => {
|
9410
|
-
L.onerror = L.onload = null, b.signal.aborted ||
|
9410
|
+
L.onerror = L.onload = null, b.signal.aborted || A(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
|
9411
9411
|
}, L.src = B;
|
9412
9412
|
});
|
9413
9413
|
}(Ge || (Ge = {})), Ge.resetRequestQueue();
|
@@ -9462,8 +9462,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9462
9462
|
const { width: a, height: h } = t, m = !(this.size && this.size[0] === a && this.size[1] === h || o), { context: y } = this, { gl: v } = y;
|
9463
9463
|
if (this.useMipmap = !!(n && n.useMipmap), v.bindTexture(v.TEXTURE_2D, this.texture), y.pixelStoreUnpackFlipY.set(!1), y.pixelStoreUnpack.set(1), y.pixelStoreUnpackPremultiplyAlpha.set(this.format === v.RGBA && (!n || n.premultiply !== !1)), m) this.size = [a, h], t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || c.b(t) ? v.texImage2D(v.TEXTURE_2D, 0, this.format, this.format, v.UNSIGNED_BYTE, t) : v.texImage2D(v.TEXTURE_2D, 0, this.format, a, h, 0, this.format, v.UNSIGNED_BYTE, t.data);
|
9464
9464
|
else {
|
9465
|
-
const { x: b, y:
|
9466
|
-
t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || c.b(t) ? v.texSubImage2D(v.TEXTURE_2D, 0, b,
|
9465
|
+
const { x: b, y: P } = o || { x: 0, y: 0 };
|
9466
|
+
t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || c.b(t) ? v.texSubImage2D(v.TEXTURE_2D, 0, b, P, v.RGBA, v.UNSIGNED_BYTE, t) : v.texSubImage2D(v.TEXTURE_2D, 0, b, P, a, h, v.RGBA, v.UNSIGNED_BYTE, t.data);
|
9467
9467
|
}
|
9468
9468
|
this.useMipmap && this.isSizePowerOfTwo() && v.generateMipmap(v.TEXTURE_2D);
|
9469
9469
|
}
|
@@ -9580,8 +9580,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9580
9580
|
const { w: n, h: o } = c.p(t), a = this.atlasImage;
|
9581
9581
|
a.resize({ width: n || 1, height: o || 1 });
|
9582
9582
|
for (const h in this.patterns) {
|
9583
|
-
const { bin: m } = this.patterns[h], y = m.x + 1, v = m.y + 1, b = this.getImage(h).data,
|
9584
|
-
c.R.copy(b, a, { x: 0, y: 0 }, { x: y, y: v }, { width:
|
9583
|
+
const { bin: m } = this.patterns[h], y = m.x + 1, v = m.y + 1, b = this.getImage(h).data, P = b.width, A = b.height;
|
9584
|
+
c.R.copy(b, a, { x: 0, y: 0 }, { x: y, y: v }, { width: P, height: A }), c.R.copy(b, a, { x: 0, y: A - 1 }, { x: y, y: v - 1 }, { width: P, height: 1 }), c.R.copy(b, a, { x: 0, y: 0 }, { x: y, y: v + A }, { width: P, height: 1 }), c.R.copy(b, a, { x: P - 1, y: 0 }, { x: y - 1, y: v }, { width: 1, height: A }), c.R.copy(b, a, { x: 0, y: 0 }, { x: y + P, y: v }, { width: 1, height: A });
|
9585
9585
|
}
|
9586
9586
|
this.dirty = !0;
|
9587
9587
|
}
|
@@ -9606,17 +9606,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9606
9606
|
h[0] = 0, m[0] = -Ti, m[1] = Ti, a[0] = u[t];
|
9607
9607
|
for (let y = 1, v = 0, b = 0; y < o; y++) {
|
9608
9608
|
a[y] = u[t + y * n];
|
9609
|
-
const
|
9609
|
+
const P = y * y;
|
9610
9610
|
do {
|
9611
|
-
const
|
9612
|
-
b = (a[y] - a[
|
9611
|
+
const A = h[v];
|
9612
|
+
b = (a[y] - a[A] + P - A * A) / (y - A) / 2;
|
9613
9613
|
} while (b <= m[v] && --v > -1);
|
9614
9614
|
v++, h[v] = y, m[v] = b, m[v + 1] = Ti;
|
9615
9615
|
}
|
9616
9616
|
for (let y = 0, v = 0; y < o; y++) {
|
9617
9617
|
for (; m[v + 1] < y; ) v++;
|
9618
|
-
const b = h[v],
|
9619
|
-
u[t + y * n] = a[b] +
|
9618
|
+
const b = h[v], P = y - b;
|
9619
|
+
u[t + y * n] = a[b] + P * P;
|
9620
9620
|
}
|
9621
9621
|
}
|
9622
9622
|
class pr {
|
@@ -9689,12 +9689,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9689
9689
|
return t.width = t.height = u, t;
|
9690
9690
|
}
|
9691
9691
|
draw(u) {
|
9692
|
-
const { width: t, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o, actualBoundingBoxLeft: a, actualBoundingBoxRight: h } = this.ctx.measureText(u), m = Math.ceil(n), y = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(h - a))), v = Math.min(this.size - this.buffer, m + Math.ceil(o)), b = y + 2 * this.buffer,
|
9692
|
+
const { width: t, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o, actualBoundingBoxLeft: a, actualBoundingBoxRight: h } = this.ctx.measureText(u), m = Math.ceil(n), y = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(h - a))), v = Math.min(this.size - this.buffer, m + Math.ceil(o)), b = y + 2 * this.buffer, P = v + 2 * this.buffer, A = Math.max(b * P, 0), L = new Uint8ClampedArray(A), B = { data: L, width: b, height: P, glyphWidth: y, glyphHeight: v, glyphTop: m, glyphLeft: 0, glyphAdvance: t };
|
9693
9693
|
if (y === 0 || v === 0) return B;
|
9694
|
-
const { ctx:
|
9695
|
-
|
9696
|
-
const K =
|
9697
|
-
H.fill(Ti, 0,
|
9694
|
+
const { ctx: V, buffer: Z, gridInner: j, gridOuter: H } = this;
|
9695
|
+
V.clearRect(Z, Z, y, v), V.fillText(u, Z, Z + m);
|
9696
|
+
const K = V.getImageData(Z, Z, y, v);
|
9697
|
+
H.fill(Ti, 0, A), j.fill(0, 0, A);
|
9698
9698
|
for (let U = 0; U < v; U++) for (let ee = 0; ee < y; ee++) {
|
9699
9699
|
const ne = K.data[4 * (U * y + ee) + 3] / 255;
|
9700
9700
|
if (ne === 0) continue;
|
@@ -9705,8 +9705,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9705
9705
|
H[le] = me > 0 ? me * me : 0, j[le] = me < 0 ? me * me : 0;
|
9706
9706
|
}
|
9707
9707
|
}
|
9708
|
-
Ar(H, 0, 0, b,
|
9709
|
-
for (let U = 0; U <
|
9708
|
+
Ar(H, 0, 0, b, P, b, this.f, this.v, this.z), Ar(j, Z, Z, y, v, b, this.f, this.v, this.z);
|
9709
|
+
for (let U = 0; U < A; U++) {
|
9710
9710
|
const ee = Math.sqrt(H[U]) - Math.sqrt(j[U]);
|
9711
9711
|
L[U] = Math.round(255 - 255 * (ee / this.radius + this.cutoff));
|
9712
9712
|
}
|
@@ -9796,8 +9796,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9796
9796
|
let v = t[0];
|
9797
9797
|
for (let b = 1; b < t.length; b++) {
|
9798
9798
|
y = !y;
|
9799
|
-
const
|
9800
|
-
h = v * o, v +=
|
9799
|
+
const P = t[b];
|
9800
|
+
h = v * o, v += P, m = v * o, a.push({ left: h, right: m, isDash: y, zeroLength: P === 0 });
|
9801
9801
|
}
|
9802
9802
|
return a;
|
9803
9803
|
}
|
@@ -9808,13 +9808,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9808
9808
|
let y = 0, v = t[y];
|
9809
9809
|
for (let b = 0; b < this.width; b++) {
|
9810
9810
|
b / v.right > 1 && (v = t[++y]);
|
9811
|
-
const
|
9811
|
+
const P = Math.abs(b - v.left), A = Math.abs(b - v.right), L = Math.min(P, A);
|
9812
9812
|
let B;
|
9813
|
-
const
|
9813
|
+
const V = h / o * (a + 1);
|
9814
9814
|
if (v.isDash) {
|
9815
|
-
const Z = a - Math.abs(
|
9815
|
+
const Z = a - Math.abs(V);
|
9816
9816
|
B = Math.sqrt(L * L + Z * Z);
|
9817
|
-
} else B = a - Math.sqrt(L * L +
|
9817
|
+
} else B = a - Math.sqrt(L * L + V * V);
|
9818
9818
|
this.data[m + b] = Math.max(0, Math.min(255, B + 128));
|
9819
9819
|
}
|
9820
9820
|
}
|
@@ -9830,8 +9830,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9830
9830
|
let h = 0, m = t[h];
|
9831
9831
|
for (let y = 0; y < this.width; y++) {
|
9832
9832
|
y / m.right > 1 && (m = t[++h]);
|
9833
|
-
const v = Math.abs(y - m.left), b = Math.abs(y - m.right),
|
9834
|
-
this.data[a + y] = Math.max(0, Math.min(255, (m.isDash ?
|
9833
|
+
const v = Math.abs(y - m.left), b = Math.abs(y - m.right), P = Math.min(v, b);
|
9834
|
+
this.data[a + y] = Math.max(0, Math.min(255, (m.isDash ? P : -P) + 128));
|
9835
9835
|
}
|
9836
9836
|
}
|
9837
9837
|
addDash(t, n) {
|
@@ -9913,24 +9913,24 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9913
9913
|
return c.J(n, n, [1, 1, 0]), c.K(n, n, [0.5 * u.width, 0.5 * u.height, 1]), c.L(n, n, u.calculatePosMatrix(t.toUnwrapped()));
|
9914
9914
|
}
|
9915
9915
|
function qr(u, t, n, o, a, h) {
|
9916
|
-
const m = function(
|
9917
|
-
if (
|
9918
|
-
const Z = L[
|
9916
|
+
const m = function(A, L, B) {
|
9917
|
+
if (A) for (const V of A) {
|
9918
|
+
const Z = L[V];
|
9919
9919
|
if (Z && Z.source === B && Z.type === "fill-extrusion") return !0;
|
9920
9920
|
}
|
9921
|
-
else for (const
|
9922
|
-
const Z = L[
|
9921
|
+
else for (const V in L) {
|
9922
|
+
const Z = L[V];
|
9923
9923
|
if (Z.source === B && Z.type === "fill-extrusion") return !0;
|
9924
9924
|
}
|
9925
9925
|
return !1;
|
9926
9926
|
}(a && a.layers, t, u.id), y = h.maxPitchScaleFactor(), v = u.tilesIn(o, y, m);
|
9927
9927
|
v.sort(Zr);
|
9928
9928
|
const b = [];
|
9929
|
-
for (const
|
9930
|
-
const
|
9929
|
+
for (const A of v) b.push({ wrappedTileID: A.tileID.wrapped().key, queryResults: A.tile.queryRenderedFeatures(t, n, u._state, A.queryGeometry, A.cameraQueryGeometry, A.scale, a, h, y, kr(u.transform, A.tileID)) });
|
9930
|
+
const P = function(A) {
|
9931
9931
|
const L = {}, B = {};
|
9932
|
-
for (const
|
9933
|
-
const Z =
|
9932
|
+
for (const V of A) {
|
9933
|
+
const Z = V.queryResults, j = V.wrappedTileID, H = B[j] = B[j] || {};
|
9934
9934
|
for (const K in Z) {
|
9935
9935
|
const U = Z[K], ee = H[K] = H[K] || {}, ne = L[K] = L[K] || [];
|
9936
9936
|
for (const le of U) ee[le.featureIndex] || (ee[le.featureIndex] = !0, ne.push(le));
|
@@ -9938,11 +9938,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9938
9938
|
}
|
9939
9939
|
return L;
|
9940
9940
|
}(b);
|
9941
|
-
for (const
|
9942
|
-
const B = L.feature,
|
9943
|
-
B.source = B.layer.source, B.layer["source-layer"] && (B.sourceLayer = B.layer["source-layer"]), B.state =
|
9941
|
+
for (const A in P) P[A].forEach((L) => {
|
9942
|
+
const B = L.feature, V = u.getFeatureState(B.layer["source-layer"], B.id);
|
9943
|
+
B.source = B.layer.source, B.layer["source-layer"] && (B.sourceLayer = B.layer["source-layer"]), B.state = V;
|
9944
9944
|
});
|
9945
|
-
return
|
9945
|
+
return P;
|
9946
9946
|
}
|
9947
9947
|
function Zr(u, t) {
|
9948
9948
|
const n = u.tileID, o = t.tileID;
|
@@ -10374,8 +10374,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10374
10374
|
this.tileID = function(a) {
|
10375
10375
|
let h = 1 / 0, m = 1 / 0, y = -1 / 0, v = -1 / 0;
|
10376
10376
|
for (const L of a) h = Math.min(h, L.x), m = Math.min(m, L.y), y = Math.max(y, L.x), v = Math.max(v, L.y);
|
10377
|
-
const b = Math.max(y - h, v - m),
|
10378
|
-
return new c.a1(
|
10377
|
+
const b = Math.max(y - h, v - m), P = Math.max(0, Math.floor(-Math.log(b) / Math.LN2)), A = Math.pow(2, P);
|
10378
|
+
return new c.a1(P, Math.floor((h + y) / 2 * A), Math.floor((m + v) / 2 * A));
|
10379
10379
|
}(n), this.minzoom = this.maxzoom = this.tileID.z;
|
10380
10380
|
const o = n.map((a) => this.tileID.getTilePoint(a)._round());
|
10381
10381
|
return this._boundsArray = new c.$(), this._boundsArray.emplaceBack(o[0].x, o[0].y, 0, 0), this._boundsArray.emplaceBack(o[1].x, o[1].y, c.X, 0), this._boundsArray.emplaceBack(o[3].x, o[3].y, 0, c.X), this._boundsArray.emplaceBack(o[2].x, o[2].y, c.X, c.X), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new c.k("data", { dataType: "source", sourceDataType: "content" })), this;
|
@@ -10584,7 +10584,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10584
10584
|
for (const y of a) {
|
10585
10585
|
const v = y.layerIds.map((b) => h.getLayer(b)).filter(Boolean);
|
10586
10586
|
if (v.length !== 0) {
|
10587
|
-
y.layers = v, y.stateDependentLayerIds && (y.stateDependentLayers = y.stateDependentLayerIds.map((b) => v.filter((
|
10587
|
+
y.layers = v, y.stateDependentLayerIds && (y.stateDependentLayers = y.stateDependentLayerIds.map((b) => v.filter((P) => P.id === b)[0]));
|
10588
10588
|
for (const b of v) m[b.id] = y;
|
10589
10589
|
}
|
10590
10590
|
}
|
@@ -10630,23 +10630,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
10630
10630
|
prepare(t) {
|
10631
10631
|
this.imageAtlas && this.imageAtlas.patchUpdatedImages(t, this.imageAtlasTexture);
|
10632
10632
|
}
|
10633
|
-
queryRenderedFeatures(t, n, o, a, h, m, y, v, b,
|
10634
|
-
return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: a, cameraQueryGeometry: h, scale: m, tileSize: this.tileSize, pixelPosMatrix:
|
10633
|
+
queryRenderedFeatures(t, n, o, a, h, m, y, v, b, P) {
|
10634
|
+
return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: a, cameraQueryGeometry: h, scale: m, tileSize: this.tileSize, pixelPosMatrix: P, transform: v, params: y, queryPadding: this.queryPadding * b }, t, n, o) : {};
|
10635
10635
|
}
|
10636
10636
|
querySourceFeatures(t, n) {
|
10637
10637
|
const o = this.latestFeatureIndex;
|
10638
10638
|
if (!o || !o.rawTileData) return;
|
10639
10639
|
const a = o.loadVTLayers(), h = n && n.sourceLayer ? n.sourceLayer : "", m = a._geojsonTileLayer || a[h];
|
10640
10640
|
if (!m) return;
|
10641
|
-
const y = c.a7(n && n.filter), { z: v, x: b, y:
|
10641
|
+
const y = c.a7(n && n.filter), { z: v, x: b, y: P } = this.tileID.canonical, A = { z: v, x: b, y: P };
|
10642
10642
|
for (let L = 0; L < m.length; L++) {
|
10643
10643
|
const B = m.feature(L);
|
10644
10644
|
if (y.needGeometry) {
|
10645
10645
|
const j = c.a8(B, !0);
|
10646
10646
|
if (!y.filter(new c.a9(this.tileID.overscaledZ), j, this.tileID.canonical)) continue;
|
10647
10647
|
} else if (!y.filter(new c.a9(this.tileID.overscaledZ), B)) continue;
|
10648
|
-
const
|
10649
|
-
Z.tile =
|
10648
|
+
const V = o.getId(B, h), Z = new c.aa(B, v, b, P, V);
|
10649
|
+
Z.tile = A, t.push(Z);
|
10650
10650
|
}
|
10651
10651
|
}
|
10652
10652
|
hasData() {
|
@@ -11000,56 +11000,56 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11000
11000
|
}
|
11001
11001
|
}
|
11002
11002
|
_updateCoveredAndRetainedTiles(t, n, o, a, h, m) {
|
11003
|
-
const y = {}, v = {}, b = Object.keys(t),
|
11004
|
-
for (const
|
11005
|
-
const L = t[
|
11006
|
-
if (!B || B.fadeEndTime !== 0 && B.fadeEndTime <=
|
11007
|
-
const
|
11008
|
-
j && (this._addTile(j.tileID), y[j.tileID.key] = j.tileID), v[
|
11003
|
+
const y = {}, v = {}, b = Object.keys(t), P = ae.now();
|
11004
|
+
for (const A of b) {
|
11005
|
+
const L = t[A], B = this._tiles[A];
|
11006
|
+
if (!B || B.fadeEndTime !== 0 && B.fadeEndTime <= P) continue;
|
11007
|
+
const V = this.findLoadedParent(L, n), Z = this.findLoadedSibling(L), j = V || Z || null;
|
11008
|
+
j && (this._addTile(j.tileID), y[j.tileID.key] = j.tileID), v[A] = L;
|
11009
11009
|
}
|
11010
11010
|
this._retainLoadedChildren(v, a, o, t);
|
11011
|
-
for (const
|
11011
|
+
for (const A in y) t[A] || (this._coveredTiles[A] = !0, t[A] = y[A]);
|
11012
11012
|
if (m) {
|
11013
|
-
const
|
11014
|
-
for (const B of h) this._tiles[B.key].hasData() ?
|
11013
|
+
const A = {}, L = {};
|
11014
|
+
for (const B of h) this._tiles[B.key].hasData() ? A[B.key] = B : L[B.key] = B;
|
11015
11015
|
for (const B in L) {
|
11016
|
-
const
|
11017
|
-
this._tiles[
|
11016
|
+
const V = L[B].children(this._source.maxzoom);
|
11017
|
+
this._tiles[V[0].key] && this._tiles[V[1].key] && this._tiles[V[2].key] && this._tiles[V[3].key] && (A[V[0].key] = t[V[0].key] = V[0], A[V[1].key] = t[V[1].key] = V[1], A[V[2].key] = t[V[2].key] = V[2], A[V[3].key] = t[V[3].key] = V[3], delete L[B]);
|
11018
11018
|
}
|
11019
11019
|
for (const B in L) {
|
11020
|
-
const
|
11020
|
+
const V = L[B], Z = this.findLoadedParent(V, this._source.minzoom), j = this.findLoadedSibling(V), H = Z || j || null;
|
11021
11021
|
if (H) {
|
11022
|
-
|
11023
|
-
for (const K in
|
11022
|
+
A[H.tileID.key] = t[H.tileID.key] = H.tileID;
|
11023
|
+
for (const K in A) A[K].isChildOf(H.tileID) && delete A[K];
|
11024
11024
|
}
|
11025
11025
|
}
|
11026
|
-
for (const B in this._tiles)
|
11026
|
+
for (const B in this._tiles) A[B] || (this._coveredTiles[B] = !0);
|
11027
11027
|
}
|
11028
11028
|
}
|
11029
11029
|
update(t, n) {
|
11030
11030
|
if (!this._sourceLoaded || this._paused) return;
|
11031
11031
|
let o;
|
11032
|
-
this.transform = t, this.terrain = n, this.updateCacheSize(t), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? o = t.getVisibleUnwrappedCoordinates(this._source.tileID).map((
|
11032
|
+
this.transform = t, this.terrain = n, this.updateCacheSize(t), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? o = t.getVisibleUnwrappedCoordinates(this._source.tileID).map((P) => new c.S(P.canonical.z, P.wrap, P.canonical.z, P.canonical.x, P.canonical.y)) : (o = t.coveringTiles({ tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: n }), this._source.hasTile && (o = o.filter((P) => this._source.hasTile(P)))) : o = [];
|
11033
11033
|
const a = t.coveringZoomLevel(this._source), h = Math.max(a - Je.maxOverzooming, this._source.minzoom), m = Math.max(a + Je.maxUnderzooming, this._source.minzoom);
|
11034
11034
|
if (this.usedForTerrain) {
|
11035
|
-
const
|
11036
|
-
for (const
|
11037
|
-
const L =
|
11038
|
-
|
11039
|
-
const B =
|
11040
|
-
|
11035
|
+
const P = {};
|
11036
|
+
for (const A of o) if (A.canonical.z > this._source.minzoom) {
|
11037
|
+
const L = A.scaledTo(A.canonical.z - 1);
|
11038
|
+
P[L.key] = L;
|
11039
|
+
const B = A.scaledTo(Math.max(this._source.minzoom, Math.min(A.canonical.z, 5)));
|
11040
|
+
P[B.key] = B;
|
11041
11041
|
}
|
11042
|
-
o = o.concat(Object.values(
|
11042
|
+
o = o.concat(Object.values(P));
|
11043
11043
|
}
|
11044
11044
|
const y = o.length === 0 && !this._updated && this._didEmitContent;
|
11045
11045
|
this._updated = !0, y && this.fire(new c.k("data", { sourceDataType: "idle", dataType: "source", sourceId: this.id }));
|
11046
11046
|
const v = this._updateRetainedTiles(o, a);
|
11047
11047
|
tr(this._source.type) && this._updateCoveredAndRetainedTiles(v, h, m, a, o, n);
|
11048
|
-
for (const
|
11048
|
+
for (const P in v) this._tiles[P].clearFadeHold();
|
11049
11049
|
const b = c.ac(this._tiles, v);
|
11050
|
-
for (const
|
11051
|
-
const
|
11052
|
-
|
11050
|
+
for (const P of b) {
|
11051
|
+
const A = this._tiles[P];
|
11052
|
+
A.hasSymbolBuckets && !A.holdingForFade() ? A.setHoldDuration(this.map._fadeDuration) : A.hasSymbolBuckets && !A.symbolFadeFinished() || this._removeTile(P);
|
11053
11053
|
}
|
11054
11054
|
this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache();
|
11055
11055
|
}
|
@@ -11060,13 +11060,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11060
11060
|
var o;
|
11061
11061
|
const a = {}, h = {}, m = Math.max(n - Je.maxOverzooming, this._source.minzoom), y = Math.max(n + Je.maxUnderzooming, this._source.minzoom), v = {};
|
11062
11062
|
for (const b of t) {
|
11063
|
-
const
|
11064
|
-
a[b.key] = b,
|
11063
|
+
const P = this._addTile(b);
|
11064
|
+
a[b.key] = b, P.hasData() || n < this._source.maxzoom && (v[b.key] = b);
|
11065
11065
|
}
|
11066
11066
|
this._retainLoadedChildren(v, n, y, a);
|
11067
11067
|
for (const b of t) {
|
11068
|
-
let
|
11069
|
-
if (
|
11068
|
+
let P = this._tiles[b.key];
|
11069
|
+
if (P.hasData()) continue;
|
11070
11070
|
if (n + 1 > this._source.maxzoom) {
|
11071
11071
|
const L = b.children(this._source.maxzoom)[0], B = this.getTile(L);
|
11072
11072
|
if (B && B.hasData()) {
|
@@ -11077,13 +11077,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11077
11077
|
const L = b.children(this._source.maxzoom);
|
11078
11078
|
if (a[L[0].key] && a[L[1].key] && a[L[2].key] && a[L[3].key]) continue;
|
11079
11079
|
}
|
11080
|
-
let
|
11080
|
+
let A = P.wasRequested();
|
11081
11081
|
for (let L = b.overscaledZ - 1; L >= m; --L) {
|
11082
11082
|
const B = b.scaledTo(L);
|
11083
11083
|
if (h[B.key]) break;
|
11084
|
-
if (h[B.key] = !0,
|
11085
|
-
const
|
11086
|
-
if ((
|
11084
|
+
if (h[B.key] = !0, P = this.getTile(B), !P && A && (P = this._addTile(B)), P) {
|
11085
|
+
const V = P.hasData();
|
11086
|
+
if ((V || !(!((o = this.map) === null || o === void 0) && o.cancelPendingTileRequestsWhileZooming) || A) && (a[B.key] = B), A = P.wasRequested(), V) break;
|
11087
11087
|
}
|
11088
11088
|
}
|
11089
11089
|
}
|
@@ -11144,13 +11144,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11144
11144
|
tilesIn(t, n, o) {
|
11145
11145
|
const a = [], h = this.transform;
|
11146
11146
|
if (!h) return a;
|
11147
|
-
const m = o ? h.getCameraQueryGeometry(t) : t, y = t.map((
|
11148
|
-
let
|
11149
|
-
for (const
|
11150
|
-
for (let
|
11151
|
-
const Z = this._tiles[b[
|
11147
|
+
const m = o ? h.getCameraQueryGeometry(t) : t, y = t.map((V) => h.pointCoordinate(V, this.terrain)), v = m.map((V) => h.pointCoordinate(V, this.terrain)), b = this.getIds();
|
11148
|
+
let P = 1 / 0, A = 1 / 0, L = -1 / 0, B = -1 / 0;
|
11149
|
+
for (const V of v) P = Math.min(P, V.x), A = Math.min(A, V.y), L = Math.max(L, V.x), B = Math.max(B, V.y);
|
11150
|
+
for (let V = 0; V < b.length; V++) {
|
11151
|
+
const Z = this._tiles[b[V]];
|
11152
11152
|
if (Z.holdingForFade()) continue;
|
11153
|
-
const j = Z.tileID, H = Math.pow(2, h.zoom - Z.tileID.overscaledZ), K = n * Z.queryPadding * c.X / Z.tileSize / H, U = [j.getTilePoint(new c.Z(
|
11153
|
+
const j = Z.tileID, H = Math.pow(2, h.zoom - Z.tileID.overscaledZ), K = n * Z.queryPadding * c.X / Z.tileSize / H, U = [j.getTilePoint(new c.Z(P, A)), j.getTilePoint(new c.Z(L, B))];
|
11154
11154
|
if (U[0].x - K < c.X && U[0].y - K < c.X && U[1].x + K >= 0 && U[1].y + K >= 0) {
|
11155
11155
|
const ee = y.map((le) => j.getTilePoint(le)), ne = v.map((le) => j.getTilePoint(le));
|
11156
11156
|
a.push({ tile: Z, tileID: j, queryGeometry: ee, cameraQueryGeometry: ne, scale: H });
|
@@ -11249,8 +11249,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11249
11249
|
if (h) return [{ key: null, x1: t, y1: n, x2: o, y2: a }];
|
11250
11250
|
for (let b = 0; b < this.boxKeys.length; b++) v.push({ key: this.boxKeys[b], x1: this.bboxes[4 * b], y1: this.bboxes[4 * b + 1], x2: this.bboxes[4 * b + 2], y2: this.bboxes[4 * b + 3] });
|
11251
11251
|
for (let b = 0; b < this.circleKeys.length; b++) {
|
11252
|
-
const
|
11253
|
-
v.push({ key: this.circleKeys[b], x1:
|
11252
|
+
const P = this.circles[3 * b], A = this.circles[3 * b + 1], L = this.circles[3 * b + 2];
|
11253
|
+
v.push({ key: this.circleKeys[b], x1: P - L, y1: A - L, x2: P + L, y2: A + L });
|
11254
11254
|
}
|
11255
11255
|
} else this._forEachCell(t, n, o, a, this._queryCell, v, { hitTest: h, overlapMode: m, seenUids: { box: {}, circle: {} } }, y);
|
11256
11256
|
return v;
|
@@ -11264,56 +11264,56 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11264
11264
|
hitTestCircle(t, n, o, a, h) {
|
11265
11265
|
const m = t - o, y = t + o, v = n - o, b = n + o;
|
11266
11266
|
if (y < 0 || m > this.width || b < 0 || v > this.height) return !1;
|
11267
|
-
const
|
11268
|
-
return this._forEachCell(m, v, y, b, this._queryCellCircle,
|
11267
|
+
const P = [];
|
11268
|
+
return this._forEachCell(m, v, y, b, this._queryCellCircle, P, { hitTest: !0, overlapMode: a, circle: { x: t, y: n, radius: o }, seenUids: { box: {}, circle: {} } }, h), P.length > 0;
|
11269
11269
|
}
|
11270
11270
|
_queryCell(t, n, o, a, h, m, y, v) {
|
11271
|
-
const { seenUids: b, hitTest:
|
11271
|
+
const { seenUids: b, hitTest: P, overlapMode: A } = y, L = this.boxCells[h];
|
11272
11272
|
if (L !== null) {
|
11273
|
-
const
|
11273
|
+
const V = this.bboxes;
|
11274
11274
|
for (const Z of L) if (!b.box[Z]) {
|
11275
11275
|
b.box[Z] = !0;
|
11276
11276
|
const j = 4 * Z, H = this.boxKeys[Z];
|
11277
|
-
if (t <=
|
11277
|
+
if (t <= V[j + 2] && n <= V[j + 3] && o >= V[j + 0] && a >= V[j + 1] && (!v || v(H)) && (!P || !_r(A, H.overlapMode)) && (m.push({ key: H, x1: V[j], y1: V[j + 1], x2: V[j + 2], y2: V[j + 3] }), P)) return !0;
|
11278
11278
|
}
|
11279
11279
|
}
|
11280
11280
|
const B = this.circleCells[h];
|
11281
11281
|
if (B !== null) {
|
11282
|
-
const
|
11282
|
+
const V = this.circles;
|
11283
11283
|
for (const Z of B) if (!b.circle[Z]) {
|
11284
11284
|
b.circle[Z] = !0;
|
11285
11285
|
const j = 3 * Z, H = this.circleKeys[Z];
|
11286
|
-
if (this._circleAndRectCollide(
|
11287
|
-
const K =
|
11288
|
-
if (m.push({ key: H, x1: K - ee, y1: U - ee, x2: K + ee, y2: U + ee }),
|
11286
|
+
if (this._circleAndRectCollide(V[j], V[j + 1], V[j + 2], t, n, o, a) && (!v || v(H)) && (!P || !_r(A, H.overlapMode))) {
|
11287
|
+
const K = V[j], U = V[j + 1], ee = V[j + 2];
|
11288
|
+
if (m.push({ key: H, x1: K - ee, y1: U - ee, x2: K + ee, y2: U + ee }), P) return !0;
|
11289
11289
|
}
|
11290
11290
|
}
|
11291
11291
|
}
|
11292
11292
|
return !1;
|
11293
11293
|
}
|
11294
11294
|
_queryCellCircle(t, n, o, a, h, m, y, v) {
|
11295
|
-
const { circle: b, seenUids:
|
11295
|
+
const { circle: b, seenUids: P, overlapMode: A } = y, L = this.boxCells[h];
|
11296
11296
|
if (L !== null) {
|
11297
|
-
const
|
11298
|
-
for (const Z of L) if (!
|
11299
|
-
|
11297
|
+
const V = this.bboxes;
|
11298
|
+
for (const Z of L) if (!P.box[Z]) {
|
11299
|
+
P.box[Z] = !0;
|
11300
11300
|
const j = 4 * Z, H = this.boxKeys[Z];
|
11301
|
-
if (this._circleAndRectCollide(b.x, b.y, b.radius,
|
11301
|
+
if (this._circleAndRectCollide(b.x, b.y, b.radius, V[j + 0], V[j + 1], V[j + 2], V[j + 3]) && (!v || v(H)) && !_r(A, H.overlapMode)) return m.push(!0), !0;
|
11302
11302
|
}
|
11303
11303
|
}
|
11304
11304
|
const B = this.circleCells[h];
|
11305
11305
|
if (B !== null) {
|
11306
|
-
const
|
11307
|
-
for (const Z of B) if (!
|
11308
|
-
|
11306
|
+
const V = this.circles;
|
11307
|
+
for (const Z of B) if (!P.circle[Z]) {
|
11308
|
+
P.circle[Z] = !0;
|
11309
11309
|
const j = 3 * Z, H = this.circleKeys[Z];
|
11310
|
-
if (this._circlesCollide(
|
11310
|
+
if (this._circlesCollide(V[j], V[j + 1], V[j + 2], b.x, b.y, b.radius) && (!v || v(H)) && !_r(A, H.overlapMode)) return m.push(!0), !0;
|
11311
11311
|
}
|
11312
11312
|
}
|
11313
11313
|
}
|
11314
11314
|
_forEachCell(t, n, o, a, h, m, y, v) {
|
11315
|
-
const b = this._convertToXCellCoord(t),
|
11316
|
-
for (let B = b; B <=
|
11315
|
+
const b = this._convertToXCellCoord(t), P = this._convertToYCellCoord(n), A = this._convertToXCellCoord(o), L = this._convertToYCellCoord(a);
|
11316
|
+
for (let B = b; B <= A; B++) for (let V = P; V <= L; V++) if (h.call(this, t, n, o, a, this.xCellCount * V + B, m, y, v)) return;
|
11317
11317
|
}
|
11318
11318
|
_convertToXCellCoord(t) {
|
11319
11319
|
return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(t * this.xScale)));
|
@@ -11328,10 +11328,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11328
11328
|
_circleAndRectCollide(t, n, o, a, h, m, y) {
|
11329
11329
|
const v = (m - a) / 2, b = Math.abs(t - (a + v));
|
11330
11330
|
if (b > v + o) return !1;
|
11331
|
-
const
|
11332
|
-
if (
|
11333
|
-
if (b <= v ||
|
11334
|
-
const L = b - v, B =
|
11331
|
+
const P = (y - h) / 2, A = Math.abs(n - (h + P));
|
11332
|
+
if (A > P + o) return !1;
|
11333
|
+
if (b <= v || A <= P) return !0;
|
11334
|
+
const L = b - v, B = A - P;
|
11335
11335
|
return L * L + B * B <= o * o;
|
11336
11336
|
}
|
11337
11337
|
}
|
@@ -11361,7 +11361,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11361
11361
|
function M(u, t) {
|
11362
11362
|
return u.x >= -t[0] && u.x <= t[0] && u.y >= -t[1] && u.y <= t[1];
|
11363
11363
|
}
|
11364
|
-
function O(u, t, n, o, a, h, m, y, v, b,
|
11364
|
+
function O(u, t, n, o, a, h, m, y, v, b, P, A, L, B, V) {
|
11365
11365
|
const Z = o ? u.textSizeData : u.iconSizeData, j = c.ah(Z, n.transform.zoom), H = [256 / n.width * 2 + 1, 256 / n.height * 2 + 1], K = o ? u.text.dynamicLayoutVertexArray : u.icon.dynamicLayoutVertexArray;
|
11366
11366
|
K.clear();
|
11367
11367
|
const U = u.lineVertexArray, ee = o ? u.text.placedSymbolArray : u.icon.placedSymbolArray, ne = n.transform.width / n.transform.height;
|
@@ -11373,39 +11373,39 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11373
11373
|
continue;
|
11374
11374
|
}
|
11375
11375
|
le = !1;
|
11376
|
-
const ze = G(new c.P(be.anchorX, be.anchorY), t,
|
11376
|
+
const ze = G(new c.P(be.anchorX, be.anchorY), t, V);
|
11377
11377
|
if (!M(ze.point, H)) {
|
11378
11378
|
He(be.numGlyphs, K);
|
11379
11379
|
continue;
|
11380
11380
|
}
|
11381
|
-
const Le = z(n.transform.cameraToCenterDistance, ze.signedDistanceFromCamera), we = c.aj(Z, j, be), Se = m ? we / Le : we * Le, Oe = { getElevation:
|
11381
|
+
const Le = z(n.transform.cameraToCenterDistance, ze.signedDistanceFromCamera), we = c.aj(Z, j, be), Se = m ? we / Le : we * Le, Oe = { getElevation: V, labelPlaneMatrix: a, lineVertexArray: U, pitchWithMap: m, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: b, tileAnchorPoint: new c.P(be.anchorX, be.anchorY), unwrappedTileID: P, width: A, height: L, translation: B }, et = te(Oe, be, Se, !1, y, t, h, u.glyphOffsetArray, K, ne, v);
|
11382
11382
|
le = et.useVertical, (et.notEnoughRoom || le || et.needsFlipping && te(Oe, be, Se, !0, y, t, h, u.glyphOffsetArray, K, ne, v).notEnoughRoom) && He(be.numGlyphs, K);
|
11383
11383
|
}
|
11384
11384
|
o ? u.text.dynamicLayoutVertexBuffer.updateData(K) : u.icon.dynamicLayoutVertexBuffer.updateData(K);
|
11385
11385
|
}
|
11386
11386
|
function q(u, t, n, o, a, h, m, y) {
|
11387
|
-
const v = h.glyphStartIndex + h.numGlyphs, b = h.lineStartIndex,
|
11387
|
+
const v = h.glyphStartIndex + h.numGlyphs, b = h.lineStartIndex, P = h.lineStartIndex + h.lineLength, A = t.getoffsetX(h.glyphStartIndex), L = t.getoffsetX(v - 1), B = Ie(u * A, n, o, a, h.segment, b, P, y, m);
|
11388
11388
|
if (!B) return null;
|
11389
|
-
const
|
11390
|
-
return
|
11389
|
+
const V = Ie(u * L, n, o, a, h.segment, b, P, y, m);
|
11390
|
+
return V ? y.projectionCache.anyProjectionOccluded ? null : { first: B, last: V } : null;
|
11391
11391
|
}
|
11392
11392
|
function Q(u, t, n, o) {
|
11393
11393
|
return u === c.ai.horizontal && Math.abs(n.y - t.y) > Math.abs(n.x - t.x) * o ? { useVertical: !0 } : (u === c.ai.vertical ? t.y < n.y : t.x > n.x) ? { needsFlipping: !0 } : null;
|
11394
11394
|
}
|
11395
|
-
function te(u, t, n, o, a, h, m, y, v, b,
|
11396
|
-
const
|
11397
|
-
let
|
11395
|
+
function te(u, t, n, o, a, h, m, y, v, b, P) {
|
11396
|
+
const A = n / 24, L = t.lineOffsetX * A, B = t.lineOffsetY * A;
|
11397
|
+
let V;
|
11398
11398
|
if (t.numGlyphs > 1) {
|
11399
|
-
const Z = t.glyphStartIndex + t.numGlyphs, j = t.lineStartIndex, H = t.lineStartIndex + t.lineLength, K = q(
|
11399
|
+
const Z = t.glyphStartIndex + t.numGlyphs, j = t.lineStartIndex, H = t.lineStartIndex + t.lineLength, K = q(A, y, L, B, o, t, P, u);
|
11400
11400
|
if (!K) return { notEnoughRoom: !0 };
|
11401
11401
|
const U = G(K.first.point, m, u.getElevation).point, ee = G(K.last.point, m, u.getElevation).point;
|
11402
11402
|
if (a && !o) {
|
11403
11403
|
const ne = Q(t.writingMode, U, ee, b);
|
11404
11404
|
if (ne) return ne;
|
11405
11405
|
}
|
11406
|
-
|
11407
|
-
for (let ne = t.glyphStartIndex + 1; ne < Z - 1; ne++)
|
11408
|
-
|
11406
|
+
V = [K.first];
|
11407
|
+
for (let ne = t.glyphStartIndex + 1; ne < Z - 1; ne++) V.push(Ie(A * y.getoffsetX(ne), L, B, o, t.segment, j, H, u, P));
|
11408
|
+
V.push(K.last);
|
11409
11409
|
} else {
|
11410
11410
|
if (a && !o) {
|
11411
11411
|
const j = G(u.tileAnchorPoint, h, u.getElevation).point, H = t.lineStartIndex + t.segment + 1, K = new c.P(u.lineVertexArray.getx(H), u.lineVertexArray.gety(H)), U = G(K, h, u.getElevation), ee = U.signedDistanceFromCamera > 0 ? U.point : function(le, me, be, ze, Le, we) {
|
@@ -11413,11 +11413,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11413
11413
|
}(u.tileAnchorPoint, K, j, 0, h, u), ne = Q(t.writingMode, j, ee, b);
|
11414
11414
|
if (ne) return ne;
|
11415
11415
|
}
|
11416
|
-
const Z = Ie(
|
11416
|
+
const Z = Ie(A * y.getoffsetX(t.glyphStartIndex), L, B, o, t.segment, t.lineStartIndex, t.lineStartIndex + t.lineLength, u, P);
|
11417
11417
|
if (!Z || u.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
|
11418
|
-
|
11418
|
+
V = [Z];
|
11419
11419
|
}
|
11420
|
-
for (const Z of
|
11420
|
+
for (const Z of V) c.ak(v, Z.point, Z.angle);
|
11421
11421
|
return {};
|
11422
11422
|
}
|
11423
11423
|
function re(u, t, n, o, a, h) {
|
@@ -11430,8 +11430,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11430
11430
|
const a = new c.P(t.lineVertexArray.getx(u), t.lineVertexArray.gety(u)), h = de(a.x, a.y, t);
|
11431
11431
|
if (h.signedDistanceFromCamera > 0) return o.projections[u] = h.point, o.anyProjectionOccluded = o.anyProjectionOccluded || h.isOccluded, h.point;
|
11432
11432
|
const m = u - n.direction;
|
11433
|
-
return function(y, v, b,
|
11434
|
-
return re(y, v, b,
|
11433
|
+
return function(y, v, b, P, A) {
|
11434
|
+
return re(y, v, b, P, void 0, A);
|
11435
11435
|
}(n.distanceFromAnchor === 0 ? t.tileAnchorPoint : new c.P(t.lineVertexArray.getx(m), t.lineVertexArray.gety(m)), a, n.previousVertex, n.absOffsetX - n.distanceFromAnchor + 1, t);
|
11436
11436
|
}
|
11437
11437
|
function de(u, t, n) {
|
@@ -11446,31 +11446,31 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11446
11446
|
if (y.projectionCache.offsets[u]) return y.projectionCache.offsets[u];
|
11447
11447
|
const b = n.add(t);
|
11448
11448
|
if (u + v.direction < o || u + v.direction >= a) return y.projectionCache.offsets[u] = b, b;
|
11449
|
-
const
|
11449
|
+
const P = J(u + v.direction, y, v), A = ge(P.sub(n), m, v.direction), L = n.add(A), B = P.add(A);
|
11450
11450
|
return y.projectionCache.offsets[u] = c.al(h, b, L, B) || b, y.projectionCache.offsets[u];
|
11451
11451
|
}
|
11452
11452
|
function Ie(u, t, n, o, a, h, m, y, v) {
|
11453
11453
|
const b = o ? u - t : u + t;
|
11454
|
-
let
|
11455
|
-
o && (
|
11456
|
-
let L, B =
|
11454
|
+
let P = b > 0 ? 1 : -1, A = 0;
|
11455
|
+
o && (P *= -1, A = Math.PI), P < 0 && (A += Math.PI);
|
11456
|
+
let L, B = P > 0 ? h + a : h + a + 1;
|
11457
11457
|
y.projectionCache.cachedAnchorPoint ? L = y.projectionCache.cachedAnchorPoint : (L = de(y.tileAnchorPoint.x, y.tileAnchorPoint.y, y).point, y.projectionCache.cachedAnchorPoint = L);
|
11458
|
-
let
|
11458
|
+
let V, Z, j = L, H = L, K = 0, U = 0;
|
11459
11459
|
const ee = Math.abs(b), ne = [];
|
11460
11460
|
let le;
|
11461
11461
|
for (; K + U <= ee; ) {
|
11462
|
-
if (B +=
|
11463
|
-
K += U, H = j, Z =
|
11464
|
-
const ze = { absOffsetX: ee, direction:
|
11462
|
+
if (B += P, B < h || B >= m) return null;
|
11463
|
+
K += U, H = j, Z = V;
|
11464
|
+
const ze = { absOffsetX: ee, direction: P, distanceFromAnchor: K, previousVertex: H };
|
11465
11465
|
if (j = J(B, y, ze), n === 0) ne.push(H), le = j.sub(H);
|
11466
11466
|
else {
|
11467
11467
|
let Le;
|
11468
11468
|
const we = j.sub(H);
|
11469
|
-
Le = we.mag() === 0 ? ge(J(B +
|
11469
|
+
Le = we.mag() === 0 ? ge(J(B + P, y, ze).sub(j), n, P) : ge(we, n, P), Z || (Z = H.add(Le)), V = ce(B, Le, j, h, m, Z, n, y, ze), ne.push(Z), le = V.sub(Z);
|
11470
11470
|
}
|
11471
11471
|
U = le.mag();
|
11472
11472
|
}
|
11473
|
-
const me = le._mult((ee - K) / U)._add(Z || H), be =
|
11473
|
+
const me = le._mult((ee - K) / U)._add(Z || H), be = A + Math.atan2(j.y - H.y, j.x - H.x);
|
11474
11474
|
return ne.push(me), { point: me, angle: v ? be : 0, path: ne };
|
11475
11475
|
}
|
11476
11476
|
const Ze = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
|
@@ -11485,15 +11485,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11485
11485
|
constructor(t, n, o = new Mr(t.width + 200, t.height + 200, 25), a = new Mr(t.width + 200, t.height + 200, 25)) {
|
11486
11486
|
this.transform = t, this.mapProjection = n, this.grid = o, this.ignoredGrid = a, this.pitchFactor = Math.cos(t._pitch) * t.cameraToCenterDistance, this.screenRightBoundary = t.width + nt, this.screenBottomBoundary = t.height + nt, this.gridRightBoundary = t.width + 200, this.gridBottomBoundary = t.height + 200, this.perspectiveRatioCutoff = 0.6;
|
11487
11487
|
}
|
11488
|
-
placeCollisionBox(t, n, o, a, h, m, y, v, b,
|
11489
|
-
const L = t.anchorPointX + v[0], B = t.anchorPointY + v[1],
|
11490
|
-
return this.mapProjection.useSpecialProjectionForSymbols && (m ? Z.allPointsOccluded : this.mapProjection.isOccluded(L, B, h)) ||
|
11488
|
+
placeCollisionBox(t, n, o, a, h, m, y, v, b, P, A) {
|
11489
|
+
const L = t.anchorPointX + v[0], B = t.anchorPointY + v[1], V = this.projectAndGetPerspectiveRatio(a, L, B, h, P), Z = this._projectCollisionBox(t, o, a, h, m, y, v, V, P, A), [j, H, K, U] = Z.box;
|
11490
|
+
return this.mapProjection.useSpecialProjectionForSymbols && (m ? Z.allPointsOccluded : this.mapProjection.isOccluded(L, B, h)) || V.perspectiveRatio < this.perspectiveRatioCutoff || !this.isInsideGrid(j, H, K, U) || n !== "always" && this.grid.hitTest(j, H, K, U, n, b) ? { box: [j, H, K, U], placeable: !1, offscreen: !1 } : { box: [j, H, K, U], placeable: !0, offscreen: this.isOffscreen(j, H, K, U) };
|
11491
11491
|
}
|
11492
|
-
placeCollisionCircles(t, n, o, a, h, m, y, v, b,
|
11493
|
-
const H = [], K = new c.P(n.anchorX, n.anchorY), U = this.getPerspectiveRatio(m, K.x, K.y, y, j), ee = (
|
11492
|
+
placeCollisionCircles(t, n, o, a, h, m, y, v, b, P, A, L, B, V, Z, j) {
|
11493
|
+
const H = [], K = new c.P(n.anchorX, n.anchorY), U = this.getPerspectiveRatio(m, K.x, K.y, y, j), ee = (A ? h / U : h * U) / c.aq, ne = { getElevation: j, labelPlaneMatrix: v, lineVertexArray: o, pitchWithMap: A, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: K, unwrappedTileID: y, width: this.transform.width, height: this.transform.height, translation: Z }, le = q(ee, a, n.lineOffsetX * ee, n.lineOffsetY * ee, !1, n, !1, ne);
|
11494
11494
|
let me = !1, be = !1, ze = !0;
|
11495
11495
|
if (le) {
|
11496
|
-
const Le = 0.5 * B * U +
|
11496
|
+
const Le = 0.5 * B * U + V, we = new c.P(-100, -100), Se = new c.P(this.screenRightBoundary, this.screenBottomBoundary), Oe = new it(), et = le.first, Pe = le.last;
|
11497
11497
|
let ke = [];
|
11498
11498
|
for (let st = et.path.length - 1; st >= 1; st--) ke.push(et.path[st]);
|
11499
11499
|
for (let st = 1; st < Pe.path.length; st++) ke.push(Pe.path[st]);
|
@@ -11516,11 +11516,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11516
11516
|
const fi = Rt / Math.max(ut - 1, 1), nr = Oe.lerp(fi), Bt = nr.x + nt, Di = nr.y + nt;
|
11517
11517
|
H.push(Bt, Di, Le, 0);
|
11518
11518
|
const Ai = Bt - Le, mi = Di - Le, gi = Bt + Le, sr = Di + Le;
|
11519
|
-
if (ze = ze && this.isOffscreen(Ai, mi, gi, sr), be = be || this.isInsideGrid(Ai, mi, gi, sr), t !== "always" && this.grid.hitTestCircle(Bt, Di, Le, t, L) && (me = !0, !
|
11519
|
+
if (ze = ze && this.isOffscreen(Ai, mi, gi, sr), be = be || this.isInsideGrid(Ai, mi, gi, sr), t !== "always" && this.grid.hitTestCircle(Bt, Di, Le, t, L) && (me = !0, !P)) return { circles: [], offscreen: !1, collisionDetected: me };
|
11520
11520
|
}
|
11521
11521
|
}
|
11522
11522
|
}
|
11523
|
-
return { circles: !
|
11523
|
+
return { circles: !P && me || !be || U < this.perspectiveRatioCutoff ? [] : H, offscreen: ze, collisionDetected: me };
|
11524
11524
|
}
|
11525
11525
|
projectPathToScreenSpace(t, n, o) {
|
11526
11526
|
return t.map((a) => G(a, o, n.getElevation));
|
@@ -11529,16 +11529,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11529
11529
|
if (t.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
|
11530
11530
|
const n = [];
|
11531
11531
|
let o = 1 / 0, a = 1 / 0, h = -1 / 0, m = -1 / 0;
|
11532
|
-
for (const
|
11533
|
-
const
|
11534
|
-
o = Math.min(o,
|
11532
|
+
for (const P of t) {
|
11533
|
+
const A = new c.P(P.x + nt, P.y + nt);
|
11534
|
+
o = Math.min(o, A.x), a = Math.min(a, A.y), h = Math.max(h, A.x), m = Math.max(m, A.y), n.push(A);
|
11535
11535
|
}
|
11536
11536
|
const y = this.grid.query(o, a, h, m).concat(this.ignoredGrid.query(o, a, h, m)), v = {}, b = {};
|
11537
|
-
for (const
|
11538
|
-
const
|
11539
|
-
if (v[
|
11540
|
-
const L = [new c.P(
|
11541
|
-
c.an(n, L) && (v[
|
11537
|
+
for (const P of y) {
|
11538
|
+
const A = P.key;
|
11539
|
+
if (v[A.bucketInstanceId] === void 0 && (v[A.bucketInstanceId] = {}), v[A.bucketInstanceId][A.featureIndex]) continue;
|
11540
|
+
const L = [new c.P(P.x1, P.y1), new c.P(P.x2, P.y1), new c.P(P.x2, P.y2), new c.P(P.x1, P.y2)];
|
11541
|
+
c.an(n, L) && (v[A.bucketInstanceId][A.featureIndex] = !0, b[A.bucketInstanceId] === void 0 && (b[A.bucketInstanceId] = []), b[A.bucketInstanceId].push(A.featureIndex));
|
11542
11542
|
}
|
11543
11543
|
return b;
|
11544
11544
|
}
|
@@ -11567,24 +11567,24 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11567
11567
|
const t = c.ao([]);
|
11568
11568
|
return c.J(t, t, [-100, -100, 0]), t;
|
11569
11569
|
}
|
11570
|
-
_projectCollisionBox(t, n, o, a, h, m, y, v, b,
|
11571
|
-
const
|
11570
|
+
_projectCollisionBox(t, n, o, a, h, m, y, v, b, P) {
|
11571
|
+
const A = n * v.perspectiveRatio;
|
11572
11572
|
let L = new c.P(1, 0), B = new c.P(0, 1);
|
11573
|
-
const
|
11573
|
+
const V = new c.P(t.anchorPointX + y[0], t.anchorPointY + y[1]);
|
11574
11574
|
if (m && !h) {
|
11575
|
-
const Le = this.projectAndGetPerspectiveRatio(o,
|
11575
|
+
const Le = this.projectAndGetPerspectiveRatio(o, V.x + 1, V.y, a, b).point.sub(v.point).unit(), we = Math.atan(Le.y / Le.x) + (Le.x < 0 ? Math.PI : 0), Se = Math.sin(we), Oe = Math.cos(we);
|
11576
11576
|
L = new c.P(Oe, Se), B = new c.P(-Se, Oe);
|
11577
11577
|
} else if (!m && h) {
|
11578
11578
|
const Le = -this.transform.angle, we = Math.sin(Le), Se = Math.cos(Le);
|
11579
11579
|
L = new c.P(Se, we), B = new c.P(-we, Se);
|
11580
11580
|
}
|
11581
|
-
let Z = v.point, j =
|
11581
|
+
let Z = v.point, j = A;
|
11582
11582
|
if (h) {
|
11583
|
-
Z =
|
11583
|
+
Z = V;
|
11584
11584
|
const Le = this.transform.zoom - Math.floor(this.transform.zoom);
|
11585
|
-
j = Math.pow(2, -Le), j *= this.mapProjection.getPitchedTextCorrection(this.transform,
|
11585
|
+
j = Math.pow(2, -Le), j *= this.mapProjection.getPitchedTextCorrection(this.transform, V, a), P || (j *= c.ad(0.5 + v.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4));
|
11586
11586
|
}
|
11587
|
-
|
11587
|
+
P && (Z = Z.add(L.mult(P.x * j)).add(B.mult(P.y * j)));
|
11588
11588
|
const H = t.x1 * j, K = t.x2 * j, U = (H + K) / 2, ee = t.y1 * j, ne = t.y2 * j, le = (ee + ne) / 2, me = [{ offsetX: H, offsetY: ee }, { offsetX: U, offsetY: ee }, { offsetX: K, offsetY: ee }, { offsetX: K, offsetY: le }, { offsetX: K, offsetY: ne }, { offsetX: U, offsetY: ne }, { offsetX: H, offsetY: ne }, { offsetX: H, offsetY: le }];
|
11589
11589
|
let be = [];
|
11590
11590
|
for (const { offsetX: Le, offsetY: we } of me) be.push(new c.P(Z.x + L.x * Le + B.x * we, Z.y + L.y * Le + B.y * we));
|
@@ -11658,31 +11658,31 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11658
11658
|
getBucketParts(t, n, o, a) {
|
11659
11659
|
const h = o.getBucket(n), m = o.latestFeatureIndex;
|
11660
11660
|
if (!h || !m || n.id !== h.layerIds[0]) return;
|
11661
|
-
const y = o.collisionBoxArray, v = h.layers[0].layout, b = h.layers[0].paint,
|
11661
|
+
const y = o.collisionBoxArray, v = h.layers[0].layout, b = h.layers[0].paint, P = Math.pow(2, this.transform.zoom - o.tileID.overscaledZ), A = o.tileSize / c.X, L = o.tileID.toUnwrapped(), B = this.transform.calculatePosMatrix(L), V = v.get("text-pitch-alignment") === "map", Z = v.get("text-rotation-alignment") === "map", j = rt(o, 1, this.transform.zoom), H = this.collisionIndex.mapProjection.translatePosition(this.transform, o, b.get("text-translate"), b.get("text-translate-anchor")), K = this.collisionIndex.mapProjection.translatePosition(this.transform, o, b.get("icon-translate"), b.get("icon-translate-anchor")), U = Wr(B, V, Z, this.transform, j);
|
11662
11662
|
let ee = null;
|
11663
|
-
if (
|
11664
|
-
const le = yr(B,
|
11663
|
+
if (V) {
|
11664
|
+
const le = yr(B, V, Z, this.transform, j);
|
11665
11665
|
ee = c.L([], this.transform.labelPlaneMatrix, le);
|
11666
11666
|
}
|
11667
11667
|
this.retainedQueryData[h.bucketInstanceId] = new bt(h.bucketInstanceId, m, h.sourceLayerIndex, h.index, o.tileID);
|
11668
|
-
const ne = { bucket: h, layout: v, translationText: H, translationIcon: K, posMatrix: B, unwrappedTileID: L, textLabelPlaneMatrix: U, labelToScreenMatrix: ee, scale:
|
11668
|
+
const ne = { bucket: h, layout: v, translationText: H, translationIcon: K, posMatrix: B, unwrappedTileID: L, textLabelPlaneMatrix: U, labelToScreenMatrix: ee, scale: P, textPixelRatio: A, holdingForFade: o.holdingForFade(), collisionBoxArray: y, partiallyEvaluatedTextSize: c.ah(h.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(h.sourceID) };
|
11669
11669
|
if (a) for (const le of h.sortKeyRanges) {
|
11670
11670
|
const { sortKey: me, symbolInstanceStart: be, symbolInstanceEnd: ze } = le;
|
11671
11671
|
t.push({ sortKey: me, symbolInstanceStart: be, symbolInstanceEnd: ze, parameters: ne });
|
11672
11672
|
}
|
11673
11673
|
else t.push({ symbolInstanceStart: 0, symbolInstanceEnd: h.symbolInstances.length, parameters: ne });
|
11674
11674
|
}
|
11675
|
-
attemptAnchorPlacement(t, n, o, a, h, m, y, v, b,
|
11676
|
-
const ee = c.ar[t.textAnchor], ne = [t.textOffset0, t.textOffset1], le = ii(ee, o, a, ne, h), me = this.collisionIndex.placeCollisionBox(n, L, v, b,
|
11677
|
-
if ((!K || this.collisionIndex.placeCollisionBox(K, L, v, b,
|
11675
|
+
attemptAnchorPlacement(t, n, o, a, h, m, y, v, b, P, A, L, B, V, Z, j, H, K, U) {
|
11676
|
+
const ee = c.ar[t.textAnchor], ne = [t.textOffset0, t.textOffset1], le = ii(ee, o, a, ne, h), me = this.collisionIndex.placeCollisionBox(n, L, v, b, P, y, m, j, A.predicate, U, le);
|
11677
|
+
if ((!K || this.collisionIndex.placeCollisionBox(K, L, v, b, P, y, m, H, A.predicate, U, le).placeable) && me.placeable) {
|
11678
11678
|
let be;
|
11679
11679
|
if (this.prevPlacement && this.prevPlacement.variableOffsets[B.crossTileID] && this.prevPlacement.placements[B.crossTileID] && this.prevPlacement.placements[B.crossTileID].text && (be = this.prevPlacement.variableOffsets[B.crossTileID].anchor), B.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
11680
|
-
return this.variableOffsets[B.crossTileID] = { textOffset: ne, width: o, height: a, anchor: ee, textBoxScale: h, prevAnchor: be }, this.markUsedJustification(
|
11680
|
+
return this.variableOffsets[B.crossTileID] = { textOffset: ne, width: o, height: a, anchor: ee, textBoxScale: h, prevAnchor: be }, this.markUsedJustification(V, ee, B, Z), V.allowVerticalPlacement && (this.markUsedOrientation(V, Z, B), this.placedOrientations[B.crossTileID] = Z), { shift: le, placedGlyphBoxes: me };
|
11681
11681
|
}
|
11682
11682
|
}
|
11683
11683
|
placeLayerBucketPart(t, n, o) {
|
11684
|
-
const { bucket: a, layout: h, translationText: m, translationIcon: y, posMatrix: v, unwrappedTileID: b, textLabelPlaneMatrix:
|
11685
|
-
!a.collisionArrays &&
|
11684
|
+
const { bucket: a, layout: h, translationText: m, translationIcon: y, posMatrix: v, unwrappedTileID: b, textLabelPlaneMatrix: P, labelToScreenMatrix: A, textPixelRatio: L, holdingForFade: B, collisionBoxArray: V, partiallyEvaluatedTextSize: Z, collisionGroup: j } = t.parameters, H = h.get("text-optional"), K = h.get("icon-optional"), U = c.as(h, "text-overlap", "text-allow-overlap"), ee = U === "always", ne = c.as(h, "icon-overlap", "icon-allow-overlap"), le = ne === "always", me = h.get("text-rotation-alignment") === "map", be = h.get("text-pitch-alignment") === "map", ze = h.get("icon-text-fit") !== "none", Le = h.get("symbol-z-order") === "viewport-y", we = ee && (le || !a.hasIconData() || K), Se = le && (ee || !a.hasTextData() || H);
|
11685
|
+
!a.collisionArrays && V && a.deserializeCollisionBoxes(V);
|
11686
11686
|
const Oe = this._getTerrainElevationFunc(this.retainedQueryData[a.bucketInstanceId].tileID), et = (Pe, ke, Ke) => {
|
11687
11687
|
var Lt, st;
|
11688
11688
|
if (n[Pe.crossTileID]) return;
|
@@ -11742,7 +11742,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11742
11742
|
}
|
11743
11743
|
if (Ai = Bt, ut = Ai && Ai.placeable, fi = Ai && Ai.offscreen, Pe.useRuntimeCollisionCircles) {
|
11744
11744
|
const li = a.text.placedSymbolArray.get(Pe.centerJustifiedTextSymbolIndex), or = c.aj(a.textSizeData, Z, li), tn = h.get("text-padding");
|
11745
|
-
mi = this.collisionIndex.placeCollisionCircles(U, li, a.lineVertexArray, a.glyphOffsetArray, or, v, b,
|
11745
|
+
mi = this.collisionIndex.placeCollisionCircles(U, li, a.lineVertexArray, a.glyphOffsetArray, or, v, b, P, A, o, be, j.predicate, Pe.collisionCircleDiameter, tn, m, Oe), mi.circles.length && mi.collisionDetected && !o && c.w("Collisions detected, but collision boxes are not shown"), ut = ee || mi.circles.length > 0 && !mi.collisionDetected, fi = fi && mi.offscreen;
|
11746
11746
|
}
|
11747
11747
|
if (ke.iconFeatureIndex && (So = ke.iconFeatureIndex), ke.iconBox) {
|
11748
11748
|
const li = (or) => this.collisionIndex.placeCollisionBox(or, ne, L, v, b, be, me, y, j.predicate, Oe, ze && nr ? nr : void 0);
|
@@ -11798,14 +11798,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11798
11798
|
this.prevZoomAdjustment = n ? n.zoomAdjustment(this.transform.zoom) : 0;
|
11799
11799
|
const a = n ? n.symbolFadeChange(t) : 1, h = n ? n.opacities : {}, m = n ? n.variableOffsets : {}, y = n ? n.placedOrientations : {};
|
11800
11800
|
for (const v in this.placements) {
|
11801
|
-
const b = this.placements[v],
|
11802
|
-
|
11801
|
+
const b = this.placements[v], P = h[v];
|
11802
|
+
P ? (this.opacities[v] = new Gt(P, a, b.text, b.icon), o = o || b.text !== P.text.placed || b.icon !== P.icon.placed) : (this.opacities[v] = new Gt(null, a, b.text, b.icon, b.skipFade), o = o || b.text || b.icon);
|
11803
11803
|
}
|
11804
11804
|
for (const v in h) {
|
11805
11805
|
const b = h[v];
|
11806
11806
|
if (!this.opacities[v]) {
|
11807
|
-
const
|
11808
|
-
|
11807
|
+
const P = new Gt(b, a, !1, !1);
|
11808
|
+
P.isHidden() || (this.opacities[v] = P, o = o || b.text.placed || b.icon.placed);
|
11809
11809
|
}
|
11810
11810
|
}
|
11811
11811
|
for (const v in m) this.variableOffsets[v] || !this.opacities[v] || this.opacities[v].isHidden() || (this.variableOffsets[v] = m[v]);
|
@@ -11822,7 +11822,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11822
11822
|
}
|
11823
11823
|
updateBucketOpacities(t, n, o, a) {
|
11824
11824
|
t.hasTextData() && (t.text.opacityVertexArray.clear(), t.text.hasVisibleVertices = !1), t.hasIconData() && (t.icon.opacityVertexArray.clear(), t.icon.hasVisibleVertices = !1), t.hasIconCollisionBoxData() && t.iconCollisionBox.collisionVertexArray.clear(), t.hasTextCollisionBoxData() && t.textCollisionBox.collisionVertexArray.clear();
|
11825
|
-
const h = t.layers[0], m = h.layout, y = new Gt(null, 0, !1, !1, !0), v = m.get("text-allow-overlap"), b = m.get("icon-allow-overlap"),
|
11825
|
+
const h = t.layers[0], m = h.layout, y = new Gt(null, 0, !1, !1, !0), v = m.get("text-allow-overlap"), b = m.get("icon-allow-overlap"), P = h._unevaluatedLayout.hasValue("text-variable-anchor") || h._unevaluatedLayout.hasValue("text-variable-anchor-offset"), A = m.get("text-rotation-alignment") === "map", L = m.get("text-pitch-alignment") === "map", B = m.get("icon-text-fit") !== "none", V = new Gt(null, 0, v && (b || !t.hasIconData() || m.get("icon-optional")), b && (v || !t.hasTextData() || m.get("text-optional")), !0);
|
11826
11826
|
!t.collisionArrays && a && (t.hasIconCollisionBoxData() || t.hasTextCollisionBoxData()) && t.deserializeCollisionBoxes(a);
|
11827
11827
|
const Z = (H, K, U) => {
|
11828
11828
|
for (let ee = 0; ee < K / 4; ee++) H.opacityVertexArray.emplaceBack(U);
|
@@ -11831,7 +11831,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11831
11831
|
for (let H = 0; H < t.symbolInstances.length; H++) {
|
11832
11832
|
const K = t.symbolInstances.get(H), { numHorizontalGlyphVertices: U, numVerticalGlyphVertices: ee, crossTileID: ne } = K;
|
11833
11833
|
let le = this.opacities[ne];
|
11834
|
-
o[ne] ? le = y : le || (le =
|
11834
|
+
o[ne] ? le = y : le || (le = V, this.opacities[ne] = le), o[ne] = !0;
|
11835
11835
|
const me = K.numIconVertices > 0, be = this.placedOrientations[K.crossTileID], ze = be === c.ai.vertical, Le = be === c.ai.horizontal || be === c.ai.horizontalOnly;
|
11836
11836
|
if (U > 0 || ee > 0) {
|
11837
11837
|
const Se = ji(le.text);
|
@@ -11856,9 +11856,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11856
11856
|
let Oe = new c.P(0, 0);
|
11857
11857
|
if (Se.textBox || Se.verticalTextBox) {
|
11858
11858
|
let et = !0;
|
11859
|
-
if (
|
11859
|
+
if (P) {
|
11860
11860
|
const Pe = this.variableOffsets[ne];
|
11861
|
-
Pe ? (Oe = ii(Pe.anchor, Pe.width, Pe.height, Pe.textOffset, Pe.textBoxScale),
|
11861
|
+
Pe ? (Oe = ii(Pe.anchor, Pe.width, Pe.height, Pe.textOffset, Pe.textBoxScale), A && Oe._rotate(L ? this.transform.angle : -this.transform.angle)) : et = !1;
|
11862
11862
|
}
|
11863
11863
|
if (Se.textBox || Se.verticalTextBox) {
|
11864
11864
|
let Pe;
|
@@ -11919,8 +11919,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11919
11919
|
if (!m[0] && !m[1]) return [0, 0];
|
11920
11920
|
const b = v ? y === "map" ? a.angle : 0 : y === "viewport" ? -a.angle : 0;
|
11921
11921
|
if (b) {
|
11922
|
-
const
|
11923
|
-
m = [m[0] *
|
11922
|
+
const P = Math.sin(b), A = Math.cos(b);
|
11923
|
+
m = [m[0] * A - m[1] * P, m[0] * P + m[1] * A];
|
11924
11924
|
}
|
11925
11925
|
return [v ? m[0] : rt(h, m[0], a.zoom), v ? m[1] : rt(h, m[1], a.zoom)];
|
11926
11926
|
}(u, t, n, o), getCircleRadiusCorrection: (u) => 1 };
|
@@ -11972,15 +11972,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11972
11972
|
const y = { positions: m.map((v) => ({ x: Math.floor(v.anchorX * zr), y: Math.floor(v.anchorY * zr) })), crossTileIDs: m.map((v) => v.crossTileID) };
|
11973
11973
|
if (y.positions.length > 128) {
|
11974
11974
|
const v = new c.aw(y.positions.length, 16, Uint16Array);
|
11975
|
-
for (const { x: b, y:
|
11975
|
+
for (const { x: b, y: P } of y.positions) v.add(b, P);
|
11976
11976
|
v.finish(), delete y.positions, y.index = v;
|
11977
11977
|
}
|
11978
11978
|
this._symbolsByKey[h] = y;
|
11979
11979
|
}
|
11980
11980
|
}
|
11981
11981
|
getScaledCoordinates(t, n) {
|
11982
|
-
const { x: o, y: a, z: h } = this.tileID.canonical, { x: m, y, z: v } = n.canonical, b = zr / Math.pow(2, v - h),
|
11983
|
-
return { x: Math.floor((m * c.X + t.anchorX) * b - o * c.X * zr), y: Math.floor(
|
11982
|
+
const { x: o, y: a, z: h } = this.tileID.canonical, { x: m, y, z: v } = n.canonical, b = zr / Math.pow(2, v - h), P = (y * c.X + t.anchorY) * b, A = a * c.X * zr;
|
11983
|
+
return { x: Math.floor((m * c.X + t.anchorX) * b - o * c.X * zr), y: Math.floor(P - A) };
|
11984
11984
|
}
|
11985
11985
|
findMatches(t, n, o) {
|
11986
11986
|
const a = this.tileID.canonical.z < n.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - n.canonical.z);
|
@@ -11992,17 +11992,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11992
11992
|
const v = this.getScaledCoordinates(m, n);
|
11993
11993
|
if (y.index) {
|
11994
11994
|
const b = y.index.range(v.x - a, v.y - a, v.x + a, v.y + a).sort();
|
11995
|
-
for (const
|
11996
|
-
const
|
11997
|
-
if (!o[
|
11998
|
-
o[
|
11995
|
+
for (const P of b) {
|
11996
|
+
const A = y.crossTileIDs[P];
|
11997
|
+
if (!o[A]) {
|
11998
|
+
o[A] = !0, m.crossTileID = A;
|
11999
11999
|
break;
|
12000
12000
|
}
|
12001
12001
|
}
|
12002
12002
|
} else if (y.positions) for (let b = 0; b < y.positions.length; b++) {
|
12003
|
-
const
|
12004
|
-
if (Math.abs(
|
12005
|
-
o[
|
12003
|
+
const P = y.positions[b], A = y.crossTileIDs[b];
|
12004
|
+
if (Math.abs(P.x - v.x) <= a && Math.abs(P.y - v.y) <= a && !o[A]) {
|
12005
|
+
o[A] = !0, m.crossTileID = A;
|
12006
12006
|
break;
|
12007
12007
|
}
|
12008
12008
|
}
|
@@ -12157,19 +12157,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12157
12157
|
let a;
|
12158
12158
|
this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController(), function(h, m, y, v) {
|
12159
12159
|
return c._(this, void 0, void 0, function* () {
|
12160
|
-
const b = Si(h),
|
12161
|
-
for (const { id: B, url:
|
12162
|
-
const Z = m.transformRequest(jr(
|
12163
|
-
|
12164
|
-
const j = m.transformRequest(jr(
|
12160
|
+
const b = Si(h), P = y > 1 ? "@2x" : "", A = {}, L = {};
|
12161
|
+
for (const { id: B, url: V } of b) {
|
12162
|
+
const Z = m.transformRequest(jr(V, P, ".json"), "SpriteJSON");
|
12163
|
+
A[B] = c.h(Z, v);
|
12164
|
+
const j = m.transformRequest(jr(V, P, ".png"), "SpriteImage");
|
12165
12165
|
L[B] = Ge.getImage(j, v);
|
12166
12166
|
}
|
12167
|
-
return yield Promise.all([...Object.values(
|
12167
|
+
return yield Promise.all([...Object.values(A), ...Object.values(L)]), function(B, V) {
|
12168
12168
|
return c._(this, void 0, void 0, function* () {
|
12169
12169
|
const Z = {};
|
12170
12170
|
for (const j in B) {
|
12171
12171
|
Z[j] = {};
|
12172
|
-
const H = ae.getImageCanvasContext((yield
|
12172
|
+
const H = ae.getImageCanvasContext((yield V[j]).data), K = (yield B[j]).data;
|
12173
12173
|
for (const U in K) {
|
12174
12174
|
const { width: ee, height: ne, x: le, y: me, sdf: be, pixelRatio: ze, stretchX: Le, stretchY: we, content: Se, textFitWidth: Oe, textFitHeight: et } = K[U];
|
12175
12175
|
Z[j][U] = { data: null, pixelRatio: ze, sdf: be, stretchX: Le, stretchY: we, content: Se, textFitWidth: Oe, textFitHeight: et, spriteData: { width: ee, height: ne, x: le, y: me, context: H } };
|
@@ -12177,7 +12177,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12177
12177
|
}
|
12178
12178
|
return Z;
|
12179
12179
|
});
|
12180
|
-
}(
|
12180
|
+
}(A, L);
|
12181
12181
|
});
|
12182
12182
|
}(t, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((h) => {
|
12183
12183
|
if (this._spriteRequest = null, h) for (const m in h) {
|
@@ -12524,7 +12524,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12524
12524
|
o[y] = m;
|
12525
12525
|
for (const v of t) {
|
12526
12526
|
const b = v[y];
|
12527
|
-
if (b) for (const
|
12527
|
+
if (b) for (const P of b) a.push(P);
|
12528
12528
|
}
|
12529
12529
|
}
|
12530
12530
|
}
|
@@ -12539,7 +12539,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12539
12539
|
}
|
12540
12540
|
else for (const v of t) {
|
12541
12541
|
const b = v[y];
|
12542
|
-
if (b) for (const
|
12542
|
+
if (b) for (const P of b) h.push(P.feature);
|
12543
12543
|
}
|
12544
12544
|
}
|
12545
12545
|
return h;
|
@@ -12559,14 +12559,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12559
12559
|
n.availableImages = this._availableImages;
|
12560
12560
|
const m = this._serializedAllLayers();
|
12561
12561
|
for (const y in this.sourceCaches) n.layers && !a[y] || h.push(qr(this.sourceCaches[y], this._layers, m, t, n, o));
|
12562
|
-
return this.placement && h.push(function(y, v, b,
|
12563
|
-
const
|
12562
|
+
return this.placement && h.push(function(y, v, b, P, A, L, B) {
|
12563
|
+
const V = {}, Z = L.queryRenderedSymbols(P), j = [];
|
12564
12564
|
for (const H of Object.keys(Z).map(Number)) j.push(B[H]);
|
12565
12565
|
j.sort(Zr);
|
12566
12566
|
for (const H of j) {
|
12567
|
-
const K = H.featureIndex.lookupSymbolFeatures(Z[H.bucketInstanceId], v, H.bucketIndex, H.sourceLayerIndex,
|
12567
|
+
const K = H.featureIndex.lookupSymbolFeatures(Z[H.bucketInstanceId], v, H.bucketIndex, H.sourceLayerIndex, A.filter, A.layers, A.availableImages, y);
|
12568
12568
|
for (const U in K) {
|
12569
|
-
const ee =
|
12569
|
+
const ee = V[U] = V[U] || [], ne = K[U];
|
12570
12570
|
ne.sort((le, me) => {
|
12571
12571
|
const be = H.featureSortOrder;
|
12572
12572
|
if (be) {
|
@@ -12578,11 +12578,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12578
12578
|
for (const le of ne) ee.push(le);
|
12579
12579
|
}
|
12580
12580
|
}
|
12581
|
-
for (const H in
|
12581
|
+
for (const H in V) V[H].forEach((K) => {
|
12582
12582
|
const U = K.feature, ee = b[y[H].source].getFeatureState(U.layer["source-layer"], U.id);
|
12583
12583
|
U.source = U.layer.source, U.layer["source-layer"] && (U.sourceLayer = U.layer["source-layer"]), U.state = ee;
|
12584
12584
|
});
|
12585
|
-
return
|
12585
|
+
return V;
|
12586
12586
|
}(this._layers, m, this.sourceCaches, t, n, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(h);
|
12587
12587
|
}
|
12588
12588
|
querySourceFeatures(t, n) {
|
@@ -12591,8 +12591,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12591
12591
|
return o ? function(a, h) {
|
12592
12592
|
const m = a.getRenderableIds().map((b) => a.getTileByID(b)), y = [], v = {};
|
12593
12593
|
for (let b = 0; b < m.length; b++) {
|
12594
|
-
const
|
12595
|
-
v[
|
12594
|
+
const P = m[b], A = P.tileID.canonical.key;
|
12595
|
+
v[A] || (v[A] = !0, P.querySourceFeatures(y, h));
|
12596
12596
|
}
|
12597
12597
|
return y;
|
12598
12598
|
}(o, n) : [];
|
@@ -12656,18 +12656,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
12656
12656
|
let m = !1, y = !1;
|
12657
12657
|
const v = {};
|
12658
12658
|
for (const b of this._order) {
|
12659
|
-
const
|
12660
|
-
if (
|
12661
|
-
if (!v[
|
12662
|
-
const L = this.sourceCaches[
|
12663
|
-
v[
|
12659
|
+
const P = this._layers[b];
|
12660
|
+
if (P.type !== "symbol") continue;
|
12661
|
+
if (!v[P.source]) {
|
12662
|
+
const L = this.sourceCaches[P.source];
|
12663
|
+
v[P.source] = L.getRenderableIds(!0).map((B) => L.getTileByID(B)).sort((B, V) => V.tileID.overscaledZ - B.tileID.overscaledZ || (B.tileID.isLessThan(V.tileID) ? -1 : 1));
|
12664
12664
|
}
|
12665
|
-
const
|
12666
|
-
m = m ||
|
12665
|
+
const A = this.crossTileSymbolIndex.addLayer(P, v[P.source], t.center.lng);
|
12666
|
+
m = m || A;
|
12667
12667
|
}
|
12668
12668
|
if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((h = h || this._layerOrderChanged || o === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(ae.now(), t.zoom)) && (this.pauseablePlacement = new ei(t, this.map.terrain, this._order, h, n, o, a, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, v), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(ae.now()), y = !0), m && this.pauseablePlacement.placement.setStale()), y || m) for (const b of this._order) {
|
12669
|
-
const
|
12670
|
-
|
12669
|
+
const P = this._layers[b];
|
12670
|
+
P.type === "symbol" && this.placement.updateLayerOpacities(P, v[P.source]);
|
12671
12671
|
}
|
12672
12672
|
return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(ae.now());
|
12673
12673
|
}
|
@@ -13242,56 +13242,56 @@ camera_to_anchor_distance/u_camera_to_center_distance :
|
|
13242
13242
|
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), terrain: xt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"), terrainDepth: xt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"), terrainCoords: xt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"), sky: xt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}", "attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}") };
|
13243
13243
|
function xt(u, t) {
|
13244
13244
|
const n = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, o = t.match(/attribute ([\w]+) ([\w]+)/g), a = u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), h = t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), m = h ? h.concat(a) : a, y = {};
|
13245
|
-
return { fragmentSource: u = u.replace(n, (v, b,
|
13245
|
+
return { fragmentSource: u = u.replace(n, (v, b, P, A, L) => (y[L] = !0, b === "define" ? `
|
13246
13246
|
#ifndef HAS_UNIFORM_u_${L}
|
13247
|
-
varying ${
|
13247
|
+
varying ${P} ${A} ${L};
|
13248
13248
|
#else
|
13249
|
-
uniform ${
|
13249
|
+
uniform ${P} ${A} u_${L};
|
13250
13250
|
#endif
|
13251
13251
|
` : `
|
13252
13252
|
#ifdef HAS_UNIFORM_u_${L}
|
13253
|
-
${
|
13253
|
+
${P} ${A} ${L} = u_${L};
|
13254
13254
|
#endif
|
13255
|
-
`)), vertexSource: t = t.replace(n, (v, b,
|
13256
|
-
const B =
|
13255
|
+
`)), vertexSource: t = t.replace(n, (v, b, P, A, L) => {
|
13256
|
+
const B = A === "float" ? "vec2" : "vec4", V = L.match(/color/) ? "color" : B;
|
13257
13257
|
return y[L] ? b === "define" ? `
|
13258
13258
|
#ifndef HAS_UNIFORM_u_${L}
|
13259
13259
|
uniform lowp float u_${L}_t;
|
13260
|
-
attribute ${
|
13261
|
-
varying ${
|
13260
|
+
attribute ${P} ${B} a_${L};
|
13261
|
+
varying ${P} ${A} ${L};
|
13262
13262
|
#else
|
13263
|
-
uniform ${
|
13263
|
+
uniform ${P} ${A} u_${L};
|
13264
13264
|
#endif
|
13265
|
-
` :
|
13265
|
+
` : V === "vec4" ? `
|
13266
13266
|
#ifndef HAS_UNIFORM_u_${L}
|
13267
13267
|
${L} = a_${L};
|
13268
13268
|
#else
|
13269
|
-
${
|
13269
|
+
${P} ${A} ${L} = u_${L};
|
13270
13270
|
#endif
|
13271
13271
|
` : `
|
13272
13272
|
#ifndef HAS_UNIFORM_u_${L}
|
13273
|
-
${L} = unpack_mix_${
|
13273
|
+
${L} = unpack_mix_${V}(a_${L}, u_${L}_t);
|
13274
13274
|
#else
|
13275
|
-
${
|
13275
|
+
${P} ${A} ${L} = u_${L};
|
13276
13276
|
#endif
|
13277
13277
|
` : b === "define" ? `
|
13278
13278
|
#ifndef HAS_UNIFORM_u_${L}
|
13279
13279
|
uniform lowp float u_${L}_t;
|
13280
|
-
attribute ${
|
13280
|
+
attribute ${P} ${B} a_${L};
|
13281
13281
|
#else
|
13282
|
-
uniform ${
|
13282
|
+
uniform ${P} ${A} u_${L};
|
13283
13283
|
#endif
|
13284
|
-
` :
|
13284
|
+
` : V === "vec4" ? `
|
13285
13285
|
#ifndef HAS_UNIFORM_u_${L}
|
13286
|
-
${
|
13286
|
+
${P} ${A} ${L} = a_${L};
|
13287
13287
|
#else
|
13288
|
-
${
|
13288
|
+
${P} ${A} ${L} = u_${L};
|
13289
13289
|
#endif
|
13290
13290
|
` : `
|
13291
13291
|
#ifndef HAS_UNIFORM_u_${L}
|
13292
|
-
${
|
13292
|
+
${P} ${A} ${L} = unpack_mix_${V}(a_${L}, u_${L}_t);
|
13293
13293
|
#else
|
13294
|
-
${
|
13294
|
+
${P} ${A} ${L} = u_${L};
|
13295
13295
|
#endif
|
13296
13296
|
`;
|
13297
13297
|
}), staticAttributes: o, staticUniforms: m };
|
@@ -13302,17 +13302,17 @@ uniform ${A} ${C} u_${L};
|
|
13302
13302
|
}
|
13303
13303
|
bind(t, n, o, a, h, m, y, v, b) {
|
13304
13304
|
this.context = t;
|
13305
|
-
let
|
13306
|
-
for (let
|
13307
|
-
!this.vao || this.boundProgram !== n || this.boundLayoutVertexBuffer !== o ||
|
13305
|
+
let P = this.boundPaintVertexBuffers.length !== a.length;
|
13306
|
+
for (let A = 0; !P && A < a.length; A++) this.boundPaintVertexBuffers[A] !== a[A] && (P = !0);
|
13307
|
+
!this.vao || this.boundProgram !== n || this.boundLayoutVertexBuffer !== o || P || this.boundIndexBuffer !== h || this.boundVertexOffset !== m || this.boundDynamicVertexBuffer !== y || this.boundDynamicVertexBuffer2 !== v || this.boundDynamicVertexBuffer3 !== b ? this.freshBind(n, o, a, h, m, y, v, b) : (t.bindVertexArray.set(this.vao), y && y.bind(), h && h.dynamicDraw && h.bind(), v && v.bind(), b && b.bind());
|
13308
13308
|
}
|
13309
13309
|
freshBind(t, n, o, a, h, m, y, v) {
|
13310
|
-
const b = t.numAttributes,
|
13311
|
-
this.vao && this.destroy(), this.vao =
|
13312
|
-
for (const L of o) L.enableAttributes(
|
13313
|
-
m && m.enableAttributes(
|
13314
|
-
for (const L of o) L.bind(), L.setVertexAttribPointers(
|
13315
|
-
m && (m.bind(), m.setVertexAttribPointers(
|
13310
|
+
const b = t.numAttributes, P = this.context, A = P.gl;
|
13311
|
+
this.vao && this.destroy(), this.vao = P.createVertexArray(), P.bindVertexArray.set(this.vao), this.boundProgram = t, this.boundLayoutVertexBuffer = n, this.boundPaintVertexBuffers = o, this.boundIndexBuffer = a, this.boundVertexOffset = h, this.boundDynamicVertexBuffer = m, this.boundDynamicVertexBuffer2 = y, this.boundDynamicVertexBuffer3 = v, n.enableAttributes(A, t);
|
13312
|
+
for (const L of o) L.enableAttributes(A, t);
|
13313
|
+
m && m.enableAttributes(A, t), y && y.enableAttributes(A, t), v && v.enableAttributes(A, t), n.bind(), n.setVertexAttribPointers(A, t, h);
|
13314
|
+
for (const L of o) L.bind(), L.setVertexAttribPointers(A, t, h);
|
13315
|
+
m && (m.bind(), m.setVertexAttribPointers(A, t, h)), a && a.bind(), y && (y.bind(), y.setVertexAttribPointers(A, t, h)), v && (v.bind(), v.setVertexAttribPointers(A, t, h)), P.currentNumAttributes = b;
|
13316
13316
|
}
|
13317
13317
|
destroy() {
|
13318
13318
|
this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);
|
@@ -13332,8 +13332,8 @@ uniform ${A} ${C} u_${L};
|
|
13332
13332
|
constructor(t, n, o, a, h, m) {
|
13333
13333
|
const y = t.gl;
|
13334
13334
|
this.program = y.createProgram();
|
13335
|
-
const v = fs(n.staticAttributes), b = o ? o.getBinderAttributes() : [],
|
13336
|
-
for (const le of
|
13335
|
+
const v = fs(n.staticAttributes), b = o ? o.getBinderAttributes() : [], P = v.concat(b), A = Jr.prelude.staticUniforms ? fs(Jr.prelude.staticUniforms) : [], L = n.staticUniforms ? fs(n.staticUniforms) : [], B = o ? o.getBinderUniforms() : [], V = A.concat(L).concat(B), Z = [];
|
13336
|
+
for (const le of V) Z.indexOf(le) < 0 && Z.push(le);
|
13337
13337
|
const j = o ? o.defines() : [];
|
13338
13338
|
h && j.push("#define OVERDRAW_INSPECTOR;"), m && j.push("#define TERRAIN3D;");
|
13339
13339
|
const H = j.concat(Jr.prelude.fragmentSource, n.fragmentSource).join(`
|
@@ -13347,8 +13347,8 @@ uniform ${A} ${C} u_${L};
|
|
13347
13347
|
if (y.shaderSource(ee, K), y.compileShader(ee), !y.getShaderParameter(ee, y.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${y.getShaderInfoLog(ee)}`);
|
13348
13348
|
y.attachShader(this.program, ee), this.attributes = {};
|
13349
13349
|
const ne = {};
|
13350
|
-
this.numAttributes =
|
13351
|
-
for (let le = 0; le < this.numAttributes; le++)
|
13350
|
+
this.numAttributes = P.length;
|
13351
|
+
for (let le = 0; le < this.numAttributes; le++) P[le] && (y.bindAttribLocation(this.program, le, P[le]), this.attributes[P[le]] = le);
|
13352
13352
|
if (y.linkProgram(this.program), !y.getProgramParameter(this.program, y.LINK_STATUS)) throw new Error(`Program failed to link: ${y.getProgramInfoLog(this.program)}`);
|
13353
13353
|
y.deleteShader(ee), y.deleteShader(U);
|
13354
13354
|
for (let le = 0; le < Z.length; le++) {
|
@@ -13360,7 +13360,7 @@ uniform ${A} ${C} u_${L};
|
|
13360
13360
|
}
|
13361
13361
|
this.fixedUniforms = a(t, ne), this.terrainUniforms = ((le, me) => ({ u_depth: new c.aI(le, me.u_depth), u_terrain: new c.aI(le, me.u_terrain), u_terrain_dim: new c.aJ(le, me.u_terrain_dim), u_terrain_matrix: new c.aK(le, me.u_terrain_matrix), u_terrain_unpack: new c.aL(le, me.u_terrain_unpack), u_terrain_exaggeration: new c.aJ(le, me.u_terrain_exaggeration) }))(t, ne), this.binderUniforms = o ? o.getUniforms(t, ne) : [];
|
13362
13362
|
}
|
13363
|
-
draw(t, n, o, a, h, m, y, v, b,
|
13363
|
+
draw(t, n, o, a, h, m, y, v, b, P, A, L, B, V, Z, j, H, K) {
|
13364
13364
|
const U = t.gl;
|
13365
13365
|
if (this.failedToCreate) return;
|
13366
13366
|
if (t.program.set(this.program), t.setDepthMode(o), t.setStencilMode(a), t.setColorMode(h), t.setCullFace(m), v) {
|
@@ -13368,7 +13368,7 @@ uniform ${A} ${C} u_${L};
|
|
13368
13368
|
for (const ne in this.terrainUniforms) this.terrainUniforms[ne].set(v[ne]);
|
13369
13369
|
}
|
13370
13370
|
for (const ne in this.fixedUniforms) this.fixedUniforms[ne].set(y[ne]);
|
13371
|
-
Z && Z.setUniforms(t, this.binderUniforms, B, { zoom:
|
13371
|
+
Z && Z.setUniforms(t, this.binderUniforms, B, { zoom: V });
|
13372
13372
|
let ee = 0;
|
13373
13373
|
switch (n) {
|
13374
13374
|
case U.LINES:
|
@@ -13382,7 +13382,7 @@ uniform ${A} ${C} u_${L};
|
|
13382
13382
|
}
|
13383
13383
|
for (const ne of L.get()) {
|
13384
13384
|
const le = ne.vaos || (ne.vaos = {});
|
13385
|
-
(le[b] || (le[b] = new Ws())).bind(t, this,
|
13385
|
+
(le[b] || (le[b] = new Ws())).bind(t, this, P, Z ? Z.getPaintVertexBuffers() : [], A, ne.vertexOffset, j, H, K), U.drawElements(n, ne.primitiveLength * ee, U.UNSIGNED_SHORT, ne.primitiveOffset * ee * 2);
|
13386
13386
|
}
|
13387
13387
|
}
|
13388
13388
|
}
|
@@ -13395,12 +13395,12 @@ uniform ${A} ${C} u_${L};
|
|
13395
13395
|
var b = new c.A(9);
|
13396
13396
|
return c.A != Float32Array && (b[1] = 0, b[2] = 0, b[3] = 0, b[5] = 0, b[6] = 0, b[7] = 0), b[0] = 1, b[4] = 1, b[8] = 1, b;
|
13397
13397
|
}();
|
13398
|
-
a.properties.get("anchor") === "viewport" && function(b,
|
13399
|
-
var
|
13400
|
-
b[0] = L, b[1] =
|
13401
|
-
}(y, -t.transform.angle), function(b,
|
13402
|
-
var L =
|
13403
|
-
b[0] = L *
|
13398
|
+
a.properties.get("anchor") === "viewport" && function(b, P) {
|
13399
|
+
var A = Math.sin(P), L = Math.cos(P);
|
13400
|
+
b[0] = L, b[1] = A, b[2] = 0, b[3] = -A, b[4] = L, b[5] = 0, b[6] = 0, b[7] = 0, b[8] = 1;
|
13401
|
+
}(y, -t.transform.angle), function(b, P, A) {
|
13402
|
+
var L = P[0], B = P[1], V = P[2];
|
13403
|
+
b[0] = L * A[0] + B * A[3] + V * A[6], b[1] = L * A[1] + B * A[4] + V * A[7], b[2] = L * A[2] + B * A[5] + V * A[8];
|
13404
13404
|
}(m, m, y);
|
13405
13405
|
const v = a.properties.get("color");
|
13406
13406
|
return { u_matrix: u, u_lightpos: m, u_lightintensity: a.properties.get("intensity"), u_lightcolor: [v.r, v.g, v.b], u_vertical_gradient: +n, u_opacity: o };
|
@@ -13424,8 +13424,8 @@ uniform ${A} ${C} u_${L};
|
|
13424
13424
|
const h = u.transform, m = gn(t, h);
|
13425
13425
|
return { u_matrix: pl(u, t, n, a), u_texsize: t.imageAtlasTexture.size, u_ratio: 1 / rt(t, 1, h.zoom), u_device_pixel_ratio: u.pixelRatio, u_image: 0, u_scale: [m, o.fromScale, o.toScale], u_fade: o.t, u_units_to_pixels: [1 / h.pixelsToGLUnits[0], 1 / h.pixelsToGLUnits[1]] };
|
13426
13426
|
}, dl = (u, t, n, o, a, h) => {
|
13427
|
-
const m = u.lineAtlas, y = gn(t, u.transform), v = n.layout.get("line-cap") === "round", b = m.getDash(o.from, v),
|
13428
|
-
return c.e(_s(u, t, n, h), { u_patternscale_a: [y /
|
13427
|
+
const m = u.lineAtlas, y = gn(t, u.transform), v = n.layout.get("line-cap") === "round", b = m.getDash(o.from, v), P = m.getDash(o.to, v), A = b.width * a.fromScale, L = P.width * a.toScale;
|
13428
|
+
return c.e(_s(u, t, n, h), { u_patternscale_a: [y / A, -b.height / 2], u_patternscale_b: [y / L, -P.height / 2], u_sdfgamma: m.width / (256 * Math.min(A, L) * u.pixelRatio) / 2, u_image: 0, u_tex_y_a: b.y, u_tex_y_b: P.y, u_mix: a.t });
|
13429
13429
|
};
|
13430
13430
|
function gn(u, t) {
|
13431
13431
|
return 1 / rt(u, 1, t.tileZoom);
|
@@ -13442,15 +13442,15 @@ uniform ${A} ${C} u_${L};
|
|
13442
13442
|
const t = Math.sin(u), n = Math.cos(u);
|
13443
13443
|
return [(2 * n + 1) / 3, (-Math.sqrt(3) * t - n + 1) / 3, (Math.sqrt(3) * t - n + 1) / 3];
|
13444
13444
|
}
|
13445
|
-
const fl = (u, t, n, o, a, h, m, y, v, b,
|
13446
|
-
const
|
13447
|
-
return { u_is_size_zoom_constant: +(u === "constant" || u === "source"), u_is_size_feature_constant: +(u === "constant" || u === "camera"), u_size_t: t ? t.uSizeT : 0, u_size: t ? t.uSize : 0, u_camera_to_center_distance:
|
13448
|
-
}, ml = (u, t, n, o, a, h, m, y, v, b,
|
13445
|
+
const fl = (u, t, n, o, a, h, m, y, v, b, P, A, L, B) => {
|
13446
|
+
const V = m.transform;
|
13447
|
+
return { u_is_size_zoom_constant: +(u === "constant" || u === "source"), u_is_size_feature_constant: +(u === "constant" || u === "camera"), u_size_t: t ? t.uSizeT : 0, u_size: t ? t.uSize : 0, u_camera_to_center_distance: V.cameraToCenterDistance, u_pitch: V.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +n, u_aspect_ratio: V.width / V.height, u_fade_change: m.options.fadeDuration ? m.symbolFadeChange : 1, u_matrix: y, u_label_plane_matrix: v, u_coord_matrix: b, u_is_text: +A, u_pitch_with_map: +o, u_is_along_line: a, u_is_variable_anchor: h, u_texsize: L, u_texture: 0, u_translation: P, u_pitched_scale: B };
|
13448
|
+
}, ml = (u, t, n, o, a, h, m, y, v, b, P, A, L, B, V) => {
|
13449
13449
|
const Z = m.transform;
|
13450
|
-
return c.e(fl(u, t, n, o, a, h, m, y, v, b,
|
13451
|
-
}, Rc = (u, t, n, o, a, h, m, y, v, b,
|
13452
|
-
const
|
13453
|
-
return { u_image: 0, u_pattern_tl_a:
|
13450
|
+
return c.e(fl(u, t, n, o, a, h, m, y, v, b, P, A, L, V), { u_gamma_scale: o ? Math.cos(Z._pitch) * Z.cameraToCenterDistance : 1, u_device_pixel_ratio: m.pixelRatio, u_is_halo: +B });
|
13451
|
+
}, Rc = (u, t, n, o, a, h, m, y, v, b, P, A, L, B) => c.e(ml(u, t, n, o, a, h, m, y, v, b, P, !0, A, !0, B), { u_texsize_icon: L, u_texture_icon: 1 }), eo = (u, t, n) => ({ u_matrix: u, u_opacity: t, u_color: n }), Wo = (u, t, n, o, a, h) => c.e(function(m, y, v, b) {
|
13452
|
+
const P = v.imageManager.getPattern(m.from.toString()), A = v.imageManager.getPattern(m.to.toString()), { width: L, height: B } = v.imageManager.getPixelSize(), V = Math.pow(2, b.tileID.overscaledZ), Z = b.tileSize * Math.pow(2, v.transform.tileZoom) / V, j = Z * (b.tileID.canonical.x + b.tileID.wrap * V), H = Z * b.tileID.canonical.y;
|
13453
|
+
return { u_image: 0, u_pattern_tl_a: P.tl, u_pattern_br_a: P.br, u_pattern_tl_b: A.tl, u_pattern_br_b: A.br, u_texsize: [L, B], u_mix: y.t, u_pattern_size_a: P.displaySize, u_pattern_size_b: A.displaySize, u_scale_a: y.fromScale, u_scale_b: y.toScale, u_tile_units_to_pixels: 1 / rt(b, 1, v.transform.tileZoom), u_pixel_coord_upper: [j >> 16, H >> 16], u_pixel_coord_lower: [65535 & j, 65535 & H] };
|
13454
13454
|
}(o, h, n, a), { u_matrix: u, u_opacity: t }), to = { fillExtrusion: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_lightpos: new c.aO(u, t.u_lightpos), u_lightintensity: new c.aJ(u, t.u_lightintensity), u_lightcolor: new c.aO(u, t.u_lightcolor), u_vertical_gradient: new c.aJ(u, t.u_vertical_gradient), u_opacity: new c.aJ(u, t.u_opacity) }), fillExtrusionPattern: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_lightpos: new c.aO(u, t.u_lightpos), u_lightintensity: new c.aJ(u, t.u_lightintensity), u_lightcolor: new c.aO(u, t.u_lightcolor), u_vertical_gradient: new c.aJ(u, t.u_vertical_gradient), u_height_factor: new c.aJ(u, t.u_height_factor), u_image: new c.aI(u, t.u_image), u_texsize: new c.aP(u, t.u_texsize), u_pixel_coord_upper: new c.aP(u, t.u_pixel_coord_upper), u_pixel_coord_lower: new c.aP(u, t.u_pixel_coord_lower), u_scale: new c.aO(u, t.u_scale), u_fade: new c.aJ(u, t.u_fade), u_opacity: new c.aJ(u, t.u_opacity) }), fill: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix) }), fillPattern: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_image: new c.aI(u, t.u_image), u_texsize: new c.aP(u, t.u_texsize), u_pixel_coord_upper: new c.aP(u, t.u_pixel_coord_upper), u_pixel_coord_lower: new c.aP(u, t.u_pixel_coord_lower), u_scale: new c.aO(u, t.u_scale), u_fade: new c.aJ(u, t.u_fade) }), fillOutline: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_world: new c.aP(u, t.u_world) }), fillOutlinePattern: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_world: new c.aP(u, t.u_world), u_image: new c.aI(u, t.u_image), u_texsize: new c.aP(u, t.u_texsize), u_pixel_coord_upper: new c.aP(u, t.u_pixel_coord_upper), u_pixel_coord_lower: new c.aP(u, t.u_pixel_coord_lower), u_scale: new c.aO(u, t.u_scale), u_fade: new c.aJ(u, t.u_fade) }), circle: (u, t) => ({ u_camera_to_center_distance: new c.aJ(u, t.u_camera_to_center_distance), u_scale_with_map: new c.aI(u, t.u_scale_with_map), u_pitch_with_map: new c.aI(u, t.u_pitch_with_map), u_extrude_scale: new c.aP(u, t.u_extrude_scale), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_matrix: new c.aK(u, t.u_matrix) }), collisionBox: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_pixel_extrude_scale: new c.aP(u, t.u_pixel_extrude_scale) }), collisionCircle: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_inv_matrix: new c.aK(u, t.u_inv_matrix), u_camera_to_center_distance: new c.aJ(u, t.u_camera_to_center_distance), u_viewport_size: new c.aP(u, t.u_viewport_size) }), debug: (u, t) => ({ u_color: new c.aM(u, t.u_color), u_matrix: new c.aK(u, t.u_matrix), u_overlay: new c.aI(u, t.u_overlay), u_overlay_scale: new c.aJ(u, t.u_overlay_scale) }), clippingMask: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix) }), heatmap: (u, t) => ({ u_extrude_scale: new c.aJ(u, t.u_extrude_scale), u_intensity: new c.aJ(u, t.u_intensity), u_matrix: new c.aK(u, t.u_matrix) }), heatmapTexture: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_world: new c.aP(u, t.u_world), u_image: new c.aI(u, t.u_image), u_color_ramp: new c.aI(u, t.u_color_ramp), u_opacity: new c.aJ(u, t.u_opacity) }), hillshade: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_image: new c.aI(u, t.u_image), u_latrange: new c.aP(u, t.u_latrange), u_light: new c.aP(u, t.u_light), u_shadow: new c.aM(u, t.u_shadow), u_highlight: new c.aM(u, t.u_highlight), u_accent: new c.aM(u, t.u_accent) }), hillshadePrepare: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_image: new c.aI(u, t.u_image), u_dimension: new c.aP(u, t.u_dimension), u_zoom: new c.aJ(u, t.u_zoom), u_unpack: new c.aL(u, t.u_unpack) }), line: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_ratio: new c.aJ(u, t.u_ratio), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_units_to_pixels: new c.aP(u, t.u_units_to_pixels) }), lineGradient: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_ratio: new c.aJ(u, t.u_ratio), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_units_to_pixels: new c.aP(u, t.u_units_to_pixels), u_image: new c.aI(u, t.u_image), u_image_height: new c.aJ(u, t.u_image_height) }), linePattern: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_texsize: new c.aP(u, t.u_texsize), u_ratio: new c.aJ(u, t.u_ratio), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_image: new c.aI(u, t.u_image), u_units_to_pixels: new c.aP(u, t.u_units_to_pixels), u_scale: new c.aO(u, t.u_scale), u_fade: new c.aJ(u, t.u_fade) }), lineSDF: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_ratio: new c.aJ(u, t.u_ratio), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_units_to_pixels: new c.aP(u, t.u_units_to_pixels), u_patternscale_a: new c.aP(u, t.u_patternscale_a), u_patternscale_b: new c.aP(u, t.u_patternscale_b), u_sdfgamma: new c.aJ(u, t.u_sdfgamma), u_image: new c.aI(u, t.u_image), u_tex_y_a: new c.aJ(u, t.u_tex_y_a), u_tex_y_b: new c.aJ(u, t.u_tex_y_b), u_mix: new c.aJ(u, t.u_mix) }), raster: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_tl_parent: new c.aP(u, t.u_tl_parent), u_scale_parent: new c.aJ(u, t.u_scale_parent), u_buffer_scale: new c.aJ(u, t.u_buffer_scale), u_fade_t: new c.aJ(u, t.u_fade_t), u_opacity: new c.aJ(u, t.u_opacity), u_image0: new c.aI(u, t.u_image0), u_image1: new c.aI(u, t.u_image1), u_brightness_low: new c.aJ(u, t.u_brightness_low), u_brightness_high: new c.aJ(u, t.u_brightness_high), u_saturation_factor: new c.aJ(u, t.u_saturation_factor), u_contrast_factor: new c.aJ(u, t.u_contrast_factor), u_spin_weights: new c.aO(u, t.u_spin_weights) }), symbolIcon: (u, t) => ({ u_is_size_zoom_constant: new c.aI(u, t.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aI(u, t.u_is_size_feature_constant), u_size_t: new c.aJ(u, t.u_size_t), u_size: new c.aJ(u, t.u_size), u_camera_to_center_distance: new c.aJ(u, t.u_camera_to_center_distance), u_pitch: new c.aJ(u, t.u_pitch), u_rotate_symbol: new c.aI(u, t.u_rotate_symbol), u_aspect_ratio: new c.aJ(u, t.u_aspect_ratio), u_fade_change: new c.aJ(u, t.u_fade_change), u_matrix: new c.aK(u, t.u_matrix), u_label_plane_matrix: new c.aK(u, t.u_label_plane_matrix), u_coord_matrix: new c.aK(u, t.u_coord_matrix), u_is_text: new c.aI(u, t.u_is_text), u_pitch_with_map: new c.aI(u, t.u_pitch_with_map), u_is_along_line: new c.aI(u, t.u_is_along_line), u_is_variable_anchor: new c.aI(u, t.u_is_variable_anchor), u_texsize: new c.aP(u, t.u_texsize), u_texture: new c.aI(u, t.u_texture), u_translation: new c.aP(u, t.u_translation), u_pitched_scale: new c.aJ(u, t.u_pitched_scale) }), symbolSDF: (u, t) => ({ u_is_size_zoom_constant: new c.aI(u, t.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aI(u, t.u_is_size_feature_constant), u_size_t: new c.aJ(u, t.u_size_t), u_size: new c.aJ(u, t.u_size), u_camera_to_center_distance: new c.aJ(u, t.u_camera_to_center_distance), u_pitch: new c.aJ(u, t.u_pitch), u_rotate_symbol: new c.aI(u, t.u_rotate_symbol), u_aspect_ratio: new c.aJ(u, t.u_aspect_ratio), u_fade_change: new c.aJ(u, t.u_fade_change), u_matrix: new c.aK(u, t.u_matrix), u_label_plane_matrix: new c.aK(u, t.u_label_plane_matrix), u_coord_matrix: new c.aK(u, t.u_coord_matrix), u_is_text: new c.aI(u, t.u_is_text), u_pitch_with_map: new c.aI(u, t.u_pitch_with_map), u_is_along_line: new c.aI(u, t.u_is_along_line), u_is_variable_anchor: new c.aI(u, t.u_is_variable_anchor), u_texsize: new c.aP(u, t.u_texsize), u_texture: new c.aI(u, t.u_texture), u_gamma_scale: new c.aJ(u, t.u_gamma_scale), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_is_halo: new c.aI(u, t.u_is_halo), u_translation: new c.aP(u, t.u_translation), u_pitched_scale: new c.aJ(u, t.u_pitched_scale) }), symbolTextAndIcon: (u, t) => ({ u_is_size_zoom_constant: new c.aI(u, t.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aI(u, t.u_is_size_feature_constant), u_size_t: new c.aJ(u, t.u_size_t), u_size: new c.aJ(u, t.u_size), u_camera_to_center_distance: new c.aJ(u, t.u_camera_to_center_distance), u_pitch: new c.aJ(u, t.u_pitch), u_rotate_symbol: new c.aI(u, t.u_rotate_symbol), u_aspect_ratio: new c.aJ(u, t.u_aspect_ratio), u_fade_change: new c.aJ(u, t.u_fade_change), u_matrix: new c.aK(u, t.u_matrix), u_label_plane_matrix: new c.aK(u, t.u_label_plane_matrix), u_coord_matrix: new c.aK(u, t.u_coord_matrix), u_is_text: new c.aI(u, t.u_is_text), u_pitch_with_map: new c.aI(u, t.u_pitch_with_map), u_is_along_line: new c.aI(u, t.u_is_along_line), u_is_variable_anchor: new c.aI(u, t.u_is_variable_anchor), u_texsize: new c.aP(u, t.u_texsize), u_texsize_icon: new c.aP(u, t.u_texsize_icon), u_texture: new c.aI(u, t.u_texture), u_texture_icon: new c.aI(u, t.u_texture_icon), u_gamma_scale: new c.aJ(u, t.u_gamma_scale), u_device_pixel_ratio: new c.aJ(u, t.u_device_pixel_ratio), u_is_halo: new c.aI(u, t.u_is_halo), u_translation: new c.aP(u, t.u_translation), u_pitched_scale: new c.aJ(u, t.u_pitched_scale) }), background: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_opacity: new c.aJ(u, t.u_opacity), u_color: new c.aM(u, t.u_color) }), backgroundPattern: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_opacity: new c.aJ(u, t.u_opacity), u_image: new c.aI(u, t.u_image), u_pattern_tl_a: new c.aP(u, t.u_pattern_tl_a), u_pattern_br_a: new c.aP(u, t.u_pattern_br_a), u_pattern_tl_b: new c.aP(u, t.u_pattern_tl_b), u_pattern_br_b: new c.aP(u, t.u_pattern_br_b), u_texsize: new c.aP(u, t.u_texsize), u_mix: new c.aJ(u, t.u_mix), u_pattern_size_a: new c.aP(u, t.u_pattern_size_a), u_pattern_size_b: new c.aP(u, t.u_pattern_size_b), u_scale_a: new c.aJ(u, t.u_scale_a), u_scale_b: new c.aJ(u, t.u_scale_b), u_pixel_coord_upper: new c.aP(u, t.u_pixel_coord_upper), u_pixel_coord_lower: new c.aP(u, t.u_pixel_coord_lower), u_tile_units_to_pixels: new c.aJ(u, t.u_tile_units_to_pixels) }), terrain: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_texture: new c.aI(u, t.u_texture), u_ele_delta: new c.aJ(u, t.u_ele_delta), u_fog_matrix: new c.aK(u, t.u_fog_matrix), u_fog_color: new c.aM(u, t.u_fog_color), u_fog_ground_blend: new c.aJ(u, t.u_fog_ground_blend), u_fog_ground_blend_opacity: new c.aJ(u, t.u_fog_ground_blend_opacity), u_horizon_color: new c.aM(u, t.u_horizon_color), u_horizon_fog_blend: new c.aJ(u, t.u_horizon_fog_blend) }), terrainDepth: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_ele_delta: new c.aJ(u, t.u_ele_delta) }), terrainCoords: (u, t) => ({ u_matrix: new c.aK(u, t.u_matrix), u_texture: new c.aI(u, t.u_texture), u_terrain_coords_id: new c.aJ(u, t.u_terrain_coords_id), u_ele_delta: new c.aJ(u, t.u_ele_delta) }), sky: (u, t) => ({ u_sky_color: new c.aM(u, t.u_sky_color), u_horizon_color: new c.aM(u, t.u_horizon_color), u_horizon: new c.aJ(u, t.u_horizon), u_sky_horizon_blend: new c.aJ(u, t.u_sky_horizon_blend) }) };
|
13455
13455
|
class Xo {
|
13456
13456
|
constructor(t, n, o) {
|
@@ -13951,25 +13951,25 @@ uniform ${A} ${C} u_${L};
|
|
13951
13951
|
let bs;
|
13952
13952
|
function kl(u, t, n, o, a) {
|
13953
13953
|
const h = u.context, m = h.gl, y = u.useProgram("collisionBox"), v = [];
|
13954
|
-
let b = 0,
|
13954
|
+
let b = 0, P = 0;
|
13955
13955
|
for (let H = 0; H < o.length; H++) {
|
13956
13956
|
const K = o[H], U = t.getTile(K).getBucket(n);
|
13957
13957
|
if (!U) continue;
|
13958
13958
|
const ee = a ? U.textCollisionBox : U.iconCollisionBox, ne = U.collisionCircleArray;
|
13959
13959
|
if (ne.length > 0) {
|
13960
13960
|
const le = c.H();
|
13961
|
-
c.aR(le, U.placementInvProjMatrix, u.transform.glCoordMatrix), c.aR(le, le, U.placementViewportMatrix), v.push({ circleArray: ne, circleOffset:
|
13961
|
+
c.aR(le, U.placementInvProjMatrix, u.transform.glCoordMatrix), c.aR(le, le, U.placementViewportMatrix), v.push({ circleArray: ne, circleOffset: P, transform: K.posMatrix, invTransform: le, coord: K }), b += ne.length / 4, P = b;
|
13962
13962
|
}
|
13963
|
-
ee && y.draw(h, m.LINES, ht.disabled, Ut.disabled, u.colorModeForRenderPass(), zt.disabled, { u_matrix: K.posMatrix, u_pixel_extrude_scale: [1 / (
|
13963
|
+
ee && y.draw(h, m.LINES, ht.disabled, Ut.disabled, u.colorModeForRenderPass(), zt.disabled, { u_matrix: K.posMatrix, u_pixel_extrude_scale: [1 / (A = u.transform).width, 1 / A.height] }, u.style.map.terrain && u.style.map.terrain.getTerrainData(K), n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, null, u.transform.zoom, null, null, ee.collisionVertexBuffer);
|
13964
13964
|
}
|
13965
|
-
var
|
13965
|
+
var A;
|
13966
13966
|
if (!a || !v.length) return;
|
13967
13967
|
const L = u.useProgram("collisionCircle"), B = new c.aS();
|
13968
13968
|
B.resize(4 * b), B._trim();
|
13969
|
-
let
|
13969
|
+
let V = 0;
|
13970
13970
|
for (const H of v) for (let K = 0; K < H.circleArray.length / 4; K++) {
|
13971
13971
|
const U = 4 * K, ee = H.circleArray[U + 0], ne = H.circleArray[U + 1], le = H.circleArray[U + 2], me = H.circleArray[U + 3];
|
13972
|
-
B.emplace(
|
13972
|
+
B.emplace(V++, ee, ne, le, me, 0), B.emplace(V++, ee, ne, le, me, 1), B.emplace(V++, ee, ne, le, me, 2), B.emplace(V++, ee, ne, le, me, 3);
|
13973
13973
|
}
|
13974
13974
|
(!bs || bs.length < 2 * b) && (bs = function(H) {
|
13975
13975
|
const K = 2 * H, U = new c.aU();
|
@@ -14005,16 +14005,16 @@ uniform ${A} ${C} u_${L};
|
|
14005
14005
|
}
|
14006
14006
|
return u.add(o);
|
14007
14007
|
}
|
14008
|
-
function ao(u, t, n, o, a, h, m, y, v, b,
|
14009
|
-
const
|
14008
|
+
function ao(u, t, n, o, a, h, m, y, v, b, P, A, L, B) {
|
14009
|
+
const V = u.text.placedSymbolArray, Z = u.text.dynamicLayoutVertexArray, j = u.icon.dynamicLayoutVertexArray, H = {};
|
14010
14010
|
Z.clear();
|
14011
|
-
for (let K = 0; K <
|
14012
|
-
const U =
|
14011
|
+
for (let K = 0; K < V.length; K++) {
|
14012
|
+
const U = V.get(K), ee = U.hidden || !U.crossTileID || u.allowVerticalPlacement && !U.placedOrientation ? null : o[U.crossTileID];
|
14013
14013
|
if (ee) {
|
14014
|
-
const ne = new c.P(U.anchorX, U.anchorY), le = { getElevation: B, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection:
|
14014
|
+
const ne = new c.P(U.anchorX, U.anchorY), le = { getElevation: B, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection: P, projectionCache: null, tileAnchorPoint: ne, translation: A, unwrappedTileID: L }, me = n ? G(ne, m, B) : de(ne.x, ne.y, le), be = z(a.cameraToCenterDistance, me.signedDistanceFromCamera);
|
14015
14015
|
let ze = c.aj(u.textSizeData, v, U) * be / c.aq;
|
14016
14016
|
n && (ze *= u.tilePixelRatio / y);
|
14017
|
-
const { width: Le, height: we, anchor: Se, textOffset: Oe, textBoxScale: et } = ee, Pe = so(Se, Le, we, Oe, et, ze), ke =
|
14017
|
+
const { width: Le, height: we, anchor: Se, textOffset: Oe, textBoxScale: et } = ee, Pe = so(Se, Le, we, Oe, et, ze), ke = P.getPitchedTextCorrection(a, ne.add(new c.P(A[0], A[1])), L), Ke = oo(me.point, le, t, Pe, a.angle, ke), Lt = u.allowVerticalPlacement && U.placedOrientation === c.ai.vertical ? Math.PI / 2 : 0;
|
14018
14018
|
for (let st = 0; st < U.numGlyphs; st++) c.ak(Z, Ke, Lt);
|
14019
14019
|
b && U.associatedIconIndex >= 0 && (H[U.associatedIconIndex] = { shiftedAnchor: Ke, angle: Lt });
|
14020
14020
|
} else He(U.numGlyphs, Z);
|
@@ -14038,16 +14038,16 @@ uniform ${A} ${C} u_${L};
|
|
14038
14038
|
function oa(u, t, n) {
|
14039
14039
|
return n.iconsInText && t ? "symbolTextAndIcon" : u ? "symbolSDF" : "symbolIcon";
|
14040
14040
|
}
|
14041
|
-
function Yr(u, t, n, o, a, h, m, y, v, b,
|
14042
|
-
const L = u.context, B = L.gl,
|
14041
|
+
function Yr(u, t, n, o, a, h, m, y, v, b, P, A) {
|
14042
|
+
const L = u.context, B = L.gl, V = u.transform, Z = Gs(), j = y === "map", H = v === "map", K = y !== "viewport" && n.layout.get("symbol-placement") !== "point", U = j && !H && !K, ee = !H && K, ne = !n.layout.get("symbol-sort-key").isConstant();
|
14043
14043
|
let le = !1;
|
14044
|
-
const me = u.depthModeForSublayer(0, ht.ReadOnly), be = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ze = [], Le = Z.getCircleRadiusCorrection(
|
14044
|
+
const me = u.depthModeForSublayer(0, ht.ReadOnly), be = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ze = [], Le = Z.getCircleRadiusCorrection(V);
|
14045
14045
|
for (const we of o) {
|
14046
14046
|
const Se = t.getTile(we), Oe = Se.getBucket(n);
|
14047
14047
|
if (!Oe) continue;
|
14048
14048
|
const et = a ? Oe.text : Oe.icon;
|
14049
14049
|
if (!et || !et.segments.get().length || !et.hasVisibleVertices) continue;
|
14050
|
-
const Pe = et.programConfigurations.get(n.id), ke = a || Oe.sdfIcons, Ke = a ? Oe.textSizeData : Oe.iconSizeData, Lt = H ||
|
14050
|
+
const Pe = et.programConfigurations.get(n.id), ke = a || Oe.sdfIcons, Ke = a ? Oe.textSizeData : Oe.iconSizeData, Lt = H || V.pitch !== 0, st = u.useProgram(oa(ke, a, Oe), Pe), ut = c.ah(Ke, V.zoom), Rt = u.style.map.terrain && u.style.map.terrain.getTerrainData(we);
|
14051
14051
|
let fi, nr, Bt, Di, Ai = [0, 0], mi = null;
|
14052
14052
|
if (a) nr = Se.glyphAtlasTexture, Bt = B.LINEAR, fi = Se.glyphAtlasTexture.size, Oe.iconsInText && (Ai = Se.imageAtlasTexture.size, mi = Se.imageAtlasTexture, Di = Lt || u.options.rotating || u.options.zooming || Ke.kind === "composite" || Ke.kind === "camera" ? B.LINEAR : B.NEAREST);
|
14053
14053
|
else {
|
@@ -14057,7 +14057,7 @@ uniform ${A} ${C} u_${L};
|
|
14057
14057
|
const gi = rt(Se, 1, u.transform.zoom), sr = ee ? we.posMatrix : sa, In = Wr(sr, H, j, u.transform, gi), So = yr(sr, H, j, u.transform, gi), Hn = yr(we.posMatrix, H, j, u.transform, gi), Pn = Z.translatePosition(u.transform, Se, h, m), To = be && Oe.hasTextData(), Fa = n.layout.get("icon-text-fit") !== "none" && To && Oe.hasIconData();
|
14058
14058
|
if (K) {
|
14059
14059
|
const jt = u.style.map.terrain ? (Oa, ri) => u.style.map.terrain.getElevation(we, Oa, ri) : null, Xn = n.layout.get("text-rotation-alignment") === "map";
|
14060
|
-
O(Oe, we.posMatrix, u, a, In, Hn, H, b, Xn, Z, we.toUnwrapped(),
|
14060
|
+
O(Oe, we.posMatrix, u, a, In, Hn, H, b, Xn, Z, we.toUnwrapped(), V.width, V.height, Pn, jt);
|
14061
14061
|
}
|
14062
14062
|
const li = we.posMatrix, or = a && be || Fa, tn = K || or ? sa : In, Wn = So, _i = ke && n.paint.get(a ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
14063
14063
|
let yi;
|
@@ -14074,14 +14074,14 @@ uniform ${A} ${C} u_${L};
|
|
14074
14074
|
const Se = we.state;
|
14075
14075
|
if (L.activeTexture.set(B.TEXTURE0), Se.atlasTexture.bind(Se.atlasInterpolation, B.CLAMP_TO_EDGE), Se.atlasTextureIcon && (L.activeTexture.set(B.TEXTURE1), Se.atlasTextureIcon && Se.atlasTextureIcon.bind(Se.atlasInterpolationIcon, B.CLAMP_TO_EDGE)), Se.isSDF) {
|
14076
14076
|
const Oe = Se.uniformValues;
|
14077
|
-
Se.hasHalo && (Oe.u_is_halo = 1, yn(Se.buffers, we.segments, n, u, Se.program, me,
|
14077
|
+
Se.hasHalo && (Oe.u_is_halo = 1, yn(Se.buffers, we.segments, n, u, Se.program, me, P, A, Oe, we.terrainData)), Oe.u_is_halo = 0;
|
14078
14078
|
}
|
14079
|
-
yn(Se.buffers, we.segments, n, u, Se.program, me,
|
14079
|
+
yn(Se.buffers, we.segments, n, u, Se.program, me, P, A, Se.uniformValues, we.terrainData);
|
14080
14080
|
}
|
14081
14081
|
}
|
14082
14082
|
function yn(u, t, n, o, a, h, m, y, v, b) {
|
14083
|
-
const
|
14084
|
-
a.draw(
|
14083
|
+
const P = o.context;
|
14084
|
+
a.draw(P, P.gl.TRIANGLES, h, m, y, zt.disabled, v, b, n.id, u.layoutVertexBuffer, u.indexBuffer, t, n.paint, o.transform.zoom, u.programConfigurations.get(n.id), u.dynamicLayoutVertexBuffer, u.opacityVertexBuffer);
|
14085
14085
|
}
|
14086
14086
|
function Zi(u, t, n, o, a) {
|
14087
14087
|
if (!n || !o || !o.imageAtlas) return;
|
@@ -14094,73 +14094,73 @@ uniform ${A} ${C} u_${L};
|
|
14094
14094
|
m && y && u.setConstantPatternPositions(m, y);
|
14095
14095
|
}
|
14096
14096
|
function aa(u, t, n, o, a, h, m) {
|
14097
|
-
const y = u.context.gl, v = "fill-pattern", b = n.paint.get(v),
|
14098
|
-
let L, B,
|
14099
|
-
m ? (B =
|
14097
|
+
const y = u.context.gl, v = "fill-pattern", b = n.paint.get(v), P = b && b.constantOr(1), A = n.getCrossfadeParameters();
|
14098
|
+
let L, B, V, Z, j;
|
14099
|
+
m ? (B = P && !n.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", L = y.LINES) : (B = P ? "fillPattern" : "fill", L = y.TRIANGLES);
|
14100
14100
|
const H = b.constantOr(null);
|
14101
14101
|
for (const K of o) {
|
14102
14102
|
const U = t.getTile(K);
|
14103
|
-
if (
|
14103
|
+
if (P && !U.patternsLoaded()) continue;
|
14104
14104
|
const ee = U.getBucket(n);
|
14105
14105
|
if (!ee) continue;
|
14106
14106
|
const ne = ee.programConfigurations.get(n.id), le = u.useProgram(B, ne), me = u.style.map.terrain && u.style.map.terrain.getTerrainData(K);
|
14107
|
-
|
14107
|
+
P && (u.context.activeTexture.set(y.TEXTURE0), U.imageAtlasTexture.bind(y.LINEAR, y.CLAMP_TO_EDGE), ne.updatePaintBuffers(A)), Zi(ne, v, H, U, n);
|
14108
14108
|
const be = me ? K : null, ze = u.translatePosMatrix(be ? be.posMatrix : K.posMatrix, U, n.paint.get("fill-translate"), n.paint.get("fill-translate-anchor"));
|
14109
14109
|
if (m) {
|
14110
14110
|
Z = ee.indexBuffer2, j = ee.segments2;
|
14111
14111
|
const Le = [y.drawingBufferWidth, y.drawingBufferHeight];
|
14112
|
-
|
14113
|
-
} else Z = ee.indexBuffer, j = ee.segments,
|
14114
|
-
le.draw(u.context, L, a, u.stencilModeForClipping(K), h, zt.disabled,
|
14112
|
+
V = B === "fillOutlinePattern" && P ? Mc(ze, u, A, U, Le) : Ec(ze, Le);
|
14113
|
+
} else Z = ee.indexBuffer, j = ee.segments, V = P ? Bn(ze, u, A, U) : ms(ze);
|
14114
|
+
le.draw(u.context, L, a, u.stencilModeForClipping(K), h, zt.disabled, V, me, n.id, ee.layoutVertexBuffer, Z, j, n.paint, u.transform.zoom, ne);
|
14115
14115
|
}
|
14116
14116
|
}
|
14117
14117
|
function lo(u, t, n, o, a, h, m) {
|
14118
|
-
const y = u.context, v = y.gl, b = "fill-extrusion-pattern",
|
14118
|
+
const y = u.context, v = y.gl, b = "fill-extrusion-pattern", P = n.paint.get(b), A = P.constantOr(1), L = n.getCrossfadeParameters(), B = n.paint.get("fill-extrusion-opacity"), V = P.constantOr(null);
|
14119
14119
|
for (const Z of o) {
|
14120
14120
|
const j = t.getTile(Z), H = j.getBucket(n);
|
14121
14121
|
if (!H) continue;
|
14122
|
-
const K = u.style.map.terrain && u.style.map.terrain.getTerrainData(Z), U = H.programConfigurations.get(n.id), ee = u.useProgram(
|
14123
|
-
|
14124
|
-
const ne = u.translatePosMatrix(Z.posMatrix, j, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), le = n.paint.get("fill-extrusion-vertical-gradient"), me =
|
14122
|
+
const K = u.style.map.terrain && u.style.map.terrain.getTerrainData(Z), U = H.programConfigurations.get(n.id), ee = u.useProgram(A ? "fillExtrusionPattern" : "fillExtrusion", U);
|
14123
|
+
A && (u.context.activeTexture.set(v.TEXTURE0), j.imageAtlasTexture.bind(v.LINEAR, v.CLAMP_TO_EDGE), U.updatePaintBuffers(L)), Zi(U, b, V, j, n);
|
14124
|
+
const ne = u.translatePosMatrix(Z.posMatrix, j, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), le = n.paint.get("fill-extrusion-vertical-gradient"), me = A ? Ys(ne, u, le, B, Z, L, j) : Ks(ne, u, le, B);
|
14125
14125
|
ee.draw(y, y.gl.TRIANGLES, a, h, m, zt.backCCW, me, K, n.id, H.layoutVertexBuffer, H.indexBuffer, H.segments, n.paint, u.transform.zoom, U, u.style.map.terrain && H.centroidVertexBuffer);
|
14126
14126
|
}
|
14127
14127
|
}
|
14128
14128
|
function la(u, t, n, o, a, h, m) {
|
14129
14129
|
const y = u.context, v = y.gl, b = n.fbo;
|
14130
14130
|
if (!b) return;
|
14131
|
-
const
|
14132
|
-
y.activeTexture.set(v.TEXTURE0), v.bindTexture(v.TEXTURE_2D, b.colorAttachment.get()),
|
14133
|
-
const j =
|
14134
|
-
let U =
|
14135
|
-
|
14131
|
+
const P = u.useProgram("hillshade"), A = u.style.map.terrain && u.style.map.terrain.getTerrainData(t);
|
14132
|
+
y.activeTexture.set(v.TEXTURE0), v.bindTexture(v.TEXTURE_2D, b.colorAttachment.get()), P.draw(y, v.TRIANGLES, a, h, m, zt.disabled, ((L, B, V, Z) => {
|
14133
|
+
const j = V.paint.get("hillshade-shadow-color"), H = V.paint.get("hillshade-highlight-color"), K = V.paint.get("hillshade-accent-color");
|
14134
|
+
let U = V.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
|
14135
|
+
V.paint.get("hillshade-illumination-anchor") === "viewport" && (U -= L.transform.angle);
|
14136
14136
|
const ee = !L.options.moving;
|
14137
|
-
return { u_matrix: Z ? Z.posMatrix : L.transform.calculatePosMatrix(B.tileID.toUnwrapped(), ee), u_image: 0, u_latrange: qi(0, B.tileID), u_light: [
|
14138
|
-
})(u, n, o,
|
14137
|
+
return { u_matrix: Z ? Z.posMatrix : L.transform.calculatePosMatrix(B.tileID.toUnwrapped(), ee), u_image: 0, u_latrange: qi(0, B.tileID), u_light: [V.paint.get("hillshade-exaggeration"), U], u_shadow: j, u_highlight: H, u_accent: K };
|
14138
|
+
})(u, n, o, A ? t : null), A, o.id, u.rasterBoundsBuffer, u.quadTriangleIndexBuffer, u.rasterBoundsSegments);
|
14139
14139
|
}
|
14140
14140
|
function xn(u, t, n, o, a, h) {
|
14141
14141
|
const m = u.context, y = m.gl, v = t.dem;
|
14142
14142
|
if (v && v.data) {
|
14143
|
-
const b = v.dim,
|
14144
|
-
if (m.activeTexture.set(y.TEXTURE1), m.pixelStoreUnpackPremultiplyAlpha.set(!1), t.demTexture = t.demTexture || u.getTileTexture(
|
14143
|
+
const b = v.dim, P = v.stride, A = v.getPixels();
|
14144
|
+
if (m.activeTexture.set(y.TEXTURE1), m.pixelStoreUnpackPremultiplyAlpha.set(!1), t.demTexture = t.demTexture || u.getTileTexture(P), t.demTexture) {
|
14145
14145
|
const B = t.demTexture;
|
14146
|
-
B.update(
|
14147
|
-
} else t.demTexture = new St(m,
|
14146
|
+
B.update(A, { premultiply: !1 }), B.bind(y.NEAREST, y.CLAMP_TO_EDGE);
|
14147
|
+
} else t.demTexture = new St(m, A, y.RGBA, { premultiply: !1 }), t.demTexture.bind(y.NEAREST, y.CLAMP_TO_EDGE);
|
14148
14148
|
m.activeTexture.set(y.TEXTURE0);
|
14149
14149
|
let L = t.fbo;
|
14150
14150
|
if (!L) {
|
14151
14151
|
const B = new St(m, { width: b, height: b, data: null }, y.RGBA);
|
14152
14152
|
B.bind(y.LINEAR, y.CLAMP_TO_EDGE), L = t.fbo = m.createFramebuffer(b, b, !0, !1), L.colorAttachment.set(B.texture);
|
14153
14153
|
}
|
14154
|
-
m.bindFramebuffer.set(L.framebuffer), m.viewport.set([0, 0, b, b]), u.useProgram("hillshadePrepare").draw(m, y.TRIANGLES, o, a, h, zt.disabled, ((B,
|
14155
|
-
const Z =
|
14156
|
-
return c.aQ(j, 0, c.X, -c.X, 0, 0, 1), c.J(j, j, [0, -c.X, 0]), { u_matrix: j, u_image: 1, u_dimension: [Z, Z], u_zoom: B.overscaledZ, u_unpack:
|
14154
|
+
m.bindFramebuffer.set(L.framebuffer), m.viewport.set([0, 0, b, b]), u.useProgram("hillshadePrepare").draw(m, y.TRIANGLES, o, a, h, zt.disabled, ((B, V) => {
|
14155
|
+
const Z = V.stride, j = c.H();
|
14156
|
+
return c.aQ(j, 0, c.X, -c.X, 0, 0, 1), c.J(j, j, [0, -c.X, 0]), { u_matrix: j, u_image: 1, u_dimension: [Z, Z], u_zoom: B.overscaledZ, u_unpack: V.getUnpackVector() };
|
14157
14157
|
})(t.tileID, v), null, n.id, u.rasterBoundsBuffer, u.quadTriangleIndexBuffer, u.rasterBoundsSegments), t.needsHillshadePrepare = !1;
|
14158
14158
|
}
|
14159
14159
|
}
|
14160
14160
|
function co(u, t, n, o, a, h) {
|
14161
14161
|
const m = o.paint.get("raster-fade-duration");
|
14162
14162
|
if (!h && m > 0) {
|
14163
|
-
const y = ae.now(), v = (y - u.timeAdded) / m, b = t ? (y - t.timeAdded) / m : -1,
|
14163
|
+
const y = ae.now(), v = (y - u.timeAdded) / m, b = t ? (y - t.timeAdded) / m : -1, P = n.getSource(), A = a.coveringZoomLevel({ tileSize: P.tileSize, roundZoom: P.roundZoom }), L = !t || Math.abs(t.tileID.overscaledZ - A) > Math.abs(u.tileID.overscaledZ - A), B = L && u.refreshedUponExpiration ? 1 : c.ad(L ? v : 1 - b, 0, 1);
|
14164
14164
|
return u.refreshedUponExpiration && v >= 1 && (u.refreshedUponExpiration = !1), t ? { opacity: 1, mix: 1 - B } : { opacity: B, mix: 0 };
|
14165
14165
|
}
|
14166
14166
|
return { opacity: 1, mix: 0 };
|
@@ -14177,24 +14177,24 @@ uniform ${A} ${C} u_${L};
|
|
14177
14177
|
y.enable(y.SCISSOR_TEST), y.scissor(t * u.pixelRatio, n * u.pixelRatio, o * u.pixelRatio, a * u.pixelRatio), m.clear({ color: h }), y.disable(y.SCISSOR_TEST);
|
14178
14178
|
}
|
14179
14179
|
function gt(u, t, n) {
|
14180
|
-
const o = u.context, a = o.gl, h = n.posMatrix, m = u.useProgram("debug"), y = ht.disabled, v = Ut.disabled, b = u.colorModeForRenderPass(),
|
14180
|
+
const o = u.context, a = o.gl, h = n.posMatrix, m = u.useProgram("debug"), y = ht.disabled, v = Ut.disabled, b = u.colorModeForRenderPass(), P = "$debug", A = u.style.map.terrain && u.style.map.terrain.getTerrainData(n);
|
14181
14181
|
o.activeTexture.set(a.TEXTURE0);
|
14182
|
-
const L = t.getTileByID(n.key).latestRawTileData, B = Math.floor((L && L.byteLength || 0) / 1024),
|
14182
|
+
const L = t.getTileByID(n.key).latestRawTileData, B = Math.floor((L && L.byteLength || 0) / 1024), V = t.getTile(n).tileSize, Z = 512 / Math.min(V, 512) * (n.overscaledZ / u.transform.zoom) * 0.5;
|
14183
14183
|
let j = n.canonical.toString();
|
14184
14184
|
n.overscaledZ !== n.canonical.z && (j += ` => ${n.overscaledZ}`), function(H, K) {
|
14185
14185
|
H.initDebugOverlayCanvas();
|
14186
14186
|
const U = H.debugOverlayCanvas, ee = H.context.gl, ne = H.debugOverlayCanvas.getContext("2d");
|
14187
14187
|
ne.clearRect(0, 0, U.width, U.height), ne.shadowColor = "white", ne.shadowBlur = 2, ne.lineWidth = 1.5, ne.strokeStyle = "white", ne.textBaseline = "top", ne.font = "bold 36px Open Sans, sans-serif", ne.fillText(K, 5, 5), ne.strokeText(K, 5, 5), H.debugOverlayTexture.update(U), H.debugOverlayTexture.bind(ee.LINEAR, ee.CLAMP_TO_EDGE);
|
14188
|
-
}(u, `${j} ${B}kB`), m.draw(o, a.TRIANGLES, y, v, kt.alphaBlended, zt.disabled, Kr(h, c.aN.transparent, Z), null,
|
14188
|
+
}(u, `${j} ${B}kB`), m.draw(o, a.TRIANGLES, y, v, kt.alphaBlended, zt.disabled, Kr(h, c.aN.transparent, Z), null, P, u.debugBuffer, u.quadTriangleIndexBuffer, u.debugSegments), m.draw(o, a.LINE_STRIP, y, v, b, zt.disabled, Kr(h, c.aN.red), A, P, u.debugBuffer, u.tileBorderIndexBuffer, u.debugSegments);
|
14189
14189
|
}
|
14190
14190
|
function Ss(u, t, n) {
|
14191
14191
|
const o = u.context, a = o.gl, h = u.colorModeForRenderPass(), m = new ht(a.LEQUAL, ht.ReadWrite, u.depthRangeFor3D), y = u.useProgram("terrain"), v = t.getTerrainMesh();
|
14192
14192
|
o.bindFramebuffer.set(null), o.viewport.set([0, 0, u.width, u.height]);
|
14193
14193
|
for (const b of n) {
|
14194
|
-
const
|
14195
|
-
o.activeTexture.set(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D,
|
14196
|
-
const L = u.transform.calculatePosMatrix(b.tileID.toUnwrapped()), B = t.getMeshFrameDelta(u.transform.zoom),
|
14197
|
-
y.draw(o, a.TRIANGLES, m, Ut.disabled, h, zt.backCCW, Z,
|
14194
|
+
const P = u.renderToTexture.getTexture(b), A = t.getTerrainData(b.tileID);
|
14195
|
+
o.activeTexture.set(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, P.texture);
|
14196
|
+
const L = u.transform.calculatePosMatrix(b.tileID.toUnwrapped()), B = t.getMeshFrameDelta(u.transform.zoom), V = u.transform.calculateFogMatrix(b.tileID.toUnwrapped()), Z = Ho(L, B, V, u.style.sky, u.transform.pitch);
|
14197
|
+
y.draw(o, a.TRIANGLES, m, Ut.disabled, h, zt.backCCW, Z, A, "terrain", v.vertexBuffer, v.indexBuffer, v.segments);
|
14198
14198
|
}
|
14199
14199
|
}
|
14200
14200
|
class Ml {
|
@@ -14282,8 +14282,8 @@ uniform ${A} ${C} u_${L};
|
|
14282
14282
|
this.style = t, this.options = n, this.lineAtlas = t.lineAtlas, this.imageManager = t.imageManager, this.glyphManager = t.glyphManager, this.symbolFadeChange = t.placement.symbolFadeChange(ae.now()), this.imageManager.beginFrame();
|
14283
14283
|
const a = this.style._order, h = this.style.sourceCaches, m = {}, y = {}, v = {};
|
14284
14284
|
for (const b in h) {
|
14285
|
-
const
|
14286
|
-
|
14285
|
+
const P = h[b];
|
14286
|
+
P.used && P.prepare(this.context), m[b] = P.getVisibleCoordinates(), y[b] = m[b].slice().reverse(), v[b] = P.getVisibleCoordinates(!0).reverse();
|
14287
14287
|
}
|
14288
14288
|
this.opaquePassCutoff = 1 / 0;
|
14289
14289
|
for (let b = 0; b < a.length; b++) if (this.style._layers[a[b]].is3D()) {
|
@@ -14292,49 +14292,49 @@ uniform ${A} ${C} u_${L};
|
|
14292
14292
|
}
|
14293
14293
|
this.maybeDrawDepthAndCoords(!1), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = "offscreen";
|
14294
14294
|
for (const b of a) {
|
14295
|
-
const
|
14296
|
-
if (!
|
14297
|
-
const
|
14298
|
-
(
|
14299
|
-
}
|
14300
|
-
if (this.context.bindFramebuffer.set(null), this.context.clear({ color: n.showOverdrawInspector ? c.aN.black : c.aN.transparent, depth: 1 }), this.clearStencil(), !((o = this.style.stylesheet) === null || o === void 0) && o.sky && function(b,
|
14301
|
-
const
|
14302
|
-
if (!
|
14295
|
+
const P = this.style._layers[b];
|
14296
|
+
if (!P.hasOffscreenPass() || P.isHidden(this.transform.zoom)) continue;
|
14297
|
+
const A = y[P.source];
|
14298
|
+
(P.type === "custom" || A.length) && this.renderLayer(this, h[P.source], P, A);
|
14299
|
+
}
|
14300
|
+
if (this.context.bindFramebuffer.set(null), this.context.clear({ color: n.showOverdrawInspector ? c.aN.black : c.aN.transparent, depth: 1 }), this.clearStencil(), !((o = this.style.stylesheet) === null || o === void 0) && o.sky && function(b, P) {
|
14301
|
+
const A = b.context, L = A.gl, B = ((K, U, ee) => ({ u_sky_color: K.properties.get("sky-color"), u_horizon_color: K.properties.get("horizon-color"), u_horizon: (U.height / 2 + U.getHorizon()) * ee, u_sky_horizon_blend: K.properties.get("sky-horizon-blend") * U.height / 2 * ee }))(P, b.style.map.transform, b.pixelRatio), V = new ht(L.LEQUAL, ht.ReadWrite, [0, 1]), Z = Ut.disabled, j = b.colorModeForRenderPass(), H = b.useProgram("sky");
|
14302
|
+
if (!P.mesh) {
|
14303
14303
|
const K = new c.aX();
|
14304
14304
|
K.emplaceBack(-1, -1), K.emplaceBack(1, -1), K.emplaceBack(1, 1), K.emplaceBack(-1, 1);
|
14305
14305
|
const U = new c.aY();
|
14306
|
-
U.emplaceBack(0, 1, 2), U.emplaceBack(0, 2, 3),
|
14306
|
+
U.emplaceBack(0, 1, 2), U.emplaceBack(0, 2, 3), P.mesh = new Ml(A.createVertexBuffer(K, ps.members), A.createIndexBuffer(U), c.a0.simpleSegment(0, 0, K.length, U.length));
|
14307
14307
|
}
|
14308
|
-
H.draw(
|
14308
|
+
H.draw(A, L.TRIANGLES, V, Z, j, zt.disabled, B, void 0, "sky", P.mesh.vertexBuffer, P.mesh.indexBuffer, P.mesh.segments);
|
14309
14309
|
}(this, this.style.sky), this._showOverdrawInspector = n.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (t._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = a.length - 1; this.currentLayer >= 0; this.currentLayer--) {
|
14310
|
-
const b = this.style._layers[a[this.currentLayer]],
|
14311
|
-
this._renderTileClippingMasks(b,
|
14310
|
+
const b = this.style._layers[a[this.currentLayer]], P = h[b.source], A = m[b.source];
|
14311
|
+
this._renderTileClippingMasks(b, A), this.renderLayer(this, P, b, A);
|
14312
14312
|
}
|
14313
14313
|
for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < a.length; this.currentLayer++) {
|
14314
|
-
const b = this.style._layers[a[this.currentLayer]],
|
14314
|
+
const b = this.style._layers[a[this.currentLayer]], P = h[b.source];
|
14315
14315
|
if (this.renderToTexture && this.renderToTexture.renderLayer(b)) continue;
|
14316
|
-
const
|
14317
|
-
this._renderTileClippingMasks(b, m[b.source]), this.renderLayer(this,
|
14316
|
+
const A = (b.type === "symbol" ? v : y)[b.source];
|
14317
|
+
this._renderTileClippingMasks(b, m[b.source]), this.renderLayer(this, P, b, A);
|
14318
14318
|
}
|
14319
14319
|
if (this.options.showTileBoundaries) {
|
14320
|
-
const b = function(
|
14320
|
+
const b = function(P, A) {
|
14321
14321
|
let L = null;
|
14322
|
-
const B = Object.values(
|
14322
|
+
const B = Object.values(P._layers).flatMap((H) => H.source && !H.isHidden(A) ? [P.sourceCaches[H.source]] : []), V = B.filter((H) => H.getSource().type === "vector"), Z = B.filter((H) => H.getSource().type !== "vector"), j = (H) => {
|
14323
14323
|
(!L || L.getSource().maxzoom < H.getSource().maxzoom) && (L = H);
|
14324
14324
|
};
|
14325
|
-
return
|
14325
|
+
return V.forEach((H) => j(H)), L || Z.forEach((H) => j(H)), L;
|
14326
14326
|
}(this.style, this.transform.zoom);
|
14327
|
-
b && function(
|
14328
|
-
for (let B = 0; B < L.length; B++) gt(
|
14327
|
+
b && function(P, A, L) {
|
14328
|
+
for (let B = 0; B < L.length; B++) gt(P, A, L[B]);
|
14329
14329
|
}(this, b, b.getVisibleCoordinates());
|
14330
14330
|
}
|
14331
14331
|
this.options.showPadding && function(b) {
|
14332
|
-
const
|
14333
|
-
vn(b, b.transform.height - (
|
14334
|
-
const
|
14335
|
-
(function(L, B,
|
14336
|
-
Nn(L, B - 1,
|
14337
|
-
})(b,
|
14332
|
+
const P = b.transform.padding;
|
14333
|
+
vn(b, b.transform.height - (P.top || 0), 3, ho), vn(b, P.bottom || 0, 3, ws), ca(b, P.left || 0, 3, uo), ca(b, b.transform.width - (P.right || 0), 3, El);
|
14334
|
+
const A = b.transform.centerPoint;
|
14335
|
+
(function(L, B, V, Z) {
|
14336
|
+
Nn(L, B - 1, V - 10, 2, 20, Z), Nn(L, B - 10, V - 1, 20, 2, Z);
|
14337
|
+
})(b, A.x, b.transform.height - A.y, Vn);
|
14338
14338
|
}(this), this.context.setDefault();
|
14339
14339
|
}
|
14340
14340
|
maybeDrawDepthAndCoords(t) {
|
@@ -14342,21 +14342,21 @@ uniform ${A} ${C} u_${L};
|
|
14342
14342
|
const n = this.terrainFacilitator.matrix, o = this.transform.modelViewProjectionMatrix;
|
14343
14343
|
let a = this.terrainFacilitator.dirty;
|
14344
14344
|
a || (a = t ? !c.a_(n, o) : !c.a$(n, o)), a || (a = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0), a && (c.b0(n, o), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, function(h, m) {
|
14345
|
-
const y = h.context, v = y.gl, b = kt.unblended,
|
14345
|
+
const y = h.context, v = y.gl, b = kt.unblended, P = new ht(v.LEQUAL, ht.ReadWrite, [0, 1]), A = m.getTerrainMesh(), L = m.sourceCache.getRenderableTiles(), B = h.useProgram("terrainDepth");
|
14346
14346
|
y.bindFramebuffer.set(m.getFramebuffer("depth").framebuffer), y.viewport.set([0, 0, h.width / devicePixelRatio, h.height / devicePixelRatio]), y.clear({ color: c.aN.transparent, depth: 1 });
|
14347
|
-
for (const
|
14348
|
-
const Z = m.getTerrainData(
|
14349
|
-
B.draw(y, v.TRIANGLES,
|
14347
|
+
for (const V of L) {
|
14348
|
+
const Z = m.getTerrainData(V.tileID), j = { u_matrix: h.transform.calculatePosMatrix(V.tileID.toUnwrapped()), u_ele_delta: m.getMeshFrameDelta(h.transform.zoom) };
|
14349
|
+
B.draw(y, v.TRIANGLES, P, Ut.disabled, b, zt.backCCW, j, Z, "terrain", A.vertexBuffer, A.indexBuffer, A.segments);
|
14350
14350
|
}
|
14351
14351
|
y.bindFramebuffer.set(null), y.viewport.set([0, 0, h.width, h.height]);
|
14352
14352
|
}(this, this.style.map.terrain), function(h, m) {
|
14353
|
-
const y = h.context, v = y.gl, b = kt.unblended,
|
14353
|
+
const y = h.context, v = y.gl, b = kt.unblended, P = new ht(v.LEQUAL, ht.ReadWrite, [0, 1]), A = m.getTerrainMesh(), L = m.getCoordsTexture(), B = m.sourceCache.getRenderableTiles(), V = h.useProgram("terrainCoords");
|
14354
14354
|
y.bindFramebuffer.set(m.getFramebuffer("coords").framebuffer), y.viewport.set([0, 0, h.width / devicePixelRatio, h.height / devicePixelRatio]), y.clear({ color: c.aN.transparent, depth: 1 }), m.coordsIndex = [];
|
14355
14355
|
for (const Z of B) {
|
14356
14356
|
const j = m.getTerrainData(Z.tileID);
|
14357
14357
|
y.activeTexture.set(v.TEXTURE0), v.bindTexture(v.TEXTURE_2D, L.texture);
|
14358
14358
|
const H = { u_matrix: h.transform.calculatePosMatrix(Z.tileID.toUnwrapped()), u_terrain_coords_id: (255 - m.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: m.getMeshFrameDelta(h.transform.zoom) };
|
14359
|
-
|
14359
|
+
V.draw(y, v.TRIANGLES, P, Ut.disabled, b, zt.backCCW, H, j, "terrain", A.vertexBuffer, A.indexBuffer, A.segments), m.coordsIndex.push(Z.tileID.key);
|
14360
14360
|
}
|
14361
14361
|
y.bindFramebuffer.set(null), y.viewport.set([0, 0, h.width, h.height]);
|
14362
14362
|
}(this, this.style.map.terrain));
|
@@ -14366,27 +14366,27 @@ uniform ${A} ${C} u_${L};
|
|
14366
14366
|
case "symbol":
|
14367
14367
|
(function(h, m, y, v, b) {
|
14368
14368
|
if (h.renderPass !== "translucent") return;
|
14369
|
-
const
|
14370
|
-
(y._unevaluatedLayout.hasValue("text-variable-anchor") || y._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(L, B,
|
14369
|
+
const P = Ut.disabled, A = h.colorModeForRenderPass();
|
14370
|
+
(y._unevaluatedLayout.hasValue("text-variable-anchor") || y._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(L, B, V, Z, j, H, K, U, ee) {
|
14371
14371
|
const ne = B.transform, le = Gs(), me = j === "map", be = H === "map";
|
14372
14372
|
for (const ze of L) {
|
14373
|
-
const Le = Z.getTile(ze), we = Le.getBucket(
|
14373
|
+
const Le = Z.getTile(ze), we = Le.getBucket(V);
|
14374
14374
|
if (!we || !we.text || !we.text.segments.get().length) continue;
|
14375
|
-
const Se = c.ah(we.textSizeData, ne.zoom), Oe = rt(Le, 1, B.transform.zoom), et = Wr(ze.posMatrix, be, me, B.transform, Oe), Pe =
|
14375
|
+
const Se = c.ah(we.textSizeData, ne.zoom), Oe = rt(Le, 1, B.transform.zoom), et = Wr(ze.posMatrix, be, me, B.transform, Oe), Pe = V.layout.get("icon-text-fit") !== "none" && we.hasIconData();
|
14376
14376
|
if (Se) {
|
14377
14377
|
const ke = Math.pow(2, ne.zoom - Le.tileID.overscaledZ), Ke = B.style.map.terrain ? (st, ut) => B.style.map.terrain.getElevation(ze, st, ut) : null, Lt = le.translatePosition(ne, Le, K, U);
|
14378
14378
|
ao(we, me, be, ee, ne, et, ze.posMatrix, ke, Se, Pe, le, Lt, ze.toUnwrapped(), Ke);
|
14379
14379
|
}
|
14380
14380
|
}
|
14381
|
-
}(v, h, y, m, y.layout.get("text-rotation-alignment"), y.layout.get("text-pitch-alignment"), y.paint.get("text-translate"), y.paint.get("text-translate-anchor"), b), y.paint.get("icon-opacity").constantOr(1) !== 0 && Yr(h, m, y, v, !1, y.paint.get("icon-translate"), y.paint.get("icon-translate-anchor"), y.layout.get("icon-rotation-alignment"), y.layout.get("icon-pitch-alignment"), y.layout.get("icon-keep-upright"),
|
14381
|
+
}(v, h, y, m, y.layout.get("text-rotation-alignment"), y.layout.get("text-pitch-alignment"), y.paint.get("text-translate"), y.paint.get("text-translate-anchor"), b), y.paint.get("icon-opacity").constantOr(1) !== 0 && Yr(h, m, y, v, !1, y.paint.get("icon-translate"), y.paint.get("icon-translate-anchor"), y.layout.get("icon-rotation-alignment"), y.layout.get("icon-pitch-alignment"), y.layout.get("icon-keep-upright"), P, A), y.paint.get("text-opacity").constantOr(1) !== 0 && Yr(h, m, y, v, !0, y.paint.get("text-translate"), y.paint.get("text-translate-anchor"), y.layout.get("text-rotation-alignment"), y.layout.get("text-pitch-alignment"), y.layout.get("text-keep-upright"), P, A), m.map.showCollisionBoxes && (kl(h, m, y, v, !0), kl(h, m, y, v, !1));
|
14382
14382
|
})(t, n, o, a, this.style.placement.variableOffsets);
|
14383
14383
|
break;
|
14384
14384
|
case "circle":
|
14385
14385
|
(function(h, m, y, v) {
|
14386
14386
|
if (h.renderPass !== "translucent") return;
|
14387
|
-
const b = y.paint.get("circle-opacity"),
|
14388
|
-
if (b.constantOr(1) === 0 && (
|
14389
|
-
const B = h.context,
|
14387
|
+
const b = y.paint.get("circle-opacity"), P = y.paint.get("circle-stroke-width"), A = y.paint.get("circle-stroke-opacity"), L = !y.layout.get("circle-sort-key").isConstant();
|
14388
|
+
if (b.constantOr(1) === 0 && (P.constantOr(1) === 0 || A.constantOr(1) === 0)) return;
|
14389
|
+
const B = h.context, V = B.gl, Z = h.depthModeForSublayer(0, ht.ReadOnly), j = Ut.disabled, H = h.colorModeForRenderPass(), K = [];
|
14390
14390
|
for (let U = 0; U < v.length; U++) {
|
14391
14391
|
const ee = v[U], ne = m.getTile(ee), le = ne.getBucket(y);
|
14392
14392
|
if (!le) continue;
|
@@ -14399,64 +14399,64 @@ uniform ${A} ${C} u_${L};
|
|
14399
14399
|
L && K.sort((U, ee) => U.sortKey - ee.sortKey);
|
14400
14400
|
for (const U of K) {
|
14401
14401
|
const { programConfiguration: ee, program: ne, layoutVertexBuffer: le, indexBuffer: me, uniformValues: be, terrainData: ze } = U.state;
|
14402
|
-
ne.draw(B,
|
14402
|
+
ne.draw(B, V.TRIANGLES, Z, j, H, zt.disabled, be, ze, y.id, le, me, U.segments, y.paint, h.transform.zoom, ee);
|
14403
14403
|
}
|
14404
14404
|
})(t, n, o, a);
|
14405
14405
|
break;
|
14406
14406
|
case "heatmap":
|
14407
14407
|
(function(h, m, y, v) {
|
14408
14408
|
if (y.paint.get("heatmap-opacity") !== 0) if (h.renderPass === "offscreen") {
|
14409
|
-
const b = h.context,
|
14410
|
-
(function(B,
|
14409
|
+
const b = h.context, P = b.gl, A = Ut.disabled, L = new kt([P.ONE, P.ONE], c.aN.transparent, [!0, !0, !0, !0]);
|
14410
|
+
(function(B, V, Z) {
|
14411
14411
|
const j = B.gl;
|
14412
|
-
B.activeTexture.set(j.TEXTURE1), B.viewport.set([0, 0,
|
14412
|
+
B.activeTexture.set(j.TEXTURE1), B.viewport.set([0, 0, V.width / 4, V.height / 4]);
|
14413
14413
|
let H = Z.heatmapFbo;
|
14414
14414
|
if (H) j.bindTexture(j.TEXTURE_2D, H.colorAttachment.get()), B.bindFramebuffer.set(H.framebuffer);
|
14415
14415
|
else {
|
14416
14416
|
const K = j.createTexture();
|
14417
|
-
j.bindTexture(j.TEXTURE_2D, K), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_WRAP_S, j.CLAMP_TO_EDGE), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_WRAP_T, j.CLAMP_TO_EDGE), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_MIN_FILTER, j.LINEAR), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_MAG_FILTER, j.LINEAR), H = Z.heatmapFbo = B.createFramebuffer(
|
14417
|
+
j.bindTexture(j.TEXTURE_2D, K), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_WRAP_S, j.CLAMP_TO_EDGE), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_WRAP_T, j.CLAMP_TO_EDGE), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_MIN_FILTER, j.LINEAR), j.texParameteri(j.TEXTURE_2D, j.TEXTURE_MAG_FILTER, j.LINEAR), H = Z.heatmapFbo = B.createFramebuffer(V.width / 4, V.height / 4, !1, !1), function(U, ee, ne, le) {
|
14418
14418
|
var me, be;
|
14419
14419
|
const ze = U.gl, Le = (me = U.HALF_FLOAT) !== null && me !== void 0 ? me : ze.UNSIGNED_BYTE, we = (be = U.RGBA16F) !== null && be !== void 0 ? be : ze.RGBA;
|
14420
14420
|
ze.texImage2D(ze.TEXTURE_2D, 0, we, ee.width / 4, ee.height / 4, 0, ze.RGBA, Le, null), le.colorAttachment.set(ne);
|
14421
|
-
}(B,
|
14421
|
+
}(B, V, K, H);
|
14422
14422
|
}
|
14423
14423
|
})(b, h, y), b.clear({ color: c.aN.transparent });
|
14424
14424
|
for (let B = 0; B < v.length; B++) {
|
14425
|
-
const
|
14426
|
-
if (m.hasRenderableParent(
|
14427
|
-
const Z = m.getTile(
|
14425
|
+
const V = v[B];
|
14426
|
+
if (m.hasRenderableParent(V)) continue;
|
14427
|
+
const Z = m.getTile(V), j = Z.getBucket(y);
|
14428
14428
|
if (!j) continue;
|
14429
14429
|
const H = j.programConfigurations.get(y.id), K = h.useProgram("heatmap", H), { zoom: U } = h.transform;
|
14430
|
-
K.draw(b,
|
14430
|
+
K.draw(b, P.TRIANGLES, ht.disabled, A, L, zt.disabled, $i(V.posMatrix, Z, U, y.paint.get("heatmap-intensity")), null, y.id, j.layoutVertexBuffer, j.indexBuffer, j.segments, y.paint, h.transform.zoom, H);
|
14431
14431
|
}
|
14432
14432
|
b.viewport.set([0, 0, h.width, h.height]);
|
14433
|
-
} else h.renderPass === "translucent" && (h.context.setColorMode(h.colorModeForRenderPass()), function(b,
|
14434
|
-
const
|
14433
|
+
} else h.renderPass === "translucent" && (h.context.setColorMode(h.colorModeForRenderPass()), function(b, P) {
|
14434
|
+
const A = b.context, L = A.gl, B = P.heatmapFbo;
|
14435
14435
|
if (!B) return;
|
14436
|
-
|
14437
|
-
let
|
14438
|
-
|
14436
|
+
A.activeTexture.set(L.TEXTURE0), L.bindTexture(L.TEXTURE_2D, B.colorAttachment.get()), A.activeTexture.set(L.TEXTURE1);
|
14437
|
+
let V = P.colorRampTexture;
|
14438
|
+
V || (V = P.colorRampTexture = new St(A, P.colorRamp, L.RGBA)), V.bind(L.LINEAR, L.CLAMP_TO_EDGE), b.useProgram("heatmapTexture").draw(A, L.TRIANGLES, ht.disabled, Ut.disabled, b.colorModeForRenderPass(), zt.disabled, ((Z, j, H, K) => {
|
14439
14439
|
const U = c.H();
|
14440
14440
|
c.aQ(U, 0, Z.width, Z.height, 0, 0, 1);
|
14441
14441
|
const ee = Z.context.gl;
|
14442
14442
|
return { u_matrix: U, u_world: [ee.drawingBufferWidth, ee.drawingBufferHeight], u_image: 0, u_color_ramp: 1, u_opacity: j.paint.get("heatmap-opacity") };
|
14443
|
-
})(b,
|
14443
|
+
})(b, P), null, P.id, b.viewportBuffer, b.quadTriangleIndexBuffer, b.viewportSegments, P.paint, b.transform.zoom);
|
14444
14444
|
}(h, y));
|
14445
14445
|
})(t, n, o, a);
|
14446
14446
|
break;
|
14447
14447
|
case "line":
|
14448
14448
|
(function(h, m, y, v) {
|
14449
14449
|
if (h.renderPass !== "translucent") return;
|
14450
|
-
const b = y.paint.get("line-opacity"),
|
14451
|
-
if (b.constantOr(1) === 0 ||
|
14452
|
-
const
|
14450
|
+
const b = y.paint.get("line-opacity"), P = y.paint.get("line-width");
|
14451
|
+
if (b.constantOr(1) === 0 || P.constantOr(1) === 0) return;
|
14452
|
+
const A = h.depthModeForSublayer(0, ht.ReadOnly), L = h.colorModeForRenderPass(), B = y.paint.get("line-dasharray"), V = y.paint.get("line-pattern"), Z = V.constantOr(1), j = y.paint.get("line-gradient"), H = y.getCrossfadeParameters(), K = Z ? "linePattern" : B ? "lineSDF" : j ? "lineGradient" : "line", U = h.context, ee = U.gl;
|
14453
14453
|
let ne = !0;
|
14454
14454
|
for (const le of v) {
|
14455
14455
|
const me = m.getTile(le);
|
14456
14456
|
if (Z && !me.patternsLoaded()) continue;
|
14457
14457
|
const be = me.getBucket(y);
|
14458
14458
|
if (!be) continue;
|
14459
|
-
const ze = be.programConfigurations.get(y.id), Le = h.context.program.get(), we = h.useProgram(K, ze), Se = ne || we.program !== Le, Oe = h.style.map.terrain && h.style.map.terrain.getTerrainData(le), et =
|
14459
|
+
const ze = be.programConfigurations.get(y.id), Le = h.context.program.get(), we = h.useProgram(K, ze), Se = ne || we.program !== Le, Oe = h.style.map.terrain && h.style.map.terrain.getTerrainData(le), et = V.constantOr(null);
|
14460
14460
|
if (et && me.imageAtlas) {
|
14461
14461
|
const Ke = me.imageAtlas, Lt = Ke.patternPositions[et.to.toString()], st = Ke.patternPositions[et.from.toString()];
|
14462
14462
|
Lt && st && ze.setConstantPatternPositions(Lt, st);
|
@@ -14477,22 +14477,22 @@ uniform ${A} ${C} u_${L};
|
|
14477
14477
|
}
|
14478
14478
|
U.activeTexture.set(ee.TEXTURE0), Lt.bind(y.stepInterpolant ? ee.NEAREST : ee.LINEAR, ee.CLAMP_TO_EDGE);
|
14479
14479
|
}
|
14480
|
-
we.draw(U, ee.TRIANGLES,
|
14480
|
+
we.draw(U, ee.TRIANGLES, A, h.stencilModeForClipping(le), L, zt.disabled, ke, Oe, y.id, be.layoutVertexBuffer, be.indexBuffer, be.segments, y.paint, h.transform.zoom, ze, be.layoutVertexBuffer2), ne = !1;
|
14481
14481
|
}
|
14482
14482
|
})(t, n, o, a);
|
14483
14483
|
break;
|
14484
14484
|
case "fill":
|
14485
14485
|
(function(h, m, y, v) {
|
14486
|
-
const b = y.paint.get("fill-color"),
|
14487
|
-
if (
|
14488
|
-
const
|
14486
|
+
const b = y.paint.get("fill-color"), P = y.paint.get("fill-opacity");
|
14487
|
+
if (P.constantOr(1) === 0) return;
|
14488
|
+
const A = h.colorModeForRenderPass(), L = y.paint.get("fill-pattern"), B = h.opaquePassEnabledForLayer() && !L.constantOr(1) && b.constantOr(c.aN.transparent).a === 1 && P.constantOr(0) === 1 ? "opaque" : "translucent";
|
14489
14489
|
if (h.renderPass === B) {
|
14490
|
-
const
|
14491
|
-
aa(h, m, y, v,
|
14490
|
+
const V = h.depthModeForSublayer(1, h.renderPass === "opaque" ? ht.ReadWrite : ht.ReadOnly);
|
14491
|
+
aa(h, m, y, v, V, A, !1);
|
14492
14492
|
}
|
14493
14493
|
if (h.renderPass === "translucent" && y.paint.get("fill-antialias")) {
|
14494
|
-
const
|
14495
|
-
aa(h, m, y, v,
|
14494
|
+
const V = h.depthModeForSublayer(y.getPaintProperty("fill-outline-color") ? 2 : 0, ht.ReadOnly);
|
14495
|
+
aa(h, m, y, v, V, A, !0);
|
14496
14496
|
}
|
14497
14497
|
})(t, n, o, a);
|
14498
14498
|
break;
|
@@ -14500,11 +14500,11 @@ uniform ${A} ${C} u_${L};
|
|
14500
14500
|
(function(h, m, y, v) {
|
14501
14501
|
const b = y.paint.get("fill-extrusion-opacity");
|
14502
14502
|
if (b !== 0 && h.renderPass === "translucent") {
|
14503
|
-
const
|
14504
|
-
if (b !== 1 || y.paint.get("fill-extrusion-pattern").constantOr(1)) lo(h, m, y, v,
|
14503
|
+
const P = new ht(h.context.gl.LEQUAL, ht.ReadWrite, h.depthRangeFor3D);
|
14504
|
+
if (b !== 1 || y.paint.get("fill-extrusion-pattern").constantOr(1)) lo(h, m, y, v, P, Ut.disabled, kt.disabled), lo(h, m, y, v, P, h.stencilModeFor3D(), h.colorModeForRenderPass());
|
14505
14505
|
else {
|
14506
|
-
const
|
14507
|
-
lo(h, m, y, v,
|
14506
|
+
const A = h.colorModeForRenderPass();
|
14507
|
+
lo(h, m, y, v, P, Ut.disabled, A);
|
14508
14508
|
}
|
14509
14509
|
}
|
14510
14510
|
})(t, n, o, a);
|
@@ -14512,10 +14512,10 @@ uniform ${A} ${C} u_${L};
|
|
14512
14512
|
case "hillshade":
|
14513
14513
|
(function(h, m, y, v) {
|
14514
14514
|
if (h.renderPass !== "offscreen" && h.renderPass !== "translucent") return;
|
14515
|
-
const b = h.context,
|
14516
|
-
for (const
|
14517
|
-
const Z = m.getTile(
|
14518
|
-
Z.needsHillshadePrepare !== void 0 && Z.needsHillshadePrepare && h.renderPass === "offscreen" ? xn(h, Z, y,
|
14515
|
+
const b = h.context, P = h.depthModeForSublayer(0, ht.ReadOnly), A = h.colorModeForRenderPass(), [L, B] = h.renderPass === "translucent" ? h.stencilConfigForOverlap(v) : [{}, v];
|
14516
|
+
for (const V of B) {
|
14517
|
+
const Z = m.getTile(V);
|
14518
|
+
Z.needsHillshadePrepare !== void 0 && Z.needsHillshadePrepare && h.renderPass === "offscreen" ? xn(h, Z, y, P, Ut.disabled, A) : h.renderPass === "translucent" && la(h, V, Z, y, P, L[V.overscaledZ], A);
|
14519
14519
|
}
|
14520
14520
|
b.viewport.set([0, 0, h.width, h.height]);
|
14521
14521
|
})(t, n, o, a);
|
@@ -14523,33 +14523,33 @@ uniform ${A} ${C} u_${L};
|
|
14523
14523
|
case "raster":
|
14524
14524
|
(function(h, m, y, v) {
|
14525
14525
|
if (h.renderPass !== "translucent" || y.paint.get("raster-opacity") === 0 || !v.length) return;
|
14526
|
-
const b = h.context,
|
14526
|
+
const b = h.context, P = b.gl, A = m.getSource(), L = h.useProgram("raster"), B = h.colorModeForRenderPass(), [V, Z] = A instanceof Er ? [{}, v] : h.stencilConfigForOverlap(v), j = Z[Z.length - 1].overscaledZ, H = !h.options.moving;
|
14527
14527
|
for (const K of Z) {
|
14528
|
-
const U = h.depthModeForSublayer(K.overscaledZ - j, y.paint.get("raster-opacity") === 1 ? ht.ReadWrite : ht.ReadOnly,
|
14528
|
+
const U = h.depthModeForSublayer(K.overscaledZ - j, y.paint.get("raster-opacity") === 1 ? ht.ReadWrite : ht.ReadOnly, P.LESS), ee = m.getTile(K);
|
14529
14529
|
ee.registerFadeDuration(y.paint.get("raster-fade-duration"));
|
14530
14530
|
const ne = m.findLoadedParent(K, 0), le = m.findLoadedSibling(K), me = co(ee, ne || le || null, m, y, h.transform, h.style.map.terrain);
|
14531
14531
|
let be, ze;
|
14532
|
-
const Le = y.paint.get("raster-resampling") === "nearest" ?
|
14533
|
-
b.activeTexture.set(
|
14532
|
+
const Le = y.paint.get("raster-resampling") === "nearest" ? P.NEAREST : P.LINEAR;
|
14533
|
+
b.activeTexture.set(P.TEXTURE0), ee.texture.bind(Le, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), b.activeTexture.set(P.TEXTURE1), ne ? (ne.texture.bind(Le, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), be = Math.pow(2, ne.tileID.overscaledZ - ee.tileID.overscaledZ), ze = [ee.tileID.canonical.x * be % 1, ee.tileID.canonical.y * be % 1]) : ee.texture.bind(Le, P.CLAMP_TO_EDGE, P.LINEAR_MIPMAP_NEAREST), ee.texture.useMipmap && b.extTextureFilterAnisotropic && h.transform.pitch > 20 && P.texParameterf(P.TEXTURE_2D, b.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, b.extTextureFilterAnisotropicMax);
|
14534
14534
|
const we = h.style.map.terrain && h.style.map.terrain.getTerrainData(K), Se = we ? K : null, Oe = Se ? Se.posMatrix : h.transform.calculatePosMatrix(K.toUnwrapped(), H), et = Dc(Oe, ze || [0, 0], be || 1, me, y);
|
14535
|
-
|
14535
|
+
A instanceof Er ? L.draw(b, P.TRIANGLES, U, Ut.disabled, B, zt.disabled, et, we, y.id, A.boundsBuffer, h.quadTriangleIndexBuffer, A.boundsSegments) : L.draw(b, P.TRIANGLES, U, V[K.overscaledZ], B, zt.disabled, et, we, y.id, h.rasterBoundsBuffer, h.quadTriangleIndexBuffer, h.rasterBoundsSegments);
|
14536
14536
|
}
|
14537
14537
|
})(t, n, o, a);
|
14538
14538
|
break;
|
14539
14539
|
case "background":
|
14540
14540
|
(function(h, m, y, v) {
|
14541
|
-
const b = y.paint.get("background-color"),
|
14542
|
-
if (
|
14543
|
-
const
|
14541
|
+
const b = y.paint.get("background-color"), P = y.paint.get("background-opacity");
|
14542
|
+
if (P === 0) return;
|
14543
|
+
const A = h.context, L = A.gl, B = h.transform, V = B.tileSize, Z = y.paint.get("background-pattern");
|
14544
14544
|
if (h.isPatternMissing(Z)) return;
|
14545
|
-
const j = !Z && b.a === 1 &&
|
14545
|
+
const j = !Z && b.a === 1 && P === 1 && h.opaquePassEnabledForLayer() ? "opaque" : "translucent";
|
14546
14546
|
if (h.renderPass !== j) return;
|
14547
|
-
const H = Ut.disabled, K = h.depthModeForSublayer(0, j === "opaque" ? ht.ReadWrite : ht.ReadOnly), U = h.colorModeForRenderPass(), ee = h.useProgram(Z ? "backgroundPattern" : "background"), ne = v || B.coveringTiles({ tileSize:
|
14548
|
-
Z && (
|
14547
|
+
const H = Ut.disabled, K = h.depthModeForSublayer(0, j === "opaque" ? ht.ReadWrite : ht.ReadOnly), U = h.colorModeForRenderPass(), ee = h.useProgram(Z ? "backgroundPattern" : "background"), ne = v || B.coveringTiles({ tileSize: V, terrain: h.style.map.terrain });
|
14548
|
+
Z && (A.activeTexture.set(L.TEXTURE0), h.imageManager.bind(h.context));
|
14549
14549
|
const le = y.getCrossfadeParameters();
|
14550
14550
|
for (const me of ne) {
|
14551
|
-
const be = v ? me.posMatrix : h.transform.calculatePosMatrix(me.toUnwrapped()), ze = Z ? Wo(be,
|
14552
|
-
ee.draw(
|
14551
|
+
const be = v ? me.posMatrix : h.transform.calculatePosMatrix(me.toUnwrapped()), ze = Z ? Wo(be, P, h, Z, { tileID: me, tileSize: V }, le) : eo(be, P, b), Le = h.style.map.terrain && h.style.map.terrain.getTerrainData(me);
|
14552
|
+
ee.draw(A, L.TRIANGLES, K, H, U, zt.disabled, ze, Le, y.id, h.tileExtentBuffer, h.quadTriangleIndexBuffer, h.tileExtentSegments);
|
14553
14553
|
}
|
14554
14554
|
})(t, 0, o, a);
|
14555
14555
|
break;
|
@@ -14557,12 +14557,12 @@ uniform ${A} ${C} u_${L};
|
|
14557
14557
|
(function(h, m, y) {
|
14558
14558
|
const v = h.context, b = y.implementation;
|
14559
14559
|
if (h.renderPass === "offscreen") {
|
14560
|
-
const
|
14561
|
-
|
14560
|
+
const P = b.prerender;
|
14561
|
+
P && (h.setCustomLayerDefaults(), v.setColorMode(h.colorModeForRenderPass()), P.call(b, v.gl, h.transform.customLayerMatrix()), v.setDirty(), h.setBaseState());
|
14562
14562
|
} else if (h.renderPass === "translucent") {
|
14563
14563
|
h.setCustomLayerDefaults(), v.setColorMode(h.colorModeForRenderPass()), v.setStencilMode(Ut.disabled);
|
14564
|
-
const
|
14565
|
-
v.setDepthMode(
|
14564
|
+
const P = b.renderingMode === "3d" ? new ht(h.context.gl.LEQUAL, ht.ReadWrite, h.depthRangeFor3D) : h.depthModeForSublayer(0, ht.ReadOnly);
|
14565
|
+
v.setDepthMode(P), b.render(v.gl, h.transform.customLayerMatrix(), { farZ: h.transform.farZ, nearZ: h.transform.nearZ, fov: h.transform._fov, modelViewProjectionMatrix: h.transform.modelViewProjectionMatrix, projectionMatrix: h.transform.projectionMatrix }), v.setDirty(), h.setBaseState(), v.bindFramebuffer.set(null);
|
14566
14566
|
}
|
14567
14567
|
})(t, 0, o);
|
14568
14568
|
}
|
@@ -14571,8 +14571,8 @@ uniform ${A} ${C} u_${L};
|
|
14571
14571
|
if (!o[0] && !o[1]) return t;
|
14572
14572
|
const m = h ? a === "map" ? this.transform.angle : 0 : a === "viewport" ? -this.transform.angle : 0;
|
14573
14573
|
if (m) {
|
14574
|
-
const b = Math.sin(m),
|
14575
|
-
o = [o[0] *
|
14574
|
+
const b = Math.sin(m), P = Math.cos(m);
|
14575
|
+
o = [o[0] * P - o[1] * b, o[0] * b + o[1] * P];
|
14576
14576
|
}
|
14577
14577
|
const y = [h ? o[0] : rt(n, o[0], this.transform.zoom), h ? o[1] : rt(n, o[1], this.transform.zoom), 0], v = new Float32Array(16);
|
14578
14578
|
return c.J(v, t, y), v;
|
@@ -14624,13 +14624,13 @@ uniform ${A} ${C} u_${L};
|
|
14624
14624
|
return c.b1(y, y, [v, v, 1 / y[3], v]);
|
14625
14625
|
}), m = [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]].map((y) => {
|
14626
14626
|
const v = function(L, B) {
|
14627
|
-
var
|
14627
|
+
var V = B[0], Z = B[1], j = B[2], H = V * V + Z * Z + j * j;
|
14628
14628
|
return H > 0 && (H = 1 / Math.sqrt(H)), L[0] = B[0] * H, L[1] = B[1] * H, L[2] = B[2] * H, L;
|
14629
|
-
}([], function(L, B,
|
14630
|
-
var Z = B[0], j = B[1], H = B[2], K =
|
14629
|
+
}([], function(L, B, V) {
|
14630
|
+
var Z = B[0], j = B[1], H = B[2], K = V[0], U = V[1], ee = V[2];
|
14631
14631
|
return L[0] = j * ee - H * U, L[1] = H * K - Z * ee, L[2] = Z * U - j * K, L;
|
14632
|
-
}([], qt([], h[y[0]], h[y[1]]), qt([], h[y[2]], h[y[1]]))), b = -((
|
14633
|
-
var
|
14632
|
+
}([], qt([], h[y[0]], h[y[1]]), qt([], h[y[2]], h[y[1]]))), b = -((P = v)[0] * (A = h[y[1]])[0] + P[1] * A[1] + P[2] * A[2]);
|
14633
|
+
var P, A;
|
14634
14634
|
return v.concat(b);
|
14635
14635
|
});
|
14636
14636
|
return new bn(h, m);
|
@@ -14759,8 +14759,8 @@ uniform ${A} ${C} u_${L};
|
|
14759
14759
|
var o = new c.A(4);
|
14760
14760
|
return c.A != Float32Array && (o[1] = 0, o[2] = 0), o[0] = 1, o[3] = 1, o;
|
14761
14761
|
}(), function(o, a, h) {
|
14762
|
-
var m = a[0], y = a[1], v = a[2], b = a[3],
|
14763
|
-
o[0] = m *
|
14762
|
+
var m = a[0], y = a[1], v = a[2], b = a[3], P = Math.sin(h), A = Math.cos(h);
|
14763
|
+
o[0] = m * A + v * P, o[1] = y * A + b * P, o[2] = m * -P + v * A, o[3] = y * -P + b * A;
|
14764
14764
|
}(this.rotationMatrix, this.rotationMatrix, this.angle));
|
14765
14765
|
}
|
14766
14766
|
get pitch() {
|
@@ -14818,7 +14818,7 @@ uniform ${A} ${C} u_${L};
|
|
14818
14818
|
const n = [new c.b4(0, t)];
|
14819
14819
|
if (this._renderWorldCopies) {
|
14820
14820
|
const o = this.pointCoordinate(new c.P(0, 0)), a = this.pointCoordinate(new c.P(this.width, 0)), h = this.pointCoordinate(new c.P(this.width, this.height)), m = this.pointCoordinate(new c.P(0, this.height)), y = Math.floor(Math.min(o.x, a.x, h.x, m.x)), v = Math.floor(Math.max(o.x, a.x, h.x, m.x)), b = 1;
|
14821
|
-
for (let
|
14821
|
+
for (let P = y - b; P <= v + b; P++) P !== 0 && n.push(new c.b4(P, t));
|
14822
14822
|
}
|
14823
14823
|
return n;
|
14824
14824
|
}
|
@@ -14828,23 +14828,23 @@ uniform ${A} ${C} u_${L};
|
|
14828
14828
|
const h = a;
|
14829
14829
|
if (t.minzoom !== void 0 && a < t.minzoom) return [];
|
14830
14830
|
t.maxzoom !== void 0 && a > t.maxzoom && (a = t.maxzoom);
|
14831
|
-
const m = this.pointCoordinate(this.getCameraPoint()), y = c.Z.fromLngLat(this.center), v = Math.pow(2, a), b = [v * m.x, v * m.y, 0],
|
14831
|
+
const m = this.pointCoordinate(this.getCameraPoint()), y = c.Z.fromLngLat(this.center), v = Math.pow(2, a), b = [v * m.x, v * m.y, 0], P = [v * y.x, v * y.y, 0], A = bn.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, a);
|
14832
14832
|
let L = t.minzoom || 0;
|
14833
14833
|
!t.terrain && this.pitch <= 60 && this._edgeInsets.top < 0.1 && (L = a);
|
14834
|
-
const B = t.terrain ? 2 / Math.min(this.tileSize, t.tileSize) * this.tileSize : 3,
|
14835
|
-
if (this._renderWorldCopies) for (let U = 1; U <= 3; U++) Z.push(
|
14836
|
-
for (Z.push(
|
14834
|
+
const B = t.terrain ? 2 / Math.min(this.tileSize, t.tileSize) * this.tileSize : 3, V = (U) => ({ aabb: new po([U * v, 0, 0], [(U + 1) * v, v, 0]), zoom: 0, x: 0, y: 0, wrap: U, fullyVisible: !1 }), Z = [], j = [], H = a, K = t.reparseOverscaled ? h : a;
|
14835
|
+
if (this._renderWorldCopies) for (let U = 1; U <= 3; U++) Z.push(V(-U)), Z.push(V(U));
|
14836
|
+
for (Z.push(V(0)); Z.length > 0; ) {
|
14837
14837
|
const U = Z.pop(), ee = U.x, ne = U.y;
|
14838
14838
|
let le = U.fullyVisible;
|
14839
14839
|
if (!le) {
|
14840
|
-
const we = U.aabb.intersects(
|
14840
|
+
const we = U.aabb.intersects(A);
|
14841
14841
|
if (we === 0) continue;
|
14842
14842
|
le = we === 2;
|
14843
14843
|
}
|
14844
|
-
const me = t.terrain ? b :
|
14844
|
+
const me = t.terrain ? b : P, be = U.aabb.distanceX(me), ze = U.aabb.distanceY(me), Le = Math.max(Math.abs(be), Math.abs(ze));
|
14845
14845
|
if (U.zoom === H || Le > B + (1 << H - U.zoom) - 2 && U.zoom >= L) {
|
14846
14846
|
const we = H - U.zoom, Se = b[0] - 0.5 - (ee << we), Oe = b[1] - 0.5 - (ne << we);
|
14847
|
-
j.push({ tileID: new c.S(U.zoom === H ? K : U.zoom, U.wrap, U.zoom, ee, ne), distanceSq: Ur([
|
14847
|
+
j.push({ tileID: new c.S(U.zoom === H ? K : U.zoom, U.wrap, U.zoom, ee, ne), distanceSq: Ur([P[0] - 0.5 - ee, P[1] - 0.5 - ne]), tileDistanceToCamera: Math.sqrt(Se * Se + Oe * Oe) });
|
14848
14848
|
} else for (let we = 0; we < 4; we++) {
|
14849
14849
|
const Se = (ee << 1) + we % 2, Oe = (ne << 1) + (we >> 1), et = U.zoom + 1;
|
14850
14850
|
let Pe = U.aabb.quadrant(we);
|
@@ -14911,8 +14911,8 @@ uniform ${A} ${C} u_${L};
|
|
14911
14911
|
}
|
14912
14912
|
const o = [t.x, t.y, 0, 1], a = [t.x, t.y, 1, 1];
|
14913
14913
|
c.ag(o, o, this.pixelMatrixInverse), c.ag(a, a, this.pixelMatrixInverse);
|
14914
|
-
const h = o[3], m = a[3], y = o[1] / h, v = a[1] / m, b = o[2] / h,
|
14915
|
-
return new c.Z(c.z.number(o[0] / h, a[0] / m,
|
14914
|
+
const h = o[3], m = a[3], y = o[1] / h, v = a[1] / m, b = o[2] / h, P = a[2] / m, A = b === P ? 0 : (0 - b) / (P - b);
|
14915
|
+
return new c.Z(c.z.number(o[0] / h, a[0] / m, A) / this.worldSize, c.z.number(y, v, A) / this.worldSize);
|
14916
14916
|
}
|
14917
14917
|
coordinatePoint(t, n = 0, o = this.pixelMatrix) {
|
14918
14918
|
const a = [t.x * this.worldSize, t.y * this.worldSize, n, 1];
|
@@ -14959,18 +14959,18 @@ uniform ${A} ${C} u_${L};
|
|
14959
14959
|
a = [-U, U];
|
14960
14960
|
}
|
14961
14961
|
const h = this.tileSize * this.zoomScale(o.zoom);
|
14962
|
-
let m = 0, y = h, v = 0, b = h,
|
14962
|
+
let m = 0, y = h, v = 0, b = h, P = 0, A = 0;
|
14963
14963
|
const { x: L, y: B } = this.size;
|
14964
14964
|
if (this.latRange) {
|
14965
14965
|
const U = this.latRange;
|
14966
|
-
m = c.Q(U[1]) * h, y = c.Q(U[0]) * h, y - m < B && (
|
14966
|
+
m = c.Q(U[1]) * h, y = c.Q(U[0]) * h, y - m < B && (P = B / (y - m));
|
14967
14967
|
}
|
14968
|
-
a && (v = c.b3(c.O(a[0]) * h, 0, h), b = c.b3(c.O(a[1]) * h, 0, h), b < v && (b += h), b - v < L && (
|
14969
|
-
const { x:
|
14968
|
+
a && (v = c.b3(c.O(a[0]) * h, 0, h), b = c.b3(c.O(a[1]) * h, 0, h), b < v && (b += h), b - v < L && (A = L / (b - v)));
|
14969
|
+
const { x: V, y: Z } = this.project.call({ worldSize: h }, t);
|
14970
14970
|
let j, H;
|
14971
|
-
const K = Math.max(
|
14971
|
+
const K = Math.max(A || 0, P || 0);
|
14972
14972
|
if (K) {
|
14973
|
-
const U = new c.P(
|
14973
|
+
const U = new c.P(A ? (b + v) / 2 : V, P ? (y + m) / 2 : Z);
|
14974
14974
|
return o.center = this.unproject.call({ worldSize: h }, U).wrap(), o.zoom += this.scaleZoom(K), o;
|
14975
14975
|
}
|
14976
14976
|
if (this.latRange) {
|
@@ -14979,13 +14979,13 @@ uniform ${A} ${C} u_${L};
|
|
14979
14979
|
}
|
14980
14980
|
if (a) {
|
14981
14981
|
const U = (v + b) / 2;
|
14982
|
-
let ee =
|
14983
|
-
this._renderWorldCopies && (ee = c.b3(
|
14982
|
+
let ee = V;
|
14983
|
+
this._renderWorldCopies && (ee = c.b3(V, U - h / 2, U + h / 2));
|
14984
14984
|
const ne = L / 2;
|
14985
14985
|
ee - ne < v && (j = v + ne), ee + ne > b && (j = b - ne);
|
14986
14986
|
}
|
14987
14987
|
if (j !== void 0 || H !== void 0) {
|
14988
|
-
const U = new c.P(j ??
|
14988
|
+
const U = new c.P(j ?? V, H ?? Z);
|
14989
14989
|
o.center = this.unproject.call({ worldSize: h }, U).wrap();
|
14990
14990
|
}
|
14991
14991
|
return o;
|
@@ -15002,7 +15002,7 @@ uniform ${A} ${C} u_${L};
|
|
15002
15002
|
this.cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height, this._pixelPerMeter = c.b5(1, this.center.lat) * this.worldSize;
|
15003
15003
|
let a = c.ao(new Float64Array(16));
|
15004
15004
|
c.K(a, a, [this.width / 2, -this.height / 2, 1]), c.J(a, a, [1, -1, 0]), this.labelPlaneMatrix = a, a = c.ao(new Float64Array(16)), c.K(a, a, [1, -1, 1]), c.J(a, a, [-1, -1, 0]), c.K(a, a, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = a;
|
15005
|
-
const h = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), m = Math.min(this.elevation, this.minElevationForCurrentTile), y = h - m * this._pixelPerMeter / Math.cos(this._pitch), v = m < 0 ? y : h, b = Math.PI / 2 + this._pitch,
|
15005
|
+
const h = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), m = Math.min(this.elevation, this.minElevationForCurrentTile), y = h - m * this._pixelPerMeter / Math.cos(this._pitch), v = m < 0 ? y : h, b = Math.PI / 2 + this._pitch, P = this._fov * (0.5 + t.y / this.height), A = Math.sin(P) * v / Math.sin(c.ad(Math.PI - b - P, 0.01, Math.PI - 0.01)), L = this.getHorizon(), B = 2 * Math.atan(L / this.cameraToCenterDistance) * (0.5 + t.y / (2 * L)), V = Math.sin(B) * v / Math.sin(c.ad(Math.PI - b - B, 0.01, Math.PI - 0.01)), Z = Math.min(A, V);
|
15006
15006
|
this.farZ = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * Z + v), this.nearZ = this.height / 50, a = new Float64Array(16), c.b6(a, this._fov, this.width / this.height, this.nearZ, this.farZ), a[8] = 2 * -t.x / this.width, a[9] = 2 * t.y / this.height, this.projectionMatrix = c.af(a), c.K(a, a, [1, -1, 1]), c.J(a, a, [0, 0, -this.cameraToCenterDistance]), c.b7(a, a, this._pitch), c.ae(a, a, this.angle), c.J(a, a, [-n, -o, 0]), this.mercatorMatrix = c.K([], a, [this.worldSize, this.worldSize, this.worldSize]), c.K(a, a, [1, 1, this._pixelPerMeter]), this.pixelMatrix = c.L(new Float64Array(16), this.labelPlaneMatrix, a), c.J(a, a, [0, 0, -this.elevation]), this.modelViewProjectionMatrix = a, this.invModelViewProjectionMatrix = c.at([], a), this.fogMatrix = new Float64Array(16), c.b6(this.fogMatrix, this._fov, this.width / this.height, h, this.farZ), this.fogMatrix[8] = 2 * -t.x / this.width, this.fogMatrix[9] = 2 * t.y / this.height, c.K(this.fogMatrix, this.fogMatrix, [1, -1, 1]), c.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.cameraToCenterDistance]), c.b7(this.fogMatrix, this.fogMatrix, this._pitch), c.ae(this.fogMatrix, this.fogMatrix, this.angle), c.J(this.fogMatrix, this.fogMatrix, [-n, -o, 0]), c.K(this.fogMatrix, this.fogMatrix, [1, 1, this._pixelPerMeter]), c.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.elevation]), this.pixelMatrix3D = c.L(new Float64Array(16), this.labelPlaneMatrix, a);
|
15007
15007
|
const j = this.width % 2 / 2, H = this.height % 2 / 2, K = Math.cos(this.angle), U = Math.sin(this.angle), ee = n - Math.round(n) + K * j + U * H, ne = o - Math.round(o) + K * H + U * j, le = new Float64Array(a);
|
15008
15008
|
if (c.J(le, le, [ee > 0.5 ? ee - 1 : ee, ne > 0.5 ? ne - 1 : ne, 0]), this.alignedModelViewProjectionMatrix = le, a = c.at(new Float64Array(16), this.pixelMatrix), !a) throw new Error("failed to invert matrix");
|
@@ -15079,17 +15079,17 @@ uniform ${A} ${C} u_${L};
|
|
15079
15079
|
}
|
15080
15080
|
getHashString(t) {
|
15081
15081
|
const n = this._map.getCenter(), o = Math.round(100 * this._map.getZoom()) / 100, a = Math.ceil((o * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), h = Math.pow(10, a), m = Math.round(n.lng * h) / h, y = Math.round(n.lat * h) / h, v = this._map.getBearing(), b = this._map.getPitch();
|
15082
|
-
let
|
15083
|
-
if (
|
15084
|
-
const
|
15082
|
+
let P = "";
|
15083
|
+
if (P += t ? `/${m}/${y}/${o}` : `${o}/${y}/${m}`, (v || b) && (P += "/" + Math.round(10 * v) / 10), b && (P += `/${Math.round(b)}`), this._hashName) {
|
15084
|
+
const A = this._hashName;
|
15085
15085
|
let L = !1;
|
15086
|
-
const B = window.location.hash.slice(1).split("&").map((
|
15087
|
-
const Z =
|
15088
|
-
return Z ===
|
15089
|
-
}).filter((
|
15090
|
-
return L || B.push(`${
|
15086
|
+
const B = window.location.hash.slice(1).split("&").map((V) => {
|
15087
|
+
const Z = V.split("=")[0];
|
15088
|
+
return Z === A ? (L = !0, `${Z}=${P}`) : V;
|
15089
|
+
}).filter((V) => V);
|
15090
|
+
return L || B.push(`${A}=${P}`), `#${B.join("&")}`;
|
15091
15091
|
}
|
15092
|
-
return `#${
|
15092
|
+
return `#${P}`;
|
15093
15093
|
}
|
15094
15094
|
}
|
15095
15095
|
const wn = { linearity: 0.3, easing: c.b8(0, 0, 0.3, 1) }, da = c.e({ deceleration: 2500, maxSpeed: 1400 }, wn), pa = c.e({ deceleration: 20, maxSpeed: 1400 }, wn), Dl = c.e({ deceleration: 1e3, maxSpeed: 360 }, wn), go = c.e({ deceleration: 1e3, maxSpeed: 90 }, wn);
|
@@ -15162,7 +15162,7 @@ uniform ${A} ${C} u_${L};
|
|
15162
15162
|
return this._defaultPrevented;
|
15163
15163
|
}
|
15164
15164
|
constructor(t, n, o) {
|
15165
|
-
const a = t === "touchend" ? o.changedTouches : o.touches, h = oe.touchPos(n.getCanvasContainer(), a), m = h.map((v) => n.unproject(v)), y = h.reduce((v, b,
|
15165
|
+
const a = t === "touchend" ? o.changedTouches : o.touches, h = oe.touchPos(n.getCanvasContainer(), a), m = h.map((v) => n.unproject(v)), y = h.reduce((v, b, P, A) => v.add(b.div(A.length)), new c.P(0, 0));
|
15166
15166
|
super(t, { points: h, point: y, lngLats: m, lngLat: n.unproject(y), originalEvent: o }), this._defaultPrevented = !1;
|
15167
15167
|
}
|
15168
15168
|
}
|
@@ -15550,8 +15550,8 @@ uniform ${A} ${C} u_${L};
|
|
15550
15550
|
const a = $n(o, n), h = new c.P(0, 0), m = new c.P(0, 0);
|
15551
15551
|
let y = 0;
|
15552
15552
|
for (const b in a) {
|
15553
|
-
const
|
15554
|
-
|
15553
|
+
const P = a[b], A = this._touches[b];
|
15554
|
+
A && (h._add(P), m._add(P.sub(A)), y++, a[b] = P);
|
15555
15555
|
}
|
15556
15556
|
if (this._touches = a, this._shouldBePrevented(y) || !m.mag()) return;
|
15557
15557
|
const v = m.div(y);
|
@@ -15795,8 +15795,8 @@ uniform ${A} ${C} u_${L};
|
|
15795
15795
|
const v = this._type === "wheel" && Math.abs(this._delta) > Pa ? this._wheelZoomRate : this._defaultZoomRate;
|
15796
15796
|
let b = 2 / (1 + Math.exp(-Math.abs(this._delta * v)));
|
15797
15797
|
this._delta < 0 && b !== 0 && (b = 1 / b);
|
15798
|
-
const
|
15799
|
-
this._targetZoom = Math.min(t.maxZoom, Math.max(t.minZoom, t.scaleZoom(
|
15798
|
+
const P = typeof this._targetZoom == "number" ? t.zoomScale(this._targetZoom) : t.scale;
|
15799
|
+
this._targetZoom = Math.min(t.maxZoom, Math.max(t.minZoom, t.scaleZoom(P * b))), this._type === "wheel" && (this._startZoom = t.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
|
15800
15800
|
}
|
15801
15801
|
const n = typeof this._targetZoom == "number" ? this._targetZoom : t.zoom, o = this._startZoom, a = this._easing;
|
15802
15802
|
let h, m = !1;
|
@@ -16019,17 +16019,17 @@ uniform ${A} ${C} u_${L};
|
|
16019
16019
|
}, this.handleEvent = (a, h) => {
|
16020
16020
|
if (a.type === "blur") return void this.stop(!0);
|
16021
16021
|
this._updatingCamera = !0;
|
16022
|
-
const m = a.type === "renderFrame" ? void 0 : a, y = { needsRenderFrame: !1 }, v = {}, b = {},
|
16022
|
+
const m = a.type === "renderFrame" ? void 0 : a, y = { needsRenderFrame: !1 }, v = {}, b = {}, P = a.touches, A = P ? this._getMapTouches(P) : void 0, L = A ? oe.touchPos(this._map.getCanvas(), A) : oe.mousePos(this._map.getCanvas(), a);
|
16023
16023
|
for (const { handlerName: Z, handler: j, allowed: H } of this._handlers) {
|
16024
16024
|
if (!j.isEnabled()) continue;
|
16025
16025
|
let K;
|
16026
|
-
this._blockedByActive(b, H, Z) ? j.reset() : j[h || a.type] && (K = j[h || a.type](a, L,
|
16026
|
+
this._blockedByActive(b, H, Z) ? j.reset() : j[h || a.type] && (K = j[h || a.type](a, L, A), this.mergeHandlerResult(y, v, K, Z, m), K && K.needsRenderFrame && this._triggerRenderFrame()), (K || j.isActive()) && (b[Z] = j);
|
16027
16027
|
}
|
16028
16028
|
const B = {};
|
16029
16029
|
for (const Z in this._previousActiveHandlers) b[Z] || (B[Z] = m);
|
16030
16030
|
this._previousActiveHandlers = b, (Object.keys(B).length || Ea(y)) && (this._changes.push([y, v, B]), this._triggerRenderFrame()), (Object.keys(b).length || Ea(y)) && this._map._stop(!0), this._updatingCamera = !1;
|
16031
|
-
const { cameraAnimation:
|
16032
|
-
|
16031
|
+
const { cameraAnimation: V } = y;
|
16032
|
+
V && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], V(this._map));
|
16033
16033
|
}, this._map = t, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new _o(t), this._bearingSnap = n.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(n);
|
16034
16034
|
const o = this._el;
|
16035
16035
|
this._listeners = [[o, "touchstart", { passive: !0 }], [o, "touchmove", { passive: !1 }], [o, "touchend", void 0], [o, "touchcancel", void 0], [o, "mousedown", void 0], [o, "mousemove", void 0], [o, "mouseup", void 0], [document, "mousemove", { capture: !0 }], [document, "mouseup", void 0], [o, "mouseover", void 0], [o, "mouseout", void 0], [o, "dblclick", void 0], [o, "click", void 0], [o, "keydown", { capture: !1 }], [o, "keyup", void 0], [o, "wheel", { passive: !1 }], [o, "contextmenu", void 0], [window, "blur", void 0]];
|
@@ -16051,15 +16051,15 @@ uniform ${A} ${C} u_${L};
|
|
16051
16051
|
this._add("tapDragZoom", v);
|
16052
16052
|
const b = n.touchPitch = new Ta(n);
|
16053
16053
|
this._add("touchPitch", b), t.interactive && t.touchPitch && n.touchPitch.enable(t.touchPitch);
|
16054
|
-
const
|
16055
|
-
n.dragRotate = new ir(t,
|
16054
|
+
const P = xa(t), A = Tn(t);
|
16055
|
+
n.dragRotate = new ir(t, P, A), this._add("mouseRotate", P, ["mousePitch"]), this._add("mousePitch", A, ["mouseRotate"]), t.interactive && t.dragRotate && n.dragRotate.enable();
|
16056
16056
|
const L = (({ enable: K, clickTolerance: U }) => {
|
16057
16057
|
const ee = new zi({ checkCorrectEvent: (ne) => oe.mouseButton(ne) === 0 && !ne.ctrlKey });
|
16058
16058
|
return new Dt({ clickTolerance: U, move: (ne, le) => ({ around: le, panDelta: le.sub(ne) }), activateOnStart: !0, moveStateManager: ee, enable: K, assignEvents: Ps });
|
16059
16059
|
})(t), B = new As(t, n);
|
16060
16060
|
n.dragPan = new Ji(o, L, B), this._add("mousePan", L), this._add("touchPan", B, ["touchZoom", "touchRotate"]), t.interactive && t.dragPan && n.dragPan.enable(t.dragPan);
|
16061
|
-
const
|
16062
|
-
n.touchZoomRotate = new ka(o, Z,
|
16061
|
+
const V = new Sa(), Z = new ba();
|
16062
|
+
n.touchZoomRotate = new ka(o, Z, V, v), this._add("touchRotate", V, ["touchPan", "touchZoom"]), this._add("touchZoom", Z, ["touchPan", "touchRotate"]), t.interactive && t.touchZoomRotate && n.touchZoomRotate.enable(t.touchZoomRotate);
|
16063
16063
|
const j = n.scrollZoom = new Aa(n, () => this._triggerRenderFrame());
|
16064
16064
|
this._add("scrollZoom", j, ["mousePan"]), t.interactive && t.scrollZoom && n.scrollZoom.enable(t.scrollZoom);
|
16065
16065
|
const H = n.keyboard = new Ia(n);
|
@@ -16110,41 +16110,41 @@ uniform ${A} ${C} u_${L};
|
|
16110
16110
|
_updateMapTransform(t, n, o) {
|
16111
16111
|
const a = this._map, h = a._getTransformForUpdate(), m = a.terrain;
|
16112
16112
|
if (!(Ea(t) || m && this._terrainMovement)) return this._fireEvents(n, o, !0);
|
16113
|
-
let { panDelta: y, zoomDelta: v, bearingDelta: b, pitchDelta:
|
16114
|
-
L !== void 0 && (
|
16115
|
-
const B = h.pointLocation(y ?
|
16116
|
-
b && (h.bearing += b),
|
16113
|
+
let { panDelta: y, zoomDelta: v, bearingDelta: b, pitchDelta: P, around: A, pinchAround: L } = t;
|
16114
|
+
L !== void 0 && (A = L), a._stop(!0), A = A || a.transform.centerPoint;
|
16115
|
+
const B = h.pointLocation(y ? A.sub(y) : A);
|
16116
|
+
b && (h.bearing += b), P && (h.pitch += P), v && (h.zoom += v), m ? this._terrainMovement || !n.drag && !n.zoom ? n.drag && this._terrainMovement ? h.center = h.pointLocation(h.centerPoint.sub(y)) : h.setLocationAtPoint(B, A) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, h.setLocationAtPoint(B, A)) : h.setLocationAtPoint(B, A), a._applyUpdatedTransform(h), this._map._update(), t.noInertia || this._inertia.record(t), this._fireEvents(n, o, !0);
|
16117
16117
|
}
|
16118
16118
|
_fireEvents(t, n, o) {
|
16119
16119
|
const a = Rr(this._eventsInProgress), h = Rr(t), m = {};
|
16120
|
-
for (const
|
16121
|
-
const { originalEvent: L } = t[
|
16122
|
-
this._eventsInProgress[
|
16120
|
+
for (const A in t) {
|
16121
|
+
const { originalEvent: L } = t[A];
|
16122
|
+
this._eventsInProgress[A] || (m[`${A}start`] = L), this._eventsInProgress[A] = t[A];
|
16123
16123
|
}
|
16124
16124
|
!a && h && this._fireEvent("movestart", h.originalEvent);
|
16125
|
-
for (const
|
16125
|
+
for (const A in m) this._fireEvent(A, m[A]);
|
16126
16126
|
h && this._fireEvent("move", h.originalEvent);
|
16127
|
-
for (const
|
16128
|
-
const { originalEvent: L } = t[
|
16129
|
-
this._fireEvent(
|
16127
|
+
for (const A in t) {
|
16128
|
+
const { originalEvent: L } = t[A];
|
16129
|
+
this._fireEvent(A, L);
|
16130
16130
|
}
|
16131
16131
|
const y = {};
|
16132
16132
|
let v;
|
16133
|
-
for (const
|
16134
|
-
const { handlerName: L, originalEvent: B } = this._eventsInProgress[
|
16135
|
-
this._handlersById[L].isActive() || (delete this._eventsInProgress[
|
16133
|
+
for (const A in this._eventsInProgress) {
|
16134
|
+
const { handlerName: L, originalEvent: B } = this._eventsInProgress[A];
|
16135
|
+
this._handlersById[L].isActive() || (delete this._eventsInProgress[A], v = n[L] || B, y[`${A}end`] = v);
|
16136
16136
|
}
|
16137
|
-
for (const
|
16138
|
-
const b = Rr(this._eventsInProgress),
|
16139
|
-
if (
|
16137
|
+
for (const A in y) this._fireEvent(A, y[A]);
|
16138
|
+
const b = Rr(this._eventsInProgress), P = (a || h) && !b;
|
16139
|
+
if (P && this._terrainMovement) {
|
16140
16140
|
this._map._elevationFreeze = !1, this._terrainMovement = !1;
|
16141
|
-
const
|
16142
|
-
|
16141
|
+
const A = this._map._getTransformForUpdate();
|
16142
|
+
A.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform(A);
|
16143
16143
|
}
|
16144
|
-
if (o &&
|
16144
|
+
if (o && P) {
|
16145
16145
|
this._updatingCamera = !0;
|
16146
|
-
const
|
16147
|
-
!
|
16146
|
+
const A = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), L = (B) => B !== 0 && -this._bearingSnap < B && B < this._bearingSnap;
|
16147
|
+
!A || !A.essential && ae.prefersReducedMotion ? (this._map.fire(new c.k("moveend", { originalEvent: v })), L(this._map.getBearing()) && this._map.resetNorth()) : (L(A.bearing || this._map.getBearing()) && (A.bearing = 0), A.freezeElevation = !0, this._map.easeTo(A, { originalEvent: v })), this._updatingCamera = !1;
|
16148
16148
|
}
|
16149
16149
|
}
|
16150
16150
|
_fireEvent(t, n) {
|
@@ -16237,10 +16237,10 @@ uniform ${A} ${C} u_${L};
|
|
16237
16237
|
a.padding = { top: we, bottom: we, right: we, left: we };
|
16238
16238
|
}
|
16239
16239
|
a.padding = c.e(h, a.padding);
|
16240
|
-
const m = this.transform, y = m.padding, v = new he(t, n), b = m.project(v.getNorthWest()),
|
16240
|
+
const m = this.transform, y = m.padding, v = new he(t, n), b = m.project(v.getNorthWest()), P = m.project(v.getNorthEast()), A = m.project(v.getSouthEast()), L = m.project(v.getSouthWest()), B = c.ba(-o), V = b.rotate(B), Z = P.rotate(B), j = A.rotate(B), H = L.rotate(B), K = new c.P(Math.max(V.x, Z.x, H.x, j.x), Math.max(V.y, Z.y, H.y, j.y)), U = new c.P(Math.min(V.x, Z.x, H.x, j.x), Math.min(V.y, Z.y, H.y, j.y)), ee = K.sub(U), ne = (m.width - (y.left + y.right + a.padding.left + a.padding.right)) / ee.x, le = (m.height - (y.top + y.bottom + a.padding.top + a.padding.bottom)) / ee.y;
|
16241
16241
|
if (le < 0 || ne < 0) return void c.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
|
16242
16242
|
const me = Math.min(m.scaleZoom(m.scale * Math.min(ne, le)), a.maxZoom), be = c.P.convert(a.offset), ze = new c.P((a.padding.left - a.padding.right) / 2, (a.padding.top - a.padding.bottom) / 2).rotate(c.ba(o)), Le = be.add(ze).mult(m.scale / m.zoomScale(me));
|
16243
|
-
return { center: m.unproject(b.add(
|
16243
|
+
return { center: m.unproject(b.add(A).div(2).sub(Le)), zoom: me, bearing: o };
|
16244
16244
|
}
|
16245
16245
|
fitBounds(t, n, o) {
|
16246
16246
|
return this._fitInternal(this.cameraForBounds(t, n), n, o);
|
@@ -16258,25 +16258,25 @@ uniform ${A} ${C} u_${L};
|
|
16258
16258
|
return "zoom" in t && o.zoom !== +t.zoom && (a = !0, o.zoom = +t.zoom), t.center !== void 0 && (o.center = c.N.convert(t.center)), "bearing" in t && o.bearing !== +t.bearing && (h = !0, o.bearing = +t.bearing), "pitch" in t && o.pitch !== +t.pitch && (m = !0, o.pitch = +t.pitch), t.padding == null || o.isPaddingEqual(t.padding) || (o.padding = t.padding), this._applyUpdatedTransform(o), this.fire(new c.k("movestart", n)).fire(new c.k("move", n)), a && this.fire(new c.k("zoomstart", n)).fire(new c.k("zoom", n)).fire(new c.k("zoomend", n)), h && this.fire(new c.k("rotatestart", n)).fire(new c.k("rotate", n)).fire(new c.k("rotateend", n)), m && this.fire(new c.k("pitchstart", n)).fire(new c.k("pitch", n)).fire(new c.k("pitchend", n)), this.fire(new c.k("moveend", n));
|
16259
16259
|
}
|
16260
16260
|
calculateCameraOptionsFromTo(t, n, o, a = 0) {
|
16261
|
-
const h = c.Z.fromLngLat(t, n), m = c.Z.fromLngLat(o, a), y = m.x - h.x, v = m.y - h.y, b = m.z - h.z,
|
16262
|
-
if (
|
16263
|
-
const
|
16264
|
-
let
|
16265
|
-
return
|
16261
|
+
const h = c.Z.fromLngLat(t, n), m = c.Z.fromLngLat(o, a), y = m.x - h.x, v = m.y - h.y, b = m.z - h.z, P = Math.hypot(y, v, b);
|
16262
|
+
if (P === 0) throw new Error("Can't calculate camera options with same From and To");
|
16263
|
+
const A = Math.hypot(y, v), L = this.transform.scaleZoom(this.transform.cameraToCenterDistance / P / this.transform.tileSize), B = 180 * Math.atan2(y, -v) / Math.PI;
|
16264
|
+
let V = 180 * Math.acos(A / P) / Math.PI;
|
16265
|
+
return V = b < 0 ? 90 - V : 90 + V, { center: m.toLngLat(), zoom: L, pitch: V, bearing: B };
|
16266
16266
|
}
|
16267
16267
|
easeTo(t, n) {
|
16268
16268
|
var o;
|
16269
16269
|
this._stop(!1, t.easeId), ((t = c.e({ offset: [0, 0], duration: 500, easing: c.b9 }, t)).animate === !1 || !t.essential && ae.prefersReducedMotion) && (t.duration = 0);
|
16270
|
-
const a = this._getTransformForUpdate(), h = a.zoom, m = a.bearing, y = a.pitch, v = a.padding, b = "bearing" in t ? this._normalizeBearing(t.bearing, m) : m,
|
16270
|
+
const a = this._getTransformForUpdate(), h = a.zoom, m = a.bearing, y = a.pitch, v = a.padding, b = "bearing" in t ? this._normalizeBearing(t.bearing, m) : m, P = "pitch" in t ? +t.pitch : y, A = "padding" in t ? t.padding : a.padding, L = c.P.convert(t.offset);
|
16271
16271
|
let B = a.centerPoint.add(L);
|
16272
|
-
const
|
16272
|
+
const V = a.pointLocation(B), { center: Z, zoom: j } = a.getConstrained(c.N.convert(t.center || V), (o = t.zoom) !== null && o !== void 0 ? o : h);
|
16273
16273
|
this._normalizeCenter(Z, a);
|
16274
|
-
const H = a.project(
|
16274
|
+
const H = a.project(V), K = a.project(Z).sub(H), U = a.zoomScale(j - h);
|
16275
16275
|
let ee, ne;
|
16276
16276
|
t.around && (ee = c.N.convert(t.around), ne = a.locationPoint(ee));
|
16277
16277
|
const le = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
|
16278
|
-
return this._zooming = this._zooming || j !== h, this._rotating = this._rotating || m !== b, this._pitching = this._pitching ||
|
16279
|
-
if (this._zooming && (a.zoom = c.z.number(h, j, me)), this._rotating && (a.bearing = c.z.number(m, b, me)), this._pitching && (a.pitch = c.z.number(y,
|
16278
|
+
return this._zooming = this._zooming || j !== h, this._rotating = this._rotating || m !== b, this._pitching = this._pitching || P !== y, this._padding = !a.isPaddingEqual(A), this._easeId = t.easeId, this._prepareEase(n, t.noMoveStart, le), this.terrain && this._prepareElevation(Z), this._ease((me) => {
|
16279
|
+
if (this._zooming && (a.zoom = c.z.number(h, j, me)), this._rotating && (a.bearing = c.z.number(m, b, me)), this._pitching && (a.pitch = c.z.number(y, P, me)), this._padding && (a.interpolatePadding(v, A, me), B = a.centerPoint.add(L)), this.terrain && !t.freezeElevation && this._updateElevation(me), ee) a.setLocationAtPoint(ee, ne);
|
16280
16280
|
else {
|
16281
16281
|
const be = a.zoomScale(a.zoom - h), ze = j > h ? Math.min(2, U) : Math.max(0.5, U), Le = Math.pow(ze, 1 - me), we = a.unproject(H.add(K.mult(me * Le)).mult(be));
|
16282
16282
|
a.setLocationAtPoint(a.renderWorldCopies ? we.wrap() : we, B);
|
@@ -16320,8 +16320,8 @@ uniform ${A} ${C} u_${L};
|
|
16320
16320
|
if (this.terrain && n.push((a) => this._elevateCameraIfInsideTerrain(a)), this.transformCameraUpdate && n.push((a) => this.transformCameraUpdate(a)), !n.length) return;
|
16321
16321
|
const o = t.clone();
|
16322
16322
|
for (const a of n) {
|
16323
|
-
const h = o.clone(), { center: m, zoom: y, pitch: v, bearing: b, elevation:
|
16324
|
-
m && (h.center = m), y !== void 0 && (h.zoom = y), v !== void 0 && (h.pitch = v), b !== void 0 && (h.bearing = b),
|
16323
|
+
const h = o.clone(), { center: m, zoom: y, pitch: v, bearing: b, elevation: P } = a(h);
|
16324
|
+
m && (h.center = m), y !== void 0 && (h.zoom = y), v !== void 0 && (h.pitch = v), b !== void 0 && (h.bearing = b), P !== void 0 && (h.elevation = P), o.apply(h);
|
16325
16325
|
}
|
16326
16326
|
this.transform.apply(o);
|
16327
16327
|
}
|
@@ -16341,11 +16341,11 @@ uniform ${A} ${C} u_${L};
|
|
16341
16341
|
return this.jumpTo(ke, n);
|
16342
16342
|
}
|
16343
16343
|
this.stop(), t = c.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: c.b9 }, t);
|
16344
|
-
const a = this._getTransformForUpdate(), h = a.zoom, m = a.bearing, y = a.pitch, v = a.padding, b = "bearing" in t ? this._normalizeBearing(t.bearing, m) : m,
|
16344
|
+
const a = this._getTransformForUpdate(), h = a.zoom, m = a.bearing, y = a.pitch, v = a.padding, b = "bearing" in t ? this._normalizeBearing(t.bearing, m) : m, P = "pitch" in t ? +t.pitch : y, A = "padding" in t ? t.padding : a.padding, L = c.P.convert(t.offset);
|
16345
16345
|
let B = a.centerPoint.add(L);
|
16346
|
-
const
|
16346
|
+
const V = a.pointLocation(B), { center: Z, zoom: j } = a.getConstrained(c.N.convert(t.center || V), (o = t.zoom) !== null && o !== void 0 ? o : h);
|
16347
16347
|
this._normalizeCenter(Z, a);
|
16348
|
-
const H = a.zoomScale(j - h), K = a.project(
|
16348
|
+
const H = a.zoomScale(j - h), K = a.project(V), U = a.project(Z).sub(K);
|
16349
16349
|
let ee = t.curve;
|
16350
16350
|
const ne = Math.max(a.width, a.height), le = ne / H, me = U.mag();
|
16351
16351
|
if ("minZoom" in t) {
|
@@ -16375,9 +16375,9 @@ uniform ${A} ${C} u_${L};
|
|
16375
16375
|
const ke = le < ne ? -1 : 1;
|
16376
16376
|
Pe = Math.abs(Math.log(le / ne)) / ee, et = () => 0, Oe = (Ke) => Math.exp(ke * ee * Ke);
|
16377
16377
|
}
|
16378
|
-
return t.duration = "duration" in t ? +t.duration : 1e3 * Pe / ("screenSpeed" in t ? +t.screenSpeed / ee : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = m !== b, this._pitching =
|
16378
|
+
return t.duration = "duration" in t ? +t.duration : 1e3 * Pe / ("screenSpeed" in t ? +t.screenSpeed / ee : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = m !== b, this._pitching = P !== y, this._padding = !a.isPaddingEqual(A), this._prepareEase(n, !1), this.terrain && this._prepareElevation(Z), this._ease((ke) => {
|
16379
16379
|
const Ke = ke * Pe, Lt = 1 / Oe(Ke);
|
16380
|
-
a.zoom = ke === 1 ? j : h + a.scaleZoom(Lt), this._rotating && (a.bearing = c.z.number(m, b, ke)), this._pitching && (a.pitch = c.z.number(y,
|
16380
|
+
a.zoom = ke === 1 ? j : h + a.scaleZoom(Lt), this._rotating && (a.bearing = c.z.number(m, b, ke)), this._pitching && (a.pitch = c.z.number(y, P, ke)), this._padding && (a.interpolatePadding(v, A, ke), B = a.centerPoint.add(L)), this.terrain && !t.freezeElevation && this._updateElevation(ke);
|
16381
16381
|
const st = ke === 1 ? Z : a.unproject(K.add(U.mult(et(Ke))).mult(Lt));
|
16382
16382
|
a.setLocationAtPoint(a.renderWorldCopies ? st.wrap() : st, B), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
|
16383
16383
|
}, () => {
|
@@ -16578,11 +16578,11 @@ uniform ${A} ${C} u_${L};
|
|
16578
16578
|
if (!(n >= 0 && n < a && o >= 0 && o < a)) return 0;
|
16579
16579
|
const m = this.getTerrainData(t), y = (h = m.tile) === null || h === void 0 ? void 0 : h.dem;
|
16580
16580
|
if (!y) return 0;
|
16581
|
-
const v = function(
|
16581
|
+
const v = function(V, Z, j) {
|
16582
16582
|
var H = Z[0], K = Z[1];
|
16583
|
-
return
|
16584
|
-
}([], [n / a * c.X, o / a * c.X], m.u_terrain_matrix), b = [v[0] * y.dim, v[1] * y.dim],
|
16585
|
-
return y.get(
|
16583
|
+
return V[0] = j[0] * H + j[4] * K + j[12], V[1] = j[1] * H + j[5] * K + j[13], V;
|
16584
|
+
}([], [n / a * c.X, o / a * c.X], m.u_terrain_matrix), b = [v[0] * y.dim, v[1] * y.dim], P = Math.floor(b[0]), A = Math.floor(b[1]), L = b[0] - P, B = b[1] - A;
|
16585
|
+
return y.get(P, A) * (1 - L) * (1 - B) + y.get(P + 1, A) * L * (1 - B) + y.get(P, A + 1) * (1 - L) * B + y.get(P + 1, A + 1) * L * B;
|
16586
16586
|
}
|
16587
16587
|
getElevationForLngLatZoom(t, n) {
|
16588
16588
|
const { tileID: o, mercatorX: a, mercatorY: h } = this._getOverscaledTileIDFromLngLatZoom(t, n);
|
@@ -16627,10 +16627,10 @@ uniform ${A} ${C} u_${L};
|
|
16627
16627
|
this.painter.maybeDrawDepthAndCoords(!0);
|
16628
16628
|
const n = new Uint8Array(4), o = this.painter.context, a = o.gl, h = Math.round(t.x * this.painter.pixelRatio / devicePixelRatio), m = Math.round(t.y * this.painter.pixelRatio / devicePixelRatio), y = Math.round(this.painter.height / devicePixelRatio);
|
16629
16629
|
o.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), a.readPixels(h, y - m - 1, 1, 1, a.RGBA, a.UNSIGNED_BYTE, n), o.bindFramebuffer.set(null);
|
16630
|
-
const v = n[0] + (n[2] >> 4 << 8), b = n[1] + ((15 & n[2]) << 8),
|
16631
|
-
if (!
|
16632
|
-
const L = this._coordsTextureSize, B = (1 <<
|
16633
|
-
return new c.Z((
|
16630
|
+
const v = n[0] + (n[2] >> 4 << 8), b = n[1] + ((15 & n[2]) << 8), P = this.coordsIndex[255 - n[3]], A = P && this.sourceCache.getTileByID(P);
|
16631
|
+
if (!A) return null;
|
16632
|
+
const L = this._coordsTextureSize, B = (1 << A.tileID.canonical.z) * L;
|
16633
|
+
return new c.Z((A.tileID.canonical.x * L + v) / B + A.tileID.wrap, (A.tileID.canonical.y * L + b) / B, this.getElevation(A.tileID, v, b, L));
|
16634
16634
|
}
|
16635
16635
|
depthAtPoint(t) {
|
16636
16636
|
const n = new Uint8Array(4), o = this.painter.context, a = o.gl;
|
@@ -16639,14 +16639,14 @@ uniform ${A} ${C} u_${L};
|
|
16639
16639
|
getTerrainMesh() {
|
16640
16640
|
if (this._mesh) return this._mesh;
|
16641
16641
|
const t = this.painter.context, n = new c.bc(), o = new c.aY(), a = this.meshSize, h = c.X / a, m = a * a;
|
16642
|
-
for (let
|
16643
|
-
for (let
|
16642
|
+
for (let A = 0; A <= a; A++) for (let L = 0; L <= a; L++) n.emplaceBack(L * h, A * h, 0);
|
16643
|
+
for (let A = 0; A < m; A += a + 1) for (let L = 0; L < a; L++) o.emplaceBack(L + A, a + L + A + 1, a + L + A + 2), o.emplaceBack(L + A, a + L + A + 2, L + A + 1);
|
16644
16644
|
const y = n.length, v = y + 2 * (a + 1);
|
16645
|
-
for (const
|
16646
|
-
for (let
|
16647
|
-
const b = n.length,
|
16648
|
-
for (const
|
16649
|
-
for (let
|
16645
|
+
for (const A of [0, 1]) for (let L = 0; L <= a; L++) for (const B of [0, 1]) n.emplaceBack(L * h, A * c.X, B);
|
16646
|
+
for (let A = 0; A < 2 * a; A += 2) o.emplaceBack(v + A, v + A + 1, v + A + 3), o.emplaceBack(v + A, v + A + 3, v + A + 2), o.emplaceBack(y + A, y + A + 3, y + A + 1), o.emplaceBack(y + A, y + A + 2, y + A + 3);
|
16647
|
+
const b = n.length, P = b + 2 * (a + 1);
|
16648
|
+
for (const A of [0, 1]) for (let L = 0; L <= a; L++) for (const B of [0, 1]) n.emplaceBack(A * c.X, L * h, B);
|
16649
|
+
for (let A = 0; A < 2 * a; A += 2) o.emplaceBack(b + A, b + A + 1, b + A + 3), o.emplaceBack(b + A, b + A + 3, b + A + 2), o.emplaceBack(P + A, P + A + 3, P + A + 1), o.emplaceBack(P + A, P + A + 2, P + A + 3);
|
16650
16650
|
return this._mesh = new Ml(t.createVertexBuffer(n, Ol.members), t.createIndexBuffer(o), c.a0.simpleSegment(0, 0, n.length, o.length)), this._mesh;
|
16651
16651
|
}
|
16652
16652
|
getMeshFrameDelta(t) {
|
@@ -16754,8 +16754,8 @@ uniform ${A} ${C} u_${L};
|
|
16754
16754
|
const v = this.pool.getOrCreateFreeObject();
|
16755
16755
|
this.pool.useObject(v), this.pool.stampObject(v), y.rtt[h] = { id: v.id, stamp: v.stamp }, o.context.bindFramebuffer.set(v.fbo.framebuffer), o.context.clear({ color: c.aN.transparent, stencil: 0 }), o.currentStencilSource = void 0;
|
16756
16756
|
for (let b = 0; b < m.length; b++) {
|
16757
|
-
const
|
16758
|
-
o.context.viewport.set([0, 0, v.fbo.width, v.fbo.height]), o._renderTileClippingMasks(
|
16757
|
+
const P = o.style._layers[m[b]], A = P.source ? this._coordsDescendingInv[P.source][y.tileID.key] : [y.tileID];
|
16758
|
+
o.context.viewport.set([0, 0, v.fbo.width, v.fbo.height]), o._renderTileClippingMasks(P, A), o.renderLayer(o, o.style.sourceCaches[P.source], P, A), P.source && (y.rttCoords[P.source] = this._coordsDescendingInvStr[P.source][y.tileID.key]);
|
16759
16759
|
}
|
16760
16760
|
}
|
16761
16761
|
return Ss(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects(), br[n];
|
@@ -16786,10 +16786,10 @@ uniform ${A} ${C} u_${L};
|
|
16786
16786
|
const a = t.dragRotate._mouseRotate.getClickTolerance(), h = t.dragRotate._mousePitch.getClickTolerance();
|
16787
16787
|
this.element = n, this.mouseRotate = xa({ clickTolerance: a, enable: !0 }), this.touchRotate = (({ enable: m, clickTolerance: y, bearingDegreesPerPixelMoved: v = 0.8 }) => {
|
16788
16788
|
const b = new vo();
|
16789
|
-
return new Dt({ clickTolerance: y, move: (
|
16789
|
+
return new Dt({ clickTolerance: y, move: (P, A) => ({ bearingDelta: (A.x - P.x) * v }), moveStateManager: b, enable: m, assignEvents: Ul });
|
16790
16790
|
})({ clickTolerance: a, enable: !0 }), this.map = t, o && (this.mousePitch = Tn({ clickTolerance: h, enable: !0 }), this.touchPitch = (({ enable: m, clickTolerance: y, pitchDegreesPerPixelMoved: v = -0.5 }) => {
|
16791
16791
|
const b = new vo();
|
16792
|
-
return new Dt({ clickTolerance: y, move: (
|
16792
|
+
return new Dt({ clickTolerance: y, move: (P, A) => ({ pitchDelta: (A.y - P.y) * v }), moveStateManager: b, enable: m, assignEvents: Ul });
|
16793
16793
|
})({ clickTolerance: h, enable: !0 })), oe.addEventListener(n, "mousedown", this.mousedown), oe.addEventListener(n, "touchstart", this.touchstart, { passive: !1 }), oe.addEventListener(n, "touchcancel", this.reset);
|
16794
16794
|
}
|
16795
16795
|
startMouse(t, n) {
|
@@ -16888,20 +16888,20 @@ uniform ${A} ${C} u_${L};
|
|
16888
16888
|
}
|
16889
16889
|
const b = oe.createNS("http://www.w3.org/2000/svg", "g");
|
16890
16890
|
b.setAttributeNS(null, "fill", this._color);
|
16891
|
-
const
|
16892
|
-
|
16893
|
-
const
|
16894
|
-
|
16891
|
+
const P = oe.createNS("http://www.w3.org/2000/svg", "path");
|
16892
|
+
P.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), b.appendChild(P);
|
16893
|
+
const A = oe.createNS("http://www.w3.org/2000/svg", "g");
|
16894
|
+
A.setAttributeNS(null, "opacity", "0.25"), A.setAttributeNS(null, "fill", "#000000");
|
16895
16895
|
const L = oe.createNS("http://www.w3.org/2000/svg", "path");
|
16896
|
-
L.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),
|
16896
|
+
L.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), A.appendChild(L);
|
16897
16897
|
const B = oe.createNS("http://www.w3.org/2000/svg", "g");
|
16898
16898
|
B.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), B.setAttributeNS(null, "fill", "#FFFFFF");
|
16899
|
-
const
|
16900
|
-
|
16899
|
+
const V = oe.createNS("http://www.w3.org/2000/svg", "g");
|
16900
|
+
V.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
|
16901
16901
|
const Z = oe.createNS("http://www.w3.org/2000/svg", "circle");
|
16902
16902
|
Z.setAttributeNS(null, "fill", "#000000"), Z.setAttributeNS(null, "opacity", "0.25"), Z.setAttributeNS(null, "cx", "5.5"), Z.setAttributeNS(null, "cy", "5.5"), Z.setAttributeNS(null, "r", "5.4999962");
|
16903
16903
|
const j = oe.createNS("http://www.w3.org/2000/svg", "circle");
|
16904
|
-
j.setAttributeNS(null, "fill", "#FFFFFF"), j.setAttributeNS(null, "cx", "5.5"), j.setAttributeNS(null, "cy", "5.5"), j.setAttributeNS(null, "r", "5.4999962"),
|
16904
|
+
j.setAttributeNS(null, "fill", "#FFFFFF"), j.setAttributeNS(null, "cx", "5.5"), j.setAttributeNS(null, "cy", "5.5"), j.setAttributeNS(null, "r", "5.4999962"), V.appendChild(Z), V.appendChild(j), m.appendChild(y), m.appendChild(b), m.appendChild(A), m.appendChild(B), m.appendChild(V), n.appendChild(m), n.setAttributeNS(null, "height", o * this._scale + "px"), n.setAttributeNS(null, "width", a * this._scale + "px"), this._element.appendChild(n), this._offset = c.P.convert(t && t.offset || [0, -14]);
|
16905
16905
|
}
|
16906
16906
|
if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (n) => {
|
16907
16907
|
n.preventDefault();
|
@@ -16957,8 +16957,8 @@ uniform ${A} ${C} u_${L};
|
|
16957
16957
|
}
|
16958
16958
|
const a = this._map, h = a.terrain.depthAtPoint(this._pos), m = a.terrain.getElevationForLngLatZoom(this._lngLat, a.transform.tileZoom);
|
16959
16959
|
if (a.transform.lngLatToCameraDepth(this._lngLat, m) - h < 6e-3) return void (this._element.style.opacity = this._opacity);
|
16960
|
-
const y = -this._offset.y / a.transform._pixelPerMeter, v = Math.sin(a.getPitch() * Math.PI / 180) * y, b = a.terrain.depthAtPoint(new c.P(this._pos.x, this._pos.y - this._offset.y)),
|
16961
|
-
!((o = this._popup) === null || o === void 0) && o.isOpen() &&
|
16960
|
+
const y = -this._offset.y / a.transform._pixelPerMeter, v = Math.sin(a.getPitch() * Math.PI / 180) * y, b = a.terrain.depthAtPoint(new c.P(this._pos.x, this._pos.y - this._offset.y)), P = a.transform.lngLatToCameraDepth(this._lngLat, m + v) - b > 6e-3;
|
16961
|
+
!((o = this._popup) === null || o === void 0) && o.isOpen() && P && this._popup.remove(), this._element.style.opacity = P ? this._opacityWhenCovered : this._opacity;
|
16962
16962
|
}
|
16963
16963
|
getOffset() {
|
16964
16964
|
return this._offset;
|
@@ -17539,13 +17539,13 @@ uniform ${A} ${C} u_${L};
|
|
17539
17539
|
if (this._lazyInitEmptyStyle(), !(t instanceof HTMLImageElement || c.b(t))) {
|
17540
17540
|
if (t.width === void 0 || t.height === void 0) return this.fire(new c.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
|
17541
17541
|
{
|
17542
|
-
const { width:
|
17543
|
-
return this.style.addImage(u, { data: new c.R({ width:
|
17542
|
+
const { width: P, height: A, data: L } = t, B = t;
|
17543
|
+
return this.style.addImage(u, { data: new c.R({ width: P, height: A }, new Uint8Array(L)), pixelRatio: o, stretchX: h, stretchY: m, content: y, textFitWidth: v, textFitHeight: b, sdf: a, version: 0, userImage: B }), B.onAdd && B.onAdd(this, u), this;
|
17544
17544
|
}
|
17545
17545
|
}
|
17546
17546
|
{
|
17547
|
-
const { width:
|
17548
|
-
this.style.addImage(u, { data: new c.R({ width:
|
17547
|
+
const { width: P, height: A, data: L } = ae.getImageData(t);
|
17548
|
+
this.style.addImage(u, { data: new c.R({ width: P, height: A }, L), pixelRatio: o, stretchX: h, stretchY: m, content: y, textFitWidth: v, textFitHeight: b, sdf: a, version: 0 });
|
17549
17549
|
}
|
17550
17550
|
}
|
17551
17551
|
updateImage(u, t) {
|
@@ -17959,7 +17959,7 @@ uniform ${A} ${C} u_${L};
|
|
17959
17959
|
c.a.WORKER_URL = u;
|
17960
17960
|
};
|
17961
17961
|
});
|
17962
|
-
var X =
|
17962
|
+
var X = C;
|
17963
17963
|
return X;
|
17964
17964
|
});
|
17965
17965
|
})(cp);
|
@@ -18020,37 +18020,37 @@ const Qh = {
|
|
18020
18020
|
},
|
18021
18021
|
methods: {
|
18022
18022
|
moveLayer(g, w = this.map) {
|
18023
|
-
w.getStyle().layers.forEach((
|
18024
|
-
|
18023
|
+
w.getStyle().layers.forEach((C) => {
|
18024
|
+
C.id.match(g) && w.moveLayer(C.id);
|
18025
18025
|
});
|
18026
18026
|
},
|
18027
|
-
async setVisible(g, w = !0,
|
18027
|
+
async setVisible(g, w = !0, C = this.map) {
|
18028
18028
|
if (!g) return;
|
18029
|
-
const E = (g == null ? void 0 : g.id) || g,
|
18030
|
-
if (!(
|
18031
|
-
const X =
|
18029
|
+
const E = (g == null ? void 0 : g.id) || g, N = this.layerList.find((T) => T.id === g) || g;
|
18030
|
+
if (!(N != null && N.id)) throw new Error("MixinError: Layer has no id");
|
18031
|
+
const X = C.getStyle().layers.filter((T) => T.id.match(E));
|
18032
18032
|
X.forEach((T) => {
|
18033
|
-
|
18033
|
+
C.setLayoutProperty(
|
18034
18034
|
T.id,
|
18035
18035
|
"visibility",
|
18036
18036
|
w ? "visible" : "none"
|
18037
18037
|
);
|
18038
|
-
}), !X.length && w && await this.addLayer(
|
18038
|
+
}), !X.length && w && await this.addLayer(N);
|
18039
18039
|
},
|
18040
|
-
async addLayer(g, w = {},
|
18040
|
+
async addLayer(g, w = {}, C = this == null ? void 0 : this.map) {
|
18041
18041
|
var X, T, c;
|
18042
18042
|
const E = this.layerList.find((_e) => _e.id === g) || g;
|
18043
|
-
this.map.getStyle().layers.find((_e) => _e.id === E.id) || (this.layerList.find((_e) => _e.id === E.id) || this.layerList.push(E), (E.service === "vtile" || E.service === "vector" || (X = E.url) != null && X.includes(".vmt")) && this.addVtileLayer(E,
|
18043
|
+
this.map.getStyle().layers.find((_e) => _e.id === E.id) || (this.layerList.find((_e) => _e.id === E.id) || this.layerList.push(E), (E.service === "vtile" || E.service === "vector" || (X = E.url) != null && X.includes(".vmt")) && this.addVtileLayer(E, C), E.service === "geojson" && this.addGeoJsonLayer(E, C), ((T = E.url) != null && T.includes(".png") || ["tms", "raster"].includes((c = E.service) == null ? void 0 : c.toLowerCase())) && await this.addRasterLayer(E, w, C));
|
18044
18044
|
},
|
18045
|
-
async addRasterLayer(g, w,
|
18046
|
-
await
|
18045
|
+
async addRasterLayer(g, w, C = this == null ? void 0 : this.map) {
|
18046
|
+
await C.addSource(g.id, {
|
18047
18047
|
type: "raster",
|
18048
18048
|
tiles: [g == null ? void 0 : g.url],
|
18049
18049
|
tileSize: 256,
|
18050
18050
|
...g != null && g.scheme ? { scheme: g == null ? void 0 : g.scheme } : {}
|
18051
18051
|
});
|
18052
18052
|
const E = w.order === 0 ? this.getOrder(w.order) : null;
|
18053
|
-
await
|
18053
|
+
await C.addLayer({
|
18054
18054
|
id: g.id,
|
18055
18055
|
type: "raster",
|
18056
18056
|
source: g.id,
|
@@ -18060,9 +18060,9 @@ const Qh = {
|
|
18060
18060
|
},
|
18061
18061
|
async addVtileLayer(g, w = this == null ? void 0 : this.map) {
|
18062
18062
|
var X;
|
18063
|
-
const
|
18063
|
+
const C = ["props", "pointZoom"].filter((T) => g[T]).map((T) => `&${T}=${g[T]}`), E = {
|
18064
18064
|
type: "vector",
|
18065
|
-
tiles: [`${(X = g == null ? void 0 : g.url) != null && X.startsWith("http") ? "" : window.location.origin}${g == null ? void 0 : g.url}${
|
18065
|
+
tiles: [`${(X = g == null ? void 0 : g.url) != null && X.startsWith("http") ? "" : window.location.origin}${g == null ? void 0 : g.url}${C}`],
|
18066
18066
|
minzoom: g.minzoom || 5,
|
18067
18067
|
maxzoom: g.maxzoom || 24
|
18068
18068
|
};
|
@@ -18079,9 +18079,9 @@ const Qh = {
|
|
18079
18079
|
});
|
18080
18080
|
},
|
18081
18081
|
async addGeoJsonLayer(g, w = this.map) {
|
18082
|
-
var
|
18083
|
-
const
|
18084
|
-
w.addSource(g.id, { type: "geojson", data:
|
18082
|
+
var N;
|
18083
|
+
const C = g.data || ((N = g == null ? void 0 : g.url) != null && N.startsWith("http") ? "" : window.location.origin) + g.url;
|
18084
|
+
w.addSource(g.id, { type: "geojson", data: C }), (Zd(g.style) || g.layers || []).forEach((X) => {
|
18085
18085
|
const T = {
|
18086
18086
|
...X,
|
18087
18087
|
source: g.id,
|
@@ -18094,17 +18094,17 @@ const Qh = {
|
|
18094
18094
|
});
|
18095
18095
|
},
|
18096
18096
|
setLayerData(g, w) {
|
18097
|
-
this.layerList = this.layerList.map((
|
18097
|
+
this.layerList = this.layerList.map((C) => C.id === g ? { ...C, ...w } : C);
|
18098
18098
|
},
|
18099
18099
|
async removeLayer(g, w = this.map) {
|
18100
|
-
await w.getStyle().layers.forEach(async (
|
18101
|
-
|
18100
|
+
await w.getStyle().layers.forEach(async (C) => {
|
18101
|
+
C.source === g && await w.removeLayer(C.id);
|
18102
18102
|
}), w.getSource(g) && await w.removeSource(g);
|
18103
18103
|
},
|
18104
18104
|
async setFilter(g, w) {
|
18105
|
-
const
|
18105
|
+
const C = this.layerList.find((N) => N.id === g), E = await this.map.getSource(g);
|
18106
18106
|
await (E == null ? void 0 : E.setTiles([
|
18107
|
-
`${window.location.origin}${
|
18107
|
+
`${window.location.origin}${C.url.split("&filter")[0]}${C.url.includes("?") ? "&" : "?"}filter=${w}${C.props ? `&props=${C.props}` : ""}`
|
18108
18108
|
]));
|
18109
18109
|
},
|
18110
18110
|
getOrder(g) {
|
@@ -18115,16 +18115,16 @@ const Qh = {
|
|
18115
18115
|
g !== this.activeLayer && (this.activeLayer && this.map.setLayoutProperty(this.activeLayer, "visibility", "none"), await this.addLayer(g, { order: 0 }), this.map.setLayoutProperty(g, "visibility", "visible"), this.activeLayer = g);
|
18116
18116
|
},
|
18117
18117
|
async refreshLayer(g, w = this.map) {
|
18118
|
-
await w.getStyle().layers.forEach((
|
18119
|
-
|
18118
|
+
await w.getStyle().layers.forEach((C) => {
|
18119
|
+
C.source === g && w.removeLayer(C.id);
|
18120
18120
|
}), await w.removeSource(g), this.setVisible(g);
|
18121
18121
|
}
|
18122
18122
|
}
|
18123
18123
|
}, hn = (g, w) => {
|
18124
|
-
const
|
18125
|
-
for (const [E,
|
18126
|
-
|
18127
|
-
return
|
18124
|
+
const C = g.__vccOpts || g;
|
18125
|
+
for (const [E, N] of w)
|
18126
|
+
C[E] = N;
|
18127
|
+
return C;
|
18128
18128
|
}, Hm = {}, Wm = {
|
18129
18129
|
class: "w-48 mx-auto mb-4",
|
18130
18130
|
width: "178",
|
@@ -18145,8 +18145,8 @@ function up(g, w) {
|
|
18145
18145
|
};
|
18146
18146
|
}
|
18147
18147
|
const { toString: Qm } = Object.prototype, { getPrototypeOf: eu } = Object, Sc = /* @__PURE__ */ ((g) => (w) => {
|
18148
|
-
const
|
18149
|
-
return g[
|
18148
|
+
const C = Qm.call(w);
|
18149
|
+
return g[C] || (g[C] = C.slice(8, -1).toLowerCase());
|
18150
18150
|
})(/* @__PURE__ */ Object.create(null)), Nr = (g) => (g = g.toLowerCase(), (w) => Sc(w) === g), Tc = (g) => (w) => typeof w === g, { isArray: jo } = Array, al = Tc("undefined");
|
18151
18151
|
function eg(g) {
|
18152
18152
|
return g !== null && !al(g) && g.constructor !== null && !al(g.constructor) && dr(g.constructor.isBuffer) && g.constructor.isBuffer(g);
|
@@ -18166,15 +18166,15 @@ const ig = Tc("string"), dr = Tc("function"), pp = Tc("number"), Ic = (g) => g !
|
|
18166
18166
|
return g && (typeof FormData == "function" && g instanceof FormData || dr(g.append) && ((w = Sc(g)) === "formdata" || // detect form-data instance
|
18167
18167
|
w === "object" && dr(g.toString) && g.toString() === "[object FormData]"));
|
18168
18168
|
}, hg = Nr("URLSearchParams"), [ug, dg, pg, fg] = ["ReadableStream", "Request", "Response", "Headers"].map(Nr), mg = (g) => g.trim ? g.trim() : g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
18169
|
-
function ll(g, w, { allOwnKeys:
|
18169
|
+
function ll(g, w, { allOwnKeys: C = !1 } = {}) {
|
18170
18170
|
if (g === null || typeof g > "u")
|
18171
18171
|
return;
|
18172
|
-
let E,
|
18172
|
+
let E, N;
|
18173
18173
|
if (typeof g != "object" && (g = [g]), jo(g))
|
18174
|
-
for (E = 0,
|
18174
|
+
for (E = 0, N = g.length; E < N; E++)
|
18175
18175
|
w.call(null, g[E], E, g);
|
18176
18176
|
else {
|
18177
|
-
const X =
|
18177
|
+
const X = C ? Object.getOwnPropertyNames(g) : Object.keys(g), T = X.length;
|
18178
18178
|
let c;
|
18179
18179
|
for (E = 0; E < T; E++)
|
18180
18180
|
c = X[E], w.call(null, g[c], c, g);
|
@@ -18182,135 +18182,135 @@ function ll(g, w, { allOwnKeys: P = !1 } = {}) {
|
|
18182
18182
|
}
|
18183
18183
|
function fp(g, w) {
|
18184
18184
|
w = w.toLowerCase();
|
18185
|
-
const
|
18186
|
-
let E =
|
18185
|
+
const C = Object.keys(g);
|
18186
|
+
let E = C.length, N;
|
18187
18187
|
for (; E-- > 0; )
|
18188
|
-
if (
|
18189
|
-
return
|
18188
|
+
if (N = C[E], w === N.toLowerCase())
|
18189
|
+
return N;
|
18190
18190
|
return null;
|
18191
18191
|
}
|
18192
18192
|
const Ns = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, mp = (g) => !al(g) && g !== Ns;
|
18193
18193
|
function qh() {
|
18194
|
-
const { caseless: g } = mp(this) && this || {}, w = {},
|
18195
|
-
const X = g && fp(w,
|
18194
|
+
const { caseless: g } = mp(this) && this || {}, w = {}, C = (E, N) => {
|
18195
|
+
const X = g && fp(w, N) || N;
|
18196
18196
|
gc(w[X]) && gc(E) ? w[X] = qh(w[X], E) : gc(E) ? w[X] = qh({}, E) : jo(E) ? w[X] = E.slice() : w[X] = E;
|
18197
18197
|
};
|
18198
|
-
for (let E = 0,
|
18199
|
-
arguments[E] && ll(arguments[E],
|
18198
|
+
for (let E = 0, N = arguments.length; E < N; E++)
|
18199
|
+
arguments[E] && ll(arguments[E], C);
|
18200
18200
|
return w;
|
18201
18201
|
}
|
18202
|
-
const gg = (g, w,
|
18203
|
-
|
18204
|
-
}, { allOwnKeys: E }), g), _g = (g) => (g.charCodeAt(0) === 65279 && (g = g.slice(1)), g), yg = (g, w,
|
18202
|
+
const gg = (g, w, C, { allOwnKeys: E } = {}) => (ll(w, (N, X) => {
|
18203
|
+
C && dr(N) ? g[X] = up(N, C) : g[X] = N;
|
18204
|
+
}, { allOwnKeys: E }), g), _g = (g) => (g.charCodeAt(0) === 65279 && (g = g.slice(1)), g), yg = (g, w, C, E) => {
|
18205
18205
|
g.prototype = Object.create(w.prototype, E), g.prototype.constructor = g, Object.defineProperty(g, "super", {
|
18206
18206
|
value: w.prototype
|
18207
|
-
}),
|
18208
|
-
}, xg = (g, w,
|
18209
|
-
let
|
18207
|
+
}), C && Object.assign(g.prototype, C);
|
18208
|
+
}, xg = (g, w, C, E) => {
|
18209
|
+
let N, X, T;
|
18210
18210
|
const c = {};
|
18211
18211
|
if (w = w || {}, g == null) return w;
|
18212
18212
|
do {
|
18213
|
-
for (
|
18214
|
-
T =
|
18215
|
-
g =
|
18216
|
-
} while (g && (!
|
18213
|
+
for (N = Object.getOwnPropertyNames(g), X = N.length; X-- > 0; )
|
18214
|
+
T = N[X], (!E || E(T, g, w)) && !c[T] && (w[T] = g[T], c[T] = !0);
|
18215
|
+
g = C !== !1 && eu(g);
|
18216
|
+
} while (g && (!C || C(g, w)) && g !== Object.prototype);
|
18217
18217
|
return w;
|
18218
|
-
}, vg = (g, w,
|
18219
|
-
g = String(g), (
|
18220
|
-
const E = g.indexOf(w,
|
18221
|
-
return E !== -1 && E ===
|
18218
|
+
}, vg = (g, w, C) => {
|
18219
|
+
g = String(g), (C === void 0 || C > g.length) && (C = g.length), C -= w.length;
|
18220
|
+
const E = g.indexOf(w, C);
|
18221
|
+
return E !== -1 && E === C;
|
18222
18222
|
}, bg = (g) => {
|
18223
18223
|
if (!g) return null;
|
18224
18224
|
if (jo(g)) return g;
|
18225
18225
|
let w = g.length;
|
18226
18226
|
if (!pp(w)) return null;
|
18227
|
-
const
|
18227
|
+
const C = new Array(w);
|
18228
18228
|
for (; w-- > 0; )
|
18229
|
-
|
18230
|
-
return
|
18229
|
+
C[w] = g[w];
|
18230
|
+
return C;
|
18231
18231
|
}, wg = /* @__PURE__ */ ((g) => (w) => g && w instanceof g)(typeof Uint8Array < "u" && eu(Uint8Array)), Sg = (g, w) => {
|
18232
18232
|
const E = (g && g[Symbol.iterator]).call(g);
|
18233
|
-
let
|
18234
|
-
for (; (
|
18235
|
-
const X =
|
18233
|
+
let N;
|
18234
|
+
for (; (N = E.next()) && !N.done; ) {
|
18235
|
+
const X = N.value;
|
18236
18236
|
w.call(g, X[0], X[1]);
|
18237
18237
|
}
|
18238
18238
|
}, Tg = (g, w) => {
|
18239
|
-
let
|
18239
|
+
let C;
|
18240
18240
|
const E = [];
|
18241
|
-
for (; (
|
18242
|
-
E.push(
|
18241
|
+
for (; (C = g.exec(w)) !== null; )
|
18242
|
+
E.push(C);
|
18243
18243
|
return E;
|
18244
18244
|
}, Ig = Nr("HTMLFormElement"), Pg = (g) => g.toLowerCase().replace(
|
18245
18245
|
/[-_\s]([a-z\d])(\w*)/g,
|
18246
|
-
function(
|
18247
|
-
return E.toUpperCase() +
|
18246
|
+
function(C, E, N) {
|
18247
|
+
return E.toUpperCase() + N;
|
18248
18248
|
}
|
18249
|
-
), Gd = (({ hasOwnProperty: g }) => (w,
|
18250
|
-
const
|
18251
|
-
ll(
|
18249
|
+
), Gd = (({ hasOwnProperty: g }) => (w, C) => g.call(w, C))(Object.prototype), Ag = Nr("RegExp"), gp = (g, w) => {
|
18250
|
+
const C = Object.getOwnPropertyDescriptors(g), E = {};
|
18251
|
+
ll(C, (N, X) => {
|
18252
18252
|
let T;
|
18253
|
-
(T = w(
|
18253
|
+
(T = w(N, X, g)) !== !1 && (E[X] = T || N);
|
18254
18254
|
}), Object.defineProperties(g, E);
|
18255
18255
|
}, Cg = (g) => {
|
18256
|
-
gp(g, (w,
|
18257
|
-
if (dr(g) && ["arguments", "caller", "callee"].indexOf(
|
18256
|
+
gp(g, (w, C) => {
|
18257
|
+
if (dr(g) && ["arguments", "caller", "callee"].indexOf(C) !== -1)
|
18258
18258
|
return !1;
|
18259
|
-
const E = g[
|
18259
|
+
const E = g[C];
|
18260
18260
|
if (dr(E)) {
|
18261
18261
|
if (w.enumerable = !1, "writable" in w) {
|
18262
18262
|
w.writable = !1;
|
18263
18263
|
return;
|
18264
18264
|
}
|
18265
18265
|
w.set || (w.set = () => {
|
18266
|
-
throw Error("Can not rewrite read-only method '" +
|
18266
|
+
throw Error("Can not rewrite read-only method '" + C + "'");
|
18267
18267
|
});
|
18268
18268
|
}
|
18269
18269
|
});
|
18270
18270
|
}, kg = (g, w) => {
|
18271
|
-
const
|
18272
|
-
|
18273
|
-
|
18271
|
+
const C = {}, E = (N) => {
|
18272
|
+
N.forEach((X) => {
|
18273
|
+
C[X] = !0;
|
18274
18274
|
});
|
18275
18275
|
};
|
18276
|
-
return jo(g) ? E(g) : E(String(g).split(w)),
|
18276
|
+
return jo(g) ? E(g) : E(String(g).split(w)), C;
|
18277
18277
|
}, Eg = () => {
|
18278
18278
|
}, Mg = (g, w) => g != null && Number.isFinite(g = +g) ? g : w, Fh = "abcdefghijklmnopqrstuvwxyz", Hd = "0123456789", _p = {
|
18279
18279
|
DIGIT: Hd,
|
18280
18280
|
ALPHA: Fh,
|
18281
18281
|
ALPHA_DIGIT: Fh + Fh.toUpperCase() + Hd
|
18282
18282
|
}, zg = (g = 16, w = _p.ALPHA_DIGIT) => {
|
18283
|
-
let
|
18283
|
+
let C = "";
|
18284
18284
|
const { length: E } = w;
|
18285
18285
|
for (; g--; )
|
18286
|
-
|
18287
|
-
return
|
18286
|
+
C += w[Math.random() * E | 0];
|
18287
|
+
return C;
|
18288
18288
|
};
|
18289
18289
|
function Dg(g) {
|
18290
18290
|
return !!(g && dr(g.append) && g[Symbol.toStringTag] === "FormData" && g[Symbol.iterator]);
|
18291
18291
|
}
|
18292
18292
|
const Lg = (g) => {
|
18293
|
-
const w = new Array(10),
|
18293
|
+
const w = new Array(10), C = (E, N) => {
|
18294
18294
|
if (Ic(E)) {
|
18295
18295
|
if (w.indexOf(E) >= 0)
|
18296
18296
|
return;
|
18297
18297
|
if (!("toJSON" in E)) {
|
18298
|
-
w[
|
18298
|
+
w[N] = E;
|
18299
18299
|
const X = jo(E) ? [] : {};
|
18300
18300
|
return ll(E, (T, c) => {
|
18301
|
-
const _e =
|
18301
|
+
const _e = C(T, N + 1);
|
18302
18302
|
!al(_e) && (X[c] = _e);
|
18303
|
-
}), w[
|
18303
|
+
}), w[N] = void 0, X;
|
18304
18304
|
}
|
18305
18305
|
}
|
18306
18306
|
return E;
|
18307
18307
|
};
|
18308
|
-
return
|
18309
|
-
}, Rg = Nr("AsyncFunction"), Bg = (g) => g && (Ic(g) || dr(g)) && dr(g.then) && dr(g.catch), yp = ((g, w) => g ? setImmediate : w ? ((
|
18310
|
-
|
18311
|
-
}, !1), (
|
18312
|
-
E.push(
|
18313
|
-
}))(`axios@${Math.random()}`, []) : (
|
18308
|
+
return C(g, 0);
|
18309
|
+
}, Rg = Nr("AsyncFunction"), Bg = (g) => g && (Ic(g) || dr(g)) && dr(g.then) && dr(g.catch), yp = ((g, w) => g ? setImmediate : w ? ((C, E) => (Ns.addEventListener("message", ({ source: N, data: X }) => {
|
18310
|
+
N === Ns && X === C && E.length && E.shift()();
|
18311
|
+
}, !1), (N) => {
|
18312
|
+
E.push(N), Ns.postMessage(C, "*");
|
18313
|
+
}))(`axios@${Math.random()}`, []) : (C) => setTimeout(C))(
|
18314
18314
|
typeof setImmediate == "function",
|
18315
18315
|
dr(Ns.postMessage)
|
18316
18316
|
), Fg = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ns) : typeof process < "u" && process.nextTick || yp, pe = {
|
@@ -18373,8 +18373,8 @@ const Lg = (g) => {
|
|
18373
18373
|
setImmediate: yp,
|
18374
18374
|
asap: Fg
|
18375
18375
|
};
|
18376
|
-
function ct(g, w,
|
18377
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = g, this.name = "AxiosError", w && (this.code = w),
|
18376
|
+
function ct(g, w, C, E, N) {
|
18377
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = g, this.name = "AxiosError", w && (this.code = w), C && (this.config = C), E && (this.request = E), N && (this.response = N);
|
18378
18378
|
}
|
18379
18379
|
pe.inherits(ct, Error, {
|
18380
18380
|
toJSON: function() {
|
@@ -18417,11 +18417,11 @@ const xp = ct.prototype, vp = {};
|
|
18417
18417
|
});
|
18418
18418
|
Object.defineProperties(ct, vp);
|
18419
18419
|
Object.defineProperty(xp, "isAxiosError", { value: !0 });
|
18420
|
-
ct.from = (g, w,
|
18420
|
+
ct.from = (g, w, C, E, N, X) => {
|
18421
18421
|
const T = Object.create(xp);
|
18422
18422
|
return pe.toFlatObject(g, T, function(_e) {
|
18423
18423
|
return _e !== Error.prototype;
|
18424
|
-
}, (c) => c !== "isAxiosError"), ct.call(T, g.message, w,
|
18424
|
+
}, (c) => c !== "isAxiosError"), ct.call(T, g.message, w, C, E, N), T.cause = g, T.name = g.name, X && Object.assign(T, X), T;
|
18425
18425
|
};
|
18426
18426
|
const Og = null;
|
18427
18427
|
function Zh(g) {
|
@@ -18430,10 +18430,10 @@ function Zh(g) {
|
|
18430
18430
|
function bp(g) {
|
18431
18431
|
return pe.endsWith(g, "[]") ? g.slice(0, -2) : g;
|
18432
18432
|
}
|
18433
|
-
function Wd(g, w,
|
18434
|
-
return g ? g.concat(w).map(function(
|
18435
|
-
return
|
18436
|
-
}).join(
|
18433
|
+
function Wd(g, w, C) {
|
18434
|
+
return g ? g.concat(w).map(function(N, X) {
|
18435
|
+
return N = bp(N), !C && X ? "[" + N + "]" : N;
|
18436
|
+
}).join(C ? "." : "") : w;
|
18437
18437
|
}
|
18438
18438
|
function Vg(g) {
|
18439
18439
|
return pe.isArray(g) && !g.some(Zh);
|
@@ -18441,18 +18441,18 @@ function Vg(g) {
|
|
18441
18441
|
const Ng = pe.toFlatObject(pe, {}, null, function(w) {
|
18442
18442
|
return /^is[A-Z]/.test(w);
|
18443
18443
|
});
|
18444
|
-
function Pc(g, w,
|
18444
|
+
function Pc(g, w, C) {
|
18445
18445
|
if (!pe.isObject(g))
|
18446
18446
|
throw new TypeError("target must be an object");
|
18447
|
-
w = w || new FormData(),
|
18447
|
+
w = w || new FormData(), C = pe.toFlatObject(C, {
|
18448
18448
|
metaTokens: !0,
|
18449
18449
|
dots: !1,
|
18450
18450
|
indexes: !1
|
18451
18451
|
}, !1, function(tt, Ve) {
|
18452
18452
|
return !pe.isUndefined(Ve[tt]);
|
18453
18453
|
});
|
18454
|
-
const E =
|
18455
|
-
if (!pe.isFunction(
|
18454
|
+
const E = C.metaTokens, N = C.visitor || ve, X = C.dots, T = C.indexes, _e = (C.Blob || typeof Blob < "u" && Blob) && pe.isSpecCompliantForm(w);
|
18455
|
+
if (!pe.isFunction(N))
|
18456
18456
|
throw new TypeError("visitor must be a function");
|
18457
18457
|
function ye(qe) {
|
18458
18458
|
if (qe === null) return "";
|
@@ -18488,7 +18488,7 @@ function Pc(g, w, P) {
|
|
18488
18488
|
if (ae.indexOf(qe) !== -1)
|
18489
18489
|
throw Error("Circular reference detected in " + tt.join("."));
|
18490
18490
|
ae.push(qe), pe.forEach(qe, function(ft, lt) {
|
18491
|
-
(!(pe.isUndefined(ft) || ft === null) &&
|
18491
|
+
(!(pe.isUndefined(ft) || ft === null) && N.call(
|
18492
18492
|
w,
|
18493
18493
|
ft,
|
18494
18494
|
pe.isString(lt) ? lt.trim() : lt,
|
@@ -18520,26 +18520,26 @@ function tu(g, w) {
|
|
18520
18520
|
this._pairs = [], g && Pc(g, this, w);
|
18521
18521
|
}
|
18522
18522
|
const wp = tu.prototype;
|
18523
|
-
wp.append = function(w,
|
18524
|
-
this._pairs.push([w,
|
18523
|
+
wp.append = function(w, C) {
|
18524
|
+
this._pairs.push([w, C]);
|
18525
18525
|
};
|
18526
18526
|
wp.toString = function(w) {
|
18527
|
-
const
|
18527
|
+
const C = w ? function(E) {
|
18528
18528
|
return w.call(this, E, Xd);
|
18529
18529
|
} : Xd;
|
18530
|
-
return this._pairs.map(function(
|
18531
|
-
return
|
18530
|
+
return this._pairs.map(function(N) {
|
18531
|
+
return C(N[0]) + "=" + C(N[1]);
|
18532
18532
|
}, "").join("&");
|
18533
18533
|
};
|
18534
18534
|
function Ug(g) {
|
18535
18535
|
return encodeURIComponent(g).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
18536
18536
|
}
|
18537
|
-
function Sp(g, w,
|
18537
|
+
function Sp(g, w, C) {
|
18538
18538
|
if (!w)
|
18539
18539
|
return g;
|
18540
|
-
const E =
|
18540
|
+
const E = C && C.encode || Ug, N = C && C.serialize;
|
18541
18541
|
let X;
|
18542
|
-
if (
|
18542
|
+
if (N ? X = N(w, C) : X = pe.isURLSearchParams(w) ? w.toString() : new tu(w, C).toString(E), X) {
|
18543
18543
|
const T = g.indexOf("#");
|
18544
18544
|
T !== -1 && (g = g.slice(0, T)), g += (g.indexOf("?") === -1 ? "?" : "&") + X;
|
18545
18545
|
}
|
@@ -18557,10 +18557,10 @@ class Jd {
|
|
18557
18557
|
*
|
18558
18558
|
* @return {Number} An ID used to remove interceptor later
|
18559
18559
|
*/
|
18560
|
-
use(w,
|
18560
|
+
use(w, C, E) {
|
18561
18561
|
return this.handlers.push({
|
18562
18562
|
fulfilled: w,
|
18563
|
-
rejected:
|
18563
|
+
rejected: C,
|
18564
18564
|
synchronous: E ? E.synchronous : !1,
|
18565
18565
|
runWhen: E ? E.runWhen : null
|
18566
18566
|
}), this.handlers.length - 1;
|
@@ -18624,8 +18624,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Wg
|
|
18624
18624
|
};
|
18625
18625
|
function Jg(g, w) {
|
18626
18626
|
return Pc(g, new Vr.classes.URLSearchParams(), Object.assign({
|
18627
|
-
visitor: function(
|
18628
|
-
return Vr.isNode && pe.isBuffer(
|
18627
|
+
visitor: function(C, E, N, X) {
|
18628
|
+
return Vr.isNode && pe.isBuffer(C) ? (this.append(E, C.toString("base64")), !1) : X.defaultVisitor.apply(this, arguments);
|
18629
18629
|
}
|
18630
18630
|
}, w));
|
18631
18631
|
}
|
@@ -18633,30 +18633,30 @@ function Kg(g) {
|
|
18633
18633
|
return pe.matchAll(/\w+|\[(\w*)]/g, g).map((w) => w[0] === "[]" ? "" : w[1] || w[0]);
|
18634
18634
|
}
|
18635
18635
|
function Yg(g) {
|
18636
|
-
const w = {},
|
18636
|
+
const w = {}, C = Object.keys(g);
|
18637
18637
|
let E;
|
18638
|
-
const
|
18638
|
+
const N = C.length;
|
18639
18639
|
let X;
|
18640
|
-
for (E = 0; E <
|
18641
|
-
X =
|
18640
|
+
for (E = 0; E < N; E++)
|
18641
|
+
X = C[E], w[X] = g[X];
|
18642
18642
|
return w;
|
18643
18643
|
}
|
18644
18644
|
function Ip(g) {
|
18645
|
-
function w(
|
18646
|
-
let T =
|
18645
|
+
function w(C, E, N, X) {
|
18646
|
+
let T = C[X++];
|
18647
18647
|
if (T === "__proto__") return !0;
|
18648
|
-
const c = Number.isFinite(+T), _e = X >=
|
18649
|
-
return T = !T && pe.isArray(
|
18648
|
+
const c = Number.isFinite(+T), _e = X >= C.length;
|
18649
|
+
return T = !T && pe.isArray(N) ? N.length : T, _e ? (pe.hasOwnProp(N, T) ? N[T] = [N[T], E] : N[T] = E, !c) : ((!N[T] || !pe.isObject(N[T])) && (N[T] = []), w(C, E, N[T], X) && pe.isArray(N[T]) && (N[T] = Yg(N[T])), !c);
|
18650
18650
|
}
|
18651
18651
|
if (pe.isFormData(g) && pe.isFunction(g.entries)) {
|
18652
|
-
const
|
18653
|
-
return pe.forEachEntry(g, (E,
|
18654
|
-
w(Kg(E),
|
18655
|
-
}),
|
18652
|
+
const C = {};
|
18653
|
+
return pe.forEachEntry(g, (E, N) => {
|
18654
|
+
w(Kg(E), N, C, 0);
|
18655
|
+
}), C;
|
18656
18656
|
}
|
18657
18657
|
return null;
|
18658
18658
|
}
|
18659
|
-
function Qg(g, w,
|
18659
|
+
function Qg(g, w, C) {
|
18660
18660
|
if (pe.isString(g))
|
18661
18661
|
try {
|
18662
18662
|
return (w || JSON.parse)(g), pe.trim(g);
|
@@ -18664,21 +18664,21 @@ function Qg(g, w, P) {
|
|
18664
18664
|
if (E.name !== "SyntaxError")
|
18665
18665
|
throw E;
|
18666
18666
|
}
|
18667
|
-
return (
|
18667
|
+
return (C || JSON.stringify)(g);
|
18668
18668
|
}
|
18669
18669
|
const cl = {
|
18670
18670
|
transitional: Tp,
|
18671
18671
|
adapter: ["xhr", "http", "fetch"],
|
18672
|
-
transformRequest: [function(w,
|
18673
|
-
const E =
|
18672
|
+
transformRequest: [function(w, C) {
|
18673
|
+
const E = C.getContentType() || "", N = E.indexOf("application/json") > -1, X = pe.isObject(w);
|
18674
18674
|
if (X && pe.isHTMLForm(w) && (w = new FormData(w)), pe.isFormData(w))
|
18675
|
-
return
|
18675
|
+
return N ? JSON.stringify(Ip(w)) : w;
|
18676
18676
|
if (pe.isArrayBuffer(w) || pe.isBuffer(w) || pe.isStream(w) || pe.isFile(w) || pe.isBlob(w) || pe.isReadableStream(w))
|
18677
18677
|
return w;
|
18678
18678
|
if (pe.isArrayBufferView(w))
|
18679
18679
|
return w.buffer;
|
18680
18680
|
if (pe.isURLSearchParams(w))
|
18681
|
-
return
|
18681
|
+
return C.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), w.toString();
|
18682
18682
|
let c;
|
18683
18683
|
if (X) {
|
18684
18684
|
if (E.indexOf("application/x-www-form-urlencoded") > -1)
|
@@ -18692,14 +18692,14 @@ const cl = {
|
|
18692
18692
|
);
|
18693
18693
|
}
|
18694
18694
|
}
|
18695
|
-
return X ||
|
18695
|
+
return X || N ? (C.setContentType("application/json", !1), Qg(w)) : w;
|
18696
18696
|
}],
|
18697
18697
|
transformResponse: [function(w) {
|
18698
|
-
const
|
18698
|
+
const C = this.transitional || cl.transitional, E = C && C.forcedJSONParsing, N = this.responseType === "json";
|
18699
18699
|
if (pe.isResponse(w) || pe.isReadableStream(w))
|
18700
18700
|
return w;
|
18701
|
-
if (w && pe.isString(w) && (E && !this.responseType ||
|
18702
|
-
const T = !(
|
18701
|
+
if (w && pe.isString(w) && (E && !this.responseType || N)) {
|
18702
|
+
const T = !(C && C.silentJSONParsing) && N;
|
18703
18703
|
try {
|
18704
18704
|
return JSON.parse(w);
|
18705
18705
|
} catch (c) {
|
@@ -18755,10 +18755,10 @@ const e_ = pe.toObjectSet([
|
|
18755
18755
|
"user-agent"
|
18756
18756
|
]), t_ = (g) => {
|
18757
18757
|
const w = {};
|
18758
|
-
let
|
18758
|
+
let C, E, N;
|
18759
18759
|
return g && g.split(`
|
18760
18760
|
`).forEach(function(T) {
|
18761
|
-
|
18761
|
+
N = T.indexOf(":"), C = T.substring(0, N).trim().toLowerCase(), E = T.substring(N + 1).trim(), !(!C || w[C] && e_[C]) && (C === "set-cookie" ? w[C] ? w[C].push(E) : w[C] = [E] : w[C] = w[C] ? w[C] + ", " + E : E);
|
18762
18762
|
}), w;
|
18763
18763
|
}, Kd = Symbol("internals");
|
18764
18764
|
function sl(g) {
|
@@ -18768,17 +18768,17 @@ function _c(g) {
|
|
18768
18768
|
return g === !1 || g == null ? g : pe.isArray(g) ? g.map(_c) : String(g);
|
18769
18769
|
}
|
18770
18770
|
function i_(g) {
|
18771
|
-
const w = /* @__PURE__ */ Object.create(null),
|
18771
|
+
const w = /* @__PURE__ */ Object.create(null), C = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
18772
18772
|
let E;
|
18773
|
-
for (; E =
|
18773
|
+
for (; E = C.exec(g); )
|
18774
18774
|
w[E[1]] = E[2];
|
18775
18775
|
return w;
|
18776
18776
|
}
|
18777
18777
|
const r_ = (g) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());
|
18778
|
-
function Oh(g, w,
|
18778
|
+
function Oh(g, w, C, E, N) {
|
18779
18779
|
if (pe.isFunction(E))
|
18780
|
-
return E.call(this, w,
|
18781
|
-
if (
|
18780
|
+
return E.call(this, w, C);
|
18781
|
+
if (N && (w = C), !!pe.isString(w)) {
|
18782
18782
|
if (pe.isString(E))
|
18783
18783
|
return w.indexOf(E) !== -1;
|
18784
18784
|
if (pe.isRegExp(E))
|
@@ -18786,14 +18786,14 @@ function Oh(g, w, P, E, V) {
|
|
18786
18786
|
}
|
18787
18787
|
}
|
18788
18788
|
function n_(g) {
|
18789
|
-
return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w,
|
18789
|
+
return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, C, E) => C.toUpperCase() + E);
|
18790
18790
|
}
|
18791
18791
|
function s_(g, w) {
|
18792
|
-
const
|
18792
|
+
const C = pe.toCamelCase(" " + w);
|
18793
18793
|
["get", "set", "has"].forEach((E) => {
|
18794
|
-
Object.defineProperty(g, E +
|
18795
|
-
value: function(
|
18796
|
-
return this[E].call(this, w,
|
18794
|
+
Object.defineProperty(g, E + C, {
|
18795
|
+
value: function(N, X, T) {
|
18796
|
+
return this[E].call(this, w, N, X, T);
|
18797
18797
|
},
|
18798
18798
|
configurable: !0
|
18799
18799
|
});
|
@@ -18803,97 +18803,97 @@ class Yi {
|
|
18803
18803
|
constructor(w) {
|
18804
18804
|
w && this.set(w);
|
18805
18805
|
}
|
18806
|
-
set(w,
|
18807
|
-
const
|
18806
|
+
set(w, C, E) {
|
18807
|
+
const N = this;
|
18808
18808
|
function X(c, _e, ye) {
|
18809
18809
|
const ve = sl(_e);
|
18810
18810
|
if (!ve)
|
18811
18811
|
throw new Error("header name must be a non-empty string");
|
18812
|
-
const ae = pe.findKey(
|
18813
|
-
(!ae ||
|
18812
|
+
const ae = pe.findKey(N, ve);
|
18813
|
+
(!ae || N[ae] === void 0 || ye === !0 || ye === void 0 && N[ae] !== !1) && (N[ae || _e] = _c(c));
|
18814
18814
|
}
|
18815
18815
|
const T = (c, _e) => pe.forEach(c, (ye, ve) => X(ye, ve, _e));
|
18816
18816
|
if (pe.isPlainObject(w) || w instanceof this.constructor)
|
18817
|
-
T(w,
|
18817
|
+
T(w, C);
|
18818
18818
|
else if (pe.isString(w) && (w = w.trim()) && !r_(w))
|
18819
|
-
T(t_(w),
|
18819
|
+
T(t_(w), C);
|
18820
18820
|
else if (pe.isHeaders(w))
|
18821
18821
|
for (const [c, _e] of w.entries())
|
18822
18822
|
X(_e, c, E);
|
18823
18823
|
else
|
18824
|
-
w != null && X(
|
18824
|
+
w != null && X(C, w, E);
|
18825
18825
|
return this;
|
18826
18826
|
}
|
18827
|
-
get(w,
|
18827
|
+
get(w, C) {
|
18828
18828
|
if (w = sl(w), w) {
|
18829
18829
|
const E = pe.findKey(this, w);
|
18830
18830
|
if (E) {
|
18831
|
-
const
|
18832
|
-
if (!
|
18833
|
-
return
|
18834
|
-
if (
|
18835
|
-
return i_(
|
18836
|
-
if (pe.isFunction(
|
18837
|
-
return
|
18838
|
-
if (pe.isRegExp(
|
18839
|
-
return
|
18831
|
+
const N = this[E];
|
18832
|
+
if (!C)
|
18833
|
+
return N;
|
18834
|
+
if (C === !0)
|
18835
|
+
return i_(N);
|
18836
|
+
if (pe.isFunction(C))
|
18837
|
+
return C.call(this, N, E);
|
18838
|
+
if (pe.isRegExp(C))
|
18839
|
+
return C.exec(N);
|
18840
18840
|
throw new TypeError("parser must be boolean|regexp|function");
|
18841
18841
|
}
|
18842
18842
|
}
|
18843
18843
|
}
|
18844
|
-
has(w,
|
18844
|
+
has(w, C) {
|
18845
18845
|
if (w = sl(w), w) {
|
18846
18846
|
const E = pe.findKey(this, w);
|
18847
|
-
return !!(E && this[E] !== void 0 && (!
|
18847
|
+
return !!(E && this[E] !== void 0 && (!C || Oh(this, this[E], E, C)));
|
18848
18848
|
}
|
18849
18849
|
return !1;
|
18850
18850
|
}
|
18851
|
-
delete(w,
|
18851
|
+
delete(w, C) {
|
18852
18852
|
const E = this;
|
18853
|
-
let
|
18853
|
+
let N = !1;
|
18854
18854
|
function X(T) {
|
18855
18855
|
if (T = sl(T), T) {
|
18856
18856
|
const c = pe.findKey(E, T);
|
18857
|
-
c && (!
|
18857
|
+
c && (!C || Oh(E, E[c], c, C)) && (delete E[c], N = !0);
|
18858
18858
|
}
|
18859
18859
|
}
|
18860
|
-
return pe.isArray(w) ? w.forEach(X) : X(w),
|
18860
|
+
return pe.isArray(w) ? w.forEach(X) : X(w), N;
|
18861
18861
|
}
|
18862
18862
|
clear(w) {
|
18863
|
-
const
|
18864
|
-
let E =
|
18863
|
+
const C = Object.keys(this);
|
18864
|
+
let E = C.length, N = !1;
|
18865
18865
|
for (; E--; ) {
|
18866
|
-
const X =
|
18867
|
-
(!w || Oh(this, this[X], X, w, !0)) && (delete this[X],
|
18866
|
+
const X = C[E];
|
18867
|
+
(!w || Oh(this, this[X], X, w, !0)) && (delete this[X], N = !0);
|
18868
18868
|
}
|
18869
|
-
return
|
18869
|
+
return N;
|
18870
18870
|
}
|
18871
18871
|
normalize(w) {
|
18872
|
-
const
|
18873
|
-
return pe.forEach(this, (
|
18872
|
+
const C = this, E = {};
|
18873
|
+
return pe.forEach(this, (N, X) => {
|
18874
18874
|
const T = pe.findKey(E, X);
|
18875
18875
|
if (T) {
|
18876
|
-
|
18876
|
+
C[T] = _c(N), delete C[X];
|
18877
18877
|
return;
|
18878
18878
|
}
|
18879
18879
|
const c = w ? n_(X) : String(X).trim();
|
18880
|
-
c !== X && delete
|
18880
|
+
c !== X && delete C[X], C[c] = _c(N), E[c] = !0;
|
18881
18881
|
}), this;
|
18882
18882
|
}
|
18883
18883
|
concat(...w) {
|
18884
18884
|
return this.constructor.concat(this, ...w);
|
18885
18885
|
}
|
18886
18886
|
toJSON(w) {
|
18887
|
-
const
|
18888
|
-
return pe.forEach(this, (E,
|
18889
|
-
E != null && E !== !1 && (
|
18890
|
-
}),
|
18887
|
+
const C = /* @__PURE__ */ Object.create(null);
|
18888
|
+
return pe.forEach(this, (E, N) => {
|
18889
|
+
E != null && E !== !1 && (C[N] = w && pe.isArray(E) ? E.join(", ") : E);
|
18890
|
+
}), C;
|
18891
18891
|
}
|
18892
18892
|
[Symbol.iterator]() {
|
18893
18893
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
18894
18894
|
}
|
18895
18895
|
toString() {
|
18896
|
-
return Object.entries(this.toJSON()).map(([w,
|
18896
|
+
return Object.entries(this.toJSON()).map(([w, C]) => w + ": " + C).join(`
|
18897
18897
|
`);
|
18898
18898
|
}
|
18899
18899
|
get [Symbol.toStringTag]() {
|
@@ -18902,56 +18902,56 @@ class Yi {
|
|
18902
18902
|
static from(w) {
|
18903
18903
|
return w instanceof this ? w : new this(w);
|
18904
18904
|
}
|
18905
|
-
static concat(w, ...
|
18905
|
+
static concat(w, ...C) {
|
18906
18906
|
const E = new this(w);
|
18907
|
-
return
|
18907
|
+
return C.forEach((N) => E.set(N)), E;
|
18908
18908
|
}
|
18909
18909
|
static accessor(w) {
|
18910
18910
|
const E = (this[Kd] = this[Kd] = {
|
18911
18911
|
accessors: {}
|
18912
|
-
}).accessors,
|
18912
|
+
}).accessors, N = this.prototype;
|
18913
18913
|
function X(T) {
|
18914
18914
|
const c = sl(T);
|
18915
|
-
E[c] || (s_(
|
18915
|
+
E[c] || (s_(N, T), E[c] = !0);
|
18916
18916
|
}
|
18917
18917
|
return pe.isArray(w) ? w.forEach(X) : X(w), this;
|
18918
18918
|
}
|
18919
18919
|
}
|
18920
18920
|
Yi.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
18921
18921
|
pe.reduceDescriptors(Yi.prototype, ({ value: g }, w) => {
|
18922
|
-
let
|
18922
|
+
let C = w[0].toUpperCase() + w.slice(1);
|
18923
18923
|
return {
|
18924
18924
|
get: () => g,
|
18925
18925
|
set(E) {
|
18926
|
-
this[
|
18926
|
+
this[C] = E;
|
18927
18927
|
}
|
18928
18928
|
};
|
18929
18929
|
});
|
18930
18930
|
pe.freezeMethods(Yi);
|
18931
18931
|
function Vh(g, w) {
|
18932
|
-
const
|
18932
|
+
const C = this || cl, E = w || C, N = Yi.from(E.headers);
|
18933
18933
|
let X = E.data;
|
18934
18934
|
return pe.forEach(g, function(c) {
|
18935
|
-
X = c.call(
|
18936
|
-
}),
|
18935
|
+
X = c.call(C, X, N.normalize(), w ? w.status : void 0);
|
18936
|
+
}), N.normalize(), X;
|
18937
18937
|
}
|
18938
18938
|
function Pp(g) {
|
18939
18939
|
return !!(g && g.__CANCEL__);
|
18940
18940
|
}
|
18941
|
-
function $o(g, w,
|
18942
|
-
ct.call(this, g ?? "canceled", ct.ERR_CANCELED, w,
|
18941
|
+
function $o(g, w, C) {
|
18942
|
+
ct.call(this, g ?? "canceled", ct.ERR_CANCELED, w, C), this.name = "CanceledError";
|
18943
18943
|
}
|
18944
18944
|
pe.inherits($o, ct, {
|
18945
18945
|
__CANCEL__: !0
|
18946
18946
|
});
|
18947
|
-
function Ap(g, w,
|
18948
|
-
const E =
|
18949
|
-
!
|
18950
|
-
"Request failed with status code " +
|
18951
|
-
[ct.ERR_BAD_REQUEST, ct.ERR_BAD_RESPONSE][Math.floor(
|
18952
|
-
|
18953
|
-
|
18954
|
-
|
18947
|
+
function Ap(g, w, C) {
|
18948
|
+
const E = C.config.validateStatus;
|
18949
|
+
!C.status || !E || E(C.status) ? g(C) : w(new ct(
|
18950
|
+
"Request failed with status code " + C.status,
|
18951
|
+
[ct.ERR_BAD_REQUEST, ct.ERR_BAD_RESPONSE][Math.floor(C.status / 100) - 4],
|
18952
|
+
C.config,
|
18953
|
+
C.request,
|
18954
|
+
C
|
18955
18955
|
));
|
18956
18956
|
}
|
18957
18957
|
function o_(g) {
|
@@ -18960,37 +18960,37 @@ function o_(g) {
|
|
18960
18960
|
}
|
18961
18961
|
function a_(g, w) {
|
18962
18962
|
g = g || 10;
|
18963
|
-
const
|
18964
|
-
let
|
18963
|
+
const C = new Array(g), E = new Array(g);
|
18964
|
+
let N = 0, X = 0, T;
|
18965
18965
|
return w = w !== void 0 ? w : 1e3, function(_e) {
|
18966
18966
|
const ye = Date.now(), ve = E[X];
|
18967
|
-
T || (T = ye),
|
18967
|
+
T || (T = ye), C[N] = _e, E[N] = ye;
|
18968
18968
|
let ae = X, oe = 0;
|
18969
|
-
for (; ae !==
|
18970
|
-
oe +=
|
18971
|
-
if (
|
18969
|
+
for (; ae !== N; )
|
18970
|
+
oe += C[ae++], ae = ae % g;
|
18971
|
+
if (N = (N + 1) % g, N === X && (X = (X + 1) % g), ye - T < w)
|
18972
18972
|
return;
|
18973
18973
|
const dt = ve && ye - ve;
|
18974
18974
|
return dt ? Math.round(oe * 1e3 / dt) : void 0;
|
18975
18975
|
};
|
18976
18976
|
}
|
18977
18977
|
function l_(g, w) {
|
18978
|
-
let
|
18978
|
+
let C = 0, E = 1e3 / w, N, X;
|
18979
18979
|
const T = (ye, ve = Date.now()) => {
|
18980
|
-
|
18980
|
+
C = ve, N = null, X && (clearTimeout(X), X = null), g.apply(null, ye);
|
18981
18981
|
};
|
18982
18982
|
return [(...ye) => {
|
18983
|
-
const ve = Date.now(), ae = ve -
|
18984
|
-
ae >= E ? T(ye, ve) : (
|
18985
|
-
X = null, T(
|
18983
|
+
const ve = Date.now(), ae = ve - C;
|
18984
|
+
ae >= E ? T(ye, ve) : (N = ye, X || (X = setTimeout(() => {
|
18985
|
+
X = null, T(N);
|
18986
18986
|
}, E - ae)));
|
18987
|
-
}, () =>
|
18987
|
+
}, () => N && T(N)];
|
18988
18988
|
}
|
18989
|
-
const bc = (g, w,
|
18989
|
+
const bc = (g, w, C = 3) => {
|
18990
18990
|
let E = 0;
|
18991
|
-
const
|
18991
|
+
const N = a_(50, 250);
|
18992
18992
|
return l_((X) => {
|
18993
|
-
const T = X.loaded, c = X.lengthComputable ? X.total : void 0, _e = T - E, ye =
|
18993
|
+
const T = X.loaded, c = X.lengthComputable ? X.total : void 0, _e = T - E, ye = N(_e), ve = T <= c;
|
18994
18994
|
E = T;
|
18995
18995
|
const ae = {
|
18996
18996
|
loaded: T,
|
@@ -19004,11 +19004,11 @@ const bc = (g, w, P = 3) => {
|
|
19004
19004
|
[w ? "download" : "upload"]: !0
|
19005
19005
|
};
|
19006
19006
|
g(ae);
|
19007
|
-
},
|
19007
|
+
}, C);
|
19008
19008
|
}, Yd = (g, w) => {
|
19009
|
-
const
|
19009
|
+
const C = g != null;
|
19010
19010
|
return [(E) => w[0]({
|
19011
|
-
lengthComputable:
|
19011
|
+
lengthComputable: C,
|
19012
19012
|
total: g,
|
19013
19013
|
loaded: E
|
19014
19014
|
}), w[1]];
|
@@ -19016,23 +19016,23 @@ const bc = (g, w, P = 3) => {
|
|
19016
19016
|
// Standard browser envs have full support of the APIs needed to test
|
19017
19017
|
// whether the request URL is of the same origin as current location.
|
19018
19018
|
function() {
|
19019
|
-
const w = /(msie|trident)/i.test(navigator.userAgent),
|
19019
|
+
const w = /(msie|trident)/i.test(navigator.userAgent), C = document.createElement("a");
|
19020
19020
|
let E;
|
19021
|
-
function
|
19021
|
+
function N(X) {
|
19022
19022
|
let T = X;
|
19023
|
-
return w && (
|
19024
|
-
href:
|
19025
|
-
protocol:
|
19026
|
-
host:
|
19027
|
-
search:
|
19028
|
-
hash:
|
19029
|
-
hostname:
|
19030
|
-
port:
|
19031
|
-
pathname:
|
19023
|
+
return w && (C.setAttribute("href", T), T = C.href), C.setAttribute("href", T), {
|
19024
|
+
href: C.href,
|
19025
|
+
protocol: C.protocol ? C.protocol.replace(/:$/, "") : "",
|
19026
|
+
host: C.host,
|
19027
|
+
search: C.search ? C.search.replace(/^\?/, "") : "",
|
19028
|
+
hash: C.hash ? C.hash.replace(/^#/, "") : "",
|
19029
|
+
hostname: C.hostname,
|
19030
|
+
port: C.port,
|
19031
|
+
pathname: C.pathname.charAt(0) === "/" ? C.pathname : "/" + C.pathname
|
19032
19032
|
};
|
19033
19033
|
}
|
19034
|
-
return E =
|
19035
|
-
const c = pe.isString(T) ?
|
19034
|
+
return E = N(window.location.href), function(T) {
|
19035
|
+
const c = pe.isString(T) ? N(T) : T;
|
19036
19036
|
return c.protocol === E.protocol && c.host === E.host;
|
19037
19037
|
};
|
19038
19038
|
}()
|
@@ -19046,9 +19046,9 @@ const bc = (g, w, P = 3) => {
|
|
19046
19046
|
), h_ = Vr.hasStandardBrowserEnv ? (
|
19047
19047
|
// Standard browser envs support document.cookie
|
19048
19048
|
{
|
19049
|
-
write(g, w,
|
19049
|
+
write(g, w, C, E, N, X) {
|
19050
19050
|
const T = [g + "=" + encodeURIComponent(w)];
|
19051
|
-
pe.isNumber(
|
19051
|
+
pe.isNumber(C) && T.push("expires=" + new Date(C).toGMTString()), pe.isString(E) && T.push("path=" + E), pe.isString(N) && T.push("domain=" + N), X === !0 && T.push("secure"), document.cookie = T.join("; ");
|
19052
19052
|
},
|
19053
19053
|
read(g) {
|
19054
19054
|
const w = document.cookie.match(new RegExp("(^|;\\s*)(" + g + ")=([^;]*)"));
|
@@ -19082,11 +19082,11 @@ function Cp(g, w) {
|
|
19082
19082
|
const ep = (g) => g instanceof Yi ? { ...g } : g;
|
19083
19083
|
function $s(g, w) {
|
19084
19084
|
w = w || {};
|
19085
|
-
const
|
19085
|
+
const C = {};
|
19086
19086
|
function E(ye, ve, ae) {
|
19087
19087
|
return pe.isPlainObject(ye) && pe.isPlainObject(ve) ? pe.merge.call({ caseless: ae }, ye, ve) : pe.isPlainObject(ve) ? pe.merge({}, ve) : pe.isArray(ve) ? ve.slice() : ve;
|
19088
19088
|
}
|
19089
|
-
function
|
19089
|
+
function N(ye, ve, ae) {
|
19090
19090
|
if (pe.isUndefined(ve)) {
|
19091
19091
|
if (!pe.isUndefined(ye))
|
19092
19092
|
return E(void 0, ye, ae);
|
@@ -19137,22 +19137,22 @@ function $s(g, w) {
|
|
19137
19137
|
socketPath: T,
|
19138
19138
|
responseEncoding: T,
|
19139
19139
|
validateStatus: c,
|
19140
|
-
headers: (ye, ve) =>
|
19140
|
+
headers: (ye, ve) => N(ep(ye), ep(ve), !0)
|
19141
19141
|
};
|
19142
19142
|
return pe.forEach(Object.keys(Object.assign({}, g, w)), function(ve) {
|
19143
|
-
const ae = _e[ve] ||
|
19144
|
-
pe.isUndefined(oe) && ae !== c || (
|
19145
|
-
}),
|
19143
|
+
const ae = _e[ve] || N, oe = ae(g[ve], w[ve], ve);
|
19144
|
+
pe.isUndefined(oe) && ae !== c || (C[ve] = oe);
|
19145
|
+
}), C;
|
19146
19146
|
}
|
19147
19147
|
const kp = (g) => {
|
19148
19148
|
const w = $s({}, g);
|
19149
|
-
let { data:
|
19149
|
+
let { data: C, withXSRFToken: E, xsrfHeaderName: N, xsrfCookieName: X, headers: T, auth: c } = w;
|
19150
19150
|
w.headers = T = Yi.from(T), w.url = Sp(Cp(w.baseURL, w.url), g.params, g.paramsSerializer), c && T.set(
|
19151
19151
|
"Authorization",
|
19152
19152
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
19153
19153
|
);
|
19154
19154
|
let _e;
|
19155
|
-
if (pe.isFormData(
|
19155
|
+
if (pe.isFormData(C)) {
|
19156
19156
|
if (Vr.hasStandardBrowserEnv || Vr.hasStandardBrowserWebWorkerEnv)
|
19157
19157
|
T.setContentType(void 0);
|
19158
19158
|
else if ((_e = T.getContentType()) !== !1) {
|
@@ -19161,21 +19161,21 @@ const kp = (g) => {
|
|
19161
19161
|
}
|
19162
19162
|
}
|
19163
19163
|
if (Vr.hasStandardBrowserEnv && (E && pe.isFunction(E) && (E = E(w)), E || E !== !1 && c_(w.url))) {
|
19164
|
-
const ye =
|
19165
|
-
ye && T.set(
|
19164
|
+
const ye = N && X && h_.read(X);
|
19165
|
+
ye && T.set(N, ye);
|
19166
19166
|
}
|
19167
19167
|
return w;
|
19168
19168
|
}, p_ = typeof XMLHttpRequest < "u", f_ = p_ && function(g) {
|
19169
|
-
return new Promise(function(
|
19170
|
-
const
|
19171
|
-
let X =
|
19172
|
-
const T = Yi.from(
|
19173
|
-
let { responseType: c, onUploadProgress: _e, onDownloadProgress: ye } =
|
19169
|
+
return new Promise(function(C, E) {
|
19170
|
+
const N = kp(g);
|
19171
|
+
let X = N.data;
|
19172
|
+
const T = Yi.from(N.headers).normalize();
|
19173
|
+
let { responseType: c, onUploadProgress: _e, onDownloadProgress: ye } = N, ve, ae, oe, dt, qe;
|
19174
19174
|
function tt() {
|
19175
|
-
dt && dt(), qe && qe(),
|
19175
|
+
dt && dt(), qe && qe(), N.cancelToken && N.cancelToken.unsubscribe(ve), N.signal && N.signal.removeEventListener("abort", ve);
|
19176
19176
|
}
|
19177
19177
|
let Ve = new XMLHttpRequest();
|
19178
|
-
Ve.open(
|
19178
|
+
Ve.open(N.method.toUpperCase(), N.url, !0), Ve.timeout = N.timeout;
|
19179
19179
|
function ft() {
|
19180
19180
|
if (!Ve)
|
19181
19181
|
return;
|
@@ -19190,7 +19190,7 @@ const kp = (g) => {
|
|
19190
19190
|
request: Ve
|
19191
19191
|
};
|
19192
19192
|
Ap(function(qt) {
|
19193
|
-
|
19193
|
+
C(qt), tt();
|
19194
19194
|
}, function(qt) {
|
19195
19195
|
E(qt), tt();
|
19196
19196
|
}, At), Ve = null;
|
@@ -19202,9 +19202,9 @@ const kp = (g) => {
|
|
19202
19202
|
}, Ve.onerror = function() {
|
19203
19203
|
E(new ct("Network Error", ct.ERR_NETWORK, g, Ve)), Ve = null;
|
19204
19204
|
}, Ve.ontimeout = function() {
|
19205
|
-
let Vt =
|
19206
|
-
const At =
|
19207
|
-
|
19205
|
+
let Vt = N.timeout ? "timeout of " + N.timeout + "ms exceeded" : "timeout exceeded";
|
19206
|
+
const At = N.transitional || Tp;
|
19207
|
+
N.timeoutErrorMessage && (Vt = N.timeoutErrorMessage), E(new ct(
|
19208
19208
|
Vt,
|
19209
19209
|
At.clarifyTimeoutError ? ct.ETIMEDOUT : ct.ECONNABORTED,
|
19210
19210
|
g,
|
@@ -19212,10 +19212,10 @@ const kp = (g) => {
|
|
19212
19212
|
)), Ve = null;
|
19213
19213
|
}, X === void 0 && T.setContentType(null), "setRequestHeader" in Ve && pe.forEach(T.toJSON(), function(Vt, At) {
|
19214
19214
|
Ve.setRequestHeader(At, Vt);
|
19215
|
-
}), pe.isUndefined(
|
19215
|
+
}), pe.isUndefined(N.withCredentials) || (Ve.withCredentials = !!N.withCredentials), c && c !== "json" && (Ve.responseType = N.responseType), ye && ([oe, qe] = bc(ye, !0), Ve.addEventListener("progress", oe)), _e && Ve.upload && ([ae, dt] = bc(_e), Ve.upload.addEventListener("progress", ae), Ve.upload.addEventListener("loadend", dt)), (N.cancelToken || N.signal) && (ve = (Ge) => {
|
19216
19216
|
Ve && (E(!Ge || Ge.type ? new $o(null, g, Ve) : Ge), Ve.abort(), Ve = null);
|
19217
|
-
},
|
19218
|
-
const lt = o_(
|
19217
|
+
}, N.cancelToken && N.cancelToken.subscribe(ve), N.signal && (N.signal.aborted ? ve() : N.signal.addEventListener("abort", ve)));
|
19218
|
+
const lt = o_(N.url);
|
19219
19219
|
if (lt && Vr.protocols.indexOf(lt) === -1) {
|
19220
19220
|
E(new ct("Unsupported protocol " + lt + ":", ct.ERR_BAD_REQUEST, g));
|
19221
19221
|
return;
|
@@ -19223,41 +19223,41 @@ const kp = (g) => {
|
|
19223
19223
|
Ve.send(X || null);
|
19224
19224
|
});
|
19225
19225
|
}, m_ = (g, w) => {
|
19226
|
-
let
|
19227
|
-
const
|
19226
|
+
let C = new AbortController(), E;
|
19227
|
+
const N = function(_e) {
|
19228
19228
|
if (!E) {
|
19229
19229
|
E = !0, T();
|
19230
19230
|
const ye = _e instanceof Error ? _e : this.reason;
|
19231
|
-
|
19231
|
+
C.abort(ye instanceof ct ? ye : new $o(ye instanceof Error ? ye.message : ye));
|
19232
19232
|
}
|
19233
19233
|
};
|
19234
19234
|
let X = w && setTimeout(() => {
|
19235
|
-
|
19235
|
+
N(new ct(`timeout ${w} of ms exceeded`, ct.ETIMEDOUT));
|
19236
19236
|
}, w);
|
19237
19237
|
const T = () => {
|
19238
19238
|
g && (X && clearTimeout(X), X = null, g.forEach((_e) => {
|
19239
|
-
_e && (_e.removeEventListener ? _e.removeEventListener("abort",
|
19239
|
+
_e && (_e.removeEventListener ? _e.removeEventListener("abort", N) : _e.unsubscribe(N));
|
19240
19240
|
}), g = null);
|
19241
19241
|
};
|
19242
|
-
g.forEach((_e) => _e && _e.addEventListener && _e.addEventListener("abort",
|
19243
|
-
const { signal: c } =
|
19242
|
+
g.forEach((_e) => _e && _e.addEventListener && _e.addEventListener("abort", N));
|
19243
|
+
const { signal: c } = C;
|
19244
19244
|
return c.unsubscribe = T, [c, () => {
|
19245
19245
|
X && clearTimeout(X), X = null;
|
19246
19246
|
}];
|
19247
19247
|
}, g_ = function* (g, w) {
|
19248
|
-
let
|
19249
|
-
if (!w ||
|
19248
|
+
let C = g.byteLength;
|
19249
|
+
if (!w || C < w) {
|
19250
19250
|
yield g;
|
19251
19251
|
return;
|
19252
19252
|
}
|
19253
|
-
let E = 0,
|
19254
|
-
for (; E <
|
19255
|
-
|
19256
|
-
}, __ = async function* (g, w,
|
19253
|
+
let E = 0, N;
|
19254
|
+
for (; E < C; )
|
19255
|
+
N = E + w, yield g.slice(E, N), E = N;
|
19256
|
+
}, __ = async function* (g, w, C) {
|
19257
19257
|
for await (const E of g)
|
19258
|
-
yield* g_(ArrayBuffer.isView(E) ? E : await
|
19259
|
-
}, tp = (g, w,
|
19260
|
-
const X = __(g, w,
|
19258
|
+
yield* g_(ArrayBuffer.isView(E) ? E : await C(String(E)), w);
|
19259
|
+
}, tp = (g, w, C, E, N) => {
|
19260
|
+
const X = __(g, w, N);
|
19261
19261
|
let T = 0, c, _e = (ye) => {
|
19262
19262
|
c || (c = !0, E && E(ye));
|
19263
19263
|
};
|
@@ -19270,9 +19270,9 @@ const kp = (g) => {
|
|
19270
19270
|
return;
|
19271
19271
|
}
|
19272
19272
|
let oe = ae.byteLength;
|
19273
|
-
if (
|
19273
|
+
if (C) {
|
19274
19274
|
let dt = T += oe;
|
19275
|
-
|
19275
|
+
C(dt);
|
19276
19276
|
}
|
19277
19277
|
ye.enqueue(new Uint8Array(ae));
|
19278
19278
|
} catch (ve) {
|
@@ -19306,7 +19306,7 @@ const kp = (g) => {
|
|
19306
19306
|
};
|
19307
19307
|
Ac && ((g) => {
|
19308
19308
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((w) => {
|
19309
|
-
!wc[w] && (wc[w] = pe.isFunction(g[w]) ? (
|
19309
|
+
!wc[w] && (wc[w] = pe.isFunction(g[w]) ? (C) => C[w]() : (C, E) => {
|
19310
19310
|
throw new ct(`Response type '${w}' is not supported`, ct.ERR_NOT_SUPPORT, E);
|
19311
19311
|
});
|
19312
19312
|
});
|
@@ -19323,14 +19323,14 @@ const x_ = async (g) => {
|
|
19323
19323
|
if (pe.isURLSearchParams(g) && (g = g + ""), pe.isString(g))
|
19324
19324
|
return (await Gh(g)).byteLength;
|
19325
19325
|
}, v_ = async (g, w) => {
|
19326
|
-
const
|
19327
|
-
return
|
19326
|
+
const C = pe.toFiniteNumber(g.getContentLength());
|
19327
|
+
return C ?? x_(w);
|
19328
19328
|
}, b_ = Ac && (async (g) => {
|
19329
19329
|
let {
|
19330
19330
|
url: w,
|
19331
|
-
method:
|
19331
|
+
method: C,
|
19332
19332
|
data: E,
|
19333
|
-
signal:
|
19333
|
+
signal: N,
|
19334
19334
|
cancelToken: X,
|
19335
19335
|
timeout: T,
|
19336
19336
|
onDownloadProgress: c,
|
@@ -19341,7 +19341,7 @@ const x_ = async (g) => {
|
|
19341
19341
|
fetchOptions: oe
|
19342
19342
|
} = kp(g);
|
19343
19343
|
ye = ye ? (ye + "").toLowerCase() : "text";
|
19344
|
-
let [dt, qe] =
|
19344
|
+
let [dt, qe] = N || X || T ? m_([N, X], T) : [], tt, Ve;
|
19345
19345
|
const ft = () => {
|
19346
19346
|
!tt && setTimeout(() => {
|
19347
19347
|
dt && dt.unsubscribe();
|
@@ -19349,7 +19349,7 @@ const x_ = async (g) => {
|
|
19349
19349
|
};
|
19350
19350
|
let lt;
|
19351
19351
|
try {
|
19352
|
-
if (_e && y_ &&
|
19352
|
+
if (_e && y_ && C !== "get" && C !== "head" && (lt = await v_(ve, E)) !== 0) {
|
19353
19353
|
let Jt = new Request(w, {
|
19354
19354
|
method: "POST",
|
19355
19355
|
body: E,
|
@@ -19366,7 +19366,7 @@ const x_ = async (g) => {
|
|
19366
19366
|
pe.isString(ae) || (ae = ae ? "include" : "omit"), Ve = new Request(w, {
|
19367
19367
|
...oe,
|
19368
19368
|
signal: dt,
|
19369
|
-
method:
|
19369
|
+
method: C.toUpperCase(),
|
19370
19370
|
headers: ve.normalize().toJSON(),
|
19371
19371
|
body: E,
|
19372
19372
|
duplex: "half",
|
@@ -19428,19 +19428,19 @@ const rp = (g) => `- ${g}`, w_ = (g) => pe.isFunction(g) || g === null || g ===
|
|
19428
19428
|
getAdapter: (g) => {
|
19429
19429
|
g = pe.isArray(g) ? g : [g];
|
19430
19430
|
const { length: w } = g;
|
19431
|
-
let
|
19432
|
-
const
|
19431
|
+
let C, E;
|
19432
|
+
const N = {};
|
19433
19433
|
for (let X = 0; X < w; X++) {
|
19434
|
-
|
19434
|
+
C = g[X];
|
19435
19435
|
let T;
|
19436
|
-
if (E =
|
19436
|
+
if (E = C, !w_(C) && (E = Wh[(T = String(C)).toLowerCase()], E === void 0))
|
19437
19437
|
throw new ct(`Unknown adapter '${T}'`);
|
19438
19438
|
if (E)
|
19439
19439
|
break;
|
19440
|
-
|
19440
|
+
N[T || "#" + X] = E;
|
19441
19441
|
}
|
19442
19442
|
if (!E) {
|
19443
|
-
const X = Object.entries(
|
19443
|
+
const X = Object.entries(N).map(
|
19444
19444
|
([c, _e]) => `adapter ${c} ` + (_e === !1 ? "is not supported by the environment" : "is not available in the build")
|
19445
19445
|
);
|
19446
19446
|
let T = w ? X.length > 1 ? `since :
|
@@ -19484,38 +19484,38 @@ const Dp = "1.7.4", ru = {};
|
|
19484
19484
|
};
|
19485
19485
|
});
|
19486
19486
|
const sp = {};
|
19487
|
-
ru.transitional = function(w,
|
19488
|
-
function
|
19487
|
+
ru.transitional = function(w, C, E) {
|
19488
|
+
function N(X, T) {
|
19489
19489
|
return "[Axios v" + Dp + "] Transitional option '" + X + "'" + T + (E ? ". " + E : "");
|
19490
19490
|
}
|
19491
19491
|
return (X, T, c) => {
|
19492
19492
|
if (w === !1)
|
19493
19493
|
throw new ct(
|
19494
|
-
|
19494
|
+
N(T, " has been removed" + (C ? " in " + C : "")),
|
19495
19495
|
ct.ERR_DEPRECATED
|
19496
19496
|
);
|
19497
|
-
return
|
19498
|
-
|
19497
|
+
return C && !sp[T] && (sp[T] = !0, console.warn(
|
19498
|
+
N(
|
19499
19499
|
T,
|
19500
|
-
" has been deprecated since v" +
|
19500
|
+
" has been deprecated since v" + C + " and will be removed in the near future"
|
19501
19501
|
)
|
19502
19502
|
)), w ? w(X, T, c) : !0;
|
19503
19503
|
};
|
19504
19504
|
};
|
19505
|
-
function S_(g, w,
|
19505
|
+
function S_(g, w, C) {
|
19506
19506
|
if (typeof g != "object")
|
19507
19507
|
throw new ct("options must be an object", ct.ERR_BAD_OPTION_VALUE);
|
19508
19508
|
const E = Object.keys(g);
|
19509
|
-
let
|
19510
|
-
for (;
|
19511
|
-
const X = E[
|
19509
|
+
let N = E.length;
|
19510
|
+
for (; N-- > 0; ) {
|
19511
|
+
const X = E[N], T = w[X];
|
19512
19512
|
if (T) {
|
19513
19513
|
const c = g[X], _e = c === void 0 || T(c, X, g);
|
19514
19514
|
if (_e !== !0)
|
19515
19515
|
throw new ct("option " + X + " must be " + _e, ct.ERR_BAD_OPTION_VALUE);
|
19516
19516
|
continue;
|
19517
19517
|
}
|
19518
|
-
if (
|
19518
|
+
if (C !== !0)
|
19519
19519
|
throw new ct("Unknown option " + X, ct.ERR_BAD_OPTION);
|
19520
19520
|
}
|
19521
19521
|
}
|
@@ -19538,14 +19538,14 @@ class Us {
|
|
19538
19538
|
*
|
19539
19539
|
* @returns {Promise} The Promise to be fulfilled
|
19540
19540
|
*/
|
19541
|
-
async request(w,
|
19541
|
+
async request(w, C) {
|
19542
19542
|
try {
|
19543
|
-
return await this._request(w,
|
19543
|
+
return await this._request(w, C);
|
19544
19544
|
} catch (E) {
|
19545
19545
|
if (E instanceof Error) {
|
19546
|
-
let
|
19547
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
19548
|
-
const X =
|
19546
|
+
let N;
|
19547
|
+
Error.captureStackTrace ? Error.captureStackTrace(N = {}) : N = new Error();
|
19548
|
+
const X = N.stack ? N.stack.replace(/^.+\n/, "") : "";
|
19549
19549
|
try {
|
19550
19550
|
E.stack ? X && !String(E.stack).endsWith(X.replace(/^.+\n.+\n/, "")) && (E.stack += `
|
19551
19551
|
` + X) : E.stack = X;
|
@@ -19555,33 +19555,33 @@ class Us {
|
|
19555
19555
|
throw E;
|
19556
19556
|
}
|
19557
19557
|
}
|
19558
|
-
_request(w,
|
19559
|
-
typeof w == "string" ? (
|
19560
|
-
const { transitional: E, paramsSerializer:
|
19558
|
+
_request(w, C) {
|
19559
|
+
typeof w == "string" ? (C = C || {}, C.url = w) : C = w || {}, C = $s(this.defaults, C);
|
19560
|
+
const { transitional: E, paramsSerializer: N, headers: X } = C;
|
19561
19561
|
E !== void 0 && Xh.assertOptions(E, {
|
19562
19562
|
silentJSONParsing: ns.transitional(ns.boolean),
|
19563
19563
|
forcedJSONParsing: ns.transitional(ns.boolean),
|
19564
19564
|
clarifyTimeoutError: ns.transitional(ns.boolean)
|
19565
|
-
}, !1),
|
19566
|
-
serialize:
|
19567
|
-
} : Xh.assertOptions(
|
19565
|
+
}, !1), N != null && (pe.isFunction(N) ? C.paramsSerializer = {
|
19566
|
+
serialize: N
|
19567
|
+
} : Xh.assertOptions(N, {
|
19568
19568
|
encode: ns.function,
|
19569
19569
|
serialize: ns.function
|
19570
|
-
}, !0)),
|
19570
|
+
}, !0)), C.method = (C.method || this.defaults.method || "get").toLowerCase();
|
19571
19571
|
let T = X && pe.merge(
|
19572
19572
|
X.common,
|
19573
|
-
X[
|
19573
|
+
X[C.method]
|
19574
19574
|
);
|
19575
19575
|
X && pe.forEach(
|
19576
19576
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
19577
19577
|
(qe) => {
|
19578
19578
|
delete X[qe];
|
19579
19579
|
}
|
19580
|
-
),
|
19580
|
+
), C.headers = Yi.concat(T, X);
|
19581
19581
|
const c = [];
|
19582
19582
|
let _e = !0;
|
19583
19583
|
this.interceptors.request.forEach(function(tt) {
|
19584
|
-
typeof tt.runWhen == "function" && tt.runWhen(
|
19584
|
+
typeof tt.runWhen == "function" && tt.runWhen(C) === !1 || (_e = _e && tt.synchronous, c.unshift(tt.fulfilled, tt.rejected));
|
19585
19585
|
});
|
19586
19586
|
const ye = [];
|
19587
19587
|
this.interceptors.response.forEach(function(tt) {
|
@@ -19590,12 +19590,12 @@ class Us {
|
|
19590
19590
|
let ve, ae = 0, oe;
|
19591
19591
|
if (!_e) {
|
19592
19592
|
const qe = [np.bind(this), void 0];
|
19593
|
-
for (qe.unshift.apply(qe, c), qe.push.apply(qe, ye), oe = qe.length, ve = Promise.resolve(
|
19593
|
+
for (qe.unshift.apply(qe, c), qe.push.apply(qe, ye), oe = qe.length, ve = Promise.resolve(C); ae < oe; )
|
19594
19594
|
ve = ve.then(qe[ae++], qe[ae++]);
|
19595
19595
|
return ve;
|
19596
19596
|
}
|
19597
19597
|
oe = c.length;
|
19598
|
-
let dt =
|
19598
|
+
let dt = C;
|
19599
19599
|
for (ae = 0; ae < oe; ) {
|
19600
19600
|
const qe = c[ae++], tt = c[ae++];
|
19601
19601
|
try {
|
@@ -19616,21 +19616,21 @@ class Us {
|
|
19616
19616
|
}
|
19617
19617
|
getUri(w) {
|
19618
19618
|
w = $s(this.defaults, w);
|
19619
|
-
const
|
19620
|
-
return Sp(
|
19619
|
+
const C = Cp(w.baseURL, w.url);
|
19620
|
+
return Sp(C, w.params, w.paramsSerializer);
|
19621
19621
|
}
|
19622
19622
|
}
|
19623
19623
|
pe.forEach(["delete", "get", "head", "options"], function(w) {
|
19624
|
-
Us.prototype[w] = function(
|
19624
|
+
Us.prototype[w] = function(C, E) {
|
19625
19625
|
return this.request($s(E || {}, {
|
19626
19626
|
method: w,
|
19627
|
-
url:
|
19627
|
+
url: C,
|
19628
19628
|
data: (E || {}).data
|
19629
19629
|
}));
|
19630
19630
|
};
|
19631
19631
|
});
|
19632
19632
|
pe.forEach(["post", "put", "patch"], function(w) {
|
19633
|
-
function
|
19633
|
+
function C(E) {
|
19634
19634
|
return function(X, T, c) {
|
19635
19635
|
return this.request($s(c || {}, {
|
19636
19636
|
method: w,
|
@@ -19642,33 +19642,33 @@ pe.forEach(["post", "put", "patch"], function(w) {
|
|
19642
19642
|
}));
|
19643
19643
|
};
|
19644
19644
|
}
|
19645
|
-
Us.prototype[w] =
|
19645
|
+
Us.prototype[w] = C(), Us.prototype[w + "Form"] = C(!0);
|
19646
19646
|
});
|
19647
19647
|
class nu {
|
19648
19648
|
constructor(w) {
|
19649
19649
|
if (typeof w != "function")
|
19650
19650
|
throw new TypeError("executor must be a function.");
|
19651
|
-
let
|
19651
|
+
let C;
|
19652
19652
|
this.promise = new Promise(function(X) {
|
19653
|
-
|
19653
|
+
C = X;
|
19654
19654
|
});
|
19655
19655
|
const E = this;
|
19656
|
-
this.promise.then((
|
19656
|
+
this.promise.then((N) => {
|
19657
19657
|
if (!E._listeners) return;
|
19658
19658
|
let X = E._listeners.length;
|
19659
19659
|
for (; X-- > 0; )
|
19660
|
-
E._listeners[X](
|
19660
|
+
E._listeners[X](N);
|
19661
19661
|
E._listeners = null;
|
19662
|
-
}), this.promise.then = (
|
19662
|
+
}), this.promise.then = (N) => {
|
19663
19663
|
let X;
|
19664
19664
|
const T = new Promise((c) => {
|
19665
19665
|
E.subscribe(c), X = c;
|
19666
|
-
}).then(
|
19666
|
+
}).then(N);
|
19667
19667
|
return T.cancel = function() {
|
19668
19668
|
E.unsubscribe(X);
|
19669
19669
|
}, T;
|
19670
19670
|
}, w(function(X, T, c) {
|
19671
|
-
E.reason || (E.reason = new $o(X, T, c),
|
19671
|
+
E.reason || (E.reason = new $o(X, T, c), C(E.reason));
|
19672
19672
|
});
|
19673
19673
|
}
|
19674
19674
|
/**
|
@@ -19694,8 +19694,8 @@ class nu {
|
|
19694
19694
|
unsubscribe(w) {
|
19695
19695
|
if (!this._listeners)
|
19696
19696
|
return;
|
19697
|
-
const
|
19698
|
-
|
19697
|
+
const C = this._listeners.indexOf(w);
|
19698
|
+
C !== -1 && this._listeners.splice(C, 1);
|
19699
19699
|
}
|
19700
19700
|
/**
|
19701
19701
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
@@ -19704,16 +19704,16 @@ class nu {
|
|
19704
19704
|
static source() {
|
19705
19705
|
let w;
|
19706
19706
|
return {
|
19707
|
-
token: new nu(function(
|
19708
|
-
w =
|
19707
|
+
token: new nu(function(N) {
|
19708
|
+
w = N;
|
19709
19709
|
}),
|
19710
19710
|
cancel: w
|
19711
19711
|
};
|
19712
19712
|
}
|
19713
19713
|
}
|
19714
19714
|
function T_(g) {
|
19715
|
-
return function(
|
19716
|
-
return g.apply(null,
|
19715
|
+
return function(C) {
|
19716
|
+
return g.apply(null, C);
|
19717
19717
|
};
|
19718
19718
|
}
|
19719
19719
|
function I_(g) {
|
@@ -19788,10 +19788,10 @@ Object.entries(Jh).forEach(([g, w]) => {
|
|
19788
19788
|
Jh[w] = g;
|
19789
19789
|
});
|
19790
19790
|
function Lp(g) {
|
19791
|
-
const w = new Us(g),
|
19792
|
-
return pe.extend(
|
19793
|
-
return Lp($s(g,
|
19794
|
-
},
|
19791
|
+
const w = new Us(g), C = up(Us.prototype.request, w);
|
19792
|
+
return pe.extend(C, Us.prototype, w, { allOwnKeys: !0 }), pe.extend(C, w, null, { allOwnKeys: !0 }), C.create = function(N) {
|
19793
|
+
return Lp($s(g, N));
|
19794
|
+
}, C;
|
19795
19795
|
}
|
19796
19796
|
const $t = Lp(cl);
|
19797
19797
|
$t.Axios = Us;
|
@@ -19814,18 +19814,18 @@ $t.getAdapter = zp.getAdapter;
|
|
19814
19814
|
$t.HttpStatusCode = Jh;
|
19815
19815
|
$t.default = $t;
|
19816
19816
|
const Uh = (g, w = 300) => {
|
19817
|
-
let
|
19818
|
-
return function(...
|
19819
|
-
clearTimeout(
|
19820
|
-
g.apply(this,
|
19817
|
+
let C;
|
19818
|
+
return function(...N) {
|
19819
|
+
clearTimeout(C), C = setTimeout(() => {
|
19820
|
+
g.apply(this, N);
|
19821
19821
|
}, w);
|
19822
19822
|
};
|
19823
19823
|
};
|
19824
|
-
function Cc(g, w,
|
19824
|
+
function Cc(g, w, C = {}) {
|
19825
19825
|
const E = { type: "Feature" };
|
19826
|
-
return (
|
19826
|
+
return (C.id === 0 || C.id) && (E.id = C.id), C.bbox && (E.bbox = C.bbox), E.properties = w || {}, E.geometry = g, E;
|
19827
19827
|
}
|
19828
|
-
function P_(g, w,
|
19828
|
+
function P_(g, w, C = {}) {
|
19829
19829
|
if (!g)
|
19830
19830
|
throw new Error("coordinates is required");
|
19831
19831
|
if (!Array.isArray(g))
|
@@ -19837,43 +19837,43 @@ function P_(g, w, P = {}) {
|
|
19837
19837
|
return Cc({
|
19838
19838
|
type: "Point",
|
19839
19839
|
coordinates: g
|
19840
|
-
}, w,
|
19840
|
+
}, w, C);
|
19841
19841
|
}
|
19842
|
-
function Rp(g, w,
|
19843
|
-
for (const
|
19844
|
-
if (
|
19842
|
+
function Rp(g, w, C = {}) {
|
19843
|
+
for (const N of g) {
|
19844
|
+
if (N.length < 4)
|
19845
19845
|
throw new Error(
|
19846
19846
|
"Each LinearRing of a Polygon must have 4 or more Positions."
|
19847
19847
|
);
|
19848
|
-
if (
|
19848
|
+
if (N[N.length - 1].length !== N[0].length)
|
19849
19849
|
throw new Error("First and last Position are not equivalent.");
|
19850
|
-
for (let X = 0; X <
|
19851
|
-
if (
|
19850
|
+
for (let X = 0; X < N[N.length - 1].length; X++)
|
19851
|
+
if (N[N.length - 1][X] !== N[0][X])
|
19852
19852
|
throw new Error("First and last Position are not equivalent.");
|
19853
19853
|
}
|
19854
19854
|
return Cc({
|
19855
19855
|
type: "Polygon",
|
19856
19856
|
coordinates: g
|
19857
|
-
}, w,
|
19857
|
+
}, w, C);
|
19858
19858
|
}
|
19859
|
-
function Bp(g, w,
|
19859
|
+
function Bp(g, w, C = {}) {
|
19860
19860
|
return Cc({
|
19861
19861
|
type: "MultiPoint",
|
19862
19862
|
coordinates: g
|
19863
|
-
}, w,
|
19863
|
+
}, w, C);
|
19864
19864
|
}
|
19865
|
-
function Fp(g, w,
|
19865
|
+
function Fp(g, w, C = {}) {
|
19866
19866
|
return Cc({
|
19867
19867
|
type: "MultiPolygon",
|
19868
19868
|
coordinates: g
|
19869
|
-
}, w,
|
19869
|
+
}, w, C);
|
19870
19870
|
}
|
19871
19871
|
function op(g) {
|
19872
19872
|
return !isNaN(g) && g !== null && !Array.isArray(g);
|
19873
19873
|
}
|
19874
|
-
function Op(g, w,
|
19874
|
+
function Op(g, w, C) {
|
19875
19875
|
if (g !== null)
|
19876
|
-
for (var E,
|
19876
|
+
for (var E, N, X, T, c, _e, ye, ve = 0, ae = 0, oe, dt = g.type, qe = dt === "FeatureCollection", tt = dt === "Feature", Ve = qe ? g.features.length : 1, ft = 0; ft < Ve; ft++) {
|
19877
19877
|
ye = qe ? g.features[ft].geometry : tt ? g.geometry : g, oe = ye ? ye.type === "GeometryCollection" : !1, c = oe ? ye.geometries.length : 1;
|
19878
19878
|
for (var lt = 0; lt < c; lt++) {
|
19879
19879
|
var Ge = 0, Vt = 0;
|
@@ -19912,9 +19912,9 @@ function Op(g, w, P) {
|
|
19912
19912
|
case "Polygon":
|
19913
19913
|
case "MultiLineString":
|
19914
19914
|
for (E = 0; E < _e.length; E++) {
|
19915
|
-
for (
|
19915
|
+
for (N = 0; N < _e[E].length - ve; N++) {
|
19916
19916
|
if (w(
|
19917
|
-
_e[E][
|
19917
|
+
_e[E][N],
|
19918
19918
|
ae,
|
19919
19919
|
ft,
|
19920
19920
|
Ge,
|
@@ -19929,10 +19929,10 @@ function Op(g, w, P) {
|
|
19929
19929
|
break;
|
19930
19930
|
case "MultiPolygon":
|
19931
19931
|
for (E = 0; E < _e.length; E++) {
|
19932
|
-
for (Vt = 0,
|
19933
|
-
for (X = 0; X < _e[E][
|
19932
|
+
for (Vt = 0, N = 0; N < _e[E].length; N++) {
|
19933
|
+
for (X = 0; X < _e[E][N].length - ve; X++) {
|
19934
19934
|
if (w(
|
19935
|
-
_e[E][
|
19935
|
+
_e[E][N][X],
|
19936
19936
|
ae,
|
19937
19937
|
ft,
|
19938
19938
|
Ge,
|
@@ -19961,14 +19961,14 @@ function Op(g, w, P) {
|
|
19961
19961
|
function Vp(g, w = {}) {
|
19962
19962
|
if (g.bbox != null && w.recompute !== !0)
|
19963
19963
|
return g.bbox;
|
19964
|
-
const
|
19964
|
+
const C = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
19965
19965
|
return Op(g, (E) => {
|
19966
|
-
|
19967
|
-
}),
|
19966
|
+
C[0] > E[0] && (C[0] = E[0]), C[1] > E[1] && (C[1] = E[1]), C[2] < E[0] && (C[2] = E[0]), C[3] < E[1] && (C[3] = E[1]);
|
19967
|
+
}), C;
|
19968
19968
|
}
|
19969
19969
|
function Np(g, w = {}) {
|
19970
|
-
const
|
19971
|
-
return P_([E,
|
19970
|
+
const C = Vp(g), E = (C[0] + C[2]) / 2, N = (C[1] + C[3]) / 2;
|
19971
|
+
return P_([E, N], w.properties, w);
|
19972
19972
|
}
|
19973
19973
|
const A_ = {
|
19974
19974
|
mixins: [Qh],
|
@@ -20038,11 +20038,11 @@ const A_ = {
|
|
20038
20038
|
}
|
20039
20039
|
}
|
20040
20040
|
}, C_ = { class: "vs-map-slot-layers" }, k_ = ["onClick"], E_ = ["src"];
|
20041
|
-
function M_(g, w,
|
20041
|
+
function M_(g, w, C, E, N, X) {
|
20042
20042
|
return vt(), Ot("div", C_, [
|
20043
|
-
(vt(!0), Ot(yc, null, xc(
|
20043
|
+
(vt(!0), Ot(yc, null, xc(C.baseLayers, (T, c) => (vt(), Ot("div", {
|
20044
20044
|
key: T.id,
|
20045
|
-
class: Uo(["vs-map-slot-layers__layer relative", { focused: T.id ==
|
20045
|
+
class: Uo(["vs-map-slot-layers__layer relative", { focused: T.id == N.selectedLayer }]),
|
20046
20046
|
onClick: (_e) => X.toggleLayerVisibility(T.id)
|
20047
20047
|
}, [
|
20048
20048
|
Ye("img", {
|
@@ -20071,12 +20071,12 @@ const z_ = /* @__PURE__ */ hn(A_, [["render", M_], ["__scopeId", "data-v-d4fbd7d
|
|
20071
20071
|
key: 0,
|
20072
20072
|
class: "flex justify-start items-center gap-2"
|
20073
20073
|
}, U_ = { class: "ml-1 text-[0.875rem]" };
|
20074
|
-
function j_(g, w,
|
20074
|
+
function j_(g, w, C, E, N, X) {
|
20075
20075
|
var T;
|
20076
20076
|
return vt(), Ot("div", L_, [
|
20077
|
-
|
20078
|
-
(T =
|
20079
|
-
(vt(!0), Ot(yc, null, xc(
|
20077
|
+
C.title ? (vt(), Ot("div", R_, cn(C.title), 1)) : Pr("", !0),
|
20078
|
+
(T = C.strokes) != null && T.length ? (vt(), Ot("div", B_, [
|
20079
|
+
(vt(!0), Ot(yc, null, xc(C.strokes, (c) => (vt(), Ot("div", F_, [
|
20080
20080
|
Ye("div", {
|
20081
20081
|
class: "w-[15px] h-[4px]",
|
20082
20082
|
style: jh({
|
@@ -20086,7 +20086,7 @@ function j_(g, w, P, E, V, X) {
|
|
20086
20086
|
Ye("div", O_, cn(X.capitalizeFirstLetter(c.text)), 1)
|
20087
20087
|
]))), 256))
|
20088
20088
|
])) : Pr("", !0),
|
20089
|
-
(vt(!0), Ot(yc, null, xc(
|
20089
|
+
(vt(!0), Ot(yc, null, xc(C.colors, (c) => (vt(), Ot("div", V_, [
|
20090
20090
|
c.id > 0 ? (vt(), Ot("div", N_, [
|
20091
20091
|
Ye("div", {
|
20092
20092
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
@@ -20140,12 +20140,12 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20140
20140
|
};
|
20141
20141
|
},
|
20142
20142
|
async mounted() {
|
20143
|
-
var g, w,
|
20143
|
+
var g, w, C, E;
|
20144
20144
|
try {
|
20145
20145
|
if (await this.createMap(), (g = this.row) != null && g.geom) {
|
20146
|
-
const { type:
|
20146
|
+
const { type: N, coordinates: X } = this.row.geom;
|
20147
20147
|
let T;
|
20148
|
-
switch (
|
20148
|
+
switch (N) {
|
20149
20149
|
case "Polygon":
|
20150
20150
|
T = Rp(X);
|
20151
20151
|
break;
|
@@ -20163,7 +20163,7 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20163
20163
|
return;
|
20164
20164
|
}
|
20165
20165
|
const c = Np(T).geometry.coordinates;
|
20166
|
-
(
|
20166
|
+
(C = this.map) == null || C.fitBounds([c, c], {
|
20167
20167
|
maxZoom: this.zoom,
|
20168
20168
|
padding: 30
|
20169
20169
|
});
|
@@ -20188,15 +20188,15 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20188
20188
|
try {
|
20189
20189
|
const {
|
20190
20190
|
data: { rows: w }
|
20191
|
-
} = await $t.get(`/api/data/${this.table}/${this.colorAttr}`),
|
20192
|
-
(E,
|
20191
|
+
} = await $t.get(`/api/data/${this.table}/${this.colorAttr}`), C = w.reduce(
|
20192
|
+
(E, N, X) => N != null && N.id ? [
|
20193
20193
|
...E,
|
20194
|
-
|
20195
|
-
|
20194
|
+
N.id.toString(),
|
20195
|
+
N.color || g[0][X % 5]
|
20196
20196
|
] : E,
|
20197
20197
|
["match", ["get", this.colorAttr]]
|
20198
20198
|
);
|
20199
|
-
return this.colors = [...w],
|
20199
|
+
return this.colors = [...w], C.push("gray"), C;
|
20200
20200
|
} catch (w) {
|
20201
20201
|
console.log(w);
|
20202
20202
|
}
|
@@ -20206,19 +20206,19 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20206
20206
|
try {
|
20207
20207
|
const {
|
20208
20208
|
data: { rows: g }
|
20209
|
-
} = await $t.get(`/api/data/${this.table}/${this.strokeAttr}`), w = g.reduce((
|
20210
|
-
...
|
20209
|
+
} = await $t.get(`/api/data/${this.table}/${this.strokeAttr}`), w = g.reduce((C, E, N) => E != null && E.id ? [
|
20210
|
+
...C,
|
20211
20211
|
{
|
20212
20212
|
id: E.id.toString(),
|
20213
20213
|
color: E.color || "#000000",
|
20214
20214
|
dash: E.dash || [2, 2],
|
20215
20215
|
text: E.text || E.id.toString()
|
20216
20216
|
}
|
20217
|
-
] :
|
20217
|
+
] : C, []);
|
20218
20218
|
return this.strokes = [...w], [
|
20219
20219
|
"match",
|
20220
20220
|
["get", this.strokeAttr],
|
20221
|
-
...w.flatMap(({ id:
|
20221
|
+
...w.flatMap(({ id: C, color: E }) => [C, E]),
|
20222
20222
|
"transparent"
|
20223
20223
|
];
|
20224
20224
|
} catch (g) {
|
@@ -20226,12 +20226,12 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20226
20226
|
}
|
20227
20227
|
},
|
20228
20228
|
async handleMapLoad() {
|
20229
|
-
var E,
|
20230
|
-
const g = await this.getStrokeStyle(), w = await this.getColorStyle(),
|
20229
|
+
var E, N;
|
20230
|
+
const g = await this.getStrokeStyle(), w = await this.getColorStyle(), C = ((N = (E = location.search.split("&").find((X) => X.includes("filter="))) == null ? void 0 : E.split("filter=")) == null ? void 0 : N[1]) || "";
|
20231
20231
|
await this.addLayer({
|
20232
20232
|
id: this.table,
|
20233
20233
|
service: "vector",
|
20234
|
-
url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}&filter=${
|
20234
|
+
url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}&filter=${C}`,
|
20235
20235
|
layers: [
|
20236
20236
|
{
|
20237
20237
|
type: "fill",
|
@@ -20313,25 +20313,25 @@ const $_ = /* @__PURE__ */ hn(D_, [["render", j_]]), q_ = {
|
|
20313
20313
|
}
|
20314
20314
|
}
|
20315
20315
|
}, Z_ = { class: "vs-map-portal relative" };
|
20316
|
-
function G_(g, w,
|
20316
|
+
function G_(g, w, C, E, N, X) {
|
20317
20317
|
const T = Ir("MapLegend"), c = Ir("MapSlotLayers");
|
20318
20318
|
return vt(), Ot("div", Z_, [
|
20319
20319
|
Ye("div", {
|
20320
20320
|
id: "maplibre-map",
|
20321
20321
|
ref: "maplibreMap",
|
20322
20322
|
class: "w-full",
|
20323
|
-
style: jh({ height:
|
20323
|
+
style: jh({ height: C.height })
|
20324
20324
|
}, null, 4),
|
20325
20325
|
Kh(ln(T, {
|
20326
|
-
colors:
|
20326
|
+
colors: N.colors,
|
20327
20327
|
strokes: g.strokes,
|
20328
|
-
title:
|
20328
|
+
title: C.legendname
|
20329
20329
|
}, null, 8, ["colors", "strokes", "title"]), [
|
20330
|
-
[Yh,
|
20330
|
+
[Yh, C.legend]
|
20331
20331
|
]),
|
20332
20332
|
ln(c, {
|
20333
|
-
map:
|
20334
|
-
baseLayers:
|
20333
|
+
map: N.map,
|
20334
|
+
baseLayers: C.basemap
|
20335
20335
|
}, null, 8, ["map", "baseLayers"])
|
20336
20336
|
]);
|
20337
20337
|
}
|
@@ -20470,7 +20470,7 @@ const Ty = /* @__PURE__ */ hn(yy, [["render", Sy]]), Iy = {
|
|
20470
20470
|
key: 0,
|
20471
20471
|
class: "flex justify-end gap-x-2"
|
20472
20472
|
};
|
20473
|
-
function Ry(g, w,
|
20473
|
+
function Ry(g, w, C, E, N, X) {
|
20474
20474
|
return vt(), No(Bm, { to: "#modal" }, [
|
20475
20475
|
ln($d, { name: "fade" }, {
|
20476
20476
|
default: $h(() => [
|
@@ -20485,7 +20485,7 @@ function Ry(g, w, P, E, V, X) {
|
|
20485
20485
|
class: Uo(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white border pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl", [X.checkSize]])
|
20486
20486
|
}, [
|
20487
20487
|
Ye("div", Cy, [
|
20488
|
-
Ye("h3", ky, cn(
|
20488
|
+
Ye("h3", ky, cn(C.title), 1),
|
20489
20489
|
Ye("button", {
|
20490
20490
|
type: "button",
|
20491
20491
|
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
@@ -20504,7 +20504,7 @@ function Ry(g, w, P, E, V, X) {
|
|
20504
20504
|
})
|
20505
20505
|
])
|
20506
20506
|
], 512), [
|
20507
|
-
[Yh,
|
20507
|
+
[Yh, C.visible]
|
20508
20508
|
])
|
20509
20509
|
]),
|
20510
20510
|
_: 3
|
@@ -20629,24 +20629,24 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20629
20629
|
g || this.getData();
|
20630
20630
|
},
|
20631
20631
|
async regionSelectValue(g, w) {
|
20632
|
-
var
|
20632
|
+
var N, X;
|
20633
20633
|
if (!this.regionSelectValue) {
|
20634
20634
|
this.map.removeSource("region-search-id");
|
20635
20635
|
return;
|
20636
20636
|
}
|
20637
20637
|
g && this.selectedId && this.closeObjCard(), this.polyline = this.regionSelectValue.encoded_geom, this.getData();
|
20638
|
-
const
|
20639
|
-
if (this.currentBbox = Vp(
|
20638
|
+
const C = ((N = this.regionSelectValue) == null ? void 0 : N.geom) || js.toGeoJSON(this.regionSelectValue.encoded_geom), E = this.map.getSource("region-search-id");
|
20639
|
+
if (this.currentBbox = Vp(C), E)
|
20640
20640
|
E.setData({
|
20641
20641
|
type: "Feature",
|
20642
|
-
geometry:
|
20642
|
+
geometry: C
|
20643
20643
|
});
|
20644
20644
|
else {
|
20645
20645
|
this.map.addSource("region-search-id", {
|
20646
20646
|
type: "geojson",
|
20647
20647
|
data: {
|
20648
20648
|
type: "Feature",
|
20649
|
-
geometry:
|
20649
|
+
geometry: C
|
20650
20650
|
}
|
20651
20651
|
});
|
20652
20652
|
const T = {
|
@@ -20674,9 +20674,9 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20674
20674
|
},
|
20675
20675
|
mounted() {
|
20676
20676
|
this.rows || this.getData();
|
20677
|
-
const w = new URLSearchParams(window.location.search).get("filter"),
|
20678
|
-
|
20679
|
-
const [X, T] =
|
20677
|
+
const w = new URLSearchParams(window.location.search).get("filter"), C = w == null ? void 0 : w.split("|");
|
20678
|
+
C == null || C.forEach((N) => {
|
20679
|
+
const [X, T] = N.split("=");
|
20680
20680
|
T != null && T.includes(",") ? this.mountedFilter[X] = T == null ? void 0 : T.split(",") : this.mountedFilter[X] = T;
|
20681
20681
|
});
|
20682
20682
|
const E = new URLSearchParams(window.location.search);
|
@@ -20687,8 +20687,8 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20687
20687
|
},
|
20688
20688
|
computed: {
|
20689
20689
|
setAtuZoom() {
|
20690
|
-
var g, w,
|
20691
|
-
return ((g = this.regionSelectValue) == null ? void 0 : g.id) === "UA80000000000093317" || ((w = this.regionSelectValue) == null ? void 0 : w.id) === "UA85000000000065278" ? 10 : ((
|
20690
|
+
var g, w, C;
|
20691
|
+
return ((g = this.regionSelectValue) == null ? void 0 : g.id) === "UA80000000000093317" || ((w = this.regionSelectValue) == null ? void 0 : w.id) === "UA85000000000065278" ? 10 : ((C = this.regionSelectValue) == null ? void 0 : C.region) === "" ? 7.5 : 11;
|
20692
20692
|
}
|
20693
20693
|
},
|
20694
20694
|
methods: {
|
@@ -20699,47 +20699,44 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20699
20699
|
this.searchAddress = g, await this.getAddressOptions();
|
20700
20700
|
},
|
20701
20701
|
async getData() {
|
20702
|
-
var g, w;
|
20703
20702
|
try {
|
20704
|
-
const
|
20703
|
+
const g = {
|
20705
20704
|
search: this.search || null,
|
20706
20705
|
limit: this.limit,
|
20707
20706
|
page: this.currentPage,
|
20708
20707
|
polyline: this.polyline
|
20709
20708
|
};
|
20710
|
-
|
20711
|
-
|
20712
|
-
|
20713
|
-
|
20714
|
-
|
20715
|
-
} catch (P) {
|
20716
|
-
console.error(P.message);
|
20709
|
+
g.filter = this.filtersParam;
|
20710
|
+
const { data: w } = await $t.get(`/api/data/${this.table}`, { params: g });
|
20711
|
+
this.tableData = w == null ? void 0 : w.rows, this.total = w.filtered, this.filtered = w.filtered;
|
20712
|
+
} catch (g) {
|
20713
|
+
console.error(g.message);
|
20717
20714
|
}
|
20718
20715
|
},
|
20719
20716
|
moveToDefaultPage() {
|
20720
20717
|
var E;
|
20721
20718
|
const g = new URLSearchParams(window.location.search);
|
20722
20719
|
g.delete("id");
|
20723
|
-
const
|
20724
|
-
(E = this.map) == null || E.fitBounds(this.maxBounds, {}), window.history.pushState({}, "",
|
20720
|
+
const C = `${window.location.pathname}?${g.toString()}`;
|
20721
|
+
(E = this.map) == null || E.fitBounds(this.maxBounds, {}), window.history.pushState({}, "", C), this.isSelectObj = !1;
|
20725
20722
|
},
|
20726
20723
|
regionFullName(g) {
|
20727
20724
|
return g.region ? `${g.text} / ${g.region}` : g.text;
|
20728
20725
|
},
|
20729
20726
|
getLabelById(g) {
|
20730
|
-
const w = this.filters.find((
|
20727
|
+
const w = this.filters.find((C) => C.id === g);
|
20731
20728
|
return w ? w.label : g;
|
20732
20729
|
},
|
20733
20730
|
getOptionsLabelById(g, w) {
|
20734
20731
|
if (Array.isArray(w)) {
|
20735
|
-
const
|
20736
|
-
return
|
20732
|
+
const C = this.filters.find((E) => E.id === g);
|
20733
|
+
return C != null && C.options ? C == null ? void 0 : C.options.filter((E) => w.includes(E.id)).map((E) => E.text).join(", ") : w == null ? void 0 : w.length;
|
20737
20734
|
} else
|
20738
20735
|
return w;
|
20739
20736
|
},
|
20740
20737
|
async clearFilter(g) {
|
20741
|
-
var w,
|
20742
|
-
(
|
20738
|
+
var w, C;
|
20739
|
+
(C = (w = this.$refs) == null ? void 0 : w.filter) == null || C.clearFilter(g), await this.updateTableAndMap(), await this.getData();
|
20743
20740
|
},
|
20744
20741
|
async getReginOptions() {
|
20745
20742
|
if (this.searchRegion === "" && this.regionOptionGeneral)
|
@@ -20769,17 +20766,17 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20769
20766
|
},
|
20770
20767
|
handlePageChange(g) {
|
20771
20768
|
this.currentPage = g;
|
20772
|
-
const w = new URL(window.location.href),
|
20773
|
-
|
20769
|
+
const w = new URL(window.location.href), C = new URLSearchParams(window.location.search);
|
20770
|
+
C.set("page", g), w.search = decodeURI(C.toString()), window.history.pushState({}, "", w), this.getData();
|
20774
20771
|
},
|
20775
20772
|
async getFilter() {
|
20776
20773
|
var g;
|
20777
20774
|
try {
|
20778
20775
|
const { data: w } = await $t.get(`/api/filter/${this.table}`);
|
20779
|
-
this.filters = (g = w == null ? void 0 : w.list) == null ? void 0 : g.map((
|
20780
|
-
...
|
20781
|
-
label: (
|
20782
|
-
id: (
|
20776
|
+
this.filters = (g = w == null ? void 0 : w.list) == null ? void 0 : g.map((C) => ({
|
20777
|
+
...C,
|
20778
|
+
label: (C == null ? void 0 : C.label) || (C == null ? void 0 : C.ua),
|
20779
|
+
id: (C == null ? void 0 : C.id) || (C == null ? void 0 : C.name)
|
20783
20780
|
}));
|
20784
20781
|
} catch (w) {
|
20785
20782
|
console.error(w.message);
|
@@ -20792,23 +20789,23 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20792
20789
|
var E;
|
20793
20790
|
const g = new URLSearchParams(window.location.search);
|
20794
20791
|
g.delete("id"), this.deletePulsePoint(), this.deleteHighlighPolygon();
|
20795
|
-
const
|
20792
|
+
const C = `${window.location.pathname}?${g.toString()}`;
|
20796
20793
|
(this.currentBbox || this.center) && ((E = this.map) == null || E.fitBounds(this.currentBbox || [this.center, this.center], {
|
20797
20794
|
maxZoom: this.zoom
|
20798
|
-
})), window.history.pushState({}, "",
|
20795
|
+
})), window.history.pushState({}, "", C), this.isSelectObj = !1, this.selectedRow = null, this.getData();
|
20799
20796
|
},
|
20800
20797
|
async handleSearchRegionValue(g) {
|
20801
|
-
var
|
20798
|
+
var C;
|
20802
20799
|
const w = this.map.getLayer("region-search-id");
|
20803
|
-
this.searchRegion = g, g === "" && w ? ((
|
20800
|
+
this.searchRegion = g, g === "" && w ? ((C = this.map) == null || C.fitBounds(this.maxBounds, {}), this.currentBbox = null, this.polyline = null, this.map.removeLayer("region-search-id"), this.getData()) : g === "" && this.getData();
|
20804
20801
|
},
|
20805
20802
|
async handleSearchAddressValue(g) {
|
20806
|
-
var
|
20803
|
+
var C;
|
20807
20804
|
const w = this.map.getLayer("address-search-id");
|
20808
|
-
this.searchAddress = g, g === "" && w ? ((
|
20805
|
+
this.searchAddress = g, g === "" && w ? ((C = this.map) == null || C.fitBounds(this.maxBounds, {}), this.currentBbox = null, this.polyline = null, this.map.removeLayer("address-search-id"), this.getData()) : g === "" && this.getData();
|
20809
20806
|
},
|
20810
20807
|
handleFilterChange(g) {
|
20811
|
-
this.currentPage = g.state.page || 1, this.filterUrl = g.url.split("|").filter((w) => !w.includes("page=")).join("|");
|
20808
|
+
this.currentPage = g.state.page || 1, this.filterUrl = g.url === "no-url" ? null : g.url.split("|").filter((w) => !w.includes("page=")).join("|");
|
20812
20809
|
},
|
20813
20810
|
async updateTableAndMap() {
|
20814
20811
|
var g, w;
|
@@ -20835,8 +20832,8 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20835
20832
|
this.$refs.filter && (this.$refs.filter.clearAll(), this.search = "", this.isFilterVisible = !1, this.filtersParam = "", this.polyline = null, this.regionSelectValue = null, this.addressSelectValue = null, this.currentBbox = null, this.activeFilters = null, this.tabsIsVisible = !1, this.handleSearchRegionValue(""), this.handleSearchAddressValue(""));
|
20836
20833
|
},
|
20837
20834
|
checkFilterLength() {
|
20838
|
-
var w,
|
20839
|
-
const g = (
|
20835
|
+
var w, C;
|
20836
|
+
const g = (C = (w = this.$refs) == null ? void 0 : w.filter) == null ? void 0 : C.filteredActiveFiltersLength;
|
20840
20837
|
g !== this.previousLength && (this.previousLength = g, this.activeFiltersCount = g);
|
20841
20838
|
},
|
20842
20839
|
async handleMapClick(g) {
|
@@ -20844,10 +20841,10 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20844
20841
|
const w = this.map.queryRenderedFeatures(g.point);
|
20845
20842
|
if ((w == null ? void 0 : w.length) < 1)
|
20846
20843
|
return;
|
20847
|
-
const
|
20844
|
+
const C = window.location.pathname, E = new URLSearchParams(window.location.search);
|
20848
20845
|
E.set("id", `${(X = w[0]) == null ? void 0 : X.properties.id}`), this.getObjectData((c = (T = w[0]) == null ? void 0 : T.properties) == null ? void 0 : c.id);
|
20849
|
-
const
|
20850
|
-
window.history.pushState({}, "",
|
20846
|
+
const N = `${C}?${E.toString()}`;
|
20847
|
+
window.history.pushState({}, "", N), this.isSelectObj = !0, g.lngLat && ((oe = this.map) == null || oe.fitBounds(
|
20851
20848
|
[
|
20852
20849
|
[(_e = g.lngLat) == null ? void 0 : _e.lng, (ye = g.lngLat) == null ? void 0 : ye.lat],
|
20853
20850
|
[(ve = g.lngLat) == null ? void 0 : ve.lng, (ae = g.lngLat) == null ? void 0 : ae.lat]
|
@@ -20856,10 +20853,10 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20856
20853
|
)), this.checkUrl();
|
20857
20854
|
},
|
20858
20855
|
async getObjectData(g) {
|
20859
|
-
var w,
|
20856
|
+
var w, C;
|
20860
20857
|
try {
|
20861
20858
|
const { data: E } = await $t.get(`/api/data/${this.table}/${g}`);
|
20862
|
-
this.selectRow((w = E == null ? void 0 : E.rows) == null ? void 0 : w[0]), ((
|
20859
|
+
this.selectRow((w = E == null ? void 0 : E.rows) == null ? void 0 : w[0]), ((C = E == null ? void 0 : E.rows) == null ? void 0 : C.lenght) < 1 && this.deletePulsePoint();
|
20863
20860
|
} catch (E) {
|
20864
20861
|
console.error(E.message);
|
20865
20862
|
}
|
@@ -20869,9 +20866,9 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20869
20866
|
this.isMapVisible = w;
|
20870
20867
|
const E = await (await fetch(`/api/data/${this.table}/${g.id}`)).json();
|
20871
20868
|
this.selectedRow = ((c = E == null ? void 0 : E.rows) == null ? void 0 : c[0]) || g;
|
20872
|
-
const
|
20869
|
+
const N = window.location.pathname, X = new URLSearchParams(window.location.search);
|
20873
20870
|
X.set("id", `${g.id}`);
|
20874
|
-
const T = `${
|
20871
|
+
const T = `${N}?${X.toString()}`;
|
20875
20872
|
if (window.history.pushState({}, "", T), this.checkUrl(w), g != null && g.geom) {
|
20876
20873
|
const { type: ve, coordinates: ae } = g.geom;
|
20877
20874
|
let oe;
|
@@ -20907,24 +20904,24 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20907
20904
|
this.deletePulsePoint();
|
20908
20905
|
const w = document.createElement("div");
|
20909
20906
|
w.className = "gps-marker", w.style.width = "10px", w.style.height = "10px", w.style.position = "relative";
|
20910
|
-
const
|
20911
|
-
|
20907
|
+
const C = document.createElement("div");
|
20908
|
+
C.className = "gps-wave", w.appendChild(C), this.marker = new vc.Marker({
|
20912
20909
|
element: w,
|
20913
20910
|
anchor: "center"
|
20914
20911
|
}).setLngLat(g).addTo(this.map);
|
20915
20912
|
},
|
20916
20913
|
deleteHighlighPolygon() {
|
20917
|
-
var g, w,
|
20918
|
-
(g = this.map) != null && g.getLayer("highlighted-polygon") && ((w = this.map) == null || w.removeLayer("highlighted-polygon"), (
|
20914
|
+
var g, w, C;
|
20915
|
+
(g = this.map) != null && g.getLayer("highlighted-polygon") && ((w = this.map) == null || w.removeLayer("highlighted-polygon"), (C = this.map) == null || C.removeSource("highlighted-polygon"));
|
20919
20916
|
},
|
20920
20917
|
highlightPolygon(g) {
|
20921
|
-
var w,
|
20922
|
-
this.deletePulsePoint(), this.deleteHighlighPolygon(), (
|
20918
|
+
var w, C, E, N, X, T;
|
20919
|
+
this.deletePulsePoint(), this.deleteHighlighPolygon(), (N = this.map) == null || N.addSource("highlighted-polygon", {
|
20923
20920
|
type: "geojson",
|
20924
20921
|
data: {
|
20925
20922
|
geometry: {
|
20926
20923
|
type: (w = g == null ? void 0 : g.geom) == null ? void 0 : w.type,
|
20927
|
-
coordinates: (
|
20924
|
+
coordinates: (C = g == null ? void 0 : g.geom) == null ? void 0 : C.coordinates
|
20928
20925
|
},
|
20929
20926
|
type: "Feature",
|
20930
20927
|
properties: {
|
@@ -20966,18 +20963,18 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20966
20963
|
}), (T = this.map) == null || T.moveLayer("highlighted-polygon");
|
20967
20964
|
},
|
20968
20965
|
async handleMapHover(g) {
|
20969
|
-
var
|
20966
|
+
var N, X, T;
|
20970
20967
|
this.hoverObject && (this.map.setFeatureState(this.hoverObject, { hover: !1 }), this.hoverObject = null), this.popup || (this.popup = new vc.Popup({
|
20971
20968
|
maxWidth: "400px",
|
20972
20969
|
closeButton: !1,
|
20973
20970
|
closeOnClick: !1
|
20974
20971
|
}));
|
20975
20972
|
const w = this.map.queryRenderedFeatures(g.point);
|
20976
|
-
if (this.map.getCanvas().style.cursor = "pointer", !(w != null && w.length) || ((
|
20973
|
+
if (this.map.getCanvas().style.cursor = "pointer", !(w != null && w.length) || ((N = w == null ? void 0 : w[0]) == null ? void 0 : N.source) === "region-search-id") {
|
20977
20974
|
this.map.getCanvas().style.cursor = "", this.popup.remove();
|
20978
20975
|
return;
|
20979
20976
|
}
|
20980
|
-
const
|
20977
|
+
const C = w[0].geometry.coordinates.slice();
|
20981
20978
|
w[0].source === "highlighted-polygon" && w[1] ? this.hoverData = (X = w[1]) == null ? void 0 : X.properties : this.hoverData = (T = w[0]) == null ? void 0 : T.properties;
|
20982
20979
|
const E = {
|
20983
20980
|
source: w[0].source,
|
@@ -20985,8 +20982,8 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20985
20982
|
id: w[0].id
|
20986
20983
|
};
|
20987
20984
|
if (E.source !== "region-search-id") {
|
20988
|
-
for (this.map.setFeatureState(E, { hover: !0 }), this.hoverObject = E; Math.abs(g.lngLat.lng -
|
20989
|
-
|
20985
|
+
for (this.map.setFeatureState(E, { hover: !0 }), this.hoverObject = E; Math.abs(g.lngLat.lng - C[0]) > 180; )
|
20986
|
+
C[0] += g.lngLat.lng > C[0] ? 360 : -360;
|
20990
20987
|
this.popup.setLngLat(g.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map);
|
20991
20988
|
}
|
20992
20989
|
}
|
@@ -21013,7 +21010,7 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
21013
21010
|
ref: "popup",
|
21014
21011
|
style: { display: "none" }
|
21015
21012
|
};
|
21016
|
-
function p0(g, w,
|
21013
|
+
function p0(g, w, C, E, N, X) {
|
21017
21014
|
var Ve, ft;
|
21018
21015
|
const T = Ir("VsTextMask"), c = Ir("vs-text"), _e = Ir("FilterIcon"), ye = Ir("VsFilterList"), ve = Ir("VisibleMapIcon"), ae = Ir("HiddenMapIcon"), oe = Ir("CloseIcon"), dt = Ir("NoData"), qe = Ir("VsPagination"), tt = Ir("MapPortal");
|
21019
21016
|
return vt(), Ot("section", Oy, [
|
@@ -21051,14 +21048,14 @@ function p0(g, w, P, E, V, X) {
|
|
21051
21048
|
modelValue: g.mountedFilter,
|
21052
21049
|
"onUpdate:modelValue": w[0] || (w[0] = (lt) => g.mountedFilter = lt),
|
21053
21050
|
scheme: g.filters,
|
21054
|
-
isDialog: (Ve = g.filters) == null ? void 0 : Ve.
|
21051
|
+
isDialog: (Ve = g.filters) == null ? void 0 : Ve.some((lt) => !(lt != null && lt.inline)),
|
21055
21052
|
"apply-vue-router": "",
|
21056
21053
|
history: "",
|
21057
21054
|
view: "plain",
|
21058
21055
|
clearable: !1,
|
21059
21056
|
name: "filter",
|
21060
|
-
onFilterChange: w[1] || (w[1] = (lt) => {
|
21061
|
-
g.handleFilterChange(lt),
|
21057
|
+
onFilterChange: w[1] || (w[1] = async (lt) => {
|
21058
|
+
await g.handleFilterChange(lt), await g.updateTableAndMap();
|
21062
21059
|
})
|
21063
21060
|
}, {
|
21064
21061
|
button: $h(({ visible: lt }) => [
|