@nika-js/onlymap 0.4.3 → 0.4.4

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.
Files changed (35) hide show
  1. package/README.md +38 -7
  2. package/bin/onlymapjs.mjs +147 -11
  3. package/dist/{LercDecode.es-peqB7bxk.js → LercDecode.es-CgN9Gb9e.js} +1 -1
  4. package/dist/{basemap-BeKuGQJs.js → basemap-Bfn5Z__c.js} +168 -163
  5. package/dist/basemap.d.ts +3 -1
  6. package/dist/elements/om-map.d.ts +28 -0
  7. package/dist/{index-BKU3HvOO.js → index-C4cWRigY.js} +1 -1
  8. package/dist/{index-BPKvpqIk.js → index-CnitG1VX.js} +2 -2
  9. package/dist/{index-DzyVbu_T.js → index-KgO0MBqA.js} +12742 -12293
  10. package/dist/{index-DVnTYF5u.js → index-M8KfTTol.js} +1 -1
  11. package/dist/{index-Dg8SKcgV.js → index-lXrP3rPo.js} +1 -1
  12. package/dist/index.d.ts +4 -2
  13. package/dist/layout-audit.d.ts +53 -0
  14. package/dist/{lerc-DEpGyngt.js → lerc-l-QFh62d.js} +2 -2
  15. package/dist/onlymap.standalone.js +21022 -20568
  16. package/dist/onlymapjs.js +73 -62
  17. package/dist/programmatic.d.ts +3 -1
  18. package/dist/{raster-CX7Y4jtJ.js → raster-BBA_oI-d.js} +2 -2
  19. package/dist/react/context.d.ts +9 -1
  20. package/dist/react/om-map.d.ts +3 -1
  21. package/dist/react/om-widget.d.ts +3 -1
  22. package/dist/react.js +333 -202
  23. package/dist/runtime-core.d.ts +12 -1
  24. package/dist/version.d.ts +1 -1
  25. package/dist/widget-layout.d.ts +16 -0
  26. package/docs/basemaps.md +1 -1
  27. package/docs/react.md +2 -1
  28. package/docs/testing.md +10 -0
  29. package/llms.txt +1 -1
  30. package/onlymapjs.html-data.json +18 -0
  31. package/package.json +1 -1
  32. package/skills/onlymapjs/SKILL.md +2 -1
  33. package/skills/onlymapjs/references/react.md +2 -2
  34. package/skills/onlymapjs/references/syntax.md +3 -3
  35. package/skills/onlymapjs/references/testing.md +15 -0
@@ -1,31 +1,31 @@
1
- import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-DzyVbu_T.js";
1
+ import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-KgO0MBqA.js";
2
2
  const Cd = Math.PI / 180, gy = 180 / Math.PI;
3
3
  function em(Pe, Q = 0) {
4
- const ge = Math.min(180, Pe) * Cd;
5
- return sm * 2 * Math.sin(ge / 2) * Math.pow(2, Q);
4
+ const me = Math.min(180, Pe) * Cd;
5
+ return sm * 2 * Math.sin(me / 2) * Math.pow(2, Q);
6
6
  }
7
7
  function tm(Pe, Q = 0) {
8
- const ge = Pe / Math.pow(2, Q);
9
- return Math.asin(Math.min(1, ge / sm / 2)) * 2 * gy;
8
+ const me = Pe / Math.pow(2, Q);
9
+ return Math.asin(Math.min(1, me / sm / 2)) * 2 * gy;
10
10
  }
