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