@carto/ps-react-maps 4.2.2 → 4.2.3
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 +1399 -1390
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useImperativeHandle as Ie, useEffect as
|
|
4
|
-
import { MapProvider as Ut, Map as
|
|
1
|
+
import { jsx as G, jsxs as mt } from "react/jsx-runtime";
|
|
2
|
+
import { c as B } from "react/compiler-runtime";
|
|
3
|
+
import { useImperativeHandle as Ie, useEffect as J, useState as ue, createContext as Ne, useContext as He, useMemo as ge, useCallback as se, useRef as ke } from "react";
|
|
4
|
+
import { MapProvider as Ut, Map as Vt, useMap as qt } from "react-map-gl/maplibre";
|
|
5
5
|
import Bt from "@deck.gl/react";
|
|
6
6
|
import { useMap as yt, Map as jt, APIProvider as It } from "@vis.gl/react-google-maps";
|
|
7
7
|
import { GoogleMapsOverlay as Nt } from "@deck.gl/google-maps";
|
|
8
|
-
import { createStore as
|
|
8
|
+
import { createStore as Ze, useStore as ze, create as ht } from "zustand";
|
|
9
9
|
import { FlyToInterpolator as Ht, WebMercatorViewport as gt } from "@deck.gl/core";
|
|
10
|
-
import { CompositeMode as
|
|
11
|
-
import { DataFilterExtension as nn, MaskExtension as
|
|
12
|
-
import { Pan as Je, InputDirection as
|
|
10
|
+
import { CompositeMode as Zt, TranslateMode as zt, ModifyMode as Gt, DrawPolygonByDraggingMode as Wt, DrawCircleFromCenterMode as bt, DrawRectangleMode as Kt, DrawPolygonMode as Yt, EditableGeoJsonLayer as Jt, MeasureAreaMode as Qt, getPickedEditHandle as Xt, MeasureDistanceMode as en, ViewMode as tn } from "@deck.gl-community/editable-layers";
|
|
11
|
+
import { DataFilterExtension as nn, MaskExtension as sn } from "@deck.gl/extensions";
|
|
12
|
+
import { Pan as Je, InputDirection as rn, EventManager as on, Tap as Qe, Pinch as an } from "mjolnir.js";
|
|
13
13
|
import { GeoJsonLayer as ln } from "@deck.gl/layers";
|
|
14
14
|
import { useShallow as St } from "zustand/shallow";
|
|
15
15
|
import { area as Xe, centroid as cn, lineIntersect as un, multiPolygon as vt } from "@turf/turf";
|
|
@@ -18,80 +18,80 @@ import Mt from "convert-units";
|
|
|
18
18
|
import fn from "convert-units/definitions/length";
|
|
19
19
|
import pn from "convert-units/definitions/area";
|
|
20
20
|
import { useQuery as _t } from "@tanstack/react-query";
|
|
21
|
-
import { removeFilter as mn, addFilter as
|
|
21
|
+
import { removeFilter as mn, addFilter as Ge, WidgetRasterSource as yn, WidgetTilesetSource as hn, TileFormat as gn, WidgetTableSource as bn, WidgetQuerySource as Sn, createViewportSpatialFilter as vn, vectorTilesetSource as wn } from "@carto/api-client";
|
|
22
22
|
import { devtools as Mn } from "zustand/middleware";
|
|
23
23
|
import _n from "html2canvas";
|
|
24
|
-
const
|
|
24
|
+
const Re = {
|
|
25
25
|
roadmap: "roadmap",
|
|
26
26
|
satellite: "satellite",
|
|
27
27
|
hybrid: "hybrid"
|
|
28
|
-
},
|
|
28
|
+
}, ae = {
|
|
29
29
|
darkMatter: "darkMatter",
|
|
30
30
|
positron: "positron",
|
|
31
31
|
voyager: "voyager"
|
|
32
|
-
},
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
},
|
|
32
|
+
}, De = {
|
|
33
|
+
[ae.positron]: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
34
|
+
[ae.voyager]: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
35
|
+
[ae.darkMatter]: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
36
|
+
}, ce = {
|
|
37
37
|
maplibre: "maplibre",
|
|
38
38
|
googleMaps: "google-maps"
|
|
39
|
-
},
|
|
40
|
-
[
|
|
41
|
-
url:
|
|
42
|
-
type:
|
|
39
|
+
}, we = {
|
|
40
|
+
[ae.positron]: {
|
|
41
|
+
url: De[ae.positron],
|
|
42
|
+
type: ce.maplibre
|
|
43
43
|
},
|
|
44
|
-
[
|
|
45
|
-
url:
|
|
46
|
-
type:
|
|
44
|
+
[ae.voyager]: {
|
|
45
|
+
url: De[ae.voyager],
|
|
46
|
+
type: ce.maplibre
|
|
47
47
|
},
|
|
48
|
-
[
|
|
49
|
-
url:
|
|
50
|
-
type:
|
|
48
|
+
[ae.darkMatter]: {
|
|
49
|
+
url: De[ae.darkMatter],
|
|
50
|
+
type: ce.maplibre,
|
|
51
51
|
dark: !0
|
|
52
52
|
},
|
|
53
|
-
[
|
|
54
|
-
type:
|
|
53
|
+
[Re.roadmap]: {
|
|
54
|
+
type: ce.googleMaps
|
|
55
55
|
},
|
|
56
|
-
[
|
|
57
|
-
type:
|
|
56
|
+
[Re.satellite]: {
|
|
57
|
+
type: ce.googleMaps
|
|
58
58
|
},
|
|
59
|
-
[
|
|
60
|
-
type:
|
|
59
|
+
[Re.hybrid]: {
|
|
60
|
+
type: ce.googleMaps
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
function En({
|
|
64
|
-
isDragging:
|
|
64
|
+
isDragging: s,
|
|
65
65
|
isHovering: e
|
|
66
66
|
}) {
|
|
67
|
-
return
|
|
67
|
+
return s ? "grabbing" : e ? "pointer" : "grab";
|
|
68
68
|
}
|
|
69
|
-
function Tn(
|
|
70
|
-
return
|
|
71
|
-
html: `<div class='map-tooltip__content'>${
|
|
69
|
+
function Tn(s) {
|
|
70
|
+
return s.html ? {
|
|
71
|
+
html: `<div class='map-tooltip__content'>${s.html}</div>`,
|
|
72
72
|
style: {
|
|
73
73
|
padding: "0",
|
|
74
74
|
background: "none"
|
|
75
75
|
}
|
|
76
76
|
} : null;
|
|
77
77
|
}
|
|
78
|
-
function Ln(
|
|
79
|
-
const e =
|
|
80
|
-
let t, n,
|
|
81
|
-
e[0] !==
|
|
78
|
+
function Ln(s) {
|
|
79
|
+
const e = B(39);
|
|
80
|
+
let t, n, r, o, i, a, l, d, m, h, b, f;
|
|
81
|
+
e[0] !== s ? ({
|
|
82
82
|
instanceRef: i,
|
|
83
|
-
overlayRef:
|
|
83
|
+
overlayRef: h,
|
|
84
84
|
controller: t,
|
|
85
85
|
id: o,
|
|
86
86
|
layers: a,
|
|
87
87
|
mapStyle: l,
|
|
88
88
|
parameters: b,
|
|
89
89
|
getCursor: n,
|
|
90
|
-
getTooltip:
|
|
90
|
+
getTooltip: r,
|
|
91
91
|
onLoad: d,
|
|
92
92
|
onViewStateChange: m,
|
|
93
93
|
...f
|
|
94
|
-
} =
|
|
94
|
+
} = s, e[0] = s, e[1] = t, e[2] = n, e[3] = r, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = m, e[10] = h, e[11] = b, e[12] = f) : (t = e[1], n = e[2], r = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], m = e[9], h = e[10], b = e[11], f = e[12]);
|
|
95
95
|
let w;
|
|
96
96
|
e[13] !== a ? (w = a.filter(Pn).map(Cn), e[13] = a, e[14] = w) : w = e[14];
|
|
97
97
|
const S = w, L = i;
|
|
@@ -105,66 +105,66 @@ function Ln(r) {
|
|
|
105
105
|
depthTest: !1,
|
|
106
106
|
...b
|
|
107
107
|
}, e[17] = b, e[18] = p) : p = e[18];
|
|
108
|
-
let
|
|
109
|
-
e[19] !==
|
|
108
|
+
let g;
|
|
109
|
+
e[19] !== h ? (g = /* @__PURE__ */ G(On, { overlayRef: h }), e[19] = h, e[20] = g) : g = e[20];
|
|
110
110
|
let M;
|
|
111
111
|
e[21] !== d ? (M = () => d({
|
|
112
112
|
type: "load",
|
|
113
113
|
value: !0
|
|
114
114
|
}), e[21] = d, e[22] = M) : M = e[22];
|
|
115
115
|
let v;
|
|
116
|
-
e[23] !== l || e[24] !== M ? (v = /* @__PURE__ */
|
|
116
|
+
e[23] !== l || e[24] !== M ? (v = /* @__PURE__ */ G(Vt, { reuseMaps: !1, mapStyle: l, onLoad: M, onRender: kn }), e[23] = l, e[24] = M, e[25] = v) : v = e[25];
|
|
117
117
|
let k;
|
|
118
|
-
return e[26] !== S || e[27] !== t || e[28] !== n || e[29] !==
|
|
119
|
-
|
|
118
|
+
return e[26] !== S || e[27] !== t || e[28] !== n || e[29] !== r || e[30] !== o || e[31] !== m || e[32] !== f || e[33] !== L || e[34] !== u || e[35] !== p || e[36] !== g || e[37] !== v ? (k = /* @__PURE__ */ G(Ut, { children: /* @__PURE__ */ G("div", { className: "deckgl-map", children: /* @__PURE__ */ mt(Bt, { controller: t, id: o, ref: L, layers: S, getCursor: n, getTooltip: r, onLoad: u, onViewStateChange: m, parameters: p, ...f, children: [
|
|
119
|
+
g,
|
|
120
120
|
v
|
|
121
|
-
] }) }) }), e[26] = S, e[27] = t, e[28] = n, e[29] =
|
|
121
|
+
] }) }) }), e[26] = S, e[27] = t, e[28] = n, e[29] = r, e[30] = o, e[31] = m, e[32] = f, e[33] = L, e[34] = u, e[35] = p, e[36] = g, e[37] = v, e[38] = k) : k = e[38], k;
|
|
122
122
|
}
|
|
123
123
|
function kn() {
|
|
124
124
|
document.querySelector(".maplibregl-compact-show")?.classList.remove("maplibregl-compact-show");
|
|
125
125
|
}
|
|
126
|
-
function Cn(
|
|
126
|
+
function Cn(s) {
|
|
127
127
|
const {
|
|
128
128
|
type: e,
|
|
129
129
|
props: t
|
|
130
|
-
} =
|
|
130
|
+
} = s;
|
|
131
131
|
return new e(t);
|
|
132
132
|
}
|
|
133
|
-
function Pn(
|
|
134
|
-
return !!
|
|
133
|
+
function Pn(s) {
|
|
134
|
+
return !!s?.type;
|
|
135
135
|
}
|
|
136
|
-
function On(
|
|
137
|
-
const e =
|
|
136
|
+
function On(s) {
|
|
137
|
+
const e = B(3), {
|
|
138
138
|
overlayRef: t
|
|
139
|
-
} =
|
|
139
|
+
} = s, {
|
|
140
140
|
default: n
|
|
141
|
-
} =
|
|
142
|
-
let
|
|
143
|
-
return e[0] !== n ? (
|
|
141
|
+
} = qt();
|
|
142
|
+
let r, o;
|
|
143
|
+
return e[0] !== n ? (r = () => n, o = [n], e[0] = n, e[1] = r, e[2] = o) : (r = e[1], o = e[2]), Ie(t, r, o), null;
|
|
144
144
|
}
|
|
145
|
-
const An = (
|
|
146
|
-
const e =
|
|
145
|
+
const An = (s) => {
|
|
146
|
+
const e = B(9);
|
|
147
147
|
let t;
|
|
148
148
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = new Nt({
|
|
149
149
|
interleaved: !0
|
|
150
150
|
}), e[0] = t) : t = e[0];
|
|
151
|
-
const n = t,
|
|
151
|
+
const n = t, r = yt();
|
|
152
152
|
let o, i;
|
|
153
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => n, i = [n], e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(
|
|
153
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = () => n, i = [n], e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(s.instanceRef, o, i);
|
|
154
154
|
let a, l;
|
|
155
|
-
e[3] !==
|
|
155
|
+
e[3] !== r ? (a = () => (n.setMap(r), () => {
|
|
156
156
|
n.finalize();
|
|
157
|
-
}), l = [n,
|
|
157
|
+
}), l = [n, r], e[3] = r, e[4] = a, e[5] = l) : (a = e[4], l = e[5]), J(a, l);
|
|
158
158
|
let d, m;
|
|
159
|
-
return e[6] !==
|
|
160
|
-
n.setProps(
|
|
161
|
-
}, m = [n,
|
|
159
|
+
return e[6] !== s ? (d = () => {
|
|
160
|
+
n.setProps(s);
|
|
161
|
+
}, m = [n, s], e[6] = s, e[7] = d, e[8] = m) : (d = e[7], m = e[8]), J(d, m), null;
|
|
162
162
|
};
|
|
163
|
-
function Fn(
|
|
164
|
-
const e =
|
|
165
|
-
let t, n,
|
|
166
|
-
e[0] !==
|
|
167
|
-
id:
|
|
163
|
+
function Fn(s) {
|
|
164
|
+
const e = B(77);
|
|
165
|
+
let t, n, r, o, i, a, l, d, m, h, b;
|
|
166
|
+
e[0] !== s ? ({
|
|
167
|
+
id: r,
|
|
168
168
|
instanceRef: o,
|
|
169
169
|
basemap: t,
|
|
170
170
|
layers: i,
|
|
@@ -174,8 +174,8 @@ function Fn(r) {
|
|
|
174
174
|
controller: n,
|
|
175
175
|
onLoad: a,
|
|
176
176
|
onViewStateChange: l,
|
|
177
|
-
...
|
|
178
|
-
} =
|
|
177
|
+
...h
|
|
178
|
+
} = s, e[0] = s, e[1] = t, e[2] = n, e[3] = r, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = m, e[10] = h, e[11] = b) : (t = e[1], n = e[2], r = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], m = e[9], h = e[10], b = e[11]);
|
|
179
179
|
let f;
|
|
180
180
|
e[12] !== b ? (f = b === void 0 ? {
|
|
181
181
|
apiKey: ""
|
|
@@ -189,127 +189,136 @@ function Fn(r) {
|
|
|
189
189
|
let u;
|
|
190
190
|
e: {
|
|
191
191
|
if (typeof n == "boolean") {
|
|
192
|
-
let
|
|
193
|
-
e[18] !== n ? (
|
|
192
|
+
let ie;
|
|
193
|
+
e[18] !== n ? (ie = {
|
|
194
194
|
dragPan: n,
|
|
195
195
|
doubleClickZoom: n,
|
|
196
196
|
scrollZoom: n
|
|
197
|
-
}, e[18] = n, e[19] =
|
|
197
|
+
}, e[18] = n, e[19] = ie) : ie = e[19], u = ie;
|
|
198
198
|
break e;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
let
|
|
202
|
-
e[20] !==
|
|
203
|
-
dragPan:
|
|
204
|
-
doubleClickZoom:
|
|
205
|
-
scrollZoom:
|
|
206
|
-
}, e[20] =
|
|
200
|
+
const X = n, te = X?.dragPan ?? !0, Y = X?.doubleClickZoom ?? !0, W = X?.scrollZoom ?? !0;
|
|
201
|
+
let ee;
|
|
202
|
+
e[20] !== te || e[21] !== Y || e[22] !== W ? (ee = {
|
|
203
|
+
dragPan: te,
|
|
204
|
+
doubleClickZoom: Y,
|
|
205
|
+
scrollZoom: W
|
|
206
|
+
}, e[20] = te, e[21] = Y, e[22] = W, e[23] = ee) : ee = e[23], u = ee;
|
|
207
207
|
}
|
|
208
208
|
const p = u;
|
|
209
|
-
let
|
|
210
|
-
e[24] !== i ? (
|
|
211
|
-
const M =
|
|
212
|
-
let
|
|
213
|
-
e[26] !==
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
209
|
+
let g;
|
|
210
|
+
e[24] !== i ? (g = i.filter(Dn).map(Rn), e[24] = i, e[25] = g) : g = e[25];
|
|
211
|
+
const M = g;
|
|
212
|
+
let v;
|
|
213
|
+
e[26] !== h.initialViewState?.maxZoom || e[27] !== h.initialViewState?.minZoom ? (v = (X) => {
|
|
214
|
+
const {
|
|
215
|
+
detail: te
|
|
216
|
+
} = X, {
|
|
217
|
+
center: Y,
|
|
218
|
+
zoom: W,
|
|
219
|
+
heading: ee,
|
|
220
|
+
tilt: ie
|
|
221
|
+
} = te;
|
|
222
|
+
return {
|
|
223
|
+
maxZoom: h.initialViewState?.maxZoom,
|
|
224
|
+
minZoom: h.initialViewState?.minZoom,
|
|
225
|
+
latitude: Y.lat,
|
|
226
|
+
longitude: Y.lng,
|
|
227
|
+
zoom: W - 1,
|
|
228
|
+
bearing: ee,
|
|
229
|
+
pitch: ie
|
|
230
|
+
};
|
|
231
|
+
}, e[26] = h.initialViewState?.maxZoom, e[27] = h.initialViewState?.minZoom, e[28] = v) : v = e[28], h.initialViewState?.maxZoom, h.initialViewState?.minZoom;
|
|
232
|
+
const k = v;
|
|
233
|
+
let F;
|
|
234
|
+
e[29] !== o || e[30] !== l ? (F = (X) => {
|
|
235
|
+
const Y = o?.current?._deck, W = {
|
|
236
|
+
...Y?.viewState,
|
|
237
|
+
...X
|
|
238
|
+
}, ee = {
|
|
239
|
+
...W,
|
|
240
|
+
latitude: W.latitude,
|
|
241
|
+
longitude: W.longitude,
|
|
242
|
+
zoom: W.zoom,
|
|
243
|
+
pitch: W.pitch,
|
|
244
|
+
bearing: W.bearing,
|
|
245
|
+
width: Y?.width,
|
|
246
|
+
height: Y?.height
|
|
225
247
|
};
|
|
226
248
|
l?.({
|
|
227
|
-
viewState:
|
|
249
|
+
viewState: ee,
|
|
228
250
|
interactionState: {
|
|
229
251
|
isZooming: !0
|
|
230
252
|
}
|
|
231
253
|
});
|
|
232
|
-
}, e[
|
|
233
|
-
const
|
|
234
|
-
let
|
|
235
|
-
e[
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}, e[
|
|
239
|
-
const
|
|
240
|
-
let
|
|
241
|
-
e[
|
|
254
|
+
}, e[29] = o, e[30] = l, e[31] = F) : F = e[31];
|
|
255
|
+
const V = F;
|
|
256
|
+
let A;
|
|
257
|
+
e[32] !== V || e[33] !== k ? (A = (X) => {
|
|
258
|
+
const te = k(X);
|
|
259
|
+
V(te);
|
|
260
|
+
}, e[32] = V, e[33] = k, e[34] = A) : A = e[34];
|
|
261
|
+
const $ = A, q = h.initialViewState?.latitude ?? 0, R = h.initialViewState?.longitude ?? 0;
|
|
262
|
+
let _;
|
|
263
|
+
e[35] !== q || e[36] !== R ? (_ = {
|
|
264
|
+
lat: q,
|
|
265
|
+
lng: R
|
|
266
|
+
}, e[35] = q, e[36] = R, e[37] = _) : _ = e[37];
|
|
267
|
+
const O = (h.initialViewState?.zoom ?? 0) + 1, c = h.initialViewState?.maxZoom ?? 24, y = h.initialViewState?.minZoom ?? 0, T = h.initialViewState?.pitch, P = h.initialViewState?.bearing;
|
|
268
|
+
let C;
|
|
269
|
+
e[38] !== V || e[39] !== a || e[40] !== h.initialViewState ? (C = () => {
|
|
242
270
|
a({
|
|
243
271
|
type: "load",
|
|
244
272
|
value: !0
|
|
245
|
-
}),
|
|
246
|
-
}, e[
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
let
|
|
251
|
-
e[
|
|
252
|
-
let q;
|
|
253
|
-
e[42] !== a ? (q = () => {
|
|
273
|
+
}), V(h.initialViewState);
|
|
274
|
+
}, e[38] = V, e[39] = a, e[40] = h.initialViewState, e[41] = C) : C = e[41];
|
|
275
|
+
const E = typeof p.scrollZoom == "boolean" ? p.scrollZoom : !!p.scrollZoom, j = p.dragPan ? "greedy" : "none", I = !p.doubleClickZoom;
|
|
276
|
+
let N;
|
|
277
|
+
e[42] !== r || e[43] !== d ? (N = /* @__PURE__ */ G(xn, { id: r, overlayRef: d }), e[42] = r, e[43] = d, e[44] = N) : N = e[44];
|
|
278
|
+
let U;
|
|
279
|
+
e[45] !== a ? (U = () => {
|
|
254
280
|
a({
|
|
255
281
|
type: "deckgl",
|
|
256
282
|
value: !0
|
|
257
283
|
});
|
|
258
|
-
}, e[
|
|
259
|
-
let
|
|
260
|
-
e[
|
|
284
|
+
}, e[45] = a, e[46] = U) : U = e[46];
|
|
285
|
+
let Z;
|
|
286
|
+
e[47] !== m ? (Z = {
|
|
261
287
|
depthTest: !1,
|
|
262
288
|
...m
|
|
263
|
-
}, e[
|
|
264
|
-
let
|
|
265
|
-
e[
|
|
266
|
-
let
|
|
267
|
-
e[
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
] }) }), e[
|
|
271
|
-
let
|
|
272
|
-
return e[
|
|
273
|
-
}
|
|
274
|
-
function
|
|
275
|
-
const {
|
|
276
|
-
detail: e
|
|
277
|
-
} = r, {
|
|
278
|
-
center: t,
|
|
279
|
-
zoom: n,
|
|
280
|
-
heading: s,
|
|
281
|
-
tilt: o
|
|
282
|
-
} = e;
|
|
283
|
-
return {
|
|
284
|
-
latitude: t.lat,
|
|
285
|
-
longitude: t.lng,
|
|
286
|
-
zoom: n - 1,
|
|
287
|
-
bearing: s,
|
|
288
|
-
pitch: o
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
function Rn(r) {
|
|
289
|
+
}, e[47] = m, e[48] = Z) : Z = e[48];
|
|
290
|
+
let oe;
|
|
291
|
+
e[49] !== M || e[50] !== r || e[51] !== o || e[52] !== h || e[53] !== U || e[54] !== Z ? (oe = /* @__PURE__ */ G(An, { id: r, instanceRef: o, layers: M, onLoad: U, parameters: Z, ...h }), e[49] = M, e[50] = r, e[51] = o, e[52] = h, e[53] = U, e[54] = Z, e[55] = oe) : oe = e[55];
|
|
292
|
+
let Q;
|
|
293
|
+
e[56] !== S || e[57] !== t || e[58] !== $ || e[59] !== r || e[60] !== _ || e[61] !== O || e[62] !== c || e[63] !== y || e[64] !== T || e[65] !== P || e[66] !== C || e[67] !== E || e[68] !== j || e[69] !== I || e[70] !== N || e[71] !== oe ? (Q = /* @__PURE__ */ G("div", { className: "deckgl-map", children: /* @__PURE__ */ mt(jt, { id: r, mapTypeId: t, disableDefaultUI: !0, ...S, center: _, zoom: O, maxZoom: c, minZoom: y, tilt: T, heading: P, onTilesLoaded: C, onBoundsChanged: $, onZoomChanged: $, scrollwheel: E, gestureHandling: j, disableDoubleClickZoom: I, children: [
|
|
294
|
+
N,
|
|
295
|
+
oe
|
|
296
|
+
] }) }), e[56] = S, e[57] = t, e[58] = $, e[59] = r, e[60] = _, e[61] = O, e[62] = c, e[63] = y, e[64] = T, e[65] = P, e[66] = C, e[67] = E, e[68] = j, e[69] = I, e[70] = N, e[71] = oe, e[72] = Q) : Q = e[72];
|
|
297
|
+
let le;
|
|
298
|
+
return e[73] !== w || e[74] !== L || e[75] !== Q ? (le = /* @__PURE__ */ G(It, { apiKey: L, ...w, children: Q }), e[73] = w, e[74] = L, e[75] = Q, e[76] = le) : le = e[76], le;
|
|
299
|
+
}
|
|
300
|
+
function Rn(s) {
|
|
292
301
|
const {
|
|
293
302
|
type: e,
|
|
294
303
|
props: t
|
|
295
|
-
} =
|
|
304
|
+
} = s;
|
|
296
305
|
return new e(t);
|
|
297
306
|
}
|
|
298
|
-
function
|
|
299
|
-
return !!
|
|
307
|
+
function Dn(s) {
|
|
308
|
+
return !!s?.type;
|
|
300
309
|
}
|
|
301
|
-
function
|
|
302
|
-
const e =
|
|
310
|
+
function xn(s) {
|
|
311
|
+
const e = B(3), {
|
|
303
312
|
id: t,
|
|
304
313
|
overlayRef: n
|
|
305
|
-
} =
|
|
314
|
+
} = s, r = yt(t);
|
|
306
315
|
let o, i;
|
|
307
|
-
return e[0] !==
|
|
316
|
+
return e[0] !== r ? (o = () => r, i = [r], e[0] = r, e[1] = o, e[2] = i) : (o = e[1], i = e[2]), Ie(n, o, i), null;
|
|
308
317
|
}
|
|
309
|
-
function
|
|
310
|
-
const e =
|
|
311
|
-
let t, n,
|
|
312
|
-
e[0] !==
|
|
318
|
+
function $n(s) {
|
|
319
|
+
const e = B(46);
|
|
320
|
+
let t, n, r, o, i, a, l, d, m, h, b, f;
|
|
321
|
+
e[0] !== s ? ({
|
|
313
322
|
instanceRef: n,
|
|
314
323
|
overlayRef: o,
|
|
315
324
|
basemap: a,
|
|
@@ -317,70 +326,70 @@ function Un(r) {
|
|
|
317
326
|
id: d,
|
|
318
327
|
layers: m,
|
|
319
328
|
gmapsProps: t,
|
|
320
|
-
getCursor:
|
|
329
|
+
getCursor: h,
|
|
321
330
|
getTooltip: b,
|
|
322
|
-
onLoad:
|
|
331
|
+
onLoad: r,
|
|
323
332
|
onViewStateChange: f,
|
|
324
333
|
...i
|
|
325
|
-
} =
|
|
326
|
-
const w = a === void 0 ?
|
|
334
|
+
} = s, e[0] = s, e[1] = t, e[2] = n, e[3] = r, e[4] = o, e[5] = i, e[6] = a, e[7] = l, e[8] = d, e[9] = m, e[10] = h, e[11] = b, e[12] = f) : (t = e[1], n = e[2], r = e[3], o = e[4], i = e[5], a = e[6], l = e[7], d = e[8], m = e[9], h = e[10], b = e[11], f = e[12]);
|
|
335
|
+
const w = a === void 0 ? ae.positron : a, S = l === void 0 ? !0 : l, L = d === void 0 ? "deck-gl-map" : d;
|
|
327
336
|
let u;
|
|
328
337
|
e[13] !== m ? (u = m === void 0 ? [] : m, e[13] = m, e[14] = u) : u = e[14];
|
|
329
|
-
const p = u,
|
|
338
|
+
const p = u, g = h === void 0 ? En : h, M = b === void 0 ? Tn : b, v = f === void 0 ? Vn : f;
|
|
330
339
|
let k;
|
|
331
340
|
e[15] === Symbol.for("react.memo_cache_sentinel") ? (k = [!1, !1], e[15] = k) : k = e[15];
|
|
332
|
-
const [
|
|
333
|
-
url:
|
|
334
|
-
type:
|
|
335
|
-
} =
|
|
336
|
-
let
|
|
337
|
-
e[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
338
|
-
const
|
|
339
|
-
V((
|
|
340
|
-
}, e[16] =
|
|
341
|
-
const
|
|
341
|
+
const [F, V] = ue(k), {
|
|
342
|
+
url: A,
|
|
343
|
+
type: $
|
|
344
|
+
} = we[w], q = $ === ce.googleMaps;
|
|
345
|
+
let R;
|
|
346
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (R = (C) => {
|
|
347
|
+
const E = C.type === "deckgl" ? 0 : 1;
|
|
348
|
+
V((j) => j.map((I, N) => N === E ? C.value : I));
|
|
349
|
+
}, e[16] = R) : R = e[16];
|
|
350
|
+
const _ = R;
|
|
342
351
|
let O, c;
|
|
343
352
|
e[17] === Symbol.for("react.memo_cache_sentinel") ? (O = () => () => {
|
|
344
|
-
|
|
353
|
+
_({
|
|
345
354
|
type: "load",
|
|
346
355
|
value: !1
|
|
347
|
-
}),
|
|
356
|
+
}), _({
|
|
348
357
|
type: "deckgl",
|
|
349
358
|
value: !1
|
|
350
359
|
});
|
|
351
|
-
}, c = [
|
|
360
|
+
}, c = [_], e[17] = O, e[18] = c) : (O = e[17], c = e[18]), J(O, c);
|
|
352
361
|
let y, T;
|
|
353
|
-
if (e[19] !==
|
|
354
|
-
const C =
|
|
355
|
-
|
|
356
|
-
}, T = [
|
|
362
|
+
if (e[19] !== F || e[20] !== r ? (y = () => {
|
|
363
|
+
const C = F.every(Un);
|
|
364
|
+
r?.(C);
|
|
365
|
+
}, T = [F, r], e[19] = F, e[20] = r, e[21] = y, e[22] = T) : (y = e[21], T = e[22]), J(y, T), q) {
|
|
357
366
|
let C;
|
|
358
|
-
return e[23] !== w || e[24] !== S || e[25] !==
|
|
367
|
+
return e[23] !== w || e[24] !== S || e[25] !== g || e[26] !== M || e[27] !== t || e[28] !== L || e[29] !== n || e[30] !== p || e[31] !== v || e[32] !== o || e[33] !== i ? (C = /* @__PURE__ */ G(Fn, { instanceRef: n, overlayRef: o, controller: S, id: L, basemap: w, layers: p, gmapsProps: t, getCursor: g, getTooltip: M, onLoad: _, onViewStateChange: v, ...i }), e[23] = w, e[24] = S, e[25] = g, e[26] = M, e[27] = t, e[28] = L, e[29] = n, e[30] = p, e[31] = v, e[32] = o, e[33] = i, e[34] = C) : C = e[34], C;
|
|
359
368
|
}
|
|
360
369
|
let P;
|
|
361
|
-
return e[35] !== S || e[36] !==
|
|
370
|
+
return e[35] !== S || e[36] !== g || e[37] !== M || e[38] !== L || e[39] !== n || e[40] !== p || e[41] !== A || e[42] !== v || e[43] !== o || e[44] !== i ? (P = /* @__PURE__ */ G(Ln, { instanceRef: n, overlayRef: o, controller: S, id: L, layers: p, mapStyle: A, getCursor: g, getTooltip: M, onLoad: _, onViewStateChange: v, ...i }), e[35] = S, e[36] = g, e[37] = M, e[38] = L, e[39] = n, e[40] = p, e[41] = A, e[42] = v, e[43] = o, e[44] = i, e[45] = P) : P = e[45], P;
|
|
362
371
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
372
|
+
function Un(s) {
|
|
373
|
+
return s;
|
|
365
374
|
}
|
|
366
375
|
function Vn() {
|
|
367
376
|
return null;
|
|
368
377
|
}
|
|
369
|
-
const
|
|
378
|
+
const qn = {
|
|
370
379
|
transitionDuration: "auto",
|
|
371
380
|
transitionInterpolator: new Ht({
|
|
372
381
|
curve: 2
|
|
373
382
|
})
|
|
374
383
|
};
|
|
375
|
-
var
|
|
376
|
-
function Et(
|
|
377
|
-
return
|
|
384
|
+
var Ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
385
|
+
function Et(s) {
|
|
386
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
378
387
|
}
|
|
379
388
|
var xe, et;
|
|
380
|
-
function
|
|
389
|
+
function Bn() {
|
|
381
390
|
if (et) return xe;
|
|
382
391
|
et = 1;
|
|
383
|
-
var
|
|
392
|
+
var s = function(p) {
|
|
384
393
|
return e(p) && !t(p);
|
|
385
394
|
};
|
|
386
395
|
function e(u) {
|
|
@@ -390,9 +399,9 @@ function jn() {
|
|
|
390
399
|
var p = Object.prototype.toString.call(u);
|
|
391
400
|
return p === "[object RegExp]" || p === "[object Date]" || o(u);
|
|
392
401
|
}
|
|
393
|
-
var n = typeof Symbol == "function" && Symbol.for,
|
|
402
|
+
var n = typeof Symbol == "function" && Symbol.for, r = n ? Symbol.for("react.element") : 60103;
|
|
394
403
|
function o(u) {
|
|
395
|
-
return u.$$typeof ===
|
|
404
|
+
return u.$$typeof === r;
|
|
396
405
|
}
|
|
397
406
|
function i(u) {
|
|
398
407
|
return Array.isArray(u) ? [] : {};
|
|
@@ -400,23 +409,23 @@ function jn() {
|
|
|
400
409
|
function a(u, p) {
|
|
401
410
|
return p.clone !== !1 && p.isMergeableObject(u) ? S(i(u), u, p) : u;
|
|
402
411
|
}
|
|
403
|
-
function l(u, p,
|
|
412
|
+
function l(u, p, g) {
|
|
404
413
|
return u.concat(p).map(function(M) {
|
|
405
|
-
return a(M,
|
|
414
|
+
return a(M, g);
|
|
406
415
|
});
|
|
407
416
|
}
|
|
408
417
|
function d(u, p) {
|
|
409
418
|
if (!p.customMerge)
|
|
410
419
|
return S;
|
|
411
|
-
var
|
|
412
|
-
return typeof
|
|
420
|
+
var g = p.customMerge(u);
|
|
421
|
+
return typeof g == "function" ? g : S;
|
|
413
422
|
}
|
|
414
423
|
function m(u) {
|
|
415
424
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(p) {
|
|
416
425
|
return Object.propertyIsEnumerable.call(u, p);
|
|
417
426
|
}) : [];
|
|
418
427
|
}
|
|
419
|
-
function
|
|
428
|
+
function h(u) {
|
|
420
429
|
return Object.keys(u).concat(m(u));
|
|
421
430
|
}
|
|
422
431
|
function b(u, p) {
|
|
@@ -429,37 +438,37 @@ function jn() {
|
|
|
429
438
|
function f(u, p) {
|
|
430
439
|
return b(u, p) && !(Object.hasOwnProperty.call(u, p) && Object.propertyIsEnumerable.call(u, p));
|
|
431
440
|
}
|
|
432
|
-
function w(u, p,
|
|
441
|
+
function w(u, p, g) {
|
|
433
442
|
var M = {};
|
|
434
|
-
return
|
|
435
|
-
M[v] = a(u[v],
|
|
436
|
-
}),
|
|
437
|
-
f(u, v) || (b(u, v) &&
|
|
443
|
+
return g.isMergeableObject(u) && h(u).forEach(function(v) {
|
|
444
|
+
M[v] = a(u[v], g);
|
|
445
|
+
}), h(p).forEach(function(v) {
|
|
446
|
+
f(u, v) || (b(u, v) && g.isMergeableObject(p[v]) ? M[v] = d(v, g)(u[v], p[v], g) : M[v] = a(p[v], g));
|
|
438
447
|
}), M;
|
|
439
448
|
}
|
|
440
|
-
function S(u, p,
|
|
441
|
-
|
|
449
|
+
function S(u, p, g) {
|
|
450
|
+
g = g || {}, g.arrayMerge = g.arrayMerge || l, g.isMergeableObject = g.isMergeableObject || s, g.cloneUnlessOtherwiseSpecified = a;
|
|
442
451
|
var M = Array.isArray(p), v = Array.isArray(u), k = M === v;
|
|
443
|
-
return k ? M ?
|
|
452
|
+
return k ? M ? g.arrayMerge(u, p, g) : w(u, p, g) : a(p, g);
|
|
444
453
|
}
|
|
445
|
-
S.all = function(p,
|
|
454
|
+
S.all = function(p, g) {
|
|
446
455
|
if (!Array.isArray(p))
|
|
447
456
|
throw new Error("first argument should be an array");
|
|
448
457
|
return p.reduce(function(M, v) {
|
|
449
|
-
return S(M, v,
|
|
458
|
+
return S(M, v, g);
|
|
450
459
|
}, {});
|
|
451
460
|
};
|
|
452
461
|
var L = S;
|
|
453
462
|
return xe = L, xe;
|
|
454
463
|
}
|
|
455
|
-
var
|
|
456
|
-
const
|
|
457
|
-
const e =
|
|
464
|
+
var jn = Bn();
|
|
465
|
+
const me = /* @__PURE__ */ Et(jn), In = (s) => {
|
|
466
|
+
const e = s.reduce((t, n) => {
|
|
458
467
|
const {
|
|
459
|
-
id:
|
|
468
|
+
id: r,
|
|
460
469
|
basemap: o
|
|
461
470
|
} = n;
|
|
462
|
-
return t[
|
|
471
|
+
return t[r] = {
|
|
463
472
|
isLoaded: !1,
|
|
464
473
|
basemap: o,
|
|
465
474
|
instanceRef: {
|
|
@@ -474,52 +483,52 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
474
483
|
}, {});
|
|
475
484
|
return ((t, n) => ({
|
|
476
485
|
maps: e,
|
|
477
|
-
setBasemap: (
|
|
486
|
+
setBasemap: (r, o) => t((i) => {
|
|
478
487
|
const {
|
|
479
488
|
type: a
|
|
480
|
-
} =
|
|
489
|
+
} = we[i.maps[r].basemap], {
|
|
481
490
|
type: l
|
|
482
|
-
} =
|
|
491
|
+
} = we[o], d = a === l && !!i.maps[r]?.isLoaded;
|
|
483
492
|
return {
|
|
484
493
|
maps: {
|
|
485
494
|
...i.maps,
|
|
486
|
-
[
|
|
487
|
-
...i.maps[
|
|
495
|
+
[r]: {
|
|
496
|
+
...i.maps[r],
|
|
488
497
|
isLoaded: d,
|
|
489
498
|
basemap: o
|
|
490
499
|
}
|
|
491
500
|
}
|
|
492
501
|
};
|
|
493
502
|
}),
|
|
494
|
-
setLoad: (
|
|
503
|
+
setLoad: (r, o) => t((i) => ({
|
|
495
504
|
maps: {
|
|
496
505
|
...i.maps,
|
|
497
|
-
[
|
|
498
|
-
...i.maps[
|
|
506
|
+
[r]: {
|
|
507
|
+
...i.maps[r],
|
|
499
508
|
isLoaded: o
|
|
500
509
|
}
|
|
501
510
|
}
|
|
502
511
|
})),
|
|
503
|
-
getOverlayInstance: (
|
|
504
|
-
getDeckInstance: (
|
|
505
|
-
const i = n().maps[
|
|
512
|
+
getOverlayInstance: (r) => n().maps[r]?.overlayRef?.current,
|
|
513
|
+
getDeckInstance: (r) => {
|
|
514
|
+
const i = n().maps[r]?.instanceRef?.current;
|
|
506
515
|
return (
|
|
507
516
|
// @ts-expect-error accessing protected props
|
|
508
517
|
i?.deck ?? i?._deck
|
|
509
518
|
);
|
|
510
519
|
},
|
|
511
|
-
getViewState: (
|
|
512
|
-
getViewports: (
|
|
513
|
-
getViewport: (
|
|
514
|
-
getBounds: (
|
|
520
|
+
getViewState: (r) => n().getDeckInstance(r)?.viewState,
|
|
521
|
+
getViewports: (r, o) => n().getDeckInstance(r)?.getViewports(o),
|
|
522
|
+
getViewport: (r, o = 0, i) => n().getDeckInstance(r)?.getViewports(i)?.[o],
|
|
523
|
+
getBounds: (r, o, i) => {
|
|
515
524
|
const a = n();
|
|
516
|
-
if (!a.maps?.[
|
|
517
|
-
const l = a.getViewState(
|
|
525
|
+
if (!a.maps?.[r]?.isLoaded) return;
|
|
526
|
+
const l = a.getViewState(r), d = a.getDeckInstance(r);
|
|
518
527
|
if (!l || !d?.height || !d?.width) return;
|
|
519
|
-
const m = l?.height ?? d?.height,
|
|
528
|
+
const m = l?.height ?? d?.height, h = l?.width ?? d?.width, f = new gt({
|
|
520
529
|
...l,
|
|
521
530
|
height: m,
|
|
522
|
-
width:
|
|
531
|
+
width: h
|
|
523
532
|
}).fitBounds(o, i?.boundsOptions);
|
|
524
533
|
return {
|
|
525
534
|
latitude: f.latitude,
|
|
@@ -528,61 +537,61 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
528
537
|
...i?.viewStateOptions
|
|
529
538
|
};
|
|
530
539
|
},
|
|
531
|
-
addLayers: (
|
|
540
|
+
addLayers: (r, o) => t((i) => {
|
|
532
541
|
const a = {
|
|
533
542
|
...i.maps
|
|
534
|
-
}, l = a[
|
|
535
|
-
return a[
|
|
536
|
-
...a[
|
|
543
|
+
}, l = a[r]?.layers ?? [], d = /* @__PURE__ */ new Set([...l, ...o]);
|
|
544
|
+
return a[r] = {
|
|
545
|
+
...a[r],
|
|
537
546
|
layers: [...d]
|
|
538
547
|
}, {
|
|
539
548
|
maps: a
|
|
540
549
|
};
|
|
541
550
|
}),
|
|
542
|
-
removeLayers: (
|
|
551
|
+
removeLayers: (r, o) => t((i) => {
|
|
543
552
|
const a = {
|
|
544
553
|
...i.maps
|
|
545
|
-
}, l = a[
|
|
546
|
-
return a[
|
|
547
|
-
...a[
|
|
554
|
+
}, l = a[r]?.layers ?? [];
|
|
555
|
+
return a[r] = {
|
|
556
|
+
...a[r],
|
|
548
557
|
layers: l.filter((d) => !o.includes(d))
|
|
549
558
|
}, {
|
|
550
559
|
maps: a
|
|
551
560
|
};
|
|
552
561
|
}),
|
|
553
|
-
setController: (
|
|
554
|
-
const a = i.maps[
|
|
562
|
+
setController: (r, o) => t((i) => {
|
|
563
|
+
const a = i.maps[r]?.controller ?? {}, d = !o || typeof o == "boolean" ? o : me(typeof a == "boolean" ? {} : a, o);
|
|
555
564
|
return {
|
|
556
565
|
maps: {
|
|
557
566
|
...i.maps,
|
|
558
|
-
[
|
|
559
|
-
...i.maps[
|
|
567
|
+
[r]: {
|
|
568
|
+
...i.maps[r],
|
|
560
569
|
controller: d
|
|
561
570
|
}
|
|
562
571
|
}
|
|
563
572
|
};
|
|
564
573
|
})
|
|
565
574
|
}));
|
|
566
|
-
},
|
|
567
|
-
const e =
|
|
575
|
+
}, Nn = (s) => {
|
|
576
|
+
const e = s.reduce((t, n) => {
|
|
568
577
|
const {
|
|
569
|
-
id:
|
|
578
|
+
id: r
|
|
570
579
|
} = n;
|
|
571
|
-
return t[
|
|
580
|
+
return t[r] = !1, t;
|
|
572
581
|
}, {});
|
|
573
582
|
return ((t) => ({
|
|
574
583
|
areLayersLoaded: e,
|
|
575
|
-
setLayersLoad: (n,
|
|
584
|
+
setLayersLoad: (n, r) => t((o) => ({
|
|
576
585
|
areLayersLoaded: {
|
|
577
586
|
...o.areLayersLoaded,
|
|
578
|
-
[n]:
|
|
587
|
+
[n]: r
|
|
579
588
|
}
|
|
580
589
|
}))
|
|
581
590
|
}));
|
|
582
|
-
},
|
|
583
|
-
const e =
|
|
584
|
-
const
|
|
585
|
-
return t.initialViewStates[n.id] =
|
|
591
|
+
}, Hn = (s) => {
|
|
592
|
+
const e = s.reduce((t, n) => {
|
|
593
|
+
const r = n.initialViewState ?? n.viewState;
|
|
594
|
+
return t.initialViewStates[n.id] = r, t.viewStates[n.id] = r, t.viewports[n.id] = null, t;
|
|
586
595
|
}, {
|
|
587
596
|
viewStates: {},
|
|
588
597
|
viewports: {},
|
|
@@ -591,70 +600,70 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
591
600
|
return ((t, n) => ({
|
|
592
601
|
viewports: e.viewports,
|
|
593
602
|
initialViewStates: e.initialViewStates,
|
|
594
|
-
updateViewPort: (
|
|
603
|
+
updateViewPort: (r) => {
|
|
595
604
|
const o = n();
|
|
596
|
-
if (!o.maps[
|
|
597
|
-
const i = new gt(o.viewStates[
|
|
605
|
+
if (!o.maps[r]?.isLoaded) return;
|
|
606
|
+
const i = new gt(o.viewStates[r]);
|
|
598
607
|
t((a) => ({
|
|
599
608
|
viewports: {
|
|
600
609
|
...a.viewports,
|
|
601
|
-
[
|
|
610
|
+
[r]: i
|
|
602
611
|
}
|
|
603
612
|
}));
|
|
604
613
|
},
|
|
605
614
|
viewStates: e.viewStates,
|
|
606
|
-
setViewState: (
|
|
615
|
+
setViewState: (r, o) => t((i) => ({
|
|
607
616
|
viewStates: {
|
|
608
617
|
...i.viewStates,
|
|
609
|
-
[
|
|
610
|
-
...i.viewStates[
|
|
618
|
+
[r]: {
|
|
619
|
+
...i.viewStates[r],
|
|
611
620
|
...o
|
|
612
621
|
}
|
|
613
622
|
}
|
|
614
623
|
})),
|
|
615
|
-
setInitialViewState: (
|
|
624
|
+
setInitialViewState: (r, o) => t((i) => ({
|
|
616
625
|
initialViewStates: {
|
|
617
626
|
...i.initialViewStates,
|
|
618
|
-
[
|
|
627
|
+
[r]: o
|
|
619
628
|
}
|
|
620
629
|
})),
|
|
621
|
-
setZoom: (
|
|
630
|
+
setZoom: (r, o) => t((i) => ({
|
|
622
631
|
viewStates: {
|
|
623
632
|
...i.viewStates,
|
|
624
|
-
[
|
|
625
|
-
...i.viewStates[
|
|
633
|
+
[r]: {
|
|
634
|
+
...i.viewStates[r],
|
|
626
635
|
zoom: o
|
|
627
636
|
}
|
|
628
637
|
}
|
|
629
638
|
})),
|
|
630
|
-
setMinZoom: (
|
|
639
|
+
setMinZoom: (r, o) => t((i) => ({
|
|
631
640
|
viewStates: {
|
|
632
641
|
...i.viewStates,
|
|
633
|
-
[
|
|
634
|
-
...i.viewStates[
|
|
642
|
+
[r]: {
|
|
643
|
+
...i.viewStates[r],
|
|
635
644
|
minZoom: o
|
|
636
645
|
}
|
|
637
646
|
}
|
|
638
647
|
})),
|
|
639
|
-
setMaxZoom: (
|
|
648
|
+
setMaxZoom: (r, o) => t((i) => ({
|
|
640
649
|
viewStates: {
|
|
641
650
|
...i.viewStates,
|
|
642
|
-
[
|
|
643
|
-
...i.viewStates[
|
|
651
|
+
[r]: {
|
|
652
|
+
...i.viewStates[r],
|
|
644
653
|
maxZoom: o
|
|
645
654
|
}
|
|
646
655
|
}
|
|
647
656
|
}))
|
|
648
657
|
}));
|
|
649
|
-
},
|
|
650
|
-
fitBounds: (t, n,
|
|
651
|
-
const o = e(), i = o.getBounds(t, n,
|
|
658
|
+
}, Zn = ((s, e) => ({
|
|
659
|
+
fitBounds: (t, n, r) => {
|
|
660
|
+
const o = e(), i = o.getBounds(t, n, r);
|
|
652
661
|
i && (o.setViewState(t, i), o.updateViewPort(t));
|
|
653
662
|
},
|
|
654
|
-
flyTo: (t, n,
|
|
663
|
+
flyTo: (t, n, r = {}) => {
|
|
655
664
|
const o = e(), i = {
|
|
656
|
-
...
|
|
657
|
-
...
|
|
665
|
+
...qn,
|
|
666
|
+
...r?.viewStateOptions
|
|
658
667
|
}, a = {
|
|
659
668
|
...n,
|
|
660
669
|
...i
|
|
@@ -662,75 +671,75 @@ const de = /* @__PURE__ */ Et(In), Nn = (r) => {
|
|
|
662
671
|
o.setViewState(t, a), o.updateViewPort(t);
|
|
663
672
|
},
|
|
664
673
|
loadInitialViewState: (t, n) => {
|
|
665
|
-
const
|
|
666
|
-
|
|
674
|
+
const r = e();
|
|
675
|
+
r.setInitialViewState(t, n), r.flyTo(t, n, {
|
|
667
676
|
viewStateOptions: {
|
|
668
677
|
transitionDuration: 0
|
|
669
678
|
}
|
|
670
679
|
});
|
|
671
680
|
},
|
|
672
681
|
resetViewState: (t) => {
|
|
673
|
-
const n = e(),
|
|
674
|
-
|
|
682
|
+
const n = e(), r = n.initialViewStates;
|
|
683
|
+
r[t] && n.flyTo(t, r[t]);
|
|
675
684
|
}
|
|
676
|
-
})),
|
|
677
|
-
const e =
|
|
685
|
+
})), zn = (s) => {
|
|
686
|
+
const e = s.reduce((t, n) => (t[n.id] = n.spatialFilter ?? {}, t), {});
|
|
678
687
|
return ((t) => ({
|
|
679
688
|
spatialFilter: e,
|
|
680
|
-
setSpatialFilter: (n,
|
|
689
|
+
setSpatialFilter: (n, r, o) => {
|
|
681
690
|
t((i) => {
|
|
682
691
|
const a = structuredClone(i.spatialFilter);
|
|
683
692
|
return a[n] = {
|
|
684
693
|
...a[n],
|
|
685
|
-
[
|
|
694
|
+
[r]: o
|
|
686
695
|
}, {
|
|
687
696
|
spatialFilter: a
|
|
688
697
|
};
|
|
689
698
|
});
|
|
690
699
|
},
|
|
691
|
-
removeSpatialFilter: (n,
|
|
700
|
+
removeSpatialFilter: (n, r) => {
|
|
692
701
|
t((o) => {
|
|
693
702
|
const i = structuredClone(o.spatialFilter);
|
|
694
|
-
return i[n] && delete i[n][
|
|
703
|
+
return i[n] && delete i[n][r], {
|
|
695
704
|
spatialFilter: i
|
|
696
705
|
};
|
|
697
706
|
});
|
|
698
707
|
}
|
|
699
708
|
}));
|
|
700
|
-
},
|
|
701
|
-
...
|
|
702
|
-
...
|
|
703
|
-
...
|
|
704
|
-
...
|
|
705
|
-
...
|
|
709
|
+
}, Gn = (s) => Ze()((...e) => ({
|
|
710
|
+
...In(s)(...e),
|
|
711
|
+
...Nn(s)(...e),
|
|
712
|
+
...Hn(s)(...e),
|
|
713
|
+
...zn(s)(...e),
|
|
714
|
+
...Zn(...e)
|
|
706
715
|
})), Tt = Ne({});
|
|
707
|
-
function
|
|
708
|
-
const e =
|
|
716
|
+
function Wn(s) {
|
|
717
|
+
const e = B(5), {
|
|
709
718
|
children: t,
|
|
710
719
|
values: n
|
|
711
|
-
} =
|
|
712
|
-
let
|
|
713
|
-
e[0] !== n ? (
|
|
714
|
-
const [o] =
|
|
720
|
+
} = s;
|
|
721
|
+
let r;
|
|
722
|
+
e[0] !== n ? (r = Gn(n), e[0] = n, e[1] = r) : r = e[1];
|
|
723
|
+
const [o] = ue(r);
|
|
715
724
|
let i;
|
|
716
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
725
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Tt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
717
726
|
}
|
|
718
|
-
function
|
|
727
|
+
function x(s) {
|
|
719
728
|
const e = He(Tt);
|
|
720
729
|
if (!Object.keys(e).length)
|
|
721
730
|
throw new Error("Missing MapProvider in the tree");
|
|
722
|
-
return
|
|
731
|
+
return ze(e, s);
|
|
723
732
|
}
|
|
724
|
-
function
|
|
725
|
-
const e =
|
|
733
|
+
function lo(s) {
|
|
734
|
+
const e = B(9), {
|
|
726
735
|
children: t,
|
|
727
736
|
mapId: n
|
|
728
|
-
} =
|
|
729
|
-
let
|
|
730
|
-
e[0] !== n ? (
|
|
737
|
+
} = s;
|
|
738
|
+
let r;
|
|
739
|
+
e[0] !== n ? (r = (m) => m.maps[n], e[0] = n, e[1] = r) : r = e[1];
|
|
731
740
|
const {
|
|
732
741
|
basemap: o
|
|
733
|
-
} =
|
|
742
|
+
} = x(r), i = x(Kn);
|
|
734
743
|
let a;
|
|
735
744
|
e[2] !== n || e[3] !== i ? (a = (m) => i(n, m), e[2] = n, e[3] = i, e[4] = a) : a = e[4];
|
|
736
745
|
const l = a;
|
|
@@ -740,10 +749,10 @@ function co(r) {
|
|
|
740
749
|
setBasemap: l
|
|
741
750
|
}), e[5] = o, e[6] = t, e[7] = l, e[8] = d) : d = e[8], d;
|
|
742
751
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
752
|
+
function Kn(s) {
|
|
753
|
+
return s.setBasemap;
|
|
745
754
|
}
|
|
746
|
-
const
|
|
755
|
+
const re = {
|
|
747
756
|
addFeature: "addFeature",
|
|
748
757
|
addTentativePosition: "addTentativePosition",
|
|
749
758
|
updateTentativeFeature: "updateTentativeFeature",
|
|
@@ -751,20 +760,20 @@ const te = {
|
|
|
751
760
|
finish: "finish",
|
|
752
761
|
addPosition: "addPosition"
|
|
753
762
|
};
|
|
754
|
-
class
|
|
763
|
+
class Yn extends Zt {
|
|
755
764
|
constructor() {
|
|
756
|
-
super([new
|
|
765
|
+
super([new zt(), new Gt()]);
|
|
757
766
|
}
|
|
758
767
|
handleKeyUp(e, t) {
|
|
759
768
|
super.handleKeyUp(e, t), e.key === "Enter" && (this.resetClickSequence(), t.onEdit({
|
|
760
769
|
updatedData: t.data,
|
|
761
|
-
editType:
|
|
770
|
+
editType: re.addFeature,
|
|
762
771
|
editContext: {}
|
|
763
772
|
}));
|
|
764
773
|
}
|
|
765
774
|
}
|
|
766
|
-
const
|
|
767
|
-
id:
|
|
775
|
+
const he = "lassoLayer", Oe = "maskLayer", Jn = {
|
|
776
|
+
id: he,
|
|
768
777
|
billboard: !1,
|
|
769
778
|
editHandlePointRadiusUnits: "pixels",
|
|
770
779
|
editHandlePointRadiusMinPixels: 1,
|
|
@@ -796,14 +805,14 @@ const pe = "lassoLayer", Ce = "maskLayer", Qn = {
|
|
|
796
805
|
labels: {
|
|
797
806
|
mask: "Mask"
|
|
798
807
|
}
|
|
799
|
-
},
|
|
808
|
+
}, Qn = [new nn({
|
|
800
809
|
filterSize: 1
|
|
801
|
-
})],
|
|
802
|
-
id:
|
|
810
|
+
})], Te = {
|
|
811
|
+
id: Oe,
|
|
803
812
|
operation: "mask",
|
|
804
813
|
pickable: !1,
|
|
805
814
|
visible: !0,
|
|
806
|
-
extensions:
|
|
815
|
+
extensions: Qn,
|
|
807
816
|
filterRange: [1, 1]
|
|
808
817
|
}, Ue = {
|
|
809
818
|
polygon: {
|
|
@@ -824,21 +833,21 @@ const pe = "lassoLayer", Ce = "maskLayer", Qn = {
|
|
|
824
833
|
},
|
|
825
834
|
edit: {
|
|
826
835
|
value: "edit",
|
|
827
|
-
mode:
|
|
836
|
+
mode: Yn
|
|
828
837
|
}
|
|
829
|
-
},
|
|
838
|
+
}, Se = ht((s) => ({
|
|
830
839
|
layers: {},
|
|
831
|
-
setLayer: (e, t) =>
|
|
832
|
-
const
|
|
840
|
+
setLayer: (e, t) => s((n) => {
|
|
841
|
+
const r = {
|
|
833
842
|
...n.layers
|
|
834
|
-
}, o =
|
|
843
|
+
}, o = r[e] ?? {
|
|
835
844
|
type: null,
|
|
836
845
|
props: {}
|
|
837
846
|
}, i = [...o.props.extensions ?? [], ...t.props?.extensions ?? []].reduce((l, d) => (l.some((m) => m.equals(d)) || l.push(d), l), []), a = o.legend || t.legend ? {
|
|
838
847
|
...o.legend,
|
|
839
848
|
...t.legend
|
|
840
849
|
} : void 0;
|
|
841
|
-
return
|
|
850
|
+
return r[e] = {
|
|
842
851
|
...o,
|
|
843
852
|
...t,
|
|
844
853
|
props: {
|
|
@@ -853,10 +862,10 @@ const pe = "lassoLayer", Ce = "maskLayer", Qn = {
|
|
|
853
862
|
},
|
|
854
863
|
legend: a
|
|
855
864
|
}, {
|
|
856
|
-
layers:
|
|
865
|
+
layers: r
|
|
857
866
|
};
|
|
858
867
|
}),
|
|
859
|
-
removeLayer: (e) =>
|
|
868
|
+
removeLayer: (e) => s((t) => {
|
|
860
869
|
const n = {
|
|
861
870
|
...t.layers
|
|
862
871
|
};
|
|
@@ -867,7 +876,7 @@ const pe = "lassoLayer", Ce = "maskLayer", Qn = {
|
|
|
867
876
|
})), nt = ["click", "keyup", "panstart", "panmove", "panend", "pointermove"], Lt = {
|
|
868
877
|
multipan: [Je, {
|
|
869
878
|
threshold: 10,
|
|
870
|
-
direction:
|
|
879
|
+
direction: rn.Vertical,
|
|
871
880
|
pointers: 2
|
|
872
881
|
}],
|
|
873
882
|
pinch: [an, {}, null, ["multipan"]],
|
|
@@ -882,26 +891,26 @@ const pe = "lassoLayer", Ce = "maskLayer", Qn = {
|
|
|
882
891
|
threshold: 1
|
|
883
892
|
}, ["pinch"], ["multipan"]]
|
|
884
893
|
};
|
|
885
|
-
function kt(
|
|
886
|
-
const e =
|
|
894
|
+
function kt(s) {
|
|
895
|
+
const e = B(12), {
|
|
887
896
|
mapId: t,
|
|
888
897
|
layerId: n
|
|
889
|
-
} =
|
|
890
|
-
let
|
|
891
|
-
e[0] !== t ? (
|
|
892
|
-
const o =
|
|
898
|
+
} = s;
|
|
899
|
+
let r;
|
|
900
|
+
e[0] !== t ? (r = (w) => w.maps[t]?.basemap, e[0] = t, e[1] = r) : r = e[1];
|
|
901
|
+
const o = x(r);
|
|
893
902
|
let i;
|
|
894
903
|
e[2] !== t ? (i = (w) => w.maps[t]?.isLoaded, e[2] = t, e[3] = i) : i = e[3];
|
|
895
|
-
const a =
|
|
904
|
+
const a = x(i), l = x(ts), d = Se(es), {
|
|
896
905
|
type: m
|
|
897
|
-
} =
|
|
906
|
+
} = we[o], h = m === ce.googleMaps;
|
|
898
907
|
let b, f;
|
|
899
|
-
e[4] !== l || e[5] !==
|
|
908
|
+
e[4] !== l || e[5] !== h || e[6] !== a || e[7] !== n || e[8] !== t || e[9] !== d ? (b = () => {
|
|
900
909
|
let w = null;
|
|
901
|
-
if (
|
|
910
|
+
if (h && a) {
|
|
902
911
|
const S = l(t);
|
|
903
912
|
w = new on(S.getDiv(), {
|
|
904
|
-
recognizers: Object.keys(Lt).map(
|
|
913
|
+
recognizers: Object.keys(Lt).map(Xn)
|
|
905
914
|
});
|
|
906
915
|
}
|
|
907
916
|
d(n, {
|
|
@@ -909,37 +918,37 @@ function kt(r) {
|
|
|
909
918
|
eventManager: w
|
|
910
919
|
}
|
|
911
920
|
});
|
|
912
|
-
}, f = [l,
|
|
921
|
+
}, f = [l, h, a, n, t, d], e[4] = l, e[5] = h, e[6] = a, e[7] = n, e[8] = t, e[9] = d, e[10] = b, e[11] = f) : (b = e[10], f = e[11]), J(b, f);
|
|
913
922
|
}
|
|
914
|
-
function
|
|
915
|
-
const [e, t, n,
|
|
923
|
+
function Xn(s) {
|
|
924
|
+
const [e, t, n, r] = Lt[s], o = {
|
|
916
925
|
...t,
|
|
917
|
-
event:
|
|
926
|
+
event: s
|
|
918
927
|
};
|
|
919
928
|
return {
|
|
920
929
|
recognizer: new e(o),
|
|
921
930
|
recognizeWith: n,
|
|
922
|
-
requestFailure:
|
|
931
|
+
requestFailure: r
|
|
923
932
|
};
|
|
924
933
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
934
|
+
function es(s) {
|
|
935
|
+
return s.setLayer;
|
|
927
936
|
}
|
|
928
|
-
function
|
|
929
|
-
return
|
|
937
|
+
function ts(s) {
|
|
938
|
+
return s.getOverlayInstance;
|
|
930
939
|
}
|
|
931
940
|
class Ct extends Jt {
|
|
932
941
|
updateState({
|
|
933
942
|
props: e,
|
|
934
943
|
oldProps: t,
|
|
935
944
|
context: n,
|
|
936
|
-
changeFlags:
|
|
945
|
+
changeFlags: r
|
|
937
946
|
}) {
|
|
938
947
|
e.eventManager !== t.eventManager && (this._removeEventHandlers(e.eventManager), this._removeEventHandlers(t.eventManager), this._addEventHandlers()), super.updateState({
|
|
939
948
|
props: e,
|
|
940
949
|
oldProps: t,
|
|
941
950
|
context: n,
|
|
942
|
-
changeFlags:
|
|
951
|
+
changeFlags: r
|
|
943
952
|
});
|
|
944
953
|
}
|
|
945
954
|
_addEventHandlers() {
|
|
@@ -956,35 +965,35 @@ class Ct extends Jt {
|
|
|
956
965
|
const t = e ?? this._getEventManager(), {
|
|
957
966
|
eventHandler: n
|
|
958
967
|
} = this.state._editableLayerState;
|
|
959
|
-
for (const
|
|
960
|
-
t.off(
|
|
968
|
+
for (const r of nt)
|
|
969
|
+
t.off(r, n);
|
|
961
970
|
}
|
|
962
971
|
_getEventManager() {
|
|
963
972
|
return this.props.eventManager ?? // @ts-expect-error accessing protected props
|
|
964
973
|
this.context.deck.eventManager;
|
|
965
974
|
}
|
|
966
975
|
}
|
|
967
|
-
function
|
|
968
|
-
mode:
|
|
976
|
+
function ns({
|
|
977
|
+
mode: s,
|
|
969
978
|
...e
|
|
970
979
|
}) {
|
|
971
|
-
const t =
|
|
980
|
+
const t = ss(e);
|
|
972
981
|
return {
|
|
973
982
|
type: Ct,
|
|
974
983
|
props: {
|
|
975
984
|
...t,
|
|
976
|
-
mode:
|
|
985
|
+
mode: s
|
|
977
986
|
}
|
|
978
987
|
};
|
|
979
988
|
}
|
|
980
|
-
function
|
|
981
|
-
layerProps:
|
|
989
|
+
function ss({
|
|
990
|
+
layerProps: s,
|
|
982
991
|
onEdit: e,
|
|
983
992
|
getLineColor: t,
|
|
984
993
|
getFillColor: n,
|
|
985
|
-
pointColor:
|
|
994
|
+
pointColor: r
|
|
986
995
|
}) {
|
|
987
|
-
const o =
|
|
996
|
+
const o = me(s, {
|
|
988
997
|
modeConfig: {
|
|
989
998
|
// // We force distance due to conversion is addressed at feature getText level
|
|
990
999
|
// formatTooltip: (_distance: number) => {
|
|
@@ -993,19 +1002,19 @@ function sr({
|
|
|
993
1002
|
preventOverlappingLines: !0
|
|
994
1003
|
},
|
|
995
1004
|
onEdit: e
|
|
996
|
-
}), i =
|
|
1005
|
+
}), i = me(Jn, {
|
|
997
1006
|
getTentativeLineColor: t,
|
|
998
1007
|
getTentativeFillColor: n,
|
|
999
1008
|
getLineColor: t,
|
|
1000
1009
|
getFillColor: n,
|
|
1001
|
-
getEditHandlePointColor:
|
|
1002
|
-
getEditHandlePointOutlineColor:
|
|
1010
|
+
getEditHandlePointColor: r.fill,
|
|
1011
|
+
getEditHandlePointOutlineColor: r.outline,
|
|
1003
1012
|
dataComparator: (l, d) => l.features[0] === d.features[0]
|
|
1004
1013
|
});
|
|
1005
|
-
return
|
|
1014
|
+
return me(i, o);
|
|
1006
1015
|
}
|
|
1007
|
-
const
|
|
1008
|
-
data:
|
|
1016
|
+
const rs = (s) => Ze()((e) => ({
|
|
1017
|
+
data: s.reduce((n, r) => {
|
|
1009
1018
|
const {
|
|
1010
1019
|
enabled: o = !1,
|
|
1011
1020
|
mapId: i,
|
|
@@ -1013,7 +1022,7 @@ const or = (r) => ze()((e) => ({
|
|
|
1013
1022
|
modes: l = Ue,
|
|
1014
1023
|
modeSelected: d = Ue.polygon.value,
|
|
1015
1024
|
values: m = {}
|
|
1016
|
-
} =
|
|
1025
|
+
} = r;
|
|
1017
1026
|
return n[i] = {
|
|
1018
1027
|
enabled: o,
|
|
1019
1028
|
modeInstance: a,
|
|
@@ -1022,30 +1031,30 @@ const or = (r) => ze()((e) => ({
|
|
|
1022
1031
|
values: m
|
|
1023
1032
|
}, n;
|
|
1024
1033
|
}, {}),
|
|
1025
|
-
setEnabled: (n,
|
|
1034
|
+
setEnabled: (n, r) => {
|
|
1026
1035
|
e((o) => ({
|
|
1027
1036
|
data: {
|
|
1028
1037
|
...o.data,
|
|
1029
1038
|
[n]: {
|
|
1030
1039
|
...o.data[n],
|
|
1031
|
-
enabled:
|
|
1032
|
-
visible:
|
|
1040
|
+
enabled: r,
|
|
1041
|
+
visible: r
|
|
1033
1042
|
}
|
|
1034
1043
|
}
|
|
1035
1044
|
}));
|
|
1036
1045
|
},
|
|
1037
|
-
setValue: (n,
|
|
1046
|
+
setValue: (n, r, o) => {
|
|
1038
1047
|
e((i) => {
|
|
1039
1048
|
const a = {
|
|
1040
1049
|
...i.data[n].values
|
|
1041
|
-
}, l = a[
|
|
1050
|
+
}, l = a[r] ?? {
|
|
1042
1051
|
type: "mask"
|
|
1043
1052
|
};
|
|
1044
|
-
return a[
|
|
1053
|
+
return a[r] = {
|
|
1045
1054
|
...l,
|
|
1046
1055
|
...o,
|
|
1047
|
-
id:
|
|
1048
|
-
}, o || delete a[
|
|
1056
|
+
id: r
|
|
1057
|
+
}, o || delete a[r], {
|
|
1049
1058
|
data: {
|
|
1050
1059
|
...i.data,
|
|
1051
1060
|
[n]: {
|
|
@@ -1056,11 +1065,11 @@ const or = (r) => ze()((e) => ({
|
|
|
1056
1065
|
};
|
|
1057
1066
|
});
|
|
1058
1067
|
},
|
|
1059
|
-
setVisibility: (n,
|
|
1068
|
+
setVisibility: (n, r, o) => {
|
|
1060
1069
|
e((i) => {
|
|
1061
1070
|
const a = {
|
|
1062
1071
|
...i.data[n].values
|
|
1063
|
-
}, l = a[
|
|
1072
|
+
}, l = a[r] ?? {};
|
|
1064
1073
|
return l.properties.visible = o, {
|
|
1065
1074
|
data: {
|
|
1066
1075
|
...i.data,
|
|
@@ -1068,69 +1077,69 @@ const or = (r) => ze()((e) => ({
|
|
|
1068
1077
|
...i.data[n],
|
|
1069
1078
|
values: {
|
|
1070
1079
|
...a,
|
|
1071
|
-
[
|
|
1080
|
+
[r]: l
|
|
1072
1081
|
}
|
|
1073
1082
|
}
|
|
1074
1083
|
}
|
|
1075
1084
|
};
|
|
1076
1085
|
});
|
|
1077
1086
|
},
|
|
1078
|
-
setModeSelected: (n,
|
|
1087
|
+
setModeSelected: (n, r) => {
|
|
1079
1088
|
e((o) => ({
|
|
1080
1089
|
data: {
|
|
1081
1090
|
...o.data,
|
|
1082
1091
|
[n]: {
|
|
1083
1092
|
...o.data[n],
|
|
1084
|
-
modeSelected:
|
|
1093
|
+
modeSelected: r
|
|
1085
1094
|
}
|
|
1086
1095
|
}
|
|
1087
1096
|
}));
|
|
1088
1097
|
},
|
|
1089
|
-
setModeInstance: (n,
|
|
1098
|
+
setModeInstance: (n, r) => {
|
|
1090
1099
|
e((o) => ({
|
|
1091
1100
|
data: {
|
|
1092
1101
|
...o.data,
|
|
1093
1102
|
[n]: {
|
|
1094
1103
|
...o.data[n],
|
|
1095
|
-
modeInstance:
|
|
1104
|
+
modeInstance: r
|
|
1096
1105
|
}
|
|
1097
1106
|
}
|
|
1098
1107
|
}));
|
|
1099
1108
|
}
|
|
1100
1109
|
})), Pt = Ne({});
|
|
1101
|
-
function
|
|
1102
|
-
const e =
|
|
1110
|
+
function os(s) {
|
|
1111
|
+
const e = B(5), {
|
|
1103
1112
|
children: t,
|
|
1104
1113
|
values: n
|
|
1105
|
-
} =
|
|
1106
|
-
let
|
|
1107
|
-
e[0] !== n ? (
|
|
1108
|
-
const [o] =
|
|
1114
|
+
} = s;
|
|
1115
|
+
let r;
|
|
1116
|
+
e[0] !== n ? (r = () => rs(n), e[0] = n, e[1] = r) : r = e[1];
|
|
1117
|
+
const [o] = ue(r);
|
|
1109
1118
|
let i;
|
|
1110
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
1119
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Pt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1111
1120
|
}
|
|
1112
|
-
function
|
|
1121
|
+
function K(s) {
|
|
1113
1122
|
const e = He(Pt);
|
|
1114
1123
|
if (!Object.keys(e).length)
|
|
1115
1124
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
1116
|
-
return
|
|
1125
|
+
return ze(e, s);
|
|
1117
1126
|
}
|
|
1118
|
-
function
|
|
1119
|
-
mapId:
|
|
1127
|
+
function is({
|
|
1128
|
+
mapId: s,
|
|
1120
1129
|
children: e
|
|
1121
1130
|
}) {
|
|
1122
|
-
const t =
|
|
1123
|
-
|
|
1131
|
+
const t = K((f) => f.data[s]?.enabled), n = K((f) => f.setEnabled), r = K((f) => f.data[s]?.values), o = K((f) => f.setValue), i = K((f) => f.setVisibility), a = K((f) => f.data[s]?.modeSelected), l = K((f) => f.setModeSelected), d = K((f) => f.data[s]?.modes), m = K((f) => f.setModeInstance);
|
|
1132
|
+
J(() => {
|
|
1124
1133
|
const f = d[a];
|
|
1125
1134
|
if (f && t) {
|
|
1126
1135
|
const w = f.mode;
|
|
1127
|
-
m(
|
|
1136
|
+
m(s, new w());
|
|
1128
1137
|
}
|
|
1129
|
-
}, [t,
|
|
1138
|
+
}, [t, s, a, d, m]);
|
|
1130
1139
|
const [
|
|
1131
|
-
|
|
1140
|
+
h
|
|
1132
1141
|
// , draw
|
|
1133
|
-
] =
|
|
1142
|
+
] = ge(() => {
|
|
1134
1143
|
const f = (L) => ({
|
|
1135
1144
|
id: L.id,
|
|
1136
1145
|
...L.properties,
|
|
@@ -1138,81 +1147,81 @@ function ar({
|
|
|
1138
1147
|
label: L.properties.label
|
|
1139
1148
|
});
|
|
1140
1149
|
return [
|
|
1141
|
-
Object.values(
|
|
1150
|
+
Object.values(r).filter((L) => L.type === "mask").map(f)
|
|
1142
1151
|
// , draw
|
|
1143
1152
|
];
|
|
1144
|
-
}, [
|
|
1145
|
-
n(
|
|
1146
|
-
}, [
|
|
1153
|
+
}, [r]), b = se((f) => {
|
|
1154
|
+
n(s, !!f), l(s, f);
|
|
1155
|
+
}, [s, n, l]);
|
|
1147
1156
|
return e({
|
|
1148
|
-
mapId:
|
|
1157
|
+
mapId: s,
|
|
1149
1158
|
enabled: t,
|
|
1150
1159
|
modes: d,
|
|
1151
1160
|
modeSelected: a,
|
|
1152
1161
|
values: {
|
|
1153
|
-
mask:
|
|
1162
|
+
mask: h
|
|
1154
1163
|
// draw,
|
|
1155
1164
|
},
|
|
1156
|
-
setValue:
|
|
1157
|
-
setEnabled:
|
|
1158
|
-
setVisibility:
|
|
1165
|
+
setValue: se((f, w) => o(s, f, w), [s, o]),
|
|
1166
|
+
setEnabled: se((f) => n(s, f), [s, n]),
|
|
1167
|
+
setVisibility: se((f, w) => i(s, f, w), [s, i]),
|
|
1159
1168
|
setModeSelected: b
|
|
1160
1169
|
});
|
|
1161
1170
|
}
|
|
1162
1171
|
function Ot({
|
|
1163
|
-
values:
|
|
1172
|
+
values: s
|
|
1164
1173
|
}) {
|
|
1165
|
-
return Object.values(
|
|
1174
|
+
return Object.values(s ?? {}).filter((e) => e.type === "mask");
|
|
1166
1175
|
}
|
|
1167
|
-
const
|
|
1176
|
+
const as = Mt({
|
|
1168
1177
|
length: fn
|
|
1169
|
-
}),
|
|
1178
|
+
}), ls = Mt({
|
|
1170
1179
|
area: pn
|
|
1171
1180
|
});
|
|
1172
|
-
function
|
|
1173
|
-
if (!(
|
|
1174
|
-
const e = Object.keys(
|
|
1175
|
-
throw new Error(`Unit "${
|
|
1181
|
+
function cs(s) {
|
|
1182
|
+
if (!(s in Ce)) {
|
|
1183
|
+
const e = Object.keys(Ce);
|
|
1184
|
+
throw new Error(`Unit "${s}" cannot be converted to area. Valid units are: ${e.join(", ")}`);
|
|
1176
1185
|
}
|
|
1177
1186
|
}
|
|
1178
|
-
function
|
|
1187
|
+
function st(s, e, t) {
|
|
1179
1188
|
switch (t) {
|
|
1180
1189
|
case "length": {
|
|
1181
|
-
const n = it[H.meter],
|
|
1182
|
-
return
|
|
1190
|
+
const n = it[H.meter], r = it[e];
|
|
1191
|
+
return as(s).from(n).to(r);
|
|
1183
1192
|
}
|
|
1184
1193
|
case "area": {
|
|
1185
|
-
|
|
1186
|
-
const n = at[
|
|
1187
|
-
return
|
|
1194
|
+
cs(e);
|
|
1195
|
+
const n = at[Ce[H.meter]], r = at[Ce[e]];
|
|
1196
|
+
return ls(s).from(n).to(r);
|
|
1188
1197
|
}
|
|
1189
1198
|
default:
|
|
1190
1199
|
throw new Error(`Invalid dimension: ${t}, valid dimensions are: length, area`);
|
|
1191
1200
|
}
|
|
1192
1201
|
}
|
|
1193
|
-
const
|
|
1194
|
-
function
|
|
1195
|
-
meters:
|
|
1202
|
+
const rt = 1e4;
|
|
1203
|
+
function Ae({
|
|
1204
|
+
meters: s,
|
|
1196
1205
|
unit: e,
|
|
1197
1206
|
locale: t,
|
|
1198
1207
|
options: {
|
|
1199
1208
|
autoSplitNumber: n,
|
|
1200
|
-
customFormatter:
|
|
1209
|
+
customFormatter: r,
|
|
1201
1210
|
...o
|
|
1202
1211
|
} = {
|
|
1203
|
-
autoSplitNumber:
|
|
1212
|
+
autoSplitNumber: rt
|
|
1204
1213
|
},
|
|
1205
1214
|
dimension: i = "length"
|
|
1206
1215
|
}) {
|
|
1207
1216
|
const a = e === je["m-km"], l = e === je["ft-mi"], d = a || l;
|
|
1208
|
-
let m,
|
|
1217
|
+
let m, h;
|
|
1209
1218
|
if (d) {
|
|
1210
|
-
const f =
|
|
1219
|
+
const f = s < (n ?? rt);
|
|
1211
1220
|
let w = f ? H.meter : H.kilometer;
|
|
1212
|
-
m = f ?
|
|
1221
|
+
m = f ? ve.meter : ve.kilometer, l && (m = f ? ve.feet : ve.mile, w = f ? H.feet : H.mile), h = st(s, w, i);
|
|
1213
1222
|
} else
|
|
1214
|
-
m =
|
|
1215
|
-
let b = `${wt(
|
|
1223
|
+
m = ve[e], h = st(s, e, i);
|
|
1224
|
+
let b = `${wt(h, t, {
|
|
1216
1225
|
style: "unit",
|
|
1217
1226
|
unit: m,
|
|
1218
1227
|
unitDisplay: "short",
|
|
@@ -1221,41 +1230,41 @@ function Pe({
|
|
|
1221
1230
|
maximumFractionDigits: 2,
|
|
1222
1231
|
...o
|
|
1223
1232
|
})}`;
|
|
1224
|
-
return i === "area" && (b += "2"),
|
|
1233
|
+
return i === "area" && (b += "2"), r ? r(b) : b;
|
|
1225
1234
|
}
|
|
1226
|
-
function
|
|
1235
|
+
function co(s, {
|
|
1227
1236
|
hasDoubleClickZoom: e
|
|
1228
1237
|
}) {
|
|
1229
|
-
return typeof
|
|
1238
|
+
return typeof s == "boolean" ? {
|
|
1230
1239
|
doubleClickZoom: e
|
|
1231
1240
|
} : {
|
|
1232
|
-
...
|
|
1241
|
+
...s,
|
|
1233
1242
|
doubleClickZoom: e
|
|
1234
1243
|
};
|
|
1235
1244
|
}
|
|
1236
|
-
function At(
|
|
1237
|
-
if (
|
|
1245
|
+
function At(s, e, t) {
|
|
1246
|
+
if (s > 0) {
|
|
1238
1247
|
const {
|
|
1239
1248
|
formatTooltip: n,
|
|
1240
|
-
turfOptions:
|
|
1249
|
+
turfOptions: r
|
|
1241
1250
|
} = t ?? {
|
|
1242
1251
|
turfOptions: {
|
|
1243
1252
|
units: "kilometers"
|
|
1244
1253
|
}
|
|
1245
|
-
}, o =
|
|
1254
|
+
}, o = r?.units;
|
|
1246
1255
|
let i;
|
|
1247
|
-
n ? i = n(
|
|
1256
|
+
n ? i = n(s) : i = `${parseFloat(s.toString()).toFixed(2)} ${o}`;
|
|
1248
1257
|
const {
|
|
1249
1258
|
measurementCallback: a
|
|
1250
1259
|
} = t;
|
|
1251
|
-
return a && a(
|
|
1260
|
+
return a && a(s), [{
|
|
1252
1261
|
position: e,
|
|
1253
1262
|
text: i
|
|
1254
1263
|
}];
|
|
1255
1264
|
}
|
|
1256
1265
|
return [];
|
|
1257
1266
|
}
|
|
1258
|
-
class
|
|
1267
|
+
class us extends Qt {
|
|
1259
1268
|
_isMeasuringSessionFinished = !1;
|
|
1260
1269
|
area = 0;
|
|
1261
1270
|
tooltips = [];
|
|
@@ -1267,14 +1276,14 @@ class dr extends Qt {
|
|
|
1267
1276
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1268
1277
|
const {
|
|
1269
1278
|
picks: n
|
|
1270
|
-
} = e,
|
|
1279
|
+
} = e, r = Xt(n), o = this.getClickSequence();
|
|
1271
1280
|
let i = !1;
|
|
1272
|
-
!
|
|
1281
|
+
!r && !this.allowOverlapping(t) && (this.addClickSequence(e), i = !0);
|
|
1273
1282
|
const a = this.getClickSequence(), l = [...a, a[0]];
|
|
1274
1283
|
this.area = Xe({
|
|
1275
1284
|
type: "Polygon",
|
|
1276
1285
|
coordinates: [l]
|
|
1277
|
-
}), this.isFinalizedEdition(o,
|
|
1286
|
+
}), this.isFinalizedEdition(o, r) ? this.finalizeEdition(t) : i && t.onEdit({
|
|
1278
1287
|
// data is the same
|
|
1279
1288
|
updatedData: t.data,
|
|
1280
1289
|
editType: "addTentativePosition",
|
|
@@ -1319,14 +1328,14 @@ class dr extends Qt {
|
|
|
1319
1328
|
const n = this.getClickSequence();
|
|
1320
1329
|
if (n.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1321
1330
|
e.modeConfig?.preventOverlappingLines) {
|
|
1322
|
-
const
|
|
1331
|
+
const r = {
|
|
1323
1332
|
type: "LineString",
|
|
1324
1333
|
coordinates: [...n, n[0]]
|
|
1325
1334
|
}, o = {
|
|
1326
1335
|
type: "LineString",
|
|
1327
1336
|
coordinates: [...n.slice(0, n.length - 1)]
|
|
1328
1337
|
};
|
|
1329
|
-
un(
|
|
1338
|
+
un(r, o).features.length > 0 && (t = !0);
|
|
1330
1339
|
}
|
|
1331
1340
|
return t;
|
|
1332
1341
|
}
|
|
@@ -1339,12 +1348,12 @@ class dr extends Qt {
|
|
|
1339
1348
|
type: "FeatureCollection",
|
|
1340
1349
|
features: []
|
|
1341
1350
|
};
|
|
1342
|
-
const
|
|
1343
|
-
this._isMeasuringSessionFinished = !0,
|
|
1344
|
-
...
|
|
1345
|
-
editType:
|
|
1351
|
+
const r = this.getAddFeatureOrBooleanPolygonAction(n, e);
|
|
1352
|
+
this._isMeasuringSessionFinished = !0, r && (this.resultPolygon = r.updatedData, e.onEdit({
|
|
1353
|
+
...r,
|
|
1354
|
+
editType: re.addPosition,
|
|
1346
1355
|
editContext: {
|
|
1347
|
-
...
|
|
1356
|
+
...r.editContext,
|
|
1348
1357
|
distance: this.area,
|
|
1349
1358
|
positions: this.getClickSequence(),
|
|
1350
1359
|
finished: this._isMeasuringSessionFinished
|
|
@@ -1363,18 +1372,18 @@ class dr extends Qt {
|
|
|
1363
1372
|
meters: e,
|
|
1364
1373
|
locale: t,
|
|
1365
1374
|
unit: n,
|
|
1366
|
-
options:
|
|
1375
|
+
options: r
|
|
1367
1376
|
}) {
|
|
1368
|
-
return
|
|
1377
|
+
return Ae({
|
|
1369
1378
|
meters: e,
|
|
1370
1379
|
locale: t,
|
|
1371
1380
|
unit: n,
|
|
1372
|
-
options:
|
|
1381
|
+
options: r,
|
|
1373
1382
|
dimension: "area"
|
|
1374
1383
|
});
|
|
1375
1384
|
}
|
|
1376
1385
|
}
|
|
1377
|
-
class
|
|
1386
|
+
class ds extends bt {
|
|
1378
1387
|
_isMeasuringSessionFinished = !1;
|
|
1379
1388
|
_currentArea = 0;
|
|
1380
1389
|
resultPolygon = {
|
|
@@ -1410,7 +1419,7 @@ class fr extends bt {
|
|
|
1410
1419
|
const n = this.getAddFeatureOrBooleanPolygonAction(t, e);
|
|
1411
1420
|
this._isMeasuringSessionFinished = !0, e.onUpdateCursor("cell"), n && (this.resultPolygon = n.updatedData, e.onEdit({
|
|
1412
1421
|
...n,
|
|
1413
|
-
editType:
|
|
1422
|
+
editType: re.addPosition,
|
|
1414
1423
|
editContext: {
|
|
1415
1424
|
...n.editContext,
|
|
1416
1425
|
distance: this._currentArea,
|
|
@@ -1437,13 +1446,13 @@ class fr extends bt {
|
|
|
1437
1446
|
meters: e,
|
|
1438
1447
|
locale: t,
|
|
1439
1448
|
unit: n,
|
|
1440
|
-
options:
|
|
1449
|
+
options: r
|
|
1441
1450
|
}) {
|
|
1442
|
-
return
|
|
1451
|
+
return Ae({
|
|
1443
1452
|
meters: e,
|
|
1444
1453
|
locale: t,
|
|
1445
1454
|
unit: n,
|
|
1446
|
-
options:
|
|
1455
|
+
options: r,
|
|
1447
1456
|
dimension: "area"
|
|
1448
1457
|
});
|
|
1449
1458
|
}
|
|
@@ -1453,7 +1462,7 @@ class Ft extends en {
|
|
|
1453
1462
|
super.handleClick(e, t), t.onEdit({
|
|
1454
1463
|
// data is the same
|
|
1455
1464
|
updatedData: t.data,
|
|
1456
|
-
editType:
|
|
1465
|
+
editType: re.addPosition,
|
|
1457
1466
|
editContext: {
|
|
1458
1467
|
distance: this._currentDistance,
|
|
1459
1468
|
finished: this._isMeasuringSessionFinished,
|
|
@@ -1466,8 +1475,8 @@ class Ft extends en {
|
|
|
1466
1475
|
e.stopPropagation();
|
|
1467
1476
|
const {
|
|
1468
1477
|
key: n
|
|
1469
|
-
} = e,
|
|
1470
|
-
let o =
|
|
1478
|
+
} = e, r = this.getClickSequence().length;
|
|
1479
|
+
let o = re.finish;
|
|
1471
1480
|
switch (n) {
|
|
1472
1481
|
case "Escape":
|
|
1473
1482
|
t.onEdit({
|
|
@@ -1475,12 +1484,12 @@ class Ft extends en {
|
|
|
1475
1484
|
type: "FeatureCollection",
|
|
1476
1485
|
features: []
|
|
1477
1486
|
},
|
|
1478
|
-
editType:
|
|
1487
|
+
editType: re.cancel,
|
|
1479
1488
|
editContext: {}
|
|
1480
1489
|
});
|
|
1481
1490
|
break;
|
|
1482
1491
|
case "Enter":
|
|
1483
|
-
this._isMeasuringSessionFinished = !0,
|
|
1492
|
+
this._isMeasuringSessionFinished = !0, r === 1 && (this.resetClickSequence(), o = re.cancel), t.onUpdateCursor("cell"), t.onEdit({
|
|
1484
1493
|
updatedData: t.data,
|
|
1485
1494
|
editType: o,
|
|
1486
1495
|
editContext: {
|
|
@@ -1497,18 +1506,18 @@ class Ft extends en {
|
|
|
1497
1506
|
meters: e,
|
|
1498
1507
|
locale: t,
|
|
1499
1508
|
unit: n,
|
|
1500
|
-
options:
|
|
1509
|
+
options: r
|
|
1501
1510
|
}) {
|
|
1502
|
-
return
|
|
1511
|
+
return Ae({
|
|
1503
1512
|
meters: e,
|
|
1504
1513
|
locale: t,
|
|
1505
1514
|
unit: n,
|
|
1506
|
-
options:
|
|
1515
|
+
options: r
|
|
1507
1516
|
});
|
|
1508
1517
|
}
|
|
1509
1518
|
}
|
|
1510
|
-
const
|
|
1511
|
-
id:
|
|
1519
|
+
const fe = "mapMeasureLayer", fs = {
|
|
1520
|
+
id: fe,
|
|
1512
1521
|
pickable: !1,
|
|
1513
1522
|
billboard: !1,
|
|
1514
1523
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -1532,16 +1541,16 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1532
1541
|
getLineWidth: 2
|
|
1533
1542
|
}
|
|
1534
1543
|
}
|
|
1535
|
-
},
|
|
1544
|
+
}, Ve = {
|
|
1536
1545
|
editing: [23, 102, 214, 255],
|
|
1537
1546
|
finished: [71, 219, 153, 255],
|
|
1538
1547
|
point: [255, 255, 255, 255]
|
|
1539
1548
|
}, ot = {
|
|
1540
1549
|
styles: {
|
|
1541
1550
|
colors: {
|
|
1542
|
-
editing:
|
|
1543
|
-
finished:
|
|
1544
|
-
point:
|
|
1551
|
+
editing: Ve.editing,
|
|
1552
|
+
finished: Ve.finished,
|
|
1553
|
+
point: Ve.point
|
|
1545
1554
|
}
|
|
1546
1555
|
}
|
|
1547
1556
|
}, H = {
|
|
@@ -1552,7 +1561,7 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1552
1561
|
mile: "mile",
|
|
1553
1562
|
yard: "yard",
|
|
1554
1563
|
feet: "feet"
|
|
1555
|
-
},
|
|
1564
|
+
}, pe = {
|
|
1556
1565
|
squareMeter: "squareMeter",
|
|
1557
1566
|
squareKilometer: "squareKilometer",
|
|
1558
1567
|
squareMile: "squareMile",
|
|
@@ -1561,7 +1570,7 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1561
1570
|
"m-km": "m-km",
|
|
1562
1571
|
"ft-mi": "ft-mi",
|
|
1563
1572
|
...H
|
|
1564
|
-
},
|
|
1573
|
+
}, ps = {
|
|
1565
1574
|
meters: "meters",
|
|
1566
1575
|
kilometer: "kilometers",
|
|
1567
1576
|
mile: "miles"
|
|
@@ -1574,16 +1583,16 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1574
1583
|
[H.yard]: "yd",
|
|
1575
1584
|
[H.feet]: "ft"
|
|
1576
1585
|
}, at = {
|
|
1577
|
-
[
|
|
1578
|
-
[
|
|
1579
|
-
[
|
|
1580
|
-
[
|
|
1581
|
-
},
|
|
1582
|
-
[H.meter]:
|
|
1583
|
-
[H.kilometer]:
|
|
1584
|
-
[H.mile]:
|
|
1585
|
-
[H.feet]:
|
|
1586
|
-
},
|
|
1586
|
+
[pe.squareMeter]: "m2",
|
|
1587
|
+
[pe.squareKilometer]: "km2",
|
|
1588
|
+
[pe.squareMile]: "mi2",
|
|
1589
|
+
[pe.squareFeet]: "ft2"
|
|
1590
|
+
}, Ce = {
|
|
1591
|
+
[H.meter]: pe.squareMeter,
|
|
1592
|
+
[H.kilometer]: pe.squareKilometer,
|
|
1593
|
+
[H.mile]: pe.squareMile,
|
|
1594
|
+
[H.feet]: pe.squareFeet
|
|
1595
|
+
}, ve = {
|
|
1587
1596
|
[H.kilometer]: "kilometer",
|
|
1588
1597
|
[H.meter]: "meter",
|
|
1589
1598
|
[H.centimeter]: "centimeter",
|
|
@@ -1591,7 +1600,7 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1591
1600
|
[H.mile]: "mile",
|
|
1592
1601
|
[H.yard]: "yard",
|
|
1593
1602
|
[H.feet]: "foot"
|
|
1594
|
-
},
|
|
1603
|
+
}, ne = {
|
|
1595
1604
|
"m-km": {
|
|
1596
1605
|
value: "m-km",
|
|
1597
1606
|
system: "metric"
|
|
@@ -1628,26 +1637,26 @@ const ce = "mapMeasureLayer", pr = {
|
|
|
1628
1637
|
value: "feet",
|
|
1629
1638
|
system: "imperial"
|
|
1630
1639
|
}
|
|
1631
|
-
}, lt = [
|
|
1640
|
+
}, lt = [ne["m-km"], ne.kilometer, ne.meter, ne["ft-mi"], ne.mile, ne.feet], ms = [ne["m-km"], ne.kilometer, ne.meter, ne["ft-mi"], ne.mile, ne.feet], ys = {
|
|
1632
1641
|
distance: {
|
|
1633
1642
|
value: "distance",
|
|
1634
1643
|
mode: Ft
|
|
1635
1644
|
},
|
|
1636
1645
|
buffer: {
|
|
1637
1646
|
value: "buffer",
|
|
1638
|
-
mode:
|
|
1647
|
+
mode: ds
|
|
1639
1648
|
},
|
|
1640
1649
|
area: {
|
|
1641
1650
|
value: "area",
|
|
1642
|
-
mode:
|
|
1651
|
+
mode: us
|
|
1643
1652
|
}
|
|
1644
|
-
},
|
|
1653
|
+
}, hs = {
|
|
1645
1654
|
distance: lt,
|
|
1646
1655
|
buffer: lt,
|
|
1647
|
-
area:
|
|
1648
|
-
},
|
|
1649
|
-
function
|
|
1650
|
-
children:
|
|
1656
|
+
area: ms
|
|
1657
|
+
}, gs = [he, Oe, fe];
|
|
1658
|
+
function bs({
|
|
1659
|
+
children: s,
|
|
1651
1660
|
mapId: e,
|
|
1652
1661
|
defaultProps: {
|
|
1653
1662
|
styles: t = $e.styles,
|
|
@@ -1656,50 +1665,50 @@ function Sr({
|
|
|
1656
1665
|
styles: $e.styles,
|
|
1657
1666
|
labels: $e.labels
|
|
1658
1667
|
},
|
|
1659
|
-
layerProps:
|
|
1668
|
+
layerProps: r = {},
|
|
1660
1669
|
defaultType: o = "mask"
|
|
1661
1670
|
}) {
|
|
1662
|
-
const i =
|
|
1671
|
+
const i = K((_) => _.data[e]?.enabled), a = K((_) => _.setEnabled), l = K((_) => _.data[e]?.values), d = K((_) => _.setValue), m = K((_) => _.data[e]?.modeInstance), h = K((_) => _.data[e]?.modeSelected), b = Se((_) => _.setLayer), f = x((_) => _.addLayers), w = x((_) => _.removeLayers), S = x(St((_) => _.maps[e]?.layers.filter((O) => !gs.includes(O)))), L = x((_) => _.getDeckInstance), u = ke({});
|
|
1663
1672
|
kt({
|
|
1664
1673
|
mapId: e,
|
|
1665
|
-
layerId:
|
|
1674
|
+
layerId: he
|
|
1666
1675
|
});
|
|
1667
|
-
const p =
|
|
1676
|
+
const p = ge(() => Ot({
|
|
1668
1677
|
values: l
|
|
1669
|
-
}), [l]),
|
|
1678
|
+
}), [l]), g = ge(() => ({
|
|
1670
1679
|
type: "FeatureCollection",
|
|
1671
|
-
features: p.map((
|
|
1680
|
+
features: p.map((_) => ({
|
|
1672
1681
|
type: "Feature",
|
|
1673
|
-
geometry:
|
|
1674
|
-
properties:
|
|
1675
|
-
id:
|
|
1682
|
+
geometry: _.geometry,
|
|
1683
|
+
properties: _.properties,
|
|
1684
|
+
id: _.id
|
|
1676
1685
|
}))
|
|
1677
|
-
}), [p]), M =
|
|
1678
|
-
const
|
|
1679
|
-
...
|
|
1680
|
-
features:
|
|
1686
|
+
}), [p]), M = ge(() => p.filter((_) => _.properties.visible).map((_) => _.id), [p]), [v, k] = ue(g), [F, V] = ue([]), A = se(() => {
|
|
1687
|
+
const _ = {
|
|
1688
|
+
...g,
|
|
1689
|
+
features: g.features.filter((O) => O.properties?.visible)
|
|
1681
1690
|
};
|
|
1682
|
-
k(
|
|
1683
|
-
}, [
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
}, [
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
w(e, [
|
|
1691
|
+
k(_);
|
|
1692
|
+
}, [g]);
|
|
1693
|
+
J(() => {
|
|
1694
|
+
A();
|
|
1695
|
+
}, [A]);
|
|
1696
|
+
const $ = ke(p.length);
|
|
1697
|
+
J(() => (f(e, [he]), () => {
|
|
1698
|
+
w(e, [he]);
|
|
1690
1699
|
}), [f, e, w]);
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
}, [e,
|
|
1694
|
-
editType:
|
|
1700
|
+
const q = se(() => {
|
|
1701
|
+
A(), V([]), a(e, !1);
|
|
1702
|
+
}, [e, A, a]), R = se(({
|
|
1703
|
+
editType: _,
|
|
1695
1704
|
updatedData: O
|
|
1696
1705
|
}) => {
|
|
1697
|
-
if (
|
|
1698
|
-
|
|
1706
|
+
if (_ === re.cancel) {
|
|
1707
|
+
q();
|
|
1699
1708
|
return;
|
|
1700
1709
|
}
|
|
1701
|
-
k(O),
|
|
1702
|
-
c.properties.label ??= `${n?.mask} ${
|
|
1710
|
+
k(O), _ !== re.updateTentativeFeature && _ === re.addFeature && (h !== "edit" && ($.current = $.current + 1), O.features.forEach((c, y) => {
|
|
1711
|
+
c.properties.label ??= `${n?.mask} ${$.current}`, c.properties.index = y, c.properties.visible = c.properties.visible ?? !0;
|
|
1703
1712
|
const T = c.id ?? crypto.randomUUID();
|
|
1704
1713
|
d(e, T, {
|
|
1705
1714
|
geometry: c.geometry,
|
|
@@ -1707,108 +1716,108 @@ function Sr({
|
|
|
1707
1716
|
// visible: true,
|
|
1708
1717
|
type: o
|
|
1709
1718
|
});
|
|
1710
|
-
}),
|
|
1711
|
-
}, [o,
|
|
1712
|
-
return
|
|
1713
|
-
const
|
|
1719
|
+
}), q());
|
|
1720
|
+
}, [o, q, n?.mask, e, h, d]);
|
|
1721
|
+
return J(() => {
|
|
1722
|
+
const _ = i, {
|
|
1714
1723
|
border: O,
|
|
1715
1724
|
point: c,
|
|
1716
1725
|
fill: y
|
|
1717
1726
|
} = t.colors.editing, {
|
|
1718
1727
|
border: T,
|
|
1719
1728
|
fill: P
|
|
1720
|
-
} = t.colors.finished, C =
|
|
1729
|
+
} = t.colors.finished, C = ns({
|
|
1721
1730
|
layerProps: {
|
|
1722
|
-
...
|
|
1723
|
-
pickable:
|
|
1731
|
+
...r.mask,
|
|
1732
|
+
pickable: _,
|
|
1724
1733
|
data: v,
|
|
1725
|
-
selectedFeatureIndexes:
|
|
1734
|
+
selectedFeatureIndexes: F,
|
|
1726
1735
|
updateTriggers: {
|
|
1727
1736
|
getFilterValue: M
|
|
1728
1737
|
},
|
|
1729
|
-
onClick: (
|
|
1730
|
-
const
|
|
1731
|
-
|
|
1738
|
+
onClick: (E) => {
|
|
1739
|
+
const j = E;
|
|
1740
|
+
j.isGuide || V([j.index]);
|
|
1732
1741
|
}
|
|
1733
1742
|
},
|
|
1734
|
-
getLineColor: (
|
|
1735
|
-
getFillColor: (
|
|
1743
|
+
getLineColor: (E) => F[0] === E.properties.index ? O : T,
|
|
1744
|
+
getFillColor: (E) => F[0] === E.properties.index ? y : P,
|
|
1736
1745
|
pointColor: {
|
|
1737
1746
|
fill: c,
|
|
1738
1747
|
outline: O
|
|
1739
1748
|
},
|
|
1740
|
-
onEdit:
|
|
1741
|
-
mode:
|
|
1749
|
+
onEdit: R,
|
|
1750
|
+
mode: _ ? m : new tn()
|
|
1742
1751
|
});
|
|
1743
|
-
b(
|
|
1744
|
-
}, [v, i,
|
|
1745
|
-
const
|
|
1746
|
-
...
|
|
1747
|
-
data:
|
|
1752
|
+
b(he, C);
|
|
1753
|
+
}, [v, i, r.mask, M, m, R, F, b, t.colors.editing, t.colors.finished]), J(() => {
|
|
1754
|
+
const _ = {
|
|
1755
|
+
...Te,
|
|
1756
|
+
data: g,
|
|
1748
1757
|
getFilterValue: (O) => Number(M.includes(O.id)),
|
|
1749
1758
|
updateTriggers: {
|
|
1750
1759
|
getFilterValue: M
|
|
1751
1760
|
}
|
|
1752
1761
|
};
|
|
1753
|
-
return b(
|
|
1762
|
+
return b(Te.id, {
|
|
1754
1763
|
type: ln,
|
|
1755
|
-
props:
|
|
1756
|
-
}), f(e, [
|
|
1757
|
-
w(e, [
|
|
1764
|
+
props: _
|
|
1765
|
+
}), f(e, [Te.id]), () => {
|
|
1766
|
+
w(e, [Te.id]);
|
|
1758
1767
|
};
|
|
1759
|
-
}, [f, e,
|
|
1760
|
-
S?.forEach((
|
|
1761
|
-
const O = L(e)?.props.layers.find((y) => y.props.id ===
|
|
1768
|
+
}, [f, e, g, M, w, b]), J(() => {
|
|
1769
|
+
S?.forEach((_) => {
|
|
1770
|
+
const O = L(e)?.props.layers.find((y) => y.props.id === _);
|
|
1762
1771
|
if (!O) return;
|
|
1763
|
-
i && (u.current[
|
|
1764
|
-
const c = !i && (u.current[
|
|
1765
|
-
b(
|
|
1772
|
+
i && (u.current[_] = O?.props.pickable);
|
|
1773
|
+
const c = !i && (u.current[_] ?? O?.props.pickable);
|
|
1774
|
+
b(_, {
|
|
1766
1775
|
props: {
|
|
1767
1776
|
pickable: c,
|
|
1768
|
-
extensions: [new
|
|
1769
|
-
maskId: !i && M.length ?
|
|
1777
|
+
extensions: [new sn()],
|
|
1778
|
+
maskId: !i && M.length ? Oe : void 0
|
|
1770
1779
|
}
|
|
1771
1780
|
});
|
|
1772
1781
|
});
|
|
1773
|
-
}, [i, L, e, S, M.length, b]),
|
|
1782
|
+
}, [i, L, e, S, M.length, b]), s;
|
|
1774
1783
|
}
|
|
1775
|
-
|
|
1776
|
-
function
|
|
1777
|
-
mode:
|
|
1784
|
+
bs.Controls = is;
|
|
1785
|
+
function Ss({
|
|
1786
|
+
mode: s,
|
|
1778
1787
|
...e
|
|
1779
1788
|
}) {
|
|
1780
|
-
const t =
|
|
1781
|
-
mode:
|
|
1789
|
+
const t = vs({
|
|
1790
|
+
mode: s,
|
|
1782
1791
|
...e
|
|
1783
1792
|
});
|
|
1784
1793
|
return {
|
|
1785
1794
|
type: Ct,
|
|
1786
1795
|
props: {
|
|
1787
1796
|
...t,
|
|
1788
|
-
mode:
|
|
1797
|
+
mode: s,
|
|
1789
1798
|
data: []
|
|
1790
1799
|
}
|
|
1791
1800
|
};
|
|
1792
1801
|
}
|
|
1793
|
-
function
|
|
1794
|
-
mode:
|
|
1802
|
+
function vs({
|
|
1803
|
+
mode: s,
|
|
1795
1804
|
layerProps: e,
|
|
1796
1805
|
locale: t,
|
|
1797
1806
|
enabled: n,
|
|
1798
|
-
unit:
|
|
1807
|
+
unit: r,
|
|
1799
1808
|
onEdit: o,
|
|
1800
1809
|
guideColor: i,
|
|
1801
1810
|
pointColor: a,
|
|
1802
1811
|
textOptions: l
|
|
1803
1812
|
}) {
|
|
1804
|
-
const d =
|
|
1813
|
+
const d = me(e, {
|
|
1805
1814
|
visible: n,
|
|
1806
1815
|
pickable: n,
|
|
1807
1816
|
modeConfig: {
|
|
1808
1817
|
// We force distance due to conversion is addressed at feature getText level
|
|
1809
1818
|
formatTooltip: (b) => b,
|
|
1810
1819
|
turfOptions: {
|
|
1811
|
-
units:
|
|
1820
|
+
units: ps.meters
|
|
1812
1821
|
}
|
|
1813
1822
|
},
|
|
1814
1823
|
...n && {
|
|
@@ -1823,18 +1832,18 @@ function wr({
|
|
|
1823
1832
|
// needed for the outlineWidth and outlineColor attributes to be effective
|
|
1824
1833
|
smoothing: 0.2
|
|
1825
1834
|
},
|
|
1826
|
-
getText: (b) =>
|
|
1835
|
+
getText: (b) => s?.getTooltipText?.({
|
|
1827
1836
|
meters: b.text,
|
|
1828
1837
|
locale: t,
|
|
1829
|
-
unit:
|
|
1838
|
+
unit: r,
|
|
1830
1839
|
options: l
|
|
1831
1840
|
}),
|
|
1832
1841
|
updateTriggers: {
|
|
1833
|
-
getText: [
|
|
1842
|
+
getText: [r, t, l]
|
|
1834
1843
|
}
|
|
1835
1844
|
}
|
|
1836
1845
|
}
|
|
1837
|
-
}), m =
|
|
1846
|
+
}), m = me(fs, {
|
|
1838
1847
|
_subLayerProps: {
|
|
1839
1848
|
guides: {
|
|
1840
1849
|
getLineColor: i,
|
|
@@ -1844,30 +1853,30 @@ function wr({
|
|
|
1844
1853
|
getEditHandlePointColor: a,
|
|
1845
1854
|
getEditHandlePointOutlineColor: i
|
|
1846
1855
|
});
|
|
1847
|
-
return
|
|
1856
|
+
return me(m, d);
|
|
1848
1857
|
}
|
|
1849
|
-
const
|
|
1850
|
-
measurements:
|
|
1858
|
+
const ws = (s) => Ze()((e) => ({
|
|
1859
|
+
measurements: s.reduce((n, r) => {
|
|
1851
1860
|
const {
|
|
1852
1861
|
mapId: o,
|
|
1853
1862
|
modeSelected: i,
|
|
1854
|
-
modes: a =
|
|
1855
|
-
units: l =
|
|
1863
|
+
modes: a = ys,
|
|
1864
|
+
units: l = hs,
|
|
1856
1865
|
distance: d = 0,
|
|
1857
1866
|
finished: m = !1,
|
|
1858
|
-
locale:
|
|
1867
|
+
locale: h = "en",
|
|
1859
1868
|
positions: b = [],
|
|
1860
1869
|
clearLayerOnStart: f = !1,
|
|
1861
1870
|
unit: w = je["m-km"],
|
|
1862
1871
|
enabled: S = !1
|
|
1863
|
-
} =
|
|
1872
|
+
} = r;
|
|
1864
1873
|
return n[o] = {
|
|
1865
1874
|
modes: a,
|
|
1866
1875
|
units: l,
|
|
1867
1876
|
modeSelected: i,
|
|
1868
1877
|
distance: d,
|
|
1869
1878
|
finished: m,
|
|
1870
|
-
locale:
|
|
1879
|
+
locale: h,
|
|
1871
1880
|
positions: b,
|
|
1872
1881
|
unit: w,
|
|
1873
1882
|
clearLayerOnStart: f,
|
|
@@ -1875,240 +1884,240 @@ const Mr = (r) => ze()((e) => ({
|
|
|
1875
1884
|
}, n;
|
|
1876
1885
|
}, {}),
|
|
1877
1886
|
mode: Ft,
|
|
1878
|
-
setModeInstance: (n,
|
|
1887
|
+
setModeInstance: (n, r) => {
|
|
1879
1888
|
e((o) => ({
|
|
1880
1889
|
measurements: {
|
|
1881
1890
|
...o.measurements,
|
|
1882
1891
|
[n]: {
|
|
1883
1892
|
...o.measurements[n],
|
|
1884
|
-
modeInstance:
|
|
1893
|
+
modeInstance: r
|
|
1885
1894
|
}
|
|
1886
1895
|
}
|
|
1887
1896
|
}));
|
|
1888
1897
|
},
|
|
1889
|
-
setModeSelected: (n,
|
|
1898
|
+
setModeSelected: (n, r) => {
|
|
1890
1899
|
e((o) => ({
|
|
1891
1900
|
measurements: {
|
|
1892
1901
|
...o.measurements,
|
|
1893
1902
|
[n]: {
|
|
1894
1903
|
...o.measurements[n],
|
|
1895
|
-
modeSelected:
|
|
1904
|
+
modeSelected: r
|
|
1896
1905
|
}
|
|
1897
1906
|
}
|
|
1898
1907
|
}));
|
|
1899
1908
|
},
|
|
1900
|
-
setFinished: (n,
|
|
1909
|
+
setFinished: (n, r) => {
|
|
1901
1910
|
e((o) => ({
|
|
1902
1911
|
measurements: {
|
|
1903
1912
|
...o.measurements,
|
|
1904
1913
|
[n]: {
|
|
1905
1914
|
...o.measurements[n],
|
|
1906
|
-
finished:
|
|
1915
|
+
finished: r
|
|
1907
1916
|
}
|
|
1908
1917
|
}
|
|
1909
1918
|
}));
|
|
1910
1919
|
},
|
|
1911
|
-
setDistance: (n,
|
|
1920
|
+
setDistance: (n, r) => {
|
|
1912
1921
|
e((o) => ({
|
|
1913
1922
|
measurements: {
|
|
1914
1923
|
...o.measurements,
|
|
1915
1924
|
[n]: {
|
|
1916
1925
|
...o.measurements[n],
|
|
1917
|
-
distance:
|
|
1926
|
+
distance: r
|
|
1918
1927
|
}
|
|
1919
1928
|
}
|
|
1920
1929
|
}));
|
|
1921
1930
|
},
|
|
1922
|
-
setUnit: (n,
|
|
1931
|
+
setUnit: (n, r) => {
|
|
1923
1932
|
e((o) => ({
|
|
1924
1933
|
measurements: {
|
|
1925
1934
|
...o.measurements,
|
|
1926
1935
|
[n]: {
|
|
1927
1936
|
...o.measurements[n],
|
|
1928
|
-
unit:
|
|
1937
|
+
unit: r
|
|
1929
1938
|
}
|
|
1930
1939
|
}
|
|
1931
1940
|
}));
|
|
1932
1941
|
},
|
|
1933
|
-
setLocale: (n,
|
|
1942
|
+
setLocale: (n, r) => {
|
|
1934
1943
|
e((o) => ({
|
|
1935
1944
|
measurements: {
|
|
1936
1945
|
...o.measurements,
|
|
1937
1946
|
[n]: {
|
|
1938
1947
|
...o.measurements[n],
|
|
1939
|
-
locale:
|
|
1948
|
+
locale: r
|
|
1940
1949
|
}
|
|
1941
1950
|
}
|
|
1942
1951
|
}));
|
|
1943
1952
|
},
|
|
1944
|
-
setPositions: (n,
|
|
1953
|
+
setPositions: (n, r) => {
|
|
1945
1954
|
e((o) => ({
|
|
1946
1955
|
measurements: {
|
|
1947
1956
|
...o.measurements,
|
|
1948
1957
|
[n]: {
|
|
1949
1958
|
...o.measurements[n],
|
|
1950
|
-
positions: [...
|
|
1959
|
+
positions: [...r]
|
|
1951
1960
|
}
|
|
1952
1961
|
}
|
|
1953
1962
|
}));
|
|
1954
1963
|
},
|
|
1955
|
-
setEnabled: (n,
|
|
1964
|
+
setEnabled: (n, r) => {
|
|
1956
1965
|
e((o) => ({
|
|
1957
1966
|
measurements: {
|
|
1958
1967
|
...o.measurements,
|
|
1959
1968
|
[n]: {
|
|
1960
1969
|
...o.measurements[n],
|
|
1961
|
-
enabled:
|
|
1970
|
+
enabled: r
|
|
1962
1971
|
}
|
|
1963
1972
|
}
|
|
1964
1973
|
}));
|
|
1965
1974
|
}
|
|
1966
|
-
})),
|
|
1967
|
-
function
|
|
1968
|
-
const e =
|
|
1975
|
+
})), Rt = Ne({});
|
|
1976
|
+
function Ms(s) {
|
|
1977
|
+
const e = B(5), {
|
|
1969
1978
|
children: t,
|
|
1970
1979
|
values: n
|
|
1971
|
-
} =
|
|
1972
|
-
let
|
|
1973
|
-
e[0] !== n ? (
|
|
1974
|
-
const [o] =
|
|
1980
|
+
} = s;
|
|
1981
|
+
let r;
|
|
1982
|
+
e[0] !== n ? (r = ws(n), e[0] = n, e[1] = r) : r = e[1];
|
|
1983
|
+
const [o] = ue(r);
|
|
1975
1984
|
let i;
|
|
1976
|
-
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */
|
|
1985
|
+
return e[2] !== t || e[3] !== o ? (i = /* @__PURE__ */ G(Rt.Provider, { value: o, children: t }), e[2] = t, e[3] = o, e[4] = i) : i = e[4], i;
|
|
1977
1986
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const e = He(
|
|
1987
|
+
function z(s) {
|
|
1988
|
+
const e = He(Rt);
|
|
1980
1989
|
if (!Object.keys(e).length)
|
|
1981
1990
|
throw new Error("Missing MeasurementToolsProvider in the tree");
|
|
1982
|
-
return
|
|
1991
|
+
return ze(e, s);
|
|
1983
1992
|
}
|
|
1984
|
-
function
|
|
1985
|
-
const e =
|
|
1993
|
+
function Dt(s) {
|
|
1994
|
+
const e = B(74), {
|
|
1986
1995
|
mapId: t
|
|
1987
|
-
} =
|
|
1996
|
+
} = s;
|
|
1988
1997
|
let n;
|
|
1989
|
-
e[0] !== t ? (n = (
|
|
1990
|
-
const
|
|
1998
|
+
e[0] !== t ? (n = (D) => D.measurements[t].modes, e[0] = t, e[1] = n) : n = e[1];
|
|
1999
|
+
const r = z(n);
|
|
1991
2000
|
let o;
|
|
1992
|
-
e[2] !== t ? (o = (
|
|
1993
|
-
const i =
|
|
2001
|
+
e[2] !== t ? (o = (D) => D.measurements[t].units, e[2] = t, e[3] = o) : o = e[3];
|
|
2002
|
+
const i = z(o);
|
|
1994
2003
|
let a;
|
|
1995
|
-
e[4] !== t ? (a = (
|
|
1996
|
-
const l =
|
|
2004
|
+
e[4] !== t ? (a = (D) => D.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
2005
|
+
const l = z(a), d = z(Os);
|
|
1997
2006
|
let m;
|
|
1998
|
-
e[6] !== d || e[7] !== t ? (m = (
|
|
1999
|
-
const
|
|
2007
|
+
e[6] !== d || e[7] !== t ? (m = (D) => d(t, D), e[6] = d, e[7] = t, e[8] = m) : m = e[8];
|
|
2008
|
+
const h = m;
|
|
2000
2009
|
let b;
|
|
2001
|
-
e[9] !== t ? (b = (
|
|
2002
|
-
const f =
|
|
2010
|
+
e[9] !== t ? (b = (D) => D.measurements[t].clearLayerOnStart, e[9] = t, e[10] = b) : b = e[10];
|
|
2011
|
+
const f = z(b);
|
|
2003
2012
|
let w;
|
|
2004
|
-
e[11] !== t ? (w = (
|
|
2005
|
-
const S =
|
|
2013
|
+
e[11] !== t ? (w = (D) => D.measurements[t].enabled, e[11] = t, e[12] = w) : w = e[12];
|
|
2014
|
+
const S = z(w), L = z(Ps);
|
|
2006
2015
|
let u;
|
|
2007
|
-
e[13] !== L || e[14] !== t ? (u = (
|
|
2016
|
+
e[13] !== L || e[14] !== t ? (u = (D) => L(t, D), e[13] = L, e[14] = t, e[15] = u) : u = e[15];
|
|
2008
2017
|
const p = u;
|
|
2009
|
-
let
|
|
2010
|
-
e[16] !== t ? (
|
|
2011
|
-
const M =
|
|
2018
|
+
let g;
|
|
2019
|
+
e[16] !== t ? (g = (D) => D.measurements[t].modeSelected, e[16] = t, e[17] = g) : g = e[17];
|
|
2020
|
+
const M = z(g), v = z(Cs);
|
|
2012
2021
|
let k;
|
|
2013
|
-
e[18] !== v || e[19] !== t || e[20] !== p ? (k = (
|
|
2014
|
-
p(!!
|
|
2022
|
+
e[18] !== v || e[19] !== t || e[20] !== p ? (k = (D) => {
|
|
2023
|
+
p(!!D), v(t, D);
|
|
2015
2024
|
}, e[18] = v, e[19] = t, e[20] = p, e[21] = k) : k = e[21];
|
|
2016
|
-
const
|
|
2025
|
+
const F = k;
|
|
2017
2026
|
let V;
|
|
2018
|
-
e[22] !== t ? (V = (
|
|
2019
|
-
const
|
|
2020
|
-
let
|
|
2021
|
-
e[24] !==
|
|
2022
|
-
const
|
|
2023
|
-
let
|
|
2024
|
-
e[27] !== t ? (
|
|
2025
|
-
const O =
|
|
2027
|
+
e[22] !== t ? (V = (D) => D.measurements[t].finished, e[22] = t, e[23] = V) : V = e[23];
|
|
2028
|
+
const A = z(V), $ = z(ks);
|
|
2029
|
+
let q;
|
|
2030
|
+
e[24] !== $ || e[25] !== t ? (q = (D) => $(t, D), e[24] = $, e[25] = t, e[26] = q) : q = e[26];
|
|
2031
|
+
const R = q;
|
|
2032
|
+
let _;
|
|
2033
|
+
e[27] !== t ? (_ = (D) => D.measurements[t].locale, e[27] = t, e[28] = _) : _ = e[28];
|
|
2034
|
+
const O = z(_), c = z(Ls);
|
|
2026
2035
|
let y;
|
|
2027
|
-
e[29] !== c || e[30] !== t ? (y = (
|
|
2036
|
+
e[29] !== c || e[30] !== t ? (y = (D) => c(t, D), e[29] = c, e[30] = t, e[31] = y) : y = e[31];
|
|
2028
2037
|
const T = y;
|
|
2029
2038
|
let P;
|
|
2030
|
-
e[32] !== t ? (P = (
|
|
2031
|
-
const C =
|
|
2032
|
-
let
|
|
2033
|
-
e[34] !==
|
|
2034
|
-
const
|
|
2039
|
+
e[32] !== t ? (P = (D) => D.measurements[t].modeInstance, e[32] = t, e[33] = P) : P = e[33];
|
|
2040
|
+
const C = z(P), E = z(Ts);
|
|
2041
|
+
let j;
|
|
2042
|
+
e[34] !== E || e[35] !== t ? (j = (D) => E(t, D), e[34] = E, e[35] = t, e[36] = j) : j = e[36];
|
|
2043
|
+
const I = j;
|
|
2035
2044
|
let N;
|
|
2036
|
-
e[37] !== t ? (N = (
|
|
2037
|
-
const U =
|
|
2038
|
-
let Y;
|
|
2039
|
-
e[39] !== z || e[40] !== t ? (Y = (R) => z(t, R), e[39] = z, e[40] = t, e[41] = Y) : Y = e[41];
|
|
2040
|
-
const ne = Y;
|
|
2041
|
-
let Q;
|
|
2042
|
-
e[42] !== t ? (Q = (R) => R.measurements[t].unit, e[42] = t, e[43] = Q) : Q = e[43];
|
|
2043
|
-
const J = G(Q), re = G(Er);
|
|
2045
|
+
e[37] !== t ? (N = (D) => D.measurements[t].positions, e[37] = t, e[38] = N) : N = e[38];
|
|
2046
|
+
const U = z(N), Z = z(Es);
|
|
2044
2047
|
let oe;
|
|
2045
|
-
e[
|
|
2046
|
-
const
|
|
2047
|
-
let
|
|
2048
|
-
e[
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2048
|
+
e[39] !== Z || e[40] !== t ? (oe = (D) => Z(t, D), e[39] = Z, e[40] = t, e[41] = oe) : oe = e[41];
|
|
2049
|
+
const Q = oe;
|
|
2050
|
+
let le;
|
|
2051
|
+
e[42] !== t ? (le = (D) => D.measurements[t].unit, e[42] = t, e[43] = le) : le = e[43];
|
|
2052
|
+
const X = z(le), te = z(_s);
|
|
2053
|
+
let Y;
|
|
2054
|
+
e[44] !== te || e[45] !== t ? (Y = (D) => te(t, D), e[44] = te, e[45] = t, e[46] = Y) : Y = e[46];
|
|
2055
|
+
const W = Y;
|
|
2056
|
+
let ee;
|
|
2057
|
+
e[47] !== C || e[48] !== Q ? (ee = () => {
|
|
2058
|
+
C?.resetClickSequence(), Q([]);
|
|
2059
|
+
}, e[47] = C, e[48] = Q, e[49] = ee) : ee = e[49];
|
|
2060
|
+
const ie = ee;
|
|
2061
|
+
let Me;
|
|
2062
|
+
e[50] !== p ? (Me = (D) => {
|
|
2063
|
+
p(D);
|
|
2064
|
+
}, e[50] = p, e[51] = Me) : Me = e[51];
|
|
2065
|
+
const Fe = Me;
|
|
2066
|
+
let _e;
|
|
2067
|
+
return e[52] !== ie || e[53] !== f || e[54] !== l || e[55] !== S || e[56] !== A || e[57] !== O || e[58] !== C || e[59] !== M || e[60] !== r || e[61] !== U || e[62] !== h || e[63] !== p || e[64] !== R || e[65] !== T || e[66] !== I || e[67] !== F || e[68] !== Q || e[69] !== W || e[70] !== Fe || e[71] !== X || e[72] !== i ? (_e = {
|
|
2068
|
+
modes: r,
|
|
2060
2069
|
units: i,
|
|
2061
2070
|
distance: l,
|
|
2062
2071
|
clearLayerOnStart: f,
|
|
2063
2072
|
modeSelected: M,
|
|
2064
2073
|
enabled: S,
|
|
2065
|
-
finished:
|
|
2074
|
+
finished: A,
|
|
2066
2075
|
locale: O,
|
|
2067
2076
|
modeInstance: C,
|
|
2068
2077
|
positions: U,
|
|
2069
|
-
unit:
|
|
2070
|
-
setDistance:
|
|
2071
|
-
setModeSelected:
|
|
2072
|
-
setFinished:
|
|
2078
|
+
unit: X,
|
|
2079
|
+
setDistance: h,
|
|
2080
|
+
setModeSelected: F,
|
|
2081
|
+
setFinished: R,
|
|
2073
2082
|
setLocale: T,
|
|
2074
|
-
setPositions:
|
|
2075
|
-
setUnit:
|
|
2083
|
+
setPositions: Q,
|
|
2084
|
+
setUnit: W,
|
|
2076
2085
|
setEnabled: p,
|
|
2077
2086
|
toggleLayer: Fe,
|
|
2078
|
-
clearLayer:
|
|
2079
|
-
setModeInstance:
|
|
2080
|
-
}, e[52] =
|
|
2087
|
+
clearLayer: ie,
|
|
2088
|
+
setModeInstance: I
|
|
2089
|
+
}, e[52] = ie, e[53] = f, e[54] = l, e[55] = S, e[56] = A, e[57] = O, e[58] = C, e[59] = M, e[60] = r, e[61] = U, e[62] = h, e[63] = p, e[64] = R, e[65] = T, e[66] = I, e[67] = F, e[68] = Q, e[69] = W, e[70] = Fe, e[71] = X, e[72] = i, e[73] = _e) : _e = e[73], _e;
|
|
2081
2090
|
}
|
|
2082
|
-
function
|
|
2083
|
-
return
|
|
2091
|
+
function _s(s) {
|
|
2092
|
+
return s.setUnit;
|
|
2084
2093
|
}
|
|
2085
|
-
function
|
|
2086
|
-
return
|
|
2094
|
+
function Es(s) {
|
|
2095
|
+
return s.setPositions;
|
|
2087
2096
|
}
|
|
2088
|
-
function
|
|
2089
|
-
return
|
|
2097
|
+
function Ts(s) {
|
|
2098
|
+
return s.setModeInstance;
|
|
2090
2099
|
}
|
|
2091
|
-
function
|
|
2092
|
-
return
|
|
2100
|
+
function Ls(s) {
|
|
2101
|
+
return s.setLocale;
|
|
2093
2102
|
}
|
|
2094
|
-
function
|
|
2095
|
-
return
|
|
2103
|
+
function ks(s) {
|
|
2104
|
+
return s.setFinished;
|
|
2096
2105
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return
|
|
2106
|
+
function Cs(s) {
|
|
2107
|
+
return s.setModeSelected;
|
|
2099
2108
|
}
|
|
2100
|
-
function
|
|
2101
|
-
return
|
|
2109
|
+
function Ps(s) {
|
|
2110
|
+
return s.setEnabled;
|
|
2102
2111
|
}
|
|
2103
|
-
function
|
|
2104
|
-
return
|
|
2112
|
+
function Os(s) {
|
|
2113
|
+
return s.setDistance;
|
|
2105
2114
|
}
|
|
2106
|
-
function
|
|
2107
|
-
const e =
|
|
2115
|
+
function As(s) {
|
|
2116
|
+
const e = B(42), {
|
|
2108
2117
|
mapId: t,
|
|
2109
2118
|
textOptions: n,
|
|
2110
|
-
children:
|
|
2111
|
-
} =
|
|
2119
|
+
children: r
|
|
2120
|
+
} = s;
|
|
2112
2121
|
let o;
|
|
2113
2122
|
e[0] !== t ? (o = {
|
|
2114
2123
|
mapId: t
|
|
@@ -2119,7 +2128,7 @@ function Fr(r) {
|
|
|
2119
2128
|
distance: l,
|
|
2120
2129
|
setDistance: d,
|
|
2121
2130
|
clearLayerOnStart: m,
|
|
2122
|
-
modeSelected:
|
|
2131
|
+
modeSelected: h,
|
|
2123
2132
|
setModeSelected: b,
|
|
2124
2133
|
enabled: f,
|
|
2125
2134
|
setEnabled: w,
|
|
@@ -2127,52 +2136,52 @@ function Fr(r) {
|
|
|
2127
2136
|
setFinished: L,
|
|
2128
2137
|
locale: u,
|
|
2129
2138
|
setLocale: p,
|
|
2130
|
-
modeInstance:
|
|
2139
|
+
modeInstance: g,
|
|
2131
2140
|
setModeInstance: M,
|
|
2132
2141
|
positions: v,
|
|
2133
2142
|
setPositions: k,
|
|
2134
|
-
unit:
|
|
2143
|
+
unit: F,
|
|
2135
2144
|
setUnit: V,
|
|
2136
|
-
clearLayer:
|
|
2137
|
-
toggleLayer:
|
|
2138
|
-
} =
|
|
2139
|
-
let
|
|
2140
|
-
e[2] !==
|
|
2141
|
-
if (
|
|
2142
|
-
const T = i[
|
|
2145
|
+
clearLayer: A,
|
|
2146
|
+
toggleLayer: $
|
|
2147
|
+
} = Dt(o);
|
|
2148
|
+
let q;
|
|
2149
|
+
e[2] !== h || e[3] !== i || e[4] !== M || e[5] !== k ? (q = () => {
|
|
2150
|
+
if (h && i[h]) {
|
|
2151
|
+
const T = i[h].mode;
|
|
2143
2152
|
M(new T());
|
|
2144
2153
|
}
|
|
2145
2154
|
return () => {
|
|
2146
2155
|
k([]);
|
|
2147
2156
|
};
|
|
2148
|
-
}, e[2] =
|
|
2149
|
-
let
|
|
2150
|
-
e[7] !==
|
|
2151
|
-
let
|
|
2152
|
-
e[13] !==
|
|
2153
|
-
T && (m || !S) &&
|
|
2154
|
-
}, e[13] =
|
|
2155
|
-
const O =
|
|
2157
|
+
}, e[2] = h, e[3] = i, e[4] = M, e[5] = k, e[6] = q) : q = e[6];
|
|
2158
|
+
let R;
|
|
2159
|
+
e[7] !== h || e[8] !== i || e[9] !== w || e[10] !== M || e[11] !== k ? (R = [i, h, k, M, w], e[7] = h, e[8] = i, e[9] = w, e[10] = M, e[11] = k, e[12] = R) : R = e[12], J(q, R);
|
|
2160
|
+
let _;
|
|
2161
|
+
e[13] !== $ || e[14] !== A || e[15] !== m || e[16] !== S ? (_ = (T) => {
|
|
2162
|
+
T && (m || !S) && A(), $(T);
|
|
2163
|
+
}, e[13] = $, e[14] = A, e[15] = m, e[16] = S, e[17] = _) : _ = e[17];
|
|
2164
|
+
const O = _, c = !!m;
|
|
2156
2165
|
let y;
|
|
2157
|
-
return e[18] !==
|
|
2166
|
+
return e[18] !== r || e[19] !== A || e[20] !== l || e[21] !== f || e[22] !== S || e[23] !== u || e[24] !== t || e[25] !== g || e[26] !== h || e[27] !== i || e[28] !== v || e[29] !== d || e[30] !== w || e[31] !== L || e[32] !== p || e[33] !== b || e[34] !== k || e[35] !== V || e[36] !== c || e[37] !== n || e[38] !== O || e[39] !== F || e[40] !== a ? (y = r({
|
|
2158
2167
|
mapId: t,
|
|
2159
2168
|
distance: l,
|
|
2160
2169
|
enabled: f,
|
|
2161
2170
|
finished: S,
|
|
2162
2171
|
locale: u,
|
|
2163
2172
|
positions: v,
|
|
2164
|
-
unit:
|
|
2173
|
+
unit: F,
|
|
2165
2174
|
clearLayerOnStart: c,
|
|
2166
|
-
modeSelected:
|
|
2175
|
+
modeSelected: h,
|
|
2167
2176
|
modes: i,
|
|
2168
2177
|
units: a,
|
|
2169
|
-
value:
|
|
2178
|
+
value: Ae({
|
|
2170
2179
|
meters: l,
|
|
2171
|
-
unit:
|
|
2180
|
+
unit: F,
|
|
2172
2181
|
locale: u,
|
|
2173
2182
|
options: n
|
|
2174
2183
|
}),
|
|
2175
|
-
modeInstance:
|
|
2184
|
+
modeInstance: g,
|
|
2176
2185
|
setModeSelected: b,
|
|
2177
2186
|
setDistance: d,
|
|
2178
2187
|
setFinished: L,
|
|
@@ -2181,22 +2190,22 @@ function Fr(r) {
|
|
|
2181
2190
|
setUnit: V,
|
|
2182
2191
|
setEnabled: w,
|
|
2183
2192
|
toggleLayer: O,
|
|
2184
|
-
clearLayer:
|
|
2185
|
-
}), e[18] =
|
|
2193
|
+
clearLayer: A
|
|
2194
|
+
}), e[18] = r, e[19] = A, e[20] = l, e[21] = f, e[22] = S, e[23] = u, e[24] = t, e[25] = g, e[26] = h, e[27] = i, e[28] = v, e[29] = d, e[30] = w, e[31] = L, e[32] = p, e[33] = b, e[34] = k, e[35] = V, e[36] = c, e[37] = n, e[38] = O, e[39] = F, e[40] = a, e[41] = y) : y = e[41], y;
|
|
2186
2195
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2189
|
-
const e =
|
|
2196
|
+
const Fs = [fe];
|
|
2197
|
+
function Rs(s) {
|
|
2198
|
+
const e = B(50), {
|
|
2190
2199
|
children: t,
|
|
2191
2200
|
mapId: n,
|
|
2192
|
-
defaultProps:
|
|
2201
|
+
defaultProps: r,
|
|
2193
2202
|
layerProps: o,
|
|
2194
2203
|
textOptions: i
|
|
2195
|
-
} =
|
|
2204
|
+
} = s;
|
|
2196
2205
|
let a;
|
|
2197
|
-
e[0] !==
|
|
2206
|
+
e[0] !== r ? (a = r === void 0 ? {
|
|
2198
2207
|
styles: ot.styles
|
|
2199
|
-
} :
|
|
2208
|
+
} : r, e[0] = r, e[1] = a) : a = e[1];
|
|
2200
2209
|
const {
|
|
2201
2210
|
styles: l
|
|
2202
2211
|
} = a, d = l === void 0 ? ot.styles : l;
|
|
@@ -2205,7 +2214,7 @@ function Rr(r) {
|
|
|
2205
2214
|
mapId: n
|
|
2206
2215
|
}, e[2] = n, e[3] = m) : m = e[3];
|
|
2207
2216
|
const {
|
|
2208
|
-
setDistance:
|
|
2217
|
+
setDistance: h,
|
|
2209
2218
|
clearLayerOnStart: b,
|
|
2210
2219
|
enabled: f,
|
|
2211
2220
|
finished: w,
|
|
@@ -2213,213 +2222,213 @@ function Rr(r) {
|
|
|
2213
2222
|
locale: L,
|
|
2214
2223
|
setPositions: u,
|
|
2215
2224
|
unit: p,
|
|
2216
|
-
modeInstance:
|
|
2217
|
-
} =
|
|
2225
|
+
modeInstance: g
|
|
2226
|
+
} = Dt(m), M = Se(qs), v = x(Vs), k = x(Us), F = x($s);
|
|
2218
2227
|
let V;
|
|
2219
|
-
e[4] !== n ? (V = (
|
|
2220
|
-
const
|
|
2221
|
-
let
|
|
2222
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2223
|
-
const
|
|
2224
|
-
let
|
|
2225
|
-
e[7] !== n ? (
|
|
2228
|
+
e[4] !== n ? (V = (I) => I.maps[n]?.layers.filter(xs), e[4] = n, e[5] = V) : V = e[5];
|
|
2229
|
+
const A = x(St(V)), $ = x(Ds);
|
|
2230
|
+
let q;
|
|
2231
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (q = {}, e[6] = q) : q = e[6];
|
|
2232
|
+
const R = ke(q);
|
|
2233
|
+
let _;
|
|
2234
|
+
e[7] !== n ? (_ = {
|
|
2226
2235
|
mapId: n,
|
|
2227
|
-
layerId:
|
|
2228
|
-
}, e[7] = n, e[8] =
|
|
2236
|
+
layerId: fe
|
|
2237
|
+
}, e[7] = n, e[8] = _) : _ = e[8], kt(_);
|
|
2229
2238
|
let O;
|
|
2230
|
-
e[9] !== k || e[10] !== f || e[11] !==
|
|
2231
|
-
const
|
|
2232
|
-
return f && (k(n, [
|
|
2239
|
+
e[9] !== k || e[10] !== f || e[11] !== $ || e[12] !== n || e[13] !== F || e[14] !== v ? (O = () => {
|
|
2240
|
+
const I = $(n)?.props.controller;
|
|
2241
|
+
return f && (k(n, [fe]), v(n, {
|
|
2233
2242
|
doubleClickZoom: !1
|
|
2234
2243
|
})), () => {
|
|
2235
|
-
|
|
2244
|
+
F(n, [fe]), v(n, I);
|
|
2236
2245
|
};
|
|
2237
|
-
}, e[9] = k, e[10] = f, e[11] =
|
|
2246
|
+
}, e[9] = k, e[10] = f, e[11] = $, e[12] = n, e[13] = F, e[14] = v, e[15] = O) : O = e[15];
|
|
2238
2247
|
let c;
|
|
2239
|
-
e[16] !== k || e[17] !== b || e[18] !== f || e[19] !==
|
|
2248
|
+
e[16] !== k || e[17] !== b || e[18] !== f || e[19] !== $ || e[20] !== n || e[21] !== F || e[22] !== v ? (c = [k, b, n, F, f, $, v], e[16] = k, e[17] = b, e[18] = f, e[19] = $, e[20] = n, e[21] = F, e[22] = v, e[23] = c) : c = e[23], J(O, c);
|
|
2240
2249
|
let y, T;
|
|
2241
|
-
e[24] !== f || e[25] !==
|
|
2242
|
-
|
|
2243
|
-
const N =
|
|
2250
|
+
e[24] !== f || e[25] !== $ || e[26] !== n || e[27] !== A || e[28] !== M ? (y = () => {
|
|
2251
|
+
A?.forEach((I) => {
|
|
2252
|
+
const N = $(n)?.props.layers.find((Z) => Z.props.id === I);
|
|
2244
2253
|
if (!N)
|
|
2245
2254
|
return;
|
|
2246
|
-
f && (
|
|
2247
|
-
const U = !f && (
|
|
2248
|
-
M(
|
|
2255
|
+
f && (R.current[I] = N?.props.pickable);
|
|
2256
|
+
const U = !f && (R.current[I] ?? N?.props.pickable);
|
|
2257
|
+
M(I, {
|
|
2249
2258
|
props: {
|
|
2250
2259
|
pickable: U
|
|
2251
2260
|
}
|
|
2252
2261
|
});
|
|
2253
2262
|
});
|
|
2254
|
-
}, T = [f,
|
|
2263
|
+
}, T = [f, $, n, A, M], e[24] = f, e[25] = $, e[26] = n, e[27] = A, e[28] = M, e[29] = y, e[30] = T) : (y = e[29], T = e[30]), J(y, T);
|
|
2255
2264
|
let P;
|
|
2256
|
-
e[31] !==
|
|
2265
|
+
e[31] !== g || e[32] !== h || e[33] !== S || e[34] !== u ? (P = (I) => {
|
|
2257
2266
|
const {
|
|
2258
2267
|
editType: N,
|
|
2259
2268
|
editContext: U
|
|
2260
|
-
} =
|
|
2261
|
-
if (N ===
|
|
2262
|
-
|
|
2269
|
+
} = I;
|
|
2270
|
+
if (N === re.cancel) {
|
|
2271
|
+
g.resetClickSequence();
|
|
2263
2272
|
return;
|
|
2264
2273
|
}
|
|
2265
|
-
N ===
|
|
2266
|
-
const
|
|
2267
|
-
|
|
2268
|
-
}, e[31] =
|
|
2274
|
+
N === re.addPosition && h(U.distance), S(!!U.finished);
|
|
2275
|
+
const Z = U.positions;
|
|
2276
|
+
Z?.length && u(Z);
|
|
2277
|
+
}, e[31] = g, e[32] = h, e[33] = S, e[34] = u, e[35] = P) : P = e[35];
|
|
2269
2278
|
const C = P;
|
|
2270
|
-
let
|
|
2271
|
-
return e[36] !== f || e[37] !== w || e[38] !== o || e[39] !== L || e[40] !==
|
|
2272
|
-
const
|
|
2279
|
+
let E, j;
|
|
2280
|
+
return e[36] !== f || e[37] !== w || e[38] !== o || e[39] !== L || e[40] !== g || e[41] !== C || e[42] !== M || e[43] !== d.colors.editing || e[44] !== d.colors.finished || e[45] !== d.colors.point || e[46] !== i || e[47] !== p ? (E = () => {
|
|
2281
|
+
const I = w ? d.colors.finished : d.colors.editing, N = w ? d.colors.finished : d.colors.point, U = Ss({
|
|
2273
2282
|
layerProps: {
|
|
2274
2283
|
...o,
|
|
2275
2284
|
pickable: o?.pickable ?? !w
|
|
2276
2285
|
},
|
|
2277
2286
|
enabled: f,
|
|
2278
|
-
guideColor:
|
|
2287
|
+
guideColor: I,
|
|
2279
2288
|
pointColor: N,
|
|
2280
2289
|
locale: L,
|
|
2281
2290
|
onEdit: C,
|
|
2282
2291
|
unit: p,
|
|
2283
|
-
mode:
|
|
2292
|
+
mode: g,
|
|
2284
2293
|
textOptions: i
|
|
2285
2294
|
});
|
|
2286
|
-
M(
|
|
2287
|
-
},
|
|
2295
|
+
M(fe, U);
|
|
2296
|
+
}, j = [w, g, o, L, C, M, d.colors.editing, d.colors.finished, d.colors.point, i, p, f], e[36] = f, e[37] = w, e[38] = o, e[39] = L, e[40] = g, e[41] = C, e[42] = M, e[43] = d.colors.editing, e[44] = d.colors.finished, e[45] = d.colors.point, e[46] = i, e[47] = p, e[48] = E, e[49] = j) : (E = e[48], j = e[49]), J(E, j), t;
|
|
2288
2297
|
}
|
|
2289
|
-
function
|
|
2290
|
-
return
|
|
2298
|
+
function Ds(s) {
|
|
2299
|
+
return s.getDeckInstance;
|
|
2291
2300
|
}
|
|
2292
|
-
function
|
|
2293
|
-
return !
|
|
2301
|
+
function xs(s) {
|
|
2302
|
+
return !Fs.includes(s);
|
|
2294
2303
|
}
|
|
2295
|
-
function
|
|
2296
|
-
return
|
|
2304
|
+
function $s(s) {
|
|
2305
|
+
return s.removeLayers;
|
|
2297
2306
|
}
|
|
2298
|
-
function
|
|
2299
|
-
return
|
|
2307
|
+
function Us(s) {
|
|
2308
|
+
return s.addLayers;
|
|
2300
2309
|
}
|
|
2301
|
-
function
|
|
2302
|
-
return
|
|
2310
|
+
function Vs(s) {
|
|
2311
|
+
return s.setController;
|
|
2303
2312
|
}
|
|
2304
|
-
function
|
|
2305
|
-
return
|
|
2313
|
+
function qs(s) {
|
|
2314
|
+
return s.setLayer;
|
|
2306
2315
|
}
|
|
2307
|
-
|
|
2308
|
-
function
|
|
2309
|
-
const e =
|
|
2316
|
+
Rs.Controls = As;
|
|
2317
|
+
function Bs(s) {
|
|
2318
|
+
const e = B(7), {
|
|
2310
2319
|
mapId: t
|
|
2311
|
-
} =
|
|
2320
|
+
} = s;
|
|
2312
2321
|
let n;
|
|
2313
2322
|
e[0] !== t ? (n = (l) => l.maps[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2314
2323
|
const {
|
|
2315
|
-
layers:
|
|
2316
|
-
} =
|
|
2324
|
+
layers: r
|
|
2325
|
+
} = x(n), o = Se(Is);
|
|
2317
2326
|
let i;
|
|
2318
|
-
if (e[2] !== o || e[3] !==
|
|
2327
|
+
if (e[2] !== o || e[3] !== r) {
|
|
2319
2328
|
let l;
|
|
2320
|
-
e[5] !== o ? (l = (d) => o[d], e[5] = o, e[6] = l) : l = e[6], i =
|
|
2329
|
+
e[5] !== o ? (l = (d) => o[d], e[5] = o, e[6] = l) : l = e[6], i = r.map(l).filter(js), e[2] = o, e[3] = r, e[4] = i;
|
|
2321
2330
|
} else
|
|
2322
2331
|
i = e[4];
|
|
2323
2332
|
return i;
|
|
2324
2333
|
}
|
|
2325
|
-
function
|
|
2326
|
-
return !!
|
|
2334
|
+
function js(s) {
|
|
2335
|
+
return !!s;
|
|
2327
2336
|
}
|
|
2328
|
-
function
|
|
2329
|
-
return
|
|
2337
|
+
function Is(s) {
|
|
2338
|
+
return s.layers;
|
|
2330
2339
|
}
|
|
2331
|
-
const ct = [
|
|
2332
|
-
function xt(
|
|
2333
|
-
const e =
|
|
2340
|
+
const ct = [Oe, he, fe];
|
|
2341
|
+
function xt(s) {
|
|
2342
|
+
const e = s.filter((n) => !ct.includes(n.props.id)).sort((n, r) => (n.order ?? 1 / 0) - (r.order ?? 1 / 0)), t = ct.map((n) => s.find((r) => r.props.id === n)).filter((n) => !!n);
|
|
2334
2343
|
return [...e, ...t];
|
|
2335
2344
|
}
|
|
2336
|
-
const
|
|
2337
|
-
function
|
|
2338
|
-
const e =
|
|
2339
|
-
let t, n,
|
|
2340
|
-
e[0] !==
|
|
2345
|
+
const Ns = 200;
|
|
2346
|
+
function uo(s) {
|
|
2347
|
+
const e = B(51);
|
|
2348
|
+
let t, n, r, o;
|
|
2349
|
+
e[0] !== s ? ({
|
|
2341
2350
|
id: t,
|
|
2342
2351
|
onLoad: n,
|
|
2343
|
-
onViewStateChange:
|
|
2352
|
+
onViewStateChange: r,
|
|
2344
2353
|
...o
|
|
2345
|
-
} =
|
|
2354
|
+
} = s, e[0] = s, e[1] = t, e[2] = n, e[3] = r, e[4] = o) : (t = e[1], n = e[2], r = e[3], o = e[4]);
|
|
2346
2355
|
let i;
|
|
2347
|
-
e[5] !== t ? (i = (
|
|
2348
|
-
const a =
|
|
2356
|
+
e[5] !== t ? (i = (E) => E.maps[t].basemap, e[5] = t, e[6] = i) : i = e[6];
|
|
2357
|
+
const a = x(i);
|
|
2349
2358
|
let l;
|
|
2350
|
-
e[7] !== t ? (l = (
|
|
2351
|
-
const d =
|
|
2359
|
+
e[7] !== t ? (l = (E) => E.maps[t].instanceRef, e[7] = t, e[8] = l) : l = e[8];
|
|
2360
|
+
const d = x(l);
|
|
2352
2361
|
let m;
|
|
2353
|
-
e[9] !== t ? (m = (
|
|
2354
|
-
const
|
|
2362
|
+
e[9] !== t ? (m = (E) => E.maps[t].overlayRef, e[9] = t, e[10] = m) : m = e[10];
|
|
2363
|
+
const h = x(m), b = ke(null);
|
|
2355
2364
|
let f;
|
|
2356
|
-
e[11] !== t ? (f = (
|
|
2357
|
-
const w =
|
|
2365
|
+
e[11] !== t ? (f = (E) => E.viewStates[t], e[11] = t, e[12] = f) : f = e[12];
|
|
2366
|
+
const w = x(f);
|
|
2358
2367
|
let S;
|
|
2359
|
-
e[13] !== t ? (S = (
|
|
2360
|
-
const L =
|
|
2368
|
+
e[13] !== t ? (S = (E) => E.maps[t].controller, e[13] = t, e[14] = S) : S = e[14];
|
|
2369
|
+
const L = x(S), u = x(Ks), p = x(Ws), g = x(Gs), M = x(zs), v = x(Zs);
|
|
2361
2370
|
let k;
|
|
2362
2371
|
e[15] !== t ? (k = {
|
|
2363
2372
|
mapId: t
|
|
2364
2373
|
}, e[15] = t, e[16] = k) : k = e[16];
|
|
2365
|
-
const
|
|
2374
|
+
const F = Bs(k);
|
|
2366
2375
|
let V;
|
|
2367
|
-
e[17] !==
|
|
2368
|
-
const
|
|
2369
|
-
let
|
|
2370
|
-
e[19] !== t || e[20] !==
|
|
2371
|
-
const
|
|
2376
|
+
e[17] !== F ? (V = xt(F), e[17] = F, e[18] = V) : V = e[18];
|
|
2377
|
+
const A = V;
|
|
2378
|
+
let $;
|
|
2379
|
+
e[19] !== t || e[20] !== r || e[21] !== p || e[22] !== v ? ($ = (E) => {
|
|
2380
|
+
const j = p;
|
|
2372
2381
|
if (b.current && clearInterval(b.current), b.current = setTimeout(() => {
|
|
2373
2382
|
v(t);
|
|
2374
|
-
},
|
|
2375
|
-
|
|
2383
|
+
}, Ns), r) {
|
|
2384
|
+
r(E, j);
|
|
2376
2385
|
return;
|
|
2377
2386
|
}
|
|
2378
|
-
|
|
2379
|
-
}, e[19] = t, e[20] =
|
|
2380
|
-
const
|
|
2381
|
-
let
|
|
2382
|
-
e[24] !== t || e[25] !== n || e[26] !==
|
|
2383
|
-
|
|
2384
|
-
}, e[24] = t, e[25] = n, e[26] =
|
|
2385
|
-
const
|
|
2387
|
+
j(t, E.viewState);
|
|
2388
|
+
}, e[19] = t, e[20] = r, e[21] = p, e[22] = v, e[23] = $) : $ = e[23];
|
|
2389
|
+
const q = $;
|
|
2390
|
+
let R;
|
|
2391
|
+
e[24] !== t || e[25] !== n || e[26] !== g || e[27] !== v ? (R = (E) => {
|
|
2392
|
+
g(t, E), n?.(E), v(t);
|
|
2393
|
+
}, e[24] = t, e[25] = n, e[26] = g, e[27] = v, e[28] = R) : R = e[28];
|
|
2394
|
+
const _ = R;
|
|
2386
2395
|
let O;
|
|
2387
|
-
e[29] !== u || e[30] !== t || e[31] !== o || e[32] !== M ? (O = (
|
|
2388
|
-
const
|
|
2389
|
-
M(t,
|
|
2396
|
+
e[29] !== u || e[30] !== t || e[31] !== o || e[32] !== M ? (O = (E) => {
|
|
2397
|
+
const I = !!u(t)?.props.layers?.every(Hs);
|
|
2398
|
+
M(t, I), o.onAfterRender?.(E);
|
|
2390
2399
|
}, e[29] = u, e[30] = t, e[31] = o, e[32] = M, e[33] = O) : O = e[33];
|
|
2391
2400
|
const c = O, y = o.onDragEnd;
|
|
2392
2401
|
let T;
|
|
2393
|
-
e[34] !== y || e[35] !== t || e[36] !== v ? (T = (...
|
|
2394
|
-
const
|
|
2395
|
-
v(t), y && y(...
|
|
2402
|
+
e[34] !== y || e[35] !== t || e[36] !== v ? (T = (...E) => {
|
|
2403
|
+
const j = E;
|
|
2404
|
+
v(t), y && y(...j);
|
|
2396
2405
|
}, e[34] = y, e[35] = t, e[36] = v, e[37] = T) : T = e[37];
|
|
2397
2406
|
const P = T;
|
|
2398
2407
|
let C;
|
|
2399
|
-
return e[38] !== a || e[39] !==
|
|
2408
|
+
return e[38] !== a || e[39] !== A || e[40] !== L || e[41] !== c || e[42] !== P || e[43] !== _ || e[44] !== q || e[45] !== t || e[46] !== d || e[47] !== h || e[48] !== o || e[49] !== w ? (C = /* @__PURE__ */ G($n, { ...o, controller: L, id: t, layers: A, instanceRef: d, overlayRef: h, basemap: a, initialViewState: w, onLoad: _, onViewStateChange: q, onAfterRender: c, onDragEnd: P }), e[38] = a, e[39] = A, e[40] = L, e[41] = c, e[42] = P, e[43] = _, e[44] = q, e[45] = t, e[46] = d, e[47] = h, e[48] = o, e[49] = w, e[50] = C) : C = e[50], C;
|
|
2400
2409
|
}
|
|
2401
|
-
function
|
|
2402
|
-
return
|
|
2410
|
+
function Hs(s) {
|
|
2411
|
+
return s?.isLoaded;
|
|
2403
2412
|
}
|
|
2404
|
-
function
|
|
2405
|
-
return
|
|
2413
|
+
function Zs(s) {
|
|
2414
|
+
return s.updateViewPort;
|
|
2406
2415
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return
|
|
2416
|
+
function zs(s) {
|
|
2417
|
+
return s.setLayersLoad;
|
|
2409
2418
|
}
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2419
|
+
function Gs(s) {
|
|
2420
|
+
return s.setLoad;
|
|
2412
2421
|
}
|
|
2413
|
-
function
|
|
2414
|
-
return
|
|
2422
|
+
function Ws(s) {
|
|
2423
|
+
return s.setViewState;
|
|
2415
2424
|
}
|
|
2416
|
-
function
|
|
2417
|
-
return
|
|
2425
|
+
function Ks(s) {
|
|
2426
|
+
return s.getDeckInstance;
|
|
2418
2427
|
}
|
|
2419
|
-
var
|
|
2420
|
-
function
|
|
2421
|
-
return ut || (ut = 1, (function(
|
|
2422
|
-
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof
|
|
2428
|
+
var Le = { exports: {} }, ut;
|
|
2429
|
+
function Ys() {
|
|
2430
|
+
return ut || (ut = 1, (function(s, e) {
|
|
2431
|
+
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Ee < "u" && Ee, n = (function() {
|
|
2423
2432
|
function o() {
|
|
2424
2433
|
this.fetch = !1, this.DOMException = t.DOMException;
|
|
2425
2434
|
}
|
|
@@ -2428,7 +2437,7 @@ function Jr() {
|
|
|
2428
2437
|
(function(o) {
|
|
2429
2438
|
(function(i) {
|
|
2430
2439
|
var a = typeof o < "u" && o || typeof self < "u" && self || // eslint-disable-next-line no-undef
|
|
2431
|
-
typeof
|
|
2440
|
+
typeof Ee < "u" && Ee || {}, l = {
|
|
2432
2441
|
searchParams: "URLSearchParams" in a,
|
|
2433
2442
|
iterable: "Symbol" in a && "iterator" in Symbol,
|
|
2434
2443
|
blob: "FileReader" in a && "Blob" in a && (function() {
|
|
@@ -2455,7 +2464,7 @@ function Jr() {
|
|
|
2455
2464
|
"[object Uint32Array]",
|
|
2456
2465
|
"[object Float32Array]",
|
|
2457
2466
|
"[object Float64Array]"
|
|
2458
|
-
],
|
|
2467
|
+
], h = ArrayBuffer.isView || function(c) {
|
|
2459
2468
|
return c && m.indexOf(Object.prototype.toString.call(c)) > -1;
|
|
2460
2469
|
};
|
|
2461
2470
|
function b(c) {
|
|
@@ -2539,7 +2548,7 @@ function Jr() {
|
|
|
2539
2548
|
var y = new FileReader(), T = u(y);
|
|
2540
2549
|
return y.readAsArrayBuffer(c), T;
|
|
2541
2550
|
}
|
|
2542
|
-
function
|
|
2551
|
+
function g(c) {
|
|
2543
2552
|
var y = new FileReader(), T = u(y), P = /charset=([A-Za-z0-9_-]+)/.exec(c.type), C = P ? P[1] : "utf-8";
|
|
2544
2553
|
return y.readAsText(c, C), T;
|
|
2545
2554
|
}
|
|
@@ -2556,7 +2565,7 @@ function Jr() {
|
|
|
2556
2565
|
}
|
|
2557
2566
|
function k() {
|
|
2558
2567
|
return this.bodyUsed = !1, this._initBody = function(c) {
|
|
2559
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = c, c ? typeof c == "string" ? this._bodyText = c : l.blob && Blob.prototype.isPrototypeOf(c) ? this._bodyBlob = c : l.formData && FormData.prototype.isPrototypeOf(c) ? this._bodyFormData = c : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) ? this._bodyText = c.toString() : l.arrayBuffer && l.blob && d(c) ? (this._bodyArrayBuffer = v(c.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : l.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(c) ||
|
|
2568
|
+
this.bodyUsed = this.bodyUsed, this._bodyInit = c, c ? typeof c == "string" ? this._bodyText = c : l.blob && Blob.prototype.isPrototypeOf(c) ? this._bodyBlob = c : l.formData && FormData.prototype.isPrototypeOf(c) ? this._bodyFormData = c : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) ? this._bodyText = c.toString() : l.arrayBuffer && l.blob && d(c) ? (this._bodyArrayBuffer = v(c.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : l.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(c) || h(c)) ? this._bodyArrayBuffer = v(c) : this._bodyText = c = Object.prototype.toString.call(c) : (this._noBody = !0, this._bodyText = ""), this.headers.get("content-type") || (typeof c == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : l.searchParams && URLSearchParams.prototype.isPrototypeOf(c) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2560
2569
|
}, l.blob && (this.blob = function() {
|
|
2561
2570
|
var c = L(this);
|
|
2562
2571
|
if (c)
|
|
@@ -2587,29 +2596,29 @@ function Jr() {
|
|
|
2587
2596
|
if (c)
|
|
2588
2597
|
return c;
|
|
2589
2598
|
if (this._bodyBlob)
|
|
2590
|
-
return
|
|
2599
|
+
return g(this._bodyBlob);
|
|
2591
2600
|
if (this._bodyArrayBuffer)
|
|
2592
2601
|
return Promise.resolve(M(this._bodyArrayBuffer));
|
|
2593
2602
|
if (this._bodyFormData)
|
|
2594
2603
|
throw new Error("could not read FormData body as text");
|
|
2595
2604
|
return Promise.resolve(this._bodyText);
|
|
2596
2605
|
}, l.formData && (this.formData = function() {
|
|
2597
|
-
return this.text().then(
|
|
2606
|
+
return this.text().then($);
|
|
2598
2607
|
}), this.json = function() {
|
|
2599
2608
|
return this.text().then(JSON.parse);
|
|
2600
2609
|
}, this;
|
|
2601
2610
|
}
|
|
2602
|
-
var
|
|
2611
|
+
var F = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
|
|
2603
2612
|
function V(c) {
|
|
2604
2613
|
var y = c.toUpperCase();
|
|
2605
|
-
return
|
|
2614
|
+
return F.indexOf(y) > -1 ? y : c;
|
|
2606
2615
|
}
|
|
2607
|
-
function
|
|
2608
|
-
if (!(this instanceof
|
|
2616
|
+
function A(c, y) {
|
|
2617
|
+
if (!(this instanceof A))
|
|
2609
2618
|
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
2610
2619
|
y = y || {};
|
|
2611
2620
|
var T = y.body;
|
|
2612
|
-
if (c instanceof
|
|
2621
|
+
if (c instanceof A) {
|
|
2613
2622
|
if (c.bodyUsed)
|
|
2614
2623
|
throw new TypeError("Already read");
|
|
2615
2624
|
this.url = c.url, this.credentials = c.credentials, y.headers || (this.headers = new S(c.headers)), this.method = c.method, this.mode = c.mode, this.signal = c.signal, !T && c._bodyInit != null && (T = c._bodyInit, c.bodyUsed = !0);
|
|
@@ -2617,8 +2626,8 @@ function Jr() {
|
|
|
2617
2626
|
this.url = String(c);
|
|
2618
2627
|
if (this.credentials = y.credentials || this.credentials || "same-origin", (y.headers || !this.headers) && (this.headers = new S(y.headers)), this.method = V(y.method || this.method || "GET"), this.mode = y.mode || this.mode || null, this.signal = y.signal || this.signal || (function() {
|
|
2619
2628
|
if ("AbortController" in a) {
|
|
2620
|
-
var
|
|
2621
|
-
return
|
|
2629
|
+
var E = new AbortController();
|
|
2630
|
+
return E.signal;
|
|
2622
2631
|
}
|
|
2623
2632
|
})(), this.referrer = null, (this.method === "GET" || this.method === "HEAD") && T)
|
|
2624
2633
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
@@ -2632,59 +2641,59 @@ function Jr() {
|
|
|
2632
2641
|
}
|
|
2633
2642
|
}
|
|
2634
2643
|
}
|
|
2635
|
-
|
|
2636
|
-
return new
|
|
2644
|
+
A.prototype.clone = function() {
|
|
2645
|
+
return new A(this, { body: this._bodyInit });
|
|
2637
2646
|
};
|
|
2638
|
-
function
|
|
2647
|
+
function $(c) {
|
|
2639
2648
|
var y = new FormData();
|
|
2640
2649
|
return c.trim().split("&").forEach(function(T) {
|
|
2641
2650
|
if (T) {
|
|
2642
|
-
var P = T.split("="), C = P.shift().replace(/\+/g, " "),
|
|
2643
|
-
y.append(decodeURIComponent(C), decodeURIComponent(
|
|
2651
|
+
var P = T.split("="), C = P.shift().replace(/\+/g, " "), E = P.join("=").replace(/\+/g, " ");
|
|
2652
|
+
y.append(decodeURIComponent(C), decodeURIComponent(E));
|
|
2644
2653
|
}
|
|
2645
2654
|
}), y;
|
|
2646
2655
|
}
|
|
2647
|
-
function
|
|
2656
|
+
function q(c) {
|
|
2648
2657
|
var y = new S(), T = c.replace(/\r?\n[\t ]+/g, " ");
|
|
2649
2658
|
return T.split("\r").map(function(P) {
|
|
2650
2659
|
return P.indexOf(`
|
|
2651
2660
|
`) === 0 ? P.substr(1, P.length) : P;
|
|
2652
2661
|
}).forEach(function(P) {
|
|
2653
|
-
var C = P.split(":"),
|
|
2654
|
-
if (
|
|
2655
|
-
var
|
|
2662
|
+
var C = P.split(":"), E = C.shift().trim();
|
|
2663
|
+
if (E) {
|
|
2664
|
+
var j = C.join(":").trim();
|
|
2656
2665
|
try {
|
|
2657
|
-
y.append(
|
|
2658
|
-
} catch (
|
|
2659
|
-
console.warn("Response " +
|
|
2666
|
+
y.append(E, j);
|
|
2667
|
+
} catch (I) {
|
|
2668
|
+
console.warn("Response " + I.message);
|
|
2660
2669
|
}
|
|
2661
2670
|
}
|
|
2662
2671
|
}), y;
|
|
2663
2672
|
}
|
|
2664
|
-
k.call(
|
|
2665
|
-
function
|
|
2666
|
-
if (!(this instanceof
|
|
2673
|
+
k.call(A.prototype);
|
|
2674
|
+
function R(c, y) {
|
|
2675
|
+
if (!(this instanceof R))
|
|
2667
2676
|
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
2668
2677
|
if (y || (y = {}), this.type = "default", this.status = y.status === void 0 ? 200 : y.status, this.status < 200 || this.status > 599)
|
|
2669
2678
|
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
|
|
2670
2679
|
this.ok = this.status >= 200 && this.status < 300, this.statusText = y.statusText === void 0 ? "" : "" + y.statusText, this.headers = new S(y.headers), this.url = y.url || "", this._initBody(c);
|
|
2671
2680
|
}
|
|
2672
|
-
k.call(
|
|
2673
|
-
return new
|
|
2681
|
+
k.call(R.prototype), R.prototype.clone = function() {
|
|
2682
|
+
return new R(this._bodyInit, {
|
|
2674
2683
|
status: this.status,
|
|
2675
2684
|
statusText: this.statusText,
|
|
2676
2685
|
headers: new S(this.headers),
|
|
2677
2686
|
url: this.url
|
|
2678
2687
|
});
|
|
2679
|
-
},
|
|
2680
|
-
var c = new
|
|
2688
|
+
}, R.error = function() {
|
|
2689
|
+
var c = new R(null, { status: 200, statusText: "" });
|
|
2681
2690
|
return c.ok = !1, c.status = 0, c.type = "error", c;
|
|
2682
2691
|
};
|
|
2683
|
-
var
|
|
2684
|
-
|
|
2685
|
-
if (
|
|
2692
|
+
var _ = [301, 302, 303, 307, 308];
|
|
2693
|
+
R.redirect = function(c, y) {
|
|
2694
|
+
if (_.indexOf(y) === -1)
|
|
2686
2695
|
throw new RangeError("Invalid status code");
|
|
2687
|
-
return new
|
|
2696
|
+
return new R(null, { status: y, headers: { location: c } });
|
|
2688
2697
|
}, i.DOMException = a.DOMException;
|
|
2689
2698
|
try {
|
|
2690
2699
|
new i.DOMException();
|
|
@@ -2697,90 +2706,90 @@ function Jr() {
|
|
|
2697
2706
|
}
|
|
2698
2707
|
function O(c, y) {
|
|
2699
2708
|
return new Promise(function(T, P) {
|
|
2700
|
-
var C = new
|
|
2709
|
+
var C = new A(c, y);
|
|
2701
2710
|
if (C.signal && C.signal.aborted)
|
|
2702
2711
|
return P(new i.DOMException("Aborted", "AbortError"));
|
|
2703
|
-
var
|
|
2704
|
-
function
|
|
2705
|
-
|
|
2712
|
+
var E = new XMLHttpRequest();
|
|
2713
|
+
function j() {
|
|
2714
|
+
E.abort();
|
|
2706
2715
|
}
|
|
2707
|
-
|
|
2716
|
+
E.onload = function() {
|
|
2708
2717
|
var U = {
|
|
2709
|
-
statusText:
|
|
2710
|
-
headers:
|
|
2718
|
+
statusText: E.statusText,
|
|
2719
|
+
headers: q(E.getAllResponseHeaders() || "")
|
|
2711
2720
|
};
|
|
2712
|
-
C.url.indexOf("file://") === 0 && (
|
|
2713
|
-
var
|
|
2721
|
+
C.url.indexOf("file://") === 0 && (E.status < 200 || E.status > 599) ? U.status = 200 : U.status = E.status, U.url = "responseURL" in E ? E.responseURL : U.headers.get("X-Request-URL");
|
|
2722
|
+
var Z = "response" in E ? E.response : E.responseText;
|
|
2714
2723
|
setTimeout(function() {
|
|
2715
|
-
T(new
|
|
2724
|
+
T(new R(Z, U));
|
|
2716
2725
|
}, 0);
|
|
2717
|
-
},
|
|
2726
|
+
}, E.onerror = function() {
|
|
2718
2727
|
setTimeout(function() {
|
|
2719
2728
|
P(new TypeError("Network request failed"));
|
|
2720
2729
|
}, 0);
|
|
2721
|
-
},
|
|
2730
|
+
}, E.ontimeout = function() {
|
|
2722
2731
|
setTimeout(function() {
|
|
2723
2732
|
P(new TypeError("Network request timed out"));
|
|
2724
2733
|
}, 0);
|
|
2725
|
-
},
|
|
2734
|
+
}, E.onabort = function() {
|
|
2726
2735
|
setTimeout(function() {
|
|
2727
2736
|
P(new i.DOMException("Aborted", "AbortError"));
|
|
2728
2737
|
}, 0);
|
|
2729
2738
|
};
|
|
2730
|
-
function
|
|
2739
|
+
function I(U) {
|
|
2731
2740
|
try {
|
|
2732
2741
|
return U === "" && a.location.href ? a.location.href : U;
|
|
2733
2742
|
} catch {
|
|
2734
2743
|
return U;
|
|
2735
2744
|
}
|
|
2736
2745
|
}
|
|
2737
|
-
if (
|
|
2746
|
+
if (E.open(C.method, I(C.url), !0), C.credentials === "include" ? E.withCredentials = !0 : C.credentials === "omit" && (E.withCredentials = !1), "responseType" in E && (l.blob ? E.responseType = "blob" : l.arrayBuffer && (E.responseType = "arraybuffer")), y && typeof y.headers == "object" && !(y.headers instanceof S || a.Headers && y.headers instanceof a.Headers)) {
|
|
2738
2747
|
var N = [];
|
|
2739
2748
|
Object.getOwnPropertyNames(y.headers).forEach(function(U) {
|
|
2740
|
-
N.push(b(U)),
|
|
2741
|
-
}), C.headers.forEach(function(U,
|
|
2742
|
-
N.indexOf(
|
|
2749
|
+
N.push(b(U)), E.setRequestHeader(U, f(y.headers[U]));
|
|
2750
|
+
}), C.headers.forEach(function(U, Z) {
|
|
2751
|
+
N.indexOf(Z) === -1 && E.setRequestHeader(Z, U);
|
|
2743
2752
|
});
|
|
2744
2753
|
} else
|
|
2745
|
-
C.headers.forEach(function(U,
|
|
2746
|
-
|
|
2754
|
+
C.headers.forEach(function(U, Z) {
|
|
2755
|
+
E.setRequestHeader(Z, U);
|
|
2747
2756
|
});
|
|
2748
|
-
C.signal && (C.signal.addEventListener("abort",
|
|
2749
|
-
|
|
2750
|
-
}),
|
|
2757
|
+
C.signal && (C.signal.addEventListener("abort", j), E.onreadystatechange = function() {
|
|
2758
|
+
E.readyState === 4 && C.signal.removeEventListener("abort", j);
|
|
2759
|
+
}), E.send(typeof C._bodyInit > "u" ? null : C._bodyInit);
|
|
2751
2760
|
});
|
|
2752
2761
|
}
|
|
2753
|
-
return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = S, a.Request =
|
|
2762
|
+
return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = S, a.Request = A, a.Response = R), i.Headers = S, i.Request = A, i.Response = R, i.fetch = O, i;
|
|
2754
2763
|
})({});
|
|
2755
2764
|
})(n), n.fetch.ponyfill = !0, delete n.fetch.polyfill;
|
|
2756
|
-
var
|
|
2757
|
-
e =
|
|
2758
|
-
})(
|
|
2765
|
+
var r = t.fetch ? t : n;
|
|
2766
|
+
e = r.fetch, e.default = r.fetch, e.fetch = r.fetch, e.Headers = r.Headers, e.Request = r.Request, e.Response = r.Response, s.exports = e;
|
|
2767
|
+
})(Le, Le.exports)), Le.exports;
|
|
2759
2768
|
}
|
|
2760
|
-
var
|
|
2761
|
-
const
|
|
2769
|
+
var Js = Ys();
|
|
2770
|
+
const Qs = /* @__PURE__ */ Et(Js), We = "https://gcp-us-east1.api.carto.com", Ke = "v3", Xs = "ps", be = {
|
|
2762
2771
|
get: "GET",
|
|
2763
2772
|
post: "POST"
|
|
2764
2773
|
};
|
|
2765
|
-
function
|
|
2766
|
-
return Array.isArray(e) ? `${
|
|
2774
|
+
function er(s, e) {
|
|
2775
|
+
return Array.isArray(e) ? `${s}=${encodeURIComponent(JSON.stringify(e))}` : e == null || e === "" ? "" : typeof e == "object" ? `${s}=${encodeURIComponent(JSON.stringify(e))}` : `${s}=${encodeURIComponent(e)}`;
|
|
2767
2776
|
}
|
|
2768
|
-
function
|
|
2769
|
-
params:
|
|
2777
|
+
function tr({
|
|
2778
|
+
params: s,
|
|
2770
2779
|
url: e
|
|
2771
2780
|
}) {
|
|
2772
|
-
if (!
|
|
2773
|
-
const t = Object.entries(
|
|
2781
|
+
if (!s) return e;
|
|
2782
|
+
const t = Object.entries(s).map(([n, r]) => er(n, r));
|
|
2774
2783
|
return `${e}?${t.filter(Boolean).join("&")}`;
|
|
2775
2784
|
}
|
|
2776
|
-
function
|
|
2777
|
-
return
|
|
2785
|
+
function nr(s) {
|
|
2786
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
2778
2787
|
}
|
|
2779
|
-
var
|
|
2780
|
-
function
|
|
2781
|
-
if (dt) return
|
|
2788
|
+
var qe, dt;
|
|
2789
|
+
function sr() {
|
|
2790
|
+
if (dt) return qe;
|
|
2782
2791
|
dt = 1;
|
|
2783
|
-
var
|
|
2792
|
+
var s = function(u) {
|
|
2784
2793
|
return e(u) && !t(u);
|
|
2785
2794
|
};
|
|
2786
2795
|
function e(u) {
|
|
@@ -2790,9 +2799,9 @@ function ss() {
|
|
|
2790
2799
|
var p = Object.prototype.toString.call(u);
|
|
2791
2800
|
return p === "[object RegExp]" || p === "[object Date]" || o(u);
|
|
2792
2801
|
}
|
|
2793
|
-
var n = typeof Symbol == "function" && Symbol.for,
|
|
2802
|
+
var n = typeof Symbol == "function" && Symbol.for, r = n ? Symbol.for("react.element") : 60103;
|
|
2794
2803
|
function o(u) {
|
|
2795
|
-
return u.$$typeof ===
|
|
2804
|
+
return u.$$typeof === r;
|
|
2796
2805
|
}
|
|
2797
2806
|
function i(u) {
|
|
2798
2807
|
return Array.isArray(u) ? [] : {};
|
|
@@ -2800,22 +2809,22 @@ function ss() {
|
|
|
2800
2809
|
function a(u, p) {
|
|
2801
2810
|
return p.clone !== !1 && p.isMergeableObject(u) ? S(i(u), u, p) : u;
|
|
2802
2811
|
}
|
|
2803
|
-
function l(u, p,
|
|
2812
|
+
function l(u, p, g) {
|
|
2804
2813
|
return u.concat(p).map(function(M) {
|
|
2805
|
-
return a(M,
|
|
2814
|
+
return a(M, g);
|
|
2806
2815
|
});
|
|
2807
2816
|
}
|
|
2808
2817
|
function d(u, p) {
|
|
2809
2818
|
if (!p.customMerge) return S;
|
|
2810
|
-
var
|
|
2811
|
-
return typeof
|
|
2819
|
+
var g = p.customMerge(u);
|
|
2820
|
+
return typeof g == "function" ? g : S;
|
|
2812
2821
|
}
|
|
2813
2822
|
function m(u) {
|
|
2814
2823
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(u).filter(function(p) {
|
|
2815
2824
|
return Object.propertyIsEnumerable.call(u, p);
|
|
2816
2825
|
}) : [];
|
|
2817
2826
|
}
|
|
2818
|
-
function
|
|
2827
|
+
function h(u) {
|
|
2819
2828
|
return Object.keys(u).concat(m(u));
|
|
2820
2829
|
}
|
|
2821
2830
|
function b(u, p) {
|
|
@@ -2828,140 +2837,140 @@ function ss() {
|
|
|
2828
2837
|
function f(u, p) {
|
|
2829
2838
|
return b(u, p) && !(Object.hasOwnProperty.call(u, p) && Object.propertyIsEnumerable.call(u, p));
|
|
2830
2839
|
}
|
|
2831
|
-
function w(u, p,
|
|
2840
|
+
function w(u, p, g) {
|
|
2832
2841
|
var M = {};
|
|
2833
|
-
return
|
|
2834
|
-
M[v] = a(u[v],
|
|
2835
|
-
}),
|
|
2836
|
-
f(u, v) || (b(u, v) &&
|
|
2842
|
+
return g.isMergeableObject(u) && h(u).forEach(function(v) {
|
|
2843
|
+
M[v] = a(u[v], g);
|
|
2844
|
+
}), h(p).forEach(function(v) {
|
|
2845
|
+
f(u, v) || (b(u, v) && g.isMergeableObject(p[v]) ? M[v] = d(v, g)(u[v], p[v], g) : M[v] = a(p[v], g));
|
|
2837
2846
|
}), M;
|
|
2838
2847
|
}
|
|
2839
|
-
function S(u, p,
|
|
2840
|
-
|
|
2848
|
+
function S(u, p, g) {
|
|
2849
|
+
g = g || {}, g.arrayMerge = g.arrayMerge || l, g.isMergeableObject = g.isMergeableObject || s, g.cloneUnlessOtherwiseSpecified = a;
|
|
2841
2850
|
var M = Array.isArray(p), v = Array.isArray(u), k = M === v;
|
|
2842
|
-
return k ? M ?
|
|
2851
|
+
return k ? M ? g.arrayMerge(u, p, g) : w(u, p, g) : a(p, g);
|
|
2843
2852
|
}
|
|
2844
2853
|
S.all = function(u, p) {
|
|
2845
2854
|
if (!Array.isArray(u)) throw new Error("first argument should be an array");
|
|
2846
|
-
return u.reduce(function(
|
|
2847
|
-
return S(
|
|
2855
|
+
return u.reduce(function(g, M) {
|
|
2856
|
+
return S(g, M, p);
|
|
2848
2857
|
}, {});
|
|
2849
2858
|
};
|
|
2850
2859
|
var L = S;
|
|
2851
|
-
return
|
|
2860
|
+
return qe = L, qe;
|
|
2852
2861
|
}
|
|
2853
|
-
var
|
|
2854
|
-
const Ye = /* @__PURE__ */
|
|
2855
|
-
function ft(
|
|
2862
|
+
var rr = sr();
|
|
2863
|
+
const Ye = /* @__PURE__ */ nr(rr);
|
|
2864
|
+
function ft(s) {
|
|
2856
2865
|
return Ye({
|
|
2857
|
-
method:
|
|
2866
|
+
method: be.get,
|
|
2858
2867
|
headers: {
|
|
2859
2868
|
Accept: "application/json"
|
|
2860
2869
|
}
|
|
2861
|
-
},
|
|
2870
|
+
}, s);
|
|
2862
2871
|
}
|
|
2863
|
-
function Be(
|
|
2872
|
+
function Be(s, e) {
|
|
2864
2873
|
return Ye({
|
|
2865
|
-
method:
|
|
2874
|
+
method: be.post,
|
|
2866
2875
|
headers: {
|
|
2867
2876
|
Accept: "application/json",
|
|
2868
2877
|
"Content-Type": "application/json"
|
|
2869
2878
|
},
|
|
2870
2879
|
body: JSON.stringify(e)
|
|
2871
|
-
},
|
|
2880
|
+
}, s);
|
|
2872
2881
|
}
|
|
2873
|
-
const
|
|
2882
|
+
const or = {
|
|
2874
2883
|
GET: ft,
|
|
2875
2884
|
POST: Be,
|
|
2876
2885
|
PUT: Be,
|
|
2877
2886
|
PATCH: Be,
|
|
2878
2887
|
DELETE: ft
|
|
2879
2888
|
};
|
|
2880
|
-
function
|
|
2881
|
-
body:
|
|
2889
|
+
function ir({
|
|
2890
|
+
body: s,
|
|
2882
2891
|
accessToken: e,
|
|
2883
2892
|
method: t,
|
|
2884
2893
|
...n
|
|
2885
2894
|
}) {
|
|
2886
|
-
let
|
|
2887
|
-
return
|
|
2895
|
+
let r = e;
|
|
2896
|
+
return r && !r.includes("Bearer") && (r = "Bearer " + r), or[t](Ye({
|
|
2888
2897
|
method: t,
|
|
2889
2898
|
headers: {
|
|
2890
|
-
...!!
|
|
2891
|
-
authorization:
|
|
2899
|
+
...!!r && {
|
|
2900
|
+
authorization: r
|
|
2892
2901
|
}
|
|
2893
2902
|
}
|
|
2894
|
-
}, n),
|
|
2903
|
+
}, n), s);
|
|
2895
2904
|
}
|
|
2896
|
-
const
|
|
2905
|
+
const ar = 6144;
|
|
2897
2906
|
async function $t({
|
|
2898
|
-
signal:
|
|
2907
|
+
signal: s,
|
|
2899
2908
|
body: e,
|
|
2900
2909
|
accessToken: t,
|
|
2901
2910
|
credentials: n,
|
|
2902
|
-
method:
|
|
2911
|
+
method: r = be.get,
|
|
2903
2912
|
params: o,
|
|
2904
2913
|
url: i,
|
|
2905
2914
|
requestOptions: {
|
|
2906
2915
|
getMaxUrlLength: a
|
|
2907
2916
|
} = {
|
|
2908
|
-
getMaxUrlLength:
|
|
2917
|
+
getMaxUrlLength: ar
|
|
2909
2918
|
},
|
|
2910
2919
|
...l
|
|
2911
2920
|
}) {
|
|
2912
|
-
let d =
|
|
2921
|
+
let d = tr({
|
|
2913
2922
|
url: i,
|
|
2914
2923
|
params: o
|
|
2915
|
-
}), m = e,
|
|
2916
|
-
|
|
2917
|
-
const b =
|
|
2924
|
+
}), m = e, h = r;
|
|
2925
|
+
r === be.get && d.length > a && (m = o, h = be.post, d = i);
|
|
2926
|
+
const b = ir({
|
|
2918
2927
|
body: m,
|
|
2919
2928
|
accessToken: t ?? n?.accessToken,
|
|
2920
|
-
method:
|
|
2929
|
+
method: h,
|
|
2921
2930
|
...l
|
|
2922
2931
|
});
|
|
2923
|
-
|
|
2924
|
-
const f = await
|
|
2932
|
+
s && (b.signal = s);
|
|
2933
|
+
const f = await Qs(d, b);
|
|
2925
2934
|
if (!f.ok) {
|
|
2926
2935
|
const w = await f.text();
|
|
2927
2936
|
throw new Error(w);
|
|
2928
2937
|
}
|
|
2929
2938
|
return f.status === 204 ? Promise.resolve() : await f.json();
|
|
2930
2939
|
}
|
|
2931
|
-
const
|
|
2940
|
+
const Pe = ht()(Mn((s, e) => ({
|
|
2932
2941
|
sources: {},
|
|
2933
2942
|
filters: {},
|
|
2934
|
-
setSource: (t, n) =>
|
|
2943
|
+
setSource: (t, n) => s((r) => {
|
|
2935
2944
|
const o = {
|
|
2936
|
-
...
|
|
2945
|
+
...r.sources
|
|
2937
2946
|
}, i = o[t]?.widgets;
|
|
2938
2947
|
i && (i.destroy(), delete o[t].widgets);
|
|
2939
2948
|
const a = o[t], l = {
|
|
2940
2949
|
apiBaseUrl: We,
|
|
2941
|
-
clientId:
|
|
2950
|
+
clientId: Xs,
|
|
2942
2951
|
apiVersion: Ke,
|
|
2943
2952
|
...a,
|
|
2944
2953
|
...n
|
|
2945
2954
|
};
|
|
2946
|
-
return l.widgets =
|
|
2955
|
+
return l.widgets = dr({
|
|
2947
2956
|
source: l
|
|
2948
2957
|
}), o[t] = l, {
|
|
2949
2958
|
sources: o
|
|
2950
2959
|
};
|
|
2951
2960
|
}, void 0, "setSource"),
|
|
2952
|
-
removeSource: (t) =>
|
|
2953
|
-
const
|
|
2961
|
+
removeSource: (t) => s((n) => {
|
|
2962
|
+
const r = {
|
|
2954
2963
|
...n.sources
|
|
2955
|
-
}, o =
|
|
2956
|
-
return o && (o.destroy(), delete
|
|
2957
|
-
sources:
|
|
2964
|
+
}, o = r[t]?.widgets;
|
|
2965
|
+
return o && (o.destroy(), delete r[t].widgets), delete r[t], {
|
|
2966
|
+
sources: r
|
|
2958
2967
|
};
|
|
2959
2968
|
}, void 0, "removeSource"),
|
|
2960
|
-
setFilters: (t, n) =>
|
|
2961
|
-
const o =
|
|
2969
|
+
setFilters: (t, n) => s((r) => {
|
|
2970
|
+
const o = r.filters[t] ?? {}, i = n.reduce((a, l) => Ge(a, l), o);
|
|
2962
2971
|
return {
|
|
2963
2972
|
filters: {
|
|
2964
|
-
...
|
|
2973
|
+
...r.filters,
|
|
2965
2974
|
[t]: {
|
|
2966
2975
|
...i
|
|
2967
2976
|
}
|
|
@@ -2969,14 +2978,14 @@ const ke = ht()(Mn((r, e) => ({
|
|
|
2969
2978
|
}
|
|
2970
2979
|
};
|
|
2971
2980
|
}, void 0, "setFilters"),
|
|
2972
|
-
removeFilters: (t, n,
|
|
2981
|
+
removeFilters: (t, n, r) => s((o) => {
|
|
2973
2982
|
const i = o.filters[t] ?? {};
|
|
2974
2983
|
if (!i)
|
|
2975
2984
|
return o;
|
|
2976
2985
|
let a = {};
|
|
2977
2986
|
return n && (a = mn(i, {
|
|
2978
2987
|
column: n,
|
|
2979
|
-
owner:
|
|
2988
|
+
owner: r
|
|
2980
2989
|
})), {
|
|
2981
2990
|
filters: {
|
|
2982
2991
|
...o.filters,
|
|
@@ -2989,12 +2998,12 @@ const ke = ht()(Mn((r, e) => ({
|
|
|
2989
2998
|
}, void 0, "removeFilters"),
|
|
2990
2999
|
invalidateSourcesCache: (t, {
|
|
2991
3000
|
timeout: n = 500,
|
|
2992
|
-
maxAge:
|
|
3001
|
+
maxAge: r = 10
|
|
2993
3002
|
} = {}) => {
|
|
2994
3003
|
t.forEach((o) => {
|
|
2995
3004
|
e().setSource(o, {
|
|
2996
3005
|
headers: {
|
|
2997
|
-
"Cache-Control": `no-cache, max-age=${
|
|
3006
|
+
"Cache-Control": `no-cache, max-age=${r}`
|
|
2998
3007
|
}
|
|
2999
3008
|
});
|
|
3000
3009
|
}), setTimeout(() => {
|
|
@@ -3005,24 +3014,24 @@ const ke = ht()(Mn((r, e) => ({
|
|
|
3005
3014
|
}, n);
|
|
3006
3015
|
}
|
|
3007
3016
|
})));
|
|
3008
|
-
function
|
|
3009
|
-
const e =
|
|
3017
|
+
function lr(s) {
|
|
3018
|
+
const e = B(2);
|
|
3010
3019
|
let t;
|
|
3011
|
-
return e[0] !==
|
|
3020
|
+
return e[0] !== s ? (t = (n) => n.sources[s], e[0] = s, e[1] = t) : t = e[1], Pe(t);
|
|
3012
3021
|
}
|
|
3013
|
-
function
|
|
3014
|
-
const e =
|
|
3022
|
+
function cr(s) {
|
|
3023
|
+
const e = B(2);
|
|
3015
3024
|
let t;
|
|
3016
|
-
return e[0] !==
|
|
3025
|
+
return e[0] !== s ? (t = (n) => n.filters[s], e[0] = s, e[1] = t) : t = e[1], Pe(t);
|
|
3017
3026
|
}
|
|
3018
|
-
function
|
|
3019
|
-
const e =
|
|
3027
|
+
function fo(s) {
|
|
3028
|
+
const e = B(9);
|
|
3020
3029
|
let t;
|
|
3021
|
-
e[0] !==
|
|
3022
|
-
const n =
|
|
3023
|
-
let
|
|
3024
|
-
e[2] !==
|
|
3025
|
-
const o =
|
|
3030
|
+
e[0] !== s ? (t = (a) => a.sources[s], e[0] = s, e[1] = t) : t = e[1];
|
|
3031
|
+
const n = Pe(t);
|
|
3032
|
+
let r;
|
|
3033
|
+
e[2] !== s ? (r = (a) => a.filters[s], e[2] = s, e[3] = r) : r = e[3];
|
|
3034
|
+
const o = Pe(r);
|
|
3026
3035
|
let i;
|
|
3027
3036
|
e: {
|
|
3028
3037
|
if (!n) {
|
|
@@ -3039,28 +3048,28 @@ function po(r) {
|
|
|
3039
3048
|
}
|
|
3040
3049
|
return i;
|
|
3041
3050
|
}
|
|
3042
|
-
function
|
|
3051
|
+
function po(s, {
|
|
3043
3052
|
column: e,
|
|
3044
3053
|
type: t
|
|
3045
3054
|
}) {
|
|
3046
|
-
return
|
|
3055
|
+
return s?.[e]?.[t]?.values ?? [];
|
|
3047
3056
|
}
|
|
3048
|
-
function
|
|
3049
|
-
const [, e] =
|
|
3057
|
+
function ur(s) {
|
|
3058
|
+
const [, e] = s.type.split("+", 2);
|
|
3050
3059
|
return {
|
|
3051
|
-
spatialDataType:
|
|
3052
|
-
spatialDataColumn:
|
|
3060
|
+
spatialDataType: s.spatialDataType ?? e ?? "geo",
|
|
3061
|
+
spatialDataColumn: s.spatialDataColumn ?? e ?? "geom"
|
|
3053
3062
|
};
|
|
3054
3063
|
}
|
|
3055
|
-
function
|
|
3056
|
-
source:
|
|
3064
|
+
function dr({
|
|
3065
|
+
source: s
|
|
3057
3066
|
}) {
|
|
3058
3067
|
const {
|
|
3059
3068
|
spatialDataType: e,
|
|
3060
3069
|
spatialDataColumn: t
|
|
3061
|
-
} =
|
|
3070
|
+
} = ur(s), n = {
|
|
3062
3071
|
query: () => {
|
|
3063
|
-
const i =
|
|
3072
|
+
const i = s;
|
|
3064
3073
|
return new Sn({
|
|
3065
3074
|
...i,
|
|
3066
3075
|
accessToken: "",
|
|
@@ -3070,7 +3079,7 @@ function fs({
|
|
|
3070
3079
|
});
|
|
3071
3080
|
},
|
|
3072
3081
|
table: () => {
|
|
3073
|
-
const i =
|
|
3082
|
+
const i = s;
|
|
3074
3083
|
return new bn({
|
|
3075
3084
|
...i,
|
|
3076
3085
|
accessToken: "",
|
|
@@ -3080,7 +3089,7 @@ function fs({
|
|
|
3080
3089
|
});
|
|
3081
3090
|
},
|
|
3082
3091
|
tileset: () => {
|
|
3083
|
-
const i =
|
|
3092
|
+
const i = s;
|
|
3084
3093
|
return i.spatialDataBounds ? new hn({
|
|
3085
3094
|
...i,
|
|
3086
3095
|
accessToken: "",
|
|
@@ -3092,7 +3101,7 @@ function fs({
|
|
|
3092
3101
|
}) : null;
|
|
3093
3102
|
},
|
|
3094
3103
|
raster: () => {
|
|
3095
|
-
const i =
|
|
3104
|
+
const i = s;
|
|
3096
3105
|
return !i.rasterMetadata || !i.spatialDataBounds ? null : new yn({
|
|
3097
3106
|
...i,
|
|
3098
3107
|
accessToken: "",
|
|
@@ -3103,71 +3112,71 @@ function fs({
|
|
|
3103
3112
|
spatialDataBounds: i.spatialDataBounds
|
|
3104
3113
|
});
|
|
3105
3114
|
}
|
|
3106
|
-
},
|
|
3115
|
+
}, r = s.type.split("+")[0], o = n[r];
|
|
3107
3116
|
return o?.();
|
|
3108
3117
|
}
|
|
3109
|
-
function
|
|
3110
|
-
const t =
|
|
3111
|
-
let
|
|
3118
|
+
function fr(s, e) {
|
|
3119
|
+
const t = B(5), n = cr(s);
|
|
3120
|
+
let r;
|
|
3112
3121
|
e: {
|
|
3113
3122
|
if (!e?.length) {
|
|
3114
|
-
|
|
3123
|
+
r = n;
|
|
3115
3124
|
break e;
|
|
3116
3125
|
}
|
|
3117
3126
|
if (!n) {
|
|
3118
3127
|
let i;
|
|
3119
|
-
t[0] !== e ? (i = e.reduce(
|
|
3128
|
+
t[0] !== e ? (i = e.reduce(mr, {}), t[0] = e, t[1] = i) : i = t[1], r = i;
|
|
3120
3129
|
break e;
|
|
3121
3130
|
}
|
|
3122
3131
|
let o;
|
|
3123
3132
|
if (t[2] !== e || t[3] !== n) {
|
|
3124
|
-
const i = e.reduce(
|
|
3125
|
-
o =
|
|
3133
|
+
const i = e.reduce(pr, {});
|
|
3134
|
+
o = me(n, i), t[2] = e, t[3] = n, t[4] = o;
|
|
3126
3135
|
} else
|
|
3127
3136
|
o = t[4];
|
|
3128
|
-
|
|
3137
|
+
r = o;
|
|
3129
3138
|
}
|
|
3130
|
-
return
|
|
3139
|
+
return r;
|
|
3131
3140
|
}
|
|
3132
|
-
function
|
|
3133
|
-
return
|
|
3141
|
+
function pr(s, e) {
|
|
3142
|
+
return Ge(s, e);
|
|
3134
3143
|
}
|
|
3135
|
-
function
|
|
3136
|
-
return
|
|
3144
|
+
function mr(s, e) {
|
|
3145
|
+
return Ge(s, e);
|
|
3137
3146
|
}
|
|
3138
|
-
function
|
|
3139
|
-
const t =
|
|
3140
|
-
return
|
|
3147
|
+
function yr(s, e) {
|
|
3148
|
+
const t = lr(e);
|
|
3149
|
+
return ge(() => {
|
|
3141
3150
|
const n = t?.widgets;
|
|
3142
|
-
return !n || !
|
|
3143
|
-
}, [
|
|
3151
|
+
return !n || !s ? null : (n.props.accessToken = s, n);
|
|
3152
|
+
}, [s, t]);
|
|
3144
3153
|
}
|
|
3145
|
-
const
|
|
3146
|
-
function
|
|
3147
|
-
if (!
|
|
3154
|
+
const hr = ["authorization", "cache-control"];
|
|
3155
|
+
function gr(s) {
|
|
3156
|
+
if (!s || typeof s != "object")
|
|
3148
3157
|
return "";
|
|
3149
3158
|
const e = {};
|
|
3150
|
-
for (const [t, n] of Object.entries(
|
|
3151
|
-
const
|
|
3152
|
-
|
|
3159
|
+
for (const [t, n] of Object.entries(s)) {
|
|
3160
|
+
const r = t.toLowerCase();
|
|
3161
|
+
hr.includes(r) && (e[r] = n);
|
|
3153
3162
|
}
|
|
3154
3163
|
return Object.keys(e).length > 0 ? JSON.stringify(e) : "";
|
|
3155
3164
|
}
|
|
3156
|
-
function
|
|
3157
|
-
const e =
|
|
3165
|
+
function br(s) {
|
|
3166
|
+
const e = B(12), {
|
|
3158
3167
|
accessToken: t,
|
|
3159
3168
|
sourceId: n,
|
|
3160
|
-
widgetProps:
|
|
3169
|
+
widgetProps: r,
|
|
3161
3170
|
additionalFilter: o
|
|
3162
|
-
} =
|
|
3171
|
+
} = s, i = fr(n, o), a = yr(t, n);
|
|
3163
3172
|
let l;
|
|
3164
|
-
if (e[0] !== t || e[1] !== i || e[2] !== n || e[3] !== a || e[4] !==
|
|
3165
|
-
l = [n,
|
|
3166
|
-
const
|
|
3173
|
+
if (e[0] !== t || e[1] !== i || e[2] !== n || e[3] !== a || e[4] !== r) {
|
|
3174
|
+
l = [n, r], a?.props && "queryParameters" in a.props && a.props.queryParameters && l.push(a.props.queryParameters), i && l.push(i);
|
|
3175
|
+
const h = a?.props.headers;
|
|
3167
3176
|
let b;
|
|
3168
|
-
e[6] !==
|
|
3177
|
+
e[6] !== h ? (b = gr(h), e[6] = h, e[7] = b) : b = e[7];
|
|
3169
3178
|
const f = b;
|
|
3170
|
-
f && l.push(f), l.push(t), e[0] = t, e[1] = i, e[2] = n, e[3] = a, e[4] =
|
|
3179
|
+
f && l.push(f), l.push(t), e[0] = t, e[1] = i, e[2] = n, e[3] = a, e[4] = r, e[5] = l;
|
|
3171
3180
|
} else
|
|
3172
3181
|
l = e[5];
|
|
3173
3182
|
const d = l;
|
|
@@ -3178,25 +3187,25 @@ function Ss(r) {
|
|
|
3178
3187
|
queryKey: d
|
|
3179
3188
|
}, e[8] = i, e[9] = d, e[10] = a, e[11] = m) : m = e[11], m;
|
|
3180
3189
|
}
|
|
3181
|
-
function
|
|
3182
|
-
queryKeyPrefix:
|
|
3190
|
+
function de({
|
|
3191
|
+
queryKeyPrefix: s,
|
|
3183
3192
|
getWidgetMethod: e
|
|
3184
3193
|
}) {
|
|
3185
|
-
const t = (
|
|
3186
|
-
const o =
|
|
3194
|
+
const t = (r) => {
|
|
3195
|
+
const o = B(21), {
|
|
3187
3196
|
accessToken: i,
|
|
3188
3197
|
sourceId: a,
|
|
3189
3198
|
widgetProps: l,
|
|
3190
3199
|
additionalFilter: d,
|
|
3191
3200
|
useQueryProps: m
|
|
3192
|
-
} =
|
|
3193
|
-
let
|
|
3194
|
-
o[0] !== m ? (
|
|
3201
|
+
} = r;
|
|
3202
|
+
let h;
|
|
3203
|
+
o[0] !== m ? (h = m === void 0 ? {} : m, o[0] = m, o[1] = h) : h = o[1];
|
|
3195
3204
|
let b, f;
|
|
3196
|
-
o[2] !==
|
|
3205
|
+
o[2] !== h ? ({
|
|
3197
3206
|
enabled: b,
|
|
3198
3207
|
...f
|
|
3199
|
-
} =
|
|
3208
|
+
} = h, o[2] = h, o[3] = b, o[4] = f) : (b = o[3], f = o[4]);
|
|
3200
3209
|
const w = b === void 0 ? !0 : b;
|
|
3201
3210
|
let S;
|
|
3202
3211
|
o[5] !== i || o[6] !== d || o[7] !== a || o[8] !== l ? (S = {
|
|
@@ -3209,14 +3218,14 @@ function le({
|
|
|
3209
3218
|
mergedFilters: L,
|
|
3210
3219
|
queryKey: u,
|
|
3211
3220
|
widgetModel: p
|
|
3212
|
-
} =
|
|
3213
|
-
let
|
|
3214
|
-
o[10] !== u ? (
|
|
3221
|
+
} = br(S);
|
|
3222
|
+
let g;
|
|
3223
|
+
o[10] !== u ? (g = [...s, ...u], o[10] = u, o[11] = g) : g = o[11];
|
|
3215
3224
|
let M;
|
|
3216
|
-
o[12] !== L || o[13] !== p || o[14] !== l ? (M = (
|
|
3225
|
+
o[12] !== L || o[13] !== p || o[14] !== l ? (M = (F) => {
|
|
3217
3226
|
const {
|
|
3218
3227
|
signal: V
|
|
3219
|
-
} =
|
|
3228
|
+
} = F;
|
|
3220
3229
|
if (!p)
|
|
3221
3230
|
throw new Error("widgetModel is not available");
|
|
3222
3231
|
return e(p)({
|
|
@@ -3227,22 +3236,22 @@ function le({
|
|
|
3227
3236
|
}, o[12] = L, o[13] = p, o[14] = l, o[15] = M) : M = o[15];
|
|
3228
3237
|
const v = !!p && w;
|
|
3229
3238
|
let k;
|
|
3230
|
-
return o[16] !==
|
|
3231
|
-
queryKey:
|
|
3239
|
+
return o[16] !== g || o[17] !== M || o[18] !== v || o[19] !== f ? (k = {
|
|
3240
|
+
queryKey: g,
|
|
3232
3241
|
queryFn: M,
|
|
3233
3242
|
enabled: v,
|
|
3234
3243
|
...f
|
|
3235
|
-
}, o[16] =
|
|
3244
|
+
}, o[16] = g, o[17] = M, o[18] = v, o[19] = f, o[20] = k) : k = o[20], _t(k);
|
|
3236
3245
|
};
|
|
3237
3246
|
return {
|
|
3238
3247
|
useModelHook: t,
|
|
3239
|
-
ModelComponent: (
|
|
3240
|
-
const o =
|
|
3248
|
+
ModelComponent: (r) => {
|
|
3249
|
+
const o = B(6);
|
|
3241
3250
|
let i, a;
|
|
3242
|
-
o[0] !==
|
|
3251
|
+
o[0] !== r ? ({
|
|
3243
3252
|
children: i,
|
|
3244
3253
|
...a
|
|
3245
|
-
} =
|
|
3254
|
+
} = r, o[0] = r, o[1] = i, o[2] = a) : (i = o[1], a = o[2]);
|
|
3246
3255
|
const l = t(a);
|
|
3247
3256
|
let d;
|
|
3248
3257
|
return o[3] !== i || o[4] !== l ? (d = i(l), o[3] = i, o[4] = l, o[5] = d) : d = o[5], d;
|
|
@@ -3250,127 +3259,127 @@ function le({
|
|
|
3250
3259
|
};
|
|
3251
3260
|
}
|
|
3252
3261
|
const {
|
|
3253
|
-
useModelHook:
|
|
3254
|
-
ModelComponent:
|
|
3255
|
-
} =
|
|
3262
|
+
useModelHook: mo,
|
|
3263
|
+
ModelComponent: yo
|
|
3264
|
+
} = de({
|
|
3256
3265
|
queryKeyPrefix: ["aggregations"],
|
|
3257
|
-
getWidgetMethod: (
|
|
3258
|
-
let t = e.aggregations.filter((
|
|
3259
|
-
e.aggregations.some((
|
|
3266
|
+
getWidgetMethod: (s) => (e) => {
|
|
3267
|
+
let t = e.aggregations.filter((r) => r.operation !== "custom");
|
|
3268
|
+
e.aggregations.some((r) => r.operation === "custom") && (t = Sr(e.aggregations).join(","));
|
|
3260
3269
|
const n = {
|
|
3261
3270
|
...e,
|
|
3262
3271
|
aggregations: t
|
|
3263
3272
|
};
|
|
3264
|
-
return
|
|
3273
|
+
return s.getAggregations(n);
|
|
3265
3274
|
}
|
|
3266
3275
|
});
|
|
3267
|
-
function
|
|
3268
|
-
return
|
|
3276
|
+
function Sr(s) {
|
|
3277
|
+
return s.map((e) => {
|
|
3269
3278
|
if (e.operation === "custom")
|
|
3270
3279
|
return `${e.aggregationExp} AS ${e.alias}`;
|
|
3271
3280
|
const {
|
|
3272
3281
|
column: t,
|
|
3273
3282
|
operation: n,
|
|
3274
|
-
alias:
|
|
3283
|
+
alias: r
|
|
3275
3284
|
} = e;
|
|
3276
3285
|
switch (n) {
|
|
3277
3286
|
case "count":
|
|
3278
|
-
return `COUNT(${t}) AS ${
|
|
3287
|
+
return `COUNT(${t}) AS ${r}`;
|
|
3279
3288
|
case "sum":
|
|
3280
|
-
return `SUM(${t}) AS ${
|
|
3289
|
+
return `SUM(${t}) AS ${r}`;
|
|
3281
3290
|
case "avg":
|
|
3282
|
-
return `AVG(${t}) AS ${
|
|
3291
|
+
return `AVG(${t}) AS ${r}`;
|
|
3283
3292
|
case "min":
|
|
3284
|
-
return `MIN(${t}) AS ${
|
|
3293
|
+
return `MIN(${t}) AS ${r}`;
|
|
3285
3294
|
case "max":
|
|
3286
|
-
return `MAX(${t}) AS ${
|
|
3295
|
+
return `MAX(${t}) AS ${r}`;
|
|
3287
3296
|
default:
|
|
3288
3297
|
throw new Error(`Unsupported aggregation operation: ${String(n)}`);
|
|
3289
3298
|
}
|
|
3290
3299
|
});
|
|
3291
3300
|
}
|
|
3292
3301
|
const {
|
|
3293
|
-
useModelHook:
|
|
3294
|
-
ModelComponent:
|
|
3295
|
-
} =
|
|
3302
|
+
useModelHook: ho,
|
|
3303
|
+
ModelComponent: go
|
|
3304
|
+
} = de({
|
|
3296
3305
|
queryKeyPrefix: ["categories"],
|
|
3297
|
-
getWidgetMethod: (
|
|
3306
|
+
getWidgetMethod: (s) => s.getCategories.bind(s)
|
|
3298
3307
|
}), {
|
|
3299
|
-
useModelHook:
|
|
3300
|
-
ModelComponent:
|
|
3301
|
-
} =
|
|
3308
|
+
useModelHook: bo,
|
|
3309
|
+
ModelComponent: So
|
|
3310
|
+
} = de({
|
|
3302
3311
|
queryKeyPrefix: ["features"],
|
|
3303
|
-
getWidgetMethod: (
|
|
3312
|
+
getWidgetMethod: (s) => s.getFeatures.bind(s)
|
|
3304
3313
|
}), {
|
|
3305
|
-
useModelHook:
|
|
3306
|
-
ModelComponent:
|
|
3307
|
-
} =
|
|
3314
|
+
useModelHook: vo,
|
|
3315
|
+
ModelComponent: wo
|
|
3316
|
+
} = de({
|
|
3308
3317
|
queryKeyPrefix: ["formula"],
|
|
3309
|
-
getWidgetMethod: (
|
|
3318
|
+
getWidgetMethod: (s) => s.getFormula.bind(s)
|
|
3310
3319
|
}), {
|
|
3311
|
-
useModelHook:
|
|
3312
|
-
ModelComponent:
|
|
3313
|
-
} =
|
|
3320
|
+
useModelHook: Mo,
|
|
3321
|
+
ModelComponent: _o
|
|
3322
|
+
} = de({
|
|
3314
3323
|
queryKeyPrefix: ["histogram"],
|
|
3315
|
-
getWidgetMethod: (
|
|
3324
|
+
getWidgetMethod: (s) => s.getHistogram.bind(s)
|
|
3316
3325
|
}), {
|
|
3317
|
-
useModelHook:
|
|
3318
|
-
ModelComponent:
|
|
3319
|
-
} =
|
|
3326
|
+
useModelHook: Eo,
|
|
3327
|
+
ModelComponent: To
|
|
3328
|
+
} = de({
|
|
3320
3329
|
queryKeyPrefix: ["range"],
|
|
3321
|
-
getWidgetMethod: (
|
|
3330
|
+
getWidgetMethod: (s) => s.getRange.bind(s)
|
|
3322
3331
|
}), {
|
|
3323
|
-
useModelHook:
|
|
3324
|
-
ModelComponent:
|
|
3325
|
-
} =
|
|
3332
|
+
useModelHook: Lo,
|
|
3333
|
+
ModelComponent: ko
|
|
3334
|
+
} = de({
|
|
3326
3335
|
queryKeyPrefix: ["scatter"],
|
|
3327
|
-
getWidgetMethod: (
|
|
3336
|
+
getWidgetMethod: (s) => s.getScatter.bind(s)
|
|
3328
3337
|
}), {
|
|
3329
|
-
useModelHook:
|
|
3330
|
-
ModelComponent:
|
|
3331
|
-
} =
|
|
3338
|
+
useModelHook: Co,
|
|
3339
|
+
ModelComponent: Po
|
|
3340
|
+
} = de({
|
|
3332
3341
|
queryKeyPrefix: ["table"],
|
|
3333
|
-
getWidgetMethod: (
|
|
3342
|
+
getWidgetMethod: (s) => s.getTable.bind(s)
|
|
3334
3343
|
}), {
|
|
3335
|
-
useModelHook:
|
|
3336
|
-
ModelComponent:
|
|
3337
|
-
} =
|
|
3344
|
+
useModelHook: Oo,
|
|
3345
|
+
ModelComponent: Ao
|
|
3346
|
+
} = de({
|
|
3338
3347
|
queryKeyPrefix: ["timeSeries"],
|
|
3339
|
-
getWidgetMethod: (
|
|
3340
|
-
}),
|
|
3341
|
-
function Ro(
|
|
3342
|
-
const e =
|
|
3348
|
+
getWidgetMethod: (s) => s.getTimeSeries.bind(s)
|
|
3349
|
+
}), Fo = "ps";
|
|
3350
|
+
function Ro(s) {
|
|
3351
|
+
const e = B(13), {
|
|
3343
3352
|
children: t,
|
|
3344
3353
|
maps: n,
|
|
3345
|
-
lassoTools:
|
|
3354
|
+
lassoTools: r,
|
|
3346
3355
|
measureTools: o
|
|
3347
|
-
} =
|
|
3356
|
+
} = s;
|
|
3348
3357
|
let i;
|
|
3349
|
-
e[0] !==
|
|
3358
|
+
e[0] !== r ? (i = r === void 0 ? [] : r, e[0] = r, e[1] = i) : i = e[1];
|
|
3350
3359
|
const a = i;
|
|
3351
3360
|
let l;
|
|
3352
3361
|
e[2] !== o ? (l = o === void 0 ? [] : o, e[2] = o, e[3] = l) : l = e[3];
|
|
3353
3362
|
const d = l;
|
|
3354
3363
|
let m;
|
|
3355
|
-
e[4] !== t || e[5] !== d ? (m = /* @__PURE__ */
|
|
3356
|
-
let
|
|
3357
|
-
e[7] !== a || e[8] !== m ? (
|
|
3364
|
+
e[4] !== t || e[5] !== d ? (m = /* @__PURE__ */ G(Ms, { values: d, children: t }), e[4] = t, e[5] = d, e[6] = m) : m = e[6];
|
|
3365
|
+
let h;
|
|
3366
|
+
e[7] !== a || e[8] !== m ? (h = /* @__PURE__ */ G(os, { values: a, children: m }), e[7] = a, e[8] = m, e[9] = h) : h = e[9];
|
|
3358
3367
|
let b;
|
|
3359
|
-
return e[10] !== n || e[11] !==
|
|
3368
|
+
return e[10] !== n || e[11] !== h ? (b = /* @__PURE__ */ G(Wn, { values: n, children: h }), e[10] = n, e[11] = h, e[12] = b) : b = e[12], b;
|
|
3360
3369
|
}
|
|
3361
|
-
function
|
|
3362
|
-
const t =
|
|
3370
|
+
function Do(s, e) {
|
|
3371
|
+
const t = Se((d) => d.layers), n = Se((d) => d.setLayer), r = ge(() => xt(s.map((d) => t[d]).filter((d) => !!d?.legend)).toReversed(), [t, s]), o = ge(() => r.map(e), [e, r]), i = se(({
|
|
3363
3372
|
id: d,
|
|
3364
3373
|
visible: m,
|
|
3365
|
-
...
|
|
3374
|
+
...h
|
|
3366
3375
|
}) => {
|
|
3367
3376
|
n(d, {
|
|
3368
3377
|
props: {
|
|
3369
3378
|
visible: m
|
|
3370
3379
|
},
|
|
3371
|
-
legend:
|
|
3380
|
+
legend: h
|
|
3372
3381
|
});
|
|
3373
|
-
}, [n]), a =
|
|
3382
|
+
}, [n]), a = se(({
|
|
3374
3383
|
id: d,
|
|
3375
3384
|
collapsed: m
|
|
3376
3385
|
}) => {
|
|
@@ -3379,7 +3388,7 @@ function xo(r, e) {
|
|
|
3379
3388
|
collapsed: m
|
|
3380
3389
|
}
|
|
3381
3390
|
});
|
|
3382
|
-
}, [n]), l =
|
|
3391
|
+
}, [n]), l = se(({
|
|
3383
3392
|
id: d,
|
|
3384
3393
|
opacity: m
|
|
3385
3394
|
}) => {
|
|
@@ -3396,273 +3405,273 @@ function xo(r, e) {
|
|
|
3396
3405
|
onChangeRowCollapse: a
|
|
3397
3406
|
};
|
|
3398
3407
|
}
|
|
3399
|
-
function
|
|
3400
|
-
mapId:
|
|
3408
|
+
function xo({
|
|
3409
|
+
mapId: s
|
|
3401
3410
|
}) {
|
|
3402
|
-
const [e, t] =
|
|
3411
|
+
const [e, t] = ue(void 0), [n, r] = ue(!1), [o, i] = ue(void 0), a = x((u) => u.maps[s]?.basemap), l = x((u) => u.getDeckInstance), d = x((u) => u.getOverlayInstance), m = x((u) => u.areLayersLoaded[s]), b = x((u) => u.maps[s]?.isLoaded) && m, {
|
|
3403
3412
|
type: f
|
|
3404
|
-
} =
|
|
3405
|
-
const u = l(
|
|
3413
|
+
} = we[a], w = f === ce.googleMaps, S = se(async () => {
|
|
3414
|
+
const u = l(s), p = d(s);
|
|
3406
3415
|
try {
|
|
3407
|
-
const
|
|
3408
|
-
|
|
3409
|
-
const M =
|
|
3416
|
+
const g = document.createElement("canvas");
|
|
3417
|
+
g.width = u.width ?? 0, g.height = u.height ?? 0;
|
|
3418
|
+
const M = g.getContext("2d");
|
|
3410
3419
|
if (w) {
|
|
3411
3420
|
const k = p;
|
|
3412
3421
|
if (k.getRenderingType() !== "RASTER")
|
|
3413
3422
|
throw new Error("Only raster type is supported for Google Maps");
|
|
3414
|
-
const
|
|
3423
|
+
const F = await _n(k.getDiv(), {
|
|
3415
3424
|
useCORS: !0
|
|
3416
3425
|
});
|
|
3417
|
-
M?.drawImage(
|
|
3426
|
+
M?.drawImage(F, 0, 0, u.width, u.height);
|
|
3418
3427
|
} else {
|
|
3419
3428
|
const k = p;
|
|
3420
3429
|
k.redraw(), M?.drawImage(k.getMap().getCanvas(), 0, 0, u.width, u.height);
|
|
3421
3430
|
}
|
|
3422
3431
|
u?.redraw("screenshot"), M?.drawImage(u.getCanvas(), 0, 0, u.width, u.height);
|
|
3423
|
-
const v =
|
|
3432
|
+
const v = g.toDataURL();
|
|
3424
3433
|
t(v);
|
|
3425
|
-
} catch (
|
|
3426
|
-
i(
|
|
3434
|
+
} catch (g) {
|
|
3435
|
+
i(g), console.error(g);
|
|
3427
3436
|
} finally {
|
|
3428
|
-
|
|
3437
|
+
r(!1);
|
|
3429
3438
|
}
|
|
3430
|
-
}, [l, w,
|
|
3439
|
+
}, [l, w, s, d]);
|
|
3431
3440
|
return {
|
|
3432
|
-
takeScreenshot:
|
|
3433
|
-
i(void 0),
|
|
3441
|
+
takeScreenshot: se(() => {
|
|
3442
|
+
i(void 0), r(!0), b && S();
|
|
3434
3443
|
}, [S, b]),
|
|
3435
3444
|
isLoading: n,
|
|
3436
3445
|
screenshot: e,
|
|
3437
3446
|
error: o
|
|
3438
3447
|
};
|
|
3439
3448
|
}
|
|
3440
|
-
function
|
|
3441
|
-
const e =
|
|
3449
|
+
function $o(s) {
|
|
3450
|
+
const e = B(11), {
|
|
3442
3451
|
mapId: t
|
|
3443
|
-
} =
|
|
3452
|
+
} = s;
|
|
3444
3453
|
let n;
|
|
3445
3454
|
e[0] !== t ? (n = {
|
|
3446
3455
|
mapId: t
|
|
3447
3456
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
3448
|
-
const
|
|
3457
|
+
const r = vr(n);
|
|
3449
3458
|
let o;
|
|
3450
3459
|
e[2] !== t ? (o = {
|
|
3451
3460
|
mapId: t
|
|
3452
3461
|
}, e[2] = t, e[3] = o) : o = e[3];
|
|
3453
|
-
const i =
|
|
3462
|
+
const i = wr(o);
|
|
3454
3463
|
let a;
|
|
3455
3464
|
e[4] !== t ? (a = {
|
|
3456
3465
|
mapId: t
|
|
3457
3466
|
}, e[4] = t, e[5] = a) : a = e[5];
|
|
3458
|
-
const l =
|
|
3467
|
+
const l = Er(a), d = i ?? l ?? r;
|
|
3459
3468
|
let m;
|
|
3460
|
-
return e[6] !== i || e[7] !== l || e[8] !== d || e[9] !==
|
|
3469
|
+
return e[6] !== i || e[7] !== l || e[8] !== d || e[9] !== r ? (m = {
|
|
3461
3470
|
spatialFilter: d,
|
|
3462
3471
|
staticSpatialFilter: l,
|
|
3463
3472
|
lassoToolsSpatialFilter: i,
|
|
3464
|
-
viewportSpatialFilter:
|
|
3465
|
-
}, e[6] = i, e[7] = l, e[8] = d, e[9] =
|
|
3473
|
+
viewportSpatialFilter: r
|
|
3474
|
+
}, e[6] = i, e[7] = l, e[8] = d, e[9] = r, e[10] = m) : m = e[10], m;
|
|
3466
3475
|
}
|
|
3467
|
-
function
|
|
3468
|
-
const e =
|
|
3476
|
+
function vr(s) {
|
|
3477
|
+
const e = B(4), {
|
|
3469
3478
|
mapId: t
|
|
3470
|
-
} =
|
|
3479
|
+
} = s;
|
|
3471
3480
|
let n;
|
|
3472
3481
|
e[0] !== t ? (n = (i) => i.viewports[t], e[0] = t, e[1] = n) : n = e[1];
|
|
3473
|
-
const
|
|
3482
|
+
const r = x(n);
|
|
3474
3483
|
let o;
|
|
3475
3484
|
e: {
|
|
3476
|
-
if (!
|
|
3485
|
+
if (!r) {
|
|
3477
3486
|
o = void 0;
|
|
3478
3487
|
break e;
|
|
3479
3488
|
}
|
|
3480
3489
|
let i;
|
|
3481
|
-
e[2] !==
|
|
3490
|
+
e[2] !== r ? (i = vn(r.getBounds()), e[2] = r, e[3] = i) : i = e[3], o = i;
|
|
3482
3491
|
}
|
|
3483
3492
|
return o;
|
|
3484
3493
|
}
|
|
3485
|
-
function
|
|
3486
|
-
const e =
|
|
3494
|
+
function wr(s) {
|
|
3495
|
+
const e = B(5), {
|
|
3487
3496
|
mapId: t
|
|
3488
|
-
} =
|
|
3497
|
+
} = s;
|
|
3489
3498
|
let n;
|
|
3490
3499
|
e[0] !== t ? (n = (i) => i.data[t]?.values, e[0] = t, e[1] = n) : n = e[1];
|
|
3491
|
-
const
|
|
3500
|
+
const r = K(n);
|
|
3492
3501
|
let o;
|
|
3493
3502
|
e: {
|
|
3494
3503
|
let i;
|
|
3495
|
-
if (e[2] !==
|
|
3504
|
+
if (e[2] !== r) {
|
|
3496
3505
|
const a = Ot({
|
|
3497
|
-
values:
|
|
3498
|
-
}).filter(
|
|
3506
|
+
values: r
|
|
3507
|
+
}).filter(_r);
|
|
3499
3508
|
if (!a?.length) {
|
|
3500
3509
|
o = void 0;
|
|
3501
3510
|
break e;
|
|
3502
3511
|
}
|
|
3503
|
-
i = vt(a.map(
|
|
3512
|
+
i = vt(a.map(Mr)), e[2] = r, e[3] = i, e[4] = o;
|
|
3504
3513
|
} else
|
|
3505
3514
|
i = e[3], o = e[4];
|
|
3506
3515
|
o = i.geometry;
|
|
3507
3516
|
}
|
|
3508
3517
|
return o;
|
|
3509
3518
|
}
|
|
3510
|
-
function
|
|
3511
|
-
return
|
|
3519
|
+
function Mr(s) {
|
|
3520
|
+
return s.geometry.coordinates;
|
|
3512
3521
|
}
|
|
3513
|
-
function
|
|
3514
|
-
return
|
|
3522
|
+
function _r(s) {
|
|
3523
|
+
return s.properties.visible;
|
|
3515
3524
|
}
|
|
3516
|
-
function
|
|
3517
|
-
const e =
|
|
3525
|
+
function Er(s) {
|
|
3526
|
+
const e = B(4), {
|
|
3518
3527
|
mapId: t
|
|
3519
|
-
} =
|
|
3528
|
+
} = s;
|
|
3520
3529
|
let n;
|
|
3521
3530
|
e[0] !== t ? (n = (i) => i.spatialFilter[t], e[0] = t, e[1] = n) : n = e[1];
|
|
3522
|
-
const
|
|
3531
|
+
const r = x(n);
|
|
3523
3532
|
let o;
|
|
3524
3533
|
e: {
|
|
3525
|
-
if (!
|
|
3534
|
+
if (!r || !Object.keys(r).length) {
|
|
3526
3535
|
o = void 0;
|
|
3527
3536
|
break e;
|
|
3528
3537
|
}
|
|
3529
3538
|
let i;
|
|
3530
|
-
if (e[2] !==
|
|
3531
|
-
const a = Object.values(
|
|
3532
|
-
i = vt(a), e[2] =
|
|
3539
|
+
if (e[2] !== r) {
|
|
3540
|
+
const a = Object.values(r).filter(Lr).flatMap(Tr);
|
|
3541
|
+
i = vt(a), e[2] = r, e[3] = i;
|
|
3533
3542
|
} else
|
|
3534
3543
|
i = e[3];
|
|
3535
3544
|
o = i.geometry;
|
|
3536
3545
|
}
|
|
3537
3546
|
return o;
|
|
3538
3547
|
}
|
|
3539
|
-
function
|
|
3540
|
-
return
|
|
3548
|
+
function Tr(s) {
|
|
3549
|
+
return s.type === "Polygon" ? [s.coordinates] : s.coordinates;
|
|
3541
3550
|
}
|
|
3542
|
-
function
|
|
3543
|
-
return
|
|
3551
|
+
function Lr(s) {
|
|
3552
|
+
return s != null;
|
|
3544
3553
|
}
|
|
3545
|
-
const
|
|
3554
|
+
const ye = {
|
|
3546
3555
|
currency: "CURRENCY",
|
|
3547
3556
|
default: "DEFAULT",
|
|
3548
3557
|
number: "NUMBER"
|
|
3549
3558
|
}, pt = {
|
|
3550
|
-
[
|
|
3551
|
-
type:
|
|
3552
|
-
format: (
|
|
3559
|
+
[ye.currency]: {
|
|
3560
|
+
type: ye.currency,
|
|
3561
|
+
format: (s, e) => dn(s, e)
|
|
3553
3562
|
},
|
|
3554
|
-
[
|
|
3555
|
-
type:
|
|
3556
|
-
format: (
|
|
3563
|
+
[ye.number]: {
|
|
3564
|
+
type: ye.number,
|
|
3565
|
+
format: (s, e) => wt(s, e)
|
|
3557
3566
|
},
|
|
3558
|
-
[
|
|
3559
|
-
type:
|
|
3560
|
-
format: (
|
|
3567
|
+
[ye.default]: {
|
|
3568
|
+
type: ye.default,
|
|
3569
|
+
format: (s) => s.toLocaleString()
|
|
3561
3570
|
}
|
|
3562
3571
|
};
|
|
3563
|
-
function
|
|
3564
|
-
properties:
|
|
3572
|
+
function Uo({
|
|
3573
|
+
properties: s,
|
|
3565
3574
|
formatters: e = {},
|
|
3566
|
-
includeColumns: t = Object.keys(
|
|
3575
|
+
includeColumns: t = Object.keys(s),
|
|
3567
3576
|
locale: n = "en-US",
|
|
3568
|
-
showColumnName:
|
|
3577
|
+
showColumnName: r = !0,
|
|
3569
3578
|
title: o,
|
|
3570
|
-
getColumnName: i =
|
|
3571
|
-
getFieldHtml: a =
|
|
3572
|
-
getTitle: l =
|
|
3573
|
-
getValue: d =
|
|
3579
|
+
getColumnName: i = Ar,
|
|
3580
|
+
getFieldHtml: a = Cr,
|
|
3581
|
+
getTitle: l = kr,
|
|
3582
|
+
getValue: d = Pr
|
|
3574
3583
|
}) {
|
|
3575
3584
|
const m = o ? l(o) : "", b = t.reduce((f, w) => {
|
|
3576
|
-
const S = e[w], L =
|
|
3585
|
+
const S = e[w], L = s[w], u = d(L, n, S), p = r ? i(w) : "";
|
|
3577
3586
|
return f + a(p, u);
|
|
3578
3587
|
}, "");
|
|
3579
3588
|
return m + b;
|
|
3580
3589
|
}
|
|
3581
|
-
function
|
|
3582
|
-
return `<h3 style="margin: 0"><strong>${
|
|
3590
|
+
function kr(s) {
|
|
3591
|
+
return `<h3 style="margin: 0"><strong>${s}</strong></h3></br>`;
|
|
3583
3592
|
}
|
|
3584
|
-
function
|
|
3585
|
-
return `${
|
|
3593
|
+
function Cr(s, e) {
|
|
3594
|
+
return `${s}${e}</br>`;
|
|
3586
3595
|
}
|
|
3587
|
-
function
|
|
3596
|
+
function Pr(s, e, t) {
|
|
3588
3597
|
try {
|
|
3589
|
-
return
|
|
3598
|
+
return Or(t)(s, e);
|
|
3590
3599
|
} catch {
|
|
3591
|
-
return
|
|
3600
|
+
return s;
|
|
3592
3601
|
}
|
|
3593
3602
|
}
|
|
3594
|
-
function
|
|
3595
|
-
return typeof
|
|
3603
|
+
function Or(s) {
|
|
3604
|
+
return typeof s == "function" ? s : ((s && pt[s]) ?? pt[ye.default]).format;
|
|
3596
3605
|
}
|
|
3597
|
-
function
|
|
3598
|
-
return `<strong>${
|
|
3606
|
+
function Ar(s) {
|
|
3607
|
+
return `<strong>${s}</strong>: `;
|
|
3599
3608
|
}
|
|
3600
|
-
function Vo(
|
|
3609
|
+
function Vo(s) {
|
|
3601
3610
|
return {
|
|
3602
|
-
collapsed:
|
|
3603
|
-
collapsible:
|
|
3604
|
-
helperText:
|
|
3605
|
-
id:
|
|
3606
|
-
legend:
|
|
3607
|
-
maxZoom:
|
|
3608
|
-
minZoom:
|
|
3609
|
-
opacity:
|
|
3610
|
-
showOpacityControl:
|
|
3611
|
-
switchable:
|
|
3612
|
-
title:
|
|
3613
|
-
visible:
|
|
3611
|
+
collapsed: s.legend?.collapsed,
|
|
3612
|
+
collapsible: s.legend?.collapsible,
|
|
3613
|
+
helperText: s.legend?.helperText,
|
|
3614
|
+
id: s.props.id,
|
|
3615
|
+
legend: s.legend?.variables,
|
|
3616
|
+
maxZoom: s.legend?.maxZoom,
|
|
3617
|
+
minZoom: s.legend?.minZoom,
|
|
3618
|
+
opacity: s.props.opacity ?? 1,
|
|
3619
|
+
showOpacityControl: s.legend?.opacityControl,
|
|
3620
|
+
switchable: s.legend?.switchable,
|
|
3621
|
+
title: s.name,
|
|
3622
|
+
visible: s.props.visible ?? !0
|
|
3614
3623
|
};
|
|
3615
3624
|
}
|
|
3616
|
-
function
|
|
3617
|
-
const e =
|
|
3625
|
+
function qo(s) {
|
|
3626
|
+
const e = B(22), {
|
|
3618
3627
|
children: t,
|
|
3619
3628
|
mapId: n
|
|
3620
|
-
} =
|
|
3621
|
-
let
|
|
3622
|
-
e[0] !== n ? (
|
|
3629
|
+
} = s;
|
|
3630
|
+
let r;
|
|
3631
|
+
e[0] !== n ? (r = (v) => v.viewStates[n], e[0] = n, e[1] = r) : r = e[1];
|
|
3623
3632
|
const {
|
|
3624
3633
|
zoom: o,
|
|
3625
3634
|
maxZoom: i,
|
|
3626
3635
|
minZoom: a
|
|
3627
|
-
} =
|
|
3636
|
+
} = x(r);
|
|
3628
3637
|
let l;
|
|
3629
3638
|
e[2] !== n ? (l = (v) => v.areLayersLoaded[n], e[2] = n, e[3] = l) : l = e[3];
|
|
3630
|
-
const d =
|
|
3639
|
+
const d = x(l), m = x(Dr), h = x(Rr), b = x(Fr), f = !d;
|
|
3631
3640
|
let w;
|
|
3632
3641
|
e[4] !== n || e[5] !== m ? (w = (v) => m(n, v), e[4] = n, e[5] = m, e[6] = w) : w = e[6];
|
|
3633
3642
|
const S = w;
|
|
3634
3643
|
let L;
|
|
3635
|
-
e[7] !==
|
|
3644
|
+
e[7] !== h || e[8] !== n ? (L = (v) => h(n, v), e[7] = h, e[8] = n, e[9] = L) : L = e[9];
|
|
3636
3645
|
const u = L;
|
|
3637
3646
|
let p;
|
|
3638
3647
|
e[10] !== n || e[11] !== b ? (p = () => b(n), e[10] = n, e[11] = b, e[12] = p) : p = e[12];
|
|
3639
|
-
const
|
|
3648
|
+
const g = p;
|
|
3640
3649
|
let M;
|
|
3641
|
-
return e[13] !== t || e[14] !== i || e[15] !== a || e[16] !== f || e[17] !== S || e[18] !== u || e[19] !==
|
|
3650
|
+
return e[13] !== t || e[14] !== i || e[15] !== a || e[16] !== f || e[17] !== S || e[18] !== u || e[19] !== g || e[20] !== o ? (M = t({
|
|
3642
3651
|
zoom: o,
|
|
3643
3652
|
maxZoom: i,
|
|
3644
3653
|
minZoom: a,
|
|
3645
3654
|
isLoading: f,
|
|
3646
3655
|
setZoom: S,
|
|
3647
3656
|
flyTo: u,
|
|
3648
|
-
resetViewState:
|
|
3649
|
-
}), e[13] = t, e[14] = i, e[15] = a, e[16] = f, e[17] = S, e[18] = u, e[19] =
|
|
3657
|
+
resetViewState: g
|
|
3658
|
+
}), e[13] = t, e[14] = i, e[15] = a, e[16] = f, e[17] = S, e[18] = u, e[19] = g, e[20] = o, e[21] = M) : M = e[21], M;
|
|
3650
3659
|
}
|
|
3651
|
-
function
|
|
3652
|
-
return
|
|
3660
|
+
function Fr(s) {
|
|
3661
|
+
return s.resetViewState;
|
|
3653
3662
|
}
|
|
3654
|
-
function
|
|
3655
|
-
return
|
|
3663
|
+
function Rr(s) {
|
|
3664
|
+
return s.flyTo;
|
|
3656
3665
|
}
|
|
3657
|
-
function
|
|
3658
|
-
return
|
|
3666
|
+
function Dr(s) {
|
|
3667
|
+
return s.setZoom;
|
|
3659
3668
|
}
|
|
3660
|
-
async function
|
|
3661
|
-
baseUrl:
|
|
3669
|
+
async function xr({
|
|
3670
|
+
baseUrl: s = We,
|
|
3662
3671
|
connection: e,
|
|
3663
3672
|
accessToken: t,
|
|
3664
3673
|
query: n,
|
|
3665
|
-
attribute:
|
|
3674
|
+
attribute: r,
|
|
3666
3675
|
fetcherOptions: {
|
|
3667
3676
|
signal: o,
|
|
3668
3677
|
...i
|
|
@@ -3671,12 +3680,12 @@ async function $s({
|
|
|
3671
3680
|
params: l,
|
|
3672
3681
|
apiVersion: d = Ke
|
|
3673
3682
|
}) {
|
|
3674
|
-
const m = `${
|
|
3683
|
+
const m = `${s}/${d}/stats/${e}/${r}`;
|
|
3675
3684
|
return $t({
|
|
3676
3685
|
accessToken: t,
|
|
3677
3686
|
signal: o,
|
|
3678
3687
|
url: m,
|
|
3679
|
-
method:
|
|
3688
|
+
method: be.get,
|
|
3680
3689
|
params: {
|
|
3681
3690
|
q: n,
|
|
3682
3691
|
...a,
|
|
@@ -3685,12 +3694,12 @@ async function $s({
|
|
|
3685
3694
|
...i
|
|
3686
3695
|
});
|
|
3687
3696
|
}
|
|
3688
|
-
async function
|
|
3689
|
-
baseUrl:
|
|
3697
|
+
async function $r({
|
|
3698
|
+
baseUrl: s = We,
|
|
3690
3699
|
connection: e,
|
|
3691
3700
|
accessToken: t,
|
|
3692
3701
|
table: n,
|
|
3693
|
-
attribute:
|
|
3702
|
+
attribute: r,
|
|
3694
3703
|
params: o,
|
|
3695
3704
|
fetcherOptions: {
|
|
3696
3705
|
signal: i,
|
|
@@ -3698,27 +3707,27 @@ async function Us({
|
|
|
3698
3707
|
} = {},
|
|
3699
3708
|
apiVersion: l = Ke
|
|
3700
3709
|
}) {
|
|
3701
|
-
const d = `${
|
|
3710
|
+
const d = `${s}/${l}/stats/${e}/${n}/${r}`;
|
|
3702
3711
|
return $t({
|
|
3703
3712
|
accessToken: t,
|
|
3704
3713
|
signal: i,
|
|
3705
3714
|
url: d,
|
|
3706
|
-
method:
|
|
3715
|
+
method: be.get,
|
|
3707
3716
|
params: {
|
|
3708
3717
|
...o
|
|
3709
3718
|
},
|
|
3710
3719
|
...a
|
|
3711
3720
|
});
|
|
3712
3721
|
}
|
|
3713
|
-
function
|
|
3714
|
-
const e =
|
|
3722
|
+
function Bo(s) {
|
|
3723
|
+
const e = B(20), {
|
|
3715
3724
|
source: t,
|
|
3716
3725
|
attribute: n,
|
|
3717
|
-
accessToken:
|
|
3726
|
+
accessToken: r,
|
|
3718
3727
|
params: o,
|
|
3719
3728
|
fetcherOptions: i,
|
|
3720
3729
|
useQueryProps: a
|
|
3721
|
-
} =
|
|
3730
|
+
} = s;
|
|
3722
3731
|
let l;
|
|
3723
3732
|
e[0] !== a ? (l = a === void 0 ? {} : a, e[0] = a, e[1] = l) : l = e[1];
|
|
3724
3733
|
let d, m;
|
|
@@ -3726,19 +3735,19 @@ function jo(r) {
|
|
|
3726
3735
|
enabled: d,
|
|
3727
3736
|
...m
|
|
3728
3737
|
} = l, e[2] = l, e[3] = d, e[4] = m) : (d = e[3], m = e[4]);
|
|
3729
|
-
const
|
|
3738
|
+
const h = d === void 0 ? !0 : d;
|
|
3730
3739
|
let b;
|
|
3731
3740
|
e[5] !== n || e[6] !== t ? (b = [t, n], e[5] = n, e[6] = t, e[7] = b) : b = e[7];
|
|
3732
3741
|
let f;
|
|
3733
|
-
e[8] !==
|
|
3742
|
+
e[8] !== r || e[9] !== n || e[10] !== i || e[11] !== o || e[12] !== t ? (f = () => Ur({
|
|
3734
3743
|
source: t,
|
|
3735
3744
|
params: o,
|
|
3736
3745
|
attribute: n,
|
|
3737
|
-
accessToken:
|
|
3746
|
+
accessToken: r,
|
|
3738
3747
|
fetcherOptions: i
|
|
3739
|
-
}), e[8] =
|
|
3748
|
+
}), e[8] = r, e[9] = n, e[10] = i, e[11] = o, e[12] = t, e[13] = f) : f = e[13];
|
|
3740
3749
|
let w;
|
|
3741
|
-
return e[14] !==
|
|
3750
|
+
return e[14] !== h || e[15] !== t || e[16] !== b || e[17] !== f || e[18] !== m ? (w = {
|
|
3742
3751
|
queryKey: b,
|
|
3743
3752
|
queryFn: f,
|
|
3744
3753
|
select(S) {
|
|
@@ -3747,160 +3756,160 @@ function jo(r) {
|
|
|
3747
3756
|
type: S.type.toLowerCase()
|
|
3748
3757
|
};
|
|
3749
3758
|
},
|
|
3750
|
-
enabled: !!t &&
|
|
3759
|
+
enabled: !!t && h,
|
|
3751
3760
|
...m
|
|
3752
|
-
}, e[14] =
|
|
3761
|
+
}, e[14] = h, e[15] = t, e[16] = b, e[17] = f, e[18] = m, e[19] = w) : w = e[19], _t(w);
|
|
3753
3762
|
}
|
|
3754
|
-
function
|
|
3755
|
-
source:
|
|
3763
|
+
function Ur({
|
|
3764
|
+
source: s,
|
|
3756
3765
|
params: e,
|
|
3757
3766
|
attribute: t,
|
|
3758
3767
|
accessToken: n,
|
|
3759
|
-
fetcherOptions:
|
|
3768
|
+
fetcherOptions: r
|
|
3760
3769
|
}) {
|
|
3761
|
-
if (
|
|
3762
|
-
return
|
|
3763
|
-
connection:
|
|
3764
|
-
baseUrl:
|
|
3765
|
-
apiVersion:
|
|
3770
|
+
if (s.type.startsWith("query"))
|
|
3771
|
+
return xr({
|
|
3772
|
+
connection: s.connectionName,
|
|
3773
|
+
baseUrl: s.apiBaseUrl,
|
|
3774
|
+
apiVersion: s.apiVersion,
|
|
3766
3775
|
accessToken: n,
|
|
3767
3776
|
params: e,
|
|
3768
|
-
query:
|
|
3769
|
-
queryParameters:
|
|
3777
|
+
query: s.data,
|
|
3778
|
+
queryParameters: s.queryParameters,
|
|
3770
3779
|
attribute: t,
|
|
3771
|
-
fetcherOptions:
|
|
3780
|
+
fetcherOptions: r
|
|
3772
3781
|
});
|
|
3773
|
-
if (
|
|
3774
|
-
return
|
|
3775
|
-
connection:
|
|
3776
|
-
baseUrl:
|
|
3777
|
-
apiVersion:
|
|
3782
|
+
if (s.type.startsWith("table"))
|
|
3783
|
+
return $r({
|
|
3784
|
+
connection: s.connectionName,
|
|
3785
|
+
baseUrl: s.apiBaseUrl,
|
|
3786
|
+
apiVersion: s.apiVersion,
|
|
3778
3787
|
params: e,
|
|
3779
3788
|
accessToken: n,
|
|
3780
|
-
table:
|
|
3789
|
+
table: s.data,
|
|
3781
3790
|
attribute: t,
|
|
3782
|
-
fetcherOptions:
|
|
3791
|
+
fetcherOptions: r
|
|
3783
3792
|
});
|
|
3784
|
-
if (
|
|
3785
|
-
return
|
|
3786
|
-
source:
|
|
3793
|
+
if (s.type.startsWith("tileset"))
|
|
3794
|
+
return Vr({
|
|
3795
|
+
source: s,
|
|
3787
3796
|
accessToken: n,
|
|
3788
|
-
target:
|
|
3797
|
+
target: s.data,
|
|
3789
3798
|
attribute: t
|
|
3790
3799
|
});
|
|
3791
|
-
throw new Error(`Unsupported source type: ${
|
|
3800
|
+
throw new Error(`Unsupported source type: ${s.type}`);
|
|
3792
3801
|
}
|
|
3793
|
-
async function
|
|
3794
|
-
source:
|
|
3802
|
+
async function Vr({
|
|
3803
|
+
source: s,
|
|
3795
3804
|
accessToken: e,
|
|
3796
3805
|
target: t,
|
|
3797
3806
|
attribute: n
|
|
3798
3807
|
}) {
|
|
3799
|
-
const
|
|
3800
|
-
connectionName:
|
|
3801
|
-
apiBaseUrl:
|
|
3808
|
+
const r = await wn({
|
|
3809
|
+
connectionName: s.connectionName,
|
|
3810
|
+
apiBaseUrl: s.apiBaseUrl,
|
|
3802
3811
|
accessToken: e,
|
|
3803
|
-
clientId:
|
|
3812
|
+
clientId: s.clientId,
|
|
3804
3813
|
tableName: t
|
|
3805
3814
|
});
|
|
3806
|
-
if (!
|
|
3815
|
+
if (!r?.tilestats?.layers?.[0]?.attributes)
|
|
3807
3816
|
throw new Error(`${n} not found in tileset attributes`);
|
|
3808
|
-
const i =
|
|
3817
|
+
const i = r.tilestats.layers[0].attributes.find((a) => a.attribute === n);
|
|
3809
3818
|
if (!i)
|
|
3810
3819
|
throw new Error(`${n} not found in tileset attributes`);
|
|
3811
3820
|
return i;
|
|
3812
3821
|
}
|
|
3813
3822
|
export {
|
|
3814
|
-
|
|
3815
|
-
|
|
3823
|
+
yo as AggregationsModel,
|
|
3824
|
+
lo as BasemapsControls,
|
|
3816
3825
|
it as CONVERSIONS_UNITS,
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3826
|
+
De as CartoBasemapURL,
|
|
3827
|
+
ae as CartoBasemaps,
|
|
3828
|
+
go as CategoriesModel,
|
|
3829
|
+
Yn as CustomCompositeEditMode,
|
|
3821
3830
|
Ct as CustomEditableGeojsonLayer,
|
|
3822
|
-
|
|
3823
|
-
|
|
3831
|
+
us as CustomMeasureAreaMode,
|
|
3832
|
+
ds as CustomMeasureBufferMode,
|
|
3824
3833
|
Ft as CustomMeasureDistanceMode,
|
|
3825
3834
|
tt as DEFAULT_LASSO_TOOLS_COLORS,
|
|
3826
|
-
|
|
3835
|
+
Jn as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
3827
3836
|
Ue as DEFAULT_LASSO_TOOLS_MODES,
|
|
3828
3837
|
$e as DEFAULT_LASSO_TOOLS_PROPS,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3838
|
+
Te as DEFAULT_MASK_LAYER_PROPS,
|
|
3839
|
+
ys as DEFAULT_MEASUREMENT_TOOLS_MODES,
|
|
3840
|
+
hs as DEFAULT_MEASUREMENT_TOOLS_UNITS,
|
|
3841
|
+
Ve as DEFAULT_MEASURE_COLORS,
|
|
3842
|
+
$n as DeckGLComponent,
|
|
3843
|
+
re as EditableEditType,
|
|
3844
|
+
So as FeaturesModel,
|
|
3845
|
+
wo as FormulaModel,
|
|
3846
|
+
Re as GmapsBasemap,
|
|
3847
|
+
_o as HistogramModel,
|
|
3848
|
+
ve as INTL_UNITS,
|
|
3849
|
+
bs as LassoTools,
|
|
3850
|
+
os as LassoToolsProvider,
|
|
3851
|
+
we as MAPS_BASEMAP,
|
|
3852
|
+
he as MAP_LASSO_TOOLS_LAYER_ID,
|
|
3853
|
+
Oe as MAP_MASK_LAYER_ID,
|
|
3854
|
+
fe as MAP_MEASURE_LAYER_ID,
|
|
3855
|
+
ms as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
3847
3856
|
lt as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
3848
|
-
|
|
3849
|
-
|
|
3857
|
+
ne as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
3858
|
+
uo as MapComponent,
|
|
3850
3859
|
je as MapMeasurementUnitAuto,
|
|
3851
|
-
|
|
3852
|
-
|
|
3860
|
+
ps as MapMeasurementUnitTurf,
|
|
3861
|
+
Wn as MapProvider,
|
|
3853
3862
|
Ro as MapsProvider,
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3863
|
+
ce as MapsTypes,
|
|
3864
|
+
Rs as MeasurementTools,
|
|
3865
|
+
Ms as MeasurementToolsProvider,
|
|
3866
|
+
To as RangeModel,
|
|
3867
|
+
ko as ScatterModel,
|
|
3868
|
+
Po as TableModel,
|
|
3869
|
+
Ao as TimeSeriesModel,
|
|
3870
|
+
qo as ZoomControls,
|
|
3871
|
+
Fo as clientID,
|
|
3872
|
+
st as convertMetersTo,
|
|
3873
|
+
rs as createLassoToolsStore,
|
|
3874
|
+
Gn as createMapStore,
|
|
3875
|
+
ws as createMeasurementToolsStore,
|
|
3876
|
+
ye as formatterTypes,
|
|
3868
3877
|
En as getCursorDefault,
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3878
|
+
co as getDeckController,
|
|
3879
|
+
po as getFilterValues,
|
|
3880
|
+
ns as getLassoToolsLayer,
|
|
3881
|
+
Ss as getMeasurementToolsLayer,
|
|
3882
|
+
Ae as getTextLayerFormattedDistance,
|
|
3874
3883
|
Tn as getTooltipDefault,
|
|
3875
3884
|
Vo as mappingLegendMeridian,
|
|
3876
|
-
|
|
3885
|
+
Uo as objectToHtml,
|
|
3877
3886
|
xt as sortLayers,
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3887
|
+
qn as transitionFlyConfig,
|
|
3888
|
+
mo as useAggregations,
|
|
3889
|
+
ho as useCategories,
|
|
3881
3890
|
kt as useEventManager,
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3891
|
+
bo as useFeatures,
|
|
3892
|
+
cr as useFilters,
|
|
3893
|
+
vo as useFormula,
|
|
3894
|
+
Mo as useHistogram,
|
|
3895
|
+
wr as useLassoToolsSpatialFilter,
|
|
3896
|
+
K as useLassoToolsState,
|
|
3897
|
+
Se as useLayerStore,
|
|
3898
|
+
Bs as useLayers,
|
|
3899
|
+
Do as useLegend,
|
|
3900
|
+
xo as useMapScreenshot,
|
|
3901
|
+
x as useMapStore,
|
|
3902
|
+
z as useMeasurementToolsState,
|
|
3903
|
+
Eo as useRange,
|
|
3904
|
+
Lo as useScatter,
|
|
3905
|
+
lr as useSource,
|
|
3906
|
+
Pe as useSourceStore,
|
|
3907
|
+
fo as useSourceWithFilters,
|
|
3908
|
+
$o as useSpatialFilter,
|
|
3909
|
+
Bo as useStats,
|
|
3910
|
+
Co as useTable,
|
|
3911
|
+
Oo as useTimeSeries,
|
|
3912
|
+
vr as useViewportSpatialFilter,
|
|
3913
|
+
yr as useWidgetModel
|
|
3905
3914
|
};
|
|
3906
3915
|
//# sourceMappingURL=index.js.map
|