@carto/ps-react-maps 4.7.1 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +118 -115
- package/dist/index.js.map +1 -1
- package/dist/types/providers/map/types.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,16 +3,16 @@ import { c as F } from "react/compiler-runtime";
|
|
|
3
3
|
import { useImperativeHandle as WA, useEffect as K, useState as cA, createContext as KA, useContext as $A, useRef as TA, useMemo as RA, useCallback as vA } from "react";
|
|
4
4
|
import { AttributionControl as Je, MapProvider as Xe, Map as At, useMap as et } from "react-map-gl/maplibre";
|
|
5
5
|
import tt from "@deck.gl/react";
|
|
6
|
-
import { useMap as
|
|
6
|
+
import { useMap as Se, Map as rt, APIProvider as nt } from "@vis.gl/react-google-maps";
|
|
7
7
|
import { GoogleMapsOverlay as it } from "@deck.gl/google-maps";
|
|
8
|
-
import { createStore as ZA, useStore as JA, create as
|
|
8
|
+
import { createStore as ZA, useStore as JA, create as Me } from "zustand";
|
|
9
9
|
import { FlyToInterpolator as ot, WebMercatorViewport as xe } from "@deck.gl/core";
|
|
10
10
|
import { CompositeMode as st, TranslateMode as lt, ModifyMode as at, DrawPolygonByDraggingMode as ut, DrawCircleFromCenterMode as De, DrawRectangleMode as ct, DrawPolygonMode as ft, EditableGeoJsonLayer as ht, MeasureAreaMode as gt, getPickedEditHandle as pt, MeasureDistanceMode as dt, ViewMode as mt } from "@deck.gl-community/editable-layers";
|
|
11
11
|
import { DataFilterExtension as wt, MaskExtension as yt } from "@deck.gl/extensions";
|
|
12
12
|
import { Pan as oe, InputDirection as bt, EventManager as vt, Tap as se, Pinch as Et } from "mjolnir.js";
|
|
13
13
|
import { GeoJsonLayer as kt } from "@deck.gl/layers";
|
|
14
14
|
import { useShallow as IA } from "zustand/shallow";
|
|
15
|
-
import { area as le, centroid as Pe, lineIntersect as Ct, booleanIntersects as Bt, feature as _t, bbox as
|
|
15
|
+
import { area as le, centroid as Pe, lineIntersect as Ct, booleanIntersects as Bt, feature as _t, bbox as St, featureCollection as Mt, multiPolygon as SA, multiLineString as xt, multiPoint as Dt, polygon as Pt, lineString as Tt, point as Lt } from "@turf/turf";
|
|
16
16
|
import { formatNumber as Te, formatCurrency as It } from "@carto/ps-utils";
|
|
17
17
|
import Le from "convert-units";
|
|
18
18
|
import Qt from "convert-units/definitions/length";
|
|
@@ -117,11 +117,11 @@ function r0(t) {
|
|
|
117
117
|
A[24] !== e ? (k = /* @__PURE__ */ Y(Je, { compact: !1, ...e }), A[24] = e, A[25] = k) : k = A[25];
|
|
118
118
|
let B;
|
|
119
119
|
A[26] !== l || A[27] !== y || A[28] !== k ? (B = /* @__PURE__ */ Y(At, { reuseMaps: !1, mapStyle: l, attributionControl: !1, onLoad: y, children: k }), A[26] = l, A[27] = y, A[28] = k, A[29] = B) : B = A[29];
|
|
120
|
-
let
|
|
121
|
-
return A[30] !== b || A[31] !== r || A[32] !== n || A[33] !== i || A[34] !== o || A[35] !== f || A[36] !== d || A[37] !== u || A[38] !== g || A[39] !== m || A[40] !== v || A[41] !== B ? (
|
|
120
|
+
let S;
|
|
121
|
+
return A[30] !== b || A[31] !== r || A[32] !== n || A[33] !== i || A[34] !== o || A[35] !== f || A[36] !== d || A[37] !== u || A[38] !== g || A[39] !== m || A[40] !== v || A[41] !== B ? (S = /* @__PURE__ */ Y(Xe, { children: /* @__PURE__ */ Y("div", { className: "deckgl-map", children: /* @__PURE__ */ _e(tt, { controller: r, id: o, ref: u, layers: b, getCursor: n, getTooltip: i, onLoad: g, onViewStateChange: f, parameters: m, ...d, children: [
|
|
122
122
|
v,
|
|
123
123
|
B
|
|
124
|
-
] }) }) }), A[30] = b, A[31] = r, A[32] = n, A[33] = i, A[34] = o, A[35] = f, A[36] = d, A[37] = u, A[38] = g, A[39] = m, A[40] = v, A[41] = B, A[42] =
|
|
124
|
+
] }) }) }), A[30] = b, A[31] = r, A[32] = n, A[33] = i, A[34] = o, A[35] = f, A[36] = d, A[37] = u, A[38] = g, A[39] = m, A[40] = v, A[41] = B, A[42] = S) : S = A[42], S;
|
|
125
125
|
}
|
|
126
126
|
function n0(t) {
|
|
127
127
|
const {
|
|
@@ -148,7 +148,7 @@ const s0 = (t) => {
|
|
|
148
148
|
A[0] === Symbol.for("react.memo_cache_sentinel") ? (e = new it({
|
|
149
149
|
interleaved: !0
|
|
150
150
|
}), A[0] = e) : e = A[0];
|
|
151
|
-
const r = e, n =
|
|
151
|
+
const r = e, n = Se();
|
|
152
152
|
let i, o;
|
|
153
153
|
A[1] === Symbol.for("react.memo_cache_sentinel") ? (i = () => r, o = [r], A[1] = i, A[2] = o) : (i = A[1], o = A[2]), WA(t.instanceRef, i, o);
|
|
154
154
|
let s, a;
|
|
@@ -252,13 +252,13 @@ function l0(t) {
|
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
}, A[29] = i, A[30] = a, A[31] = B) : B = A[31];
|
|
255
|
-
const
|
|
255
|
+
const S = B;
|
|
256
256
|
let C;
|
|
257
|
-
A[32] !==
|
|
257
|
+
A[32] !== S || A[33] !== k ? (C = (X) => {
|
|
258
258
|
const eA = k(X);
|
|
259
|
-
|
|
260
|
-
}, A[32] =
|
|
261
|
-
const
|
|
259
|
+
S(eA);
|
|
260
|
+
}, A[32] = S, A[33] = k, A[34] = C) : C = A[34];
|
|
261
|
+
const M = C, P = f.initialViewState?.latitude ?? 0, D = f.initialViewState?.longitude ?? 0;
|
|
262
262
|
let x;
|
|
263
263
|
A[35] !== P || A[36] !== D ? (x = {
|
|
264
264
|
lat: P,
|
|
@@ -266,12 +266,12 @@ function l0(t) {
|
|
|
266
266
|
}, A[35] = P, A[36] = D, A[37] = x) : x = A[37];
|
|
267
267
|
const R = (f.initialViewState?.zoom ?? 0) + 1, N = (f.initialViewState?.maxZoom ?? 23) + 1, E = (f.initialViewState?.minZoom ?? 0) + 1, _ = f.initialViewState?.pitch, T = f.initialViewState?.bearing;
|
|
268
268
|
let L;
|
|
269
|
-
A[38] !==
|
|
269
|
+
A[38] !== S || A[39] !== s || A[40] !== f.initialViewState ? (L = () => {
|
|
270
270
|
s({
|
|
271
271
|
type: "load",
|
|
272
272
|
value: !0
|
|
273
|
-
}),
|
|
274
|
-
}, A[38] =
|
|
273
|
+
}), S(f.initialViewState);
|
|
274
|
+
}, A[38] = S, A[39] = s, A[40] = f.initialViewState, A[41] = L) : L = A[41];
|
|
275
275
|
const O = typeof g.scrollZoom == "boolean" ? g.scrollZoom : !!g.scrollZoom, z = g.dragPan ? "greedy" : "none", G = !g.doubleClickZoom;
|
|
276
276
|
let U;
|
|
277
277
|
A[42] !== n || A[43] !== l ? (U = /* @__PURE__ */ Y(c0, { id: n, overlayRef: l }), A[42] = n, A[43] = l, A[44] = U) : U = A[44];
|
|
@@ -290,10 +290,10 @@ function l0(t) {
|
|
|
290
290
|
let nA;
|
|
291
291
|
A[49] !== v || A[50] !== n || A[51] !== i || A[52] !== f || A[53] !== V || A[54] !== q ? (nA = /* @__PURE__ */ Y(s0, { id: n, instanceRef: i, layers: v, onLoad: V, parameters: q, ...f }), A[49] = v, A[50] = n, A[51] = i, A[52] = f, A[53] = V, A[54] = q, A[55] = nA) : nA = A[55];
|
|
292
292
|
let J;
|
|
293
|
-
A[56] !== w || A[57] !== e || A[58] !==
|
|
293
|
+
A[56] !== w || A[57] !== e || A[58] !== M || A[59] !== n || A[60] !== x || A[61] !== R || A[62] !== N || A[63] !== E || A[64] !== _ || A[65] !== T || A[66] !== L || A[67] !== O || A[68] !== z || A[69] !== G || A[70] !== U || A[71] !== nA ? (J = /* @__PURE__ */ Y("div", { className: "deckgl-map", children: /* @__PURE__ */ _e(rt, { id: n, mapTypeId: e, disableDefaultUI: !0, ...w, center: x, zoom: R, maxZoom: N, minZoom: E, tilt: _, heading: T, onTilesLoaded: L, onBoundsChanged: M, onZoomChanged: M, scrollwheel: O, gestureHandling: z, disableDoubleClickZoom: G, children: [
|
|
294
294
|
U,
|
|
295
295
|
nA
|
|
296
|
-
] }) }), A[56] = w, A[57] = e, A[58] =
|
|
296
|
+
] }) }), A[56] = w, A[57] = e, A[58] = M, A[59] = n, A[60] = x, A[61] = R, A[62] = N, A[63] = E, A[64] = _, A[65] = T, A[66] = L, A[67] = O, A[68] = z, A[69] = G, A[70] = U, A[71] = nA, A[72] = J) : J = A[72];
|
|
297
297
|
let aA;
|
|
298
298
|
return A[73] !== d || A[74] !== b || A[75] !== J ? (aA = /* @__PURE__ */ Y(nt, { apiKey: b, ...d, children: J }), A[73] = d, A[74] = b, A[75] = J, A[76] = aA) : aA = A[76], aA;
|
|
299
299
|
}
|
|
@@ -311,7 +311,7 @@ function c0(t) {
|
|
|
311
311
|
const A = F(3), {
|
|
312
312
|
id: e,
|
|
313
313
|
overlayRef: r
|
|
314
|
-
} = t, n =
|
|
314
|
+
} = t, n = Se(e);
|
|
315
315
|
let i, o;
|
|
316
316
|
return A[0] !== n ? (i = () => n, o = [n], A[0] = n, A[1] = i, A[2] = o) : (i = A[1], o = A[2]), WA(r, i, o), null;
|
|
317
317
|
}
|
|
@@ -338,14 +338,14 @@ function f0(t) {
|
|
|
338
338
|
const g = u, m = f === void 0 ? e0 : f, v = h === void 0 ? t0 : h, y = p === void 0 ? g0 : p;
|
|
339
339
|
let k;
|
|
340
340
|
A[15] === Symbol.for("react.memo_cache_sentinel") ? (k = [!1, !1], A[15] = k) : k = A[15];
|
|
341
|
-
const [B,
|
|
341
|
+
const [B, S] = cA(k), {
|
|
342
342
|
url: C,
|
|
343
|
-
type:
|
|
344
|
-
} = _A[d], P =
|
|
343
|
+
type: M
|
|
344
|
+
} = _A[d], P = M === uA.googleMaps;
|
|
345
345
|
let D;
|
|
346
346
|
A[16] === Symbol.for("react.memo_cache_sentinel") ? (D = (L) => {
|
|
347
347
|
const O = L.type === "deckgl" ? 0 : 1;
|
|
348
|
-
|
|
348
|
+
S((z) => z.map((G, U) => U === O ? L.value : G));
|
|
349
349
|
}, A[16] = D) : D = A[16];
|
|
350
350
|
const x = D;
|
|
351
351
|
let R, N;
|
|
@@ -611,16 +611,19 @@ const gA = /* @__PURE__ */ d0(w0), y0 = (t) => {
|
|
|
611
611
|
return ((e, r) => ({
|
|
612
612
|
viewports: A.viewports,
|
|
613
613
|
initialViewStates: A.initialViewStates,
|
|
614
|
-
updateViewPort: (n) => {
|
|
615
|
-
const
|
|
616
|
-
if (!
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
614
|
+
updateViewPort: (n, i) => {
|
|
615
|
+
const o = r();
|
|
616
|
+
if (!o.maps[n]?.isLoaded) return;
|
|
617
|
+
const s = {
|
|
618
|
+
...o.getViewState(n),
|
|
619
|
+
...i
|
|
620
|
+
};
|
|
621
|
+
if (!s) return;
|
|
622
|
+
const a = new xe(s);
|
|
623
|
+
e((l) => ({
|
|
621
624
|
viewports: {
|
|
622
|
-
...
|
|
623
|
-
[n]:
|
|
625
|
+
...l.viewports,
|
|
626
|
+
[n]: a
|
|
624
627
|
}
|
|
625
628
|
}));
|
|
626
629
|
},
|
|
@@ -671,7 +674,7 @@ const gA = /* @__PURE__ */ d0(w0), y0 = (t) => {
|
|
|
671
674
|
}, E0 = ((t, A) => ({
|
|
672
675
|
fitBounds: (e, r, n) => {
|
|
673
676
|
const i = A(), o = i.getBounds(e, r, n);
|
|
674
|
-
o && (i.setViewState(e, o), i.updateViewPort(e));
|
|
677
|
+
o && (i.setViewState(e, o), i.updateViewPort(e, o));
|
|
675
678
|
},
|
|
676
679
|
flyTo: (e, r, n = {}) => {
|
|
677
680
|
const i = A(), o = {
|
|
@@ -681,7 +684,7 @@ const gA = /* @__PURE__ */ d0(w0), y0 = (t) => {
|
|
|
681
684
|
...r,
|
|
682
685
|
...o
|
|
683
686
|
};
|
|
684
|
-
i.setViewState(e, s), i.updateViewPort(e);
|
|
687
|
+
console.log("finalViewState", s), i.setViewState(e, s), i.updateViewPort(e, s);
|
|
685
688
|
},
|
|
686
689
|
loadInitialViewState: (e, r) => {
|
|
687
690
|
const n = A();
|
|
@@ -779,7 +782,7 @@ function wi(t) {
|
|
|
779
782
|
A[0] !== r ? (n = (c) => c.maps[r], A[0] = r, A[1] = n) : n = A[1];
|
|
780
783
|
const {
|
|
781
784
|
basemap: i
|
|
782
|
-
} = I(n), o = I(
|
|
785
|
+
} = I(n), o = I(S0);
|
|
783
786
|
let s;
|
|
784
787
|
A[2] !== r || A[3] !== o ? (s = (c) => o(r, c), A[2] = r, A[3] = o, A[4] = s) : s = A[4];
|
|
785
788
|
const a = s;
|
|
@@ -789,7 +792,7 @@ function wi(t) {
|
|
|
789
792
|
setBasemap: a
|
|
790
793
|
}), A[5] = i, A[6] = e, A[7] = a, A[8] = l) : l = A[8], l;
|
|
791
794
|
}
|
|
792
|
-
function
|
|
795
|
+
function S0(t) {
|
|
793
796
|
return t.setBasemap;
|
|
794
797
|
}
|
|
795
798
|
const rA = {
|
|
@@ -800,7 +803,7 @@ const rA = {
|
|
|
800
803
|
finish: "finish",
|
|
801
804
|
addPosition: "addPosition"
|
|
802
805
|
};
|
|
803
|
-
class
|
|
806
|
+
class M0 extends st {
|
|
804
807
|
constructor() {
|
|
805
808
|
super([new lt(), new at()]);
|
|
806
809
|
}
|
|
@@ -873,9 +876,9 @@ const mA = "lassoLayer", QA = "maskLayer", x0 = {
|
|
|
873
876
|
},
|
|
874
877
|
edit: {
|
|
875
878
|
value: "edit",
|
|
876
|
-
mode:
|
|
879
|
+
mode: M0
|
|
877
880
|
}
|
|
878
|
-
}, kA =
|
|
881
|
+
}, kA = Me((t, A) => ({
|
|
879
882
|
layers: {},
|
|
880
883
|
setLayer: (e, r) => t((n) => {
|
|
881
884
|
const i = {
|
|
@@ -1189,8 +1192,8 @@ function R0(t) {
|
|
|
1189
1192
|
A[8] !== i || A[9] !== e || A[10] !== h || A[11] !== w || A[12] !== b ? (u = () => {
|
|
1190
1193
|
const C = w[h];
|
|
1191
1194
|
if (C && i) {
|
|
1192
|
-
const
|
|
1193
|
-
b(e, new
|
|
1195
|
+
const M = C.mode;
|
|
1196
|
+
b(e, new M());
|
|
1194
1197
|
}
|
|
1195
1198
|
}, g = [i, e, h, w, b], A[8] = i, A[9] = e, A[10] = h, A[11] = w, A[12] = b, A[13] = u, A[14] = g) : (u = A[13], g = A[14]), K(u, g);
|
|
1196
1199
|
const m = U0;
|
|
@@ -1202,14 +1205,14 @@ function R0(t) {
|
|
|
1202
1205
|
o(e, !!C), p(e, C);
|
|
1203
1206
|
}, A[17] = e, A[18] = o, A[19] = p, A[20] = k) : k = A[20];
|
|
1204
1207
|
const B = k;
|
|
1205
|
-
let
|
|
1208
|
+
let S;
|
|
1206
1209
|
if (A[21] !== r || A[22] !== i || A[23] !== B || A[24] !== e || A[25] !== y || A[26] !== h || A[27] !== w || A[28] !== o || A[29] !== l || A[30] !== c) {
|
|
1207
1210
|
let C;
|
|
1208
1211
|
A[32] !== e || A[33] !== l ? (C = (D, x) => l(e, D, x), A[32] = e, A[33] = l, A[34] = C) : C = A[34];
|
|
1209
|
-
let
|
|
1210
|
-
A[35] !== e || A[36] !== o ? (
|
|
1212
|
+
let M;
|
|
1213
|
+
A[35] !== e || A[36] !== o ? (M = (D) => o(e, D), A[35] = e, A[36] = o, A[37] = M) : M = A[37];
|
|
1211
1214
|
let P;
|
|
1212
|
-
A[38] !== e || A[39] !== c ? (P = (D, x) => c(e, D, x), A[38] = e, A[39] = c, A[40] = P) : P = A[40],
|
|
1215
|
+
A[38] !== e || A[39] !== c ? (P = (D, x) => c(e, D, x), A[38] = e, A[39] = c, A[40] = P) : P = A[40], S = r({
|
|
1213
1216
|
mapId: e,
|
|
1214
1217
|
enabled: i,
|
|
1215
1218
|
modes: w,
|
|
@@ -1218,13 +1221,13 @@ function R0(t) {
|
|
|
1218
1221
|
mask: y
|
|
1219
1222
|
},
|
|
1220
1223
|
setValue: C,
|
|
1221
|
-
setEnabled:
|
|
1224
|
+
setEnabled: M,
|
|
1222
1225
|
setVisibility: P,
|
|
1223
1226
|
setModeSelected: B
|
|
1224
|
-
}), A[21] = r, A[22] = i, A[23] = B, A[24] = e, A[25] = y, A[26] = h, A[27] = w, A[28] = o, A[29] = l, A[30] = c, A[31] =
|
|
1227
|
+
}), A[21] = r, A[22] = i, A[23] = B, A[24] = e, A[25] = y, A[26] = h, A[27] = w, A[28] = o, A[29] = l, A[30] = c, A[31] = S;
|
|
1225
1228
|
} else
|
|
1226
|
-
|
|
1227
|
-
return
|
|
1229
|
+
S = A[31];
|
|
1230
|
+
return S;
|
|
1228
1231
|
}
|
|
1229
1232
|
function N0(t) {
|
|
1230
1233
|
return t.type === "mask";
|
|
@@ -1775,12 +1778,12 @@ function rr({
|
|
|
1775
1778
|
properties: E.properties,
|
|
1776
1779
|
id: E.id
|
|
1777
1780
|
}))
|
|
1778
|
-
}), [v]), k = RA(() => v.filter((E) => E.properties.visible).map((E) => E.id), [v]), [B,
|
|
1781
|
+
}), [v]), k = RA(() => v.filter((E) => E.properties.visible).map((E) => E.id), [v]), [B, S] = cA(y), [C, M] = cA([]), P = vA(() => {
|
|
1779
1782
|
const E = {
|
|
1780
1783
|
...y,
|
|
1781
1784
|
features: y.features.filter((_) => _.properties?.visible)
|
|
1782
1785
|
};
|
|
1783
|
-
|
|
1786
|
+
S(E);
|
|
1784
1787
|
}, [y]);
|
|
1785
1788
|
K(() => {
|
|
1786
1789
|
P();
|
|
@@ -1790,7 +1793,7 @@ function rr({
|
|
|
1790
1793
|
b(A, [mA]);
|
|
1791
1794
|
}), [w, A, b]);
|
|
1792
1795
|
const x = vA(() => {
|
|
1793
|
-
P(),
|
|
1796
|
+
P(), M([]), l(A, !1);
|
|
1794
1797
|
}, [A, P, l]), R = vA((E) => {
|
|
1795
1798
|
E.forEach((_, T) => {
|
|
1796
1799
|
_.properties.label ??= `${r?.mask} ${D.current}`, _.properties.index = T, _.properties.visible = _.properties.visible ?? !0;
|
|
@@ -1809,7 +1812,7 @@ function rr({
|
|
|
1809
1812
|
x();
|
|
1810
1813
|
return;
|
|
1811
1814
|
}
|
|
1812
|
-
|
|
1815
|
+
S(_), E !== rA.updateTentativeFeature && E === rA.addFeature && (p !== "edit" && (D.current = D.current + 1), R(_.features), x());
|
|
1813
1816
|
}, [R, x, p]);
|
|
1814
1817
|
return K(() => {
|
|
1815
1818
|
const E = a, {
|
|
@@ -1830,7 +1833,7 @@ function rr({
|
|
|
1830
1833
|
},
|
|
1831
1834
|
onClick: (U) => {
|
|
1832
1835
|
const V = U;
|
|
1833
|
-
V.isGuide ||
|
|
1836
|
+
V.isGuide || M([V.index]);
|
|
1834
1837
|
}
|
|
1835
1838
|
},
|
|
1836
1839
|
getLineColor: (U) => C[0] === U.properties.index ? _ : O,
|
|
@@ -2118,11 +2121,11 @@ function je(t) {
|
|
|
2118
2121
|
g(!!Q), y(e, Q);
|
|
2119
2122
|
}, A[18] = y, A[19] = e, A[20] = g, A[21] = k) : k = A[21];
|
|
2120
2123
|
const B = k;
|
|
2121
|
-
let
|
|
2122
|
-
A[22] !== e ? (
|
|
2123
|
-
const C = H(
|
|
2124
|
+
let S;
|
|
2125
|
+
A[22] !== e ? (S = (Q) => Q.measurements[e].finished, A[22] = e, A[23] = S) : S = A[23];
|
|
2126
|
+
const C = H(S), M = H(fr);
|
|
2124
2127
|
let P;
|
|
2125
|
-
A[24] !==
|
|
2128
|
+
A[24] !== M || A[25] !== e ? (P = (Q) => M(e, Q), A[24] = M, A[25] = e, A[26] = P) : P = A[26];
|
|
2126
2129
|
const D = P;
|
|
2127
2130
|
let x;
|
|
2128
2131
|
A[27] !== e ? (x = (Q) => Q.measurements[e].locale, A[27] = e, A[28] = x) : x = A[28];
|
|
@@ -2153,11 +2156,11 @@ function je(t) {
|
|
|
2153
2156
|
L?.resetClickSequence(), J([]);
|
|
2154
2157
|
}, A[47] = L, A[48] = J, A[49] = AA) : AA = A[49];
|
|
2155
2158
|
const oA = AA;
|
|
2156
|
-
let
|
|
2157
|
-
A[50] !== g ? (
|
|
2159
|
+
let MA;
|
|
2160
|
+
A[50] !== g ? (MA = (Q) => {
|
|
2158
2161
|
g(Q);
|
|
2159
|
-
}, A[50] = g, A[51] =
|
|
2160
|
-
const FA =
|
|
2162
|
+
}, A[50] = g, A[51] = MA) : MA = A[51];
|
|
2163
|
+
const FA = MA;
|
|
2161
2164
|
let xA;
|
|
2162
2165
|
return A[52] !== oA || A[53] !== p || A[54] !== a || A[55] !== w || A[56] !== C || A[57] !== R || A[58] !== L || A[59] !== v || A[60] !== n || A[61] !== V || A[62] !== f || A[63] !== g || A[64] !== D || A[65] !== _ || A[66] !== G || A[67] !== B || A[68] !== J || A[69] !== $ || A[70] !== FA || A[71] !== X || A[72] !== o ? (xA = {
|
|
2163
2166
|
modes: n,
|
|
@@ -2236,9 +2239,9 @@ function dr(t) {
|
|
|
2236
2239
|
positions: y,
|
|
2237
2240
|
setPositions: k,
|
|
2238
2241
|
unit: B,
|
|
2239
|
-
setUnit:
|
|
2242
|
+
setUnit: S,
|
|
2240
2243
|
clearLayer: C,
|
|
2241
|
-
toggleLayer:
|
|
2244
|
+
toggleLayer: M
|
|
2242
2245
|
} = je(i);
|
|
2243
2246
|
let P;
|
|
2244
2247
|
A[2] !== f || A[3] !== o || A[4] !== v || A[5] !== k ? (P = () => {
|
|
@@ -2253,12 +2256,12 @@ function dr(t) {
|
|
|
2253
2256
|
let D;
|
|
2254
2257
|
A[7] !== f || A[8] !== o || A[9] !== d || A[10] !== v || A[11] !== k ? (D = [o, f, k, v, d], A[7] = f, A[8] = o, A[9] = d, A[10] = v, A[11] = k, A[12] = D) : D = A[12], K(P, D);
|
|
2255
2258
|
let x;
|
|
2256
|
-
A[13] !==
|
|
2257
|
-
_ && (c || !w) && C(),
|
|
2258
|
-
}, A[13] =
|
|
2259
|
+
A[13] !== M || A[14] !== C || A[15] !== c || A[16] !== w ? (x = (_) => {
|
|
2260
|
+
_ && (c || !w) && C(), M(_);
|
|
2261
|
+
}, A[13] = M, A[14] = C, A[15] = c, A[16] = w, A[17] = x) : x = A[17];
|
|
2259
2262
|
const R = x, N = !!c;
|
|
2260
2263
|
let E;
|
|
2261
|
-
return A[18] !== n || A[19] !== C || A[20] !== a || A[21] !== p || A[22] !== w || A[23] !== u || A[24] !== e || A[25] !== m || A[26] !== f || A[27] !== o || A[28] !== y || A[29] !== l || A[30] !== d || A[31] !== b || A[32] !== g || A[33] !== h || A[34] !== k || A[35] !==
|
|
2264
|
+
return A[18] !== n || A[19] !== C || A[20] !== a || A[21] !== p || A[22] !== w || A[23] !== u || A[24] !== e || A[25] !== m || A[26] !== f || A[27] !== o || A[28] !== y || A[29] !== l || A[30] !== d || A[31] !== b || A[32] !== g || A[33] !== h || A[34] !== k || A[35] !== S || A[36] !== N || A[37] !== r || A[38] !== R || A[39] !== B || A[40] !== s ? (E = n({
|
|
2262
2265
|
mapId: e,
|
|
2263
2266
|
distance: a,
|
|
2264
2267
|
enabled: p,
|
|
@@ -2282,11 +2285,11 @@ function dr(t) {
|
|
|
2282
2285
|
setFinished: b,
|
|
2283
2286
|
setLocale: g,
|
|
2284
2287
|
setPositions: k,
|
|
2285
|
-
setUnit:
|
|
2288
|
+
setUnit: S,
|
|
2286
2289
|
setEnabled: d,
|
|
2287
2290
|
toggleLayer: R,
|
|
2288
2291
|
clearLayer: C
|
|
2289
|
-
}), A[18] = n, A[19] = C, A[20] = a, A[21] = p, A[22] = w, A[23] = u, A[24] = e, A[25] = m, A[26] = f, A[27] = o, A[28] = y, A[29] = l, A[30] = d, A[31] = b, A[32] = g, A[33] = h, A[34] = k, A[35] =
|
|
2292
|
+
}), A[18] = n, A[19] = C, A[20] = a, A[21] = p, A[22] = w, A[23] = u, A[24] = e, A[25] = m, A[26] = f, A[27] = o, A[28] = y, A[29] = l, A[30] = d, A[31] = b, A[32] = g, A[33] = h, A[34] = k, A[35] = S, A[36] = N, A[37] = r, A[38] = R, A[39] = B, A[40] = s, A[41] = E) : E = A[41], E;
|
|
2290
2293
|
}
|
|
2291
2294
|
const mr = [fA];
|
|
2292
2295
|
function wr(t) {
|
|
@@ -2318,9 +2321,9 @@ function wr(t) {
|
|
|
2318
2321
|
unit: u,
|
|
2319
2322
|
modeInstance: g
|
|
2320
2323
|
} = je(c), m = kA(Br), v = I(Cr), y = I(kr), k = I(Er), B = I(vr);
|
|
2321
|
-
let
|
|
2322
|
-
A[4] !== r ? (
|
|
2323
|
-
const C = I(IA(
|
|
2324
|
+
let S;
|
|
2325
|
+
A[4] !== r ? (S = (G) => G.maps[r]?.layers.filter(br), A[4] = r, A[5] = S) : S = A[5];
|
|
2326
|
+
const C = I(IA(S)), M = I(yr);
|
|
2324
2327
|
let P;
|
|
2325
2328
|
A[6] === Symbol.for("react.memo_cache_sentinel") ? (P = {}, A[6] = P) : P = A[6];
|
|
2326
2329
|
const D = TA(P);
|
|
@@ -2339,9 +2342,9 @@ function wr(t) {
|
|
|
2339
2342
|
};
|
|
2340
2343
|
}, N = [k, h, v, r, B, y], A[9] = k, A[10] = h, A[11] = v, A[12] = r, A[13] = B, A[14] = y, A[15] = R, A[16] = N) : (R = A[15], N = A[16]), K(R, N);
|
|
2341
2344
|
let E, _;
|
|
2342
|
-
A[17] !== h || A[18] !==
|
|
2345
|
+
A[17] !== h || A[18] !== M || A[19] !== r || A[20] !== C || A[21] !== m ? (E = () => {
|
|
2343
2346
|
C?.forEach((G) => {
|
|
2344
|
-
const U =
|
|
2347
|
+
const U = M(r)?.props.layers.find((q) => q.props.id === G);
|
|
2345
2348
|
if (!U)
|
|
2346
2349
|
return;
|
|
2347
2350
|
h && (D.current[G] = U?.props.pickable);
|
|
@@ -2352,7 +2355,7 @@ function wr(t) {
|
|
|
2352
2355
|
}
|
|
2353
2356
|
});
|
|
2354
2357
|
});
|
|
2355
|
-
}, _ = [h,
|
|
2358
|
+
}, _ = [h, M, r, C, m], A[17] = h, A[18] = M, A[19] = r, A[20] = C, A[21] = m, A[22] = E, A[23] = _) : (E = A[22], _ = A[23]), K(E, _);
|
|
2356
2359
|
let T;
|
|
2357
2360
|
A[24] !== g || A[25] !== f || A[26] !== d || A[27] !== b ? (T = (G) => {
|
|
2358
2361
|
const {
|
|
@@ -2417,19 +2420,19 @@ function _r(t) {
|
|
|
2417
2420
|
A[0] !== e ? (r = (a) => a.maps[e], A[0] = e, A[1] = r) : r = A[1];
|
|
2418
2421
|
const {
|
|
2419
2422
|
layers: n
|
|
2420
|
-
} = I(r), i = kA(
|
|
2423
|
+
} = I(r), i = kA(Mr);
|
|
2421
2424
|
let o;
|
|
2422
2425
|
if (A[2] !== i || A[3] !== n) {
|
|
2423
2426
|
let a;
|
|
2424
|
-
A[5] !== i ? (a = (l) => i[l], A[5] = i, A[6] = a) : a = A[6], o = n.map(a).filter(
|
|
2427
|
+
A[5] !== i ? (a = (l) => i[l], A[5] = i, A[6] = a) : a = A[6], o = n.map(a).filter(Sr), A[2] = i, A[3] = n, A[4] = o;
|
|
2425
2428
|
} else
|
|
2426
2429
|
o = A[4];
|
|
2427
2430
|
return o;
|
|
2428
2431
|
}
|
|
2429
|
-
function
|
|
2432
|
+
function Sr(t) {
|
|
2430
2433
|
return !!t;
|
|
2431
2434
|
}
|
|
2432
|
-
function
|
|
2435
|
+
function Mr(t) {
|
|
2433
2436
|
return t.layers;
|
|
2434
2437
|
}
|
|
2435
2438
|
const we = [QA, mA, fA];
|
|
@@ -2467,11 +2470,11 @@ function bi(t) {
|
|
|
2467
2470
|
mapId: e
|
|
2468
2471
|
}, A[15] = e, A[16] = k) : k = A[16];
|
|
2469
2472
|
const B = _r(k);
|
|
2470
|
-
let M;
|
|
2471
|
-
A[17] !== B ? (M = Ve(B), A[17] = B, A[18] = M) : M = A[18];
|
|
2472
|
-
const C = M;
|
|
2473
2473
|
let S;
|
|
2474
|
-
A[
|
|
2474
|
+
A[17] !== B ? (S = Ve(B), A[17] = B, A[18] = S) : S = A[18];
|
|
2475
|
+
const C = S;
|
|
2476
|
+
let M;
|
|
2477
|
+
A[19] !== e || A[20] !== n || A[21] !== g || A[22] !== y ? (M = (O) => {
|
|
2475
2478
|
const z = g;
|
|
2476
2479
|
if (h.current && clearInterval(h.current), h.current = setTimeout(() => {
|
|
2477
2480
|
y(e);
|
|
@@ -2480,8 +2483,8 @@ function bi(t) {
|
|
|
2480
2483
|
return;
|
|
2481
2484
|
}
|
|
2482
2485
|
z(e, O.viewState);
|
|
2483
|
-
}, A[19] = e, A[20] = n, A[21] = g, A[22] = y, A[23] =
|
|
2484
|
-
const P =
|
|
2486
|
+
}, A[19] = e, A[20] = n, A[21] = g, A[22] = y, A[23] = M) : M = A[23];
|
|
2487
|
+
const P = M;
|
|
2485
2488
|
let D;
|
|
2486
2489
|
A[24] !== e || A[25] !== r || A[26] !== m || A[27] !== y ? (D = (O) => {
|
|
2487
2490
|
m(e, O), r?.(O), y(e);
|
|
@@ -2930,7 +2933,7 @@ class Yr extends Qe {
|
|
|
2930
2933
|
}
|
|
2931
2934
|
/** @experimental */
|
|
2932
2935
|
getExtent() {
|
|
2933
|
-
const A = Mt(
|
|
2936
|
+
const A = St(Mt(this.features));
|
|
2934
2937
|
return Promise.resolve({
|
|
2935
2938
|
bbox: A
|
|
2936
2939
|
});
|
|
@@ -3107,7 +3110,7 @@ class qr extends Qe {
|
|
|
3107
3110
|
return this._executeWorkerMethod(iA.GET_EXTENT, [e], A);
|
|
3108
3111
|
}
|
|
3109
3112
|
}
|
|
3110
|
-
const ie =
|
|
3113
|
+
const ie = Me()(Xt((t, A) => ({
|
|
3111
3114
|
sources: {},
|
|
3112
3115
|
filters: {},
|
|
3113
3116
|
setSource: (e, r) => t((n) => {
|
|
@@ -3502,11 +3505,11 @@ function sn(t) {
|
|
|
3502
3505
|
let u;
|
|
3503
3506
|
if (A[9] !== d || A[10] !== o) {
|
|
3504
3507
|
let B;
|
|
3505
|
-
A[12] !== d.length || A[13] !== o ? (B = (
|
|
3506
|
-
const
|
|
3508
|
+
A[12] !== d.length || A[13] !== o ? (B = (S, C) => {
|
|
3509
|
+
const M = "column" in o ? $e(o.column, C, d.length) : void 0, P = "operationExp" in o ? EA(o.operationExp, C, d.length, "operationExp") : void 0, D = "operationColumn" in o ? EA(o.operationColumn, C, d.length, "operationColumn") : void 0, x = {
|
|
3507
3510
|
...o,
|
|
3508
3511
|
..."column" in o && {
|
|
3509
|
-
column:
|
|
3512
|
+
column: M
|
|
3510
3513
|
},
|
|
3511
3514
|
...P !== void 0 && {
|
|
3512
3515
|
operationExp: P
|
|
@@ -3523,21 +3526,21 @@ function sn(t) {
|
|
|
3523
3526
|
let m;
|
|
3524
3527
|
if (A[15] !== d || A[16] !== b || A[17] !== g) {
|
|
3525
3528
|
let B;
|
|
3526
|
-
A[19] !== b || A[20] !== g ? (B = (
|
|
3527
|
-
const
|
|
3529
|
+
A[19] !== b || A[20] !== g ? (B = (S, C) => {
|
|
3530
|
+
const M = g[C], P = [...S, M], D = b?.[C];
|
|
3528
3531
|
return D && P.push(D), P;
|
|
3529
3532
|
}, A[19] = b, A[20] = g, A[21] = B) : B = A[21], m = d.map(B), A[15] = d, A[16] = b, A[17] = g, A[18] = m;
|
|
3530
3533
|
} else
|
|
3531
3534
|
m = A[18];
|
|
3532
3535
|
const v = m;
|
|
3533
3536
|
if (a) {
|
|
3534
|
-
const B = f?.[0],
|
|
3535
|
-
let
|
|
3536
|
-
return A[22] !== B || A[23] !==
|
|
3537
|
+
const B = f?.[0], S = h[0] ?? null, C = v[0];
|
|
3538
|
+
let M;
|
|
3539
|
+
return A[22] !== B || A[23] !== S || A[24] !== C ? (M = {
|
|
3537
3540
|
mergedFilters: B,
|
|
3538
|
-
widgetModel:
|
|
3541
|
+
widgetModel: S,
|
|
3539
3542
|
queryKey: C
|
|
3540
|
-
}, A[22] = B, A[23] =
|
|
3543
|
+
}, A[22] = B, A[23] = S, A[24] = C, A[25] = M) : M = A[25], M;
|
|
3541
3544
|
}
|
|
3542
3545
|
let y;
|
|
3543
3546
|
A[26] !== f ? (y = f ?? [], A[26] = f, A[27] = y) : y = A[27];
|
|
@@ -3634,14 +3637,14 @@ function lA({
|
|
|
3634
3637
|
throw E;
|
|
3635
3638
|
return s ? N.at(0) : N;
|
|
3636
3639
|
}, i[15] = u, i[16] = m, i[17] = s, i[18] = y, i[19] = l, i[20] = B) : B = i[20];
|
|
3637
|
-
const
|
|
3640
|
+
const S = !!y.length && w;
|
|
3638
3641
|
let C;
|
|
3639
|
-
return i[21] !== k || i[22] !== B || i[23] !==
|
|
3642
|
+
return i[21] !== k || i[22] !== B || i[23] !== S || i[24] !== d ? (C = {
|
|
3640
3643
|
queryKey: k,
|
|
3641
3644
|
queryFn: B,
|
|
3642
|
-
enabled:
|
|
3645
|
+
enabled: S,
|
|
3643
3646
|
...d
|
|
3644
|
-
}, i[21] = k, i[22] = B, i[23] =
|
|
3647
|
+
}, i[21] = k, i[22] = B, i[23] = S, i[24] = d, i[25] = C) : C = i[25], Ie(C);
|
|
3645
3648
|
}
|
|
3646
3649
|
function r(n) {
|
|
3647
3650
|
const i = F(3), o = e(n);
|
|
@@ -3701,8 +3704,8 @@ const {
|
|
|
3701
3704
|
queryKeyPrefix: ["categories"],
|
|
3702
3705
|
getWidgetMethod: (t) => (A) => t.getCategories(A)
|
|
3703
3706
|
}), {
|
|
3704
|
-
useModelHook:
|
|
3705
|
-
ModelComponent:
|
|
3707
|
+
useModelHook: Si,
|
|
3708
|
+
ModelComponent: Mi
|
|
3706
3709
|
} = lA({
|
|
3707
3710
|
queryKeyPrefix: ["features"],
|
|
3708
3711
|
getWidgetMethod: (t) => (A) => t.getFeatures(A)
|
|
@@ -3942,7 +3945,7 @@ function hn(t) {
|
|
|
3942
3945
|
i = void 0;
|
|
3943
3946
|
break A;
|
|
3944
3947
|
}
|
|
3945
|
-
i =
|
|
3948
|
+
i = SA(o.map(gn)).geometry;
|
|
3946
3949
|
}
|
|
3947
3950
|
A[2] = n, A[3] = i;
|
|
3948
3951
|
} else
|
|
@@ -3971,7 +3974,7 @@ function dn(t) {
|
|
|
3971
3974
|
let o;
|
|
3972
3975
|
if (A[2] !== n) {
|
|
3973
3976
|
const s = Object.values(n).filter(wn).flatMap(mn);
|
|
3974
|
-
o =
|
|
3977
|
+
o = SA(s), A[2] = n, A[3] = o;
|
|
3975
3978
|
} else
|
|
3976
3979
|
o = A[3];
|
|
3977
3980
|
i = o.geometry;
|
|
@@ -4055,7 +4058,7 @@ function yn(t) {
|
|
|
4055
4058
|
const d = s[p];
|
|
4056
4059
|
if (d && d.length > 0) {
|
|
4057
4060
|
const w = d.map(En).join("|"), b = `${p}:${w}`;
|
|
4058
|
-
l.has(b) || l.set(b,
|
|
4061
|
+
l.has(b) || l.set(b, SA(d.map(vn)).geometry), a.push(l.get(b));
|
|
4059
4062
|
}
|
|
4060
4063
|
}
|
|
4061
4064
|
const h = new Set(c.filter((p) => {
|
|
@@ -4127,8 +4130,8 @@ function _n(t) {
|
|
|
4127
4130
|
if (d && d.length > 0) {
|
|
4128
4131
|
const w = d.map(xn).join("|"), b = `static:${p}:${w}`;
|
|
4129
4132
|
if (!l.has(b)) {
|
|
4130
|
-
const u = d.flatMap(
|
|
4131
|
-
l.set(b,
|
|
4133
|
+
const u = d.flatMap(Mn);
|
|
4134
|
+
l.set(b, SA(u).geometry);
|
|
4132
4135
|
}
|
|
4133
4136
|
a.push(l.get(b));
|
|
4134
4137
|
}
|
|
@@ -4137,7 +4140,7 @@ function _n(t) {
|
|
|
4137
4140
|
const d = s[p];
|
|
4138
4141
|
return d && d.length > 0;
|
|
4139
4142
|
}).map((p) => {
|
|
4140
|
-
const w = s[p].map(
|
|
4143
|
+
const w = s[p].map(Sn).join("|");
|
|
4141
4144
|
return `static:${p}:${w}`;
|
|
4142
4145
|
}));
|
|
4143
4146
|
for (const p of l.keys())
|
|
@@ -4147,10 +4150,10 @@ function _n(t) {
|
|
|
4147
4150
|
a = A[8];
|
|
4148
4151
|
return a;
|
|
4149
4152
|
}
|
|
4150
|
-
function
|
|
4153
|
+
function Sn(t) {
|
|
4151
4154
|
return `${t.type}:${JSON.stringify(t.coordinates).length}`;
|
|
4152
4155
|
}
|
|
4153
|
-
function
|
|
4156
|
+
function Mn(t) {
|
|
4154
4157
|
return t.type === "Polygon" ? [t.coordinates] : t.coordinates;
|
|
4155
4158
|
}
|
|
4156
4159
|
function xn(t) {
|
|
@@ -4243,7 +4246,7 @@ const Rn = {
|
|
|
4243
4246
|
Polygon: (t) => Pt(t.coordinates),
|
|
4244
4247
|
MultiPoint: (t) => Dt(t.coordinates),
|
|
4245
4248
|
MultiLineString: (t) => xt(t.coordinates),
|
|
4246
|
-
MultiPolygon: (t) =>
|
|
4249
|
+
MultiPolygon: (t) => SA(t.coordinates)
|
|
4247
4250
|
};
|
|
4248
4251
|
function Zi(t) {
|
|
4249
4252
|
const A = Rn[t.type], e = A?.(t);
|
|
@@ -4533,7 +4536,7 @@ export {
|
|
|
4533
4536
|
UA as CartoBasemapURL,
|
|
4534
4537
|
sA as CartoBasemaps,
|
|
4535
4538
|
_i as CategoriesModel,
|
|
4536
|
-
|
|
4539
|
+
M0 as CustomCompositeEditMode,
|
|
4537
4540
|
Ae as CustomEditableGeojsonLayer,
|
|
4538
4541
|
K0 as CustomMeasureAreaMode,
|
|
4539
4542
|
$0 as CustomMeasureBufferMode,
|
|
@@ -4548,7 +4551,7 @@ export {
|
|
|
4548
4551
|
VA as DEFAULT_MEASURE_COLORS,
|
|
4549
4552
|
f0 as DeckGLComponent,
|
|
4550
4553
|
rA as EditableEditType,
|
|
4551
|
-
|
|
4554
|
+
Mi as FeaturesModel,
|
|
4552
4555
|
Di as FormulaModel,
|
|
4553
4556
|
NA as GmapsBasemap,
|
|
4554
4557
|
Ti as HistogramModel,
|
|
@@ -4597,7 +4600,7 @@ export {
|
|
|
4597
4600
|
ki as useAggregations,
|
|
4598
4601
|
Bi as useCategories,
|
|
4599
4602
|
Re as useEventManager,
|
|
4600
|
-
|
|
4603
|
+
Si as useFeatures,
|
|
4601
4604
|
We as useFilters,
|
|
4602
4605
|
xi as useFormula,
|
|
4603
4606
|
yn as useGroupedLassoToolsSpatialFilters,
|