@carto/ps-react-maps 3.0.0-canary.5 → 3.0.0-canary.7
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 +470 -474
- package/dist/index.js.map +1 -1
- package/dist/types/utils/mapping-meridian.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var gt = Object.defineProperty;
|
|
|
2
2
|
var yt = (o, e, t) => e in o ? gt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var ne = (o, e, t) => yt(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsx as H, jsxs as ht } from "react/jsx-runtime";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as k } from "react/compiler-runtime";
|
|
6
6
|
import { useState as fe, useEffect as Y, useImperativeHandle as St, createContext as qe, useContext as Ue, useMemo as de, useCallback as $, useRef as Ee } from "react";
|
|
7
7
|
import { DeckGL as vt } from "@deck.gl/react";
|
|
8
8
|
import { Map as bt, MapProvider as Tt, useMap as Mt } from "react-map-gl/maplibre";
|
|
@@ -76,17 +76,17 @@ function ss(o) {
|
|
|
76
76
|
} : null;
|
|
77
77
|
}
|
|
78
78
|
function ns(o) {
|
|
79
|
-
var ye,
|
|
80
|
-
const e =
|
|
81
|
-
let t, n, s,
|
|
79
|
+
var ye, _, je;
|
|
80
|
+
const e = k(66);
|
|
81
|
+
let t, n, s, i, r, a, l, m, c, p, d, u, g, f;
|
|
82
82
|
e[0] !== o ? ({
|
|
83
83
|
instanceRef: t,
|
|
84
|
-
overlayRef:
|
|
84
|
+
overlayRef: i,
|
|
85
85
|
basemap: l,
|
|
86
86
|
controller: m,
|
|
87
87
|
id: c,
|
|
88
88
|
layers: p,
|
|
89
|
-
parameters:
|
|
89
|
+
parameters: r,
|
|
90
90
|
gmapsProps: d,
|
|
91
91
|
getCursor: u,
|
|
92
92
|
getTooltip: g,
|
|
@@ -94,7 +94,7 @@ function ns(o) {
|
|
|
94
94
|
onResize: s,
|
|
95
95
|
onViewStateChange: f,
|
|
96
96
|
...a
|
|
97
|
-
} = o, e[0] = o, e[1] = t, e[2] = n, e[3] = s, e[4] =
|
|
97
|
+
} = o, e[0] = o, e[1] = t, e[2] = n, e[3] = s, e[4] = i, e[5] = r, e[6] = a, e[7] = l, e[8] = m, e[9] = c, e[10] = p, e[11] = d, e[12] = u, e[13] = g, e[14] = f) : (t = e[1], n = e[2], s = e[3], i = e[4], r = e[5], a = e[6], l = e[7], m = e[8], c = e[9], p = e[10], d = e[11], u = e[12], g = e[13], f = e[14]);
|
|
98
98
|
const M = l === void 0 ? ee.positron : l, h = m === void 0 ? !0 : m, y = c === void 0 ? "deck-gl-map" : c;
|
|
99
99
|
let T;
|
|
100
100
|
e[15] !== p ? (T = p === void 0 ? [] : p, e[15] = p, e[16] = T) : T = e[16];
|
|
@@ -103,19 +103,19 @@ function ns(o) {
|
|
|
103
103
|
e[17] !== d ? (v = d === void 0 ? {
|
|
104
104
|
apiKey: ""
|
|
105
105
|
} : d, e[17] = d, e[18] = v) : v = e[18];
|
|
106
|
-
let
|
|
106
|
+
let L, E, w;
|
|
107
107
|
e[19] !== v ? ({
|
|
108
|
-
apiKey:
|
|
109
|
-
APIProviderProps:
|
|
108
|
+
apiKey: w,
|
|
109
|
+
APIProviderProps: L,
|
|
110
110
|
...E
|
|
111
|
-
} = v, e[19] = v, e[20] =
|
|
111
|
+
} = v, e[19] = v, e[20] = L, e[21] = E, e[22] = w) : (L = e[20], E = e[21], w = e[22]);
|
|
112
112
|
const O = u === void 0 ? ts : u, D = g === void 0 ? ss : g, U = f === void 0 ? ls : f;
|
|
113
113
|
let V;
|
|
114
114
|
e[23] === Symbol.for("react.memo_cache_sentinel") ? (V = [!1, !1], e[23] = V) : V = e[23];
|
|
115
115
|
const [b, P] = fe(V);
|
|
116
|
-
let
|
|
117
|
-
e[24] !== b ? (
|
|
118
|
-
const A =
|
|
116
|
+
let C;
|
|
117
|
+
e[24] !== b ? (C = b.every(as), e[24] = b, e[25] = C) : C = e[25];
|
|
118
|
+
const A = C;
|
|
119
119
|
let x;
|
|
120
120
|
e[26] !== s ? (x = (he) => {
|
|
121
121
|
s == null || s(he);
|
|
@@ -125,7 +125,7 @@ function ns(o) {
|
|
|
125
125
|
type: G
|
|
126
126
|
} = nt[M], I = G === ue.googleMaps;
|
|
127
127
|
let be, te;
|
|
128
|
-
e[28] !== S ? (te = S.filter(
|
|
128
|
+
e[28] !== S ? (te = S.filter(rs).map(is), e[28] = S, e[29] = te) : te = e[29], be = te;
|
|
129
129
|
const ge = be;
|
|
130
130
|
let oe;
|
|
131
131
|
e[30] !== I || e[31] !== U ? (oe = (he) => {
|
|
@@ -135,57 +135,57 @@ function ns(o) {
|
|
|
135
135
|
} : he;
|
|
136
136
|
U(Fe);
|
|
137
137
|
}, e[30] = I, e[31] = U, e[32] = oe) : oe = e[32];
|
|
138
|
-
const
|
|
138
|
+
const ie = oe;
|
|
139
139
|
let Z;
|
|
140
140
|
e[33] === Symbol.for("react.memo_cache_sentinel") ? (Z = (he) => {
|
|
141
141
|
const Fe = he.type === "deckgl" ? 0 : 1;
|
|
142
142
|
P((ft) => ft.map((mt, pt) => pt === Fe ? !0 : mt));
|
|
143
143
|
}, e[33] = Z) : Z = e[33];
|
|
144
|
-
const
|
|
144
|
+
const re = Z;
|
|
145
145
|
let ae, le;
|
|
146
146
|
e[34] !== A || e[35] !== n ? (ae = () => {
|
|
147
147
|
n == null || n(A);
|
|
148
148
|
}, le = [A, n], e[34] = A, e[35] = n, e[36] = ae, e[37] = le) : (ae = e[36], le = e[37]), Y(ae, le);
|
|
149
149
|
let se;
|
|
150
|
-
e[38] === Symbol.for("react.memo_cache_sentinel") ? (se = () =>
|
|
150
|
+
e[38] === Symbol.for("react.memo_cache_sentinel") ? (se = () => re({
|
|
151
151
|
type: "deckgl"
|
|
152
152
|
}), e[38] = se) : se = e[38];
|
|
153
153
|
let X;
|
|
154
|
-
e[39] !==
|
|
154
|
+
e[39] !== r ? (X = {
|
|
155
155
|
depthTest: !1,
|
|
156
|
-
...
|
|
157
|
-
}, e[39] =
|
|
156
|
+
...r
|
|
157
|
+
}, e[39] = r, e[40] = X) : X = e[40];
|
|
158
158
|
let z;
|
|
159
|
-
e[41] !==
|
|
159
|
+
e[41] !== i ? (z = /* @__PURE__ */ H(cs, { overlayRef: i }), e[41] = i, e[42] = z) : z = e[42];
|
|
160
160
|
let J;
|
|
161
161
|
e[43] !== E || e[44] !== M || e[45] !== I || e[46] !== N || e[47] !== a ? (J = I ? /* @__PURE__ */ H(Lt, { mapTypeId: M, reuseMaps: !0, renderingType: "RASTER", ...E, defaultCenter: {
|
|
162
162
|
lat: ((ye = a.initialViewState) == null ? void 0 : ye.latitude) ?? 0,
|
|
163
|
-
lng: ((
|
|
164
|
-
}, defaultZoom: ((je = a.initialViewState) == null ? void 0 : je.zoom) ?? 0, onTilesLoaded: () =>
|
|
163
|
+
lng: ((_ = a.initialViewState) == null ? void 0 : _.longitude) ?? 0
|
|
164
|
+
}, defaultZoom: ((je = a.initialViewState) == null ? void 0 : je.zoom) ?? 0, onTilesLoaded: () => re({
|
|
165
165
|
type: "load"
|
|
166
|
-
}) }) : /* @__PURE__ */ H(bt, { reuseMaps: !0, mapStyle: N, onLoad: () =>
|
|
166
|
+
}) }) : /* @__PURE__ */ H(bt, { reuseMaps: !0, mapStyle: N, onLoad: () => re({
|
|
167
167
|
type: "load"
|
|
168
168
|
}), onRender: os }), e[43] = E, e[44] = M, e[45] = I, e[46] = N, e[47] = a, e[48] = J) : J = e[48];
|
|
169
169
|
let W;
|
|
170
|
-
e[49] !== ge || e[50] !== h || e[51] !== O || e[52] !== D || e[53] !== B || e[54] !==
|
|
170
|
+
e[49] !== ge || e[50] !== h || e[51] !== O || e[52] !== D || e[53] !== B || e[54] !== ie || e[55] !== y || e[56] !== t || e[57] !== a || e[58] !== X || e[59] !== z || e[60] !== J ? (W = /* @__PURE__ */ H(Tt, { children: /* @__PURE__ */ H("div", { className: "deckgl-map", children: /* @__PURE__ */ ht(vt, { controller: h, id: y, ref: t, layers: ge, getCursor: O, getTooltip: D, onLoad: se, onResize: B, onViewStateChange: ie, parameters: X, ...a, children: [
|
|
171
171
|
z,
|
|
172
172
|
J
|
|
173
|
-
] }) }) }), e[49] = ge, e[50] = h, e[51] = O, e[52] = D, e[53] = B, e[54] =
|
|
173
|
+
] }) }) }), e[49] = ge, e[50] = h, e[51] = O, e[52] = D, e[53] = B, e[54] = ie, e[55] = y, e[56] = t, e[57] = a, e[58] = X, e[59] = z, e[60] = J, e[61] = W) : W = e[61];
|
|
174
174
|
let ce;
|
|
175
|
-
return e[62] !==
|
|
175
|
+
return e[62] !== L || e[63] !== w || e[64] !== W ? (ce = /* @__PURE__ */ H(_t, { apiKey: w, ...L, children: W }), e[62] = L, e[63] = w, e[64] = W, e[65] = ce) : ce = e[65], ce;
|
|
176
176
|
}
|
|
177
177
|
function os() {
|
|
178
178
|
const o = document.querySelector(".maplibregl-compact-show");
|
|
179
179
|
o == null || o.classList.remove("maplibregl-compact-show");
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function is(o) {
|
|
182
182
|
const {
|
|
183
183
|
type: e,
|
|
184
184
|
props: t
|
|
185
185
|
} = o;
|
|
186
186
|
return new e(t);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function rs(o) {
|
|
189
189
|
return !!(o != null && o.type);
|
|
190
190
|
}
|
|
191
191
|
function as(o) {
|
|
@@ -195,13 +195,13 @@ function ls() {
|
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
197
|
function cs(o) {
|
|
198
|
-
const e =
|
|
198
|
+
const e = k(4), {
|
|
199
199
|
overlayRef: t
|
|
200
200
|
} = o, {
|
|
201
201
|
default: n
|
|
202
202
|
} = Mt(), s = Et();
|
|
203
|
-
let
|
|
204
|
-
return e[0] !== s || e[1] !== n ? (
|
|
203
|
+
let i, r;
|
|
204
|
+
return e[0] !== s || e[1] !== n ? (i = () => n ?? s, r = [n, s], e[0] = s, e[1] = n, e[2] = i, e[3] = r) : (i = e[2], r = e[3]), St(t, i, r), null;
|
|
205
205
|
}
|
|
206
206
|
const K = {
|
|
207
207
|
addFeature: "addFeature",
|
|
@@ -297,21 +297,21 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
297
297
|
return delete s[e], {
|
|
298
298
|
layers: s
|
|
299
299
|
};
|
|
300
|
-
const
|
|
300
|
+
const i = s[e] ?? {
|
|
301
301
|
type: null,
|
|
302
302
|
props: {}
|
|
303
|
-
},
|
|
303
|
+
}, r = [...i.props.extensions ?? [], ...((a = t.props) == null ? void 0 : a.extensions) ?? []].reduce((l, m) => (l.some((c) => c.equals(m)) || l.push(m), l), []);
|
|
304
304
|
return s[e] = {
|
|
305
|
-
...
|
|
305
|
+
...i,
|
|
306
306
|
...t,
|
|
307
307
|
props: {
|
|
308
308
|
id: e,
|
|
309
|
-
...
|
|
309
|
+
...i.props,
|
|
310
310
|
...t.props,
|
|
311
|
-
extensions:
|
|
311
|
+
extensions: r
|
|
312
312
|
},
|
|
313
313
|
legend: {
|
|
314
|
-
...
|
|
314
|
+
...i.legend,
|
|
315
315
|
...t.legend
|
|
316
316
|
}
|
|
317
317
|
}, {
|
|
@@ -327,12 +327,12 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
327
327
|
const e = o.reduce((t, n) => {
|
|
328
328
|
const {
|
|
329
329
|
id: s,
|
|
330
|
-
basemap:
|
|
330
|
+
basemap: i
|
|
331
331
|
} = n;
|
|
332
332
|
return t[s] = {
|
|
333
333
|
isLoaded: !1,
|
|
334
334
|
areLayersLoaded: !1,
|
|
335
|
-
basemap:
|
|
335
|
+
basemap: i,
|
|
336
336
|
instanceRef: {
|
|
337
337
|
current: {}
|
|
338
338
|
},
|
|
@@ -344,59 +344,59 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
344
344
|
}, {});
|
|
345
345
|
return (t, n) => ({
|
|
346
346
|
maps: e,
|
|
347
|
-
setBasemap: (s,
|
|
347
|
+
setBasemap: (s, i) => t((r) => ({
|
|
348
348
|
maps: {
|
|
349
|
-
...
|
|
349
|
+
...r.maps,
|
|
350
350
|
[s]: {
|
|
351
|
-
...
|
|
352
|
-
basemap:
|
|
351
|
+
...r.maps[s],
|
|
352
|
+
basemap: i
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
})),
|
|
356
|
-
setLoad: (s,
|
|
356
|
+
setLoad: (s, i) => t((r) => ({
|
|
357
357
|
maps: {
|
|
358
|
-
...
|
|
358
|
+
...r.maps,
|
|
359
359
|
[s]: {
|
|
360
|
-
...
|
|
361
|
-
isLoaded:
|
|
360
|
+
...r.maps[s],
|
|
361
|
+
isLoaded: i
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
})),
|
|
365
|
-
setLayersLoad: (s,
|
|
365
|
+
setLayersLoad: (s, i) => t((r) => ({
|
|
366
366
|
maps: {
|
|
367
|
-
...
|
|
367
|
+
...r.maps,
|
|
368
368
|
[s]: {
|
|
369
|
-
...
|
|
370
|
-
areLayersLoaded:
|
|
369
|
+
...r.maps[s],
|
|
370
|
+
areLayersLoaded: i
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
})),
|
|
374
374
|
getOverlayInstance: (s) => {
|
|
375
|
-
var
|
|
376
|
-
return (a = (
|
|
375
|
+
var r, a;
|
|
376
|
+
return (a = (r = n().maps[s]) == null ? void 0 : r.overlayRef) == null ? void 0 : a.current;
|
|
377
377
|
},
|
|
378
378
|
getDeckInstance: (s) => {
|
|
379
|
-
var
|
|
380
|
-
return (l = (a = (
|
|
379
|
+
var r, a, l;
|
|
380
|
+
return (l = (a = (r = n().maps[s]) == null ? void 0 : r.instanceRef) == null ? void 0 : a.current) == null ? void 0 : l.deck;
|
|
381
381
|
},
|
|
382
382
|
getViewState: (s) => {
|
|
383
|
-
const
|
|
384
|
-
return
|
|
383
|
+
const r = n().getDeckInstance(s);
|
|
384
|
+
return r == null ? void 0 : r.viewState;
|
|
385
385
|
},
|
|
386
|
-
getViewports: (s,
|
|
386
|
+
getViewports: (s, i) => {
|
|
387
387
|
const a = n().getDeckInstance(s);
|
|
388
|
-
return a == null ? void 0 : a.getViewports(
|
|
388
|
+
return a == null ? void 0 : a.getViewports(i);
|
|
389
389
|
},
|
|
390
|
-
getViewport: (s,
|
|
390
|
+
getViewport: (s, i = 0, r) => {
|
|
391
391
|
var m;
|
|
392
392
|
const l = n().getDeckInstance(s);
|
|
393
|
-
return (m = l == null ? void 0 : l.getViewports(
|
|
393
|
+
return (m = l == null ? void 0 : l.getViewports(r)) == null ? void 0 : m[i];
|
|
394
394
|
},
|
|
395
|
-
addLayers: (s,
|
|
395
|
+
addLayers: (s, i) => t((r) => {
|
|
396
396
|
var c;
|
|
397
397
|
const a = {
|
|
398
|
-
...
|
|
399
|
-
}, l = ((c = a[s]) == null ? void 0 : c.layers) ?? [], m = /* @__PURE__ */ new Set([...l, ...
|
|
398
|
+
...r.maps
|
|
399
|
+
}, l = ((c = a[s]) == null ? void 0 : c.layers) ?? [], m = /* @__PURE__ */ new Set([...l, ...i]);
|
|
400
400
|
return a[s] = {
|
|
401
401
|
...a[s],
|
|
402
402
|
layers: [...m]
|
|
@@ -404,14 +404,14 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
404
404
|
maps: a
|
|
405
405
|
};
|
|
406
406
|
}),
|
|
407
|
-
removeLayers: (s,
|
|
407
|
+
removeLayers: (s, i) => t((r) => {
|
|
408
408
|
var m;
|
|
409
409
|
const a = {
|
|
410
|
-
...
|
|
410
|
+
...r.maps
|
|
411
411
|
}, l = ((m = a[s]) == null ? void 0 : m.layers) ?? [];
|
|
412
412
|
return a[s] = {
|
|
413
413
|
...a[s],
|
|
414
|
-
layers: l.filter((c) => !
|
|
414
|
+
layers: l.filter((c) => !i.includes(c))
|
|
415
415
|
}, {
|
|
416
416
|
maps: a
|
|
417
417
|
};
|
|
@@ -426,67 +426,67 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
426
426
|
viewports: e.viewports,
|
|
427
427
|
updateViewPort: (s) => {
|
|
428
428
|
var a;
|
|
429
|
-
const
|
|
430
|
-
if (!((a =
|
|
431
|
-
const
|
|
429
|
+
const i = n();
|
|
430
|
+
if (!((a = i.maps[s]) != null && a.isLoaded)) return;
|
|
431
|
+
const r = new jt(i.viewStates[s]);
|
|
432
432
|
t((l) => ({
|
|
433
433
|
viewports: {
|
|
434
434
|
...l.viewports,
|
|
435
|
-
[s]:
|
|
435
|
+
[s]: r
|
|
436
436
|
}
|
|
437
437
|
}));
|
|
438
438
|
},
|
|
439
439
|
viewStates: e.viewStates,
|
|
440
|
-
setViewState: (s,
|
|
440
|
+
setViewState: (s, i) => t((r) => ({
|
|
441
441
|
viewStates: {
|
|
442
|
-
...
|
|
442
|
+
...r.viewStates,
|
|
443
443
|
[s]: {
|
|
444
|
-
...
|
|
445
|
-
...
|
|
444
|
+
...r.viewStates[s],
|
|
445
|
+
...i
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
})),
|
|
449
|
-
setZoom: (s,
|
|
449
|
+
setZoom: (s, i) => t((r) => ({
|
|
450
450
|
viewStates: {
|
|
451
|
-
...
|
|
451
|
+
...r.viewStates,
|
|
452
452
|
[s]: {
|
|
453
|
-
...
|
|
454
|
-
zoom:
|
|
453
|
+
...r.viewStates[s],
|
|
454
|
+
zoom: i
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
})),
|
|
458
|
-
setMinZoom: (s,
|
|
458
|
+
setMinZoom: (s, i) => t((r) => ({
|
|
459
459
|
viewStates: {
|
|
460
|
-
...
|
|
460
|
+
...r.viewStates,
|
|
461
461
|
[s]: {
|
|
462
|
-
...
|
|
463
|
-
minZoom:
|
|
462
|
+
...r.viewStates[s],
|
|
463
|
+
minZoom: i
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
})),
|
|
467
|
-
setMaxZoom: (s,
|
|
467
|
+
setMaxZoom: (s, i) => t((r) => ({
|
|
468
468
|
viewStates: {
|
|
469
|
-
...
|
|
469
|
+
...r.viewStates,
|
|
470
470
|
[s]: {
|
|
471
|
-
...
|
|
472
|
-
maxZoom:
|
|
471
|
+
...r.viewStates[s],
|
|
472
|
+
maxZoom: i
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
}))
|
|
476
476
|
});
|
|
477
477
|
}, ys = (o, e) => ({
|
|
478
478
|
fitBounds: (t, n, s) => {
|
|
479
|
-
const
|
|
480
|
-
if (!
|
|
479
|
+
const i = e(), r = i.getViewport(t);
|
|
480
|
+
if (!r) return;
|
|
481
481
|
const l = {
|
|
482
|
-
...
|
|
482
|
+
...r == null ? void 0 : r.fitBounds(n, s == null ? void 0 : s.boundsOptions),
|
|
483
483
|
...s == null ? void 0 : s.viewStateOptions
|
|
484
484
|
};
|
|
485
|
-
|
|
485
|
+
i.setViewState(t, l);
|
|
486
486
|
},
|
|
487
487
|
flyTo: (t, n, s = {}) => {
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
488
|
+
const i = e();
|
|
489
|
+
if (!i.getViewport(t)) return;
|
|
490
490
|
const a = {
|
|
491
491
|
...ms,
|
|
492
492
|
...s == null ? void 0 : s.viewStateOptions
|
|
@@ -494,7 +494,7 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
494
494
|
...n,
|
|
495
495
|
...a
|
|
496
496
|
};
|
|
497
|
-
|
|
497
|
+
i.setViewState(t, l);
|
|
498
498
|
}
|
|
499
499
|
}), hs = (o) => $e()((...e) => ({
|
|
500
500
|
...ps(o)(...e),
|
|
@@ -502,17 +502,17 @@ const Te = "lassoLayer", ke = "maskLayer", ds = {
|
|
|
502
502
|
...ys(...e)
|
|
503
503
|
})), ot = qe({});
|
|
504
504
|
function Ss(o) {
|
|
505
|
-
const e =
|
|
505
|
+
const e = k(5), {
|
|
506
506
|
children: t,
|
|
507
507
|
values: n
|
|
508
508
|
} = o;
|
|
509
509
|
let s;
|
|
510
510
|
e[0] !== n ? (s = hs(n), e[0] = n, e[1] = s) : s = e[1];
|
|
511
|
-
const [
|
|
512
|
-
let
|
|
513
|
-
return e[2] !== t || e[3] !==
|
|
511
|
+
const [i] = fe(s);
|
|
512
|
+
let r;
|
|
513
|
+
return e[2] !== t || e[3] !== i ? (r = /* @__PURE__ */ H(ot.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = r) : r = e[4], r;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function F(o) {
|
|
516
516
|
const e = Ue(ot);
|
|
517
517
|
if (!Object.keys(e).length)
|
|
518
518
|
throw new Error("Missing MapProvider in the tree");
|
|
@@ -533,17 +533,17 @@ function bs() {
|
|
|
533
533
|
}
|
|
534
534
|
function t(h) {
|
|
535
535
|
var y = Object.prototype.toString.call(h);
|
|
536
|
-
return y === "[object RegExp]" || y === "[object Date]" ||
|
|
536
|
+
return y === "[object RegExp]" || y === "[object Date]" || i(h);
|
|
537
537
|
}
|
|
538
538
|
var n = typeof Symbol == "function" && Symbol.for, s = n ? Symbol.for("react.element") : 60103;
|
|
539
|
-
function
|
|
539
|
+
function i(h) {
|
|
540
540
|
return h.$$typeof === s;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function r(h) {
|
|
543
543
|
return Array.isArray(h) ? [] : {};
|
|
544
544
|
}
|
|
545
545
|
function a(h, y) {
|
|
546
|
-
return y.clone !== !1 && y.isMergeableObject(h) ? f(
|
|
546
|
+
return y.clone !== !1 && y.isMergeableObject(h) ? f(r(h), h, y) : h;
|
|
547
547
|
}
|
|
548
548
|
function l(h, y, T) {
|
|
549
549
|
return h.concat(y).map(function(S) {
|
|
@@ -584,8 +584,8 @@ function bs() {
|
|
|
584
584
|
}
|
|
585
585
|
function f(h, y, T) {
|
|
586
586
|
T = T || {}, T.arrayMerge = T.arrayMerge || l, T.isMergeableObject = T.isMergeableObject || o, T.cloneUnlessOtherwiseSpecified = a;
|
|
587
|
-
var S = Array.isArray(y), v = Array.isArray(h),
|
|
588
|
-
return
|
|
587
|
+
var S = Array.isArray(y), v = Array.isArray(h), L = S === v;
|
|
588
|
+
return L ? S ? T.arrayMerge(h, y, T) : g(h, y, T) : a(y, T);
|
|
589
589
|
}
|
|
590
590
|
f.all = function(y, T) {
|
|
591
591
|
if (!Array.isArray(y))
|
|
@@ -619,7 +619,7 @@ function Ls({
|
|
|
619
619
|
getFillColor: n,
|
|
620
620
|
pointColor: s
|
|
621
621
|
}) {
|
|
622
|
-
const
|
|
622
|
+
const i = Me(o, {
|
|
623
623
|
modeConfig: {
|
|
624
624
|
// // We force distance due to conversion is addressed at feature getText level
|
|
625
625
|
// formatTooltip: (_distance: number) => {
|
|
@@ -628,7 +628,7 @@ function Ls({
|
|
|
628
628
|
preventOverlappingLines: !0
|
|
629
629
|
},
|
|
630
630
|
onEdit: e
|
|
631
|
-
}),
|
|
631
|
+
}), r = Me(ds, {
|
|
632
632
|
getTentativeLineColor: t,
|
|
633
633
|
getTentativeFillColor: n,
|
|
634
634
|
getLineColor: t,
|
|
@@ -637,20 +637,20 @@ function Ls({
|
|
|
637
637
|
getEditHandlePointOutlineColor: s.outline,
|
|
638
638
|
dataComparator: (l, m) => l.features[0] === m.features[0]
|
|
639
639
|
});
|
|
640
|
-
return Me(
|
|
640
|
+
return Me(r, i);
|
|
641
641
|
}
|
|
642
642
|
const _s = (o) => $e()((e) => ({
|
|
643
643
|
data: o.reduce((n, s) => {
|
|
644
644
|
const {
|
|
645
|
-
enabled:
|
|
646
|
-
mapId:
|
|
645
|
+
enabled: i = !1,
|
|
646
|
+
mapId: r,
|
|
647
647
|
modeInstance: a,
|
|
648
648
|
modes: l = Be,
|
|
649
649
|
modeSelected: m = Be.polygon.value,
|
|
650
650
|
values: c = {}
|
|
651
651
|
} = s;
|
|
652
|
-
return n[
|
|
653
|
-
enabled:
|
|
652
|
+
return n[r] = {
|
|
653
|
+
enabled: i,
|
|
654
654
|
modeInstance: a,
|
|
655
655
|
modes: l,
|
|
656
656
|
modeSelected: m,
|
|
@@ -658,49 +658,49 @@ const _s = (o) => $e()((e) => ({
|
|
|
658
658
|
}, n;
|
|
659
659
|
}, {}),
|
|
660
660
|
setEnabled: (n, s) => {
|
|
661
|
-
e((
|
|
661
|
+
e((i) => ({
|
|
662
662
|
data: {
|
|
663
|
-
...
|
|
663
|
+
...i.data,
|
|
664
664
|
[n]: {
|
|
665
|
-
...
|
|
665
|
+
...i.data[n],
|
|
666
666
|
enabled: s,
|
|
667
667
|
visible: s
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
}));
|
|
671
671
|
},
|
|
672
|
-
setValue: (n, s,
|
|
673
|
-
e((
|
|
672
|
+
setValue: (n, s, i) => {
|
|
673
|
+
e((r) => {
|
|
674
674
|
const a = {
|
|
675
|
-
...
|
|
675
|
+
...r.data[n].values
|
|
676
676
|
}, l = a[s] ?? {
|
|
677
677
|
type: "mask"
|
|
678
678
|
};
|
|
679
679
|
return a[s] = {
|
|
680
680
|
...l,
|
|
681
|
-
...
|
|
681
|
+
...i,
|
|
682
682
|
id: s
|
|
683
|
-
},
|
|
683
|
+
}, i || delete a[s], {
|
|
684
684
|
data: {
|
|
685
|
-
...
|
|
685
|
+
...r.data,
|
|
686
686
|
[n]: {
|
|
687
|
-
...
|
|
687
|
+
...r.data[n],
|
|
688
688
|
values: a
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
};
|
|
692
692
|
});
|
|
693
693
|
},
|
|
694
|
-
setVisibility: (n, s,
|
|
695
|
-
e((
|
|
694
|
+
setVisibility: (n, s, i) => {
|
|
695
|
+
e((r) => {
|
|
696
696
|
const a = {
|
|
697
|
-
...
|
|
697
|
+
...r.data[n].values
|
|
698
698
|
}, l = a[s] ?? {};
|
|
699
|
-
return l.properties.visible =
|
|
699
|
+
return l.properties.visible = i, {
|
|
700
700
|
data: {
|
|
701
|
-
...
|
|
701
|
+
...r.data,
|
|
702
702
|
[n]: {
|
|
703
|
-
...
|
|
703
|
+
...r.data[n],
|
|
704
704
|
values: {
|
|
705
705
|
...a,
|
|
706
706
|
[s]: l
|
|
@@ -711,41 +711,41 @@ const _s = (o) => $e()((e) => ({
|
|
|
711
711
|
});
|
|
712
712
|
},
|
|
713
713
|
setModeSelected: (n, s) => {
|
|
714
|
-
e((
|
|
714
|
+
e((i) => ({
|
|
715
715
|
data: {
|
|
716
|
-
...
|
|
716
|
+
...i.data,
|
|
717
717
|
[n]: {
|
|
718
|
-
...
|
|
718
|
+
...i.data[n],
|
|
719
719
|
modeSelected: s
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
}));
|
|
723
723
|
},
|
|
724
724
|
setModeInstance: (n, s) => {
|
|
725
|
-
e((
|
|
725
|
+
e((i) => ({
|
|
726
726
|
data: {
|
|
727
|
-
...
|
|
727
|
+
...i.data,
|
|
728
728
|
[n]: {
|
|
729
|
-
...
|
|
729
|
+
...i.data[n],
|
|
730
730
|
modeInstance: s
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
}));
|
|
734
734
|
}
|
|
735
|
-
})),
|
|
735
|
+
})), it = qe({});
|
|
736
736
|
function Ps(o) {
|
|
737
|
-
const e =
|
|
737
|
+
const e = k(5), {
|
|
738
738
|
children: t,
|
|
739
739
|
values: n
|
|
740
740
|
} = o;
|
|
741
741
|
let s;
|
|
742
742
|
e[0] !== n ? (s = () => _s(n), e[0] = n, e[1] = s) : s = e[1];
|
|
743
|
-
const [
|
|
744
|
-
let
|
|
745
|
-
return e[2] !== t || e[3] !==
|
|
743
|
+
const [i] = fe(s);
|
|
744
|
+
let r;
|
|
745
|
+
return e[2] !== t || e[3] !== i ? (r = /* @__PURE__ */ H(it.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = r) : r = e[4], r;
|
|
746
746
|
}
|
|
747
747
|
function j(o) {
|
|
748
|
-
const e = Ue(
|
|
748
|
+
const e = Ue(it);
|
|
749
749
|
if (!Object.keys(e).length)
|
|
750
750
|
throw new Error("Missing LassoToolsProvider in the tree");
|
|
751
751
|
return Ve(e, o);
|
|
@@ -760,7 +760,7 @@ function Es({
|
|
|
760
760
|
}), n = j((u) => u.setEnabled), s = j((u) => {
|
|
761
761
|
var g;
|
|
762
762
|
return (g = u.data[o]) == null ? void 0 : g.values;
|
|
763
|
-
}),
|
|
763
|
+
}), i = j((u) => u.setValue), r = j((u) => u.setVisibility), a = j((u) => {
|
|
764
764
|
var g;
|
|
765
765
|
return (g = u.data[o]) == null ? void 0 : g.modeSelected;
|
|
766
766
|
}), l = j((u) => u.setModeSelected), m = j((u) => {
|
|
@@ -799,13 +799,13 @@ function Es({
|
|
|
799
799
|
mask: p
|
|
800
800
|
// draw,
|
|
801
801
|
},
|
|
802
|
-
setValue: $((u) =>
|
|
802
|
+
setValue: $((u) => i(o, u), [o, i]),
|
|
803
803
|
setEnabled: $((u) => n(o, u), [o, n]),
|
|
804
|
-
setVisibility: $((u, g) =>
|
|
804
|
+
setVisibility: $((u, g) => r(o, u, g), [o, r]),
|
|
805
805
|
setModeSelected: d
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function rt({
|
|
809
809
|
values: o
|
|
810
810
|
}) {
|
|
811
811
|
return Object.values(o ?? {}).filter((e) => e.type === "mask");
|
|
@@ -828,12 +828,12 @@ function Ce({
|
|
|
828
828
|
autoSplitNumber: Ke
|
|
829
829
|
}
|
|
830
830
|
}) {
|
|
831
|
-
const
|
|
831
|
+
const i = e === xe["m-km"], r = e === xe["ft-mi"], a = i || r;
|
|
832
832
|
let l, m;
|
|
833
833
|
if (a) {
|
|
834
834
|
const c = o < (n ?? Ke);
|
|
835
835
|
let p = c ? R.meter : R.kilometer;
|
|
836
|
-
l = c ? Le.meter : Le.kilometer,
|
|
836
|
+
l = c ? Le.meter : Le.kilometer, r && (l = c ? Le.feet : Le.mile, p = c ? R.feet : R.mile), m = Qe(o, p);
|
|
837
837
|
} else
|
|
838
838
|
l = Le[e], m = Qe(o, e);
|
|
839
839
|
return `${st(m, t, {
|
|
@@ -865,15 +865,15 @@ function at(o, e, t) {
|
|
|
865
865
|
turfOptions: {
|
|
866
866
|
units: "kilometers"
|
|
867
867
|
}
|
|
868
|
-
},
|
|
869
|
-
let
|
|
870
|
-
n ?
|
|
868
|
+
}, i = s == null ? void 0 : s.units;
|
|
869
|
+
let r;
|
|
870
|
+
n ? r = n(o) : r = `${parseFloat(o.toString()).toFixed(2)} ${i}`;
|
|
871
871
|
const {
|
|
872
872
|
measurementCallback: a
|
|
873
873
|
} = t;
|
|
874
874
|
return a && a(o), [{
|
|
875
875
|
position: e,
|
|
876
|
-
text:
|
|
876
|
+
text: r
|
|
877
877
|
}];
|
|
878
878
|
}
|
|
879
879
|
return [];
|
|
@@ -893,12 +893,12 @@ class Cs extends Rt {
|
|
|
893
893
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
894
894
|
const {
|
|
895
895
|
picks: s
|
|
896
|
-
} = t,
|
|
896
|
+
} = t, i = Dt(s), r = this.getClickSequence();
|
|
897
897
|
let a = !1;
|
|
898
|
-
!
|
|
898
|
+
!i && !this.allowOverlapping(n) && (this.addClickSequence(t), a = !0), this.area = Ne({
|
|
899
899
|
type: "Polygon",
|
|
900
900
|
coordinates: [this.getClickSequence()]
|
|
901
|
-
}), this.isFinalizedEdition(
|
|
901
|
+
}), this.isFinalizedEdition(r, i) ? this.finalizeEdition(n) : a && n.onEdit({
|
|
902
902
|
// data is the same
|
|
903
903
|
updatedData: n.data,
|
|
904
904
|
editType: "addTentativePosition",
|
|
@@ -916,8 +916,8 @@ class Cs extends Rt {
|
|
|
916
916
|
super.handlePointerMove(t, n);
|
|
917
917
|
const s = this.getTentativeGuide(n);
|
|
918
918
|
if (s && s.geometry.type === "Polygon") {
|
|
919
|
-
const
|
|
920
|
-
this.area = Ne(s), this.tooltips = at(this.area,
|
|
919
|
+
const i = It(s);
|
|
920
|
+
this.area = Ne(s), this.tooltips = at(this.area, i.geometry.coordinates, n.modeConfig);
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
923
|
resetClickSequence() {
|
|
@@ -938,19 +938,19 @@ class Cs extends Rt {
|
|
|
938
938
|
return t.length > 2 && n !== void 0 && (s[0] === 0 || s[0] === t.length - 1);
|
|
939
939
|
}
|
|
940
940
|
allowOverlapping(t) {
|
|
941
|
-
var
|
|
941
|
+
var i;
|
|
942
942
|
let n = !1;
|
|
943
943
|
const s = this.getClickSequence();
|
|
944
944
|
if (s.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
945
|
-
((
|
|
946
|
-
const
|
|
945
|
+
((i = t.modeConfig) != null && i.preventOverlappingLines)) {
|
|
946
|
+
const r = {
|
|
947
947
|
type: "LineString",
|
|
948
948
|
coordinates: [...s, s[0]]
|
|
949
949
|
}, a = {
|
|
950
950
|
type: "LineString",
|
|
951
951
|
coordinates: [...s.slice(0, s.length - 1)]
|
|
952
952
|
};
|
|
953
|
-
Bt(
|
|
953
|
+
Bt(r, a).features.length > 0 && (n = !0);
|
|
954
954
|
}
|
|
955
955
|
return n;
|
|
956
956
|
}
|
|
@@ -963,12 +963,12 @@ class Cs extends Rt {
|
|
|
963
963
|
type: "FeatureCollection",
|
|
964
964
|
features: []
|
|
965
965
|
};
|
|
966
|
-
const
|
|
967
|
-
this._isMeasuringSessionFinished = !0,
|
|
968
|
-
...
|
|
966
|
+
const i = this.getAddFeatureOrBooleanPolygonAction(s, t);
|
|
967
|
+
this._isMeasuringSessionFinished = !0, i && (this.resultPolygon = i.updatedData, t.onEdit({
|
|
968
|
+
...i,
|
|
969
969
|
editType: K.addPosition,
|
|
970
970
|
editContext: {
|
|
971
|
-
...
|
|
971
|
+
...i.editContext,
|
|
972
972
|
distance: this.area,
|
|
973
973
|
positions: this.getClickSequence(),
|
|
974
974
|
finished: this._isMeasuringSessionFinished
|
|
@@ -987,13 +987,13 @@ class Cs extends Rt {
|
|
|
987
987
|
meters: t,
|
|
988
988
|
locale: n,
|
|
989
989
|
unit: s,
|
|
990
|
-
options:
|
|
990
|
+
options: i
|
|
991
991
|
}) {
|
|
992
992
|
return Ce({
|
|
993
993
|
meters: t,
|
|
994
994
|
locale: n,
|
|
995
995
|
unit: s,
|
|
996
|
-
options:
|
|
996
|
+
options: i
|
|
997
997
|
}) + "2";
|
|
998
998
|
}
|
|
999
999
|
}
|
|
@@ -1063,13 +1063,13 @@ class Fs extends Xe {
|
|
|
1063
1063
|
meters: t,
|
|
1064
1064
|
locale: n,
|
|
1065
1065
|
unit: s,
|
|
1066
|
-
options:
|
|
1066
|
+
options: i
|
|
1067
1067
|
}) {
|
|
1068
1068
|
return Ce({
|
|
1069
1069
|
meters: t,
|
|
1070
1070
|
locale: n,
|
|
1071
1071
|
unit: s,
|
|
1072
|
-
options:
|
|
1072
|
+
options: i
|
|
1073
1073
|
}) + "2";
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
@@ -1092,7 +1092,7 @@ class lt extends xt {
|
|
|
1092
1092
|
const {
|
|
1093
1093
|
key: n
|
|
1094
1094
|
} = e, s = this.getClickSequence().length;
|
|
1095
|
-
let
|
|
1095
|
+
let i = K.finish;
|
|
1096
1096
|
switch (n) {
|
|
1097
1097
|
case "Escape":
|
|
1098
1098
|
t.onEdit({
|
|
@@ -1105,9 +1105,9 @@ class lt extends xt {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
break;
|
|
1107
1107
|
case "Enter":
|
|
1108
|
-
this._isMeasuringSessionFinished = !0, s === 1 && (this.resetClickSequence(),
|
|
1108
|
+
this._isMeasuringSessionFinished = !0, s === 1 && (this.resetClickSequence(), i = K.cancel), t.onUpdateCursor("cell"), t.onEdit({
|
|
1109
1109
|
updatedData: t.data,
|
|
1110
|
-
editType:
|
|
1110
|
+
editType: i,
|
|
1111
1111
|
editContext: {
|
|
1112
1112
|
finished: this._isMeasuringSessionFinished
|
|
1113
1113
|
}
|
|
@@ -1267,9 +1267,9 @@ function qs({
|
|
|
1267
1267
|
labels: Ae.labels
|
|
1268
1268
|
},
|
|
1269
1269
|
layerProps: s = {},
|
|
1270
|
-
defaultType:
|
|
1270
|
+
defaultType: i = "mask"
|
|
1271
1271
|
}) {
|
|
1272
|
-
const
|
|
1272
|
+
const r = j((b) => {
|
|
1273
1273
|
var P;
|
|
1274
1274
|
return (P = b.data[e]) == null ? void 0 : P.enabled;
|
|
1275
1275
|
}), a = j((b) => b.setEnabled), l = j((b) => {
|
|
@@ -1281,10 +1281,10 @@ function qs({
|
|
|
1281
1281
|
}), p = j((b) => {
|
|
1282
1282
|
var P;
|
|
1283
1283
|
return (P = b.data[e]) == null ? void 0 : P.modeSelected;
|
|
1284
|
-
}), d = _e((b) => b.setLayer), u =
|
|
1284
|
+
}), d = _e((b) => b.setLayer), u = F((b) => b.addLayers), g = F((b) => b.removeLayers), f = F(tt((b) => {
|
|
1285
1285
|
var P;
|
|
1286
|
-
return (P = b.maps[e]) == null ? void 0 : P.layers.filter((
|
|
1287
|
-
})), M =
|
|
1286
|
+
return (P = b.maps[e]) == null ? void 0 : P.layers.filter((C) => !xs.includes(C));
|
|
1287
|
+
})), M = F((b) => b.getDeckInstance), h = Ee({}), y = de(() => rt({
|
|
1288
1288
|
values: l
|
|
1289
1289
|
}), [l]), T = de(() => ({
|
|
1290
1290
|
type: "FeatureCollection",
|
|
@@ -1294,15 +1294,15 @@ function qs({
|
|
|
1294
1294
|
properties: b.properties,
|
|
1295
1295
|
id: b.id
|
|
1296
1296
|
}))
|
|
1297
|
-
}), [y]), S = de(() => y.filter((b) => b.properties.visible).map((b) => b.id), [y]), [v,
|
|
1297
|
+
}), [y]), S = de(() => y.filter((b) => b.properties.visible).map((b) => b.id), [y]), [v, L] = fe(T), [E, w] = fe([]), O = $(() => {
|
|
1298
1298
|
const b = {
|
|
1299
1299
|
...T,
|
|
1300
1300
|
features: T.features.filter((P) => {
|
|
1301
|
-
var
|
|
1302
|
-
return (
|
|
1301
|
+
var C;
|
|
1302
|
+
return (C = P.properties) == null ? void 0 : C.visible;
|
|
1303
1303
|
})
|
|
1304
1304
|
};
|
|
1305
|
-
|
|
1305
|
+
L(b);
|
|
1306
1306
|
}, [T]);
|
|
1307
1307
|
Y(() => {
|
|
1308
1308
|
O();
|
|
@@ -1312,7 +1312,7 @@ function qs({
|
|
|
1312
1312
|
g(e, [Te]);
|
|
1313
1313
|
}), [u, e, g]);
|
|
1314
1314
|
const U = $(() => {
|
|
1315
|
-
O(),
|
|
1315
|
+
O(), w([]), a(e, !1);
|
|
1316
1316
|
}, [e, O, a]), V = $(({
|
|
1317
1317
|
editType: b,
|
|
1318
1318
|
updatedData: P
|
|
@@ -1321,22 +1321,22 @@ function qs({
|
|
|
1321
1321
|
U();
|
|
1322
1322
|
return;
|
|
1323
1323
|
}
|
|
1324
|
-
|
|
1324
|
+
L(P), b !== K.updateTentativeFeature && b === K.addFeature && (p !== "edit" && (D.current = D.current + 1), P.features.forEach((C, A) => {
|
|
1325
1325
|
var B;
|
|
1326
|
-
(B =
|
|
1327
|
-
const x =
|
|
1326
|
+
(B = C.properties).label ?? (B.label = `${n == null ? void 0 : n.mask} ${D.current}`), C.properties.index = A, C.properties.visible = C.properties.visible ?? !0;
|
|
1327
|
+
const x = C.id ?? crypto.randomUUID();
|
|
1328
1328
|
m(e, x, {
|
|
1329
|
-
geometry:
|
|
1330
|
-
properties:
|
|
1329
|
+
geometry: C.geometry,
|
|
1330
|
+
properties: C.properties,
|
|
1331
1331
|
// visible: true,
|
|
1332
|
-
type:
|
|
1332
|
+
type: i
|
|
1333
1333
|
});
|
|
1334
1334
|
}), U());
|
|
1335
|
-
}, [
|
|
1335
|
+
}, [i, U, n == null ? void 0 : n.mask, e, p, m]);
|
|
1336
1336
|
return Y(() => {
|
|
1337
|
-
const b =
|
|
1337
|
+
const b = r, {
|
|
1338
1338
|
border: P,
|
|
1339
|
-
point:
|
|
1339
|
+
point: C,
|
|
1340
1340
|
fill: A
|
|
1341
1341
|
} = t.colors.editing, {
|
|
1342
1342
|
border: x,
|
|
@@ -1352,20 +1352,20 @@ function qs({
|
|
|
1352
1352
|
},
|
|
1353
1353
|
onClick: (G) => {
|
|
1354
1354
|
const I = G;
|
|
1355
|
-
I.isGuide ||
|
|
1355
|
+
I.isGuide || w([I.index]);
|
|
1356
1356
|
}
|
|
1357
1357
|
},
|
|
1358
1358
|
getLineColor: (G) => E[0] === G.properties.index ? P : x,
|
|
1359
1359
|
getFillColor: (G) => E[0] === G.properties.index ? A : B,
|
|
1360
1360
|
pointColor: {
|
|
1361
|
-
fill:
|
|
1361
|
+
fill: C,
|
|
1362
1362
|
outline: P
|
|
1363
1363
|
},
|
|
1364
1364
|
onEdit: V,
|
|
1365
1365
|
mode: b ? c : qt
|
|
1366
1366
|
});
|
|
1367
1367
|
d(Te, N);
|
|
1368
|
-
}, [v,
|
|
1368
|
+
}, [v, r, s.mask, S, c, V, E, d, t.colors.editing, t.colors.finished]), Y(() => {
|
|
1369
1369
|
const b = {
|
|
1370
1370
|
...Pe,
|
|
1371
1371
|
data: T,
|
|
@@ -1382,21 +1382,19 @@ function qs({
|
|
|
1382
1382
|
};
|
|
1383
1383
|
}, [u, e, T, S, g, d]), Y(() => {
|
|
1384
1384
|
f == null || f.forEach((b) => {
|
|
1385
|
-
var
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
}
|
|
1390
|
-
const P = !i && h.current[b];
|
|
1385
|
+
var A;
|
|
1386
|
+
const P = (A = M(e)) == null ? void 0 : A.props.layers.find((x) => x.props.id === b);
|
|
1387
|
+
r && (h.current[b] = P == null ? void 0 : P.props.pickable);
|
|
1388
|
+
const C = !r && (h.current[b] ?? (P == null ? void 0 : P.props.pickable));
|
|
1391
1389
|
d(b, {
|
|
1392
1390
|
props: {
|
|
1393
|
-
pickable:
|
|
1391
|
+
pickable: C,
|
|
1394
1392
|
extensions: [new $t()],
|
|
1395
|
-
maskId: !
|
|
1393
|
+
maskId: !r && S.length ? ke : void 0
|
|
1396
1394
|
}
|
|
1397
1395
|
});
|
|
1398
1396
|
});
|
|
1399
|
-
}, [
|
|
1397
|
+
}, [r, M, e, f, S.length, d]), o;
|
|
1400
1398
|
}
|
|
1401
1399
|
qs.Controls = Es;
|
|
1402
1400
|
function Us({
|
|
@@ -1422,8 +1420,8 @@ function $s({
|
|
|
1422
1420
|
locale: t,
|
|
1423
1421
|
enabled: n,
|
|
1424
1422
|
unit: s,
|
|
1425
|
-
onEdit:
|
|
1426
|
-
guideColor:
|
|
1423
|
+
onEdit: i,
|
|
1424
|
+
guideColor: r,
|
|
1427
1425
|
pointColor: a,
|
|
1428
1426
|
textOptions: l
|
|
1429
1427
|
}) {
|
|
@@ -1438,7 +1436,7 @@ function $s({
|
|
|
1438
1436
|
}
|
|
1439
1437
|
},
|
|
1440
1438
|
...n && {
|
|
1441
|
-
onEdit:
|
|
1439
|
+
onEdit: i
|
|
1442
1440
|
},
|
|
1443
1441
|
_subLayerProps: {
|
|
1444
1442
|
tooltips: {
|
|
@@ -1466,20 +1464,20 @@ function $s({
|
|
|
1466
1464
|
}), c = Me(ws, {
|
|
1467
1465
|
_subLayerProps: {
|
|
1468
1466
|
guides: {
|
|
1469
|
-
getLineColor:
|
|
1470
|
-
getFillColor:
|
|
1467
|
+
getLineColor: r,
|
|
1468
|
+
getFillColor: r.with(3, 20)
|
|
1471
1469
|
}
|
|
1472
1470
|
},
|
|
1473
1471
|
getEditHandlePointColor: a,
|
|
1474
|
-
getEditHandlePointOutlineColor:
|
|
1472
|
+
getEditHandlePointOutlineColor: r
|
|
1475
1473
|
});
|
|
1476
1474
|
return Me(c, m);
|
|
1477
1475
|
}
|
|
1478
1476
|
const Vs = (o) => $e()((e) => ({
|
|
1479
1477
|
measurements: o.reduce((n, s) => {
|
|
1480
1478
|
const {
|
|
1481
|
-
mapId:
|
|
1482
|
-
modeSelected:
|
|
1479
|
+
mapId: i,
|
|
1480
|
+
modeSelected: r,
|
|
1483
1481
|
modes: a = Rs,
|
|
1484
1482
|
units: l = Ds,
|
|
1485
1483
|
distance: m = 0,
|
|
@@ -1490,10 +1488,10 @@ const Vs = (o) => $e()((e) => ({
|
|
|
1490
1488
|
unit: g = xe["m-km"],
|
|
1491
1489
|
enabled: f = !1
|
|
1492
1490
|
} = s;
|
|
1493
|
-
return n[
|
|
1491
|
+
return n[i] = {
|
|
1494
1492
|
modes: a,
|
|
1495
1493
|
units: l,
|
|
1496
|
-
modeSelected:
|
|
1494
|
+
modeSelected: r,
|
|
1497
1495
|
distance: m,
|
|
1498
1496
|
finished: c,
|
|
1499
1497
|
locale: p,
|
|
@@ -1505,88 +1503,88 @@ const Vs = (o) => $e()((e) => ({
|
|
|
1505
1503
|
}, {}),
|
|
1506
1504
|
mode: lt,
|
|
1507
1505
|
setModeInstance: (n, s) => {
|
|
1508
|
-
e((
|
|
1506
|
+
e((i) => ({
|
|
1509
1507
|
measurements: {
|
|
1510
|
-
...
|
|
1508
|
+
...i.measurements,
|
|
1511
1509
|
[n]: {
|
|
1512
|
-
...
|
|
1510
|
+
...i.measurements[n],
|
|
1513
1511
|
modeInstance: s
|
|
1514
1512
|
}
|
|
1515
1513
|
}
|
|
1516
1514
|
}));
|
|
1517
1515
|
},
|
|
1518
1516
|
setModeSelected: (n, s) => {
|
|
1519
|
-
e((
|
|
1517
|
+
e((i) => ({
|
|
1520
1518
|
measurements: {
|
|
1521
|
-
...
|
|
1519
|
+
...i.measurements,
|
|
1522
1520
|
[n]: {
|
|
1523
|
-
...
|
|
1521
|
+
...i.measurements[n],
|
|
1524
1522
|
modeSelected: s
|
|
1525
1523
|
}
|
|
1526
1524
|
}
|
|
1527
1525
|
}));
|
|
1528
1526
|
},
|
|
1529
1527
|
setFinished: (n, s) => {
|
|
1530
|
-
e((
|
|
1528
|
+
e((i) => ({
|
|
1531
1529
|
measurements: {
|
|
1532
|
-
...
|
|
1530
|
+
...i.measurements,
|
|
1533
1531
|
[n]: {
|
|
1534
|
-
...
|
|
1532
|
+
...i.measurements[n],
|
|
1535
1533
|
finished: s
|
|
1536
1534
|
}
|
|
1537
1535
|
}
|
|
1538
1536
|
}));
|
|
1539
1537
|
},
|
|
1540
1538
|
setDistance: (n, s) => {
|
|
1541
|
-
e((
|
|
1539
|
+
e((i) => ({
|
|
1542
1540
|
measurements: {
|
|
1543
|
-
...
|
|
1541
|
+
...i.measurements,
|
|
1544
1542
|
[n]: {
|
|
1545
|
-
...
|
|
1543
|
+
...i.measurements[n],
|
|
1546
1544
|
distance: s
|
|
1547
1545
|
}
|
|
1548
1546
|
}
|
|
1549
1547
|
}));
|
|
1550
1548
|
},
|
|
1551
1549
|
setUnit: (n, s) => {
|
|
1552
|
-
e((
|
|
1550
|
+
e((i) => ({
|
|
1553
1551
|
measurements: {
|
|
1554
|
-
...
|
|
1552
|
+
...i.measurements,
|
|
1555
1553
|
[n]: {
|
|
1556
|
-
...
|
|
1554
|
+
...i.measurements[n],
|
|
1557
1555
|
unit: s
|
|
1558
1556
|
}
|
|
1559
1557
|
}
|
|
1560
1558
|
}));
|
|
1561
1559
|
},
|
|
1562
1560
|
setLocale: (n, s) => {
|
|
1563
|
-
e((
|
|
1561
|
+
e((i) => ({
|
|
1564
1562
|
measurements: {
|
|
1565
|
-
...
|
|
1563
|
+
...i.measurements,
|
|
1566
1564
|
[n]: {
|
|
1567
|
-
...
|
|
1565
|
+
...i.measurements[n],
|
|
1568
1566
|
locale: s
|
|
1569
1567
|
}
|
|
1570
1568
|
}
|
|
1571
1569
|
}));
|
|
1572
1570
|
},
|
|
1573
1571
|
setPositions: (n, s) => {
|
|
1574
|
-
e((
|
|
1572
|
+
e((i) => ({
|
|
1575
1573
|
measurements: {
|
|
1576
|
-
...
|
|
1574
|
+
...i.measurements,
|
|
1577
1575
|
[n]: {
|
|
1578
|
-
...
|
|
1576
|
+
...i.measurements[n],
|
|
1579
1577
|
positions: [...s]
|
|
1580
1578
|
}
|
|
1581
1579
|
}
|
|
1582
1580
|
}));
|
|
1583
1581
|
},
|
|
1584
1582
|
setEnabled: (n, s) => {
|
|
1585
|
-
e((
|
|
1583
|
+
e((i) => ({
|
|
1586
1584
|
measurements: {
|
|
1587
|
-
...
|
|
1585
|
+
...i.measurements,
|
|
1588
1586
|
[n]: {
|
|
1589
|
-
...
|
|
1587
|
+
...i.measurements[n],
|
|
1590
1588
|
enabled: s
|
|
1591
1589
|
}
|
|
1592
1590
|
}
|
|
@@ -1594,15 +1592,15 @@ const Vs = (o) => $e()((e) => ({
|
|
|
1594
1592
|
}
|
|
1595
1593
|
})), ct = qe({});
|
|
1596
1594
|
function js(o) {
|
|
1597
|
-
const e =
|
|
1595
|
+
const e = k(5), {
|
|
1598
1596
|
children: t,
|
|
1599
1597
|
values: n
|
|
1600
1598
|
} = o;
|
|
1601
1599
|
let s;
|
|
1602
1600
|
e[0] !== n ? (s = Vs(n), e[0] = n, e[1] = s) : s = e[1];
|
|
1603
|
-
const [
|
|
1604
|
-
let
|
|
1605
|
-
return e[2] !== t || e[3] !==
|
|
1601
|
+
const [i] = fe(s);
|
|
1602
|
+
let r;
|
|
1603
|
+
return e[2] !== t || e[3] !== i ? (r = /* @__PURE__ */ H(ct.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = r) : r = e[4], r;
|
|
1606
1604
|
}
|
|
1607
1605
|
function q(o) {
|
|
1608
1606
|
const e = Ue(ct);
|
|
@@ -1611,67 +1609,67 @@ function q(o) {
|
|
|
1611
1609
|
return Ve(e, o);
|
|
1612
1610
|
}
|
|
1613
1611
|
function ut(o) {
|
|
1614
|
-
const e =
|
|
1612
|
+
const e = k(74), {
|
|
1615
1613
|
mapId: t
|
|
1616
1614
|
} = o;
|
|
1617
1615
|
let n;
|
|
1618
|
-
e[0] !== t ? (n = (
|
|
1616
|
+
e[0] !== t ? (n = (_) => _.measurements[t].modes, e[0] = t, e[1] = n) : n = e[1];
|
|
1619
1617
|
const s = q(n);
|
|
1620
|
-
let
|
|
1621
|
-
e[2] !== t ? (
|
|
1622
|
-
const
|
|
1618
|
+
let i;
|
|
1619
|
+
e[2] !== t ? (i = (_) => _.measurements[t].units, e[2] = t, e[3] = i) : i = e[3];
|
|
1620
|
+
const r = q(i);
|
|
1623
1621
|
let a;
|
|
1624
|
-
e[4] !== t ? (a = (
|
|
1622
|
+
e[4] !== t ? (a = (_) => _.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
1625
1623
|
const l = q(a), m = q(Zs);
|
|
1626
1624
|
let c;
|
|
1627
|
-
e[6] !== m || e[7] !== t ? (c = (
|
|
1625
|
+
e[6] !== m || e[7] !== t ? (c = (_) => m(t, _), e[6] = m, e[7] = t, e[8] = c) : c = e[8];
|
|
1628
1626
|
const p = c;
|
|
1629
1627
|
let d;
|
|
1630
|
-
e[9] !== t ? (d = (
|
|
1628
|
+
e[9] !== t ? (d = (_) => _.measurements[t].clearLayerOnStart, e[9] = t, e[10] = d) : d = e[10];
|
|
1631
1629
|
const u = q(d);
|
|
1632
1630
|
let g;
|
|
1633
|
-
e[11] !== t ? (g = (
|
|
1631
|
+
e[11] !== t ? (g = (_) => _.measurements[t].enabled, e[11] = t, e[12] = g) : g = e[12];
|
|
1634
1632
|
const f = q(g), M = q(Gs);
|
|
1635
1633
|
let h;
|
|
1636
|
-
e[13] !== M || e[14] !== t ? (h = (
|
|
1634
|
+
e[13] !== M || e[14] !== t ? (h = (_) => M(t, _), e[13] = M, e[14] = t, e[15] = h) : h = e[15];
|
|
1637
1635
|
const y = h;
|
|
1638
1636
|
let T;
|
|
1639
|
-
e[16] !== t ? (T = (
|
|
1637
|
+
e[16] !== t ? (T = (_) => _.measurements[t].modeSelected, e[16] = t, e[17] = T) : T = e[17];
|
|
1640
1638
|
const S = q(T), v = q(Ks);
|
|
1641
|
-
let
|
|
1642
|
-
e[18] !== v || e[19] !== t || e[20] !== y ? (
|
|
1643
|
-
y(!!
|
|
1644
|
-
}, e[18] = v, e[19] = t, e[20] = y, e[21] =
|
|
1645
|
-
const E =
|
|
1646
|
-
let
|
|
1647
|
-
e[22] !== t ? (
|
|
1648
|
-
const O = q(
|
|
1639
|
+
let L;
|
|
1640
|
+
e[18] !== v || e[19] !== t || e[20] !== y ? (L = (_) => {
|
|
1641
|
+
y(!!_), v(t, _);
|
|
1642
|
+
}, e[18] = v, e[19] = t, e[20] = y, e[21] = L) : L = e[21];
|
|
1643
|
+
const E = L;
|
|
1644
|
+
let w;
|
|
1645
|
+
e[22] !== t ? (w = (_) => _.measurements[t].finished, e[22] = t, e[23] = w) : w = e[23];
|
|
1646
|
+
const O = q(w), D = q(Qs);
|
|
1649
1647
|
let U;
|
|
1650
|
-
e[24] !== D || e[25] !== t ? (U = (
|
|
1648
|
+
e[24] !== D || e[25] !== t ? (U = (_) => D(t, _), e[24] = D, e[25] = t, e[26] = U) : U = e[26];
|
|
1651
1649
|
const V = U;
|
|
1652
1650
|
let b;
|
|
1653
|
-
e[27] !== t ? (b = (
|
|
1654
|
-
const P = q(b),
|
|
1651
|
+
e[27] !== t ? (b = (_) => _.measurements[t].locale, e[27] = t, e[28] = b) : b = e[28];
|
|
1652
|
+
const P = q(b), C = q(Hs);
|
|
1655
1653
|
let A;
|
|
1656
|
-
e[29] !==
|
|
1654
|
+
e[29] !== C || e[30] !== t ? (A = (_) => C(t, _), e[29] = C, e[30] = t, e[31] = A) : A = e[31];
|
|
1657
1655
|
const x = A;
|
|
1658
1656
|
let B;
|
|
1659
|
-
e[32] !== t ? (B = (
|
|
1657
|
+
e[32] !== t ? (B = (_) => _.measurements[t].modeInstance, e[32] = t, e[33] = B) : B = e[33];
|
|
1660
1658
|
const N = q(B), G = q(Bs);
|
|
1661
1659
|
let I;
|
|
1662
|
-
e[34] !== G || e[35] !== t ? (I = (
|
|
1660
|
+
e[34] !== G || e[35] !== t ? (I = (_) => G(t, _), e[34] = G, e[35] = t, e[36] = I) : I = e[36];
|
|
1663
1661
|
const be = I;
|
|
1664
1662
|
let te;
|
|
1665
|
-
e[37] !== t ? (te = (
|
|
1663
|
+
e[37] !== t ? (te = (_) => _.measurements[t].positions, e[37] = t, e[38] = te) : te = e[38];
|
|
1666
1664
|
const ge = q(te), oe = q(Is);
|
|
1667
|
-
let re;
|
|
1668
|
-
e[39] !== oe || e[40] !== t ? (re = (L) => oe(t, L), e[39] = oe, e[40] = t, e[41] = re) : re = e[41];
|
|
1669
|
-
const Z = re;
|
|
1670
1665
|
let ie;
|
|
1671
|
-
e[
|
|
1672
|
-
const
|
|
1666
|
+
e[39] !== oe || e[40] !== t ? (ie = (_) => oe(t, _), e[39] = oe, e[40] = t, e[41] = ie) : ie = e[41];
|
|
1667
|
+
const Z = ie;
|
|
1668
|
+
let re;
|
|
1669
|
+
e[42] !== t ? (re = (_) => _.measurements[t].unit, e[42] = t, e[43] = re) : re = e[43];
|
|
1670
|
+
const ae = q(re), le = q(Ns);
|
|
1673
1671
|
let se;
|
|
1674
|
-
e[44] !== le || e[45] !== t ? (se = (
|
|
1672
|
+
e[44] !== le || e[45] !== t ? (se = (_) => le(t, _), e[44] = le, e[45] = t, e[46] = se) : se = e[46];
|
|
1675
1673
|
const X = se;
|
|
1676
1674
|
let z;
|
|
1677
1675
|
e[47] !== N || e[48] !== Z ? (z = () => {
|
|
@@ -1679,14 +1677,14 @@ function ut(o) {
|
|
|
1679
1677
|
}, e[47] = N, e[48] = Z, e[49] = z) : z = e[49];
|
|
1680
1678
|
const J = z;
|
|
1681
1679
|
let W;
|
|
1682
|
-
e[50] !== y ? (W = (
|
|
1683
|
-
y(
|
|
1680
|
+
e[50] !== y ? (W = (_) => {
|
|
1681
|
+
y(_);
|
|
1684
1682
|
}, e[50] = y, e[51] = W) : W = e[51];
|
|
1685
1683
|
const ce = W;
|
|
1686
1684
|
let ye;
|
|
1687
|
-
return e[52] !== J || e[53] !== u || e[54] !== l || e[55] !== f || e[56] !== O || e[57] !== P || e[58] !== N || e[59] !== S || e[60] !== s || e[61] !== ge || e[62] !== p || e[63] !== y || e[64] !== V || e[65] !== x || e[66] !== be || e[67] !== E || e[68] !== Z || e[69] !== X || e[70] !== ce || e[71] !== ae || e[72] !==
|
|
1685
|
+
return e[52] !== J || e[53] !== u || e[54] !== l || e[55] !== f || e[56] !== O || e[57] !== P || e[58] !== N || e[59] !== S || e[60] !== s || e[61] !== ge || e[62] !== p || e[63] !== y || e[64] !== V || e[65] !== x || e[66] !== be || e[67] !== E || e[68] !== Z || e[69] !== X || e[70] !== ce || e[71] !== ae || e[72] !== r ? (ye = {
|
|
1688
1686
|
modes: s,
|
|
1689
|
-
units:
|
|
1687
|
+
units: r,
|
|
1690
1688
|
distance: l,
|
|
1691
1689
|
clearLayerOnStart: u,
|
|
1692
1690
|
modeSelected: S,
|
|
@@ -1706,7 +1704,7 @@ function ut(o) {
|
|
|
1706
1704
|
toggleLayer: ce,
|
|
1707
1705
|
clearLayer: J,
|
|
1708
1706
|
setModeInstance: be
|
|
1709
|
-
}, e[52] = J, e[53] = u, e[54] = l, e[55] = f, e[56] = O, e[57] = P, e[58] = N, e[59] = S, e[60] = s, e[61] = ge, e[62] = p, e[63] = y, e[64] = V, e[65] = x, e[66] = be, e[67] = E, e[68] = Z, e[69] = X, e[70] = ce, e[71] = ae, e[72] =
|
|
1707
|
+
}, e[52] = J, e[53] = u, e[54] = l, e[55] = f, e[56] = O, e[57] = P, e[58] = N, e[59] = S, e[60] = s, e[61] = ge, e[62] = p, e[63] = y, e[64] = V, e[65] = x, e[66] = be, e[67] = E, e[68] = Z, e[69] = X, e[70] = ce, e[71] = ae, e[72] = r, e[73] = ye) : ye = e[73], ye;
|
|
1710
1708
|
}
|
|
1711
1709
|
function Ns(o) {
|
|
1712
1710
|
return o.setUnit;
|
|
@@ -1733,17 +1731,17 @@ function Zs(o) {
|
|
|
1733
1731
|
return o.setDistance;
|
|
1734
1732
|
}
|
|
1735
1733
|
function zs(o) {
|
|
1736
|
-
const e =
|
|
1734
|
+
const e = k(42), {
|
|
1737
1735
|
mapId: t,
|
|
1738
1736
|
textOptions: n,
|
|
1739
1737
|
children: s
|
|
1740
1738
|
} = o;
|
|
1741
|
-
let
|
|
1742
|
-
e[0] !== t ? (
|
|
1739
|
+
let i;
|
|
1740
|
+
e[0] !== t ? (i = {
|
|
1743
1741
|
mapId: t
|
|
1744
|
-
}, e[0] = t, e[1] =
|
|
1742
|
+
}, e[0] = t, e[1] = i) : i = e[1];
|
|
1745
1743
|
const {
|
|
1746
|
-
modes:
|
|
1744
|
+
modes: r,
|
|
1747
1745
|
units: a,
|
|
1748
1746
|
distance: l,
|
|
1749
1747
|
setDistance: m,
|
|
@@ -1759,31 +1757,31 @@ function zs(o) {
|
|
|
1759
1757
|
modeInstance: T,
|
|
1760
1758
|
setModeInstance: S,
|
|
1761
1759
|
positions: v,
|
|
1762
|
-
setPositions:
|
|
1760
|
+
setPositions: L,
|
|
1763
1761
|
unit: E,
|
|
1764
|
-
setUnit:
|
|
1762
|
+
setUnit: w,
|
|
1765
1763
|
clearLayer: O,
|
|
1766
1764
|
toggleLayer: D
|
|
1767
|
-
} = ut(
|
|
1765
|
+
} = ut(i);
|
|
1768
1766
|
let U;
|
|
1769
|
-
e[2] !== p || e[3] !==
|
|
1770
|
-
if (p &&
|
|
1771
|
-
const x =
|
|
1767
|
+
e[2] !== p || e[3] !== r || e[4] !== S || e[5] !== L ? (U = () => {
|
|
1768
|
+
if (p && r[p]) {
|
|
1769
|
+
const x = r[p].mode;
|
|
1772
1770
|
S(new x());
|
|
1773
1771
|
}
|
|
1774
1772
|
return () => {
|
|
1775
|
-
|
|
1773
|
+
L([]);
|
|
1776
1774
|
};
|
|
1777
|
-
}, e[2] = p, e[3] =
|
|
1775
|
+
}, e[2] = p, e[3] = r, e[4] = S, e[5] = L, e[6] = U) : U = e[6];
|
|
1778
1776
|
let V;
|
|
1779
|
-
e[7] !== p || e[8] !==
|
|
1777
|
+
e[7] !== p || e[8] !== r || e[9] !== g || e[10] !== S || e[11] !== L ? (V = [r, p, L, S, g], e[7] = p, e[8] = r, e[9] = g, e[10] = S, e[11] = L, e[12] = V) : V = e[12], Y(U, V);
|
|
1780
1778
|
let b;
|
|
1781
1779
|
e[13] !== D || e[14] !== O || e[15] !== c || e[16] !== f ? (b = (x) => {
|
|
1782
1780
|
x && (c || !f) && O(), D(x);
|
|
1783
1781
|
}, e[13] = D, e[14] = O, e[15] = c, e[16] = f, e[17] = b) : b = e[17];
|
|
1784
|
-
const P = b,
|
|
1782
|
+
const P = b, C = !!c;
|
|
1785
1783
|
let A;
|
|
1786
|
-
return e[18] !== s || e[19] !== O || e[20] !== l || e[21] !== u || e[22] !== f || e[23] !== h || e[24] !== t || e[25] !== T || e[26] !== p || e[27] !==
|
|
1784
|
+
return e[18] !== s || e[19] !== O || e[20] !== l || e[21] !== u || e[22] !== f || e[23] !== h || e[24] !== t || e[25] !== T || e[26] !== p || e[27] !== r || e[28] !== v || e[29] !== m || e[30] !== g || e[31] !== M || e[32] !== y || e[33] !== d || e[34] !== L || e[35] !== w || e[36] !== C || e[37] !== n || e[38] !== P || e[39] !== E || e[40] !== a ? (A = s({
|
|
1787
1785
|
mapId: t,
|
|
1788
1786
|
distance: l,
|
|
1789
1787
|
enabled: u,
|
|
@@ -1791,9 +1789,9 @@ function zs(o) {
|
|
|
1791
1789
|
locale: h,
|
|
1792
1790
|
positions: v,
|
|
1793
1791
|
unit: E,
|
|
1794
|
-
clearLayerOnStart:
|
|
1792
|
+
clearLayerOnStart: C,
|
|
1795
1793
|
modeSelected: p,
|
|
1796
|
-
modes:
|
|
1794
|
+
modes: r,
|
|
1797
1795
|
units: a,
|
|
1798
1796
|
value: Ce({
|
|
1799
1797
|
meters: l,
|
|
@@ -1806,12 +1804,12 @@ function zs(o) {
|
|
|
1806
1804
|
setDistance: m,
|
|
1807
1805
|
setFinished: M,
|
|
1808
1806
|
setLocale: y,
|
|
1809
|
-
setPositions:
|
|
1810
|
-
setUnit:
|
|
1807
|
+
setPositions: L,
|
|
1808
|
+
setUnit: w,
|
|
1811
1809
|
setEnabled: g,
|
|
1812
1810
|
toggleLayer: P,
|
|
1813
1811
|
clearLayer: O
|
|
1814
|
-
}), e[18] = s, e[19] = O, e[20] = l, e[21] = u, e[22] = f, e[23] = h, e[24] = t, e[25] = T, e[26] = p, e[27] =
|
|
1812
|
+
}), e[18] = s, e[19] = O, e[20] = l, e[21] = u, e[22] = f, e[23] = h, e[24] = t, e[25] = T, e[26] = p, e[27] = r, e[28] = v, e[29] = m, e[30] = g, e[31] = M, e[32] = y, e[33] = d, e[34] = L, e[35] = w, e[36] = C, e[37] = n, e[38] = P, e[39] = E, e[40] = a, e[41] = A) : A = e[41], A;
|
|
1815
1813
|
}
|
|
1816
1814
|
const Ws = [ve];
|
|
1817
1815
|
function Ys({
|
|
@@ -1826,8 +1824,8 @@ function Ys({
|
|
|
1826
1824
|
textOptions: s
|
|
1827
1825
|
}) {
|
|
1828
1826
|
const {
|
|
1829
|
-
setDistance:
|
|
1830
|
-
clearLayerOnStart:
|
|
1827
|
+
setDistance: i,
|
|
1828
|
+
clearLayerOnStart: r,
|
|
1831
1829
|
enabled: a,
|
|
1832
1830
|
finished: l,
|
|
1833
1831
|
setFinished: m,
|
|
@@ -1837,48 +1835,46 @@ function Ys({
|
|
|
1837
1835
|
modeInstance: u
|
|
1838
1836
|
} = ut({
|
|
1839
1837
|
mapId: e
|
|
1840
|
-
}), g = _e((v) => v.setLayer), f =
|
|
1841
|
-
var
|
|
1842
|
-
return (
|
|
1843
|
-
})), y =
|
|
1838
|
+
}), g = _e((v) => v.setLayer), f = F((v) => v.addLayers), M = F((v) => v.removeLayers), h = F(tt((v) => {
|
|
1839
|
+
var L;
|
|
1840
|
+
return (L = v.maps[e]) == null ? void 0 : L.layers.filter((E) => !Ws.includes(E));
|
|
1841
|
+
})), y = F((v) => v.getDeckInstance), T = Ee({});
|
|
1844
1842
|
Y(() => (a && f(e, [ve]), () => {
|
|
1845
1843
|
M(e, [ve]);
|
|
1846
|
-
}), [f,
|
|
1844
|
+
}), [f, r, e, M, a]), Y(() => {
|
|
1847
1845
|
h == null || h.forEach((v) => {
|
|
1848
|
-
var
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
}
|
|
1853
|
-
const _ = !a && T.current[v];
|
|
1846
|
+
var w;
|
|
1847
|
+
const L = (w = y(e)) == null ? void 0 : w.props.layers.find((O) => O.props.id === v);
|
|
1848
|
+
a && (T.current[v] = L == null ? void 0 : L.props.pickable);
|
|
1849
|
+
const E = !a && (T.current[v] ?? (L == null ? void 0 : L.props.pickable));
|
|
1854
1850
|
g(v, {
|
|
1855
1851
|
props: {
|
|
1856
|
-
pickable:
|
|
1852
|
+
pickable: E
|
|
1857
1853
|
}
|
|
1858
1854
|
});
|
|
1859
1855
|
});
|
|
1860
1856
|
}, [a, y, e, h, g]);
|
|
1861
1857
|
const S = $(({
|
|
1862
1858
|
editType: v,
|
|
1863
|
-
editContext:
|
|
1859
|
+
editContext: L
|
|
1864
1860
|
}) => {
|
|
1865
1861
|
if (v === K.cancel) {
|
|
1866
1862
|
u.resetClickSequence();
|
|
1867
1863
|
return;
|
|
1868
1864
|
}
|
|
1869
|
-
v === K.addPosition &&
|
|
1870
|
-
const E =
|
|
1865
|
+
v === K.addPosition && i(L.distance), m(!!L.finished);
|
|
1866
|
+
const E = L.positions;
|
|
1871
1867
|
E != null && E.length && p(E);
|
|
1872
|
-
}, [u,
|
|
1868
|
+
}, [u, i, m, p]);
|
|
1873
1869
|
return Y(() => {
|
|
1874
|
-
const v = l ? t.colors.finished : t.colors.editing,
|
|
1870
|
+
const v = l ? t.colors.finished : t.colors.editing, L = l ? t.colors.finished : t.colors.point, E = Us({
|
|
1875
1871
|
layerProps: {
|
|
1876
1872
|
...n,
|
|
1877
1873
|
pickable: n.pickable ?? !l
|
|
1878
1874
|
},
|
|
1879
1875
|
enabled: a,
|
|
1880
1876
|
guideColor: v,
|
|
1881
|
-
pointColor:
|
|
1877
|
+
pointColor: L,
|
|
1882
1878
|
locale: c,
|
|
1883
1879
|
onEdit: S,
|
|
1884
1880
|
unit: d,
|
|
@@ -1890,21 +1886,21 @@ function Ys({
|
|
|
1890
1886
|
}
|
|
1891
1887
|
Ys.Controls = zs;
|
|
1892
1888
|
function Xs(o) {
|
|
1893
|
-
const e =
|
|
1889
|
+
const e = k(7), {
|
|
1894
1890
|
mapId: t
|
|
1895
1891
|
} = o;
|
|
1896
1892
|
let n;
|
|
1897
1893
|
e[0] !== t ? (n = (m) => m.maps[t], e[0] = t, e[1] = n) : n = e[1];
|
|
1898
1894
|
const {
|
|
1899
1895
|
layers: s
|
|
1900
|
-
} =
|
|
1901
|
-
let
|
|
1902
|
-
if (e[2] !==
|
|
1896
|
+
} = F(n), i = _e(en);
|
|
1897
|
+
let r, a;
|
|
1898
|
+
if (e[2] !== i || e[3] !== s) {
|
|
1903
1899
|
let m;
|
|
1904
|
-
e[5] !==
|
|
1900
|
+
e[5] !== i ? (m = (c) => i[c], e[5] = i, e[6] = m) : m = e[6], a = s.map(m).filter(Js), e[2] = i, e[3] = s, e[4] = a;
|
|
1905
1901
|
} else
|
|
1906
1902
|
a = e[4];
|
|
1907
|
-
return
|
|
1903
|
+
return r = a, r;
|
|
1908
1904
|
}
|
|
1909
1905
|
function Js(o) {
|
|
1910
1906
|
return !!o;
|
|
@@ -1926,9 +1922,9 @@ function zn({
|
|
|
1926
1922
|
}) {
|
|
1927
1923
|
const {
|
|
1928
1924
|
basemap: s,
|
|
1929
|
-
instanceRef:
|
|
1930
|
-
overlayRef:
|
|
1931
|
-
} =
|
|
1925
|
+
instanceRef: i,
|
|
1926
|
+
overlayRef: r
|
|
1927
|
+
} = F((S) => S.maps[o]), a = Ee(null), l = F((S) => S.viewStates[o]), m = F((S) => S.setViewState), c = F((S) => S.setLoad), p = F((S) => S.setLayersLoad), d = F((S) => S.updateViewPort), u = Xs({
|
|
1932
1928
|
mapId: o
|
|
1933
1929
|
}), g = de(() => dt(u), [u]), f = $((S) => {
|
|
1934
1930
|
const v = m;
|
|
@@ -1942,13 +1938,13 @@ function zn({
|
|
|
1942
1938
|
}, [o, t, m, d]), M = $((S) => {
|
|
1943
1939
|
c(o, S), e == null || e(S), d(o);
|
|
1944
1940
|
}, [o, e, c, d]), h = $((S) => {
|
|
1945
|
-
var E,
|
|
1946
|
-
const v = (
|
|
1947
|
-
p(o,
|
|
1948
|
-
}, [o,
|
|
1941
|
+
var E, w, O;
|
|
1942
|
+
const v = (w = (E = i == null ? void 0 : i.current) == null ? void 0 : E.deck) == null ? void 0 : w.props.layers, L = !!(v != null && v.every((D) => D == null ? void 0 : D.isLoaded));
|
|
1943
|
+
p(o, L), (O = n.onAfterRender) == null || O.call(n, S);
|
|
1944
|
+
}, [o, i, n, p]), y = n.onDragEnd, T = $((...S) => {
|
|
1949
1945
|
d(o), y && y(...S);
|
|
1950
1946
|
}, [o, d, y]);
|
|
1951
|
-
return /* @__PURE__ */ H(ns, { ...n, layers: g, instanceRef:
|
|
1947
|
+
return /* @__PURE__ */ H(ns, { ...n, layers: g, instanceRef: i, overlayRef: r, basemap: s, initialViewState: l, onLoad: M, onViewStateChange: f, onAfterRender: h, onDragEnd: T });
|
|
1952
1948
|
}
|
|
1953
1949
|
const sn = "https://gcp-us-east1.api.carto.com", nn = "ps", on = et((o) => ({
|
|
1954
1950
|
sources: {},
|
|
@@ -1960,22 +1956,22 @@ const sn = "https://gcp-us-east1.api.carto.com", nn = "ps", on = et((o) => ({
|
|
|
1960
1956
|
return delete s[e], {
|
|
1961
1957
|
sources: s
|
|
1962
1958
|
};
|
|
1963
|
-
const
|
|
1959
|
+
const i = {
|
|
1964
1960
|
...s[e] ?? {
|
|
1965
1961
|
apiBaseUrl: sn,
|
|
1966
1962
|
clientId: nn
|
|
1967
1963
|
},
|
|
1968
1964
|
...t
|
|
1969
|
-
},
|
|
1970
|
-
source:
|
|
1965
|
+
}, r = an({
|
|
1966
|
+
source: i
|
|
1971
1967
|
});
|
|
1972
|
-
return
|
|
1968
|
+
return i.widgets = r, s[e] = i, {
|
|
1973
1969
|
sources: s
|
|
1974
1970
|
};
|
|
1975
1971
|
})
|
|
1976
1972
|
}));
|
|
1977
1973
|
function rn(o) {
|
|
1978
|
-
const e =
|
|
1974
|
+
const e = k(2);
|
|
1979
1975
|
let t;
|
|
1980
1976
|
return e[0] !== o ? (t = (n) => n.sources[o], e[0] = o, e[1] = t) : t = e[1], on(t);
|
|
1981
1977
|
}
|
|
@@ -2032,19 +2028,19 @@ function pe(o, e) {
|
|
|
2032
2028
|
}, [o, t]);
|
|
2033
2029
|
}
|
|
2034
2030
|
function ln(o) {
|
|
2035
|
-
const e =
|
|
2031
|
+
const e = k(18), {
|
|
2036
2032
|
accessToken: t,
|
|
2037
2033
|
sourceId: n,
|
|
2038
2034
|
widgetProps: s,
|
|
2039
|
-
useQueryProps:
|
|
2035
|
+
useQueryProps: i
|
|
2040
2036
|
} = o;
|
|
2041
|
-
let
|
|
2042
|
-
e[0] !==
|
|
2037
|
+
let r;
|
|
2038
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2043
2039
|
let a, l;
|
|
2044
|
-
e[2] !==
|
|
2040
|
+
e[2] !== r ? ({
|
|
2045
2041
|
enabled: a,
|
|
2046
2042
|
...l
|
|
2047
|
-
} =
|
|
2043
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2048
2044
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2049
2045
|
let d;
|
|
2050
2046
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["categories", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2060,30 +2056,30 @@ function ln(o) {
|
|
|
2060
2056
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2061
2057
|
}
|
|
2062
2058
|
function Wn(o) {
|
|
2063
|
-
const e =
|
|
2059
|
+
const e = k(6);
|
|
2064
2060
|
let t, n;
|
|
2065
2061
|
e[0] !== o ? ({
|
|
2066
2062
|
children: t,
|
|
2067
2063
|
...n
|
|
2068
2064
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2069
2065
|
const s = ln(n);
|
|
2070
|
-
let
|
|
2071
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2066
|
+
let i;
|
|
2067
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2072
2068
|
}
|
|
2073
2069
|
function cn(o) {
|
|
2074
|
-
const e =
|
|
2070
|
+
const e = k(18), {
|
|
2075
2071
|
accessToken: t,
|
|
2076
2072
|
sourceId: n,
|
|
2077
2073
|
widgetProps: s,
|
|
2078
|
-
useQueryProps:
|
|
2074
|
+
useQueryProps: i
|
|
2079
2075
|
} = o;
|
|
2080
|
-
let
|
|
2081
|
-
e[0] !==
|
|
2076
|
+
let r;
|
|
2077
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2082
2078
|
let a, l;
|
|
2083
|
-
e[2] !==
|
|
2079
|
+
e[2] !== r ? ({
|
|
2084
2080
|
enabled: a,
|
|
2085
2081
|
...l
|
|
2086
|
-
} =
|
|
2082
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2087
2083
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2088
2084
|
let d;
|
|
2089
2085
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["features", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2099,30 +2095,30 @@ function cn(o) {
|
|
|
2099
2095
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2100
2096
|
}
|
|
2101
2097
|
function Yn(o) {
|
|
2102
|
-
const e =
|
|
2098
|
+
const e = k(6);
|
|
2103
2099
|
let t, n;
|
|
2104
2100
|
e[0] !== o ? ({
|
|
2105
2101
|
children: t,
|
|
2106
2102
|
...n
|
|
2107
2103
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2108
2104
|
const s = cn(n);
|
|
2109
|
-
let
|
|
2110
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2105
|
+
let i;
|
|
2106
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2111
2107
|
}
|
|
2112
2108
|
function un(o) {
|
|
2113
|
-
const e =
|
|
2109
|
+
const e = k(18), {
|
|
2114
2110
|
accessToken: t,
|
|
2115
2111
|
sourceId: n,
|
|
2116
2112
|
widgetProps: s,
|
|
2117
|
-
useQueryProps:
|
|
2113
|
+
useQueryProps: i
|
|
2118
2114
|
} = o;
|
|
2119
|
-
let
|
|
2120
|
-
e[0] !==
|
|
2115
|
+
let r;
|
|
2116
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2121
2117
|
let a, l;
|
|
2122
|
-
e[2] !==
|
|
2118
|
+
e[2] !== r ? ({
|
|
2123
2119
|
enabled: a,
|
|
2124
2120
|
...l
|
|
2125
|
-
} =
|
|
2121
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2126
2122
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2127
2123
|
let d;
|
|
2128
2124
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["formula", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2138,30 +2134,30 @@ function un(o) {
|
|
|
2138
2134
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2139
2135
|
}
|
|
2140
2136
|
function Xn(o) {
|
|
2141
|
-
const e =
|
|
2137
|
+
const e = k(6);
|
|
2142
2138
|
let t, n;
|
|
2143
2139
|
e[0] !== o ? ({
|
|
2144
2140
|
children: t,
|
|
2145
2141
|
...n
|
|
2146
2142
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2147
2143
|
const s = un(n);
|
|
2148
|
-
let
|
|
2149
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2144
|
+
let i;
|
|
2145
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2150
2146
|
}
|
|
2151
2147
|
function dn(o) {
|
|
2152
|
-
const e =
|
|
2148
|
+
const e = k(18), {
|
|
2153
2149
|
accessToken: t,
|
|
2154
2150
|
sourceId: n,
|
|
2155
2151
|
widgetProps: s,
|
|
2156
|
-
useQueryProps:
|
|
2152
|
+
useQueryProps: i
|
|
2157
2153
|
} = o;
|
|
2158
|
-
let
|
|
2159
|
-
e[0] !==
|
|
2154
|
+
let r;
|
|
2155
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2160
2156
|
let a, l;
|
|
2161
|
-
e[2] !==
|
|
2157
|
+
e[2] !== r ? ({
|
|
2162
2158
|
enabled: a,
|
|
2163
2159
|
...l
|
|
2164
|
-
} =
|
|
2160
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2165
2161
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2166
2162
|
let d;
|
|
2167
2163
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["histogram", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2177,30 +2173,30 @@ function dn(o) {
|
|
|
2177
2173
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2178
2174
|
}
|
|
2179
2175
|
function Jn(o) {
|
|
2180
|
-
const e =
|
|
2176
|
+
const e = k(6);
|
|
2181
2177
|
let t, n;
|
|
2182
2178
|
e[0] !== o ? ({
|
|
2183
2179
|
children: t,
|
|
2184
2180
|
...n
|
|
2185
2181
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2186
2182
|
const s = dn(n);
|
|
2187
|
-
let
|
|
2188
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2183
|
+
let i;
|
|
2184
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2189
2185
|
}
|
|
2190
2186
|
function fn(o) {
|
|
2191
|
-
const e =
|
|
2187
|
+
const e = k(18), {
|
|
2192
2188
|
accessToken: t,
|
|
2193
2189
|
sourceId: n,
|
|
2194
2190
|
widgetProps: s,
|
|
2195
|
-
useQueryProps:
|
|
2191
|
+
useQueryProps: i
|
|
2196
2192
|
} = o;
|
|
2197
|
-
let
|
|
2198
|
-
e[0] !==
|
|
2193
|
+
let r;
|
|
2194
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2199
2195
|
let a, l;
|
|
2200
|
-
e[2] !==
|
|
2196
|
+
e[2] !== r ? ({
|
|
2201
2197
|
enabled: a,
|
|
2202
2198
|
...l
|
|
2203
|
-
} =
|
|
2199
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2204
2200
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2205
2201
|
let d;
|
|
2206
2202
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["range", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2216,30 +2212,30 @@ function fn(o) {
|
|
|
2216
2212
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2217
2213
|
}
|
|
2218
2214
|
function eo(o) {
|
|
2219
|
-
const e =
|
|
2215
|
+
const e = k(6);
|
|
2220
2216
|
let t, n;
|
|
2221
2217
|
e[0] !== o ? ({
|
|
2222
2218
|
children: t,
|
|
2223
2219
|
...n
|
|
2224
2220
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2225
2221
|
const s = fn(n);
|
|
2226
|
-
let
|
|
2227
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2222
|
+
let i;
|
|
2223
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2228
2224
|
}
|
|
2229
2225
|
function mn(o) {
|
|
2230
|
-
const e =
|
|
2226
|
+
const e = k(18), {
|
|
2231
2227
|
accessToken: t,
|
|
2232
2228
|
sourceId: n,
|
|
2233
2229
|
widgetProps: s,
|
|
2234
|
-
useQueryProps:
|
|
2230
|
+
useQueryProps: i
|
|
2235
2231
|
} = o;
|
|
2236
|
-
let
|
|
2237
|
-
e[0] !==
|
|
2232
|
+
let r;
|
|
2233
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2238
2234
|
let a, l;
|
|
2239
|
-
e[2] !==
|
|
2235
|
+
e[2] !== r ? ({
|
|
2240
2236
|
enabled: a,
|
|
2241
2237
|
...l
|
|
2242
|
-
} =
|
|
2238
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2243
2239
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2244
2240
|
let d;
|
|
2245
2241
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["scatter", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2255,30 +2251,30 @@ function mn(o) {
|
|
|
2255
2251
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2256
2252
|
}
|
|
2257
2253
|
function to(o) {
|
|
2258
|
-
const e =
|
|
2254
|
+
const e = k(6);
|
|
2259
2255
|
let t, n;
|
|
2260
2256
|
e[0] !== o ? ({
|
|
2261
2257
|
children: t,
|
|
2262
2258
|
...n
|
|
2263
2259
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2264
2260
|
const s = mn(n);
|
|
2265
|
-
let
|
|
2266
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2261
|
+
let i;
|
|
2262
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2267
2263
|
}
|
|
2268
2264
|
function pn(o) {
|
|
2269
|
-
const e =
|
|
2265
|
+
const e = k(18), {
|
|
2270
2266
|
accessToken: t,
|
|
2271
2267
|
sourceId: n,
|
|
2272
2268
|
widgetProps: s,
|
|
2273
|
-
useQueryProps:
|
|
2269
|
+
useQueryProps: i
|
|
2274
2270
|
} = o;
|
|
2275
|
-
let
|
|
2276
|
-
e[0] !==
|
|
2271
|
+
let r;
|
|
2272
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2277
2273
|
let a, l;
|
|
2278
|
-
e[2] !==
|
|
2274
|
+
e[2] !== r ? ({
|
|
2279
2275
|
enabled: a,
|
|
2280
2276
|
...l
|
|
2281
|
-
} =
|
|
2277
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2282
2278
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2283
2279
|
let d;
|
|
2284
2280
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["table", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2294,30 +2290,30 @@ function pn(o) {
|
|
|
2294
2290
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2295
2291
|
}
|
|
2296
2292
|
function so(o) {
|
|
2297
|
-
const e =
|
|
2293
|
+
const e = k(6);
|
|
2298
2294
|
let t, n;
|
|
2299
2295
|
e[0] !== o ? ({
|
|
2300
2296
|
children: t,
|
|
2301
2297
|
...n
|
|
2302
2298
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2303
2299
|
const s = pn(n);
|
|
2304
|
-
let
|
|
2305
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2300
|
+
let i;
|
|
2301
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2306
2302
|
}
|
|
2307
2303
|
function gn(o) {
|
|
2308
|
-
const e =
|
|
2304
|
+
const e = k(18), {
|
|
2309
2305
|
accessToken: t,
|
|
2310
2306
|
sourceId: n,
|
|
2311
2307
|
widgetProps: s,
|
|
2312
|
-
useQueryProps:
|
|
2308
|
+
useQueryProps: i
|
|
2313
2309
|
} = o;
|
|
2314
|
-
let
|
|
2315
|
-
e[0] !==
|
|
2310
|
+
let r;
|
|
2311
|
+
e[0] !== i ? (r = i === void 0 ? {} : i, e[0] = i, e[1] = r) : r = e[1];
|
|
2316
2312
|
let a, l;
|
|
2317
|
-
e[2] !==
|
|
2313
|
+
e[2] !== r ? ({
|
|
2318
2314
|
enabled: a,
|
|
2319
2315
|
...l
|
|
2320
|
-
} =
|
|
2316
|
+
} = r, e[2] = r, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2321
2317
|
const m = a === void 0 ? !0 : a, c = pe(t, n), p = c == null ? void 0 : c.props.filters;
|
|
2322
2318
|
let d;
|
|
2323
2319
|
e[5] !== t || e[6] !== n || e[7] !== p || e[8] !== s ? (d = ["time-series", n, t, s, p], e[5] = t, e[6] = n, e[7] = p, e[8] = s, e[9] = d) : d = e[9];
|
|
@@ -2333,28 +2329,28 @@ function gn(o) {
|
|
|
2333
2329
|
}, e[13] = d, e[14] = u, e[15] = g, e[16] = l, e[17] = f) : f = e[17], me(f);
|
|
2334
2330
|
}
|
|
2335
2331
|
function no(o) {
|
|
2336
|
-
const e =
|
|
2332
|
+
const e = k(6);
|
|
2337
2333
|
let t, n;
|
|
2338
2334
|
e[0] !== o ? ({
|
|
2339
2335
|
children: t,
|
|
2340
2336
|
...n
|
|
2341
2337
|
} = o, e[0] = o, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2342
2338
|
const s = gn(n);
|
|
2343
|
-
let
|
|
2344
|
-
return e[3] !== t || e[4] !== s ? (
|
|
2339
|
+
let i;
|
|
2340
|
+
return e[3] !== t || e[4] !== s ? (i = t(s), e[3] = t, e[4] = s, e[5] = i) : i = e[5], i;
|
|
2345
2341
|
}
|
|
2346
2342
|
function oo(o) {
|
|
2347
|
-
const e =
|
|
2343
|
+
const e = k(13), {
|
|
2348
2344
|
children: t,
|
|
2349
2345
|
maps: n,
|
|
2350
2346
|
lassoTools: s,
|
|
2351
|
-
measureTools:
|
|
2347
|
+
measureTools: i
|
|
2352
2348
|
} = o;
|
|
2353
|
-
let
|
|
2354
|
-
e[0] !== s ? (
|
|
2355
|
-
const a =
|
|
2349
|
+
let r;
|
|
2350
|
+
e[0] !== s ? (r = s === void 0 ? [] : s, e[0] = s, e[1] = r) : r = e[1];
|
|
2351
|
+
const a = r;
|
|
2356
2352
|
let l;
|
|
2357
|
-
e[2] !==
|
|
2353
|
+
e[2] !== i ? (l = i === void 0 ? [] : i, e[2] = i, e[3] = l) : l = e[3];
|
|
2358
2354
|
const m = l;
|
|
2359
2355
|
let c;
|
|
2360
2356
|
e[4] !== t || e[5] !== m ? (c = /* @__PURE__ */ H(js, { values: m, children: t }), e[4] = t, e[5] = m, e[6] = c) : c = e[6];
|
|
@@ -2363,8 +2359,8 @@ function oo(o) {
|
|
|
2363
2359
|
let d;
|
|
2364
2360
|
return e[10] !== n || e[11] !== p ? (d = /* @__PURE__ */ H(Ss, { values: n, children: p }), e[10] = n, e[11] = p, e[12] = d) : d = e[12], d;
|
|
2365
2361
|
}
|
|
2366
|
-
function
|
|
2367
|
-
const t = _e((m) => m.layers), n = _e((m) => m.setLayer), s = de(() => dt(o.map((m) => t[m]).filter((m) => !!m)), [t, o]),
|
|
2362
|
+
function io(o, e) {
|
|
2363
|
+
const t = _e((m) => m.layers), n = _e((m) => m.setLayer), s = de(() => dt(o.map((m) => t[m]).filter((m) => !!m)), [t, o]), i = de(() => s.map(e), [e, s]), r = $(({
|
|
2368
2364
|
id: m,
|
|
2369
2365
|
visible: c,
|
|
2370
2366
|
...p
|
|
@@ -2395,28 +2391,28 @@ function ro(o, e) {
|
|
|
2395
2391
|
});
|
|
2396
2392
|
}, [n]);
|
|
2397
2393
|
return {
|
|
2398
|
-
legend:
|
|
2399
|
-
onChangeVisibility:
|
|
2394
|
+
legend: i,
|
|
2395
|
+
onChangeVisibility: r,
|
|
2400
2396
|
onChangeOpacity: l,
|
|
2401
2397
|
onChangRowCollapsed: a
|
|
2402
2398
|
};
|
|
2403
2399
|
}
|
|
2404
|
-
function
|
|
2400
|
+
function ro({
|
|
2405
2401
|
mapId: o
|
|
2406
2402
|
}) {
|
|
2407
|
-
const [e, t] = fe(void 0), [n, s] = fe(!1),
|
|
2403
|
+
const [e, t] = fe(void 0), [n, s] = fe(!1), i = F((f) => {
|
|
2408
2404
|
var M;
|
|
2409
2405
|
return (M = f.maps[o]) == null ? void 0 : M.basemap;
|
|
2410
|
-
}),
|
|
2406
|
+
}), r = F((f) => f.getDeckInstance), a = F((f) => f.getOverlayInstance), l = F((f) => {
|
|
2411
2407
|
var M;
|
|
2412
2408
|
return (M = f.maps[o]) == null ? void 0 : M.areLayersLoaded;
|
|
2413
|
-
}), c =
|
|
2409
|
+
}), c = F((f) => {
|
|
2414
2410
|
var M;
|
|
2415
2411
|
return (M = f.maps[o]) == null ? void 0 : M.isLoaded;
|
|
2416
2412
|
}) && l, {
|
|
2417
2413
|
type: p
|
|
2418
|
-
} = nt[
|
|
2419
|
-
const f =
|
|
2414
|
+
} = nt[i], d = p === ue.googleMaps, u = $(async () => {
|
|
2415
|
+
const f = r(o), M = a(o);
|
|
2420
2416
|
try {
|
|
2421
2417
|
const h = document.createElement("canvas");
|
|
2422
2418
|
h.width = f.width ?? 0, h.height = f.height ?? 0;
|
|
@@ -2441,7 +2437,7 @@ function io({
|
|
|
2441
2437
|
} finally {
|
|
2442
2438
|
s(!1);
|
|
2443
2439
|
}
|
|
2444
|
-
}, [
|
|
2440
|
+
}, [r, d, o, a]);
|
|
2445
2441
|
return {
|
|
2446
2442
|
takeScreenshot: $(() => {
|
|
2447
2443
|
s(!0), c && u();
|
|
@@ -2451,7 +2447,7 @@ function io({
|
|
|
2451
2447
|
};
|
|
2452
2448
|
}
|
|
2453
2449
|
function ao(o) {
|
|
2454
|
-
const e =
|
|
2450
|
+
const e = k(8), {
|
|
2455
2451
|
mapId: t
|
|
2456
2452
|
} = o;
|
|
2457
2453
|
let n;
|
|
@@ -2459,63 +2455,63 @@ function ao(o) {
|
|
|
2459
2455
|
mapId: t
|
|
2460
2456
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2461
2457
|
const s = yn(n);
|
|
2462
|
-
let
|
|
2463
|
-
e[2] !== t ? (
|
|
2458
|
+
let i;
|
|
2459
|
+
e[2] !== t ? (i = {
|
|
2464
2460
|
mapId: t
|
|
2465
|
-
}, e[2] = t, e[3] =
|
|
2466
|
-
const
|
|
2461
|
+
}, e[2] = t, e[3] = i) : i = e[3];
|
|
2462
|
+
const r = hn(i), a = r ?? s;
|
|
2467
2463
|
let l;
|
|
2468
|
-
return e[4] !==
|
|
2464
|
+
return e[4] !== r || e[5] !== a || e[6] !== s ? (l = {
|
|
2469
2465
|
spatialFilter: a,
|
|
2470
|
-
lassoToolsSpatialFilter:
|
|
2466
|
+
lassoToolsSpatialFilter: r,
|
|
2471
2467
|
viewportSpatialFilter: s
|
|
2472
|
-
}, e[4] =
|
|
2468
|
+
}, e[4] = r, e[5] = a, e[6] = s, e[7] = l) : l = e[7], l;
|
|
2473
2469
|
}
|
|
2474
2470
|
function yn(o) {
|
|
2475
|
-
const e =
|
|
2471
|
+
const e = k(4), {
|
|
2476
2472
|
mapId: t
|
|
2477
2473
|
} = o;
|
|
2478
2474
|
let n;
|
|
2479
|
-
e[0] !== t ? (n = (
|
|
2480
|
-
const s =
|
|
2481
|
-
let
|
|
2475
|
+
e[0] !== t ? (n = (r) => r.viewports[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2476
|
+
const s = F(n);
|
|
2477
|
+
let i;
|
|
2482
2478
|
e: {
|
|
2483
2479
|
if (!s) {
|
|
2484
|
-
|
|
2480
|
+
i = void 0;
|
|
2485
2481
|
break e;
|
|
2486
2482
|
}
|
|
2487
|
-
let
|
|
2488
|
-
e[2] !== s ? (
|
|
2483
|
+
let r;
|
|
2484
|
+
e[2] !== s ? (r = Xt(s.getBounds()), e[2] = s, e[3] = r) : r = e[3], i = r;
|
|
2489
2485
|
}
|
|
2490
|
-
return
|
|
2486
|
+
return i;
|
|
2491
2487
|
}
|
|
2492
2488
|
function hn(o) {
|
|
2493
|
-
const e =
|
|
2489
|
+
const e = k(5), {
|
|
2494
2490
|
mapId: t
|
|
2495
2491
|
} = o;
|
|
2496
2492
|
let n;
|
|
2497
|
-
e[0] !== t ? (n = (
|
|
2493
|
+
e[0] !== t ? (n = (r) => {
|
|
2498
2494
|
var a;
|
|
2499
|
-
return (a =
|
|
2495
|
+
return (a = r.data[t]) == null ? void 0 : a.values;
|
|
2500
2496
|
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2501
2497
|
const s = j(n);
|
|
2502
|
-
let
|
|
2498
|
+
let i;
|
|
2503
2499
|
e: {
|
|
2504
|
-
let
|
|
2500
|
+
let r;
|
|
2505
2501
|
if (e[2] !== s) {
|
|
2506
|
-
const a =
|
|
2502
|
+
const a = rt({
|
|
2507
2503
|
values: s
|
|
2508
2504
|
}).filter(vn);
|
|
2509
2505
|
if (!(a != null && a.length)) {
|
|
2510
|
-
|
|
2506
|
+
i = void 0;
|
|
2511
2507
|
break e;
|
|
2512
2508
|
}
|
|
2513
|
-
|
|
2509
|
+
r = es(a.map(Sn)), e[2] = s, e[3] = r, e[4] = i;
|
|
2514
2510
|
} else
|
|
2515
|
-
|
|
2516
|
-
|
|
2511
|
+
r = e[3], i = e[4];
|
|
2512
|
+
i = r.geometry;
|
|
2517
2513
|
}
|
|
2518
|
-
return
|
|
2514
|
+
return i;
|
|
2519
2515
|
}
|
|
2520
2516
|
function Sn(o) {
|
|
2521
2517
|
return o.geometry.coordinates;
|
|
@@ -2547,14 +2543,14 @@ function lo({
|
|
|
2547
2543
|
includeColumns: t = Object.keys(o),
|
|
2548
2544
|
locale: n = "en-US",
|
|
2549
2545
|
showColumnName: s = !0,
|
|
2550
|
-
title:
|
|
2551
|
-
getColumnName:
|
|
2546
|
+
title: i,
|
|
2547
|
+
getColumnName: r = _n,
|
|
2552
2548
|
getFieldHtml: a = Tn,
|
|
2553
2549
|
getTitle: l = bn,
|
|
2554
2550
|
getValue: m = Mn
|
|
2555
2551
|
}) {
|
|
2556
|
-
const c =
|
|
2557
|
-
const f = e[g], M = o[g], h = m(M, n, f), y = s ?
|
|
2552
|
+
const c = i ? l(i) : "", d = t.reduce((u, g) => {
|
|
2553
|
+
const f = e[g], M = o[g], h = m(M, n, f), y = s ? r(g) : "";
|
|
2558
2554
|
return u + a(y, h);
|
|
2559
2555
|
}, "");
|
|
2560
2556
|
return c + d;
|
|
@@ -2579,37 +2575,37 @@ function _n(o) {
|
|
|
2579
2575
|
return `<strong>${o}</strong>: `;
|
|
2580
2576
|
}
|
|
2581
2577
|
function co(o) {
|
|
2582
|
-
var e, t, n, s,
|
|
2578
|
+
var e, t, n, s, i, r, a, l;
|
|
2583
2579
|
return {
|
|
2584
2580
|
collapsed: (e = o.legend) == null ? void 0 : e.collapsed,
|
|
2585
2581
|
collapsible: (t = o.legend) == null ? void 0 : t.collapsible,
|
|
2586
2582
|
helperText: (n = o.legend) == null ? void 0 : n.helperText,
|
|
2587
2583
|
id: o.props.id,
|
|
2588
2584
|
legend: (s = o.legend) == null ? void 0 : s.variables,
|
|
2589
|
-
maxZoom: (
|
|
2590
|
-
minZoom: (
|
|
2585
|
+
maxZoom: (i = o.legend) == null ? void 0 : i.maxZoom,
|
|
2586
|
+
minZoom: (r = o.legend) == null ? void 0 : r.minZoom,
|
|
2591
2587
|
opacity: o.props.opacity ?? 1,
|
|
2592
|
-
|
|
2588
|
+
showOpacityControl: (a = o.legend) == null ? void 0 : a.opacityControl,
|
|
2593
2589
|
switchable: (l = o.legend) == null ? void 0 : l.switchable,
|
|
2594
2590
|
title: o.name,
|
|
2595
2591
|
visible: o.props.visible ?? !0
|
|
2596
2592
|
};
|
|
2597
2593
|
}
|
|
2598
2594
|
function uo(o) {
|
|
2599
|
-
const e =
|
|
2595
|
+
const e = k(18), {
|
|
2600
2596
|
children: t,
|
|
2601
2597
|
mapId: n
|
|
2602
2598
|
} = o;
|
|
2603
2599
|
let s;
|
|
2604
2600
|
e[0] !== n ? (s = (y) => y.viewStates[n], e[0] = n, e[1] = s) : s = e[1];
|
|
2605
2601
|
const {
|
|
2606
|
-
zoom:
|
|
2607
|
-
maxZoom:
|
|
2602
|
+
zoom: i,
|
|
2603
|
+
maxZoom: r,
|
|
2608
2604
|
minZoom: a
|
|
2609
|
-
} =
|
|
2605
|
+
} = F(s);
|
|
2610
2606
|
let l;
|
|
2611
2607
|
e[2] !== n ? (l = (y) => y.maps[n].areLayersLoaded, e[2] = n, e[3] = l) : l = e[3];
|
|
2612
|
-
const m =
|
|
2608
|
+
const m = F(l), c = F(En), p = F(Pn), d = !m;
|
|
2613
2609
|
let u;
|
|
2614
2610
|
e[4] !== n || e[5] !== c ? (u = (y) => c(n, y), e[4] = n, e[5] = c, e[6] = u) : u = e[6];
|
|
2615
2611
|
const g = u;
|
|
@@ -2617,14 +2613,14 @@ function uo(o) {
|
|
|
2617
2613
|
e[7] !== p || e[8] !== n ? (f = (y) => p(n, y), e[7] = p, e[8] = n, e[9] = f) : f = e[9];
|
|
2618
2614
|
const M = f;
|
|
2619
2615
|
let h;
|
|
2620
|
-
return e[10] !== t || e[11] !==
|
|
2621
|
-
zoom:
|
|
2622
|
-
maxZoom:
|
|
2616
|
+
return e[10] !== t || e[11] !== r || e[12] !== a || e[13] !== d || e[14] !== g || e[15] !== M || e[16] !== i ? (h = t({
|
|
2617
|
+
zoom: i,
|
|
2618
|
+
maxZoom: r,
|
|
2623
2619
|
minZoom: a,
|
|
2624
2620
|
isLoading: d,
|
|
2625
2621
|
setZoom: g,
|
|
2626
2622
|
flyTo: M
|
|
2627
|
-
}), e[10] = t, e[11] =
|
|
2623
|
+
}), e[10] = t, e[11] = r, e[12] = a, e[13] = d, e[14] = g, e[15] = M, e[16] = i, e[17] = h) : h = e[17], h;
|
|
2628
2624
|
}
|
|
2629
2625
|
function Pn(o) {
|
|
2630
2626
|
return o.flyTo;
|
|
@@ -2703,9 +2699,9 @@ export {
|
|
|
2703
2699
|
j as useLassoToolsState,
|
|
2704
2700
|
_e as useLayerStore,
|
|
2705
2701
|
Xs as useLayers,
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2702
|
+
io as useLegend,
|
|
2703
|
+
ro as useMapScreenshot,
|
|
2704
|
+
F as useMapStore,
|
|
2709
2705
|
q as useMeasurementToolsState,
|
|
2710
2706
|
fn as useRange,
|
|
2711
2707
|
mn as useScatter,
|