@carto/ps-react-maps 4.0.1 → 4.0.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 +838 -837
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,20 +7,20 @@ import { useMap as yt, Map as jt, APIProvider as It } from "@vis.gl/react-google
|
|
|
7
7
|
import { GoogleMapsOverlay as Nt } from "@deck.gl/google-maps";
|
|
8
8
|
import { createStore as Ge, useStore as Ke, create as ht } from "zustand";
|
|
9
9
|
import { FlyToInterpolator as Ht, WebMercatorViewport as gt } from "@deck.gl/core";
|
|
10
|
-
import { CompositeMode as zt, TranslateMode as Gt, ModifyMode as Kt, DrawPolygonByDraggingMode as Zt, DrawCircleFromCenterMode as bt, DrawRectangleMode as Qt, DrawPolygonMode as Wt, EditableGeoJsonLayer as Yt, MeasureAreaMode as Jt, getPickedEditHandle as Xt, MeasureDistanceMode as
|
|
11
|
-
import { DataFilterExtension as
|
|
12
|
-
import { Pan as Ye, InputDirection as
|
|
13
|
-
import { GeoJsonLayer as
|
|
10
|
+
import { CompositeMode as zt, TranslateMode as Gt, ModifyMode as Kt, DrawPolygonByDraggingMode as Zt, DrawCircleFromCenterMode as bt, DrawRectangleMode as Qt, DrawPolygonMode as Wt, EditableGeoJsonLayer as Yt, MeasureAreaMode as Jt, getPickedEditHandle as Xt, MeasureDistanceMode as es, ViewMode as ts } from "@deck.gl-community/editable-layers";
|
|
11
|
+
import { DataFilterExtension as ss, MaskExtension as ns } from "@deck.gl/extensions";
|
|
12
|
+
import { Pan as Ye, InputDirection as rs, EventManager as os, Tap as Je, Pinch as is } from "mjolnir.js";
|
|
13
|
+
import { GeoJsonLayer as as } from "@deck.gl/layers";
|
|
14
14
|
import { useShallow as vt } from "zustand/shallow";
|
|
15
|
-
import { area as Xe, centroid as
|
|
16
|
-
import { formatNumber as wt, formatCurrency as
|
|
15
|
+
import { area as Xe, centroid as ls, lineIntersect as cs, multiPolygon as St } from "@turf/turf";
|
|
16
|
+
import { formatNumber as wt, formatCurrency as us } from "@carto/ps-utils";
|
|
17
17
|
import _t from "convert-units";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import ds from "convert-units/definitions/length";
|
|
19
|
+
import fs from "convert-units/definitions/area";
|
|
20
20
|
import { useQuery as le } from "@tanstack/react-query";
|
|
21
|
-
import { removeFilter as
|
|
22
|
-
import { devtools as
|
|
23
|
-
import
|
|
21
|
+
import { removeFilter as ps, addFilter as Mt, WidgetRasterSource as ms, WidgetTilesetSource as ys, TileFormat as hs, WidgetTableSource as gs, WidgetQuerySource as bs, createViewportSpatialFilter as vs, vectorTilesetSource as Ss } from "@carto/api-client";
|
|
22
|
+
import { devtools as ws } from "zustand/middleware";
|
|
23
|
+
import _s from "html2canvas";
|
|
24
24
|
const De = {
|
|
25
25
|
roadmap: "roadmap",
|
|
26
26
|
satellite: "satellite",
|
|
@@ -60,13 +60,13 @@ const De = {
|
|
|
60
60
|
type: ie.googleMaps
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
function
|
|
63
|
+
function Ms({
|
|
64
64
|
isDragging: r,
|
|
65
65
|
isHovering: e
|
|
66
66
|
}) {
|
|
67
67
|
return r ? "grabbing" : e ? "pointer" : "grab";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Es(r) {
|
|
70
70
|
return r.html ? {
|
|
71
71
|
html: `<div class='map-tooltip__content'>${r.html}</div>`,
|
|
72
72
|
style: {
|
|
@@ -75,9 +75,9 @@ function Tn(r) {
|
|
|
75
75
|
}
|
|
76
76
|
} : null;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ts(r) {
|
|
79
79
|
const e = O(39);
|
|
80
|
-
let t,
|
|
80
|
+
let t, s, n, o, i, a, l, c, h, y, v, p;
|
|
81
81
|
e[0] !== r ? ({
|
|
82
82
|
instanceRef: i,
|
|
83
83
|
overlayRef: y,
|
|
@@ -86,14 +86,14 @@ function Ln(r) {
|
|
|
86
86
|
layers: a,
|
|
87
87
|
mapStyle: l,
|
|
88
88
|
parameters: v,
|
|
89
|
-
getCursor:
|
|
90
|
-
getTooltip:
|
|
89
|
+
getCursor: s,
|
|
90
|
+
getTooltip: n,
|
|
91
91
|
onLoad: c,
|
|
92
92
|
onViewStateChange: h,
|
|
93
93
|
...p
|
|
94
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
94
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = n, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = c, e[9] = h, e[10] = y, e[11] = v, e[12] = p) : (t = e[1], s = e[2], n = e[3], o = e[4], i = e[5], a = e[6], l = e[7], c = e[8], h = e[9], y = e[10], v = e[11], p = e[12]);
|
|
95
95
|
let b;
|
|
96
|
-
e[13] !== a ? (b = a.filter(
|
|
96
|
+
e[13] !== a ? (b = a.filter(ks).map(Ps), e[13] = a, e[14] = b) : b = e[14];
|
|
97
97
|
const m = b, w = i;
|
|
98
98
|
let u;
|
|
99
99
|
e[15] !== c ? (u = () => c({
|
|
@@ -106,76 +106,76 @@ function Ln(r) {
|
|
|
106
106
|
...v
|
|
107
107
|
}, e[17] = v, e[18] = f) : f = e[18];
|
|
108
108
|
let S;
|
|
109
|
-
e[19] !== y ? (S = /* @__PURE__ */ Z(
|
|
109
|
+
e[19] !== y ? (S = /* @__PURE__ */ Z(Cs, { overlayRef: y }), e[19] = y, e[20] = S) : S = e[20];
|
|
110
110
|
let M;
|
|
111
111
|
e[21] !== c ? (M = () => c({
|
|
112
112
|
type: "load",
|
|
113
113
|
value: !0
|
|
114
114
|
}), e[21] = c, e[22] = M) : M = e[22];
|
|
115
115
|
let _;
|
|
116
|
-
e[23] !== l || e[24] !== M ? (_ = /* @__PURE__ */ Z(Ut, { reuseMaps: !1, mapStyle: l, onLoad: M, onRender:
|
|
116
|
+
e[23] !== l || e[24] !== M ? (_ = /* @__PURE__ */ Z(Ut, { reuseMaps: !1, mapStyle: l, onLoad: M, onRender: Ls }), e[23] = l, e[24] = M, e[25] = _) : _ = e[25];
|
|
117
117
|
let P;
|
|
118
|
-
return e[26] !== m || e[27] !== t || e[28] !==
|
|
118
|
+
return e[26] !== m || e[27] !== t || e[28] !== s || e[29] !== n || e[30] !== o || e[31] !== h || e[32] !== p || e[33] !== w || e[34] !== u || e[35] !== f || e[36] !== S || e[37] !== _ ? (P = /* @__PURE__ */ Z(xt, { children: /* @__PURE__ */ Z("div", { className: "deckgl-map", children: /* @__PURE__ */ mt(Bt, { controller: t, id: o, ref: w, layers: m, getCursor: s, getTooltip: n, onLoad: u, onViewStateChange: h, parameters: f, ...p, children: [
|
|
119
119
|
S,
|
|
120
120
|
_
|
|
121
|
-
] }) }) }), e[26] = m, e[27] = t, e[28] =
|
|
121
|
+
] }) }) }), e[26] = m, e[27] = t, e[28] = s, e[29] = n, e[30] = o, e[31] = h, e[32] = p, e[33] = w, e[34] = u, e[35] = f, e[36] = S, e[37] = _, e[38] = P) : P = e[38], P;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ls() {
|
|
124
124
|
document.querySelector(".maplibregl-compact-show")?.classList.remove("maplibregl-compact-show");
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ps(r) {
|
|
127
127
|
const {
|
|
128
128
|
type: e,
|
|
129
129
|
props: t
|
|
130
130
|
} = r;
|
|
131
131
|
return new e(t);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function ks(r) {
|
|
134
134
|
return !!r?.type;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Cs(r) {
|
|
137
137
|
const e = O(3), {
|
|
138
138
|
overlayRef: t
|
|
139
139
|
} = r, {
|
|
140
|
-
default:
|
|
140
|
+
default: s
|
|
141
141
|
} = Vt();
|
|
142
|
-
let
|
|
143
|
-
return e[0] !==
|
|
142
|
+
let n, o;
|
|
143
|
+
return e[0] !== s ? (n = () => s, o = [s], e[0] = s, e[1] = n, e[2] = o) : (n = e[1], o = e[2]), Ne(t, n, o), null;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const Os = (r) => {
|
|
146
146
|
const e = O(9);
|
|
147
147
|
let t;
|
|
148
148
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = new Nt({
|
|
149
149
|
interleaved: !0
|
|
150
150
|
}), e[0] = t) : t = e[0];
|
|
151
|
-
const
|
|
151
|
+
const s = t, n = yt();
|
|
152
152
|
let o, i;
|
|
153
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () =>
|
|
153
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => s, i = [s], e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ne(r.instanceRef, o, i);
|
|
154
154
|
let a, l;
|
|
155
|
-
e[3] !==
|
|
156
|
-
|
|
157
|
-
}), l = [
|
|
155
|
+
e[3] !== n ? (a = () => (s.setMap(n), () => {
|
|
156
|
+
s.finalize();
|
|
157
|
+
}), l = [s, n], e[3] = n, e[4] = a, e[5] = l) : (a = e[4], l = e[5]), W(a, l);
|
|
158
158
|
let c, h;
|
|
159
159
|
return e[6] !== r ? (c = () => {
|
|
160
|
-
|
|
161
|
-
}, h = [
|
|
160
|
+
s.setProps(r);
|
|
161
|
+
}, h = [s, r], e[6] = r, e[7] = c, e[8] = h) : (c = e[7], h = e[8]), W(c, h), null;
|
|
162
162
|
};
|
|
163
|
-
function
|
|
163
|
+
function Fs(r) {
|
|
164
164
|
const e = O(73);
|
|
165
|
-
let t,
|
|
165
|
+
let t, s, n, o, i, a, l, c, h, y, v;
|
|
166
166
|
e[0] !== r ? ({
|
|
167
|
-
id:
|
|
167
|
+
id: n,
|
|
168
168
|
instanceRef: o,
|
|
169
169
|
basemap: t,
|
|
170
170
|
layers: i,
|
|
171
171
|
gmapsProps: v,
|
|
172
172
|
overlayRef: c,
|
|
173
173
|
parameters: h,
|
|
174
|
-
controller:
|
|
174
|
+
controller: s,
|
|
175
175
|
onLoad: a,
|
|
176
176
|
onViewStateChange: l,
|
|
177
177
|
...y
|
|
178
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
178
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = n, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = c, e[9] = h, e[10] = y, e[11] = v) : (t = e[1], s = e[2], n = e[3], o = e[4], i = e[5], a = e[6], l = e[7], c = e[8], h = e[9], y = e[10], v = e[11]);
|
|
179
179
|
let p;
|
|
180
180
|
e[12] !== v ? (p = v === void 0 ? {
|
|
181
181
|
apiKey: ""
|
|
@@ -188,33 +188,33 @@ function An(r) {
|
|
|
188
188
|
} = p, e[14] = p, e[15] = b, e[16] = m, e[17] = w) : (b = e[15], m = e[16], w = e[17]);
|
|
189
189
|
let u;
|
|
190
190
|
e: {
|
|
191
|
-
if (typeof
|
|
191
|
+
if (typeof s == "boolean") {
|
|
192
192
|
let oe;
|
|
193
|
-
e[18] !==
|
|
194
|
-
dragPan:
|
|
195
|
-
doubleClickZoom:
|
|
196
|
-
scrollZoom:
|
|
197
|
-
}, e[18] =
|
|
193
|
+
e[18] !== s ? (oe = {
|
|
194
|
+
dragPan: s,
|
|
195
|
+
doubleClickZoom: s,
|
|
196
|
+
scrollZoom: s
|
|
197
|
+
}, e[18] = s, e[19] = oe) : oe = e[19], u = oe;
|
|
198
198
|
break e;
|
|
199
199
|
}
|
|
200
|
-
const G =
|
|
201
|
-
let
|
|
202
|
-
e[20] !==
|
|
203
|
-
dragPan:
|
|
200
|
+
const G = s, se = G?.dragPan ?? !0, J = G?.doubleClickZoom ?? !0, Y = G?.scrollZoom ?? !0;
|
|
201
|
+
let ne;
|
|
202
|
+
e[20] !== se || e[21] !== J || e[22] !== Y ? (ne = {
|
|
203
|
+
dragPan: se,
|
|
204
204
|
doubleClickZoom: J,
|
|
205
205
|
scrollZoom: Y
|
|
206
|
-
}, e[20] =
|
|
206
|
+
}, e[20] = se, e[21] = J, e[22] = Y, e[23] = ne) : ne = e[23], u = ne;
|
|
207
207
|
}
|
|
208
208
|
const f = u;
|
|
209
209
|
let S;
|
|
210
|
-
e[24] !== i ? (S = i.filter(
|
|
211
|
-
const M = S, _ =
|
|
210
|
+
e[24] !== i ? (S = i.filter(Ds).map(Rs), e[24] = i, e[25] = S) : S = e[25];
|
|
211
|
+
const M = S, _ = As;
|
|
212
212
|
let P;
|
|
213
213
|
e[26] !== o || e[27] !== l ? (P = (G) => {
|
|
214
214
|
const J = o?.current?._deck, Y = {
|
|
215
215
|
...J?.viewState,
|
|
216
216
|
...G
|
|
217
|
-
},
|
|
217
|
+
}, ne = {
|
|
218
218
|
latitude: Y.latitude,
|
|
219
219
|
longitude: Y.longitude,
|
|
220
220
|
zoom: Y.zoom,
|
|
@@ -224,7 +224,7 @@ function An(r) {
|
|
|
224
224
|
height: J?.height
|
|
225
225
|
};
|
|
226
226
|
l?.({
|
|
227
|
-
viewState:
|
|
227
|
+
viewState: ne,
|
|
228
228
|
interactionState: {
|
|
229
229
|
isZooming: !0
|
|
230
230
|
}
|
|
@@ -248,7 +248,7 @@ function An(r) {
|
|
|
248
248
|
e[36] !== R ? (d = (G) => R(_(G)), g = (G) => R(_(G)), e[36] = R, e[37] = d, e[38] = g) : (d = e[37], g = e[38]);
|
|
249
249
|
const L = typeof f.scrollZoom == "boolean" ? f.scrollZoom : !!f.scrollZoom, C = f.dragPan ? "greedy" : "none", k = !f.doubleClickZoom;
|
|
250
250
|
let T;
|
|
251
|
-
e[39] !==
|
|
251
|
+
e[39] !== n || e[40] !== c ? (T = /* @__PURE__ */ Z($s, { id: n, overlayRef: c }), e[39] = n, e[40] = c, e[41] = T) : T = e[41];
|
|
252
252
|
let U;
|
|
253
253
|
e[42] !== a ? (U = () => {
|
|
254
254
|
a({
|
|
@@ -262,55 +262,55 @@ function An(r) {
|
|
|
262
262
|
...h
|
|
263
263
|
}, e[44] = h, e[45] = N) : N = e[45];
|
|
264
264
|
let I;
|
|
265
|
-
e[46] !== M || e[47] !==
|
|
265
|
+
e[46] !== M || e[47] !== n || e[48] !== o || e[49] !== y || e[50] !== U || e[51] !== N ? (I = /* @__PURE__ */ Z(Os, { id: n, instanceRef: o, layers: M, onLoad: U, parameters: N, ...y }), e[46] = M, e[47] = n, e[48] = o, e[49] = y, e[50] = U, e[51] = N, e[52] = I) : I = e[52];
|
|
266
266
|
let $;
|
|
267
|
-
e[53] !== m || e[54] !== t || e[55] !==
|
|
267
|
+
e[53] !== m || e[54] !== t || e[55] !== n || e[56] !== F || e[57] !== j || e[58] !== E || e[59] !== d || e[60] !== g || e[61] !== L || e[62] !== C || e[63] !== k || e[64] !== T || e[65] !== I || e[66] !== B || e[67] !== x ? ($ = /* @__PURE__ */ Z("div", { className: "deckgl-map", children: /* @__PURE__ */ mt(jt, { id: n, mapTypeId: t, disableDefaultUI: !0, ...m, center: B, zoom: x, tilt: F, heading: j, onTilesLoaded: E, onBoundsChanged: d, onZoomChanged: g, scrollwheel: L, gestureHandling: C, disableDoubleClickZoom: k, children: [
|
|
268
268
|
T,
|
|
269
269
|
I
|
|
270
|
-
] }) }), e[53] = m, e[54] = t, e[55] =
|
|
270
|
+
] }) }), e[53] = m, e[54] = t, e[55] = n, e[56] = F, e[57] = j, e[58] = E, e[59] = d, e[60] = g, e[61] = L, e[62] = C, e[63] = k, e[64] = T, e[65] = I, e[66] = B, e[67] = x, e[68] = $) : $ = e[68];
|
|
271
271
|
let z;
|
|
272
272
|
return e[69] !== b || e[70] !== w || e[71] !== $ ? (z = /* @__PURE__ */ Z(It, { apiKey: w, ...b, children: $ }), e[69] = b, e[70] = w, e[71] = $, e[72] = z) : z = e[72], z;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function As(r) {
|
|
275
275
|
const {
|
|
276
276
|
detail: e
|
|
277
277
|
} = r, {
|
|
278
278
|
center: t,
|
|
279
|
-
zoom:
|
|
280
|
-
heading:
|
|
279
|
+
zoom: s,
|
|
280
|
+
heading: n,
|
|
281
281
|
tilt: o
|
|
282
282
|
} = e;
|
|
283
283
|
return {
|
|
284
284
|
latitude: t.lat,
|
|
285
285
|
longitude: t.lng,
|
|
286
|
-
zoom:
|
|
287
|
-
bearing:
|
|
286
|
+
zoom: s - 1,
|
|
287
|
+
bearing: n,
|
|
288
288
|
pitch: o
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Rs(r) {
|
|
292
292
|
const {
|
|
293
293
|
type: e,
|
|
294
294
|
props: t
|
|
295
295
|
} = r;
|
|
296
296
|
return new e(t);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Ds(r) {
|
|
299
299
|
return !!r?.type;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function $s(r) {
|
|
302
302
|
const e = O(3), {
|
|
303
303
|
id: t,
|
|
304
|
-
overlayRef:
|
|
305
|
-
} = r,
|
|
304
|
+
overlayRef: s
|
|
305
|
+
} = r, n = yt(t);
|
|
306
306
|
let o, i;
|
|
307
|
-
return e[0] !==
|
|
307
|
+
return e[0] !== n ? (o = () => n, i = [n], e[0] = n, e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ne(s, o, i), null;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function qs(r) {
|
|
310
310
|
const e = O(46);
|
|
311
|
-
let t,
|
|
311
|
+
let t, s, n, o, i, a, l, c, h, y, v, p;
|
|
312
312
|
e[0] !== r ? ({
|
|
313
|
-
instanceRef:
|
|
313
|
+
instanceRef: s,
|
|
314
314
|
overlayRef: o,
|
|
315
315
|
basemap: a,
|
|
316
316
|
controller: l,
|
|
@@ -319,14 +319,14 @@ function xn(r) {
|
|
|
319
319
|
gmapsProps: t,
|
|
320
320
|
getCursor: y,
|
|
321
321
|
getTooltip: v,
|
|
322
|
-
onLoad:
|
|
322
|
+
onLoad: n,
|
|
323
323
|
onViewStateChange: p,
|
|
324
324
|
...i
|
|
325
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
325
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = n, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = c, e[9] = h, e[10] = y, e[11] = v, e[12] = p) : (t = e[1], s = e[2], n = e[3], o = e[4], i = e[5], a = e[6], l = e[7], c = e[8], h = e[9], y = e[10], v = e[11], p = e[12]);
|
|
326
326
|
const b = a === void 0 ? re.positron : a, m = l === void 0 ? !0 : l, w = c === void 0 ? "deck-gl-map" : c;
|
|
327
327
|
let u;
|
|
328
328
|
e[13] !== h ? (u = h === void 0 ? [] : h, e[13] = h, e[14] = u) : u = e[14];
|
|
329
|
-
const f = u, S = y === void 0 ?
|
|
329
|
+
const f = u, S = y === void 0 ? Ms : y, M = v === void 0 ? Es : v, _ = p === void 0 ? Us : p;
|
|
330
330
|
let P;
|
|
331
331
|
e[15] === Symbol.for("react.memo_cache_sentinel") ? (P = [!1, !1], e[15] = P) : P = e[15];
|
|
332
332
|
const [R, V] = ae(P), {
|
|
@@ -350,23 +350,23 @@ function xn(r) {
|
|
|
350
350
|
});
|
|
351
351
|
}, d = [j], e[17] = E, e[18] = d) : (E = e[17], d = e[18]), W(E, d);
|
|
352
352
|
let g, L;
|
|
353
|
-
if (e[19] !== R || e[20] !==
|
|
354
|
-
const k = R.every(
|
|
355
|
-
|
|
356
|
-
}, L = [R,
|
|
353
|
+
if (e[19] !== R || e[20] !== n ? (g = () => {
|
|
354
|
+
const k = R.every(xs);
|
|
355
|
+
n?.(k);
|
|
356
|
+
}, L = [R, n], e[19] = R, e[20] = n, e[21] = g, e[22] = L) : (g = e[21], L = e[22]), W(g, L), x) {
|
|
357
357
|
let k;
|
|
358
|
-
return e[23] !== b || e[24] !== m || e[25] !== S || e[26] !== M || e[27] !== t || e[28] !== w || e[29] !==
|
|
358
|
+
return e[23] !== b || e[24] !== m || e[25] !== S || e[26] !== M || e[27] !== t || e[28] !== w || e[29] !== s || e[30] !== f || e[31] !== _ || e[32] !== o || e[33] !== i ? (k = /* @__PURE__ */ Z(Fs, { instanceRef: s, overlayRef: o, controller: m, id: w, basemap: b, layers: f, gmapsProps: t, getCursor: S, getTooltip: M, onLoad: j, onViewStateChange: _, ...i }), e[23] = b, e[24] = m, e[25] = S, e[26] = M, e[27] = t, e[28] = w, e[29] = s, e[30] = f, e[31] = _, e[32] = o, e[33] = i, e[34] = k) : k = e[34], k;
|
|
359
359
|
}
|
|
360
360
|
let C;
|
|
361
|
-
return e[35] !== m || e[36] !== S || e[37] !== M || e[38] !== w || e[39] !==
|
|
361
|
+
return e[35] !== m || e[36] !== S || e[37] !== M || e[38] !== w || e[39] !== s || e[40] !== f || e[41] !== D || e[42] !== _ || e[43] !== o || e[44] !== i ? (C = /* @__PURE__ */ Z(Ts, { instanceRef: s, overlayRef: o, controller: m, id: w, layers: f, mapStyle: D, getCursor: S, getTooltip: M, onLoad: j, onViewStateChange: _, ...i }), e[35] = m, e[36] = S, e[37] = M, e[38] = w, e[39] = s, e[40] = f, e[41] = D, e[42] = _, e[43] = o, e[44] = i, e[45] = C) : C = e[45], C;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function xs(r) {
|
|
364
364
|
return r;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Us() {
|
|
367
367
|
return null;
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Vs = {
|
|
370
370
|
transitionDuration: "auto",
|
|
371
371
|
transitionInterpolator: new Ht({
|
|
372
372
|
curve: 2
|
|
@@ -377,7 +377,7 @@ function Et(r) {
|
|
|
377
377
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
378
378
|
}
|
|
379
379
|
var qe, et;
|
|
380
|
-
function
|
|
380
|
+
function Bs() {
|
|
381
381
|
if (et) return qe;
|
|
382
382
|
et = 1;
|
|
383
383
|
var r = function(f) {
|
|
@@ -390,9 +390,9 @@ function jn() {
|
|
|
390
390
|
var f = Object.prototype.toString.call(u);
|
|
391
391
|
return f === "[object RegExp]" || f === "[object Date]" || o(u);
|
|
392
392
|
}
|
|
393
|
-
var
|
|
393
|
+
var s = typeof Symbol == "function" && Symbol.for, n = s ? Symbol.for("react.element") : 60103;
|
|
394
394
|
function o(u) {
|
|
395
|
-
return u.$$typeof ===
|
|
395
|
+
return u.$$typeof === n;
|
|
396
396
|
}
|
|
397
397
|
function i(u) {
|
|
398
398
|
return Array.isArray(u) ? [] : {};
|
|
@@ -452,14 +452,14 @@ function jn() {
|
|
|
452
452
|
var w = m;
|
|
453
453
|
return qe = w, qe;
|
|
454
454
|
}
|
|
455
|
-
var
|
|
456
|
-
const de = /* @__PURE__ */ Et(
|
|
457
|
-
const e = r.reduce((t,
|
|
455
|
+
var js = Bs();
|
|
456
|
+
const de = /* @__PURE__ */ Et(js), Is = (r) => {
|
|
457
|
+
const e = r.reduce((t, s) => {
|
|
458
458
|
const {
|
|
459
|
-
id:
|
|
459
|
+
id: n,
|
|
460
460
|
basemap: o
|
|
461
|
-
} =
|
|
462
|
-
return t[
|
|
461
|
+
} = s;
|
|
462
|
+
return t[n] = {
|
|
463
463
|
isLoaded: !1,
|
|
464
464
|
basemap: o,
|
|
465
465
|
instanceRef: {
|
|
@@ -468,53 +468,53 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
468
468
|
overlayRef: {
|
|
469
469
|
current: null
|
|
470
470
|
},
|
|
471
|
-
layers:
|
|
472
|
-
controller:
|
|
471
|
+
layers: s.layers ?? [],
|
|
472
|
+
controller: s.controller ?? !0
|
|
473
473
|
}, t;
|
|
474
474
|
}, {});
|
|
475
|
-
return ((t,
|
|
475
|
+
return ((t, s) => ({
|
|
476
476
|
maps: e,
|
|
477
|
-
setBasemap: (
|
|
477
|
+
setBasemap: (n, o) => t((i) => {
|
|
478
478
|
const {
|
|
479
479
|
type: a
|
|
480
|
-
} = Se[i.maps[
|
|
480
|
+
} = Se[i.maps[n].basemap], {
|
|
481
481
|
type: l
|
|
482
|
-
} = Se[o], c = a === l && !!i.maps[
|
|
482
|
+
} = Se[o], c = a === l && !!i.maps[n]?.isLoaded;
|
|
483
483
|
return {
|
|
484
484
|
maps: {
|
|
485
485
|
...i.maps,
|
|
486
|
-
[
|
|
487
|
-
...i.maps[
|
|
486
|
+
[n]: {
|
|
487
|
+
...i.maps[n],
|
|
488
488
|
isLoaded: c,
|
|
489
489
|
basemap: o
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
}),
|
|
494
|
-
setLoad: (
|
|
494
|
+
setLoad: (n, o) => t((i) => ({
|
|
495
495
|
maps: {
|
|
496
496
|
...i.maps,
|
|
497
|
-
[
|
|
498
|
-
...i.maps[
|
|
497
|
+
[n]: {
|
|
498
|
+
...i.maps[n],
|
|
499
499
|
isLoaded: o
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
})),
|
|
503
|
-
getOverlayInstance: (
|
|
504
|
-
getDeckInstance: (
|
|
505
|
-
const i =
|
|
503
|
+
getOverlayInstance: (n) => s().maps[n]?.overlayRef?.current,
|
|
504
|
+
getDeckInstance: (n) => {
|
|
505
|
+
const i = s().maps[n]?.instanceRef?.current;
|
|
506
506
|
return (
|
|
507
507
|
// @ts-expect-error accessing protected props
|
|
508
508
|
i?.deck ?? i._deck
|
|
509
509
|
);
|
|
510
510
|
},
|
|
511
|
-
getViewState: (
|
|
512
|
-
getViewports: (
|
|
513
|
-
getViewport: (
|
|
514
|
-
getBounds: (
|
|
515
|
-
const a =
|
|
516
|
-
if (!a.maps?.[
|
|
517
|
-
const l = a.getViewState(
|
|
511
|
+
getViewState: (n) => s().getDeckInstance(n)?.viewState,
|
|
512
|
+
getViewports: (n, o) => s().getDeckInstance(n)?.getViewports(o),
|
|
513
|
+
getViewport: (n, o = 0, i) => s().getDeckInstance(n)?.getViewports(i)?.[o],
|
|
514
|
+
getBounds: (n, o, i) => {
|
|
515
|
+
const a = s();
|
|
516
|
+
if (!a.maps?.[n]?.isLoaded) return;
|
|
517
|
+
const l = a.getViewState(n);
|
|
518
518
|
if (!l) return;
|
|
519
519
|
const h = new gt(l).fitBounds(o, i?.boundsOptions);
|
|
520
520
|
return {
|
|
@@ -524,190 +524,190 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
524
524
|
...i?.viewStateOptions
|
|
525
525
|
};
|
|
526
526
|
},
|
|
527
|
-
addLayers: (
|
|
527
|
+
addLayers: (n, o) => t((i) => {
|
|
528
528
|
const a = {
|
|
529
529
|
...i.maps
|
|
530
|
-
}, l = a[
|
|
531
|
-
return a[
|
|
532
|
-
...a[
|
|
530
|
+
}, l = a[n]?.layers ?? [], c = /* @__PURE__ */ new Set([...l, ...o]);
|
|
531
|
+
return a[n] = {
|
|
532
|
+
...a[n],
|
|
533
533
|
layers: [...c]
|
|
534
534
|
}, {
|
|
535
535
|
maps: a
|
|
536
536
|
};
|
|
537
537
|
}),
|
|
538
|
-
removeLayers: (
|
|
538
|
+
removeLayers: (n, o) => t((i) => {
|
|
539
539
|
const a = {
|
|
540
540
|
...i.maps
|
|
541
|
-
}, l = a[
|
|
542
|
-
return a[
|
|
543
|
-
...a[
|
|
541
|
+
}, l = a[n]?.layers ?? [];
|
|
542
|
+
return a[n] = {
|
|
543
|
+
...a[n],
|
|
544
544
|
layers: l.filter((c) => !o.includes(c))
|
|
545
545
|
}, {
|
|
546
546
|
maps: a
|
|
547
547
|
};
|
|
548
548
|
}),
|
|
549
|
-
setController: (
|
|
550
|
-
const a = i.maps[
|
|
549
|
+
setController: (n, o) => t((i) => {
|
|
550
|
+
const a = i.maps[n]?.controller ?? {}, c = !o || typeof o == "boolean" ? o : de(typeof a == "boolean" ? {} : a, o);
|
|
551
551
|
return {
|
|
552
552
|
maps: {
|
|
553
553
|
...i.maps,
|
|
554
|
-
[
|
|
555
|
-
...i.maps[
|
|
554
|
+
[n]: {
|
|
555
|
+
...i.maps[n],
|
|
556
556
|
controller: c
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
};
|
|
560
560
|
})
|
|
561
561
|
}));
|
|
562
|
-
},
|
|
563
|
-
const e = r.reduce((t,
|
|
562
|
+
}, Ns = (r) => {
|
|
563
|
+
const e = r.reduce((t, s) => {
|
|
564
564
|
const {
|
|
565
|
-
id:
|
|
566
|
-
} =
|
|
567
|
-
return t[
|
|
565
|
+
id: n
|
|
566
|
+
} = s;
|
|
567
|
+
return t[n] = !1, t;
|
|
568
568
|
}, {});
|
|
569
569
|
return ((t) => ({
|
|
570
570
|
areLayersLoaded: e,
|
|
571
|
-
setLayersLoad: (
|
|
571
|
+
setLayersLoad: (s, n) => t((o) => ({
|
|
572
572
|
areLayersLoaded: {
|
|
573
573
|
...o.areLayersLoaded,
|
|
574
|
-
[
|
|
574
|
+
[s]: n
|
|
575
575
|
}
|
|
576
576
|
}))
|
|
577
577
|
}));
|
|
578
|
-
},
|
|
579
|
-
const e = r.reduce((t,
|
|
580
|
-
const
|
|
581
|
-
return t.initialViewStates[
|
|
578
|
+
}, Hs = (r) => {
|
|
579
|
+
const e = r.reduce((t, s) => {
|
|
580
|
+
const n = s.initialViewState ?? s.viewState;
|
|
581
|
+
return t.initialViewStates[s.id] = n, t.viewStates[s.id] = n, t.viewports[s.id] = null, t;
|
|
582
582
|
}, {
|
|
583
583
|
viewStates: {},
|
|
584
584
|
viewports: {},
|
|
585
585
|
initialViewStates: {}
|
|
586
586
|
});
|
|
587
|
-
return ((t,
|
|
587
|
+
return ((t, s) => ({
|
|
588
588
|
viewports: e.viewports,
|
|
589
589
|
initialViewStates: e.initialViewStates,
|
|
590
|
-
updateViewPort: (
|
|
591
|
-
const o =
|
|
592
|
-
if (!o.maps[
|
|
593
|
-
const i = new gt(o.viewStates[
|
|
590
|
+
updateViewPort: (n) => {
|
|
591
|
+
const o = s();
|
|
592
|
+
if (!o.maps[n]?.isLoaded) return;
|
|
593
|
+
const i = new gt(o.viewStates[n]);
|
|
594
594
|
t((a) => ({
|
|
595
595
|
viewports: {
|
|
596
596
|
...a.viewports,
|
|
597
|
-
[
|
|
597
|
+
[n]: i
|
|
598
598
|
}
|
|
599
599
|
}));
|
|
600
600
|
},
|
|
601
601
|
viewStates: e.viewStates,
|
|
602
|
-
setViewState: (
|
|
602
|
+
setViewState: (n, o) => t((i) => ({
|
|
603
603
|
viewStates: {
|
|
604
604
|
...i.viewStates,
|
|
605
|
-
[
|
|
606
|
-
...i.viewStates[
|
|
605
|
+
[n]: {
|
|
606
|
+
...i.viewStates[n],
|
|
607
607
|
...o
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
})),
|
|
611
|
-
setInitialViewState: (
|
|
611
|
+
setInitialViewState: (n, o) => t((i) => ({
|
|
612
612
|
initialViewStates: {
|
|
613
613
|
...i.initialViewStates,
|
|
614
|
-
[
|
|
614
|
+
[n]: o
|
|
615
615
|
}
|
|
616
616
|
})),
|
|
617
|
-
setZoom: (
|
|
617
|
+
setZoom: (n, o) => t((i) => ({
|
|
618
618
|
viewStates: {
|
|
619
619
|
...i.viewStates,
|
|
620
|
-
[
|
|
621
|
-
...i.viewStates[
|
|
620
|
+
[n]: {
|
|
621
|
+
...i.viewStates[n],
|
|
622
622
|
zoom: o
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
})),
|
|
626
|
-
setMinZoom: (
|
|
626
|
+
setMinZoom: (n, o) => t((i) => ({
|
|
627
627
|
viewStates: {
|
|
628
628
|
...i.viewStates,
|
|
629
|
-
[
|
|
630
|
-
...i.viewStates[
|
|
629
|
+
[n]: {
|
|
630
|
+
...i.viewStates[n],
|
|
631
631
|
minZoom: o
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
})),
|
|
635
|
-
setMaxZoom: (
|
|
635
|
+
setMaxZoom: (n, o) => t((i) => ({
|
|
636
636
|
viewStates: {
|
|
637
637
|
...i.viewStates,
|
|
638
|
-
[
|
|
639
|
-
...i.viewStates[
|
|
638
|
+
[n]: {
|
|
639
|
+
...i.viewStates[n],
|
|
640
640
|
maxZoom: o
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
}))
|
|
644
644
|
}));
|
|
645
|
-
},
|
|
646
|
-
fitBounds: (t,
|
|
647
|
-
const o = e(), i = o.getBounds(t,
|
|
645
|
+
}, zs = ((r, e) => ({
|
|
646
|
+
fitBounds: (t, s, n) => {
|
|
647
|
+
const o = e(), i = o.getBounds(t, s, n);
|
|
648
648
|
i && (o.setViewState(t, i), o.updateViewPort(t));
|
|
649
649
|
},
|
|
650
|
-
flyTo: (t,
|
|
650
|
+
flyTo: (t, s, n = {}) => {
|
|
651
651
|
const o = e(), i = {
|
|
652
|
-
...
|
|
653
|
-
...
|
|
652
|
+
...Vs,
|
|
653
|
+
...n?.viewStateOptions
|
|
654
654
|
}, a = {
|
|
655
|
-
...
|
|
655
|
+
...s,
|
|
656
656
|
...i
|
|
657
657
|
};
|
|
658
658
|
o.setViewState(t, a), o.updateViewPort(t);
|
|
659
659
|
},
|
|
660
|
-
loadInitialViewState: (t,
|
|
661
|
-
const
|
|
662
|
-
|
|
660
|
+
loadInitialViewState: (t, s) => {
|
|
661
|
+
const n = e();
|
|
662
|
+
n.setInitialViewState(t, s), n.flyTo(t, s, {
|
|
663
663
|
viewStateOptions: {
|
|
664
664
|
transitionDuration: 0
|
|
665
665
|
}
|
|
666
666
|
});
|
|
667
667
|
},
|
|
668
668
|
resetViewState: (t) => {
|
|
669
|
-
const
|
|
670
|
-
|
|
669
|
+
const s = e(), n = s.initialViewStates;
|
|
670
|
+
n[t] && s.flyTo(t, n[t]);
|
|
671
671
|
}
|
|
672
|
-
})),
|
|
673
|
-
const e = r.reduce((t,
|
|
672
|
+
})), Gs = (r) => {
|
|
673
|
+
const e = r.reduce((t, s) => (t[s.id] = s.spatialFilter ?? {}, t), {});
|
|
674
674
|
return ((t) => ({
|
|
675
675
|
spatialFilter: e,
|
|
676
|
-
setSpatialFilter: (
|
|
676
|
+
setSpatialFilter: (s, n, o) => {
|
|
677
677
|
t((i) => {
|
|
678
678
|
const a = structuredClone(i.spatialFilter);
|
|
679
|
-
return a[
|
|
680
|
-
...a[
|
|
681
|
-
[
|
|
679
|
+
return a[s] = {
|
|
680
|
+
...a[s],
|
|
681
|
+
[n]: o
|
|
682
682
|
}, {
|
|
683
683
|
spatialFilter: a
|
|
684
684
|
};
|
|
685
685
|
});
|
|
686
686
|
},
|
|
687
|
-
removeSpatialFilter: (
|
|
687
|
+
removeSpatialFilter: (s, n) => {
|
|
688
688
|
t((o) => {
|
|
689
689
|
const i = structuredClone(o.spatialFilter);
|
|
690
|
-
return i[
|
|
690
|
+
return i[s] && delete i[s][n], {
|
|
691
691
|
spatialFilter: i
|
|
692
692
|
};
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
}));
|
|
696
|
-
},
|
|
697
|
-
...
|
|
698
|
-
...
|
|
699
|
-
...
|
|
700
|
-
...
|
|
701
|
-
...
|
|
696
|
+
}, Ks = (r) => Ge()((...e) => ({
|
|
697
|
+
...Is(r)(...e),
|
|
698
|
+
...Ns(r)(...e),
|
|
699
|
+
...Hs(r)(...e),
|
|
700
|
+
...Gs(r)(...e),
|
|
701
|
+
...zs(...e)
|
|
702
702
|
})), Tt = He({});
|
|
703
|
-
function
|
|
703
|
+
function Zs(r) {
|
|
704
704
|
const e = O(5), {
|
|
705
705
|
children: t,
|
|
706
|
-
values:
|
|
706
|
+
values: s
|
|
707
707
|
} = r;
|
|
708
|
-
let
|
|
709
|
-
e[0] !==
|
|
710
|
-
const [o] = ae(
|
|
708
|
+
let n;
|
|
709
|
+
e[0] !== s ? (n = Ks(s), e[0] = s, e[1] = n) : n = e[1];
|
|
710
|
+
const [o] = ae(n);
|
|
711
711
|
let i;
|
|
712
712
|
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(Tt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
713
713
|
}
|
|
@@ -720,15 +720,15 @@ function q(r) {
|
|
|
720
720
|
function yo(r) {
|
|
721
721
|
const e = O(9), {
|
|
722
722
|
children: t,
|
|
723
|
-
mapId:
|
|
723
|
+
mapId: s
|
|
724
724
|
} = r;
|
|
725
|
-
let
|
|
726
|
-
e[0] !==
|
|
725
|
+
let n;
|
|
726
|
+
e[0] !== s ? (n = (h) => h.maps[s], e[0] = s, e[1] = n) : n = e[1];
|
|
727
727
|
const {
|
|
728
728
|
basemap: o
|
|
729
|
-
} = q(
|
|
729
|
+
} = q(n), i = q(Qs);
|
|
730
730
|
let a;
|
|
731
|
-
e[2] !==
|
|
731
|
+
e[2] !== s || e[3] !== i ? (a = (h) => i(s, h), e[2] = s, e[3] = i, e[4] = a) : a = e[4];
|
|
732
732
|
const l = a;
|
|
733
733
|
let c;
|
|
734
734
|
return e[5] !== o || e[6] !== t || e[7] !== l ? (c = t({
|
|
@@ -736,7 +736,7 @@ function yo(r) {
|
|
|
736
736
|
setBasemap: l
|
|
737
737
|
}), e[5] = o, e[6] = t, e[7] = l, e[8] = c) : c = e[8], c;
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Qs(r) {
|
|
740
740
|
return r.setBasemap;
|
|
741
741
|
}
|
|
742
742
|
const te = {
|
|
@@ -747,7 +747,7 @@ const te = {
|
|
|
747
747
|
finish: "finish",
|
|
748
748
|
addPosition: "addPosition"
|
|
749
749
|
};
|
|
750
|
-
class
|
|
750
|
+
class Ws extends zt {
|
|
751
751
|
constructor() {
|
|
752
752
|
super([new Gt(), new Kt()]);
|
|
753
753
|
}
|
|
@@ -759,7 +759,7 @@ class Yn extends zt {
|
|
|
759
759
|
}));
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
const me = "lassoLayer", Ce = "maskLayer",
|
|
762
|
+
const me = "lassoLayer", Ce = "maskLayer", Ys = {
|
|
763
763
|
id: me,
|
|
764
764
|
billboard: !1,
|
|
765
765
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -792,14 +792,14 @@ const me = "lassoLayer", Ce = "maskLayer", Jn = {
|
|
|
792
792
|
labels: {
|
|
793
793
|
mask: "Mask"
|
|
794
794
|
}
|
|
795
|
-
},
|
|
795
|
+
}, Js = [new ss({
|
|
796
796
|
filterSize: 1
|
|
797
797
|
})], Te = {
|
|
798
798
|
id: Ce,
|
|
799
799
|
operation: "mask",
|
|
800
800
|
pickable: !1,
|
|
801
801
|
visible: !0,
|
|
802
|
-
extensions:
|
|
802
|
+
extensions: Js,
|
|
803
803
|
filterRange: [1, 1]
|
|
804
804
|
}, Ue = {
|
|
805
805
|
polygon: {
|
|
@@ -820,21 +820,21 @@ const me = "lassoLayer", Ce = "maskLayer", Jn = {
|
|
|
820
820
|
},
|
|
821
821
|
edit: {
|
|
822
822
|
value: "edit",
|
|
823
|
-
mode:
|
|
823
|
+
mode: Ws
|
|
824
824
|
}
|
|
825
825
|
}, be = ht((r) => ({
|
|
826
826
|
layers: {},
|
|
827
|
-
setLayer: (e, t) => r((
|
|
828
|
-
const
|
|
829
|
-
...
|
|
830
|
-
}, o =
|
|
827
|
+
setLayer: (e, t) => r((s) => {
|
|
828
|
+
const n = {
|
|
829
|
+
...s.layers
|
|
830
|
+
}, o = n[e] ?? {
|
|
831
831
|
type: null,
|
|
832
832
|
props: {}
|
|
833
833
|
}, i = [...o.props.extensions ?? [], ...t.props?.extensions ?? []].reduce((l, c) => (l.some((h) => h.equals(c)) || l.push(c), l), []), a = o.legend || t.legend ? {
|
|
834
834
|
...o.legend,
|
|
835
835
|
...t.legend
|
|
836
836
|
} : void 0;
|
|
837
|
-
return
|
|
837
|
+
return n[e] = {
|
|
838
838
|
...o,
|
|
839
839
|
...t,
|
|
840
840
|
props: {
|
|
@@ -849,24 +849,24 @@ const me = "lassoLayer", Ce = "maskLayer", Jn = {
|
|
|
849
849
|
},
|
|
850
850
|
legend: a
|
|
851
851
|
}, {
|
|
852
|
-
layers:
|
|
852
|
+
layers: n
|
|
853
853
|
};
|
|
854
854
|
}),
|
|
855
855
|
removeLayer: (e) => r((t) => {
|
|
856
|
-
const
|
|
856
|
+
const s = {
|
|
857
857
|
...t.layers
|
|
858
858
|
};
|
|
859
|
-
return delete
|
|
860
|
-
layers:
|
|
859
|
+
return delete s[e], {
|
|
860
|
+
layers: s
|
|
861
861
|
};
|
|
862
862
|
})
|
|
863
|
-
})),
|
|
863
|
+
})), st = ["click", "keyup", "panstart", "panmove", "panend", "pointermove"], Lt = {
|
|
864
864
|
multipan: [Ye, {
|
|
865
865
|
threshold: 10,
|
|
866
|
-
direction:
|
|
866
|
+
direction: rs.Vertical,
|
|
867
867
|
pointers: 2
|
|
868
868
|
}],
|
|
869
|
-
pinch: [
|
|
869
|
+
pinch: [is, {}, null, ["multipan"]],
|
|
870
870
|
click: [Je, {
|
|
871
871
|
event: "click"
|
|
872
872
|
}, null, ["dblclick"]],
|
|
@@ -881,90 +881,90 @@ const me = "lassoLayer", Ce = "maskLayer", Jn = {
|
|
|
881
881
|
function Pt(r) {
|
|
882
882
|
const e = O(12), {
|
|
883
883
|
mapId: t,
|
|
884
|
-
layerId:
|
|
884
|
+
layerId: s
|
|
885
885
|
} = r;
|
|
886
|
-
let
|
|
887
|
-
e[0] !== t ? (
|
|
888
|
-
const o = q(
|
|
886
|
+
let n;
|
|
887
|
+
e[0] !== t ? (n = (b) => b.maps[t]?.basemap, e[0] = t, e[1] = n) : n = e[1];
|
|
888
|
+
const o = q(n);
|
|
889
889
|
let i;
|
|
890
890
|
e[2] !== t ? (i = (b) => b.maps[t]?.isLoaded, e[2] = t, e[3] = i) : i = e[3];
|
|
891
|
-
const a = q(i), l = q(
|
|
891
|
+
const a = q(i), l = q(tn), c = be(en), {
|
|
892
892
|
type: h
|
|
893
893
|
} = Se[o], y = h === ie.googleMaps;
|
|
894
894
|
let v, p;
|
|
895
|
-
e[4] !== l || e[5] !== y || e[6] !== a || e[7] !==
|
|
895
|
+
e[4] !== l || e[5] !== y || e[6] !== a || e[7] !== s || e[8] !== t || e[9] !== c ? (v = () => {
|
|
896
896
|
let b = null;
|
|
897
897
|
if (y && a) {
|
|
898
898
|
const m = l(t);
|
|
899
|
-
b = new
|
|
900
|
-
recognizers: Object.keys(Lt).map(
|
|
899
|
+
b = new os(m.getDiv(), {
|
|
900
|
+
recognizers: Object.keys(Lt).map(Xs)
|
|
901
901
|
});
|
|
902
902
|
}
|
|
903
|
-
c(
|
|
903
|
+
c(s, {
|
|
904
904
|
props: {
|
|
905
905
|
eventManager: b
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
|
-
}, p = [l, y, a,
|
|
908
|
+
}, p = [l, y, a, s, t, c], e[4] = l, e[5] = y, e[6] = a, e[7] = s, e[8] = t, e[9] = c, e[10] = v, e[11] = p) : (v = e[10], p = e[11]), W(v, p);
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
const [e, t,
|
|
910
|
+
function Xs(r) {
|
|
911
|
+
const [e, t, s, n] = Lt[r], o = {
|
|
912
912
|
...t,
|
|
913
913
|
event: r
|
|
914
914
|
};
|
|
915
915
|
return {
|
|
916
916
|
recognizer: new e(o),
|
|
917
|
-
recognizeWith:
|
|
918
|
-
requestFailure:
|
|
917
|
+
recognizeWith: s,
|
|
918
|
+
requestFailure: n
|
|
919
919
|
};
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function en(r) {
|
|
922
922
|
return r.setLayer;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function tn(r) {
|
|
925
925
|
return r.getOverlayInstance;
|
|
926
926
|
}
|
|
927
927
|
class kt extends Yt {
|
|
928
928
|
updateState({
|
|
929
929
|
props: e,
|
|
930
930
|
oldProps: t,
|
|
931
|
-
context:
|
|
932
|
-
changeFlags:
|
|
931
|
+
context: s,
|
|
932
|
+
changeFlags: n
|
|
933
933
|
}) {
|
|
934
934
|
e.eventManager !== t.eventManager && (this._removeEventHandlers(e.eventManager), this._removeEventHandlers(t.eventManager), this._addEventHandlers()), super.updateState({
|
|
935
935
|
props: e,
|
|
936
936
|
oldProps: t,
|
|
937
|
-
context:
|
|
938
|
-
changeFlags:
|
|
937
|
+
context: s,
|
|
938
|
+
changeFlags: n
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
941
|
_addEventHandlers() {
|
|
942
942
|
const e = this._getEventManager(), {
|
|
943
943
|
eventHandler: t
|
|
944
944
|
} = this.state._editableLayerState;
|
|
945
|
-
for (const
|
|
946
|
-
e.on(
|
|
945
|
+
for (const s of st)
|
|
946
|
+
e.on(s, t, {
|
|
947
947
|
// give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
|
|
948
948
|
priority: 100
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
951
|
_removeEventHandlers(e) {
|
|
952
952
|
const t = e ?? this._getEventManager(), {
|
|
953
|
-
eventHandler:
|
|
953
|
+
eventHandler: s
|
|
954
954
|
} = this.state._editableLayerState;
|
|
955
|
-
for (const
|
|
956
|
-
t.off(
|
|
955
|
+
for (const n of st)
|
|
956
|
+
t.off(n, s);
|
|
957
957
|
}
|
|
958
958
|
_getEventManager() {
|
|
959
959
|
return this.props.eventManager ?? // @ts-expect-error accessing protected props
|
|
960
960
|
this.context.deck.eventManager;
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function sn({
|
|
964
964
|
mode: r,
|
|
965
965
|
...e
|
|
966
966
|
}) {
|
|
967
|
-
const t =
|
|
967
|
+
const t = nn(e);
|
|
968
968
|
return {
|
|
969
969
|
type: kt,
|
|
970
970
|
props: {
|
|
@@ -973,12 +973,12 @@ function ss({
|
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function nn({
|
|
977
977
|
layerProps: r,
|
|
978
978
|
onEdit: e,
|
|
979
979
|
getLineColor: t,
|
|
980
|
-
getFillColor:
|
|
981
|
-
pointColor:
|
|
980
|
+
getFillColor: s,
|
|
981
|
+
pointColor: n
|
|
982
982
|
}) {
|
|
983
983
|
const o = de(r, {
|
|
984
984
|
modeConfig: {
|
|
@@ -989,19 +989,19 @@ function rs({
|
|
|
989
989
|
preventOverlappingLines: !0
|
|
990
990
|
},
|
|
991
991
|
onEdit: e
|
|
992
|
-
}), i = de(
|
|
992
|
+
}), i = de(Ys, {
|
|
993
993
|
getTentativeLineColor: t,
|
|
994
|
-
getTentativeFillColor:
|
|
994
|
+
getTentativeFillColor: s,
|
|
995
995
|
getLineColor: t,
|
|
996
|
-
getFillColor:
|
|
997
|
-
getEditHandlePointColor:
|
|
998
|
-
getEditHandlePointOutlineColor:
|
|
996
|
+
getFillColor: s,
|
|
997
|
+
getEditHandlePointColor: n.fill,
|
|
998
|
+
getEditHandlePointOutlineColor: n.outline,
|
|
999
999
|
dataComparator: (l, c) => l.features[0] === c.features[0]
|
|
1000
1000
|
});
|
|
1001
1001
|
return de(i, o);
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1004
|
-
data: r.reduce((
|
|
1003
|
+
const rn = (r) => Ge()((e) => ({
|
|
1004
|
+
data: r.reduce((s, n) => {
|
|
1005
1005
|
const {
|
|
1006
1006
|
enabled: o = !1,
|
|
1007
1007
|
mapId: i,
|
|
@@ -1009,99 +1009,99 @@ const os = (r) => Ge()((e) => ({
|
|
|
1009
1009
|
modes: l = Ue,
|
|
1010
1010
|
modeSelected: c = Ue.polygon.value,
|
|
1011
1011
|
values: h = {}
|
|
1012
|
-
} =
|
|
1013
|
-
return
|
|
1012
|
+
} = n;
|
|
1013
|
+
return s[i] = {
|
|
1014
1014
|
enabled: o,
|
|
1015
1015
|
modeInstance: a,
|
|
1016
1016
|
modes: l,
|
|
1017
1017
|
modeSelected: c,
|
|
1018
1018
|
values: h
|
|
1019
|
-
},
|
|
1019
|
+
}, s;
|
|
1020
1020
|
}, {}),
|
|
1021
|
-
setEnabled: (
|
|
1021
|
+
setEnabled: (s, n) => {
|
|
1022
1022
|
e((o) => ({
|
|
1023
1023
|
data: {
|
|
1024
1024
|
...o.data,
|
|
1025
|
-
[
|
|
1026
|
-
...o.data[
|
|
1027
|
-
enabled:
|
|
1028
|
-
visible:
|
|
1025
|
+
[s]: {
|
|
1026
|
+
...o.data[s],
|
|
1027
|
+
enabled: n,
|
|
1028
|
+
visible: n
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
}));
|
|
1032
1032
|
},
|
|
1033
|
-
setValue: (
|
|
1033
|
+
setValue: (s, n, o) => {
|
|
1034
1034
|
e((i) => {
|
|
1035
1035
|
const a = {
|
|
1036
|
-
...i.data[
|
|
1037
|
-
}, l = a[
|
|
1036
|
+
...i.data[s].values
|
|
1037
|
+
}, l = a[n] ?? {
|
|
1038
1038
|
type: "mask"
|
|
1039
1039
|
};
|
|
1040
|
-
return a[
|
|
1040
|
+
return a[n] = {
|
|
1041
1041
|
...l,
|
|
1042
1042
|
...o,
|
|
1043
|
-
id:
|
|
1044
|
-
}, o || delete a[
|
|
1043
|
+
id: n
|
|
1044
|
+
}, o || delete a[n], {
|
|
1045
1045
|
data: {
|
|
1046
1046
|
...i.data,
|
|
1047
|
-
[
|
|
1048
|
-
...i.data[
|
|
1047
|
+
[s]: {
|
|
1048
|
+
...i.data[s],
|
|
1049
1049
|
values: a
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
};
|
|
1053
1053
|
});
|
|
1054
1054
|
},
|
|
1055
|
-
setVisibility: (
|
|
1055
|
+
setVisibility: (s, n, o) => {
|
|
1056
1056
|
e((i) => {
|
|
1057
1057
|
const a = {
|
|
1058
|
-
...i.data[
|
|
1059
|
-
}, l = a[
|
|
1058
|
+
...i.data[s].values
|
|
1059
|
+
}, l = a[n] ?? {};
|
|
1060
1060
|
return l.properties.visible = o, {
|
|
1061
1061
|
data: {
|
|
1062
1062
|
...i.data,
|
|
1063
|
-
[
|
|
1064
|
-
...i.data[
|
|
1063
|
+
[s]: {
|
|
1064
|
+
...i.data[s],
|
|
1065
1065
|
values: {
|
|
1066
1066
|
...a,
|
|
1067
|
-
[
|
|
1067
|
+
[n]: l
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
};
|
|
1072
1072
|
});
|
|
1073
1073
|
},
|
|
1074
|
-
setModeSelected: (
|
|
1074
|
+
setModeSelected: (s, n) => {
|
|
1075
1075
|
e((o) => ({
|
|
1076
1076
|
data: {
|
|
1077
1077
|
...o.data,
|
|
1078
|
-
[
|
|
1079
|
-
...o.data[
|
|
1080
|
-
modeSelected:
|
|
1078
|
+
[s]: {
|
|
1079
|
+
...o.data[s],
|
|
1080
|
+
modeSelected: n
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
}));
|
|
1084
1084
|
},
|
|
1085
|
-
setModeInstance: (
|
|
1085
|
+
setModeInstance: (s, n) => {
|
|
1086
1086
|
e((o) => ({
|
|
1087
1087
|
data: {
|
|
1088
1088
|
...o.data,
|
|
1089
|
-
[
|
|
1090
|
-
...o.data[
|
|
1091
|
-
modeInstance:
|
|
1089
|
+
[s]: {
|
|
1090
|
+
...o.data[s],
|
|
1091
|
+
modeInstance: n
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
}));
|
|
1095
1095
|
}
|
|
1096
1096
|
})), Ct = He({});
|
|
1097
|
-
function
|
|
1097
|
+
function on(r) {
|
|
1098
1098
|
const e = O(5), {
|
|
1099
1099
|
children: t,
|
|
1100
|
-
values:
|
|
1100
|
+
values: s
|
|
1101
1101
|
} = r;
|
|
1102
|
-
let
|
|
1103
|
-
e[0] !==
|
|
1104
|
-
const [o] = ae(
|
|
1102
|
+
let n;
|
|
1103
|
+
e[0] !== s ? (n = () => rn(s), e[0] = s, e[1] = n) : n = e[1];
|
|
1104
|
+
const [o] = ae(n);
|
|
1105
1105
|
let i;
|
|
1106
1106
|
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(Ct.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1107
1107
|
}
|
|
@@ -1111,11 +1111,11 @@ function Q(r) {
|
|
|
1111
1111
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
1112
1112
|
return Ke(e, r);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function an({
|
|
1115
1115
|
mapId: r,
|
|
1116
1116
|
children: e
|
|
1117
1117
|
}) {
|
|
1118
|
-
const t = Q((p) => p.data[r]?.enabled),
|
|
1118
|
+
const t = Q((p) => p.data[r]?.enabled), s = Q((p) => p.setEnabled), n = Q((p) => p.data[r]?.values), o = Q((p) => p.setValue), i = Q((p) => p.setVisibility), a = Q((p) => p.data[r]?.modeSelected), l = Q((p) => p.setModeSelected), c = Q((p) => p.data[r]?.modes), h = Q((p) => p.setModeInstance);
|
|
1119
1119
|
W(() => {
|
|
1120
1120
|
const p = c[a];
|
|
1121
1121
|
if (p && t) {
|
|
@@ -1129,16 +1129,17 @@ function as({
|
|
|
1129
1129
|
] = ye(() => {
|
|
1130
1130
|
const p = (w) => ({
|
|
1131
1131
|
id: w.id,
|
|
1132
|
+
...w.properties,
|
|
1132
1133
|
visible: w.properties.visible,
|
|
1133
|
-
label: w.properties
|
|
1134
|
+
label: w.properties.label
|
|
1134
1135
|
});
|
|
1135
1136
|
return [
|
|
1136
|
-
Object.values(
|
|
1137
|
+
Object.values(n).filter((w) => w.type === "mask").map(p)
|
|
1137
1138
|
// , draw
|
|
1138
1139
|
];
|
|
1139
|
-
}, [
|
|
1140
|
-
|
|
1141
|
-
}, [r,
|
|
1140
|
+
}, [n]), v = ee((p) => {
|
|
1141
|
+
s(r, !!p), l(r, p);
|
|
1142
|
+
}, [r, s, l]);
|
|
1142
1143
|
return e({
|
|
1143
1144
|
mapId: r,
|
|
1144
1145
|
enabled: t,
|
|
@@ -1149,7 +1150,7 @@ function as({
|
|
|
1149
1150
|
// draw,
|
|
1150
1151
|
},
|
|
1151
1152
|
setValue: ee((p, b) => o(r, p, b), [r, o]),
|
|
1152
|
-
setEnabled: ee((p) =>
|
|
1153
|
+
setEnabled: ee((p) => s(r, p), [r, s]),
|
|
1153
1154
|
setVisibility: ee((p, b) => i(r, p, b), [r, i]),
|
|
1154
1155
|
setModeSelected: v
|
|
1155
1156
|
});
|
|
@@ -1159,27 +1160,27 @@ function Ot({
|
|
|
1159
1160
|
}) {
|
|
1160
1161
|
return Object.values(r ?? {}).filter((e) => e.type === "mask");
|
|
1161
1162
|
}
|
|
1162
|
-
const
|
|
1163
|
-
length:
|
|
1164
|
-
}),
|
|
1165
|
-
area:
|
|
1163
|
+
const ln = _t({
|
|
1164
|
+
length: ds
|
|
1165
|
+
}), cn = _t({
|
|
1166
|
+
area: fs
|
|
1166
1167
|
});
|
|
1167
|
-
function
|
|
1168
|
+
function un(r) {
|
|
1168
1169
|
if (!(r in Pe)) {
|
|
1169
1170
|
const e = Object.keys(Pe);
|
|
1170
1171
|
throw new Error(`Unit "${r}" cannot be converted to area. Valid units are: ${e.join(", ")}`);
|
|
1171
1172
|
}
|
|
1172
1173
|
}
|
|
1173
|
-
function
|
|
1174
|
+
function nt(r, e, t) {
|
|
1174
1175
|
switch (t) {
|
|
1175
1176
|
case "length": {
|
|
1176
|
-
const
|
|
1177
|
-
return
|
|
1177
|
+
const s = it[H.meter], n = it[e];
|
|
1178
|
+
return ln(r).from(s).to(n);
|
|
1178
1179
|
}
|
|
1179
1180
|
case "area": {
|
|
1180
|
-
|
|
1181
|
-
const
|
|
1182
|
-
return
|
|
1181
|
+
un(e);
|
|
1182
|
+
const s = at[Pe[H.meter]], n = at[Pe[e]];
|
|
1183
|
+
return cn(r).from(s).to(n);
|
|
1183
1184
|
}
|
|
1184
1185
|
default:
|
|
1185
1186
|
throw new Error(`Invalid dimension: ${t}, valid dimensions are: length, area`);
|
|
@@ -1191,8 +1192,8 @@ function Oe({
|
|
|
1191
1192
|
unit: e,
|
|
1192
1193
|
locale: t,
|
|
1193
1194
|
options: {
|
|
1194
|
-
autoSplitNumber:
|
|
1195
|
-
customFormatter:
|
|
1195
|
+
autoSplitNumber: s,
|
|
1196
|
+
customFormatter: n,
|
|
1196
1197
|
...o
|
|
1197
1198
|
} = {
|
|
1198
1199
|
autoSplitNumber: rt
|
|
@@ -1202,11 +1203,11 @@ function Oe({
|
|
|
1202
1203
|
const a = e === Ie["m-km"], l = e === Ie["ft-mi"], c = a || l;
|
|
1203
1204
|
let h, y;
|
|
1204
1205
|
if (c) {
|
|
1205
|
-
const p = r < (
|
|
1206
|
+
const p = r < (s ?? rt);
|
|
1206
1207
|
let b = p ? H.meter : H.kilometer;
|
|
1207
|
-
h = p ? ve.meter : ve.kilometer, l && (h = p ? ve.feet : ve.mile, b = p ? H.feet : H.mile), y =
|
|
1208
|
+
h = p ? ve.meter : ve.kilometer, l && (h = p ? ve.feet : ve.mile, b = p ? H.feet : H.mile), y = nt(r, b, i);
|
|
1208
1209
|
} else
|
|
1209
|
-
h = ve[e], y =
|
|
1210
|
+
h = ve[e], y = nt(r, e, i);
|
|
1210
1211
|
let v = `${wt(y, t, {
|
|
1211
1212
|
style: "unit",
|
|
1212
1213
|
unit: h,
|
|
@@ -1216,7 +1217,7 @@ function Oe({
|
|
|
1216
1217
|
maximumFractionDigits: 2,
|
|
1217
1218
|
...o
|
|
1218
1219
|
})}`;
|
|
1219
|
-
return i === "area" && (v += "2"),
|
|
1220
|
+
return i === "area" && (v += "2"), n ? n(v) : v;
|
|
1220
1221
|
}
|
|
1221
1222
|
function ho(r, {
|
|
1222
1223
|
hasDoubleClickZoom: e
|
|
@@ -1231,15 +1232,15 @@ function ho(r, {
|
|
|
1231
1232
|
function Ft(r, e, t) {
|
|
1232
1233
|
if (r > 0) {
|
|
1233
1234
|
const {
|
|
1234
|
-
formatTooltip:
|
|
1235
|
-
turfOptions:
|
|
1235
|
+
formatTooltip: s,
|
|
1236
|
+
turfOptions: n
|
|
1236
1237
|
} = t ?? {
|
|
1237
1238
|
turfOptions: {
|
|
1238
1239
|
units: "kilometers"
|
|
1239
1240
|
}
|
|
1240
|
-
}, o =
|
|
1241
|
+
}, o = n?.units;
|
|
1241
1242
|
let i;
|
|
1242
|
-
|
|
1243
|
+
s ? i = s(r) : i = `${parseFloat(r.toString()).toFixed(2)} ${o}`;
|
|
1243
1244
|
const {
|
|
1244
1245
|
measurementCallback: a
|
|
1245
1246
|
} = t;
|
|
@@ -1250,7 +1251,7 @@ function Ft(r, e, t) {
|
|
|
1250
1251
|
}
|
|
1251
1252
|
return [];
|
|
1252
1253
|
}
|
|
1253
|
-
class
|
|
1254
|
+
class dn extends Jt {
|
|
1254
1255
|
_isMeasuringSessionFinished = !1;
|
|
1255
1256
|
area = 0;
|
|
1256
1257
|
tooltips = [];
|
|
@@ -1261,15 +1262,15 @@ class ds extends Jt {
|
|
|
1261
1262
|
handleClick(e, t) {
|
|
1262
1263
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1263
1264
|
const {
|
|
1264
|
-
picks:
|
|
1265
|
-
} = e,
|
|
1265
|
+
picks: s
|
|
1266
|
+
} = e, n = Xt(s), o = this.getClickSequence();
|
|
1266
1267
|
let i = !1;
|
|
1267
|
-
!
|
|
1268
|
+
!n && !this.allowOverlapping(t) && (this.addClickSequence(e), i = !0);
|
|
1268
1269
|
const a = this.getClickSequence(), l = [...a, a[0]];
|
|
1269
1270
|
this.area = Xe({
|
|
1270
1271
|
type: "Polygon",
|
|
1271
1272
|
coordinates: [l]
|
|
1272
|
-
}), this.isFinalizedEdition(o,
|
|
1273
|
+
}), this.isFinalizedEdition(o, n) ? this.finalizeEdition(t) : i && t.onEdit({
|
|
1273
1274
|
// data is the same
|
|
1274
1275
|
updatedData: t.data,
|
|
1275
1276
|
editType: "addTentativePosition",
|
|
@@ -1282,15 +1283,15 @@ class ds extends Jt {
|
|
|
1282
1283
|
e.key === "Enter" ? this.getClickSequence().length > 2 ? this.finalizeEdition(t) : this.resetEdition(t) : e.key === "Escape" && this.resetEdition(t);
|
|
1283
1284
|
}
|
|
1284
1285
|
updateTooltip(e, t) {
|
|
1285
|
-
const
|
|
1286
|
-
this.area = Xe(e), this.tooltips = Ft(this.area,
|
|
1286
|
+
const s = ls(e);
|
|
1287
|
+
this.area = Xe(e), this.tooltips = Ft(this.area, s.geometry.coordinates, t.modeConfig);
|
|
1287
1288
|
}
|
|
1288
1289
|
handlePointerMove(e, t) {
|
|
1289
1290
|
if (this._isMeasuringSessionFinished)
|
|
1290
1291
|
return;
|
|
1291
1292
|
super.handlePointerMove(e, t);
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1293
|
+
const s = this.getTentativeGuide(t);
|
|
1294
|
+
s && s.geometry.type === "Polygon" && this.updateTooltip(s, t);
|
|
1294
1295
|
}
|
|
1295
1296
|
resetClickSequence() {
|
|
1296
1297
|
super.resetClickSequence(), this.tooltips = [], this._isMeasuringSessionFinished = !1, this.area = 0;
|
|
@@ -1303,30 +1304,30 @@ class ds extends Jt {
|
|
|
1303
1304
|
}
|
|
1304
1305
|
isFinalizedEdition(e, t) {
|
|
1305
1306
|
const {
|
|
1306
|
-
positionIndexes:
|
|
1307
|
+
positionIndexes: s
|
|
1307
1308
|
} = t?.properties ?? {
|
|
1308
1309
|
positionIndexes: []
|
|
1309
1310
|
};
|
|
1310
|
-
return e.length > 2 && t !== void 0 && (
|
|
1311
|
+
return e.length > 2 && t !== void 0 && (s[0] === 0 || s[0] === e.length - 1);
|
|
1311
1312
|
}
|
|
1312
1313
|
allowOverlapping(e) {
|
|
1313
1314
|
let t = !1;
|
|
1314
|
-
const
|
|
1315
|
-
if (
|
|
1315
|
+
const s = this.getClickSequence();
|
|
1316
|
+
if (s.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1316
1317
|
e.modeConfig?.preventOverlappingLines) {
|
|
1317
|
-
const
|
|
1318
|
+
const n = {
|
|
1318
1319
|
type: "LineString",
|
|
1319
|
-
coordinates: [...
|
|
1320
|
+
coordinates: [...s, s[0]]
|
|
1320
1321
|
}, o = {
|
|
1321
1322
|
type: "LineString",
|
|
1322
|
-
coordinates: [...
|
|
1323
|
+
coordinates: [...s.slice(0, s.length - 1)]
|
|
1323
1324
|
};
|
|
1324
|
-
|
|
1325
|
+
cs(n, o).features.length > 0 && (t = !0);
|
|
1325
1326
|
}
|
|
1326
1327
|
return t;
|
|
1327
1328
|
}
|
|
1328
1329
|
finalizeEdition(e) {
|
|
1329
|
-
const t = this.getClickSequence(),
|
|
1330
|
+
const t = this.getClickSequence(), s = {
|
|
1330
1331
|
type: "Polygon",
|
|
1331
1332
|
coordinates: [[...t, t[0]]]
|
|
1332
1333
|
};
|
|
@@ -1334,17 +1335,17 @@ class ds extends Jt {
|
|
|
1334
1335
|
type: "FeatureCollection",
|
|
1335
1336
|
features: []
|
|
1336
1337
|
};
|
|
1337
|
-
const
|
|
1338
|
-
this._isMeasuringSessionFinished = !0,
|
|
1339
|
-
...
|
|
1338
|
+
const n = this.getAddFeatureOrBooleanPolygonAction(s, e);
|
|
1339
|
+
this._isMeasuringSessionFinished = !0, n && (this.resultPolygon = n.updatedData, e.onEdit({
|
|
1340
|
+
...n,
|
|
1340
1341
|
editType: te.addPosition,
|
|
1341
1342
|
editContext: {
|
|
1342
|
-
...
|
|
1343
|
+
...n.editContext,
|
|
1343
1344
|
distance: this.area,
|
|
1344
1345
|
positions: this.getClickSequence(),
|
|
1345
1346
|
finished: this._isMeasuringSessionFinished
|
|
1346
1347
|
}
|
|
1347
|
-
})), this.updateTooltip(
|
|
1348
|
+
})), this.updateTooltip(s, e);
|
|
1348
1349
|
}
|
|
1349
1350
|
resetEdition(e) {
|
|
1350
1351
|
this.resetClickSequence(), e.onEdit({
|
|
@@ -1357,19 +1358,19 @@ class ds extends Jt {
|
|
|
1357
1358
|
getTooltipText({
|
|
1358
1359
|
meters: e,
|
|
1359
1360
|
locale: t,
|
|
1360
|
-
unit:
|
|
1361
|
-
options:
|
|
1361
|
+
unit: s,
|
|
1362
|
+
options: n
|
|
1362
1363
|
}) {
|
|
1363
1364
|
return Oe({
|
|
1364
1365
|
meters: e,
|
|
1365
1366
|
locale: t,
|
|
1366
|
-
unit:
|
|
1367
|
-
options:
|
|
1367
|
+
unit: s,
|
|
1368
|
+
options: n,
|
|
1368
1369
|
dimension: "area"
|
|
1369
1370
|
});
|
|
1370
1371
|
}
|
|
1371
1372
|
}
|
|
1372
|
-
class
|
|
1373
|
+
class fn extends bt {
|
|
1373
1374
|
_isMeasuringSessionFinished = !1;
|
|
1374
1375
|
_currentArea = 0;
|
|
1375
1376
|
resultPolygon = {
|
|
@@ -1384,8 +1385,8 @@ class fs extends bt {
|
|
|
1384
1385
|
this._isMeasuringSessionFinished || (super.handlePointerMove(e, t), this.tooltips = Ft(this.areaCircle, this.position, t.modeConfig));
|
|
1385
1386
|
}
|
|
1386
1387
|
checkAndFinishPolygon(e) {
|
|
1387
|
-
const t = this.getClickSequence(),
|
|
1388
|
-
this.isFinalizedEdition(t,
|
|
1388
|
+
const t = this.getClickSequence(), s = this.getTentativeGuide(e);
|
|
1389
|
+
this.isFinalizedEdition(t, s) && this.finalizeEdition(e);
|
|
1389
1390
|
}
|
|
1390
1391
|
handleKeyUp(e, t) {
|
|
1391
1392
|
e.key === "Enter" ? this.finalizeEdition(t) : e.key === "Escape" && this.resetEdition(t);
|
|
@@ -1402,12 +1403,12 @@ class fs extends bt {
|
|
|
1402
1403
|
type: "FeatureCollection",
|
|
1403
1404
|
features: []
|
|
1404
1405
|
};
|
|
1405
|
-
const
|
|
1406
|
-
this._isMeasuringSessionFinished = !0, e.onUpdateCursor("cell"),
|
|
1407
|
-
...
|
|
1406
|
+
const s = this.getAddFeatureOrBooleanPolygonAction(t, e);
|
|
1407
|
+
this._isMeasuringSessionFinished = !0, e.onUpdateCursor("cell"), s && (this.resultPolygon = s.updatedData, e.onEdit({
|
|
1408
|
+
...s,
|
|
1408
1409
|
editType: te.addPosition,
|
|
1409
1410
|
editContext: {
|
|
1410
|
-
...
|
|
1411
|
+
...s.editContext,
|
|
1411
1412
|
distance: this._currentArea,
|
|
1412
1413
|
positions: this.getClickSequence(),
|
|
1413
1414
|
finished: this._isMeasuringSessionFinished
|
|
@@ -1431,19 +1432,19 @@ class fs extends bt {
|
|
|
1431
1432
|
getTooltipText({
|
|
1432
1433
|
meters: e,
|
|
1433
1434
|
locale: t,
|
|
1434
|
-
unit:
|
|
1435
|
-
options:
|
|
1435
|
+
unit: s,
|
|
1436
|
+
options: n
|
|
1436
1437
|
}) {
|
|
1437
1438
|
return Oe({
|
|
1438
1439
|
meters: e,
|
|
1439
1440
|
locale: t,
|
|
1440
|
-
unit:
|
|
1441
|
-
options:
|
|
1441
|
+
unit: s,
|
|
1442
|
+
options: n,
|
|
1442
1443
|
dimension: "area"
|
|
1443
1444
|
});
|
|
1444
1445
|
}
|
|
1445
1446
|
}
|
|
1446
|
-
class At extends
|
|
1447
|
+
class At extends es {
|
|
1447
1448
|
handleClick(e, t) {
|
|
1448
1449
|
super.handleClick(e, t), t.onEdit({
|
|
1449
1450
|
// data is the same
|
|
@@ -1460,10 +1461,10 @@ class At extends en {
|
|
|
1460
1461
|
if (this._isMeasuringSessionFinished) return;
|
|
1461
1462
|
e.stopPropagation();
|
|
1462
1463
|
const {
|
|
1463
|
-
key:
|
|
1464
|
-
} = e,
|
|
1464
|
+
key: s
|
|
1465
|
+
} = e, n = this.getClickSequence().length;
|
|
1465
1466
|
let o = te.finish;
|
|
1466
|
-
switch (
|
|
1467
|
+
switch (s) {
|
|
1467
1468
|
case "Escape":
|
|
1468
1469
|
t.onEdit({
|
|
1469
1470
|
updatedData: {
|
|
@@ -1475,7 +1476,7 @@ class At extends en {
|
|
|
1475
1476
|
});
|
|
1476
1477
|
break;
|
|
1477
1478
|
case "Enter":
|
|
1478
|
-
this._isMeasuringSessionFinished = !0,
|
|
1479
|
+
this._isMeasuringSessionFinished = !0, n === 1 && (this.resetClickSequence(), o = te.cancel), t.onUpdateCursor("cell"), t.onEdit({
|
|
1479
1480
|
updatedData: t.data,
|
|
1480
1481
|
editType: o,
|
|
1481
1482
|
editContext: {
|
|
@@ -1491,18 +1492,18 @@ class At extends en {
|
|
|
1491
1492
|
getTooltipText({
|
|
1492
1493
|
meters: e,
|
|
1493
1494
|
locale: t,
|
|
1494
|
-
unit:
|
|
1495
|
-
options:
|
|
1495
|
+
unit: s,
|
|
1496
|
+
options: n
|
|
1496
1497
|
}) {
|
|
1497
1498
|
return Oe({
|
|
1498
1499
|
meters: e,
|
|
1499
1500
|
locale: t,
|
|
1500
|
-
unit:
|
|
1501
|
-
options:
|
|
1501
|
+
unit: s,
|
|
1502
|
+
options: n
|
|
1502
1503
|
});
|
|
1503
1504
|
}
|
|
1504
1505
|
}
|
|
1505
|
-
const ce = "mapMeasureLayer",
|
|
1506
|
+
const ce = "mapMeasureLayer", pn = {
|
|
1506
1507
|
id: ce,
|
|
1507
1508
|
pickable: !1,
|
|
1508
1509
|
billboard: !1,
|
|
@@ -1556,7 +1557,7 @@ const ce = "mapMeasureLayer", ps = {
|
|
|
1556
1557
|
"m-km": "m-km",
|
|
1557
1558
|
"ft-mi": "ft-mi",
|
|
1558
1559
|
...H
|
|
1559
|
-
},
|
|
1560
|
+
}, mn = {
|
|
1560
1561
|
meters: "meters",
|
|
1561
1562
|
kilometer: "kilometers",
|
|
1562
1563
|
mile: "miles"
|
|
@@ -1623,38 +1624,38 @@ const ce = "mapMeasureLayer", ps = {
|
|
|
1623
1624
|
value: "feet",
|
|
1624
1625
|
system: "imperial"
|
|
1625
1626
|
}
|
|
1626
|
-
}, lt = [X["m-km"], X.kilometer, X.meter, X["ft-mi"], X.mile, X.feet],
|
|
1627
|
+
}, lt = [X["m-km"], X.kilometer, X.meter, X["ft-mi"], X.mile, X.feet], yn = [X["m-km"], X.kilometer, X.meter, X["ft-mi"], X.mile, X.feet], hn = {
|
|
1627
1628
|
distance: {
|
|
1628
1629
|
value: "distance",
|
|
1629
1630
|
mode: At
|
|
1630
1631
|
},
|
|
1631
1632
|
buffer: {
|
|
1632
1633
|
value: "buffer",
|
|
1633
|
-
mode:
|
|
1634
|
+
mode: fn
|
|
1634
1635
|
},
|
|
1635
1636
|
area: {
|
|
1636
1637
|
value: "area",
|
|
1637
|
-
mode:
|
|
1638
|
+
mode: dn
|
|
1638
1639
|
}
|
|
1639
|
-
},
|
|
1640
|
+
}, gn = {
|
|
1640
1641
|
distance: lt,
|
|
1641
1642
|
buffer: lt,
|
|
1642
|
-
area:
|
|
1643
|
-
},
|
|
1644
|
-
function
|
|
1643
|
+
area: yn
|
|
1644
|
+
}, bn = [me, Ce, ce];
|
|
1645
|
+
function vn({
|
|
1645
1646
|
children: r,
|
|
1646
1647
|
mapId: e,
|
|
1647
1648
|
defaultProps: {
|
|
1648
1649
|
styles: t = xe.styles,
|
|
1649
|
-
labels:
|
|
1650
|
+
labels: s
|
|
1650
1651
|
} = {
|
|
1651
1652
|
styles: xe.styles,
|
|
1652
1653
|
labels: xe.labels
|
|
1653
1654
|
},
|
|
1654
|
-
layerProps:
|
|
1655
|
+
layerProps: n = {},
|
|
1655
1656
|
defaultType: o = "mask"
|
|
1656
1657
|
}) {
|
|
1657
|
-
const i = Q((E) => E.data[e]?.enabled), a = ge(i), l = Q((E) => E.setEnabled), c = Q((E) => E.data[e]?.values), h = Q((E) => E.setValue), y = Q((E) => E.data[e]?.modeInstance), v = Q((E) => E.data[e]?.modeSelected), p = be((E) => E.setLayer), b = q((E) => E.addLayers), m = q((E) => E.removeLayers), w = q(vt((E) => E.maps[e]?.layers.filter((d) => !
|
|
1658
|
+
const i = Q((E) => E.data[e]?.enabled), a = ge(i), l = Q((E) => E.setEnabled), c = Q((E) => E.data[e]?.values), h = Q((E) => E.setValue), y = Q((E) => E.data[e]?.modeInstance), v = Q((E) => E.data[e]?.modeSelected), p = be((E) => E.setLayer), b = q((E) => E.addLayers), m = q((E) => E.removeLayers), w = q(vt((E) => E.maps[e]?.layers.filter((d) => !bn.includes(d)))), u = q((E) => E.getDeckInstance), f = ge({});
|
|
1658
1659
|
Pt({
|
|
1659
1660
|
mapId: e,
|
|
1660
1661
|
layerId: me
|
|
@@ -1694,7 +1695,7 @@ function vs({
|
|
|
1694
1695
|
return;
|
|
1695
1696
|
}
|
|
1696
1697
|
R(d), E !== te.updateTentativeFeature && E === te.addFeature && (v !== "edit" && (x.current = x.current + 1), d.features.forEach((g, L) => {
|
|
1697
|
-
g.properties.label ??= `${
|
|
1698
|
+
g.properties.label ??= `${s?.mask} ${x.current}`, g.properties.index = L, g.properties.visible = g.properties.visible ?? !0;
|
|
1698
1699
|
const C = g.id ?? crypto.randomUUID();
|
|
1699
1700
|
h(e, C, {
|
|
1700
1701
|
geometry: g.geometry,
|
|
@@ -1703,7 +1704,7 @@ function vs({
|
|
|
1703
1704
|
type: o
|
|
1704
1705
|
});
|
|
1705
1706
|
}), F());
|
|
1706
|
-
}, [o, F,
|
|
1707
|
+
}, [o, F, s?.mask, e, v, h]);
|
|
1707
1708
|
return W(() => {
|
|
1708
1709
|
const E = i, {
|
|
1709
1710
|
border: d,
|
|
@@ -1712,9 +1713,9 @@ function vs({
|
|
|
1712
1713
|
} = t.colors.editing, {
|
|
1713
1714
|
border: C,
|
|
1714
1715
|
fill: k
|
|
1715
|
-
} = t.colors.finished, T =
|
|
1716
|
+
} = t.colors.finished, T = sn({
|
|
1716
1717
|
layerProps: {
|
|
1717
|
-
...
|
|
1718
|
+
...n.mask,
|
|
1718
1719
|
pickable: E,
|
|
1719
1720
|
data: P,
|
|
1720
1721
|
selectedFeatureIndexes: V,
|
|
@@ -1733,10 +1734,10 @@ function vs({
|
|
|
1733
1734
|
outline: d
|
|
1734
1735
|
},
|
|
1735
1736
|
onEdit: j,
|
|
1736
|
-
mode: E ? y : new
|
|
1737
|
+
mode: E ? y : new ts()
|
|
1737
1738
|
});
|
|
1738
1739
|
p(me, T);
|
|
1739
|
-
}, [P, i,
|
|
1740
|
+
}, [P, i, n.mask, _, y, j, V, p, t.colors.editing, t.colors.finished]), W(() => {
|
|
1740
1741
|
const E = {
|
|
1741
1742
|
...Te,
|
|
1742
1743
|
data: M,
|
|
@@ -1746,7 +1747,7 @@ function vs({
|
|
|
1746
1747
|
}
|
|
1747
1748
|
};
|
|
1748
1749
|
return p(Te.id, {
|
|
1749
|
-
type:
|
|
1750
|
+
type: as,
|
|
1750
1751
|
props: E
|
|
1751
1752
|
}), b(e, [Te.id]), () => {
|
|
1752
1753
|
m(e, [Te.id]);
|
|
@@ -1760,19 +1761,19 @@ function vs({
|
|
|
1760
1761
|
p(E, {
|
|
1761
1762
|
props: {
|
|
1762
1763
|
pickable: g,
|
|
1763
|
-
extensions: [new
|
|
1764
|
+
extensions: [new ns()],
|
|
1764
1765
|
maskId: !i && _.length ? Ce : void 0
|
|
1765
1766
|
}
|
|
1766
1767
|
}), a.current = i;
|
|
1767
1768
|
});
|
|
1768
1769
|
}, [i, u, e, w, _.length, p]), r;
|
|
1769
1770
|
}
|
|
1770
|
-
|
|
1771
|
-
function
|
|
1771
|
+
vn.Controls = an;
|
|
1772
|
+
function Sn({
|
|
1772
1773
|
mode: r,
|
|
1773
1774
|
...e
|
|
1774
1775
|
}) {
|
|
1775
|
-
const t =
|
|
1776
|
+
const t = wn({
|
|
1776
1777
|
mode: r,
|
|
1777
1778
|
...e
|
|
1778
1779
|
});
|
|
@@ -1785,28 +1786,28 @@ function Ss({
|
|
|
1785
1786
|
}
|
|
1786
1787
|
};
|
|
1787
1788
|
}
|
|
1788
|
-
function
|
|
1789
|
+
function wn({
|
|
1789
1790
|
mode: r,
|
|
1790
1791
|
layerProps: e,
|
|
1791
1792
|
locale: t,
|
|
1792
|
-
enabled:
|
|
1793
|
-
unit:
|
|
1793
|
+
enabled: s,
|
|
1794
|
+
unit: n,
|
|
1794
1795
|
onEdit: o,
|
|
1795
1796
|
guideColor: i,
|
|
1796
1797
|
pointColor: a,
|
|
1797
1798
|
textOptions: l
|
|
1798
1799
|
}) {
|
|
1799
1800
|
const c = de(e, {
|
|
1800
|
-
visible:
|
|
1801
|
-
pickable:
|
|
1801
|
+
visible: s,
|
|
1802
|
+
pickable: s,
|
|
1802
1803
|
modeConfig: {
|
|
1803
1804
|
// We force distance due to conversion is addressed at feature getText level
|
|
1804
1805
|
formatTooltip: (v) => v,
|
|
1805
1806
|
turfOptions: {
|
|
1806
|
-
units:
|
|
1807
|
+
units: mn.meters
|
|
1807
1808
|
}
|
|
1808
1809
|
},
|
|
1809
|
-
...
|
|
1810
|
+
...s && {
|
|
1810
1811
|
onEdit: o
|
|
1811
1812
|
},
|
|
1812
1813
|
_subLayerProps: {
|
|
@@ -1821,15 +1822,15 @@ function ws({
|
|
|
1821
1822
|
getText: (v) => r?.getTooltipText?.({
|
|
1822
1823
|
meters: v.text,
|
|
1823
1824
|
locale: t,
|
|
1824
|
-
unit:
|
|
1825
|
+
unit: n,
|
|
1825
1826
|
options: l
|
|
1826
1827
|
}),
|
|
1827
1828
|
updateTriggers: {
|
|
1828
|
-
getText: [
|
|
1829
|
+
getText: [n, t, l]
|
|
1829
1830
|
}
|
|
1830
1831
|
}
|
|
1831
1832
|
}
|
|
1832
|
-
}), h = de(
|
|
1833
|
+
}), h = de(pn, {
|
|
1833
1834
|
_subLayerProps: {
|
|
1834
1835
|
guides: {
|
|
1835
1836
|
getLineColor: i,
|
|
@@ -1841,13 +1842,13 @@ function ws({
|
|
|
1841
1842
|
});
|
|
1842
1843
|
return de(h, c);
|
|
1843
1844
|
}
|
|
1844
|
-
const
|
|
1845
|
-
measurements: r.reduce((
|
|
1845
|
+
const _n = (r) => Ge()((e) => ({
|
|
1846
|
+
measurements: r.reduce((s, n) => {
|
|
1846
1847
|
const {
|
|
1847
1848
|
mapId: o,
|
|
1848
1849
|
modeSelected: i,
|
|
1849
|
-
modes: a =
|
|
1850
|
-
units: l =
|
|
1850
|
+
modes: a = hn,
|
|
1851
|
+
units: l = gn,
|
|
1851
1852
|
distance: c = 0,
|
|
1852
1853
|
finished: h = !1,
|
|
1853
1854
|
locale: y = "en",
|
|
@@ -1855,8 +1856,8 @@ const _s = (r) => Ge()((e) => ({
|
|
|
1855
1856
|
clearLayerOnStart: p = !1,
|
|
1856
1857
|
unit: b = Ie["m-km"],
|
|
1857
1858
|
enabled: m = !1
|
|
1858
|
-
} =
|
|
1859
|
-
return
|
|
1859
|
+
} = n;
|
|
1860
|
+
return s[o] = {
|
|
1860
1861
|
modes: a,
|
|
1861
1862
|
units: l,
|
|
1862
1863
|
modeSelected: i,
|
|
@@ -1867,106 +1868,106 @@ const _s = (r) => Ge()((e) => ({
|
|
|
1867
1868
|
unit: b,
|
|
1868
1869
|
clearLayerOnStart: p,
|
|
1869
1870
|
enabled: m
|
|
1870
|
-
},
|
|
1871
|
+
}, s;
|
|
1871
1872
|
}, {}),
|
|
1872
1873
|
mode: At,
|
|
1873
|
-
setModeInstance: (
|
|
1874
|
+
setModeInstance: (s, n) => {
|
|
1874
1875
|
e((o) => ({
|
|
1875
1876
|
measurements: {
|
|
1876
1877
|
...o.measurements,
|
|
1877
|
-
[
|
|
1878
|
-
...o.measurements[
|
|
1879
|
-
modeInstance:
|
|
1878
|
+
[s]: {
|
|
1879
|
+
...o.measurements[s],
|
|
1880
|
+
modeInstance: n
|
|
1880
1881
|
}
|
|
1881
1882
|
}
|
|
1882
1883
|
}));
|
|
1883
1884
|
},
|
|
1884
|
-
setModeSelected: (
|
|
1885
|
+
setModeSelected: (s, n) => {
|
|
1885
1886
|
e((o) => ({
|
|
1886
1887
|
measurements: {
|
|
1887
1888
|
...o.measurements,
|
|
1888
|
-
[
|
|
1889
|
-
...o.measurements[
|
|
1890
|
-
modeSelected:
|
|
1889
|
+
[s]: {
|
|
1890
|
+
...o.measurements[s],
|
|
1891
|
+
modeSelected: n
|
|
1891
1892
|
}
|
|
1892
1893
|
}
|
|
1893
1894
|
}));
|
|
1894
1895
|
},
|
|
1895
|
-
setFinished: (
|
|
1896
|
+
setFinished: (s, n) => {
|
|
1896
1897
|
e((o) => ({
|
|
1897
1898
|
measurements: {
|
|
1898
1899
|
...o.measurements,
|
|
1899
|
-
[
|
|
1900
|
-
...o.measurements[
|
|
1901
|
-
finished:
|
|
1900
|
+
[s]: {
|
|
1901
|
+
...o.measurements[s],
|
|
1902
|
+
finished: n
|
|
1902
1903
|
}
|
|
1903
1904
|
}
|
|
1904
1905
|
}));
|
|
1905
1906
|
},
|
|
1906
|
-
setDistance: (
|
|
1907
|
+
setDistance: (s, n) => {
|
|
1907
1908
|
e((o) => ({
|
|
1908
1909
|
measurements: {
|
|
1909
1910
|
...o.measurements,
|
|
1910
|
-
[
|
|
1911
|
-
...o.measurements[
|
|
1912
|
-
distance:
|
|
1911
|
+
[s]: {
|
|
1912
|
+
...o.measurements[s],
|
|
1913
|
+
distance: n
|
|
1913
1914
|
}
|
|
1914
1915
|
}
|
|
1915
1916
|
}));
|
|
1916
1917
|
},
|
|
1917
|
-
setUnit: (
|
|
1918
|
+
setUnit: (s, n) => {
|
|
1918
1919
|
e((o) => ({
|
|
1919
1920
|
measurements: {
|
|
1920
1921
|
...o.measurements,
|
|
1921
|
-
[
|
|
1922
|
-
...o.measurements[
|
|
1923
|
-
unit:
|
|
1922
|
+
[s]: {
|
|
1923
|
+
...o.measurements[s],
|
|
1924
|
+
unit: n
|
|
1924
1925
|
}
|
|
1925
1926
|
}
|
|
1926
1927
|
}));
|
|
1927
1928
|
},
|
|
1928
|
-
setLocale: (
|
|
1929
|
+
setLocale: (s, n) => {
|
|
1929
1930
|
e((o) => ({
|
|
1930
1931
|
measurements: {
|
|
1931
1932
|
...o.measurements,
|
|
1932
|
-
[
|
|
1933
|
-
...o.measurements[
|
|
1934
|
-
locale:
|
|
1933
|
+
[s]: {
|
|
1934
|
+
...o.measurements[s],
|
|
1935
|
+
locale: n
|
|
1935
1936
|
}
|
|
1936
1937
|
}
|
|
1937
1938
|
}));
|
|
1938
1939
|
},
|
|
1939
|
-
setPositions: (
|
|
1940
|
+
setPositions: (s, n) => {
|
|
1940
1941
|
e((o) => ({
|
|
1941
1942
|
measurements: {
|
|
1942
1943
|
...o.measurements,
|
|
1943
|
-
[
|
|
1944
|
-
...o.measurements[
|
|
1945
|
-
positions: [...
|
|
1944
|
+
[s]: {
|
|
1945
|
+
...o.measurements[s],
|
|
1946
|
+
positions: [...n]
|
|
1946
1947
|
}
|
|
1947
1948
|
}
|
|
1948
1949
|
}));
|
|
1949
1950
|
},
|
|
1950
|
-
setEnabled: (
|
|
1951
|
+
setEnabled: (s, n) => {
|
|
1951
1952
|
e((o) => ({
|
|
1952
1953
|
measurements: {
|
|
1953
1954
|
...o.measurements,
|
|
1954
|
-
[
|
|
1955
|
-
...o.measurements[
|
|
1956
|
-
enabled:
|
|
1955
|
+
[s]: {
|
|
1956
|
+
...o.measurements[s],
|
|
1957
|
+
enabled: n
|
|
1957
1958
|
}
|
|
1958
1959
|
}
|
|
1959
1960
|
}));
|
|
1960
1961
|
}
|
|
1961
1962
|
})), Rt = He({});
|
|
1962
|
-
function
|
|
1963
|
+
function Mn(r) {
|
|
1963
1964
|
const e = O(5), {
|
|
1964
1965
|
children: t,
|
|
1965
|
-
values:
|
|
1966
|
+
values: s
|
|
1966
1967
|
} = r;
|
|
1967
|
-
let
|
|
1968
|
-
e[0] !==
|
|
1969
|
-
const [o] = ae(
|
|
1968
|
+
let n;
|
|
1969
|
+
e[0] !== s ? (n = _n(s), e[0] = s, e[1] = n) : n = e[1];
|
|
1970
|
+
const [o] = ae(n);
|
|
1970
1971
|
let i;
|
|
1971
1972
|
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ Z(Rt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1972
1973
|
}
|
|
@@ -1980,15 +1981,15 @@ function Dt(r) {
|
|
|
1980
1981
|
const e = O(74), {
|
|
1981
1982
|
mapId: t
|
|
1982
1983
|
} = r;
|
|
1983
|
-
let
|
|
1984
|
-
e[0] !== t ? (
|
|
1985
|
-
const
|
|
1984
|
+
let s;
|
|
1985
|
+
e[0] !== t ? (s = (A) => A.measurements[t].modes, e[0] = t, e[1] = s) : s = e[1];
|
|
1986
|
+
const n = K(s);
|
|
1986
1987
|
let o;
|
|
1987
1988
|
e[2] !== t ? (o = (A) => A.measurements[t].units, e[2] = t, e[3] = o) : o = e[3];
|
|
1988
1989
|
const i = K(o);
|
|
1989
1990
|
let a;
|
|
1990
1991
|
e[4] !== t ? (a = (A) => A.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
1991
|
-
const l = K(a), c = K(
|
|
1992
|
+
const l = K(a), c = K(Fn);
|
|
1992
1993
|
let h;
|
|
1993
1994
|
e[6] !== c || e[7] !== t ? (h = (A) => c(t, A), e[6] = c, e[7] = t, e[8] = h) : h = e[8];
|
|
1994
1995
|
const y = h;
|
|
@@ -1997,13 +1998,13 @@ function Dt(r) {
|
|
|
1997
1998
|
const p = K(v);
|
|
1998
1999
|
let b;
|
|
1999
2000
|
e[11] !== t ? (b = (A) => A.measurements[t].enabled, e[11] = t, e[12] = b) : b = e[12];
|
|
2000
|
-
const m = K(b), w = K(
|
|
2001
|
+
const m = K(b), w = K(On);
|
|
2001
2002
|
let u;
|
|
2002
2003
|
e[13] !== w || e[14] !== t ? (u = (A) => w(t, A), e[13] = w, e[14] = t, e[15] = u) : u = e[15];
|
|
2003
2004
|
const f = u;
|
|
2004
2005
|
let S;
|
|
2005
2006
|
e[16] !== t ? (S = (A) => A.measurements[t].modeSelected, e[16] = t, e[17] = S) : S = e[17];
|
|
2006
|
-
const M = K(S), _ = K(
|
|
2007
|
+
const M = K(S), _ = K(Cn);
|
|
2007
2008
|
let P;
|
|
2008
2009
|
e[18] !== _ || e[19] !== t || e[20] !== f ? (P = (A) => {
|
|
2009
2010
|
f(!!A), _(t, A);
|
|
@@ -2011,38 +2012,38 @@ function Dt(r) {
|
|
|
2011
2012
|
const R = P;
|
|
2012
2013
|
let V;
|
|
2013
2014
|
e[22] !== t ? (V = (A) => A.measurements[t].finished, e[22] = t, e[23] = V) : V = e[23];
|
|
2014
|
-
const D = K(V), B = K(
|
|
2015
|
+
const D = K(V), B = K(kn);
|
|
2015
2016
|
let x;
|
|
2016
2017
|
e[24] !== B || e[25] !== t ? (x = (A) => B(t, A), e[24] = B, e[25] = t, e[26] = x) : x = e[26];
|
|
2017
2018
|
const F = x;
|
|
2018
2019
|
let j;
|
|
2019
2020
|
e[27] !== t ? (j = (A) => A.measurements[t].locale, e[27] = t, e[28] = j) : j = e[28];
|
|
2020
|
-
const E = K(j), d = K(
|
|
2021
|
+
const E = K(j), d = K(Pn);
|
|
2021
2022
|
let g;
|
|
2022
2023
|
e[29] !== d || e[30] !== t ? (g = (A) => d(t, A), e[29] = d, e[30] = t, e[31] = g) : g = e[31];
|
|
2023
2024
|
const L = g;
|
|
2024
2025
|
let C;
|
|
2025
2026
|
e[32] !== t ? (C = (A) => A.measurements[t].modeInstance, e[32] = t, e[33] = C) : C = e[33];
|
|
2026
|
-
const k = K(C), T = K(
|
|
2027
|
+
const k = K(C), T = K(Ln);
|
|
2027
2028
|
let U;
|
|
2028
2029
|
e[34] !== T || e[35] !== t ? (U = (A) => T(t, A), e[34] = T, e[35] = t, e[36] = U) : U = e[36];
|
|
2029
2030
|
const N = U;
|
|
2030
2031
|
let I;
|
|
2031
2032
|
e[37] !== t ? (I = (A) => A.measurements[t].positions, e[37] = t, e[38] = I) : I = e[38];
|
|
2032
|
-
const $ = K(I), z = K(
|
|
2033
|
+
const $ = K(I), z = K(Tn);
|
|
2033
2034
|
let G;
|
|
2034
2035
|
e[39] !== z || e[40] !== t ? (G = (A) => z(t, A), e[39] = z, e[40] = t, e[41] = G) : G = e[41];
|
|
2035
|
-
const
|
|
2036
|
+
const se = G;
|
|
2036
2037
|
let J;
|
|
2037
2038
|
e[42] !== t ? (J = (A) => A.measurements[t].unit, e[42] = t, e[43] = J) : J = e[43];
|
|
2038
|
-
const Y = K(J),
|
|
2039
|
+
const Y = K(J), ne = K(En);
|
|
2039
2040
|
let oe;
|
|
2040
|
-
e[44] !==
|
|
2041
|
+
e[44] !== ne || e[45] !== t ? (oe = (A) => ne(t, A), e[44] = ne, e[45] = t, e[46] = oe) : oe = e[46];
|
|
2041
2042
|
const Fe = oe;
|
|
2042
2043
|
let we;
|
|
2043
|
-
e[47] !== k || e[48] !==
|
|
2044
|
-
k?.resetClickSequence(),
|
|
2045
|
-
}, e[47] = k, e[48] =
|
|
2044
|
+
e[47] !== k || e[48] !== se ? (we = () => {
|
|
2045
|
+
k?.resetClickSequence(), se([]);
|
|
2046
|
+
}, e[47] = k, e[48] = se, e[49] = we) : we = e[49];
|
|
2046
2047
|
const Ae = we;
|
|
2047
2048
|
let _e;
|
|
2048
2049
|
e[50] !== f ? (_e = (A) => {
|
|
@@ -2050,8 +2051,8 @@ function Dt(r) {
|
|
|
2050
2051
|
}, e[50] = f, e[51] = _e) : _e = e[51];
|
|
2051
2052
|
const Re = _e;
|
|
2052
2053
|
let Me;
|
|
2053
|
-
return e[52] !== Ae || e[53] !== p || e[54] !== l || e[55] !== m || e[56] !== D || e[57] !== E || e[58] !== k || e[59] !== M || e[60] !==
|
|
2054
|
-
modes:
|
|
2054
|
+
return e[52] !== Ae || e[53] !== p || e[54] !== l || e[55] !== m || e[56] !== D || e[57] !== E || e[58] !== k || e[59] !== M || e[60] !== n || e[61] !== $ || e[62] !== y || e[63] !== f || e[64] !== F || e[65] !== L || e[66] !== N || e[67] !== R || e[68] !== se || e[69] !== Fe || e[70] !== Re || e[71] !== Y || e[72] !== i ? (Me = {
|
|
2055
|
+
modes: n,
|
|
2055
2056
|
units: i,
|
|
2056
2057
|
distance: l,
|
|
2057
2058
|
clearLayerOnStart: p,
|
|
@@ -2066,43 +2067,43 @@ function Dt(r) {
|
|
|
2066
2067
|
setModeSelected: R,
|
|
2067
2068
|
setFinished: F,
|
|
2068
2069
|
setLocale: L,
|
|
2069
|
-
setPositions:
|
|
2070
|
+
setPositions: se,
|
|
2070
2071
|
setUnit: Fe,
|
|
2071
2072
|
setEnabled: f,
|
|
2072
2073
|
toggleLayer: Re,
|
|
2073
2074
|
clearLayer: Ae,
|
|
2074
2075
|
setModeInstance: N
|
|
2075
|
-
}, e[52] = Ae, e[53] = p, e[54] = l, e[55] = m, e[56] = D, e[57] = E, e[58] = k, e[59] = M, e[60] =
|
|
2076
|
+
}, e[52] = Ae, e[53] = p, e[54] = l, e[55] = m, e[56] = D, e[57] = E, e[58] = k, e[59] = M, e[60] = n, e[61] = $, e[62] = y, e[63] = f, e[64] = F, e[65] = L, e[66] = N, e[67] = R, e[68] = se, e[69] = Fe, e[70] = Re, e[71] = Y, e[72] = i, e[73] = Me) : Me = e[73], Me;
|
|
2076
2077
|
}
|
|
2077
|
-
function
|
|
2078
|
+
function En(r) {
|
|
2078
2079
|
return r.setUnit;
|
|
2079
2080
|
}
|
|
2080
|
-
function
|
|
2081
|
+
function Tn(r) {
|
|
2081
2082
|
return r.setPositions;
|
|
2082
2083
|
}
|
|
2083
|
-
function
|
|
2084
|
+
function Ln(r) {
|
|
2084
2085
|
return r.setModeInstance;
|
|
2085
2086
|
}
|
|
2086
|
-
function
|
|
2087
|
+
function Pn(r) {
|
|
2087
2088
|
return r.setLocale;
|
|
2088
2089
|
}
|
|
2089
|
-
function
|
|
2090
|
+
function kn(r) {
|
|
2090
2091
|
return r.setFinished;
|
|
2091
2092
|
}
|
|
2092
|
-
function
|
|
2093
|
+
function Cn(r) {
|
|
2093
2094
|
return r.setModeSelected;
|
|
2094
2095
|
}
|
|
2095
|
-
function
|
|
2096
|
+
function On(r) {
|
|
2096
2097
|
return r.setEnabled;
|
|
2097
2098
|
}
|
|
2098
|
-
function
|
|
2099
|
+
function Fn(r) {
|
|
2099
2100
|
return r.setDistance;
|
|
2100
2101
|
}
|
|
2101
|
-
function
|
|
2102
|
+
function An(r) {
|
|
2102
2103
|
const e = O(42), {
|
|
2103
2104
|
mapId: t,
|
|
2104
|
-
textOptions:
|
|
2105
|
-
children:
|
|
2105
|
+
textOptions: s,
|
|
2106
|
+
children: n
|
|
2106
2107
|
} = r;
|
|
2107
2108
|
let o;
|
|
2108
2109
|
e[0] !== t ? (o = {
|
|
@@ -2149,7 +2150,7 @@ function As(r) {
|
|
|
2149
2150
|
}, e[13] = B, e[14] = D, e[15] = h, e[16] = m, e[17] = j) : j = e[17];
|
|
2150
2151
|
const E = j, d = !!h;
|
|
2151
2152
|
let g;
|
|
2152
|
-
return e[18] !==
|
|
2153
|
+
return e[18] !== n || e[19] !== D || e[20] !== l || e[21] !== p || e[22] !== m || e[23] !== u || e[24] !== t || e[25] !== S || e[26] !== y || e[27] !== i || e[28] !== _ || e[29] !== c || e[30] !== b || e[31] !== w || e[32] !== f || e[33] !== v || e[34] !== P || e[35] !== V || e[36] !== d || e[37] !== s || e[38] !== E || e[39] !== R || e[40] !== a ? (g = n({
|
|
2153
2154
|
mapId: t,
|
|
2154
2155
|
distance: l,
|
|
2155
2156
|
enabled: p,
|
|
@@ -2165,7 +2166,7 @@ function As(r) {
|
|
|
2165
2166
|
meters: l,
|
|
2166
2167
|
unit: R,
|
|
2167
2168
|
locale: u,
|
|
2168
|
-
options:
|
|
2169
|
+
options: s
|
|
2169
2170
|
}),
|
|
2170
2171
|
modeInstance: S,
|
|
2171
2172
|
setModeSelected: v,
|
|
@@ -2177,28 +2178,28 @@ function As(r) {
|
|
|
2177
2178
|
setEnabled: b,
|
|
2178
2179
|
toggleLayer: E,
|
|
2179
2180
|
clearLayer: D
|
|
2180
|
-
}), e[18] =
|
|
2181
|
+
}), e[18] = n, e[19] = D, e[20] = l, e[21] = p, e[22] = m, e[23] = u, e[24] = t, e[25] = S, e[26] = y, e[27] = i, e[28] = _, e[29] = c, e[30] = b, e[31] = w, e[32] = f, e[33] = v, e[34] = P, e[35] = V, e[36] = d, e[37] = s, e[38] = E, e[39] = R, e[40] = a, e[41] = g) : g = e[41], g;
|
|
2181
2182
|
}
|
|
2182
|
-
const
|
|
2183
|
-
function
|
|
2183
|
+
const Rn = [ce];
|
|
2184
|
+
function Dn(r) {
|
|
2184
2185
|
const e = O(50), {
|
|
2185
2186
|
children: t,
|
|
2186
|
-
mapId:
|
|
2187
|
-
defaultProps:
|
|
2187
|
+
mapId: s,
|
|
2188
|
+
defaultProps: n,
|
|
2188
2189
|
layerProps: o,
|
|
2189
2190
|
textOptions: i
|
|
2190
2191
|
} = r;
|
|
2191
2192
|
let a;
|
|
2192
|
-
e[0] !==
|
|
2193
|
+
e[0] !== n ? (a = n === void 0 ? {
|
|
2193
2194
|
styles: ot.styles
|
|
2194
|
-
} :
|
|
2195
|
+
} : n, e[0] = n, e[1] = a) : a = e[1];
|
|
2195
2196
|
const {
|
|
2196
2197
|
styles: l
|
|
2197
2198
|
} = a, c = l === void 0 ? ot.styles : l;
|
|
2198
2199
|
let h;
|
|
2199
|
-
e[2] !==
|
|
2200
|
-
mapId:
|
|
2201
|
-
}, e[2] =
|
|
2200
|
+
e[2] !== s ? (h = {
|
|
2201
|
+
mapId: s
|
|
2202
|
+
}, e[2] = s, e[3] = h) : h = e[3];
|
|
2202
2203
|
const {
|
|
2203
2204
|
setDistance: y,
|
|
2204
2205
|
clearLayerOnStart: v,
|
|
@@ -2209,33 +2210,33 @@ function Ds(r) {
|
|
|
2209
2210
|
setPositions: u,
|
|
2210
2211
|
unit: f,
|
|
2211
2212
|
modeInstance: S
|
|
2212
|
-
} = Dt(h), M = ge(p), _ = be(
|
|
2213
|
+
} = Dt(h), M = ge(p), _ = be(Bn), P = q(Vn), R = q(Un), V = q(xn);
|
|
2213
2214
|
let D;
|
|
2214
|
-
e[4] !==
|
|
2215
|
-
const B = q(vt(D)), x = q($
|
|
2215
|
+
e[4] !== s ? (D = (I) => I.maps[s]?.layers.filter(qn), e[4] = s, e[5] = D) : D = e[5];
|
|
2216
|
+
const B = q(vt(D)), x = q($n);
|
|
2216
2217
|
let F;
|
|
2217
2218
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (F = {}, e[6] = F) : F = e[6];
|
|
2218
2219
|
const j = ge(F);
|
|
2219
2220
|
let E;
|
|
2220
|
-
e[7] !==
|
|
2221
|
-
mapId:
|
|
2221
|
+
e[7] !== s ? (E = {
|
|
2222
|
+
mapId: s,
|
|
2222
2223
|
layerId: ce
|
|
2223
|
-
}, e[7] =
|
|
2224
|
+
}, e[7] = s, e[8] = E) : E = e[8], Pt(E);
|
|
2224
2225
|
let d;
|
|
2225
|
-
e[9] !== R || e[10] !== p || e[11] !== x || e[12] !==
|
|
2226
|
-
const I = x(
|
|
2227
|
-
return p && (R(
|
|
2226
|
+
e[9] !== R || e[10] !== p || e[11] !== x || e[12] !== s || e[13] !== V || e[14] !== P ? (d = () => {
|
|
2227
|
+
const I = x(s)?.props.controller;
|
|
2228
|
+
return p && (R(s, [ce]), P(s, {
|
|
2228
2229
|
doubleClickZoom: !1
|
|
2229
2230
|
})), () => {
|
|
2230
|
-
V(
|
|
2231
|
+
V(s, [ce]), P(s, I);
|
|
2231
2232
|
};
|
|
2232
|
-
}, e[9] = R, e[10] = p, e[11] = x, e[12] =
|
|
2233
|
+
}, e[9] = R, e[10] = p, e[11] = x, e[12] = s, e[13] = V, e[14] = P, e[15] = d) : d = e[15];
|
|
2233
2234
|
let g;
|
|
2234
|
-
e[16] !== R || e[17] !== v || e[18] !== p || e[19] !== x || e[20] !==
|
|
2235
|
+
e[16] !== R || e[17] !== v || e[18] !== p || e[19] !== x || e[20] !== s || e[21] !== V || e[22] !== P ? (g = [R, v, s, V, p, x, P], e[16] = R, e[17] = v, e[18] = p, e[19] = x, e[20] = s, e[21] = V, e[22] = P, e[23] = g) : g = e[23], W(d, g);
|
|
2235
2236
|
let L, C;
|
|
2236
|
-
e[24] !== p || e[25] !== x || e[26] !==
|
|
2237
|
+
e[24] !== p || e[25] !== x || e[26] !== s || e[27] !== B || e[28] !== _ ? (L = () => {
|
|
2237
2238
|
p === M.current && !M.current || B?.forEach((I) => {
|
|
2238
|
-
const $ = x(
|
|
2239
|
+
const $ = x(s)?.props.layers.find((G) => G.props.id === I);
|
|
2239
2240
|
if (!$)
|
|
2240
2241
|
return;
|
|
2241
2242
|
p && (j.current[I] = $?.props.pickable);
|
|
@@ -2246,7 +2247,7 @@ function Ds(r) {
|
|
|
2246
2247
|
}
|
|
2247
2248
|
}), M.current = p;
|
|
2248
2249
|
});
|
|
2249
|
-
}, C = [p, x,
|
|
2250
|
+
}, C = [p, x, s, B, _], e[24] = p, e[25] = x, e[26] = s, e[27] = B, e[28] = _, e[29] = L, e[30] = C) : (L = e[29], C = e[30]), W(L, C);
|
|
2250
2251
|
let k;
|
|
2251
2252
|
e[31] !== S || e[32] !== y || e[33] !== m || e[34] !== u ? (k = (I) => {
|
|
2252
2253
|
const {
|
|
@@ -2264,7 +2265,7 @@ function Ds(r) {
|
|
|
2264
2265
|
const T = k;
|
|
2265
2266
|
let U, N;
|
|
2266
2267
|
return e[36] !== p || e[37] !== b || e[38] !== o || e[39] !== w || e[40] !== S || e[41] !== T || e[42] !== _ || e[43] !== c.colors.editing || e[44] !== c.colors.finished || e[45] !== c.colors.point || e[46] !== i || e[47] !== f ? (U = () => {
|
|
2267
|
-
const I = b ? c.colors.finished : c.colors.editing, $ = b ? c.colors.finished : c.colors.point, z =
|
|
2268
|
+
const I = b ? c.colors.finished : c.colors.editing, $ = b ? c.colors.finished : c.colors.point, z = Sn({
|
|
2268
2269
|
layerProps: {
|
|
2269
2270
|
...o,
|
|
2270
2271
|
pickable: o?.pickable ?? !b
|
|
@@ -2281,63 +2282,63 @@ function Ds(r) {
|
|
|
2281
2282
|
_(ce, z);
|
|
2282
2283
|
}, N = [b, S, o, w, T, _, c.colors.editing, c.colors.finished, c.colors.point, i, f, p], e[36] = p, e[37] = b, e[38] = o, e[39] = w, e[40] = S, e[41] = T, e[42] = _, e[43] = c.colors.editing, e[44] = c.colors.finished, e[45] = c.colors.point, e[46] = i, e[47] = f, e[48] = U, e[49] = N) : (U = e[48], N = e[49]), W(U, N), t;
|
|
2283
2284
|
}
|
|
2284
|
-
function $
|
|
2285
|
+
function $n(r) {
|
|
2285
2286
|
return r.getDeckInstance;
|
|
2286
2287
|
}
|
|
2287
|
-
function
|
|
2288
|
-
return !
|
|
2288
|
+
function qn(r) {
|
|
2289
|
+
return !Rn.includes(r);
|
|
2289
2290
|
}
|
|
2290
|
-
function
|
|
2291
|
+
function xn(r) {
|
|
2291
2292
|
return r.removeLayers;
|
|
2292
2293
|
}
|
|
2293
|
-
function
|
|
2294
|
+
function Un(r) {
|
|
2294
2295
|
return r.addLayers;
|
|
2295
2296
|
}
|
|
2296
|
-
function
|
|
2297
|
+
function Vn(r) {
|
|
2297
2298
|
return r.setController;
|
|
2298
2299
|
}
|
|
2299
|
-
function
|
|
2300
|
+
function Bn(r) {
|
|
2300
2301
|
return r.setLayer;
|
|
2301
2302
|
}
|
|
2302
|
-
|
|
2303
|
-
function
|
|
2303
|
+
Dn.Controls = An;
|
|
2304
|
+
function jn(r) {
|
|
2304
2305
|
const e = O(7), {
|
|
2305
2306
|
mapId: t
|
|
2306
2307
|
} = r;
|
|
2307
|
-
let
|
|
2308
|
-
e[0] !== t ? (
|
|
2308
|
+
let s;
|
|
2309
|
+
e[0] !== t ? (s = (l) => l.maps[t], e[0] = t, e[1] = s) : s = e[1];
|
|
2309
2310
|
const {
|
|
2310
|
-
layers:
|
|
2311
|
-
} = q(
|
|
2311
|
+
layers: n
|
|
2312
|
+
} = q(s), o = be(Nn);
|
|
2312
2313
|
let i;
|
|
2313
|
-
if (e[2] !== o || e[3] !==
|
|
2314
|
+
if (e[2] !== o || e[3] !== n) {
|
|
2314
2315
|
let l;
|
|
2315
|
-
e[5] !== o ? (l = (c) => o[c], e[5] = o, e[6] = l) : l = e[6], i =
|
|
2316
|
+
e[5] !== o ? (l = (c) => o[c], e[5] = o, e[6] = l) : l = e[6], i = n.map(l).filter(In), e[2] = o, e[3] = n, e[4] = i;
|
|
2316
2317
|
} else
|
|
2317
2318
|
i = e[4];
|
|
2318
2319
|
return i;
|
|
2319
2320
|
}
|
|
2320
|
-
function
|
|
2321
|
+
function In(r) {
|
|
2321
2322
|
return !!r;
|
|
2322
2323
|
}
|
|
2323
|
-
function
|
|
2324
|
+
function Nn(r) {
|
|
2324
2325
|
return r.layers;
|
|
2325
2326
|
}
|
|
2326
2327
|
const ct = [Ce, me, ce];
|
|
2327
2328
|
function $t(r) {
|
|
2328
|
-
const e = r.filter((
|
|
2329
|
+
const e = r.filter((s) => !ct.includes(s.props.id)).sort((s, n) => (s.order ?? 1 / 0) - (n.order ?? 1 / 0)), t = ct.map((s) => r.find((n) => n.props.id === s)).filter((s) => !!s);
|
|
2329
2330
|
return [...e, ...t];
|
|
2330
2331
|
}
|
|
2331
|
-
const
|
|
2332
|
+
const Hn = 200;
|
|
2332
2333
|
function go(r) {
|
|
2333
2334
|
const e = O(51);
|
|
2334
|
-
let t,
|
|
2335
|
+
let t, s, n, o;
|
|
2335
2336
|
e[0] !== r ? ({
|
|
2336
2337
|
id: t,
|
|
2337
|
-
onLoad:
|
|
2338
|
-
onViewStateChange:
|
|
2338
|
+
onLoad: s,
|
|
2339
|
+
onViewStateChange: n,
|
|
2339
2340
|
...o
|
|
2340
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
2341
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = n, e[4] = o) : (t = e[1], s = e[2], n = e[3], o = e[4]);
|
|
2341
2342
|
let i;
|
|
2342
2343
|
e[5] !== t ? (i = (T) => T.maps[t].basemap, e[5] = t, e[6] = i) : i = e[6];
|
|
2343
2344
|
const a = q(i);
|
|
@@ -2352,35 +2353,35 @@ function go(r) {
|
|
|
2352
2353
|
const b = q(p);
|
|
2353
2354
|
let m;
|
|
2354
2355
|
e[13] !== t ? (m = (T) => T.maps[t].controller, e[13] = t, e[14] = m) : m = e[14];
|
|
2355
|
-
const w = q(m), u = q(
|
|
2356
|
+
const w = q(m), u = q(Wn), f = q(Qn), S = q(Zn), M = q(Kn), _ = q(Gn);
|
|
2356
2357
|
let P;
|
|
2357
2358
|
e[15] !== t ? (P = {
|
|
2358
2359
|
mapId: t
|
|
2359
2360
|
}, e[15] = t, e[16] = P) : P = e[16];
|
|
2360
|
-
const R =
|
|
2361
|
+
const R = jn(P);
|
|
2361
2362
|
let V;
|
|
2362
2363
|
e[17] !== R ? (V = $t(R), e[17] = R, e[18] = V) : V = e[18];
|
|
2363
2364
|
const D = V;
|
|
2364
2365
|
let B;
|
|
2365
|
-
e[19] !== t || e[20] !==
|
|
2366
|
+
e[19] !== t || e[20] !== n || e[21] !== f || e[22] !== _ ? (B = (T) => {
|
|
2366
2367
|
const U = f;
|
|
2367
2368
|
if (v.current && clearInterval(v.current), v.current = setTimeout(() => {
|
|
2368
2369
|
_(t);
|
|
2369
|
-
},
|
|
2370
|
-
|
|
2370
|
+
}, Hn), n) {
|
|
2371
|
+
n(T, U);
|
|
2371
2372
|
return;
|
|
2372
2373
|
}
|
|
2373
2374
|
U(t, T.viewState);
|
|
2374
|
-
}, e[19] = t, e[20] =
|
|
2375
|
+
}, e[19] = t, e[20] = n, e[21] = f, e[22] = _, e[23] = B) : B = e[23];
|
|
2375
2376
|
const x = B;
|
|
2376
2377
|
let F;
|
|
2377
|
-
e[24] !== t || e[25] !==
|
|
2378
|
-
S(t, T),
|
|
2379
|
-
}, e[24] = t, e[25] =
|
|
2378
|
+
e[24] !== t || e[25] !== s || e[26] !== S || e[27] !== _ ? (F = (T) => {
|
|
2379
|
+
S(t, T), s?.(T), _(t);
|
|
2380
|
+
}, e[24] = t, e[25] = s, e[26] = S, e[27] = _, e[28] = F) : F = e[28];
|
|
2380
2381
|
const j = F;
|
|
2381
2382
|
let E;
|
|
2382
2383
|
e[29] !== u || e[30] !== t || e[31] !== o || e[32] !== M ? (E = (T) => {
|
|
2383
|
-
const N = !!u(t)?.props.layers?.every(
|
|
2384
|
+
const N = !!u(t)?.props.layers?.every(zn);
|
|
2384
2385
|
M(t, N), o.onAfterRender?.(T);
|
|
2385
2386
|
}, e[29] = u, e[30] = t, e[31] = o, e[32] = M, e[33] = E) : E = e[33];
|
|
2386
2387
|
const d = E, g = o.onDragEnd;
|
|
@@ -2391,30 +2392,30 @@ function go(r) {
|
|
|
2391
2392
|
}, e[34] = g, e[35] = t, e[36] = _, e[37] = L) : L = e[37];
|
|
2392
2393
|
const C = L;
|
|
2393
2394
|
let k;
|
|
2394
|
-
return e[38] !== a || e[39] !== D || e[40] !== w || e[41] !== d || e[42] !== C || e[43] !== j || e[44] !== x || e[45] !== t || e[46] !== c || e[47] !== y || e[48] !== o || e[49] !== b ? (k = /* @__PURE__ */ Z(
|
|
2395
|
+
return e[38] !== a || e[39] !== D || e[40] !== w || e[41] !== d || e[42] !== C || e[43] !== j || e[44] !== x || e[45] !== t || e[46] !== c || e[47] !== y || e[48] !== o || e[49] !== b ? (k = /* @__PURE__ */ Z(qs, { ...o, controller: w, id: t, layers: D, instanceRef: c, overlayRef: y, basemap: a, initialViewState: b, onLoad: j, onViewStateChange: x, onAfterRender: d, onDragEnd: C }), e[38] = a, e[39] = D, e[40] = w, e[41] = d, e[42] = C, e[43] = j, e[44] = x, e[45] = t, e[46] = c, e[47] = y, e[48] = o, e[49] = b, e[50] = k) : k = e[50], k;
|
|
2395
2396
|
}
|
|
2396
|
-
function
|
|
2397
|
+
function zn(r) {
|
|
2397
2398
|
return r?.isLoaded;
|
|
2398
2399
|
}
|
|
2399
|
-
function
|
|
2400
|
+
function Gn(r) {
|
|
2400
2401
|
return r.updateViewPort;
|
|
2401
2402
|
}
|
|
2402
|
-
function
|
|
2403
|
+
function Kn(r) {
|
|
2403
2404
|
return r.setLayersLoad;
|
|
2404
2405
|
}
|
|
2405
|
-
function
|
|
2406
|
+
function Zn(r) {
|
|
2406
2407
|
return r.setLoad;
|
|
2407
2408
|
}
|
|
2408
|
-
function
|
|
2409
|
+
function Qn(r) {
|
|
2409
2410
|
return r.setViewState;
|
|
2410
2411
|
}
|
|
2411
|
-
function
|
|
2412
|
+
function Wn(r) {
|
|
2412
2413
|
return r.getDeckInstance;
|
|
2413
2414
|
}
|
|
2414
2415
|
var Le = { exports: {} }, ut;
|
|
2415
|
-
function
|
|
2416
|
+
function Yn() {
|
|
2416
2417
|
return ut || (ut = 1, (function(r, e) {
|
|
2417
|
-
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ee < "u" && Ee,
|
|
2418
|
+
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ee < "u" && Ee, s = (function() {
|
|
2418
2419
|
function o() {
|
|
2419
2420
|
this.fetch = !1, this.DOMException = t.DOMException;
|
|
2420
2421
|
}
|
|
@@ -2747,28 +2748,28 @@ function Ys() {
|
|
|
2747
2748
|
}
|
|
2748
2749
|
return E.polyfill = !0, a.fetch || (a.fetch = E, a.Headers = m, a.Request = D, a.Response = F), i.Headers = m, i.Request = D, i.Response = F, i.fetch = E, i;
|
|
2749
2750
|
})({});
|
|
2750
|
-
})(
|
|
2751
|
-
var
|
|
2752
|
-
e =
|
|
2751
|
+
})(s), s.fetch.ponyfill = !0, delete s.fetch.polyfill;
|
|
2752
|
+
var n = t.fetch ? t : s;
|
|
2753
|
+
e = n.fetch, e.default = n.fetch, e.fetch = n.fetch, e.Headers = n.Headers, e.Request = n.Request, e.Response = n.Response, r.exports = e;
|
|
2753
2754
|
})(Le, Le.exports)), Le.exports;
|
|
2754
2755
|
}
|
|
2755
|
-
var
|
|
2756
|
-
const
|
|
2756
|
+
var Jn = Yn();
|
|
2757
|
+
const Xn = /* @__PURE__ */ Et(Jn), Ze = "https://gcp-us-east1.api.carto.com", Qe = "v3", er = "ps", he = {
|
|
2757
2758
|
get: "GET",
|
|
2758
2759
|
post: "POST"
|
|
2759
2760
|
};
|
|
2760
2761
|
function tr(r, e) {
|
|
2761
2762
|
return Array.isArray(e) ? `${r}=${encodeURIComponent(JSON.stringify(e))}` : e == null || e === "" ? "" : typeof e == "object" ? `${r}=${encodeURIComponent(JSON.stringify(e))}` : `${r}=${encodeURIComponent(e)}`;
|
|
2762
2763
|
}
|
|
2763
|
-
function
|
|
2764
|
+
function sr({
|
|
2764
2765
|
params: r,
|
|
2765
2766
|
url: e
|
|
2766
2767
|
}) {
|
|
2767
2768
|
if (!r) return e;
|
|
2768
|
-
const t = Object.entries(r).map(([
|
|
2769
|
+
const t = Object.entries(r).map(([s, n]) => tr(s, n));
|
|
2769
2770
|
return `${e}?${t.filter(Boolean).join("&")}`;
|
|
2770
2771
|
}
|
|
2771
|
-
function
|
|
2772
|
+
function nr(r) {
|
|
2772
2773
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
2773
2774
|
}
|
|
2774
2775
|
var Be, dt;
|
|
@@ -2785,9 +2786,9 @@ function rr() {
|
|
|
2785
2786
|
var f = Object.prototype.toString.call(u);
|
|
2786
2787
|
return f === "[object RegExp]" || f === "[object Date]" || o(u);
|
|
2787
2788
|
}
|
|
2788
|
-
var
|
|
2789
|
+
var s = typeof Symbol == "function" && Symbol.for, n = s ? Symbol.for("react.element") : 60103;
|
|
2789
2790
|
function o(u) {
|
|
2790
|
-
return u.$$typeof ===
|
|
2791
|
+
return u.$$typeof === n;
|
|
2791
2792
|
}
|
|
2792
2793
|
function i(u) {
|
|
2793
2794
|
return Array.isArray(u) ? [] : {};
|
|
@@ -2846,7 +2847,7 @@ function rr() {
|
|
|
2846
2847
|
return Be = w, Be;
|
|
2847
2848
|
}
|
|
2848
2849
|
var or = rr();
|
|
2849
|
-
const We = /* @__PURE__ */
|
|
2850
|
+
const We = /* @__PURE__ */ nr(or);
|
|
2850
2851
|
function ft(r) {
|
|
2851
2852
|
return We({
|
|
2852
2853
|
method: he.get,
|
|
@@ -2876,25 +2877,25 @@ function ar({
|
|
|
2876
2877
|
body: r,
|
|
2877
2878
|
accessToken: e,
|
|
2878
2879
|
method: t,
|
|
2879
|
-
...
|
|
2880
|
+
...s
|
|
2880
2881
|
}) {
|
|
2881
|
-
let
|
|
2882
|
-
return
|
|
2882
|
+
let n = e;
|
|
2883
|
+
return n && !n.includes("Bearer") && (n = "Bearer " + n), ir[t](We({
|
|
2883
2884
|
method: t,
|
|
2884
2885
|
headers: {
|
|
2885
|
-
...!!
|
|
2886
|
-
authorization:
|
|
2886
|
+
...!!n && {
|
|
2887
|
+
authorization: n
|
|
2887
2888
|
}
|
|
2888
2889
|
}
|
|
2889
|
-
},
|
|
2890
|
+
}, s), r);
|
|
2890
2891
|
}
|
|
2891
2892
|
const lr = 6144;
|
|
2892
2893
|
async function qt({
|
|
2893
2894
|
signal: r,
|
|
2894
2895
|
body: e,
|
|
2895
2896
|
accessToken: t,
|
|
2896
|
-
credentials:
|
|
2897
|
-
method:
|
|
2897
|
+
credentials: s,
|
|
2898
|
+
method: n = he.get,
|
|
2898
2899
|
params: o,
|
|
2899
2900
|
url: i,
|
|
2900
2901
|
requestOptions: {
|
|
@@ -2904,31 +2905,31 @@ async function qt({
|
|
|
2904
2905
|
},
|
|
2905
2906
|
...l
|
|
2906
2907
|
}) {
|
|
2907
|
-
let c =
|
|
2908
|
+
let c = sr({
|
|
2908
2909
|
url: i,
|
|
2909
2910
|
params: o
|
|
2910
|
-
}), h = e, y =
|
|
2911
|
-
|
|
2911
|
+
}), h = e, y = n;
|
|
2912
|
+
n === he.get && c.length > a && (h = o, y = he.post, c = i);
|
|
2912
2913
|
const v = ar({
|
|
2913
2914
|
body: h,
|
|
2914
|
-
accessToken: t ??
|
|
2915
|
+
accessToken: t ?? s?.accessToken,
|
|
2915
2916
|
method: y,
|
|
2916
2917
|
...l
|
|
2917
2918
|
});
|
|
2918
2919
|
r && (v.signal = r);
|
|
2919
|
-
const p = await
|
|
2920
|
+
const p = await Xn(c, v);
|
|
2920
2921
|
if (!p.ok) {
|
|
2921
2922
|
const b = await p.text();
|
|
2922
2923
|
throw new Error(b);
|
|
2923
2924
|
}
|
|
2924
2925
|
return p.status === 204 ? Promise.resolve() : await p.json();
|
|
2925
2926
|
}
|
|
2926
|
-
const ke = ht()(
|
|
2927
|
+
const ke = ht()(ws((r, e) => ({
|
|
2927
2928
|
sources: {},
|
|
2928
2929
|
filters: {},
|
|
2929
|
-
setSource: (t,
|
|
2930
|
+
setSource: (t, s) => r((n) => {
|
|
2930
2931
|
const o = {
|
|
2931
|
-
...
|
|
2932
|
+
...n.sources
|
|
2932
2933
|
}, i = o[t]?.widgets;
|
|
2933
2934
|
i && (i.destroy(), delete o[t].widgets);
|
|
2934
2935
|
const a = o[t], l = {
|
|
@@ -2936,7 +2937,7 @@ const ke = ht()(_n((r, e) => ({
|
|
|
2936
2937
|
clientId: er,
|
|
2937
2938
|
apiVersion: Qe,
|
|
2938
2939
|
...a,
|
|
2939
|
-
...
|
|
2940
|
+
...s
|
|
2940
2941
|
};
|
|
2941
2942
|
return l.widgets = fr({
|
|
2942
2943
|
source: l
|
|
@@ -2944,19 +2945,19 @@ const ke = ht()(_n((r, e) => ({
|
|
|
2944
2945
|
sources: o
|
|
2945
2946
|
};
|
|
2946
2947
|
}, void 0, "setSource"),
|
|
2947
|
-
removeSource: (t) => r((
|
|
2948
|
-
const
|
|
2949
|
-
...
|
|
2950
|
-
}, o =
|
|
2951
|
-
return o && (o.destroy(), delete
|
|
2952
|
-
sources:
|
|
2948
|
+
removeSource: (t) => r((s) => {
|
|
2949
|
+
const n = {
|
|
2950
|
+
...s.sources
|
|
2951
|
+
}, o = n[t]?.widgets;
|
|
2952
|
+
return o && (o.destroy(), delete n[t].widgets), delete n[t], {
|
|
2953
|
+
sources: n
|
|
2953
2954
|
};
|
|
2954
2955
|
}, void 0, "removeSource"),
|
|
2955
|
-
setFilters: (t,
|
|
2956
|
-
const o =
|
|
2956
|
+
setFilters: (t, s) => r((n) => {
|
|
2957
|
+
const o = n.filters[t] ?? {}, i = s.reduce((a, l) => Mt(a, l), o);
|
|
2957
2958
|
return {
|
|
2958
2959
|
filters: {
|
|
2959
|
-
...
|
|
2960
|
+
...n.filters,
|
|
2960
2961
|
[t]: {
|
|
2961
2962
|
...i
|
|
2962
2963
|
}
|
|
@@ -2964,14 +2965,14 @@ const ke = ht()(_n((r, e) => ({
|
|
|
2964
2965
|
}
|
|
2965
2966
|
};
|
|
2966
2967
|
}, void 0, "setFilters"),
|
|
2967
|
-
removeFilters: (t,
|
|
2968
|
+
removeFilters: (t, s, n) => r((o) => {
|
|
2968
2969
|
const i = o.filters[t] ?? {};
|
|
2969
2970
|
if (!i)
|
|
2970
2971
|
return o;
|
|
2971
2972
|
let a = {};
|
|
2972
|
-
return
|
|
2973
|
-
column:
|
|
2974
|
-
owner:
|
|
2973
|
+
return s && (a = ps(i, {
|
|
2974
|
+
column: s,
|
|
2975
|
+
owner: n
|
|
2975
2976
|
})), {
|
|
2976
2977
|
filters: {
|
|
2977
2978
|
...o.filters,
|
|
@@ -2983,13 +2984,13 @@ const ke = ht()(_n((r, e) => ({
|
|
|
2983
2984
|
};
|
|
2984
2985
|
}, void 0, "removeFilters"),
|
|
2985
2986
|
invalidateSourcesCache: (t, {
|
|
2986
|
-
timeout:
|
|
2987
|
-
maxAge:
|
|
2987
|
+
timeout: s = 500,
|
|
2988
|
+
maxAge: n = 10
|
|
2988
2989
|
} = {}) => {
|
|
2989
2990
|
t.forEach((o) => {
|
|
2990
2991
|
e().setSource(o, {
|
|
2991
2992
|
headers: {
|
|
2992
|
-
"Cache-Control": `no-cache, max-age=${
|
|
2993
|
+
"Cache-Control": `no-cache, max-age=${n}`
|
|
2993
2994
|
}
|
|
2994
2995
|
});
|
|
2995
2996
|
}), setTimeout(() => {
|
|
@@ -2997,40 +2998,40 @@ const ke = ht()(_n((r, e) => ({
|
|
|
2997
2998
|
const i = e().sources[o];
|
|
2998
2999
|
i && (delete i.headers, e().setSource(o, i));
|
|
2999
3000
|
});
|
|
3000
|
-
},
|
|
3001
|
+
}, s);
|
|
3001
3002
|
}
|
|
3002
3003
|
})));
|
|
3003
3004
|
function cr(r) {
|
|
3004
3005
|
const e = O(2);
|
|
3005
3006
|
let t;
|
|
3006
|
-
return e[0] !== r ? (t = (
|
|
3007
|
+
return e[0] !== r ? (t = (s) => s.sources[r], e[0] = r, e[1] = t) : t = e[1], ke(t);
|
|
3007
3008
|
}
|
|
3008
3009
|
function ur(r) {
|
|
3009
3010
|
const e = O(2);
|
|
3010
3011
|
let t;
|
|
3011
|
-
return e[0] !== r ? (t = (
|
|
3012
|
+
return e[0] !== r ? (t = (s) => s.filters[r], e[0] = r, e[1] = t) : t = e[1], ke(t);
|
|
3012
3013
|
}
|
|
3013
3014
|
function bo(r) {
|
|
3014
3015
|
const e = O(9);
|
|
3015
3016
|
let t;
|
|
3016
3017
|
e[0] !== r ? (t = (a) => a.sources[r], e[0] = r, e[1] = t) : t = e[1];
|
|
3017
|
-
const
|
|
3018
|
-
let
|
|
3019
|
-
e[2] !== r ? (
|
|
3020
|
-
const o = ke(
|
|
3018
|
+
const s = ke(t);
|
|
3019
|
+
let n;
|
|
3020
|
+
e[2] !== r ? (n = (a) => a.filters[r], e[2] = r, e[3] = n) : n = e[3];
|
|
3021
|
+
const o = ke(n);
|
|
3021
3022
|
let i;
|
|
3022
3023
|
e: {
|
|
3023
|
-
if (!
|
|
3024
|
+
if (!s) {
|
|
3024
3025
|
i = void 0;
|
|
3025
3026
|
break e;
|
|
3026
3027
|
}
|
|
3027
3028
|
let a;
|
|
3028
3029
|
e[4] !== o ? (a = o ?? {}, e[4] = o, e[5] = a) : a = e[5];
|
|
3029
3030
|
let l;
|
|
3030
|
-
e[6] !==
|
|
3031
|
-
...
|
|
3031
|
+
e[6] !== s || e[7] !== a ? (l = {
|
|
3032
|
+
...s,
|
|
3032
3033
|
filters: a
|
|
3033
|
-
}, e[6] =
|
|
3034
|
+
}, e[6] = s, e[7] = a, e[8] = l) : l = e[8], i = l;
|
|
3034
3035
|
}
|
|
3035
3036
|
return i;
|
|
3036
3037
|
}
|
|
@@ -3053,10 +3054,10 @@ function fr({
|
|
|
3053
3054
|
const {
|
|
3054
3055
|
spatialDataType: e,
|
|
3055
3056
|
spatialDataColumn: t
|
|
3056
|
-
} = dr(r),
|
|
3057
|
+
} = dr(r), s = {
|
|
3057
3058
|
query: () => {
|
|
3058
3059
|
const i = r;
|
|
3059
|
-
return new
|
|
3060
|
+
return new bs({
|
|
3060
3061
|
...i,
|
|
3061
3062
|
accessToken: "",
|
|
3062
3063
|
sqlQuery: i.data,
|
|
@@ -3066,7 +3067,7 @@ function fr({
|
|
|
3066
3067
|
},
|
|
3067
3068
|
table: () => {
|
|
3068
3069
|
const i = r;
|
|
3069
|
-
return new
|
|
3070
|
+
return new gs({
|
|
3070
3071
|
...i,
|
|
3071
3072
|
accessToken: "",
|
|
3072
3073
|
tableName: i.data,
|
|
@@ -3076,11 +3077,11 @@ function fr({
|
|
|
3076
3077
|
},
|
|
3077
3078
|
tileset: () => {
|
|
3078
3079
|
const i = r;
|
|
3079
|
-
return i.spatialDataBounds ? new
|
|
3080
|
+
return i.spatialDataBounds ? new ys({
|
|
3080
3081
|
...i,
|
|
3081
3082
|
accessToken: "",
|
|
3082
3083
|
tableName: i.data,
|
|
3083
|
-
tileFormat: i.tileFormat ??
|
|
3084
|
+
tileFormat: i.tileFormat ?? hs.BINARY,
|
|
3084
3085
|
spatialDataType: e,
|
|
3085
3086
|
spatialDataColumn: t,
|
|
3086
3087
|
spatialDataBounds: i.spatialDataBounds
|
|
@@ -3088,7 +3089,7 @@ function fr({
|
|
|
3088
3089
|
},
|
|
3089
3090
|
raster: () => {
|
|
3090
3091
|
const i = r;
|
|
3091
|
-
return !i.rasterMetadata || !i.spatialDataBounds ? null : new
|
|
3092
|
+
return !i.rasterMetadata || !i.spatialDataBounds ? null : new ms({
|
|
3092
3093
|
...i,
|
|
3093
3094
|
accessToken: "",
|
|
3094
3095
|
tableName: i.data,
|
|
@@ -3098,26 +3099,26 @@ function fr({
|
|
|
3098
3099
|
spatialDataBounds: i.spatialDataBounds
|
|
3099
3100
|
});
|
|
3100
3101
|
}
|
|
3101
|
-
},
|
|
3102
|
+
}, n = r.type.split("+")[0], o = s[n];
|
|
3102
3103
|
return o?.();
|
|
3103
3104
|
}
|
|
3104
3105
|
function pr(r, e) {
|
|
3105
|
-
const t = O(3),
|
|
3106
|
-
let
|
|
3106
|
+
const t = O(3), s = ur(r);
|
|
3107
|
+
let n;
|
|
3107
3108
|
e: {
|
|
3108
3109
|
if (!e?.length) {
|
|
3109
|
-
|
|
3110
|
+
n = s;
|
|
3110
3111
|
break e;
|
|
3111
3112
|
}
|
|
3112
3113
|
let o;
|
|
3113
|
-
if (t[0] !== e || t[1] !==
|
|
3114
|
+
if (t[0] !== e || t[1] !== s) {
|
|
3114
3115
|
const i = e.reduce(mr, {});
|
|
3115
|
-
o = de(
|
|
3116
|
+
o = de(s ?? {}, i), t[0] = e, t[1] = s, t[2] = o;
|
|
3116
3117
|
} else
|
|
3117
3118
|
o = t[2];
|
|
3118
|
-
|
|
3119
|
+
n = o;
|
|
3119
3120
|
}
|
|
3120
|
-
return
|
|
3121
|
+
return n;
|
|
3121
3122
|
}
|
|
3122
3123
|
function mr(r, e) {
|
|
3123
3124
|
return Mt(r, e);
|
|
@@ -3125,8 +3126,8 @@ function mr(r, e) {
|
|
|
3125
3126
|
function yr(r, e) {
|
|
3126
3127
|
const t = cr(e);
|
|
3127
3128
|
return ye(() => {
|
|
3128
|
-
const
|
|
3129
|
-
return !
|
|
3129
|
+
const s = t?.widgets;
|
|
3130
|
+
return !s || !r ? null : (s.props.accessToken = r, s);
|
|
3130
3131
|
}, [r, t]);
|
|
3131
3132
|
}
|
|
3132
3133
|
const hr = ["authorization", "cache-control"];
|
|
@@ -3139,18 +3140,18 @@ function gr(r) {
|
|
|
3139
3140
|
function fe(r) {
|
|
3140
3141
|
const e = O(12), {
|
|
3141
3142
|
accessToken: t,
|
|
3142
|
-
sourceId:
|
|
3143
|
-
widgetProps:
|
|
3143
|
+
sourceId: s,
|
|
3144
|
+
widgetProps: n,
|
|
3144
3145
|
additionalFilter: o
|
|
3145
|
-
} = r, i = pr(
|
|
3146
|
+
} = r, i = pr(s, o), a = yr(t, s);
|
|
3146
3147
|
let l;
|
|
3147
|
-
if (e[0] !== t || e[1] !== i || e[2] !==
|
|
3148
|
-
l = [
|
|
3148
|
+
if (e[0] !== t || e[1] !== i || e[2] !== s || e[3] !== a || e[4] !== n) {
|
|
3149
|
+
l = [s, n], a?.props && "queryParameters" in a.props && a.props.queryParameters && l.push(a.props.queryParameters), i && l.push(i);
|
|
3149
3150
|
const h = a?.props.headers;
|
|
3150
3151
|
let y;
|
|
3151
3152
|
e[6] !== h ? (y = gr(h), e[6] = h, e[7] = y) : y = e[7];
|
|
3152
3153
|
const v = y;
|
|
3153
|
-
v && l.push(v), l.push(t), e[0] = t, e[1] = i, e[2] =
|
|
3154
|
+
v && l.push(v), l.push(t), e[0] = t, e[1] = i, e[2] = s, e[3] = a, e[4] = n, e[5] = l;
|
|
3154
3155
|
} else
|
|
3155
3156
|
l = e[5];
|
|
3156
3157
|
let c;
|
|
@@ -3163,8 +3164,8 @@ function fe(r) {
|
|
|
3163
3164
|
function br(r) {
|
|
3164
3165
|
const e = O(21), {
|
|
3165
3166
|
accessToken: t,
|
|
3166
|
-
sourceId:
|
|
3167
|
-
widgetProps:
|
|
3167
|
+
sourceId: s,
|
|
3168
|
+
widgetProps: n,
|
|
3168
3169
|
additionalFilter: o,
|
|
3169
3170
|
useQueryProps: i
|
|
3170
3171
|
} = r;
|
|
@@ -3177,12 +3178,12 @@ function br(r) {
|
|
|
3177
3178
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3178
3179
|
const h = l === void 0 ? !0 : l;
|
|
3179
3180
|
let y;
|
|
3180
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3181
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3181
3182
|
accessToken: t,
|
|
3182
3183
|
additionalFilter: o,
|
|
3183
|
-
sourceId:
|
|
3184
|
-
widgetProps:
|
|
3185
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3184
|
+
sourceId: s,
|
|
3185
|
+
widgetProps: n
|
|
3186
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3186
3187
|
const {
|
|
3187
3188
|
mergedFilters: v,
|
|
3188
3189
|
queryKey: p,
|
|
@@ -3191,16 +3192,16 @@ function br(r) {
|
|
|
3191
3192
|
let m;
|
|
3192
3193
|
e[10] !== p ? (m = ["categories", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3193
3194
|
let w;
|
|
3194
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3195
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3195
3196
|
const {
|
|
3196
3197
|
signal: M
|
|
3197
3198
|
} = S;
|
|
3198
3199
|
return b.getCategories({
|
|
3199
|
-
...
|
|
3200
|
+
...n,
|
|
3200
3201
|
filters: v,
|
|
3201
3202
|
signal: M
|
|
3202
3203
|
});
|
|
3203
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3204
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3204
3205
|
const u = !!b && h;
|
|
3205
3206
|
let f;
|
|
3206
3207
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3212,20 +3213,20 @@ function br(r) {
|
|
|
3212
3213
|
}
|
|
3213
3214
|
function So(r) {
|
|
3214
3215
|
const e = O(6);
|
|
3215
|
-
let t,
|
|
3216
|
+
let t, s;
|
|
3216
3217
|
e[0] !== r ? ({
|
|
3217
3218
|
children: t,
|
|
3218
|
-
...
|
|
3219
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3220
|
-
const
|
|
3219
|
+
...s
|
|
3220
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3221
|
+
const n = br(s);
|
|
3221
3222
|
let o;
|
|
3222
|
-
return e[3] !== t || e[4] !==
|
|
3223
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3223
3224
|
}
|
|
3224
3225
|
function vr(r) {
|
|
3225
3226
|
const e = O(21), {
|
|
3226
3227
|
accessToken: t,
|
|
3227
|
-
sourceId:
|
|
3228
|
-
widgetProps:
|
|
3228
|
+
sourceId: s,
|
|
3229
|
+
widgetProps: n,
|
|
3229
3230
|
additionalFilter: o,
|
|
3230
3231
|
useQueryProps: i
|
|
3231
3232
|
} = r;
|
|
@@ -3238,12 +3239,12 @@ function vr(r) {
|
|
|
3238
3239
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3239
3240
|
const h = l === void 0 ? !0 : l;
|
|
3240
3241
|
let y;
|
|
3241
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3242
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3242
3243
|
accessToken: t,
|
|
3243
3244
|
additionalFilter: o,
|
|
3244
|
-
sourceId:
|
|
3245
|
-
widgetProps:
|
|
3246
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3245
|
+
sourceId: s,
|
|
3246
|
+
widgetProps: n
|
|
3247
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3247
3248
|
const {
|
|
3248
3249
|
mergedFilters: v,
|
|
3249
3250
|
queryKey: p,
|
|
@@ -3252,16 +3253,16 @@ function vr(r) {
|
|
|
3252
3253
|
let m;
|
|
3253
3254
|
e[10] !== p ? (m = ["features", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3254
3255
|
let w;
|
|
3255
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3256
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3256
3257
|
const {
|
|
3257
3258
|
signal: M
|
|
3258
3259
|
} = S;
|
|
3259
3260
|
return b.getFeatures({
|
|
3260
|
-
...
|
|
3261
|
+
...n,
|
|
3261
3262
|
filters: v,
|
|
3262
3263
|
signal: M
|
|
3263
3264
|
});
|
|
3264
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3265
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3265
3266
|
const u = !!b && h;
|
|
3266
3267
|
let f;
|
|
3267
3268
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3273,20 +3274,20 @@ function vr(r) {
|
|
|
3273
3274
|
}
|
|
3274
3275
|
function wo(r) {
|
|
3275
3276
|
const e = O(6);
|
|
3276
|
-
let t,
|
|
3277
|
+
let t, s;
|
|
3277
3278
|
e[0] !== r ? ({
|
|
3278
3279
|
children: t,
|
|
3279
|
-
...
|
|
3280
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3281
|
-
const
|
|
3280
|
+
...s
|
|
3281
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3282
|
+
const n = vr(s);
|
|
3282
3283
|
let o;
|
|
3283
|
-
return e[3] !== t || e[4] !==
|
|
3284
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3284
3285
|
}
|
|
3285
3286
|
function Sr(r) {
|
|
3286
3287
|
const e = O(21), {
|
|
3287
3288
|
accessToken: t,
|
|
3288
|
-
sourceId:
|
|
3289
|
-
widgetProps:
|
|
3289
|
+
sourceId: s,
|
|
3290
|
+
widgetProps: n,
|
|
3290
3291
|
additionalFilter: o,
|
|
3291
3292
|
useQueryProps: i
|
|
3292
3293
|
} = r;
|
|
@@ -3299,12 +3300,12 @@ function Sr(r) {
|
|
|
3299
3300
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3300
3301
|
const h = l === void 0 ? !0 : l;
|
|
3301
3302
|
let y;
|
|
3302
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3303
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3303
3304
|
accessToken: t,
|
|
3304
3305
|
additionalFilter: o,
|
|
3305
|
-
sourceId:
|
|
3306
|
-
widgetProps:
|
|
3307
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3306
|
+
sourceId: s,
|
|
3307
|
+
widgetProps: n
|
|
3308
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3308
3309
|
const {
|
|
3309
3310
|
mergedFilters: v,
|
|
3310
3311
|
queryKey: p,
|
|
@@ -3313,16 +3314,16 @@ function Sr(r) {
|
|
|
3313
3314
|
let m;
|
|
3314
3315
|
e[10] !== p ? (m = ["formula", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3315
3316
|
let w;
|
|
3316
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3317
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3317
3318
|
const {
|
|
3318
3319
|
signal: M
|
|
3319
3320
|
} = S;
|
|
3320
3321
|
return b.getFormula({
|
|
3321
|
-
...
|
|
3322
|
+
...n,
|
|
3322
3323
|
filters: v,
|
|
3323
3324
|
signal: M
|
|
3324
3325
|
});
|
|
3325
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3326
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3326
3327
|
const u = !!b && h;
|
|
3327
3328
|
let f;
|
|
3328
3329
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3334,20 +3335,20 @@ function Sr(r) {
|
|
|
3334
3335
|
}
|
|
3335
3336
|
function _o(r) {
|
|
3336
3337
|
const e = O(6);
|
|
3337
|
-
let t,
|
|
3338
|
+
let t, s;
|
|
3338
3339
|
e[0] !== r ? ({
|
|
3339
3340
|
children: t,
|
|
3340
|
-
...
|
|
3341
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3342
|
-
const
|
|
3341
|
+
...s
|
|
3342
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3343
|
+
const n = Sr(s);
|
|
3343
3344
|
let o;
|
|
3344
|
-
return e[3] !== t || e[4] !==
|
|
3345
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3345
3346
|
}
|
|
3346
3347
|
function wr(r) {
|
|
3347
3348
|
const e = O(21), {
|
|
3348
3349
|
accessToken: t,
|
|
3349
|
-
sourceId:
|
|
3350
|
-
widgetProps:
|
|
3350
|
+
sourceId: s,
|
|
3351
|
+
widgetProps: n,
|
|
3351
3352
|
additionalFilter: o,
|
|
3352
3353
|
useQueryProps: i
|
|
3353
3354
|
} = r;
|
|
@@ -3360,12 +3361,12 @@ function wr(r) {
|
|
|
3360
3361
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3361
3362
|
const h = l === void 0 ? !0 : l;
|
|
3362
3363
|
let y;
|
|
3363
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3364
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3364
3365
|
accessToken: t,
|
|
3365
3366
|
additionalFilter: o,
|
|
3366
|
-
sourceId:
|
|
3367
|
-
widgetProps:
|
|
3368
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3367
|
+
sourceId: s,
|
|
3368
|
+
widgetProps: n
|
|
3369
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3369
3370
|
const {
|
|
3370
3371
|
mergedFilters: v,
|
|
3371
3372
|
queryKey: p,
|
|
@@ -3374,16 +3375,16 @@ function wr(r) {
|
|
|
3374
3375
|
let m;
|
|
3375
3376
|
e[10] !== p ? (m = ["histogram", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3376
3377
|
let w;
|
|
3377
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3378
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3378
3379
|
const {
|
|
3379
3380
|
signal: M
|
|
3380
3381
|
} = S;
|
|
3381
3382
|
return b.getHistogram({
|
|
3382
|
-
...
|
|
3383
|
+
...n,
|
|
3383
3384
|
filters: v,
|
|
3384
3385
|
signal: M
|
|
3385
3386
|
});
|
|
3386
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3387
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3387
3388
|
const u = !!b && h;
|
|
3388
3389
|
let f;
|
|
3389
3390
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3395,20 +3396,20 @@ function wr(r) {
|
|
|
3395
3396
|
}
|
|
3396
3397
|
function Mo(r) {
|
|
3397
3398
|
const e = O(6);
|
|
3398
|
-
let t,
|
|
3399
|
+
let t, s;
|
|
3399
3400
|
e[0] !== r ? ({
|
|
3400
3401
|
children: t,
|
|
3401
|
-
...
|
|
3402
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3403
|
-
const
|
|
3402
|
+
...s
|
|
3403
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3404
|
+
const n = wr(s);
|
|
3404
3405
|
let o;
|
|
3405
|
-
return e[3] !== t || e[4] !==
|
|
3406
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3406
3407
|
}
|
|
3407
3408
|
function _r(r) {
|
|
3408
3409
|
const e = O(21), {
|
|
3409
3410
|
accessToken: t,
|
|
3410
|
-
sourceId:
|
|
3411
|
-
widgetProps:
|
|
3411
|
+
sourceId: s,
|
|
3412
|
+
widgetProps: n,
|
|
3412
3413
|
additionalFilter: o,
|
|
3413
3414
|
useQueryProps: i
|
|
3414
3415
|
} = r;
|
|
@@ -3421,12 +3422,12 @@ function _r(r) {
|
|
|
3421
3422
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3422
3423
|
const h = l === void 0 ? !0 : l;
|
|
3423
3424
|
let y;
|
|
3424
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3425
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3425
3426
|
accessToken: t,
|
|
3426
3427
|
additionalFilter: o,
|
|
3427
|
-
sourceId:
|
|
3428
|
-
widgetProps:
|
|
3429
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3428
|
+
sourceId: s,
|
|
3429
|
+
widgetProps: n
|
|
3430
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3430
3431
|
const {
|
|
3431
3432
|
mergedFilters: v,
|
|
3432
3433
|
queryKey: p,
|
|
@@ -3435,16 +3436,16 @@ function _r(r) {
|
|
|
3435
3436
|
let m;
|
|
3436
3437
|
e[10] !== p ? (m = ["range", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3437
3438
|
let w;
|
|
3438
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3439
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3439
3440
|
const {
|
|
3440
3441
|
signal: M
|
|
3441
3442
|
} = S;
|
|
3442
3443
|
return b.getRange({
|
|
3443
|
-
...
|
|
3444
|
+
...n,
|
|
3444
3445
|
filters: v,
|
|
3445
3446
|
signal: M
|
|
3446
3447
|
});
|
|
3447
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3448
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3448
3449
|
const u = !!b && h;
|
|
3449
3450
|
let f;
|
|
3450
3451
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3456,20 +3457,20 @@ function _r(r) {
|
|
|
3456
3457
|
}
|
|
3457
3458
|
function Eo(r) {
|
|
3458
3459
|
const e = O(6);
|
|
3459
|
-
let t,
|
|
3460
|
+
let t, s;
|
|
3460
3461
|
e[0] !== r ? ({
|
|
3461
3462
|
children: t,
|
|
3462
|
-
...
|
|
3463
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3464
|
-
const
|
|
3463
|
+
...s
|
|
3464
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3465
|
+
const n = _r(s);
|
|
3465
3466
|
let o;
|
|
3466
|
-
return e[3] !== t || e[4] !==
|
|
3467
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3467
3468
|
}
|
|
3468
3469
|
function Mr(r) {
|
|
3469
3470
|
const e = O(21), {
|
|
3470
3471
|
accessToken: t,
|
|
3471
|
-
sourceId:
|
|
3472
|
-
widgetProps:
|
|
3472
|
+
sourceId: s,
|
|
3473
|
+
widgetProps: n,
|
|
3473
3474
|
additionalFilter: o,
|
|
3474
3475
|
useQueryProps: i
|
|
3475
3476
|
} = r;
|
|
@@ -3482,12 +3483,12 @@ function Mr(r) {
|
|
|
3482
3483
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3483
3484
|
const h = l === void 0 ? !0 : l;
|
|
3484
3485
|
let y;
|
|
3485
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3486
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3486
3487
|
accessToken: t,
|
|
3487
3488
|
additionalFilter: o,
|
|
3488
|
-
sourceId:
|
|
3489
|
-
widgetProps:
|
|
3490
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3489
|
+
sourceId: s,
|
|
3490
|
+
widgetProps: n
|
|
3491
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3491
3492
|
const {
|
|
3492
3493
|
mergedFilters: v,
|
|
3493
3494
|
queryKey: p,
|
|
@@ -3496,16 +3497,16 @@ function Mr(r) {
|
|
|
3496
3497
|
let m;
|
|
3497
3498
|
e[10] !== p ? (m = ["scatter", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3498
3499
|
let w;
|
|
3499
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3500
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3500
3501
|
const {
|
|
3501
3502
|
signal: M
|
|
3502
3503
|
} = S;
|
|
3503
3504
|
return b.getScatter({
|
|
3504
|
-
...
|
|
3505
|
+
...n,
|
|
3505
3506
|
filters: v,
|
|
3506
3507
|
signal: M
|
|
3507
3508
|
});
|
|
3508
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3509
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3509
3510
|
const u = !!b && h;
|
|
3510
3511
|
let f;
|
|
3511
3512
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3517,20 +3518,20 @@ function Mr(r) {
|
|
|
3517
3518
|
}
|
|
3518
3519
|
function To(r) {
|
|
3519
3520
|
const e = O(6);
|
|
3520
|
-
let t,
|
|
3521
|
+
let t, s;
|
|
3521
3522
|
e[0] !== r ? ({
|
|
3522
3523
|
children: t,
|
|
3523
|
-
...
|
|
3524
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3525
|
-
const
|
|
3524
|
+
...s
|
|
3525
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3526
|
+
const n = Mr(s);
|
|
3526
3527
|
let o;
|
|
3527
|
-
return e[3] !== t || e[4] !==
|
|
3528
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3528
3529
|
}
|
|
3529
3530
|
function Er(r) {
|
|
3530
3531
|
const e = O(21), {
|
|
3531
3532
|
accessToken: t,
|
|
3532
|
-
sourceId:
|
|
3533
|
-
widgetProps:
|
|
3533
|
+
sourceId: s,
|
|
3534
|
+
widgetProps: n,
|
|
3534
3535
|
additionalFilter: o,
|
|
3535
3536
|
useQueryProps: i
|
|
3536
3537
|
} = r;
|
|
@@ -3543,12 +3544,12 @@ function Er(r) {
|
|
|
3543
3544
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3544
3545
|
const h = l === void 0 ? !0 : l;
|
|
3545
3546
|
let y;
|
|
3546
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3547
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3547
3548
|
accessToken: t,
|
|
3548
3549
|
additionalFilter: o,
|
|
3549
|
-
sourceId:
|
|
3550
|
-
widgetProps:
|
|
3551
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3550
|
+
sourceId: s,
|
|
3551
|
+
widgetProps: n
|
|
3552
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3552
3553
|
const {
|
|
3553
3554
|
mergedFilters: v,
|
|
3554
3555
|
queryKey: p,
|
|
@@ -3557,16 +3558,16 @@ function Er(r) {
|
|
|
3557
3558
|
let m;
|
|
3558
3559
|
e[10] !== p ? (m = ["table", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3559
3560
|
let w;
|
|
3560
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3561
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3561
3562
|
const {
|
|
3562
3563
|
signal: M
|
|
3563
3564
|
} = S;
|
|
3564
3565
|
return b.getTable({
|
|
3565
|
-
...
|
|
3566
|
+
...n,
|
|
3566
3567
|
filters: v,
|
|
3567
3568
|
signal: M
|
|
3568
3569
|
});
|
|
3569
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3570
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3570
3571
|
const u = !!b && h;
|
|
3571
3572
|
let f;
|
|
3572
3573
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3578,20 +3579,20 @@ function Er(r) {
|
|
|
3578
3579
|
}
|
|
3579
3580
|
function Lo(r) {
|
|
3580
3581
|
const e = O(6);
|
|
3581
|
-
let t,
|
|
3582
|
+
let t, s;
|
|
3582
3583
|
e[0] !== r ? ({
|
|
3583
3584
|
children: t,
|
|
3584
|
-
...
|
|
3585
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3586
|
-
const
|
|
3585
|
+
...s
|
|
3586
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3587
|
+
const n = Er(s);
|
|
3587
3588
|
let o;
|
|
3588
|
-
return e[3] !== t || e[4] !==
|
|
3589
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3589
3590
|
}
|
|
3590
3591
|
function Tr(r) {
|
|
3591
3592
|
const e = O(21), {
|
|
3592
3593
|
accessToken: t,
|
|
3593
|
-
sourceId:
|
|
3594
|
-
widgetProps:
|
|
3594
|
+
sourceId: s,
|
|
3595
|
+
widgetProps: n,
|
|
3595
3596
|
additionalFilter: o,
|
|
3596
3597
|
useQueryProps: i
|
|
3597
3598
|
} = r;
|
|
@@ -3604,12 +3605,12 @@ function Tr(r) {
|
|
|
3604
3605
|
} = a, e[2] = a, e[3] = l, e[4] = c) : (l = e[3], c = e[4]);
|
|
3605
3606
|
const h = l === void 0 ? !0 : l;
|
|
3606
3607
|
let y;
|
|
3607
|
-
e[5] !== t || e[6] !== o || e[7] !==
|
|
3608
|
+
e[5] !== t || e[6] !== o || e[7] !== s || e[8] !== n ? (y = {
|
|
3608
3609
|
accessToken: t,
|
|
3609
3610
|
additionalFilter: o,
|
|
3610
|
-
sourceId:
|
|
3611
|
-
widgetProps:
|
|
3612
|
-
}, e[5] = t, e[6] = o, e[7] =
|
|
3611
|
+
sourceId: s,
|
|
3612
|
+
widgetProps: n
|
|
3613
|
+
}, e[5] = t, e[6] = o, e[7] = s, e[8] = n, e[9] = y) : y = e[9];
|
|
3613
3614
|
const {
|
|
3614
3615
|
mergedFilters: v,
|
|
3615
3616
|
queryKey: p,
|
|
@@ -3618,16 +3619,16 @@ function Tr(r) {
|
|
|
3618
3619
|
let m;
|
|
3619
3620
|
e[10] !== p ? (m = ["timeSeries", ...p], e[10] = p, e[11] = m) : m = e[11];
|
|
3620
3621
|
let w;
|
|
3621
|
-
e[12] !== v || e[13] !== b || e[14] !==
|
|
3622
|
+
e[12] !== v || e[13] !== b || e[14] !== n ? (w = (S) => {
|
|
3622
3623
|
const {
|
|
3623
3624
|
signal: M
|
|
3624
3625
|
} = S;
|
|
3625
3626
|
return b.getTimeSeries({
|
|
3626
|
-
...
|
|
3627
|
+
...n,
|
|
3627
3628
|
filters: v,
|
|
3628
3629
|
signal: M
|
|
3629
3630
|
});
|
|
3630
|
-
}, e[12] = v, e[13] = b, e[14] =
|
|
3631
|
+
}, e[12] = v, e[13] = b, e[14] = n, e[15] = w) : w = e[15];
|
|
3631
3632
|
const u = !!b && h;
|
|
3632
3633
|
let f;
|
|
3633
3634
|
return e[16] !== m || e[17] !== w || e[18] !== u || e[19] !== c ? (f = {
|
|
@@ -3639,67 +3640,67 @@ function Tr(r) {
|
|
|
3639
3640
|
}
|
|
3640
3641
|
function Po(r) {
|
|
3641
3642
|
const e = O(6);
|
|
3642
|
-
let t,
|
|
3643
|
+
let t, s;
|
|
3643
3644
|
e[0] !== r ? ({
|
|
3644
3645
|
children: t,
|
|
3645
|
-
...
|
|
3646
|
-
} = r, e[0] = r, e[1] = t, e[2] =
|
|
3647
|
-
const
|
|
3646
|
+
...s
|
|
3647
|
+
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
3648
|
+
const n = Tr(s);
|
|
3648
3649
|
let o;
|
|
3649
|
-
return e[3] !== t || e[4] !==
|
|
3650
|
+
return e[3] !== t || e[4] !== n ? (o = t(n), e[3] = t, e[4] = n, e[5] = o) : o = e[5], o;
|
|
3650
3651
|
}
|
|
3651
3652
|
const ko = "ps";
|
|
3652
3653
|
function Co(r) {
|
|
3653
3654
|
const e = O(13), {
|
|
3654
3655
|
children: t,
|
|
3655
|
-
maps:
|
|
3656
|
-
lassoTools:
|
|
3656
|
+
maps: s,
|
|
3657
|
+
lassoTools: n,
|
|
3657
3658
|
measureTools: o
|
|
3658
3659
|
} = r;
|
|
3659
3660
|
let i;
|
|
3660
|
-
e[0] !==
|
|
3661
|
+
e[0] !== n ? (i = n === void 0 ? [] : n, e[0] = n, e[1] = i) : i = e[1];
|
|
3661
3662
|
const a = i;
|
|
3662
3663
|
let l;
|
|
3663
3664
|
e[2] !== o ? (l = o === void 0 ? [] : o, e[2] = o, e[3] = l) : l = e[3];
|
|
3664
3665
|
const c = l;
|
|
3665
3666
|
let h;
|
|
3666
|
-
e[4] !== t || e[5] !== c ? (h = /* @__PURE__ */ Z(
|
|
3667
|
+
e[4] !== t || e[5] !== c ? (h = /* @__PURE__ */ Z(Mn, { values: c, children: t }), e[4] = t, e[5] = c, e[6] = h) : h = e[6];
|
|
3667
3668
|
let y;
|
|
3668
|
-
e[7] !== a || e[8] !== h ? (y = /* @__PURE__ */ Z(
|
|
3669
|
+
e[7] !== a || e[8] !== h ? (y = /* @__PURE__ */ Z(on, { values: a, children: h }), e[7] = a, e[8] = h, e[9] = y) : y = e[9];
|
|
3669
3670
|
let v;
|
|
3670
|
-
return e[10] !==
|
|
3671
|
+
return e[10] !== s || e[11] !== y ? (v = /* @__PURE__ */ Z(Zs, { values: s, children: y }), e[10] = s, e[11] = y, e[12] = v) : v = e[12], v;
|
|
3671
3672
|
}
|
|
3672
3673
|
function Oo(r, e) {
|
|
3673
|
-
const t = be((c) => c.layers),
|
|
3674
|
+
const t = be((c) => c.layers), s = be((c) => c.setLayer), n = ye(() => $t(r.map((c) => t[c]).filter((c) => !!c?.legend)).toReversed(), [t, r]), o = ye(() => n.map(e), [e, n]), i = ee(({
|
|
3674
3675
|
id: c,
|
|
3675
3676
|
visible: h,
|
|
3676
3677
|
...y
|
|
3677
3678
|
}) => {
|
|
3678
|
-
|
|
3679
|
+
s(c, {
|
|
3679
3680
|
props: {
|
|
3680
3681
|
visible: h
|
|
3681
3682
|
},
|
|
3682
3683
|
legend: y
|
|
3683
3684
|
});
|
|
3684
|
-
}, [
|
|
3685
|
+
}, [s]), a = ee(({
|
|
3685
3686
|
id: c,
|
|
3686
3687
|
collapsed: h
|
|
3687
3688
|
}) => {
|
|
3688
|
-
|
|
3689
|
+
s(c, {
|
|
3689
3690
|
legend: {
|
|
3690
3691
|
collapsed: h
|
|
3691
3692
|
}
|
|
3692
3693
|
});
|
|
3693
|
-
}, [
|
|
3694
|
+
}, [s]), l = ee(({
|
|
3694
3695
|
id: c,
|
|
3695
3696
|
opacity: h
|
|
3696
3697
|
}) => {
|
|
3697
|
-
|
|
3698
|
+
s(c, {
|
|
3698
3699
|
props: {
|
|
3699
3700
|
opacity: h
|
|
3700
3701
|
}
|
|
3701
3702
|
});
|
|
3702
|
-
}, [
|
|
3703
|
+
}, [s]);
|
|
3703
3704
|
return {
|
|
3704
3705
|
legend: o,
|
|
3705
3706
|
onChangeVisibility: i,
|
|
@@ -3710,7 +3711,7 @@ function Oo(r, e) {
|
|
|
3710
3711
|
function Fo({
|
|
3711
3712
|
mapId: r
|
|
3712
3713
|
}) {
|
|
3713
|
-
const [e, t] = ae(void 0), [
|
|
3714
|
+
const [e, t] = ae(void 0), [s, n] = ae(!1), [o, i] = ae(void 0), a = q((u) => u.maps[r]?.basemap), l = q((u) => u.getDeckInstance), c = q((u) => u.getOverlayInstance), h = q((u) => u.areLayersLoaded[r]), v = q((u) => u.maps[r]?.isLoaded) && h, {
|
|
3714
3715
|
type: p
|
|
3715
3716
|
} = Se[a], b = p === ie.googleMaps, m = ee(async () => {
|
|
3716
3717
|
const u = l(r), f = c(r);
|
|
@@ -3722,7 +3723,7 @@ function Fo({
|
|
|
3722
3723
|
const P = f;
|
|
3723
3724
|
if (P.getRenderingType() !== "RASTER")
|
|
3724
3725
|
throw new Error("Only raster type is supported for Google Maps");
|
|
3725
|
-
const R = await
|
|
3726
|
+
const R = await _s(P.getDiv(), {
|
|
3726
3727
|
useCORS: !0
|
|
3727
3728
|
});
|
|
3728
3729
|
M?.drawImage(R, 0, 0, u.width, u.height);
|
|
@@ -3736,14 +3737,14 @@ function Fo({
|
|
|
3736
3737
|
} catch (S) {
|
|
3737
3738
|
i(S), console.error(S);
|
|
3738
3739
|
} finally {
|
|
3739
|
-
|
|
3740
|
+
n(!1);
|
|
3740
3741
|
}
|
|
3741
3742
|
}, [l, b, r, c]);
|
|
3742
3743
|
return {
|
|
3743
3744
|
takeScreenshot: ee(() => {
|
|
3744
|
-
i(void 0),
|
|
3745
|
+
i(void 0), n(!0), v && m();
|
|
3745
3746
|
}, [m, v]),
|
|
3746
|
-
isLoading:
|
|
3747
|
+
isLoading: s,
|
|
3747
3748
|
screenshot: e,
|
|
3748
3749
|
error: o
|
|
3749
3750
|
};
|
|
@@ -3752,11 +3753,11 @@ function Ao(r) {
|
|
|
3752
3753
|
const e = O(11), {
|
|
3753
3754
|
mapId: t
|
|
3754
3755
|
} = r;
|
|
3755
|
-
let
|
|
3756
|
-
e[0] !== t ? (
|
|
3756
|
+
let s;
|
|
3757
|
+
e[0] !== t ? (s = {
|
|
3757
3758
|
mapId: t
|
|
3758
|
-
}, e[0] = t, e[1] =
|
|
3759
|
-
const
|
|
3759
|
+
}, e[0] = t, e[1] = s) : s = e[1];
|
|
3760
|
+
const n = Lr(s);
|
|
3760
3761
|
let o;
|
|
3761
3762
|
e[2] !== t ? (o = {
|
|
3762
3763
|
mapId: t
|
|
@@ -3766,30 +3767,30 @@ function Ao(r) {
|
|
|
3766
3767
|
e[4] !== t ? (a = {
|
|
3767
3768
|
mapId: t
|
|
3768
3769
|
}, e[4] = t, e[5] = a) : a = e[5];
|
|
3769
|
-
const l = Or(a), c = i ?? l ??
|
|
3770
|
+
const l = Or(a), c = i ?? l ?? n;
|
|
3770
3771
|
let h;
|
|
3771
|
-
return e[6] !== i || e[7] !== l || e[8] !== c || e[9] !==
|
|
3772
|
+
return e[6] !== i || e[7] !== l || e[8] !== c || e[9] !== n ? (h = {
|
|
3772
3773
|
spatialFilter: c,
|
|
3773
3774
|
staticSpatialFilter: l,
|
|
3774
3775
|
lassoToolsSpatialFilter: i,
|
|
3775
|
-
viewportSpatialFilter:
|
|
3776
|
-
}, e[6] = i, e[7] = l, e[8] = c, e[9] =
|
|
3776
|
+
viewportSpatialFilter: n
|
|
3777
|
+
}, e[6] = i, e[7] = l, e[8] = c, e[9] = n, e[10] = h) : h = e[10], h;
|
|
3777
3778
|
}
|
|
3778
3779
|
function Lr(r) {
|
|
3779
3780
|
const e = O(4), {
|
|
3780
3781
|
mapId: t
|
|
3781
3782
|
} = r;
|
|
3782
|
-
let
|
|
3783
|
-
e[0] !== t ? (
|
|
3784
|
-
const
|
|
3783
|
+
let s;
|
|
3784
|
+
e[0] !== t ? (s = (i) => i.viewports[t], e[0] = t, e[1] = s) : s = e[1];
|
|
3785
|
+
const n = q(s);
|
|
3785
3786
|
let o;
|
|
3786
3787
|
e: {
|
|
3787
|
-
if (!
|
|
3788
|
+
if (!n) {
|
|
3788
3789
|
o = void 0;
|
|
3789
3790
|
break e;
|
|
3790
3791
|
}
|
|
3791
3792
|
let i;
|
|
3792
|
-
e[2] !==
|
|
3793
|
+
e[2] !== n ? (i = vs(n.getBounds()), e[2] = n, e[3] = i) : i = e[3], o = i;
|
|
3793
3794
|
}
|
|
3794
3795
|
return o;
|
|
3795
3796
|
}
|
|
@@ -3797,21 +3798,21 @@ function Pr(r) {
|
|
|
3797
3798
|
const e = O(5), {
|
|
3798
3799
|
mapId: t
|
|
3799
3800
|
} = r;
|
|
3800
|
-
let
|
|
3801
|
-
e[0] !== t ? (
|
|
3802
|
-
const
|
|
3801
|
+
let s;
|
|
3802
|
+
e[0] !== t ? (s = (i) => i.data[t]?.values, e[0] = t, e[1] = s) : s = e[1];
|
|
3803
|
+
const n = Q(s);
|
|
3803
3804
|
let o;
|
|
3804
3805
|
e: {
|
|
3805
3806
|
let i;
|
|
3806
|
-
if (e[2] !==
|
|
3807
|
+
if (e[2] !== n) {
|
|
3807
3808
|
const a = Ot({
|
|
3808
|
-
values:
|
|
3809
|
+
values: n
|
|
3809
3810
|
}).filter(Cr);
|
|
3810
3811
|
if (!a?.length) {
|
|
3811
3812
|
o = void 0;
|
|
3812
3813
|
break e;
|
|
3813
3814
|
}
|
|
3814
|
-
i = St(a.map(kr)), e[2] =
|
|
3815
|
+
i = St(a.map(kr)), e[2] = n, e[3] = i, e[4] = o;
|
|
3815
3816
|
} else
|
|
3816
3817
|
i = e[3], o = e[4];
|
|
3817
3818
|
o = i.geometry;
|
|
@@ -3828,19 +3829,19 @@ function Or(r) {
|
|
|
3828
3829
|
const e = O(4), {
|
|
3829
3830
|
mapId: t
|
|
3830
3831
|
} = r;
|
|
3831
|
-
let
|
|
3832
|
-
e[0] !== t ? (
|
|
3833
|
-
const
|
|
3832
|
+
let s;
|
|
3833
|
+
e[0] !== t ? (s = (i) => i.spatialFilter[t], e[0] = t, e[1] = s) : s = e[1];
|
|
3834
|
+
const n = q(s);
|
|
3834
3835
|
let o;
|
|
3835
3836
|
e: {
|
|
3836
|
-
if (!
|
|
3837
|
+
if (!n || !Object.keys(n).length) {
|
|
3837
3838
|
o = void 0;
|
|
3838
3839
|
break e;
|
|
3839
3840
|
}
|
|
3840
3841
|
let i;
|
|
3841
|
-
if (e[2] !==
|
|
3842
|
-
const a = Object.values(
|
|
3843
|
-
i = St(a), e[2] =
|
|
3842
|
+
if (e[2] !== n) {
|
|
3843
|
+
const a = Object.values(n).filter(Ar).flatMap(Fr);
|
|
3844
|
+
i = St(a), e[2] = n, e[3] = i;
|
|
3844
3845
|
} else
|
|
3845
3846
|
i = e[3];
|
|
3846
3847
|
o = i.geometry;
|
|
@@ -3860,7 +3861,7 @@ const pe = {
|
|
|
3860
3861
|
}, pt = {
|
|
3861
3862
|
[pe.currency]: {
|
|
3862
3863
|
type: pe.currency,
|
|
3863
|
-
format: (r, e) =>
|
|
3864
|
+
format: (r, e) => us(r, e)
|
|
3864
3865
|
},
|
|
3865
3866
|
[pe.number]: {
|
|
3866
3867
|
type: pe.number,
|
|
@@ -3875,8 +3876,8 @@ function Ro({
|
|
|
3875
3876
|
properties: r,
|
|
3876
3877
|
formatters: e = {},
|
|
3877
3878
|
includeColumns: t = Object.keys(r),
|
|
3878
|
-
locale:
|
|
3879
|
-
showColumnName:
|
|
3879
|
+
locale: s = "en-US",
|
|
3880
|
+
showColumnName: n = !0,
|
|
3880
3881
|
title: o,
|
|
3881
3882
|
getColumnName: i = xr,
|
|
3882
3883
|
getFieldHtml: a = Dr,
|
|
@@ -3884,7 +3885,7 @@ function Ro({
|
|
|
3884
3885
|
getValue: c = $r
|
|
3885
3886
|
}) {
|
|
3886
3887
|
const h = o ? l(o) : "", v = t.reduce((p, b) => {
|
|
3887
|
-
const m = e[b], w = r[b], u = c(w,
|
|
3888
|
+
const m = e[b], w = r[b], u = c(w, s, m), f = n ? i(b) : "";
|
|
3888
3889
|
return p + a(f, u);
|
|
3889
3890
|
}, "");
|
|
3890
3891
|
return h + v;
|
|
@@ -3927,26 +3928,26 @@ function Do(r) {
|
|
|
3927
3928
|
function $o(r) {
|
|
3928
3929
|
const e = O(22), {
|
|
3929
3930
|
children: t,
|
|
3930
|
-
mapId:
|
|
3931
|
+
mapId: s
|
|
3931
3932
|
} = r;
|
|
3932
|
-
let
|
|
3933
|
-
e[0] !==
|
|
3933
|
+
let n;
|
|
3934
|
+
e[0] !== s ? (n = (_) => _.viewStates[s], e[0] = s, e[1] = n) : n = e[1];
|
|
3934
3935
|
const {
|
|
3935
3936
|
zoom: o,
|
|
3936
3937
|
maxZoom: i,
|
|
3937
3938
|
minZoom: a
|
|
3938
|
-
} = q(
|
|
3939
|
+
} = q(n);
|
|
3939
3940
|
let l;
|
|
3940
|
-
e[2] !==
|
|
3941
|
+
e[2] !== s ? (l = (_) => _.areLayersLoaded[s], e[2] = s, e[3] = l) : l = e[3];
|
|
3941
3942
|
const c = q(l), h = q(Br), y = q(Vr), v = q(Ur), p = !c;
|
|
3942
3943
|
let b;
|
|
3943
|
-
e[4] !==
|
|
3944
|
+
e[4] !== s || e[5] !== h ? (b = (_) => h(s, _), e[4] = s, e[5] = h, e[6] = b) : b = e[6];
|
|
3944
3945
|
const m = b;
|
|
3945
3946
|
let w;
|
|
3946
|
-
e[7] !== y || e[8] !==
|
|
3947
|
+
e[7] !== y || e[8] !== s ? (w = (_) => y(s, _), e[7] = y, e[8] = s, e[9] = w) : w = e[9];
|
|
3947
3948
|
const u = w;
|
|
3948
3949
|
let f;
|
|
3949
|
-
e[10] !==
|
|
3950
|
+
e[10] !== s || e[11] !== v ? (f = () => v(s), e[10] = s, e[11] = v, e[12] = f) : f = e[12];
|
|
3950
3951
|
const S = f;
|
|
3951
3952
|
let M;
|
|
3952
3953
|
return e[13] !== t || e[14] !== i || e[15] !== a || e[16] !== p || e[17] !== m || e[18] !== u || e[19] !== S || e[20] !== o ? (M = t({
|
|
@@ -3972,8 +3973,8 @@ async function jr({
|
|
|
3972
3973
|
baseUrl: r = Ze,
|
|
3973
3974
|
connection: e,
|
|
3974
3975
|
accessToken: t,
|
|
3975
|
-
query:
|
|
3976
|
-
attribute:
|
|
3976
|
+
query: s,
|
|
3977
|
+
attribute: n,
|
|
3977
3978
|
fetcherOptions: {
|
|
3978
3979
|
signal: o,
|
|
3979
3980
|
...i
|
|
@@ -3982,14 +3983,14 @@ async function jr({
|
|
|
3982
3983
|
params: l,
|
|
3983
3984
|
apiVersion: c = Qe
|
|
3984
3985
|
}) {
|
|
3985
|
-
const h = `${r}/${c}/stats/${e}/${
|
|
3986
|
+
const h = `${r}/${c}/stats/${e}/${n}`;
|
|
3986
3987
|
return qt({
|
|
3987
3988
|
accessToken: t,
|
|
3988
3989
|
signal: o,
|
|
3989
3990
|
url: h,
|
|
3990
3991
|
method: he.get,
|
|
3991
3992
|
params: {
|
|
3992
|
-
q:
|
|
3993
|
+
q: s,
|
|
3993
3994
|
...a,
|
|
3994
3995
|
...l
|
|
3995
3996
|
},
|
|
@@ -4000,8 +4001,8 @@ async function Ir({
|
|
|
4000
4001
|
baseUrl: r = Ze,
|
|
4001
4002
|
connection: e,
|
|
4002
4003
|
accessToken: t,
|
|
4003
|
-
table:
|
|
4004
|
-
attribute:
|
|
4004
|
+
table: s,
|
|
4005
|
+
attribute: n,
|
|
4005
4006
|
params: o,
|
|
4006
4007
|
fetcherOptions: {
|
|
4007
4008
|
signal: i,
|
|
@@ -4009,7 +4010,7 @@ async function Ir({
|
|
|
4009
4010
|
} = {},
|
|
4010
4011
|
apiVersion: l = Qe
|
|
4011
4012
|
}) {
|
|
4012
|
-
const c = `${r}/${l}/stats/${e}/${
|
|
4013
|
+
const c = `${r}/${l}/stats/${e}/${s}/${n}`;
|
|
4013
4014
|
return qt({
|
|
4014
4015
|
accessToken: t,
|
|
4015
4016
|
signal: i,
|
|
@@ -4024,8 +4025,8 @@ async function Ir({
|
|
|
4024
4025
|
function qo(r) {
|
|
4025
4026
|
const e = O(20), {
|
|
4026
4027
|
source: t,
|
|
4027
|
-
attribute:
|
|
4028
|
-
accessToken:
|
|
4028
|
+
attribute: s,
|
|
4029
|
+
accessToken: n,
|
|
4029
4030
|
params: o,
|
|
4030
4031
|
fetcherOptions: i,
|
|
4031
4032
|
useQueryProps: a
|
|
@@ -4039,15 +4040,15 @@ function qo(r) {
|
|
|
4039
4040
|
} = l, e[2] = l, e[3] = c, e[4] = h) : (c = e[3], h = e[4]);
|
|
4040
4041
|
const y = c === void 0 ? !0 : c;
|
|
4041
4042
|
let v;
|
|
4042
|
-
e[5] !==
|
|
4043
|
+
e[5] !== s || e[6] !== t ? (v = [t, s], e[5] = s, e[6] = t, e[7] = v) : v = e[7];
|
|
4043
4044
|
let p;
|
|
4044
|
-
e[8] !==
|
|
4045
|
+
e[8] !== n || e[9] !== s || e[10] !== i || e[11] !== o || e[12] !== t ? (p = () => Nr({
|
|
4045
4046
|
source: t,
|
|
4046
4047
|
params: o,
|
|
4047
|
-
attribute:
|
|
4048
|
-
accessToken:
|
|
4048
|
+
attribute: s,
|
|
4049
|
+
accessToken: n,
|
|
4049
4050
|
fetcherOptions: i
|
|
4050
|
-
}), e[8] =
|
|
4051
|
+
}), e[8] = n, e[9] = s, e[10] = i, e[11] = o, e[12] = t, e[13] = p) : p = e[13];
|
|
4051
4052
|
let b;
|
|
4052
4053
|
return e[14] !== y || e[15] !== t || e[16] !== v || e[17] !== p || e[18] !== h ? (b = {
|
|
4053
4054
|
queryKey: v,
|
|
@@ -4066,20 +4067,20 @@ function Nr({
|
|
|
4066
4067
|
source: r,
|
|
4067
4068
|
params: e,
|
|
4068
4069
|
attribute: t,
|
|
4069
|
-
accessToken:
|
|
4070
|
-
fetcherOptions:
|
|
4070
|
+
accessToken: s,
|
|
4071
|
+
fetcherOptions: n
|
|
4071
4072
|
}) {
|
|
4072
4073
|
if (r.type.startsWith("query"))
|
|
4073
4074
|
return jr({
|
|
4074
4075
|
connection: r.connectionName,
|
|
4075
4076
|
baseUrl: r.apiBaseUrl,
|
|
4076
4077
|
apiVersion: r.apiVersion,
|
|
4077
|
-
accessToken:
|
|
4078
|
+
accessToken: s,
|
|
4078
4079
|
params: e,
|
|
4079
4080
|
query: r.data,
|
|
4080
4081
|
queryParameters: r.queryParameters,
|
|
4081
4082
|
attribute: t,
|
|
4082
|
-
fetcherOptions:
|
|
4083
|
+
fetcherOptions: n
|
|
4083
4084
|
});
|
|
4084
4085
|
if (r.type.startsWith("table"))
|
|
4085
4086
|
return Ir({
|
|
@@ -4087,15 +4088,15 @@ function Nr({
|
|
|
4087
4088
|
baseUrl: r.apiBaseUrl,
|
|
4088
4089
|
apiVersion: r.apiVersion,
|
|
4089
4090
|
params: e,
|
|
4090
|
-
accessToken:
|
|
4091
|
+
accessToken: s,
|
|
4091
4092
|
table: r.data,
|
|
4092
4093
|
attribute: t,
|
|
4093
|
-
fetcherOptions:
|
|
4094
|
+
fetcherOptions: n
|
|
4094
4095
|
});
|
|
4095
4096
|
if (r.type.startsWith("tileset"))
|
|
4096
4097
|
return Hr({
|
|
4097
4098
|
source: r,
|
|
4098
|
-
accessToken:
|
|
4099
|
+
accessToken: s,
|
|
4099
4100
|
target: r.data,
|
|
4100
4101
|
attribute: t
|
|
4101
4102
|
});
|
|
@@ -4105,20 +4106,20 @@ async function Hr({
|
|
|
4105
4106
|
source: r,
|
|
4106
4107
|
accessToken: e,
|
|
4107
4108
|
target: t,
|
|
4108
|
-
attribute:
|
|
4109
|
+
attribute: s
|
|
4109
4110
|
}) {
|
|
4110
|
-
const
|
|
4111
|
+
const n = await Ss({
|
|
4111
4112
|
connectionName: r.connectionName,
|
|
4112
4113
|
apiBaseUrl: r.apiBaseUrl,
|
|
4113
4114
|
accessToken: e,
|
|
4114
4115
|
clientId: r.clientId,
|
|
4115
4116
|
tableName: t
|
|
4116
4117
|
});
|
|
4117
|
-
if (!
|
|
4118
|
-
throw new Error(`${
|
|
4119
|
-
const i =
|
|
4118
|
+
if (!n?.tilestats?.layers?.[0]?.attributes)
|
|
4119
|
+
throw new Error(`${s} not found in tileset attributes`);
|
|
4120
|
+
const i = n.tilestats.layers[0].attributes.find((a) => a.attribute === s);
|
|
4120
4121
|
if (!i)
|
|
4121
|
-
throw new Error(`${
|
|
4122
|
+
throw new Error(`${s} not found in tileset attributes`);
|
|
4122
4123
|
return i;
|
|
4123
4124
|
}
|
|
4124
4125
|
export {
|
|
@@ -4127,65 +4128,65 @@ export {
|
|
|
4127
4128
|
$e as CartoBasemapURL,
|
|
4128
4129
|
re as CartoBasemaps,
|
|
4129
4130
|
So as CategoriesModel,
|
|
4130
|
-
|
|
4131
|
+
Ws as CustomCompositeEditMode,
|
|
4131
4132
|
kt as CustomEditableGeojsonLayer,
|
|
4132
|
-
|
|
4133
|
-
|
|
4133
|
+
dn as CustomMeasureAreaMode,
|
|
4134
|
+
fn as CustomMeasureBufferMode,
|
|
4134
4135
|
At as CustomMeasureDistanceMode,
|
|
4135
4136
|
tt as DEFAULT_LASSO_TOOLS_COLORS,
|
|
4136
|
-
|
|
4137
|
+
Ys as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
4137
4138
|
Ue as DEFAULT_LASSO_TOOLS_MODES,
|
|
4138
4139
|
xe as DEFAULT_LASSO_TOOLS_PROPS,
|
|
4139
4140
|
Te as DEFAULT_MASK_LAYER_PROPS,
|
|
4140
|
-
|
|
4141
|
-
|
|
4141
|
+
hn as DEFAULT_MEASUREMENT_TOOLS_MODES,
|
|
4142
|
+
gn as DEFAULT_MEASUREMENT_TOOLS_UNITS,
|
|
4142
4143
|
Ve as DEFAULT_MEASURE_COLORS,
|
|
4143
|
-
|
|
4144
|
+
qs as DeckGLComponent,
|
|
4144
4145
|
te as EditableEditType,
|
|
4145
4146
|
wo as FeaturesModel,
|
|
4146
4147
|
_o as FormulaModel,
|
|
4147
4148
|
De as GmapsBasemap,
|
|
4148
4149
|
Mo as HistogramModel,
|
|
4149
4150
|
ve as INTL_UNITS,
|
|
4150
|
-
|
|
4151
|
-
|
|
4151
|
+
vn as LassoTools,
|
|
4152
|
+
on as LassoToolsProvider,
|
|
4152
4153
|
Se as MAPS_BASEMAP,
|
|
4153
4154
|
me as MAP_LASSO_TOOLS_LAYER_ID,
|
|
4154
4155
|
Ce as MAP_MASK_LAYER_ID,
|
|
4155
4156
|
ce as MAP_MEASURE_LAYER_ID,
|
|
4156
|
-
|
|
4157
|
+
yn as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
4157
4158
|
lt as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
4158
4159
|
X as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
4159
4160
|
go as MapComponent,
|
|
4160
4161
|
Ie as MapMeasurementUnitAuto,
|
|
4161
|
-
|
|
4162
|
-
|
|
4162
|
+
mn as MapMeasurementUnitTurf,
|
|
4163
|
+
Zs as MapProvider,
|
|
4163
4164
|
Co as MapsProvider,
|
|
4164
4165
|
ie as MapsTypes,
|
|
4165
|
-
|
|
4166
|
-
|
|
4166
|
+
Dn as MeasurementTools,
|
|
4167
|
+
Mn as MeasurementToolsProvider,
|
|
4167
4168
|
Eo as RangeModel,
|
|
4168
4169
|
To as ScatterModel,
|
|
4169
4170
|
Lo as TableModel,
|
|
4170
4171
|
Po as TimeSeriesModel,
|
|
4171
4172
|
$o as ZoomControls,
|
|
4172
4173
|
ko as clientID,
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4174
|
+
nt as convertMetersTo,
|
|
4175
|
+
rn as createLassoToolsStore,
|
|
4176
|
+
Ks as createMapStore,
|
|
4177
|
+
_n as createMeasurementToolsStore,
|
|
4177
4178
|
pe as formatterTypes,
|
|
4178
|
-
|
|
4179
|
+
Ms as getCursorDefault,
|
|
4179
4180
|
ho as getDeckController,
|
|
4180
4181
|
vo as getFilterValues,
|
|
4181
|
-
|
|
4182
|
-
|
|
4182
|
+
sn as getLassoToolsLayer,
|
|
4183
|
+
Sn as getMeasurementToolsLayer,
|
|
4183
4184
|
Oe as getTextLayerFormattedDistance,
|
|
4184
|
-
|
|
4185
|
+
Es as getTooltipDefault,
|
|
4185
4186
|
Do as mappingLegendMeridian,
|
|
4186
4187
|
Ro as objectToHtml,
|
|
4187
4188
|
$t as sortLayers,
|
|
4188
|
-
|
|
4189
|
+
Vs as transitionFlyConfig,
|
|
4189
4190
|
br as useCategories,
|
|
4190
4191
|
Pt as useEventManager,
|
|
4191
4192
|
vr as useFeatures,
|
|
@@ -4195,7 +4196,7 @@ export {
|
|
|
4195
4196
|
Pr as useLassoToolsSpatialFilter,
|
|
4196
4197
|
Q as useLassoToolsState,
|
|
4197
4198
|
be as useLayerStore,
|
|
4198
|
-
|
|
4199
|
+
jn as useLayers,
|
|
4199
4200
|
Oo as useLegend,
|
|
4200
4201
|
Fo as useMapScreenshot,
|
|
4201
4202
|
q as useMapStore,
|