11
11
  class _y extends oy {
12
12
  constructor(Q) {
13
- const { startPanPos: ge, ...Ie } = Q;
14
- Ie.normalize = !1, super(Ie), ge !== void 0 && (this._state.startPanPos = ge);
13
+ const { startPanPos: me, ...Ie } = Q;
14
+ Ie.normalize = !1, super(Ie), me !== void 0 && (this._state.startPanPos = me);
15
15
  }
16
16
  panStart({ pos: Q }) {
17
- const { latitude: ge, longitude: Ie, zoom: Te } = this.getViewportProps();
17
+ const { latitude: me, longitude: Ie, zoom: Te } = this.getViewportProps();
18
18
  return this._getUpdatedState({
19
- startPanLngLat: [Ie, ge],
19
+ startPanLngLat: [Ie, me],
20
20
  startPanPos: Q,
21
21
  startZoom: Te
22
22
  });
23
23
  }
24
- pan({ pos: Q, startPos: ge }) {
25
- const Ie = this.getState(), Te = Ie.startPanLngLat || this._unproject(ge);
24
+ pan({ pos: Q, startPos: me }) {
25
+ const Ie = this.getState(), Te = Ie.startPanLngLat || this._unproject(me);
26
26
  if (!Te)
27
27
  return this;
28
- const Le = Ie.startZoom ?? this.getViewportProps().zoom, R = Ie.startPanPos || ge, h = [Te[0], Te[1], Le], ct = this.makeViewport(this.getViewportProps()).panByPosition(h, Q, R);
28
+ const Le = Ie.startZoom ?? this.getViewportProps().zoom, R = Ie.startPanPos || me, h = [Te[0], Te[1], Le], ct = this.makeViewport(this.getViewportProps()).panByPosition(h, Q, R);
29
29
  return this._getUpdatedState(ct);
30
30
  }
31
31
  panEnd() {
@@ -40,8 +40,8 @@ class _y extends oy {
40
40
  return this._getUpdatedState({ zoom: Ie });
41
41
  }
42
42
  applyConstraints(Q) {
43
- const { longitude: ge, latitude: Ie, maxBounds: Te } = Q;
44
- if (Q.zoom = this._constrainZoom(Q.zoom, Q), (ge < -180 || ge > 180) && (Q.longitude = ay(ge + 180, 360) - 180), Q.latitude = ka(Ie, -Sd, Sd), Te && (Q.longitude = ka(Q.longitude, Te[0][0], Te[1][0]), Q.latitude = ka(Q.latitude, Te[0][1], Te[1][1])), Te) {
43
+ const { longitude: me, latitude: Ie, maxBounds: Te } = Q;
44
+ if (Q.zoom = this._constrainZoom(Q.zoom, Q), (me < -180 || me > 180) && (Q.longitude = ay(me + 180, 360) - 180), Q.latitude = ka(Ie, -Sd, Sd), Te && (Q.longitude = ka(Q.longitude, Te[0][0], Te[1][0]), Q.latitude = ka(Q.latitude, Te[0][1], Te[1][1])), Te) {
45
45
  const Le = Q.zoom - oc(Ie), R = Te[1][0] - Te[0][0], h = Te[1][1] - Te[0][1];
46
46
  if (h > 0 && h < Sd * 2) {
47
47
  const de = Math.min(tm(Q.height, Le), h) / 2;
@@ -54,14 +54,14 @@ class _y extends oy {
54
54
  }
55
55
  return Q.latitude !== Ie && (Q.zoom += oc(Q.latitude) - oc(Ie)), Q;
56
56
  }
57
- _constrainZoom(Q, ge) {
58
- ge || (ge = this.getViewportProps());
59
- const { latitude: Ie, maxZoom: Te, maxBounds: Le } = ge;
60
- let { minZoom: R } = ge;
57
+ _constrainZoom(Q, me) {
58
+ me || (me = this.getViewportProps());
59
+ const { latitude: Ie, maxZoom: Te, maxBounds: Le } = me;
60
+ let { minZoom: R } = me;
61
61
  const h = oc(0), de = oc(Ie) - h;
62
- if (Le !== null && ge.width > 0 && ge.height > 0) {
62
+ if (Le !== null && me.width > 0 && me.height > 0) {
63
63
  const Bt = Le[0][1], fi = Le[1][1], Qi = Math.sign(Bt) === Math.sign(fi) ? Math.min(Math.abs(Bt), Math.abs(fi)) : 0, At = em(Le[1][0] - Le[0][0]) * Math.cos(Qi * Cd), si = em(Le[1][1] - Le[0][1]);
64
- At > 0 && (R = Math.max(R, Math.log2(ge.width / At) + h)), si > 0 && (R = Math.max(R, Math.log2(ge.height / si) + h)), R > Te && (R = Te);
64
+ At > 0 && (R = Math.max(R, Math.log2(me.width / At) + h)), si > 0 && (R = Math.max(R, Math.log2(me.height / si) + h)), R > Te && (R = Te);
65
65
  }
66
66
  return ka(Q, R + de, Te + de);
67
67
  }
@@ -106,14 +106,14 @@ var ju = { exports: {} };
106
106
  var xy = ju.exports, im;
107
107
  function by() {
108
108
  return im || (im = 1, (function(Pe, Q) {
109
- (function(ge, Ie) {
109
+ (function(me, Ie) {
110
110
  Pe.exports = Ie();
111
111
  })(xy, (function() {
112
- var ge = {}, Ie = {};
112
+ var me = {}, Ie = {};
113
113
  function Te(R, h, de) {
114
114
  if (Ie[R] = de, R === "index") {
115
115
  var ct = "var sharedModule = {}; (" + Ie.shared + ")(sharedModule); (" + Ie.worker + ")(sharedModule);", Bt = {};
116
- return Ie.shared(Bt), Ie.index(ge, Bt), typeof window < "u" && ge.setWorkerUrl(window.URL.createObjectURL(new Blob([ct], { type: "text/javascript" }))), ge;
116
+ return Ie.shared(Bt), Ie.index(me, Bt), typeof window < "u" && me.setWorkerUrl(window.URL.createObjectURL(new Blob([ct], { type: "text/javascript" }))), me;
117
117
  }
118
118
  }
119
119
  Te("shared", ["exports"], (function(R) {
@@ -4800,7 +4800,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
4800
4800
  }
4801
4801
  class ae extends ls {
4802
4802
  }
4803
- class me extends Ll {
4803
+ class ge extends Ll {
4804
4804
  }
4805
4805
  class pe extends no {
4806
4806
  }
@@ -8489,7 +8489,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
8489
8489
  Ce("SymbolBuffers", Yh);
8490
8490
  class Kh {
8491
8491
  constructor(e, i, s) {
8492
- this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Ee(), this.collisionVertexArray = new me();
8492
+ this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Ee(), this.collisionVertexArray = new ge();
8493
8493
  }
8494
8494
  upload(e) {
8495
8495
  this.layoutVertexBuffer = e.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = e.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = e.createVertexBuffer(this.collisionVertexArray, Ig.members, !0);
@@ -13484,8 +13484,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
13484
13484
  for (let oe = 0; oe < w; oe++, $ += 4, ee++) {
13485
13485
  const ae = X.data[$];
13486
13486
  if (ae === 0) continue;
13487
- const me = W[ae];
13488
- Z[ee] = Math.max(0, me), N[ee] = Math.max(0, -me);
13487
+ const ge = W[ae];
13488
+ Z[ee] = Math.max(0, ge), N[ee] = Math.max(0, -ge);
13489
13489
  }
13490
13490
  }
13491
13491
  K(Z, 0, 0, P, E, P, this.f, this.v, this.z), K(N, G, G, w, S, P, this.f, this.v, this.z);
@@ -14843,9 +14843,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14843
14843
  if (we === 0) continue;
14844
14844
  ee = we === 2;
14845
14845
  }
14846
- const me = y.distanceToTile2d(c.x, c.y, oe, ae);
14846
+ const ge = y.distanceToTile2d(c.x, c.y, oe, ae);
14847
14847
  let pe = w;
14848
- x && (pe = (t.calculateTileZoom || ot)(d.zoom + h.ar(d.tileSize / t.tileSize), me, G, N, d.fov)), pe = (t.roundZoom ? Math.round : Math.floor)(pe), pe = Math.max(0, pe);
14848
+ x && (pe = (t.calculateTileZoom || ot)(d.zoom + h.ar(d.tileSize / t.tileSize), ge, G, N, d.fov)), pe = (t.roundZoom ? Math.round : Math.floor)(pe), pe = Math.max(0, pe);
14849
14849
  const Ae = Math.min(pe, P);
14850
14850
  if (U.wrap = y.getWrap(f, oe, U.wrap), U.zoom >= Ae) {
14851
14851
  if (U.zoom < S) continue;
@@ -15470,7 +15470,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15470
15470
  cn(H.numGlyphs, G);
15471
15471
  continue;
15472
15472
  }
15473
- const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), me = h.ay(z, B, H), pe = f ? me * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : me * ae, Ae = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: pe, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15473
+ const ae = Ts(t.transform.cameraToCenterDistance, oe.signedDistanceFromCamera), ge = h.ay(z, B, H), pe = f ? ge * t.transform.getPitchedTextCorrection(H.anchorX, H.anchorY, w) / ae : ge * ae, Ae = jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: pe, flip: !1, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x });
15474
15474
  $ = Ae.useVertical, (Ae.notEnoughRoom || $ || Ae.needsFlipping && jn({ projectionContext: ee, pitchedLabelPlaneMatrixInverse: c, symbol: H, fontSize: pe, flip: !0, keepUpright: y, glyphOffsetArray: d.glyphOffsetArray, dynamicLayoutVertexArray: G, aspectRatio: X, rotateToLine: x }).notEnoughRoom) && cn(H.numGlyphs, G);
15475
15475
  }
15476
15476
  n ? d.text.dynamicLayoutVertexBuffer.updateData(G) : d.icon.dynamicLayoutVertexBuffer.updateData(G);
@@ -15567,8 +15567,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15567
15567
  if (G = ti(z, x, oe), n === 0) U.push(N), H = G.sub(N);
15568
15568
  else {
15569
15569
  let ae;
15570
- const me = G.sub(N);
15571
- ae = me.mag() === 0 ? Is(ti(z + P, x, oe).sub(G), n, P) : Is(me, n, P), V || (V = N.add(ae)), B = ln(z, ae, G, f, y, V, n, x, oe), U.push(V), H = B.sub(V);
15570
+ const ge = G.sub(N);
15571
+ ae = ge.mag() === 0 ? Is(ti(z + P, x, oe).sub(G), n, P) : Is(ge, n, P), V || (V = N.add(ae)), B = ln(z, ae, G, f, y, V, n, x, oe), U.push(V), H = B.sub(V);
15572
15572
  }
15573
15573
  X = H.mag();
15574
15574
  }
@@ -15607,7 +15607,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15607
15607
  const V = [], G = new h.P(n.anchorX, n.anchorY), N = this.getPerspectiveRatio(G.x, G.y, y, B), Z = (S ? f * this.transform.getPitchedTextCorrection(n.anchorX, n.anchorY, y) / N : f * N) / h.aJ, X = { getElevation: B, pitchedLabelPlaneMatrix: x, lineVertexArray: a, pitchWithMap: S, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, transform: this.transform, tileAnchorPoint: G, unwrappedTileID: y, width: this.transform.width, height: this.transform.height, translation: z }, $ = Vn(Z, c, n.lineOffsetX * Z, n.lineOffsetY * Z, !1, n, !1, X);
15608
15608
  let U = !1, H = !1, q = !0;
15609
15609
  if ($) {
15610
- const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), me = new Ga(), pe = $.first, Ae = $.last;
15610
+ const ee = 0.5 * E * N + C, oe = new h.P(-100, -100), ae = new h.P(this.screenRightBoundary, this.screenBottomBoundary), ge = new Ga(), pe = $.first, Ae = $.last;
15611
15611
  let we = [];
15612
15612
  for (let ke = pe.path.length - 1; ke >= 1; ke--) we.push(pe.path[ke]);
15613
15613
  for (let ke = 1; ke < Ae.path.length; ke++) we.push(Ae.path[ke]);
@@ -15623,11 +15623,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15623
15623
  Ee = ke.x >= oe.x && st.x <= ae.x && ke.y >= oe.y && st.y <= ae.y ? [we] : st.x < oe.x || ke.x > ae.x || st.y < oe.y || ke.y > ae.y ? [] : h.aG([we], oe.x, oe.y, ae.x, ae.y);
15624
15624
  }
15625
15625
  for (const ke of Ee) {
15626
- me.reset(ke, 0.25 * ee);
15626
+ ge.reset(ke, 0.25 * ee);
15627
15627
  let st = 0;
15628
- st = me.length <= 0.5 * ee ? 1 : Math.ceil(me.paddedLength / he) + 1;
15628
+ st = ge.length <= 0.5 * ee ? 1 : Math.ceil(ge.paddedLength / he) + 1;
15629
15629
  for (let kt = 0; kt < st; kt++) {
15630
- const ut = kt / Math.max(st - 1, 1), Lt = me.lerp(ut), Ot = Lt.x + Mt, ai = Lt.y + Mt;
15630
+ const ut = kt / Math.max(st - 1, 1), Lt = ge.lerp(ut), Ot = Lt.x + Mt, ai = Lt.y + Mt;
15631
15631
  V.push(Ot, ai, ee, 0);
15632
15632
  const It = Ot - ee, xi = ai - ee, ii = Ot + ee, qt = ai + ee;
15633
15633
  if (q && (q = this.isOffscreen(It, xi, ii, qt)), H || (H = this.isInsideGrid(It, xi, ii, qt)), t !== "always" && this.grid.hitTestCircle(Ot, ai, ee, t, P) && (U = !0, !w)) return { circles: [], offscreen: !1, collisionDetected: U };
@@ -15714,9 +15714,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15714
15714
  }
15715
15715
  let Z = w.x, X = w.y, $ = n;
15716
15716
  f && (Z = G, X = N, $ = Math.pow(2, -(this.transform.zoom - a.overscaledZ)), $ *= this.transform.getPitchedTextCorrection(G, N, c), P || ($ *= h.al(0.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4))), P && (Z += C * P.x * $ + B * P.y * $, X += z * P.x * $ + V * P.y * $);
15717
- const U = t.x1 * $, H = t.x2 * $, q = (U + H) / 2, ee = t.y1 * $, oe = t.y2 * $, ae = (ee + oe) / 2, me = [{ offsetX: U, offsetY: ee }, { offsetX: q, offsetY: ee }, { offsetX: H, offsetY: ee }, { offsetX: H, offsetY: ae }, { offsetX: H, offsetY: oe }, { offsetX: q, offsetY: oe }, { offsetX: U, offsetY: oe }, { offsetX: U, offsetY: ae }];
15717
+ const U = t.x1 * $, H = t.x2 * $, q = (U + H) / 2, ee = t.y1 * $, oe = t.y2 * $, ae = (ee + oe) / 2, ge = [{ offsetX: U, offsetY: ee }, { offsetX: q, offsetY: ee }, { offsetX: H, offsetY: ee }, { offsetX: H, offsetY: ae }, { offsetX: H, offsetY: oe }, { offsetX: q, offsetY: oe }, { offsetX: U, offsetY: oe }, { offsetX: U, offsetY: ae }];
15718
15718
  let pe = [];
15719
- for (const { offsetX: we, offsetY: he } of me) pe.push(new h.P(Z + C * we + B * he, X + z * we + V * he));
15719
+ for (const { offsetX: we, offsetY: he } of ge) pe.push(new h.P(Z + C * we + B * he, X + z * we + V * he));
15720
15720
  let Ae = !1;
15721
15721
  if (f) {
15722
15722
  const we = pe.map(((he) => this.projectAndGetPerspectiveRatio(he.x, he.y, c, S, E)));
@@ -15790,17 +15790,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15790
15790
  }
15791
15791
  attemptAnchorPlacement(t, n, a, c, f, y, x, w, S, P, E, C, z, B, V, G, N, Z, X, $) {
15792
15792
  var U, H, q;
15793
- const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f), me = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, $);
15794
- if ((!Z || this.collisionIndex.placeCollisionBox(Z, C, w, S, P, x, y, N, E.predicate, X, ae, $).placeable) && me.placeable) {
15793
+ const ee = h.aM[t.textAnchor], oe = [t.textOffset0, t.textOffset1], ae = wo(ee, a, c, oe, f), ge = this.collisionIndex.placeCollisionBox(n, C, w, S, P, x, y, G, E.predicate, X, ae, $);
15794
+ if ((!Z || this.collisionIndex.placeCollisionBox(Z, C, w, S, P, x, y, N, E.predicate, X, ae, $).placeable) && ge.placeable) {
15795
15795
  let pe;
15796
15796
  if (!((U = this.prevPlacement) === null || U === void 0) && U.variableOffsets[z.crossTileID] && (!((q = (H = this.prevPlacement) === null || H === void 0 ? void 0 : H.placements[z.crossTileID]) === null || q === void 0) && q.text) && (pe = this.prevPlacement.variableOffsets[z.crossTileID].anchor), z.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
15797
- return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: pe }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: me };
15797
+ return this.variableOffsets[z.crossTileID] = { textOffset: oe, width: a, height: c, anchor: ee, textBoxScale: f, prevAnchor: pe }, this.markUsedJustification(B, ee, z, V), B.allowVerticalPlacement && (this.markUsedOrientation(B, V, z), this.placedOrientations[z.crossTileID] = V), { shift: ae, placedGlyphBoxes: ge };
15798
15798
  }
15799
15799
  }
15800
15800
  placeLayerBucketPart(t, n, a) {
15801
15801
  const { bucket: c, layout: f, translationText: y, translationIcon: x, unwrappedTileID: w, pitchedLabelPlaneMatrix: S, textPixelRatio: P, holdingForFade: E, collisionBoxArray: C, partiallyEvaluatedTextSize: z, collisionGroup: B } = t.parameters, V = f.get("text-optional"), G = f.get("icon-optional"), N = h.aN(f, "text-overlap", "text-allow-overlap"), Z = N === "always", X = h.aN(f, "icon-overlap", "icon-allow-overlap"), $ = X === "always", U = f.get("text-rotation-alignment") === "map", H = f.get("text-pitch-alignment") === "map", q = f.get("icon-text-fit") !== "none", ee = f.get("symbol-z-order") === "viewport-y", oe = Z && ($ || !c.hasIconData() || G), ae = $ && (Z || !c.hasTextData() || V);
15802
15802
  !c.collisionArrays && C && c.deserializeCollisionBoxes(C);
15803
- const me = this.retainedQueryData[c.bucketInstanceId].tileID, pe = this._getTerrainElevationFunc(me), Ae = this.transform.getFastPathSimpleProjectionMatrix(me), we = (he, Ee, ke) => {
15803
+ const ge = this.retainedQueryData[c.bucketInstanceId].tileID, pe = this._getTerrainElevationFunc(ge), Ae = this.transform.getFastPathSimpleProjectionMatrix(ge), we = (he, Ee, ke) => {
15804
15804
  var st, kt;
15805
15805
  if (n[he.crossTileID]) return;
15806
15806
  if (E) return void (this.placements[he.crossTileID] = new gc(!1, !1, !1));
@@ -15822,7 +15822,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15822
15822
  }, Vi = he.textAnchorOffsetStartIndex, Xi = he.textAnchorOffsetEndIndex;
15823
15823
  if (Xi === Vi) {
15824
15824
  const bt = (gt, Vt) => {
15825
- const wt = this.collisionIndex.placeCollisionBox(gt, N, P, me, w, H, U, y, B.predicate, pe, void 0, Ae);
15825
+ const wt = this.collisionIndex.placeCollisionBox(gt, N, P, ge, w, H, U, y, B.predicate, pe, void 0, Ae);
15826
15826
  return wt?.placeable && (this.markUsedOrientation(c, Vt, he), this.placedOrientations[he.crossTileID] = Vt), wt;
15827
15827
  };
15828
15828
  mr((() => bt(ci, h.ax.horizontal)), (() => {
@@ -15839,12 +15839,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15839
15839
  for (let Nl = Vi; Nl < Xi; Nl++) {
15840
15840
  const aa = c.textAnchorOffsets.get(Nl);
15841
15841
  if (bt && aa.textAnchor !== bt) continue;
15842
- const la = this.attemptAnchorPlacement(aa, wt, Mr, Ol, pu, U, H, P, me, w, B, Yr, he, c, oa, y, x, Vl, pe);
15842
+ const la = this.attemptAnchorPlacement(aa, wt, Mr, Ol, pu, U, H, P, ge, w, B, Yr, he, c, oa, y, x, Vl, pe);
15843
15843
  if (la && (Hr = la.placedGlyphBoxes, Hr?.placeable)) return ut = !0, ai = la.shift, Hr;
15844
15844
  }
15845
15845
  bt ? bt = null : Yr = N;
15846
15846
  }
15847
- return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(ci, "always", P, me, w, H, U, y, B.predicate, pe, void 0, Ae).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15847
+ return a && !Hr && (Hr = { box: this.collisionIndex.placeCollisionBox(ci, "always", P, ge, w, H, U, y, B.predicate, pe, void 0, Ae).box, offscreen: !1, placeable: !1, occluded: !1 }), Hr;
15848
15848
  };
15849
15849
  mr((() => gt(ci, Ee.iconBox, h.ax.horizontal)), (() => {
15850
15850
  const wt = Ee.verticalTextBox;
@@ -15862,7 +15862,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15862
15862
  qt = this.collisionIndex.placeCollisionCircles(N, fr, c.lineVertexArray, c.glyphOffsetArray, mr, w, S, a, H, B.predicate, he.collisionCircleDiameter, Vi, y, pe), qt.circles.length && qt.collisionDetected && !a && h.w("Collisions detected, but collision boxes are not shown"), ut = Z || qt.circles.length > 0 && !qt.collisionDetected, Ot && (Ot = qt.offscreen);
15863
15863
  }
15864
15864
  if (Ee.iconFeatureIndex && (qr = Ee.iconFeatureIndex), Ee.iconBox) {
15865
- const fr = (mr) => this.collisionIndex.placeCollisionBox(mr, X, P, me, w, H, U, x, B.predicate, pe, q && ai ? ai : void 0, Ae);
15865
+ const fr = (mr) => this.collisionIndex.placeCollisionBox(mr, X, P, ge, w, H, U, x, B.predicate, pe, q && ai ? ai : void 0, Ae);
15866
15866
  xi && xi.placeable && Ee.verticalIconBox ? (li = fr(Ee.verticalIconBox), Lt = li.placeable) : (li = fr(Ee.iconBox), Lt = li.placeable), Ot && (Ot = li.offscreen);
15867
15867
  }
15868
15868
  const Pr = V || he.numHorizontalGlyphVertices === 0 && he.numVerticalGlyphVertices === 0, Wr = G || he.numIconVertices === 0;
@@ -15961,7 +15961,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15961
15961
  const pe = Ha(H.icon), Ae = !(z && Z.verticalPlacedIconSymbolIndex && oe);
15962
15962
  Z.placedIconSymbolIndex >= 0 && (V(t.icon, Z.numIconVertices, Ae ? pe : As), t.icon.placedSymbolArray.get(Z.placedIconSymbolIndex).hidden = H.icon.isHidden()), Z.verticalPlacedIconSymbolIndex >= 0 && (V(t.icon, Z.numVerticalIconVertices, Ae ? As : pe), t.icon.placedSymbolArray.get(Z.verticalPlacedIconSymbolIndex).hidden = H.icon.isHidden());
15963
15963
  }
15964
- const me = G?.has(N) ? G.get(N) : { text: null, icon: null };
15964
+ const ge = G?.has(N) ? G.get(N) : { text: null, icon: null };
15965
15965
  if (t.hasIconCollisionBoxData() || t.hasTextCollisionBoxData()) {
15966
15966
  const pe = t.collisionArrays[N];
15967
15967
  if (pe) {
@@ -15974,13 +15974,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15974
15974
  }
15975
15975
  if (pe.textBox || pe.verticalTextBox) {
15976
15976
  let he;
15977
- pe.textBox && (he = oe), pe.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, me.text, Ae.x, Ae.y);
15977
+ pe.textBox && (he = oe), pe.verticalTextBox && (he = ae), $a(t.textCollisionBox.collisionVertexArray, H.text.placed, !we || he, ge.text, Ae.x, Ae.y);
15978
15978
  }
15979
15979
  }
15980
15980
  if (pe.iconBox || pe.verticalIconBox) {
15981
15981
  const we = !!(!ae && pe.verticalIconBox);
15982
15982
  let he;
15983
- pe.iconBox && (he = we), pe.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, me.icon, z ? Ae.x : 0, z ? Ae.y : 0);
15983
+ pe.iconBox && (he = we), pe.verticalIconBox && (he = !we), $a(t.iconCollisionBox.collisionVertexArray, H.icon.placed, he, ge.icon, z ? Ae.x : 0, z ? Ae.y : 0);
15984
15984
  }
15985
15985
  }
15986
15986
  }
@@ -17425,12 +17425,12 @@ uniform ${P} ${E} u_${C};
17425
17425
  Z = ee !== null && ee >= 0 ? Math.max(Z, ee) : Math.max(Z, X[q]);
17426
17426
  }
17427
17427
  const U = (function(q, ee) {
17428
- const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]), me = [0, 0, 0, 0];
17429
- return h.b1(me, h.b2([], oe, ae)), me[3] = -h.b3(me, q[ee[0]]), me;
17428
+ const oe = h.b0([], q[ee[0]], q[ee[1]]), ae = h.b0([], q[ee[2]], q[ee[1]]), ge = [0, 0, 0, 0];
17429
+ return h.b1(ge, h.b2([], oe, ae)), ge[3] = -h.b3(ge, q[ee[0]]), ge;
17430
17430
  })(C, z), H = (function(q, ee) {
17431
- const oe = h.b7(q), ae = h.b8([], q, 1 / oe), me = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), pe = h.b7(me);
17431
+ const oe = h.b7(q), ae = h.b8([], q, 1 / oe), ge = h.b0([], ee, h.aZ([], ae, h.b3(ee, ae))), pe = h.b7(ge);
17432
17432
  if (pe > 0) {
17433
- const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], me, Ae / pe));
17433
+ const Ae = Math.sqrt(1 - ae[3] * ae[3]), we = h.aZ([], ae, -ae[3]), he = h.a_([], we, h.aZ([], ge, Ae / pe));
17434
17434
  return h.b9(ee, he);
17435
17435
  }
17436
17436
  return null;
@@ -18356,11 +18356,11 @@ uniform ${P} ${E} u_${C};
18356
18356
  if (t.z === 1) return Xn.fromAabb([t.x === 0 ? -w : 0, t.y === 0 ? 0 : -w, -w], [t.x === 0 ? 0 : w, t.y === 0 ? w : 0, w]);
18357
18357
  {
18358
18358
  const S = [Rt(0, 0, t.x, t.y, t.z), Rt(h.a6, 0, t.x, t.y, t.z), Rt(h.a6, h.a6, t.x, t.y, t.z), Rt(0, h.a6, t.x, t.y, t.z)], P = [];
18359
- for (const me of S) P.push(h.aZ([], me, w));
18360
- if (w !== x) for (const me of S) P.push(h.aZ([], me, x));
18359
+ for (const ge of S) P.push(h.aZ([], ge, w));
18360
+ if (w !== x) for (const ge of S) P.push(h.aZ([], ge, x));
18361
18361
  t.y === 0 && P.push([0, 1, 0]), t.y === (1 << t.z) - 1 && P.push([0, -1, 0]);
18362
18362
  const E = [1, 1, 1], C = [-1, -1, -1];
18363
- for (const me of P) for (let pe = 0; pe < 3; pe++) E[pe] = Math.min(E[pe], me[pe]), C[pe] = Math.max(C[pe], me[pe]);
18363
+ for (const ge of P) for (let pe = 0; pe < 3; pe++) E[pe] = Math.min(E[pe], ge[pe]), C[pe] = Math.max(C[pe], ge[pe]);
18364
18364
  const z = Rt(h.a6 / 2, h.a6 / 2, t.x, t.y, t.z), B = h.b2([], [0, 1, 0], z);
18365
18365
  h.b1(B, B);
18366
18366
  const V = h.b2([], z, B);
@@ -19166,8 +19166,8 @@ uniform ${P} ${E} u_${C};
19166
19166
  h.a_(z, E, [P[0] * C, P[1] * C, P[2] * C]);
19167
19167
  const B = h.b5(z) - 1, V = Math.exp(0.5 * -Math.max(B - 0.3, 0)), G = Fi(n.worldSize, n.center.lat) / Math.min(n.width, n.height), N = h.bw(G, 0.9, 0.5, 1, 0.25), Z = (1 - h.ao(-y)) * Math.min(V, N), X = n.center.lat, $ = n.zoom, U = new h.W(n.center.lng + w * Z, h.al(n.center.lat + S * Z, -h.am, h.am));
19168
19168
  n.setLocationAtPoint(c, a);
19169
- const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), ee = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, ee), 0.25), ae = h.bJ(H.lng, U.lng), me = h.bJ(H.lat, U.lat);
19170
- n.setCenter(new h.W(H.lng + ae * oe, H.lat + me * oe).wrap()), n.setZoom($ + Ut(X, n.center.lat));
19169
+ const H = n.center, q = h.bw(Math.abs(x), 45, 85, 0, 1), ee = h.bw(G, 0.75, 0.35, 0, 1), oe = Math.pow(Math.max(q, ee), 0.25), ae = h.bJ(H.lng, U.lng), ge = h.bJ(H.lat, U.lat);
19170
+ n.setCenter(new h.W(H.lng + ae * oe, H.lat + ge * oe).wrap()), n.setZoom($ + Ut(X, n.center.lat));
19171
19171
  }
19172
19172
  handleMapControlsPan(t, n, a) {
19173
19173
  if (!t.panDelta) return;
@@ -19219,8 +19219,8 @@ uniform ${P} ${E} u_${C};
19219
19219
  const C = P.center;
19220
19220
  jr(t, C);
19221
19221
  const z = (function($, U, H) {
19222
- const q = $t(U), ee = $t(H), oe = h.b3(q, ee), ae = Math.acos(oe), me = Tc($);
19223
- return ae / (2 * Math.PI) * me;
19222
+ const q = $t(U), ee = $t(H), oe = h.b3(q, ee), ae = Math.acos(oe), ge = Tc($);
19223
+ return ae / (2 * Math.PI) * ge;
19224
19224
  })(t, c, C), B = f + Ut(c.lat, 0), V = S + Ut(C.lat, 0), G = h.ao(V - B);
19225
19225
  let N;
19226
19226
  if (typeof n.minZoom == "number") {
@@ -19397,8 +19397,8 @@ uniform ${P} ${E} u_${C};
19397
19397
  G[N] = {};
19398
19398
  const Z = At.getImageCanvasContext((yield V[N]).data), X = (yield B[N]).data;
19399
19399
  for (const $ in X) {
19400
- const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: me, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he } = X[$];
19401
- G[N][$] = { data: null, pixelRatio: ae, sdf: oe, stretchX: me, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: Z } };
19400
+ const { width: U, height: H, x: q, y: ee, sdf: oe, pixelRatio: ae, stretchX: ge, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he } = X[$];
19401
+ G[N][$] = { data: null, pixelRatio: ae, sdf: oe, stretchX: ge, stretchY: pe, content: Ae, textFitWidth: we, textFitHeight: he, spriteData: { width: U, height: H, x: q, y: ee, context: Z } };
19402
19402
  }
19403
19403
  }
19404
19404
  return G;
@@ -20079,10 +20079,10 @@ uniform ${P} ${E} u_${C};
20079
20079
  if (P.linkProgram(this.program), !P.getProgramParameter(this.program, P.LINK_STATUS)) throw new Error(`Program failed to link: ${P.getProgramInfoLog(this.program)}`);
20080
20080
  P.deleteShader(ee), P.deleteShader(q);
20081
20081
  for (const ae of X) if (ae && !oe[ae]) {
20082
- const me = P.getUniformLocation(this.program, ae);
20083
- me && (oe[ae] = me);
20082
+ const ge = P.getUniformLocation(this.program, ae);
20083
+ ge && (oe[ae] = ge);
20084
20084
  }
20085
- this.fixedUniforms = c(t, oe), this.terrainUniforms = ((ae, me) => ({ u_depth: new h.b_(ae, me.u_depth), u_terrain: new h.b_(ae, me.u_terrain), u_terrain_dim: new h.bp(ae, me.u_terrain_dim), u_terrain_matrix: new h.c0(ae, me.u_terrain_matrix), u_terrain_unpack: new h.c1(ae, me.u_terrain_unpack), u_terrain_exaggeration: new h.bp(ae, me.u_terrain_exaggeration) }))(t, oe), this.projectionUniforms = ((ae, me) => ({ u_projection_matrix: new h.c0(ae, me.u_projection_matrix), u_projection_tile_mercator_coords: new h.c1(ae, me.u_projection_tile_mercator_coords), u_projection_clipping_plane: new h.c1(ae, me.u_projection_clipping_plane), u_projection_transition: new h.bp(ae, me.u_projection_transition), u_projection_fallback_matrix: new h.c0(ae, me.u_projection_fallback_matrix) }))(t, oe), this.binderUniforms = a ? a.getUniforms(t, oe) : [];
20085
+ this.fixedUniforms = c(t, oe), this.terrainUniforms = ((ae, ge) => ({ u_depth: new h.b_(ae, ge.u_depth), u_terrain: new h.b_(ae, ge.u_terrain), u_terrain_dim: new h.bp(ae, ge.u_terrain_dim), u_terrain_matrix: new h.c0(ae, ge.u_terrain_matrix), u_terrain_unpack: new h.c1(ae, ge.u_terrain_unpack), u_terrain_exaggeration: new h.bp(ae, ge.u_terrain_exaggeration) }))(t, oe), this.projectionUniforms = ((ae, ge) => ({ u_projection_matrix: new h.c0(ae, ge.u_projection_matrix), u_projection_tile_mercator_coords: new h.c1(ae, ge.u_projection_tile_mercator_coords), u_projection_clipping_plane: new h.c1(ae, ge.u_projection_clipping_plane), u_projection_transition: new h.bp(ae, ge.u_projection_transition), u_projection_fallback_matrix: new h.c0(ae, ge.u_projection_fallback_matrix) }))(t, oe), this.binderUniforms = a ? a.getUniforms(t, oe) : [];
20086
20086
  }
20087
20087
  draw(t, n, a, c, f, y, x, w, S, P, E, C, z, B, V, G, N, Z, X) {
20088
20088
  var $;
@@ -20730,7 +20730,7 @@ uniform ${P} ${E} u_${C};
20730
20730
  const X = new h.P(N.anchorX, N.anchorY), $ = { getElevation: E, width: c.width, height: c.height, pitchedLabelPlaneMatrix: f, pitchWithMap: n, transform: c, tileAnchorPoint: X, translation: S, unwrappedTileID: P }, U = n ? Nn(X.x, X.y, $) : at(X.x, X.y, $), H = Ts(c.cameraToCenterDistance, U.signedDistanceFromCamera);
20731
20731
  let q = h.ay(d.textSizeData, x, N) * H / h.aJ;
20732
20732
  n && (q *= d.tilePixelRatio / y);
20733
- const { width: ee, height: oe, anchor: ae, textOffset: me, textBoxScale: pe } = Z, Ae = fl(ae, ee, oe, me, pe, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = sh(U.point, $, t, Ae, -c.bearingInRadians, we), Ee = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20733
+ const { width: ee, height: oe, anchor: ae, textOffset: ge, textBoxScale: pe } = Z, Ae = fl(ae, ee, oe, ge, pe, q), we = c.getPitchedTextCorrection(X.x + S[0], X.y + S[1], P), he = sh(U.point, $, t, Ae, -c.bearingInRadians, we), Ee = d.allowVerticalPlacement && N.placedOrientation === h.ax.vertical ? Math.PI / 2 : 0;
20734
20734
  for (let ke = 0; ke < N.numGlyphs; ke++) h.aD(z, he, Ee);
20735
20735
  w && N.associatedIconIndex >= 0 && (V[N.associatedIconIndex] = { shiftedAnchor: he, angle: Ee });
20736
20736
  } else cn(N.numGlyphs, z);
@@ -20758,7 +20758,7 @@ uniform ${P} ${E} u_${C};
20758
20758
  var z, B;
20759
20759
  const V = d.context, G = V.gl, N = d.transform, Z = x === "map", X = w === "map", $ = x !== "viewport" && n.layout.get("symbol-placement") !== "point", U = Z && !X && !$, H = !n.layout.get("symbol-sort-key").isConstant();
20760
20760
  let q = !1;
20761
- const ee = d.getDepthModeForSublayer(0, Ze.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], me = N.getCircleRadiusCorrection();
20761
+ const ee = d.getDepthModeForSublayer(0, Ze.ReadOnly), oe = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), ae = [], ge = N.getCircleRadiusCorrection();
20762
20762
  for (const we of a) {
20763
20763
  const he = t.getTile(we), Ee = he.getBucket(n);
20764
20764
  if (!Ee) continue;
@@ -20780,7 +20780,7 @@ uniform ${P} ${E} u_${C};
20780
20780
  }
20781
20781
  const Vi = c && oe || mr, Xi = $ || Vi ? rs : X ? ci : d.transform.clipSpaceToPixelsMatrix, bt = kt && n.paint.get(c ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
20782
20782
  let gt;
20783
- gt = kt ? Ee.iconsInText ? cl(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, xi, Zr, me) : ll(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, c, xi, bt, me) : ko(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, c, xi, me);
20783
+ gt = kt ? Ee.iconsInText ? cl(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, xi, Zr, ge) : ll(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, c, xi, bt, ge) : ko(ut.kind, ai, U, X, $, Vi, d, Xi, Pr, Wr, c, xi, ge);
20784
20784
  const Vt = { program: Ot, buffers: ke, uniformValues: gt, projectionData: sa, atlasTexture: ii, atlasTextureIcon: $r, atlasInterpolation: qt, atlasInterpolationIcon: li, isSDF: kt, hasHalo: bt };
20785
20785
  if (H && Ee.canOverlap) {
20786
20786
  q = !0;
@@ -20881,7 +20881,7 @@ uniform ${P} ${E} u_${C};
20881
20881
  if (C && !ee.patternsLoaded()) continue;
20882
20882
  const oe = ee.getBucket(n);
20883
20883
  if (!oe) continue;
20884
- const ae = oe.programConfigurations.get(n.id), me = d.useProgram(V, ae), pe = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
20884
+ const ae = oe.programConfigurations.get(n.id), ge = d.useProgram(V, ae), pe = (w = d.style.map.terrain) === null || w === void 0 ? void 0 : w.getTerrainData(q);
20885
20885
  C && (d.context.activeTexture.set(S.TEXTURE0), ee.imageAtlasTexture.bind(S.LINEAR, S.CLAMP_TO_EDGE), ae.updatePaintBuffers(z)), Ai(ae, P, H, ee, n);
20886
20886
  const Ae = X.getProjectionData({ overscaledTileID: q, applyGlobeMatrix: !x, applyTerrainMatrix: !0 }), we = h.aL(X, ee, $, U);
20887
20887
  if (y) {
@@ -20890,7 +20890,7 @@ uniform ${P} ${E} u_${C};
20890
20890
  G = V === "fillOutlinePattern" && C ? Ec(d, z, ee, Ee, we) : Ic(Ee, we);
20891
20891
  } else N = oe.indexBuffer, Z = oe.segments, G = C ? Do(d, z, ee, we) : { u_fill_translate: we };
20892
20892
  const he = d.stencilModeForClipping(q);
20893
- me.draw(d.context, B, c, he, f, Je.backCCW, G, pe, Ae, n.id, oe.layoutVertexBuffer, N, Z, n.paint, d.transform.zoom, ae);
20893
+ ge.draw(d.context, B, c, he, f, Je.backCCW, G, pe, Ae, n.id, oe.layoutVertexBuffer, N, Z, n.paint, d.transform.zoom, ae);
20894
20894
  }
20895
20895
  }
20896
20896
  function ns(d, t, n, a, c, f, y, x) {
@@ -20903,8 +20903,8 @@ uniform ${P} ${E} u_${C};
20903
20903
  z && (d.context.activeTexture.set(P.TEXTURE0), X.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), H.updatePaintBuffers(B));
20904
20904
  const ee = N.getProjectionData({ overscaledTileID: Z, applyGlobeMatrix: !x, applyTerrainMatrix: !0 });
20905
20905
  Ai(H, E, G, X, n);
20906
- const oe = h.aL(N, X, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ae = n.paint.get("fill-extrusion-vertical-gradient"), me = z ? Mc(d, ae, V, oe, Z, B, X) : Pc(d, ae, V, oe);
20907
- q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW, me, U, ee, n.id, $.layoutVertexBuffer, $.indexBuffer, $.segments, n.paint, d.transform.zoom, H, d.style.map.terrain && $.centroidVertexBuffer);
20906
+ const oe = h.aL(N, X, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), ae = n.paint.get("fill-extrusion-vertical-gradient"), ge = z ? Mc(d, ae, V, oe, Z, B, X) : Pc(d, ae, V, oe);
20907
+ q.draw(S, S.gl.TRIANGLES, c, f, y, Je.backCCW, ge, U, ee, n.id, $.layoutVertexBuffer, $.indexBuffer, $.segments, n.paint, d.transform.zoom, H, d.style.map.terrain && $.centroidVertexBuffer);
20908
20908
  }
20909
20909
  }
20910
20910
  function Wo(d, t, n, a, c, f, y, x, w) {
@@ -20928,14 +20928,14 @@ uniform ${P} ${E} u_${C};
20928
20928
  const $ = t.getTile(X), U = $.dem;
20929
20929
  if (N) {
20930
20930
  Nr || (Nr = z.getParameter(z.MAX_TEXTURE_SIZE));
20931
- const me = Nr, { elevationTexture: pe, colorTexture: Ae } = n.getColorRampTextures(E, me, U.getUnpackVector());
20931
+ const ge = Nr, { elevationTexture: pe, colorTexture: Ae } = n.getColorRampTextures(E, ge, U.getUnpackVector());
20932
20932
  E.activeTexture.set(z.TEXTURE1), pe.bind(z.NEAREST, z.CLAMP_TO_EDGE), E.activeTexture.set(z.TEXTURE4), Ae.bind(z.LINEAR, z.CLAMP_TO_EDGE), N = !1, Z = pe.size[0];
20933
20933
  }
20934
20934
  if (!U?.data) continue;
20935
20935
  const H = U.stride, q = U.getPixels();
20936
20936
  if (E.activeTexture.set(z.TEXTURE0), E.pixelStoreUnpackPremultiplyAlpha.set(!1), $.demTexture || ($.demTexture = d.getTileTexture(H)), $.demTexture) {
20937
- const me = $.demTexture;
20938
- me.update(q, { premultiply: !1 }), me.bind(G, z.CLAMP_TO_EDGE);
20937
+ const ge = $.demTexture;
20938
+ ge.update(q, { premultiply: !1 }), ge.bind(G, z.CLAMP_TO_EDGE);
20939
20939
  } else $.demTexture = new h.T(E, q, z.RGBA, { premultiply: !1 }), $.demTexture.bind(G, z.CLAMP_TO_EDGE);
20940
20940
  const ee = P.getMeshFromTileID(E, X.canonical, x, !0, "raster"), oe = (S = d.style.map.terrain) === null || S === void 0 ? void 0 : S.getTerrainData(X), ae = C.getProjectionData({ overscaledTileID: X, aligned: V, applyGlobeMatrix: !w, applyTerrainMatrix: !0 });
20941
20941
  B.draw(E, z.TRIANGLES, f, c[X.overscaledZ], y, Je.backCCW, Ku(n, $.dem, Z), oe, ae, n.id, ee.vertexBuffer, ee.indexBuffer, ee.segments);
@@ -20948,9 +20948,9 @@ uniform ${P} ${E} u_${C};
20948
20948
  for (const q of a) {
20949
20949
  const ee = d.getDepthModeForSublayer(q.overscaledZ - E, X === 1 ? Ze.ReadWrite : Ze.ReadOnly, z.LESS), oe = t.getTile(q);
20950
20950
  C.activeTexture.set(z.TEXTURE0), oe.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), C.activeTexture.set(z.TEXTURE1);
20951
- const { parentTile: ae, parentScaleBy: me, parentTopLeft: pe, fadeValues: Ae } = qc(oe, t, U, H);
20951
+ const { parentTile: ae, parentScaleBy: ge, parentTopLeft: pe, fadeValues: Ae } = qc(oe, t, U, H);
20952
20952
  oe.fadeOpacity = Ae.tileOpacity, ae ? (ae.fadeOpacity = Ae.parentTileOpacity, ae.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind($, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), oe.texture.useMipmap && C.extTextureFilterAnisotropic && d.transform.pitch > d.options.anisotropicFilterPitch && z.texParameterf(z.TEXTURE_2D, C.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, C.extTextureFilterAnisotropicMax);
20953
- const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: Z, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ee = ol(pe, me, Ae.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20953
+ const we = (P = d.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(q), he = V.getProjectionData({ overscaledTileID: q, aligned: Z, applyGlobeMatrix: !S, applyTerrainMatrix: !0 }), Ee = ol(pe, ge, Ae.fadeMix, n, x), ke = G.getMeshFromTileID(C, q.canonical, f, y, "raster");
20954
20954
  B.draw(C, z.TRIANGLES, ee, c ? c[q.overscaledZ] : et.disabled, N, w ? Je.frontCCW : Je.backCCW, Ee, we, he, n.id, ke.vertexBuffer, ke.indexBuffer, ke.segments);
20955
20955
  }
20956
20956
  }
@@ -21028,7 +21028,7 @@ uniform ${P} ${E} u_${C};
21028
21028
  for (const q of S) {
21029
21029
  const ee = C.getTile(q), oe = ee.getBucket(E);
21030
21030
  if (!(!((Z = oe?.text) === null || Z === void 0) && Z.segments.get().length)) continue;
21031
- const ae = h.aw(oe.textSizeData, X.zoom), me = h.aK(ee, 1, P.transform.zoom), pe = Ri(U, P.transform, me), Ae = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
21031
+ const ae = h.aw(oe.textSizeData, X.zoom), ge = h.aK(ee, 1, P.transform.zoom), pe = Ri(U, P.transform, ge), Ae = E.layout.get("icon-text-fit") !== "none" && oe.hasIconData();
21032
21032
  if (ae) {
21033
21033
  const we = Math.pow(2, X.zoom - ee.tileID.overscaledZ), he = $ ? (Ee, ke) => $.getElevation(q, Ee, ke) : null;
21034
21034
  js(oe, U, H, N, X, pe, we, ae, Ae, h.aL(X, ee, V, G), q.toUnwrapped(), he);
@@ -21044,7 +21044,7 @@ uniform ${P} ${E} u_${C};
21044
21044
  for (const X of a) {
21045
21045
  const $ = t.getTile(X), U = $.getBucket(n);
21046
21046
  if (!U) continue;
21047
- const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, $, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), me = U.layoutVertexBuffer, pe = U.indexBuffer, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: me, indexBuffer: pe, uniformValues: Cc(d, $, n, ee, Z), terrainData: Ae, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
21047
+ const H = n.paint.get("circle-translate"), q = n.paint.get("circle-translate-anchor"), ee = h.aL(z, $, H, q), oe = U.programConfigurations.get(n.id), ae = d.useProgram("circle", oe), ge = U.layoutVertexBuffer, pe = U.indexBuffer, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(X), we = { programConfiguration: oe, program: ae, layoutVertexBuffer: ge, indexBuffer: pe, uniformValues: Cc(d, $, n, ee, Z), terrainData: Ae, projectionData: z.getProjectionData({ overscaledTileID: X, applyGlobeMatrix: !y, applyTerrainMatrix: !0 }) };
21048
21048
  if (P) {
21049
21049
  const he = U.segments.get();
21050
21050
  for (const Ee of he) N.push({ segments: new h.aV([Ee]), sortKey: Ee.sortKey, state: we });
@@ -21101,7 +21101,7 @@ uniform ${P} ${E} u_${C};
21101
21101
  if (B && !q.patternsLoaded()) continue;
21102
21102
  const ee = q.getBucket(n);
21103
21103
  if (!ee) continue;
21104
- const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), me = d.useProgram(N, oe), pe = U || me.program !== ae, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
21104
+ const oe = ee.programConfigurations.get(n.id), ae = d.context.program.get(), ge = d.useProgram(N, oe), pe = U || ge.program !== ae, Ae = (f = d.style.map.terrain) === null || f === void 0 ? void 0 : f.getTerrainData(H), we = z.constantOr(null), he = E?.constantOr(null);
21105
21105
  if (we && q.imageAtlas) {
21106
21106
  const ut = q.imageAtlas, Lt = ut.patternPositions[we.to.toString()], Ot = ut.patternPositions[we.from.toString()];
21107
21107
  Lt && Ot && oe.setConstantPatternPositions(Lt, Ot);
@@ -21113,7 +21113,7 @@ uniform ${P} ${E} u_${C};
21113
21113
  let st;
21114
21114
  B ? (st = zc(d, q, n, ke, G), ah(Z, X, q, oe, G)) : C && V ? (st = kc(d, q, n, ke, G, ee.lineClipsArray.length), wn(d, t, Z, X, n, ee, H, oe, G)) : C ? (st = sl(d, q, n, ke, G), $c(d, Z, X, oe, pe, G)) : V ? (st = Dc(d, q, n, ke, ee.lineClipsArray.length), zt(d, t, Z, X, n, ee, H)) : st = Rs(d, q, n, ke);
21115
21115
  const kt = d.stencilModeForClipping(H);
21116
- me.draw(Z, X.TRIANGLES, S, kt, P, Je.disabled, st, Ae, Ee, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
21116
+ ge.draw(Z, X.TRIANGLES, S, kt, P, Je.disabled, st, Ae, Ee, n.id, ee.layoutVertexBuffer, ee.indexBuffer, ee.segments, n.paint, d.transform.zoom, oe, ee.layoutVertexBuffer2), U = !1;
21117
21117
  }
21118
21118
  }, fill: function(d, t, n, a, c) {
21119
21119
  const f = n.paint.get("fill-color"), y = n.paint.get("fill-opacity");
@@ -21149,14 +21149,14 @@ uniform ${P} ${E} u_${C};
21149
21149
  if (!H?.data || !U.needsHillshadePrepare) continue;
21150
21150
  const q = H.dim, ee = H.stride, oe = H.getPixels();
21151
21151
  if (N.activeTexture.set(Z.TEXTURE1), N.pixelStoreUnpackPremultiplyAlpha.set(!1), U.demTexture || (U.demTexture = P.getTileTexture(ee)), U.demTexture) {
21152
- const me = U.demTexture;
21153
- me.update(oe, { premultiply: !1 }), me.bind(Z.NEAREST, Z.CLAMP_TO_EDGE);
21152
+ const ge = U.demTexture;
21153
+ ge.update(oe, { premultiply: !1 }), ge.bind(Z.NEAREST, Z.CLAMP_TO_EDGE);
21154
21154
  } else U.demTexture = new h.T(N, oe, Z.RGBA, { premultiply: !1 }), U.demTexture.bind(Z.NEAREST, Z.CLAMP_TO_EDGE);
21155
21155
  N.activeTexture.set(Z.TEXTURE0);
21156
21156
  let ae = U.fbo;
21157
21157
  if (!ae) {
21158
- const me = new h.T(N, { width: q, height: q, data: null }, Z.RGBA);
21159
- me.bind(X, Z.CLAMP_TO_EDGE), ae = U.fbo = N.createFramebuffer(q, q, !0, !1), ae.colorAttachment.set(me.texture);
21158
+ const ge = new h.T(N, { width: q, height: q, data: null }, Z.RGBA);
21159
+ ge.bind(X, Z.CLAMP_TO_EDGE), ae = U.fbo = N.createFramebuffer(q, q, !0, !1), ae.colorAttachment.set(ge.texture);
21160
21160
  }
21161
21161
  N.bindFramebuffer.set(ae.framebuffer), N.viewport.set([0, 0, q, q]), P.useProgram("hillshadePrepare").draw(N, Z.TRIANGLES, B, V, G, Je.disabled, zo(U.tileID, H), null, null, z.id, P.rasterBoundsBuffer, P.quadTriangleIndexBuffer, P.rasterBoundsSegments), U.needsHillshadePrepare = !1;
21162
21162
  }
@@ -22582,11 +22582,11 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22582
22582
  const S = n.touchPitch = new Tr(n);
22583
22583
  this._add("touchPitch", S), t.interactive && t.touchPitch && n.touchPitch.enable(t.touchPitch);
22584
22584
  const P = () => n.project(n.getCenter()), E = (function({ enable: $, clickTolerance: U, aroundCenter: H = !0, minPixelCenterThreshold: q = 100, rotateDegreesPerPixelMoved: ee = 0.8 }, oe) {
22585
- const ae = new Sn({ checkCorrectEvent: (me) => me.button === 0 && me.ctrlKey || me.button === 2 && !me.ctrlKey });
22586
- return new wr({ clickTolerance: U, move: (me, pe) => {
22585
+ const ae = new Sn({ checkCorrectEvent: (ge) => ge.button === 0 && ge.ctrlKey || ge.button === 2 && !ge.ctrlKey });
22586
+ return new wr({ clickTolerance: U, move: (ge, pe) => {
22587
22587
  const Ae = oe();
22588
- if (H && Math.abs(Ae.y - me.y) > q) return { bearingDelta: h.cx(new h.P(me.x, pe.y), pe, Ae) };
22589
- let we = (pe.x - me.x) * ee;
22588
+ if (H && Math.abs(Ae.y - ge.y) > q) return { bearingDelta: h.cx(new h.P(ge.x, pe.y), pe, Ae) };
22589
+ let we = (pe.x - ge.x) * ee;
22590
22590
  return H && pe.y < Ae.y && (we = -we), { bearingDelta: we };
22591
22591
  }, moveStateManager: ae, enable: $, assignEvents: Ho });
22592
22592
  })(t, P), C = (function({ enable: $, clickTolerance: U, pitchDegreesPerPixelMoved: H = -0.5 }) {
@@ -22595,9 +22595,9 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22595
22595
  })(t), z = (function({ enable: $, clickTolerance: U, rollDegreesPerPixelMoved: H = 0.3 }, q) {
22596
22596
  const ee = new Sn({ checkCorrectEvent: (oe) => oe.button === 2 && oe.ctrlKey });
22597
22597
  return new wr({ clickTolerance: U, move: (oe, ae) => {
22598
- const me = q();
22598
+ const ge = q();
22599
22599
  let pe = (ae.x - oe.x) * H;
22600
- return ae.y < me.y && (pe = -pe), { rollDelta: pe };
22600
+ return ae.y < ge.y && (pe = -pe), { rollDelta: pe };
22601
22601
  }, moveStateManager: ee, enable: $, assignEvents: Ho });
22602
22602
  })(t, P);
22603
22603
  n.dragRotate = new Js(t, E, C, z), this._add("mouseRotate", E, ["mousePitch"]), this._add("mousePitch", C, ["mouseRotate", "mouseRoll"]), this._add("mouseRoll", z, ["mousePitch"]), t.interactive && t.dragRotate && n.dragRotate.enable();
@@ -22949,14 +22949,14 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
22949
22949
  }, ae = function(pe) {
22950
22950
  return N * ((q(ee) * (H(Ae = ee + G * pe) / q(Ae)) - H(ee)) / $) / X;
22951
22951
  var Ae;
22952
- }, me = (U(!0) - ee) / G;
22953
- if (Math.abs(X) < 2e-6 || !isFinite(me)) {
22952
+ }, ge = (U(!0) - ee) / G;
22953
+ if (Math.abs(X) < 2e-6 || !isFinite(ge)) {
22954
22954
  if (Math.abs(N - Z) < 1e-6) return this.easeTo(t, n);
22955
22955
  const pe = Z < N ? -1 : 1;
22956
- me = Math.abs(Math.log(Z / N)) / G, ae = () => 0, oe = (Ae) => Math.exp(pe * G * Ae);
22956
+ ge = Math.abs(Math.log(Z / N)) / G, ae = () => 0, oe = (Ae) => Math.exp(pe * G * Ae);
22957
22957
  }
22958
- return t.duration = "duration" in t ? +t.duration : 1e3 * me / ("screenSpeed" in t ? +t.screenSpeed / G : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = c !== w, this._pitching = S !== f, this._rolling = P !== y, this._padding = !a.isPaddingEqual(E), this._prepareEase(n, !1), this.terrain && this._prepareElevation(V.targetCenter), this._ease(((pe) => {
22959
- const Ae = pe * me, we = 1 / oe(Ae), he = ae(Ae);
22958
+ return t.duration = "duration" in t ? +t.duration : 1e3 * ge / ("screenSpeed" in t ? +t.screenSpeed / G : +t.speed), t.maxDuration && t.duration > t.maxDuration && (t.duration = 0), this._zooming = !0, this._rotating = c !== w, this._pitching = S !== f, this._rolling = P !== y, this._padding = !a.isPaddingEqual(E), this._prepareEase(n, !1), this.terrain && this._prepareElevation(V.targetCenter), this._ease(((pe) => {
22959
+ const Ae = pe * ge, we = 1 / oe(Ae), he = ae(Ae);
22960
22960
  this._rotating && a.setBearing(h.H.number(c, w, pe)), this._pitching && a.setPitch(h.H.number(f, S, pe)), this._rolling && a.setRoll(h.H.number(y, P, pe)), this._padding && (a.interpolatePadding(x, E, pe), z = a.centerPoint.add(C)), V.easeFunc(pe, we, he, z), this.terrain && !t.freezeElevation && this._updateElevation(pe), this._applyUpdatedTransform(a), this._fireMoveEvents(n);
22961
22961
  }), (() => {
22962
22962
  this.terrain && t.freezeElevation && this._finalizeElevation(), this._afterEase(n);
@@ -24722,7 +24722,7 @@ ${x.shaderPreludeCode.vertexSource}`, define: x.shaderDefine }, defaultProjectio
24722
24722
  h.c.WORKER_URL = d;
24723
24723
  };
24724
24724
  }));
24725
- var Le = ge;
24725
+ var Le = me;
24726
24726
  return Le;
24727
24727
  }));
24728
24728
  })(ju)), ju.exports;
@@ -24735,22 +24735,22 @@ class Ty {
24735
24735
  Vu(Q.id, "id is required"), this.id = Q.id, this.type = "custom", this.renderingMode = Q.renderingMode || "3d", this.slot = Q.slot, this.beforeId = Q.beforeId, this.map = null;
24736
24736
  }
24737
24737
  /* Mapbox custom layer methods */
24738
- onAdd(Q, ge) {
24738
+ onAdd(Q, me) {
24739
24739
  this.map = Q;
24740
24740
  }
24741
- render(Q, ge) {
24742
- this.map && Ey(this.map.__deck, this.map, this, ge);
24741
+ render(Q, me) {
24742
+ this.map && Ey(this.map.__deck, this.map, this, me);
24743
24743
  }
24744
24744
  }
24745
24745
  const Pd = "__UNDEFINED__";
24746
24746
  function ac(Pe) {
24747
24747
  return Pe.props.beforeId ? `deck-layer-group-before:${Pe.props.beforeId}` : Pe.props.slot ? `deck-layer-group-slot:${Pe.props.slot}` : "deck-layer-group-last";
24748
24748
  }
24749
- function Sy(Pe, Q, ge) {
24749
+ function Sy(Pe, Q, me) {
24750
24750
  if (!Pe || !Pe.style || !Pe.style._loaded)
24751
24751
  return;
24752
- const Ie = Ed(ge, Boolean);
24753
- if (Q !== ge) {
24752
+ const Ie = Ed(me, Boolean);
24753
+ if (Q !== me) {
24754
24754
  const R = Ed(Q, Boolean), h = new Set(R.map((ct) => ac(ct))), de = new Set(Ie.map((ct) => ac(ct)));
24755
24755
  for (const ct of h)
24756
24756
  de.has(ct) || Pe.getLayer(ct) && Pe.removeLayer(ct);
@@ -24783,10 +24783,10 @@ const Ra = "mapbox", Md = 512, Py = Math.PI / 180;
24783
24783
  function My({ map: Pe, deck: Q }) {
24784
24784
  if (Pe.__deck)
24785
24785
  return Pe.__deck;
24786
- const ge = Q.props._customRender, Ie = Q.props.onLoad, Te = {
24786
+ const me = Q.props._customRender, Ie = Q.props.onLoad, Te = {
24787
24787
  ...Q.props,
24788
24788
  _customRender: () => {
24789
- Pe.triggerRepaint(), ge?.("");
24789
+ Pe.triggerRepaint(), me?.("");
24790
24790
  }
24791
24791
  };
24792
24792
  return Te.views || (Te.views = Nu(Pe)), Object.assign(Te, {
@@ -24801,10 +24801,10 @@ function My({ map: Pe, deck: Q }) {
24801
24801
  }), Q;
24802
24802
  }
24803
24803
  function nm(Pe, Q) {
24804
- const ge = () => {
24805
- Pe.isInitialized ? Dy(Pe, Q) : Q.off("move", ge);
24804
+ const me = () => {
24805
+ Pe.isInitialized ? Dy(Pe, Q) : Q.off("move", me);
24806
24806
  };
24807
- Q.on("move", ge);
24807
+ Q.on("move", me);
24808
24808
  }
24809
24809
  function Iy(Pe) {
24810
24810
  Pe.__deck?.finalize(), Pe.__deck = null;
@@ -24823,7 +24823,7 @@ function Id(Pe, Q) {
24823
24823
  blendAlphaOperation: "add"
24824
24824
  } : {};
24825
24825
  }
24826
- function Ey(Pe, Q, ge, Ie) {
24826
+ function Ey(Pe, Q, me, Ie) {
24827
24827
  if (!Pe.isInitialized)
24828
24828
  return;
24829
24829
  let { currentViewport: Te } = Pe.userData, Le = !1;
@@ -24833,21 +24833,21 @@ function Ey(Pe, Q, ge, Ie) {
24833
24833
  if (Pe.props.layerFilter && !Pe.props.layerFilter(R))
24834
24834
  return !1;
24835
24835
  const h = R.layer;
24836
- return h.props.beforeId === ge.beforeId && h.props.slot === ge.slot;
24836
+ return h.props.beforeId === me.beforeId && h.props.slot === me.slot;
24837
24837
  },
24838
24838
  clearStack: Le,
24839
24839
  clearCanvas: !1
24840
24840
  });
24841
24841
  }
24842
24842
  function lm(Pe) {
24843
- const Q = Pe.getProjection?.(), ge = (
24843
+ const Q = Pe.getProjection?.(), me = (
24844
24844
  // maplibre projection spec
24845
24845
  Q?.type || // mapbox projection spec
24846
24846
  Q?.name
24847
24847
  );
24848
- if (ge === "globe")
24848
+ if (me === "globe")
24849
24849
  return "globe";
24850
- if (ge && ge !== "mercator")
24850
+ if (me && me !== "mercator")
24851
24851
  throw new Error("Unsupported projection");
24852
24852
  return "mercator";
24853
24853
  }
@@ -24855,11 +24855,11 @@ function Nu(Pe) {
24855
24855
  return lm(Pe) === "globe" ? new om({ id: Ra }) : new dy({ id: Ra });
24856
24856
  }
24857
24857
  function lc(Pe) {
24858
- const { lng: Q, lat: ge } = Pe.getCenter(), Ie = {
24858
+ const { lng: Q, lat: me } = Pe.getCenter(), Ie = {
24859
24859
  // Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
24860
24860
  // https://github.com/visgl/deck.gl/issues/6894
24861
24861
  longitude: (Q + 540) % 360 - 180,
24862
- latitude: ge,
24862
+ latitude: me,
24863
24863
  zoom: Pe.getZoom(),
24864
24864
  bearing: Pe.getBearing(),
24865
24865
  pitch: Pe.getPitch(),
@@ -24870,10 +24870,10 @@ function lc(Pe) {
24870
24870
  }
24871
24871
  function Cy(Pe, Q) {
24872
24872
  if (Pe.getFreeCameraOptions) {
24873
- const { position: ge } = Pe.getFreeCameraOptions();
24874
- if (!ge || ge.z === void 0)
24873
+ const { position: me } = Pe.getFreeCameraOptions();
24874
+ if (!me || me.z === void 0)
24875
24875
  return;
24876
- const Ie = Pe.transform.height, { longitude: Te, latitude: Le, pitch: R } = Q, h = ge.x * Md, de = (1 - ge.y) * Md, ct = ge.z * Md, Bt = py([Te, Le]), fi = h - Bt[0], Qi = de - Bt[1], At = Math.sqrt(fi * fi + Qi * Qi), si = R * Py, Xe = 1.5 * Ie, cr = si < 1e-3 ? (
24876
+ const Ie = Pe.transform.height, { longitude: Te, latitude: Le, pitch: R } = Q, h = me.x * Md, de = (1 - me.y) * Md, ct = me.z * Md, Bt = py([Te, Le]), fi = h - Bt[0], Qi = de - Bt[1], At = Math.sqrt(fi * fi + Qi * Qi), si = R * Py, Xe = 1.5 * Ie, cr = si < 1e-3 ? (
24877
24877
  // Pitch angle too small to deduce the look at point, assume elevation is 0
24878
24878
  Xe * Math.cos(si) / ct
24879
24879
  ) : Xe * Math.sin(si) / At;
@@ -24882,10 +24882,10 @@ function Cy(Pe, Q) {
24882
24882
  Q.position = [0, 0, fe / fy(Le)];
24883
24883
  } else typeof Pe.transform.elevation == "number" && (Q.position = [0, 0, Pe.transform.elevation]);
24884
24884
  }
24885
- function cm(Pe, Q, ge) {
24885
+ function cm(Pe, Q, me) {
24886
24886
  const Ie = lc(Q), Te = Pe.getView(Ra) || Nu(Q);
24887
- ge && (Te.props.nearZMultiplier = 0.2);
24888
- const Le = ge?.nearZ ?? Q.transform._nearZ, R = ge?.farZ ?? Q.transform._farZ;
24887
+ me && (Te.props.nearZMultiplier = 0.2);
24888
+ const Le = me?.nearZ ?? Q.transform._nearZ, R = me?.farZ ?? Q.transform._farZ;
24889
24889
  return Number.isFinite(Le) && (Ie.nearZ = Le / Q.transform.height, Ie.farZ = R / Q.transform.height), Te.makeViewport({
24890
24890
  width: Pe.width,
24891
24891
  height: Pe.height,
@@ -24983,13 +24983,13 @@ class zy {
24983
24983
  return;
24984
24984
  }
24985
24985
  };
24986
- const { interleaved: ge = !1 } = Q;
24987
- this._interleaved = ge, this._props = this.filterProps(Q);
24986
+ const { interleaved: me = !1 } = Q;
24987
+ this._interleaved = me, this._props = this.filterProps(Q);
24988
24988
  }
24989
24989
  /** Filter out props to pass to Deck **/
24990
24990
  filterProps(Q) {
24991
- const { interleaved: ge = !1, useDevicePixels: Ie, ...Te } = Q;
24992
- return !ge && Ie !== void 0 && (Te.useDevicePixels = Ie), Te;
24991
+ const { interleaved: me = !1, useDevicePixels: Ie, ...Te } = Q;
24992
+ return !me && Ie !== void 0 && (Te.useDevicePixels = Ie), Te;
24993
24993
  }
24994
24994
  /** Update (partial) props of the underlying Deck instance. */
24995
24995
  setProps(Q) {
@@ -25009,34 +25009,34 @@ class zy {
25009
25009
  return this._map = Q, this._interleaved ? this._onAddInterleaved(Q) : this._onAddOverlaid(Q);
25010
25010
  }
25011
25011
  _onAddOverlaid(Q) {
25012
- const ge = document.createElement("div");
25013
- return Object.assign(ge.style, {
25012
+ const me = document.createElement("div");
25013
+ return Object.assign(me.style, {
25014
25014
  position: "absolute",
25015
25015
  left: 0,
25016
25016
  top: 0,
25017
25017
  textAlign: "initial",
25018
25018
  pointerEvents: "none"
25019
- }), this._container = ge, this._deck = new Qf({
25019
+ }), this._container = me, this._deck = new Qf({
25020
25020
  ...this._props,
25021
- parent: ge,
25021
+ parent: me,
25022
25022
  parameters: { ...Id(Q, !1), ...this._props.parameters },
25023
25023
  views: this._getViews(Q),
25024
25024
  viewState: lc(Q)
25025
- }), Q.on("resize", this._updateContainerSize), Q.on("render", this._updateViewState), Q.on("mousedown", this._handleMouseEvent), Q.on("dragstart", this._handleMouseEvent), Q.on("drag", this._handleMouseEvent), Q.on("dragend", this._handleMouseEvent), Q.on("mousemove", this._handleMouseEvent), Q.on("mouseout", this._handleMouseEvent), Q.on("click", this._handleMouseEvent), Q.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), ge;
25025
+ }), Q.on("resize", this._updateContainerSize), Q.on("render", this._updateViewState), Q.on("mousedown", this._handleMouseEvent), Q.on("dragstart", this._handleMouseEvent), Q.on("drag", this._handleMouseEvent), Q.on("dragend", this._handleMouseEvent), Q.on("mousemove", this._handleMouseEvent), Q.on("mouseout", this._handleMouseEvent), Q.on("click", this._handleMouseEvent), Q.on("dblclick", this._handleMouseEvent), this._updateContainerSize(), me;
25026
25026
  }
25027
25027
  _onAddInterleaved(Q) {
25028
- const ge = Q.painter.context.gl;
25029
- return ge instanceof WebGLRenderingContext && my.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = My({
25028
+ const me = Q.painter.context.gl;
25029
+ return me instanceof WebGLRenderingContext && my.warn("Incompatible basemap library. See: https://deck.gl/docs/api-reference/mapbox/overview#compatibility")(), this._deck = My({
25030
25030
  map: Q,
25031
25031
  deck: new Qf({
25032
25032
  ...this._props,
25033
25033
  views: this._getViews(Q),
25034
- gl: ge,
25034
+ gl: me,
25035
25035
  parameters: { ...Id(Q, !0), ...this._props.parameters }
25036
25036
  })
25037
25037
  }), Q.on("styledata", this._handleStyleChange), this._resolveLayers(Q, this._deck, [], this._props.layers), document.createElement("div");
25038
25038
  }
25039
- _resolveLayers(Q, ge, Ie, Te) {
25039
+ _resolveLayers(Q, me, Ie, Te) {
25040
25040
  Sy(Q, Ie, Te);
25041
25041
  }
25042
25042
  /** Called when the control is removed from a map */
@@ -25076,8 +25076,8 @@ class zy {
25076
25076
  _getViews(Q) {
25077
25077
  if (!this._props.views)
25078
25078
  return Nu(Q);
25079
- const ge = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
25080
- return ge.some((Te) => Te.id === Ra) ? this._props.views : [Nu(Q), ...ge];
25079
+ const me = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
25080
+ return me.some((Te) => Te.id === Ra) ? this._props.views : [Nu(Q), ...me];
25081
25081
  }
25082
25082
  }
25083
25083
  class Ry {
@@ -25085,8 +25085,10 @@ class Ry {
25085
25085
  overlay;
25086
25086
  /** Our own compact attribution control (spec: "attribution becomes correct, not optional") — undefined when the author opted out. */
25087
25087
  attribution;
25088
+ attributionElement;
25088
25089
  attributionText;
25089
25090
  showAttribution;
25091
+ attributionHost;
25090
25092
  /**
25091
25093
  * One-time "has the map initialized at least once" flag, set by the first
25092
25094
  * `load` event. Deliberately NOT `this.map.loaded()` — that method means
@@ -25103,10 +25105,10 @@ class Ry {
25103
25105
  */
25104
25106
  initialized = !1;
25105
25107
  loadCallbacks = [];
25106
- constructor(Q, ge, Ie, Te, Le = !0) {
25107
- this.showAttribution = Le, this.map = new rm.Map({
25108
+ constructor(Q, me, Ie, Te, Le = !0, R) {
25109
+ this.showAttribution = Le, this.attributionHost = R, this.map = new rm.Map({
25108
25110
  container: Q,
25109
- style: ge.style,
25111
+ style: me.style,
25110
25112
  center: [Ie.longitude, Ie.latitude],
25111
25113
  zoom: Ie.zoom,
25112
25114
  pitch: Ie.pitch ?? 0,
@@ -25114,13 +25116,13 @@ class Ry {
25114
25116
  // MapLibre's default control is replaced by our own below so preset-
25115
25117
  // level attribution overrides survive style swaps deterministically.
25116
25118
  attributionControl: !1
25117
- }), this.mountAttribution(ge.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (R) => {
25118
- this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", R?.error ?? R), this.markInitialized());
25119
+ }), this.mountAttribution(me.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (h) => {
25120
+ this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", h?.error ?? h), this.markInitialized());
25119
25121
  }), this.overlay = new zy({
25120
25122
  interleaved: !1,
25121
25123
  ...Te,
25122
- onAfterRender: (R) => {
25123
- this.drainDeckCaptures(), Te.onAfterRender?.(R);
25124
+ onAfterRender: (h) => {
25125
+ this.drainDeckCaptures(), Te.onAfterRender?.(h);
25124
25126
  }
25125
25127
  }), this.map.addControl(this.overlay);
25126
25128
  }
@@ -25132,7 +25134,7 @@ class Ry {
25132
25134
  if (this.deckCaptures.length === 0) return;
25133
25135
  const Q = this.deckCaptures;
25134
25136
  this.deckCaptures = [];
25135
- for (const ge of Q) ge();
25137
+ for (const me of Q) me();
25136
25138
  }
25137
25139
  /**
25138
25140
  * Scene snapshot (spec: "Snapshot API") — one composite canvas of the
@@ -25145,8 +25147,8 @@ class Ry {
25145
25147
  * public Deck API, and the access is optional-chained).
25146
25148
  */
25147
25149
  captureComposite() {
25148
- return new Promise((Q, ge) => {
25149
- this.pendingCaptureRejects.add(ge);
25150
+ return new Promise((Q, me) => {
25151
+ this.pendingCaptureRejects.add(me);
25150
25152
  let Ie, Te;
25151
25153
  const Le = (h) => {
25152
25154
  const de = document.createElement("canvas");
@@ -25156,7 +25158,7 @@ class Ry {
25156
25158
  const h = document.createElement("canvas");
25157
25159
  h.width = Ie.width, h.height = Ie.height;
25158
25160
  const de = h.getContext("2d");
25159
- de.drawImage(Ie, 0, 0), Te && de.drawImage(Te, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(ge), Q(h);
25161
+ de.drawImage(Ie, 0, 0), Te && de.drawImage(Te, 0, 0, h.width, h.height), this.pendingCaptureRejects.delete(me), Q(h);
25160
25162
  };
25161
25163
  this.map.once("render", () => {
25162
25164
  Ie = Le(this.map.getCanvas()), R();
@@ -25171,7 +25173,7 @@ class Ry {
25171
25173
  this.initialized = !0;
25172
25174
  const Q = this.loadCallbacks;
25173
25175
  this.loadCallbacks = [];
25174
- for (const ge of Q) ge();
25176
+ for (const me of Q) me();
25175
25177
  }
25176
25178
  onLoad(Q) {
25177
25179
  this.initialized ? Q() : this.loadCallbacks.push(Q);
@@ -25184,7 +25186,7 @@ class Ry {
25184
25186
  * fire without one. The ecosystem's standard user-vs-programmatic signal.
25185
25187
  */
25186
25188
  onMove(Q) {
25187
- this.map.on("move", (ge) => Q(ge.originalEvent ? "user" : "programmatic"));
25189
+ this.map.on("move", (me) => Q(me.originalEvent ? "user" : "programmatic"));
25188
25190
  }
25189
25191
  setLayers(Q) {
25190
25192
  this.overlay.setProps({ layers: Q });
@@ -25215,7 +25217,10 @@ class Ry {
25215
25217
  * remount, since `customAttribution` is fixed at construction.
25216
25218
  */
25217
25219
  mountAttribution(Q) {
25218
- this.showAttribution && (this.attributionText = Q, this.attribution && this.map.removeControl(this.attribution), this.attribution = new rm.AttributionControl({ compact: !0, ...Q ? { customAttribution: Q } : {} }), this.map.addControl(this.attribution));
25220
+ if (this.showAttribution && (this.attributionText = Q, this.attribution && (this.map.removeControl(this.attribution), this.attributionElement = void 0), this.attribution = new rm.AttributionControl({ compact: !0, ...Q ? { customAttribution: Q } : {} }), this.map.addControl(this.attribution), this.attributionHost)) {
25221
+ const me = this.map.getContainer().querySelector(".maplibregl-ctrl-attrib");
25222
+ me && (me.setAttribute("data-om-mandated-chrome-item", "attribution"), me.style.margin = "0", this.attributionHost.appendChild(me), this.attributionElement = me);
25223
+ }
25219
25224
  }
25220
25225
  /** Toggle map interactions (spec: "Manual Drawing", D4) — used to suspend double-click-zoom while a draw tool is active. */
25221
25226
  setInteractive(Q) {
@@ -25227,13 +25232,13 @@ class Ry {
25227
25232
  getViewport() {
25228
25233
  const Q = this.map;
25229
25234
  return {
25230
- project: (ge) => {
25231
- const Ie = Q.project([ge[0], ge[1]]);
25235
+ project: (me) => {
25236
+ const Ie = Q.project([me[0], me[1]]);
25232
25237
  return [Ie.x, Ie.y];
25233
25238
  },
25234
25239
  getBounds: () => {
25235
- const ge = Q.getBounds();
25236
- return [ge.getWest(), ge.getSouth(), ge.getEast(), ge.getNorth()];
25240
+ const me = Q.getBounds();
25241
+ return [me.getWest(), me.getSouth(), me.getEast(), me.getNorth()];
25237
25242
  },
25238
25243
  width: Q.getContainer().clientWidth,
25239
25244
  height: Q.getContainer().clientHeight
@@ -25244,8 +25249,8 @@ class Ry {
25244
25249
  return { longitude: Q.lng, latitude: Q.lat, zoom: this.map.getZoom(), pitch: this.map.getPitch(), bearing: this.map.getBearing() };
25245
25250
  }
25246
25251
  /** Instant recenter/rezoom — the basemap's own camera jump, no deck viewState involved. */
25247
- jumpTo(Q, ge) {
25248
- this.map.jumpTo(ge !== void 0 ? { center: Q, zoom: ge } : { center: Q });
25252
+ jumpTo(Q, me) {
25253
+ this.map.jumpTo(me !== void 0 ? { center: Q, zoom: me } : { center: Q });
25249
25254
  }
25250
25255
  /**
25251
25256
  * Animated camera (spec: "Map Stories / Animation primitives") — MapLibre's
@@ -25253,21 +25258,21 @@ class Ry {
25253
25258
  * the direct `easeTo` interpolation. duration 0 degrades to an instant
25254
25259
  * move, so this is also the one method that reaches pitch/bearing.
25255
25260
  */
25256
- easeTo(Q, ge, Ie = !1) {
25257
- const Te = { duration: ge };
25261
+ easeTo(Q, me, Ie = !1) {
25262
+ const Te = { duration: me };
25258
25263
  for (const [Le, R] of Object.entries(Q)) R !== void 0 && (Te[Le] = R);
25259
- Ie && ge > 0 ? this.map.flyTo(Te) : this.map.easeTo(Te);
25264
+ Ie && me > 0 ? this.map.flyTo(Te) : this.map.easeTo(Te);
25260
25265
  }
25261
- fitBounds(Q, ge, Ie = 0) {
25262
- this.map.fitBounds(Q, { padding: ge, duration: Ie });
25266
+ fitBounds(Q, me, Ie = 0) {
25267
+ this.map.fitBounds(Q, { padding: me, duration: Ie });
25263
25268
  }
25264
25269
  destroy() {
25265
25270
  if (this.pendingCaptureRejects.size > 0) {
25266
25271
  const Q = new Error("[onlymapjs] snapshot() canceled — the renderer was torn down before the capture frame rendered.");
25267
- for (const ge of this.pendingCaptureRejects) ge(Q);
25272
+ for (const me of this.pendingCaptureRejects) me(Q);
25268
25273
  this.pendingCaptureRejects.clear();
25269
25274
  }
25270
- this.deckCaptures = [], this.overlay.finalize(), this.map.remove();
25275
+ this.deckCaptures = [], this.attributionElement = void 0, this.overlay.finalize(), this.map.remove();
25271
25276
  }
25272
25277
  }
25273
25278
  export {