@carto/ps-react-maps 3.1.0-canary.3 → 3.2.0-canary.0
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
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Y = (
|
|
4
|
-
import { jsx as N, jsxs as
|
|
1
|
+
var gt = Object.defineProperty;
|
|
2
|
+
var yt = (r, e, t) => e in r ? gt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var Y = (r, e, t) => yt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as N, jsxs as Je } from "react/jsx-runtime";
|
|
5
5
|
import { c as C } from "react/compiler-runtime";
|
|
6
6
|
import { useEffect as B, useImperativeHandle as xe, useMemo as te, useCallback as G, useState as se, createContext as Ue, useContext as qe, useRef as ve } from "react";
|
|
7
|
-
import { MapProvider as
|
|
8
|
-
import
|
|
9
|
-
import { useMap as
|
|
10
|
-
import { GoogleMapsOverlay as
|
|
11
|
-
import { CompositeMode as
|
|
12
|
-
import { DataFilterExtension as
|
|
13
|
-
import { create as
|
|
14
|
-
import { FlyToInterpolator as
|
|
15
|
-
import { EventManager as
|
|
16
|
-
import { GeoJsonLayer as
|
|
17
|
-
import { useShallow as
|
|
18
|
-
import { area as je, centroid as
|
|
19
|
-
import { formatNumber as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { removeFilter as
|
|
7
|
+
import { MapProvider as ht, Map as St, useMap as vt } from "react-map-gl/maplibre";
|
|
8
|
+
import bt from "@deck.gl/react";
|
|
9
|
+
import { useMap as et, APIProvider as Mt, Map as Lt } from "@vis.gl/react-google-maps";
|
|
10
|
+
import { GoogleMapsOverlay as _t } from "@deck.gl/google-maps";
|
|
11
|
+
import { CompositeMode as Tt, TranslateMode as Et, ModifyMode as kt, DrawPolygonByDraggingMode as Pt, DrawCircleFromCenterMode as tt, DrawRectangleMode as Ct, DrawPolygonMode as wt, EditableGeoJsonLayer as Ft, MeasureAreaMode as Ot, getPickedEditHandle as Dt, MeasureDistanceMode as At, ViewMode as Rt } from "@deck.gl-community/editable-layers";
|
|
12
|
+
import { DataFilterExtension as $t, MaskExtension as xt } from "@deck.gl/extensions";
|
|
13
|
+
import { create as st, createStore as Ve, useStore as Ie } from "zustand";
|
|
14
|
+
import { FlyToInterpolator as Ut, WebMercatorViewport as qt } from "@deck.gl/core";
|
|
15
|
+
import { EventManager as Vt } from "mjolnir.js";
|
|
16
|
+
import { GeoJsonLayer as It } from "@deck.gl/layers";
|
|
17
|
+
import { useShallow as nt } from "zustand/shallow";
|
|
18
|
+
import { area as je, centroid as jt, lineIntersect as Nt } from "@turf/turf";
|
|
19
|
+
import { formatNumber as ot, formatCurrency as Ht } from "@carto/ps-utils";
|
|
20
|
+
import Bt from "convert-units";
|
|
21
|
+
import Gt from "convert-units/definitions/length";
|
|
22
|
+
import { removeFilter as Ne, addFilter as zt, WidgetRasterSource as Qt, WidgetTilesetSource as Zt, TileFormat as Kt, WidgetTableSource as Wt, WidgetQuerySource as Yt, createViewportSpatialFilter as Xt } from "@carto/api-client";
|
|
23
23
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
24
24
|
import Jt from "html2canvas";
|
|
25
25
|
import { multiPolygon as es } from "@turf/helpers";
|
|
@@ -63,25 +63,25 @@ const we = {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
function ts({
|
|
66
|
-
isDragging:
|
|
66
|
+
isDragging: r,
|
|
67
67
|
isHovering: e
|
|
68
68
|
}) {
|
|
69
|
-
return
|
|
69
|
+
return r ? "grabbing" : e ? "pointer" : "grab";
|
|
70
70
|
}
|
|
71
|
-
function ss(
|
|
72
|
-
return
|
|
73
|
-
html: `<div class='map-tooltip__content'>${
|
|
71
|
+
function ss(r) {
|
|
72
|
+
return r.html ? {
|
|
73
|
+
html: `<div class='map-tooltip__content'>${r.html}</div>`,
|
|
74
74
|
style: {
|
|
75
75
|
padding: "0",
|
|
76
76
|
background: "none"
|
|
77
77
|
}
|
|
78
78
|
} : null;
|
|
79
79
|
}
|
|
80
|
-
function ns(
|
|
80
|
+
function ns(r) {
|
|
81
81
|
const e = C(42);
|
|
82
|
-
let t, n, s, o,
|
|
83
|
-
e[0] !==
|
|
84
|
-
instanceRef:
|
|
82
|
+
let t, n, s, o, i, a, l, d, c, p, m, u;
|
|
83
|
+
e[0] !== r ? ({
|
|
84
|
+
instanceRef: i,
|
|
85
85
|
overlayRef: p,
|
|
86
86
|
controller: t,
|
|
87
87
|
id: o,
|
|
@@ -93,7 +93,7 @@ function ns(i) {
|
|
|
93
93
|
onLoad: d,
|
|
94
94
|
onViewStateChange: c,
|
|
95
95
|
...u
|
|
96
|
-
} =
|
|
96
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = c, e[10] = p, e[11] = m, e[12] = u) : (t = e[1], n = e[2], s = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], c = e[9], p = e[10], m = e[11], u = e[12]);
|
|
97
97
|
let g, f;
|
|
98
98
|
e[13] !== d ? (g = () => {
|
|
99
99
|
d({
|
|
@@ -105,8 +105,8 @@ function ns(i) {
|
|
|
105
105
|
});
|
|
106
106
|
}, f = [d], e[13] = d, e[14] = g, e[15] = f) : (g = e[14], f = e[15]), B(g, f);
|
|
107
107
|
let _, h;
|
|
108
|
-
e[16] !== a ? (h = a.filter(
|
|
109
|
-
const y = _, b =
|
|
108
|
+
e[16] !== a ? (h = a.filter(is).map(rs), e[16] = a, e[17] = h) : h = e[17], _ = h;
|
|
109
|
+
const y = _, b = i;
|
|
110
110
|
let v;
|
|
111
111
|
e[18] !== d ? (v = () => d({
|
|
112
112
|
type: "deckgl",
|
|
@@ -125,63 +125,63 @@ function ns(i) {
|
|
|
125
125
|
value: !0
|
|
126
126
|
}), e[24] = d, e[25] = T) : T = e[25];
|
|
127
127
|
let D;
|
|
128
|
-
e[26] !== l || e[27] !== T ? (D = /* @__PURE__ */ N(
|
|
128
|
+
e[26] !== l || e[27] !== T ? (D = /* @__PURE__ */ N(St, { reuseMaps: !0, mapStyle: l, onLoad: T, onRender: os }), e[26] = l, e[27] = T, e[28] = D) : D = e[28];
|
|
129
129
|
let w;
|
|
130
|
-
return e[29] !== y || e[30] !== t || e[31] !== n || e[32] !== s || e[33] !== o || e[34] !== c || e[35] !== u || e[36] !== D || e[37] !== b || e[38] !== v || e[39] !== S || e[40] !== M ? (w = /* @__PURE__ */ N(
|
|
130
|
+
return e[29] !== y || e[30] !== t || e[31] !== n || e[32] !== s || e[33] !== o || e[34] !== c || e[35] !== u || e[36] !== D || e[37] !== b || e[38] !== v || e[39] !== S || e[40] !== M ? (w = /* @__PURE__ */ N(ht, { children: /* @__PURE__ */ N("div", { className: "deckgl-map", children: /* @__PURE__ */ Je(bt, { controller: t, id: o, ref: b, layers: y, getCursor: n, getTooltip: s, onLoad: v, onViewStateChange: c, parameters: S, ...u, children: [
|
|
131
131
|
M,
|
|
132
132
|
D
|
|
133
133
|
] }) }) }), e[29] = y, e[30] = t, e[31] = n, e[32] = s, e[33] = o, e[34] = c, e[35] = u, e[36] = D, e[37] = b, e[38] = v, e[39] = S, e[40] = M, e[41] = w) : w = e[41], w;
|
|
134
134
|
}
|
|
135
135
|
function os() {
|
|
136
|
-
const
|
|
137
|
-
|
|
136
|
+
const r = document.querySelector(".maplibregl-compact-show");
|
|
137
|
+
r == null || r.classList.remove("maplibregl-compact-show");
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function rs(r) {
|
|
140
140
|
const {
|
|
141
141
|
type: e,
|
|
142
142
|
props: t
|
|
143
|
-
} =
|
|
143
|
+
} = r;
|
|
144
144
|
return new e(t);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return !!(
|
|
146
|
+
function is(r) {
|
|
147
|
+
return !!(r != null && r.type);
|
|
148
148
|
}
|
|
149
|
-
function as(
|
|
149
|
+
function as(r) {
|
|
150
150
|
const e = C(3), {
|
|
151
151
|
overlayRef: t
|
|
152
|
-
} =
|
|
152
|
+
} = r, {
|
|
153
153
|
default: n
|
|
154
|
-
} =
|
|
154
|
+
} = vt();
|
|
155
155
|
let s, o;
|
|
156
156
|
return e[0] !== n ? (s = () => n, o = [n], e[0] = n, e[1] = s, e[2] = o) : (s = e[1], o = e[2]), xe(t, s, o), null;
|
|
157
157
|
}
|
|
158
|
-
const ls = (
|
|
158
|
+
const ls = (r) => {
|
|
159
159
|
const e = C(9);
|
|
160
160
|
let t, n;
|
|
161
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = new
|
|
161
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = new _t({
|
|
162
162
|
interleaved: !0
|
|
163
163
|
}), e[0] = n) : n = e[0], t = n;
|
|
164
|
-
const s = t, o =
|
|
165
|
-
let
|
|
166
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
164
|
+
const s = t, o = et();
|
|
165
|
+
let i, a;
|
|
166
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (i = () => s, a = [s], e[1] = i, e[2] = a) : (i = e[1], a = e[2]), xe(r.instanceRef, i, a);
|
|
167
167
|
let l, d;
|
|
168
168
|
e[3] !== o ? (l = () => (s.setMap(o), () => {
|
|
169
169
|
s.finalize();
|
|
170
170
|
}), d = [s, o], e[3] = o, e[4] = l, e[5] = d) : (l = e[4], d = e[5]), B(l, d);
|
|
171
171
|
let c, p;
|
|
172
|
-
return e[6] !==
|
|
173
|
-
s.setProps(
|
|
174
|
-
}, p = [s,
|
|
172
|
+
return e[6] !== r ? (c = () => {
|
|
173
|
+
s.setProps(r);
|
|
174
|
+
}, p = [s, r], e[6] = r, e[7] = c, e[8] = p) : (c = e[7], p = e[8]), B(c, p), null;
|
|
175
175
|
};
|
|
176
176
|
function cs({
|
|
177
|
-
id:
|
|
177
|
+
id: r,
|
|
178
178
|
instanceRef: e,
|
|
179
179
|
basemap: t,
|
|
180
180
|
layers: n,
|
|
181
181
|
gmapsProps: {
|
|
182
182
|
apiKey: s,
|
|
183
183
|
APIProviderProps: o,
|
|
184
|
-
...
|
|
184
|
+
...i
|
|
185
185
|
} = {
|
|
186
186
|
apiKey: ""
|
|
187
187
|
},
|
|
@@ -239,7 +239,7 @@ function cs({
|
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
241
|
}, [e, c]);
|
|
242
|
-
return /* @__PURE__ */ N(
|
|
242
|
+
return /* @__PURE__ */ N(Mt, { apiKey: s, ...o, children: /* @__PURE__ */ N("div", { className: "deckgl-map", children: /* @__PURE__ */ Je(Lt, { id: r, mapTypeId: t, disableDefaultUI: !0, gestureHandling: "greedy", ...i, center: {
|
|
243
243
|
lat: ((f = p.initialViewState) == null ? void 0 : f.latitude) ?? 0,
|
|
244
244
|
lng: ((_ = p.initialViewState) == null ? void 0 : _.longitude) ?? 0
|
|
245
245
|
}, zoom: (((h = p.initialViewState) == null ? void 0 : h.zoom) ?? 0) + 1, tilt: (y = p.initialViewState) == null ? void 0 : y.pitch, heading: (b = p.initialViewState) == null ? void 0 : b.bearing, onTilesLoaded: () => {
|
|
@@ -248,8 +248,8 @@ function cs({
|
|
|
248
248
|
value: !0
|
|
249
249
|
}), g(p.initialViewState);
|
|
250
250
|
}, onBoundsChanged: (v) => g(u(v)), onZoomChanged: (v) => g(u(v)), children: [
|
|
251
|
-
/* @__PURE__ */ N(us, { id:
|
|
252
|
-
/* @__PURE__ */ N(ls, { id:
|
|
251
|
+
/* @__PURE__ */ N(us, { id: r, overlayRef: a }),
|
|
252
|
+
/* @__PURE__ */ N(ls, { id: r, instanceRef: e, layers: m, onLoad: () => {
|
|
253
253
|
d({
|
|
254
254
|
type: "deckgl",
|
|
255
255
|
value: !0
|
|
@@ -261,18 +261,18 @@ function cs({
|
|
|
261
261
|
}, ...p })
|
|
262
262
|
] }) }) });
|
|
263
263
|
}
|
|
264
|
-
function us(
|
|
264
|
+
function us(r) {
|
|
265
265
|
const e = C(3), {
|
|
266
266
|
id: t,
|
|
267
267
|
overlayRef: n
|
|
268
|
-
} =
|
|
269
|
-
let o,
|
|
270
|
-
return e[0] !== s ? (o = () => s,
|
|
268
|
+
} = r, s = et(t);
|
|
269
|
+
let o, i;
|
|
270
|
+
return e[0] !== s ? (o = () => s, i = [s], e[0] = s, e[1] = o, e[2] = i) : (o = e[1], i = e[2]), xe(n, o, i), null;
|
|
271
271
|
}
|
|
272
|
-
function ds(
|
|
272
|
+
function ds(r) {
|
|
273
273
|
const e = C(46);
|
|
274
|
-
let t, n, s, o,
|
|
275
|
-
e[0] !==
|
|
274
|
+
let t, n, s, o, i, a, l, d, c, p, m, u;
|
|
275
|
+
e[0] !== r ? ({
|
|
276
276
|
instanceRef: n,
|
|
277
277
|
overlayRef: o,
|
|
278
278
|
basemap: a,
|
|
@@ -284,8 +284,8 @@ function ds(i) {
|
|
|
284
284
|
getTooltip: m,
|
|
285
285
|
onLoad: s,
|
|
286
286
|
onViewStateChange: u,
|
|
287
|
-
...
|
|
288
|
-
} =
|
|
287
|
+
...i
|
|
288
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = c, e[10] = p, e[11] = m, e[12] = u) : (t = e[1], n = e[2], s = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], c = e[9], p = e[10], m = e[11], u = e[12]);
|
|
289
289
|
const g = a === void 0 ? K.positron : a, f = l === void 0 ? !0 : l, _ = d === void 0 ? "deck-gl-map" : d;
|
|
290
290
|
let h;
|
|
291
291
|
e[13] !== c ? (h = c === void 0 ? [] : c, e[13] = c, e[14] = h) : h = e[14];
|
|
@@ -310,13 +310,13 @@ function ds(i) {
|
|
|
310
310
|
s == null || s(x);
|
|
311
311
|
}, R = [x, s], e[19] = x, e[20] = s, e[21] = A, e[22] = R) : (A = e[21], R = e[22]), B(A, R), L) {
|
|
312
312
|
let P;
|
|
313
|
-
return e[23] !== g || e[24] !== f || e[25] !== b || e[26] !== v || e[27] !== t || e[28] !== _ || e[29] !== n || e[30] !== y || e[31] !== S || e[32] !== o || e[33] !==
|
|
313
|
+
return e[23] !== g || e[24] !== f || e[25] !== b || e[26] !== v || e[27] !== t || e[28] !== _ || e[29] !== n || e[30] !== y || e[31] !== S || e[32] !== o || e[33] !== i ? (P = /* @__PURE__ */ N(cs, { instanceRef: n, overlayRef: o, controller: f, id: _, basemap: g, layers: y, gmapsProps: t, getCursor: b, getTooltip: v, onLoad: F, onViewStateChange: S, ...i }), e[23] = g, e[24] = f, e[25] = b, e[26] = v, e[27] = t, e[28] = _, e[29] = n, e[30] = y, e[31] = S, e[32] = o, e[33] = i, e[34] = P) : P = e[34], P;
|
|
314
314
|
}
|
|
315
315
|
let V;
|
|
316
|
-
return e[35] !== f || e[36] !== b || e[37] !== v || e[38] !== _ || e[39] !== n || e[40] !== y || e[41] !== $ || e[42] !== S || e[43] !== o || e[44] !==
|
|
316
|
+
return e[35] !== f || e[36] !== b || e[37] !== v || e[38] !== _ || e[39] !== n || e[40] !== y || e[41] !== $ || e[42] !== S || e[43] !== o || e[44] !== i ? (V = /* @__PURE__ */ N(ns, { instanceRef: n, overlayRef: o, controller: f, id: _, layers: y, mapStyle: $, getCursor: b, getTooltip: v, onLoad: F, onViewStateChange: S, ...i }), e[35] = f, e[36] = b, e[37] = v, e[38] = _, e[39] = n, e[40] = y, e[41] = $, e[42] = S, e[43] = o, e[44] = i, e[45] = V) : V = e[45], V;
|
|
317
317
|
}
|
|
318
|
-
function fs(
|
|
319
|
-
return
|
|
318
|
+
function fs(r) {
|
|
319
|
+
return r;
|
|
320
320
|
}
|
|
321
321
|
function ms() {
|
|
322
322
|
return null;
|
|
@@ -329,9 +329,9 @@ const Q = {
|
|
|
329
329
|
finish: "finish",
|
|
330
330
|
addPosition: "addPosition"
|
|
331
331
|
};
|
|
332
|
-
class ps extends
|
|
332
|
+
class ps extends Tt {
|
|
333
333
|
constructor() {
|
|
334
|
-
super([new
|
|
334
|
+
super([new Et(), new kt()]);
|
|
335
335
|
}
|
|
336
336
|
handleKeyUp(e, t) {
|
|
337
337
|
super.handleKeyUp(e, t), e.key === "Enter" && (this.resetClickSequence(), t.onEdit({
|
|
@@ -341,8 +341,8 @@ class ps extends _t {
|
|
|
341
341
|
}));
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
const
|
|
345
|
-
id:
|
|
344
|
+
const ie = "lassoLayer", be = "maskLayer", gs = {
|
|
345
|
+
id: ie,
|
|
346
346
|
billboard: !1,
|
|
347
347
|
editHandlePointRadiusUnits: "pixels",
|
|
348
348
|
editHandlePointRadiusMinPixels: 1,
|
|
@@ -354,7 +354,7 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
354
354
|
lineWidthUnits: "pixels",
|
|
355
355
|
getLineWidth: 2,
|
|
356
356
|
lineWidthMinPixels: 2
|
|
357
|
-
},
|
|
357
|
+
}, He = {
|
|
358
358
|
editing: {
|
|
359
359
|
border: [3, 111, 226, 255],
|
|
360
360
|
fill: [3, 111, 226, 20.4],
|
|
@@ -367,14 +367,14 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
367
367
|
}, Oe = {
|
|
368
368
|
styles: {
|
|
369
369
|
colors: {
|
|
370
|
-
editing:
|
|
371
|
-
finished:
|
|
370
|
+
editing: He.editing,
|
|
371
|
+
finished: He.finished
|
|
372
372
|
}
|
|
373
373
|
},
|
|
374
374
|
labels: {
|
|
375
375
|
mask: "Mask"
|
|
376
376
|
}
|
|
377
|
-
}, ys = [new
|
|
377
|
+
}, ys = [new $t({
|
|
378
378
|
filterSize: 1
|
|
379
379
|
})], Se = {
|
|
380
380
|
id: be,
|
|
@@ -386,27 +386,27 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
386
386
|
}, De = {
|
|
387
387
|
polygon: {
|
|
388
388
|
value: "polygon",
|
|
389
|
-
mode:
|
|
389
|
+
mode: wt
|
|
390
390
|
},
|
|
391
391
|
rectangle: {
|
|
392
392
|
value: "rectangle",
|
|
393
|
-
mode:
|
|
393
|
+
mode: Ct
|
|
394
394
|
},
|
|
395
395
|
circle: {
|
|
396
396
|
value: "circle",
|
|
397
|
-
mode:
|
|
397
|
+
mode: tt
|
|
398
398
|
},
|
|
399
399
|
lasso: {
|
|
400
400
|
value: "lasso",
|
|
401
|
-
mode:
|
|
401
|
+
mode: Pt
|
|
402
402
|
},
|
|
403
403
|
edit: {
|
|
404
404
|
value: "edit",
|
|
405
405
|
mode: ps
|
|
406
406
|
}
|
|
407
|
-
}, ce =
|
|
407
|
+
}, ce = st((r) => ({
|
|
408
408
|
layers: {},
|
|
409
|
-
setLayer: (e, t) =>
|
|
409
|
+
setLayer: (e, t) => r((n) => {
|
|
410
410
|
var a;
|
|
411
411
|
const s = {
|
|
412
412
|
...n.layers
|
|
@@ -418,7 +418,7 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
418
418
|
const o = s[e] ?? {
|
|
419
419
|
type: null,
|
|
420
420
|
props: {}
|
|
421
|
-
},
|
|
421
|
+
}, i = [...o.props.extensions ?? [], ...((a = t.props) == null ? void 0 : a.extensions) ?? []].reduce((l, d) => (l.some((c) => c.equals(d)) || l.push(d), l), []);
|
|
422
422
|
return s[e] = {
|
|
423
423
|
...o,
|
|
424
424
|
...t,
|
|
@@ -426,7 +426,7 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
426
426
|
id: e,
|
|
427
427
|
...o.props,
|
|
428
428
|
...t.props,
|
|
429
|
-
extensions:
|
|
429
|
+
extensions: i
|
|
430
430
|
},
|
|
431
431
|
legend: {
|
|
432
432
|
...o.legend,
|
|
@@ -435,14 +435,20 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
435
435
|
}, {
|
|
436
436
|
layers: s
|
|
437
437
|
};
|
|
438
|
+
}),
|
|
439
|
+
removeLayer: (e) => r((t) => {
|
|
440
|
+
const n = {
|
|
441
|
+
...t.layers
|
|
442
|
+
};
|
|
443
|
+
return delete n[e], n;
|
|
438
444
|
})
|
|
439
445
|
})), hs = {
|
|
440
446
|
transitionDuration: "auto",
|
|
441
|
-
transitionInterpolator: new
|
|
447
|
+
transitionInterpolator: new Ut({
|
|
442
448
|
curve: 2
|
|
443
449
|
})
|
|
444
|
-
}, Ss = (
|
|
445
|
-
const e =
|
|
450
|
+
}, Ss = (r) => {
|
|
451
|
+
const e = r.reduce((t, n) => {
|
|
446
452
|
const {
|
|
447
453
|
id: s,
|
|
448
454
|
basemap: o
|
|
@@ -461,62 +467,62 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
461
467
|
}, {});
|
|
462
468
|
return (t, n) => ({
|
|
463
469
|
maps: e,
|
|
464
|
-
setBasemap: (s, o) => t((
|
|
470
|
+
setBasemap: (s, o) => t((i) => {
|
|
465
471
|
var c;
|
|
466
472
|
const {
|
|
467
473
|
type: a
|
|
468
|
-
} = de[
|
|
474
|
+
} = de[i.maps[s].basemap], {
|
|
469
475
|
type: l
|
|
470
|
-
} = de[o], d = a === l && !!((c =
|
|
476
|
+
} = de[o], d = a === l && !!((c = i.maps[s]) != null && c.isLoaded);
|
|
471
477
|
return {
|
|
472
478
|
maps: {
|
|
473
|
-
...
|
|
479
|
+
...i.maps,
|
|
474
480
|
[s]: {
|
|
475
|
-
...
|
|
481
|
+
...i.maps[s],
|
|
476
482
|
isLoaded: d,
|
|
477
483
|
basemap: o
|
|
478
484
|
}
|
|
479
485
|
}
|
|
480
486
|
};
|
|
481
487
|
}),
|
|
482
|
-
setLoad: (s, o) => t((
|
|
488
|
+
setLoad: (s, o) => t((i) => ({
|
|
483
489
|
maps: {
|
|
484
|
-
...
|
|
490
|
+
...i.maps,
|
|
485
491
|
[s]: {
|
|
486
|
-
...
|
|
492
|
+
...i.maps[s],
|
|
487
493
|
isLoaded: o
|
|
488
494
|
}
|
|
489
495
|
}
|
|
490
496
|
})),
|
|
491
497
|
getOverlayInstance: (s) => {
|
|
492
|
-
var
|
|
493
|
-
return (a = (
|
|
498
|
+
var i, a;
|
|
499
|
+
return (a = (i = n().maps[s]) == null ? void 0 : i.overlayRef) == null ? void 0 : a.current;
|
|
494
500
|
},
|
|
495
501
|
getDeckInstance: (s) => {
|
|
496
502
|
var a, l;
|
|
497
|
-
const
|
|
503
|
+
const i = (l = (a = n().maps[s]) == null ? void 0 : a.instanceRef) == null ? void 0 : l.current;
|
|
498
504
|
return (
|
|
499
505
|
// @ts-expect-error accessing protected props
|
|
500
|
-
(
|
|
506
|
+
(i == null ? void 0 : i.deck) ?? i._deck
|
|
501
507
|
);
|
|
502
508
|
},
|
|
503
509
|
getViewState: (s) => {
|
|
504
|
-
const
|
|
505
|
-
return
|
|
510
|
+
const i = n().getDeckInstance(s);
|
|
511
|
+
return i == null ? void 0 : i.viewState;
|
|
506
512
|
},
|
|
507
513
|
getViewports: (s, o) => {
|
|
508
514
|
const a = n().getDeckInstance(s);
|
|
509
515
|
return a == null ? void 0 : a.getViewports(o);
|
|
510
516
|
},
|
|
511
|
-
getViewport: (s, o = 0,
|
|
517
|
+
getViewport: (s, o = 0, i) => {
|
|
512
518
|
var d;
|
|
513
519
|
const l = n().getDeckInstance(s);
|
|
514
|
-
return (d = l == null ? void 0 : l.getViewports(
|
|
520
|
+
return (d = l == null ? void 0 : l.getViewports(i)) == null ? void 0 : d[o];
|
|
515
521
|
},
|
|
516
|
-
addLayers: (s, o) => t((
|
|
522
|
+
addLayers: (s, o) => t((i) => {
|
|
517
523
|
var c;
|
|
518
524
|
const a = {
|
|
519
|
-
...
|
|
525
|
+
...i.maps
|
|
520
526
|
}, l = ((c = a[s]) == null ? void 0 : c.layers) ?? [], d = /* @__PURE__ */ new Set([...l, ...o]);
|
|
521
527
|
return a[s] = {
|
|
522
528
|
...a[s],
|
|
@@ -525,10 +531,10 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
525
531
|
maps: a
|
|
526
532
|
};
|
|
527
533
|
}),
|
|
528
|
-
removeLayers: (s, o) => t((
|
|
534
|
+
removeLayers: (s, o) => t((i) => {
|
|
529
535
|
var d;
|
|
530
536
|
const a = {
|
|
531
|
-
...
|
|
537
|
+
...i.maps
|
|
532
538
|
}, l = ((d = a[s]) == null ? void 0 : d.layers) ?? [];
|
|
533
539
|
return a[s] = {
|
|
534
540
|
...a[s],
|
|
@@ -538,8 +544,8 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
538
544
|
};
|
|
539
545
|
})
|
|
540
546
|
});
|
|
541
|
-
}, vs = (
|
|
542
|
-
const e =
|
|
547
|
+
}, vs = (r) => {
|
|
548
|
+
const e = r.reduce((t, n) => {
|
|
543
549
|
const {
|
|
544
550
|
id: s
|
|
545
551
|
} = n;
|
|
@@ -554,8 +560,8 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
554
560
|
}
|
|
555
561
|
}))
|
|
556
562
|
});
|
|
557
|
-
}, bs = (
|
|
558
|
-
const e =
|
|
563
|
+
}, bs = (r) => {
|
|
564
|
+
const e = r.reduce((t, n) => (n.viewState && (t.viewStates[n.id] = n.viewState, t.viewports[n.id] = null), t), {
|
|
559
565
|
viewStates: {},
|
|
560
566
|
viewports: {}
|
|
561
567
|
});
|
|
@@ -565,58 +571,58 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
565
571
|
var a;
|
|
566
572
|
const o = n();
|
|
567
573
|
if (!((a = o.maps[s]) != null && a.isLoaded)) return;
|
|
568
|
-
const
|
|
574
|
+
const i = new qt(o.viewStates[s]);
|
|
569
575
|
t((l) => ({
|
|
570
576
|
viewports: {
|
|
571
577
|
...l.viewports,
|
|
572
|
-
[s]:
|
|
578
|
+
[s]: i
|
|
573
579
|
}
|
|
574
580
|
}));
|
|
575
581
|
},
|
|
576
582
|
viewStates: e.viewStates,
|
|
577
|
-
setViewState: (s, o) => t((
|
|
583
|
+
setViewState: (s, o) => t((i) => ({
|
|
578
584
|
viewStates: {
|
|
579
|
-
...
|
|
585
|
+
...i.viewStates,
|
|
580
586
|
[s]: {
|
|
581
|
-
...
|
|
587
|
+
...i.viewStates[s],
|
|
582
588
|
...o
|
|
583
589
|
}
|
|
584
590
|
}
|
|
585
591
|
})),
|
|
586
|
-
setZoom: (s, o) => t((
|
|
592
|
+
setZoom: (s, o) => t((i) => ({
|
|
587
593
|
viewStates: {
|
|
588
|
-
...
|
|
594
|
+
...i.viewStates,
|
|
589
595
|
[s]: {
|
|
590
|
-
...
|
|
596
|
+
...i.viewStates[s],
|
|
591
597
|
zoom: o
|
|
592
598
|
}
|
|
593
599
|
}
|
|
594
600
|
})),
|
|
595
|
-
setMinZoom: (s, o) => t((
|
|
601
|
+
setMinZoom: (s, o) => t((i) => ({
|
|
596
602
|
viewStates: {
|
|
597
|
-
...
|
|
603
|
+
...i.viewStates,
|
|
598
604
|
[s]: {
|
|
599
|
-
...
|
|
605
|
+
...i.viewStates[s],
|
|
600
606
|
minZoom: o
|
|
601
607
|
}
|
|
602
608
|
}
|
|
603
609
|
})),
|
|
604
|
-
setMaxZoom: (s, o) => t((
|
|
610
|
+
setMaxZoom: (s, o) => t((i) => ({
|
|
605
611
|
viewStates: {
|
|
606
|
-
...
|
|
612
|
+
...i.viewStates,
|
|
607
613
|
[s]: {
|
|
608
|
-
...
|
|
614
|
+
...i.viewStates[s],
|
|
609
615
|
maxZoom: o
|
|
610
616
|
}
|
|
611
617
|
}
|
|
612
618
|
}))
|
|
613
619
|
});
|
|
614
|
-
}, Ms = (
|
|
620
|
+
}, Ms = (r, e) => ({
|
|
615
621
|
fitBounds: (t, n, s) => {
|
|
616
|
-
const o = e(),
|
|
617
|
-
if (!
|
|
622
|
+
const o = e(), i = o.getViewport(t);
|
|
623
|
+
if (!i) return;
|
|
618
624
|
const l = {
|
|
619
|
-
...
|
|
625
|
+
...i == null ? void 0 : i.fitBounds(n, s == null ? void 0 : s.boundsOptions),
|
|
620
626
|
...s == null ? void 0 : s.viewStateOptions
|
|
621
627
|
};
|
|
622
628
|
o.setViewState(t, l);
|
|
@@ -633,37 +639,37 @@ const re = "lassoLayer", be = "maskLayer", gs = {
|
|
|
633
639
|
};
|
|
634
640
|
o.setViewState(t, l);
|
|
635
641
|
}
|
|
636
|
-
}), Ls = (
|
|
637
|
-
...Ss(
|
|
638
|
-
...vs(
|
|
639
|
-
...bs(
|
|
642
|
+
}), Ls = (r) => Ve()((...e) => ({
|
|
643
|
+
...Ss(r)(...e),
|
|
644
|
+
...vs(r)(...e),
|
|
645
|
+
...bs(r)(...e),
|
|
640
646
|
...Ms(...e)
|
|
641
|
-
})),
|
|
642
|
-
function _s(
|
|
647
|
+
})), rt = Ue({});
|
|
648
|
+
function _s(r) {
|
|
643
649
|
const e = C(5), {
|
|
644
650
|
children: t,
|
|
645
651
|
values: n
|
|
646
|
-
} =
|
|
652
|
+
} = r;
|
|
647
653
|
let s;
|
|
648
654
|
e[0] !== n ? (s = Ls(n), e[0] = n, e[1] = s) : s = e[1];
|
|
649
655
|
const [o] = se(s);
|
|
650
|
-
let
|
|
651
|
-
return e[2] !== t || e[3] !== o ? (
|
|
656
|
+
let i;
|
|
657
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(rt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
652
658
|
}
|
|
653
|
-
function O(
|
|
654
|
-
const e = qe(
|
|
659
|
+
function O(r) {
|
|
660
|
+
const e = qe(rt);
|
|
655
661
|
if (!Object.keys(e).length)
|
|
656
662
|
throw new Error("Missing MapProvider in the tree");
|
|
657
|
-
return Ie(e,
|
|
663
|
+
return Ie(e, r);
|
|
658
664
|
}
|
|
659
|
-
function Ts(
|
|
660
|
-
return
|
|
665
|
+
function Ts(r) {
|
|
666
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
661
667
|
}
|
|
662
|
-
var Ae,
|
|
668
|
+
var Ae, Be;
|
|
663
669
|
function Es() {
|
|
664
|
-
if (
|
|
665
|
-
|
|
666
|
-
var
|
|
670
|
+
if (Be) return Ae;
|
|
671
|
+
Be = 1;
|
|
672
|
+
var r = function(y) {
|
|
667
673
|
return e(y) && !t(y);
|
|
668
674
|
};
|
|
669
675
|
function e(h) {
|
|
@@ -677,11 +683,11 @@ function Es() {
|
|
|
677
683
|
function o(h) {
|
|
678
684
|
return h.$$typeof === s;
|
|
679
685
|
}
|
|
680
|
-
function
|
|
686
|
+
function i(h) {
|
|
681
687
|
return Array.isArray(h) ? [] : {};
|
|
682
688
|
}
|
|
683
689
|
function a(h, y) {
|
|
684
|
-
return y.clone !== !1 && y.isMergeableObject(h) ? f(
|
|
690
|
+
return y.clone !== !1 && y.isMergeableObject(h) ? f(i(h), h, y) : h;
|
|
685
691
|
}
|
|
686
692
|
function l(h, y, b) {
|
|
687
693
|
return h.concat(y).map(function(v) {
|
|
@@ -721,7 +727,7 @@ function Es() {
|
|
|
721
727
|
}), v;
|
|
722
728
|
}
|
|
723
729
|
function f(h, y, b) {
|
|
724
|
-
b = b || {}, b.arrayMerge = b.arrayMerge || l, b.isMergeableObject = b.isMergeableObject ||
|
|
730
|
+
b = b || {}, b.arrayMerge = b.arrayMerge || l, b.isMergeableObject = b.isMergeableObject || r, b.cloneUnlessOtherwiseSpecified = a;
|
|
725
731
|
var v = Array.isArray(y), S = Array.isArray(h), M = v === S;
|
|
726
732
|
return M ? v ? b.arrayMerge(h, y, b) : g(h, y, b) : a(y, b);
|
|
727
733
|
}
|
|
@@ -736,8 +742,8 @@ function Es() {
|
|
|
736
742
|
return Ae = _, Ae;
|
|
737
743
|
}
|
|
738
744
|
var ks = Es();
|
|
739
|
-
const le = /* @__PURE__ */ Ts(ks),
|
|
740
|
-
class it extends
|
|
745
|
+
const le = /* @__PURE__ */ Ts(ks), Ge = ["anyclick", "pointermove", "panstart", "panmove", "panend", "keyup"];
|
|
746
|
+
class it extends Ft {
|
|
741
747
|
updateState({
|
|
742
748
|
props: e,
|
|
743
749
|
oldProps: t,
|
|
@@ -755,7 +761,7 @@ class it extends wt {
|
|
|
755
761
|
const e = this._getEventManager(), {
|
|
756
762
|
eventHandler: t
|
|
757
763
|
} = this.state._editableLayerState;
|
|
758
|
-
for (const n of
|
|
764
|
+
for (const n of Ge)
|
|
759
765
|
e.on(n, t, {
|
|
760
766
|
// give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
|
|
761
767
|
priority: 100
|
|
@@ -765,7 +771,7 @@ class it extends wt {
|
|
|
765
771
|
const t = e ?? this._getEventManager(), {
|
|
766
772
|
eventHandler: n
|
|
767
773
|
} = this.state._editableLayerState;
|
|
768
|
-
for (const s of
|
|
774
|
+
for (const s of Ge)
|
|
769
775
|
t.off(s, n);
|
|
770
776
|
}
|
|
771
777
|
_getEventManager() {
|
|
@@ -774,7 +780,7 @@ class it extends wt {
|
|
|
774
780
|
}
|
|
775
781
|
}
|
|
776
782
|
function Ps({
|
|
777
|
-
mode:
|
|
783
|
+
mode: r,
|
|
778
784
|
...e
|
|
779
785
|
}) {
|
|
780
786
|
const t = Cs(e);
|
|
@@ -782,18 +788,18 @@ function Ps({
|
|
|
782
788
|
type: it,
|
|
783
789
|
props: {
|
|
784
790
|
...t,
|
|
785
|
-
mode:
|
|
791
|
+
mode: r
|
|
786
792
|
}
|
|
787
793
|
};
|
|
788
794
|
}
|
|
789
795
|
function Cs({
|
|
790
|
-
layerProps:
|
|
796
|
+
layerProps: r,
|
|
791
797
|
onEdit: e,
|
|
792
798
|
getLineColor: t,
|
|
793
799
|
getFillColor: n,
|
|
794
800
|
pointColor: s
|
|
795
801
|
}) {
|
|
796
|
-
const o = le(
|
|
802
|
+
const o = le(r, {
|
|
797
803
|
modeConfig: {
|
|
798
804
|
// // We force distance due to conversion is addressed at feature getText level
|
|
799
805
|
// formatTooltip: (_distance: number) => {
|
|
@@ -802,7 +808,7 @@ function Cs({
|
|
|
802
808
|
preventOverlappingLines: !0
|
|
803
809
|
},
|
|
804
810
|
onEdit: e
|
|
805
|
-
}),
|
|
811
|
+
}), i = le(gs, {
|
|
806
812
|
getTentativeLineColor: t,
|
|
807
813
|
getTentativeFillColor: n,
|
|
808
814
|
getLineColor: t,
|
|
@@ -811,19 +817,19 @@ function Cs({
|
|
|
811
817
|
getEditHandlePointOutlineColor: s.outline,
|
|
812
818
|
dataComparator: (l, d) => l.features[0] === d.features[0]
|
|
813
819
|
});
|
|
814
|
-
return le(
|
|
820
|
+
return le(i, o);
|
|
815
821
|
}
|
|
816
|
-
const ws = (
|
|
817
|
-
data:
|
|
822
|
+
const ws = (r) => Ve()((e) => ({
|
|
823
|
+
data: r.reduce((n, s) => {
|
|
818
824
|
const {
|
|
819
825
|
enabled: o = !1,
|
|
820
|
-
mapId:
|
|
826
|
+
mapId: i,
|
|
821
827
|
modeInstance: a = new De.polygon.mode(),
|
|
822
828
|
modes: l = De,
|
|
823
829
|
modeSelected: d = De.polygon.value,
|
|
824
830
|
values: c = {}
|
|
825
831
|
} = s;
|
|
826
|
-
return n[
|
|
832
|
+
return n[i] = {
|
|
827
833
|
enabled: o,
|
|
828
834
|
modeInstance: a,
|
|
829
835
|
modes: l,
|
|
@@ -844,9 +850,9 @@ const ws = (i) => Ve()((e) => ({
|
|
|
844
850
|
}));
|
|
845
851
|
},
|
|
846
852
|
setValue: (n, s, o) => {
|
|
847
|
-
e((
|
|
853
|
+
e((i) => {
|
|
848
854
|
const a = {
|
|
849
|
-
...
|
|
855
|
+
...i.data[n].values
|
|
850
856
|
}, l = a[s] ?? {
|
|
851
857
|
type: "mask"
|
|
852
858
|
};
|
|
@@ -856,9 +862,9 @@ const ws = (i) => Ve()((e) => ({
|
|
|
856
862
|
id: s
|
|
857
863
|
}, o || delete a[s], {
|
|
858
864
|
data: {
|
|
859
|
-
...
|
|
865
|
+
...i.data,
|
|
860
866
|
[n]: {
|
|
861
|
-
...
|
|
867
|
+
...i.data[n],
|
|
862
868
|
values: a
|
|
863
869
|
}
|
|
864
870
|
}
|
|
@@ -866,15 +872,15 @@ const ws = (i) => Ve()((e) => ({
|
|
|
866
872
|
});
|
|
867
873
|
},
|
|
868
874
|
setVisibility: (n, s, o) => {
|
|
869
|
-
e((
|
|
875
|
+
e((i) => {
|
|
870
876
|
const a = {
|
|
871
|
-
...
|
|
877
|
+
...i.data[n].values
|
|
872
878
|
}, l = a[s] ?? {};
|
|
873
879
|
return l.properties.visible = o, {
|
|
874
880
|
data: {
|
|
875
|
-
...
|
|
881
|
+
...i.data,
|
|
876
882
|
[n]: {
|
|
877
|
-
...
|
|
883
|
+
...i.data[n],
|
|
878
884
|
values: {
|
|
879
885
|
...a,
|
|
880
886
|
[s]: l
|
|
@@ -906,48 +912,48 @@ const ws = (i) => Ve()((e) => ({
|
|
|
906
912
|
}
|
|
907
913
|
}));
|
|
908
914
|
}
|
|
909
|
-
})),
|
|
910
|
-
function Fs(
|
|
915
|
+
})), at = Ue({});
|
|
916
|
+
function Fs(r) {
|
|
911
917
|
const e = C(5), {
|
|
912
918
|
children: t,
|
|
913
919
|
values: n
|
|
914
|
-
} =
|
|
920
|
+
} = r;
|
|
915
921
|
let s;
|
|
916
922
|
e[0] !== n ? (s = () => ws(n), e[0] = n, e[1] = s) : s = e[1];
|
|
917
923
|
const [o] = se(s);
|
|
918
|
-
let
|
|
919
|
-
return e[2] !== t || e[3] !== o ? (
|
|
924
|
+
let i;
|
|
925
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(at.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
920
926
|
}
|
|
921
|
-
function H(
|
|
922
|
-
const e = qe(
|
|
927
|
+
function H(r) {
|
|
928
|
+
const e = qe(at);
|
|
923
929
|
if (!Object.keys(e).length)
|
|
924
930
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
925
|
-
return Ie(e,
|
|
931
|
+
return Ie(e, r);
|
|
926
932
|
}
|
|
927
933
|
function Os({
|
|
928
|
-
mapId:
|
|
934
|
+
mapId: r,
|
|
929
935
|
children: e
|
|
930
936
|
}) {
|
|
931
937
|
const t = H((u) => {
|
|
932
938
|
var g;
|
|
933
|
-
return (g = u.data[
|
|
939
|
+
return (g = u.data[r]) == null ? void 0 : g.enabled;
|
|
934
940
|
}), n = H((u) => u.setEnabled), s = H((u) => {
|
|
935
941
|
var g;
|
|
936
|
-
return (g = u.data[
|
|
937
|
-
}), o = H((u) => u.setValue),
|
|
942
|
+
return (g = u.data[r]) == null ? void 0 : g.values;
|
|
943
|
+
}), o = H((u) => u.setValue), i = H((u) => u.setVisibility), a = H((u) => {
|
|
938
944
|
var g;
|
|
939
|
-
return (g = u.data[
|
|
945
|
+
return (g = u.data[r]) == null ? void 0 : g.modeSelected;
|
|
940
946
|
}), l = H((u) => u.setModeSelected), d = H((u) => {
|
|
941
947
|
var g;
|
|
942
|
-
return (g = u.data[
|
|
948
|
+
return (g = u.data[r]) == null ? void 0 : g.modes;
|
|
943
949
|
}), c = H((u) => u.setModeInstance);
|
|
944
950
|
B(() => {
|
|
945
951
|
const u = d[a];
|
|
946
952
|
if (u && t) {
|
|
947
953
|
const g = u.mode;
|
|
948
|
-
c(
|
|
954
|
+
c(r, new g());
|
|
949
955
|
}
|
|
950
|
-
}, [t,
|
|
956
|
+
}, [t, r, a, d, c]);
|
|
951
957
|
const [
|
|
952
958
|
p
|
|
953
959
|
// , draw
|
|
@@ -965,10 +971,10 @@ function Os({
|
|
|
965
971
|
// , draw
|
|
966
972
|
];
|
|
967
973
|
}, [s]), m = G((u) => {
|
|
968
|
-
n(
|
|
969
|
-
}, [
|
|
974
|
+
n(r, !!u), l(r, u);
|
|
975
|
+
}, [r, n, l]);
|
|
970
976
|
return e({
|
|
971
|
-
mapId:
|
|
977
|
+
mapId: r,
|
|
972
978
|
enabled: t,
|
|
973
979
|
modes: d,
|
|
974
980
|
modeSelected: a,
|
|
@@ -976,44 +982,44 @@ function Os({
|
|
|
976
982
|
mask: p
|
|
977
983
|
// draw,
|
|
978
984
|
},
|
|
979
|
-
setValue: G((u) => o(
|
|
980
|
-
setEnabled: G((u) => n(
|
|
981
|
-
setVisibility: G((u, g) => r
|
|
985
|
+
setValue: G((u) => o(r, u), [r, o]),
|
|
986
|
+
setEnabled: G((u) => n(r, u), [r, n]),
|
|
987
|
+
setVisibility: G((u, g) => i(r, u, g), [r, i]),
|
|
982
988
|
setModeSelected: m
|
|
983
989
|
});
|
|
984
990
|
}
|
|
985
|
-
function
|
|
986
|
-
values:
|
|
991
|
+
function lt({
|
|
992
|
+
values: r
|
|
987
993
|
}) {
|
|
988
|
-
return Object.values(
|
|
994
|
+
return Object.values(r ?? {}).filter((e) => e.type === "mask");
|
|
989
995
|
}
|
|
990
|
-
const Ds =
|
|
991
|
-
length:
|
|
996
|
+
const Ds = Bt({
|
|
997
|
+
length: Gt
|
|
992
998
|
});
|
|
993
|
-
function
|
|
994
|
-
return Ds(
|
|
999
|
+
function ze(r, e) {
|
|
1000
|
+
return Ds(r).from(Ke[q.meter]).to(Ke[e]);
|
|
995
1001
|
}
|
|
996
|
-
const
|
|
1002
|
+
const Qe = 1e4;
|
|
997
1003
|
function Me({
|
|
998
|
-
meters:
|
|
1004
|
+
meters: r,
|
|
999
1005
|
unit: e,
|
|
1000
1006
|
locale: t,
|
|
1001
1007
|
options: {
|
|
1002
1008
|
autoSplitNumber: n,
|
|
1003
1009
|
...s
|
|
1004
1010
|
} = {
|
|
1005
|
-
autoSplitNumber:
|
|
1011
|
+
autoSplitNumber: Qe
|
|
1006
1012
|
}
|
|
1007
1013
|
}) {
|
|
1008
|
-
const o = e === $e["m-km"],
|
|
1014
|
+
const o = e === $e["m-km"], i = e === $e["ft-mi"], a = o || i;
|
|
1009
1015
|
let l, d;
|
|
1010
1016
|
if (a) {
|
|
1011
|
-
const c =
|
|
1017
|
+
const c = r < (n ?? Qe);
|
|
1012
1018
|
let p = c ? q.meter : q.kilometer;
|
|
1013
|
-
l = c ? ue.meter : ue.kilometer,
|
|
1019
|
+
l = c ? ue.meter : ue.kilometer, i && (l = c ? ue.feet : ue.mile, p = c ? q.feet : q.mile), d = ze(r, p);
|
|
1014
1020
|
} else
|
|
1015
|
-
l = ue[e], d =
|
|
1016
|
-
return `${
|
|
1021
|
+
l = ue[e], d = ze(r, e);
|
|
1022
|
+
return `${ot(d, t, {
|
|
1017
1023
|
style: "unit",
|
|
1018
1024
|
unit: l,
|
|
1019
1025
|
unitDisplay: "short",
|
|
@@ -1023,18 +1029,18 @@ function Me({
|
|
|
1023
1029
|
...s
|
|
1024
1030
|
})}`;
|
|
1025
1031
|
}
|
|
1026
|
-
function co(
|
|
1032
|
+
function co(r, {
|
|
1027
1033
|
hasDoubleClickZoom: e
|
|
1028
1034
|
}) {
|
|
1029
|
-
return typeof
|
|
1035
|
+
return typeof r == "boolean" ? {
|
|
1030
1036
|
doubleClickZoom: e
|
|
1031
1037
|
} : {
|
|
1032
|
-
...
|
|
1038
|
+
...r,
|
|
1033
1039
|
doubleClickZoom: e
|
|
1034
1040
|
};
|
|
1035
1041
|
}
|
|
1036
|
-
function
|
|
1037
|
-
if (
|
|
1042
|
+
function ct(r, e, t) {
|
|
1043
|
+
if (r > 0) {
|
|
1038
1044
|
const {
|
|
1039
1045
|
formatTooltip: n,
|
|
1040
1046
|
turfOptions: s
|
|
@@ -1043,19 +1049,19 @@ function lt(i, e, t) {
|
|
|
1043
1049
|
units: "kilometers"
|
|
1044
1050
|
}
|
|
1045
1051
|
}, o = s == null ? void 0 : s.units;
|
|
1046
|
-
let
|
|
1047
|
-
n ?
|
|
1052
|
+
let i;
|
|
1053
|
+
n ? i = n(r) : i = `${parseFloat(r.toString()).toFixed(2)} ${o}`;
|
|
1048
1054
|
const {
|
|
1049
1055
|
measurementCallback: a
|
|
1050
1056
|
} = t;
|
|
1051
|
-
return a && a(
|
|
1057
|
+
return a && a(r), [{
|
|
1052
1058
|
position: e,
|
|
1053
|
-
text:
|
|
1059
|
+
text: i
|
|
1054
1060
|
}];
|
|
1055
1061
|
}
|
|
1056
1062
|
return [];
|
|
1057
1063
|
}
|
|
1058
|
-
class As extends
|
|
1064
|
+
class As extends Ot {
|
|
1059
1065
|
constructor() {
|
|
1060
1066
|
super(...arguments);
|
|
1061
1067
|
Y(this, "_isMeasuringSessionFinished", !1);
|
|
@@ -1070,12 +1076,12 @@ class As extends Ft {
|
|
|
1070
1076
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1071
1077
|
const {
|
|
1072
1078
|
picks: s
|
|
1073
|
-
} = t, o =
|
|
1079
|
+
} = t, o = Dt(s), i = this.getClickSequence();
|
|
1074
1080
|
let a = !1;
|
|
1075
1081
|
!o && !this.allowOverlapping(n) && (this.addClickSequence(t), a = !0), this.area = je({
|
|
1076
1082
|
type: "Polygon",
|
|
1077
1083
|
coordinates: [this.getClickSequence()]
|
|
1078
|
-
}), this.isFinalizedEdition(
|
|
1084
|
+
}), this.isFinalizedEdition(i, o) ? this.finalizeEdition(n) : a && n.onEdit({
|
|
1079
1085
|
// data is the same
|
|
1080
1086
|
updatedData: n.data,
|
|
1081
1087
|
editType: "addTentativePosition",
|
|
@@ -1093,8 +1099,8 @@ class As extends Ft {
|
|
|
1093
1099
|
super.handlePointerMove(t, n);
|
|
1094
1100
|
const s = this.getTentativeGuide(n);
|
|
1095
1101
|
if (s && s.geometry.type === "Polygon") {
|
|
1096
|
-
const o =
|
|
1097
|
-
this.area = je(s), this.tooltips =
|
|
1102
|
+
const o = jt(s);
|
|
1103
|
+
this.area = je(s), this.tooltips = ct(this.area, o.geometry.coordinates, n.modeConfig);
|
|
1098
1104
|
}
|
|
1099
1105
|
}
|
|
1100
1106
|
resetClickSequence() {
|
|
@@ -1120,14 +1126,14 @@ class As extends Ft {
|
|
|
1120
1126
|
const s = this.getClickSequence();
|
|
1121
1127
|
if (s.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1122
1128
|
((o = t.modeConfig) != null && o.preventOverlappingLines)) {
|
|
1123
|
-
const
|
|
1129
|
+
const i = {
|
|
1124
1130
|
type: "LineString",
|
|
1125
1131
|
coordinates: [...s, s[0]]
|
|
1126
1132
|
}, a = {
|
|
1127
1133
|
type: "LineString",
|
|
1128
1134
|
coordinates: [...s.slice(0, s.length - 1)]
|
|
1129
1135
|
};
|
|
1130
|
-
|
|
1136
|
+
Nt(i, a).features.length > 0 && (n = !0);
|
|
1131
1137
|
}
|
|
1132
1138
|
return n;
|
|
1133
1139
|
}
|
|
@@ -1174,7 +1180,7 @@ class As extends Ft {
|
|
|
1174
1180
|
}) + "2";
|
|
1175
1181
|
}
|
|
1176
1182
|
}
|
|
1177
|
-
class Rs extends
|
|
1183
|
+
class Rs extends tt {
|
|
1178
1184
|
constructor() {
|
|
1179
1185
|
super(...arguments);
|
|
1180
1186
|
Y(this, "_isMeasuringSessionFinished", !1);
|
|
@@ -1189,7 +1195,7 @@ class Rs extends et {
|
|
|
1189
1195
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this._currentArea = 0), super.handleClick(t, n);
|
|
1190
1196
|
}
|
|
1191
1197
|
handlePointerMove(t, n) {
|
|
1192
|
-
this._isMeasuringSessionFinished || (super.handlePointerMove(t, n), this.tooltips =
|
|
1198
|
+
this._isMeasuringSessionFinished || (super.handlePointerMove(t, n), this.tooltips = ct(this.areaCircle, this.position, n.modeConfig));
|
|
1193
1199
|
}
|
|
1194
1200
|
checkAndFinishPolygon(t) {
|
|
1195
1201
|
const n = this.getClickSequence(), s = this.getTentativeGuide(t);
|
|
@@ -1250,7 +1256,7 @@ class Rs extends et {
|
|
|
1250
1256
|
}) + "2";
|
|
1251
1257
|
}
|
|
1252
1258
|
}
|
|
1253
|
-
class
|
|
1259
|
+
class ut extends At {
|
|
1254
1260
|
handleClick(e, t) {
|
|
1255
1261
|
super.handleClick(e, t), t.onEdit({
|
|
1256
1262
|
// data is the same
|
|
@@ -1338,7 +1344,7 @@ const ee = "mapMeasureLayer", $s = {
|
|
|
1338
1344
|
editing: [23, 102, 214, 255],
|
|
1339
1345
|
finished: [71, 219, 153, 255],
|
|
1340
1346
|
point: [255, 255, 255, 255]
|
|
1341
|
-
},
|
|
1347
|
+
}, Ze = {
|
|
1342
1348
|
styles: {
|
|
1343
1349
|
colors: {
|
|
1344
1350
|
editing: Re.editing,
|
|
@@ -1362,7 +1368,7 @@ const ee = "mapMeasureLayer", $s = {
|
|
|
1362
1368
|
meters: "meters",
|
|
1363
1369
|
kilometer: "kilometers",
|
|
1364
1370
|
mile: "miles"
|
|
1365
|
-
},
|
|
1371
|
+
}, Ke = {
|
|
1366
1372
|
[q.kilometer]: "km",
|
|
1367
1373
|
[q.meter]: "m",
|
|
1368
1374
|
[q.centimeter]: "cm",
|
|
@@ -1415,10 +1421,10 @@ const ee = "mapMeasureLayer", $s = {
|
|
|
1415
1421
|
value: "feet",
|
|
1416
1422
|
system: "imperial"
|
|
1417
1423
|
}
|
|
1418
|
-
},
|
|
1424
|
+
}, We = [z["m-km"], z.kilometer, z.meter, z["ft-mi"], z.mile, z.feet], Us = [z["m-km"], z.kilometer, z.meter, z["ft-mi"], z.mile, z.feet], qs = {
|
|
1419
1425
|
distance: {
|
|
1420
1426
|
value: "distance",
|
|
1421
|
-
mode:
|
|
1427
|
+
mode: ut
|
|
1422
1428
|
},
|
|
1423
1429
|
buffer: {
|
|
1424
1430
|
value: "buffer",
|
|
@@ -1429,27 +1435,27 @@ const ee = "mapMeasureLayer", $s = {
|
|
|
1429
1435
|
mode: As
|
|
1430
1436
|
}
|
|
1431
1437
|
}, Vs = {
|
|
1432
|
-
distance:
|
|
1433
|
-
buffer:
|
|
1438
|
+
distance: We,
|
|
1439
|
+
buffer: We,
|
|
1434
1440
|
area: Us
|
|
1435
1441
|
};
|
|
1436
|
-
function
|
|
1442
|
+
function dt(r) {
|
|
1437
1443
|
const e = C(12), {
|
|
1438
1444
|
mapId: t,
|
|
1439
1445
|
layerId: n
|
|
1440
|
-
} =
|
|
1446
|
+
} = r;
|
|
1441
1447
|
let s;
|
|
1442
1448
|
e[0] !== t ? (s = (g) => {
|
|
1443
1449
|
var f;
|
|
1444
1450
|
return (f = g.maps[t]) == null ? void 0 : f.basemap;
|
|
1445
1451
|
}, e[0] = t, e[1] = s) : s = e[1];
|
|
1446
1452
|
const o = O(s);
|
|
1447
|
-
let
|
|
1448
|
-
e[2] !== t ? (
|
|
1453
|
+
let i;
|
|
1454
|
+
e[2] !== t ? (i = (g) => {
|
|
1449
1455
|
var f;
|
|
1450
1456
|
return (f = g.maps[t]) == null ? void 0 : f.isLoaded;
|
|
1451
|
-
}, e[2] = t, e[3] =
|
|
1452
|
-
const a = O(
|
|
1457
|
+
}, e[2] = t, e[3] = i) : i = e[3];
|
|
1458
|
+
const a = O(i), l = O(js), d = ce(Is), {
|
|
1453
1459
|
type: c
|
|
1454
1460
|
} = de[o], p = c === X.googleMaps;
|
|
1455
1461
|
let m, u;
|
|
@@ -1457,7 +1463,7 @@ function ut(i) {
|
|
|
1457
1463
|
let g = null;
|
|
1458
1464
|
if (p && a) {
|
|
1459
1465
|
const f = l(t);
|
|
1460
|
-
g = new
|
|
1466
|
+
g = new Vt(f.getDiv(), {});
|
|
1461
1467
|
}
|
|
1462
1468
|
d(n, {
|
|
1463
1469
|
props: {
|
|
@@ -1466,15 +1472,15 @@ function ut(i) {
|
|
|
1466
1472
|
});
|
|
1467
1473
|
}, u = [l, p, a, n, t, d], e[4] = l, e[5] = p, e[6] = a, e[7] = n, e[8] = t, e[9] = d, e[10] = m, e[11] = u) : (m = e[10], u = e[11]), B(m, u);
|
|
1468
1474
|
}
|
|
1469
|
-
function Is(
|
|
1470
|
-
return
|
|
1475
|
+
function Is(r) {
|
|
1476
|
+
return r.setLayer;
|
|
1471
1477
|
}
|
|
1472
|
-
function js(
|
|
1473
|
-
return
|
|
1478
|
+
function js(r) {
|
|
1479
|
+
return r.getOverlayInstance;
|
|
1474
1480
|
}
|
|
1475
|
-
const Ns = [
|
|
1481
|
+
const Ns = [ie, be, ee];
|
|
1476
1482
|
function Hs({
|
|
1477
|
-
children:
|
|
1483
|
+
children: r,
|
|
1478
1484
|
mapId: e,
|
|
1479
1485
|
defaultProps: {
|
|
1480
1486
|
styles: t = Oe.styles,
|
|
@@ -1486,7 +1492,7 @@ function Hs({
|
|
|
1486
1492
|
layerProps: s = {},
|
|
1487
1493
|
defaultType: o = "mask"
|
|
1488
1494
|
}) {
|
|
1489
|
-
const
|
|
1495
|
+
const i = H((L) => {
|
|
1490
1496
|
var E;
|
|
1491
1497
|
return (E = L.data[e]) == null ? void 0 : E.enabled;
|
|
1492
1498
|
}), a = H((L) => L.setEnabled), l = H((L) => {
|
|
@@ -1498,15 +1504,15 @@ function Hs({
|
|
|
1498
1504
|
}), p = H((L) => {
|
|
1499
1505
|
var E;
|
|
1500
1506
|
return (E = L.data[e]) == null ? void 0 : E.modeSelected;
|
|
1501
|
-
}), m = ce((L) => L.setLayer), u = O((L) => L.addLayers), g = O((L) => L.removeLayers), f = O(
|
|
1507
|
+
}), m = ce((L) => L.setLayer), u = O((L) => L.addLayers), g = O((L) => L.removeLayers), f = O(nt((L) => {
|
|
1502
1508
|
var E;
|
|
1503
1509
|
return (E = L.maps[e]) == null ? void 0 : E.layers.filter((F) => !Ns.includes(F));
|
|
1504
1510
|
})), _ = O((L) => L.getDeckInstance), h = ve({});
|
|
1505
|
-
|
|
1511
|
+
dt({
|
|
1506
1512
|
mapId: e,
|
|
1507
|
-
layerId:
|
|
1513
|
+
layerId: ie
|
|
1508
1514
|
});
|
|
1509
|
-
const y = te(() =>
|
|
1515
|
+
const y = te(() => lt({
|
|
1510
1516
|
values: l
|
|
1511
1517
|
}), [l]), b = te(() => ({
|
|
1512
1518
|
type: "FeatureCollection",
|
|
@@ -1530,8 +1536,8 @@ function Hs({
|
|
|
1530
1536
|
w();
|
|
1531
1537
|
}, [w]);
|
|
1532
1538
|
const x = ve(y.length);
|
|
1533
|
-
B(() => (u(e, [
|
|
1534
|
-
g(e, [
|
|
1539
|
+
B(() => (u(e, [ie]), () => {
|
|
1540
|
+
g(e, [ie]);
|
|
1535
1541
|
}), [u, e, g]);
|
|
1536
1542
|
const $ = G(() => {
|
|
1537
1543
|
w(), D([]), a(e, !1);
|
|
@@ -1556,7 +1562,7 @@ function Hs({
|
|
|
1556
1562
|
}), $());
|
|
1557
1563
|
}, [o, $, n == null ? void 0 : n.mask, e, p, d]);
|
|
1558
1564
|
return B(() => {
|
|
1559
|
-
const L =
|
|
1565
|
+
const L = i, {
|
|
1560
1566
|
border: E,
|
|
1561
1567
|
point: F,
|
|
1562
1568
|
fill: A
|
|
@@ -1584,10 +1590,10 @@ function Hs({
|
|
|
1584
1590
|
outline: E
|
|
1585
1591
|
},
|
|
1586
1592
|
onEdit: j,
|
|
1587
|
-
mode: L ? c : new
|
|
1593
|
+
mode: L ? c : new Rt()
|
|
1588
1594
|
});
|
|
1589
|
-
m(
|
|
1590
|
-
}, [S,
|
|
1595
|
+
m(ie, P);
|
|
1596
|
+
}, [S, i, s.mask, v, c, j, T, m, t.colors.editing, t.colors.finished]), B(() => {
|
|
1591
1597
|
const L = {
|
|
1592
1598
|
...Se,
|
|
1593
1599
|
data: b,
|
|
@@ -1597,7 +1603,7 @@ function Hs({
|
|
|
1597
1603
|
}
|
|
1598
1604
|
};
|
|
1599
1605
|
return m(Se.id, {
|
|
1600
|
-
type:
|
|
1606
|
+
type: It,
|
|
1601
1607
|
props: L
|
|
1602
1608
|
}), u(e, [Se.id]), () => {
|
|
1603
1609
|
g(e, [Se.id]);
|
|
@@ -1606,44 +1612,44 @@ function Hs({
|
|
|
1606
1612
|
f == null || f.forEach((L) => {
|
|
1607
1613
|
var A;
|
|
1608
1614
|
const E = (A = _(e)) == null ? void 0 : A.props.layers.find((R) => R.props.id === L);
|
|
1609
|
-
|
|
1610
|
-
const F = !
|
|
1615
|
+
i && (h.current[L] = E == null ? void 0 : E.props.pickable);
|
|
1616
|
+
const F = !i && (h.current[L] ?? (E == null ? void 0 : E.props.pickable));
|
|
1611
1617
|
m(L, {
|
|
1612
1618
|
props: {
|
|
1613
1619
|
pickable: F,
|
|
1614
|
-
extensions: [new
|
|
1615
|
-
maskId: !
|
|
1620
|
+
extensions: [new xt()],
|
|
1621
|
+
maskId: !i && v.length ? be : void 0
|
|
1616
1622
|
}
|
|
1617
1623
|
});
|
|
1618
1624
|
});
|
|
1619
|
-
}, [
|
|
1625
|
+
}, [i, _, e, f, v.length, m]), r;
|
|
1620
1626
|
}
|
|
1621
1627
|
Hs.Controls = Os;
|
|
1622
1628
|
function Bs({
|
|
1623
|
-
mode:
|
|
1629
|
+
mode: r,
|
|
1624
1630
|
...e
|
|
1625
1631
|
}) {
|
|
1626
1632
|
const t = Gs({
|
|
1627
|
-
mode:
|
|
1633
|
+
mode: r,
|
|
1628
1634
|
...e
|
|
1629
1635
|
});
|
|
1630
1636
|
return {
|
|
1631
1637
|
type: it,
|
|
1632
1638
|
props: {
|
|
1633
1639
|
...t,
|
|
1634
|
-
mode:
|
|
1640
|
+
mode: r,
|
|
1635
1641
|
data: []
|
|
1636
1642
|
}
|
|
1637
1643
|
};
|
|
1638
1644
|
}
|
|
1639
1645
|
function Gs({
|
|
1640
|
-
mode:
|
|
1646
|
+
mode: r,
|
|
1641
1647
|
layerProps: e,
|
|
1642
1648
|
locale: t,
|
|
1643
1649
|
enabled: n,
|
|
1644
1650
|
unit: s,
|
|
1645
1651
|
onEdit: o,
|
|
1646
|
-
guideColor:
|
|
1652
|
+
guideColor: i,
|
|
1647
1653
|
pointColor: a,
|
|
1648
1654
|
textOptions: l
|
|
1649
1655
|
}) {
|
|
@@ -1671,7 +1677,7 @@ function Gs({
|
|
|
1671
1677
|
},
|
|
1672
1678
|
getText: (m) => {
|
|
1673
1679
|
var u;
|
|
1674
|
-
return (u =
|
|
1680
|
+
return (u = r == null ? void 0 : r.getTooltipText) == null ? void 0 : u.call(r, {
|
|
1675
1681
|
meters: m.text,
|
|
1676
1682
|
locale: t,
|
|
1677
1683
|
unit: s,
|
|
@@ -1686,20 +1692,20 @@ function Gs({
|
|
|
1686
1692
|
}), c = le($s, {
|
|
1687
1693
|
_subLayerProps: {
|
|
1688
1694
|
guides: {
|
|
1689
|
-
getLineColor:
|
|
1690
|
-
getFillColor:
|
|
1695
|
+
getLineColor: i,
|
|
1696
|
+
getFillColor: i.with(3, 20)
|
|
1691
1697
|
}
|
|
1692
1698
|
},
|
|
1693
1699
|
getEditHandlePointColor: a,
|
|
1694
|
-
getEditHandlePointOutlineColor:
|
|
1700
|
+
getEditHandlePointOutlineColor: i
|
|
1695
1701
|
});
|
|
1696
1702
|
return le(c, d);
|
|
1697
1703
|
}
|
|
1698
|
-
const zs = (
|
|
1699
|
-
measurements:
|
|
1704
|
+
const zs = (r) => Ve()((e) => ({
|
|
1705
|
+
measurements: r.reduce((n, s) => {
|
|
1700
1706
|
const {
|
|
1701
1707
|
mapId: o,
|
|
1702
|
-
modeSelected:
|
|
1708
|
+
modeSelected: i,
|
|
1703
1709
|
modes: a = qs,
|
|
1704
1710
|
units: l = Vs,
|
|
1705
1711
|
distance: d = 0,
|
|
@@ -1713,7 +1719,7 @@ const zs = (i) => Ve()((e) => ({
|
|
|
1713
1719
|
return n[o] = {
|
|
1714
1720
|
modes: a,
|
|
1715
1721
|
units: l,
|
|
1716
|
-
modeSelected:
|
|
1722
|
+
modeSelected: i,
|
|
1717
1723
|
distance: d,
|
|
1718
1724
|
finished: c,
|
|
1719
1725
|
locale: p,
|
|
@@ -1723,7 +1729,7 @@ const zs = (i) => Ve()((e) => ({
|
|
|
1723
1729
|
enabled: f
|
|
1724
1730
|
}, n;
|
|
1725
1731
|
}, {}),
|
|
1726
|
-
mode:
|
|
1732
|
+
mode: ut,
|
|
1727
1733
|
setModeInstance: (n, s) => {
|
|
1728
1734
|
e((o) => ({
|
|
1729
1735
|
measurements: {
|
|
@@ -1812,34 +1818,34 @@ const zs = (i) => Ve()((e) => ({
|
|
|
1812
1818
|
}
|
|
1813
1819
|
}));
|
|
1814
1820
|
}
|
|
1815
|
-
})),
|
|
1816
|
-
function Qs(
|
|
1821
|
+
})), ft = Ue({});
|
|
1822
|
+
function Qs(r) {
|
|
1817
1823
|
const e = C(5), {
|
|
1818
1824
|
children: t,
|
|
1819
1825
|
values: n
|
|
1820
|
-
} =
|
|
1826
|
+
} = r;
|
|
1821
1827
|
let s;
|
|
1822
1828
|
e[0] !== n ? (s = zs(n), e[0] = n, e[1] = s) : s = e[1];
|
|
1823
1829
|
const [o] = se(s);
|
|
1824
|
-
let
|
|
1825
|
-
return e[2] !== t || e[3] !== o ? (
|
|
1830
|
+
let i;
|
|
1831
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ N(ft.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1826
1832
|
}
|
|
1827
|
-
function I(
|
|
1828
|
-
const e = qe(
|
|
1833
|
+
function I(r) {
|
|
1834
|
+
const e = qe(ft);
|
|
1829
1835
|
if (!Object.keys(e).length)
|
|
1830
1836
|
throw new Error("Missing MeasurementToolsProvider in the tree");
|
|
1831
|
-
return Ie(e,
|
|
1837
|
+
return Ie(e, r);
|
|
1832
1838
|
}
|
|
1833
|
-
function
|
|
1839
|
+
function mt(r) {
|
|
1834
1840
|
const e = C(74), {
|
|
1835
1841
|
mapId: t
|
|
1836
|
-
} =
|
|
1842
|
+
} = r;
|
|
1837
1843
|
let n;
|
|
1838
1844
|
e[0] !== t ? (n = (k) => k.measurements[t].modes, e[0] = t, e[1] = n) : n = e[1];
|
|
1839
1845
|
const s = I(n);
|
|
1840
1846
|
let o;
|
|
1841
1847
|
e[2] !== t ? (o = (k) => k.measurements[t].units, e[2] = t, e[3] = o) : o = e[3];
|
|
1842
|
-
const
|
|
1848
|
+
const i = I(o);
|
|
1843
1849
|
let a;
|
|
1844
1850
|
e[4] !== t ? (a = (k) => k.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
1845
1851
|
const l = I(a), d = I(tn);
|
|
@@ -1904,9 +1910,9 @@ function ft(i) {
|
|
|
1904
1910
|
}, e[50] = y, e[51] = ye) : ye = e[51];
|
|
1905
1911
|
const Ce = ye;
|
|
1906
1912
|
let he;
|
|
1907
|
-
return e[52] !== Pe || e[53] !== u || e[54] !== l || e[55] !== f || e[56] !== w || e[57] !== E || e[58] !== P || e[59] !== v || e[60] !== s || e[61] !== Le || e[62] !== p || e[63] !== y || e[64] !== j || e[65] !== R || e[66] !== J || e[67] !== T || e[68] !== ae || e[69] !== ke || e[70] !== Ce || e[71] !== Te || e[72] !==
|
|
1913
|
+
return e[52] !== Pe || e[53] !== u || e[54] !== l || e[55] !== f || e[56] !== w || e[57] !== E || e[58] !== P || e[59] !== v || e[60] !== s || e[61] !== Le || e[62] !== p || e[63] !== y || e[64] !== j || e[65] !== R || e[66] !== J || e[67] !== T || e[68] !== ae || e[69] !== ke || e[70] !== Ce || e[71] !== Te || e[72] !== i ? (he = {
|
|
1908
1914
|
modes: s,
|
|
1909
|
-
units:
|
|
1915
|
+
units: i,
|
|
1910
1916
|
distance: l,
|
|
1911
1917
|
clearLayerOnStart: u,
|
|
1912
1918
|
modeSelected: v,
|
|
@@ -1926,44 +1932,44 @@ function ft(i) {
|
|
|
1926
1932
|
toggleLayer: Ce,
|
|
1927
1933
|
clearLayer: Pe,
|
|
1928
1934
|
setModeInstance: J
|
|
1929
|
-
}, e[52] = Pe, e[53] = u, e[54] = l, e[55] = f, e[56] = w, e[57] = E, e[58] = P, e[59] = v, e[60] = s, e[61] = Le, e[62] = p, e[63] = y, e[64] = j, e[65] = R, e[66] = J, e[67] = T, e[68] = ae, e[69] = ke, e[70] = Ce, e[71] = Te, e[72] =
|
|
1935
|
+
}, e[52] = Pe, e[53] = u, e[54] = l, e[55] = f, e[56] = w, e[57] = E, e[58] = P, e[59] = v, e[60] = s, e[61] = Le, e[62] = p, e[63] = y, e[64] = j, e[65] = R, e[66] = J, e[67] = T, e[68] = ae, e[69] = ke, e[70] = Ce, e[71] = Te, e[72] = i, e[73] = he) : he = e[73], he;
|
|
1930
1936
|
}
|
|
1931
|
-
function Zs(
|
|
1932
|
-
return
|
|
1937
|
+
function Zs(r) {
|
|
1938
|
+
return r.setUnit;
|
|
1933
1939
|
}
|
|
1934
|
-
function Ks(
|
|
1935
|
-
return
|
|
1940
|
+
function Ks(r) {
|
|
1941
|
+
return r.setPositions;
|
|
1936
1942
|
}
|
|
1937
|
-
function Ws(
|
|
1938
|
-
return
|
|
1943
|
+
function Ws(r) {
|
|
1944
|
+
return r.setModeInstance;
|
|
1939
1945
|
}
|
|
1940
|
-
function Ys(
|
|
1941
|
-
return
|
|
1946
|
+
function Ys(r) {
|
|
1947
|
+
return r.setLocale;
|
|
1942
1948
|
}
|
|
1943
|
-
function Xs(
|
|
1944
|
-
return
|
|
1949
|
+
function Xs(r) {
|
|
1950
|
+
return r.setFinished;
|
|
1945
1951
|
}
|
|
1946
|
-
function Js(
|
|
1947
|
-
return
|
|
1952
|
+
function Js(r) {
|
|
1953
|
+
return r.setModeSelected;
|
|
1948
1954
|
}
|
|
1949
|
-
function en(
|
|
1950
|
-
return
|
|
1955
|
+
function en(r) {
|
|
1956
|
+
return r.setEnabled;
|
|
1951
1957
|
}
|
|
1952
|
-
function tn(
|
|
1953
|
-
return
|
|
1958
|
+
function tn(r) {
|
|
1959
|
+
return r.setDistance;
|
|
1954
1960
|
}
|
|
1955
|
-
function sn(
|
|
1961
|
+
function sn(r) {
|
|
1956
1962
|
const e = C(42), {
|
|
1957
1963
|
mapId: t,
|
|
1958
1964
|
textOptions: n,
|
|
1959
1965
|
children: s
|
|
1960
|
-
} =
|
|
1966
|
+
} = r;
|
|
1961
1967
|
let o;
|
|
1962
1968
|
e[0] !== t ? (o = {
|
|
1963
1969
|
mapId: t
|
|
1964
1970
|
}, e[0] = t, e[1] = o) : o = e[1];
|
|
1965
1971
|
const {
|
|
1966
|
-
modes:
|
|
1972
|
+
modes: i,
|
|
1967
1973
|
units: a,
|
|
1968
1974
|
distance: l,
|
|
1969
1975
|
setDistance: d,
|
|
@@ -1984,26 +1990,26 @@ function sn(i) {
|
|
|
1984
1990
|
setUnit: D,
|
|
1985
1991
|
clearLayer: w,
|
|
1986
1992
|
toggleLayer: x
|
|
1987
|
-
} =
|
|
1993
|
+
} = mt(o);
|
|
1988
1994
|
let $;
|
|
1989
|
-
e[2] !== p || e[3] !==
|
|
1990
|
-
if (p &&
|
|
1991
|
-
const R =
|
|
1995
|
+
e[2] !== p || e[3] !== i || e[4] !== v || e[5] !== M ? ($ = () => {
|
|
1996
|
+
if (p && i[p]) {
|
|
1997
|
+
const R = i[p].mode;
|
|
1992
1998
|
v(new R());
|
|
1993
1999
|
}
|
|
1994
2000
|
return () => {
|
|
1995
2001
|
M([]);
|
|
1996
2002
|
};
|
|
1997
|
-
}, e[2] = p, e[3] =
|
|
2003
|
+
}, e[2] = p, e[3] = i, e[4] = v, e[5] = M, e[6] = $) : $ = e[6];
|
|
1998
2004
|
let j;
|
|
1999
|
-
e[7] !== p || e[8] !==
|
|
2005
|
+
e[7] !== p || e[8] !== i || e[9] !== g || e[10] !== v || e[11] !== M ? (j = [i, p, M, v, g], e[7] = p, e[8] = i, e[9] = g, e[10] = v, e[11] = M, e[12] = j) : j = e[12], B($, j);
|
|
2000
2006
|
let L;
|
|
2001
2007
|
e[13] !== x || e[14] !== w || e[15] !== c || e[16] !== f ? (L = (R) => {
|
|
2002
2008
|
R && (c || !f) && w(), x(R);
|
|
2003
2009
|
}, e[13] = x, e[14] = w, e[15] = c, e[16] = f, e[17] = L) : L = e[17];
|
|
2004
2010
|
const E = L, F = !!c;
|
|
2005
2011
|
let A;
|
|
2006
|
-
return e[18] !== s || e[19] !== w || e[20] !== l || e[21] !== u || e[22] !== f || e[23] !== h || e[24] !== t || e[25] !== b || e[26] !== p || e[27] !==
|
|
2012
|
+
return e[18] !== s || e[19] !== w || e[20] !== l || e[21] !== u || e[22] !== f || e[23] !== h || e[24] !== t || e[25] !== b || e[26] !== p || e[27] !== i || e[28] !== S || e[29] !== d || e[30] !== g || e[31] !== _ || e[32] !== y || e[33] !== m || e[34] !== M || e[35] !== D || e[36] !== F || e[37] !== n || e[38] !== E || e[39] !== T || e[40] !== a ? (A = s({
|
|
2007
2013
|
mapId: t,
|
|
2008
2014
|
distance: l,
|
|
2009
2015
|
enabled: u,
|
|
@@ -2013,7 +2019,7 @@ function sn(i) {
|
|
|
2013
2019
|
unit: T,
|
|
2014
2020
|
clearLayerOnStart: F,
|
|
2015
2021
|
modeSelected: p,
|
|
2016
|
-
modes:
|
|
2022
|
+
modes: i,
|
|
2017
2023
|
units: a,
|
|
2018
2024
|
value: Me({
|
|
2019
2025
|
meters: l,
|
|
@@ -2031,23 +2037,23 @@ function sn(i) {
|
|
|
2031
2037
|
setEnabled: g,
|
|
2032
2038
|
toggleLayer: E,
|
|
2033
2039
|
clearLayer: w
|
|
2034
|
-
}), e[18] = s, e[19] = w, e[20] = l, e[21] = u, e[22] = f, e[23] = h, e[24] = t, e[25] = b, e[26] = p, e[27] =
|
|
2040
|
+
}), e[18] = s, e[19] = w, e[20] = l, e[21] = u, e[22] = f, e[23] = h, e[24] = t, e[25] = b, e[26] = p, e[27] = i, e[28] = S, e[29] = d, e[30] = g, e[31] = _, e[32] = y, e[33] = m, e[34] = M, e[35] = D, e[36] = F, e[37] = n, e[38] = E, e[39] = T, e[40] = a, e[41] = A) : A = e[41], A;
|
|
2035
2041
|
}
|
|
2036
2042
|
const nn = [ee];
|
|
2037
2043
|
function on({
|
|
2038
|
-
children:
|
|
2044
|
+
children: r,
|
|
2039
2045
|
mapId: e,
|
|
2040
2046
|
defaultProps: {
|
|
2041
|
-
styles: t =
|
|
2047
|
+
styles: t = Ze.styles
|
|
2042
2048
|
} = {
|
|
2043
|
-
styles:
|
|
2049
|
+
styles: Ze.styles
|
|
2044
2050
|
},
|
|
2045
2051
|
layerProps: n = {},
|
|
2046
2052
|
textOptions: s
|
|
2047
2053
|
}) {
|
|
2048
2054
|
const {
|
|
2049
2055
|
setDistance: o,
|
|
2050
|
-
clearLayerOnStart:
|
|
2056
|
+
clearLayerOnStart: i,
|
|
2051
2057
|
enabled: a,
|
|
2052
2058
|
finished: l,
|
|
2053
2059
|
setFinished: d,
|
|
@@ -2055,18 +2061,18 @@ function on({
|
|
|
2055
2061
|
setPositions: p,
|
|
2056
2062
|
unit: m,
|
|
2057
2063
|
modeInstance: u
|
|
2058
|
-
} =
|
|
2064
|
+
} = mt({
|
|
2059
2065
|
mapId: e
|
|
2060
|
-
}), g = ce((S) => S.setLayer), f = O((S) => S.addLayers), _ = O((S) => S.removeLayers), h = O(
|
|
2066
|
+
}), g = ce((S) => S.setLayer), f = O((S) => S.addLayers), _ = O((S) => S.removeLayers), h = O(nt((S) => {
|
|
2061
2067
|
var M;
|
|
2062
2068
|
return (M = S.maps[e]) == null ? void 0 : M.layers.filter((T) => !nn.includes(T));
|
|
2063
2069
|
})), y = O((S) => S.getDeckInstance), b = ve({});
|
|
2064
|
-
|
|
2070
|
+
dt({
|
|
2065
2071
|
mapId: e,
|
|
2066
2072
|
layerId: ee
|
|
2067
2073
|
}), B(() => (a && f(e, [ee]), () => {
|
|
2068
2074
|
_(e, [ee]);
|
|
2069
|
-
}), [f,
|
|
2075
|
+
}), [f, i, e, _, a]), B(() => {
|
|
2070
2076
|
h == null || h.forEach((S) => {
|
|
2071
2077
|
var D;
|
|
2072
2078
|
const M = (D = y(e)) == null ? void 0 : D.props.layers.find((w) => w.props.id === S);
|
|
@@ -2107,50 +2113,50 @@ function on({
|
|
|
2107
2113
|
textOptions: s
|
|
2108
2114
|
});
|
|
2109
2115
|
g(ee, T);
|
|
2110
|
-
}, [l, u, n, c, v, g, t.colors.editing, t.colors.finished, t.colors.point, s, m, a]),
|
|
2116
|
+
}, [l, u, n, c, v, g, t.colors.editing, t.colors.finished, t.colors.point, s, m, a]), r;
|
|
2111
2117
|
}
|
|
2112
2118
|
on.Controls = sn;
|
|
2113
|
-
function rn(
|
|
2119
|
+
function rn(r) {
|
|
2114
2120
|
const e = C(7), {
|
|
2115
2121
|
mapId: t
|
|
2116
|
-
} =
|
|
2122
|
+
} = r;
|
|
2117
2123
|
let n;
|
|
2118
2124
|
e[0] !== t ? (n = (d) => d.maps[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2119
2125
|
const {
|
|
2120
2126
|
layers: s
|
|
2121
2127
|
} = O(n), o = ce(ln);
|
|
2122
|
-
let
|
|
2128
|
+
let i, a;
|
|
2123
2129
|
if (e[2] !== o || e[3] !== s) {
|
|
2124
2130
|
let d;
|
|
2125
2131
|
e[5] !== o ? (d = (c) => o[c], e[5] = o, e[6] = d) : d = e[6], a = s.map(d).filter(an), e[2] = o, e[3] = s, e[4] = a;
|
|
2126
2132
|
} else
|
|
2127
2133
|
a = e[4];
|
|
2128
|
-
return
|
|
2134
|
+
return i = a, i;
|
|
2129
2135
|
}
|
|
2130
|
-
function an(
|
|
2131
|
-
return !!
|
|
2136
|
+
function an(r) {
|
|
2137
|
+
return !!r;
|
|
2132
2138
|
}
|
|
2133
|
-
function ln(
|
|
2134
|
-
return
|
|
2139
|
+
function ln(r) {
|
|
2140
|
+
return r.layers;
|
|
2135
2141
|
}
|
|
2136
|
-
const
|
|
2137
|
-
function
|
|
2138
|
-
const e =
|
|
2142
|
+
const Ye = [be, ie, ee];
|
|
2143
|
+
function pt(r) {
|
|
2144
|
+
const e = r.filter((n) => !Ye.includes(n.props.id)).sort((n, s) => (n.order ?? 1 / 0) - (s.order ?? 1 / 0)), t = Ye.map((n) => r.find((s) => s.props.id === n)).filter((n) => !!n);
|
|
2139
2145
|
return [...e, ...t];
|
|
2140
2146
|
}
|
|
2141
2147
|
const cn = 200;
|
|
2142
|
-
function uo(
|
|
2148
|
+
function uo(r) {
|
|
2143
2149
|
const e = C(48);
|
|
2144
2150
|
let t, n, s, o;
|
|
2145
|
-
e[0] !==
|
|
2151
|
+
e[0] !== r ? ({
|
|
2146
2152
|
id: t,
|
|
2147
2153
|
onLoad: n,
|
|
2148
2154
|
onViewStateChange: s,
|
|
2149
2155
|
...o
|
|
2150
|
-
} =
|
|
2151
|
-
let
|
|
2152
|
-
e[5] !== t ? (
|
|
2153
|
-
const a = O(
|
|
2156
|
+
} = r, e[0] = r, e[1] = t, e[2] = n, e[3] = s, e[4] = o) : (t = e[1], n = e[2], s = e[3], o = e[4]);
|
|
2157
|
+
let i;
|
|
2158
|
+
e[5] !== t ? (i = (P) => P.maps[t].basemap, e[5] = t, e[6] = i) : i = e[6];
|
|
2159
|
+
const a = O(i);
|
|
2154
2160
|
let l;
|
|
2155
2161
|
e[7] !== t ? (l = (P) => P.maps[t].instanceRef, e[7] = t, e[8] = l) : l = e[8];
|
|
2156
2162
|
const d = O(l);
|
|
@@ -2166,7 +2172,7 @@ function uo(i) {
|
|
|
2166
2172
|
}, e[13] = t, e[14] = v) : v = e[14];
|
|
2167
2173
|
const S = rn(v);
|
|
2168
2174
|
let M, T;
|
|
2169
|
-
e[15] !== S ? (T =
|
|
2175
|
+
e[15] !== S ? (T = pt(S), e[15] = S, e[16] = T) : T = e[16], M = T;
|
|
2170
2176
|
const D = M;
|
|
2171
2177
|
let w;
|
|
2172
2178
|
e[17] !== t || e[18] !== s || e[19] !== _ || e[20] !== b ? (w = (P) => {
|
|
@@ -2201,27 +2207,27 @@ function uo(i) {
|
|
|
2201
2207
|
let V;
|
|
2202
2208
|
return e[36] !== a || e[37] !== D || e[38] !== E || e[39] !== R || e[40] !== j || e[41] !== x || e[42] !== t || e[43] !== d || e[44] !== p || e[45] !== o || e[46] !== g ? (V = /* @__PURE__ */ N(ds, { ...o, id: t, layers: D, instanceRef: d, overlayRef: p, basemap: a, initialViewState: g, onLoad: j, onViewStateChange: x, onAfterRender: E, onDragEnd: R }), e[36] = a, e[37] = D, e[38] = E, e[39] = R, e[40] = j, e[41] = x, e[42] = t, e[43] = d, e[44] = p, e[45] = o, e[46] = g, e[47] = V) : V = e[47], V;
|
|
2203
2209
|
}
|
|
2204
|
-
function un(
|
|
2205
|
-
return
|
|
2210
|
+
function un(r) {
|
|
2211
|
+
return r == null ? void 0 : r.isLoaded;
|
|
2206
2212
|
}
|
|
2207
|
-
function dn(
|
|
2208
|
-
return
|
|
2213
|
+
function dn(r) {
|
|
2214
|
+
return r.updateViewPort;
|
|
2209
2215
|
}
|
|
2210
|
-
function fn(
|
|
2211
|
-
return
|
|
2216
|
+
function fn(r) {
|
|
2217
|
+
return r.setLayersLoad;
|
|
2212
2218
|
}
|
|
2213
|
-
function mn(
|
|
2214
|
-
return
|
|
2219
|
+
function mn(r) {
|
|
2220
|
+
return r.setLoad;
|
|
2215
2221
|
}
|
|
2216
|
-
function pn(
|
|
2217
|
-
return
|
|
2222
|
+
function pn(r) {
|
|
2223
|
+
return r.setViewState;
|
|
2218
2224
|
}
|
|
2219
|
-
function gn(
|
|
2220
|
-
return
|
|
2225
|
+
function gn(r) {
|
|
2226
|
+
return r.getDeckInstance;
|
|
2221
2227
|
}
|
|
2222
|
-
const yn = "https://gcp-us-east1.api.carto.com", hn = "ps", Sn =
|
|
2228
|
+
const yn = "https://gcp-us-east1.api.carto.com", hn = "ps", Sn = st((r) => ({
|
|
2223
2229
|
sources: {},
|
|
2224
|
-
setSource: (e, t) =>
|
|
2230
|
+
setSource: (e, t) => r((n) => {
|
|
2225
2231
|
const s = {
|
|
2226
2232
|
...n.sources
|
|
2227
2233
|
};
|
|
@@ -2235,19 +2241,27 @@ const yn = "https://gcp-us-east1.api.carto.com", hn = "ps", Sn = tt((i) => ({
|
|
|
2235
2241
|
clientId: hn
|
|
2236
2242
|
},
|
|
2237
2243
|
...t
|
|
2238
|
-
},
|
|
2244
|
+
}, i = bn({
|
|
2239
2245
|
source: o
|
|
2240
2246
|
});
|
|
2241
|
-
return o.widgets =
|
|
2247
|
+
return o.widgets = i, s[e] = o, {
|
|
2242
2248
|
sources: s
|
|
2243
2249
|
};
|
|
2244
2250
|
}),
|
|
2245
|
-
|
|
2251
|
+
removeSource: (e) => r((t) => {
|
|
2252
|
+
const n = {
|
|
2253
|
+
...t.sources
|
|
2254
|
+
};
|
|
2255
|
+
return delete n[e], {
|
|
2256
|
+
sources: n
|
|
2257
|
+
};
|
|
2258
|
+
}),
|
|
2259
|
+
setFilters: (e, t) => r((n) => {
|
|
2246
2260
|
let s = {};
|
|
2247
2261
|
const o = n.sources[e] ?? {};
|
|
2248
|
-
return t.length !== 0 && (s = t.reduce((
|
|
2262
|
+
return t.length !== 0 && (s = t.reduce((i, a) => {
|
|
2249
2263
|
var l;
|
|
2250
|
-
return !("values" in a) || !((l = a.values) != null && l.length) ? (
|
|
2264
|
+
return !("values" in a) || !((l = a.values) != null && l.length) ? (i = Ne(i, a), i) : (i = zt(i, a), i);
|
|
2251
2265
|
}, (o == null ? void 0 : o.filters) ?? {})), {
|
|
2252
2266
|
sources: {
|
|
2253
2267
|
...n.sources,
|
|
@@ -2257,19 +2271,37 @@ const yn = "https://gcp-us-east1.api.carto.com", hn = "ps", Sn = tt((i) => ({
|
|
|
2257
2271
|
}
|
|
2258
2272
|
}
|
|
2259
2273
|
};
|
|
2274
|
+
}),
|
|
2275
|
+
removeFilters: (e, t, n) => r((s) => {
|
|
2276
|
+
const o = s.sources[e];
|
|
2277
|
+
if (!o)
|
|
2278
|
+
return s;
|
|
2279
|
+
let i = {};
|
|
2280
|
+
return t && (i = Ne(o.filters ?? {}, {
|
|
2281
|
+
column: t,
|
|
2282
|
+
owner: n
|
|
2283
|
+
})), {
|
|
2284
|
+
sources: {
|
|
2285
|
+
...s.sources,
|
|
2286
|
+
[e]: {
|
|
2287
|
+
...o,
|
|
2288
|
+
filters: i
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
};
|
|
2260
2292
|
})
|
|
2261
2293
|
}));
|
|
2262
|
-
function vn(
|
|
2294
|
+
function vn(r) {
|
|
2263
2295
|
const e = C(2);
|
|
2264
2296
|
let t;
|
|
2265
|
-
return e[0] !==
|
|
2297
|
+
return e[0] !== r ? (t = (n) => n.sources[r], e[0] = r, e[1] = t) : t = e[1], Sn(t);
|
|
2266
2298
|
}
|
|
2267
2299
|
function bn({
|
|
2268
|
-
source:
|
|
2300
|
+
source: r
|
|
2269
2301
|
}) {
|
|
2270
2302
|
const e = {
|
|
2271
2303
|
query: () => {
|
|
2272
|
-
const s =
|
|
2304
|
+
const s = r;
|
|
2273
2305
|
return new Yt({
|
|
2274
2306
|
...s,
|
|
2275
2307
|
accessToken: "",
|
|
@@ -2278,7 +2310,7 @@ function bn({
|
|
|
2278
2310
|
});
|
|
2279
2311
|
},
|
|
2280
2312
|
table: () => {
|
|
2281
|
-
const s =
|
|
2313
|
+
const s = r;
|
|
2282
2314
|
return new Wt({
|
|
2283
2315
|
...s,
|
|
2284
2316
|
accessToken: "",
|
|
@@ -2287,7 +2319,7 @@ function bn({
|
|
|
2287
2319
|
});
|
|
2288
2320
|
},
|
|
2289
2321
|
tileset: () => {
|
|
2290
|
-
const s =
|
|
2322
|
+
const s = r;
|
|
2291
2323
|
return new Zt({
|
|
2292
2324
|
...s,
|
|
2293
2325
|
accessToken: "",
|
|
@@ -2297,7 +2329,7 @@ function bn({
|
|
|
2297
2329
|
});
|
|
2298
2330
|
},
|
|
2299
2331
|
raster: () => {
|
|
2300
|
-
const s =
|
|
2332
|
+
const s = r;
|
|
2301
2333
|
return s.rasterMetadata ? new Qt({
|
|
2302
2334
|
...s,
|
|
2303
2335
|
accessToken: "",
|
|
@@ -2306,30 +2338,30 @@ function bn({
|
|
|
2306
2338
|
rasterMetadata: s.rasterMetadata
|
|
2307
2339
|
}) : null;
|
|
2308
2340
|
}
|
|
2309
|
-
}, t =
|
|
2341
|
+
}, t = r.type.split("+")[0], n = e[t];
|
|
2310
2342
|
return n == null ? void 0 : n();
|
|
2311
2343
|
}
|
|
2312
|
-
function oe(
|
|
2344
|
+
function oe(r, e) {
|
|
2313
2345
|
const t = vn(e);
|
|
2314
2346
|
return te(() => {
|
|
2315
2347
|
const n = t == null ? void 0 : t.widgets;
|
|
2316
|
-
return !n || !
|
|
2317
|
-
}, [
|
|
2348
|
+
return !n || !r ? null : (n.props.accessToken = r, n);
|
|
2349
|
+
}, [r, t]);
|
|
2318
2350
|
}
|
|
2319
|
-
function Mn(
|
|
2351
|
+
function Mn(r) {
|
|
2320
2352
|
const e = C(18), {
|
|
2321
2353
|
accessToken: t,
|
|
2322
2354
|
sourceId: n,
|
|
2323
2355
|
widgetProps: s,
|
|
2324
2356
|
useQueryProps: o
|
|
2325
|
-
} =
|
|
2326
|
-
let
|
|
2327
|
-
e[0] !== o ? (
|
|
2357
|
+
} = r;
|
|
2358
|
+
let i;
|
|
2359
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2328
2360
|
let a, l;
|
|
2329
|
-
e[2] !==
|
|
2361
|
+
e[2] !== i ? ({
|
|
2330
2362
|
enabled: a,
|
|
2331
2363
|
...l
|
|
2332
|
-
} =
|
|
2364
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2333
2365
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2334
2366
|
let m;
|
|
2335
2367
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["categories", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2344,31 +2376,31 @@ function Mn(i) {
|
|
|
2344
2376
|
...l
|
|
2345
2377
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2346
2378
|
}
|
|
2347
|
-
function fo(
|
|
2379
|
+
function fo(r) {
|
|
2348
2380
|
const e = C(6);
|
|
2349
2381
|
let t, n;
|
|
2350
|
-
e[0] !==
|
|
2382
|
+
e[0] !== r ? ({
|
|
2351
2383
|
children: t,
|
|
2352
2384
|
...n
|
|
2353
|
-
} =
|
|
2385
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2354
2386
|
const s = Mn(n);
|
|
2355
2387
|
let o;
|
|
2356
2388
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2357
2389
|
}
|
|
2358
|
-
function Ln(
|
|
2390
|
+
function Ln(r) {
|
|
2359
2391
|
const e = C(18), {
|
|
2360
2392
|
accessToken: t,
|
|
2361
2393
|
sourceId: n,
|
|
2362
2394
|
widgetProps: s,
|
|
2363
2395
|
useQueryProps: o
|
|
2364
|
-
} =
|
|
2365
|
-
let
|
|
2366
|
-
e[0] !== o ? (
|
|
2396
|
+
} = r;
|
|
2397
|
+
let i;
|
|
2398
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2367
2399
|
let a, l;
|
|
2368
|
-
e[2] !==
|
|
2400
|
+
e[2] !== i ? ({
|
|
2369
2401
|
enabled: a,
|
|
2370
2402
|
...l
|
|
2371
|
-
} =
|
|
2403
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2372
2404
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2373
2405
|
let m;
|
|
2374
2406
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["features", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2383,31 +2415,31 @@ function Ln(i) {
|
|
|
2383
2415
|
...l
|
|
2384
2416
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2385
2417
|
}
|
|
2386
|
-
function mo(
|
|
2418
|
+
function mo(r) {
|
|
2387
2419
|
const e = C(6);
|
|
2388
2420
|
let t, n;
|
|
2389
|
-
e[0] !==
|
|
2421
|
+
e[0] !== r ? ({
|
|
2390
2422
|
children: t,
|
|
2391
2423
|
...n
|
|
2392
|
-
} =
|
|
2424
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2393
2425
|
const s = Ln(n);
|
|
2394
2426
|
let o;
|
|
2395
2427
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2396
2428
|
}
|
|
2397
|
-
function _n(
|
|
2429
|
+
function _n(r) {
|
|
2398
2430
|
const e = C(18), {
|
|
2399
2431
|
accessToken: t,
|
|
2400
2432
|
sourceId: n,
|
|
2401
2433
|
widgetProps: s,
|
|
2402
2434
|
useQueryProps: o
|
|
2403
|
-
} =
|
|
2404
|
-
let
|
|
2405
|
-
e[0] !== o ? (
|
|
2435
|
+
} = r;
|
|
2436
|
+
let i;
|
|
2437
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2406
2438
|
let a, l;
|
|
2407
|
-
e[2] !==
|
|
2439
|
+
e[2] !== i ? ({
|
|
2408
2440
|
enabled: a,
|
|
2409
2441
|
...l
|
|
2410
|
-
} =
|
|
2442
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2411
2443
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2412
2444
|
let m;
|
|
2413
2445
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["formula", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2422,31 +2454,31 @@ function _n(i) {
|
|
|
2422
2454
|
...l
|
|
2423
2455
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2424
2456
|
}
|
|
2425
|
-
function po(
|
|
2457
|
+
function po(r) {
|
|
2426
2458
|
const e = C(6);
|
|
2427
2459
|
let t, n;
|
|
2428
|
-
e[0] !==
|
|
2460
|
+
e[0] !== r ? ({
|
|
2429
2461
|
children: t,
|
|
2430
2462
|
...n
|
|
2431
|
-
} =
|
|
2463
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2432
2464
|
const s = _n(n);
|
|
2433
2465
|
let o;
|
|
2434
2466
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2435
2467
|
}
|
|
2436
|
-
function Tn(
|
|
2468
|
+
function Tn(r) {
|
|
2437
2469
|
const e = C(18), {
|
|
2438
2470
|
accessToken: t,
|
|
2439
2471
|
sourceId: n,
|
|
2440
2472
|
widgetProps: s,
|
|
2441
2473
|
useQueryProps: o
|
|
2442
|
-
} =
|
|
2443
|
-
let
|
|
2444
|
-
e[0] !== o ? (
|
|
2474
|
+
} = r;
|
|
2475
|
+
let i;
|
|
2476
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2445
2477
|
let a, l;
|
|
2446
|
-
e[2] !==
|
|
2478
|
+
e[2] !== i ? ({
|
|
2447
2479
|
enabled: a,
|
|
2448
2480
|
...l
|
|
2449
|
-
} =
|
|
2481
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2450
2482
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2451
2483
|
let m;
|
|
2452
2484
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["histogram", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2461,31 +2493,31 @@ function Tn(i) {
|
|
|
2461
2493
|
...l
|
|
2462
2494
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2463
2495
|
}
|
|
2464
|
-
function go(
|
|
2496
|
+
function go(r) {
|
|
2465
2497
|
const e = C(6);
|
|
2466
2498
|
let t, n;
|
|
2467
|
-
e[0] !==
|
|
2499
|
+
e[0] !== r ? ({
|
|
2468
2500
|
children: t,
|
|
2469
2501
|
...n
|
|
2470
|
-
} =
|
|
2502
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2471
2503
|
const s = Tn(n);
|
|
2472
2504
|
let o;
|
|
2473
2505
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2474
2506
|
}
|
|
2475
|
-
function En(
|
|
2507
|
+
function En(r) {
|
|
2476
2508
|
const e = C(18), {
|
|
2477
2509
|
accessToken: t,
|
|
2478
2510
|
sourceId: n,
|
|
2479
2511
|
widgetProps: s,
|
|
2480
2512
|
useQueryProps: o
|
|
2481
|
-
} =
|
|
2482
|
-
let
|
|
2483
|
-
e[0] !== o ? (
|
|
2513
|
+
} = r;
|
|
2514
|
+
let i;
|
|
2515
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2484
2516
|
let a, l;
|
|
2485
|
-
e[2] !==
|
|
2517
|
+
e[2] !== i ? ({
|
|
2486
2518
|
enabled: a,
|
|
2487
2519
|
...l
|
|
2488
|
-
} =
|
|
2520
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2489
2521
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2490
2522
|
let m;
|
|
2491
2523
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["range", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2500,31 +2532,31 @@ function En(i) {
|
|
|
2500
2532
|
...l
|
|
2501
2533
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2502
2534
|
}
|
|
2503
|
-
function yo(
|
|
2535
|
+
function yo(r) {
|
|
2504
2536
|
const e = C(6);
|
|
2505
2537
|
let t, n;
|
|
2506
|
-
e[0] !==
|
|
2538
|
+
e[0] !== r ? ({
|
|
2507
2539
|
children: t,
|
|
2508
2540
|
...n
|
|
2509
|
-
} =
|
|
2541
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2510
2542
|
const s = En(n);
|
|
2511
2543
|
let o;
|
|
2512
2544
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2513
2545
|
}
|
|
2514
|
-
function kn(
|
|
2546
|
+
function kn(r) {
|
|
2515
2547
|
const e = C(18), {
|
|
2516
2548
|
accessToken: t,
|
|
2517
2549
|
sourceId: n,
|
|
2518
2550
|
widgetProps: s,
|
|
2519
2551
|
useQueryProps: o
|
|
2520
|
-
} =
|
|
2521
|
-
let
|
|
2522
|
-
e[0] !== o ? (
|
|
2552
|
+
} = r;
|
|
2553
|
+
let i;
|
|
2554
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2523
2555
|
let a, l;
|
|
2524
|
-
e[2] !==
|
|
2556
|
+
e[2] !== i ? ({
|
|
2525
2557
|
enabled: a,
|
|
2526
2558
|
...l
|
|
2527
|
-
} =
|
|
2559
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2528
2560
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2529
2561
|
let m;
|
|
2530
2562
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["scatter", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2539,31 +2571,31 @@ function kn(i) {
|
|
|
2539
2571
|
...l
|
|
2540
2572
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2541
2573
|
}
|
|
2542
|
-
function ho(
|
|
2574
|
+
function ho(r) {
|
|
2543
2575
|
const e = C(6);
|
|
2544
2576
|
let t, n;
|
|
2545
|
-
e[0] !==
|
|
2577
|
+
e[0] !== r ? ({
|
|
2546
2578
|
children: t,
|
|
2547
2579
|
...n
|
|
2548
|
-
} =
|
|
2580
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2549
2581
|
const s = kn(n);
|
|
2550
2582
|
let o;
|
|
2551
2583
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2552
2584
|
}
|
|
2553
|
-
function Pn(
|
|
2585
|
+
function Pn(r) {
|
|
2554
2586
|
const e = C(18), {
|
|
2555
2587
|
accessToken: t,
|
|
2556
2588
|
sourceId: n,
|
|
2557
2589
|
widgetProps: s,
|
|
2558
2590
|
useQueryProps: o
|
|
2559
|
-
} =
|
|
2560
|
-
let
|
|
2561
|
-
e[0] !== o ? (
|
|
2591
|
+
} = r;
|
|
2592
|
+
let i;
|
|
2593
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2562
2594
|
let a, l;
|
|
2563
|
-
e[2] !==
|
|
2595
|
+
e[2] !== i ? ({
|
|
2564
2596
|
enabled: a,
|
|
2565
2597
|
...l
|
|
2566
|
-
} =
|
|
2598
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2567
2599
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2568
2600
|
let m;
|
|
2569
2601
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["table", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2578,31 +2610,31 @@ function Pn(i) {
|
|
|
2578
2610
|
...l
|
|
2579
2611
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2580
2612
|
}
|
|
2581
|
-
function So(
|
|
2613
|
+
function So(r) {
|
|
2582
2614
|
const e = C(6);
|
|
2583
2615
|
let t, n;
|
|
2584
|
-
e[0] !==
|
|
2616
|
+
e[0] !== r ? ({
|
|
2585
2617
|
children: t,
|
|
2586
2618
|
...n
|
|
2587
|
-
} =
|
|
2619
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2588
2620
|
const s = Pn(n);
|
|
2589
2621
|
let o;
|
|
2590
2622
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2591
2623
|
}
|
|
2592
|
-
function Cn(
|
|
2624
|
+
function Cn(r) {
|
|
2593
2625
|
const e = C(18), {
|
|
2594
2626
|
accessToken: t,
|
|
2595
2627
|
sourceId: n,
|
|
2596
2628
|
widgetProps: s,
|
|
2597
2629
|
useQueryProps: o
|
|
2598
|
-
} =
|
|
2599
|
-
let
|
|
2600
|
-
e[0] !== o ? (
|
|
2630
|
+
} = r;
|
|
2631
|
+
let i;
|
|
2632
|
+
e[0] !== o ? (i = o === void 0 ? {} : o, e[0] = o, e[1] = i) : i = e[1];
|
|
2601
2633
|
let a, l;
|
|
2602
|
-
e[2] !==
|
|
2634
|
+
e[2] !== i ? ({
|
|
2603
2635
|
enabled: a,
|
|
2604
2636
|
...l
|
|
2605
|
-
} =
|
|
2637
|
+
} = i, e[2] = i, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2606
2638
|
const d = a === void 0 ? !0 : a, c = oe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2607
2639
|
let m;
|
|
2608
2640
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (m = ["time-series", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = m) : m = e[9];
|
|
@@ -2617,27 +2649,27 @@ function Cn(i) {
|
|
|
2617
2649
|
...l
|
|
2618
2650
|
}, e[13] = m, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], ne(f);
|
|
2619
2651
|
}
|
|
2620
|
-
function vo(
|
|
2652
|
+
function vo(r) {
|
|
2621
2653
|
const e = C(6);
|
|
2622
2654
|
let t, n;
|
|
2623
|
-
e[0] !==
|
|
2655
|
+
e[0] !== r ? ({
|
|
2624
2656
|
children: t,
|
|
2625
2657
|
...n
|
|
2626
|
-
} =
|
|
2658
|
+
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2627
2659
|
const s = Cn(n);
|
|
2628
2660
|
let o;
|
|
2629
2661
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
2630
2662
|
}
|
|
2631
|
-
function bo(
|
|
2663
|
+
function bo(r) {
|
|
2632
2664
|
const e = C(13), {
|
|
2633
2665
|
children: t,
|
|
2634
2666
|
maps: n,
|
|
2635
2667
|
lassoTools: s,
|
|
2636
2668
|
measureTools: o
|
|
2637
|
-
} =
|
|
2638
|
-
let
|
|
2639
|
-
e[0] !== s ? (
|
|
2640
|
-
const a =
|
|
2669
|
+
} = r;
|
|
2670
|
+
let i;
|
|
2671
|
+
e[0] !== s ? (i = s === void 0 ? [] : s, e[0] = s, e[1] = i) : i = e[1];
|
|
2672
|
+
const a = i;
|
|
2641
2673
|
let l;
|
|
2642
2674
|
e[2] !== o ? (l = o === void 0 ? [] : o, e[2] = o, e[3] = l) : l = e[3];
|
|
2643
2675
|
const d = l;
|
|
@@ -2648,8 +2680,8 @@ function bo(i) {
|
|
|
2648
2680
|
let m;
|
|
2649
2681
|
return e[10] !== n || e[11] !== p ? (m = /* @__PURE__ */ N(_s, { values: n, children: p }), e[10] = n, e[11] = p, e[12] = m) : m = e[12], m;
|
|
2650
2682
|
}
|
|
2651
|
-
function Mo(
|
|
2652
|
-
const t = ce((d) => d.layers), n = ce((d) => d.setLayer), s = te(() =>
|
|
2683
|
+
function Mo(r, e) {
|
|
2684
|
+
const t = ce((d) => d.layers), n = ce((d) => d.setLayer), s = te(() => pt(r.map((d) => t[d]).filter((d) => !!d)), [t, r]), o = te(() => s.map(e), [e, s]), i = G(({
|
|
2653
2685
|
id: d,
|
|
2654
2686
|
visible: c,
|
|
2655
2687
|
...p
|
|
@@ -2681,24 +2713,24 @@ function Mo(i, e) {
|
|
|
2681
2713
|
}, [n]);
|
|
2682
2714
|
return {
|
|
2683
2715
|
legend: o,
|
|
2684
|
-
onChangeVisibility:
|
|
2716
|
+
onChangeVisibility: i,
|
|
2685
2717
|
onChangeOpacity: l,
|
|
2686
2718
|
onChangRowCollapsed: a
|
|
2687
2719
|
};
|
|
2688
2720
|
}
|
|
2689
2721
|
function Lo({
|
|
2690
|
-
mapId:
|
|
2722
|
+
mapId: r
|
|
2691
2723
|
}) {
|
|
2692
2724
|
const [e, t] = se(void 0), [n, s] = se(!1), o = O((f) => {
|
|
2693
2725
|
var _;
|
|
2694
|
-
return (_ = f.maps[
|
|
2695
|
-
}),
|
|
2726
|
+
return (_ = f.maps[r]) == null ? void 0 : _.basemap;
|
|
2727
|
+
}), i = O((f) => f.getDeckInstance), a = O((f) => f.getOverlayInstance), l = O((f) => f.areLayersLoaded[r]), c = O((f) => {
|
|
2696
2728
|
var _;
|
|
2697
|
-
return (_ = f.maps[
|
|
2729
|
+
return (_ = f.maps[r]) == null ? void 0 : _.isLoaded;
|
|
2698
2730
|
}) && l, {
|
|
2699
2731
|
type: p
|
|
2700
2732
|
} = de[o], m = p === X.googleMaps, u = G(async () => {
|
|
2701
|
-
const f = r
|
|
2733
|
+
const f = i(r), _ = a(r);
|
|
2702
2734
|
try {
|
|
2703
2735
|
const h = document.createElement("canvas");
|
|
2704
2736
|
h.width = f.width ?? 0, h.height = f.height ?? 0;
|
|
@@ -2723,7 +2755,7 @@ function Lo({
|
|
|
2723
2755
|
} finally {
|
|
2724
2756
|
s(!1);
|
|
2725
2757
|
}
|
|
2726
|
-
}, [
|
|
2758
|
+
}, [i, m, r, a]);
|
|
2727
2759
|
return {
|
|
2728
2760
|
takeScreenshot: G(() => {
|
|
2729
2761
|
s(!0), c && u();
|
|
@@ -2732,10 +2764,10 @@ function Lo({
|
|
|
2732
2764
|
screenshot: e
|
|
2733
2765
|
};
|
|
2734
2766
|
}
|
|
2735
|
-
function _o(
|
|
2767
|
+
function _o(r) {
|
|
2736
2768
|
const e = C(8), {
|
|
2737
2769
|
mapId: t
|
|
2738
|
-
} =
|
|
2770
|
+
} = r;
|
|
2739
2771
|
let n;
|
|
2740
2772
|
e[0] !== t ? (n = {
|
|
2741
2773
|
mapId: t
|
|
@@ -2745,20 +2777,20 @@ function _o(i) {
|
|
|
2745
2777
|
e[2] !== t ? (o = {
|
|
2746
2778
|
mapId: t
|
|
2747
2779
|
}, e[2] = t, e[3] = o) : o = e[3];
|
|
2748
|
-
const
|
|
2780
|
+
const i = Fn(o), a = i ?? s;
|
|
2749
2781
|
let l;
|
|
2750
|
-
return e[4] !==
|
|
2782
|
+
return e[4] !== i || e[5] !== a || e[6] !== s ? (l = {
|
|
2751
2783
|
spatialFilter: a,
|
|
2752
|
-
lassoToolsSpatialFilter:
|
|
2784
|
+
lassoToolsSpatialFilter: i,
|
|
2753
2785
|
viewportSpatialFilter: s
|
|
2754
|
-
}, e[4] =
|
|
2786
|
+
}, e[4] = i, e[5] = a, e[6] = s, e[7] = l) : l = e[7], l;
|
|
2755
2787
|
}
|
|
2756
|
-
function wn(
|
|
2788
|
+
function wn(r) {
|
|
2757
2789
|
const e = C(4), {
|
|
2758
2790
|
mapId: t
|
|
2759
|
-
} =
|
|
2791
|
+
} = r;
|
|
2760
2792
|
let n;
|
|
2761
|
-
e[0] !== t ? (n = (
|
|
2793
|
+
e[0] !== t ? (n = (i) => i.viewports[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2762
2794
|
const s = O(n);
|
|
2763
2795
|
let o;
|
|
2764
2796
|
e: {
|
|
@@ -2766,127 +2798,127 @@ function wn(i) {
|
|
|
2766
2798
|
o = void 0;
|
|
2767
2799
|
break e;
|
|
2768
2800
|
}
|
|
2769
|
-
let
|
|
2770
|
-
e[2] !== s ? (
|
|
2801
|
+
let i;
|
|
2802
|
+
e[2] !== s ? (i = Xt(s.getBounds()), e[2] = s, e[3] = i) : i = e[3], o = i;
|
|
2771
2803
|
}
|
|
2772
2804
|
return o;
|
|
2773
2805
|
}
|
|
2774
|
-
function Fn(
|
|
2806
|
+
function Fn(r) {
|
|
2775
2807
|
const e = C(5), {
|
|
2776
2808
|
mapId: t
|
|
2777
|
-
} =
|
|
2809
|
+
} = r;
|
|
2778
2810
|
let n;
|
|
2779
|
-
e[0] !== t ? (n = (
|
|
2811
|
+
e[0] !== t ? (n = (i) => {
|
|
2780
2812
|
var a;
|
|
2781
|
-
return (a =
|
|
2813
|
+
return (a = i.data[t]) == null ? void 0 : a.values;
|
|
2782
2814
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2783
2815
|
const s = H(n);
|
|
2784
2816
|
let o;
|
|
2785
2817
|
e: {
|
|
2786
|
-
let
|
|
2818
|
+
let i;
|
|
2787
2819
|
if (e[2] !== s) {
|
|
2788
|
-
const a =
|
|
2820
|
+
const a = lt({
|
|
2789
2821
|
values: s
|
|
2790
2822
|
}).filter(Dn);
|
|
2791
2823
|
if (!(a != null && a.length)) {
|
|
2792
2824
|
o = void 0;
|
|
2793
2825
|
break e;
|
|
2794
2826
|
}
|
|
2795
|
-
|
|
2827
|
+
i = es(a.map(On)), e[2] = s, e[3] = i, e[4] = o;
|
|
2796
2828
|
} else
|
|
2797
|
-
|
|
2798
|
-
o =
|
|
2829
|
+
i = e[3], o = e[4];
|
|
2830
|
+
o = i.geometry;
|
|
2799
2831
|
}
|
|
2800
2832
|
return o;
|
|
2801
2833
|
}
|
|
2802
|
-
function On(
|
|
2803
|
-
return
|
|
2834
|
+
function On(r) {
|
|
2835
|
+
return r.geometry.coordinates;
|
|
2804
2836
|
}
|
|
2805
|
-
function Dn(
|
|
2806
|
-
return
|
|
2837
|
+
function Dn(r) {
|
|
2838
|
+
return r.properties.visible;
|
|
2807
2839
|
}
|
|
2808
|
-
const
|
|
2840
|
+
const re = {
|
|
2809
2841
|
currency: "CURRENCY",
|
|
2810
2842
|
default: "DEFAULT",
|
|
2811
2843
|
number: "NUMBER"
|
|
2812
|
-
},
|
|
2813
|
-
[
|
|
2814
|
-
type:
|
|
2815
|
-
format: (
|
|
2844
|
+
}, Xe = {
|
|
2845
|
+
[re.currency]: {
|
|
2846
|
+
type: re.currency,
|
|
2847
|
+
format: (r, e) => Ht(r, e)
|
|
2816
2848
|
},
|
|
2817
|
-
[
|
|
2818
|
-
type:
|
|
2819
|
-
format: (
|
|
2849
|
+
[re.number]: {
|
|
2850
|
+
type: re.number,
|
|
2851
|
+
format: (r, e) => ot(r, e)
|
|
2820
2852
|
},
|
|
2821
|
-
[
|
|
2822
|
-
type:
|
|
2823
|
-
format: (
|
|
2853
|
+
[re.default]: {
|
|
2854
|
+
type: re.default,
|
|
2855
|
+
format: (r) => r.toLocaleString()
|
|
2824
2856
|
}
|
|
2825
2857
|
};
|
|
2826
2858
|
function To({
|
|
2827
|
-
properties:
|
|
2859
|
+
properties: r,
|
|
2828
2860
|
formatters: e = {},
|
|
2829
|
-
includeColumns: t = Object.keys(
|
|
2861
|
+
includeColumns: t = Object.keys(r),
|
|
2830
2862
|
locale: n = "en-US",
|
|
2831
2863
|
showColumnName: s = !0,
|
|
2832
2864
|
title: o,
|
|
2833
|
-
getColumnName:
|
|
2865
|
+
getColumnName: i = Un,
|
|
2834
2866
|
getFieldHtml: a = Rn,
|
|
2835
2867
|
getTitle: l = An,
|
|
2836
2868
|
getValue: d = $n
|
|
2837
2869
|
}) {
|
|
2838
2870
|
const c = o ? l(o) : "", m = t.reduce((u, g) => {
|
|
2839
|
-
const f = e[g], _ =
|
|
2871
|
+
const f = e[g], _ = r[g], h = d(_, n, f), y = s ? i(g) : "";
|
|
2840
2872
|
return u + a(y, h);
|
|
2841
2873
|
}, "");
|
|
2842
2874
|
return c + m;
|
|
2843
2875
|
}
|
|
2844
|
-
function An(
|
|
2845
|
-
return `<h3 style="margin: 0"><strong>${
|
|
2876
|
+
function An(r) {
|
|
2877
|
+
return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
|
|
2846
2878
|
}
|
|
2847
|
-
function Rn(
|
|
2848
|
-
return `${
|
|
2879
|
+
function Rn(r, e) {
|
|
2880
|
+
return `${r}${e}</br>`;
|
|
2849
2881
|
}
|
|
2850
|
-
function $n(
|
|
2882
|
+
function $n(r, e, t) {
|
|
2851
2883
|
try {
|
|
2852
|
-
return xn(t)(
|
|
2884
|
+
return xn(t)(r, e);
|
|
2853
2885
|
} catch {
|
|
2854
|
-
return
|
|
2886
|
+
return r;
|
|
2855
2887
|
}
|
|
2856
2888
|
}
|
|
2857
|
-
function xn(
|
|
2858
|
-
return typeof
|
|
2889
|
+
function xn(r) {
|
|
2890
|
+
return typeof r == "function" ? r : ((r && Xe[r]) ?? Xe[re.default]).format;
|
|
2859
2891
|
}
|
|
2860
|
-
function Un(
|
|
2861
|
-
return `<strong>${
|
|
2892
|
+
function Un(r) {
|
|
2893
|
+
return `<strong>${r}</strong>: `;
|
|
2862
2894
|
}
|
|
2863
|
-
function Eo(
|
|
2864
|
-
var e, t, n, s, o,
|
|
2895
|
+
function Eo(r) {
|
|
2896
|
+
var e, t, n, s, o, i, a, l;
|
|
2865
2897
|
return {
|
|
2866
|
-
collapsed: (e =
|
|
2867
|
-
collapsible: (t =
|
|
2868
|
-
helperText: (n =
|
|
2869
|
-
id:
|
|
2870
|
-
legend: (s =
|
|
2871
|
-
maxZoom: (o =
|
|
2872
|
-
minZoom: (
|
|
2873
|
-
opacity:
|
|
2874
|
-
showOpacityControl: (a =
|
|
2875
|
-
switchable: (l =
|
|
2876
|
-
title:
|
|
2877
|
-
visible:
|
|
2898
|
+
collapsed: (e = r.legend) == null ? void 0 : e.collapsed,
|
|
2899
|
+
collapsible: (t = r.legend) == null ? void 0 : t.collapsible,
|
|
2900
|
+
helperText: (n = r.legend) == null ? void 0 : n.helperText,
|
|
2901
|
+
id: r.props.id,
|
|
2902
|
+
legend: (s = r.legend) == null ? void 0 : s.variables,
|
|
2903
|
+
maxZoom: (o = r.legend) == null ? void 0 : o.maxZoom,
|
|
2904
|
+
minZoom: (i = r.legend) == null ? void 0 : i.minZoom,
|
|
2905
|
+
opacity: r.props.opacity ?? 1,
|
|
2906
|
+
showOpacityControl: (a = r.legend) == null ? void 0 : a.opacityControl,
|
|
2907
|
+
switchable: (l = r.legend) == null ? void 0 : l.switchable,
|
|
2908
|
+
title: r.name,
|
|
2909
|
+
visible: r.props.visible ?? !0
|
|
2878
2910
|
};
|
|
2879
2911
|
}
|
|
2880
|
-
function ko(
|
|
2912
|
+
function ko(r) {
|
|
2881
2913
|
const e = C(18), {
|
|
2882
2914
|
children: t,
|
|
2883
2915
|
mapId: n
|
|
2884
|
-
} =
|
|
2916
|
+
} = r;
|
|
2885
2917
|
let s;
|
|
2886
2918
|
e[0] !== n ? (s = (y) => y.viewStates[n], e[0] = n, e[1] = s) : s = e[1];
|
|
2887
2919
|
const {
|
|
2888
2920
|
zoom: o,
|
|
2889
|
-
maxZoom:
|
|
2921
|
+
maxZoom: i,
|
|
2890
2922
|
minZoom: a
|
|
2891
2923
|
} = O(s);
|
|
2892
2924
|
let l;
|
|
@@ -2899,24 +2931,24 @@ function ko(i) {
|
|
|
2899
2931
|
e[7] !== p || e[8] !== n ? (f = (y) => p(n, y), e[7] = p, e[8] = n, e[9] = f) : f = e[9];
|
|
2900
2932
|
const _ = f;
|
|
2901
2933
|
let h;
|
|
2902
|
-
return e[10] !== t || e[11] !==
|
|
2934
|
+
return e[10] !== t || e[11] !== i || e[12] !== a || e[13] !== m || e[14] !== g || e[15] !== _ || e[16] !== o ? (h = t({
|
|
2903
2935
|
zoom: o,
|
|
2904
|
-
maxZoom:
|
|
2936
|
+
maxZoom: i,
|
|
2905
2937
|
minZoom: a,
|
|
2906
2938
|
isLoading: m,
|
|
2907
2939
|
setZoom: g,
|
|
2908
2940
|
flyTo: _
|
|
2909
|
-
}), e[10] = t, e[11] =
|
|
2941
|
+
}), e[10] = t, e[11] = i, e[12] = a, e[13] = m, e[14] = g, e[15] = _, e[16] = o, e[17] = h) : h = e[17], h;
|
|
2910
2942
|
}
|
|
2911
|
-
function qn(
|
|
2912
|
-
return
|
|
2943
|
+
function qn(r) {
|
|
2944
|
+
return r.flyTo;
|
|
2913
2945
|
}
|
|
2914
|
-
function Vn(
|
|
2915
|
-
return
|
|
2946
|
+
function Vn(r) {
|
|
2947
|
+
return r.setZoom;
|
|
2916
2948
|
}
|
|
2917
2949
|
export {
|
|
2918
2950
|
yn as ApiBaseUrl,
|
|
2919
|
-
|
|
2951
|
+
Ke as CONVERSIONS_UNITS,
|
|
2920
2952
|
Fe as CartoBasemapURL,
|
|
2921
2953
|
K as CartoBasemaps,
|
|
2922
2954
|
fo as CategoriesModel,
|
|
@@ -2924,8 +2956,8 @@ export {
|
|
|
2924
2956
|
it as CustomEditableGeojsonLayer,
|
|
2925
2957
|
As as CustomMeasureAreaMode,
|
|
2926
2958
|
Rs as CustomMeasureBufferMode,
|
|
2927
|
-
|
|
2928
|
-
|
|
2959
|
+
ut as CustomMeasureDistanceMode,
|
|
2960
|
+
He as DEFAULT_LASSO_TOOLS_COLORS,
|
|
2929
2961
|
gs as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
2930
2962
|
De as DEFAULT_LASSO_TOOLS_MODES,
|
|
2931
2963
|
Oe as DEFAULT_LASSO_TOOLS_PROPS,
|
|
@@ -2943,11 +2975,11 @@ export {
|
|
|
2943
2975
|
Hs as LassoTools,
|
|
2944
2976
|
Fs as LassoToolsProvider,
|
|
2945
2977
|
de as MAPS_BASEMAP,
|
|
2946
|
-
|
|
2978
|
+
ie as MAP_LASSO_TOOLS_LAYER_ID,
|
|
2947
2979
|
be as MAP_MASK_LAYER_ID,
|
|
2948
2980
|
ee as MAP_MEASURE_LAYER_ID,
|
|
2949
2981
|
Us as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
2950
|
-
|
|
2982
|
+
We as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
2951
2983
|
z as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
2952
2984
|
uo as MapComponent,
|
|
2953
2985
|
$e as MapMeasurementUnitAuto,
|
|
@@ -2963,11 +2995,11 @@ export {
|
|
|
2963
2995
|
vo as TimeSeriesModel,
|
|
2964
2996
|
ko as ZoomControls,
|
|
2965
2997
|
hn as clientID,
|
|
2966
|
-
|
|
2998
|
+
ze as convertMetersTo,
|
|
2967
2999
|
ws as createLassoToolsStore,
|
|
2968
3000
|
Ls as createMapStore,
|
|
2969
3001
|
zs as createMeasurementToolsStore,
|
|
2970
|
-
|
|
3002
|
+
re as formatterTypes,
|
|
2971
3003
|
ts as getCursorDefault,
|
|
2972
3004
|
co as getDeckController,
|
|
2973
3005
|
Ps as getLassoToolsLayer,
|
|
@@ -2976,10 +3008,10 @@ export {
|
|
|
2976
3008
|
ss as getTooltipDefault,
|
|
2977
3009
|
Eo as mappingLegendMeridian,
|
|
2978
3010
|
To as objectToHtml,
|
|
2979
|
-
|
|
3011
|
+
pt as sortLayers,
|
|
2980
3012
|
hs as transitionFlyConfig,
|
|
2981
3013
|
Mn as useCategories,
|
|
2982
|
-
|
|
3014
|
+
dt as useEventManager,
|
|
2983
3015
|
Ln as useFeatures,
|
|
2984
3016
|
_n as useFormula,
|
|
2985
3017
|
Tn as useHistogram,
|