@opengis/partsmap 0.0.91 → 0.0.93
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 +758 -759
- package/dist/PartsMap.umd.cjs +8 -8
- package/package.json +1 -1
package/dist/PartsMap.js
CHANGED
@@ -7,12 +7,12 @@ function Ic(f, x, I) {
|
|
7
7
|
f = Xd(f * I), x = Xd(x * I);
|
8
8
|
var C = (f - x) * 2;
|
9
9
|
C < 0 && (C = -C - 1);
|
10
|
-
for (var
|
11
|
-
|
12
|
-
return
|
10
|
+
for (var z = ""; C >= 32; )
|
11
|
+
z += String.fromCharCode((32 | C & 31) + 63), C /= 32;
|
12
|
+
return z += String.fromCharCode((C | 0) + 63), z;
|
13
13
|
}
|
14
14
|
Ws.decode = function(f, x) {
|
15
|
-
for (var I = 0, C = 0,
|
15
|
+
for (var I = 0, C = 0, z = 0, U = [], S = 0, c = 0, pe = null, fe, xe, oe = Math.pow(10, Number.isInteger(x) ? x : 5); I < f.length; ) {
|
16
16
|
pe = null, S = 1, c = 0;
|
17
17
|
do
|
18
18
|
pe = f.charCodeAt(I++) - 63, c += (pe & 31) * S, S *= 32;
|
@@ -21,15 +21,15 @@ Ws.decode = function(f, x) {
|
|
21
21
|
do
|
22
22
|
pe = f.charCodeAt(I++) - 63, c += (pe & 31) * S, S *= 32;
|
23
23
|
while (pe >= 32);
|
24
|
-
xe = c & 1 ? (-c - 1) / 2 : c / 2, C += fe,
|
24
|
+
xe = c & 1 ? (-c - 1) / 2 : c / 2, C += fe, z += xe, U.push([C / oe, z / oe]);
|
25
25
|
}
|
26
26
|
return U;
|
27
27
|
};
|
28
28
|
Ws.encode = function(f, x) {
|
29
29
|
if (!f.length)
|
30
30
|
return "";
|
31
|
-
for (var I = Math.pow(10, Number.isInteger(x) ? x : 5), C = Ic(f[0][0], 0, I) + Ic(f[0][1], 0, I),
|
32
|
-
var U = f[
|
31
|
+
for (var I = Math.pow(10, Number.isInteger(x) ? x : 5), C = Ic(f[0][0], 0, I) + Ic(f[0][1], 0, I), z = 1; z < f.length; z++) {
|
32
|
+
var U = f[z], S = f[z - 1];
|
33
33
|
C += Ic(U[0], S[0], I), C += Ic(U[1], S[1], I);
|
34
34
|
}
|
35
35
|
return C;
|
@@ -67,13 +67,13 @@ var bp = { exports: {} };
|
|
67
67
|
f.exports = C();
|
68
68
|
})(Gm, function() {
|
69
69
|
var I = {}, C = {};
|
70
|
-
function
|
70
|
+
function z(S, c, pe) {
|
71
71
|
if (C[S] = pe, S === "index") {
|
72
72
|
var fe = "var sharedModule = {}; (" + C.shared + ")(sharedModule); (" + C.worker + ")(sharedModule);", xe = {};
|
73
73
|
return C.shared(xe), C.index(I, xe), typeof window < "u" && I.setWorkerUrl(window.URL.createObjectURL(new Blob([fe], { type: "text/javascript" }))), I;
|
74
74
|
}
|
75
75
|
}
|
76
|
-
|
76
|
+
z("shared", ["exports"], function(S) {
|
77
77
|
function c(i, e, r, s) {
|
78
78
|
return new (r || (r = Promise))(function(l, d) {
|
79
79
|
function p(v) {
|
@@ -181,11 +181,11 @@ var bp = { exports: {} };
|
|
181
181
|
} }, xe.convert = function(i) {
|
182
182
|
return i instanceof xe ? i : Array.isArray(i) ? new xe(i[0], i[1]) : i;
|
183
183
|
};
|
184
|
-
var oe = pe(fe), ae =
|
185
|
-
function
|
184
|
+
var oe = pe(fe), ae = ut;
|
185
|
+
function ut(i, e, r, s) {
|
186
186
|
this.cx = 3 * i, this.bx = 3 * (r - i) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * e, this.by = 3 * (s - e) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = i, this.p1y = e, this.p2x = r, this.p2y = s;
|
187
187
|
}
|
188
|
-
|
188
|
+
ut.prototype = { sampleCurveX: function(i) {
|
189
189
|
return ((this.ax * i + this.bx) * i + this.cx) * i;
|
190
190
|
}, sampleCurveY: function(i) {
|
191
191
|
return ((this.ay * i + this.by) * i + this.cy) * i;
|
@@ -207,7 +207,7 @@ var bp = { exports: {} };
|
|
207
207
|
}, solve: function(i, e) {
|
208
208
|
return this.sampleCurveY(this.solveCurveX(i, e));
|
209
209
|
} };
|
210
|
-
var
|
210
|
+
var $e = pe(ae);
|
211
211
|
let Ke, Oe;
|
212
212
|
function gt() {
|
213
213
|
return Ke == null && (Ke = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), Ke;
|
@@ -230,7 +230,7 @@ var bp = { exports: {} };
|
|
230
230
|
return Oe || !1;
|
231
231
|
}
|
232
232
|
function He(i, e, r, s) {
|
233
|
-
const l = new
|
233
|
+
const l = new $e(i, e, r, s);
|
234
234
|
return (d) => l.solve(d);
|
235
235
|
}
|
236
236
|
const Vt = He(0.25, 0.1, 0.25, 1);
|
@@ -501,7 +501,7 @@ var bp = { exports: {} };
|
|
501
501
|
}
|
502
502
|
}
|
503
503
|
const Yr = { kind: "null" }, Pe = { kind: "number" }, lt = { kind: "string" }, Ye = { kind: "boolean" }, Li = { kind: "color" }, or = { kind: "object" }, rt = { kind: "value" }, Sr = { kind: "collator" }, Br = { kind: "formatted" }, Qr = { kind: "padding" }, Tr = { kind: "resolvedImage" }, H = { kind: "variableAnchorOffsetCollection" };
|
504
|
-
function
|
504
|
+
function L(i, e) {
|
505
505
|
return { kind: "array", itemType: i, N: e };
|
506
506
|
}
|
507
507
|
function M(i) {
|
@@ -511,7 +511,7 @@ var bp = { exports: {} };
|
|
511
511
|
}
|
512
512
|
return i.kind;
|
513
513
|
}
|
514
|
-
const V = [Yr, Pe, lt, Ye, Li, Br, or,
|
514
|
+
const V = [Yr, Pe, lt, Ye, Li, Br, or, L(rt), Qr, Tr, H];
|
515
515
|
function Z(i, e) {
|
516
516
|
if (e.kind === "error") return null;
|
517
517
|
if (i.kind === "array") {
|
@@ -772,7 +772,7 @@ var bp = { exports: {} };
|
|
772
772
|
}
|
773
773
|
r = l;
|
774
774
|
}
|
775
|
-
return
|
775
|
+
return L(r || rt, e);
|
776
776
|
}
|
777
777
|
return or;
|
778
778
|
}
|
@@ -829,7 +829,7 @@ var bp = { exports: {} };
|
|
829
829
|
if (e[2] !== null && (typeof e[2] != "number" || e[2] < 0 || e[2] !== Math.floor(e[2]))) return r.error('The length argument to "array" must be a positive integer literal', 2);
|
830
830
|
_ = e[2], l++;
|
831
831
|
}
|
832
|
-
s =
|
832
|
+
s = L(m, _);
|
833
833
|
} else {
|
834
834
|
if (!Qs[d]) throw new Error(`Types doesn't contain name = ${d}`);
|
835
835
|
s = Qs[d];
|
@@ -1065,7 +1065,7 @@ var bp = { exports: {} };
|
|
1065
1065
|
}
|
1066
1066
|
static parse(e, r) {
|
1067
1067
|
if (e.length !== 3) return r.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
1068
|
-
const s = r.parse(e[1], 1, Pe), l = r.parse(e[2], 2,
|
1068
|
+
const s = r.parse(e[1], 1, Pe), l = r.parse(e[2], 2, L(r.expectedType || rt));
|
1069
1069
|
return s && l ? new ia(l.type.itemType, s, l) : null;
|
1070
1070
|
}
|
1071
1071
|
evaluate(e) {
|
@@ -1225,7 +1225,7 @@ var bp = { exports: {} };
|
|
1225
1225
|
if (e.length <= 2 || e.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
|
1226
1226
|
const s = r.parse(e[1], 1, rt), l = r.parse(e[2], 2, Pe);
|
1227
1227
|
if (!s || !l) return null;
|
1228
|
-
if (!Q(s.type, [
|
1228
|
+
if (!Q(s.type, [L(rt), lt, rt])) return r.error(`Expected first argument to be of type array or string, but found ${M(s.type)} instead`);
|
1229
1229
|
if (e.length === 4) {
|
1230
1230
|
const d = r.parse(e[3], 3, Pe);
|
1231
1231
|
return d ? new no(s.type, s, l, d) : null;
|
@@ -1418,7 +1418,7 @@ var bp = { exports: {} };
|
|
1418
1418
|
if (!B) return null;
|
1419
1419
|
_ = _ || B.type, m.push([T, B]);
|
1420
1420
|
}
|
1421
|
-
return re(_, Pe) || re(_, Li) || re(_, Qr) || re(_, H) || re(_,
|
1421
|
+
return re(_, Pe) || re(_, Li) || re(_, Qr) || re(_, H) || re(_, L(Pe)) ? new Gi(_, s, l, d, m) : r.error(`Type ${M(_)} is not interpolatable.`);
|
1422
1422
|
}
|
1423
1423
|
evaluate(e) {
|
1424
1424
|
const r = this.labels, s = this.outputs;
|
@@ -1624,7 +1624,7 @@ var bp = { exports: {} };
|
|
1624
1624
|
let _ = null;
|
1625
1625
|
if (m["font-scale"] && (_ = r.parse(m["font-scale"], 1, Pe), !_)) return null;
|
1626
1626
|
let v = null;
|
1627
|
-
if (m["text-font"] && (v = r.parse(m["text-font"], 1,
|
1627
|
+
if (m["text-font"] && (v = r.parse(m["text-font"], 1, L(lt)), !v)) return null;
|
1628
1628
|
let T = null;
|
1629
1629
|
if (m["text-color"] && (T = r.parse(m["text-color"], 1, Li), !T)) return null;
|
1630
1630
|
const k = l[l.length - 1];
|
@@ -2016,7 +2016,7 @@ var bp = { exports: {} };
|
|
2016
2016
|
const d = Math.min(Et(i, [r, s], l), Et(e, [r, s], l)), p = Math.min(Et(r, [i, e], l), Et(s, [i, e], l));
|
2017
2017
|
return Math.min(d, p);
|
2018
2018
|
}
|
2019
|
-
function
|
2019
|
+
function dt(i, e, r, s, l) {
|
2020
2020
|
if (!Or(e, i.length) || !Or(s, r.length)) return 1 / 0;
|
2021
2021
|
let d = 1 / 0;
|
2022
2022
|
for (let p = e[0]; p < e[1]; ++p) {
|
@@ -2127,7 +2127,7 @@ var bp = { exports: {} };
|
|
2127
2127
|
if (ho(v) <= k && ho(T) <= E) {
|
2128
2128
|
if (!Or(v, i.length) && Or(T, r.length)) return NaN;
|
2129
2129
|
let D;
|
2130
|
-
if (e && s) D =
|
2130
|
+
if (e && s) D = dt(i, v, r, T, l), p = Math.min(p, D);
|
2131
2131
|
else if (e && !s) {
|
2132
2132
|
const B = i.slice(v[0], v[1] + 1);
|
2133
2133
|
for (let O = T[0]; O <= T[1]; ++O) if (D = Et(r[O], B, l), p = Math.min(p, D), p === 0) return p;
|
@@ -2449,7 +2449,7 @@ var bp = { exports: {} };
|
|
2449
2449
|
}
|
2450
2450
|
Hi.register(vn, { error: [{ kind: "error" }, [lt], (i, [e]) => {
|
2451
2451
|
throw new Kt(e.evaluate(i));
|
2452
|
-
}], typeof: [lt, [rt], (i, [e]) => M(ei(e.evaluate(i)))], "to-rgba": [
|
2452
|
+
}], typeof: [lt, [rt], (i, [e]) => M(ei(e.evaluate(i)))], "to-rgba": [L(Pe, 4), [Li], (i, [e]) => {
|
2453
2453
|
const [r, s, l, d] = e.evaluate(i).rgb;
|
2454
2454
|
return [255 * r, 255 * s, 255 * l, d];
|
2455
2455
|
}], rgb: [Li, [Pe, Pe, Pe], ga], rgba: [Li, [Pe, Pe, Pe, Pe], ga], has: { type: Ye, overloads: [[[lt], (i, [e]) => mo(e.evaluate(i), i.properties())], [[lt, or], (i, [e, r]) => mo(e.evaluate(i), r.evaluate(i))]] }, get: { type: rt, overloads: [[[lt], (i, [e]) => _a(e.evaluate(i), i.properties())], [[lt, or], (i, [e, r]) => _a(e.evaluate(i), r.evaluate(i))]] }, "feature-state": [rt, [lt], (i, [e]) => _a(e.evaluate(i), i.featureState || {})], properties: [or, [], (i) => i.properties()], "geometry-type": [lt, [], (i) => i.geometryType()], id: [rt, [], (i) => i.id()], zoom: [Pe, [], (i) => i.globals.zoom], "heatmap-density": [Pe, [], (i) => i.globals.heatmapDensity || 0], "line-progress": [Pe, [], (i) => i.globals.lineProgress || 0], accumulated: [rt, [], (i) => i.globals.accumulated === void 0 ? null : i.globals.accumulated], "+": [Pe, bn(Pe), (i, e) => {
|
@@ -2487,7 +2487,7 @@ var bp = { exports: {} };
|
|
2487
2487
|
}], "filter-id->=": [Ye, [rt], (i, [e]) => {
|
2488
2488
|
const r = i.id(), s = e.value;
|
2489
2489
|
return typeof r == typeof s && r >= s;
|
2490
|
-
}], "filter-has": [Ye, [rt], (i, [e]) => e.value in i.properties()], "filter-has-id": [Ye, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ye, [
|
2490
|
+
}], "filter-has": [Ye, [rt], (i, [e]) => e.value in i.properties()], "filter-has-id": [Ye, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ye, [L(lt)], (i, [e]) => e.value.indexOf(i.geometryType()) >= 0], "filter-id-in": [Ye, [L(rt)], (i, [e]) => e.value.indexOf(i.id()) >= 0], "filter-in-small": [Ye, [lt, L(rt)], (i, [e, r]) => r.value.indexOf(i.properties()[e.value]) >= 0], "filter-in-large": [Ye, [lt, L(rt)], (i, [e, r]) => function(s, l, d, p) {
|
2491
2491
|
for (; d <= p; ) {
|
2492
2492
|
const m = d + p >> 1;
|
2493
2493
|
if (l[m] === s) return !0;
|
@@ -2530,7 +2530,7 @@ var bp = { exports: {} };
|
|
2530
2530
|
function Tn(i, e) {
|
2531
2531
|
const r = new tn(vn, go, [], e ? function(l) {
|
2532
2532
|
const d = { color: Li, string: lt, number: Pe, enum: lt, boolean: Ye, formatted: Br, padding: Qr, resolvedImage: Tr, variableAnchorOffsetCollection: H };
|
2533
|
-
return l.type === "array" ?
|
2533
|
+
return l.type === "array" ? L(d[l.value] || rt, l.length) : d[l.type];
|
2534
2534
|
}(e) : void 0), s = r.parse(i, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
2535
2535
|
return s ? Nl(new bo(s, e)) : $n(r.errors);
|
2536
2536
|
}
|
@@ -4006,7 +4006,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
4006
4006
|
}
|
4007
4007
|
}
|
4008
4008
|
Fe("CollisionBoxArray", at);
|
4009
|
-
class
|
4009
|
+
class pt extends y {
|
4010
4010
|
get anchorX() {
|
4011
4011
|
return this._structArray.int16[this._pos2 + 0];
|
4012
4012
|
}
|
@@ -4068,10 +4068,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
4068
4068
|
return this._structArray.int16[this._pos2 + 22];
|
4069
4069
|
}
|
4070
4070
|
}
|
4071
|
-
|
4071
|
+
pt.prototype.size = 48;
|
4072
4072
|
class Bt extends De {
|
4073
4073
|
get(e) {
|
4074
|
-
return new
|
4074
|
+
return new pt(this, e);
|
4075
4075
|
}
|
4076
4076
|
}
|
4077
4077
|
Fe("PlacedSymbolArray", Bt);
|
@@ -5550,7 +5550,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
5550
5550
|
for (const Ve of B) {
|
5551
5551
|
const Be = [], ge = [];
|
5552
5552
|
for (const Ze of Ve) {
|
5553
|
-
const
|
5553
|
+
const Ue = Ze.x, et = Ze.y, At = X[0] * Ue + X[4] * et + X[12], Pt = X[1] * Ue + X[5] * et + X[13], li = X[2] * Ue + X[6] * et + X[14], Cr = X[3] * Ue + X[7] * et + X[15], wi = li + ve, Ht = Cr + Le, Fi = At + Xe, Oi = Pt + Ee, Vi = li + Ae, Wt = Cr + je, ci = new oe((At + ie) / Ht, (Pt + ue) / Ht);
|
5554
5554
|
ci.z = wi / Ht, Be.push(ci);
|
5555
5555
|
const Ei = new oe(Fi / Wt, Oi / Wt);
|
5556
5556
|
Ei.z = Vi / Wt, ge.push(Ei);
|
@@ -5691,12 +5691,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
5691
5691
|
if (D && this.addCurrentVertex(E, O, Ve, Be, k), Ae === "fakeround") {
|
5692
5692
|
const ge = Math.round(180 * ve / Math.PI / 20);
|
5693
5693
|
for (let Ze = 1; Ze < ge; Ze++) {
|
5694
|
-
let
|
5695
|
-
if (
|
5696
|
-
const At =
|
5697
|
-
|
5694
|
+
let Ue = Ze / ge;
|
5695
|
+
if (Ue !== 0.5) {
|
5696
|
+
const At = Ue - 0.5;
|
5697
|
+
Ue += Ue * At * (Ue - 1) * ((1.0904 + Y * (Y * (3.55645 - 1.43519 * Y) - 3.2452)) * At * At + (0.848013 + Y * (0.215638 * Y - 1.06021)));
|
5698
5698
|
}
|
5699
|
-
const et = q.sub(O)._mult(
|
5699
|
+
const et = q.sub(O)._mult(Ue)._add(O)._unit()._mult(Xe ? -1 : 1);
|
5700
5700
|
this.addHalfVertex(E, et.x, et.y, !1, Xe, 0, k);
|
5701
5701
|
}
|
5702
5702
|
}
|
@@ -6305,7 +6305,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
6305
6305
|
return Ee < Xe.length && Le.push(ue.substring(Ee, Xe.length)), Le;
|
6306
6306
|
}(O, Th(O, v, d, e, s, D));
|
6307
6307
|
const Y = [], ie = { positionedLines: Y, text: O.toString(), top: T[1], bottom: T[1], left: T[0], right: T[0], writingMode: k, iconsInText: !1, verticalizable: !1 };
|
6308
|
-
return function(ue, ve, Le, Xe, Ee, Ae, je, Ve, Be, ge, Ze,
|
6308
|
+
return function(ue, ve, Le, Xe, Ee, Ae, je, Ve, Be, ge, Ze, Ue) {
|
6309
6309
|
let et = 0, At = al, Pt = 0, li = 0;
|
6310
6310
|
const Cr = Ve === "right" ? 1 : Ve === "left" ? 0 : 0.5;
|
6311
6311
|
let wi = 0;
|
@@ -6328,7 +6328,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
6328
6328
|
if (!mr) continue;
|
6329
6329
|
hn = xt.imageName, ue.iconsInText = ue.iconsInText || !0, Zo = mr.paddedRect;
|
6330
6330
|
const ui = mr.displaySize;
|
6331
|
-
xt.scale = xt.scale * si /
|
6331
|
+
xt.scale = xt.scale * si / Ue, Gt = { width: ui[0], height: ui[1], left: Wi, top: -ed, advance: Er ? ui[1] : ui[0] }, er = Ei + (si - ui[1] * xt.scale), un = Gt.advance;
|
6332
6332
|
const Mn = Er ? ui[0] * xt.scale - si * ci : ui[1] * xt.scale - si * ci;
|
6333
6333
|
Mn > 0 && Mn > Ti && (Ti = Mn);
|
6334
6334
|
} else {
|
@@ -6606,8 +6606,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
6606
6606
|
}
|
6607
6607
|
const Be = Xe(Ve, je), ge = Xe(Ve, je, !0);
|
6608
6608
|
if (Be in se && ge in X && se[Be] !== X[ge]) {
|
6609
|
-
const Ze = Le(Be, ge, je),
|
6610
|
-
delete X[Be], delete se[ge], se[Xe(Ve, Y[
|
6609
|
+
const Ze = Le(Be, ge, je), Ue = ve(Be, ge, Y[Ze].geometry);
|
6610
|
+
delete X[Be], delete se[ge], se[Xe(Ve, Y[Ue].geometry, !0)] = Ue, Y[Ze].geometry = null;
|
6611
6611
|
} else Be in se ? ve(Be, ge, je) : ge in X ? Le(Be, ge, je) : (ue(Ee), X[Be] = ie - 1, se[ge] = ie - 1);
|
6612
6612
|
}
|
6613
6613
|
return Y.filter((Ee) => Ee.geometry);
|
@@ -6648,8 +6648,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
6648
6648
|
addSymbols(e, r, s, l, d, p, m, _, v, T, k, E) {
|
6649
6649
|
const D = e.indexArray, B = e.layoutVertexArray, O = e.segments.prepareSegment(4 * r.length, B, D, this.canOverlap ? p.sortKey : void 0), q = this.glyphOffsetArray.length, X = O.vertexLength, se = this.allowVerticalPlacement && m === S.ai.vertical ? Math.PI / 2 : 0, Y = p.text && p.text.sections;
|
6650
6650
|
for (let ie = 0; ie < r.length; ie++) {
|
6651
|
-
const { tl: ue, tr: ve, bl: Le, br: Xe, tex: Ee, pixelOffsetTL: Ae, pixelOffsetBR: je, minFontScaleX: Ve, minFontScaleY: Be, glyphOffset: ge, isSDF: Ze, sectionIndex:
|
6652
|
-
gc(B, _.x, _.y, ue.x, At + ue.y, Ee.x, Ee.y, s, Ze, Ae.x, Ae.y, Ve, Be), gc(B, _.x, _.y, ve.x, At + ve.y, Ee.x + Ee.w, Ee.y, s, Ze, je.x, Ae.y, Ve, Be), gc(B, _.x, _.y, Le.x, At + Le.y, Ee.x, Ee.y + Ee.h, s, Ze, Ae.x, je.y, Ve, Be), gc(B, _.x, _.y, Xe.x, At + Xe.y, Ee.x + Ee.w, Ee.y + Ee.h, s, Ze, je.x, je.y, Ve, Be), Ph(e.dynamicLayoutVertexArray, _, se), D.emplaceBack(et, et + 1, et + 2), D.emplaceBack(et + 1, et + 2, et + 3), O.vertexLength += 4, O.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(ge[0]), ie !== r.length - 1 &&
|
6651
|
+
const { tl: ue, tr: ve, bl: Le, br: Xe, tex: Ee, pixelOffsetTL: Ae, pixelOffsetBR: je, minFontScaleX: Ve, minFontScaleY: Be, glyphOffset: ge, isSDF: Ze, sectionIndex: Ue } = r[ie], et = O.vertexLength, At = ge[1];
|
6652
|
+
gc(B, _.x, _.y, ue.x, At + ue.y, Ee.x, Ee.y, s, Ze, Ae.x, Ae.y, Ve, Be), gc(B, _.x, _.y, ve.x, At + ve.y, Ee.x + Ee.w, Ee.y, s, Ze, je.x, Ae.y, Ve, Be), gc(B, _.x, _.y, Le.x, At + Le.y, Ee.x, Ee.y + Ee.h, s, Ze, Ae.x, je.y, Ve, Be), gc(B, _.x, _.y, Xe.x, At + Xe.y, Ee.x + Ee.w, Ee.y + Ee.h, s, Ze, je.x, je.y, Ve, Be), Ph(e.dynamicLayoutVertexArray, _, se), D.emplaceBack(et, et + 1, et + 2), D.emplaceBack(et + 1, et + 2, et + 3), O.vertexLength += 4, O.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(ge[0]), ie !== r.length - 1 && Ue === r[ie + 1].sectionIndex || e.programConfigurations.populatePaintArrays(B.length, p, p.index, {}, E, Y && Y[Ue]);
|
6653
6653
|
}
|
6654
6654
|
e.placedSymbolArray.emplaceBack(_.x, _.y, q, this.glyphOffsetArray.length - q, X, v, T, _.segment, s ? s[0] : 0, s ? s[1] : 0, l[0], l[1], m, 0, !1, 0, k);
|
6655
6655
|
}
|
@@ -7349,22 +7349,22 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7349
7349
|
const T = d.stretchX || [[0, m]], k = d.stretchY || [[0, _]], E = (ge, Ze) => ge + Ze[1] - Ze[0], D = T.reduce(E, 0), B = k.reduce(E, 0), O = m - D, q = _ - B;
|
7350
7350
|
let X = 0, se = D, Y = 0, ie = B, ue = 0, ve = O, Le = 0, Xe = q;
|
7351
7351
|
if (d.content && s) {
|
7352
|
-
const ge = d.content, Ze = ge[2] - ge[0],
|
7353
|
-
(d.textFitWidth || d.textFitHeight) && (v = ad(i)), X = xc(T, 0, ge[0]), Y = xc(k, 0, ge[1]), se = xc(T, ge[0], ge[2]), ie = xc(k, ge[1], ge[3]), ue = ge[0] - X, Le = ge[1] - Y, ve = Ze - se, Xe =
|
7352
|
+
const ge = d.content, Ze = ge[2] - ge[0], Ue = ge[3] - ge[1];
|
7353
|
+
(d.textFitWidth || d.textFitHeight) && (v = ad(i)), X = xc(T, 0, ge[0]), Y = xc(k, 0, ge[1]), se = xc(T, ge[0], ge[2]), ie = xc(k, ge[1], ge[3]), ue = ge[0] - X, Le = ge[1] - Y, ve = Ze - se, Xe = Ue - ie;
|
7354
7354
|
}
|
7355
|
-
const Ee = v.x1, Ae = v.y1, je = v.x2 - Ee, Ve = v.y2 - Ae, Be = (ge, Ze,
|
7356
|
-
const At = vc(ge.stretch - X, se, je, Ee), Pt = bc(ge.fixed - ue, ve, ge.stretch, D), li = vc(Ze.stretch - Y, ie, Ve, Ae), Cr = bc(Ze.fixed - Le, Xe, Ze.stretch, B), wi = vc(
|
7355
|
+
const Ee = v.x1, Ae = v.y1, je = v.x2 - Ee, Ve = v.y2 - Ae, Be = (ge, Ze, Ue, et) => {
|
7356
|
+
const At = vc(ge.stretch - X, se, je, Ee), Pt = bc(ge.fixed - ue, ve, ge.stretch, D), li = vc(Ze.stretch - Y, ie, Ve, Ae), Cr = bc(Ze.fixed - Le, Xe, Ze.stretch, B), wi = vc(Ue.stretch - X, se, je, Ee), Ht = bc(Ue.fixed - ue, ve, Ue.stretch, D), Fi = vc(et.stretch - Y, ie, Ve, Ae), Oi = bc(et.fixed - Le, Xe, et.stretch, B), Vi = new oe(At, li), Wt = new oe(wi, li), ci = new oe(wi, Fi), Ei = new oe(At, Fi), Si = new oe(Pt / p, Cr / p), Ni = new oe(Ht / p, Oi / p), Ti = e * Math.PI / 180;
|
7357
7357
|
if (Ti) {
|
7358
7358
|
const xt = Math.sin(Ti), zt = Math.cos(Ti), Ot = [zt, -xt, xt, zt];
|
7359
7359
|
Vi._matMult(Ot), Wt._matMult(Ot), Ei._matMult(Ot), ci._matMult(Ot);
|
7360
7360
|
}
|
7361
7361
|
const fr = ge.stretch + ge.fixed, Xi = Ze.stretch + Ze.fixed;
|
7362
|
-
return { tl: Vi, tr: Wt, bl: Ei, br: ci, tex: { x: d.paddedRect.x + jo + fr, y: d.paddedRect.y + jo + Xi, w:
|
7362
|
+
return { tl: Vi, tr: Wt, bl: Ei, br: ci, tex: { x: d.paddedRect.x + jo + fr, y: d.paddedRect.y + jo + Xi, w: Ue.stretch + Ue.fixed - fr, h: et.stretch + et.fixed - Xi }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: Si, pixelOffsetBR: Ni, minFontScaleX: ve / p / je, minFontScaleY: Xe / p / Ve, isSDF: r };
|
7363
7363
|
};
|
7364
7364
|
if (s && (d.stretchX || d.stretchY)) {
|
7365
7365
|
const ge = Rd(T, O, D), Ze = Rd(k, q, B);
|
7366
|
-
for (let
|
7367
|
-
const et = ge[
|
7366
|
+
for (let Ue = 0; Ue < ge.length - 1; Ue++) {
|
7367
|
+
const et = ge[Ue], At = ge[Ue + 1];
|
7368
7368
|
for (let Pt = 0; Pt < Ze.length - 1; Pt++) l.push(Be(et, Ze[Pt], At, Ze[Pt + 1]));
|
7369
7369
|
}
|
7370
7370
|
} else l.push(Be({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: m + 1 }, { fixed: 0, stretch: _ + 1 }));
|
@@ -7592,28 +7592,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7592
7592
|
function Cm(i, e, r, s, l, d, p, m, _, v, T) {
|
7593
7593
|
let k = d.textMaxSize.evaluate(e, {});
|
7594
7594
|
k === void 0 && (k = p);
|
7595
|
-
const E = i.layers[0].layout, D = E.get("icon-offset").evaluate(e, {}, T), B = Vd(r.horizontal), O = p / 24, q = i.tilePixelRatio * O, X = i.tilePixelRatio * k / 24, se = i.tilePixelRatio * m, Y = i.tilePixelRatio * E.get("symbol-spacing"), ie = E.get("text-padding") * i.tilePixelRatio, ue = function(ge, Ze,
|
7596
|
-
const At = ge.get("icon-padding").evaluate(Ze, {},
|
7595
|
+
const E = i.layers[0].layout, D = E.get("icon-offset").evaluate(e, {}, T), B = Vd(r.horizontal), O = p / 24, q = i.tilePixelRatio * O, X = i.tilePixelRatio * k / 24, se = i.tilePixelRatio * m, Y = i.tilePixelRatio * E.get("symbol-spacing"), ie = E.get("text-padding") * i.tilePixelRatio, ue = function(ge, Ze, Ue, et = 1) {
|
7596
|
+
const At = ge.get("icon-padding").evaluate(Ze, {}, Ue), Pt = At && At.values;
|
7597
7597
|
return [Pt[0] * et, Pt[1] * et, Pt[2] * et, Pt[3] * et];
|
7598
7598
|
}(E, e, T, i.tilePixelRatio), ve = E.get("text-max-angle") / 180 * Math.PI, Le = E.get("text-rotation-alignment") !== "viewport" && E.get("symbol-placement") !== "point", Xe = E.get("icon-rotation-alignment") === "map" && E.get("symbol-placement") !== "point", Ee = E.get("symbol-placement"), Ae = Y / 2, je = E.get("icon-text-fit");
|
7599
7599
|
let Ve;
|
7600
7600
|
s && je !== "none" && (i.allowVerticalPlacement && r.vertical && (Ve = ld(s, r.vertical, je, E.get("icon-text-fit-padding"), D, O)), B && (s = ld(s, B, je, E.get("icon-text-fit-padding"), D, O)));
|
7601
7601
|
const Be = (ge, Ze) => {
|
7602
|
-
Ze.x < 0 || Ze.x >= ti || Ze.y < 0 || Ze.y >= ti || function(
|
7603
|
-
const hn =
|
7602
|
+
Ze.x < 0 || Ze.x >= ti || Ze.y < 0 || Ze.y >= ti || function(Ue, et, At, Pt, li, Cr, wi, Ht, Fi, Oi, Vi, Wt, ci, Ei, Si, Ni, Ti, fr, Xi, xt, zt, Ot, er, Gt, Zo) {
|
7603
|
+
const hn = Ue.addToLineVertexArray(et, At);
|
7604
7604
|
let un, Er, mr, ui, Mn = 0, pl = 0, jd = 0, qd = 0, jh = -1, qh = -1;
|
7605
7605
|
const zn = {};
|
7606
7606
|
let Zd = Lo("");
|
7607
|
-
if (
|
7607
|
+
if (Ue.allowVerticalPlacement && Pt.vertical) {
|
7608
7608
|
const Mi = Ht.layout.get("text-rotate").evaluate(zt, {}, Gt) + 90;
|
7609
7609
|
mr = new wc(Fi, et, Oi, Vi, Wt, Pt.vertical, ci, Ei, Si, Mi), wi && (ui = new wc(Fi, et, Oi, Vi, Wt, wi, Ti, fr, Si, Mi));
|
7610
7610
|
}
|
7611
7611
|
if (li) {
|
7612
7612
|
const Mi = Ht.layout.get("icon-rotate").evaluate(zt, {}), gr = Ht.layout.get("icon-text-fit") !== "none", Us = Dd(li, Mi, er, gr), jr = wi ? Dd(wi, Mi, er, gr) : void 0;
|
7613
7613
|
Er = new wc(Fi, et, Oi, Vi, Wt, li, Ti, fr, !1, Mi), Mn = 4 * Us.length;
|
7614
|
-
const js =
|
7614
|
+
const js = Ue.iconSizeData;
|
7615
7615
|
let dn = null;
|
7616
|
-
js.kind === "source" ? (dn = [cn * Ht.layout.get("icon-size").evaluate(zt, {})], dn[0] > is && di(`${
|
7616
|
+
js.kind === "source" ? (dn = [cn * Ht.layout.get("icon-size").evaluate(zt, {})], dn[0] > is && di(`${Ue.layerIds[0]}: Value for "icon-size" is >= ${cl}. Reduce your "icon-size".`)) : js.kind === "composite" && (dn = [cn * Ot.compositeIconSizes[0].evaluate(zt, {}, Gt), cn * Ot.compositeIconSizes[1].evaluate(zt, {}, Gt)], (dn[0] > is || dn[1] > is) && di(`${Ue.layerIds[0]}: Value for "icon-size" is >= ${cl}. Reduce your "icon-size".`)), Ue.addSymbols(Ue.icon, Us, dn, xt, Xi, zt, S.ai.none, et, hn.lineStartIndex, hn.lineLength, -1, Gt), jh = Ue.icon.placedSymbolArray.length - 1, jr && (pl = 4 * jr.length, Ue.addSymbols(Ue.icon, jr, dn, xt, Xi, zt, S.ai.vertical, et, hn.lineStartIndex, hn.lineLength, -1, Gt), qh = Ue.icon.placedSymbolArray.length - 1);
|
7617
7617
|
}
|
7618
7618
|
const Gd = Object.keys(Pt.horizontal);
|
7619
7619
|
for (const Mi of Gd) {
|
@@ -7624,15 +7624,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7624
7624
|
un = new wc(Fi, et, Oi, Vi, Wt, gr, ci, Ei, Si, jr);
|
7625
7625
|
}
|
7626
7626
|
const Us = gr.positionedLines.length === 1;
|
7627
|
-
if (jd += Od(
|
7627
|
+
if (jd += Od(Ue, et, gr, Cr, Ht, Si, zt, Ni, hn, Pt.vertical ? S.ai.horizontal : S.ai.horizontalOnly, Us ? Gd : [Mi], zn, jh, Ot, Gt), Us) break;
|
7628
7628
|
}
|
7629
|
-
Pt.vertical && (qd += Od(
|
7630
|
-
const zm = un ? un.boxStartIndex :
|
7629
|
+
Pt.vertical && (qd += Od(Ue, et, Pt.vertical, Cr, Ht, Si, zt, Ni, hn, S.ai.vertical, ["vertical"], zn, qh, Ot, Gt));
|
7630
|
+
const zm = un ? un.boxStartIndex : Ue.collisionBoxArray.length, Lm = un ? un.boxEndIndex : Ue.collisionBoxArray.length, Dm = mr ? mr.boxStartIndex : Ue.collisionBoxArray.length, Rm = mr ? mr.boxEndIndex : Ue.collisionBoxArray.length, Bm = Er ? Er.boxStartIndex : Ue.collisionBoxArray.length, Fm = Er ? Er.boxEndIndex : Ue.collisionBoxArray.length, Om = ui ? ui.boxStartIndex : Ue.collisionBoxArray.length, Vm = ui ? ui.boxEndIndex : Ue.collisionBoxArray.length;
|
7631
7631
|
let Ur = -1;
|
7632
7632
|
const Tc = (Mi, gr) => Mi && Mi.circleDiameter ? Math.max(Mi.circleDiameter, gr) : gr;
|
7633
7633
|
Ur = Tc(un, Ur), Ur = Tc(mr, Ur), Ur = Tc(Er, Ur), Ur = Tc(ui, Ur);
|
7634
7634
|
const Hd = Ur > -1 ? 1 : 0;
|
7635
|
-
Hd && (Ur *= Zo / si),
|
7635
|
+
Hd && (Ur *= Zo / si), Ue.glyphOffsetArray.length >= Uo.MAX_GLYPHS && di("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), zt.sortKey !== void 0 && Ue.addToSortKeyRanges(Ue.symbolInstances.length, zt.sortKey);
|
7636
7636
|
const Nm = Fd(Ht, zt, Gt), [$m, Um] = function(Mi, gr) {
|
7637
7637
|
const Us = Mi.length, jr = gr == null ? void 0 : gr.values;
|
7638
7638
|
if ((jr == null ? void 0 : jr.length) > 0) for (let js = 0; js < jr.length; js += 2) {
|
@@ -7640,13 +7640,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7640
7640
|
Mi.emplaceBack(S.ar[jr[js]], dn[0], dn[1]);
|
7641
7641
|
}
|
7642
7642
|
return [Us, Mi.length];
|
7643
|
-
}(
|
7644
|
-
|
7643
|
+
}(Ue.textAnchorOffsets, Nm);
|
7644
|
+
Ue.symbolInstances.emplaceBack(et.x, et.y, zn.right >= 0 ? zn.right : -1, zn.center >= 0 ? zn.center : -1, zn.left >= 0 ? zn.left : -1, zn.vertical || -1, jh, qh, Zd, zm, Lm, Dm, Rm, Bm, Fm, Om, Vm, Oi, jd, qd, Mn, pl, Hd, 0, ci, Ur, $m, Um);
|
7645
7645
|
}(i, Ze, ge, r, s, l, Ve, i.layers[0], i.collisionBoxArray, e.index, e.sourceLayerIndex, i.index, q, [ie, ie, ie, ie], Le, _, se, ue, Xe, D, e, d, v, T, p);
|
7646
7646
|
};
|
7647
7647
|
if (Ee === "line") for (const ge of Ad(e.geometry, 0, 0, ti, ti)) {
|
7648
7648
|
const Ze = Im(ge, Y, ve, r.vertical || B, s, 24, X, i.overscaling, ti);
|
7649
|
-
for (const
|
7649
|
+
for (const Ue of Ze) B && Em(i, B.text, Ae, Ue) || Be(ge, Ue);
|
7650
7650
|
}
|
7651
7651
|
else if (Ee === "line-center") {
|
7652
7652
|
for (const ge of e.geometry) if (ge.length > 1) {
|
@@ -7666,11 +7666,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7666
7666
|
for (const Ve of Y.positionedLines) for (const Be of Ve.positionedGlyphs) {
|
7667
7667
|
if (!Be.rect) continue;
|
7668
7668
|
const ge = Be.rect || {};
|
7669
|
-
let Ze = ed + 1,
|
7669
|
+
let Ze = ed + 1, Ue = !0, et = 1, At = 0;
|
7670
7670
|
const Pt = (ve || Ee) && Be.vertical, li = Be.metrics.advance * Be.scale / 2;
|
7671
7671
|
if (Ee && Y.verticalizable && (At = Ve.lineOffset / 2 - (Be.imageName ? -(si - Be.metrics.width * Be.scale) / 2 : (Be.scale - 1) * si)), Be.imageName) {
|
7672
7672
|
const xt = Xe[Be.imageName];
|
7673
|
-
|
7673
|
+
Ue = xt.sdf, et = xt.pixelRatio, Ze = Wi / et;
|
7674
7674
|
}
|
7675
7675
|
const Cr = ve ? [Be.x + li, Be.y] : [0, 0];
|
7676
7676
|
let wi = ve ? [0, 0] : [Be.x + li + ie[0], Be.y + ie[1] - At], Ht = [0, 0];
|
@@ -7685,7 +7685,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7685
7685
|
Ei._matMult(Ot), Si._matMult(Ot), Ni._matMult(Ot), Ti._matMult(Ot);
|
7686
7686
|
}
|
7687
7687
|
const fr = new oe(0, 0), Xi = new oe(0, 0);
|
7688
|
-
je.push({ tl: Ei, tr: Si, bl: Ni, br: Ti, tex: ge, writingMode: Y.writingMode, glyphOffset: Cr, sectionIndex: Be.sectionIndex, isSDF:
|
7688
|
+
je.push({ tl: Ei, tr: Si, bl: Ni, br: Ti, tex: ge, writingMode: Y.writingMode, glyphOffset: Cr, sectionIndex: Be.sectionIndex, isSDF: Ue, pixelOffsetTL: fr, pixelOffsetBR: Xi, minFontScaleX: 0, minFontScaleY: 0 });
|
7689
7689
|
}
|
7690
7690
|
return je;
|
7691
7691
|
}(0, r, m, l, d, p, s, i.allowVerticalPlacement), q = i.textSizeData;
|
@@ -7904,8 +7904,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
7904
7904
|
}
|
7905
7905
|
return r;
|
7906
7906
|
}, S.N = rs, S.O = _d, S.P = oe, S.Q = yd, S.R = dr, S.S = pr, S.T = Wn, S.U = gt, S.V = ot, S.W = pn, S.X = ti, S.Y = w, S.Z = yc, S._ = c, S.a = Wr, S.a$ = function(i, e) {
|
7907
|
-
var r = i[0], s = i[1], l = i[2], d = i[3], p = i[4], m = i[5], _ = i[6], v = i[7], T = i[8], k = i[9], E = i[10], D = i[11], B = i[12], O = i[13], q = i[14], X = i[15], se = e[0], Y = e[1], ie = e[2], ue = e[3], ve = e[4], Le = e[5], Xe = e[6], Ee = e[7], Ae = e[8], je = e[9], Ve = e[10], Be = e[11], ge = e[12], Ze = e[13],
|
7908
|
-
return Math.abs(r - se) <= Bi * Math.max(1, Math.abs(r), Math.abs(se)) && Math.abs(s - Y) <= Bi * Math.max(1, Math.abs(s), Math.abs(Y)) && Math.abs(l - ie) <= Bi * Math.max(1, Math.abs(l), Math.abs(ie)) && Math.abs(d - ue) <= Bi * Math.max(1, Math.abs(d), Math.abs(ue)) && Math.abs(p - ve) <= Bi * Math.max(1, Math.abs(p), Math.abs(ve)) && Math.abs(m - Le) <= Bi * Math.max(1, Math.abs(m), Math.abs(Le)) && Math.abs(_ - Xe) <= Bi * Math.max(1, Math.abs(_), Math.abs(Xe)) && Math.abs(v - Ee) <= Bi * Math.max(1, Math.abs(v), Math.abs(Ee)) && Math.abs(T - Ae) <= Bi * Math.max(1, Math.abs(T), Math.abs(Ae)) && Math.abs(k - je) <= Bi * Math.max(1, Math.abs(k), Math.abs(je)) && Math.abs(E - Ve) <= Bi * Math.max(1, Math.abs(E), Math.abs(Ve)) && Math.abs(D - Be) <= Bi * Math.max(1, Math.abs(D), Math.abs(Be)) && Math.abs(B - ge) <= Bi * Math.max(1, Math.abs(B), Math.abs(ge)) && Math.abs(O - Ze) <= Bi * Math.max(1, Math.abs(O), Math.abs(Ze)) && Math.abs(q -
|
7907
|
+
var r = i[0], s = i[1], l = i[2], d = i[3], p = i[4], m = i[5], _ = i[6], v = i[7], T = i[8], k = i[9], E = i[10], D = i[11], B = i[12], O = i[13], q = i[14], X = i[15], se = e[0], Y = e[1], ie = e[2], ue = e[3], ve = e[4], Le = e[5], Xe = e[6], Ee = e[7], Ae = e[8], je = e[9], Ve = e[10], Be = e[11], ge = e[12], Ze = e[13], Ue = e[14], et = e[15];
|
7908
|
+
return Math.abs(r - se) <= Bi * Math.max(1, Math.abs(r), Math.abs(se)) && Math.abs(s - Y) <= Bi * Math.max(1, Math.abs(s), Math.abs(Y)) && Math.abs(l - ie) <= Bi * Math.max(1, Math.abs(l), Math.abs(ie)) && Math.abs(d - ue) <= Bi * Math.max(1, Math.abs(d), Math.abs(ue)) && Math.abs(p - ve) <= Bi * Math.max(1, Math.abs(p), Math.abs(ve)) && Math.abs(m - Le) <= Bi * Math.max(1, Math.abs(m), Math.abs(Le)) && Math.abs(_ - Xe) <= Bi * Math.max(1, Math.abs(_), Math.abs(Xe)) && Math.abs(v - Ee) <= Bi * Math.max(1, Math.abs(v), Math.abs(Ee)) && Math.abs(T - Ae) <= Bi * Math.max(1, Math.abs(T), Math.abs(Ae)) && Math.abs(k - je) <= Bi * Math.max(1, Math.abs(k), Math.abs(je)) && Math.abs(E - Ve) <= Bi * Math.max(1, Math.abs(E), Math.abs(Ve)) && Math.abs(D - Be) <= Bi * Math.max(1, Math.abs(D), Math.abs(Be)) && Math.abs(B - ge) <= Bi * Math.max(1, Math.abs(B), Math.abs(ge)) && Math.abs(O - Ze) <= Bi * Math.max(1, Math.abs(O), Math.abs(Ze)) && Math.abs(q - Ue) <= Bi * Math.max(1, Math.abs(q), Math.abs(Ue)) && Math.abs(X - et) <= Bi * Math.max(1, Math.abs(X), Math.abs(et));
|
7909
7909
|
}, S.a0 = ni, S.a1 = Lh, S.a2 = Te, S.a3 = (i) => {
|
7910
7910
|
const e = window.document.createElement("video");
|
7911
7911
|
return e.muted = !0, new Promise((r) => {
|
@@ -8215,16 +8215,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8215
8215
|
}, S.o = el, S.p = td, S.q = o, S.r = Qc, S.s = mn, S.t = Na, S.u = Me, S.v = he, S.w = di, S.x = Nr, S.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
|
}, S.z = Zi;
|
8218
|
-
}),
|
8218
|
+
}), z("worker", ["./shared"], function(S) {
|
8219
8219
|
class c {
|
8220
|
-
constructor(
|
8221
|
-
this.keyCache = {},
|
8220
|
+
constructor(L) {
|
8221
|
+
this.keyCache = {}, L && this.replace(L);
|
8222
8222
|
}
|
8223
|
-
replace(
|
8224
|
-
this._layerConfigs = {}, this._layers = {}, this.update(
|
8223
|
+
replace(L) {
|
8224
|
+
this._layerConfigs = {}, this._layers = {}, this.update(L, []);
|
8225
8225
|
}
|
8226
|
-
update(
|
8227
|
-
for (const Z of
|
8226
|
+
update(L, M) {
|
8227
|
+
for (const Z of L) {
|
8228
8228
|
this._layerConfigs[Z.id] = Z;
|
8229
8229
|
const Q = this._layers[Z.id] = S.aB(Z);
|
8230
8230
|
Q._featureFilter = S.a7(Q.filter), this.keyCache[Z.id] && delete this.keyCache[Z.id];
|
@@ -8245,10 +8245,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8245
8245
|
}
|
8246
8246
|
}
|
8247
8247
|
class pe {
|
8248
|
-
constructor(
|
8248
|
+
constructor(L) {
|
8249
8249
|
const M = {}, V = [];
|
8250
|
-
for (const re in
|
8251
|
-
const J =
|
8250
|
+
for (const re in L) {
|
8251
|
+
const J = L[re], de = M[re] = {};
|
8252
8252
|
for (const ye in J) {
|
8253
8253
|
const ce = J[+ye];
|
8254
8254
|
if (!ce || ce.bitmap.width === 0 || ce.bitmap.height === 0) continue;
|
@@ -8257,8 +8257,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8257
8257
|
}
|
8258
8258
|
}
|
8259
8259
|
const { w: Z, h: Q } = S.p(V), te = new S.o({ width: Z || 1, height: Q || 1 });
|
8260
|
-
for (const re in
|
8261
|
-
const J =
|
8260
|
+
for (const re in L) {
|
8261
|
+
const J = L[re];
|
8262
8262
|
for (const de in J) {
|
8263
8263
|
const ye = J[+de];
|
8264
8264
|
if (!ye || ye.bitmap.width === 0 || ye.bitmap.height === 0) continue;
|
@@ -8271,17 +8271,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8271
8271
|
}
|
8272
8272
|
S.bk("GlyphAtlas", pe);
|
8273
8273
|
class fe {
|
8274
|
-
constructor(
|
8275
|
-
this.tileID = new S.S(
|
8274
|
+
constructor(L) {
|
8275
|
+
this.tileID = new S.S(L.tileID.overscaledZ, L.tileID.wrap, L.tileID.canonical.z, L.tileID.canonical.x, L.tileID.canonical.y), this.uid = L.uid, this.zoom = L.zoom, this.pixelRatio = L.pixelRatio, this.tileSize = L.tileSize, this.source = L.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = L.showCollisionBoxes, this.collectResourceTiming = !!L.collectResourceTiming, this.returnDependencies = !!L.returnDependencies, this.promoteId = L.promoteId, this.inFlightDependencies = [];
|
8276
8276
|
}
|
8277
|
-
parse(
|
8277
|
+
parse(L, M, V, Z) {
|
8278
8278
|
return S._(this, void 0, void 0, function* () {
|
8279
|
-
this.status = "parsing", this.data =
|
8280
|
-
const Q = new S.bl(Object.keys(
|
8279
|
+
this.status = "parsing", this.data = L, this.collisionBoxArray = new S.a5();
|
8280
|
+
const Q = new S.bl(Object.keys(L.layers).sort()), te = new S.bm(this.tileID, this.promoteId);
|
8281
8281
|
te.bucketLayerIDs = [];
|
8282
8282
|
const re = {}, J = { featureIndex: te, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: V }, de = M.familiesBySource[this.source];
|
8283
8283
|
for (const ct in de) {
|
8284
|
-
const wt =
|
8284
|
+
const wt = L.layers[ct];
|
8285
8285
|
if (!wt) continue;
|
8286
8286
|
wt.version === 1 && S.w(`Vector tile source "${this.source}" layer "${ct}" does not use vector tile spec v2 and therefore may have some rendering errors.`);
|
8287
8287
|
const Nt = Q.encode(ct), ri = [];
|
@@ -8322,34 +8322,34 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8322
8322
|
});
|
8323
8323
|
}
|
8324
8324
|
}
|
8325
|
-
function xe(H,
|
8326
|
-
const V = new S.a9(
|
8325
|
+
function xe(H, L, M) {
|
8326
|
+
const V = new S.a9(L);
|
8327
8327
|
for (const Z of H) Z.recalculate(V, M);
|
8328
8328
|
}
|
8329
8329
|
class oe {
|
8330
|
-
constructor(
|
8331
|
-
this.actor =
|
8330
|
+
constructor(L, M, V) {
|
8331
|
+
this.actor = L, this.layerIndex = M, this.availableImages = V, this.fetching = {}, this.loading = {}, this.loaded = {};
|
8332
8332
|
}
|
8333
|
-
loadVectorTile(
|
8333
|
+
loadVectorTile(L, M) {
|
8334
8334
|
return S._(this, void 0, void 0, function* () {
|
8335
|
-
const V = yield S.l(
|
8335
|
+
const V = yield S.l(L.request, M);
|
8336
8336
|
try {
|
8337
8337
|
return { vectorTile: new S.bs.VectorTile(new S.bt(V.data)), rawData: V.data, cacheControl: V.cacheControl, expires: V.expires };
|
8338
8338
|
} catch (Z) {
|
8339
8339
|
const Q = new Uint8Array(V.data);
|
8340
|
-
let te = `Unable to parse the tile at ${
|
8340
|
+
let te = `Unable to parse the tile at ${L.request.url}, `;
|
8341
8341
|
throw te += Q[0] === 31 && Q[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${Z.message}`, new Error(te);
|
8342
8342
|
}
|
8343
8343
|
});
|
8344
8344
|
}
|
8345
|
-
loadTile(
|
8345
|
+
loadTile(L) {
|
8346
8346
|
return S._(this, void 0, void 0, function* () {
|
8347
|
-
const M =
|
8347
|
+
const M = L.uid, V = !!(L && L.request && L.request.collectResourceTiming) && new S.bu(L.request), Z = new fe(L);
|
8348
8348
|
this.loading[M] = Z;
|
8349
8349
|
const Q = new AbortController();
|
8350
8350
|
Z.abort = Q;
|
8351
8351
|
try {
|
8352
|
-
const te = yield this.loadVectorTile(
|
8352
|
+
const te = yield this.loadVectorTile(L, Q);
|
8353
8353
|
if (delete this.loading[M], !te) return null;
|
8354
8354
|
const re = te.rawData, J = {};
|
8355
8355
|
te.expires && (J.expires = te.expires), te.cacheControl && (J.cacheControl = te.cacheControl);
|
@@ -8372,12 +8372,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8372
8372
|
}
|
8373
8373
|
});
|
8374
8374
|
}
|
8375
|
-
reloadTile(
|
8375
|
+
reloadTile(L) {
|
8376
8376
|
return S._(this, void 0, void 0, function* () {
|
8377
|
-
const M =
|
8377
|
+
const M = L.uid;
|
8378
8378
|
if (!this.loaded || !this.loaded[M]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
|
8379
8379
|
const V = this.loaded[M];
|
8380
|
-
if (V.showCollisionBoxes =
|
8380
|
+
if (V.showCollisionBoxes = L.showCollisionBoxes, V.status === "parsing") {
|
8381
8381
|
const Z = yield V.parse(V.vectorTile, this.layerIndex, this.availableImages, this.actor);
|
8382
8382
|
let Q;
|
8383
8383
|
if (this.fetching[M]) {
|
@@ -8389,15 +8389,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8389
8389
|
if (V.status === "done" && V.vectorTile) return V.parse(V.vectorTile, this.layerIndex, this.availableImages, this.actor);
|
8390
8390
|
});
|
8391
8391
|
}
|
8392
|
-
abortTile(
|
8392
|
+
abortTile(L) {
|
8393
8393
|
return S._(this, void 0, void 0, function* () {
|
8394
|
-
const M = this.loading, V =
|
8394
|
+
const M = this.loading, V = L.uid;
|
8395
8395
|
M && M[V] && M[V].abort && (M[V].abort.abort(), delete M[V]);
|
8396
8396
|
});
|
8397
8397
|
}
|
8398
|
-
removeTile(
|
8398
|
+
removeTile(L) {
|
8399
8399
|
return S._(this, void 0, void 0, function* () {
|
8400
|
-
this.loaded && this.loaded[
|
8400
|
+
this.loaded && this.loaded[L.uid] && delete this.loaded[L.uid];
|
8401
8401
|
});
|
8402
8402
|
}
|
8403
8403
|
}
|
@@ -8405,125 +8405,125 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8405
8405
|
constructor() {
|
8406
8406
|
this.loaded = {};
|
8407
8407
|
}
|
8408
|
-
loadTile(
|
8408
|
+
loadTile(L) {
|
8409
8409
|
return S._(this, void 0, void 0, function* () {
|
8410
|
-
const { uid: M, encoding: V, rawImageData: Z, redFactor: Q, greenFactor: te, blueFactor: re, baseShift: J } =
|
8410
|
+
const { uid: M, encoding: V, rawImageData: Z, redFactor: Q, greenFactor: te, blueFactor: re, baseShift: J } = L, de = Z.width + 2, ye = Z.height + 2, ce = S.b(Z) ? new S.R({ width: de, height: ye }, yield S.bv(Z, -1, -1, de, ye)) : Z, Ie = new S.bw(M, ce, V, Q, te, re, J);
|
8411
8411
|
return this.loaded = this.loaded || {}, this.loaded[M] = Ie, Ie;
|
8412
8412
|
});
|
8413
8413
|
}
|
8414
|
-
removeTile(
|
8415
|
-
const M = this.loaded, V =
|
8414
|
+
removeTile(L) {
|
8415
|
+
const M = this.loaded, V = L.uid;
|
8416
8416
|
M && M[V] && delete M[V];
|
8417
8417
|
}
|
8418
8418
|
}
|
8419
|
-
function
|
8419
|
+
function ut(H, L) {
|
8420
8420
|
if (H.length !== 0) {
|
8421
|
-
|
8422
|
-
for (var M = 1; M < H.length; M++)
|
8421
|
+
$e(H[0], L);
|
8422
|
+
for (var M = 1; M < H.length; M++) $e(H[M], !L);
|
8423
8423
|
}
|
8424
8424
|
}
|
8425
|
-
function
|
8425
|
+
function $e(H, L) {
|
8426
8426
|
for (var M = 0, V = 0, Z = 0, Q = H.length, te = Q - 1; Z < Q; te = Z++) {
|
8427
8427
|
var re = (H[Z][0] - H[te][0]) * (H[te][1] + H[Z][1]), J = M + re;
|
8428
8428
|
V += Math.abs(M) >= Math.abs(re) ? M - J + re : re - J + M, M = J;
|
8429
8429
|
}
|
8430
|
-
M + V >= 0 != !!
|
8430
|
+
M + V >= 0 != !!L && H.reverse();
|
8431
8431
|
}
|
8432
|
-
var Ke = S.bx(function H(
|
8433
|
-
var V, Z =
|
8434
|
-
if (Z === "FeatureCollection") for (V = 0; V <
|
8435
|
-
else if (Z === "GeometryCollection") for (V = 0; V <
|
8436
|
-
else if (Z === "Feature") H(
|
8437
|
-
else if (Z === "Polygon")
|
8438
|
-
else if (Z === "MultiPolygon") for (V = 0; V <
|
8439
|
-
return
|
8432
|
+
var Ke = S.bx(function H(L, M) {
|
8433
|
+
var V, Z = L && L.type;
|
8434
|
+
if (Z === "FeatureCollection") for (V = 0; V < L.features.length; V++) H(L.features[V], M);
|
8435
|
+
else if (Z === "GeometryCollection") for (V = 0; V < L.geometries.length; V++) H(L.geometries[V], M);
|
8436
|
+
else if (Z === "Feature") H(L.geometry, M);
|
8437
|
+
else if (Z === "Polygon") ut(L.coordinates, M);
|
8438
|
+
else if (Z === "MultiPolygon") for (V = 0; V < L.coordinates.length; V++) ut(L.coordinates[V], M);
|
8439
|
+
return L;
|
8440
8440
|
});
|
8441
8441
|
const Oe = S.bs.VectorTileFeature.prototype.toGeoJSON;
|
8442
8442
|
var gt = { exports: {} }, ot = S.by, He = S.bs.VectorTileFeature, Vt = Tt;
|
8443
|
-
function Tt(H,
|
8444
|
-
this.options =
|
8443
|
+
function Tt(H, L) {
|
8444
|
+
this.options = L || {}, this.features = H, this.length = H.length;
|
8445
8445
|
}
|
8446
|
-
function Jt(H,
|
8447
|
-
this.id = typeof H.id == "number" ? H.id : void 0, this.type = H.type, this.rawGeometry = H.type === 1 ? [H.geometry] : H.geometry, this.properties = H.tags, this.extent =
|
8446
|
+
function Jt(H, L) {
|
8447
|
+
this.id = typeof H.id == "number" ? H.id : void 0, this.type = H.type, this.rawGeometry = H.type === 1 ? [H.geometry] : H.geometry, this.properties = H.tags, this.extent = L || 4096;
|
8448
8448
|
}
|
8449
8449
|
Tt.prototype.feature = function(H) {
|
8450
8450
|
return new Jt(this.features[H], this.options.extent);
|
8451
8451
|
}, Jt.prototype.loadGeometry = function() {
|
8452
8452
|
var H = this.rawGeometry;
|
8453
8453
|
this.geometry = [];
|
8454
|
-
for (var
|
8455
|
-
for (var M = H[
|
8454
|
+
for (var L = 0; L < H.length; L++) {
|
8455
|
+
for (var M = H[L], V = [], Z = 0; Z < M.length; Z++) V.push(new ot(M[Z][0], M[Z][1]));
|
8456
8456
|
this.geometry.push(V);
|
8457
8457
|
}
|
8458
8458
|
return this.geometry;
|
8459
8459
|
}, Jt.prototype.bbox = function() {
|
8460
8460
|
this.geometry || this.loadGeometry();
|
8461
|
-
for (var H = this.geometry,
|
8461
|
+
for (var H = this.geometry, L = 1 / 0, M = -1 / 0, V = 1 / 0, Z = -1 / 0, Q = 0; Q < H.length; Q++) for (var te = H[Q], re = 0; re < te.length; re++) {
|
8462
8462
|
var J = te[re];
|
8463
|
-
|
8463
|
+
L = Math.min(L, J.x), M = Math.max(M, J.x), V = Math.min(V, J.y), Z = Math.max(Z, J.y);
|
8464
8464
|
}
|
8465
|
-
return [
|
8465
|
+
return [L, V, M, Z];
|
8466
8466
|
}, Jt.prototype.toGeoJSON = He.prototype.toGeoJSON;
|
8467
8467
|
var jt = S.bz, Gr = Vt;
|
8468
8468
|
function Ii(H) {
|
8469
|
-
var
|
8469
|
+
var L = new jt();
|
8470
8470
|
return function(M, V) {
|
8471
8471
|
for (var Z in M.layers) V.writeMessage(3, Hr, M.layers[Z]);
|
8472
|
-
}(H,
|
8472
|
+
}(H, L), L.finish();
|
8473
8473
|
}
|
8474
|
-
function Hr(H,
|
8474
|
+
function Hr(H, L) {
|
8475
8475
|
var M;
|
8476
|
-
|
8476
|
+
L.writeVarintField(15, H.version || 1), L.writeStringField(1, H.name || ""), L.writeVarintField(5, H.extent || 4096);
|
8477
8477
|
var V = { keys: [], values: [], keycache: {}, valuecache: {} };
|
8478
|
-
for (M = 0; M < H.length; M++) V.feature = H.feature(M),
|
8478
|
+
for (M = 0; M < H.length; M++) V.feature = H.feature(M), L.writeMessage(2, It, V);
|
8479
8479
|
var Z = V.keys;
|
8480
|
-
for (M = 0; M < Z.length; M++)
|
8480
|
+
for (M = 0; M < Z.length; M++) L.writeStringField(3, Z[M]);
|
8481
8481
|
var Q = V.values;
|
8482
|
-
for (M = 0; M < Q.length; M++)
|
8482
|
+
for (M = 0; M < Q.length; M++) L.writeMessage(4, Ln, Q[M]);
|
8483
8483
|
}
|
8484
|
-
function It(H,
|
8484
|
+
function It(H, L) {
|
8485
8485
|
var M = H.feature;
|
8486
|
-
M.id !== void 0 &&
|
8486
|
+
M.id !== void 0 && L.writeVarintField(1, M.id), L.writeMessage(2, Js, H), L.writeVarintField(3, M.type), L.writeMessage(4, zr, M);
|
8487
8487
|
}
|
8488
|
-
function Js(H,
|
8488
|
+
function Js(H, L) {
|
8489
8489
|
var M = H.feature, V = H.keys, Z = H.values, Q = H.keycache, te = H.valuecache;
|
8490
8490
|
for (var re in M.properties) {
|
8491
8491
|
var J = M.properties[re], de = Q[re];
|
8492
8492
|
if (J !== null) {
|
8493
|
-
de === void 0 && (V.push(re), Q[re] = de = V.length - 1),
|
8493
|
+
de === void 0 && (V.push(re), Q[re] = de = V.length - 1), L.writeVarint(de);
|
8494
8494
|
var ye = typeof J;
|
8495
8495
|
ye !== "string" && ye !== "boolean" && ye !== "number" && (J = JSON.stringify(J));
|
8496
8496
|
var ce = ye + ":" + J, Ie = te[ce];
|
8497
|
-
Ie === void 0 && (Z.push(J), te[ce] = Ie = Z.length - 1),
|
8497
|
+
Ie === void 0 && (Z.push(J), te[ce] = Ie = Z.length - 1), L.writeVarint(Ie);
|
8498
8498
|
}
|
8499
8499
|
}
|
8500
8500
|
}
|
8501
|
-
function di(H,
|
8502
|
-
return (
|
8501
|
+
function di(H, L) {
|
8502
|
+
return (L << 3) + (7 & H);
|
8503
8503
|
}
|
8504
8504
|
function ki(H) {
|
8505
8505
|
return H << 1 ^ H >> 31;
|
8506
8506
|
}
|
8507
|
-
function zr(H,
|
8507
|
+
function zr(H, L) {
|
8508
8508
|
for (var M = H.loadGeometry(), V = H.type, Z = 0, Q = 0, te = M.length, re = 0; re < te; re++) {
|
8509
8509
|
var J = M[re], de = 1;
|
8510
|
-
V === 1 && (de = J.length),
|
8510
|
+
V === 1 && (de = J.length), L.writeVarint(di(1, de));
|
8511
8511
|
for (var ye = V === 3 ? J.length - 1 : J.length, ce = 0; ce < ye; ce++) {
|
8512
|
-
ce === 1 && V !== 1 &&
|
8512
|
+
ce === 1 && V !== 1 && L.writeVarint(di(2, ye - 1));
|
8513
8513
|
var Ie = J[ce].x - Z, Ge = J[ce].y - Q;
|
8514
|
-
|
8514
|
+
L.writeVarint(ki(Ie)), L.writeVarint(ki(Ge)), Z += Ie, Q += Ge;
|
8515
8515
|
}
|
8516
|
-
V === 3 &&
|
8516
|
+
V === 3 && L.writeVarint(di(7, 1));
|
8517
8517
|
}
|
8518
8518
|
}
|
8519
|
-
function Ln(H,
|
8519
|
+
function Ln(H, L) {
|
8520
8520
|
var M = typeof H;
|
8521
|
-
M === "string" ?
|
8521
|
+
M === "string" ? L.writeStringField(1, H) : M === "boolean" ? L.writeBooleanField(7, H) : M === "number" && (H % 1 != 0 ? L.writeDoubleField(3, H) : H < 0 ? L.writeSVarintField(6, H) : L.writeVarintField(5, H));
|
8522
8522
|
}
|
8523
|
-
gt.exports = Ii, gt.exports.fromVectorTileJs = Ii, gt.exports.fromGeojsonVt = function(H,
|
8524
|
-
|
8523
|
+
gt.exports = Ii, gt.exports.fromVectorTileJs = Ii, gt.exports.fromGeojsonVt = function(H, L) {
|
8524
|
+
L = L || {};
|
8525
8525
|
var M = {};
|
8526
|
-
for (var V in H) M[V] = new Gr(H[V].features,
|
8526
|
+
for (var V in H) M[V] = new Gr(H[V].features, L), M[V].name = V, M[V].version = L.version, M[V].extent = L.extent;
|
8527
8527
|
return Ii({ layers: M });
|
8528
8528
|
}, gt.exports.GeoJSONWrapper = Gr;
|
8529
8529
|
var xr = S.bx(gt.exports);
|
@@ -8531,17 +8531,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8531
8531
|
var Lr;
|
8532
8532
|
const zi = 3, nr = 5, Dn = 6;
|
8533
8533
|
class Wr {
|
8534
|
-
constructor(
|
8535
|
-
this.options = Object.assign(Object.create(Ks),
|
8534
|
+
constructor(L) {
|
8535
|
+
this.options = Object.assign(Object.create(Ks), L), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
|
8536
8536
|
}
|
8537
|
-
load(
|
8537
|
+
load(L) {
|
8538
8538
|
const { log: M, minZoom: V, maxZoom: Z } = this.options;
|
8539
8539
|
M && console.time("total time");
|
8540
|
-
const Q = `prepare ${
|
8541
|
-
M && console.time(Q), this.points =
|
8540
|
+
const Q = `prepare ${L.length} points`;
|
8541
|
+
M && console.time(Q), this.points = L;
|
8542
8542
|
const te = [];
|
8543
|
-
for (let J = 0; J <
|
8544
|
-
const de =
|
8543
|
+
for (let J = 0; J < L.length; J++) {
|
8544
|
+
const de = L[J];
|
8545
8545
|
if (!de.geometry) continue;
|
8546
8546
|
const [ye, ce] = de.geometry.coordinates, Ie = pn($i(ye)), Ge = pn(sr(ce));
|
8547
8547
|
te.push(Ie, Ge, 1 / 0, J, -1, 1), this.options.reduce && te.push(0);
|
@@ -8554,12 +8554,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8554
8554
|
}
|
8555
8555
|
return M && console.timeEnd("total time"), this;
|
8556
8556
|
}
|
8557
|
-
getClusters(
|
8558
|
-
let V = ((
|
8559
|
-
const Z = Math.max(-90, Math.min(90,
|
8560
|
-
let Q =
|
8561
|
-
const te = Math.max(-90, Math.min(90,
|
8562
|
-
if (
|
8557
|
+
getClusters(L, M) {
|
8558
|
+
let V = ((L[0] + 180) % 360 + 360) % 360 - 180;
|
8559
|
+
const Z = Math.max(-90, Math.min(90, L[1]));
|
8560
|
+
let Q = L[2] === 180 ? 180 : ((L[2] + 180) % 360 + 360) % 360 - 180;
|
8561
|
+
const te = Math.max(-90, Math.min(90, L[3]));
|
8562
|
+
if (L[2] - L[0] >= 360) V = -180, Q = 180;
|
8563
8563
|
else if (V > Q) {
|
8564
8564
|
const ce = this.getClusters([V, Z, 180, te], M), Ie = this.getClusters([-180, Z, Q, te], M);
|
8565
8565
|
return ce.concat(Ie);
|
@@ -8571,51 +8571,51 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8571
8571
|
}
|
8572
8572
|
return ye;
|
8573
8573
|
}
|
8574
|
-
getChildren(
|
8575
|
-
const M = this._getOriginId(
|
8574
|
+
getChildren(L) {
|
8575
|
+
const M = this._getOriginId(L), V = this._getOriginZoom(L), Z = "No cluster with the specified id.", Q = this.trees[V];
|
8576
8576
|
if (!Q) throw new Error(Z);
|
8577
8577
|
const te = Q.data;
|
8578
8578
|
if (M * this.stride >= te.length) throw new Error(Z);
|
8579
8579
|
const re = this.options.radius / (this.options.extent * Math.pow(2, V - 1)), J = Q.within(te[M * this.stride], te[M * this.stride + 1], re), de = [];
|
8580
8580
|
for (const ye of J) {
|
8581
8581
|
const ce = ye * this.stride;
|
8582
|
-
te[ce + 4] ===
|
8582
|
+
te[ce + 4] === L && de.push(te[ce + nr] > 1 ? vr(te, ce, this.clusterProps) : this.points[te[ce + zi]]);
|
8583
8583
|
}
|
8584
8584
|
if (de.length === 0) throw new Error(Z);
|
8585
8585
|
return de;
|
8586
8586
|
}
|
8587
|
-
getLeaves(
|
8587
|
+
getLeaves(L, M, V) {
|
8588
8588
|
const Z = [];
|
8589
|
-
return this._appendLeaves(Z,
|
8589
|
+
return this._appendLeaves(Z, L, M = M || 10, V = V || 0, 0), Z;
|
8590
8590
|
}
|
8591
|
-
getTile(
|
8592
|
-
const Z = this.trees[this._limitZoom(
|
8591
|
+
getTile(L, M, V) {
|
8592
|
+
const Z = this.trees[this._limitZoom(L)], Q = Math.pow(2, L), { extent: te, radius: re } = this.options, J = re / te, de = (V - J) / Q, ye = (V + 1 + J) / Q, ce = { features: [] };
|
8593
8593
|
return this._addTileFeatures(Z.range((M - J) / Q, de, (M + 1 + J) / Q, ye), Z.data, M, V, Q, ce), M === 0 && this._addTileFeatures(Z.range(1 - J / Q, de, 1, ye), Z.data, Q, V, Q, ce), M === Q - 1 && this._addTileFeatures(Z.range(0, de, J / Q, ye), Z.data, -1, V, Q, ce), ce.features.length ? ce : null;
|
8594
8594
|
}
|
8595
|
-
getClusterExpansionZoom(
|
8596
|
-
let M = this._getOriginZoom(
|
8595
|
+
getClusterExpansionZoom(L) {
|
8596
|
+
let M = this._getOriginZoom(L) - 1;
|
8597
8597
|
for (; M <= this.options.maxZoom; ) {
|
8598
|
-
const V = this.getChildren(
|
8598
|
+
const V = this.getChildren(L);
|
8599
8599
|
if (M++, V.length !== 1) break;
|
8600
|
-
|
8600
|
+
L = V[0].properties.cluster_id;
|
8601
8601
|
}
|
8602
8602
|
return M;
|
8603
8603
|
}
|
8604
|
-
_appendLeaves(
|
8604
|
+
_appendLeaves(L, M, V, Z, Q) {
|
8605
8605
|
const te = this.getChildren(M);
|
8606
8606
|
for (const re of te) {
|
8607
8607
|
const J = re.properties;
|
8608
|
-
if (J && J.cluster ? Q + J.point_count <= Z ? Q += J.point_count : Q = this._appendLeaves(
|
8608
|
+
if (J && J.cluster ? Q + J.point_count <= Z ? Q += J.point_count : Q = this._appendLeaves(L, J.cluster_id, V, Z, Q) : Q < Z ? Q++ : L.push(re), L.length === V) break;
|
8609
8609
|
}
|
8610
8610
|
return Q;
|
8611
8611
|
}
|
8612
|
-
_createTree(
|
8613
|
-
const M = new S.aw(
|
8614
|
-
for (let V = 0; V <
|
8615
|
-
return M.finish(), M.data =
|
8612
|
+
_createTree(L) {
|
8613
|
+
const M = new S.aw(L.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
8614
|
+
for (let V = 0; V < L.length; V += this.stride) M.add(L[V], L[V + 1]);
|
8615
|
+
return M.finish(), M.data = L, M;
|
8616
8616
|
}
|
8617
|
-
_addTileFeatures(
|
8618
|
-
for (const re of
|
8617
|
+
_addTileFeatures(L, M, V, Z, Q, te) {
|
8618
|
+
for (const re of L) {
|
8619
8619
|
const J = re * this.stride, de = M[J + nr] > 1;
|
8620
8620
|
let ye, ce, Ie;
|
8621
8621
|
if (de) ye = Rn(M, J, this.clusterProps), ce = M[J], Ie = M[J + 1];
|
@@ -8630,15 +8630,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8630
8630
|
We = de || this.options.generateId ? M[J + zi] : this.points[M[J + zi]].id, We !== void 0 && (Ge.id = We), te.features.push(Ge);
|
8631
8631
|
}
|
8632
8632
|
}
|
8633
|
-
_limitZoom(
|
8634
|
-
return Math.max(this.options.minZoom, Math.min(Math.floor(+
|
8633
|
+
_limitZoom(L) {
|
8634
|
+
return Math.max(this.options.minZoom, Math.min(Math.floor(+L), this.options.maxZoom + 1));
|
8635
8635
|
}
|
8636
|
-
_cluster(
|
8637
|
-
const { radius: V, extent: Z, reduce: Q, minPoints: te } = this.options, re = V / (Z * Math.pow(2, M)), J =
|
8636
|
+
_cluster(L, M) {
|
8637
|
+
const { radius: V, extent: Z, reduce: Q, minPoints: te } = this.options, re = V / (Z * Math.pow(2, M)), J = L.data, de = [], ye = this.stride;
|
8638
8638
|
for (let ce = 0; ce < J.length; ce += ye) {
|
8639
8639
|
if (J[ce + 2] <= M) continue;
|
8640
8640
|
J[ce + 2] = M;
|
8641
|
-
const Ie = J[ce], Ge = J[ce + 1], We =
|
8641
|
+
const Ie = J[ce], Ge = J[ce + 1], We = L.within(J[ce], J[ce + 1], re), st = J[ce + nr];
|
8642
8642
|
let _t = st;
|
8643
8643
|
for (const nt of We) {
|
8644
8644
|
const Ct = nt * ye;
|
@@ -8668,46 +8668,46 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8668
8668
|
}
|
8669
8669
|
return de;
|
8670
8670
|
}
|
8671
|
-
_getOriginId(
|
8672
|
-
return
|
8671
|
+
_getOriginId(L) {
|
8672
|
+
return L - this.points.length >> 5;
|
8673
8673
|
}
|
8674
|
-
_getOriginZoom(
|
8675
|
-
return (
|
8674
|
+
_getOriginZoom(L) {
|
8675
|
+
return (L - this.points.length) % 32;
|
8676
8676
|
}
|
8677
|
-
_map(
|
8678
|
-
if (
|
8679
|
-
const te = this.clusterProps[
|
8677
|
+
_map(L, M, V) {
|
8678
|
+
if (L[M + nr] > 1) {
|
8679
|
+
const te = this.clusterProps[L[M + Dn]];
|
8680
8680
|
return V ? Object.assign({}, te) : te;
|
8681
8681
|
}
|
8682
|
-
const Z = this.points[
|
8682
|
+
const Z = this.points[L[M + zi]].properties, Q = this.options.map(Z);
|
8683
8683
|
return V && Q === Z ? Object.assign({}, Q) : Q;
|
8684
8684
|
}
|
8685
8685
|
}
|
8686
|
-
function vr(H,
|
8687
|
-
return { type: "Feature", id: H[
|
8686
|
+
function vr(H, L, M) {
|
8687
|
+
return { type: "Feature", id: H[L + zi], properties: Rn(H, L, M), geometry: { type: "Point", coordinates: [(V = H[L], 360 * (V - 0.5)), fn(H[L + 1])] } };
|
8688
8688
|
var V;
|
8689
8689
|
}
|
8690
|
-
function Rn(H,
|
8691
|
-
const V = H[
|
8692
|
-
return Object.assign(te, { cluster: !0, cluster_id: H[
|
8690
|
+
function Rn(H, L, M) {
|
8691
|
+
const V = H[L + nr], Z = V >= 1e4 ? `${Math.round(V / 1e3)}k` : V >= 1e3 ? Math.round(V / 100) / 10 + "k" : V, Q = H[L + Dn], te = Q === -1 ? {} : Object.assign({}, M[Q]);
|
8692
|
+
return Object.assign(te, { cluster: !0, cluster_id: H[L + zi], point_count: V, point_count_abbreviated: Z });
|
8693
8693
|
}
|
8694
8694
|
function $i(H) {
|
8695
8695
|
return H / 360 + 0.5;
|
8696
8696
|
}
|
8697
8697
|
function sr(H) {
|
8698
|
-
const
|
8698
|
+
const L = Math.sin(H * Math.PI / 180), M = 0.5 - 0.25 * Math.log((1 + L) / (1 - L)) / Math.PI;
|
8699
8699
|
return M < 0 ? 0 : M > 1 ? 1 : M;
|
8700
8700
|
}
|
8701
8701
|
function fn(H) {
|
8702
|
-
const
|
8703
|
-
return 360 * Math.atan(Math.exp(
|
8702
|
+
const L = (180 - 360 * H) * Math.PI / 180;
|
8703
|
+
return 360 * Math.atan(Math.exp(L)) / Math.PI - 90;
|
8704
8704
|
}
|
8705
|
-
function mn(H,
|
8705
|
+
function mn(H, L, M, V) {
|
8706
8706
|
let Z = V;
|
8707
|
-
const Q =
|
8708
|
-
let te, re = M -
|
8709
|
-
const J = H[
|
8710
|
-
for (let Ie =
|
8707
|
+
const Q = L + (M - L >> 1);
|
8708
|
+
let te, re = M - L;
|
8709
|
+
const J = H[L], de = H[L + 1], ye = H[M], ce = H[M + 1];
|
8710
|
+
for (let Ie = L + 3; Ie < M; Ie += 3) {
|
8711
8711
|
const Ge = cs(H[Ie], H[Ie + 1], J, de, ye, ce);
|
8712
8712
|
if (Ge > Z) te = Ie, Z = Ge;
|
8713
8713
|
else if (Ge === Z) {
|
@@ -8715,39 +8715,39 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8715
8715
|
We < re && (te = Ie, re = We);
|
8716
8716
|
}
|
8717
8717
|
}
|
8718
|
-
Z > V && (te -
|
8718
|
+
Z > V && (te - L > 3 && mn(H, L, te, V), H[te + 2] = Z, M - te > 3 && mn(H, te, M, V));
|
8719
8719
|
}
|
8720
|
-
function cs(H,
|
8720
|
+
function cs(H, L, M, V, Z, Q) {
|
8721
8721
|
let te = Z - M, re = Q - V;
|
8722
8722
|
if (te !== 0 || re !== 0) {
|
8723
|
-
const J = ((H - M) * te + (
|
8723
|
+
const J = ((H - M) * te + (L - V) * re) / (te * te + re * re);
|
8724
8724
|
J > 1 ? (M = Z, V = Q) : J > 0 && (M += te * J, V += re * J);
|
8725
8725
|
}
|
8726
|
-
return te = H - M, re =
|
8726
|
+
return te = H - M, re = L - V, te * te + re * re;
|
8727
8727
|
}
|
8728
|
-
function Dr(H,
|
8729
|
-
const Z = { id: H ?? null, type:
|
8730
|
-
if (
|
8731
|
-
else if (
|
8732
|
-
else if (
|
8733
|
-
else if (
|
8728
|
+
function Dr(H, L, M, V) {
|
8729
|
+
const Z = { id: H ?? null, type: L, geometry: M, tags: V, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
|
8730
|
+
if (L === "Point" || L === "MultiPoint" || L === "LineString") Xr(Z, M);
|
8731
|
+
else if (L === "Polygon") Xr(Z, M[0]);
|
8732
|
+
else if (L === "MultiLineString") for (const Q of M) Xr(Z, Q);
|
8733
|
+
else if (L === "MultiPolygon") for (const Q of M) Xr(Z, Q[0]);
|
8734
8734
|
return Z;
|
8735
8735
|
}
|
8736
|
-
function Xr(H,
|
8737
|
-
for (let M = 0; M <
|
8736
|
+
function Xr(H, L) {
|
8737
|
+
for (let M = 0; M < L.length; M += 3) H.minX = Math.min(H.minX, L[M]), H.minY = Math.min(H.minY, L[M + 1]), H.maxX = Math.max(H.maxX, L[M]), H.maxY = Math.max(H.maxY, L[M + 1]);
|
8738
8738
|
}
|
8739
|
-
function Jr(H,
|
8740
|
-
if (!
|
8741
|
-
const Z =
|
8739
|
+
function Jr(H, L, M, V) {
|
8740
|
+
if (!L.geometry) return;
|
8741
|
+
const Z = L.geometry.coordinates;
|
8742
8742
|
if (Z && Z.length === 0) return;
|
8743
|
-
const Q =
|
8744
|
-
let re = [], J =
|
8745
|
-
if (M.promoteId ? J =
|
8743
|
+
const Q = L.geometry.type, te = Math.pow(M.tolerance / ((1 << M.maxZoom) * M.extent), 2);
|
8744
|
+
let re = [], J = L.id;
|
8745
|
+
if (M.promoteId ? J = L.properties[M.promoteId] : M.generateId && (J = V || 0), Q === "Point") Bn(Z, re);
|
8746
8746
|
else if (Q === "MultiPoint") for (const de of Z) Bn(de, re);
|
8747
8747
|
else if (Q === "LineString") he(Z, re, te, !1);
|
8748
8748
|
else if (Q === "MultiLineString") {
|
8749
8749
|
if (M.lineMetrics) {
|
8750
|
-
for (const de of Z) re = [], he(de, re, te, !1), H.push(Dr(J, "LineString", re,
|
8750
|
+
for (const de of Z) re = [], he(de, re, te, !1), H.push(Dr(J, "LineString", re, L.properties));
|
8751
8751
|
return;
|
8752
8752
|
}
|
8753
8753
|
gn(Z, re, te, !1);
|
@@ -8755,7 +8755,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8755
8755
|
else {
|
8756
8756
|
if (Q !== "MultiPolygon") {
|
8757
8757
|
if (Q === "GeometryCollection") {
|
8758
|
-
for (const de of
|
8758
|
+
for (const de of L.geometry.geometries) Jr(H, { id: J, geometry: de, properties: L.properties }, M, V);
|
8759
8759
|
return;
|
8760
8760
|
}
|
8761
8761
|
throw new Error("Input data is not a valid GeoJSON object.");
|
@@ -8765,35 +8765,35 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8765
8765
|
gn(de, ye, te, !0), re.push(ye);
|
8766
8766
|
}
|
8767
8767
|
}
|
8768
|
-
H.push(Dr(J, Q, re,
|
8768
|
+
H.push(Dr(J, Q, re, L.properties));
|
8769
8769
|
}
|
8770
|
-
function Bn(H,
|
8771
|
-
|
8770
|
+
function Bn(H, L) {
|
8771
|
+
L.push(hs(H[0]), vt(H[1]), 0);
|
8772
8772
|
}
|
8773
|
-
function he(H,
|
8773
|
+
function he(H, L, M, V) {
|
8774
8774
|
let Z, Q, te = 0;
|
8775
8775
|
for (let J = 0; J < H.length; J++) {
|
8776
8776
|
const de = hs(H[J][0]), ye = vt(H[J][1]);
|
8777
|
-
|
8777
|
+
L.push(de, ye, 0), J > 0 && (te += V ? (Z * ye - de * Q) / 2 : Math.sqrt(Math.pow(de - Z, 2) + Math.pow(ye - Q, 2))), Z = de, Q = ye;
|
8778
8778
|
}
|
8779
|
-
const re =
|
8780
|
-
|
8779
|
+
const re = L.length - 3;
|
8780
|
+
L[2] = 1, mn(L, 0, re, M), L[re + 2] = 1, L.size = Math.abs(te), L.start = 0, L.end = L.size;
|
8781
8781
|
}
|
8782
|
-
function gn(H,
|
8782
|
+
function gn(H, L, M, V) {
|
8783
8783
|
for (let Z = 0; Z < H.length; Z++) {
|
8784
8784
|
const Q = [];
|
8785
|
-
he(H[Z], Q, M, V),
|
8785
|
+
he(H[Z], Q, M, V), L.push(Q);
|
8786
8786
|
}
|
8787
8787
|
}
|
8788
8788
|
function hs(H) {
|
8789
8789
|
return H / 360 + 0.5;
|
8790
8790
|
}
|
8791
8791
|
function vt(H) {
|
8792
|
-
const
|
8792
|
+
const L = Math.sin(H * Math.PI / 180), M = 0.5 - 0.25 * Math.log((1 + L) / (1 - L)) / Math.PI;
|
8793
8793
|
return M < 0 ? 0 : M > 1 ? 1 : M;
|
8794
8794
|
}
|
8795
|
-
function qt(H,
|
8796
|
-
if (V /=
|
8795
|
+
function qt(H, L, M, V, Z, Q, te, re) {
|
8796
|
+
if (V /= L, Q >= (M /= L) && te < V) return H;
|
8797
8797
|
if (te < M || Q >= V) return null;
|
8798
8798
|
const J = [];
|
8799
8799
|
for (const de of H) {
|
@@ -8824,57 +8824,57 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8824
8824
|
}
|
8825
8825
|
return J.length ? J : null;
|
8826
8826
|
}
|
8827
|
-
function us(H,
|
8827
|
+
function us(H, L, M, V, Z) {
|
8828
8828
|
for (let Q = 0; Q < H.length; Q += 3) {
|
8829
8829
|
const te = H[Q + Z];
|
8830
|
-
te >= M && te <= V && Ki(
|
8830
|
+
te >= M && te <= V && Ki(L, H[Q], H[Q + 1], H[Q + 2]);
|
8831
8831
|
}
|
8832
8832
|
}
|
8833
|
-
function Kr(H,
|
8833
|
+
function Kr(H, L, M, V, Z, Q, te) {
|
8834
8834
|
let re = Rr(H);
|
8835
8835
|
const J = Z === 0 ? ds : ps;
|
8836
8836
|
let de, ye, ce = H.start;
|
8837
8837
|
for (let _t = 0; _t < H.length - 3; _t += 3) {
|
8838
8838
|
const nt = H[_t], Ct = H[_t + 1], Zt = H[_t + 2], Qt = H[_t + 3], ct = H[_t + 4], wt = Z === 0 ? nt : Ct, Nt = Z === 0 ? Qt : ct;
|
8839
8839
|
let ri = !1;
|
8840
|
-
te && (de = Math.sqrt(Math.pow(nt - Qt, 2) + Math.pow(Ct - ct, 2))), wt < M ? Nt > M && (ye = J(re, nt, Ct, Qt, ct, M), te && (re.start = ce + de * ye)) : wt > V ? Nt < V && (ye = J(re, nt, Ct, Qt, ct, V), te && (re.start = ce + de * ye)) : Ki(re, nt, Ct, Zt), Nt < M && wt >= M && (ye = J(re, nt, Ct, Qt, ct, M), ri = !0), Nt > V && wt <= V && (ye = J(re, nt, Ct, Qt, ct, V), ri = !0), !Q && ri && (te && (re.end = ce + de * ye),
|
8840
|
+
te && (de = Math.sqrt(Math.pow(nt - Qt, 2) + Math.pow(Ct - ct, 2))), wt < M ? Nt > M && (ye = J(re, nt, Ct, Qt, ct, M), te && (re.start = ce + de * ye)) : wt > V ? Nt < V && (ye = J(re, nt, Ct, Qt, ct, V), te && (re.start = ce + de * ye)) : Ki(re, nt, Ct, Zt), Nt < M && wt >= M && (ye = J(re, nt, Ct, Qt, ct, M), ri = !0), Nt > V && wt <= V && (ye = J(re, nt, Ct, Qt, ct, V), ri = !0), !Q && ri && (te && (re.end = ce + de * ye), L.push(re), re = Rr(H)), te && (ce += de);
|
8841
8841
|
}
|
8842
8842
|
let Ie = H.length - 3;
|
8843
8843
|
const Ge = H[Ie], We = H[Ie + 1], st = Z === 0 ? Ge : We;
|
8844
|
-
st >= M && st <= V && Ki(re, Ge, We, H[Ie + 2]), Ie = re.length - 3, Q && Ie >= 3 && (re[Ie] !== re[0] || re[Ie + 1] !== re[1]) && Ki(re, re[0], re[1], re[2]), re.length &&
|
8844
|
+
st >= M && st <= V && Ki(re, Ge, We, H[Ie + 2]), Ie = re.length - 3, Q && Ie >= 3 && (re[Ie] !== re[0] || re[Ie + 1] !== re[1]) && Ki(re, re[0], re[1], re[2]), re.length && L.push(re);
|
8845
8845
|
}
|
8846
8846
|
function Rr(H) {
|
8847
|
-
const
|
8848
|
-
return
|
8847
|
+
const L = [];
|
8848
|
+
return L.size = H.size, L.start = H.start, L.end = H.end, L;
|
8849
8849
|
}
|
8850
|
-
function Fn(H,
|
8851
|
-
for (const te of H) Kr(te,
|
8850
|
+
function Fn(H, L, M, V, Z, Q) {
|
8851
|
+
for (const te of H) Kr(te, L, M, V, Z, Q, !1);
|
8852
8852
|
}
|
8853
|
-
function Ki(H,
|
8854
|
-
H.push(
|
8853
|
+
function Ki(H, L, M, V) {
|
8854
|
+
H.push(L, M, V);
|
8855
8855
|
}
|
8856
|
-
function ds(H,
|
8857
|
-
const te = (Q -
|
8856
|
+
function ds(H, L, M, V, Z, Q) {
|
8857
|
+
const te = (Q - L) / (V - L);
|
8858
8858
|
return Ki(H, Q, M + (Z - M) * te, 1), te;
|
8859
8859
|
}
|
8860
|
-
function ps(H,
|
8860
|
+
function ps(H, L, M, V, Z, Q) {
|
8861
8861
|
const te = (Q - M) / (Z - M);
|
8862
|
-
return Ki(H,
|
8862
|
+
return Ki(H, L + (V - L) * te, Q, 1), te;
|
8863
8863
|
}
|
8864
|
-
function Te(H,
|
8864
|
+
function Te(H, L) {
|
8865
8865
|
const M = [];
|
8866
8866
|
for (let V = 0; V < H.length; V++) {
|
8867
8867
|
const Z = H[V], Q = Z.type;
|
8868
8868
|
let te;
|
8869
|
-
if (Q === "Point" || Q === "MultiPoint" || Q === "LineString") te = br(Z.geometry,
|
8869
|
+
if (Q === "Point" || Q === "MultiPoint" || Q === "LineString") te = br(Z.geometry, L);
|
8870
8870
|
else if (Q === "MultiLineString" || Q === "Polygon") {
|
8871
8871
|
te = [];
|
8872
|
-
for (const re of Z.geometry) te.push(br(re,
|
8872
|
+
for (const re of Z.geometry) te.push(br(re, L));
|
8873
8873
|
} else if (Q === "MultiPolygon") {
|
8874
8874
|
te = [];
|
8875
8875
|
for (const re of Z.geometry) {
|
8876
8876
|
const J = [];
|
8877
|
-
for (const de of re) J.push(br(de,
|
8877
|
+
for (const de of re) J.push(br(de, L));
|
8878
8878
|
te.push(J);
|
8879
8879
|
}
|
8880
8880
|
}
|
@@ -8882,37 +8882,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8882
8882
|
}
|
8883
8883
|
return M;
|
8884
8884
|
}
|
8885
|
-
function br(H,
|
8885
|
+
function br(H, L) {
|
8886
8886
|
const M = [];
|
8887
8887
|
M.size = H.size, H.start !== void 0 && (M.start = H.start, M.end = H.end);
|
8888
|
-
for (let V = 0; V < H.length; V += 3) M.push(H[V] +
|
8888
|
+
for (let V = 0; V < H.length; V += 3) M.push(H[V] + L, H[V + 1], H[V + 2]);
|
8889
8889
|
return M;
|
8890
8890
|
}
|
8891
|
-
function Pi(H,
|
8891
|
+
function Pi(H, L) {
|
8892
8892
|
if (H.transformed) return H;
|
8893
8893
|
const M = 1 << H.z, V = H.x, Z = H.y;
|
8894
8894
|
for (const Q of H.features) {
|
8895
8895
|
const te = Q.geometry, re = Q.type;
|
8896
|
-
if (Q.geometry = [], re === 1) for (let J = 0; J < te.length; J += 2) Q.geometry.push(wr(te[J], te[J + 1],
|
8896
|
+
if (Q.geometry = [], re === 1) for (let J = 0; J < te.length; J += 2) Q.geometry.push(wr(te[J], te[J + 1], L, M, V, Z));
|
8897
8897
|
else for (let J = 0; J < te.length; J++) {
|
8898
8898
|
const de = [];
|
8899
|
-
for (let ye = 0; ye < te[J].length; ye += 2) de.push(wr(te[J][ye], te[J][ye + 1],
|
8899
|
+
for (let ye = 0; ye < te[J].length; ye += 2) de.push(wr(te[J][ye], te[J][ye + 1], L, M, V, Z));
|
8900
8900
|
Q.geometry.push(de);
|
8901
8901
|
}
|
8902
8902
|
}
|
8903
8903
|
return H.transformed = !0, H;
|
8904
8904
|
}
|
8905
|
-
function wr(H,
|
8906
|
-
return [Math.round(M * (H * V - Z)), Math.round(M * (
|
8905
|
+
function wr(H, L, M, V, Z, Q) {
|
8906
|
+
return [Math.round(M * (H * V - Z)), Math.round(M * (L * V - Q))];
|
8907
8907
|
}
|
8908
|
-
function Yr(H,
|
8909
|
-
const Q =
|
8908
|
+
function Yr(H, L, M, V, Z) {
|
8909
|
+
const Q = L === Z.maxZoom ? 0 : Z.tolerance / ((1 << L) * Z.extent), te = { features: [], numPoints: 0, numSimplified: 0, numFeatures: H.length, source: null, x: M, y: V, z: L, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 };
|
8910
8910
|
for (const re of H) Pe(te, re, Q, Z);
|
8911
8911
|
return te;
|
8912
8912
|
}
|
8913
|
-
function Pe(H,
|
8914
|
-
const Z =
|
8915
|
-
if (H.minX = Math.min(H.minX,
|
8913
|
+
function Pe(H, L, M, V) {
|
8914
|
+
const Z = L.geometry, Q = L.type, te = [];
|
8915
|
+
if (H.minX = Math.min(H.minX, L.minX), H.minY = Math.min(H.minY, L.minY), H.maxX = Math.max(H.maxX, L.maxX), H.maxY = Math.max(H.maxY, L.maxY), Q === "Point" || Q === "MultiPoint") for (let re = 0; re < Z.length; re += 3) te.push(Z[re], Z[re + 1]), H.numPoints++, H.numSimplified++;
|
8916
8916
|
else if (Q === "LineString") lt(te, Z, H, M, !1, !1);
|
8917
8917
|
else if (Q === "MultiLineString" || Q === "Polygon") for (let re = 0; re < Z.length; re++) lt(te, Z[re], H, M, Q === "Polygon", re === 0);
|
8918
8918
|
else if (Q === "MultiPolygon") for (let re = 0; re < Z.length; re++) {
|
@@ -8920,21 +8920,21 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8920
8920
|
for (let de = 0; de < J.length; de++) lt(te, J[de], H, M, !0, de === 0);
|
8921
8921
|
}
|
8922
8922
|
if (te.length) {
|
8923
|
-
let re =
|
8923
|
+
let re = L.tags || null;
|
8924
8924
|
if (Q === "LineString" && V.lineMetrics) {
|
8925
8925
|
re = {};
|
8926
|
-
for (const de in
|
8926
|
+
for (const de in L.tags) re[de] = L.tags[de];
|
8927
8927
|
re.mapbox_clip_start = Z.start / Z.size, re.mapbox_clip_end = Z.end / Z.size;
|
8928
8928
|
}
|
8929
8929
|
const J = { geometry: te, type: Q === "Polygon" || Q === "MultiPolygon" ? 3 : Q === "LineString" || Q === "MultiLineString" ? 2 : 1, tags: re };
|
8930
|
-
|
8930
|
+
L.id !== null && (J.id = L.id), H.features.push(J);
|
8931
8931
|
}
|
8932
8932
|
}
|
8933
|
-
function lt(H,
|
8933
|
+
function lt(H, L, M, V, Z, Q) {
|
8934
8934
|
const te = V * V;
|
8935
|
-
if (V > 0 &&
|
8935
|
+
if (V > 0 && L.size < (Z ? te : V)) return void (M.numPoints += L.length / 3);
|
8936
8936
|
const re = [];
|
8937
|
-
for (let J = 0; J <
|
8937
|
+
for (let J = 0; J < L.length; J += 3) (V === 0 || L[J + 2] > te) && (M.numSimplified++, re.push(L[J], L[J + 1])), M.numPoints++;
|
8938
8938
|
Z && function(J, de) {
|
8939
8939
|
let ye = 0;
|
8940
8940
|
for (let ce = 0, Ie = J.length, Ge = Ie - 2; ce < Ie; Ge = ce, ce += 2) ye += (J[ce] - J[Ge]) * (J[ce + 1] + J[Ge + 1]);
|
@@ -8946,7 +8946,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8946
8946
|
}
|
8947
8947
|
const Ye = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 };
|
8948
8948
|
class Li {
|
8949
|
-
constructor(
|
8949
|
+
constructor(L, M) {
|
8950
8950
|
const V = (M = this.options = function(Q, te) {
|
8951
8951
|
for (const re in te) Q[re] = te[re];
|
8952
8952
|
return Q;
|
@@ -8958,7 +8958,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8958
8958
|
if (Q.type === "FeatureCollection") for (let J = 0; J < Q.features.length; J++) Jr(re, Q.features[J], te, J);
|
8959
8959
|
else Jr(re, Q.type === "Feature" ? Q : { geometry: Q }, te);
|
8960
8960
|
return re;
|
8961
|
-
}(
|
8961
|
+
}(L, M);
|
8962
8962
|
this.tiles = {}, this.tileCoords = [], V && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", M.indexMaxZoom, M.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), Z = function(Q, te) {
|
8963
8963
|
const re = te.buffer / te.extent;
|
8964
8964
|
let J = Q;
|
@@ -8966,18 +8966,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8966
8966
|
return (de || ye) && (J = qt(Q, 1, -re, 1 + re, 0, -1, 2, te) || [], de && (J = Te(de, 1).concat(J)), ye && (J = J.concat(Te(ye, -1)))), J;
|
8967
8967
|
}(Z, M), Z.length && this.splitTile(Z, 0, 0, 0), V && (Z.length && console.log("features: %d, points: %d", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), console.log("tiles generated:", this.total, JSON.stringify(this.stats)));
|
8968
8968
|
}
|
8969
|
-
splitTile(
|
8970
|
-
const J = [
|
8969
|
+
splitTile(L, M, V, Z, Q, te, re) {
|
8970
|
+
const J = [L, M, V, Z], de = this.options, ye = de.debug;
|
8971
8971
|
for (; J.length; ) {
|
8972
|
-
Z = J.pop(), V = J.pop(), M = J.pop(),
|
8972
|
+
Z = J.pop(), V = J.pop(), M = J.pop(), L = J.pop();
|
8973
8973
|
const ce = 1 << M, Ie = or(M, V, Z);
|
8974
8974
|
let Ge = this.tiles[Ie];
|
8975
|
-
if (!Ge && (ye > 1 && console.time("creation"), Ge = this.tiles[Ie] = Yr(
|
8975
|
+
if (!Ge && (ye > 1 && console.time("creation"), Ge = this.tiles[Ie] = Yr(L, M, V, Z, de), this.tileCoords.push({ z: M, x: V, y: Z }), ye)) {
|
8976
8976
|
ye > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", M, V, Z, Ge.numFeatures, Ge.numPoints, Ge.numSimplified), console.timeEnd("creation"));
|
8977
8977
|
const ri = `z${M}`;
|
8978
8978
|
this.stats[ri] = (this.stats[ri] || 0) + 1, this.total++;
|
8979
8979
|
}
|
8980
|
-
if (Ge.source =
|
8980
|
+
if (Ge.source = L, Q == null) {
|
8981
8981
|
if (M === de.indexMaxZoom || Ge.numPoints <= de.indexMaxPoints) continue;
|
8982
8982
|
} else {
|
8983
8983
|
if (M === de.maxZoom || M === Q) continue;
|
@@ -8986,38 +8986,38 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8986
8986
|
if (V !== te >> ri || Z !== re >> ri) continue;
|
8987
8987
|
}
|
8988
8988
|
}
|
8989
|
-
if (Ge.source = null,
|
8989
|
+
if (Ge.source = null, L.length === 0) continue;
|
8990
8990
|
ye > 1 && console.time("clipping");
|
8991
8991
|
const We = 0.5 * de.buffer / de.extent, st = 0.5 - We, _t = 0.5 + We, nt = 1 + We;
|
8992
|
-
let Ct = null, Zt = null, Qt = null, ct = null, wt = qt(
|
8993
|
-
|
8992
|
+
let Ct = null, Zt = null, Qt = null, ct = null, wt = qt(L, ce, V - We, V + _t, 0, Ge.minX, Ge.maxX, de), Nt = qt(L, ce, V + st, V + nt, 0, Ge.minX, Ge.maxX, de);
|
8993
|
+
L = null, wt && (Ct = qt(wt, ce, Z - We, Z + _t, 1, Ge.minY, Ge.maxY, de), Zt = qt(wt, ce, Z + st, Z + nt, 1, Ge.minY, Ge.maxY, de), wt = null), Nt && (Qt = qt(Nt, ce, Z - We, Z + _t, 1, Ge.minY, Ge.maxY, de), ct = qt(Nt, ce, Z + st, Z + nt, 1, Ge.minY, Ge.maxY, de), Nt = null), ye > 1 && console.timeEnd("clipping"), J.push(Ct || [], M + 1, 2 * V, 2 * Z), J.push(Zt || [], M + 1, 2 * V, 2 * Z + 1), J.push(Qt || [], M + 1, 2 * V + 1, 2 * Z), J.push(ct || [], M + 1, 2 * V + 1, 2 * Z + 1);
|
8994
8994
|
}
|
8995
8995
|
}
|
8996
|
-
getTile(
|
8997
|
-
|
8996
|
+
getTile(L, M, V) {
|
8997
|
+
L = +L, M = +M, V = +V;
|
8998
8998
|
const Z = this.options, { extent: Q, debug: te } = Z;
|
8999
|
-
if (
|
9000
|
-
const re = 1 <<
|
8999
|
+
if (L < 0 || L > 24) return null;
|
9000
|
+
const re = 1 << L, J = or(L, M = M + re & re - 1, V);
|
9001
9001
|
if (this.tiles[J]) return Pi(this.tiles[J], Q);
|
9002
|
-
te > 1 && console.log("drilling down to z%d-%d-%d",
|
9003
|
-
let de, ye =
|
9002
|
+
te > 1 && console.log("drilling down to z%d-%d-%d", L, M, V);
|
9003
|
+
let de, ye = L, ce = M, Ie = V;
|
9004
9004
|
for (; !de && ye > 0; ) ye--, ce >>= 1, Ie >>= 1, de = this.tiles[or(ye, ce, Ie)];
|
9005
|
-
return de && de.source ? (te > 1 && (console.log("found parent tile z%d-%d-%d", ye, ce, Ie), console.time("drilling down")), this.splitTile(de.source, ye, ce, Ie,
|
9005
|
+
return de && de.source ? (te > 1 && (console.log("found parent tile z%d-%d-%d", ye, ce, Ie), console.time("drilling down")), this.splitTile(de.source, ye, ce, Ie, L, M, V), te > 1 && console.timeEnd("drilling down"), this.tiles[J] ? Pi(this.tiles[J], Q) : null) : null;
|
9006
9006
|
}
|
9007
9007
|
}
|
9008
|
-
function or(H,
|
9009
|
-
return 32 * ((1 << H) * M +
|
9008
|
+
function or(H, L, M) {
|
9009
|
+
return 32 * ((1 << H) * M + L) + H;
|
9010
9010
|
}
|
9011
|
-
function rt(H,
|
9012
|
-
return
|
9011
|
+
function rt(H, L) {
|
9012
|
+
return L ? H.properties[L] : H.id;
|
9013
9013
|
}
|
9014
|
-
function Sr(H,
|
9014
|
+
function Sr(H, L) {
|
9015
9015
|
if (H == null) return !0;
|
9016
|
-
if (H.type === "Feature") return rt(H,
|
9016
|
+
if (H.type === "Feature") return rt(H, L) != null;
|
9017
9017
|
if (H.type === "FeatureCollection") {
|
9018
9018
|
const M = /* @__PURE__ */ new Set();
|
9019
9019
|
for (const V of H.features) {
|
9020
|
-
const Z = rt(V,
|
9020
|
+
const Z = rt(V, L);
|
9021
9021
|
if (Z == null || M.has(Z)) return !1;
|
9022
9022
|
M.add(Z);
|
9023
9023
|
}
|
@@ -9025,19 +9025,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9025
9025
|
}
|
9026
9026
|
return !1;
|
9027
9027
|
}
|
9028
|
-
function Br(H,
|
9028
|
+
function Br(H, L) {
|
9029
9029
|
const M = /* @__PURE__ */ new Map();
|
9030
|
-
if (H != null) if (H.type === "Feature") M.set(rt(H,
|
9031
|
-
else for (const V of H.features) M.set(rt(V,
|
9030
|
+
if (H != null) if (H.type === "Feature") M.set(rt(H, L), H);
|
9031
|
+
else for (const V of H.features) M.set(rt(V, L), V);
|
9032
9032
|
return M;
|
9033
9033
|
}
|
9034
9034
|
class Qr extends oe {
|
9035
9035
|
constructor() {
|
9036
9036
|
super(...arguments), this._dataUpdateable = /* @__PURE__ */ new Map();
|
9037
9037
|
}
|
9038
|
-
loadVectorTile(
|
9038
|
+
loadVectorTile(L, M) {
|
9039
9039
|
return S._(this, void 0, void 0, function* () {
|
9040
|
-
const V =
|
9040
|
+
const V = L.tileID.canonical;
|
9041
9041
|
if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
|
9042
9042
|
const Z = this._geoJSONIndex.getTile(V.z, V.x, V.y);
|
9043
9043
|
if (!Z) return null;
|
@@ -9076,14 +9076,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9076
9076
|
return te.byteOffset === 0 && te.byteLength === te.buffer.byteLength || (te = new Uint8Array(te)), { vectorTile: Q, rawData: te.buffer };
|
9077
9077
|
});
|
9078
9078
|
}
|
9079
|
-
loadData(
|
9079
|
+
loadData(L) {
|
9080
9080
|
return S._(this, void 0, void 0, function* () {
|
9081
9081
|
var M;
|
9082
9082
|
(M = this._pendingRequest) === null || M === void 0 || M.abort();
|
9083
|
-
const V = !!(
|
9083
|
+
const V = !!(L && L.request && L.request.collectResourceTiming) && new S.bu(L.request);
|
9084
9084
|
this._pendingRequest = new AbortController();
|
9085
9085
|
try {
|
9086
|
-
this._pendingData = this.loadAndProcessGeoJSON(
|
9086
|
+
this._pendingData = this.loadAndProcessGeoJSON(L, this._pendingRequest), this._geoJSONIndex = L.cluster ? new Wr(function({ superclusterOptions: te, clusterProperties: re }) {
|
9087
9087
|
if (!re || !te) return te;
|
9088
9088
|
const J = {}, de = {}, ye = { accumulated: null, zoom: 0 }, ce = { properties: null }, Ie = Object.keys(re);
|
9089
9089
|
for (const Ge of Ie) {
|
@@ -9099,11 +9099,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9099
9099
|
ce.properties = We;
|
9100
9100
|
for (const st of Ie) ye.accumulated = Ge[st], Ge[st] = de[st].evaluate(ye, ce);
|
9101
9101
|
}, te;
|
9102
|
-
}(
|
9102
|
+
}(L)).load((yield this._pendingData).features) : (Z = yield this._pendingData, new Li(Z, L.geojsonVtOptions)), this.loaded = {};
|
9103
9103
|
const Q = {};
|
9104
9104
|
if (V) {
|
9105
9105
|
const te = V.finish();
|
9106
|
-
te && (Q.resourceTiming = {}, Q.resourceTiming[
|
9106
|
+
te && (Q.resourceTiming = {}, Q.resourceTiming[L.source] = JSON.parse(JSON.stringify(te)));
|
9107
9107
|
}
|
9108
9108
|
return Q;
|
9109
9109
|
} catch (Q) {
|
@@ -9118,37 +9118,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9118
9118
|
return this._pendingData;
|
9119
9119
|
});
|
9120
9120
|
}
|
9121
|
-
reloadTile(
|
9121
|
+
reloadTile(L) {
|
9122
9122
|
const M = this.loaded;
|
9123
|
-
return M && M[
|
9123
|
+
return M && M[L.uid] ? super.reloadTile(L) : this.loadTile(L);
|
9124
9124
|
}
|
9125
|
-
loadAndProcessGeoJSON(
|
9125
|
+
loadAndProcessGeoJSON(L, M) {
|
9126
9126
|
return S._(this, void 0, void 0, function* () {
|
9127
|
-
let V = yield this.loadGeoJSON(
|
9128
|
-
if (delete this._pendingRequest, typeof V != "object") throw new Error(`Input data given to '${
|
9129
|
-
if (Ke(V, !0),
|
9130
|
-
const Z = S.bB(
|
9127
|
+
let V = yield this.loadGeoJSON(L, M);
|
9128
|
+
if (delete this._pendingRequest, typeof V != "object") throw new Error(`Input data given to '${L.source}' is not a valid GeoJSON object.`);
|
9129
|
+
if (Ke(V, !0), L.filter) {
|
9130
|
+
const Z = S.bB(L.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
|
9131
9131
|
if (Z.result === "error") throw new Error(Z.value.map((te) => `${te.key}: ${te.message}`).join(", "));
|
9132
9132
|
V = { type: "FeatureCollection", features: V.features.filter((te) => Z.value.evaluate({ zoom: 0 }, te)) };
|
9133
9133
|
}
|
9134
9134
|
return V;
|
9135
9135
|
});
|
9136
9136
|
}
|
9137
|
-
loadGeoJSON(
|
9137
|
+
loadGeoJSON(L, M) {
|
9138
9138
|
return S._(this, void 0, void 0, function* () {
|
9139
|
-
const { promoteId: V } =
|
9140
|
-
if (
|
9141
|
-
const Z = yield S.h(
|
9139
|
+
const { promoteId: V } = L;
|
9140
|
+
if (L.request) {
|
9141
|
+
const Z = yield S.h(L.request, M);
|
9142
9142
|
return this._dataUpdateable = Sr(Z.data, V) ? Br(Z.data, V) : void 0, Z.data;
|
9143
9143
|
}
|
9144
|
-
if (typeof
|
9145
|
-
const Z = JSON.parse(
|
9144
|
+
if (typeof L.data == "string") try {
|
9145
|
+
const Z = JSON.parse(L.data);
|
9146
9146
|
return this._dataUpdateable = Sr(Z, V) ? Br(Z, V) : void 0, Z;
|
9147
9147
|
} catch {
|
9148
|
-
throw new Error(`Input data given to '${
|
9148
|
+
throw new Error(`Input data given to '${L.source}' is not a valid GeoJSON object.`);
|
9149
9149
|
}
|
9150
|
-
if (!
|
9151
|
-
if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${
|
9150
|
+
if (!L.dataDiff) throw new Error(`Input data given to '${L.source}' is not a valid GeoJSON object.`);
|
9151
|
+
if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${L.source}`);
|
9152
9152
|
return function(Z, Q, te) {
|
9153
9153
|
var re, J, de, ye;
|
9154
9154
|
if (Q.removeAll && Z.clear(), Q.remove) for (const ce of Q.remove) Z.delete(ce);
|
@@ -9164,27 +9164,27 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9164
9164
|
else if (((de = ce.removeProperties) === null || de === void 0 ? void 0 : de.length) > 0) for (const We of ce.removeProperties) Object.prototype.hasOwnProperty.call(Ie.properties, We) && delete Ie.properties[We];
|
9165
9165
|
if (((ye = ce.addOrUpdateProperties) === null || ye === void 0 ? void 0 : ye.length) > 0) for (const { key: We, value: st } of ce.addOrUpdateProperties) Ie.properties[We] = st;
|
9166
9166
|
}
|
9167
|
-
}(this._dataUpdateable,
|
9167
|
+
}(this._dataUpdateable, L.dataDiff, V), { type: "FeatureCollection", features: Array.from(this._dataUpdateable.values()) };
|
9168
9168
|
});
|
9169
9169
|
}
|
9170
|
-
removeSource(
|
9170
|
+
removeSource(L) {
|
9171
9171
|
return S._(this, void 0, void 0, function* () {
|
9172
9172
|
this._pendingRequest && this._pendingRequest.abort();
|
9173
9173
|
});
|
9174
9174
|
}
|
9175
|
-
getClusterExpansionZoom(
|
9176
|
-
return this._geoJSONIndex.getClusterExpansionZoom(
|
9175
|
+
getClusterExpansionZoom(L) {
|
9176
|
+
return this._geoJSONIndex.getClusterExpansionZoom(L.clusterId);
|
9177
9177
|
}
|
9178
|
-
getClusterChildren(
|
9179
|
-
return this._geoJSONIndex.getChildren(
|
9178
|
+
getClusterChildren(L) {
|
9179
|
+
return this._geoJSONIndex.getChildren(L.clusterId);
|
9180
9180
|
}
|
9181
|
-
getClusterLeaves(
|
9182
|
-
return this._geoJSONIndex.getLeaves(
|
9181
|
+
getClusterLeaves(L) {
|
9182
|
+
return this._geoJSONIndex.getLeaves(L.clusterId, L.limit, L.offset);
|
9183
9183
|
}
|
9184
9184
|
}
|
9185
9185
|
class Tr {
|
9186
|
-
constructor(
|
9187
|
-
this.self =
|
9186
|
+
constructor(L) {
|
9187
|
+
this.self = L, this.actor = new S.F(L), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.self.registerWorkerSource = (M, V) => {
|
9188
9188
|
if (this.externalWorkerSourceTypes[M]) throw new Error(`Worker source with name "${M}" already registered.`);
|
9189
9189
|
this.externalWorkerSourceTypes[M] = V;
|
9190
9190
|
}, this.self.addProtocol = S.bh, this.self.removeProtocol = S.bi, this.self.registerRTLTextPlugin = (M) => {
|
@@ -9214,16 +9214,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9214
9214
|
this._getLayerIndex(M).replace(V);
|
9215
9215
|
}));
|
9216
9216
|
}
|
9217
|
-
_setImages(
|
9217
|
+
_setImages(L, M) {
|
9218
9218
|
return S._(this, void 0, void 0, function* () {
|
9219
|
-
this.availableImages[
|
9220
|
-
for (const V in this.workerSources[
|
9221
|
-
const Z = this.workerSources[
|
9219
|
+
this.availableImages[L] = M;
|
9220
|
+
for (const V in this.workerSources[L]) {
|
9221
|
+
const Z = this.workerSources[L][V];
|
9222
9222
|
for (const Q in Z) Z[Q].availableImages = M;
|
9223
9223
|
}
|
9224
9224
|
});
|
9225
9225
|
}
|
9226
|
-
_syncRTLPluginState(
|
9226
|
+
_syncRTLPluginState(L, M) {
|
9227
9227
|
return S._(this, void 0, void 0, function* () {
|
9228
9228
|
if (S.bC.isParsed()) return S.bC.getState();
|
9229
9229
|
if (M.pluginStatus !== "loading") return S.bC.setState(M), M;
|
@@ -9235,36 +9235,36 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9235
9235
|
throw S.bC.setState({ pluginStatus: "error", pluginURL: "" }), new Error(`RTL Text Plugin failed to import scripts from ${V}`);
|
9236
9236
|
});
|
9237
9237
|
}
|
9238
|
-
_getAvailableImages(
|
9239
|
-
let M = this.availableImages[
|
9238
|
+
_getAvailableImages(L) {
|
9239
|
+
let M = this.availableImages[L];
|
9240
9240
|
return M || (M = []), M;
|
9241
9241
|
}
|
9242
|
-
_getLayerIndex(
|
9243
|
-
let M = this.layerIndexes[
|
9244
|
-
return M || (M = this.layerIndexes[
|
9242
|
+
_getLayerIndex(L) {
|
9243
|
+
let M = this.layerIndexes[L];
|
9244
|
+
return M || (M = this.layerIndexes[L] = new c()), M;
|
9245
9245
|
}
|
9246
|
-
_getWorkerSource(
|
9247
|
-
if (this.workerSources[
|
9248
|
-
const Z = { sendAsync: (Q, te) => (Q.targetMapId =
|
9246
|
+
_getWorkerSource(L, M, V) {
|
9247
|
+
if (this.workerSources[L] || (this.workerSources[L] = {}), this.workerSources[L][M] || (this.workerSources[L][M] = {}), !this.workerSources[L][M][V]) {
|
9248
|
+
const Z = { sendAsync: (Q, te) => (Q.targetMapId = L, this.actor.sendAsync(Q, te)) };
|
9249
9249
|
switch (M) {
|
9250
9250
|
case "vector":
|
9251
|
-
this.workerSources[
|
9251
|
+
this.workerSources[L][M][V] = new oe(Z, this._getLayerIndex(L), this._getAvailableImages(L));
|
9252
9252
|
break;
|
9253
9253
|
case "geojson":
|
9254
|
-
this.workerSources[
|
9254
|
+
this.workerSources[L][M][V] = new Qr(Z, this._getLayerIndex(L), this._getAvailableImages(L));
|
9255
9255
|
break;
|
9256
9256
|
default:
|
9257
|
-
this.workerSources[
|
9257
|
+
this.workerSources[L][M][V] = new this.externalWorkerSourceTypes[M](Z, this._getLayerIndex(L), this._getAvailableImages(L));
|
9258
9258
|
}
|
9259
9259
|
}
|
9260
|
-
return this.workerSources[
|
9260
|
+
return this.workerSources[L][M][V];
|
9261
9261
|
}
|
9262
|
-
_getDEMWorkerSource(
|
9263
|
-
return this.demWorkerSources[
|
9262
|
+
_getDEMWorkerSource(L, M) {
|
9263
|
+
return this.demWorkerSources[L] || (this.demWorkerSources[L] = {}), this.demWorkerSources[L][M] || (this.demWorkerSources[L][M] = new ae()), this.demWorkerSources[L][M];
|
9264
9264
|
}
|
9265
9265
|
}
|
9266
9266
|
return S.i(self) && (self.worker = new Tr(self)), Tr;
|
9267
|
-
}),
|
9267
|
+
}), z("index", ["exports", "./shared"], function(S, c) {
|
9268
9268
|
var pe = "4.5.2";
|
9269
9269
|
let fe, xe;
|
9270
9270
|
const oe = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (u) => new Promise((t, n) => {
|
@@ -9342,25 +9342,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9342
9342
|
}
|
9343
9343
|
}
|
9344
9344
|
ae.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, ae.selectProp = ae.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), ae.transformProp = ae.testProp(["transform", "WebkitTransform"]);
|
9345
|
-
const
|
9346
|
-
!Oe && Ke && (gt ? ot(u) :
|
9345
|
+
const ut = { supported: !1, testSupport: function(u) {
|
9346
|
+
!Oe && Ke && (gt ? ot(u) : $e = u);
|
9347
9347
|
} };
|
9348
|
-
let
|
9348
|
+
let $e, Ke, Oe = !1, gt = !1;
|
9349
9349
|
function ot(u) {
|
9350
9350
|
const t = u.createTexture();
|
9351
9351
|
u.bindTexture(u.TEXTURE_2D, t);
|
9352
9352
|
try {
|
9353
9353
|
if (u.texImage2D(u.TEXTURE_2D, 0, u.RGBA, u.RGBA, u.UNSIGNED_BYTE, Ke), u.isContextLost()) return;
|
9354
|
-
|
9354
|
+
ut.supported = !0;
|
9355
9355
|
} catch {
|
9356
9356
|
}
|
9357
9357
|
u.deleteTexture(t), Oe = !0;
|
9358
9358
|
}
|
9359
9359
|
var He;
|
9360
9360
|
typeof document < "u" && (Ke = document.createElement("img"), Ke.onload = () => {
|
9361
|
-
|
9361
|
+
$e && ot($e), $e = null, gt = !0;
|
9362
9362
|
}, Ke.onerror = () => {
|
9363
|
-
Oe = !0,
|
9363
|
+
Oe = !0, $e = null;
|
9364
9364
|
}, Ke.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(u) {
|
9365
9365
|
let t, n, o, a;
|
9366
9366
|
u.resetRequestQueue = () => {
|
@@ -9371,7 +9371,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9371
9371
|
}, u.removeThrottleControl = (b) => {
|
9372
9372
|
delete a[b], g();
|
9373
9373
|
}, u.getImage = (b, w, P = !0) => new Promise((A, R) => {
|
9374
|
-
|
9374
|
+
ut.supported && (b.headers || (b.headers = {}), b.headers.accept = "image/webp,*/*"), c.e(b, { type: "image" }), t.push({ abortController: w, requestParameters: b, supportImageRefresh: P, state: "queued", onError: (F) => {
|
9375
9375
|
R(F);
|
9376
9376
|
}, onSuccess: (F) => {
|
9377
9377
|
A(F);
|
@@ -11355,7 +11355,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11355
11355
|
const a = o[3];
|
11356
11356
|
return { point: new c.P(o[0] / a, o[1] / a), signedDistanceFromCamera: a, isOccluded: !1 };
|
11357
11357
|
}
|
11358
|
-
function
|
11358
|
+
function L(u, t) {
|
11359
11359
|
return 0.5 + u / t * 0.5;
|
11360
11360
|
}
|
11361
11361
|
function M(u, t) {
|
@@ -11378,7 +11378,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11378
11378
|
We(be.numGlyphs, K);
|
11379
11379
|
continue;
|
11380
11380
|
}
|
11381
|
-
const De =
|
11381
|
+
const De = L(n.transform.cameraToCenterDistance, ze.signedDistanceFromCamera), we = c.aj(G, j, be), Se = g ? we / De : we * De, Ne = { getElevation: N, labelPlaneMatrix: a, lineVertexArray: $, pitchWithMap: g, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: w, tileAnchorPoint: new c.P(be.anchorX, be.anchorY), unwrappedTileID: P, width: A, height: R, translation: F }, tt = te(Ne, be, Se, !1, y, t, h, u.glyphOffsetArray, K, ne, b);
|
11382
11382
|
le = tt.useVertical, (tt.notEnoughRoom || le || tt.needsFlipping && te(Ne, be, Se, !0, y, t, h, u.glyphOffsetArray, K, ne, b).notEnoughRoom) && We(be.numGlyphs, K);
|
11383
11383
|
}
|
11384
11384
|
o ? u.text.dynamicLayoutVertexBuffer.updateData(K) : u.icon.dynamicLayoutVertexBuffer.updateData(K);
|
@@ -11500,20 +11500,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11500
11500
|
const Qe = 2.5 * De;
|
11501
11501
|
if (w) {
|
11502
11502
|
const at = this.projectPathToScreenSpace(Ce, ne, w);
|
11503
|
-
Ce = at.some((
|
11503
|
+
Ce = at.some((pt) => pt.signedDistanceFromCamera <= 0) ? [] : at.map((pt) => pt.point);
|
11504
11504
|
}
|
11505
11505
|
let Rt = [];
|
11506
11506
|
if (Ce.length > 0) {
|
11507
|
-
const at = Ce[0].clone(),
|
11508
|
-
for (let Bt = 1; Bt < Ce.length; Bt++) at.x = Math.min(at.x, Ce[Bt].x), at.y = Math.min(at.y, Ce[Bt].y),
|
11509
|
-
Rt = at.x >= we.x &&
|
11507
|
+
const at = Ce[0].clone(), pt = Ce[0].clone();
|
11508
|
+
for (let Bt = 1; Bt < Ce.length; Bt++) at.x = Math.min(at.x, Ce[Bt].x), at.y = Math.min(at.y, Ce[Bt].y), pt.x = Math.max(pt.x, Ce[Bt].x), pt.y = Math.max(pt.y, Ce[Bt].y);
|
11509
|
+
Rt = at.x >= we.x && pt.x <= Se.x && at.y >= we.y && pt.y <= Se.y ? [Ce] : pt.x < we.x || at.x > Se.x || pt.y < we.y || at.y > Se.y ? [] : c.am([Ce], we.x, we.y, Se.x, Se.y);
|
11510
11510
|
}
|
11511
11511
|
for (const at of Rt) {
|
11512
11512
|
Ne.reset(at, 0.25 * De);
|
11513
|
-
let
|
11514
|
-
|
11515
|
-
for (let Bt = 0; Bt <
|
11516
|
-
const gi = Bt / Math.max(
|
11513
|
+
let pt = 0;
|
11514
|
+
pt = Ne.length <= 0.5 * De ? 1 : Math.ceil(Ne.paddedLength / Qe) + 1;
|
11515
|
+
for (let Bt = 0; Bt < pt; Bt++) {
|
11516
|
+
const gi = Bt / Math.max(pt - 1, 1), cr = Ne.lerp(gi), Ft = cr.x + st, Ri = cr.y + st;
|
11517
11517
|
W.push(Ft, Ri, De, 0);
|
11518
11518
|
const Ci = Ft - De, _i = Ri - De, yi = Ft + De, hr = Ri + De;
|
11519
11519
|
if (ze = ze && this.isOffscreen(Ci, _i, yi, hr), be = be || this.isInsideGrid(Ci, _i, yi, hr), t !== "always" && this.grid.hitTestCircle(Ft, Ri, De, t, R) && (_e = !0, !P)) return { circles: [], offscreen: !1, collisionDetected: _e };
|
@@ -11687,7 +11687,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11687
11687
|
var Rt, at;
|
11688
11688
|
if (n[ke.crossTileID]) return;
|
11689
11689
|
if (F) return void (this.placements[ke.crossTileID] = new Qt(!1, !1, !1));
|
11690
|
-
let
|
11690
|
+
let pt = !1, Bt = !1, gi = !0, cr = null, Ft = { box: null, placeable: !1, offscreen: null }, Ri = { box: null, placeable: !1, offscreen: null }, Ci = null, _i = null, yi = null, hr = 0, Pn = 0, Co = 0;
|
11691
11691
|
Ce.textFeatureIndex ? hr = Ce.textFeatureIndex : ke.useRuntimeCollisionCircles && (hr = ke.featureIndex), Ce.verticalTextFeatureIndex && (Pn = Ce.verticalTextFeatureIndex);
|
11692
11692
|
const Xn = Ce.textBox;
|
11693
11693
|
if (Xn) {
|
@@ -11723,7 +11723,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11723
11723
|
const Lo = a.textAnchorOffsets.get(Ja);
|
11724
11724
|
if (xi && Lo.textAnchor !== xi) continue;
|
11725
11725
|
const Yn = this.attemptAnchorPlacement(Lo, Ut, ni, tc, Mo, _e, be, R, b, w, j, Wa, ke, a, Ha, g, y, zo, Ne);
|
11726
|
-
if (Yn && (ln = Yn.placedGlyphBoxes, ln && ln.placeable)) return
|
11726
|
+
if (Yn && (ln = Yn.placedGlyphBoxes, ln && ln.placeable)) return pt = !0, cr = Yn.shift, ln;
|
11727
11727
|
}
|
11728
11728
|
xi ? xi = null : Wa = $;
|
11729
11729
|
}
|
@@ -11732,28 +11732,28 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11732
11732
|
ur(() => vi(Xn, Ce.iconBox, c.ai.horizontal), () => {
|
11733
11733
|
const Ut = Ce.verticalTextBox;
|
11734
11734
|
return a.allowVerticalPlacement && (!Ft || !Ft.placeable) && ke.numVerticalGlyphVertices > 0 && Ut ? vi(Ut, Ce.verticalIconBox, c.ai.vertical) : { box: null, occluded: !0, offscreen: null };
|
11735
|
-
}), Ft && (
|
11735
|
+
}), Ft && (pt = Ft.placeable, gi = Ft.offscreen);
|
11736
11736
|
const ai = hi(Ft && Ft.placeable);
|
11737
|
-
if (!
|
11737
|
+
if (!pt && this.prevPlacement) {
|
11738
11738
|
const Ut = this.prevPlacement.variableOffsets[ke.crossTileID];
|
11739
11739
|
Ut && (this.variableOffsets[ke.crossTileID] = Ut, this.markUsedJustification(a, Ut.anchor, ke, ai));
|
11740
11740
|
}
|
11741
11741
|
}
|
11742
11742
|
}
|
11743
|
-
if (Ci = Ft,
|
11743
|
+
if (Ci = Ft, pt = Ci && Ci.placeable, gi = Ci && Ci.offscreen, ke.useRuntimeCollisionCircles) {
|
11744
11744
|
const hi = a.text.placedSymbolArray.get(ke.centerJustifiedTextSymbolIndex), ur = c.aj(a.textSizeData, G, hi), an = h.get("text-padding");
|
11745
|
-
_i = this.collisionIndex.placeCollisionCircles($, hi, a.lineVertexArray, a.glyphOffsetArray, ur, b, w, P, A, o, be, j.predicate, ke.collisionCircleDiameter, an, g, Ne), _i.circles.length && _i.collisionDetected && !o && c.w("Collisions detected, but collision boxes are not shown"),
|
11745
|
+
_i = this.collisionIndex.placeCollisionCircles($, hi, a.lineVertexArray, a.glyphOffsetArray, ur, b, w, P, A, o, be, j.predicate, ke.collisionCircleDiameter, an, g, Ne), _i.circles.length && _i.collisionDetected && !o && c.w("Collisions detected, but collision boxes are not shown"), pt = ee || _i.circles.length > 0 && !_i.collisionDetected, gi = gi && _i.offscreen;
|
11746
11746
|
}
|
11747
11747
|
if (Ce.iconFeatureIndex && (Co = Ce.iconFeatureIndex), Ce.iconBox) {
|
11748
11748
|
const hi = (ur) => this.collisionIndex.placeCollisionBox(ur, ne, R, b, w, be, _e, y, j.predicate, Ne, ze && cr ? cr : void 0);
|
11749
11749
|
Ri && Ri.placeable && Ce.verticalIconBox ? (yi = hi(Ce.verticalIconBox), Bt = yi.placeable) : (yi = hi(Ce.iconBox), Bt = yi.placeable), gi = gi && yi.offscreen;
|
11750
11750
|
}
|
11751
11751
|
const An = W || ke.numHorizontalGlyphVertices === 0 && ke.numVerticalGlyphVertices === 0, Eo = K || ke.numIconVertices === 0;
|
11752
|
-
An || Eo ? Eo ? An || (Bt = Bt &&
|
11752
|
+
An || Eo ? Eo ? An || (Bt = Bt && pt) : pt = Bt && pt : Bt = pt = Bt && pt;
|
11753
11753
|
const Ga = Bt && yi.placeable;
|
11754
|
-
if (
|
11754
|
+
if (pt && Ci.placeable && this.collisionIndex.insertCollisionBox(Ci.box, $, h.get("text-ignore-placement"), a.bucketInstanceId, Ri && Ri.placeable && Pn ? Pn : hr, j.ID), Ga && this.collisionIndex.insertCollisionBox(yi.box, ne, h.get("icon-ignore-placement"), a.bucketInstanceId, Co, j.ID), _i && pt && this.collisionIndex.insertCollisionCircles(_i.circles, $, h.get("text-ignore-placement"), a.bucketInstanceId, hr, j.ID), o && this.storeCollisionData(a.bucketInstanceId, Qe, Ce, Ci, yi, _i), ke.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
11755
11755
|
if (a.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
|
11756
|
-
this.placements[ke.crossTileID] = new Qt(
|
11756
|
+
this.placements[ke.crossTileID] = new Qt(pt || we, Bt || Se, gi || a.justReloaded), n[ke.crossTileID] = !0;
|
11757
11757
|
};
|
11758
11758
|
if (De) {
|
11759
11759
|
if (t.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
|
@@ -13930,12 +13930,12 @@ uniform ${P} ${A} u_${R};
|
|
13930
13930
|
this.bindVertexArray.set(null);
|
13931
13931
|
}
|
13932
13932
|
}
|
13933
|
-
class
|
13933
|
+
class dt {
|
13934
13934
|
constructor(t, n, o) {
|
13935
13935
|
this.func = t, this.mask = n, this.range = o;
|
13936
13936
|
}
|
13937
13937
|
}
|
13938
|
-
|
13938
|
+
dt.ReadOnly = !1, dt.ReadWrite = !0, dt.disabled = new dt(519, dt.ReadOnly, [0, 1]);
|
13939
13939
|
const pa = 7680;
|
13940
13940
|
class $t {
|
13941
13941
|
constructor(t, n, o, a, h, g) {
|
@@ -13960,7 +13960,7 @@ uniform ${P} ${A} u_${R};
|
|
13960
13960
|
const le = c.H();
|
13961
13961
|
c.aR(le, $.placementInvProjMatrix, u.transform.glCoordMatrix), c.aR(le, le, $.placementViewportMatrix), b.push({ circleArray: ne, circleOffset: P, transform: K.posMatrix, invTransform: le, coord: K }), w += ne.length / 4, P = w;
|
13962
13962
|
}
|
13963
|
-
ee && y.draw(h, g.LINES,
|
13963
|
+
ee && y.draw(h, g.LINES, dt.disabled, $t.disabled, u.colorModeForRenderPass(), Lt.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
13965
|
var A;
|
13966
13966
|
if (!a || !b.length) return;
|
@@ -13983,7 +13983,7 @@ uniform ${P} ${A} u_${R};
|
|
13983
13983
|
const G = h.createIndexBuffer(Is, !0), j = h.createVertexBuffer(F, c.aT.members, !0);
|
13984
13984
|
for (const W of b) {
|
13985
13985
|
const K = Nc(W.transform, W.invTransform, u.transform);
|
13986
|
-
R.draw(h, g.TRIANGLES,
|
13986
|
+
R.draw(h, g.TRIANGLES, dt.disabled, $t.disabled, u.colorModeForRenderPass(), Lt.disabled, K, u.style.map.terrain && u.style.map.terrain.getTerrainData(W.coord), n.id, j, G, c.a0.simpleSegment(0, 2 * W.circleOffset, W.circleArray.length, W.circleArray.length / 2), null, u.transform.zoom, null, null, null);
|
13987
13987
|
}
|
13988
13988
|
j.destroy(), G.destroy();
|
13989
13989
|
}
|
@@ -14011,7 +14011,7 @@ uniform ${P} ${A} u_${R};
|
|
14011
14011
|
for (let K = 0; K < N.length; K++) {
|
14012
14012
|
const $ = N.get(K), ee = $.hidden || !$.crossTileID || u.allowVerticalPlacement && !$.placedOrientation ? null : o[$.crossTileID];
|
14013
14013
|
if (ee) {
|
14014
|
-
const ne = new c.P($.anchorX, $.anchorY), le = { getElevation: F, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection: P, projectionCache: null, tileAnchorPoint: ne, translation: A, unwrappedTileID: R }, _e = n ? H(ne, g, F) : de(ne.x, ne.y, le), be =
|
14014
|
+
const ne = new c.P($.anchorX, $.anchorY), le = { getElevation: F, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection: P, projectionCache: null, tileAnchorPoint: ne, translation: A, unwrappedTileID: R }, _e = n ? H(ne, g, F) : de(ne.x, ne.y, le), be = L(a.cameraToCenterDistance, _e.signedDistanceFromCamera);
|
14015
14015
|
let ze = c.aj(u.textSizeData, b, $) * be / c.aq;
|
14016
14016
|
n && (ze *= u.tilePixelRatio / y);
|
14017
14017
|
const { width: De, height: we, anchor: Se, textOffset: Ne, textBoxScale: tt } = ee, ke = uo(Se, De, we, Ne, tt, ze), Ce = P.getPitchedTextCorrection(a, ne.add(new c.P(A[0], A[1])), R), Qe = po(_e.point, le, t, ke, a.angle, Ce), Rt = u.allowVerticalPlacement && $.placedOrientation === c.ai.vertical ? Math.PI / 2 : 0;
|
@@ -14041,13 +14041,13 @@ uniform ${P} ${A} u_${R};
|
|
14041
14041
|
function nn(u, t, n, o, a, h, g, y, b, w, P, A) {
|
14042
14042
|
const R = u.context, F = R.gl, N = u.transform, G = Ys(), j = y === "map", W = b === "map", K = y !== "viewport" && n.layout.get("symbol-placement") !== "point", $ = j && !W && !K, ee = !W && K, ne = !n.layout.get("symbol-sort-key").isConstant();
|
14043
14043
|
let le = !1;
|
14044
|
-
const _e = u.depthModeForSublayer(0,
|
14044
|
+
const _e = u.depthModeForSublayer(0, dt.ReadOnly), be = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ze = [], De = G.getCircleRadiusCorrection(N);
|
14045
14045
|
for (const we of o) {
|
14046
14046
|
const Se = t.getTile(we), Ne = Se.getBucket(n);
|
14047
14047
|
if (!Ne) continue;
|
14048
14048
|
const tt = a ? Ne.text : Ne.icon;
|
14049
14049
|
if (!tt || !tt.segments.get().length || !tt.hasVisibleVertices) continue;
|
14050
|
-
const ke = tt.programConfigurations.get(n.id), Ce = a || Ne.sdfIcons, Qe = a ? Ne.textSizeData : Ne.iconSizeData, Rt = W || N.pitch !== 0, at = u.useProgram(ma(Ce, a, Ne), ke),
|
14050
|
+
const ke = tt.programConfigurations.get(n.id), Ce = a || Ne.sdfIcons, Qe = a ? Ne.textSizeData : Ne.iconSizeData, Rt = W || N.pitch !== 0, at = u.useProgram(ma(Ce, a, Ne), ke), pt = c.ah(Qe, N.zoom), Bt = u.style.map.terrain && u.style.map.terrain.getTerrainData(we);
|
14051
14051
|
let gi, cr, Ft, Ri, Ci = [0, 0], _i = null;
|
14052
14052
|
if (a) cr = Se.glyphAtlasTexture, Ft = F.LINEAR, gi = Se.glyphAtlasTexture.size, Ne.iconsInText && (Ci = Se.imageAtlasTexture.size, _i = Se.imageAtlasTexture, Ri = Rt || u.options.rotating || u.options.zooming || Qe.kind === "composite" || Qe.kind === "camera" ? F.LINEAR : F.NEAREST);
|
14053
14053
|
else {
|
@@ -14061,7 +14061,7 @@ uniform ${P} ${A} u_${R};
|
|
14061
14061
|
}
|
14062
14062
|
const hi = we.posMatrix, ur = a && be || Ga, an = K || ur ? fa : Pn, Jn = Co, xi = Ce && n.paint.get(a ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
14063
14063
|
let vi;
|
14064
|
-
vi = Ce ? Ne.iconsInText ? jc(Qe.kind,
|
14064
|
+
vi = Ce ? Ne.iconsInText ? jc(Qe.kind, pt, $, W, K, ur, u, hi, an, Jn, An, gi, Ci, De) : Il(Qe.kind, pt, $, W, K, ur, u, hi, an, Jn, An, a, gi, !0, De) : Tl(Qe.kind, pt, $, W, K, ur, u, hi, an, Jn, An, a, gi, De);
|
14065
14065
|
const ai = { program: at, buffers: tt, uniformValues: vi, atlasTexture: cr, atlasTextureIcon: _i, atlasInterpolation: Ft, atlasInterpolationIcon: Ri, isSDF: Ce, hasHalo: xi };
|
14066
14066
|
if (ne && Ne.canOverlap) {
|
14067
14067
|
le = !0;
|
@@ -14177,7 +14177,7 @@ uniform ${P} ${A} u_${R};
|
|
14177
14177
|
y.enable(y.SCISSOR_TEST), y.scissor(t * u.pixelRatio, n * u.pixelRatio, o * u.pixelRatio, a * u.pixelRatio), g.clear({ color: h }), y.disable(y.SCISSOR_TEST);
|
14178
14178
|
}
|
14179
14179
|
function yt(u, t, n) {
|
14180
|
-
const o = u.context, a = o.gl, h = n.posMatrix, g = u.useProgram("debug"), y =
|
14180
|
+
const o = u.context, a = o.gl, h = n.posMatrix, g = u.useProgram("debug"), y = dt.disabled, b = $t.disabled, w = u.colorModeForRenderPass(), P = "$debug", A = u.style.map.terrain && u.style.map.terrain.getTerrainData(n);
|
14181
14181
|
o.activeTexture.set(a.TEXTURE0);
|
14182
14182
|
const R = t.getTileByID(n.key).latestRawTileData, F = Math.floor((R && R.byteLength || 0) / 1024), N = t.getTile(n).tileSize, G = 512 / Math.min(N, 512) * (n.overscaledZ / u.transform.zoom) * 0.5;
|
14183
14183
|
let j = n.canonical.toString();
|
@@ -14188,7 +14188,7 @@ uniform ${P} ${A} u_${R};
|
|
14188
14188
|
}(u, `${j} ${F}kB`), g.draw(o, a.TRIANGLES, y, b, Et.alphaBlended, Lt.disabled, rn(h, c.aN.transparent, G), null, P, u.debugBuffer, u.quadTriangleIndexBuffer, u.debugSegments), g.draw(o, a.LINE_STRIP, y, b, w, Lt.disabled, rn(h, c.aN.red), A, P, u.debugBuffer, u.tileBorderIndexBuffer, u.debugSegments);
|
14189
14189
|
}
|
14190
14190
|
function Ps(u, t, n) {
|
14191
|
-
const o = u.context, a = o.gl, h = u.colorModeForRenderPass(), g = new
|
14191
|
+
const o = u.context, a = o.gl, h = u.colorModeForRenderPass(), g = new dt(a.LEQUAL, dt.ReadWrite, u.depthRangeFor3D), y = u.useProgram("terrain"), b = t.getTerrainMesh();
|
14192
14192
|
o.bindFramebuffer.set(null), o.viewport.set([0, 0, u.width, u.height]);
|
14193
14193
|
for (const w of n) {
|
14194
14194
|
const P = u.renderToTexture.getTexture(w), A = t.getTerrainData(w.tileID);
|
@@ -14232,18 +14232,18 @@ uniform ${P} ${A} u_${R};
|
|
14232
14232
|
const t = this.context, n = t.gl;
|
14233
14233
|
this.nextStencilID = 1, this.currentStencilSource = void 0;
|
14234
14234
|
const o = c.H();
|
14235
|
-
c.aQ(o, 0, this.width, this.height, 0, 0, 1), c.K(o, o, [n.drawingBufferWidth, n.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(t, n.TRIANGLES,
|
14235
|
+
c.aQ(o, 0, this.width, this.height, 0, 0, 1), c.K(o, o, [n.drawingBufferWidth, n.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(t, n.TRIANGLES, dt.disabled, this.stencilClearMode, Et.disabled, Lt.disabled, vs(o), null, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
|
14236
14236
|
}
|
14237
14237
|
_renderTileClippingMasks(t, n) {
|
14238
14238
|
if (this.currentStencilSource === t.source || !t.isTileClipped() || !n || !n.length) return;
|
14239
14239
|
this.currentStencilSource = t.source;
|
14240
14240
|
const o = this.context, a = o.gl;
|
14241
|
-
this.nextStencilID + n.length > 256 && this.clearStencil(), o.setColorMode(Et.disabled), o.setDepthMode(
|
14241
|
+
this.nextStencilID + n.length > 256 && this.clearStencil(), o.setColorMode(Et.disabled), o.setDepthMode(dt.disabled);
|
14242
14242
|
const h = this.useProgram("clippingMask");
|
14243
14243
|
this._tileClippingMaskIDs = {};
|
14244
14244
|
for (const g of n) {
|
14245
14245
|
const y = this._tileClippingMaskIDs[g.key] = this.nextStencilID++, b = this.style.map.terrain && this.style.map.terrain.getTerrainData(g);
|
14246
|
-
h.draw(o, a.TRIANGLES,
|
14246
|
+
h.draw(o, a.TRIANGLES, dt.disabled, new $t({ func: a.ALWAYS, mask: 0 }, y, 255, a.KEEP, a.KEEP, a.REPLACE), Et.disabled, Lt.disabled, vs(g.posMatrix), b, "$clipping", this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);
|
14247
14247
|
}
|
14248
14248
|
}
|
14249
14249
|
stencilModeFor3D() {
|
@@ -14270,9 +14270,9 @@ uniform ${P} ${A} u_${R};
|
|
14270
14270
|
return this._showOverdrawInspector ? new Et([t.CONSTANT_COLOR, t.ONE], new c.aN(0.125, 0.125, 0.125, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? Et.unblended : Et.alphaBlended;
|
14271
14271
|
}
|
14272
14272
|
depthModeForSublayer(t, n, o) {
|
14273
|
-
if (!this.opaquePassEnabledForLayer()) return
|
14273
|
+
if (!this.opaquePassEnabledForLayer()) return dt.disabled;
|
14274
14274
|
const a = 1 - ((1 + this.currentLayer) * this.numSublayers + t) * this.depthEpsilon;
|
14275
|
-
return new
|
14275
|
+
return new dt(o || this.context.gl.LEQUAL, n, [a, a]);
|
14276
14276
|
}
|
14277
14277
|
opaquePassEnabledForLayer() {
|
14278
14278
|
return this.currentLayer < this.opaquePassCutoff;
|
@@ -14298,7 +14298,7 @@ uniform ${P} ${A} u_${R};
|
|
14298
14298
|
(P.type === "custom" || A.length) && this.renderLayer(this, h[P.source], P, A);
|
14299
14299
|
}
|
14300
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(w, P) {
|
14301
|
-
const A = w.context, R = A.gl, F = ((K, $, ee) => ({ u_sky_color: K.properties.get("sky-color"), u_horizon_color: K.properties.get("horizon-color"), u_horizon: ($.height / 2 + $.getHorizon()) * ee, u_sky_horizon_blend: K.properties.get("sky-horizon-blend") * $.height / 2 * ee }))(P, w.style.map.transform, w.pixelRatio), N = new
|
14301
|
+
const A = w.context, R = A.gl, F = ((K, $, ee) => ({ u_sky_color: K.properties.get("sky-color"), u_horizon_color: K.properties.get("horizon-color"), u_horizon: ($.height / 2 + $.getHorizon()) * ee, u_sky_horizon_blend: K.properties.get("sky-horizon-blend") * $.height / 2 * ee }))(P, w.style.map.transform, w.pixelRatio), N = new dt(R.LEQUAL, dt.ReadWrite, [0, 1]), G = $t.disabled, j = w.colorModeForRenderPass(), W = w.useProgram("sky");
|
14302
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);
|
@@ -14342,7 +14342,7 @@ uniform ${P} ${A} u_${R};
|
|
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, g) {
|
14345
|
-
const y = h.context, b = y.gl, w = Et.unblended, P = new
|
14345
|
+
const y = h.context, b = y.gl, w = Et.unblended, P = new dt(b.LEQUAL, dt.ReadWrite, [0, 1]), A = g.getTerrainMesh(), R = g.sourceCache.getRenderableTiles(), F = h.useProgram("terrainDepth");
|
14346
14346
|
y.bindFramebuffer.set(g.getFramebuffer("depth").framebuffer), y.viewport.set([0, 0, h.width / devicePixelRatio, h.height / devicePixelRatio]), y.clear({ color: c.aN.transparent, depth: 1 });
|
14347
14347
|
for (const N of R) {
|
14348
14348
|
const G = g.getTerrainData(N.tileID), j = { u_matrix: h.transform.calculatePosMatrix(N.tileID.toUnwrapped()), u_ele_delta: g.getMeshFrameDelta(h.transform.zoom) };
|
@@ -14350,7 +14350,7 @@ uniform ${P} ${A} u_${R};
|
|
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, g) {
|
14353
|
-
const y = h.context, b = y.gl, w = Et.unblended, P = new
|
14353
|
+
const y = h.context, b = y.gl, w = Et.unblended, P = new dt(b.LEQUAL, dt.ReadWrite, [0, 1]), A = g.getTerrainMesh(), R = g.getCoordsTexture(), F = g.sourceCache.getRenderableTiles(), N = h.useProgram("terrainCoords");
|
14354
14354
|
y.bindFramebuffer.set(g.getFramebuffer("coords").framebuffer), y.viewport.set([0, 0, h.width / devicePixelRatio, h.height / devicePixelRatio]), y.clear({ color: c.aN.transparent, depth: 1 }), g.coordsIndex = [];
|
14355
14355
|
for (const G of F) {
|
14356
14356
|
const j = g.getTerrainData(G.tileID);
|
@@ -14374,7 +14374,7 @@ uniform ${P} ${A} u_${R};
|
|
14374
14374
|
if (!we || !we.text || !we.text.segments.get().length) continue;
|
14375
14375
|
const Se = c.ah(we.textSizeData, ne.zoom), Ne = nt(De, 1, F.transform.zoom), tt = Qr(ze.posMatrix, be, _e, F.transform, Ne), ke = N.layout.get("icon-text-fit") !== "none" && we.hasIconData();
|
14376
14376
|
if (Se) {
|
14377
|
-
const Ce = Math.pow(2, ne.zoom - De.tileID.overscaledZ), Qe = F.style.map.terrain ? (at,
|
14377
|
+
const Ce = Math.pow(2, ne.zoom - De.tileID.overscaledZ), Qe = F.style.map.terrain ? (at, pt) => F.style.map.terrain.getElevation(ze, at, pt) : null, Rt = le.translatePosition(ne, De, K, $);
|
14378
14378
|
fo(we, _e, be, ee, ne, tt, ze.posMatrix, Ce, Se, ke, le, Rt, ze.toUnwrapped(), Qe);
|
14379
14379
|
}
|
14380
14380
|
}
|
@@ -14386,7 +14386,7 @@ uniform ${P} ${A} u_${R};
|
|
14386
14386
|
if (h.renderPass !== "translucent") return;
|
14387
14387
|
const w = y.paint.get("circle-opacity"), P = y.paint.get("circle-stroke-width"), A = y.paint.get("circle-stroke-opacity"), R = !y.layout.get("circle-sort-key").isConstant();
|
14388
14388
|
if (w.constantOr(1) === 0 && (P.constantOr(1) === 0 || A.constantOr(1) === 0)) return;
|
14389
|
-
const F = h.context, N = F.gl, G = h.depthModeForSublayer(0,
|
14389
|
+
const F = h.context, N = F.gl, G = h.depthModeForSublayer(0, dt.ReadOnly), j = $t.disabled, W = h.colorModeForRenderPass(), K = [];
|
14390
14390
|
for (let $ = 0; $ < b.length; $++) {
|
14391
14391
|
const ee = b[$], ne = g.getTile(ee), le = ne.getBucket(y);
|
14392
14392
|
if (!le) continue;
|
@@ -14427,7 +14427,7 @@ uniform ${P} ${A} u_${R};
|
|
14427
14427
|
const G = g.getTile(N), j = G.getBucket(y);
|
14428
14428
|
if (!j) continue;
|
14429
14429
|
const W = j.programConfigurations.get(y.id), K = h.useProgram("heatmap", W), { zoom: $ } = h.transform;
|
14430
|
-
K.draw(w, P.TRIANGLES,
|
14430
|
+
K.draw(w, P.TRIANGLES, dt.disabled, A, R, Lt.disabled, Zi(N.posMatrix, G, $, y.paint.get("heatmap-intensity")), null, y.id, j.layoutVertexBuffer, j.indexBuffer, j.segments, y.paint, h.transform.zoom, W);
|
14431
14431
|
}
|
14432
14432
|
w.viewport.set([0, 0, h.width, h.height]);
|
14433
14433
|
} else h.renderPass === "translucent" && (h.context.setColorMode(h.colorModeForRenderPass()), function(w, P) {
|
@@ -14435,7 +14435,7 @@ uniform ${P} ${A} u_${R};
|
|
14435
14435
|
if (!F) return;
|
14436
14436
|
A.activeTexture.set(R.TEXTURE0), R.bindTexture(R.TEXTURE_2D, F.colorAttachment.get()), A.activeTexture.set(R.TEXTURE1);
|
14437
14437
|
let N = P.colorRampTexture;
|
14438
|
-
N || (N = P.colorRampTexture = new It(A, P.colorRamp, R.RGBA)), N.bind(R.LINEAR, R.CLAMP_TO_EDGE), w.useProgram("heatmapTexture").draw(A, R.TRIANGLES,
|
14438
|
+
N || (N = P.colorRampTexture = new It(A, P.colorRamp, R.RGBA)), N.bind(R.LINEAR, R.CLAMP_TO_EDGE), w.useProgram("heatmapTexture").draw(A, R.TRIANGLES, dt.disabled, $t.disabled, w.colorModeForRenderPass(), Lt.disabled, ((G, j, W, K) => {
|
14439
14439
|
const $ = c.H();
|
14440
14440
|
c.aQ($, 0, G.width, G.height, 0, 0, 1);
|
14441
14441
|
const ee = G.context.gl;
|
@@ -14449,7 +14449,7 @@ uniform ${P} ${A} u_${R};
|
|
14449
14449
|
if (h.renderPass !== "translucent") return;
|
14450
14450
|
const w = y.paint.get("line-opacity"), P = y.paint.get("line-width");
|
14451
14451
|
if (w.constantOr(1) === 0 || P.constantOr(1) === 0) return;
|
14452
|
-
const A = h.depthModeForSublayer(0,
|
14452
|
+
const A = h.depthModeForSublayer(0, dt.ReadOnly), R = h.colorModeForRenderPass(), F = y.paint.get("line-dasharray"), N = y.paint.get("line-pattern"), G = N.constantOr(1), j = y.paint.get("line-gradient"), W = y.getCrossfadeParameters(), K = G ? "linePattern" : F ? "lineSDF" : j ? "lineGradient" : "line", $ = h.context, ee = $.gl;
|
14453
14453
|
let ne = !0;
|
14454
14454
|
for (const le of b) {
|
14455
14455
|
const _e = g.getTile(le);
|
@@ -14470,7 +14470,7 @@ uniform ${P} ${A} u_${R};
|
|
14470
14470
|
if (y.gradientVersion !== Qe.version) {
|
14471
14471
|
let at = 256;
|
14472
14472
|
if (y.stepInterpolant) {
|
14473
|
-
const
|
14473
|
+
const pt = g.getSource().maxzoom, Bt = le.canonical.z === pt ? Math.ceil(1 << h.transform.maxZoom - le.canonical.z) : 1;
|
14474
14474
|
at = c.ad(c.aV(be.maxLineLength / c.X * 1024 * Bt), 256, $.maxTextureSize);
|
14475
14475
|
}
|
14476
14476
|
Qe.gradient = c.aW({ expression: y.gradientExpression(), evaluationKey: "lineProgress", resolution: at, image: Qe.gradient || void 0, clips: be.lineClipsArray }), Qe.texture ? Qe.texture.update(Qe.gradient) : Qe.texture = new It($, Qe.gradient, ee.RGBA), Qe.version = y.gradientVersion, Rt = Qe.texture;
|
@@ -14487,11 +14487,11 @@ uniform ${P} ${A} u_${R};
|
|
14487
14487
|
if (P.constantOr(1) === 0) return;
|
14488
14488
|
const A = h.colorModeForRenderPass(), R = y.paint.get("fill-pattern"), F = h.opaquePassEnabledForLayer() && !R.constantOr(1) && w.constantOr(c.aN.transparent).a === 1 && P.constantOr(0) === 1 ? "opaque" : "translucent";
|
14489
14489
|
if (h.renderPass === F) {
|
14490
|
-
const N = h.depthModeForSublayer(1, h.renderPass === "opaque" ?
|
14490
|
+
const N = h.depthModeForSublayer(1, h.renderPass === "opaque" ? dt.ReadWrite : dt.ReadOnly);
|
14491
14491
|
ga(h, g, y, b, N, A, !1);
|
14492
14492
|
}
|
14493
14493
|
if (h.renderPass === "translucent" && y.paint.get("fill-antialias")) {
|
14494
|
-
const N = h.depthModeForSublayer(y.getPaintProperty("fill-outline-color") ? 2 : 0,
|
14494
|
+
const N = h.depthModeForSublayer(y.getPaintProperty("fill-outline-color") ? 2 : 0, dt.ReadOnly);
|
14495
14495
|
ga(h, g, y, b, N, A, !0);
|
14496
14496
|
}
|
14497
14497
|
})(t, n, o, a);
|
@@ -14500,7 +14500,7 @@ uniform ${P} ${A} u_${R};
|
|
14500
14500
|
(function(h, g, y, b) {
|
14501
14501
|
const w = y.paint.get("fill-extrusion-opacity");
|
14502
14502
|
if (w !== 0 && h.renderPass === "translucent") {
|
14503
|
-
const P = new
|
14503
|
+
const P = new dt(h.context.gl.LEQUAL, dt.ReadWrite, h.depthRangeFor3D);
|
14504
14504
|
if (w !== 1 || y.paint.get("fill-extrusion-pattern").constantOr(1)) mo(h, g, y, b, P, $t.disabled, Et.disabled), mo(h, g, y, b, P, h.stencilModeFor3D(), h.colorModeForRenderPass());
|
14505
14505
|
else {
|
14506
14506
|
const A = h.colorModeForRenderPass();
|
@@ -14512,7 +14512,7 @@ uniform ${P} ${A} u_${R};
|
|
14512
14512
|
case "hillshade":
|
14513
14513
|
(function(h, g, y, b) {
|
14514
14514
|
if (h.renderPass !== "offscreen" && h.renderPass !== "translucent") return;
|
14515
|
-
const w = h.context, P = h.depthModeForSublayer(0,
|
14515
|
+
const w = h.context, P = h.depthModeForSublayer(0, dt.ReadOnly), A = h.colorModeForRenderPass(), [R, F] = h.renderPass === "translucent" ? h.stencilConfigForOverlap(b) : [{}, b];
|
14516
14516
|
for (const N of F) {
|
14517
14517
|
const G = g.getTile(N);
|
14518
14518
|
G.needsHillshadePrepare !== void 0 && G.needsHillshadePrepare && h.renderPass === "offscreen" ? bn(h, G, y, P, $t.disabled, A) : h.renderPass === "translucent" && _a(h, N, G, y, P, R[N.overscaledZ], A);
|
@@ -14525,7 +14525,7 @@ uniform ${P} ${A} u_${R};
|
|
14525
14525
|
if (h.renderPass !== "translucent" || y.paint.get("raster-opacity") === 0 || !b.length) return;
|
14526
14526
|
const w = h.context, P = w.gl, A = g.getSource(), R = h.useProgram("raster"), F = h.colorModeForRenderPass(), [N, G] = A instanceof Rr ? [{}, b] : h.stencilConfigForOverlap(b), j = G[G.length - 1].overscaledZ, W = !h.options.moving;
|
14527
14527
|
for (const K of G) {
|
14528
|
-
const $ = h.depthModeForSublayer(K.overscaledZ - j, y.paint.get("raster-opacity") === 1 ?
|
14528
|
+
const $ = h.depthModeForSublayer(K.overscaledZ - j, y.paint.get("raster-opacity") === 1 ? dt.ReadWrite : dt.ReadOnly, P.LESS), ee = g.getTile(K);
|
14529
14529
|
ee.registerFadeDuration(y.paint.get("raster-fade-duration"));
|
14530
14530
|
const ne = g.findLoadedParent(K, 0), le = g.findLoadedSibling(K), _e = go(ee, ne || le || null, g, y, h.transform, h.style.map.terrain);
|
14531
14531
|
let be, ze;
|
@@ -14544,7 +14544,7 @@ uniform ${P} ${A} u_${R};
|
|
14544
14544
|
if (h.isPatternMissing(G)) return;
|
14545
14545
|
const j = !G && w.a === 1 && P === 1 && h.opaquePassEnabledForLayer() ? "opaque" : "translucent";
|
14546
14546
|
if (h.renderPass !== j) return;
|
14547
|
-
const W = $t.disabled, K = h.depthModeForSublayer(0, j === "opaque" ?
|
14547
|
+
const W = $t.disabled, K = h.depthModeForSublayer(0, j === "opaque" ? dt.ReadWrite : dt.ReadOnly), $ = h.colorModeForRenderPass(), ee = h.useProgram(G ? "backgroundPattern" : "background"), ne = b || F.coveringTiles({ tileSize: N, terrain: h.style.map.terrain });
|
14548
14548
|
G && (A.activeTexture.set(R.TEXTURE0), h.imageManager.bind(h.context));
|
14549
14549
|
const le = y.getCrossfadeParameters();
|
14550
14550
|
for (const _e of ne) {
|
@@ -14561,7 +14561,7 @@ uniform ${P} ${A} u_${R};
|
|
14561
14561
|
P && (h.setCustomLayerDefaults(), b.setColorMode(h.colorModeForRenderPass()), P.call(w, b.gl, h.transform.customLayerMatrix()), b.setDirty(), h.setBaseState());
|
14562
14562
|
} else if (h.renderPass === "translucent") {
|
14563
14563
|
h.setCustomLayerDefaults(), b.setColorMode(h.colorModeForRenderPass()), b.setStencilMode($t.disabled);
|
14564
|
-
const P = w.renderingMode === "3d" ? new
|
14564
|
+
const P = w.renderingMode === "3d" ? new dt(h.context.gl.LEQUAL, dt.ReadWrite, h.depthRangeFor3D) : h.depthModeForSublayer(0, dt.ReadOnly);
|
14565
14565
|
b.setDepthMode(P), w.render(b.gl, h.transform.customLayerMatrix(), { farZ: h.transform.farZ, nearZ: h.transform.nearZ, fov: h.transform._fov, modelViewProjectionMatrix: h.transform.modelViewProjectionMatrix, projectionMatrix: h.transform.projectionMatrix }), b.setDirty(), h.setBaseState(), b.bindFramebuffer.set(null);
|
14566
14566
|
}
|
14567
14567
|
})(t, 0, o);
|
@@ -17690,7 +17690,7 @@ uniform ${P} ${A} u_${R};
|
|
17690
17690
|
const o = "Failed to initialize WebGL";
|
17691
17691
|
throw t ? (t.message = o, new Error(JSON.stringify(t))) : new Error(o);
|
17692
17692
|
}
|
17693
|
-
this.painter = new Ul(n, this.transform),
|
17693
|
+
this.painter = new Ul(n, this.transform), ut.testSupport(n);
|
17694
17694
|
}
|
17695
17695
|
loaded() {
|
17696
17696
|
return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
|
@@ -18092,56 +18092,56 @@ function Ym(f) {
|
|
18092
18092
|
}
|
18093
18093
|
const Jd = ["#69D2E7", "yellow", "#FE4365", "#125B9A", "#41B3A2", "#D7C3F1", "#F1D3CE"], Qm = ["ma-star", "ma-water", "ma-swimming", "fa-home", "fa-search", "fa-trash", "fa-check"], Kd = {};
|
18094
18094
|
async function Yd(f, x, I = "api") {
|
18095
|
-
const C = await fetch(`${I}/gis-layer/${f}/${x}`), { rows:
|
18096
|
-
return
|
18095
|
+
const C = await fetch(`${I}/gis-layer/${f}/${x}`), { rows: z } = await C.json();
|
18096
|
+
return z;
|
18097
18097
|
}
|
18098
18098
|
async function Zh(f, x, I, C) {
|
18099
18099
|
if (!f) return null;
|
18100
|
-
const
|
18100
|
+
const z = JSON.parse(JSON.stringify(f)), U = z.colorAttr ? await Yd(x, z.colorAttr, C) : null;
|
18101
18101
|
U == null || U.forEach((c, pe) => {
|
18102
18102
|
var fe, xe;
|
18103
|
-
c.color = c.color || ((fe =
|
18103
|
+
c.color = c.color || ((fe = z.colorSet) == null ? void 0 : fe[c.id]) || ((xe = z.colorSet) == null ? void 0 : xe[pe]) || Jd[pe % Jd.length], c.icon = z.icon ? z.icon.split("+")[0] + "+" + c.color.replace("#", "") + ".png" : null;
|
18104
18104
|
});
|
18105
|
-
const S =
|
18105
|
+
const S = z.iconAttr ? await Yd(x, z.iconAttr, C) : null;
|
18106
18106
|
if (S == null || S.forEach((c, pe) => {
|
18107
|
-
var
|
18108
|
-
const fe = c.icon || ((
|
18107
|
+
var ut, $e, Ke, Oe;
|
18108
|
+
const fe = c.icon || ((ut = z.iconSet) == null ? void 0 : ut[c.id]) || (($e = z.iconPattern) == null ? void 0 : $e.replace("{id}", c.id)) || ((Ke = z.iconSet) == null ? void 0 : Ke[pe]) || (z.iconPrefix ? null : Qm[pe]);
|
18109
18109
|
if (!fe) return;
|
18110
|
-
const xe = c.color || ((Oe =
|
18111
|
-
c.icon =
|
18112
|
-
}),
|
18113
|
-
const c = ["match", ["get",
|
18110
|
+
const xe = c.color || ((Oe = z.color) == null ? void 0 : Oe.replace("#", "")) || "red", [oe = "pin6", ae = "m"] = z.icon ? z.icon.split("-") : [];
|
18111
|
+
c.icon = z.iconPrefix || fe != null && fe.includes("/") ? (z.iconPrefix || "") + fe : `${oe}-${ae}-${fe}+${xe}.png`;
|
18112
|
+
}), z.colorAttr && U) {
|
18113
|
+
const c = ["match", ["get", z.colorAttr]];
|
18114
18114
|
U.filter((pe) => pe.id).forEach((pe) => {
|
18115
18115
|
c.push(pe.id), c.push(pe.color);
|
18116
|
-
}), c.push(
|
18116
|
+
}), c.push(z.color || "gray"), z.color = c;
|
18117
18117
|
}
|
18118
|
-
if (
|
18119
|
-
const c = ["match", ["get",
|
18118
|
+
if (z.icon && z.iconAttr && S) {
|
18119
|
+
const c = ["match", ["get", z.iconAttr]];
|
18120
18120
|
S.filter((pe) => pe.icon).forEach(({ id: pe, icon: fe }) => {
|
18121
|
-
if (
|
18121
|
+
if (z.colorAttr && U) {
|
18122
18122
|
c.push(pe);
|
18123
|
-
const xe = ["match", ["get",
|
18123
|
+
const xe = ["match", ["get", z.colorAttr]];
|
18124
18124
|
U.forEach((oe) => {
|
18125
18125
|
xe.push(oe.id);
|
18126
18126
|
const ae = fe.split("+")[0] + "+" + oe.color.replace("#", "") + ".png";
|
18127
18127
|
xe.push(ae), Go(ae, I, C);
|
18128
|
-
}), xe.push(
|
18128
|
+
}), xe.push(z.icon), c.push(xe);
|
18129
18129
|
} else
|
18130
18130
|
c.push(pe), c.push(fe), Go(fe, I, C);
|
18131
|
-
}), c.push((
|
18132
|
-
} else if (
|
18133
|
-
const c = ["match", ["get",
|
18131
|
+
}), c.push((z.iconPrefix || "") + z.icon), Go((z.iconPrefix || "") + z.icon, I, C), z.icon = c;
|
18132
|
+
} else if (z.icon && z.colorAttr && U) {
|
18133
|
+
const c = ["match", ["get", z.colorAttr]];
|
18134
18134
|
U.forEach((pe) => {
|
18135
18135
|
c.push(pe.id), c.push(pe.icon), Go(pe.icon, I, C);
|
18136
|
-
}), c.push(
|
18137
|
-
} else
|
18136
|
+
}), c.push(z.icon), Go(z.icon, I, C), z.icon = c;
|
18137
|
+
} else z.icon && await Go(z.icon, I, C);
|
18138
18138
|
return eg({
|
18139
18139
|
style: f,
|
18140
18140
|
colors: U,
|
18141
18141
|
icons: S,
|
18142
18142
|
map: I,
|
18143
18143
|
id: x
|
18144
|
-
}), Ym(
|
18144
|
+
}), Ym(z);
|
18145
18145
|
}
|
18146
18146
|
async function Go(f = "pin4-sm-mi-plumber+f45942.png", x = null, I) {
|
18147
18147
|
if (Kd[f]) return null;
|
@@ -18149,9 +18149,9 @@ async function Go(f = "pin4-sm-mi-plumber+f45942.png", x = null, I) {
|
|
18149
18149
|
const C = await (x == null ? void 0 : x.loadImage(f != null && f.startsWith("/") || f != null && f.includes("//") ? f : `${I}/marker_icon/${f.replace(".png", "")}.png`));
|
18150
18150
|
x == null || x.addImage(f, C.data);
|
18151
18151
|
}
|
18152
|
-
function eg({ style: f, colors: x, icons: I, map: C, id:
|
18152
|
+
function eg({ style: f, colors: x, icons: I, map: C, id: z }) {
|
18153
18153
|
C.legend || Object.assign(C, { legend: {} }), window.map || (window.map = C), Object.assign(C.legend, {
|
18154
|
-
[
|
18154
|
+
[z]: {
|
18155
18155
|
icon: f.icon,
|
18156
18156
|
colors: x,
|
18157
18157
|
icons: I,
|
@@ -18180,20 +18180,20 @@ const _l = {
|
|
18180
18180
|
},
|
18181
18181
|
async setVisible(f, x = !0, I = this.map) {
|
18182
18182
|
if (!f) return;
|
18183
|
-
const C = (f == null ? void 0 : f.id) || f,
|
18184
|
-
if (!(
|
18183
|
+
const C = (f == null ? void 0 : f.id) || f, z = this.layerList.find((S) => S.id === f) || f;
|
18184
|
+
if (!(z != null && z.id)) throw new Error("MixinError: Layer has no id");
|
18185
18185
|
I.getStyle().layers.filter((S) => S.id.match(C)).forEach((S) => {
|
18186
18186
|
I.setLayoutProperty(
|
18187
18187
|
S.id,
|
18188
18188
|
"visibility",
|
18189
18189
|
x ? "visible" : "none"
|
18190
18190
|
);
|
18191
|
-
}), x && await this.addLayer(
|
18191
|
+
}), x && await this.addLayer(z);
|
18192
18192
|
},
|
18193
18193
|
async addLayer(f, x = this == null ? void 0 : this.map) {
|
18194
|
-
var
|
18194
|
+
var z, U;
|
18195
18195
|
const I = this.layerList.find((S) => S.id === f) || f;
|
18196
|
-
!this.map.getStyle() || this.map.getStyle().layers.find((S) => S.id === I.id) || (this.layerList.find((S) => S.id === I.id) || this.layerList.push(I), (I.service === "vtile" || I.service === "vector" || (
|
18196
|
+
!this.map.getStyle() || this.map.getStyle().layers.find((S) => S.id === I.id) || (this.layerList.find((S) => S.id === I.id) || this.layerList.push(I), (I.service === "vtile" || I.service === "vector" || (z = I.url) != null && z.includes(".vmt")) && this.addVtileLayer(I, x), I.service === "geojson" && this.addGeoJsonLayer(I, x), ((U = I.url) != null && U.includes(".png") || ["tms", "raster"].includes(I.service)) && await this.addRasterLayer(I, x));
|
18197
18197
|
},
|
18198
18198
|
async addRasterLayer(f, x = this == null ? void 0 : this.map) {
|
18199
18199
|
var I;
|
@@ -18215,21 +18215,21 @@ const _l = {
|
|
18215
18215
|
},
|
18216
18216
|
async updateStyle(f, x = this == null ? void 0 : this.map) {
|
18217
18217
|
const I = f.id;
|
18218
|
-
x.getStyle().layers.forEach(async (
|
18219
|
-
|
18218
|
+
x.getStyle().layers.forEach(async (z) => {
|
18219
|
+
z.source === I && x.getLayer(z.id) && await x.removeLayer(z.id);
|
18220
18220
|
}), (await Zh(
|
18221
18221
|
f.style,
|
18222
18222
|
f.source || f.id,
|
18223
18223
|
x,
|
18224
18224
|
this.prefix
|
18225
|
-
) || f.layers || []).forEach((
|
18225
|
+
) || f.layers || []).forEach((z, U) => {
|
18226
18226
|
const S = {
|
18227
|
-
...
|
18227
|
+
...z,
|
18228
18228
|
id: `${f.id}-${U}`,
|
18229
18229
|
source: f.id,
|
18230
|
-
"source-layer":
|
18231
|
-
maxzoom: +
|
18232
|
-
minzoom: +
|
18230
|
+
"source-layer": z["source-layer"] || f.source || f.id,
|
18231
|
+
maxzoom: +z.maxzoom || 24,
|
18232
|
+
minzoom: +z.minzoom || 0
|
18233
18233
|
};
|
18234
18234
|
x.addLayer(S);
|
18235
18235
|
});
|
@@ -18262,8 +18262,8 @@ const _l = {
|
|
18262
18262
|
});
|
18263
18263
|
},
|
18264
18264
|
async addGeoJsonLayer(f, x = this.map) {
|
18265
|
-
var
|
18266
|
-
const I = f.data || ((
|
18265
|
+
var z;
|
18266
|
+
const I = f.data || ((z = f == null ? void 0 : f.url) != null && z.startsWith("http") ? "" : window.location.origin) + f.url;
|
18267
18267
|
x.addSource(f.id, { type: "geojson", data: I }), (await Zh(
|
18268
18268
|
f.style,
|
18269
18269
|
I.source || I.id,
|
@@ -18308,7 +18308,7 @@ const _l = {
|
|
18308
18308
|
// }
|
18309
18309
|
// },
|
18310
18310
|
async setFilter(f, x) {
|
18311
|
-
const I = this.layerList.find((
|
18311
|
+
const I = this.layerList.find((z) => z.id === f);
|
18312
18312
|
await (await this.map.getSource(f)).setTiles([
|
18313
18313
|
`${window.location.origin}${I.url}${I.url.includes("?") ? "&" : "?"}filter=${x}${I.props ? `&props=${I.props}` : ""}`
|
18314
18314
|
]);
|
@@ -18326,8 +18326,8 @@ const _l = {
|
|
18326
18326
|
}
|
18327
18327
|
}, Ji = (f, x) => {
|
18328
18328
|
const I = f.__vccOpts || f;
|
18329
|
-
for (const [C,
|
18330
|
-
I[C] =
|
18329
|
+
for (const [C, z] of x)
|
18330
|
+
I[C] = z;
|
18331
18331
|
return I;
|
18332
18332
|
}, tg = {}, ig = {
|
18333
18333
|
class: "w-48 mx-auto mb-4",
|
@@ -18373,9 +18373,9 @@ const hg = Mc("string"), yr = Mc("function"), Ip = Mc("number"), zc = (f) => f !
|
|
18373
18373
|
function yl(f, x, { allOwnKeys: I = !1 } = {}) {
|
18374
18374
|
if (f === null || typeof f > "u")
|
18375
18375
|
return;
|
18376
|
-
let C,
|
18376
|
+
let C, z;
|
18377
18377
|
if (typeof f != "object" && (f = [f]), Ko(f))
|
18378
|
-
for (C = 0,
|
18378
|
+
for (C = 0, z = f.length; C < z; C++)
|
18379
18379
|
x.call(null, f[C], C, f);
|
18380
18380
|
else {
|
18381
18381
|
const U = I ? Object.getOwnPropertyNames(f) : Object.keys(f), S = U.length;
|
@@ -18387,35 +18387,35 @@ function yl(f, x, { allOwnKeys: I = !1 } = {}) {
|
|
18387
18387
|
function kp(f, x) {
|
18388
18388
|
x = x.toLowerCase();
|
18389
18389
|
const I = Object.keys(f);
|
18390
|
-
let C = I.length,
|
18390
|
+
let C = I.length, z;
|
18391
18391
|
for (; C-- > 0; )
|
18392
|
-
if (
|
18393
|
-
return
|
18392
|
+
if (z = I[C], x === z.toLowerCase())
|
18393
|
+
return z;
|
18394
18394
|
return null;
|
18395
18395
|
}
|
18396
18396
|
const qs = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Pp = (f) => !gl(f) && f !== qs;
|
18397
18397
|
function Kh() {
|
18398
|
-
const { caseless: f } = Pp(this) && this || {}, x = {}, I = (C,
|
18399
|
-
const U = f && kp(x,
|
18398
|
+
const { caseless: f } = Pp(this) && this || {}, x = {}, I = (C, z) => {
|
18399
|
+
const U = f && kp(x, z) || z;
|
18400
18400
|
kc(x[U]) && kc(C) ? x[U] = Kh(x[U], C) : kc(C) ? x[U] = Kh({}, C) : Ko(C) ? x[U] = C.slice() : x[U] = C;
|
18401
18401
|
};
|
18402
|
-
for (let C = 0,
|
18402
|
+
for (let C = 0, z = arguments.length; C < z; C++)
|
18403
18403
|
arguments[C] && yl(arguments[C], I);
|
18404
18404
|
return x;
|
18405
18405
|
}
|
18406
|
-
const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (
|
18407
|
-
I && yr(
|
18406
|
+
const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (z, U) => {
|
18407
|
+
I && yr(z) ? f[U] = Sp(z, I) : f[U] = z;
|
18408
18408
|
}, { allOwnKeys: C }), f), Ig = (f) => (f.charCodeAt(0) === 65279 && (f = f.slice(1)), f), kg = (f, x, I, C) => {
|
18409
18409
|
f.prototype = Object.create(x.prototype, C), f.prototype.constructor = f, Object.defineProperty(f, "super", {
|
18410
18410
|
value: x.prototype
|
18411
18411
|
}), I && Object.assign(f.prototype, I);
|
18412
18412
|
}, Pg = (f, x, I, C) => {
|
18413
|
-
let
|
18413
|
+
let z, U, S;
|
18414
18414
|
const c = {};
|
18415
18415
|
if (x = x || {}, f == null) return x;
|
18416
18416
|
do {
|
18417
|
-
for (
|
18418
|
-
S =
|
18417
|
+
for (z = Object.getOwnPropertyNames(f), U = z.length; U-- > 0; )
|
18418
|
+
S = z[U], (!C || C(S, f, x)) && !c[S] && (x[S] = f[S], c[S] = !0);
|
18419
18419
|
f = I !== !1 && nu(f);
|
18420
18420
|
} while (f && (!I || I(f, x)) && f !== Object.prototype);
|
18421
18421
|
return x;
|
@@ -18434,9 +18434,9 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (L, U) => {
|
|
18434
18434
|
return I;
|
18435
18435
|
}, Eg = /* @__PURE__ */ ((f) => (x) => f && x instanceof f)(typeof Uint8Array < "u" && nu(Uint8Array)), Mg = (f, x) => {
|
18436
18436
|
const C = (f && f[Symbol.iterator]).call(f);
|
18437
|
-
let
|
18438
|
-
for (; (
|
18439
|
-
const U =
|
18437
|
+
let z;
|
18438
|
+
for (; (z = C.next()) && !z.done; ) {
|
18439
|
+
const U = z.value;
|
18440
18440
|
x.call(f, U[0], U[1]);
|
18441
18441
|
}
|
18442
18442
|
}, zg = (f, x) => {
|
@@ -18447,14 +18447,14 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (L, U) => {
|
|
18447
18447
|
return C;
|
18448
18448
|
}, Lg = Zr("HTMLFormElement"), Dg = (f) => f.toLowerCase().replace(
|
18449
18449
|
/[-_\s]([a-z\d])(\w*)/g,
|
18450
|
-
function(I, C,
|
18451
|
-
return C.toUpperCase() +
|
18450
|
+
function(I, C, z) {
|
18451
|
+
return C.toUpperCase() + z;
|
18452
18452
|
}
|
18453
18453
|
), Qd = (({ hasOwnProperty: f }) => (x, I) => f.call(x, I))(Object.prototype), Rg = Zr("RegExp"), Ap = (f, x) => {
|
18454
18454
|
const I = Object.getOwnPropertyDescriptors(f), C = {};
|
18455
|
-
yl(I, (
|
18455
|
+
yl(I, (z, U) => {
|
18456
18456
|
let S;
|
18457
|
-
(S = x(
|
18457
|
+
(S = x(z, U, f)) !== !1 && (C[U] = S || z);
|
18458
18458
|
}), Object.defineProperties(f, C);
|
18459
18459
|
}, Bg = (f) => {
|
18460
18460
|
Ap(f, (x, I) => {
|
@@ -18472,8 +18472,8 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (L, U) => {
|
|
18472
18472
|
}
|
18473
18473
|
});
|
18474
18474
|
}, Fg = (f, x) => {
|
18475
|
-
const I = {}, C = (
|
18476
|
-
|
18475
|
+
const I = {}, C = (z) => {
|
18476
|
+
z.forEach((U) => {
|
18477
18477
|
I[U] = !0;
|
18478
18478
|
});
|
18479
18479
|
};
|
@@ -18494,26 +18494,26 @@ function $g(f) {
|
|
18494
18494
|
return !!(f && yr(f.append) && f[Symbol.toStringTag] === "FormData" && f[Symbol.iterator]);
|
18495
18495
|
}
|
18496
18496
|
const Ug = (f) => {
|
18497
|
-
const x = new Array(10), I = (C,
|
18497
|
+
const x = new Array(10), I = (C, z) => {
|
18498
18498
|
if (zc(C)) {
|
18499
18499
|
if (x.indexOf(C) >= 0)
|
18500
18500
|
return;
|
18501
18501
|
if (!("toJSON" in C)) {
|
18502
|
-
x[
|
18502
|
+
x[z] = C;
|
18503
18503
|
const U = Ko(C) ? [] : {};
|
18504
18504
|
return yl(C, (S, c) => {
|
18505
|
-
const pe = I(S,
|
18505
|
+
const pe = I(S, z + 1);
|
18506
18506
|
!gl(pe) && (U[c] = pe);
|
18507
|
-
}), x[
|
18507
|
+
}), x[z] = void 0, U;
|
18508
18508
|
}
|
18509
18509
|
}
|
18510
18510
|
return C;
|
18511
18511
|
};
|
18512
18512
|
return I(f, 0);
|
18513
|
-
}, jg = Zr("AsyncFunction"), qg = (f) => f && (zc(f) || yr(f)) && yr(f.then) && yr(f.catch), Ep = ((f, x) => f ? setImmediate : x ? ((I, C) => (qs.addEventListener("message", ({ source:
|
18514
|
-
|
18515
|
-
}, !1), (
|
18516
|
-
C.push(
|
18513
|
+
}, jg = Zr("AsyncFunction"), qg = (f) => f && (zc(f) || yr(f)) && yr(f.then) && yr(f.catch), Ep = ((f, x) => f ? setImmediate : x ? ((I, C) => (qs.addEventListener("message", ({ source: z, data: U }) => {
|
18514
|
+
z === qs && U === I && C.length && C.shift()();
|
18515
|
+
}, !1), (z) => {
|
18516
|
+
C.push(z), qs.postMessage(I, "*");
|
18517
18517
|
}))(`axios@${Math.random()}`, []) : (I) => setTimeout(I))(
|
18518
18518
|
typeof setImmediate == "function",
|
18519
18519
|
yr(qs.postMessage)
|
@@ -18577,8 +18577,8 @@ const Ug = (f) => {
|
|
18577
18577
|
setImmediate: Ep,
|
18578
18578
|
asap: Zg
|
18579
18579
|
};
|
18580
|
-
function ht(f, x, I, C,
|
18581
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = f, this.name = "AxiosError", x && (this.code = x), I && (this.config = I), C && (this.request = C),
|
18580
|
+
function ht(f, x, I, C, z) {
|
18581
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = f, this.name = "AxiosError", x && (this.code = x), I && (this.config = I), C && (this.request = C), z && (this.response = z);
|
18582
18582
|
}
|
18583
18583
|
me.inherits(ht, Error, {
|
18584
18584
|
toJSON: function() {
|
@@ -18621,11 +18621,11 @@ const Mp = ht.prototype, zp = {};
|
|
18621
18621
|
});
|
18622
18622
|
Object.defineProperties(ht, zp);
|
18623
18623
|
Object.defineProperty(Mp, "isAxiosError", { value: !0 });
|
18624
|
-
ht.from = (f, x, I, C,
|
18624
|
+
ht.from = (f, x, I, C, z, U) => {
|
18625
18625
|
const S = Object.create(Mp);
|
18626
18626
|
return me.toFlatObject(f, S, function(pe) {
|
18627
18627
|
return pe !== Error.prototype;
|
18628
|
-
}, (c) => c !== "isAxiosError"), ht.call(S, f.message, x, I, C,
|
18628
|
+
}, (c) => c !== "isAxiosError"), ht.call(S, f.message, x, I, C, z), S.cause = f, S.name = f.name, U && Object.assign(S, U), S;
|
18629
18629
|
};
|
18630
18630
|
const Gg = null;
|
18631
18631
|
function Yh(f) {
|
@@ -18635,8 +18635,8 @@ function Lp(f) {
|
|
18635
18635
|
return me.endsWith(f, "[]") ? f.slice(0, -2) : f;
|
18636
18636
|
}
|
18637
18637
|
function tp(f, x, I) {
|
18638
|
-
return f ? f.concat(x).map(function(
|
18639
|
-
return
|
18638
|
+
return f ? f.concat(x).map(function(z, U) {
|
18639
|
+
return z = Lp(z), !I && U ? "[" + z + "]" : z;
|
18640
18640
|
}).join(I ? "." : "") : x;
|
18641
18641
|
}
|
18642
18642
|
function Hg(f) {
|
@@ -18655,23 +18655,23 @@ function Lc(f, x, I) {
|
|
18655
18655
|
}, !1, function(Ke, Oe) {
|
18656
18656
|
return !me.isUndefined(Oe[Ke]);
|
18657
18657
|
});
|
18658
|
-
const C = I.metaTokens,
|
18659
|
-
if (!me.isFunction(
|
18658
|
+
const C = I.metaTokens, z = I.visitor || xe, U = I.dots, S = I.indexes, pe = (I.Blob || typeof Blob < "u" && Blob) && me.isSpecCompliantForm(x);
|
18659
|
+
if (!me.isFunction(z))
|
18660
18660
|
throw new TypeError("visitor must be a function");
|
18661
|
-
function fe(
|
18662
|
-
if (
|
18663
|
-
if (me.isDate(
|
18664
|
-
return
|
18665
|
-
if (!pe && me.isBlob(
|
18661
|
+
function fe($e) {
|
18662
|
+
if ($e === null) return "";
|
18663
|
+
if (me.isDate($e))
|
18664
|
+
return $e.toISOString();
|
18665
|
+
if (!pe && me.isBlob($e))
|
18666
18666
|
throw new ht("Blob is not supported. Use a Buffer instead.");
|
18667
|
-
return me.isArrayBuffer(
|
18667
|
+
return me.isArrayBuffer($e) || me.isTypedArray($e) ? pe && typeof Blob == "function" ? new Blob([$e]) : Buffer.from($e) : $e;
|
18668
18668
|
}
|
18669
|
-
function xe(
|
18670
|
-
let gt =
|
18671
|
-
if (
|
18669
|
+
function xe($e, Ke, Oe) {
|
18670
|
+
let gt = $e;
|
18671
|
+
if ($e && !Oe && typeof $e == "object") {
|
18672
18672
|
if (me.endsWith(Ke, "{}"))
|
18673
|
-
Ke = C ? Ke : Ke.slice(0, -2),
|
18674
|
-
else if (me.isArray(
|
18673
|
+
Ke = C ? Ke : Ke.slice(0, -2), $e = JSON.stringify($e);
|
18674
|
+
else if (me.isArray($e) && Hg($e) || (me.isFileList($e) || me.endsWith(Ke, "[]")) && (gt = me.toArray($e)))
|
18675
18675
|
return Ke = Lp(Ke), gt.forEach(function(He, Vt) {
|
18676
18676
|
!(me.isUndefined(He) || He === null) && x.append(
|
18677
18677
|
// eslint-disable-next-line no-nested-ternary
|
@@ -18680,31 +18680,31 @@ function Lc(f, x, I) {
|
|
18680
18680
|
);
|
18681
18681
|
}), !1;
|
18682
18682
|
}
|
18683
|
-
return Yh(
|
18683
|
+
return Yh($e) ? !0 : (x.append(tp(Oe, Ke, U), fe($e)), !1);
|
18684
18684
|
}
|
18685
18685
|
const oe = [], ae = Object.assign(Wg, {
|
18686
18686
|
defaultVisitor: xe,
|
18687
18687
|
convertValue: fe,
|
18688
18688
|
isVisitable: Yh
|
18689
18689
|
});
|
18690
|
-
function
|
18691
|
-
if (!me.isUndefined(
|
18692
|
-
if (oe.indexOf(
|
18690
|
+
function ut($e, Ke) {
|
18691
|
+
if (!me.isUndefined($e)) {
|
18692
|
+
if (oe.indexOf($e) !== -1)
|
18693
18693
|
throw Error("Circular reference detected in " + Ke.join("."));
|
18694
|
-
oe.push(
|
18695
|
-
(!(me.isUndefined(gt) || gt === null) &&
|
18694
|
+
oe.push($e), me.forEach($e, function(gt, ot) {
|
18695
|
+
(!(me.isUndefined(gt) || gt === null) && z.call(
|
18696
18696
|
x,
|
18697
18697
|
gt,
|
18698
18698
|
me.isString(ot) ? ot.trim() : ot,
|
18699
18699
|
Ke,
|
18700
18700
|
ae
|
18701
|
-
)) === !0 &&
|
18701
|
+
)) === !0 && ut(gt, Ke ? Ke.concat(ot) : [ot]);
|
18702
18702
|
}), oe.pop();
|
18703
18703
|
}
|
18704
18704
|
}
|
18705
18705
|
if (!me.isObject(f))
|
18706
18706
|
throw new TypeError("data must be an object");
|
18707
|
-
return
|
18707
|
+
return ut(f), x;
|
18708
18708
|
}
|
18709
18709
|
function ip(f) {
|
18710
18710
|
const x = {
|
@@ -18731,8 +18731,8 @@ Dp.toString = function(x) {
|
|
18731
18731
|
const I = x ? function(C) {
|
18732
18732
|
return x.call(this, C, ip);
|
18733
18733
|
} : ip;
|
18734
|
-
return this._pairs.map(function(
|
18735
|
-
return I(
|
18734
|
+
return this._pairs.map(function(z) {
|
18735
|
+
return I(z[0]) + "=" + I(z[1]);
|
18736
18736
|
}, "").join("&");
|
18737
18737
|
};
|
18738
18738
|
function Xg(f) {
|
@@ -18741,9 +18741,9 @@ function Xg(f) {
|
|
18741
18741
|
function Rp(f, x, I) {
|
18742
18742
|
if (!x)
|
18743
18743
|
return f;
|
18744
|
-
const C = I && I.encode || Xg,
|
18744
|
+
const C = I && I.encode || Xg, z = I && I.serialize;
|
18745
18745
|
let U;
|
18746
|
-
if (
|
18746
|
+
if (z ? U = z(x, I) : U = me.isURLSearchParams(x) ? x.toString() : new su(x, I).toString(C), U) {
|
18747
18747
|
const S = f.indexOf("#");
|
18748
18748
|
S !== -1 && (f = f.slice(0, S)), f += (f.indexOf("?") === -1 ? "?" : "&") + U;
|
18749
18749
|
}
|
@@ -18828,7 +18828,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", i_
|
|
18828
18828
|
};
|
18829
18829
|
function n_(f, x) {
|
18830
18830
|
return Lc(f, new qr.classes.URLSearchParams(), Object.assign({
|
18831
|
-
visitor: function(I, C,
|
18831
|
+
visitor: function(I, C, z, U) {
|
18832
18832
|
return qr.isNode && me.isBuffer(I) ? (this.append(C, I.toString("base64")), !1) : U.defaultVisitor.apply(this, arguments);
|
18833
18833
|
}
|
18834
18834
|
}, x));
|
@@ -18839,23 +18839,23 @@ function s_(f) {
|
|
18839
18839
|
function o_(f) {
|
18840
18840
|
const x = {}, I = Object.keys(f);
|
18841
18841
|
let C;
|
18842
|
-
const
|
18842
|
+
const z = I.length;
|
18843
18843
|
let U;
|
18844
|
-
for (C = 0; C <
|
18844
|
+
for (C = 0; C < z; C++)
|
18845
18845
|
U = I[C], x[U] = f[U];
|
18846
18846
|
return x;
|
18847
18847
|
}
|
18848
18848
|
function Fp(f) {
|
18849
|
-
function x(I, C,
|
18849
|
+
function x(I, C, z, U) {
|
18850
18850
|
let S = I[U++];
|
18851
18851
|
if (S === "__proto__") return !0;
|
18852
18852
|
const c = Number.isFinite(+S), pe = U >= I.length;
|
18853
|
-
return S = !S && me.isArray(
|
18853
|
+
return S = !S && me.isArray(z) ? z.length : S, pe ? (me.hasOwnProp(z, S) ? z[S] = [z[S], C] : z[S] = C, !c) : ((!z[S] || !me.isObject(z[S])) && (z[S] = []), x(I, C, z[S], U) && me.isArray(z[S]) && (z[S] = o_(z[S])), !c);
|
18854
18854
|
}
|
18855
18855
|
if (me.isFormData(f) && me.isFunction(f.entries)) {
|
18856
18856
|
const I = {};
|
18857
|
-
return me.forEachEntry(f, (C,
|
18858
|
-
x(s_(C),
|
18857
|
+
return me.forEachEntry(f, (C, z) => {
|
18858
|
+
x(s_(C), z, I, 0);
|
18859
18859
|
}), I;
|
18860
18860
|
}
|
18861
18861
|
return null;
|
@@ -18874,9 +18874,9 @@ const xl = {
|
|
18874
18874
|
transitional: Bp,
|
18875
18875
|
adapter: ["xhr", "http", "fetch"],
|
18876
18876
|
transformRequest: [function(x, I) {
|
18877
|
-
const C = I.getContentType() || "",
|
18877
|
+
const C = I.getContentType() || "", z = C.indexOf("application/json") > -1, U = me.isObject(x);
|
18878
18878
|
if (U && me.isHTMLForm(x) && (x = new FormData(x)), me.isFormData(x))
|
18879
|
-
return
|
18879
|
+
return z ? JSON.stringify(Fp(x)) : x;
|
18880
18880
|
if (me.isArrayBuffer(x) || me.isBuffer(x) || me.isStream(x) || me.isFile(x) || me.isBlob(x) || me.isReadableStream(x))
|
18881
18881
|
return x;
|
18882
18882
|
if (me.isArrayBufferView(x))
|
@@ -18896,14 +18896,14 @@ const xl = {
|
|
18896
18896
|
);
|
18897
18897
|
}
|
18898
18898
|
}
|
18899
|
-
return U ||
|
18899
|
+
return U || z ? (I.setContentType("application/json", !1), a_(x)) : x;
|
18900
18900
|
}],
|
18901
18901
|
transformResponse: [function(x) {
|
18902
|
-
const I = this.transitional || xl.transitional, C = I && I.forcedJSONParsing,
|
18902
|
+
const I = this.transitional || xl.transitional, C = I && I.forcedJSONParsing, z = this.responseType === "json";
|
18903
18903
|
if (me.isResponse(x) || me.isReadableStream(x))
|
18904
18904
|
return x;
|
18905
|
-
if (x && me.isString(x) && (C && !this.responseType ||
|
18906
|
-
const S = !(I && I.silentJSONParsing) &&
|
18905
|
+
if (x && me.isString(x) && (C && !this.responseType || z)) {
|
18906
|
+
const S = !(I && I.silentJSONParsing) && z;
|
18907
18907
|
try {
|
18908
18908
|
return JSON.parse(x);
|
18909
18909
|
} catch (c) {
|
@@ -18959,10 +18959,10 @@ const l_ = me.toObjectSet([
|
|
18959
18959
|
"user-agent"
|
18960
18960
|
]), c_ = (f) => {
|
18961
18961
|
const x = {};
|
18962
|
-
let I, C,
|
18962
|
+
let I, C, z;
|
18963
18963
|
return f && f.split(`
|
18964
18964
|
`).forEach(function(S) {
|
18965
|
-
|
18965
|
+
z = S.indexOf(":"), I = S.substring(0, z).trim().toLowerCase(), C = S.substring(z + 1).trim(), !(!I || x[I] && l_[I]) && (I === "set-cookie" ? x[I] ? x[I].push(C) : x[I] = [C] : x[I] = x[I] ? x[I] + ", " + C : C);
|
18966
18966
|
}), x;
|
18967
18967
|
}, np = Symbol("internals");
|
18968
18968
|
function fl(f) {
|
@@ -18979,10 +18979,10 @@ function h_(f) {
|
|
18979
18979
|
return x;
|
18980
18980
|
}
|
18981
18981
|
const u_ = (f) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(f.trim());
|
18982
|
-
function Hh(f, x, I, C,
|
18982
|
+
function Hh(f, x, I, C, z) {
|
18983
18983
|
if (me.isFunction(C))
|
18984
18984
|
return C.call(this, x, I);
|
18985
|
-
if (
|
18985
|
+
if (z && (x = I), !!me.isString(x)) {
|
18986
18986
|
if (me.isString(C))
|
18987
18987
|
return x.indexOf(C) !== -1;
|
18988
18988
|
if (me.isRegExp(C))
|
@@ -18996,8 +18996,8 @@ function p_(f, x) {
|
|
18996
18996
|
const I = me.toCamelCase(" " + x);
|
18997
18997
|
["get", "set", "has"].forEach((C) => {
|
18998
18998
|
Object.defineProperty(f, C + I, {
|
18999
|
-
value: function(
|
19000
|
-
return this[C].call(this, x,
|
18999
|
+
value: function(z, U, S) {
|
19000
|
+
return this[C].call(this, x, z, U, S);
|
19001
19001
|
},
|
19002
19002
|
configurable: !0
|
19003
19003
|
});
|
@@ -19008,13 +19008,13 @@ class rr {
|
|
19008
19008
|
x && this.set(x);
|
19009
19009
|
}
|
19010
19010
|
set(x, I, C) {
|
19011
|
-
const
|
19011
|
+
const z = this;
|
19012
19012
|
function U(c, pe, fe) {
|
19013
19013
|
const xe = fl(pe);
|
19014
19014
|
if (!xe)
|
19015
19015
|
throw new Error("header name must be a non-empty string");
|
19016
|
-
const oe = me.findKey(
|
19017
|
-
(!oe ||
|
19016
|
+
const oe = me.findKey(z, xe);
|
19017
|
+
(!oe || z[oe] === void 0 || fe === !0 || fe === void 0 && z[oe] !== !1) && (z[oe || pe] = Pc(c));
|
19018
19018
|
}
|
19019
19019
|
const S = (c, pe) => me.forEach(c, (fe, xe) => U(fe, xe, pe));
|
19020
19020
|
if (me.isPlainObject(x) || x instanceof this.constructor)
|
@@ -19032,15 +19032,15 @@ class rr {
|
|
19032
19032
|
if (x = fl(x), x) {
|
19033
19033
|
const C = me.findKey(this, x);
|
19034
19034
|
if (C) {
|
19035
|
-
const
|
19035
|
+
const z = this[C];
|
19036
19036
|
if (!I)
|
19037
|
-
return
|
19037
|
+
return z;
|
19038
19038
|
if (I === !0)
|
19039
|
-
return h_(
|
19039
|
+
return h_(z);
|
19040
19040
|
if (me.isFunction(I))
|
19041
|
-
return I.call(this,
|
19041
|
+
return I.call(this, z, C);
|
19042
19042
|
if (me.isRegExp(I))
|
19043
|
-
return I.exec(
|
19043
|
+
return I.exec(z);
|
19044
19044
|
throw new TypeError("parser must be boolean|regexp|function");
|
19045
19045
|
}
|
19046
19046
|
}
|
@@ -19054,34 +19054,34 @@ class rr {
|
|
19054
19054
|
}
|
19055
19055
|
delete(x, I) {
|
19056
19056
|
const C = this;
|
19057
|
-
let
|
19057
|
+
let z = !1;
|
19058
19058
|
function U(S) {
|
19059
19059
|
if (S = fl(S), S) {
|
19060
19060
|
const c = me.findKey(C, S);
|
19061
|
-
c && (!I || Hh(C, C[c], c, I)) && (delete C[c],
|
19061
|
+
c && (!I || Hh(C, C[c], c, I)) && (delete C[c], z = !0);
|
19062
19062
|
}
|
19063
19063
|
}
|
19064
|
-
return me.isArray(x) ? x.forEach(U) : U(x),
|
19064
|
+
return me.isArray(x) ? x.forEach(U) : U(x), z;
|
19065
19065
|
}
|
19066
19066
|
clear(x) {
|
19067
19067
|
const I = Object.keys(this);
|
19068
|
-
let C = I.length,
|
19068
|
+
let C = I.length, z = !1;
|
19069
19069
|
for (; C--; ) {
|
19070
19070
|
const U = I[C];
|
19071
|
-
(!x || Hh(this, this[U], U, x, !0)) && (delete this[U],
|
19071
|
+
(!x || Hh(this, this[U], U, x, !0)) && (delete this[U], z = !0);
|
19072
19072
|
}
|
19073
|
-
return
|
19073
|
+
return z;
|
19074
19074
|
}
|
19075
19075
|
normalize(x) {
|
19076
19076
|
const I = this, C = {};
|
19077
|
-
return me.forEach(this, (
|
19077
|
+
return me.forEach(this, (z, U) => {
|
19078
19078
|
const S = me.findKey(C, U);
|
19079
19079
|
if (S) {
|
19080
|
-
I[S] = Pc(
|
19080
|
+
I[S] = Pc(z), delete I[U];
|
19081
19081
|
return;
|
19082
19082
|
}
|
19083
19083
|
const c = x ? d_(U) : String(U).trim();
|
19084
|
-
c !== U && delete I[U], I[c] = Pc(
|
19084
|
+
c !== U && delete I[U], I[c] = Pc(z), C[c] = !0;
|
19085
19085
|
}), this;
|
19086
19086
|
}
|
19087
19087
|
concat(...x) {
|
@@ -19089,8 +19089,8 @@ class rr {
|
|
19089
19089
|
}
|
19090
19090
|
toJSON(x) {
|
19091
19091
|
const I = /* @__PURE__ */ Object.create(null);
|
19092
|
-
return me.forEach(this, (C,
|
19093
|
-
C != null && C !== !1 && (I[
|
19092
|
+
return me.forEach(this, (C, z) => {
|
19093
|
+
C != null && C !== !1 && (I[z] = x && me.isArray(C) ? C.join(", ") : C);
|
19094
19094
|
}), I;
|
19095
19095
|
}
|
19096
19096
|
[Symbol.iterator]() {
|
@@ -19108,15 +19108,15 @@ class rr {
|
|
19108
19108
|
}
|
19109
19109
|
static concat(x, ...I) {
|
19110
19110
|
const C = new this(x);
|
19111
|
-
return I.forEach((
|
19111
|
+
return I.forEach((z) => C.set(z)), C;
|
19112
19112
|
}
|
19113
19113
|
static accessor(x) {
|
19114
19114
|
const C = (this[np] = this[np] = {
|
19115
19115
|
accessors: {}
|
19116
|
-
}).accessors,
|
19116
|
+
}).accessors, z = this.prototype;
|
19117
19117
|
function U(S) {
|
19118
19118
|
const c = fl(S);
|
19119
|
-
C[c] || (p_(
|
19119
|
+
C[c] || (p_(z, S), C[c] = !0);
|
19120
19120
|
}
|
19121
19121
|
return me.isArray(x) ? x.forEach(U) : U(x), this;
|
19122
19122
|
}
|
@@ -19133,11 +19133,11 @@ me.reduceDescriptors(rr.prototype, ({ value: f }, x) => {
|
|
19133
19133
|
});
|
19134
19134
|
me.freezeMethods(rr);
|
19135
19135
|
function Wh(f, x) {
|
19136
|
-
const I = this || xl, C = x || I,
|
19136
|
+
const I = this || xl, C = x || I, z = rr.from(C.headers);
|
19137
19137
|
let U = C.data;
|
19138
19138
|
return me.forEach(f, function(c) {
|
19139
|
-
U = c.call(I, U,
|
19140
|
-
}),
|
19139
|
+
U = c.call(I, U, z.normalize(), x ? x.status : void 0);
|
19140
|
+
}), z.normalize(), U;
|
19141
19141
|
}
|
19142
19142
|
function Op(f) {
|
19143
19143
|
return !!(f && f.__CANCEL__);
|
@@ -19165,36 +19165,36 @@ function f_(f) {
|
|
19165
19165
|
function m_(f, x) {
|
19166
19166
|
f = f || 10;
|
19167
19167
|
const I = new Array(f), C = new Array(f);
|
19168
|
-
let
|
19168
|
+
let z = 0, U = 0, S;
|
19169
19169
|
return x = x !== void 0 ? x : 1e3, function(pe) {
|
19170
19170
|
const fe = Date.now(), xe = C[U];
|
19171
|
-
S || (S = fe), I[
|
19171
|
+
S || (S = fe), I[z] = pe, C[z] = fe;
|
19172
19172
|
let oe = U, ae = 0;
|
19173
|
-
for (; oe !==
|
19173
|
+
for (; oe !== z; )
|
19174
19174
|
ae += I[oe++], oe = oe % f;
|
19175
|
-
if (
|
19175
|
+
if (z = (z + 1) % f, z === U && (U = (U + 1) % f), fe - S < x)
|
19176
19176
|
return;
|
19177
|
-
const
|
19178
|
-
return
|
19177
|
+
const ut = xe && fe - xe;
|
19178
|
+
return ut ? Math.round(ae * 1e3 / ut) : void 0;
|
19179
19179
|
};
|
19180
19180
|
}
|
19181
19181
|
function g_(f, x) {
|
19182
|
-
let I = 0, C = 1e3 / x,
|
19182
|
+
let I = 0, C = 1e3 / x, z, U;
|
19183
19183
|
const S = (fe, xe = Date.now()) => {
|
19184
|
-
I = xe,
|
19184
|
+
I = xe, z = null, U && (clearTimeout(U), U = null), f.apply(null, fe);
|
19185
19185
|
};
|
19186
19186
|
return [(...fe) => {
|
19187
19187
|
const xe = Date.now(), oe = xe - I;
|
19188
|
-
oe >= C ? S(fe, xe) : (
|
19189
|
-
U = null, S(
|
19188
|
+
oe >= C ? S(fe, xe) : (z = fe, U || (U = setTimeout(() => {
|
19189
|
+
U = null, S(z);
|
19190
19190
|
}, C - oe)));
|
19191
|
-
}, () =>
|
19191
|
+
}, () => z && S(z)];
|
19192
19192
|
}
|
19193
19193
|
const Ac = (f, x, I = 3) => {
|
19194
19194
|
let C = 0;
|
19195
|
-
const
|
19195
|
+
const z = m_(50, 250);
|
19196
19196
|
return g_((U) => {
|
19197
|
-
const S = U.loaded, c = U.lengthComputable ? U.total : void 0, pe = S - C, fe =
|
19197
|
+
const S = U.loaded, c = U.lengthComputable ? U.total : void 0, pe = S - C, fe = z(pe), xe = S <= c;
|
19198
19198
|
C = S;
|
19199
19199
|
const oe = {
|
19200
19200
|
loaded: S,
|
@@ -19222,7 +19222,7 @@ const Ac = (f, x, I = 3) => {
|
|
19222
19222
|
function() {
|
19223
19223
|
const x = /(msie|trident)/i.test(navigator.userAgent), I = document.createElement("a");
|
19224
19224
|
let C;
|
19225
|
-
function
|
19225
|
+
function z(U) {
|
19226
19226
|
let S = U;
|
19227
19227
|
return x && (I.setAttribute("href", S), S = I.href), I.setAttribute("href", S), {
|
19228
19228
|
href: I.href,
|
@@ -19235,8 +19235,8 @@ const Ac = (f, x, I = 3) => {
|
|
19235
19235
|
pathname: I.pathname.charAt(0) === "/" ? I.pathname : "/" + I.pathname
|
19236
19236
|
};
|
19237
19237
|
}
|
19238
|
-
return C =
|
19239
|
-
const c = me.isString(S) ?
|
19238
|
+
return C = z(window.location.href), function(S) {
|
19239
|
+
const c = me.isString(S) ? z(S) : S;
|
19240
19240
|
return c.protocol === C.protocol && c.host === C.host;
|
19241
19241
|
};
|
19242
19242
|
}()
|
@@ -19250,9 +19250,9 @@ const Ac = (f, x, I = 3) => {
|
|
19250
19250
|
), y_ = qr.hasStandardBrowserEnv ? (
|
19251
19251
|
// Standard browser envs support document.cookie
|
19252
19252
|
{
|
19253
|
-
write(f, x, I, C,
|
19253
|
+
write(f, x, I, C, z, U) {
|
19254
19254
|
const S = [f + "=" + encodeURIComponent(x)];
|
19255
|
-
me.isNumber(I) && S.push("expires=" + new Date(I).toGMTString()), me.isString(C) && S.push("path=" + C), me.isString(
|
19255
|
+
me.isNumber(I) && S.push("expires=" + new Date(I).toGMTString()), me.isString(C) && S.push("path=" + C), me.isString(z) && S.push("domain=" + z), U === !0 && S.push("secure"), document.cookie = S.join("; ");
|
19256
19256
|
},
|
19257
19257
|
read(f) {
|
19258
19258
|
const x = document.cookie.match(new RegExp("(^|;\\s*)(" + f + ")=([^;]*)"));
|
@@ -19290,7 +19290,7 @@ function Xs(f, x) {
|
|
19290
19290
|
function C(fe, xe, oe) {
|
19291
19291
|
return me.isPlainObject(fe) && me.isPlainObject(xe) ? me.merge.call({ caseless: oe }, fe, xe) : me.isPlainObject(xe) ? me.merge({}, xe) : me.isArray(xe) ? xe.slice() : xe;
|
19292
19292
|
}
|
19293
|
-
function
|
19293
|
+
function z(fe, xe, oe) {
|
19294
19294
|
if (me.isUndefined(xe)) {
|
19295
19295
|
if (!me.isUndefined(fe))
|
19296
19296
|
return C(void 0, fe, oe);
|
@@ -19341,16 +19341,16 @@ function Xs(f, x) {
|
|
19341
19341
|
socketPath: S,
|
19342
19342
|
responseEncoding: S,
|
19343
19343
|
validateStatus: c,
|
19344
|
-
headers: (fe, xe) =>
|
19344
|
+
headers: (fe, xe) => z(ap(fe), ap(xe), !0)
|
19345
19345
|
};
|
19346
19346
|
return me.forEach(Object.keys(Object.assign({}, f, x)), function(xe) {
|
19347
|
-
const oe = pe[xe] ||
|
19347
|
+
const oe = pe[xe] || z, ae = oe(f[xe], x[xe], xe);
|
19348
19348
|
me.isUndefined(ae) && oe !== c || (I[xe] = ae);
|
19349
19349
|
}), I;
|
19350
19350
|
}
|
19351
19351
|
const $p = (f) => {
|
19352
19352
|
const x = Xs({}, f);
|
19353
|
-
let { data: I, withXSRFToken: C, xsrfHeaderName:
|
19353
|
+
let { data: I, withXSRFToken: C, xsrfHeaderName: z, xsrfCookieName: U, headers: S, auth: c } = x;
|
19354
19354
|
x.headers = S = rr.from(S), x.url = Rp(Np(x.baseURL, x.url), f.params, f.paramsSerializer), c && S.set(
|
19355
19355
|
"Authorization",
|
19356
19356
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
@@ -19365,21 +19365,21 @@ const $p = (f) => {
|
|
19365
19365
|
}
|
19366
19366
|
}
|
19367
19367
|
if (qr.hasStandardBrowserEnv && (C && me.isFunction(C) && (C = C(x)), C || C !== !1 && __(x.url))) {
|
19368
|
-
const fe =
|
19369
|
-
fe && S.set(
|
19368
|
+
const fe = z && U && y_.read(U);
|
19369
|
+
fe && S.set(z, fe);
|
19370
19370
|
}
|
19371
19371
|
return x;
|
19372
19372
|
}, b_ = typeof XMLHttpRequest < "u", w_ = b_ && function(f) {
|
19373
19373
|
return new Promise(function(I, C) {
|
19374
|
-
const
|
19375
|
-
let U =
|
19376
|
-
const S = rr.from(
|
19377
|
-
let { responseType: c, onUploadProgress: pe, onDownloadProgress: fe } =
|
19374
|
+
const z = $p(f);
|
19375
|
+
let U = z.data;
|
19376
|
+
const S = rr.from(z.headers).normalize();
|
19377
|
+
let { responseType: c, onUploadProgress: pe, onDownloadProgress: fe } = z, xe, oe, ae, ut, $e;
|
19378
19378
|
function Ke() {
|
19379
|
-
|
19379
|
+
ut && ut(), $e && $e(), z.cancelToken && z.cancelToken.unsubscribe(xe), z.signal && z.signal.removeEventListener("abort", xe);
|
19380
19380
|
}
|
19381
19381
|
let Oe = new XMLHttpRequest();
|
19382
|
-
Oe.open(
|
19382
|
+
Oe.open(z.method.toUpperCase(), z.url, !0), Oe.timeout = z.timeout;
|
19383
19383
|
function gt() {
|
19384
19384
|
if (!Oe)
|
19385
19385
|
return;
|
@@ -19406,9 +19406,9 @@ const $p = (f) => {
|
|
19406
19406
|
}, Oe.onerror = function() {
|
19407
19407
|
C(new ht("Network Error", ht.ERR_NETWORK, f, Oe)), Oe = null;
|
19408
19408
|
}, Oe.ontimeout = function() {
|
19409
|
-
let Vt =
|
19410
|
-
const Tt =
|
19411
|
-
|
19409
|
+
let Vt = z.timeout ? "timeout of " + z.timeout + "ms exceeded" : "timeout exceeded";
|
19410
|
+
const Tt = z.transitional || Bp;
|
19411
|
+
z.timeoutErrorMessage && (Vt = z.timeoutErrorMessage), C(new ht(
|
19412
19412
|
Vt,
|
19413
19413
|
Tt.clarifyTimeoutError ? ht.ETIMEDOUT : ht.ECONNABORTED,
|
19414
19414
|
f,
|
@@ -19416,10 +19416,10 @@ const $p = (f) => {
|
|
19416
19416
|
)), Oe = null;
|
19417
19417
|
}, U === void 0 && S.setContentType(null), "setRequestHeader" in Oe && me.forEach(S.toJSON(), function(Vt, Tt) {
|
19418
19418
|
Oe.setRequestHeader(Tt, Vt);
|
19419
|
-
}), me.isUndefined(
|
19419
|
+
}), me.isUndefined(z.withCredentials) || (Oe.withCredentials = !!z.withCredentials), c && c !== "json" && (Oe.responseType = z.responseType), fe && ([ae, $e] = Ac(fe, !0), Oe.addEventListener("progress", ae)), pe && Oe.upload && ([oe, ut] = Ac(pe), Oe.upload.addEventListener("progress", oe), Oe.upload.addEventListener("loadend", ut)), (z.cancelToken || z.signal) && (xe = (He) => {
|
19420
19420
|
Oe && (C(!He || He.type ? new Yo(null, f, Oe) : He), Oe.abort(), Oe = null);
|
19421
|
-
},
|
19422
|
-
const ot = f_(
|
19421
|
+
}, z.cancelToken && z.cancelToken.subscribe(xe), z.signal && (z.signal.aborted ? xe() : z.signal.addEventListener("abort", xe)));
|
19422
|
+
const ot = f_(z.url);
|
19423
19423
|
if (ot && qr.protocols.indexOf(ot) === -1) {
|
19424
19424
|
C(new ht("Unsupported protocol " + ot + ":", ht.ERR_BAD_REQUEST, f));
|
19425
19425
|
return;
|
@@ -19428,7 +19428,7 @@ const $p = (f) => {
|
|
19428
19428
|
});
|
19429
19429
|
}, S_ = (f, x) => {
|
19430
19430
|
let I = new AbortController(), C;
|
19431
|
-
const
|
19431
|
+
const z = function(pe) {
|
19432
19432
|
if (!C) {
|
19433
19433
|
C = !0, S();
|
19434
19434
|
const fe = pe instanceof Error ? pe : this.reason;
|
@@ -19436,14 +19436,14 @@ const $p = (f) => {
|
|
19436
19436
|
}
|
19437
19437
|
};
|
19438
19438
|
let U = x && setTimeout(() => {
|
19439
|
-
|
19439
|
+
z(new ht(`timeout ${x} of ms exceeded`, ht.ETIMEDOUT));
|
19440
19440
|
}, x);
|
19441
19441
|
const S = () => {
|
19442
19442
|
f && (U && clearTimeout(U), U = null, f.forEach((pe) => {
|
19443
|
-
pe && (pe.removeEventListener ? pe.removeEventListener("abort",
|
19443
|
+
pe && (pe.removeEventListener ? pe.removeEventListener("abort", z) : pe.unsubscribe(z));
|
19444
19444
|
}), f = null);
|
19445
19445
|
};
|
19446
|
-
f.forEach((pe) => pe && pe.addEventListener && pe.addEventListener("abort",
|
19446
|
+
f.forEach((pe) => pe && pe.addEventListener && pe.addEventListener("abort", z));
|
19447
19447
|
const { signal: c } = I;
|
19448
19448
|
return c.unsubscribe = S, [c, () => {
|
19449
19449
|
U && clearTimeout(U), U = null;
|
@@ -19454,14 +19454,14 @@ const $p = (f) => {
|
|
19454
19454
|
yield f;
|
19455
19455
|
return;
|
19456
19456
|
}
|
19457
|
-
let C = 0,
|
19457
|
+
let C = 0, z;
|
19458
19458
|
for (; C < I; )
|
19459
|
-
|
19459
|
+
z = C + x, yield f.slice(C, z), C = z;
|
19460
19460
|
}, I_ = async function* (f, x, I) {
|
19461
19461
|
for await (const C of f)
|
19462
19462
|
yield* T_(ArrayBuffer.isView(C) ? C : await I(String(C)), x);
|
19463
|
-
}, lp = (f, x, I, C,
|
19464
|
-
const U = I_(f, x,
|
19463
|
+
}, lp = (f, x, I, C, z) => {
|
19464
|
+
const U = I_(f, x, z);
|
19465
19465
|
let S = 0, c, pe = (fe) => {
|
19466
19466
|
c || (c = !0, C && C(fe));
|
19467
19467
|
};
|
@@ -19475,8 +19475,8 @@ const $p = (f) => {
|
|
19475
19475
|
}
|
19476
19476
|
let ae = oe.byteLength;
|
19477
19477
|
if (I) {
|
19478
|
-
let
|
19479
|
-
I(
|
19478
|
+
let ut = S += ae;
|
19479
|
+
I(ut);
|
19480
19480
|
}
|
19481
19481
|
fe.enqueue(new Uint8Array(oe));
|
19482
19482
|
} catch (xe) {
|
@@ -19534,7 +19534,7 @@ const P_ = async (f) => {
|
|
19534
19534
|
url: x,
|
19535
19535
|
method: I,
|
19536
19536
|
data: C,
|
19537
|
-
signal:
|
19537
|
+
signal: z,
|
19538
19538
|
cancelToken: U,
|
19539
19539
|
timeout: S,
|
19540
19540
|
onDownloadProgress: c,
|
@@ -19545,10 +19545,10 @@ const P_ = async (f) => {
|
|
19545
19545
|
fetchOptions: ae
|
19546
19546
|
} = $p(f);
|
19547
19547
|
fe = fe ? (fe + "").toLowerCase() : "text";
|
19548
|
-
let [
|
19548
|
+
let [ut, $e] = z || U || S ? S_([z, U], S) : [], Ke, Oe;
|
19549
19549
|
const gt = () => {
|
19550
19550
|
!Ke && setTimeout(() => {
|
19551
|
-
|
19551
|
+
ut && ut.unsubscribe();
|
19552
19552
|
}), Ke = !0;
|
19553
19553
|
};
|
19554
19554
|
let ot;
|
@@ -19569,7 +19569,7 @@ const P_ = async (f) => {
|
|
19569
19569
|
}
|
19570
19570
|
me.isString(oe) || (oe = oe ? "include" : "omit"), Oe = new Request(x, {
|
19571
19571
|
...ae,
|
19572
|
-
signal:
|
19572
|
+
signal: ut,
|
19573
19573
|
method: I.toUpperCase(),
|
19574
19574
|
headers: xe.normalize().toJSON(),
|
19575
19575
|
body: C,
|
@@ -19596,7 +19596,7 @@ const P_ = async (f) => {
|
|
19596
19596
|
}
|
19597
19597
|
fe = fe || "text";
|
19598
19598
|
let Tt = await Cc[me.findKey(Cc, fe) || "text"](He, f);
|
19599
|
-
return !Vt && gt(),
|
19599
|
+
return !Vt && gt(), $e && $e(), await new Promise((Jt, jt) => {
|
19600
19600
|
Vp(Jt, jt, {
|
19601
19601
|
data: Tt,
|
19602
19602
|
headers: rr.from(He.headers),
|
@@ -19633,7 +19633,7 @@ const hp = (f) => `- ${f}`, E_ = (f) => me.isFunction(f) || f === null || f ===
|
|
19633
19633
|
f = me.isArray(f) ? f : [f];
|
19634
19634
|
const { length: x } = f;
|
19635
19635
|
let I, C;
|
19636
|
-
const
|
19636
|
+
const z = {};
|
19637
19637
|
for (let U = 0; U < x; U++) {
|
19638
19638
|
I = f[U];
|
19639
19639
|
let S;
|
@@ -19641,10 +19641,10 @@ const hp = (f) => `- ${f}`, E_ = (f) => me.isFunction(f) || f === null || f ===
|
|
19641
19641
|
throw new ht(`Unknown adapter '${S}'`);
|
19642
19642
|
if (C)
|
19643
19643
|
break;
|
19644
|
-
|
19644
|
+
z[S || "#" + U] = C;
|
19645
19645
|
}
|
19646
19646
|
if (!C) {
|
19647
|
-
const U = Object.entries(
|
19647
|
+
const U = Object.entries(z).map(
|
19648
19648
|
([c, pe]) => `adapter ${c} ` + (pe === !1 ? "is not supported by the environment" : "is not available in the build")
|
19649
19649
|
);
|
19650
19650
|
let S = x ? U.length > 1 ? `since :
|
@@ -19689,17 +19689,17 @@ const Zp = "1.7.4", au = {};
|
|
19689
19689
|
});
|
19690
19690
|
const dp = {};
|
19691
19691
|
au.transitional = function(x, I, C) {
|
19692
|
-
function
|
19692
|
+
function z(U, S) {
|
19693
19693
|
return "[Axios v" + Zp + "] Transitional option '" + U + "'" + S + (C ? ". " + C : "");
|
19694
19694
|
}
|
19695
19695
|
return (U, S, c) => {
|
19696
19696
|
if (x === !1)
|
19697
19697
|
throw new ht(
|
19698
|
-
|
19698
|
+
z(S, " has been removed" + (I ? " in " + I : "")),
|
19699
19699
|
ht.ERR_DEPRECATED
|
19700
19700
|
);
|
19701
19701
|
return I && !dp[S] && (dp[S] = !0, console.warn(
|
19702
|
-
|
19702
|
+
z(
|
19703
19703
|
S,
|
19704
19704
|
" has been deprecated since v" + I + " and will be removed in the near future"
|
19705
19705
|
)
|
@@ -19710,9 +19710,9 @@ function M_(f, x, I) {
|
|
19710
19710
|
if (typeof f != "object")
|
19711
19711
|
throw new ht("options must be an object", ht.ERR_BAD_OPTION_VALUE);
|
19712
19712
|
const C = Object.keys(f);
|
19713
|
-
let
|
19714
|
-
for (;
|
19715
|
-
const U = C[
|
19713
|
+
let z = C.length;
|
19714
|
+
for (; z-- > 0; ) {
|
19715
|
+
const U = C[z], S = x[U];
|
19716
19716
|
if (S) {
|
19717
19717
|
const c = f[U], pe = c === void 0 || S(c, U, f);
|
19718
19718
|
if (pe !== !0)
|
@@ -19747,9 +19747,9 @@ class Gs {
|
|
19747
19747
|
return await this._request(x, I);
|
19748
19748
|
} catch (C) {
|
19749
19749
|
if (C instanceof Error) {
|
19750
|
-
let
|
19751
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
19752
|
-
const U =
|
19750
|
+
let z;
|
19751
|
+
Error.captureStackTrace ? Error.captureStackTrace(z = {}) : z = new Error();
|
19752
|
+
const U = z.stack ? z.stack.replace(/^.+\n/, "") : "";
|
19753
19753
|
try {
|
19754
19754
|
C.stack ? U && !String(C.stack).endsWith(U.replace(/^.+\n.+\n/, "")) && (C.stack += `
|
19755
19755
|
` + U) : C.stack = U;
|
@@ -19761,14 +19761,14 @@ class Gs {
|
|
19761
19761
|
}
|
19762
19762
|
_request(x, I) {
|
19763
19763
|
typeof x == "string" ? (I = I || {}, I.url = x) : I = x || {}, I = Xs(this.defaults, I);
|
19764
|
-
const { transitional: C, paramsSerializer:
|
19764
|
+
const { transitional: C, paramsSerializer: z, headers: U } = I;
|
19765
19765
|
C !== void 0 && iu.assertOptions(C, {
|
19766
19766
|
silentJSONParsing: os.transitional(os.boolean),
|
19767
19767
|
forcedJSONParsing: os.transitional(os.boolean),
|
19768
19768
|
clarifyTimeoutError: os.transitional(os.boolean)
|
19769
|
-
}, !1),
|
19770
|
-
serialize:
|
19771
|
-
} : iu.assertOptions(
|
19769
|
+
}, !1), z != null && (me.isFunction(z) ? I.paramsSerializer = {
|
19770
|
+
serialize: z
|
19771
|
+
} : iu.assertOptions(z, {
|
19772
19772
|
encode: os.function,
|
19773
19773
|
serialize: os.function
|
19774
19774
|
}, !0)), I.method = (I.method || this.defaults.method || "get").toLowerCase();
|
@@ -19778,8 +19778,8 @@ class Gs {
|
|
19778
19778
|
);
|
19779
19779
|
U && me.forEach(
|
19780
19780
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
19781
|
-
(
|
19782
|
-
delete U[
|
19781
|
+
($e) => {
|
19782
|
+
delete U[$e];
|
19783
19783
|
}
|
19784
19784
|
), I.headers = rr.concat(S, U);
|
19785
19785
|
const c = [];
|
@@ -19793,26 +19793,26 @@ class Gs {
|
|
19793
19793
|
});
|
19794
19794
|
let xe, oe = 0, ae;
|
19795
19795
|
if (!pe) {
|
19796
|
-
const
|
19797
|
-
for (
|
19798
|
-
xe = xe.then(
|
19796
|
+
const $e = [up.bind(this), void 0];
|
19797
|
+
for ($e.unshift.apply($e, c), $e.push.apply($e, fe), ae = $e.length, xe = Promise.resolve(I); oe < ae; )
|
19798
|
+
xe = xe.then($e[oe++], $e[oe++]);
|
19799
19799
|
return xe;
|
19800
19800
|
}
|
19801
19801
|
ae = c.length;
|
19802
|
-
let
|
19802
|
+
let ut = I;
|
19803
19803
|
for (oe = 0; oe < ae; ) {
|
19804
|
-
const
|
19804
|
+
const $e = c[oe++], Ke = c[oe++];
|
19805
19805
|
try {
|
19806
|
-
|
19806
|
+
ut = $e(ut);
|
19807
19807
|
} catch (Oe) {
|
19808
19808
|
Ke.call(this, Oe);
|
19809
19809
|
break;
|
19810
19810
|
}
|
19811
19811
|
}
|
19812
19812
|
try {
|
19813
|
-
xe = up.call(this,
|
19814
|
-
} catch (
|
19815
|
-
return Promise.reject(
|
19813
|
+
xe = up.call(this, ut);
|
19814
|
+
} catch ($e) {
|
19815
|
+
return Promise.reject($e);
|
19816
19816
|
}
|
19817
19817
|
for (oe = 0, ae = fe.length; oe < ae; )
|
19818
19818
|
xe = xe.then(fe[oe++], fe[oe++]);
|
@@ -19857,17 +19857,17 @@ class lu {
|
|
19857
19857
|
I = U;
|
19858
19858
|
});
|
19859
19859
|
const C = this;
|
19860
|
-
this.promise.then((
|
19860
|
+
this.promise.then((z) => {
|
19861
19861
|
if (!C._listeners) return;
|
19862
19862
|
let U = C._listeners.length;
|
19863
19863
|
for (; U-- > 0; )
|
19864
|
-
C._listeners[U](
|
19864
|
+
C._listeners[U](z);
|
19865
19865
|
C._listeners = null;
|
19866
|
-
}), this.promise.then = (
|
19866
|
+
}), this.promise.then = (z) => {
|
19867
19867
|
let U;
|
19868
19868
|
const S = new Promise((c) => {
|
19869
19869
|
C.subscribe(c), U = c;
|
19870
|
-
}).then(
|
19870
|
+
}).then(z);
|
19871
19871
|
return S.cancel = function() {
|
19872
19872
|
C.unsubscribe(U);
|
19873
19873
|
}, S;
|
@@ -19908,8 +19908,8 @@ class lu {
|
|
19908
19908
|
static source() {
|
19909
19909
|
let x;
|
19910
19910
|
return {
|
19911
|
-
token: new lu(function(
|
19912
|
-
x =
|
19911
|
+
token: new lu(function(z) {
|
19912
|
+
x = z;
|
19913
19913
|
}),
|
19914
19914
|
cancel: x
|
19915
19915
|
};
|
@@ -19993,8 +19993,8 @@ Object.entries(ru).forEach(([f, x]) => {
|
|
19993
19993
|
});
|
19994
19994
|
function Gp(f) {
|
19995
19995
|
const x = new Gs(f), I = Sp(Gs.prototype.request, x);
|
19996
|
-
return me.extend(I, Gs.prototype, x, { allOwnKeys: !0 }), me.extend(I, x, null, { allOwnKeys: !0 }), I.create = function(
|
19997
|
-
return Gp(Xs(f,
|
19996
|
+
return me.extend(I, Gs.prototype, x, { allOwnKeys: !0 }), me.extend(I, x, null, { allOwnKeys: !0 }), I.create = function(z) {
|
19997
|
+
return Gp(Xs(f, z));
|
19998
19998
|
}, I;
|
19999
19999
|
}
|
20000
20000
|
const Xt = Gp(xl);
|
@@ -20019,9 +20019,9 @@ Xt.HttpStatusCode = ru;
|
|
20019
20019
|
Xt.default = Xt;
|
20020
20020
|
const D_ = (f, x = 300) => {
|
20021
20021
|
let I;
|
20022
|
-
return function(...
|
20022
|
+
return function(...z) {
|
20023
20023
|
clearTimeout(I), I = setTimeout(() => {
|
20024
|
-
f.apply(this,
|
20024
|
+
f.apply(this, z);
|
20025
20025
|
}, x);
|
20026
20026
|
};
|
20027
20027
|
};
|
@@ -20044,15 +20044,15 @@ function Hp(f, x, I = {}) {
|
|
20044
20044
|
}, x, I);
|
20045
20045
|
}
|
20046
20046
|
function pp(f, x, I = {}) {
|
20047
|
-
for (const
|
20048
|
-
if (
|
20047
|
+
for (const z of f) {
|
20048
|
+
if (z.length < 4)
|
20049
20049
|
throw new Error(
|
20050
20050
|
"Each LinearRing of a Polygon must have 4 or more Positions."
|
20051
20051
|
);
|
20052
|
-
if (
|
20052
|
+
if (z[z.length - 1].length !== z[0].length)
|
20053
20053
|
throw new Error("First and last Position are not equivalent.");
|
20054
|
-
for (let U = 0; U <
|
20055
|
-
if (
|
20054
|
+
for (let U = 0; U < z[z.length - 1].length; U++)
|
20055
|
+
if (z[z.length - 1][U] !== z[0][U])
|
20056
20056
|
throw new Error("First and last Position are not equivalent.");
|
20057
20057
|
}
|
20058
20058
|
return Rc({
|
@@ -20077,8 +20077,8 @@ function gp(f) {
|
|
20077
20077
|
}
|
20078
20078
|
function cu(f, x, I) {
|
20079
20079
|
if (f !== null)
|
20080
|
-
for (var C,
|
20081
|
-
fe =
|
20080
|
+
for (var C, z, U, S, c, pe, fe, xe = 0, oe = 0, ae, ut = f.type, $e = ut === "FeatureCollection", Ke = ut === "Feature", Oe = $e ? f.features.length : 1, gt = 0; gt < Oe; gt++) {
|
20081
|
+
fe = $e ? f.features[gt].geometry : Ke ? f.geometry : f, ae = fe ? fe.type === "GeometryCollection" : !1, c = ae ? fe.geometries.length : 1;
|
20082
20082
|
for (var ot = 0; ot < c; ot++) {
|
20083
20083
|
var He = 0, Vt = 0;
|
20084
20084
|
if (S = ae ? fe.geometries[ot] : fe, S !== null) {
|
@@ -20116,9 +20116,9 @@ function cu(f, x, I) {
|
|
20116
20116
|
case "Polygon":
|
20117
20117
|
case "MultiLineString":
|
20118
20118
|
for (C = 0; C < pe.length; C++) {
|
20119
|
-
for (
|
20119
|
+
for (z = 0; z < pe[C].length - xe; z++) {
|
20120
20120
|
if (x(
|
20121
|
-
pe[C][
|
20121
|
+
pe[C][z],
|
20122
20122
|
oe,
|
20123
20123
|
gt,
|
20124
20124
|
He,
|
@@ -20133,10 +20133,10 @@ function cu(f, x, I) {
|
|
20133
20133
|
break;
|
20134
20134
|
case "MultiPolygon":
|
20135
20135
|
for (C = 0; C < pe.length; C++) {
|
20136
|
-
for (Vt = 0,
|
20137
|
-
for (U = 0; U < pe[C][
|
20136
|
+
for (Vt = 0, z = 0; z < pe[C].length; z++) {
|
20137
|
+
for (U = 0; U < pe[C][z].length - xe; U++) {
|
20138
20138
|
if (x(
|
20139
|
-
pe[C][
|
20139
|
+
pe[C][z][U],
|
20140
20140
|
oe,
|
20141
20141
|
gt,
|
20142
20142
|
He,
|
@@ -20171,18 +20171,18 @@ function ml(f, x = {}) {
|
|
20171
20171
|
}), I;
|
20172
20172
|
}
|
20173
20173
|
function R_(f, x = {}) {
|
20174
|
-
const I = ml(f), C = (I[0] + I[2]) / 2,
|
20175
|
-
return Hp([C,
|
20174
|
+
const I = ml(f), C = (I[0] + I[2]) / 2, z = (I[1] + I[3]) / 2;
|
20175
|
+
return Hp([C, z], x.properties, x);
|
20176
20176
|
}
|
20177
20177
|
function B_(f, x = {}) {
|
20178
|
-
let I = 0, C = 0,
|
20178
|
+
let I = 0, C = 0, z = 0;
|
20179
20179
|
return cu(
|
20180
20180
|
f,
|
20181
20181
|
function(U) {
|
20182
|
-
I += U[0], C += U[1],
|
20182
|
+
I += U[0], C += U[1], z++;
|
20183
20183
|
},
|
20184
20184
|
!0
|
20185
|
-
), Hp([I /
|
20185
|
+
), Hp([I / z, C / z], x.properties);
|
20186
20186
|
}
|
20187
20187
|
const F_ = {
|
20188
20188
|
mixins: [_l],
|
@@ -20248,7 +20248,7 @@ const F_ = {
|
|
20248
20248
|
}
|
20249
20249
|
}
|
20250
20250
|
}, O_ = { class: "vs-map-slot-layers z-10 select-none" }, V_ = ["onClick"], N_ = ["src"];
|
20251
|
-
function $_(f, x, I, C,
|
20251
|
+
function $_(f, x, I, C, z, U) {
|
20252
20252
|
return it(), mt("div", O_, [
|
20253
20253
|
(it(!0), mt(ls, null, Wo(I.baseLayers, (S, c) => (it(), mt("div", {
|
20254
20254
|
key: S.id,
|
@@ -20343,22 +20343,22 @@ const iy = /* @__PURE__ */ Ji(X_, [["render", ty]]), ry = {
|
|
20343
20343
|
},
|
20344
20344
|
methods: {
|
20345
20345
|
async handleLayerChange(f, x) {
|
20346
|
-
await this.setVisible(f, x), x && this.map.getStyle().layers.filter((
|
20347
|
-
this.map.getLayer(
|
20346
|
+
await this.setVisible(f, x), x && this.map.getStyle().layers.filter((z) => !this.basemapIds.includes(z.id) && z.id !== f.id).map((z) => z.id).forEach((z) => {
|
20347
|
+
this.map.getLayer(z) && this.map.moveLayer(z);
|
20348
20348
|
});
|
20349
20349
|
}
|
20350
20350
|
}
|
20351
20351
|
}, ny = (f) => (yp("data-v-4c33eaa0"), f = f(), xp(), f), sy = { class: "p-[10px]" }, oy = { class: "select-none absolute left-[20px] top-[10px] border bg-white max-w-[250px] p-[10px] rounded-lg z-10" }, ay = { class: "flex justify-between items-center border-b pb-[8px] text-[16px]" }, ly = /* @__PURE__ */ ny(() => /* @__PURE__ */ Re("span", null, "Додаткові шари", -1)), cy = { class: "mt-2 max-h-[300px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, hy = ["id", "value", "onChange"], uy = ["for"];
|
20352
|
-
function dy(f, x, I, C,
|
20352
|
+
function dy(f, x, I, C, z, U) {
|
20353
20353
|
const S = ii("layersIcon"), c = ii("VsPopover"), pe = ii("closeIcon");
|
20354
20354
|
return it(), mt(ls, null, [
|
20355
|
-
!
|
20355
|
+
!z.isOpen && z.mounted ? (it(), ir(c, {
|
20356
20356
|
key: 0,
|
20357
20357
|
teleport: "body",
|
20358
20358
|
trigger: "hover",
|
20359
20359
|
placement: "right",
|
20360
20360
|
class: "select-none flex absolute left-[20px] top-[10px] border bg-white max-w-[250px] rounded-lg cursor-pointer z-10",
|
20361
|
-
onClick: x[0] || (x[0] = (fe) =>
|
20361
|
+
onClick: x[0] || (x[0] = (fe) => z.isOpen = !z.isOpen)
|
20362
20362
|
}, {
|
20363
20363
|
reference: _r(() => [
|
20364
20364
|
Re("div", sy, [
|
@@ -20373,7 +20373,7 @@ function dy(f, x, I, C, L, U) {
|
|
20373
20373
|
Hs(Re("div", oy, [
|
20374
20374
|
Re("div", ay, [
|
20375
20375
|
ly,
|
20376
|
-
|
20376
|
+
z.mounted ? (it(), ir(c, {
|
20377
20377
|
key: 0,
|
20378
20378
|
teleport: "body",
|
20379
20379
|
trigger: "hover",
|
@@ -20384,7 +20384,7 @@ function dy(f, x, I, C, L, U) {
|
|
20384
20384
|
Re("button", {
|
20385
20385
|
type: "button",
|
20386
20386
|
class: "size-6 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",
|
20387
|
-
onClick: x[1] || (x[1] = (fe) =>
|
20387
|
+
onClick: x[1] || (x[1] = (fe) => z.isOpen = !z.isOpen)
|
20388
20388
|
}, [
|
20389
20389
|
tr(pe)
|
20390
20390
|
])
|
@@ -20413,10 +20413,10 @@ function dy(f, x, I, C, L, U) {
|
|
20413
20413
|
}, Mr(fe.name), 9, uy)
|
20414
20414
|
]))), 128))
|
20415
20415
|
], 512), [
|
20416
|
-
[Jo,
|
20416
|
+
[Jo, z.isOpen]
|
20417
20417
|
])
|
20418
20418
|
], 512), [
|
20419
|
-
[Jo,
|
20419
|
+
[Jo, z.isOpen]
|
20420
20420
|
])
|
20421
20421
|
], 64);
|
20422
20422
|
}
|
@@ -20446,9 +20446,9 @@ const py = /* @__PURE__ */ Ji(ry, [["render", dy], ["__scopeId", "data-v-4c33eaa
|
|
20446
20446
|
},
|
20447
20447
|
watch: {
|
20448
20448
|
async currentLayer(f, x) {
|
20449
|
-
const I = this.compareLayers.find((
|
20450
|
-
I && await this.setVisible(I, !1, this.map), C && await this.setVisible(C, !0, this.map), this.map.getStyle().layers.forEach((
|
20451
|
-
|
20449
|
+
const I = this.compareLayers.find((z) => z.id === x), C = this.compareLayers.find((z) => z.id === f);
|
20450
|
+
I && await this.setVisible(I, !1, this.map), C && await this.setVisible(C, !0, this.map), this.map.getStyle().layers.forEach((z) => {
|
20451
|
+
z.source === this.table && this.map.getLayer(z.id) && this.map.moveLayer(z.id);
|
20452
20452
|
});
|
20453
20453
|
}
|
20454
20454
|
}
|
@@ -20456,13 +20456,13 @@ const py = /* @__PURE__ */ Ji(ry, [["render", dy], ["__scopeId", "data-v-4c33eaa
|
|
20456
20456
|
type: "button",
|
20457
20457
|
class: "size-6 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"
|
20458
20458
|
}, " - ", -1), vy = { class: "pt-1 max-h-[300px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, by = ["id", "name", "value"], wy = ["for"];
|
20459
|
-
function Sy(f, x, I, C,
|
20459
|
+
function Sy(f, x, I, C, z, U) {
|
20460
20460
|
const S = ii("VsPopover"), c = ii("closeIcon");
|
20461
20461
|
return Hs((it(), mt("div", my, [
|
20462
20462
|
Re("div", gy, [
|
20463
20463
|
_y,
|
20464
20464
|
Re("div", yy, [
|
20465
|
-
|
20465
|
+
z.mounted ? (it(), ir(S, {
|
20466
20466
|
key: 0,
|
20467
20467
|
trigger: "hover",
|
20468
20468
|
placement: "bottom",
|
@@ -20477,7 +20477,7 @@ function Sy(f, x, I, C, L, U) {
|
|
20477
20477
|
]),
|
20478
20478
|
_: 1
|
20479
20479
|
})) : oi("", !0),
|
20480
|
-
|
20480
|
+
z.mounted ? (it(), ir(S, {
|
20481
20481
|
key: 1,
|
20482
20482
|
trigger: "hover",
|
20483
20483
|
placement: "bottom",
|
@@ -20509,10 +20509,10 @@ function Sy(f, x, I, C, L, U) {
|
|
20509
20509
|
id: pe.id,
|
20510
20510
|
name: pe.id,
|
20511
20511
|
value: pe.id,
|
20512
|
-
"onUpdate:modelValue": x[2] || (x[2] = (fe) =>
|
20512
|
+
"onUpdate:modelValue": x[2] || (x[2] = (fe) => z.currentLayer = fe),
|
20513
20513
|
class: "shrink-0 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 checked:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"
|
20514
20514
|
}, null, 8, by), [
|
20515
|
-
[jm,
|
20515
|
+
[jm, z.currentLayer]
|
20516
20516
|
]),
|
20517
20517
|
Re("label", {
|
20518
20518
|
for: pe.id,
|
@@ -20553,7 +20553,7 @@ const Ty = /* @__PURE__ */ Ji(fy, [["render", Sy]]), Iy = {}, ky = {
|
|
20553
20553
|
Ay,
|
20554
20554
|
Cy
|
20555
20555
|
];
|
20556
|
-
function My(f, x, I, C,
|
20556
|
+
function My(f, x, I, C, z, U) {
|
20557
20557
|
return it(), mt("svg", ky, Ey);
|
20558
20558
|
}
|
20559
20559
|
const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
@@ -20562,6 +20562,7 @@ const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
|
20562
20562
|
compareIcon: zy,
|
20563
20563
|
CompareBaseLayers: Ty
|
20564
20564
|
},
|
20565
|
+
emits: ["isCompareOpen"],
|
20565
20566
|
props: {
|
20566
20567
|
map: { type: Object },
|
20567
20568
|
compareLayers: { type: Array },
|
@@ -20661,9 +20662,9 @@ const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
|
20661
20662
|
this.table,
|
20662
20663
|
f.getStyle().sources[this.table]
|
20663
20664
|
));
|
20664
|
-
const C = f.getStyle().layers.filter((
|
20665
|
-
C.length && C.forEach((
|
20666
|
-
x.getLayer(
|
20665
|
+
const C = f.getStyle().layers.filter((z) => z.source === this.table);
|
20666
|
+
C.length && C.forEach((z) => {
|
20667
|
+
x.getLayer(z.id) || x.addLayer(z);
|
20667
20668
|
});
|
20668
20669
|
}
|
20669
20670
|
}
|
@@ -20677,10 +20678,10 @@ const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
|
20677
20678
|
}, null, -1), Fy = [
|
20678
20679
|
By
|
20679
20680
|
];
|
20680
|
-
function Oy(f, x, I, C,
|
20681
|
+
function Oy(f, x, I, C, z, U) {
|
20681
20682
|
const S = ii("compareIcon"), c = ii("VsPopover"), pe = ii("CompareBaseLayers");
|
20682
20683
|
return it(), mt(ls, null, [
|
20683
|
-
|
20684
|
+
z.mounted ? (it(), ir(c, {
|
20684
20685
|
key: 0,
|
20685
20686
|
teleport: "body",
|
20686
20687
|
trigger: "hover",
|
@@ -20699,16 +20700,16 @@ function Oy(f, x, I, C, L, U) {
|
|
20699
20700
|
]),
|
20700
20701
|
_: 1
|
20701
20702
|
}, 8, ["class", "onClick"])) : oi("", !0),
|
20702
|
-
|
20703
|
+
z.isOpen && z.afterMapLoaded ? (it(), ir(pe, {
|
20703
20704
|
key: 1,
|
20704
20705
|
table: I.table,
|
20705
|
-
map:
|
20706
|
+
map: z.afterMap,
|
20706
20707
|
compareLayers: I.compareLayers,
|
20707
20708
|
onClose: U.destroyCompare,
|
20708
|
-
collapsed:
|
20709
|
-
"onUpdate:collapsed": x[0] || (x[0] = (fe) =>
|
20709
|
+
collapsed: z.collapsed,
|
20710
|
+
"onUpdate:collapsed": x[0] || (x[0] = (fe) => z.collapsed = fe)
|
20710
20711
|
}, null, 8, ["table", "map", "compareLayers", "onClose", "collapsed"])) : oi("", !0),
|
20711
|
-
|
20712
|
+
z.isOpen ? (it(), mt("div", Ry, Fy)) : oi("", !0)
|
20712
20713
|
], 64);
|
20713
20714
|
}
|
20714
20715
|
const Vy = /* @__PURE__ */ Ji(Ly, [["render", Oy]]), Ny = {
|
@@ -20725,7 +20726,7 @@ const Vy = /* @__PURE__ */ Ji(Ly, [["render", Oy]]), Ny = {
|
|
20725
20726
|
key: 0,
|
20726
20727
|
class: "flex justify-start items-center gap-2"
|
20727
20728
|
}, Wy = { class: "ml-1 text-[0.875rem]" };
|
20728
|
-
function Xy(f, x, I, C,
|
20729
|
+
function Xy(f, x, I, C, z, U) {
|
20729
20730
|
var S;
|
20730
20731
|
return it(), mt("div", $y, [
|
20731
20732
|
I.title ? (it(), mt("div", Uy, Mr(I.title), 1)) : oi("", !0),
|
@@ -20799,16 +20800,17 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20799
20800
|
map: null,
|
20800
20801
|
hoverObject: null,
|
20801
20802
|
popup: null,
|
20802
|
-
colors: []
|
20803
|
+
colors: [],
|
20804
|
+
strokes: null
|
20803
20805
|
};
|
20804
20806
|
},
|
20805
20807
|
async mounted() {
|
20806
20808
|
var f, x, I, C;
|
20807
20809
|
try {
|
20808
20810
|
if (await this.createMap(), (f = this.row) != null && f.geom) {
|
20809
|
-
const { type:
|
20811
|
+
const { type: z, coordinates: U } = this.row.geom;
|
20810
20812
|
let S;
|
20811
|
-
switch (
|
20813
|
+
switch (z) {
|
20812
20814
|
case "Polygon":
|
20813
20815
|
S = pp(U);
|
20814
20816
|
break;
|
@@ -20849,11 +20851,11 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20849
20851
|
f != null && f.geom && this.fitToBounds(f.geom), this.map && this.map.getStyle() && this.map.getStyle().layers.filter(
|
20850
20852
|
(C) => C.source === this.table && C.type === "line"
|
20851
20853
|
).forEach((C) => {
|
20852
|
-
var
|
20854
|
+
var z;
|
20853
20855
|
this.map.setPaintProperty(
|
20854
20856
|
C.id,
|
20855
20857
|
"line-width",
|
20856
|
-
((
|
20858
|
+
((z = this.row) == null ? void 0 : z.id) != null ? [
|
20857
20859
|
"case",
|
20858
20860
|
["==", ["get", "id"], this.row.id.toString()],
|
20859
20861
|
(this.polygonStrokeWidth ?? 2.5) * 2,
|
@@ -20889,10 +20891,10 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20889
20891
|
const {
|
20890
20892
|
data: { rows: x }
|
20891
20893
|
} = await Xt.get(`/api/data/${this.table}/${this.colorAttr}`), I = x.reduce(
|
20892
|
-
(C,
|
20894
|
+
(C, z, U) => z != null && z.id ? [
|
20893
20895
|
...C,
|
20894
|
-
|
20895
|
-
|
20896
|
+
z.id.toString(),
|
20897
|
+
z.color || f[0][U % 5]
|
20896
20898
|
] : C,
|
20897
20899
|
["match", ["get", this.colorAttr]]
|
20898
20900
|
);
|
@@ -20906,7 +20908,7 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20906
20908
|
try {
|
20907
20909
|
const {
|
20908
20910
|
data: { rows: f }
|
20909
|
-
} = await Xt.get(`/api/data/${this.table}/${this.strokeAttr}`), x = f.reduce((I, C,
|
20911
|
+
} = await Xt.get(`/api/data/${this.table}/${this.strokeAttr}`), x = f.reduce((I, C, z) => C != null && C.id ? [
|
20910
20912
|
...I,
|
20911
20913
|
{
|
20912
20914
|
id: C.id.toString(),
|
@@ -20926,13 +20928,13 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20926
20928
|
}
|
20927
20929
|
},
|
20928
20930
|
async handleMapLoad() {
|
20929
|
-
var C,
|
20931
|
+
var C, z, U, S, c;
|
20930
20932
|
(C = this.row) != null && C.geom && this.fitToBounds(this.row.geom), this.$emit("map", this.map);
|
20931
|
-
const f = await this.getStrokeStyle(), x = await this.getColorStyle(), I = ((U = (
|
20933
|
+
const f = await this.getStrokeStyle(), x = await this.getColorStyle(), I = ((U = (z = location.search.split("&").find((pe) => pe.includes("filter="))) == null ? void 0 : z.split("filter=")) == null ? void 0 : U[1]) || "";
|
20932
20934
|
await this.addLayer({
|
20933
20935
|
id: this.table,
|
20934
20936
|
service: "vector",
|
20935
|
-
url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}
|
20937
|
+
url: `/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${(/* @__PURE__ */ new Date()).toISOString()}`,
|
20936
20938
|
layers: [
|
20937
20939
|
{
|
20938
20940
|
type: "fill",
|
@@ -21006,7 +21008,7 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
21006
21008
|
}
|
21007
21009
|
] : []
|
21008
21010
|
]
|
21009
|
-
});
|
21011
|
+
}), I && this.setFilter(this.table, I);
|
21010
21012
|
},
|
21011
21013
|
async createMap() {
|
21012
21014
|
const f = {
|
@@ -21032,21 +21034,22 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
21032
21034
|
fitToBounds(f) {
|
21033
21035
|
if (!this.map) return;
|
21034
21036
|
const { type: x, coordinates: I } = f;
|
21035
|
-
let C,
|
21037
|
+
let C, z;
|
21036
21038
|
switch (x) {
|
21037
21039
|
case "Polygon":
|
21038
|
-
C = pp(I),
|
21040
|
+
C = pp(I), z = ml(C), this.map.fitBounds(z, { padding: 30, maxZoom: 15, duration: 0 });
|
21039
21041
|
break;
|
21040
21042
|
case "MultiPolygon":
|
21041
|
-
C = mp(I),
|
21043
|
+
C = mp(I), z = ml(C), this.map.fitBounds(z, { padding: 30, maxZoom: 15, duration: 0 });
|
21042
21044
|
break;
|
21043
21045
|
case "MultiPoint":
|
21044
|
-
C = fp(I),
|
21046
|
+
C = fp(I), z = ml(C), this.map.fitBounds(z, { padding: 30, maxZoom: 15, duration: 0 });
|
21045
21047
|
break;
|
21046
21048
|
case "Point":
|
21047
21049
|
this.map.flyTo({
|
21048
21050
|
center: I,
|
21049
21051
|
zoom: 15,
|
21052
|
+
duration: 0,
|
21050
21053
|
essential: !0
|
21051
21054
|
});
|
21052
21055
|
break;
|
@@ -21059,7 +21062,7 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
21059
21062
|
class: "vs-map-portal relative z-1 mt-2",
|
21060
21063
|
id: "mapwrapper"
|
21061
21064
|
};
|
21062
|
-
function Qy(f, x, I, C,
|
21065
|
+
function Qy(f, x, I, C, z, U) {
|
21063
21066
|
var xe;
|
21064
21067
|
const S = ii("MapLegend"), c = ii("MapSlotLayers"), pe = ii("MapCompare"), fe = ii("AdditionalLayers");
|
21065
21068
|
return it(), mt("div", Yy, [
|
@@ -21070,28 +21073,28 @@ function Qy(f, x, I, C, L, U) {
|
|
21070
21073
|
style: Jh({ height: I.height })
|
21071
21074
|
}, null, 4),
|
21072
21075
|
Hs(tr(S, {
|
21073
|
-
colors:
|
21074
|
-
strokes:
|
21076
|
+
colors: z.colors,
|
21077
|
+
strokes: z.strokes,
|
21075
21078
|
title: I.legendname
|
21076
21079
|
}, null, 8, ["colors", "strokes", "title"]), [
|
21077
21080
|
[Jo, I.legend]
|
21078
21081
|
]),
|
21079
21082
|
tr(c, {
|
21080
|
-
map:
|
21083
|
+
map: z.map,
|
21081
21084
|
baseLayers: I.basemap,
|
21082
21085
|
selectedLayer: I.selectedBaseLayer,
|
21083
21086
|
"onUpdate:selectedLayer": x[0] || (x[0] = (oe) => f.$emit("update:selectedBaseLayer", oe))
|
21084
21087
|
}, null, 8, ["map", "baseLayers", "selectedLayer"]),
|
21085
21088
|
I.isMapCompare ? (it(), ir(pe, {
|
21086
21089
|
key: 0,
|
21087
|
-
map:
|
21090
|
+
map: z.map,
|
21088
21091
|
compareLayers: U.allLayers,
|
21089
21092
|
table: I.table,
|
21090
21093
|
onIsCompareOpen: x[1] || (x[1] = (oe) => f.$emit("isCompareOpen", oe))
|
21091
21094
|
}, null, 8, ["map", "compareLayers", "table"])) : oi("", !0),
|
21092
21095
|
(xe = I.additionalLayers) != null && xe.length ? (it(), ir(fe, {
|
21093
21096
|
key: 1,
|
21094
|
-
map:
|
21097
|
+
map: z.map,
|
21095
21098
|
layers: I.additionalLayers,
|
21096
21099
|
basemapIds: U.basemapIds
|
21097
21100
|
}, null, 8, ["map", "layers", "basemapIds"])) : oi("", !0)
|
@@ -21214,7 +21217,7 @@ const T0 = /* @__PURE__ */ Ji(g0, [["render", S0]]), I0 = {
|
|
21214
21217
|
key: 0,
|
21215
21218
|
class: "flex justify-end gap-x-2"
|
21216
21219
|
};
|
21217
|
-
function R0(f, x, I, C,
|
21220
|
+
function R0(f, x, I, C, z, U) {
|
21218
21221
|
return it(), ir(qm, { to: "#modal" }, [
|
21219
21222
|
tr(Wd, { name: "fade" }, {
|
21220
21223
|
default: _r(() => [
|
@@ -21260,7 +21263,6 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21260
21263
|
dashedLine: { type: Boolean, default: !1 },
|
21261
21264
|
title: { type: String, default: () => "" },
|
21262
21265
|
table: { type: String, default: () => "" },
|
21263
|
-
rows: { type: Object, default: () => null },
|
21264
21266
|
isMapCompare: { type: Boolean, default: !0 },
|
21265
21267
|
initTotal: { type: [Number, String], default: () => "" },
|
21266
21268
|
colorAttr: { type: String, default: () => "" },
|
@@ -21365,19 +21367,19 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21365
21367
|
},
|
21366
21368
|
activeFilters() {
|
21367
21369
|
var f, x;
|
21368
|
-
return
|
21370
|
+
return (x = (f = this.$refs) == null ? void 0 : f.filter) == null ? void 0 : x.activeFilters;
|
21369
21371
|
},
|
21370
21372
|
isFilterVisible(f) {
|
21371
21373
|
f || this.getData();
|
21372
21374
|
},
|
21373
21375
|
async regionSelectValue(f, x) {
|
21374
|
-
var
|
21376
|
+
var z, U;
|
21375
21377
|
if (!this.regionSelectValue) {
|
21376
21378
|
this.map.removeSource("region-search-id");
|
21377
21379
|
return;
|
21378
21380
|
}
|
21379
21381
|
f && this.selectedId && this.closeObjCard(), this.polyline = this.regionSelectValue.encoded_geom, this.getData();
|
21380
|
-
const I = ((
|
21382
|
+
const I = ((z = this.regionSelectValue) == null ? void 0 : z.geom) || Ws.toGeoJSON(this.regionSelectValue.encoded_geom), C = this.map.getSource("region-search-id");
|
21381
21383
|
if (this.currentBbox = ml(I), C)
|
21382
21384
|
C.setData({
|
21383
21385
|
type: "Feature",
|
@@ -21412,18 +21414,16 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21412
21414
|
this.addressSelectValue && (f && this.selectedId && this.closeObjCard(), this.getData());
|
21413
21415
|
}
|
21414
21416
|
},
|
21415
|
-
|
21416
|
-
|
21417
|
-
|
21418
|
-
|
21419
|
-
|
21420
|
-
const
|
21421
|
-
|
21422
|
-
const [U, S] =
|
21417
|
+
async mounted() {
|
21418
|
+
const f = new URLSearchParams(window.location.search);
|
21419
|
+
this.currentPage = f.get("page") || 1, await this.getData();
|
21420
|
+
const x = new URLSearchParams(window.location.search), I = x.get("filter");
|
21421
|
+
x.get("id");
|
21422
|
+
const C = I == null ? void 0 : I.split("|");
|
21423
|
+
C == null || C.forEach((z) => {
|
21424
|
+
const [U, S] = z.split("=");
|
21423
21425
|
S != null && S.includes(",") ? this.mountedFilter[U] = S == null ? void 0 : S.split(",") : this.mountedFilter[U] = S, this.activeFilters = this.mountedFilter;
|
21424
|
-
});
|
21425
|
-
const C = new URLSearchParams(window.location.search);
|
21426
|
-
this.currentPage = C.get("page") || 1, this.getFilter();
|
21426
|
+
}), this.getFilter(), this.total = this.initTotal, this.id && (this.selectedId = this.id, this.isSelectObj = !0, this.selectedRow = this.tableData.find((z) => z.id === this.id));
|
21427
21427
|
},
|
21428
21428
|
updated() {
|
21429
21429
|
this.checkFilterLength();
|
@@ -21473,7 +21473,7 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21473
21473
|
},
|
21474
21474
|
async clearFilter(f) {
|
21475
21475
|
var x, I, C;
|
21476
|
-
await ((I = (x = this.$refs) == null ? void 0 : x.filter) == null ? void 0 : I.clearFilter(f)), this.filterUrl = (C = this.$refs) == null ? void 0 : C.filter.filterUrl,
|
21476
|
+
await ((I = (x = this.$refs) == null ? void 0 : x.filter) == null ? void 0 : I.clearFilter(f)), this.filterUrl = (C = this.$refs) == null ? void 0 : C.filter.filterUrl, (f === "region_katottg" || f === "katottg") && this.$emit("update:filterState", {}), await this.updateTableAndMap(), await this.getData();
|
21477
21477
|
},
|
21478
21478
|
handlePageChange(f) {
|
21479
21479
|
this.currentPage = f;
|
@@ -21551,17 +21551,16 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21551
21551
|
f !== this.previousLength && (this.previousLength = f, this.activeFiltersCount = f);
|
21552
21552
|
},
|
21553
21553
|
async handleMapClick(f) {
|
21554
|
-
var U, S, c, pe, fe, xe, oe, ae;
|
21554
|
+
var U, S, c, pe, fe, xe, oe, ae, ut, $e;
|
21555
21555
|
const x = this.map.queryRenderedFeatures(f.point);
|
21556
|
-
if ((x == null ? void 0 : x.length) < 1)
|
21557
|
-
return;
|
21556
|
+
if ((x == null ? void 0 : x.length) < 1 || ((U = x[0]) == null ? void 0 : U.source) === "region-search-id" || ((S = x[0]) == null ? void 0 : S.source) === "route-line") return;
|
21558
21557
|
const I = window.location.pathname, C = new URLSearchParams(window.location.search);
|
21559
|
-
C.set("id", `${(
|
21560
|
-
const
|
21561
|
-
window.history.pushState({}, "",
|
21558
|
+
C.set("id", `${(c = x[0]) == null ? void 0 : c.properties.id}`), this.getObjectData((fe = (pe = x[0]) == null ? void 0 : pe.properties) == null ? void 0 : fe.id);
|
21559
|
+
const z = `${I}?${C.toString()}`;
|
21560
|
+
window.history.pushState({}, "", z), this.isSelectObj = !0, f.lngLat && (($e = this.map) == null || $e.fitBounds(
|
21562
21561
|
[
|
21563
|
-
[(
|
21564
|
-
[(
|
21562
|
+
[(xe = f.lngLat) == null ? void 0 : xe.lng, (oe = f.lngLat) == null ? void 0 : oe.lat],
|
21563
|
+
[(ae = f.lngLat) == null ? void 0 : ae.lng, (ut = f.lngLat) == null ? void 0 : ut.lat]
|
21565
21564
|
],
|
21566
21565
|
{ padding: 30, duration: 0 }
|
21567
21566
|
)), this.checkUrl();
|
@@ -21580,9 +21579,9 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21580
21579
|
this.isMapVisible = x;
|
21581
21580
|
const C = await (await fetch(`/api/data/${this.table}/${f.id}`)).json();
|
21582
21581
|
this.selectedRow = ((c = C == null ? void 0 : C.rows) == null ? void 0 : c[0]) || f;
|
21583
|
-
const
|
21582
|
+
const z = window.location.pathname, U = new URLSearchParams(window.location.search);
|
21584
21583
|
U.set("id", `${f.id}`);
|
21585
|
-
const S = `${
|
21584
|
+
const S = `${z}?${U.toString()}`;
|
21586
21585
|
window.history.pushState({}, "", S), this.checkUrl(x), this.isSelectObj = !0;
|
21587
21586
|
},
|
21588
21587
|
deletePulsePoint() {
|
@@ -21603,8 +21602,8 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21603
21602
|
(f = this.map) != null && f.getLayer("highlighted-polygon") && ((x = this.map) == null || x.removeLayer("highlighted-polygon"), (I = this.map) == null || I.removeSource("highlighted-polygon"));
|
21604
21603
|
},
|
21605
21604
|
highlightPolygon(f) {
|
21606
|
-
var x, I, C,
|
21607
|
-
this.deletePulsePoint(), this.deleteHighlighPolygon(), (
|
21605
|
+
var x, I, C, z, U, S;
|
21606
|
+
this.deletePulsePoint(), this.deleteHighlighPolygon(), (z = this.map) == null || z.addSource("highlighted-polygon", {
|
21608
21607
|
type: "geojson",
|
21609
21608
|
data: {
|
21610
21609
|
geometry: {
|
@@ -21671,7 +21670,7 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21671
21670
|
}
|
21672
21671
|
)
|
21673
21672
|
).length) return;
|
21674
|
-
const
|
21673
|
+
const z = x[0].geometry.coordinates.slice();
|
21675
21674
|
x[0].source === "highlighted-polygon" && x[1] ? this.hoverData = (c = x[1]) == null ? void 0 : c.properties : this.hoverData = (pe = x[0]) == null ? void 0 : pe.properties;
|
21676
21675
|
const U = {
|
21677
21676
|
source: x[0].source,
|
@@ -21679,8 +21678,8 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21679
21678
|
id: x[0].id
|
21680
21679
|
};
|
21681
21680
|
if (U.source !== "region-search-id") {
|
21682
|
-
for (this.map.setFeatureState(U, { hover: !0 }), this.hoverObject = U; Math.abs(f.lngLat.lng -
|
21683
|
-
|
21681
|
+
for (this.map.setFeatureState(U, { hover: !0 }), this.hoverObject = U; Math.abs(f.lngLat.lng - z[0]) > 180; )
|
21682
|
+
z[0] += f.lngLat.lng > z[0] ? 360 : -360;
|
21684
21683
|
this.popup.setLngLat(f.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map);
|
21685
21684
|
}
|
21686
21685
|
},
|
@@ -21717,9 +21716,9 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21717
21716
|
ref: "popup",
|
21718
21717
|
style: { display: "none" }
|
21719
21718
|
};
|
21720
|
-
function px(f, x, I, C,
|
21719
|
+
function px(f, x, I, C, z, U) {
|
21721
21720
|
var Oe, gt;
|
21722
|
-
const S = ii("VsTextMask"), c = ii("vs-text"), pe = ii("FilterIcon"), fe = ii("VsFilterList"), xe = ii("VisibleMapIcon"), oe = ii("HiddenMapIcon"), ae = ii("CloseIcon"),
|
21721
|
+
const S = ii("VsTextMask"), c = ii("vs-text"), pe = ii("FilterIcon"), fe = ii("VsFilterList"), xe = ii("VisibleMapIcon"), oe = ii("HiddenMapIcon"), ae = ii("CloseIcon"), ut = ii("NoData"), $e = ii("VsPagination"), Ke = ii("MapPortal");
|
21723
21722
|
return it(), mt("section", O0, [
|
21724
21723
|
Re("div", null, [
|
21725
21724
|
Re("div", V0, [
|
@@ -21842,7 +21841,7 @@ function px(f, x, I, C, L, U) {
|
|
21842
21841
|
addGeomMarker: f.addGeomMarker,
|
21843
21842
|
isMapVisible: f.isMapVisible
|
21844
21843
|
}) : (it(), mt("div", nx, [
|
21845
|
-
tr(
|
21844
|
+
tr(ut),
|
21846
21845
|
sx,
|
21847
21846
|
ox,
|
21848
21847
|
Re("button", {
|
@@ -21855,7 +21854,7 @@ function px(f, x, I, C, L, U) {
|
|
21855
21854
|
f.total >= 1 ? (it(), mt("hr", ax)) : oi("", !0),
|
21856
21855
|
f.total >= 1 ? (it(), mt("div", lx, [
|
21857
21856
|
Re("div", cx, [
|
21858
|
-
tr(
|
21857
|
+
tr($e, {
|
21859
21858
|
total: f.total,
|
21860
21859
|
maxPages: 7,
|
21861
21860
|
defaultPage: f.currentPage,
|