@carto/ps-react-maps 3.0.0-canary.1 → 3.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2040 -1448
- package/dist/index.js.map +1 -1
- package/dist/types/editable/lasso-tools/const.d.ts +1 -0
- package/dist/types/editable/lasso-tools/lasso-tools.d.ts +1 -1
- package/dist/types/editable/lasso-tools/util.d.ts +4 -0
- package/dist/types/editable/measurement-tools/measurement-tools.d.ts +1 -1
- package/dist/types/editable/measurement-tools/provider/types.d.ts +1 -1
- package/dist/types/editable/measurement-tools/types.d.ts +1 -1
- package/dist/types/editable/measurement-tools/use-measurement-tools.d.ts +1 -1
- package/dist/types/index.d.ts +22 -7
- package/dist/types/models/categories.d.ts +7 -0
- package/dist/types/models/features.d.ts +7 -0
- package/dist/types/models/formula.d.ts +7 -0
- package/dist/types/models/histogram..d.ts +7 -0
- package/dist/types/models/range.d.ts +7 -0
- package/dist/types/models/scatter.d.ts +7 -0
- package/dist/types/models/table.d.ts +7 -0
- package/dist/types/models/time-series.d.ts +7 -0
- package/dist/types/models/types.d.ts +7 -0
- package/dist/types/models/use-widget-model.d.ts +1 -0
- package/dist/types/provider.d.ts +11 -0
- package/dist/types/providers/layers/store.d.ts +1 -1
- package/dist/types/providers/layers/types.d.ts +13 -1
- package/dist/types/providers/map/provider.d.ts +2 -2
- package/dist/types/providers/map/store.d.ts +2 -2
- package/dist/types/providers/map/types.d.ts +6 -4
- package/dist/types/providers/sources/store.d.ts +3 -2
- package/dist/types/providers/sources/types.d.ts +46 -5
- package/dist/types/types.d.ts +9 -9
- package/dist/types/use-layers.d.ts +4 -0
- package/dist/types/use-legend.d.ts +16 -0
- package/dist/types/use-spatial-filter.d.ts +15 -0
- package/dist/types/utils/mapping-meridian.d.ts +15 -0
- package/dist/types/utils/sort-layers.d.ts +2 -0
- package/dist/types/zoom-controls.d.ts +1 -1
- package/package.json +23 -17
- package/dist/types/use-get-layers.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -1,202 +1,206 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { DeckGL as
|
|
8
|
-
import { Map as
|
|
9
|
-
import { Map as
|
|
10
|
-
import { CompositeMode as
|
|
11
|
-
import { create as
|
|
12
|
-
import { FlyToInterpolator as
|
|
13
|
-
import { GeoJsonLayer as
|
|
14
|
-
import { DataFilterExtension as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
|
|
1
|
+
var Rt = Object.defineProperty;
|
|
2
|
+
var Dt = (s, e, t) => e in s ? Rt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var te = (s, e, t) => Dt(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as V, jsxs as xt } from "react/jsx-runtime";
|
|
5
|
+
import { c as _ } from "react/compiler-runtime";
|
|
6
|
+
import { useState as Se, useEffect as Y, useImperativeHandle as Ut, createContext as Ie, useContext as Be, useMemo as ue, useCallback as x, useRef as ut } from "react";
|
|
7
|
+
import { DeckGL as qt } from "@deck.gl/react";
|
|
8
|
+
import { Map as $t, MapProvider as Vt, useMap as Nt } from "react-map-gl/maplibre";
|
|
9
|
+
import { Map as It, APIProvider as Bt, limitTiltRange as Gt, useMap as Ht } from "@vis.gl/react-google-maps";
|
|
10
|
+
import { CompositeMode as Wt, TranslateMode as jt, ModifyMode as Qt, DrawPolygonMode as Kt, DrawRectangleMode as Zt, DrawCircleFromCenterMode as dt, DrawPolygonByDraggingMode as zt, EditableGeoJsonLayer as ft, MeasureAreaMode as Yt, getPickedEditHandle as Xt, MeasureDistanceMode as Jt } from "@deck.gl-community/editable-layers";
|
|
11
|
+
import { create as pt, createStore as Ge, useStore as He } from "zustand";
|
|
12
|
+
import { FlyToInterpolator as en, WebMercatorViewport as tn } from "@deck.gl/core";
|
|
13
|
+
import { GeoJsonLayer as nn } from "@deck.gl/layers";
|
|
14
|
+
import { DataFilterExtension as sn, MaskExtension as rn } from "@deck.gl/extensions";
|
|
15
|
+
import { useShallow as mt } from "zustand/shallow";
|
|
16
|
+
import { earthRadius as je, feature as Qe, featureCollection as Ke, point as yt, multiPolygon as on } from "@turf/helpers";
|
|
17
|
+
import { formatNumber as ht, formatCurrency as an } from "@carto/ps-utils";
|
|
18
|
+
import ln from "convert-units";
|
|
19
|
+
import cn from "convert-units/definitions/length";
|
|
20
|
+
import { WidgetQuerySource as un, WidgetTableSource as dn, WidgetTilesetSource as fn, TileFormat as pn, WidgetRasterSource as mn, createViewportSpatialFilter as yn } from "@carto/api-client";
|
|
21
|
+
import { useQuery as de } from "@tanstack/react-query";
|
|
22
|
+
import hn from "html2canvas";
|
|
23
|
+
const xe = {
|
|
20
24
|
roadmap: "roadmap",
|
|
21
25
|
satellite: "satellite",
|
|
22
26
|
hybrid: "hybrid"
|
|
23
|
-
},
|
|
27
|
+
}, z = {
|
|
24
28
|
darkMatter: "darkMatter",
|
|
25
29
|
positron: "positron",
|
|
26
30
|
voyager: "voyager"
|
|
27
|
-
},
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
},
|
|
31
|
+
}, Ue = {
|
|
32
|
+
[z.positron]: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
33
|
+
[z.voyager]: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
34
|
+
[z.darkMatter]: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
35
|
+
}, ce = {
|
|
32
36
|
maplibre: "maplibre",
|
|
33
37
|
googleMaps: "google-maps"
|
|
34
|
-
},
|
|
35
|
-
[
|
|
36
|
-
url:
|
|
37
|
-
type:
|
|
38
|
+
}, gt = {
|
|
39
|
+
[z.positron]: {
|
|
40
|
+
url: Ue[z.positron],
|
|
41
|
+
type: ce.maplibre
|
|
38
42
|
},
|
|
39
|
-
[
|
|
40
|
-
url:
|
|
41
|
-
type:
|
|
43
|
+
[z.voyager]: {
|
|
44
|
+
url: Ue[z.voyager],
|
|
45
|
+
type: ce.maplibre
|
|
42
46
|
},
|
|
43
|
-
[
|
|
44
|
-
url:
|
|
45
|
-
type:
|
|
47
|
+
[z.darkMatter]: {
|
|
48
|
+
url: Ue[z.darkMatter],
|
|
49
|
+
type: ce.maplibre,
|
|
46
50
|
dark: !0
|
|
47
51
|
},
|
|
48
|
-
[
|
|
49
|
-
type:
|
|
52
|
+
[xe.roadmap]: {
|
|
53
|
+
type: ce.googleMaps
|
|
50
54
|
},
|
|
51
|
-
[
|
|
52
|
-
type:
|
|
55
|
+
[xe.satellite]: {
|
|
56
|
+
type: ce.googleMaps
|
|
53
57
|
},
|
|
54
|
-
[
|
|
55
|
-
type:
|
|
58
|
+
[xe.hybrid]: {
|
|
59
|
+
type: ce.googleMaps
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
|
-
function
|
|
59
|
-
isDragging:
|
|
62
|
+
function gn({
|
|
63
|
+
isDragging: s,
|
|
60
64
|
isHovering: e
|
|
61
65
|
}) {
|
|
62
|
-
return
|
|
66
|
+
return s ? "grabbing" : e ? "pointer" : "grab";
|
|
63
67
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
66
|
-
html: `<div class='map-tooltip__content'>${
|
|
68
|
+
function Sn(s) {
|
|
69
|
+
return s.html ? {
|
|
70
|
+
html: `<div class='map-tooltip__content'>${s.html}</div>`,
|
|
67
71
|
style: {
|
|
68
72
|
padding: "0",
|
|
69
73
|
background: "none"
|
|
70
74
|
}
|
|
71
75
|
} : null;
|
|
72
76
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
const e =
|
|
76
|
-
let t,
|
|
77
|
-
e[0] !==
|
|
77
|
+
function vn(s) {
|
|
78
|
+
var me, P, We;
|
|
79
|
+
const e = _(66);
|
|
80
|
+
let t, n, r, i, o, a, l, f, c, m, d, u, y, p;
|
|
81
|
+
e[0] !== s ? ({
|
|
78
82
|
instanceRef: t,
|
|
79
|
-
overlayRef:
|
|
83
|
+
overlayRef: i,
|
|
80
84
|
basemap: l,
|
|
81
|
-
controller:
|
|
82
|
-
id:
|
|
83
|
-
layers:
|
|
85
|
+
controller: f,
|
|
86
|
+
id: c,
|
|
87
|
+
layers: m,
|
|
84
88
|
parameters: o,
|
|
85
|
-
gmapsProps:
|
|
86
|
-
getCursor:
|
|
87
|
-
getTooltip:
|
|
88
|
-
onLoad:
|
|
89
|
-
onResize:
|
|
90
|
-
onViewStateChange:
|
|
89
|
+
gmapsProps: d,
|
|
90
|
+
getCursor: u,
|
|
91
|
+
getTooltip: y,
|
|
92
|
+
onLoad: n,
|
|
93
|
+
onResize: r,
|
|
94
|
+
onViewStateChange: p,
|
|
91
95
|
...a
|
|
92
|
-
} =
|
|
93
|
-
const
|
|
96
|
+
} = s, e[0] = s, e[1] = t, e[2] = n, e[3] = r, e[4] = i, e[5] = o, e[6] = a, e[7] = l, e[8] = f, e[9] = c, e[10] = m, e[11] = d, e[12] = u, e[13] = y, e[14] = p) : (t = e[1], n = e[2], r = e[3], i = e[4], o = e[5], a = e[6], l = e[7], f = e[8], c = e[9], m = e[10], d = e[11], u = e[12], y = e[13], p = e[14]);
|
|
97
|
+
const v = l === void 0 ? z.positron : l, b = f === void 0 ? !0 : f, S = c === void 0 ? "deck-gl-map" : c;
|
|
94
98
|
let E;
|
|
95
|
-
e[15] !==
|
|
96
|
-
const
|
|
97
|
-
let
|
|
98
|
-
e[17] !==
|
|
99
|
+
e[15] !== m ? (E = m === void 0 ? [] : m, e[15] = m, e[16] = E) : E = e[16];
|
|
100
|
+
const h = E;
|
|
101
|
+
let L;
|
|
102
|
+
e[17] !== d ? (L = d === void 0 ? {
|
|
99
103
|
apiKey: ""
|
|
100
|
-
} :
|
|
101
|
-
let
|
|
102
|
-
e[19] !==
|
|
103
|
-
apiKey:
|
|
104
|
-
APIProviderProps:
|
|
105
|
-
...
|
|
106
|
-
} =
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
e[23] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
110
|
-
const [
|
|
111
|
-
let
|
|
112
|
-
e[24] !==
|
|
113
|
-
const
|
|
114
|
-
let
|
|
115
|
-
e[26] !==
|
|
116
|
-
|
|
117
|
-
}, e[26] =
|
|
118
|
-
const
|
|
119
|
-
url:
|
|
120
|
-
type:
|
|
121
|
-
} =
|
|
122
|
-
let
|
|
123
|
-
e[28] !==
|
|
124
|
-
const
|
|
125
|
-
let
|
|
126
|
-
e[30] !==
|
|
127
|
-
const
|
|
128
|
-
...
|
|
129
|
-
viewState:
|
|
130
|
-
} :
|
|
131
|
-
|
|
132
|
-
}, e[30] =
|
|
133
|
-
const
|
|
134
|
-
let
|
|
135
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
}, e[33] =
|
|
139
|
-
const ie =
|
|
140
|
-
let
|
|
141
|
-
e[34] !==
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
let
|
|
145
|
-
e[38] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
104
|
+
} : d, e[17] = d, e[18] = L) : L = e[18];
|
|
105
|
+
let T, C, g;
|
|
106
|
+
e[19] !== L ? ({
|
|
107
|
+
apiKey: g,
|
|
108
|
+
APIProviderProps: T,
|
|
109
|
+
...C
|
|
110
|
+
} = L, e[19] = L, e[20] = T, e[21] = C, e[22] = g) : (T = e[20], C = e[21], g = e[22]);
|
|
111
|
+
const M = u === void 0 ? gn : u, w = y === void 0 ? Sn : y, F = p === void 0 ? Pn : p;
|
|
112
|
+
let R;
|
|
113
|
+
e[23] === Symbol.for("react.memo_cache_sentinel") ? (R = [!1, !1], e[23] = R) : R = e[23];
|
|
114
|
+
const [q, X] = Se(R);
|
|
115
|
+
let N;
|
|
116
|
+
e[24] !== q ? (N = q.every(Mn), e[24] = q, e[25] = N) : N = e[25];
|
|
117
|
+
const U = N;
|
|
118
|
+
let $;
|
|
119
|
+
e[26] !== r ? ($ = (ye) => {
|
|
120
|
+
r == null || r(ye);
|
|
121
|
+
}, e[26] = r, e[27] = $) : $ = e[27];
|
|
122
|
+
const ne = $, {
|
|
123
|
+
url: I,
|
|
124
|
+
type: Me
|
|
125
|
+
} = gt[v], H = Me === ce.googleMaps;
|
|
126
|
+
let ve, J;
|
|
127
|
+
e[28] !== h ? (J = h.filter(Ln).map(En), e[28] = h, e[29] = J) : J = e[29], ve = J;
|
|
128
|
+
const pe = ve;
|
|
129
|
+
let se;
|
|
130
|
+
e[30] !== H || e[31] !== F ? (se = (ye) => {
|
|
131
|
+
const De = H ? {
|
|
132
|
+
...ye,
|
|
133
|
+
viewState: Gt(ye)
|
|
134
|
+
} : ye;
|
|
135
|
+
F(De);
|
|
136
|
+
}, e[30] = H, e[31] = F, e[32] = se) : se = e[32];
|
|
137
|
+
const re = se;
|
|
138
|
+
let W;
|
|
139
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (W = (ye) => {
|
|
140
|
+
const De = ye.type === "deckgl" ? 0 : 1;
|
|
141
|
+
X((Ft) => Ft.map((Ot, At) => At === De ? !0 : Ot));
|
|
142
|
+
}, e[33] = W) : W = e[33];
|
|
143
|
+
const ie = W;
|
|
144
|
+
let oe, ae;
|
|
145
|
+
e[34] !== U || e[35] !== n ? (oe = () => {
|
|
146
|
+
n == null || n(U);
|
|
147
|
+
}, ae = [U, n], e[34] = U, e[35] = n, e[36] = oe, e[37] = ae) : (oe = e[36], ae = e[37]), Y(oe, ae);
|
|
148
|
+
let ee;
|
|
149
|
+
e[38] === Symbol.for("react.memo_cache_sentinel") ? (ee = () => ie({
|
|
146
150
|
type: "deckgl"
|
|
147
|
-
}), e[38] =
|
|
148
|
-
let
|
|
149
|
-
e[39] !== o ? (
|
|
151
|
+
}), e[38] = ee) : ee = e[38];
|
|
152
|
+
let K;
|
|
153
|
+
e[39] !== o ? (K = {
|
|
150
154
|
depthTest: !1,
|
|
151
155
|
...o
|
|
152
|
-
}, e[39] = o, e[40] =
|
|
156
|
+
}, e[39] = o, e[40] = K) : K = e[40];
|
|
153
157
|
let j;
|
|
154
|
-
e[41] !==
|
|
155
|
-
let
|
|
156
|
-
e[43] !==
|
|
157
|
-
lat: ((
|
|
158
|
-
lng: ((
|
|
159
|
-
}, defaultZoom: ((
|
|
158
|
+
e[41] !== i ? (j = /* @__PURE__ */ V(wn, { overlayRef: i }), e[41] = i, e[42] = j) : j = e[42];
|
|
159
|
+
let Z;
|
|
160
|
+
e[43] !== C || e[44] !== v || e[45] !== H || e[46] !== I || e[47] !== a ? (Z = H ? /* @__PURE__ */ V(It, { mapTypeId: v, reuseMaps: !0, renderingType: "RASTER", ...C, defaultCenter: {
|
|
161
|
+
lat: ((me = a.initialViewState) == null ? void 0 : me.latitude) ?? 0,
|
|
162
|
+
lng: ((P = a.initialViewState) == null ? void 0 : P.longitude) ?? 0
|
|
163
|
+
}, defaultZoom: ((We = a.initialViewState) == null ? void 0 : We.zoom) ?? 0, onTilesLoaded: () => ie({
|
|
160
164
|
type: "load"
|
|
161
|
-
}) }) : /* @__PURE__ */
|
|
165
|
+
}) }) : /* @__PURE__ */ V($t, { reuseMaps: !0, mapStyle: I, onLoad: () => ie({
|
|
162
166
|
type: "load"
|
|
163
|
-
}), onRender:
|
|
164
|
-
let
|
|
165
|
-
e[49] !==
|
|
167
|
+
}), onRender: bn }), e[43] = C, e[44] = v, e[45] = H, e[46] = I, e[47] = a, e[48] = Z) : Z = e[48];
|
|
168
|
+
let Q;
|
|
169
|
+
e[49] !== pe || e[50] !== b || e[51] !== M || e[52] !== w || e[53] !== ne || e[54] !== re || e[55] !== S || e[56] !== t || e[57] !== a || e[58] !== K || e[59] !== j || e[60] !== Z ? (Q = /* @__PURE__ */ V(Vt, { children: /* @__PURE__ */ V("div", { className: "deckgl-map", children: /* @__PURE__ */ xt(qt, { controller: b, id: S, ref: t, layers: pe, getCursor: M, getTooltip: w, onLoad: ee, onResize: ne, onViewStateChange: re, parameters: K, ...a, children: [
|
|
166
170
|
j,
|
|
167
|
-
|
|
168
|
-
] }) }) }), e[49] =
|
|
169
|
-
let
|
|
170
|
-
return e[62] !==
|
|
171
|
+
Z
|
|
172
|
+
] }) }) }), e[49] = pe, e[50] = b, e[51] = M, e[52] = w, e[53] = ne, e[54] = re, e[55] = S, e[56] = t, e[57] = a, e[58] = K, e[59] = j, e[60] = Z, e[61] = Q) : Q = e[61];
|
|
173
|
+
let le;
|
|
174
|
+
return e[62] !== T || e[63] !== g || e[64] !== Q ? (le = /* @__PURE__ */ V(Bt, { apiKey: g, ...T, children: Q }), e[62] = T, e[63] = g, e[64] = Q, e[65] = le) : le = e[65], le;
|
|
171
175
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
174
|
-
|
|
176
|
+
function bn() {
|
|
177
|
+
const s = document.querySelector(".maplibregl-compact-show");
|
|
178
|
+
s == null || s.classList.remove("maplibregl-compact-show");
|
|
175
179
|
}
|
|
176
|
-
function
|
|
180
|
+
function En(s) {
|
|
177
181
|
const {
|
|
178
182
|
type: e,
|
|
179
183
|
props: t
|
|
180
|
-
} =
|
|
184
|
+
} = s;
|
|
181
185
|
return new e(t);
|
|
182
186
|
}
|
|
183
|
-
function
|
|
184
|
-
return !!(
|
|
187
|
+
function Ln(s) {
|
|
188
|
+
return !!(s != null && s.type);
|
|
185
189
|
}
|
|
186
|
-
function
|
|
187
|
-
return
|
|
190
|
+
function Mn(s) {
|
|
191
|
+
return s;
|
|
188
192
|
}
|
|
189
|
-
function
|
|
193
|
+
function Pn() {
|
|
190
194
|
return null;
|
|
191
195
|
}
|
|
192
|
-
function
|
|
193
|
-
const e =
|
|
196
|
+
function wn(s) {
|
|
197
|
+
const e = _(4), {
|
|
194
198
|
overlayRef: t
|
|
195
|
-
} =
|
|
196
|
-
default:
|
|
197
|
-
} =
|
|
198
|
-
let
|
|
199
|
-
return e[0] !==
|
|
199
|
+
} = s, {
|
|
200
|
+
default: n
|
|
201
|
+
} = Nt(), r = Ht();
|
|
202
|
+
let i, o;
|
|
203
|
+
return e[0] !== r || e[1] !== n ? (i = () => n ?? r, o = [n, r], e[0] = r, e[1] = n, e[2] = i, e[3] = o) : (i = e[2], o = e[3]), Ut(t, i, o), null;
|
|
200
204
|
}
|
|
201
205
|
const G = {
|
|
202
206
|
addFeature: "addFeature",
|
|
@@ -206,9 +210,9 @@ const G = {
|
|
|
206
210
|
finish: "finish",
|
|
207
211
|
addPosition: "addPosition"
|
|
208
212
|
};
|
|
209
|
-
class
|
|
213
|
+
class _n extends Wt {
|
|
210
214
|
constructor() {
|
|
211
|
-
super([new
|
|
215
|
+
super([new jt(), new Qt()]);
|
|
212
216
|
}
|
|
213
217
|
handleKeyUp(e, t) {
|
|
214
218
|
super.handleKeyUp(e, t), e.key === "Enter" && (this.resetClickSequence(), t.onEdit({
|
|
@@ -218,8 +222,8 @@ class dn extends $t {
|
|
|
218
222
|
}));
|
|
219
223
|
}
|
|
220
224
|
}
|
|
221
|
-
const
|
|
222
|
-
id:
|
|
225
|
+
const be = "lassoLayer", Ae = "maskLayer", Tn = {
|
|
226
|
+
id: be,
|
|
223
227
|
pickable: !1,
|
|
224
228
|
billboard: !1,
|
|
225
229
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -233,7 +237,7 @@ const Ce = "lassoLayer", fn = "maskLayer", mn = {
|
|
|
233
237
|
getLineWidth: 2
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
|
-
},
|
|
240
|
+
}, Ze = {
|
|
237
241
|
editing: {
|
|
238
242
|
border: [3, 111, 226, 255],
|
|
239
243
|
fill: [3, 111, 226, 20.4],
|
|
@@ -243,349 +247,372 @@ const Ce = "lassoLayer", fn = "maskLayer", mn = {
|
|
|
243
247
|
border: [71, 219, 153, 255],
|
|
244
248
|
fill: [71, 219, 153, 0]
|
|
245
249
|
}
|
|
246
|
-
},
|
|
250
|
+
}, qe = {
|
|
247
251
|
styles: {
|
|
248
252
|
colors: {
|
|
249
|
-
editing:
|
|
250
|
-
finished:
|
|
253
|
+
editing: Ze.editing,
|
|
254
|
+
finished: Ze.finished
|
|
251
255
|
}
|
|
252
256
|
},
|
|
253
257
|
labels: {
|
|
254
258
|
mask: "Geometry"
|
|
255
259
|
}
|
|
256
|
-
},
|
|
257
|
-
id:
|
|
260
|
+
}, Te = {
|
|
261
|
+
id: Ae,
|
|
258
262
|
stroked: !0,
|
|
259
263
|
filled: !0,
|
|
260
264
|
lineWidthUnits: "pixels",
|
|
261
265
|
getLineWidth: 2,
|
|
262
|
-
lineWidthMinPixels: 2
|
|
266
|
+
lineWidthMinPixels: 2,
|
|
267
|
+
operation: "mask+draw"
|
|
263
268
|
}, ze = {
|
|
264
269
|
polygon: {
|
|
265
270
|
value: "polygon",
|
|
266
|
-
mode:
|
|
271
|
+
mode: Kt
|
|
267
272
|
},
|
|
268
273
|
rectangle: {
|
|
269
274
|
value: "rectangle",
|
|
270
|
-
mode:
|
|
275
|
+
mode: Zt
|
|
271
276
|
},
|
|
272
277
|
circle: {
|
|
273
278
|
value: "circle",
|
|
274
|
-
mode:
|
|
279
|
+
mode: dt
|
|
275
280
|
},
|
|
276
281
|
lasso: {
|
|
277
282
|
value: "lasso",
|
|
278
|
-
mode:
|
|
283
|
+
mode: zt
|
|
279
284
|
},
|
|
280
285
|
edit: {
|
|
281
286
|
value: "edit",
|
|
282
|
-
mode:
|
|
287
|
+
mode: _n
|
|
283
288
|
}
|
|
284
|
-
},
|
|
289
|
+
}, we = pt((s) => ({
|
|
285
290
|
layers: {},
|
|
286
|
-
setLayer: (e, t) =>
|
|
287
|
-
|
|
288
|
-
|
|
291
|
+
setLayer: (e, t) => s((n) => {
|
|
292
|
+
var o;
|
|
293
|
+
const r = {
|
|
294
|
+
...n.layers
|
|
289
295
|
};
|
|
290
296
|
if (!t)
|
|
291
|
-
return delete
|
|
292
|
-
layers:
|
|
297
|
+
return delete r[e], {
|
|
298
|
+
layers: r
|
|
293
299
|
};
|
|
294
|
-
const
|
|
300
|
+
const i = r[e] ?? {
|
|
295
301
|
type: null,
|
|
296
302
|
props: {}
|
|
297
|
-
}
|
|
298
|
-
return
|
|
299
|
-
...
|
|
303
|
+
};
|
|
304
|
+
return r[e] = {
|
|
305
|
+
...i,
|
|
300
306
|
...t,
|
|
301
307
|
props: {
|
|
302
308
|
id: e,
|
|
303
|
-
...
|
|
304
|
-
...
|
|
309
|
+
...i.props,
|
|
310
|
+
...t.props,
|
|
311
|
+
extensions: [...i.props.extensions ?? [], ...((o = t.props) == null ? void 0 : o.extensions) ?? []]
|
|
312
|
+
},
|
|
313
|
+
legend: {
|
|
314
|
+
...i.legend,
|
|
315
|
+
...t.legend
|
|
305
316
|
}
|
|
306
317
|
}, {
|
|
307
|
-
layers:
|
|
318
|
+
layers: r
|
|
308
319
|
};
|
|
309
320
|
})
|
|
310
|
-
})),
|
|
321
|
+
})), Cn = {
|
|
311
322
|
transitionDuration: "auto",
|
|
312
|
-
transitionInterpolator: new
|
|
323
|
+
transitionInterpolator: new en({
|
|
313
324
|
curve: 2
|
|
314
325
|
})
|
|
315
|
-
},
|
|
316
|
-
const e =
|
|
326
|
+
}, kn = (s) => {
|
|
327
|
+
const e = s.reduce((t, n) => {
|
|
317
328
|
const {
|
|
318
|
-
id:
|
|
319
|
-
basemap:
|
|
320
|
-
} =
|
|
321
|
-
return t[
|
|
329
|
+
id: r,
|
|
330
|
+
basemap: i
|
|
331
|
+
} = n;
|
|
332
|
+
return t[r] = {
|
|
322
333
|
isLoaded: !1,
|
|
323
334
|
areLayersLoaded: !1,
|
|
324
|
-
basemap:
|
|
335
|
+
basemap: i,
|
|
325
336
|
instanceRef: {
|
|
326
337
|
current: {}
|
|
327
338
|
},
|
|
328
339
|
overlayRef: {
|
|
329
340
|
current: null
|
|
330
341
|
},
|
|
331
|
-
layers:
|
|
342
|
+
layers: n.layers ?? []
|
|
332
343
|
}, t;
|
|
333
344
|
}, {});
|
|
334
|
-
return (t,
|
|
345
|
+
return (t, n) => ({
|
|
335
346
|
maps: e,
|
|
336
|
-
setBasemap: (
|
|
347
|
+
setBasemap: (r, i) => t((o) => ({
|
|
337
348
|
maps: {
|
|
338
349
|
...o.maps,
|
|
339
|
-
[
|
|
340
|
-
...o.maps[
|
|
341
|
-
basemap:
|
|
350
|
+
[r]: {
|
|
351
|
+
...o.maps[r],
|
|
352
|
+
basemap: i
|
|
342
353
|
}
|
|
343
354
|
}
|
|
344
355
|
})),
|
|
345
|
-
setLoad: (
|
|
356
|
+
setLoad: (r, i) => t((o) => ({
|
|
346
357
|
maps: {
|
|
347
358
|
...o.maps,
|
|
348
|
-
[
|
|
349
|
-
...o.maps[
|
|
350
|
-
isLoaded:
|
|
359
|
+
[r]: {
|
|
360
|
+
...o.maps[r],
|
|
361
|
+
isLoaded: i
|
|
351
362
|
}
|
|
352
363
|
}
|
|
353
364
|
})),
|
|
354
|
-
setLayersLoad: (
|
|
365
|
+
setLayersLoad: (r, i) => t((o) => ({
|
|
355
366
|
maps: {
|
|
356
367
|
...o.maps,
|
|
357
|
-
[
|
|
358
|
-
...o.maps[
|
|
359
|
-
areLayersLoaded:
|
|
368
|
+
[r]: {
|
|
369
|
+
...o.maps[r],
|
|
370
|
+
areLayersLoaded: i
|
|
360
371
|
}
|
|
361
372
|
}
|
|
362
373
|
})),
|
|
363
|
-
getOverlayInstance: (
|
|
374
|
+
getOverlayInstance: (r) => {
|
|
364
375
|
var o, a;
|
|
365
|
-
return (a = (o =
|
|
376
|
+
return (a = (o = n().maps[r]) == null ? void 0 : o.overlayRef) == null ? void 0 : a.current;
|
|
366
377
|
},
|
|
367
|
-
getDeckInstance: (
|
|
378
|
+
getDeckInstance: (r) => {
|
|
368
379
|
var o, a, l;
|
|
369
|
-
return (l = (a = (o =
|
|
380
|
+
return (l = (a = (o = n().maps[r]) == null ? void 0 : o.instanceRef) == null ? void 0 : a.current) == null ? void 0 : l.deck;
|
|
370
381
|
},
|
|
371
|
-
getViewState: (
|
|
372
|
-
const o =
|
|
382
|
+
getViewState: (r) => {
|
|
383
|
+
const o = n().getDeckInstance(r);
|
|
373
384
|
return o == null ? void 0 : o.viewState;
|
|
374
385
|
},
|
|
375
|
-
getViewports: (
|
|
376
|
-
const a =
|
|
377
|
-
return a == null ? void 0 : a.getViewports(
|
|
386
|
+
getViewports: (r, i) => {
|
|
387
|
+
const a = n().getDeckInstance(r);
|
|
388
|
+
return a == null ? void 0 : a.getViewports(i);
|
|
378
389
|
},
|
|
379
|
-
getViewport: (
|
|
380
|
-
var
|
|
381
|
-
const l =
|
|
382
|
-
return (
|
|
390
|
+
getViewport: (r, i = 0, o) => {
|
|
391
|
+
var f;
|
|
392
|
+
const l = n().getDeckInstance(r);
|
|
393
|
+
return (f = l == null ? void 0 : l.getViewports(o)) == null ? void 0 : f[i];
|
|
383
394
|
},
|
|
384
|
-
addLayers: (
|
|
385
|
-
var
|
|
395
|
+
addLayers: (r, i) => t((o) => {
|
|
396
|
+
var c;
|
|
386
397
|
const a = {
|
|
387
398
|
...o.maps
|
|
388
|
-
}, l = ((
|
|
389
|
-
return a[
|
|
390
|
-
...a[
|
|
391
|
-
layers: [...
|
|
399
|
+
}, l = ((c = a[r]) == null ? void 0 : c.layers) ?? [], f = /* @__PURE__ */ new Set([...l, ...i]);
|
|
400
|
+
return a[r] = {
|
|
401
|
+
...a[r],
|
|
402
|
+
layers: [...f]
|
|
392
403
|
}, {
|
|
393
404
|
maps: a
|
|
394
405
|
};
|
|
395
406
|
}),
|
|
396
|
-
removeLayers: (
|
|
397
|
-
var
|
|
407
|
+
removeLayers: (r, i) => t((o) => {
|
|
408
|
+
var f;
|
|
398
409
|
const a = {
|
|
399
410
|
...o.maps
|
|
400
|
-
}, l = ((
|
|
401
|
-
return a[
|
|
402
|
-
...a[
|
|
403
|
-
layers: l.filter((
|
|
411
|
+
}, l = ((f = a[r]) == null ? void 0 : f.layers) ?? [];
|
|
412
|
+
return a[r] = {
|
|
413
|
+
...a[r],
|
|
414
|
+
layers: l.filter((c) => !i.includes(c))
|
|
404
415
|
}, {
|
|
405
416
|
maps: a
|
|
406
417
|
};
|
|
407
418
|
})
|
|
408
419
|
});
|
|
409
|
-
},
|
|
410
|
-
const e =
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
420
|
+
}, Fn = (s) => {
|
|
421
|
+
const e = s.reduce((t, n) => (n.viewState && (t.viewStates[n.id] = n.viewState, t.viewports[n.id] = null), t), {
|
|
422
|
+
viewStates: {},
|
|
423
|
+
viewports: {}
|
|
424
|
+
});
|
|
425
|
+
return (t, n) => ({
|
|
426
|
+
viewports: e.viewports,
|
|
427
|
+
updateViewPort: (r) => {
|
|
428
|
+
var a;
|
|
429
|
+
const i = n();
|
|
430
|
+
if (!((a = i.maps[r]) != null && a.isLoaded)) return;
|
|
431
|
+
const o = new tn(i.viewStates[r]);
|
|
432
|
+
t((l) => ({
|
|
433
|
+
viewports: {
|
|
434
|
+
...l.viewports,
|
|
435
|
+
[r]: o
|
|
436
|
+
}
|
|
437
|
+
}));
|
|
438
|
+
},
|
|
439
|
+
viewStates: e.viewStates,
|
|
440
|
+
setViewState: (r, i) => t((o) => ({
|
|
414
441
|
viewStates: {
|
|
415
|
-
...
|
|
416
|
-
[
|
|
417
|
-
...
|
|
442
|
+
...o.viewStates,
|
|
443
|
+
[r]: {
|
|
444
|
+
...o.viewStates[r],
|
|
418
445
|
...i
|
|
419
446
|
}
|
|
420
447
|
}
|
|
421
448
|
})),
|
|
422
|
-
setZoom: (
|
|
449
|
+
setZoom: (r, i) => t((o) => ({
|
|
423
450
|
viewStates: {
|
|
424
|
-
...
|
|
425
|
-
[
|
|
426
|
-
...
|
|
451
|
+
...o.viewStates,
|
|
452
|
+
[r]: {
|
|
453
|
+
...o.viewStates[r],
|
|
427
454
|
zoom: i
|
|
428
455
|
}
|
|
429
456
|
}
|
|
430
457
|
})),
|
|
431
|
-
setMinZoom: (
|
|
458
|
+
setMinZoom: (r, i) => t((o) => ({
|
|
432
459
|
viewStates: {
|
|
433
|
-
...
|
|
434
|
-
[
|
|
435
|
-
...
|
|
460
|
+
...o.viewStates,
|
|
461
|
+
[r]: {
|
|
462
|
+
...o.viewStates[r],
|
|
436
463
|
minZoom: i
|
|
437
464
|
}
|
|
438
465
|
}
|
|
439
466
|
})),
|
|
440
|
-
setMaxZoom: (
|
|
467
|
+
setMaxZoom: (r, i) => t((o) => ({
|
|
441
468
|
viewStates: {
|
|
442
|
-
...
|
|
443
|
-
[
|
|
444
|
-
...
|
|
469
|
+
...o.viewStates,
|
|
470
|
+
[r]: {
|
|
471
|
+
...o.viewStates[r],
|
|
445
472
|
maxZoom: i
|
|
446
473
|
}
|
|
447
474
|
}
|
|
448
475
|
}))
|
|
449
476
|
});
|
|
450
|
-
},
|
|
451
|
-
fitBounds: (t,
|
|
452
|
-
const
|
|
477
|
+
}, On = (s, e) => ({
|
|
478
|
+
fitBounds: (t, n, r) => {
|
|
479
|
+
const i = e(), o = i.getViewport(t);
|
|
453
480
|
if (!o) return;
|
|
454
481
|
const l = {
|
|
455
|
-
...o == null ? void 0 : o.fitBounds(
|
|
456
|
-
...
|
|
482
|
+
...o == null ? void 0 : o.fitBounds(n, r == null ? void 0 : r.boundsOptions),
|
|
483
|
+
...r == null ? void 0 : r.viewStateOptions
|
|
457
484
|
};
|
|
458
|
-
|
|
485
|
+
i.setViewState(t, l);
|
|
459
486
|
},
|
|
460
|
-
flyTo: (t,
|
|
461
|
-
const
|
|
462
|
-
if (!
|
|
487
|
+
flyTo: (t, n, r = {}) => {
|
|
488
|
+
const i = e();
|
|
489
|
+
if (!i.getViewport(t)) return;
|
|
463
490
|
const a = {
|
|
464
|
-
...
|
|
465
|
-
...
|
|
491
|
+
...Cn,
|
|
492
|
+
...r == null ? void 0 : r.viewStateOptions
|
|
466
493
|
}, l = {
|
|
467
|
-
...
|
|
494
|
+
...n,
|
|
468
495
|
...a
|
|
469
496
|
};
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
}),
|
|
473
|
-
...
|
|
474
|
-
...
|
|
475
|
-
...
|
|
476
|
-
})),
|
|
477
|
-
function
|
|
478
|
-
const e =
|
|
497
|
+
i.setViewState(t, l);
|
|
498
|
+
}
|
|
499
|
+
}), An = (s) => Ge()((...e) => ({
|
|
500
|
+
...kn(s)(...e),
|
|
501
|
+
...Fn(s)(...e),
|
|
502
|
+
...On(...e)
|
|
503
|
+
})), St = Ie({});
|
|
504
|
+
function Rn(s) {
|
|
505
|
+
const e = _(5), {
|
|
479
506
|
children: t,
|
|
480
|
-
values:
|
|
481
|
-
} =
|
|
482
|
-
let
|
|
483
|
-
e[0] !==
|
|
484
|
-
const [
|
|
507
|
+
values: n
|
|
508
|
+
} = s;
|
|
509
|
+
let r;
|
|
510
|
+
e[0] !== n ? (r = An(n), e[0] = n, e[1] = r) : r = e[1];
|
|
511
|
+
const [i] = Se(r);
|
|
485
512
|
let o;
|
|
486
|
-
return e[2] !== t || e[3] !==
|
|
513
|
+
return e[2] !== t || e[3] !== i ? (o = /* @__PURE__ */ V(St.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = o) : o = e[4], o;
|
|
487
514
|
}
|
|
488
|
-
function k(
|
|
489
|
-
const e =
|
|
490
|
-
if (!e)
|
|
491
|
-
throw new Error("Missing
|
|
492
|
-
return
|
|
515
|
+
function k(s) {
|
|
516
|
+
const e = Be(St);
|
|
517
|
+
if (!Object.keys(e).length)
|
|
518
|
+
throw new Error("Missing MapProvider in the tree");
|
|
519
|
+
return He(e, s);
|
|
493
520
|
}
|
|
494
|
-
function
|
|
495
|
-
return
|
|
521
|
+
function Dn(s) {
|
|
522
|
+
return s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
496
523
|
}
|
|
497
|
-
var
|
|
498
|
-
return
|
|
524
|
+
var xn = function(e) {
|
|
525
|
+
return Un(e) && !qn(e);
|
|
499
526
|
};
|
|
500
|
-
function
|
|
501
|
-
return !!
|
|
527
|
+
function Un(s) {
|
|
528
|
+
return !!s && typeof s == "object";
|
|
502
529
|
}
|
|
503
|
-
function
|
|
504
|
-
var e = Object.prototype.toString.call(
|
|
505
|
-
return e === "[object RegExp]" || e === "[object Date]" ||
|
|
530
|
+
function qn(s) {
|
|
531
|
+
var e = Object.prototype.toString.call(s);
|
|
532
|
+
return e === "[object RegExp]" || e === "[object Date]" || Nn(s);
|
|
506
533
|
}
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
return
|
|
534
|
+
var $n = typeof Symbol == "function" && Symbol.for, Vn = $n ? Symbol.for("react.element") : 60103;
|
|
535
|
+
function Nn(s) {
|
|
536
|
+
return s.$$typeof === Vn;
|
|
510
537
|
}
|
|
511
|
-
function
|
|
512
|
-
return Array.isArray(
|
|
538
|
+
function In(s) {
|
|
539
|
+
return Array.isArray(s) ? [] : {};
|
|
513
540
|
}
|
|
514
|
-
function
|
|
515
|
-
return e.clone !== !1 && e.isMergeableObject(
|
|
541
|
+
function _e(s, e) {
|
|
542
|
+
return e.clone !== !1 && e.isMergeableObject(s) ? Le(In(s), s, e) : s;
|
|
516
543
|
}
|
|
517
|
-
function
|
|
518
|
-
return
|
|
519
|
-
return
|
|
544
|
+
function Bn(s, e, t) {
|
|
545
|
+
return s.concat(e).map(function(n) {
|
|
546
|
+
return _e(n, t);
|
|
520
547
|
});
|
|
521
548
|
}
|
|
522
|
-
function
|
|
549
|
+
function Gn(s, e) {
|
|
523
550
|
if (!e.customMerge)
|
|
524
|
-
return
|
|
525
|
-
var t = e.customMerge(
|
|
526
|
-
return typeof t == "function" ? t :
|
|
551
|
+
return Le;
|
|
552
|
+
var t = e.customMerge(s);
|
|
553
|
+
return typeof t == "function" ? t : Le;
|
|
527
554
|
}
|
|
528
|
-
function
|
|
529
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(
|
|
530
|
-
return Object.propertyIsEnumerable.call(
|
|
555
|
+
function Hn(s) {
|
|
556
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(s).filter(function(e) {
|
|
557
|
+
return Object.propertyIsEnumerable.call(s, e);
|
|
531
558
|
}) : [];
|
|
532
559
|
}
|
|
533
|
-
function
|
|
534
|
-
return Object.keys(
|
|
560
|
+
function Ye(s) {
|
|
561
|
+
return Object.keys(s).concat(Hn(s));
|
|
535
562
|
}
|
|
536
|
-
function
|
|
563
|
+
function vt(s, e) {
|
|
537
564
|
try {
|
|
538
|
-
return e in
|
|
565
|
+
return e in s;
|
|
539
566
|
} catch {
|
|
540
567
|
return !1;
|
|
541
568
|
}
|
|
542
569
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
570
|
+
function Wn(s, e) {
|
|
571
|
+
return vt(s, e) && !(Object.hasOwnProperty.call(s, e) && Object.propertyIsEnumerable.call(s, e));
|
|
545
572
|
}
|
|
546
|
-
function
|
|
547
|
-
var
|
|
548
|
-
return t.isMergeableObject(
|
|
549
|
-
|
|
550
|
-
}),
|
|
551
|
-
|
|
552
|
-
}),
|
|
573
|
+
function jn(s, e, t) {
|
|
574
|
+
var n = {};
|
|
575
|
+
return t.isMergeableObject(s) && Ye(s).forEach(function(r) {
|
|
576
|
+
n[r] = _e(s[r], t);
|
|
577
|
+
}), Ye(e).forEach(function(r) {
|
|
578
|
+
Wn(s, r) || (vt(s, r) && t.isMergeableObject(e[r]) ? n[r] = Gn(r, t)(s[r], e[r], t) : n[r] = _e(e[r], t));
|
|
579
|
+
}), n;
|
|
553
580
|
}
|
|
554
|
-
function
|
|
555
|
-
t = t || {}, t.arrayMerge = t.arrayMerge ||
|
|
556
|
-
var
|
|
557
|
-
return
|
|
581
|
+
function Le(s, e, t) {
|
|
582
|
+
t = t || {}, t.arrayMerge = t.arrayMerge || Bn, t.isMergeableObject = t.isMergeableObject || xn, t.cloneUnlessOtherwiseSpecified = _e;
|
|
583
|
+
var n = Array.isArray(e), r = Array.isArray(s), i = n === r;
|
|
584
|
+
return i ? n ? t.arrayMerge(s, e, t) : jn(s, e, t) : _e(e, t);
|
|
558
585
|
}
|
|
559
|
-
|
|
586
|
+
Le.all = function(e, t) {
|
|
560
587
|
if (!Array.isArray(e))
|
|
561
588
|
throw new Error("first argument should be an array");
|
|
562
|
-
return e.reduce(function(
|
|
563
|
-
return
|
|
589
|
+
return e.reduce(function(n, r) {
|
|
590
|
+
return Le(n, r, t);
|
|
564
591
|
}, {});
|
|
565
592
|
};
|
|
566
|
-
var
|
|
567
|
-
const
|
|
568
|
-
function
|
|
569
|
-
mode:
|
|
593
|
+
var Qn = Le, Kn = Qn;
|
|
594
|
+
const Ee = /* @__PURE__ */ Dn(Kn);
|
|
595
|
+
function Zn({
|
|
596
|
+
mode: s,
|
|
570
597
|
...e
|
|
571
598
|
}) {
|
|
572
|
-
const t =
|
|
599
|
+
const t = zn(e);
|
|
573
600
|
return {
|
|
574
|
-
type:
|
|
601
|
+
type: ft,
|
|
575
602
|
props: {
|
|
576
603
|
...t,
|
|
577
|
-
mode:
|
|
604
|
+
mode: s
|
|
578
605
|
}
|
|
579
606
|
};
|
|
580
607
|
}
|
|
581
|
-
function
|
|
582
|
-
layerProps:
|
|
608
|
+
function zn({
|
|
609
|
+
layerProps: s,
|
|
583
610
|
onEdit: e,
|
|
584
611
|
guideColor: t,
|
|
585
|
-
fillColor:
|
|
586
|
-
pointColor:
|
|
612
|
+
fillColor: n,
|
|
613
|
+
pointColor: r
|
|
587
614
|
}) {
|
|
588
|
-
const
|
|
615
|
+
const i = Ee(s, {
|
|
589
616
|
modeConfig: {
|
|
590
617
|
// // We force distance due to conversion is addressed at feature getText level
|
|
591
618
|
// formatTooltip: (_distance: number) => {
|
|
@@ -594,413 +621,269 @@ function Un({
|
|
|
594
621
|
preventOverlappingLines: !0
|
|
595
622
|
},
|
|
596
623
|
onEdit: e
|
|
597
|
-
}), o =
|
|
624
|
+
}), o = Ee(Tn, {
|
|
598
625
|
getTentativeLineColor: t,
|
|
599
|
-
getTentativeFillColor:
|
|
626
|
+
getTentativeFillColor: n,
|
|
600
627
|
getLineColor: t,
|
|
601
|
-
getFillColor:
|
|
602
|
-
getEditHandlePointColor:
|
|
628
|
+
getFillColor: n,
|
|
629
|
+
getEditHandlePointColor: r,
|
|
603
630
|
getEditHandlePointOutlineColor: t,
|
|
604
|
-
dataComparator: (l,
|
|
631
|
+
dataComparator: (l, f) => l.features[0] === f.features[0]
|
|
605
632
|
});
|
|
606
|
-
return
|
|
633
|
+
return Ee(o, i);
|
|
607
634
|
}
|
|
608
|
-
const
|
|
609
|
-
data:
|
|
635
|
+
const Yn = (s) => Ge()((e) => ({
|
|
636
|
+
data: s.reduce((n, r) => {
|
|
610
637
|
const {
|
|
611
|
-
enabled:
|
|
638
|
+
enabled: i = !1,
|
|
612
639
|
mapId: o,
|
|
613
640
|
modeInstance: a,
|
|
614
641
|
modes: l = ze,
|
|
615
|
-
modeSelected:
|
|
616
|
-
values:
|
|
617
|
-
} =
|
|
618
|
-
return
|
|
619
|
-
enabled:
|
|
642
|
+
modeSelected: f = ze.polygon.value,
|
|
643
|
+
values: c = {}
|
|
644
|
+
} = r;
|
|
645
|
+
return n[o] = {
|
|
646
|
+
enabled: i,
|
|
620
647
|
modeInstance: a,
|
|
621
648
|
modes: l,
|
|
622
|
-
modeSelected:
|
|
623
|
-
values:
|
|
624
|
-
},
|
|
649
|
+
modeSelected: f,
|
|
650
|
+
values: c
|
|
651
|
+
}, n;
|
|
625
652
|
}, {}),
|
|
626
|
-
setEnabled: (
|
|
627
|
-
e((
|
|
653
|
+
setEnabled: (n, r) => {
|
|
654
|
+
e((i) => ({
|
|
628
655
|
data: {
|
|
629
|
-
...
|
|
630
|
-
[
|
|
631
|
-
...
|
|
632
|
-
enabled:
|
|
633
|
-
visible:
|
|
656
|
+
...i.data,
|
|
657
|
+
[n]: {
|
|
658
|
+
...i.data[n],
|
|
659
|
+
enabled: r,
|
|
660
|
+
visible: r
|
|
634
661
|
}
|
|
635
662
|
}
|
|
636
663
|
}));
|
|
637
664
|
},
|
|
638
|
-
setValue: (
|
|
665
|
+
setValue: (n, r, i) => {
|
|
639
666
|
e((o) => {
|
|
640
667
|
const a = {
|
|
641
|
-
...o.data[
|
|
642
|
-
}, l = a[
|
|
668
|
+
...o.data[n].values
|
|
669
|
+
}, l = a[r] ?? {
|
|
643
670
|
type: "mask"
|
|
644
671
|
};
|
|
645
|
-
return a[
|
|
672
|
+
return a[r] = {
|
|
646
673
|
...l,
|
|
647
|
-
...
|
|
648
|
-
id:
|
|
649
|
-
},
|
|
674
|
+
...i,
|
|
675
|
+
id: r
|
|
676
|
+
}, i || delete a[r], {
|
|
650
677
|
data: {
|
|
651
678
|
...o.data,
|
|
652
|
-
[
|
|
653
|
-
...o.data[
|
|
679
|
+
[n]: {
|
|
680
|
+
...o.data[n],
|
|
654
681
|
values: a
|
|
655
682
|
}
|
|
656
683
|
}
|
|
657
684
|
};
|
|
658
685
|
});
|
|
659
686
|
},
|
|
660
|
-
setVisibility: (
|
|
687
|
+
setVisibility: (n, r, i) => {
|
|
661
688
|
e((o) => {
|
|
662
689
|
const a = {
|
|
663
|
-
...o.data[
|
|
664
|
-
}, l = a[
|
|
665
|
-
return l.visible =
|
|
690
|
+
...o.data[n].values
|
|
691
|
+
}, l = a[r] ?? {};
|
|
692
|
+
return l.visible = i, {
|
|
666
693
|
data: {
|
|
667
694
|
...o.data,
|
|
668
|
-
[
|
|
669
|
-
...o.data[
|
|
695
|
+
[n]: {
|
|
696
|
+
...o.data[n],
|
|
670
697
|
values: {
|
|
671
698
|
...a,
|
|
672
|
-
[
|
|
699
|
+
[r]: l
|
|
673
700
|
}
|
|
674
701
|
}
|
|
675
702
|
}
|
|
676
703
|
};
|
|
677
704
|
});
|
|
678
705
|
},
|
|
679
|
-
setModeSelected: (
|
|
680
|
-
e((
|
|
706
|
+
setModeSelected: (n, r) => {
|
|
707
|
+
e((i) => ({
|
|
681
708
|
data: {
|
|
682
|
-
...
|
|
683
|
-
[
|
|
684
|
-
...
|
|
685
|
-
modeSelected:
|
|
709
|
+
...i.data,
|
|
710
|
+
[n]: {
|
|
711
|
+
...i.data[n],
|
|
712
|
+
modeSelected: r
|
|
686
713
|
}
|
|
687
714
|
}
|
|
688
715
|
}));
|
|
689
716
|
},
|
|
690
|
-
setModeInstance: (
|
|
691
|
-
e((
|
|
717
|
+
setModeInstance: (n, r) => {
|
|
718
|
+
e((i) => ({
|
|
692
719
|
data: {
|
|
693
|
-
...
|
|
694
|
-
[
|
|
695
|
-
...
|
|
696
|
-
modeInstance:
|
|
720
|
+
...i.data,
|
|
721
|
+
[n]: {
|
|
722
|
+
...i.data[n],
|
|
723
|
+
modeInstance: r
|
|
697
724
|
}
|
|
698
725
|
}
|
|
699
726
|
}));
|
|
700
727
|
}
|
|
701
|
-
})),
|
|
702
|
-
function
|
|
703
|
-
const e =
|
|
728
|
+
})), bt = Ie({});
|
|
729
|
+
function Xn(s) {
|
|
730
|
+
const e = _(5), {
|
|
704
731
|
children: t,
|
|
705
|
-
values:
|
|
706
|
-
} =
|
|
707
|
-
let
|
|
708
|
-
e[0] !==
|
|
709
|
-
const [
|
|
732
|
+
values: n
|
|
733
|
+
} = s;
|
|
734
|
+
let r;
|
|
735
|
+
e[0] !== n ? (r = () => Yn(n), e[0] = n, e[1] = r) : r = e[1];
|
|
736
|
+
const [i] = Se(r);
|
|
710
737
|
let o;
|
|
711
|
-
return e[2] !== t || e[3] !==
|
|
738
|
+
return e[2] !== t || e[3] !== i ? (o = /* @__PURE__ */ V(bt.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = o) : o = e[4], o;
|
|
712
739
|
}
|
|
713
|
-
function
|
|
714
|
-
const e =
|
|
715
|
-
if (!e)
|
|
716
|
-
throw new Error("Missing
|
|
717
|
-
return
|
|
740
|
+
function D(s) {
|
|
741
|
+
const e = Be(bt);
|
|
742
|
+
if (!Object.keys(e).length)
|
|
743
|
+
throw new Error("Missing LassoToolsProvider in the tree");
|
|
744
|
+
return He(e, s);
|
|
718
745
|
}
|
|
719
|
-
function
|
|
720
|
-
mapId:
|
|
746
|
+
function Jn({
|
|
747
|
+
mapId: s,
|
|
721
748
|
children: e
|
|
722
749
|
}) {
|
|
723
|
-
const t =
|
|
724
|
-
var
|
|
725
|
-
return (
|
|
726
|
-
}),
|
|
727
|
-
var
|
|
728
|
-
return (
|
|
729
|
-
}),
|
|
730
|
-
var
|
|
731
|
-
return (
|
|
732
|
-
}), l =
|
|
733
|
-
var
|
|
734
|
-
return (
|
|
735
|
-
}),
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
|
|
750
|
+
const t = D((u) => {
|
|
751
|
+
var y;
|
|
752
|
+
return (y = u.data[s]) == null ? void 0 : y.enabled;
|
|
753
|
+
}), n = D((u) => u.setEnabled), r = D((u) => {
|
|
754
|
+
var y;
|
|
755
|
+
return (y = u.data[s]) == null ? void 0 : y.values;
|
|
756
|
+
}), i = D((u) => u.setValue), o = D((u) => u.setVisibility), a = D((u) => {
|
|
757
|
+
var y;
|
|
758
|
+
return (y = u.data[s]) == null ? void 0 : y.modeSelected;
|
|
759
|
+
}), l = D((u) => u.setModeSelected), f = D((u) => {
|
|
760
|
+
var y;
|
|
761
|
+
return (y = u.data[s]) == null ? void 0 : y.modes;
|
|
762
|
+
}), c = D((u) => u.setModeInstance);
|
|
763
|
+
Y(() => {
|
|
764
|
+
const u = f[a];
|
|
765
|
+
if (u && t) {
|
|
766
|
+
const y = u.mode, p = new y();
|
|
767
|
+
c(s, p);
|
|
741
768
|
}
|
|
742
|
-
}, [
|
|
769
|
+
}, [t, s, a, f, c]);
|
|
743
770
|
const [
|
|
744
|
-
|
|
771
|
+
m
|
|
745
772
|
// , draw
|
|
746
|
-
] =
|
|
747
|
-
const
|
|
748
|
-
var
|
|
773
|
+
] = ue(() => {
|
|
774
|
+
const u = (v) => {
|
|
775
|
+
var b;
|
|
749
776
|
return {
|
|
750
|
-
id:
|
|
751
|
-
visible:
|
|
752
|
-
label: (
|
|
777
|
+
id: v.id,
|
|
778
|
+
visible: v.visible,
|
|
779
|
+
label: (b = v.properties) == null ? void 0 : b.label
|
|
753
780
|
};
|
|
754
781
|
};
|
|
755
782
|
return [
|
|
756
|
-
Object.values(
|
|
783
|
+
Object.values(r).filter((v) => v.type === "mask").map(u)
|
|
757
784
|
// , draw
|
|
758
785
|
];
|
|
759
|
-
}, [
|
|
760
|
-
s
|
|
761
|
-
}, [
|
|
786
|
+
}, [r]), d = x((u) => {
|
|
787
|
+
n(s, !!u), l(s, u);
|
|
788
|
+
}, [s, n, l]);
|
|
762
789
|
return e({
|
|
763
|
-
mapId:
|
|
790
|
+
mapId: s,
|
|
764
791
|
enabled: t,
|
|
765
|
-
modes:
|
|
792
|
+
modes: f,
|
|
766
793
|
modeSelected: a,
|
|
767
794
|
values: {
|
|
768
|
-
mask:
|
|
795
|
+
mask: m
|
|
769
796
|
// draw,
|
|
770
797
|
},
|
|
771
|
-
setValue:
|
|
772
|
-
setEnabled:
|
|
773
|
-
setVisibility:
|
|
774
|
-
setModeSelected:
|
|
798
|
+
setValue: x((u) => i(s, u), [s, i]),
|
|
799
|
+
setEnabled: x((u) => n(s, u), [s, n]),
|
|
800
|
+
setVisibility: x((u, y) => o(s, u, y), [s, o]),
|
|
801
|
+
setModeSelected: d
|
|
775
802
|
});
|
|
776
803
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
})];
|
|
780
|
-
function $n({
|
|
781
|
-
children: n,
|
|
782
|
-
mapId: e,
|
|
783
|
-
defaultProps: {
|
|
784
|
-
styles: t = Re.styles,
|
|
785
|
-
labels: s
|
|
786
|
-
} = {
|
|
787
|
-
styles: Re.styles,
|
|
788
|
-
labels: Re.labels
|
|
789
|
-
},
|
|
790
|
-
layerProps: i = {},
|
|
791
|
-
defaultType: r = "mask"
|
|
804
|
+
function Et({
|
|
805
|
+
values: s
|
|
792
806
|
}) {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
var
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}), p = O((g) => {
|
|
803
|
-
var L;
|
|
804
|
-
return (L = g.data[e]) == null ? void 0 : L.modeSelected;
|
|
805
|
-
}), y = Be((g) => g.setLayer), c = k((g) => g.addLayers), m = k((g) => g.removeLayers), [h, f] = pe(() => be()), S = Me(() => Object.values(l ?? {}).filter((g) => g.type === "mask"), [l]), v = Ft(S.length);
|
|
806
|
-
ce(() => (o && c(e, [Ce]), () => {
|
|
807
|
-
f(be()), m(e, [Ce]);
|
|
808
|
-
}), [c, o, e, m]);
|
|
809
|
-
const E = q(() => {
|
|
810
|
-
f(be()), a(e, !1);
|
|
811
|
-
}, [e, a]), b = q(({
|
|
812
|
-
editType: g,
|
|
813
|
-
updatedData: L
|
|
814
|
-
}) => {
|
|
815
|
-
var w;
|
|
816
|
-
if (g === G.cancel) {
|
|
817
|
-
E();
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
if (f(L), g !== G.updateTentativeFeature && g === G.addFeature) {
|
|
821
|
-
const F = L.features[0];
|
|
822
|
-
(w = F.properties).label ?? (w.label = `${s == null ? void 0 : s.mask} ${v.current + 1}`), v.current += 1;
|
|
823
|
-
const A = F.id ?? crypto.randomUUID();
|
|
824
|
-
u(e, A, {
|
|
825
|
-
geometry: F.geometry,
|
|
826
|
-
properties: F.properties,
|
|
827
|
-
visible: !0,
|
|
828
|
-
type: r
|
|
829
|
-
}), E();
|
|
830
|
-
}
|
|
831
|
-
}, [E, s == null ? void 0 : s.mask, u, e, r]);
|
|
832
|
-
ce(() => {
|
|
833
|
-
const g = h.features.length > 0, {
|
|
834
|
-
border: L,
|
|
835
|
-
point: w,
|
|
836
|
-
fill: F
|
|
837
|
-
} = t.colors.editing, A = Dn({
|
|
838
|
-
layerProps: {
|
|
839
|
-
...i.mask,
|
|
840
|
-
pickable: !0,
|
|
841
|
-
data: h,
|
|
842
|
-
selectedFeatureIndexes: g ? [0] : []
|
|
843
|
-
},
|
|
844
|
-
guideColor: L,
|
|
845
|
-
fillColor: F,
|
|
846
|
-
pointColor: w,
|
|
847
|
-
onEdit: b,
|
|
848
|
-
mode: d
|
|
849
|
-
});
|
|
850
|
-
y(Ce, A);
|
|
851
|
-
}, [h, i.mask, d, b, y, t.colors.editing]);
|
|
852
|
-
const _ = Me(() => ({
|
|
853
|
-
type: "FeatureCollection",
|
|
854
|
-
features: S.map((g) => ({
|
|
855
|
-
type: "Feature",
|
|
856
|
-
geometry: g.geometry,
|
|
857
|
-
properties: g.properties,
|
|
858
|
-
id: g.id
|
|
859
|
-
}))
|
|
860
|
-
}), [S]), P = Me(() => {
|
|
861
|
-
const g = S.filter((w) => w.visible).map((w) => w.id), L = h.features.map((w) => w.id);
|
|
862
|
-
return L.length ? g.filter((w) => !L.includes(w)) : g;
|
|
863
|
-
}, [h.features, S]);
|
|
864
|
-
return ce(() => {
|
|
865
|
-
const g = {
|
|
866
|
-
...Le,
|
|
867
|
-
pickable: o && p === "edit",
|
|
868
|
-
visible: !0,
|
|
869
|
-
data: _,
|
|
870
|
-
getLineColor: t.colors.finished.border,
|
|
871
|
-
getFillColor: t.colors.finished.fill,
|
|
872
|
-
extensions: Nn,
|
|
873
|
-
getFilterValue: (L) => Number(P.includes(L.id)),
|
|
874
|
-
filterRange: [1, 1],
|
|
875
|
-
updateTriggers: {
|
|
876
|
-
getFilterValue: P
|
|
877
|
-
},
|
|
878
|
-
onClick: ({
|
|
879
|
-
object: L
|
|
880
|
-
}) => {
|
|
881
|
-
const w = be();
|
|
882
|
-
w.features.push(L), f(w), a(e, !0);
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
return y(Le.id, {
|
|
886
|
-
type: Kt,
|
|
887
|
-
props: g
|
|
888
|
-
}), c(e, [Le.id]), () => {
|
|
889
|
-
m(e, [Le.id]);
|
|
890
|
-
};
|
|
891
|
-
}, [c, o, e, _, P, p, m, a, y, t.colors.finished.border, t.colors.finished.fill]), n;
|
|
892
|
-
}
|
|
893
|
-
function be() {
|
|
894
|
-
return {
|
|
895
|
-
type: "FeatureCollection",
|
|
896
|
-
features: []
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
$n.Controls = Vn;
|
|
900
|
-
var We = 63710088e-1;
|
|
901
|
-
function xe(n, e, t = {}) {
|
|
902
|
-
const s = { type: "Feature" };
|
|
903
|
-
return (t.id === 0 || t.id) && (s.id = t.id), t.bbox && (s.bbox = t.bbox), s.properties = e || {}, s.geometry = n, s;
|
|
904
|
-
}
|
|
905
|
-
function ht(n, e, t = {}) {
|
|
906
|
-
if (!n)
|
|
907
|
-
throw new Error("coordinates is required");
|
|
908
|
-
if (!Array.isArray(n))
|
|
909
|
-
throw new Error("coordinates must be an Array");
|
|
910
|
-
if (n.length < 2)
|
|
911
|
-
throw new Error("coordinates must be at least 2 numbers long");
|
|
912
|
-
if (!Ke(n[0]) || !Ke(n[1]))
|
|
913
|
-
throw new Error("coordinates must contain numbers");
|
|
914
|
-
return xe({
|
|
915
|
-
type: "Point",
|
|
916
|
-
coordinates: n
|
|
917
|
-
}, e, t);
|
|
918
|
-
}
|
|
919
|
-
function Ze(n, e = {}) {
|
|
920
|
-
const t = { type: "FeatureCollection" };
|
|
921
|
-
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
922
|
-
}
|
|
923
|
-
function Ke(n) {
|
|
924
|
-
return !isNaN(n) && n !== null && !Array.isArray(n);
|
|
925
|
-
}
|
|
926
|
-
function yt(n, e, t) {
|
|
927
|
-
if (n !== null)
|
|
928
|
-
for (var s, i, r, o, a, l, u, d = 0, p = 0, y, c = n.type, m = c === "FeatureCollection", h = c === "Feature", f = m ? n.features.length : 1, S = 0; S < f; S++) {
|
|
929
|
-
u = m ? n.features[S].geometry : h ? n.geometry : n, y = u ? u.type === "GeometryCollection" : !1, a = y ? u.geometries.length : 1;
|
|
930
|
-
for (var v = 0; v < a; v++) {
|
|
931
|
-
var E = 0, b = 0;
|
|
932
|
-
if (o = y ? u.geometries[v] : u, o !== null) {
|
|
807
|
+
return Object.values(s ?? {}).filter((e) => e.type === "mask");
|
|
808
|
+
}
|
|
809
|
+
function Lt(s, e, t) {
|
|
810
|
+
if (s !== null)
|
|
811
|
+
for (var n, r, i, o, a, l, f, c = 0, m = 0, d, u = s.type, y = u === "FeatureCollection", p = u === "Feature", v = y ? s.features.length : 1, b = 0; b < v; b++) {
|
|
812
|
+
f = y ? s.features[b].geometry : p ? s.geometry : s, d = f ? f.type === "GeometryCollection" : !1, a = d ? f.geometries.length : 1;
|
|
813
|
+
for (var S = 0; S < a; S++) {
|
|
814
|
+
var E = 0, h = 0;
|
|
815
|
+
if (o = d ? f.geometries[S] : f, o !== null) {
|
|
933
816
|
l = o.coordinates;
|
|
934
|
-
var
|
|
935
|
-
switch (
|
|
817
|
+
var L = o.type;
|
|
818
|
+
switch (c = L === "Polygon" || L === "MultiPolygon" ? 1 : 0, L) {
|
|
936
819
|
case null:
|
|
937
820
|
break;
|
|
938
821
|
case "Point":
|
|
939
822
|
if (e(
|
|
940
823
|
l,
|
|
941
|
-
|
|
942
|
-
|
|
824
|
+
m,
|
|
825
|
+
b,
|
|
943
826
|
E,
|
|
944
|
-
|
|
827
|
+
h
|
|
945
828
|
) === !1)
|
|
946
829
|
return !1;
|
|
947
|
-
|
|
830
|
+
m++, E++;
|
|
948
831
|
break;
|
|
949
832
|
case "LineString":
|
|
950
833
|
case "MultiPoint":
|
|
951
|
-
for (
|
|
834
|
+
for (n = 0; n < l.length; n++) {
|
|
952
835
|
if (e(
|
|
953
|
-
l[
|
|
954
|
-
|
|
955
|
-
|
|
836
|
+
l[n],
|
|
837
|
+
m,
|
|
838
|
+
b,
|
|
956
839
|
E,
|
|
957
|
-
|
|
840
|
+
h
|
|
958
841
|
) === !1)
|
|
959
842
|
return !1;
|
|
960
|
-
|
|
843
|
+
m++, L === "MultiPoint" && E++;
|
|
961
844
|
}
|
|
962
|
-
|
|
845
|
+
L === "LineString" && E++;
|
|
963
846
|
break;
|
|
964
847
|
case "Polygon":
|
|
965
848
|
case "MultiLineString":
|
|
966
|
-
for (
|
|
967
|
-
for (
|
|
849
|
+
for (n = 0; n < l.length; n++) {
|
|
850
|
+
for (r = 0; r < l[n].length - c; r++) {
|
|
968
851
|
if (e(
|
|
969
|
-
l[
|
|
970
|
-
|
|
971
|
-
|
|
852
|
+
l[n][r],
|
|
853
|
+
m,
|
|
854
|
+
b,
|
|
972
855
|
E,
|
|
973
|
-
|
|
856
|
+
h
|
|
974
857
|
) === !1)
|
|
975
858
|
return !1;
|
|
976
|
-
|
|
859
|
+
m++;
|
|
977
860
|
}
|
|
978
|
-
|
|
861
|
+
L === "MultiLineString" && E++, L === "Polygon" && h++;
|
|
979
862
|
}
|
|
980
|
-
|
|
863
|
+
L === "Polygon" && E++;
|
|
981
864
|
break;
|
|
982
865
|
case "MultiPolygon":
|
|
983
|
-
for (
|
|
984
|
-
for (
|
|
985
|
-
for (
|
|
866
|
+
for (n = 0; n < l.length; n++) {
|
|
867
|
+
for (h = 0, r = 0; r < l[n].length; r++) {
|
|
868
|
+
for (i = 0; i < l[n][r].length - c; i++) {
|
|
986
869
|
if (e(
|
|
987
|
-
l[
|
|
988
|
-
|
|
989
|
-
|
|
870
|
+
l[n][r][i],
|
|
871
|
+
m,
|
|
872
|
+
b,
|
|
990
873
|
E,
|
|
991
|
-
|
|
874
|
+
h
|
|
992
875
|
) === !1)
|
|
993
876
|
return !1;
|
|
994
|
-
|
|
877
|
+
m++;
|
|
995
878
|
}
|
|
996
|
-
|
|
879
|
+
h++;
|
|
997
880
|
}
|
|
998
881
|
E++;
|
|
999
882
|
}
|
|
1000
883
|
break;
|
|
1001
884
|
case "GeometryCollection":
|
|
1002
|
-
for (
|
|
1003
|
-
if (
|
|
885
|
+
for (n = 0; n < o.geometries.length; n++)
|
|
886
|
+
if (Lt(o.geometries[n], e) === !1)
|
|
1004
887
|
return !1;
|
|
1005
888
|
break;
|
|
1006
889
|
default:
|
|
@@ -1010,22 +893,22 @@ function yt(n, e, t) {
|
|
|
1010
893
|
}
|
|
1011
894
|
}
|
|
1012
895
|
}
|
|
1013
|
-
function
|
|
1014
|
-
var t,
|
|
1015
|
-
for (t = 0; t <
|
|
1016
|
-
for (a =
|
|
1017
|
-
if (
|
|
896
|
+
function es(s, e) {
|
|
897
|
+
var t, n, r, i, o, a, l, f, c, m, d = 0, u = s.type === "FeatureCollection", y = s.type === "Feature", p = u ? s.features.length : 1;
|
|
898
|
+
for (t = 0; t < p; t++) {
|
|
899
|
+
for (a = u ? s.features[t].geometry : y ? s.geometry : s, f = u ? s.features[t].properties : y ? s.properties : {}, c = u ? s.features[t].bbox : y ? s.bbox : void 0, m = u ? s.features[t].id : y ? s.id : void 0, l = a ? a.type === "GeometryCollection" : !1, o = l ? a.geometries.length : 1, r = 0; r < o; r++) {
|
|
900
|
+
if (i = l ? a.geometries[r] : a, i === null) {
|
|
1018
901
|
if (e(
|
|
1019
902
|
null,
|
|
1020
|
-
y,
|
|
1021
|
-
u,
|
|
1022
903
|
d,
|
|
1023
|
-
|
|
904
|
+
f,
|
|
905
|
+
c,
|
|
906
|
+
m
|
|
1024
907
|
) === !1)
|
|
1025
908
|
return !1;
|
|
1026
909
|
continue;
|
|
1027
910
|
}
|
|
1028
|
-
switch (
|
|
911
|
+
switch (i.type) {
|
|
1029
912
|
case "Point":
|
|
1030
913
|
case "LineString":
|
|
1031
914
|
case "MultiPoint":
|
|
@@ -1033,23 +916,23 @@ function qn(n, e) {
|
|
|
1033
916
|
case "MultiLineString":
|
|
1034
917
|
case "MultiPolygon": {
|
|
1035
918
|
if (e(
|
|
1036
|
-
|
|
1037
|
-
y,
|
|
1038
|
-
u,
|
|
919
|
+
i,
|
|
1039
920
|
d,
|
|
1040
|
-
|
|
921
|
+
f,
|
|
922
|
+
c,
|
|
923
|
+
m
|
|
1041
924
|
) === !1)
|
|
1042
925
|
return !1;
|
|
1043
926
|
break;
|
|
1044
927
|
}
|
|
1045
928
|
case "GeometryCollection": {
|
|
1046
|
-
for (
|
|
929
|
+
for (n = 0; n < i.geometries.length; n++)
|
|
1047
930
|
if (e(
|
|
1048
|
-
|
|
1049
|
-
y,
|
|
1050
|
-
u,
|
|
931
|
+
i.geometries[n],
|
|
1051
932
|
d,
|
|
1052
|
-
|
|
933
|
+
f,
|
|
934
|
+
c,
|
|
935
|
+
m
|
|
1053
936
|
) === !1)
|
|
1054
937
|
return !1;
|
|
1055
938
|
break;
|
|
@@ -1058,40 +941,40 @@ function qn(n, e) {
|
|
|
1058
941
|
throw new Error("Unknown Geometry Type");
|
|
1059
942
|
}
|
|
1060
943
|
}
|
|
1061
|
-
|
|
944
|
+
d++;
|
|
1062
945
|
}
|
|
1063
946
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1068
|
-
function(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
i,
|
|
947
|
+
function ts(s, e, t) {
|
|
948
|
+
var n = t;
|
|
949
|
+
return es(
|
|
950
|
+
s,
|
|
951
|
+
function(r, i, o, a, l) {
|
|
952
|
+
n = e(
|
|
953
|
+
n,
|
|
1072
954
|
r,
|
|
955
|
+
i,
|
|
1073
956
|
o,
|
|
1074
957
|
a,
|
|
1075
958
|
l
|
|
1076
959
|
);
|
|
1077
960
|
}
|
|
1078
|
-
),
|
|
961
|
+
), n;
|
|
1079
962
|
}
|
|
1080
|
-
function
|
|
1081
|
-
return
|
|
1082
|
-
|
|
1083
|
-
(e, t) => e +
|
|
963
|
+
function Xe(s) {
|
|
964
|
+
return ts(
|
|
965
|
+
s,
|
|
966
|
+
(e, t) => e + ns(t),
|
|
1084
967
|
0
|
|
1085
968
|
);
|
|
1086
969
|
}
|
|
1087
|
-
function
|
|
970
|
+
function ns(s) {
|
|
1088
971
|
let e = 0, t;
|
|
1089
|
-
switch (
|
|
972
|
+
switch (s.type) {
|
|
1090
973
|
case "Polygon":
|
|
1091
|
-
return
|
|
974
|
+
return Je(s.coordinates);
|
|
1092
975
|
case "MultiPolygon":
|
|
1093
|
-
for (t = 0; t <
|
|
1094
|
-
e +=
|
|
976
|
+
for (t = 0; t < s.coordinates.length; t++)
|
|
977
|
+
e += Je(s.coordinates[t]);
|
|
1095
978
|
return e;
|
|
1096
979
|
case "Point":
|
|
1097
980
|
case "MultiPoint":
|
|
@@ -1101,31 +984,30 @@ function Bn(n) {
|
|
|
1101
984
|
}
|
|
1102
985
|
return 0;
|
|
1103
986
|
}
|
|
1104
|
-
function
|
|
987
|
+
function Je(s) {
|
|
1105
988
|
let e = 0;
|
|
1106
|
-
if (
|
|
1107
|
-
e += Math.abs(
|
|
1108
|
-
for (let t = 1; t <
|
|
1109
|
-
e -= Math.abs(
|
|
989
|
+
if (s && s.length > 0) {
|
|
990
|
+
e += Math.abs(et(s[0]));
|
|
991
|
+
for (let t = 1; t < s.length; t++)
|
|
992
|
+
e -= Math.abs(et(s[t]));
|
|
1110
993
|
}
|
|
1111
994
|
return e;
|
|
1112
995
|
}
|
|
1113
|
-
var
|
|
1114
|
-
function
|
|
1115
|
-
const e =
|
|
1116
|
-
if (e <= 2)
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
t += (u - a) * Math.sin(l), s++;
|
|
996
|
+
var ss = je * je / 2, $e = Math.PI / 180;
|
|
997
|
+
function et(s) {
|
|
998
|
+
const e = s.length - 1;
|
|
999
|
+
if (e <= 2) return 0;
|
|
1000
|
+
let t = 0, n = 0;
|
|
1001
|
+
for (; n < e; ) {
|
|
1002
|
+
const r = s[n], i = s[n + 1 === e ? 0 : n + 1], o = s[n + 2 >= e ? (n + 2) % e : n + 2], a = r[0] * $e, l = i[1] * $e, f = o[0] * $e;
|
|
1003
|
+
t += (f - a) * Math.sin(l), n++;
|
|
1122
1004
|
}
|
|
1123
|
-
return t *
|
|
1005
|
+
return t * ss;
|
|
1124
1006
|
}
|
|
1125
|
-
class
|
|
1126
|
-
constructor(e = [], t =
|
|
1007
|
+
class Mt {
|
|
1008
|
+
constructor(e = [], t = rs) {
|
|
1127
1009
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0)
|
|
1128
|
-
for (let
|
|
1010
|
+
for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n);
|
|
1129
1011
|
}
|
|
1130
1012
|
push(e) {
|
|
1131
1013
|
this.data.push(e), this.length++, this._up(this.length - 1);
|
|
@@ -1139,247 +1021,247 @@ class gt {
|
|
|
1139
1021
|
return this.data[0];
|
|
1140
1022
|
}
|
|
1141
1023
|
_up(e) {
|
|
1142
|
-
const { data: t, compare:
|
|
1024
|
+
const { data: t, compare: n } = this, r = t[e];
|
|
1143
1025
|
for (; e > 0; ) {
|
|
1144
|
-
const
|
|
1145
|
-
if (
|
|
1146
|
-
t[e] = o, e =
|
|
1026
|
+
const i = e - 1 >> 1, o = t[i];
|
|
1027
|
+
if (n(r, o) >= 0) break;
|
|
1028
|
+
t[e] = o, e = i;
|
|
1147
1029
|
}
|
|
1148
|
-
t[e] =
|
|
1030
|
+
t[e] = r;
|
|
1149
1031
|
}
|
|
1150
1032
|
_down(e) {
|
|
1151
|
-
const { data: t, compare:
|
|
1152
|
-
for (; e <
|
|
1033
|
+
const { data: t, compare: n } = this, r = this.length >> 1, i = t[e];
|
|
1034
|
+
for (; e < r; ) {
|
|
1153
1035
|
let o = (e << 1) + 1, a = t[o];
|
|
1154
1036
|
const l = o + 1;
|
|
1155
|
-
if (l < this.length &&
|
|
1037
|
+
if (l < this.length && n(t[l], a) < 0 && (o = l, a = t[l]), n(a, i) >= 0) break;
|
|
1156
1038
|
t[e] = a, e = o;
|
|
1157
1039
|
}
|
|
1158
|
-
t[e] =
|
|
1040
|
+
t[e] = i;
|
|
1159
1041
|
}
|
|
1160
1042
|
}
|
|
1161
|
-
function
|
|
1162
|
-
return
|
|
1043
|
+
function rs(s, e) {
|
|
1044
|
+
return s < e ? -1 : s > e ? 1 : 0;
|
|
1163
1045
|
}
|
|
1164
|
-
function
|
|
1165
|
-
return
|
|
1046
|
+
function Pt(s, e) {
|
|
1047
|
+
return s.p.x > e.p.x ? 1 : s.p.x < e.p.x ? -1 : s.p.y !== e.p.y ? s.p.y > e.p.y ? 1 : -1 : 1;
|
|
1166
1048
|
}
|
|
1167
|
-
function
|
|
1168
|
-
return
|
|
1049
|
+
function is(s, e) {
|
|
1050
|
+
return s.rightSweepEvent.p.x > e.rightSweepEvent.p.x ? 1 : s.rightSweepEvent.p.x < e.rightSweepEvent.p.x ? -1 : s.rightSweepEvent.p.y !== e.rightSweepEvent.p.y ? s.rightSweepEvent.p.y < e.rightSweepEvent.p.y ? 1 : -1 : 1;
|
|
1169
1051
|
}
|
|
1170
|
-
class
|
|
1171
|
-
constructor(e, t,
|
|
1052
|
+
class tt {
|
|
1053
|
+
constructor(e, t, n, r) {
|
|
1172
1054
|
this.p = {
|
|
1173
1055
|
x: e[0],
|
|
1174
1056
|
y: e[1]
|
|
1175
|
-
}, this.featureId = t, this.ringId =
|
|
1057
|
+
}, this.featureId = t, this.ringId = n, this.eventId = r, this.otherEvent = null, this.isLeftEndpoint = null;
|
|
1176
1058
|
}
|
|
1177
1059
|
isSamePoint(e) {
|
|
1178
1060
|
return this.p.x === e.p.x && this.p.y === e.p.y;
|
|
1179
1061
|
}
|
|
1180
1062
|
}
|
|
1181
|
-
function
|
|
1182
|
-
if (
|
|
1183
|
-
const t =
|
|
1184
|
-
for (let
|
|
1185
|
-
|
|
1063
|
+
function os(s, e) {
|
|
1064
|
+
if (s.type === "FeatureCollection") {
|
|
1065
|
+
const t = s.features;
|
|
1066
|
+
for (let n = 0; n < t.length; n++)
|
|
1067
|
+
nt(t[n], e);
|
|
1186
1068
|
} else
|
|
1187
|
-
|
|
1188
|
-
}
|
|
1189
|
-
let
|
|
1190
|
-
function
|
|
1191
|
-
const t =
|
|
1192
|
-
let
|
|
1193
|
-
(t.type === "Polygon" || t.type === "MultiLineString") && (
|
|
1194
|
-
for (let
|
|
1195
|
-
for (let
|
|
1196
|
-
let o =
|
|
1197
|
-
|
|
1198
|
-
for (let l = 0; l <
|
|
1199
|
-
a =
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1069
|
+
nt(s, e);
|
|
1070
|
+
}
|
|
1071
|
+
let Ce = 0, ke = 0, Fe = 0;
|
|
1072
|
+
function nt(s, e) {
|
|
1073
|
+
const t = s.type === "Feature" ? s.geometry : s;
|
|
1074
|
+
let n = t.coordinates;
|
|
1075
|
+
(t.type === "Polygon" || t.type === "MultiLineString") && (n = [n]), t.type === "LineString" && (n = [[n]]);
|
|
1076
|
+
for (let r = 0; r < n.length; r++)
|
|
1077
|
+
for (let i = 0; i < n[r].length; i++) {
|
|
1078
|
+
let o = n[r][i][0], a = null;
|
|
1079
|
+
ke = ke + 1;
|
|
1080
|
+
for (let l = 0; l < n[r][i].length - 1; l++) {
|
|
1081
|
+
a = n[r][i][l + 1];
|
|
1082
|
+
const f = new tt(o, Ce, ke, Fe), c = new tt(a, Ce, ke, Fe + 1);
|
|
1083
|
+
f.otherEvent = c, c.otherEvent = f, Pt(f, c) > 0 ? (c.isLeftEndpoint = !0, f.isLeftEndpoint = !1) : (f.isLeftEndpoint = !0, c.isLeftEndpoint = !1), e.push(f), e.push(c), o = a, Fe = Fe + 1;
|
|
1202
1084
|
}
|
|
1203
1085
|
}
|
|
1204
|
-
|
|
1086
|
+
Ce = Ce + 1;
|
|
1205
1087
|
}
|
|
1206
|
-
class
|
|
1088
|
+
class as {
|
|
1207
1089
|
constructor(e) {
|
|
1208
1090
|
this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
|
|
1209
1091
|
}
|
|
1210
1092
|
}
|
|
1211
|
-
function
|
|
1212
|
-
if (
|
|
1213
|
-
const t =
|
|
1214
|
-
if (
|
|
1093
|
+
function ls(s, e) {
|
|
1094
|
+
if (s === null || e === null || s.leftSweepEvent.ringId === e.leftSweepEvent.ringId && (s.rightSweepEvent.isSamePoint(e.leftSweepEvent) || s.rightSweepEvent.isSamePoint(e.leftSweepEvent) || s.rightSweepEvent.isSamePoint(e.rightSweepEvent) || s.leftSweepEvent.isSamePoint(e.leftSweepEvent) || s.leftSweepEvent.isSamePoint(e.rightSweepEvent))) return !1;
|
|
1095
|
+
const t = s.leftSweepEvent.p.x, n = s.leftSweepEvent.p.y, r = s.rightSweepEvent.p.x, i = s.rightSweepEvent.p.y, o = e.leftSweepEvent.p.x, a = e.leftSweepEvent.p.y, l = e.rightSweepEvent.p.x, f = e.rightSweepEvent.p.y, c = (f - a) * (r - t) - (l - o) * (i - n), m = (l - o) * (n - a) - (f - a) * (t - o), d = (r - t) * (n - a) - (i - n) * (t - o);
|
|
1096
|
+
if (c === 0)
|
|
1215
1097
|
return !1;
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1218
|
-
const
|
|
1219
|
-
return [
|
|
1098
|
+
const u = m / c, y = d / c;
|
|
1099
|
+
if (u >= 0 && u <= 1 && y >= 0 && y <= 1) {
|
|
1100
|
+
const p = t + u * (r - t), v = n + u * (i - n);
|
|
1101
|
+
return [p, v];
|
|
1220
1102
|
}
|
|
1221
1103
|
return !1;
|
|
1222
1104
|
}
|
|
1223
|
-
function
|
|
1105
|
+
function cs(s, e) {
|
|
1224
1106
|
e = e || !1;
|
|
1225
|
-
const t = [],
|
|
1226
|
-
for (;
|
|
1227
|
-
const
|
|
1228
|
-
if (
|
|
1229
|
-
const
|
|
1230
|
-
for (let o = 0; o <
|
|
1231
|
-
const a =
|
|
1232
|
-
if (e && a.leftSweepEvent.featureId ===
|
|
1107
|
+
const t = [], n = new Mt([], is);
|
|
1108
|
+
for (; s.length; ) {
|
|
1109
|
+
const r = s.pop();
|
|
1110
|
+
if (r.isLeftEndpoint) {
|
|
1111
|
+
const i = new as(r);
|
|
1112
|
+
for (let o = 0; o < n.data.length; o++) {
|
|
1113
|
+
const a = n.data[o];
|
|
1114
|
+
if (e && a.leftSweepEvent.featureId === r.featureId)
|
|
1233
1115
|
continue;
|
|
1234
|
-
const l =
|
|
1116
|
+
const l = ls(i, a);
|
|
1235
1117
|
l !== !1 && t.push(l);
|
|
1236
1118
|
}
|
|
1237
|
-
|
|
1238
|
-
} else
|
|
1119
|
+
n.push(i);
|
|
1120
|
+
} else r.isLeftEndpoint === !1 && n.pop();
|
|
1239
1121
|
}
|
|
1240
1122
|
return t;
|
|
1241
1123
|
}
|
|
1242
|
-
function
|
|
1243
|
-
const t = new
|
|
1244
|
-
return
|
|
1245
|
-
}
|
|
1246
|
-
var
|
|
1247
|
-
function
|
|
1248
|
-
const { removeDuplicates:
|
|
1249
|
-
let
|
|
1250
|
-
|
|
1251
|
-
const o =
|
|
1252
|
-
|
|
1253
|
-
|
|
1124
|
+
function us(s, e) {
|
|
1125
|
+
const t = new Mt([], Pt);
|
|
1126
|
+
return os(s, t), cs(t, e);
|
|
1127
|
+
}
|
|
1128
|
+
var ds = us;
|
|
1129
|
+
function fs(s, e, t = {}) {
|
|
1130
|
+
const { removeDuplicates: n = !0, ignoreSelfIntersections: r = !0 } = t;
|
|
1131
|
+
let i = [];
|
|
1132
|
+
s.type === "FeatureCollection" ? i = i.concat(s.features) : s.type === "Feature" ? i.push(s) : (s.type === "LineString" || s.type === "Polygon" || s.type === "MultiLineString" || s.type === "MultiPolygon") && i.push(Qe(s)), e.type === "FeatureCollection" ? i = i.concat(e.features) : e.type === "Feature" ? i.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && i.push(Qe(e));
|
|
1133
|
+
const o = ds(
|
|
1134
|
+
Ke(i),
|
|
1135
|
+
r
|
|
1254
1136
|
);
|
|
1255
1137
|
let a = [];
|
|
1256
|
-
if (
|
|
1138
|
+
if (n) {
|
|
1257
1139
|
const l = {};
|
|
1258
|
-
o.forEach((
|
|
1259
|
-
const
|
|
1260
|
-
l[
|
|
1140
|
+
o.forEach((f) => {
|
|
1141
|
+
const c = f.join(",");
|
|
1142
|
+
l[c] || (l[c] = !0, a.push(f));
|
|
1261
1143
|
});
|
|
1262
1144
|
} else
|
|
1263
1145
|
a = o;
|
|
1264
|
-
return
|
|
1265
|
-
}
|
|
1266
|
-
function
|
|
1267
|
-
let t = 0,
|
|
1268
|
-
return
|
|
1269
|
-
|
|
1270
|
-
function(
|
|
1271
|
-
t +=
|
|
1146
|
+
return Ke(a.map((l) => yt(l)));
|
|
1147
|
+
}
|
|
1148
|
+
function ps(s, e = {}) {
|
|
1149
|
+
let t = 0, n = 0, r = 0;
|
|
1150
|
+
return Lt(
|
|
1151
|
+
s,
|
|
1152
|
+
function(i) {
|
|
1153
|
+
t += i[0], n += i[1], r++;
|
|
1272
1154
|
}
|
|
1273
|
-
),
|
|
1155
|
+
), yt([t / r, n / r], e.properties);
|
|
1274
1156
|
}
|
|
1275
|
-
const
|
|
1276
|
-
length:
|
|
1157
|
+
const ms = ln({
|
|
1158
|
+
length: cn
|
|
1277
1159
|
});
|
|
1278
|
-
function
|
|
1279
|
-
return
|
|
1160
|
+
function st(s, e) {
|
|
1161
|
+
return ms(s).from(ot[O.meter]).to(ot[e]);
|
|
1280
1162
|
}
|
|
1281
|
-
const
|
|
1282
|
-
function
|
|
1283
|
-
meters:
|
|
1163
|
+
const rt = 1e4;
|
|
1164
|
+
function Re({
|
|
1165
|
+
meters: s,
|
|
1284
1166
|
unit: e,
|
|
1285
1167
|
locale: t,
|
|
1286
1168
|
options: {
|
|
1287
|
-
autoSplitNumber:
|
|
1288
|
-
...
|
|
1169
|
+
autoSplitNumber: n,
|
|
1170
|
+
...r
|
|
1289
1171
|
} = {
|
|
1290
|
-
autoSplitNumber:
|
|
1172
|
+
autoSplitNumber: rt
|
|
1291
1173
|
}
|
|
1292
1174
|
}) {
|
|
1293
|
-
const
|
|
1294
|
-
let l,
|
|
1175
|
+
const i = e === Ne["m-km"], o = e === Ne["ft-mi"], a = i || o;
|
|
1176
|
+
let l, f;
|
|
1295
1177
|
if (a) {
|
|
1296
|
-
const
|
|
1297
|
-
let
|
|
1298
|
-
l =
|
|
1178
|
+
const c = s < (n ?? rt);
|
|
1179
|
+
let m = c ? O.meter : O.kilometer;
|
|
1180
|
+
l = c ? Pe.meter : Pe.kilometer, o && (l = c ? Pe.feet : Pe.mile, m = c ? O.feet : O.mile), f = st(s, m);
|
|
1299
1181
|
} else
|
|
1300
|
-
l =
|
|
1301
|
-
return `${
|
|
1182
|
+
l = Pe[e], f = st(s, e);
|
|
1183
|
+
return `${ht(f, t, {
|
|
1302
1184
|
style: "unit",
|
|
1303
1185
|
unit: l,
|
|
1304
1186
|
unitDisplay: "short",
|
|
1305
1187
|
notation: "standard",
|
|
1306
1188
|
minimumFractionDigits: 2,
|
|
1307
1189
|
maximumFractionDigits: 2,
|
|
1308
|
-
...
|
|
1190
|
+
...r
|
|
1309
1191
|
})}`;
|
|
1310
1192
|
}
|
|
1311
|
-
function
|
|
1193
|
+
function Dr(s, {
|
|
1312
1194
|
hasDoubleClickZoom: e
|
|
1313
1195
|
}) {
|
|
1314
|
-
return typeof
|
|
1196
|
+
return typeof s == "boolean" ? {
|
|
1315
1197
|
doubleClickZoom: e
|
|
1316
1198
|
} : {
|
|
1317
|
-
...
|
|
1199
|
+
...s,
|
|
1318
1200
|
doubleClickZoom: e
|
|
1319
1201
|
};
|
|
1320
1202
|
}
|
|
1321
|
-
function
|
|
1322
|
-
if (
|
|
1203
|
+
function wt(s, e, t) {
|
|
1204
|
+
if (s > 0) {
|
|
1323
1205
|
const {
|
|
1324
|
-
formatTooltip:
|
|
1325
|
-
turfOptions:
|
|
1206
|
+
formatTooltip: n,
|
|
1207
|
+
turfOptions: r
|
|
1326
1208
|
} = t ?? {
|
|
1327
1209
|
turfOptions: {
|
|
1328
1210
|
units: "kilometers"
|
|
1329
1211
|
}
|
|
1330
|
-
},
|
|
1212
|
+
}, i = r == null ? void 0 : r.units;
|
|
1331
1213
|
let o;
|
|
1332
|
-
|
|
1214
|
+
n ? o = n(s) : o = `${parseFloat(s.toString()).toFixed(2)} ${i}`;
|
|
1333
1215
|
const {
|
|
1334
1216
|
measurementCallback: a
|
|
1335
1217
|
} = t;
|
|
1336
|
-
return a && a(
|
|
1218
|
+
return a && a(s), [{
|
|
1337
1219
|
position: e,
|
|
1338
1220
|
text: o
|
|
1339
1221
|
}];
|
|
1340
1222
|
}
|
|
1341
1223
|
return [];
|
|
1342
1224
|
}
|
|
1343
|
-
class
|
|
1225
|
+
class ys extends Yt {
|
|
1344
1226
|
constructor() {
|
|
1345
1227
|
super(...arguments);
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1228
|
+
te(this, "_isMeasuringSessionFinished", !1);
|
|
1229
|
+
te(this, "area", 0);
|
|
1230
|
+
te(this, "tooltips", []);
|
|
1231
|
+
te(this, "resultPolygon", {
|
|
1350
1232
|
type: "FeatureCollection",
|
|
1351
1233
|
features: []
|
|
1352
1234
|
});
|
|
1353
1235
|
}
|
|
1354
|
-
handleClick(t,
|
|
1236
|
+
handleClick(t, n) {
|
|
1355
1237
|
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this.area = 0);
|
|
1356
1238
|
const {
|
|
1357
|
-
picks:
|
|
1358
|
-
} = t,
|
|
1239
|
+
picks: r
|
|
1240
|
+
} = t, i = Xt(r), o = this.getClickSequence();
|
|
1359
1241
|
let a = !1;
|
|
1360
|
-
!
|
|
1242
|
+
!i && !this.allowOverlapping(n) && (this.addClickSequence(t), a = !0), this.area = Xe({
|
|
1361
1243
|
type: "Polygon",
|
|
1362
1244
|
coordinates: [this.getClickSequence()]
|
|
1363
|
-
}), this.isFinalizedEdition(o,
|
|
1245
|
+
}), this.isFinalizedEdition(o, i) ? this.finalizeEdition(n) : a && n.onEdit({
|
|
1364
1246
|
// data is the same
|
|
1365
|
-
updatedData:
|
|
1247
|
+
updatedData: n.data,
|
|
1366
1248
|
editType: "addTentativePosition",
|
|
1367
1249
|
editContext: {
|
|
1368
1250
|
position: t.mapCoords
|
|
1369
1251
|
}
|
|
1370
1252
|
});
|
|
1371
1253
|
}
|
|
1372
|
-
handleKeyUp(t,
|
|
1373
|
-
t.key === "Enter" ? this.getClickSequence().length > 2 ? this.finalizeEdition(
|
|
1254
|
+
handleKeyUp(t, n) {
|
|
1255
|
+
t.key === "Enter" ? this.getClickSequence().length > 2 ? this.finalizeEdition(n) : this.resetEdition(n) : t.key === "Escape" && this.resetEdition(n);
|
|
1374
1256
|
}
|
|
1375
|
-
handlePointerMove(t,
|
|
1257
|
+
handlePointerMove(t, n) {
|
|
1376
1258
|
if (this._isMeasuringSessionFinished)
|
|
1377
1259
|
return;
|
|
1378
|
-
super.handlePointerMove(t,
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1381
|
-
const
|
|
1382
|
-
this.area =
|
|
1260
|
+
super.handlePointerMove(t, n);
|
|
1261
|
+
const r = this.getTentativeGuide(n);
|
|
1262
|
+
if (r && r.geometry.type === "Polygon") {
|
|
1263
|
+
const i = ps(r);
|
|
1264
|
+
this.area = Xe(r), this.tooltips = wt(this.area, i.geometry.coordinates, n.modeConfig);
|
|
1383
1265
|
}
|
|
1384
1266
|
}
|
|
1385
1267
|
resetClickSequence() {
|
|
@@ -1391,46 +1273,46 @@ class ts extends zt {
|
|
|
1391
1273
|
getTooltips() {
|
|
1392
1274
|
return this.tooltips;
|
|
1393
1275
|
}
|
|
1394
|
-
isFinalizedEdition(t,
|
|
1276
|
+
isFinalizedEdition(t, n) {
|
|
1395
1277
|
const {
|
|
1396
|
-
positionIndexes:
|
|
1397
|
-
} = (
|
|
1278
|
+
positionIndexes: r
|
|
1279
|
+
} = (n == null ? void 0 : n.properties) ?? {
|
|
1398
1280
|
positionIndexes: []
|
|
1399
1281
|
};
|
|
1400
|
-
return t.length > 2 &&
|
|
1282
|
+
return t.length > 2 && n !== void 0 && (r[0] === 0 || r[0] === t.length - 1);
|
|
1401
1283
|
}
|
|
1402
1284
|
allowOverlapping(t) {
|
|
1403
|
-
var
|
|
1404
|
-
let
|
|
1405
|
-
const
|
|
1406
|
-
if (
|
|
1407
|
-
((
|
|
1285
|
+
var i;
|
|
1286
|
+
let n = !1;
|
|
1287
|
+
const r = this.getClickSequence();
|
|
1288
|
+
if (r.length > 2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1289
|
+
((i = t.modeConfig) != null && i.preventOverlappingLines)) {
|
|
1408
1290
|
const o = {
|
|
1409
1291
|
type: "LineString",
|
|
1410
|
-
coordinates: [...
|
|
1292
|
+
coordinates: [...r, r[0]]
|
|
1411
1293
|
}, a = {
|
|
1412
1294
|
type: "LineString",
|
|
1413
|
-
coordinates: [...
|
|
1295
|
+
coordinates: [...r.slice(0, r.length - 1)]
|
|
1414
1296
|
};
|
|
1415
|
-
|
|
1297
|
+
fs(o, a).features.length > 0 && (n = !0);
|
|
1416
1298
|
}
|
|
1417
|
-
return
|
|
1299
|
+
return n;
|
|
1418
1300
|
}
|
|
1419
1301
|
finalizeEdition(t) {
|
|
1420
|
-
const
|
|
1302
|
+
const n = this.getClickSequence(), r = {
|
|
1421
1303
|
type: "Polygon",
|
|
1422
|
-
coordinates: [[...
|
|
1304
|
+
coordinates: [[...n, n[0]]]
|
|
1423
1305
|
};
|
|
1424
1306
|
t.selectedIndexes = [], t.data = {
|
|
1425
1307
|
type: "FeatureCollection",
|
|
1426
1308
|
features: []
|
|
1427
1309
|
};
|
|
1428
|
-
const
|
|
1429
|
-
this._isMeasuringSessionFinished = !0,
|
|
1430
|
-
...
|
|
1310
|
+
const i = this.getAddFeatureOrBooleanPolygonAction(r, t);
|
|
1311
|
+
this._isMeasuringSessionFinished = !0, i && (this.resultPolygon = i.updatedData, t.onEdit({
|
|
1312
|
+
...i,
|
|
1431
1313
|
editType: G.addPosition,
|
|
1432
1314
|
editContext: {
|
|
1433
|
-
...
|
|
1315
|
+
...i.editContext,
|
|
1434
1316
|
distance: this.area,
|
|
1435
1317
|
positions: this.getClickSequence(),
|
|
1436
1318
|
finished: this._isMeasuringSessionFinished
|
|
@@ -1447,60 +1329,60 @@ class ts extends zt {
|
|
|
1447
1329
|
}
|
|
1448
1330
|
getTooltipText({
|
|
1449
1331
|
meters: t,
|
|
1450
|
-
locale:
|
|
1451
|
-
unit:
|
|
1452
|
-
options:
|
|
1332
|
+
locale: n,
|
|
1333
|
+
unit: r,
|
|
1334
|
+
options: i
|
|
1453
1335
|
}) {
|
|
1454
|
-
return
|
|
1336
|
+
return Re({
|
|
1455
1337
|
meters: t,
|
|
1456
|
-
locale:
|
|
1457
|
-
unit:
|
|
1458
|
-
options:
|
|
1338
|
+
locale: n,
|
|
1339
|
+
unit: r,
|
|
1340
|
+
options: i
|
|
1459
1341
|
}) + "2";
|
|
1460
1342
|
}
|
|
1461
1343
|
}
|
|
1462
|
-
class
|
|
1344
|
+
class hs extends dt {
|
|
1463
1345
|
constructor() {
|
|
1464
1346
|
super(...arguments);
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1347
|
+
te(this, "_isMeasuringSessionFinished", !1);
|
|
1348
|
+
te(this, "_currentArea", 0);
|
|
1349
|
+
te(this, "resultPolygon", {
|
|
1468
1350
|
type: "FeatureCollection",
|
|
1469
1351
|
features: []
|
|
1470
1352
|
});
|
|
1471
|
-
|
|
1353
|
+
te(this, "tooltips", []);
|
|
1472
1354
|
}
|
|
1473
|
-
handleClick(t,
|
|
1474
|
-
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this._currentArea = 0), super.handleClick(t,
|
|
1355
|
+
handleClick(t, n) {
|
|
1356
|
+
this._isMeasuringSessionFinished && (this._isMeasuringSessionFinished = !1, this.resetClickSequence(), this._currentArea = 0), super.handleClick(t, n);
|
|
1475
1357
|
}
|
|
1476
|
-
handlePointerMove(t,
|
|
1477
|
-
this._isMeasuringSessionFinished || (super.handlePointerMove(t,
|
|
1358
|
+
handlePointerMove(t, n) {
|
|
1359
|
+
this._isMeasuringSessionFinished || (super.handlePointerMove(t, n), this.tooltips = wt(this.areaCircle, this.position, n.modeConfig));
|
|
1478
1360
|
}
|
|
1479
1361
|
checkAndFinishPolygon(t) {
|
|
1480
|
-
const
|
|
1481
|
-
this.isFinalizedEdition(
|
|
1362
|
+
const n = this.getClickSequence(), r = this.getTentativeGuide(t);
|
|
1363
|
+
this.isFinalizedEdition(n, r) && this.finalizeEdition(t);
|
|
1482
1364
|
}
|
|
1483
|
-
handleKeyUp(t,
|
|
1484
|
-
t.key === "Enter" ? this.finalizeEdition(
|
|
1365
|
+
handleKeyUp(t, n) {
|
|
1366
|
+
t.key === "Enter" ? this.finalizeEdition(n) : t.key === "Escape" && this.resetEdition(n);
|
|
1485
1367
|
}
|
|
1486
1368
|
getGuides(t) {
|
|
1487
1369
|
return this._isMeasuringSessionFinished ? this.resultPolygon : super.getGuides(t);
|
|
1488
1370
|
}
|
|
1489
|
-
isFinalizedEdition(t,
|
|
1490
|
-
return t.length > 1 &&
|
|
1371
|
+
isFinalizedEdition(t, n) {
|
|
1372
|
+
return t.length > 1 && n && n.geometry.type === "Polygon";
|
|
1491
1373
|
}
|
|
1492
1374
|
finalizeEdition(t) {
|
|
1493
|
-
const
|
|
1375
|
+
const n = this.getTentativeGuide(t);
|
|
1494
1376
|
t.selectedIndexes = [], t.data = {
|
|
1495
1377
|
type: "FeatureCollection",
|
|
1496
1378
|
features: []
|
|
1497
1379
|
};
|
|
1498
|
-
const
|
|
1499
|
-
this._isMeasuringSessionFinished = !0, t.onUpdateCursor("cell"),
|
|
1500
|
-
...
|
|
1380
|
+
const r = this.getAddFeatureOrBooleanPolygonAction(n, t);
|
|
1381
|
+
this._isMeasuringSessionFinished = !0, t.onUpdateCursor("cell"), r && (this.resultPolygon = r.updatedData, t.onEdit({
|
|
1382
|
+
...r,
|
|
1501
1383
|
editType: G.addPosition,
|
|
1502
1384
|
editContext: {
|
|
1503
|
-
...
|
|
1385
|
+
...r.editContext,
|
|
1504
1386
|
distance: this._currentArea,
|
|
1505
1387
|
positions: this.getClickSequence(),
|
|
1506
1388
|
finished: this._isMeasuringSessionFinished
|
|
@@ -1516,26 +1398,26 @@ class ns extends at {
|
|
|
1516
1398
|
});
|
|
1517
1399
|
}
|
|
1518
1400
|
resetClickSequence() {
|
|
1519
|
-
super.resetClickSequence(), this._isMeasuringSessionFinished = !1, this._currentArea = 0, this.radius = 0;
|
|
1401
|
+
super.resetClickSequence(), this.tooltips = [], this._isMeasuringSessionFinished = !1, this._currentArea = 0, this.radius = 0, this.areaCircle = 0;
|
|
1520
1402
|
}
|
|
1521
1403
|
getTooltips() {
|
|
1522
1404
|
return this.tooltips;
|
|
1523
1405
|
}
|
|
1524
1406
|
getTooltipText({
|
|
1525
1407
|
meters: t,
|
|
1526
|
-
locale:
|
|
1527
|
-
unit:
|
|
1528
|
-
options:
|
|
1408
|
+
locale: n,
|
|
1409
|
+
unit: r,
|
|
1410
|
+
options: i
|
|
1529
1411
|
}) {
|
|
1530
|
-
return
|
|
1412
|
+
return Re({
|
|
1531
1413
|
meters: t,
|
|
1532
|
-
locale:
|
|
1533
|
-
unit:
|
|
1534
|
-
options:
|
|
1414
|
+
locale: n,
|
|
1415
|
+
unit: r,
|
|
1416
|
+
options: i
|
|
1535
1417
|
}) + "2";
|
|
1536
1418
|
}
|
|
1537
1419
|
}
|
|
1538
|
-
class
|
|
1420
|
+
class _t extends Jt {
|
|
1539
1421
|
handleClick(e, t) {
|
|
1540
1422
|
super.handleClick(e, t), t.onEdit({
|
|
1541
1423
|
// data is the same
|
|
@@ -1552,10 +1434,10 @@ class Mt extends Wt {
|
|
|
1552
1434
|
if (this._isMeasuringSessionFinished) return;
|
|
1553
1435
|
e.stopPropagation();
|
|
1554
1436
|
const {
|
|
1555
|
-
key:
|
|
1556
|
-
} = e,
|
|
1557
|
-
let
|
|
1558
|
-
switch (
|
|
1437
|
+
key: n
|
|
1438
|
+
} = e, r = this.getClickSequence().length;
|
|
1439
|
+
let i = G.finish;
|
|
1440
|
+
switch (n) {
|
|
1559
1441
|
case "Escape":
|
|
1560
1442
|
t.onEdit({
|
|
1561
1443
|
updatedData: {
|
|
@@ -1567,9 +1449,9 @@ class Mt extends Wt {
|
|
|
1567
1449
|
});
|
|
1568
1450
|
break;
|
|
1569
1451
|
case "Enter":
|
|
1570
|
-
this._isMeasuringSessionFinished = !0,
|
|
1452
|
+
this._isMeasuringSessionFinished = !0, r === 1 && (this.resetClickSequence(), i = G.cancel), t.onUpdateCursor("cell"), t.onEdit({
|
|
1571
1453
|
updatedData: t.data,
|
|
1572
|
-
editType:
|
|
1454
|
+
editType: i,
|
|
1573
1455
|
editContext: {
|
|
1574
1456
|
finished: this._isMeasuringSessionFinished
|
|
1575
1457
|
}
|
|
@@ -1583,19 +1465,19 @@ class Mt extends Wt {
|
|
|
1583
1465
|
getTooltipText({
|
|
1584
1466
|
meters: e,
|
|
1585
1467
|
locale: t,
|
|
1586
|
-
unit:
|
|
1587
|
-
options:
|
|
1468
|
+
unit: n,
|
|
1469
|
+
options: r
|
|
1588
1470
|
}) {
|
|
1589
|
-
return
|
|
1471
|
+
return Re({
|
|
1590
1472
|
meters: e,
|
|
1591
1473
|
locale: t,
|
|
1592
|
-
unit:
|
|
1593
|
-
options:
|
|
1474
|
+
unit: n,
|
|
1475
|
+
options: r
|
|
1594
1476
|
});
|
|
1595
1477
|
}
|
|
1596
1478
|
}
|
|
1597
|
-
const
|
|
1598
|
-
id:
|
|
1479
|
+
const ge = "mapMeasureLayer", gs = {
|
|
1480
|
+
id: ge,
|
|
1599
1481
|
pickable: !1,
|
|
1600
1482
|
billboard: !1,
|
|
1601
1483
|
editHandlePointRadiusUnits: "pixels",
|
|
@@ -1619,19 +1501,19 @@ const Te = "mapMeasureLayer", ss = {
|
|
|
1619
1501
|
getLineWidth: 2
|
|
1620
1502
|
}
|
|
1621
1503
|
}
|
|
1622
|
-
},
|
|
1504
|
+
}, Ve = {
|
|
1623
1505
|
editing: [23, 102, 214, 255],
|
|
1624
1506
|
finished: [71, 219, 153, 255],
|
|
1625
1507
|
point: [255, 255, 255, 255]
|
|
1626
|
-
},
|
|
1508
|
+
}, it = {
|
|
1627
1509
|
styles: {
|
|
1628
1510
|
colors: {
|
|
1629
|
-
editing:
|
|
1630
|
-
finished:
|
|
1631
|
-
point:
|
|
1511
|
+
editing: Ve.editing,
|
|
1512
|
+
finished: Ve.finished,
|
|
1513
|
+
point: Ve.point
|
|
1632
1514
|
}
|
|
1633
1515
|
}
|
|
1634
|
-
},
|
|
1516
|
+
}, O = {
|
|
1635
1517
|
kilometer: "kilometer",
|
|
1636
1518
|
meter: "meter",
|
|
1637
1519
|
centimeter: "centimeter",
|
|
@@ -1639,31 +1521,31 @@ const Te = "mapMeasureLayer", ss = {
|
|
|
1639
1521
|
mile: "mile",
|
|
1640
1522
|
yard: "yard",
|
|
1641
1523
|
feet: "feet"
|
|
1642
|
-
},
|
|
1524
|
+
}, Ne = {
|
|
1643
1525
|
"m-km": "m-km",
|
|
1644
1526
|
"ft-mi": "ft-mi",
|
|
1645
|
-
...
|
|
1646
|
-
},
|
|
1527
|
+
...O
|
|
1528
|
+
}, Ss = {
|
|
1647
1529
|
meters: "meters",
|
|
1648
1530
|
kilometer: "kilometers",
|
|
1649
1531
|
mile: "miles"
|
|
1650
|
-
},
|
|
1651
|
-
[
|
|
1652
|
-
[
|
|
1653
|
-
[
|
|
1654
|
-
[
|
|
1655
|
-
[
|
|
1656
|
-
[
|
|
1657
|
-
[
|
|
1658
|
-
},
|
|
1659
|
-
[
|
|
1660
|
-
[
|
|
1661
|
-
[
|
|
1662
|
-
[
|
|
1663
|
-
[
|
|
1664
|
-
[
|
|
1665
|
-
[
|
|
1666
|
-
},
|
|
1532
|
+
}, ot = {
|
|
1533
|
+
[O.kilometer]: "km",
|
|
1534
|
+
[O.meter]: "m",
|
|
1535
|
+
[O.centimeter]: "cm",
|
|
1536
|
+
[O.milimeter]: "mm",
|
|
1537
|
+
[O.mile]: "mi",
|
|
1538
|
+
[O.yard]: "yd",
|
|
1539
|
+
[O.feet]: "ft"
|
|
1540
|
+
}, Pe = {
|
|
1541
|
+
[O.kilometer]: "kilometer",
|
|
1542
|
+
[O.meter]: "meter",
|
|
1543
|
+
[O.centimeter]: "centimeter",
|
|
1544
|
+
[O.milimeter]: "millimeter",
|
|
1545
|
+
[O.mile]: "mile",
|
|
1546
|
+
[O.yard]: "yard",
|
|
1547
|
+
[O.feet]: "foot"
|
|
1548
|
+
}, B = {
|
|
1667
1549
|
"m-km": {
|
|
1668
1550
|
value: "m-km",
|
|
1669
1551
|
system: "metric"
|
|
@@ -1700,82 +1582,226 @@ const Te = "mapMeasureLayer", ss = {
|
|
|
1700
1582
|
value: "feet",
|
|
1701
1583
|
system: "imperial"
|
|
1702
1584
|
}
|
|
1703
|
-
},
|
|
1585
|
+
}, at = [B["m-km"], B.kilometer, B.meter, B["ft-mi"], B.mile, B.feet], vs = [B["m-km"], B.kilometer, B.meter, B["ft-mi"], B.mile, B.feet], bs = {
|
|
1704
1586
|
distance: {
|
|
1705
1587
|
value: "distance",
|
|
1706
|
-
mode:
|
|
1588
|
+
mode: _t
|
|
1707
1589
|
},
|
|
1708
1590
|
buffer: {
|
|
1709
1591
|
value: "buffer",
|
|
1710
|
-
mode:
|
|
1592
|
+
mode: hs
|
|
1711
1593
|
},
|
|
1712
1594
|
area: {
|
|
1713
1595
|
value: "area",
|
|
1714
|
-
mode:
|
|
1596
|
+
mode: ys
|
|
1715
1597
|
}
|
|
1716
|
-
},
|
|
1717
|
-
distance:
|
|
1718
|
-
buffer:
|
|
1719
|
-
area:
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1598
|
+
}, Es = {
|
|
1599
|
+
distance: at,
|
|
1600
|
+
buffer: at,
|
|
1601
|
+
area: vs
|
|
1602
|
+
}, Ls = [new sn({
|
|
1603
|
+
filterSize: 1
|
|
1604
|
+
})], Ms = [be, Ae, ge];
|
|
1605
|
+
function Ps({
|
|
1606
|
+
children: s,
|
|
1607
|
+
mapId: e,
|
|
1608
|
+
defaultProps: {
|
|
1609
|
+
styles: t = qe.styles,
|
|
1610
|
+
labels: n
|
|
1611
|
+
} = {
|
|
1612
|
+
styles: qe.styles,
|
|
1613
|
+
labels: qe.labels
|
|
1614
|
+
},
|
|
1615
|
+
layerProps: r = {},
|
|
1616
|
+
defaultType: i = "mask"
|
|
1617
|
+
}) {
|
|
1618
|
+
const o = D((g) => {
|
|
1619
|
+
var M;
|
|
1620
|
+
return (M = g.data[e]) == null ? void 0 : M.enabled;
|
|
1621
|
+
}), a = D((g) => g.setEnabled), l = D((g) => {
|
|
1622
|
+
var M;
|
|
1623
|
+
return (M = g.data[e]) == null ? void 0 : M.values;
|
|
1624
|
+
}), f = D((g) => g.setValue), c = D((g) => {
|
|
1625
|
+
var M;
|
|
1626
|
+
return (M = g.data[e]) == null ? void 0 : M.modeInstance;
|
|
1627
|
+
}), m = D((g) => {
|
|
1628
|
+
var M;
|
|
1629
|
+
return (M = g.data[e]) == null ? void 0 : M.modeSelected;
|
|
1630
|
+
}), d = we((g) => g.setLayer), u = k((g) => g.addLayers), y = k((g) => g.removeLayers), p = k(mt((g) => {
|
|
1631
|
+
var M;
|
|
1632
|
+
return (M = g.maps[e]) == null ? void 0 : M.layers.filter((w) => !Ms.includes(w));
|
|
1633
|
+
})), [v, b] = Se(() => Oe()), S = ue(() => Et({
|
|
1634
|
+
values: l
|
|
1635
|
+
}), [l]), E = ut(S.length);
|
|
1636
|
+
Y(() => (o && u(e, [be]), () => {
|
|
1637
|
+
b(Oe()), y(e, [be]);
|
|
1638
|
+
}), [u, o, e, y]);
|
|
1639
|
+
const h = x(() => {
|
|
1640
|
+
b(Oe()), a(e, !1);
|
|
1641
|
+
}, [e, a]), L = x(({
|
|
1642
|
+
editType: g,
|
|
1643
|
+
updatedData: M
|
|
1644
|
+
}) => {
|
|
1645
|
+
var w;
|
|
1646
|
+
if (g === G.cancel) {
|
|
1647
|
+
h();
|
|
1648
|
+
return;
|
|
1649
|
+
}
|
|
1650
|
+
if (b(M), g !== G.updateTentativeFeature && g === G.addFeature) {
|
|
1651
|
+
const F = M.features[0];
|
|
1652
|
+
(w = F.properties).label ?? (w.label = `${n == null ? void 0 : n.mask} ${E.current + 1}`), E.current += 1;
|
|
1653
|
+
const R = F.id ?? crypto.randomUUID();
|
|
1654
|
+
f(e, R, {
|
|
1655
|
+
geometry: F.geometry,
|
|
1656
|
+
properties: F.properties,
|
|
1657
|
+
visible: !0,
|
|
1658
|
+
type: i
|
|
1659
|
+
}), h();
|
|
1660
|
+
}
|
|
1661
|
+
}, [h, n == null ? void 0 : n.mask, f, e, i]);
|
|
1662
|
+
Y(() => {
|
|
1663
|
+
const g = v.features.length > 0, {
|
|
1664
|
+
border: M,
|
|
1665
|
+
point: w,
|
|
1666
|
+
fill: F
|
|
1667
|
+
} = t.colors.editing, R = Zn({
|
|
1668
|
+
layerProps: {
|
|
1669
|
+
...r.mask,
|
|
1670
|
+
pickable: !0,
|
|
1671
|
+
data: v,
|
|
1672
|
+
selectedFeatureIndexes: g ? [0] : []
|
|
1673
|
+
},
|
|
1674
|
+
guideColor: M,
|
|
1675
|
+
fillColor: F,
|
|
1676
|
+
pointColor: w,
|
|
1677
|
+
onEdit: L,
|
|
1678
|
+
mode: c
|
|
1679
|
+
});
|
|
1680
|
+
d(be, R);
|
|
1681
|
+
}, [v, r.mask, c, L, d, t.colors.editing]);
|
|
1682
|
+
const T = ue(() => ({
|
|
1683
|
+
type: "FeatureCollection",
|
|
1684
|
+
features: S.map((g) => ({
|
|
1685
|
+
type: "Feature",
|
|
1686
|
+
geometry: g.geometry,
|
|
1687
|
+
properties: g.properties,
|
|
1688
|
+
id: g.id
|
|
1689
|
+
}))
|
|
1690
|
+
}), [S]), C = ue(() => {
|
|
1691
|
+
const g = S.filter((w) => w.visible).map((w) => w.id), M = v.features.map((w) => w.id);
|
|
1692
|
+
return M.length ? g.filter((w) => !M.includes(w)) : g;
|
|
1693
|
+
}, [v.features, S]);
|
|
1694
|
+
return Y(() => {
|
|
1695
|
+
const g = {
|
|
1696
|
+
...Te,
|
|
1697
|
+
pickable: o && m === "edit",
|
|
1698
|
+
visible: !0,
|
|
1699
|
+
data: T,
|
|
1700
|
+
getLineColor: t.colors.finished.border,
|
|
1701
|
+
getFillColor: t.colors.finished.fill,
|
|
1702
|
+
extensions: Ls,
|
|
1703
|
+
getFilterValue: (M) => Number(C.includes(M.id)),
|
|
1704
|
+
filterRange: [1, 1],
|
|
1705
|
+
updateTriggers: {
|
|
1706
|
+
getFilterValue: C
|
|
1707
|
+
},
|
|
1708
|
+
onClick: ({
|
|
1709
|
+
object: M
|
|
1710
|
+
}) => {
|
|
1711
|
+
const w = Oe();
|
|
1712
|
+
w.features.push(M), b(w), a(e, !0);
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
return d(Te.id, {
|
|
1716
|
+
type: nn,
|
|
1717
|
+
props: g
|
|
1718
|
+
}), u(e, [Te.id]), () => {
|
|
1719
|
+
y(e, [Te.id]);
|
|
1720
|
+
};
|
|
1721
|
+
}, [u, o, e, T, C, m, y, a, d, t.colors.finished.border, t.colors.finished.fill]), Y(() => {
|
|
1722
|
+
p == null || p.forEach((g) => {
|
|
1723
|
+
d(g, {
|
|
1724
|
+
props: {
|
|
1725
|
+
pickable: !o,
|
|
1726
|
+
extensions: [new rn()],
|
|
1727
|
+
maskId: !o && C.length ? Ae : void 0
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
});
|
|
1731
|
+
}, [o, e, p, C.length, d]), s;
|
|
1732
|
+
}
|
|
1733
|
+
function Oe() {
|
|
1734
|
+
return {
|
|
1735
|
+
type: "FeatureCollection",
|
|
1736
|
+
features: []
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
Ps.Controls = Jn;
|
|
1740
|
+
function ws({
|
|
1741
|
+
mode: s,
|
|
1723
1742
|
...e
|
|
1724
1743
|
}) {
|
|
1725
|
-
const t =
|
|
1726
|
-
mode:
|
|
1744
|
+
const t = _s({
|
|
1745
|
+
mode: s,
|
|
1727
1746
|
...e
|
|
1728
1747
|
});
|
|
1729
1748
|
return {
|
|
1730
|
-
type:
|
|
1749
|
+
type: ft,
|
|
1731
1750
|
props: {
|
|
1732
1751
|
...t,
|
|
1733
|
-
mode:
|
|
1752
|
+
mode: s,
|
|
1734
1753
|
data: []
|
|
1735
1754
|
}
|
|
1736
1755
|
};
|
|
1737
1756
|
}
|
|
1738
|
-
function
|
|
1739
|
-
mode:
|
|
1757
|
+
function _s({
|
|
1758
|
+
mode: s,
|
|
1740
1759
|
layerProps: e,
|
|
1741
1760
|
locale: t,
|
|
1742
|
-
enabled:
|
|
1743
|
-
unit:
|
|
1744
|
-
onEdit:
|
|
1761
|
+
enabled: n,
|
|
1762
|
+
unit: r,
|
|
1763
|
+
onEdit: i,
|
|
1745
1764
|
guideColor: o,
|
|
1746
1765
|
pointColor: a,
|
|
1747
1766
|
textOptions: l
|
|
1748
1767
|
}) {
|
|
1749
|
-
const
|
|
1750
|
-
visible:
|
|
1751
|
-
pickable:
|
|
1768
|
+
const f = Ee(e, {
|
|
1769
|
+
visible: n,
|
|
1770
|
+
pickable: n,
|
|
1752
1771
|
modeConfig: {
|
|
1753
1772
|
// We force distance due to conversion is addressed at feature getText level
|
|
1754
|
-
formatTooltip: (
|
|
1773
|
+
formatTooltip: (d) => d,
|
|
1755
1774
|
turfOptions: {
|
|
1756
|
-
units:
|
|
1775
|
+
units: Ss.meters
|
|
1757
1776
|
}
|
|
1758
1777
|
},
|
|
1759
|
-
...
|
|
1760
|
-
onEdit:
|
|
1778
|
+
...n && {
|
|
1779
|
+
onEdit: i
|
|
1761
1780
|
},
|
|
1762
1781
|
_subLayerProps: {
|
|
1763
1782
|
tooltips: {
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1783
|
+
outlineColor: [255, 255, 255, 255],
|
|
1784
|
+
outlineWidth: 6,
|
|
1785
|
+
fontSettings: {
|
|
1786
|
+
sdf: !0,
|
|
1787
|
+
// needed for the outlineWidth and outlineColor attributes to be effective
|
|
1788
|
+
smoothing: 0.2
|
|
1789
|
+
},
|
|
1790
|
+
getText: (d) => {
|
|
1791
|
+
var u;
|
|
1792
|
+
return (u = s == null ? void 0 : s.getTooltipText) == null ? void 0 : u.call(s, {
|
|
1793
|
+
meters: d.text,
|
|
1768
1794
|
locale: t,
|
|
1769
|
-
unit:
|
|
1795
|
+
unit: r,
|
|
1770
1796
|
options: l
|
|
1771
1797
|
});
|
|
1772
1798
|
},
|
|
1773
1799
|
updateTriggers: {
|
|
1774
|
-
getText: [
|
|
1800
|
+
getText: [r, t, l]
|
|
1775
1801
|
}
|
|
1776
1802
|
}
|
|
1777
1803
|
}
|
|
1778
|
-
}),
|
|
1804
|
+
}), c = Ee(gs, {
|
|
1779
1805
|
_subLayerProps: {
|
|
1780
1806
|
guides: {
|
|
1781
1807
|
getLineColor: o,
|
|
@@ -1785,675 +1811,1241 @@ function cs({
|
|
|
1785
1811
|
getEditHandlePointColor: a,
|
|
1786
1812
|
getEditHandlePointOutlineColor: o
|
|
1787
1813
|
});
|
|
1788
|
-
return
|
|
1814
|
+
return Ee(c, f);
|
|
1789
1815
|
}
|
|
1790
|
-
const
|
|
1791
|
-
measurements:
|
|
1816
|
+
const Ts = (s) => Ge()((e) => ({
|
|
1817
|
+
measurements: s.reduce((n, r) => {
|
|
1792
1818
|
const {
|
|
1793
|
-
mapId:
|
|
1819
|
+
mapId: i,
|
|
1794
1820
|
modeSelected: o,
|
|
1795
|
-
modes: a =
|
|
1796
|
-
units: l =
|
|
1797
|
-
distance:
|
|
1798
|
-
finished:
|
|
1799
|
-
locale:
|
|
1800
|
-
positions:
|
|
1801
|
-
clearLayerOnStart:
|
|
1802
|
-
unit:
|
|
1803
|
-
enabled:
|
|
1804
|
-
} =
|
|
1805
|
-
return
|
|
1821
|
+
modes: a = bs,
|
|
1822
|
+
units: l = Es,
|
|
1823
|
+
distance: f = 0,
|
|
1824
|
+
finished: c = !1,
|
|
1825
|
+
locale: m = "en",
|
|
1826
|
+
positions: d = [],
|
|
1827
|
+
clearLayerOnStart: u = !1,
|
|
1828
|
+
unit: y = Ne["m-km"],
|
|
1829
|
+
enabled: p = !1
|
|
1830
|
+
} = r;
|
|
1831
|
+
return n[i] = {
|
|
1806
1832
|
modes: a,
|
|
1807
1833
|
units: l,
|
|
1808
1834
|
modeSelected: o,
|
|
1809
|
-
distance:
|
|
1810
|
-
finished:
|
|
1811
|
-
locale:
|
|
1812
|
-
positions:
|
|
1813
|
-
unit:
|
|
1814
|
-
clearLayerOnStart:
|
|
1815
|
-
enabled:
|
|
1816
|
-
},
|
|
1835
|
+
distance: f,
|
|
1836
|
+
finished: c,
|
|
1837
|
+
locale: m,
|
|
1838
|
+
positions: d,
|
|
1839
|
+
unit: y,
|
|
1840
|
+
clearLayerOnStart: u,
|
|
1841
|
+
enabled: p
|
|
1842
|
+
}, n;
|
|
1817
1843
|
}, {}),
|
|
1818
|
-
mode:
|
|
1819
|
-
setModeInstance: (
|
|
1820
|
-
e((
|
|
1844
|
+
mode: _t,
|
|
1845
|
+
setModeInstance: (n, r) => {
|
|
1846
|
+
e((i) => ({
|
|
1821
1847
|
measurements: {
|
|
1822
|
-
...
|
|
1823
|
-
[
|
|
1824
|
-
...
|
|
1825
|
-
modeInstance:
|
|
1848
|
+
...i.measurements,
|
|
1849
|
+
[n]: {
|
|
1850
|
+
...i.measurements[n],
|
|
1851
|
+
modeInstance: r
|
|
1826
1852
|
}
|
|
1827
1853
|
}
|
|
1828
1854
|
}));
|
|
1829
1855
|
},
|
|
1830
|
-
setModeSelected: (
|
|
1831
|
-
e((
|
|
1856
|
+
setModeSelected: (n, r) => {
|
|
1857
|
+
e((i) => ({
|
|
1832
1858
|
measurements: {
|
|
1833
|
-
...
|
|
1834
|
-
[
|
|
1835
|
-
...
|
|
1836
|
-
modeSelected:
|
|
1859
|
+
...i.measurements,
|
|
1860
|
+
[n]: {
|
|
1861
|
+
...i.measurements[n],
|
|
1862
|
+
modeSelected: r
|
|
1837
1863
|
}
|
|
1838
1864
|
}
|
|
1839
1865
|
}));
|
|
1840
1866
|
},
|
|
1841
|
-
setFinished: (
|
|
1842
|
-
e((
|
|
1867
|
+
setFinished: (n, r) => {
|
|
1868
|
+
e((i) => ({
|
|
1843
1869
|
measurements: {
|
|
1844
|
-
...
|
|
1845
|
-
[
|
|
1846
|
-
...
|
|
1847
|
-
finished:
|
|
1870
|
+
...i.measurements,
|
|
1871
|
+
[n]: {
|
|
1872
|
+
...i.measurements[n],
|
|
1873
|
+
finished: r
|
|
1848
1874
|
}
|
|
1849
1875
|
}
|
|
1850
1876
|
}));
|
|
1851
1877
|
},
|
|
1852
|
-
setDistance: (
|
|
1853
|
-
e((
|
|
1878
|
+
setDistance: (n, r) => {
|
|
1879
|
+
e((i) => ({
|
|
1854
1880
|
measurements: {
|
|
1855
|
-
...
|
|
1856
|
-
[
|
|
1857
|
-
...
|
|
1858
|
-
distance:
|
|
1881
|
+
...i.measurements,
|
|
1882
|
+
[n]: {
|
|
1883
|
+
...i.measurements[n],
|
|
1884
|
+
distance: r
|
|
1859
1885
|
}
|
|
1860
1886
|
}
|
|
1861
1887
|
}));
|
|
1862
1888
|
},
|
|
1863
|
-
setUnit: (
|
|
1864
|
-
e((
|
|
1889
|
+
setUnit: (n, r) => {
|
|
1890
|
+
e((i) => ({
|
|
1865
1891
|
measurements: {
|
|
1866
|
-
...
|
|
1867
|
-
[
|
|
1868
|
-
...
|
|
1869
|
-
unit:
|
|
1892
|
+
...i.measurements,
|
|
1893
|
+
[n]: {
|
|
1894
|
+
...i.measurements[n],
|
|
1895
|
+
unit: r
|
|
1870
1896
|
}
|
|
1871
1897
|
}
|
|
1872
1898
|
}));
|
|
1873
1899
|
},
|
|
1874
|
-
setLocale: (
|
|
1875
|
-
e((
|
|
1900
|
+
setLocale: (n, r) => {
|
|
1901
|
+
e((i) => ({
|
|
1876
1902
|
measurements: {
|
|
1877
|
-
...
|
|
1878
|
-
[
|
|
1879
|
-
...
|
|
1880
|
-
locale:
|
|
1903
|
+
...i.measurements,
|
|
1904
|
+
[n]: {
|
|
1905
|
+
...i.measurements[n],
|
|
1906
|
+
locale: r
|
|
1881
1907
|
}
|
|
1882
1908
|
}
|
|
1883
1909
|
}));
|
|
1884
1910
|
},
|
|
1885
|
-
setPositions: (
|
|
1886
|
-
e((
|
|
1911
|
+
setPositions: (n, r) => {
|
|
1912
|
+
e((i) => ({
|
|
1887
1913
|
measurements: {
|
|
1888
|
-
...
|
|
1889
|
-
[
|
|
1890
|
-
...
|
|
1891
|
-
positions: [...
|
|
1914
|
+
...i.measurements,
|
|
1915
|
+
[n]: {
|
|
1916
|
+
...i.measurements[n],
|
|
1917
|
+
positions: [...r]
|
|
1892
1918
|
}
|
|
1893
1919
|
}
|
|
1894
1920
|
}));
|
|
1895
1921
|
},
|
|
1896
|
-
|
|
1897
|
-
e((
|
|
1922
|
+
setEnabled: (n, r) => {
|
|
1923
|
+
e((i) => ({
|
|
1898
1924
|
measurements: {
|
|
1899
|
-
...
|
|
1900
|
-
[
|
|
1901
|
-
...
|
|
1902
|
-
enabled:
|
|
1925
|
+
...i.measurements,
|
|
1926
|
+
[n]: {
|
|
1927
|
+
...i.measurements[n],
|
|
1928
|
+
enabled: r
|
|
1903
1929
|
}
|
|
1904
1930
|
}
|
|
1905
1931
|
}));
|
|
1906
1932
|
}
|
|
1907
|
-
})),
|
|
1908
|
-
function
|
|
1909
|
-
const e =
|
|
1933
|
+
})), Tt = Ie({});
|
|
1934
|
+
function Cs(s) {
|
|
1935
|
+
const e = _(5), {
|
|
1910
1936
|
children: t,
|
|
1911
|
-
values:
|
|
1912
|
-
} =
|
|
1913
|
-
let
|
|
1914
|
-
e[0] !==
|
|
1915
|
-
const [
|
|
1937
|
+
values: n
|
|
1938
|
+
} = s;
|
|
1939
|
+
let r;
|
|
1940
|
+
e[0] !== n ? (r = Ts(n), e[0] = n, e[1] = r) : r = e[1];
|
|
1941
|
+
const [i] = Se(r);
|
|
1916
1942
|
let o;
|
|
1917
|
-
return e[2] !== t || e[3] !==
|
|
1943
|
+
return e[2] !== t || e[3] !== i ? (o = /* @__PURE__ */ V(Tt.Provider, { value: i, children: t }), e[2] = t, e[3] = i, e[4] = o) : o = e[4], o;
|
|
1918
1944
|
}
|
|
1919
|
-
function
|
|
1920
|
-
const e =
|
|
1921
|
-
if (!e)
|
|
1922
|
-
throw new Error("Missing
|
|
1923
|
-
return
|
|
1945
|
+
function A(s) {
|
|
1946
|
+
const e = Be(Tt);
|
|
1947
|
+
if (!Object.keys(e).length)
|
|
1948
|
+
throw new Error("Missing MeasurementToolsProvider in the tree");
|
|
1949
|
+
return He(e, s);
|
|
1924
1950
|
}
|
|
1925
|
-
function
|
|
1926
|
-
const e =
|
|
1951
|
+
function Ct(s) {
|
|
1952
|
+
const e = _(74), {
|
|
1927
1953
|
mapId: t
|
|
1928
|
-
} =
|
|
1929
|
-
let
|
|
1930
|
-
e[0] !== t ? (
|
|
1931
|
-
const
|
|
1932
|
-
let
|
|
1933
|
-
e[2] !== t ? (
|
|
1934
|
-
const o =
|
|
1954
|
+
} = s;
|
|
1955
|
+
let n;
|
|
1956
|
+
e[0] !== t ? (n = (P) => P.measurements[t].modes, e[0] = t, e[1] = n) : n = e[1];
|
|
1957
|
+
const r = A(n);
|
|
1958
|
+
let i;
|
|
1959
|
+
e[2] !== t ? (i = (P) => P.measurements[t].units, e[2] = t, e[3] = i) : i = e[3];
|
|
1960
|
+
const o = A(i);
|
|
1935
1961
|
let a;
|
|
1936
|
-
e[4] !== t ? (a = (
|
|
1937
|
-
const l =
|
|
1962
|
+
e[4] !== t ? (a = (P) => P.measurements[t].distance, e[4] = t, e[5] = a) : a = e[5];
|
|
1963
|
+
const l = A(a), f = A(Us);
|
|
1964
|
+
let c;
|
|
1965
|
+
e[6] !== f || e[7] !== t ? (c = (P) => f(t, P), e[6] = f, e[7] = t, e[8] = c) : c = e[8];
|
|
1966
|
+
const m = c;
|
|
1938
1967
|
let d;
|
|
1939
|
-
e[
|
|
1940
|
-
const
|
|
1968
|
+
e[9] !== t ? (d = (P) => P.measurements[t].clearLayerOnStart, e[9] = t, e[10] = d) : d = e[10];
|
|
1969
|
+
const u = A(d);
|
|
1941
1970
|
let y;
|
|
1942
|
-
e[
|
|
1943
|
-
const
|
|
1944
|
-
let
|
|
1945
|
-
e[
|
|
1946
|
-
const
|
|
1947
|
-
let S;
|
|
1948
|
-
e[13] !== f || e[14] !== t ? (S = (M) => f(t, M), e[13] = f, e[14] = t, e[15] = S) : S = e[15];
|
|
1949
|
-
const v = S;
|
|
1971
|
+
e[11] !== t ? (y = (P) => P.measurements[t].enabled, e[11] = t, e[12] = y) : y = e[12];
|
|
1972
|
+
const p = A(y), v = A(xs);
|
|
1973
|
+
let b;
|
|
1974
|
+
e[13] !== v || e[14] !== t ? (b = (P) => v(t, P), e[13] = v, e[14] = t, e[15] = b) : b = e[15];
|
|
1975
|
+
const S = b;
|
|
1950
1976
|
let E;
|
|
1951
|
-
e[16] !== t ? (E = (
|
|
1952
|
-
const
|
|
1953
|
-
let
|
|
1954
|
-
e[18] !==
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1977
|
+
e[16] !== t ? (E = (P) => P.measurements[t].modeSelected, e[16] = t, e[17] = E) : E = e[17];
|
|
1978
|
+
const h = A(E), L = A(Ds);
|
|
1979
|
+
let T;
|
|
1980
|
+
e[18] !== L || e[19] !== t || e[20] !== S ? (T = (P) => {
|
|
1981
|
+
S(!!P), L(t, P);
|
|
1982
|
+
}, e[18] = L, e[19] = t, e[20] = S, e[21] = T) : T = e[21];
|
|
1983
|
+
const C = T;
|
|
1984
|
+
let g;
|
|
1985
|
+
e[22] !== t ? (g = (P) => P.measurements[t].finished, e[22] = t, e[23] = g) : g = e[23];
|
|
1986
|
+
const M = A(g), w = A(Rs);
|
|
1987
|
+
let F;
|
|
1988
|
+
e[24] !== w || e[25] !== t ? (F = (P) => w(t, P), e[24] = w, e[25] = t, e[26] = F) : F = e[26];
|
|
1989
|
+
const R = F;
|
|
1990
|
+
let q;
|
|
1991
|
+
e[27] !== t ? (q = (P) => P.measurements[t].locale, e[27] = t, e[28] = q) : q = e[28];
|
|
1992
|
+
const X = A(q), N = A(As);
|
|
1962
1993
|
let U;
|
|
1963
|
-
e[
|
|
1964
|
-
const
|
|
1965
|
-
let
|
|
1966
|
-
e[
|
|
1967
|
-
const
|
|
1968
|
-
let
|
|
1969
|
-
e[
|
|
1970
|
-
const
|
|
1971
|
-
let B;
|
|
1972
|
-
e[33] !== Se || e[34] !== t ? (B = (M) => Se(t, M), e[33] = Se, e[34] = t, e[35] = B) : B = e[35];
|
|
1973
|
-
const he = B;
|
|
1974
|
-
let X;
|
|
1975
|
-
e[36] !== t ? (X = (M) => M.measurements[t].positions, e[36] = t, e[37] = X) : X = e[37];
|
|
1976
|
-
const ue = T(X), ne = T(fs);
|
|
1977
|
-
let se;
|
|
1978
|
-
e[38] !== ne || e[39] !== t ? (se = (M) => ne(t, M), e[38] = ne, e[39] = t, e[40] = se) : se = e[40];
|
|
1979
|
-
const H = se;
|
|
1980
|
-
let ie;
|
|
1981
|
-
e[41] !== t ? (ie = (M) => M.measurements[t].unit, e[41] = t, e[42] = ie) : ie = e[42];
|
|
1982
|
-
const re = T(ie), oe = T(ds);
|
|
1994
|
+
e[29] !== N || e[30] !== t ? (U = (P) => N(t, P), e[29] = N, e[30] = t, e[31] = U) : U = e[31];
|
|
1995
|
+
const $ = U;
|
|
1996
|
+
let ne;
|
|
1997
|
+
e[32] !== t ? (ne = (P) => P.measurements[t].modeInstance, e[32] = t, e[33] = ne) : ne = e[33];
|
|
1998
|
+
const I = A(ne), Me = A(Os);
|
|
1999
|
+
let H;
|
|
2000
|
+
e[34] !== Me || e[35] !== t ? (H = (P) => Me(t, P), e[34] = Me, e[35] = t, e[36] = H) : H = e[36];
|
|
2001
|
+
const ve = H;
|
|
1983
2002
|
let J;
|
|
1984
|
-
e[
|
|
1985
|
-
const
|
|
2003
|
+
e[37] !== t ? (J = (P) => P.measurements[t].positions, e[37] = t, e[38] = J) : J = e[38];
|
|
2004
|
+
const pe = A(J), se = A(Fs);
|
|
2005
|
+
let re;
|
|
2006
|
+
e[39] !== se || e[40] !== t ? (re = (P) => se(t, P), e[39] = se, e[40] = t, e[41] = re) : re = e[41];
|
|
2007
|
+
const W = re;
|
|
2008
|
+
let ie;
|
|
2009
|
+
e[42] !== t ? (ie = (P) => P.measurements[t].unit, e[42] = t, e[43] = ie) : ie = e[43];
|
|
2010
|
+
const oe = A(ie), ae = A(ks);
|
|
2011
|
+
let ee;
|
|
2012
|
+
e[44] !== ae || e[45] !== t ? (ee = (P) => ae(t, P), e[44] = ae, e[45] = t, e[46] = ee) : ee = e[46];
|
|
2013
|
+
const K = ee;
|
|
1986
2014
|
let j;
|
|
1987
|
-
e[
|
|
1988
|
-
|
|
1989
|
-
}, e[
|
|
1990
|
-
const
|
|
1991
|
-
let
|
|
1992
|
-
e[
|
|
1993
|
-
|
|
1994
|
-
}, e[
|
|
1995
|
-
const
|
|
1996
|
-
let
|
|
1997
|
-
return e[
|
|
1998
|
-
modes:
|
|
2015
|
+
e[47] !== I || e[48] !== W ? (j = () => {
|
|
2016
|
+
I == null || I.resetClickSequence(), W([]);
|
|
2017
|
+
}, e[47] = I, e[48] = W, e[49] = j) : j = e[49];
|
|
2018
|
+
const Z = j;
|
|
2019
|
+
let Q;
|
|
2020
|
+
e[50] !== S ? (Q = (P) => {
|
|
2021
|
+
S(P);
|
|
2022
|
+
}, e[50] = S, e[51] = Q) : Q = e[51];
|
|
2023
|
+
const le = Q;
|
|
2024
|
+
let me;
|
|
2025
|
+
return e[52] !== Z || e[53] !== u || e[54] !== l || e[55] !== p || e[56] !== M || e[57] !== X || e[58] !== I || e[59] !== h || e[60] !== r || e[61] !== pe || e[62] !== m || e[63] !== S || e[64] !== R || e[65] !== $ || e[66] !== ve || e[67] !== C || e[68] !== W || e[69] !== K || e[70] !== le || e[71] !== oe || e[72] !== o ? (me = {
|
|
2026
|
+
modes: r,
|
|
1999
2027
|
units: o,
|
|
2000
2028
|
distance: l,
|
|
2001
|
-
clearLayerOnStart:
|
|
2029
|
+
clearLayerOnStart: u,
|
|
2002
2030
|
modeSelected: h,
|
|
2003
|
-
enabled:
|
|
2004
|
-
finished:
|
|
2005
|
-
locale:
|
|
2006
|
-
modeInstance:
|
|
2007
|
-
positions:
|
|
2008
|
-
unit:
|
|
2009
|
-
setDistance:
|
|
2010
|
-
setModeSelected:
|
|
2011
|
-
setFinished:
|
|
2012
|
-
setLocale:
|
|
2013
|
-
setPositions:
|
|
2014
|
-
setUnit:
|
|
2015
|
-
|
|
2016
|
-
toggleLayer:
|
|
2017
|
-
clearLayer:
|
|
2018
|
-
setModeInstance:
|
|
2019
|
-
}, e[
|
|
2020
|
-
}
|
|
2021
|
-
function
|
|
2022
|
-
return
|
|
2023
|
-
}
|
|
2024
|
-
function
|
|
2025
|
-
return
|
|
2026
|
-
}
|
|
2027
|
-
function
|
|
2028
|
-
return
|
|
2029
|
-
}
|
|
2030
|
-
function
|
|
2031
|
-
return
|
|
2032
|
-
}
|
|
2033
|
-
function
|
|
2034
|
-
return
|
|
2035
|
-
}
|
|
2036
|
-
function
|
|
2037
|
-
return
|
|
2038
|
-
}
|
|
2039
|
-
function
|
|
2040
|
-
return
|
|
2041
|
-
}
|
|
2042
|
-
function
|
|
2043
|
-
return
|
|
2044
|
-
}
|
|
2045
|
-
function
|
|
2046
|
-
const e =
|
|
2031
|
+
enabled: p,
|
|
2032
|
+
finished: M,
|
|
2033
|
+
locale: X,
|
|
2034
|
+
modeInstance: I,
|
|
2035
|
+
positions: pe,
|
|
2036
|
+
unit: oe,
|
|
2037
|
+
setDistance: m,
|
|
2038
|
+
setModeSelected: C,
|
|
2039
|
+
setFinished: R,
|
|
2040
|
+
setLocale: $,
|
|
2041
|
+
setPositions: W,
|
|
2042
|
+
setUnit: K,
|
|
2043
|
+
setEnabled: S,
|
|
2044
|
+
toggleLayer: le,
|
|
2045
|
+
clearLayer: Z,
|
|
2046
|
+
setModeInstance: ve
|
|
2047
|
+
}, e[52] = Z, e[53] = u, e[54] = l, e[55] = p, e[56] = M, e[57] = X, e[58] = I, e[59] = h, e[60] = r, e[61] = pe, e[62] = m, e[63] = S, e[64] = R, e[65] = $, e[66] = ve, e[67] = C, e[68] = W, e[69] = K, e[70] = le, e[71] = oe, e[72] = o, e[73] = me) : me = e[73], me;
|
|
2048
|
+
}
|
|
2049
|
+
function ks(s) {
|
|
2050
|
+
return s.setUnit;
|
|
2051
|
+
}
|
|
2052
|
+
function Fs(s) {
|
|
2053
|
+
return s.setPositions;
|
|
2054
|
+
}
|
|
2055
|
+
function Os(s) {
|
|
2056
|
+
return s.setModeInstance;
|
|
2057
|
+
}
|
|
2058
|
+
function As(s) {
|
|
2059
|
+
return s.setLocale;
|
|
2060
|
+
}
|
|
2061
|
+
function Rs(s) {
|
|
2062
|
+
return s.setFinished;
|
|
2063
|
+
}
|
|
2064
|
+
function Ds(s) {
|
|
2065
|
+
return s.setModeSelected;
|
|
2066
|
+
}
|
|
2067
|
+
function xs(s) {
|
|
2068
|
+
return s.setEnabled;
|
|
2069
|
+
}
|
|
2070
|
+
function Us(s) {
|
|
2071
|
+
return s.setDistance;
|
|
2072
|
+
}
|
|
2073
|
+
function qs(s) {
|
|
2074
|
+
const e = _(42), {
|
|
2047
2075
|
mapId: t,
|
|
2048
|
-
textOptions:
|
|
2049
|
-
children:
|
|
2050
|
-
} =
|
|
2051
|
-
let
|
|
2052
|
-
e[0] !== t ? (
|
|
2076
|
+
textOptions: n,
|
|
2077
|
+
children: r
|
|
2078
|
+
} = s;
|
|
2079
|
+
let i;
|
|
2080
|
+
e[0] !== t ? (i = {
|
|
2053
2081
|
mapId: t
|
|
2054
|
-
}, e[0] = t, e[1] =
|
|
2082
|
+
}, e[0] = t, e[1] = i) : i = e[1];
|
|
2055
2083
|
const {
|
|
2056
2084
|
modes: o,
|
|
2057
2085
|
units: a,
|
|
2058
2086
|
distance: l,
|
|
2059
|
-
setDistance:
|
|
2060
|
-
clearLayerOnStart:
|
|
2061
|
-
modeSelected:
|
|
2062
|
-
setModeSelected:
|
|
2063
|
-
enabled:
|
|
2064
|
-
|
|
2065
|
-
finished:
|
|
2066
|
-
setFinished:
|
|
2067
|
-
locale:
|
|
2068
|
-
setLocale:
|
|
2087
|
+
setDistance: f,
|
|
2088
|
+
clearLayerOnStart: c,
|
|
2089
|
+
modeSelected: m,
|
|
2090
|
+
setModeSelected: d,
|
|
2091
|
+
enabled: u,
|
|
2092
|
+
setEnabled: y,
|
|
2093
|
+
finished: p,
|
|
2094
|
+
setFinished: v,
|
|
2095
|
+
locale: b,
|
|
2096
|
+
setLocale: S,
|
|
2069
2097
|
modeInstance: E,
|
|
2070
|
-
setModeInstance:
|
|
2071
|
-
positions:
|
|
2072
|
-
setPositions:
|
|
2073
|
-
unit:
|
|
2074
|
-
setUnit:
|
|
2075
|
-
clearLayer:
|
|
2076
|
-
toggleLayer:
|
|
2077
|
-
} =
|
|
2078
|
-
let
|
|
2079
|
-
e[2] !==
|
|
2080
|
-
if (
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2098
|
+
setModeInstance: h,
|
|
2099
|
+
positions: L,
|
|
2100
|
+
setPositions: T,
|
|
2101
|
+
unit: C,
|
|
2102
|
+
setUnit: g,
|
|
2103
|
+
clearLayer: M,
|
|
2104
|
+
toggleLayer: w
|
|
2105
|
+
} = Ct(i);
|
|
2106
|
+
let F;
|
|
2107
|
+
e[2] !== m || e[3] !== o || e[4] !== h || e[5] !== T ? (F = () => {
|
|
2108
|
+
if (m && o[m]) {
|
|
2109
|
+
const $ = o[m].mode;
|
|
2110
|
+
h(new $());
|
|
2083
2111
|
}
|
|
2084
2112
|
return () => {
|
|
2085
|
-
|
|
2113
|
+
T([]);
|
|
2086
2114
|
};
|
|
2087
|
-
},
|
|
2088
|
-
let U;
|
|
2089
|
-
e[9] !== F || e[10] !== w || e[11] !== d || e[12] !== h ? (U = (x) => {
|
|
2090
|
-
x && (d || !h) && w(), F(x);
|
|
2091
|
-
}, e[9] = F, e[10] = w, e[11] = d, e[12] = h, e[13] = U) : U = e[13];
|
|
2092
|
-
const Y = U, V = !!d;
|
|
2115
|
+
}, e[2] = m, e[3] = o, e[4] = h, e[5] = T, e[6] = F) : F = e[6];
|
|
2093
2116
|
let R;
|
|
2094
|
-
|
|
2117
|
+
e[7] !== m || e[8] !== o || e[9] !== y || e[10] !== h || e[11] !== T ? (R = [o, m, T, h, y], e[7] = m, e[8] = o, e[9] = y, e[10] = h, e[11] = T, e[12] = R) : R = e[12], Y(F, R);
|
|
2118
|
+
let q;
|
|
2119
|
+
e[13] !== w || e[14] !== M || e[15] !== c || e[16] !== p ? (q = ($) => {
|
|
2120
|
+
$ && (c || !p) && M(), w($);
|
|
2121
|
+
}, e[13] = w, e[14] = M, e[15] = c, e[16] = p, e[17] = q) : q = e[17];
|
|
2122
|
+
const X = q, N = !!c;
|
|
2123
|
+
let U;
|
|
2124
|
+
return e[18] !== r || e[19] !== M || e[20] !== l || e[21] !== u || e[22] !== p || e[23] !== b || e[24] !== t || e[25] !== E || e[26] !== m || e[27] !== o || e[28] !== L || e[29] !== f || e[30] !== y || e[31] !== v || e[32] !== S || e[33] !== d || e[34] !== T || e[35] !== g || e[36] !== N || e[37] !== n || e[38] !== X || e[39] !== C || e[40] !== a ? (U = r({
|
|
2095
2125
|
mapId: t,
|
|
2096
2126
|
distance: l,
|
|
2097
|
-
enabled:
|
|
2098
|
-
finished:
|
|
2099
|
-
locale:
|
|
2100
|
-
positions:
|
|
2101
|
-
unit:
|
|
2102
|
-
clearLayerOnStart:
|
|
2103
|
-
modeSelected:
|
|
2127
|
+
enabled: u,
|
|
2128
|
+
finished: p,
|
|
2129
|
+
locale: b,
|
|
2130
|
+
positions: L,
|
|
2131
|
+
unit: C,
|
|
2132
|
+
clearLayerOnStart: N,
|
|
2133
|
+
modeSelected: m,
|
|
2104
2134
|
modes: o,
|
|
2105
2135
|
units: a,
|
|
2106
|
-
value:
|
|
2136
|
+
value: Re({
|
|
2107
2137
|
meters: l,
|
|
2108
|
-
unit:
|
|
2109
|
-
locale:
|
|
2110
|
-
options:
|
|
2138
|
+
unit: C,
|
|
2139
|
+
locale: b,
|
|
2140
|
+
options: n
|
|
2111
2141
|
}),
|
|
2112
2142
|
modeInstance: E,
|
|
2113
|
-
setModeSelected:
|
|
2114
|
-
setDistance:
|
|
2115
|
-
setFinished:
|
|
2116
|
-
setLocale:
|
|
2117
|
-
setPositions:
|
|
2118
|
-
setUnit:
|
|
2119
|
-
|
|
2120
|
-
toggleLayer:
|
|
2121
|
-
clearLayer:
|
|
2122
|
-
}), e[
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
|
|
2143
|
+
setModeSelected: d,
|
|
2144
|
+
setDistance: f,
|
|
2145
|
+
setFinished: v,
|
|
2146
|
+
setLocale: S,
|
|
2147
|
+
setPositions: T,
|
|
2148
|
+
setUnit: g,
|
|
2149
|
+
setEnabled: y,
|
|
2150
|
+
toggleLayer: X,
|
|
2151
|
+
clearLayer: M
|
|
2152
|
+
}), e[18] = r, e[19] = M, e[20] = l, e[21] = u, e[22] = p, e[23] = b, e[24] = t, e[25] = E, e[26] = m, e[27] = o, e[28] = L, e[29] = f, e[30] = y, e[31] = v, e[32] = S, e[33] = d, e[34] = T, e[35] = g, e[36] = N, e[37] = n, e[38] = X, e[39] = C, e[40] = a, e[41] = U) : U = e[41], U;
|
|
2153
|
+
}
|
|
2154
|
+
const $s = [ge];
|
|
2155
|
+
function Vs({
|
|
2156
|
+
children: s,
|
|
2126
2157
|
mapId: e,
|
|
2127
2158
|
defaultProps: {
|
|
2128
|
-
styles: t =
|
|
2159
|
+
styles: t = it.styles
|
|
2129
2160
|
} = {
|
|
2130
|
-
styles:
|
|
2161
|
+
styles: it.styles
|
|
2131
2162
|
},
|
|
2132
|
-
layerProps:
|
|
2133
|
-
textOptions:
|
|
2163
|
+
layerProps: n = {},
|
|
2164
|
+
textOptions: r
|
|
2134
2165
|
}) {
|
|
2135
2166
|
const {
|
|
2136
|
-
setDistance:
|
|
2167
|
+
setDistance: i,
|
|
2137
2168
|
clearLayerOnStart: o,
|
|
2138
2169
|
enabled: a,
|
|
2139
2170
|
finished: l,
|
|
2140
|
-
setFinished:
|
|
2141
|
-
locale:
|
|
2142
|
-
setPositions:
|
|
2143
|
-
unit:
|
|
2144
|
-
modeInstance:
|
|
2145
|
-
} =
|
|
2171
|
+
setFinished: f,
|
|
2172
|
+
locale: c,
|
|
2173
|
+
setPositions: m,
|
|
2174
|
+
unit: d,
|
|
2175
|
+
modeInstance: u
|
|
2176
|
+
} = Ct({
|
|
2146
2177
|
mapId: e
|
|
2147
|
-
}),
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
})
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2178
|
+
}), y = we((E) => E.setLayer), p = k((E) => E.addLayers), v = k((E) => E.removeLayers), b = k(mt((E) => {
|
|
2179
|
+
var h;
|
|
2180
|
+
return (h = E.maps[e]) == null ? void 0 : h.layers.filter((L) => !$s.includes(L));
|
|
2181
|
+
}));
|
|
2182
|
+
Y(() => (a && p(e, [ge]), () => {
|
|
2183
|
+
v(e, [ge]);
|
|
2184
|
+
}), [p, o, e, v, a]), Y(() => {
|
|
2185
|
+
b == null || b.forEach((E) => {
|
|
2186
|
+
y(E, {
|
|
2187
|
+
props: {
|
|
2188
|
+
pickable: !a
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
});
|
|
2192
|
+
}, [a, b, y]);
|
|
2193
|
+
const S = x(({
|
|
2194
|
+
editType: E,
|
|
2195
|
+
editContext: h
|
|
2154
2196
|
}) => {
|
|
2155
|
-
if (
|
|
2156
|
-
|
|
2197
|
+
if (E === G.cancel) {
|
|
2198
|
+
u.resetClickSequence();
|
|
2157
2199
|
return;
|
|
2158
2200
|
}
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
}, [
|
|
2163
|
-
return
|
|
2164
|
-
const
|
|
2201
|
+
E === G.addPosition && i(h.distance), f(!!h.finished);
|
|
2202
|
+
const L = h.positions;
|
|
2203
|
+
L != null && L.length && m(L);
|
|
2204
|
+
}, [u, i, f, m]);
|
|
2205
|
+
return Y(() => {
|
|
2206
|
+
const E = l ? t.colors.finished : t.colors.editing, h = l ? t.colors.finished : t.colors.point, L = ws({
|
|
2165
2207
|
layerProps: {
|
|
2166
|
-
...
|
|
2167
|
-
pickable:
|
|
2208
|
+
...n,
|
|
2209
|
+
pickable: n.pickable ?? !l
|
|
2168
2210
|
},
|
|
2169
2211
|
enabled: a,
|
|
2170
|
-
guideColor:
|
|
2171
|
-
pointColor:
|
|
2172
|
-
locale:
|
|
2212
|
+
guideColor: E,
|
|
2213
|
+
pointColor: h,
|
|
2214
|
+
locale: c,
|
|
2173
2215
|
onEdit: S,
|
|
2174
|
-
unit:
|
|
2175
|
-
mode:
|
|
2176
|
-
textOptions:
|
|
2216
|
+
unit: d,
|
|
2217
|
+
mode: u,
|
|
2218
|
+
textOptions: r
|
|
2177
2219
|
});
|
|
2178
|
-
|
|
2179
|
-
}, [l,
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
function
|
|
2183
|
-
const e =
|
|
2184
|
-
|
|
2185
|
-
} =
|
|
2186
|
-
let
|
|
2187
|
-
e[0] !== t ? (
|
|
2220
|
+
y(ge, L);
|
|
2221
|
+
}, [l, u, n, c, S, y, t.colors.editing, t.colors.finished, t.colors.point, r, d, a]), s;
|
|
2222
|
+
}
|
|
2223
|
+
Vs.Controls = qs;
|
|
2224
|
+
function Ns(s) {
|
|
2225
|
+
const e = _(7), {
|
|
2226
|
+
mapId: t
|
|
2227
|
+
} = s;
|
|
2228
|
+
let n;
|
|
2229
|
+
e[0] !== t ? (n = (f) => f.maps[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2188
2230
|
const {
|
|
2189
|
-
layers:
|
|
2190
|
-
} = k(
|
|
2231
|
+
layers: r
|
|
2232
|
+
} = k(n), i = we(Bs);
|
|
2191
2233
|
let o, a;
|
|
2192
|
-
if (e[2] !==
|
|
2193
|
-
let
|
|
2194
|
-
e[5] !==
|
|
2234
|
+
if (e[2] !== i || e[3] !== r) {
|
|
2235
|
+
let f;
|
|
2236
|
+
e[5] !== i ? (f = (c) => i[c], e[5] = i, e[6] = f) : f = e[6], a = r.map(f).filter(Is), e[2] = i, e[3] = r, e[4] = a;
|
|
2195
2237
|
} else
|
|
2196
2238
|
a = e[4];
|
|
2197
2239
|
return o = a, o;
|
|
2198
2240
|
}
|
|
2199
|
-
function
|
|
2200
|
-
return !!
|
|
2241
|
+
function Is(s) {
|
|
2242
|
+
return !!s;
|
|
2243
|
+
}
|
|
2244
|
+
function Bs(s) {
|
|
2245
|
+
return s.layers;
|
|
2201
2246
|
}
|
|
2202
|
-
|
|
2203
|
-
|
|
2247
|
+
const lt = [Ae, be, ge];
|
|
2248
|
+
function kt(s) {
|
|
2249
|
+
const e = s.filter((n) => !lt.includes(n.props.id)).sort((n, r) => (n.order ?? 1 / 0) - (r.order ?? 1 / 0)), t = lt.map((n) => s.find((r) => r.props.id === n)).filter((n) => !!n);
|
|
2250
|
+
return [...e, ...t];
|
|
2204
2251
|
}
|
|
2205
|
-
|
|
2206
|
-
|
|
2252
|
+
const Gs = 200;
|
|
2253
|
+
function xr({
|
|
2254
|
+
id: s,
|
|
2207
2255
|
onLoad: e,
|
|
2208
2256
|
onViewStateChange: t,
|
|
2209
|
-
...
|
|
2257
|
+
...n
|
|
2210
2258
|
}) {
|
|
2211
2259
|
const {
|
|
2212
|
-
basemap:
|
|
2213
|
-
instanceRef:
|
|
2260
|
+
basemap: r,
|
|
2261
|
+
instanceRef: i,
|
|
2214
2262
|
overlayRef: o
|
|
2215
|
-
} = k((
|
|
2216
|
-
|
|
2217
|
-
}), y =
|
|
2218
|
-
const
|
|
2219
|
-
if (
|
|
2220
|
-
|
|
2263
|
+
} = k((h) => h.maps[s]), a = ut(null), l = k((h) => h.viewStates[s]), f = k((h) => h.setViewState), c = k((h) => h.setLoad), m = k((h) => h.setLayersLoad), d = k((h) => h.updateViewPort), u = Ns({
|
|
2264
|
+
mapId: s
|
|
2265
|
+
}), y = ue(() => kt(u), [u]), p = x((h) => {
|
|
2266
|
+
const L = f;
|
|
2267
|
+
if (h.interactionState.isZooming && (a.current && clearInterval(a.current), a.current = setTimeout(() => {
|
|
2268
|
+
d(s);
|
|
2269
|
+
}, Gs)), t) {
|
|
2270
|
+
t(h, L);
|
|
2221
2271
|
return;
|
|
2222
2272
|
}
|
|
2223
|
-
|
|
2224
|
-
}, [
|
|
2225
|
-
|
|
2226
|
-
}, [
|
|
2227
|
-
var
|
|
2228
|
-
const
|
|
2229
|
-
|
|
2230
|
-
}, [
|
|
2231
|
-
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2273
|
+
L(s, h.viewState);
|
|
2274
|
+
}, [s, t, f, d]), v = x((h) => {
|
|
2275
|
+
c(s, h), e == null || e(h), d(s);
|
|
2276
|
+
}, [s, e, c, d]), b = x((h) => {
|
|
2277
|
+
var C, g, M;
|
|
2278
|
+
const L = (g = (C = i == null ? void 0 : i.current) == null ? void 0 : C.deck) == null ? void 0 : g.props.layers, T = !!(L != null && L.every((w) => w == null ? void 0 : w.isLoaded));
|
|
2279
|
+
m(s, T), (M = n.onAfterRender) == null || M.call(n, h);
|
|
2280
|
+
}, [s, i, n, m]), S = n.onDragEnd, E = x((...h) => {
|
|
2281
|
+
d(s), S && S(...h);
|
|
2282
|
+
}, [s, d, S]);
|
|
2283
|
+
return /* @__PURE__ */ V(vn, { ...n, layers: y, instanceRef: i, overlayRef: o, basemap: r, initialViewState: l, onLoad: v, onViewStateChange: p, onAfterRender: b, onDragEnd: E });
|
|
2284
|
+
}
|
|
2285
|
+
const Hs = "https://gcp-us-east1.api.carto.com", Ws = "ps", js = pt((s) => ({
|
|
2234
2286
|
sources: {},
|
|
2235
|
-
setSource: (e, t) =>
|
|
2236
|
-
const
|
|
2237
|
-
...
|
|
2287
|
+
setSource: (e, t) => s((n) => {
|
|
2288
|
+
const r = {
|
|
2289
|
+
...n.sources
|
|
2238
2290
|
};
|
|
2239
2291
|
if (!t)
|
|
2240
|
-
return delete
|
|
2241
|
-
sources:
|
|
2292
|
+
return delete r[e], {
|
|
2293
|
+
sources: r
|
|
2242
2294
|
};
|
|
2243
|
-
const {
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
}, {
|
|
2255
|
-
sources: i
|
|
2295
|
+
const i = {
|
|
2296
|
+
...r[e] ?? {
|
|
2297
|
+
apiBaseUrl: Hs,
|
|
2298
|
+
clientId: Ws
|
|
2299
|
+
},
|
|
2300
|
+
...t
|
|
2301
|
+
}, o = Ks({
|
|
2302
|
+
source: i
|
|
2303
|
+
});
|
|
2304
|
+
return i.widgets = o, r[e] = i, {
|
|
2305
|
+
sources: r
|
|
2256
2306
|
};
|
|
2257
2307
|
})
|
|
2258
2308
|
}));
|
|
2259
|
-
function
|
|
2260
|
-
|
|
2309
|
+
function Qs(s) {
|
|
2310
|
+
const e = _(2);
|
|
2311
|
+
let t;
|
|
2312
|
+
return e[0] !== s ? (t = (n) => n.sources[s], e[0] = s, e[1] = t) : t = e[1], js(t);
|
|
2313
|
+
}
|
|
2314
|
+
function Ks({
|
|
2315
|
+
source: s
|
|
2261
2316
|
}) {
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2317
|
+
const e = {
|
|
2318
|
+
query: () => {
|
|
2319
|
+
const r = s;
|
|
2320
|
+
return new un({
|
|
2321
|
+
...r,
|
|
2322
|
+
accessToken: "",
|
|
2323
|
+
sqlQuery: r.data,
|
|
2324
|
+
spatialDataType: r.spatialDataType ?? "geo"
|
|
2325
|
+
});
|
|
2326
|
+
},
|
|
2327
|
+
table: () => {
|
|
2328
|
+
const r = s;
|
|
2329
|
+
return new dn({
|
|
2330
|
+
...r,
|
|
2331
|
+
accessToken: "",
|
|
2332
|
+
tableName: r.data,
|
|
2333
|
+
spatialDataType: r.spatialDataType ?? "geo"
|
|
2334
|
+
});
|
|
2335
|
+
},
|
|
2336
|
+
tileset: () => {
|
|
2337
|
+
const r = s;
|
|
2338
|
+
return new fn({
|
|
2339
|
+
...r,
|
|
2340
|
+
accessToken: "",
|
|
2341
|
+
tableName: r.data,
|
|
2342
|
+
tileFormat: r.tileFormat ?? pn.BINARY,
|
|
2343
|
+
spatialDataType: r.spatialDataType ?? "geo"
|
|
2344
|
+
});
|
|
2345
|
+
},
|
|
2346
|
+
raster: () => {
|
|
2347
|
+
const r = s;
|
|
2348
|
+
return r.rasterMetadata ? new mn({
|
|
2349
|
+
...r,
|
|
2350
|
+
accessToken: "",
|
|
2351
|
+
tableName: r.data,
|
|
2352
|
+
spatialDataType: "quadbin",
|
|
2353
|
+
rasterMetadata: r.rasterMetadata
|
|
2354
|
+
}) : null;
|
|
2355
|
+
}
|
|
2356
|
+
}, t = s.type.split("+")[0], n = e[t];
|
|
2357
|
+
return n == null ? void 0 : n();
|
|
2358
|
+
}
|
|
2359
|
+
function fe(s, e) {
|
|
2360
|
+
const t = Qs(e);
|
|
2361
|
+
return ue(() => {
|
|
2362
|
+
const n = t == null ? void 0 : t.widgets;
|
|
2363
|
+
return !n || !s ? null : (n.props.accessToken = s, n);
|
|
2364
|
+
}, [s, t]);
|
|
2365
|
+
}
|
|
2366
|
+
function Zs(s) {
|
|
2367
|
+
const e = _(18), {
|
|
2368
|
+
accessToken: t,
|
|
2369
|
+
sourceId: n,
|
|
2370
|
+
widgetProps: r,
|
|
2371
|
+
useQueryProps: i
|
|
2372
|
+
} = s;
|
|
2373
|
+
let o;
|
|
2374
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2375
|
+
let a, l;
|
|
2376
|
+
e[2] !== o ? ({
|
|
2377
|
+
enabled: a,
|
|
2378
|
+
...l
|
|
2379
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2380
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2381
|
+
let d;
|
|
2382
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["categories", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2383
|
+
let u;
|
|
2384
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getCategories(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2385
|
+
const y = !!c && f;
|
|
2386
|
+
let p;
|
|
2387
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2388
|
+
queryKey: d,
|
|
2389
|
+
queryFn: u,
|
|
2390
|
+
enabled: y,
|
|
2391
|
+
...l
|
|
2392
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2393
|
+
}
|
|
2394
|
+
function Ur(s) {
|
|
2395
|
+
const e = _(6);
|
|
2396
|
+
let t, n;
|
|
2397
|
+
e[0] !== s ? ({
|
|
2398
|
+
children: t,
|
|
2399
|
+
...n
|
|
2400
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2401
|
+
const r = Zs(n);
|
|
2402
|
+
let i;
|
|
2403
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2404
|
+
}
|
|
2405
|
+
function zs(s) {
|
|
2406
|
+
const e = _(18), {
|
|
2407
|
+
accessToken: t,
|
|
2408
|
+
sourceId: n,
|
|
2409
|
+
widgetProps: r,
|
|
2410
|
+
useQueryProps: i
|
|
2411
|
+
} = s;
|
|
2412
|
+
let o;
|
|
2413
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2414
|
+
let a, l;
|
|
2415
|
+
e[2] !== o ? ({
|
|
2416
|
+
enabled: a,
|
|
2417
|
+
...l
|
|
2418
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2419
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2420
|
+
let d;
|
|
2421
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["features", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2422
|
+
let u;
|
|
2423
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getFeatures(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2424
|
+
const y = !!c && f;
|
|
2425
|
+
let p;
|
|
2426
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2427
|
+
queryKey: d,
|
|
2428
|
+
queryFn: u,
|
|
2429
|
+
enabled: y,
|
|
2430
|
+
...l
|
|
2431
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2432
|
+
}
|
|
2433
|
+
function qr(s) {
|
|
2434
|
+
const e = _(6);
|
|
2435
|
+
let t, n;
|
|
2436
|
+
e[0] !== s ? ({
|
|
2437
|
+
children: t,
|
|
2438
|
+
...n
|
|
2439
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2440
|
+
const r = zs(n);
|
|
2441
|
+
let i;
|
|
2442
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2443
|
+
}
|
|
2444
|
+
function Ys(s) {
|
|
2445
|
+
const e = _(18), {
|
|
2446
|
+
accessToken: t,
|
|
2447
|
+
sourceId: n,
|
|
2448
|
+
widgetProps: r,
|
|
2449
|
+
useQueryProps: i
|
|
2450
|
+
} = s;
|
|
2451
|
+
let o;
|
|
2452
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2453
|
+
let a, l;
|
|
2454
|
+
e[2] !== o ? ({
|
|
2455
|
+
enabled: a,
|
|
2456
|
+
...l
|
|
2457
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2458
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2459
|
+
let d;
|
|
2460
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["formula", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2461
|
+
let u;
|
|
2462
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getFormula(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2463
|
+
const y = !!c && f;
|
|
2464
|
+
let p;
|
|
2465
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2466
|
+
queryKey: d,
|
|
2467
|
+
queryFn: u,
|
|
2468
|
+
enabled: y,
|
|
2469
|
+
...l
|
|
2470
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2471
|
+
}
|
|
2472
|
+
function $r(s) {
|
|
2473
|
+
const e = _(6);
|
|
2474
|
+
let t, n;
|
|
2475
|
+
e[0] !== s ? ({
|
|
2476
|
+
children: t,
|
|
2477
|
+
...n
|
|
2478
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2479
|
+
const r = Ys(n);
|
|
2480
|
+
let i;
|
|
2481
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2482
|
+
}
|
|
2483
|
+
function Xs(s) {
|
|
2484
|
+
const e = _(18), {
|
|
2485
|
+
accessToken: t,
|
|
2486
|
+
sourceId: n,
|
|
2487
|
+
widgetProps: r,
|
|
2488
|
+
useQueryProps: i
|
|
2489
|
+
} = s;
|
|
2490
|
+
let o;
|
|
2491
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2492
|
+
let a, l;
|
|
2493
|
+
e[2] !== o ? ({
|
|
2494
|
+
enabled: a,
|
|
2495
|
+
...l
|
|
2496
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2497
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2498
|
+
let d;
|
|
2499
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["histogram", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2500
|
+
let u;
|
|
2501
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getHistogram(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2502
|
+
const y = !!c && f;
|
|
2503
|
+
let p;
|
|
2504
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2505
|
+
queryKey: d,
|
|
2506
|
+
queryFn: u,
|
|
2507
|
+
enabled: y,
|
|
2508
|
+
...l
|
|
2509
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2510
|
+
}
|
|
2511
|
+
function Vr(s) {
|
|
2512
|
+
const e = _(6);
|
|
2513
|
+
let t, n;
|
|
2514
|
+
e[0] !== s ? ({
|
|
2515
|
+
children: t,
|
|
2516
|
+
...n
|
|
2517
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2518
|
+
const r = Xs(n);
|
|
2519
|
+
let i;
|
|
2520
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2521
|
+
}
|
|
2522
|
+
function Js(s) {
|
|
2523
|
+
const e = _(18), {
|
|
2524
|
+
accessToken: t,
|
|
2525
|
+
sourceId: n,
|
|
2526
|
+
widgetProps: r,
|
|
2527
|
+
useQueryProps: i
|
|
2528
|
+
} = s;
|
|
2529
|
+
let o;
|
|
2530
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2531
|
+
let a, l;
|
|
2532
|
+
e[2] !== o ? ({
|
|
2533
|
+
enabled: a,
|
|
2534
|
+
...l
|
|
2535
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2536
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2537
|
+
let d;
|
|
2538
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["range", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2539
|
+
let u;
|
|
2540
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getRange(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2541
|
+
const y = !!c && f;
|
|
2542
|
+
let p;
|
|
2543
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2544
|
+
queryKey: d,
|
|
2545
|
+
queryFn: u,
|
|
2546
|
+
enabled: y,
|
|
2547
|
+
...l
|
|
2548
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2549
|
+
}
|
|
2550
|
+
function Nr(s) {
|
|
2551
|
+
const e = _(6);
|
|
2552
|
+
let t, n;
|
|
2553
|
+
e[0] !== s ? ({
|
|
2554
|
+
children: t,
|
|
2555
|
+
...n
|
|
2556
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2557
|
+
const r = Js(n);
|
|
2558
|
+
let i;
|
|
2559
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2560
|
+
}
|
|
2561
|
+
function er(s) {
|
|
2562
|
+
const e = _(18), {
|
|
2563
|
+
accessToken: t,
|
|
2564
|
+
sourceId: n,
|
|
2565
|
+
widgetProps: r,
|
|
2566
|
+
useQueryProps: i
|
|
2567
|
+
} = s;
|
|
2568
|
+
let o;
|
|
2569
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2570
|
+
let a, l;
|
|
2571
|
+
e[2] !== o ? ({
|
|
2572
|
+
enabled: a,
|
|
2573
|
+
...l
|
|
2574
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2575
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2576
|
+
let d;
|
|
2577
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["scatter", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2578
|
+
let u;
|
|
2579
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getScatter(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2580
|
+
const y = !!c && f;
|
|
2581
|
+
let p;
|
|
2582
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2583
|
+
queryKey: d,
|
|
2584
|
+
queryFn: u,
|
|
2585
|
+
enabled: y,
|
|
2586
|
+
...l
|
|
2587
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2588
|
+
}
|
|
2589
|
+
function Ir(s) {
|
|
2590
|
+
const e = _(6);
|
|
2591
|
+
let t, n;
|
|
2592
|
+
e[0] !== s ? ({
|
|
2593
|
+
children: t,
|
|
2594
|
+
...n
|
|
2595
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2596
|
+
const r = er(n);
|
|
2597
|
+
let i;
|
|
2598
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2599
|
+
}
|
|
2600
|
+
function tr(s) {
|
|
2601
|
+
const e = _(18), {
|
|
2602
|
+
accessToken: t,
|
|
2603
|
+
sourceId: n,
|
|
2604
|
+
widgetProps: r,
|
|
2605
|
+
useQueryProps: i
|
|
2606
|
+
} = s;
|
|
2607
|
+
let o;
|
|
2608
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2609
|
+
let a, l;
|
|
2610
|
+
e[2] !== o ? ({
|
|
2611
|
+
enabled: a,
|
|
2612
|
+
...l
|
|
2613
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2614
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2615
|
+
let d;
|
|
2616
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["table", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2617
|
+
let u;
|
|
2618
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getTable(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2619
|
+
const y = !!c && f;
|
|
2620
|
+
let p;
|
|
2621
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2622
|
+
queryKey: d,
|
|
2623
|
+
queryFn: u,
|
|
2624
|
+
enabled: y,
|
|
2625
|
+
...l
|
|
2626
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2627
|
+
}
|
|
2628
|
+
function Br(s) {
|
|
2629
|
+
const e = _(6);
|
|
2630
|
+
let t, n;
|
|
2631
|
+
e[0] !== s ? ({
|
|
2632
|
+
children: t,
|
|
2633
|
+
...n
|
|
2634
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2635
|
+
const r = tr(n);
|
|
2636
|
+
let i;
|
|
2637
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2638
|
+
}
|
|
2639
|
+
function nr(s) {
|
|
2640
|
+
const e = _(18), {
|
|
2641
|
+
accessToken: t,
|
|
2642
|
+
sourceId: n,
|
|
2643
|
+
widgetProps: r,
|
|
2644
|
+
useQueryProps: i
|
|
2645
|
+
} = s;
|
|
2646
|
+
let o;
|
|
2647
|
+
e[0] !== i ? (o = i === void 0 ? {} : i, e[0] = i, e[1] = o) : o = e[1];
|
|
2648
|
+
let a, l;
|
|
2649
|
+
e[2] !== o ? ({
|
|
2650
|
+
enabled: a,
|
|
2651
|
+
...l
|
|
2652
|
+
} = o, e[2] = o, e[3] = a, e[4] = l) : (a = e[3], l = e[4]);
|
|
2653
|
+
const f = a === void 0 ? !0 : a, c = fe(t, n), m = c == null ? void 0 : c.props.filters;
|
|
2654
|
+
let d;
|
|
2655
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== r ? (d = ["time-series", n, t, r, m], e[5] = t, e[6] = n, e[7] = m, e[8] = r, e[9] = d) : d = e[9];
|
|
2656
|
+
let u;
|
|
2657
|
+
e[10] !== c || e[11] !== r ? (u = () => c == null ? void 0 : c.getTimeSeries(r), e[10] = c, e[11] = r, e[12] = u) : u = e[12];
|
|
2658
|
+
const y = !!c && f;
|
|
2659
|
+
let p;
|
|
2660
|
+
return e[13] !== d || e[14] !== u || e[15] !== y || e[16] !== l ? (p = {
|
|
2661
|
+
queryKey: d,
|
|
2662
|
+
queryFn: u,
|
|
2663
|
+
enabled: y,
|
|
2664
|
+
...l
|
|
2665
|
+
}, e[13] = d, e[14] = u, e[15] = y, e[16] = l, e[17] = p) : p = e[17], de(p);
|
|
2666
|
+
}
|
|
2667
|
+
function Gr(s) {
|
|
2668
|
+
const e = _(6);
|
|
2669
|
+
let t, n;
|
|
2670
|
+
e[0] !== s ? ({
|
|
2671
|
+
children: t,
|
|
2672
|
+
...n
|
|
2673
|
+
} = s, e[0] = s, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
2674
|
+
const r = nr(n);
|
|
2675
|
+
let i;
|
|
2676
|
+
return e[3] !== t || e[4] !== r ? (i = t(r), e[3] = t, e[4] = r, e[5] = i) : i = e[5], i;
|
|
2677
|
+
}
|
|
2678
|
+
function Hr(s) {
|
|
2679
|
+
const e = _(13), {
|
|
2680
|
+
children: t,
|
|
2681
|
+
maps: n,
|
|
2682
|
+
lassoTools: r,
|
|
2683
|
+
measureTools: i
|
|
2684
|
+
} = s;
|
|
2685
|
+
let o;
|
|
2686
|
+
e[0] !== r ? (o = r === void 0 ? [] : r, e[0] = r, e[1] = o) : o = e[1];
|
|
2687
|
+
const a = o;
|
|
2688
|
+
let l;
|
|
2689
|
+
e[2] !== i ? (l = i === void 0 ? [] : i, e[2] = i, e[3] = l) : l = e[3];
|
|
2690
|
+
const f = l;
|
|
2691
|
+
let c;
|
|
2692
|
+
e[4] !== t || e[5] !== f ? (c = /* @__PURE__ */ V(Cs, { values: f, children: t }), e[4] = t, e[5] = f, e[6] = c) : c = e[6];
|
|
2693
|
+
let m;
|
|
2694
|
+
e[7] !== a || e[8] !== c ? (m = /* @__PURE__ */ V(Xn, { values: a, children: c }), e[7] = a, e[8] = c, e[9] = m) : m = e[9];
|
|
2695
|
+
let d;
|
|
2696
|
+
return e[10] !== n || e[11] !== m ? (d = /* @__PURE__ */ V(Rn, { values: n, children: m }), e[10] = n, e[11] = m, e[12] = d) : d = e[12], d;
|
|
2697
|
+
}
|
|
2698
|
+
function Wr(s, e) {
|
|
2699
|
+
const t = we((f) => f.layers), n = we((f) => f.setLayer), r = ue(() => kt(s.map((f) => t[f]).filter((f) => !!f)), [t, s]), i = ue(() => r.map(e), [e, r]), o = x(({
|
|
2700
|
+
id: f,
|
|
2701
|
+
visible: c,
|
|
2702
|
+
...m
|
|
2703
|
+
}) => {
|
|
2704
|
+
n(f, {
|
|
2705
|
+
props: {
|
|
2706
|
+
visible: c
|
|
2707
|
+
},
|
|
2708
|
+
legend: m
|
|
2709
|
+
});
|
|
2710
|
+
}, [n]), a = x(({
|
|
2711
|
+
id: f,
|
|
2712
|
+
collapsed: c
|
|
2713
|
+
}) => {
|
|
2714
|
+
n(f, {
|
|
2715
|
+
legend: {
|
|
2716
|
+
collapsed: c
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
}, [n]), l = x(({
|
|
2720
|
+
id: f,
|
|
2721
|
+
opacity: c
|
|
2722
|
+
}) => {
|
|
2723
|
+
n(f, {
|
|
2724
|
+
props: {
|
|
2725
|
+
opacity: c
|
|
2726
|
+
}
|
|
2727
|
+
});
|
|
2728
|
+
}, [n]);
|
|
2729
|
+
return {
|
|
2730
|
+
legend: i,
|
|
2731
|
+
onChangeVisibility: o,
|
|
2732
|
+
onChangeOpacity: l,
|
|
2733
|
+
onChangRowCollapsed: a
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2736
|
+
function jr({
|
|
2737
|
+
mapId: s
|
|
2738
|
+
}) {
|
|
2739
|
+
const [e, t] = Se(void 0), [n, r] = Se(!1), i = k((p) => {
|
|
2740
|
+
var v;
|
|
2741
|
+
return (v = p.maps[s]) == null ? void 0 : v.basemap;
|
|
2742
|
+
}), o = k((p) => p.getDeckInstance), a = k((p) => p.getOverlayInstance), l = k((p) => {
|
|
2743
|
+
var v;
|
|
2744
|
+
return (v = p.maps[s]) == null ? void 0 : v.areLayersLoaded;
|
|
2745
|
+
}), c = k((p) => {
|
|
2746
|
+
var v;
|
|
2747
|
+
return (v = p.maps[s]) == null ? void 0 : v.isLoaded;
|
|
2271
2748
|
}) && l, {
|
|
2272
|
-
type:
|
|
2273
|
-
} =
|
|
2749
|
+
type: m
|
|
2750
|
+
} = gt[i], d = m === ce.googleMaps, u = x(async () => {
|
|
2751
|
+
const p = o(s), v = a(s);
|
|
2274
2752
|
try {
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2277
|
-
const
|
|
2278
|
-
if (
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2753
|
+
const b = document.createElement("canvas");
|
|
2754
|
+
b.width = p.width ?? 0, b.height = p.height ?? 0;
|
|
2755
|
+
const S = b.getContext("2d");
|
|
2756
|
+
if (d) {
|
|
2757
|
+
const h = v;
|
|
2758
|
+
if (h.getRenderingType() !== "RASTER")
|
|
2281
2759
|
throw new Error("Only raster type is supported for Google Maps");
|
|
2282
|
-
const
|
|
2760
|
+
const L = await hn(h.getDiv(), {
|
|
2283
2761
|
useCORS: !0
|
|
2284
2762
|
});
|
|
2285
|
-
|
|
2763
|
+
S == null || S.drawImage(L, 0, 0, p.width, p.height);
|
|
2286
2764
|
} else {
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2765
|
+
const h = v;
|
|
2766
|
+
h.redraw(), S == null || S.drawImage(h.getMap().getCanvas(), 0, 0, p.width, p.height);
|
|
2289
2767
|
}
|
|
2290
|
-
|
|
2291
|
-
const
|
|
2292
|
-
t(
|
|
2293
|
-
} catch (
|
|
2294
|
-
console.error(
|
|
2768
|
+
p == null || p.redraw("screenshot"), S == null || S.drawImage(p.getCanvas(), 0, 0, p.width, p.height);
|
|
2769
|
+
const E = b.toDataURL();
|
|
2770
|
+
t(E);
|
|
2771
|
+
} catch (b) {
|
|
2772
|
+
console.error(b);
|
|
2295
2773
|
} finally {
|
|
2296
|
-
|
|
2774
|
+
r(!1);
|
|
2297
2775
|
}
|
|
2298
|
-
}, [o,
|
|
2776
|
+
}, [o, d, s, a]);
|
|
2299
2777
|
return {
|
|
2300
|
-
takeScreenshot:
|
|
2301
|
-
|
|
2302
|
-
}, [
|
|
2303
|
-
isLoading:
|
|
2778
|
+
takeScreenshot: x(() => {
|
|
2779
|
+
r(!0), c && u();
|
|
2780
|
+
}, [u, c]),
|
|
2781
|
+
isLoading: n,
|
|
2304
2782
|
screenshot: e
|
|
2305
2783
|
};
|
|
2306
2784
|
}
|
|
2307
|
-
|
|
2785
|
+
function Qr(s) {
|
|
2786
|
+
const e = _(8), {
|
|
2787
|
+
mapId: t
|
|
2788
|
+
} = s;
|
|
2789
|
+
let n;
|
|
2790
|
+
e[0] !== t ? (n = {
|
|
2791
|
+
mapId: t
|
|
2792
|
+
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2793
|
+
const r = sr(n);
|
|
2794
|
+
let i;
|
|
2795
|
+
e[2] !== t ? (i = {
|
|
2796
|
+
mapId: t
|
|
2797
|
+
}, e[2] = t, e[3] = i) : i = e[3];
|
|
2798
|
+
const o = rr(i), a = o ?? r;
|
|
2799
|
+
let l;
|
|
2800
|
+
return e[4] !== o || e[5] !== a || e[6] !== r ? (l = {
|
|
2801
|
+
spatialFilter: a,
|
|
2802
|
+
lassoToolsSpatialFilter: o,
|
|
2803
|
+
viewportSpatialFilter: r
|
|
2804
|
+
}, e[4] = o, e[5] = a, e[6] = r, e[7] = l) : l = e[7], l;
|
|
2805
|
+
}
|
|
2806
|
+
function sr(s) {
|
|
2807
|
+
const e = _(4), {
|
|
2808
|
+
mapId: t
|
|
2809
|
+
} = s;
|
|
2810
|
+
let n;
|
|
2811
|
+
e[0] !== t ? (n = (o) => o.viewports[t], e[0] = t, e[1] = n) : n = e[1];
|
|
2812
|
+
const r = k(n);
|
|
2813
|
+
let i;
|
|
2814
|
+
e: {
|
|
2815
|
+
if (!r) {
|
|
2816
|
+
i = void 0;
|
|
2817
|
+
break e;
|
|
2818
|
+
}
|
|
2819
|
+
let o;
|
|
2820
|
+
e[2] !== r ? (o = yn(r.getBounds()), e[2] = r, e[3] = o) : o = e[3], i = o;
|
|
2821
|
+
}
|
|
2822
|
+
return i;
|
|
2823
|
+
}
|
|
2824
|
+
function rr(s) {
|
|
2825
|
+
const e = _(5), {
|
|
2826
|
+
mapId: t
|
|
2827
|
+
} = s;
|
|
2828
|
+
let n;
|
|
2829
|
+
e[0] !== t ? (n = (o) => {
|
|
2830
|
+
var a;
|
|
2831
|
+
return (a = o.data[t]) == null ? void 0 : a.values;
|
|
2832
|
+
}, e[0] = t, e[1] = n) : n = e[1];
|
|
2833
|
+
const r = D(n);
|
|
2834
|
+
let i;
|
|
2835
|
+
e: {
|
|
2836
|
+
let o;
|
|
2837
|
+
if (e[2] !== r) {
|
|
2838
|
+
const a = Et({
|
|
2839
|
+
values: r
|
|
2840
|
+
}).filter(or);
|
|
2841
|
+
if (!(a != null && a.length)) {
|
|
2842
|
+
i = void 0;
|
|
2843
|
+
break e;
|
|
2844
|
+
}
|
|
2845
|
+
o = on(a.map(ir)), e[2] = r, e[3] = o, e[4] = i;
|
|
2846
|
+
} else
|
|
2847
|
+
o = e[3], i = e[4];
|
|
2848
|
+
i = o.geometry;
|
|
2849
|
+
}
|
|
2850
|
+
return i;
|
|
2851
|
+
}
|
|
2852
|
+
function ir(s) {
|
|
2853
|
+
return s.geometry.coordinates;
|
|
2854
|
+
}
|
|
2855
|
+
function or(s) {
|
|
2856
|
+
return s.visible;
|
|
2857
|
+
}
|
|
2858
|
+
const he = {
|
|
2308
2859
|
currency: "CURRENCY",
|
|
2309
2860
|
default: "DEFAULT",
|
|
2310
2861
|
number: "NUMBER"
|
|
2311
|
-
},
|
|
2312
|
-
[
|
|
2313
|
-
type:
|
|
2314
|
-
format: (
|
|
2862
|
+
}, ct = {
|
|
2863
|
+
[he.currency]: {
|
|
2864
|
+
type: he.currency,
|
|
2865
|
+
format: (s, e) => an(s, e)
|
|
2315
2866
|
},
|
|
2316
|
-
[
|
|
2317
|
-
type:
|
|
2318
|
-
format: (
|
|
2867
|
+
[he.number]: {
|
|
2868
|
+
type: he.number,
|
|
2869
|
+
format: (s, e) => ht(s, e)
|
|
2319
2870
|
},
|
|
2320
|
-
[
|
|
2321
|
-
type:
|
|
2322
|
-
format: (
|
|
2871
|
+
[he.default]: {
|
|
2872
|
+
type: he.default,
|
|
2873
|
+
format: (s) => s.toLocaleString()
|
|
2323
2874
|
}
|
|
2324
2875
|
};
|
|
2325
|
-
function
|
|
2326
|
-
properties:
|
|
2876
|
+
function Kr({
|
|
2877
|
+
properties: s,
|
|
2327
2878
|
formatters: e = {},
|
|
2328
|
-
includeColumns: t = Object.keys(
|
|
2329
|
-
locale:
|
|
2330
|
-
showColumnName:
|
|
2331
|
-
title:
|
|
2332
|
-
getColumnName: o =
|
|
2333
|
-
getFieldHtml: a =
|
|
2334
|
-
getTitle: l =
|
|
2335
|
-
getValue:
|
|
2879
|
+
includeColumns: t = Object.keys(s),
|
|
2880
|
+
locale: n = "en-US",
|
|
2881
|
+
showColumnName: r = !0,
|
|
2882
|
+
title: i,
|
|
2883
|
+
getColumnName: o = dr,
|
|
2884
|
+
getFieldHtml: a = lr,
|
|
2885
|
+
getTitle: l = ar,
|
|
2886
|
+
getValue: f = cr
|
|
2336
2887
|
}) {
|
|
2337
|
-
const
|
|
2338
|
-
const
|
|
2339
|
-
return
|
|
2888
|
+
const c = i ? l(i) : "", d = t.reduce((u, y) => {
|
|
2889
|
+
const p = e[y], v = s[y], b = f(v, n, p), S = r ? o(y) : "";
|
|
2890
|
+
return u + a(S, b);
|
|
2340
2891
|
}, "");
|
|
2341
|
-
return
|
|
2892
|
+
return c + d;
|
|
2342
2893
|
}
|
|
2343
|
-
function
|
|
2344
|
-
return `<h3 style="margin: 0"><strong>${
|
|
2894
|
+
function ar(s) {
|
|
2895
|
+
return `<h3 style="margin: 0"><strong>${s}</strong></h3></br>`;
|
|
2345
2896
|
}
|
|
2346
|
-
function
|
|
2347
|
-
return `${
|
|
2897
|
+
function lr(s, e) {
|
|
2898
|
+
return `${s}${e}</br>`;
|
|
2348
2899
|
}
|
|
2349
|
-
function
|
|
2900
|
+
function cr(s, e, t) {
|
|
2350
2901
|
try {
|
|
2351
|
-
return
|
|
2902
|
+
return ur(t)(s, e);
|
|
2352
2903
|
} catch {
|
|
2353
|
-
return
|
|
2904
|
+
return s;
|
|
2354
2905
|
}
|
|
2355
2906
|
}
|
|
2356
|
-
function
|
|
2357
|
-
return typeof
|
|
2907
|
+
function ur(s) {
|
|
2908
|
+
return typeof s == "function" ? s : ((s && ct[s]) ?? ct[he.default]).format;
|
|
2909
|
+
}
|
|
2910
|
+
function dr(s) {
|
|
2911
|
+
return `<strong>${s}</strong>: `;
|
|
2358
2912
|
}
|
|
2359
|
-
function
|
|
2360
|
-
|
|
2913
|
+
function Zr(s) {
|
|
2914
|
+
var e, t, n, r, i, o, a, l;
|
|
2915
|
+
return {
|
|
2916
|
+
collapsed: (e = s.legend) == null ? void 0 : e.collapsed,
|
|
2917
|
+
collapsible: (t = s.legend) == null ? void 0 : t.collapsible,
|
|
2918
|
+
helperText: (n = s.legend) == null ? void 0 : n.helperText,
|
|
2919
|
+
id: s.props.id,
|
|
2920
|
+
legend: (r = s.legend) == null ? void 0 : r.variables,
|
|
2921
|
+
maxZoom: (i = s.legend) == null ? void 0 : i.maxZoom,
|
|
2922
|
+
minZoom: (o = s.legend) == null ? void 0 : o.minZoom,
|
|
2923
|
+
opacity: s.props.opacity ?? 1,
|
|
2924
|
+
opacityControl: (a = s.legend) == null ? void 0 : a.opacityControl,
|
|
2925
|
+
switchable: (l = s.legend) == null ? void 0 : l.switchable,
|
|
2926
|
+
title: s.name,
|
|
2927
|
+
visible: s.props.visible ?? !0
|
|
2928
|
+
};
|
|
2361
2929
|
}
|
|
2362
|
-
function
|
|
2363
|
-
const e =
|
|
2930
|
+
function zr(s) {
|
|
2931
|
+
const e = _(18), {
|
|
2364
2932
|
children: t,
|
|
2365
|
-
|
|
2366
|
-
} =
|
|
2367
|
-
let
|
|
2368
|
-
e[0] !==
|
|
2933
|
+
mapId: n
|
|
2934
|
+
} = s;
|
|
2935
|
+
let r;
|
|
2936
|
+
e[0] !== n ? (r = (S) => S.viewStates[n], e[0] = n, e[1] = r) : r = e[1];
|
|
2369
2937
|
const {
|
|
2370
|
-
zoom:
|
|
2938
|
+
zoom: i,
|
|
2371
2939
|
maxZoom: o,
|
|
2372
2940
|
minZoom: a
|
|
2373
|
-
} = k(
|
|
2941
|
+
} = k(r);
|
|
2374
2942
|
let l;
|
|
2375
|
-
e[2] !==
|
|
2376
|
-
const
|
|
2377
|
-
let
|
|
2378
|
-
e[4] !==
|
|
2379
|
-
const
|
|
2380
|
-
let
|
|
2381
|
-
e[7] !==
|
|
2382
|
-
const
|
|
2383
|
-
let
|
|
2384
|
-
return e[10] !== t || e[11] !== o || e[12] !== a || e[13] !==
|
|
2385
|
-
zoom:
|
|
2943
|
+
e[2] !== n ? (l = (S) => S.maps[n].areLayersLoaded, e[2] = n, e[3] = l) : l = e[3];
|
|
2944
|
+
const f = k(l), c = k(pr), m = k(fr), d = !f;
|
|
2945
|
+
let u;
|
|
2946
|
+
e[4] !== n || e[5] !== c ? (u = (S) => c(n, S), e[4] = n, e[5] = c, e[6] = u) : u = e[6];
|
|
2947
|
+
const y = u;
|
|
2948
|
+
let p;
|
|
2949
|
+
e[7] !== m || e[8] !== n ? (p = (S) => m(n, S), e[7] = m, e[8] = n, e[9] = p) : p = e[9];
|
|
2950
|
+
const v = p;
|
|
2951
|
+
let b;
|
|
2952
|
+
return e[10] !== t || e[11] !== o || e[12] !== a || e[13] !== d || e[14] !== y || e[15] !== v || e[16] !== i ? (b = t({
|
|
2953
|
+
zoom: i,
|
|
2386
2954
|
maxZoom: o,
|
|
2387
2955
|
minZoom: a,
|
|
2388
|
-
isLoading:
|
|
2389
|
-
setZoom:
|
|
2390
|
-
flyTo:
|
|
2391
|
-
}), e[10] = t, e[11] = o, e[12] = a, e[13] =
|
|
2956
|
+
isLoading: d,
|
|
2957
|
+
setZoom: y,
|
|
2958
|
+
flyTo: v
|
|
2959
|
+
}), e[10] = t, e[11] = o, e[12] = a, e[13] = d, e[14] = y, e[15] = v, e[16] = i, e[17] = b) : b = e[17], b;
|
|
2392
2960
|
}
|
|
2393
|
-
function
|
|
2394
|
-
return
|
|
2961
|
+
function fr(s) {
|
|
2962
|
+
return s.flyTo;
|
|
2395
2963
|
}
|
|
2396
|
-
function
|
|
2397
|
-
return
|
|
2964
|
+
function pr(s) {
|
|
2965
|
+
return s.setZoom;
|
|
2398
2966
|
}
|
|
2399
2967
|
export {
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2968
|
+
Hs as ApiBaseUrl,
|
|
2969
|
+
ot as CONVERSIONS_UNITS,
|
|
2970
|
+
Ue as CartoBasemapURL,
|
|
2971
|
+
z as CartoBasemaps,
|
|
2972
|
+
Ur as CategoriesModel,
|
|
2973
|
+
_n as CustomCompositeEditMode,
|
|
2974
|
+
ys as CustomMeasureAreaMode,
|
|
2975
|
+
hs as CustomMeasureBufferMode,
|
|
2976
|
+
_t as CustomMeasureDistanceMode,
|
|
2977
|
+
Ze as DEFAULT_LASSO_TOOLS_COLORS,
|
|
2978
|
+
Tn as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
2410
2979
|
ze as DEFAULT_LASSO_TOOLS_MODES,
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2980
|
+
qe as DEFAULT_LASSO_TOOLS_PROPS,
|
|
2981
|
+
Te as DEFAULT_MASK_LAYER_PROPS,
|
|
2982
|
+
bs as DEFAULT_MEASUREMENT_TOOLS_MODES,
|
|
2983
|
+
Es as DEFAULT_MEASUREMENT_TOOLS_UNITS,
|
|
2984
|
+
Ve as DEFAULT_MEASURE_COLORS,
|
|
2985
|
+
vn as DeckGLComponent,
|
|
2417
2986
|
G as EditableEditType,
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2987
|
+
qr as FeaturesModel,
|
|
2988
|
+
$r as FormulaModel,
|
|
2989
|
+
xe as GmapsBasemap,
|
|
2990
|
+
Vr as HistogramModel,
|
|
2991
|
+
Pe as INTL_UNITS,
|
|
2992
|
+
Ps as LassoTools,
|
|
2993
|
+
Xn as LassoToolsProvider,
|
|
2994
|
+
gt as MAPS_BASEMAP,
|
|
2995
|
+
be as MAP_LASSO_TOOLS_LAYER_ID,
|
|
2996
|
+
Ae as MAP_MASK_LAYER_ID,
|
|
2997
|
+
ge as MAP_MEASURE_LAYER_ID,
|
|
2998
|
+
vs as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
2999
|
+
at as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
3000
|
+
B as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
3001
|
+
xr as MapComponent,
|
|
3002
|
+
Ne as MapMeasurementUnitAuto,
|
|
3003
|
+
Ss as MapMeasurementUnitTurf,
|
|
3004
|
+
Rn as MapProvider,
|
|
3005
|
+
Hr as MapsProvider,
|
|
3006
|
+
ce as MapsTypes,
|
|
3007
|
+
Vs as MeasurementTools,
|
|
3008
|
+
Cs as MeasurementToolsProvider,
|
|
3009
|
+
Nr as RangeModel,
|
|
3010
|
+
Ir as ScatterModel,
|
|
3011
|
+
Br as TableModel,
|
|
3012
|
+
Gr as TimeSeriesModel,
|
|
3013
|
+
zr as ZoomControls,
|
|
3014
|
+
Ws as clientID,
|
|
3015
|
+
st as convertMetersTo,
|
|
3016
|
+
Yn as createLassoToolsStore,
|
|
3017
|
+
An as createMapStore,
|
|
3018
|
+
Ts as createMeasurementToolsStore,
|
|
3019
|
+
he as formatterTypes,
|
|
3020
|
+
gn as getCursorDefault,
|
|
3021
|
+
Dr as getDeckController,
|
|
3022
|
+
Zn as getLassoToolsLayer,
|
|
3023
|
+
ws as getMeasurementToolsLayer,
|
|
3024
|
+
Re as getTextLayerFormattedDistance,
|
|
3025
|
+
Sn as getTooltipDefault,
|
|
3026
|
+
Zr as mappingLegendMeridian,
|
|
3027
|
+
Kr as objectToHtml,
|
|
3028
|
+
kt as sortLayers,
|
|
3029
|
+
Cn as transitionFlyConfig,
|
|
3030
|
+
Zs as useCategories,
|
|
3031
|
+
zs as useFeatures,
|
|
3032
|
+
Ys as useFormula,
|
|
3033
|
+
Xs as useHistogram,
|
|
3034
|
+
rr as useLassoToolsSpatialFilter,
|
|
3035
|
+
D as useLassoToolsState,
|
|
3036
|
+
we as useLayerStore,
|
|
3037
|
+
Ns as useLayers,
|
|
3038
|
+
Wr as useLegend,
|
|
3039
|
+
jr as useMapScreenshot,
|
|
3040
|
+
k as useMapStore,
|
|
3041
|
+
A as useMeasurementToolsState,
|
|
3042
|
+
Js as useRange,
|
|
3043
|
+
er as useScatter,
|
|
3044
|
+
js as useSourceStore,
|
|
3045
|
+
Qr as useSpatialFilter,
|
|
3046
|
+
tr as useTable,
|
|
3047
|
+
nr as useTimeSeries,
|
|
3048
|
+
sr as useViewportSpatialFilter,
|
|
3049
|
+
fe as useWidgetModel
|
|
2458
3050
|
};
|
|
2459
3051
|
//# sourceMappingURL=index.js.map
|