@carto/ps-react-maps 1.3.3-alpha.1 → 1.3.3-alpha.2
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.cjs +10 -10
- package/dist/index.js +763 -583
- package/dist/types/map-measurement-tool/map-measurement-tool.const.d.ts +17 -3
- package/dist/types/map-measurement-tool/map-measurement-tool.layer.d.ts +2 -2
- package/dist/types/map-measurement-tool/map-measurement-tool.types.d.ts +24 -5
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EditableGeoJsonLayer as
|
|
3
|
-
import { MeasureDistanceMode as
|
|
4
|
-
import { EventManager as
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import tt, { createContext as Q, useContext as ee, useCallback as M, useReducer as rt, useRef as se, useMemo as qt, useEffect as Gt } from "react";
|
|
2
|
+
import { EditableGeoJsonLayer as Kt } from "@nebula.gl/layers";
|
|
3
|
+
import { MeasureDistanceMode as Zt } from "@nebula.gl/edit-modes";
|
|
4
|
+
import { EventManager as Jt } from "mjolnir.js";
|
|
5
|
+
import Xt from "convert-units";
|
|
6
|
+
var Qt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(er || {});
|
|
7
|
+
const ge = {
|
|
7
8
|
positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
8
9
|
voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
9
10
|
"dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
10
11
|
};
|
|
11
|
-
var
|
|
12
|
-
const
|
|
12
|
+
var nt = /* @__PURE__ */ ((t) => (t.Maplibre = "maplibre", t.GoogleMaps = "google-maps", t))(nt || {});
|
|
13
|
+
const Ee = {
|
|
13
14
|
positron: {
|
|
14
|
-
url:
|
|
15
|
+
url: ge.positron,
|
|
15
16
|
type: "maplibre"
|
|
16
17
|
/* Maplibre */
|
|
17
18
|
},
|
|
18
19
|
voyager: {
|
|
19
|
-
url:
|
|
20
|
+
url: ge.voyager,
|
|
20
21
|
type: "maplibre"
|
|
21
22
|
/* Maplibre */
|
|
22
23
|
},
|
|
23
24
|
"dark-matter": {
|
|
24
|
-
url:
|
|
25
|
+
url: ge[
|
|
25
26
|
"dark-matter"
|
|
26
27
|
/* DarkMatter */
|
|
27
28
|
],
|
|
@@ -40,9 +41,9 @@ const ve = {
|
|
|
40
41
|
type: "google-maps"
|
|
41
42
|
/* GoogleMaps */
|
|
42
43
|
}
|
|
43
|
-
},
|
|
44
|
+
}, H = () => {
|
|
44
45
|
throw new Error("You forgot to wrap your component in <MapProvider>.");
|
|
45
|
-
},
|
|
46
|
+
}, Z = {
|
|
46
47
|
state: {
|
|
47
48
|
maps: {}
|
|
48
49
|
// sync: false,
|
|
@@ -52,62 +53,62 @@ const ve = {
|
|
|
52
53
|
},
|
|
53
54
|
actions: {
|
|
54
55
|
// toggleSync: stub,
|
|
55
|
-
setViewState:
|
|
56
|
-
setBasemap:
|
|
57
|
-
setResize:
|
|
58
|
-
setZoom:
|
|
59
|
-
setLoaded:
|
|
56
|
+
setViewState: H,
|
|
57
|
+
setBasemap: H,
|
|
58
|
+
setResize: H,
|
|
59
|
+
setZoom: H,
|
|
60
|
+
setLoaded: H
|
|
60
61
|
}
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
),
|
|
64
|
-
|
|
62
|
+
}, at = Q(
|
|
63
|
+
Z.state
|
|
64
|
+
), ot = Q(Z.references), it = Q(
|
|
65
|
+
Z.actions
|
|
65
66
|
);
|
|
66
|
-
var
|
|
67
|
-
function
|
|
67
|
+
var L = /* @__PURE__ */ ((t) => (t.SetViewState = "SetViewState", t.SetBasemap = "SetBasemap", t.SetResize = "SetResize", t.SetZoom = "SetZoom", t.SetLoaded = "SetLoaded", t))(L || {});
|
|
68
|
+
function tr(t, { type: r, payload: a }) {
|
|
68
69
|
return {
|
|
69
70
|
SetViewState: () => {
|
|
70
|
-
const { id: i, viewState:
|
|
71
|
+
const { id: i, viewState: f } = a, l = { ...t.maps };
|
|
71
72
|
return l[i] = {
|
|
72
73
|
...t.maps[i],
|
|
73
|
-
viewState:
|
|
74
|
+
viewState: f
|
|
74
75
|
}, {
|
|
75
76
|
...t,
|
|
76
77
|
maps: l
|
|
77
78
|
};
|
|
78
79
|
},
|
|
79
80
|
SetResize: () => {
|
|
80
|
-
const { id: i, width:
|
|
81
|
-
return
|
|
81
|
+
const { id: i, width: f, height: l } = a, E = { ...t.maps };
|
|
82
|
+
return E[i] = {
|
|
82
83
|
...t.maps[i],
|
|
83
84
|
viewState: {
|
|
84
85
|
...t.maps[i].viewState,
|
|
85
|
-
width:
|
|
86
|
+
width: f,
|
|
86
87
|
height: l
|
|
87
88
|
}
|
|
88
89
|
}, {
|
|
89
90
|
...t,
|
|
90
|
-
maps:
|
|
91
|
+
maps: E
|
|
91
92
|
};
|
|
92
93
|
},
|
|
93
94
|
SetBasemap: () => {
|
|
94
|
-
const { id: i, basemap:
|
|
95
|
+
const { id: i, basemap: f } = a, l = { ...t.maps }, { basemap: E } = l[i], c = Ee[E]?.type, g = Ee[f]?.type, h = c === g;
|
|
95
96
|
return l[i] = {
|
|
96
97
|
...t.maps[i],
|
|
97
|
-
basemap:
|
|
98
|
-
isLoaded:
|
|
98
|
+
basemap: f,
|
|
99
|
+
isLoaded: h
|
|
99
100
|
}, {
|
|
100
101
|
...t,
|
|
101
102
|
maps: l
|
|
102
103
|
};
|
|
103
104
|
},
|
|
104
105
|
SetZoom: () => {
|
|
105
|
-
const { id: i, zoom:
|
|
106
|
+
const { id: i, zoom: f } = a, l = { ...t.maps };
|
|
106
107
|
return l[i] = {
|
|
107
108
|
...t.maps[i],
|
|
108
109
|
viewState: {
|
|
109
110
|
...t.maps[i].viewState,
|
|
110
|
-
zoom:
|
|
111
|
+
zoom: f
|
|
111
112
|
}
|
|
112
113
|
}, {
|
|
113
114
|
...t,
|
|
@@ -115,10 +116,10 @@ function Jt(t, { type: r, payload: a }) {
|
|
|
115
116
|
};
|
|
116
117
|
},
|
|
117
118
|
SetLoaded: () => {
|
|
118
|
-
const { id: i, value:
|
|
119
|
+
const { id: i, value: f } = a, l = { ...t.maps };
|
|
119
120
|
return l[i] = {
|
|
120
121
|
...t.maps[i],
|
|
121
|
-
isLoaded:
|
|
122
|
+
isLoaded: f
|
|
122
123
|
}, {
|
|
123
124
|
...t,
|
|
124
125
|
maps: l
|
|
@@ -126,63 +127,63 @@ function Jt(t, { type: r, payload: a }) {
|
|
|
126
127
|
}
|
|
127
128
|
}[r]?.() ?? t;
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
-
return
|
|
130
|
+
function st(t) {
|
|
131
|
+
return ee(at).maps[t];
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
-
const r =
|
|
134
|
-
const
|
|
135
|
-
return
|
|
136
|
-
}, [a]),
|
|
137
|
-
(
|
|
133
|
+
function Se(t) {
|
|
134
|
+
const r = ee(ot), { instanceRef: a, overlayRef: s } = r.current[t], i = M(() => {
|
|
135
|
+
const g = a?.current;
|
|
136
|
+
return g?.deck || g?._deck;
|
|
137
|
+
}, [a]), f = M(() => s?.current, [s]), l = M(() => i()._getViewState(), [i]), E = M(
|
|
138
|
+
(g) => i()?.getViewports(g),
|
|
138
139
|
[i]
|
|
139
|
-
), c =
|
|
140
|
-
(
|
|
141
|
-
[
|
|
140
|
+
), c = M(
|
|
141
|
+
(g = 0, h) => E(h)?.[g],
|
|
142
|
+
[E]
|
|
142
143
|
);
|
|
143
144
|
return {
|
|
144
145
|
instanceRef: a,
|
|
145
146
|
overlayRef: s,
|
|
146
147
|
getDeckInstance: i,
|
|
147
|
-
getOverlayInstance:
|
|
148
|
+
getOverlayInstance: f,
|
|
148
149
|
getViewState: l,
|
|
149
150
|
getViewport: c,
|
|
150
|
-
getViewports:
|
|
151
|
+
getViewports: E
|
|
151
152
|
};
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
-
const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded:
|
|
154
|
+
function rr(t) {
|
|
155
|
+
const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded: f } = ee(it), { getViewport: l } = Se(t);
|
|
155
156
|
return {
|
|
156
157
|
setBasemap: (c) => r(c, t),
|
|
157
158
|
setResize: (c) => a(c, t),
|
|
158
159
|
setViewState: (c) => s(c, t),
|
|
159
160
|
setZoom: (c) => i(c, t),
|
|
160
|
-
setLoaded: (c) =>
|
|
161
|
+
setLoaded: (c) => f(c, t),
|
|
161
162
|
fitBounds: (c, {
|
|
162
|
-
boundsOptions:
|
|
163
|
-
viewStateOptions:
|
|
163
|
+
boundsOptions: g,
|
|
164
|
+
viewStateOptions: h
|
|
164
165
|
} = {}) => {
|
|
165
|
-
const
|
|
166
|
+
const T = l(), { latitude: P, longitude: p, zoom: y } = T.fitBounds(
|
|
166
167
|
c,
|
|
167
|
-
|
|
168
|
+
g
|
|
168
169
|
);
|
|
169
|
-
s({ ...
|
|
170
|
+
s({ ...h, latitude: P, longitude: p, zoom: y }, t);
|
|
170
171
|
}
|
|
171
172
|
};
|
|
172
173
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
174
|
+
function qr(t) {
|
|
175
|
+
return st(t);
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
177
|
+
function Gr(t) {
|
|
178
|
+
return Se(t);
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
180
|
+
function Kr(t) {
|
|
181
|
+
return rr(t);
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
+
function nr(t) {
|
|
183
184
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
184
185
|
}
|
|
185
|
-
var
|
|
186
|
+
var be = { exports: {} }, z = {};
|
|
186
187
|
/**
|
|
187
188
|
* @license React
|
|
188
189
|
* react-jsx-runtime.development.js
|
|
@@ -192,57 +193,57 @@ var me = { exports: {} }, B = {};
|
|
|
192
193
|
* This source code is licensed under the MIT license found in the
|
|
193
194
|
* LICENSE file in the root directory of this source tree.
|
|
194
195
|
*/
|
|
195
|
-
var
|
|
196
|
-
function
|
|
197
|
-
return
|
|
198
|
-
var t =
|
|
199
|
-
function
|
|
196
|
+
var Ke;
|
|
197
|
+
function ar() {
|
|
198
|
+
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
199
|
+
var t = tt, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), E = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = Symbol.iterator, j = "@@iterator";
|
|
200
|
+
function U(e) {
|
|
200
201
|
if (e === null || typeof e != "object")
|
|
201
202
|
return null;
|
|
202
|
-
var n =
|
|
203
|
+
var n = y && e[y] || e[j];
|
|
203
204
|
return typeof n == "function" ? n : null;
|
|
204
205
|
}
|
|
205
|
-
var
|
|
206
|
-
function
|
|
206
|
+
var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
207
|
+
function _(e) {
|
|
207
208
|
{
|
|
208
209
|
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++)
|
|
209
210
|
o[u - 1] = arguments[u];
|
|
210
|
-
|
|
211
|
+
Te("error", e, o);
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function Te(e, n, o) {
|
|
214
215
|
{
|
|
215
|
-
var u =
|
|
216
|
+
var u = x.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
216
217
|
v !== "" && (n += "%s", o = o.concat([v]));
|
|
217
|
-
var
|
|
218
|
-
return String(
|
|
218
|
+
var b = o.map(function(m) {
|
|
219
|
+
return String(m);
|
|
219
220
|
});
|
|
220
|
-
|
|
221
|
+
b.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, b);
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
|
-
var
|
|
224
|
-
|
|
225
|
-
function
|
|
226
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e ===
|
|
224
|
+
var F = !1, k = !1, yt = !1, ht = !1, Et = !1, Me;
|
|
225
|
+
Me = Symbol.for("react.module.reference");
|
|
226
|
+
function bt(e) {
|
|
227
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === f || Et || e === i || e === g || e === h || ht || e === p || F || k || yt || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === l || e.$$typeof === E || e.$$typeof === c || // This needs to include all possible module reference object
|
|
227
228
|
// types supported by any Flight configuration anywhere since
|
|
228
229
|
// we don't know which Flight build this will end up being used
|
|
229
230
|
// with.
|
|
230
|
-
e.$$typeof ===
|
|
231
|
+
e.$$typeof === Me || e.getModuleId !== void 0));
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function _t(e, n, o) {
|
|
233
234
|
var u = e.displayName;
|
|
234
235
|
if (u)
|
|
235
236
|
return u;
|
|
236
237
|
var v = n.displayName || n.name || "";
|
|
237
238
|
return v !== "" ? o + "(" + v + ")" : o;
|
|
238
239
|
}
|
|
239
|
-
function
|
|
240
|
+
function Pe(e) {
|
|
240
241
|
return e.displayName || "Context";
|
|
241
242
|
}
|
|
242
243
|
function A(e) {
|
|
243
244
|
if (e == null)
|
|
244
245
|
return null;
|
|
245
|
-
if (typeof e.tag == "number" &&
|
|
246
|
+
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
246
247
|
return e.displayName || e.name || null;
|
|
247
248
|
if (typeof e == "string")
|
|
248
249
|
return e;
|
|
@@ -251,32 +252,32 @@ function Qt() {
|
|
|
251
252
|
return "Fragment";
|
|
252
253
|
case a:
|
|
253
254
|
return "Portal";
|
|
254
|
-
case
|
|
255
|
+
case f:
|
|
255
256
|
return "Profiler";
|
|
256
257
|
case i:
|
|
257
258
|
return "StrictMode";
|
|
258
|
-
case
|
|
259
|
+
case g:
|
|
259
260
|
return "Suspense";
|
|
260
|
-
case
|
|
261
|
+
case h:
|
|
261
262
|
return "SuspenseList";
|
|
262
263
|
}
|
|
263
264
|
if (typeof e == "object")
|
|
264
265
|
switch (e.$$typeof) {
|
|
265
|
-
case
|
|
266
|
+
case E:
|
|
266
267
|
var n = e;
|
|
267
|
-
return
|
|
268
|
+
return Pe(n) + ".Consumer";
|
|
268
269
|
case l:
|
|
269
270
|
var o = e;
|
|
270
|
-
return
|
|
271
|
+
return Pe(o._context) + ".Provider";
|
|
271
272
|
case c:
|
|
272
|
-
return
|
|
273
|
-
case
|
|
273
|
+
return _t(e, e.render, "ForwardRef");
|
|
274
|
+
case T:
|
|
274
275
|
var u = e.displayName || null;
|
|
275
276
|
return u !== null ? u : A(e.type) || "Memo";
|
|
276
|
-
case
|
|
277
|
-
var v = e,
|
|
277
|
+
case P: {
|
|
278
|
+
var v = e, b = v._payload, m = v._init;
|
|
278
279
|
try {
|
|
279
|
-
return A(
|
|
280
|
+
return A(m(b));
|
|
280
281
|
} catch {
|
|
281
282
|
return null;
|
|
282
283
|
}
|
|
@@ -284,18 +285,18 @@ function Qt() {
|
|
|
284
285
|
}
|
|
285
286
|
return null;
|
|
286
287
|
}
|
|
287
|
-
var
|
|
288
|
-
function
|
|
288
|
+
var I = Object.assign, B = 0, Ce, Oe, we, je, xe, Ae, De;
|
|
289
|
+
function Fe() {
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
-
function
|
|
291
|
+
Fe.__reactDisabledLog = !0;
|
|
292
|
+
function St() {
|
|
292
293
|
{
|
|
293
|
-
if (
|
|
294
|
-
|
|
294
|
+
if (B === 0) {
|
|
295
|
+
Ce = console.log, Oe = console.info, we = console.warn, je = console.error, xe = console.group, Ae = console.groupCollapsed, De = console.groupEnd;
|
|
295
296
|
var e = {
|
|
296
297
|
configurable: !0,
|
|
297
298
|
enumerable: !0,
|
|
298
|
-
value:
|
|
299
|
+
value: Fe,
|
|
299
300
|
writable: !0
|
|
300
301
|
};
|
|
301
302
|
Object.defineProperties(console, {
|
|
@@ -308,100 +309,100 @@ function Qt() {
|
|
|
308
309
|
groupEnd: e
|
|
309
310
|
});
|
|
310
311
|
}
|
|
311
|
-
|
|
312
|
+
B++;
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function Rt() {
|
|
315
316
|
{
|
|
316
|
-
if (
|
|
317
|
+
if (B--, B === 0) {
|
|
317
318
|
var e = {
|
|
318
319
|
configurable: !0,
|
|
319
320
|
enumerable: !0,
|
|
320
321
|
writable: !0
|
|
321
322
|
};
|
|
322
323
|
Object.defineProperties(console, {
|
|
323
|
-
log:
|
|
324
|
-
value:
|
|
324
|
+
log: I({}, e, {
|
|
325
|
+
value: Ce
|
|
325
326
|
}),
|
|
326
|
-
info:
|
|
327
|
-
value:
|
|
327
|
+
info: I({}, e, {
|
|
328
|
+
value: Oe
|
|
328
329
|
}),
|
|
329
|
-
warn:
|
|
330
|
-
value:
|
|
330
|
+
warn: I({}, e, {
|
|
331
|
+
value: we
|
|
331
332
|
}),
|
|
332
|
-
error:
|
|
333
|
-
value:
|
|
333
|
+
error: I({}, e, {
|
|
334
|
+
value: je
|
|
334
335
|
}),
|
|
335
|
-
group:
|
|
336
|
-
value:
|
|
336
|
+
group: I({}, e, {
|
|
337
|
+
value: xe
|
|
337
338
|
}),
|
|
338
|
-
groupCollapsed:
|
|
339
|
-
value:
|
|
339
|
+
groupCollapsed: I({}, e, {
|
|
340
|
+
value: Ae
|
|
340
341
|
}),
|
|
341
|
-
groupEnd:
|
|
342
|
-
value:
|
|
342
|
+
groupEnd: I({}, e, {
|
|
343
|
+
value: De
|
|
343
344
|
})
|
|
344
345
|
});
|
|
345
346
|
}
|
|
346
|
-
|
|
347
|
+
B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
|
-
var
|
|
350
|
-
function
|
|
350
|
+
var ce = x.ReactCurrentDispatcher, ue;
|
|
351
|
+
function te(e, n, o) {
|
|
351
352
|
{
|
|
352
|
-
if (
|
|
353
|
+
if (ue === void 0)
|
|
353
354
|
try {
|
|
354
355
|
throw Error();
|
|
355
356
|
} catch (v) {
|
|
356
357
|
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
357
|
-
|
|
358
|
+
ue = u && u[1] || "";
|
|
358
359
|
}
|
|
359
360
|
return `
|
|
360
|
-
` +
|
|
361
|
+
` + ue + e;
|
|
361
362
|
}
|
|
362
363
|
}
|
|
363
|
-
var
|
|
364
|
+
var le = !1, re;
|
|
364
365
|
{
|
|
365
|
-
var
|
|
366
|
-
|
|
366
|
+
var Tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
367
|
+
re = new Tt();
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
-
if (!e ||
|
|
369
|
+
function ke(e, n) {
|
|
370
|
+
if (!e || le)
|
|
370
371
|
return "";
|
|
371
372
|
{
|
|
372
|
-
var o =
|
|
373
|
+
var o = re.get(e);
|
|
373
374
|
if (o !== void 0)
|
|
374
375
|
return o;
|
|
375
376
|
}
|
|
376
377
|
var u;
|
|
377
|
-
|
|
378
|
+
le = !0;
|
|
378
379
|
var v = Error.prepareStackTrace;
|
|
379
380
|
Error.prepareStackTrace = void 0;
|
|
380
|
-
var
|
|
381
|
-
|
|
381
|
+
var b;
|
|
382
|
+
b = ce.current, ce.current = null, St();
|
|
382
383
|
try {
|
|
383
384
|
if (n) {
|
|
384
|
-
var
|
|
385
|
+
var m = function() {
|
|
385
386
|
throw Error();
|
|
386
387
|
};
|
|
387
|
-
if (Object.defineProperty(
|
|
388
|
+
if (Object.defineProperty(m.prototype, "props", {
|
|
388
389
|
set: function() {
|
|
389
390
|
throw Error();
|
|
390
391
|
}
|
|
391
392
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
392
393
|
try {
|
|
393
|
-
Reflect.construct(
|
|
394
|
+
Reflect.construct(m, []);
|
|
394
395
|
} catch (D) {
|
|
395
396
|
u = D;
|
|
396
397
|
}
|
|
397
|
-
Reflect.construct(e, [],
|
|
398
|
+
Reflect.construct(e, [], m);
|
|
398
399
|
} else {
|
|
399
400
|
try {
|
|
400
|
-
|
|
401
|
+
m.call();
|
|
401
402
|
} catch (D) {
|
|
402
403
|
u = D;
|
|
403
404
|
}
|
|
404
|
-
e.call(
|
|
405
|
+
e.call(m.prototype);
|
|
405
406
|
}
|
|
406
407
|
} else {
|
|
407
408
|
try {
|
|
@@ -413,95 +414,95 @@ function Qt() {
|
|
|
413
414
|
}
|
|
414
415
|
} catch (D) {
|
|
415
416
|
if (D && u && typeof D.stack == "string") {
|
|
416
|
-
for (var
|
|
417
|
+
for (var d = D.stack.split(`
|
|
417
418
|
`), C = u.stack.split(`
|
|
418
|
-
`),
|
|
419
|
-
|
|
420
|
-
for (;
|
|
421
|
-
if (
|
|
422
|
-
if (
|
|
419
|
+
`), S = d.length - 1, R = C.length - 1; S >= 1 && R >= 0 && d[S] !== C[R]; )
|
|
420
|
+
R--;
|
|
421
|
+
for (; S >= 1 && R >= 0; S--, R--)
|
|
422
|
+
if (d[S] !== C[R]) {
|
|
423
|
+
if (S !== 1 || R !== 1)
|
|
423
424
|
do
|
|
424
|
-
if (
|
|
425
|
-
var
|
|
426
|
-
` +
|
|
427
|
-
return e.displayName &&
|
|
425
|
+
if (S--, R--, R < 0 || d[S] !== C[R]) {
|
|
426
|
+
var w = `
|
|
427
|
+
` + d[S].replace(" at new ", " at ");
|
|
428
|
+
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, w), w;
|
|
428
429
|
}
|
|
429
|
-
while (
|
|
430
|
+
while (S >= 1 && R >= 0);
|
|
430
431
|
break;
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
} finally {
|
|
434
|
-
|
|
435
|
+
le = !1, ce.current = b, Rt(), Error.prepareStackTrace = v;
|
|
435
436
|
}
|
|
436
|
-
var
|
|
437
|
-
return typeof e == "function" &&
|
|
437
|
+
var $ = e ? e.displayName || e.name : "", Ge = $ ? te($) : "";
|
|
438
|
+
return typeof e == "function" && re.set(e, Ge), Ge;
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
-
return
|
|
440
|
+
function Mt(e, n, o) {
|
|
441
|
+
return ke(e, !1);
|
|
441
442
|
}
|
|
442
|
-
function
|
|
443
|
+
function Pt(e) {
|
|
443
444
|
var n = e.prototype;
|
|
444
445
|
return !!(n && n.isReactComponent);
|
|
445
446
|
}
|
|
446
|
-
function
|
|
447
|
+
function ne(e, n, o) {
|
|
447
448
|
if (e == null)
|
|
448
449
|
return "";
|
|
449
450
|
if (typeof e == "function")
|
|
450
|
-
return
|
|
451
|
+
return ke(e, Pt(e));
|
|
451
452
|
if (typeof e == "string")
|
|
452
|
-
return
|
|
453
|
+
return te(e);
|
|
453
454
|
switch (e) {
|
|
454
|
-
case
|
|
455
|
-
return
|
|
456
|
-
case
|
|
457
|
-
return
|
|
455
|
+
case g:
|
|
456
|
+
return te("Suspense");
|
|
457
|
+
case h:
|
|
458
|
+
return te("SuspenseList");
|
|
458
459
|
}
|
|
459
460
|
if (typeof e == "object")
|
|
460
461
|
switch (e.$$typeof) {
|
|
461
462
|
case c:
|
|
462
|
-
return
|
|
463
|
-
case
|
|
464
|
-
return
|
|
465
|
-
case
|
|
466
|
-
var u = e, v = u._payload,
|
|
463
|
+
return Mt(e.render);
|
|
464
|
+
case T:
|
|
465
|
+
return ne(e.type, n, o);
|
|
466
|
+
case P: {
|
|
467
|
+
var u = e, v = u._payload, b = u._init;
|
|
467
468
|
try {
|
|
468
|
-
return
|
|
469
|
+
return ne(b(v), n, o);
|
|
469
470
|
} catch {
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
}
|
|
473
474
|
return "";
|
|
474
475
|
}
|
|
475
|
-
var
|
|
476
|
-
function
|
|
476
|
+
var ae = Object.prototype.hasOwnProperty, Le = {}, Ne = x.ReactDebugCurrentFrame;
|
|
477
|
+
function oe(e) {
|
|
477
478
|
if (e) {
|
|
478
|
-
var n = e._owner, o =
|
|
479
|
-
|
|
479
|
+
var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
|
|
480
|
+
Ne.setExtraStackFrame(o);
|
|
480
481
|
} else
|
|
481
|
-
|
|
482
|
+
Ne.setExtraStackFrame(null);
|
|
482
483
|
}
|
|
483
|
-
function
|
|
484
|
+
function Ct(e, n, o, u, v) {
|
|
484
485
|
{
|
|
485
|
-
var
|
|
486
|
-
for (var
|
|
487
|
-
if (
|
|
488
|
-
var
|
|
486
|
+
var b = Function.call.bind(ae);
|
|
487
|
+
for (var m in e)
|
|
488
|
+
if (b(e, m)) {
|
|
489
|
+
var d = void 0;
|
|
489
490
|
try {
|
|
490
|
-
if (typeof e[
|
|
491
|
-
var C = Error((u || "React class") + ": " + o + " type `" +
|
|
491
|
+
if (typeof e[m] != "function") {
|
|
492
|
+
var C = Error((u || "React class") + ": " + o + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
492
493
|
throw C.name = "Invariant Violation", C;
|
|
493
494
|
}
|
|
494
|
-
|
|
495
|
-
} catch (
|
|
496
|
-
|
|
495
|
+
d = e[m](n, m, u, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
496
|
+
} catch (S) {
|
|
497
|
+
d = S;
|
|
497
498
|
}
|
|
498
|
-
|
|
499
|
+
d && !(d instanceof Error) && (oe(v), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", o, m, typeof d), oe(null)), d instanceof Error && !(d.message in Le) && (Le[d.message] = !0, oe(v), _("Failed %s type: %s", o, d.message), oe(null));
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
502
|
}
|
|
502
|
-
var
|
|
503
|
-
function
|
|
504
|
-
return
|
|
503
|
+
var Ot = Array.isArray;
|
|
504
|
+
function fe(e) {
|
|
505
|
+
return Ot(e);
|
|
505
506
|
}
|
|
506
507
|
function wt(e) {
|
|
507
508
|
{
|
|
@@ -509,53 +510,53 @@ function Qt() {
|
|
|
509
510
|
return o;
|
|
510
511
|
}
|
|
511
512
|
}
|
|
512
|
-
function
|
|
513
|
+
function jt(e) {
|
|
513
514
|
try {
|
|
514
|
-
return
|
|
515
|
+
return Ie(e), !1;
|
|
515
516
|
} catch {
|
|
516
517
|
return !0;
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
|
-
function
|
|
520
|
+
function Ie(e) {
|
|
520
521
|
return "" + e;
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
-
if (
|
|
524
|
-
return
|
|
523
|
+
function Ue(e) {
|
|
524
|
+
if (jt(e))
|
|
525
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(e)), Ie(e);
|
|
525
526
|
}
|
|
526
|
-
var
|
|
527
|
+
var W = x.ReactCurrentOwner, xt = {
|
|
527
528
|
key: !0,
|
|
528
529
|
ref: !0,
|
|
529
530
|
__self: !0,
|
|
530
531
|
__source: !0
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
function
|
|
534
|
-
if (
|
|
532
|
+
}, Ve, $e, de;
|
|
533
|
+
de = {};
|
|
534
|
+
function At(e) {
|
|
535
|
+
if (ae.call(e, "ref")) {
|
|
535
536
|
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
536
537
|
if (n && n.isReactWarning)
|
|
537
538
|
return !1;
|
|
538
539
|
}
|
|
539
540
|
return e.ref !== void 0;
|
|
540
541
|
}
|
|
541
|
-
function
|
|
542
|
-
if (
|
|
542
|
+
function Dt(e) {
|
|
543
|
+
if (ae.call(e, "key")) {
|
|
543
544
|
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
544
545
|
if (n && n.isReactWarning)
|
|
545
546
|
return !1;
|
|
546
547
|
}
|
|
547
548
|
return e.key !== void 0;
|
|
548
549
|
}
|
|
549
|
-
function
|
|
550
|
-
if (typeof e.ref == "string" &&
|
|
551
|
-
var o = A(
|
|
552
|
-
|
|
550
|
+
function Ft(e, n) {
|
|
551
|
+
if (typeof e.ref == "string" && W.current && n && W.current.stateNode !== n) {
|
|
552
|
+
var o = A(W.current.type);
|
|
553
|
+
de[o] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(W.current.type), e.ref), de[o] = !0);
|
|
553
554
|
}
|
|
554
555
|
}
|
|
555
|
-
function
|
|
556
|
+
function kt(e, n) {
|
|
556
557
|
{
|
|
557
558
|
var o = function() {
|
|
558
|
-
|
|
559
|
+
Ve || (Ve = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
559
560
|
};
|
|
560
561
|
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
561
562
|
get: o,
|
|
@@ -563,10 +564,10 @@ function Qt() {
|
|
|
563
564
|
});
|
|
564
565
|
}
|
|
565
566
|
}
|
|
566
|
-
function
|
|
567
|
+
function Lt(e, n) {
|
|
567
568
|
{
|
|
568
569
|
var o = function() {
|
|
569
|
-
|
|
570
|
+
$e || ($e = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
570
571
|
};
|
|
571
572
|
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
572
573
|
get: o,
|
|
@@ -574,70 +575,70 @@ function Qt() {
|
|
|
574
575
|
});
|
|
575
576
|
}
|
|
576
577
|
}
|
|
577
|
-
var
|
|
578
|
-
var
|
|
578
|
+
var Nt = function(e, n, o, u, v, b, m) {
|
|
579
|
+
var d = {
|
|
579
580
|
// This tag allows us to uniquely identify this as a React Element
|
|
580
581
|
$$typeof: r,
|
|
581
582
|
// Built-in properties that belong on the element
|
|
582
583
|
type: e,
|
|
583
584
|
key: n,
|
|
584
585
|
ref: o,
|
|
585
|
-
props:
|
|
586
|
+
props: m,
|
|
586
587
|
// Record the component responsible for creating this element.
|
|
587
|
-
_owner:
|
|
588
|
+
_owner: b
|
|
588
589
|
};
|
|
589
|
-
return
|
|
590
|
+
return d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
590
591
|
configurable: !1,
|
|
591
592
|
enumerable: !1,
|
|
592
593
|
writable: !0,
|
|
593
594
|
value: !1
|
|
594
|
-
}), Object.defineProperty(
|
|
595
|
+
}), Object.defineProperty(d, "_self", {
|
|
595
596
|
configurable: !1,
|
|
596
597
|
enumerable: !1,
|
|
597
598
|
writable: !1,
|
|
598
599
|
value: u
|
|
599
|
-
}), Object.defineProperty(
|
|
600
|
+
}), Object.defineProperty(d, "_source", {
|
|
600
601
|
configurable: !1,
|
|
601
602
|
enumerable: !1,
|
|
602
603
|
writable: !1,
|
|
603
604
|
value: v
|
|
604
|
-
}), Object.freeze && (Object.freeze(
|
|
605
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
605
606
|
};
|
|
606
|
-
function
|
|
607
|
+
function It(e, n, o, u, v) {
|
|
607
608
|
{
|
|
608
|
-
var
|
|
609
|
-
o !== void 0 && (
|
|
610
|
-
for (
|
|
611
|
-
|
|
609
|
+
var b, m = {}, d = null, C = null;
|
|
610
|
+
o !== void 0 && (Ue(o), d = "" + o), Dt(n) && (Ue(n.key), d = "" + n.key), At(n) && (C = n.ref, Ft(n, v));
|
|
611
|
+
for (b in n)
|
|
612
|
+
ae.call(n, b) && !xt.hasOwnProperty(b) && (m[b] = n[b]);
|
|
612
613
|
if (e && e.defaultProps) {
|
|
613
|
-
var
|
|
614
|
-
for (
|
|
615
|
-
|
|
614
|
+
var S = e.defaultProps;
|
|
615
|
+
for (b in S)
|
|
616
|
+
m[b] === void 0 && (m[b] = S[b]);
|
|
616
617
|
}
|
|
617
|
-
if (
|
|
618
|
-
var
|
|
619
|
-
|
|
618
|
+
if (d || C) {
|
|
619
|
+
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
620
|
+
d && kt(m, R), C && Lt(m, R);
|
|
620
621
|
}
|
|
621
|
-
return
|
|
622
|
+
return Nt(e, d, C, v, u, W.current, m);
|
|
622
623
|
}
|
|
623
624
|
}
|
|
624
|
-
var
|
|
625
|
-
function
|
|
625
|
+
var me = x.ReactCurrentOwner, Ye = x.ReactDebugCurrentFrame;
|
|
626
|
+
function V(e) {
|
|
626
627
|
if (e) {
|
|
627
|
-
var n = e._owner, o =
|
|
628
|
-
|
|
628
|
+
var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
|
|
629
|
+
Ye.setExtraStackFrame(o);
|
|
629
630
|
} else
|
|
630
|
-
|
|
631
|
+
Ye.setExtraStackFrame(null);
|
|
631
632
|
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
function
|
|
633
|
+
var pe;
|
|
634
|
+
pe = !1;
|
|
635
|
+
function ve(e) {
|
|
635
636
|
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
636
637
|
}
|
|
637
|
-
function
|
|
638
|
+
function Be() {
|
|
638
639
|
{
|
|
639
|
-
if (
|
|
640
|
-
var e = A(
|
|
640
|
+
if (me.current) {
|
|
641
|
+
var e = A(me.current.type);
|
|
641
642
|
if (e)
|
|
642
643
|
return `
|
|
643
644
|
|
|
@@ -646,7 +647,7 @@ Check the render method of \`` + e + "`.";
|
|
|
646
647
|
return "";
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
+
function Ut(e) {
|
|
650
651
|
{
|
|
651
652
|
if (e !== void 0) {
|
|
652
653
|
var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
|
|
@@ -657,10 +658,10 @@ Check your code at ` + n + ":" + o + ".";
|
|
|
657
658
|
return "";
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
|
-
var
|
|
661
|
-
function
|
|
661
|
+
var We = {};
|
|
662
|
+
function Vt(e) {
|
|
662
663
|
{
|
|
663
|
-
var n =
|
|
664
|
+
var n = Be();
|
|
664
665
|
if (!n) {
|
|
665
666
|
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
666
667
|
o && (n = `
|
|
@@ -670,39 +671,39 @@ Check the top-level render call using <` + o + ">.");
|
|
|
670
671
|
return n;
|
|
671
672
|
}
|
|
672
673
|
}
|
|
673
|
-
function
|
|
674
|
+
function He(e, n) {
|
|
674
675
|
{
|
|
675
676
|
if (!e._store || e._store.validated || e.key != null)
|
|
676
677
|
return;
|
|
677
678
|
e._store.validated = !0;
|
|
678
|
-
var o =
|
|
679
|
-
if (
|
|
679
|
+
var o = Vt(n);
|
|
680
|
+
if (We[o])
|
|
680
681
|
return;
|
|
681
|
-
|
|
682
|
+
We[o] = !0;
|
|
682
683
|
var u = "";
|
|
683
|
-
e && e._owner && e._owner !==
|
|
684
|
+
e && e._owner && e._owner !== me.current && (u = " It was passed a child from " + A(e._owner.type) + "."), V(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, u), V(null);
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
|
-
function
|
|
687
|
+
function ze(e, n) {
|
|
687
688
|
{
|
|
688
689
|
if (typeof e != "object")
|
|
689
690
|
return;
|
|
690
|
-
if (
|
|
691
|
+
if (fe(e))
|
|
691
692
|
for (var o = 0; o < e.length; o++) {
|
|
692
693
|
var u = e[o];
|
|
693
|
-
|
|
694
|
+
ve(u) && He(u, n);
|
|
694
695
|
}
|
|
695
|
-
else if (
|
|
696
|
+
else if (ve(e))
|
|
696
697
|
e._store && (e._store.validated = !0);
|
|
697
698
|
else if (e) {
|
|
698
|
-
var v =
|
|
699
|
+
var v = U(e);
|
|
699
700
|
if (typeof v == "function" && v !== e.entries)
|
|
700
|
-
for (var
|
|
701
|
-
|
|
701
|
+
for (var b = v.call(e), m; !(m = b.next()).done; )
|
|
702
|
+
ve(m.value) && He(m.value, n);
|
|
702
703
|
}
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
+
function $t(e) {
|
|
706
707
|
{
|
|
707
708
|
var n = e.type;
|
|
708
709
|
if (n == null || typeof n == "string")
|
|
@@ -712,74 +713,74 @@ Check the top-level render call using <` + o + ">.");
|
|
|
712
713
|
o = n.propTypes;
|
|
713
714
|
else if (typeof n == "object" && (n.$$typeof === c || // Note: Memo only checks outer props here.
|
|
714
715
|
// Inner props are checked in the reconciler.
|
|
715
|
-
n.$$typeof ===
|
|
716
|
+
n.$$typeof === T))
|
|
716
717
|
o = n.propTypes;
|
|
717
718
|
else
|
|
718
719
|
return;
|
|
719
720
|
if (o) {
|
|
720
721
|
var u = A(n);
|
|
721
|
-
|
|
722
|
-
} else if (n.PropTypes !== void 0 && !
|
|
723
|
-
|
|
722
|
+
Ct(o, e.props, "prop", u, e);
|
|
723
|
+
} else if (n.PropTypes !== void 0 && !pe) {
|
|
724
|
+
pe = !0;
|
|
724
725
|
var v = A(n);
|
|
725
|
-
|
|
726
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
726
727
|
}
|
|
727
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved &&
|
|
728
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
728
729
|
}
|
|
729
730
|
}
|
|
730
|
-
function
|
|
731
|
+
function Yt(e) {
|
|
731
732
|
{
|
|
732
733
|
for (var n = Object.keys(e.props), o = 0; o < n.length; o++) {
|
|
733
734
|
var u = n[o];
|
|
734
735
|
if (u !== "children" && u !== "key") {
|
|
735
|
-
|
|
736
|
+
V(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), V(null);
|
|
736
737
|
break;
|
|
737
738
|
}
|
|
738
739
|
}
|
|
739
|
-
e.ref !== null && (
|
|
740
|
+
e.ref !== null && (V(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
|
|
740
741
|
}
|
|
741
742
|
}
|
|
742
|
-
function
|
|
743
|
+
function qe(e, n, o, u, v, b) {
|
|
743
744
|
{
|
|
744
|
-
var
|
|
745
|
-
if (!
|
|
746
|
-
var
|
|
747
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
748
|
-
var C =
|
|
749
|
-
C ?
|
|
750
|
-
var
|
|
751
|
-
e === null ?
|
|
745
|
+
var m = bt(e);
|
|
746
|
+
if (!m) {
|
|
747
|
+
var d = "";
|
|
748
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
749
|
+
var C = Ut(v);
|
|
750
|
+
C ? d += C : d += Be();
|
|
751
|
+
var S;
|
|
752
|
+
e === null ? S = "null" : fe(e) ? S = "array" : e !== void 0 && e.$$typeof === r ? (S = "<" + (A(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, d);
|
|
752
753
|
}
|
|
753
|
-
var
|
|
754
|
-
if (
|
|
755
|
-
return
|
|
756
|
-
if (
|
|
757
|
-
var
|
|
758
|
-
if (
|
|
754
|
+
var R = It(e, n, o, v, b);
|
|
755
|
+
if (R == null)
|
|
756
|
+
return R;
|
|
757
|
+
if (m) {
|
|
758
|
+
var w = n.children;
|
|
759
|
+
if (w !== void 0)
|
|
759
760
|
if (u)
|
|
760
|
-
if (
|
|
761
|
-
for (var
|
|
762
|
-
|
|
763
|
-
Object.freeze && Object.freeze(
|
|
761
|
+
if (fe(w)) {
|
|
762
|
+
for (var $ = 0; $ < w.length; $++)
|
|
763
|
+
ze(w[$], e);
|
|
764
|
+
Object.freeze && Object.freeze(w);
|
|
764
765
|
} else
|
|
765
|
-
|
|
766
|
+
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
766
767
|
else
|
|
767
|
-
|
|
768
|
+
ze(w, e);
|
|
768
769
|
}
|
|
769
|
-
return e === s ?
|
|
770
|
+
return e === s ? Yt(R) : $t(R), R;
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
-
return
|
|
773
|
+
function Bt(e, n, o) {
|
|
774
|
+
return qe(e, n, o, !0);
|
|
774
775
|
}
|
|
775
|
-
function
|
|
776
|
-
return
|
|
776
|
+
function Wt(e, n, o) {
|
|
777
|
+
return qe(e, n, o, !1);
|
|
777
778
|
}
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
}()),
|
|
779
|
+
var Ht = Wt, zt = Bt;
|
|
780
|
+
z.Fragment = s, z.jsx = Ht, z.jsxs = zt;
|
|
781
|
+
}()), z;
|
|
781
782
|
}
|
|
782
|
-
var
|
|
783
|
+
var q = {};
|
|
783
784
|
/**
|
|
784
785
|
* @license React
|
|
785
786
|
* react-jsx-runtime.production.min.js
|
|
@@ -789,173 +790,143 @@ var W = {};
|
|
|
789
790
|
* This source code is licensed under the MIT license found in the
|
|
790
791
|
* LICENSE file in the root directory of this source tree.
|
|
791
792
|
*/
|
|
792
|
-
var
|
|
793
|
-
function
|
|
794
|
-
if (
|
|
795
|
-
return
|
|
796
|
-
|
|
797
|
-
var t =
|
|
798
|
-
function l(
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
for (
|
|
802
|
-
s.call(c,
|
|
803
|
-
if (
|
|
804
|
-
for (
|
|
805
|
-
|
|
806
|
-
return { $$typeof: r, type:
|
|
793
|
+
var Ze;
|
|
794
|
+
function or() {
|
|
795
|
+
if (Ze)
|
|
796
|
+
return q;
|
|
797
|
+
Ze = 1;
|
|
798
|
+
var t = tt, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
799
|
+
function l(E, c, g) {
|
|
800
|
+
var h, T = {}, P = null, p = null;
|
|
801
|
+
g !== void 0 && (P = "" + g), c.key !== void 0 && (P = "" + c.key), c.ref !== void 0 && (p = c.ref);
|
|
802
|
+
for (h in c)
|
|
803
|
+
s.call(c, h) && !f.hasOwnProperty(h) && (T[h] = c[h]);
|
|
804
|
+
if (E && E.defaultProps)
|
|
805
|
+
for (h in c = E.defaultProps, c)
|
|
806
|
+
T[h] === void 0 && (T[h] = c[h]);
|
|
807
|
+
return { $$typeof: r, type: E, key: P, ref: p, props: T, _owner: i.current };
|
|
807
808
|
}
|
|
808
|
-
return
|
|
809
|
+
return q.Fragment = a, q.jsx = l, q.jsxs = l, q;
|
|
809
810
|
}
|
|
810
|
-
process.env.NODE_ENV === "production" ?
|
|
811
|
-
var
|
|
812
|
-
function
|
|
811
|
+
process.env.NODE_ENV === "production" ? be.exports = or() : be.exports = ar();
|
|
812
|
+
var K = be.exports;
|
|
813
|
+
function Zr({
|
|
813
814
|
children: t,
|
|
814
815
|
maps: r,
|
|
815
816
|
externalSync: a
|
|
816
817
|
}) {
|
|
817
|
-
const [s, i] =
|
|
818
|
-
...
|
|
819
|
-
maps: r.reduce((
|
|
820
|
-
...
|
|
818
|
+
const [s, i] = rt(tr, {
|
|
819
|
+
...Z.state,
|
|
820
|
+
maps: r.reduce((p, y) => (p[y.id] = {
|
|
821
|
+
...y,
|
|
821
822
|
isLoaded: !1
|
|
822
|
-
},
|
|
823
|
-
}),
|
|
824
|
-
r.reduce((
|
|
823
|
+
}, p), Z.state.maps)
|
|
824
|
+
}), f = se(
|
|
825
|
+
r.reduce((p, y) => (p[y.id] = {
|
|
825
826
|
instanceRef: {
|
|
826
827
|
current: null
|
|
827
828
|
},
|
|
828
829
|
overlayRef: {
|
|
829
830
|
current: null
|
|
830
831
|
}
|
|
831
|
-
},
|
|
832
|
-
), l =
|
|
833
|
-
(
|
|
834
|
-
r[0].id ===
|
|
835
|
-
type:
|
|
836
|
-
payload:
|
|
832
|
+
}, p), {})
|
|
833
|
+
), l = M(
|
|
834
|
+
(p, y, j) => {
|
|
835
|
+
r[0].id === p && a?.({
|
|
836
|
+
type: y,
|
|
837
|
+
payload: j
|
|
837
838
|
});
|
|
838
839
|
},
|
|
839
840
|
[a, r]
|
|
840
|
-
),
|
|
841
|
-
(
|
|
841
|
+
), E = M(
|
|
842
|
+
(p, y) => {
|
|
842
843
|
i({
|
|
843
|
-
type:
|
|
844
|
+
type: L.SetViewState,
|
|
844
845
|
payload: {
|
|
845
|
-
id:
|
|
846
|
-
viewState:
|
|
846
|
+
id: y,
|
|
847
|
+
viewState: p
|
|
847
848
|
}
|
|
848
|
-
}), l(
|
|
849
|
+
}), l(y, L.SetViewState, p);
|
|
849
850
|
},
|
|
850
851
|
[i, l]
|
|
851
|
-
), c =
|
|
852
|
-
({ height:
|
|
852
|
+
), c = M(
|
|
853
|
+
({ height: p, width: y }, j) => {
|
|
853
854
|
i({
|
|
854
|
-
type:
|
|
855
|
+
type: L.SetResize,
|
|
855
856
|
payload: {
|
|
856
|
-
id:
|
|
857
|
-
height:
|
|
858
|
-
width:
|
|
857
|
+
id: j,
|
|
858
|
+
height: p,
|
|
859
|
+
width: y
|
|
859
860
|
}
|
|
860
|
-
}), l(
|
|
861
|
+
}), l(j, L.SetResize, { height: p, width: y });
|
|
861
862
|
},
|
|
862
863
|
[i, l]
|
|
863
|
-
),
|
|
864
|
-
(
|
|
864
|
+
), g = M(
|
|
865
|
+
(p, y) => {
|
|
865
866
|
i({
|
|
866
|
-
type:
|
|
867
|
+
type: L.SetBasemap,
|
|
867
868
|
payload: {
|
|
868
|
-
id:
|
|
869
|
-
basemap:
|
|
869
|
+
id: y,
|
|
870
|
+
basemap: p
|
|
870
871
|
}
|
|
871
872
|
});
|
|
872
873
|
},
|
|
873
874
|
[i]
|
|
874
|
-
),
|
|
875
|
-
(
|
|
875
|
+
), h = M(
|
|
876
|
+
(p, y) => {
|
|
876
877
|
i({
|
|
877
|
-
type:
|
|
878
|
+
type: L.SetZoom,
|
|
878
879
|
payload: {
|
|
879
|
-
id:
|
|
880
|
-
zoom:
|
|
880
|
+
id: y,
|
|
881
|
+
zoom: p
|
|
881
882
|
}
|
|
882
883
|
});
|
|
883
884
|
},
|
|
884
885
|
[i]
|
|
885
|
-
),
|
|
886
|
-
(
|
|
886
|
+
), T = M(
|
|
887
|
+
(p, y) => {
|
|
887
888
|
i({
|
|
888
|
-
type:
|
|
889
|
+
type: L.SetLoaded,
|
|
889
890
|
payload: {
|
|
890
|
-
id:
|
|
891
|
-
value:
|
|
891
|
+
id: y,
|
|
892
|
+
value: p
|
|
892
893
|
}
|
|
893
894
|
});
|
|
894
895
|
},
|
|
895
896
|
[i]
|
|
896
|
-
),
|
|
897
|
-
setViewState:
|
|
898
|
-
setBasemap:
|
|
897
|
+
), P = se({
|
|
898
|
+
setViewState: E,
|
|
899
|
+
setBasemap: g,
|
|
899
900
|
setResize: c,
|
|
900
|
-
setZoom:
|
|
901
|
-
setLoaded:
|
|
901
|
+
setZoom: h,
|
|
902
|
+
setLoaded: T
|
|
902
903
|
});
|
|
903
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ K.jsx(it.Provider, { value: P.current, children: /* @__PURE__ */ K.jsx(ot.Provider, { value: f, children: /* @__PURE__ */ K.jsx(at.Provider, { value: s, children: t }) }) });
|
|
904
905
|
}
|
|
905
|
-
var
|
|
906
|
-
|
|
907
|
-
handleClick(r, a) {
|
|
908
|
-
super.handleClick(r, a), a.onEdit({
|
|
909
|
-
// data is the same
|
|
910
|
-
updatedData: a.data,
|
|
911
|
-
editType: G.AddPosition,
|
|
912
|
-
editContext: {
|
|
913
|
-
distance: this._currentDistance
|
|
914
|
-
}
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
handleKeyUp(r, a) {
|
|
918
|
-
if (this._isMeasuringSessionFinished)
|
|
919
|
-
return;
|
|
920
|
-
r.stopPropagation();
|
|
921
|
-
const { key: s } = r, i = this.getClickSequence().length;
|
|
922
|
-
switch (s) {
|
|
923
|
-
case "Enter":
|
|
924
|
-
case "Escape":
|
|
925
|
-
this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
|
|
926
|
-
updatedData: a.data,
|
|
927
|
-
editType: G.Finish,
|
|
928
|
-
editContext: {
|
|
929
|
-
finished: this._isMeasuringSessionFinished
|
|
930
|
-
}
|
|
931
|
-
});
|
|
932
|
-
break;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
const He = [
|
|
906
|
+
var O = /* @__PURE__ */ ((t) => (t.milimeter = "milimeter", t.centimeter = "centimeter", t.meter = "meter", t.kilometer = "kilometer", t.mile = "mile", t.feet = "feet", t))(O || {}), ir = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(ir || {}), J = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(J || {});
|
|
907
|
+
const Je = [
|
|
937
908
|
"anyclick",
|
|
938
909
|
"pointermove",
|
|
939
910
|
"panstart",
|
|
940
911
|
"panmove",
|
|
941
912
|
"panend",
|
|
942
913
|
"keyup"
|
|
943
|
-
],
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
pickable: !0,
|
|
914
|
+
], sr = "mapMeasureLayer", cr = {
|
|
915
|
+
id: sr,
|
|
916
|
+
pickable: !1,
|
|
947
917
|
billboard: !1,
|
|
948
918
|
editHandlePointRadiusUnits: "pixels",
|
|
949
|
-
editHandlePointStrokeWidth: 2,
|
|
950
919
|
editHandlePointRadiusMinPixels: 1,
|
|
951
920
|
editHandlePointRadiusMaxPixels: 12,
|
|
921
|
+
lineWidthMinPixels: 2,
|
|
922
|
+
editHandlePointStrokeWidth: 3,
|
|
952
923
|
getEditHandlePointRadius: 3,
|
|
953
924
|
_subLayerProps: {
|
|
954
925
|
tooltips: {
|
|
955
926
|
fontFamily: "Open Sans, Inter, sans-serif",
|
|
956
927
|
fontWeight: "lighter",
|
|
957
|
-
getSize:
|
|
958
|
-
lineHeight:
|
|
928
|
+
getSize: 11,
|
|
929
|
+
lineHeight: 1.4545,
|
|
959
930
|
getPixelOffset: [0, 20],
|
|
960
931
|
getTextAnchor: "middle",
|
|
961
932
|
getAlignmentBaseline: "center",
|
|
@@ -966,15 +937,41 @@ const He = [
|
|
|
966
937
|
getLineWidth: 2
|
|
967
938
|
}
|
|
968
939
|
}
|
|
940
|
+
}, _e = {
|
|
941
|
+
editing: [71, 219, 153, 255],
|
|
942
|
+
finished: [49, 153, 107, 255]
|
|
943
|
+
}, ye = {
|
|
944
|
+
locale: "en",
|
|
945
|
+
getColumnName: "<b>Total distance</b> ",
|
|
946
|
+
styles: {
|
|
947
|
+
colors: {
|
|
948
|
+
editing: _e.editing,
|
|
949
|
+
finished: _e.finished
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}, Xe = {
|
|
953
|
+
[O.kilometer]: "km",
|
|
954
|
+
[O.centimeter]: "cm",
|
|
955
|
+
[O.milimeter]: "mm",
|
|
956
|
+
[O.mile]: "mi",
|
|
957
|
+
[O.meter]: "m",
|
|
958
|
+
[O.feet]: "ft"
|
|
959
|
+
}, ur = {
|
|
960
|
+
[O.kilometer]: "kilometer",
|
|
961
|
+
[O.centimeter]: "centimeter",
|
|
962
|
+
[O.milimeter]: "millimeter",
|
|
963
|
+
[O.mile]: "mile",
|
|
964
|
+
[O.meter]: "meter",
|
|
965
|
+
[O.feet]: "foot"
|
|
969
966
|
};
|
|
970
|
-
class
|
|
967
|
+
class lr extends Kt {
|
|
971
968
|
eventManager;
|
|
972
969
|
constructor(r) {
|
|
973
970
|
super(r), this.eventManager = r.eventManager;
|
|
974
971
|
}
|
|
975
972
|
_addEventHandlers() {
|
|
976
973
|
const r = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
|
|
977
|
-
for (const s of
|
|
974
|
+
for (const s of Je)
|
|
978
975
|
r.on(s, a, {
|
|
979
976
|
// give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
|
|
980
977
|
priority: 100
|
|
@@ -982,14 +979,50 @@ class or extends Ht {
|
|
|
982
979
|
}
|
|
983
980
|
_removeEventHandlers(r = void 0) {
|
|
984
981
|
const a = r || this._getEventManager(), { eventHandler: s } = this.state._editableLayerState;
|
|
985
|
-
for (const i of
|
|
982
|
+
for (const i of Je)
|
|
986
983
|
a.off(i, s);
|
|
987
984
|
}
|
|
988
985
|
_getEventManager() {
|
|
989
986
|
return this.eventManager || this.context.deck.eventManager;
|
|
990
987
|
}
|
|
991
988
|
}
|
|
992
|
-
|
|
989
|
+
class fr extends Zt {
|
|
990
|
+
handleClick(r, a) {
|
|
991
|
+
super.handleClick(r, a), a.onEdit({
|
|
992
|
+
// data is the same
|
|
993
|
+
updatedData: a.data,
|
|
994
|
+
editType: J.AddPosition,
|
|
995
|
+
editContext: {
|
|
996
|
+
distance: this._currentDistance
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
handleKeyUp(r, a) {
|
|
1001
|
+
if (this._isMeasuringSessionFinished)
|
|
1002
|
+
return;
|
|
1003
|
+
r.stopPropagation();
|
|
1004
|
+
const { key: s } = r, i = this.getClickSequence().length;
|
|
1005
|
+
switch (s) {
|
|
1006
|
+
case "Enter":
|
|
1007
|
+
case "Escape":
|
|
1008
|
+
this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
|
|
1009
|
+
updatedData: a.data,
|
|
1010
|
+
editType: J.Finish,
|
|
1011
|
+
editContext: {
|
|
1012
|
+
finished: this._isMeasuringSessionFinished
|
|
1013
|
+
}
|
|
1014
|
+
});
|
|
1015
|
+
break;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
function dr(t) {
|
|
1020
|
+
return Ee[t]?.type;
|
|
1021
|
+
}
|
|
1022
|
+
function mr(t) {
|
|
1023
|
+
return dr(t) === nt.GoogleMaps;
|
|
1024
|
+
}
|
|
1025
|
+
const ct = {
|
|
993
1026
|
NUMBER: {
|
|
994
1027
|
style: "decimal",
|
|
995
1028
|
maximumFractionDigits: 1,
|
|
@@ -1011,204 +1044,321 @@ const nt = {
|
|
|
1011
1044
|
day: "2-digit"
|
|
1012
1045
|
}
|
|
1013
1046
|
};
|
|
1014
|
-
function
|
|
1047
|
+
function ut(t, r, a) {
|
|
1015
1048
|
return Intl.NumberFormat(r, a).format(t);
|
|
1016
1049
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
1050
|
+
function lt(t, r, a = {}) {
|
|
1051
|
+
return ut(t, r, { ...ct.NUMBER, ...a });
|
|
1019
1052
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1053
|
+
function pr(t, r, a = {}) {
|
|
1054
|
+
return ut(t, r, { ...ct.CURRENCY, ...a });
|
|
1022
1055
|
}
|
|
1023
|
-
var
|
|
1024
|
-
const
|
|
1025
|
-
[
|
|
1026
|
-
type:
|
|
1027
|
-
format: (t, r) =>
|
|
1056
|
+
var N = /* @__PURE__ */ ((t) => (t.CURRENCY = "CURRENCY", t.DEFAULT = "DEFAULT", t.NUMBER = "NUMBER", t))(N || {});
|
|
1057
|
+
const Qe = {
|
|
1058
|
+
[N.CURRENCY]: {
|
|
1059
|
+
type: N.CURRENCY,
|
|
1060
|
+
format: (t, r) => pr(t, r)
|
|
1028
1061
|
},
|
|
1029
|
-
[
|
|
1030
|
-
type:
|
|
1031
|
-
format: (t, r) =>
|
|
1062
|
+
[N.NUMBER]: {
|
|
1063
|
+
type: N.NUMBER,
|
|
1064
|
+
format: (t, r) => lt(t, r)
|
|
1032
1065
|
},
|
|
1033
|
-
[
|
|
1034
|
-
type:
|
|
1066
|
+
[N.DEFAULT]: {
|
|
1067
|
+
type: N.DEFAULT,
|
|
1035
1068
|
format: (t) => t.toLocaleString()
|
|
1036
1069
|
}
|
|
1037
1070
|
};
|
|
1038
|
-
function
|
|
1071
|
+
function vr({
|
|
1039
1072
|
properties: t,
|
|
1040
1073
|
formatters: r = {},
|
|
1041
1074
|
includeColumns: a = Object.keys(t),
|
|
1042
1075
|
locale: s = "en-US",
|
|
1043
1076
|
showColumnName: i = !0,
|
|
1044
|
-
title:
|
|
1045
|
-
getColumnName: l =
|
|
1046
|
-
getFieldHtml:
|
|
1047
|
-
getTitle: c =
|
|
1048
|
-
getValue:
|
|
1077
|
+
title: f,
|
|
1078
|
+
getColumnName: l = br,
|
|
1079
|
+
getFieldHtml: E = yr,
|
|
1080
|
+
getTitle: c = gr,
|
|
1081
|
+
getValue: g = hr
|
|
1049
1082
|
}) {
|
|
1050
|
-
const
|
|
1051
|
-
const
|
|
1052
|
-
return
|
|
1083
|
+
const h = f ? c(f) : "", P = a.reduce((p, y) => {
|
|
1084
|
+
const j = r[y], U = t[y], x = g(U, s, j), _ = i ? l(y) : "";
|
|
1085
|
+
return p + E(_, x);
|
|
1053
1086
|
}, "");
|
|
1054
|
-
return
|
|
1087
|
+
return h + P;
|
|
1055
1088
|
}
|
|
1056
|
-
function
|
|
1089
|
+
function gr(t) {
|
|
1057
1090
|
return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
|
|
1058
1091
|
}
|
|
1059
|
-
function
|
|
1092
|
+
function yr(t, r) {
|
|
1060
1093
|
return `${t}${r}</br>`;
|
|
1061
1094
|
}
|
|
1062
|
-
function
|
|
1095
|
+
function hr(t, r, a) {
|
|
1063
1096
|
try {
|
|
1064
|
-
return
|
|
1097
|
+
return Er(a)(t, r);
|
|
1065
1098
|
} catch {
|
|
1066
1099
|
return t;
|
|
1067
1100
|
}
|
|
1068
1101
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return typeof t == "function" ? t : (t &&
|
|
1102
|
+
function Er(t) {
|
|
1103
|
+
return typeof t == "function" ? t : (t && Qe[t] || Qe[N.DEFAULT]).format;
|
|
1071
1104
|
}
|
|
1072
|
-
function
|
|
1105
|
+
function br(t) {
|
|
1073
1106
|
return `<strong>${t}</strong>: `;
|
|
1074
1107
|
}
|
|
1075
|
-
var
|
|
1076
|
-
return
|
|
1108
|
+
var _r = function(r) {
|
|
1109
|
+
return Sr(r) && !Rr(r);
|
|
1077
1110
|
};
|
|
1078
|
-
function
|
|
1111
|
+
function Sr(t) {
|
|
1079
1112
|
return !!t && typeof t == "object";
|
|
1080
1113
|
}
|
|
1081
|
-
function
|
|
1114
|
+
function Rr(t) {
|
|
1082
1115
|
var r = Object.prototype.toString.call(t);
|
|
1083
|
-
return r === "[object RegExp]" || r === "[object Date]" ||
|
|
1116
|
+
return r === "[object RegExp]" || r === "[object Date]" || Pr(t);
|
|
1084
1117
|
}
|
|
1085
|
-
var
|
|
1086
|
-
function
|
|
1087
|
-
return t.$$typeof ===
|
|
1118
|
+
var Tr = typeof Symbol == "function" && Symbol.for, Mr = Tr ? Symbol.for("react.element") : 60103;
|
|
1119
|
+
function Pr(t) {
|
|
1120
|
+
return t.$$typeof === Mr;
|
|
1088
1121
|
}
|
|
1089
|
-
function
|
|
1122
|
+
function Cr(t) {
|
|
1090
1123
|
return Array.isArray(t) ? [] : {};
|
|
1091
1124
|
}
|
|
1092
|
-
function
|
|
1093
|
-
return r.clone !== !1 && r.isMergeableObject(t) ?
|
|
1125
|
+
function X(t, r) {
|
|
1126
|
+
return r.clone !== !1 && r.isMergeableObject(t) ? Y(Cr(t), t, r) : t;
|
|
1094
1127
|
}
|
|
1095
|
-
function
|
|
1128
|
+
function Or(t, r, a) {
|
|
1096
1129
|
return t.concat(r).map(function(s) {
|
|
1097
|
-
return
|
|
1130
|
+
return X(s, a);
|
|
1098
1131
|
});
|
|
1099
1132
|
}
|
|
1100
|
-
function
|
|
1133
|
+
function wr(t, r) {
|
|
1101
1134
|
if (!r.customMerge)
|
|
1102
|
-
return
|
|
1135
|
+
return Y;
|
|
1103
1136
|
var a = r.customMerge(t);
|
|
1104
|
-
return typeof a == "function" ? a :
|
|
1137
|
+
return typeof a == "function" ? a : Y;
|
|
1105
1138
|
}
|
|
1106
|
-
function
|
|
1139
|
+
function jr(t) {
|
|
1107
1140
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
|
|
1108
1141
|
return Object.propertyIsEnumerable.call(t, r);
|
|
1109
1142
|
}) : [];
|
|
1110
1143
|
}
|
|
1111
|
-
function
|
|
1112
|
-
return Object.keys(t).concat(
|
|
1144
|
+
function et(t) {
|
|
1145
|
+
return Object.keys(t).concat(jr(t));
|
|
1113
1146
|
}
|
|
1114
|
-
function
|
|
1147
|
+
function ft(t, r) {
|
|
1115
1148
|
try {
|
|
1116
1149
|
return r in t;
|
|
1117
1150
|
} catch {
|
|
1118
1151
|
return !1;
|
|
1119
1152
|
}
|
|
1120
1153
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return
|
|
1154
|
+
function xr(t, r) {
|
|
1155
|
+
return ft(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
|
|
1123
1156
|
}
|
|
1124
|
-
function
|
|
1157
|
+
function Ar(t, r, a) {
|
|
1125
1158
|
var s = {};
|
|
1126
|
-
return a.isMergeableObject(t) &&
|
|
1127
|
-
s[i] =
|
|
1128
|
-
}),
|
|
1129
|
-
|
|
1159
|
+
return a.isMergeableObject(t) && et(t).forEach(function(i) {
|
|
1160
|
+
s[i] = X(t[i], a);
|
|
1161
|
+
}), et(r).forEach(function(i) {
|
|
1162
|
+
xr(t, i) || (ft(t, i) && a.isMergeableObject(r[i]) ? s[i] = wr(i, a)(t[i], r[i], a) : s[i] = X(r[i], a));
|
|
1130
1163
|
}), s;
|
|
1131
1164
|
}
|
|
1132
|
-
function
|
|
1133
|
-
a = a || {}, a.arrayMerge = a.arrayMerge ||
|
|
1134
|
-
var s = Array.isArray(r), i = Array.isArray(t),
|
|
1135
|
-
return
|
|
1165
|
+
function Y(t, r, a) {
|
|
1166
|
+
a = a || {}, a.arrayMerge = a.arrayMerge || Or, a.isMergeableObject = a.isMergeableObject || _r, a.cloneUnlessOtherwiseSpecified = X;
|
|
1167
|
+
var s = Array.isArray(r), i = Array.isArray(t), f = s === i;
|
|
1168
|
+
return f ? s ? a.arrayMerge(t, r, a) : Ar(t, r, a) : X(r, a);
|
|
1136
1169
|
}
|
|
1137
|
-
|
|
1170
|
+
Y.all = function(r, a) {
|
|
1138
1171
|
if (!Array.isArray(r))
|
|
1139
1172
|
throw new Error("first argument should be an array");
|
|
1140
1173
|
return r.reduce(function(s, i) {
|
|
1141
|
-
return
|
|
1174
|
+
return Y(s, i, a);
|
|
1142
1175
|
}, {});
|
|
1143
1176
|
};
|
|
1144
|
-
var
|
|
1145
|
-
const
|
|
1177
|
+
var Dr = Y, Fr = Dr;
|
|
1178
|
+
const he = /* @__PURE__ */ nr(Fr), ie = () => {
|
|
1146
1179
|
throw new Error(
|
|
1147
1180
|
"You forgot to wrap your component in <MeasurementToolsProvider>."
|
|
1148
1181
|
);
|
|
1149
|
-
},
|
|
1182
|
+
}, Re = {
|
|
1150
1183
|
state: {
|
|
1151
1184
|
enable: !1,
|
|
1152
1185
|
finished: !0,
|
|
1153
1186
|
distance: 0,
|
|
1154
|
-
unit:
|
|
1187
|
+
unit: O.kilometer
|
|
1155
1188
|
},
|
|
1156
1189
|
actions: {
|
|
1157
|
-
setEnable:
|
|
1158
|
-
setFinished:
|
|
1159
|
-
setUnit:
|
|
1160
|
-
setDistance:
|
|
1190
|
+
setEnable: ie,
|
|
1191
|
+
setFinished: ie,
|
|
1192
|
+
setUnit: ie,
|
|
1193
|
+
setDistance: ie
|
|
1161
1194
|
}
|
|
1162
|
-
},
|
|
1163
|
-
function
|
|
1164
|
-
return
|
|
1165
|
-
|
|
1195
|
+
}, dt = Q(Re.state), mt = Q(Re.actions);
|
|
1196
|
+
function pt() {
|
|
1197
|
+
return ee(
|
|
1198
|
+
dt
|
|
1166
1199
|
);
|
|
1167
1200
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return
|
|
1170
|
-
|
|
1201
|
+
function vt() {
|
|
1202
|
+
return ee(
|
|
1203
|
+
mt
|
|
1171
1204
|
);
|
|
1172
1205
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1206
|
+
const kr = {
|
|
1207
|
+
nm: {
|
|
1208
|
+
name: {
|
|
1209
|
+
singular: "Nanometer",
|
|
1210
|
+
plural: "Nanometers"
|
|
1211
|
+
},
|
|
1212
|
+
to_anchor: 1e-9
|
|
1213
|
+
},
|
|
1214
|
+
μm: {
|
|
1215
|
+
name: {
|
|
1216
|
+
singular: "Micrometer",
|
|
1217
|
+
plural: "Micrometers"
|
|
1218
|
+
},
|
|
1219
|
+
to_anchor: 1e-6
|
|
1220
|
+
},
|
|
1221
|
+
mm: {
|
|
1222
|
+
name: {
|
|
1223
|
+
singular: "Millimeter",
|
|
1224
|
+
plural: "Millimeters"
|
|
1225
|
+
},
|
|
1226
|
+
to_anchor: 1e-3
|
|
1227
|
+
},
|
|
1228
|
+
cm: {
|
|
1229
|
+
name: {
|
|
1230
|
+
singular: "Centimeter",
|
|
1231
|
+
plural: "Centimeters"
|
|
1232
|
+
},
|
|
1233
|
+
to_anchor: 0.01
|
|
1234
|
+
},
|
|
1235
|
+
m: {
|
|
1236
|
+
name: {
|
|
1237
|
+
singular: "Meter",
|
|
1238
|
+
plural: "Meters"
|
|
1239
|
+
},
|
|
1240
|
+
to_anchor: 1
|
|
1241
|
+
},
|
|
1242
|
+
km: {
|
|
1243
|
+
name: {
|
|
1244
|
+
singular: "Kilometer",
|
|
1245
|
+
plural: "Kilometers"
|
|
1246
|
+
},
|
|
1247
|
+
to_anchor: 1e3
|
|
1248
|
+
}
|
|
1249
|
+
}, Lr = {
|
|
1250
|
+
mil: {
|
|
1251
|
+
name: {
|
|
1252
|
+
singular: "Mil",
|
|
1253
|
+
plural: "Mils"
|
|
1254
|
+
},
|
|
1255
|
+
to_anchor: 1 / 12e3
|
|
1256
|
+
},
|
|
1257
|
+
in: {
|
|
1258
|
+
name: {
|
|
1259
|
+
singular: "Inch",
|
|
1260
|
+
plural: "Inches"
|
|
1261
|
+
},
|
|
1262
|
+
to_anchor: 1 / 12
|
|
1263
|
+
},
|
|
1264
|
+
yd: {
|
|
1265
|
+
name: {
|
|
1266
|
+
singular: "Yard",
|
|
1267
|
+
plural: "Yards"
|
|
1268
|
+
},
|
|
1269
|
+
to_anchor: 3
|
|
1270
|
+
},
|
|
1271
|
+
"ft-us": {
|
|
1272
|
+
name: {
|
|
1273
|
+
singular: "US Survey Foot",
|
|
1274
|
+
plural: "US Survey Feet"
|
|
1275
|
+
},
|
|
1276
|
+
to_anchor: 1.000002
|
|
1277
|
+
},
|
|
1278
|
+
ft: {
|
|
1279
|
+
name: {
|
|
1280
|
+
singular: "Foot",
|
|
1281
|
+
plural: "Feet"
|
|
1282
|
+
},
|
|
1283
|
+
to_anchor: 1
|
|
1284
|
+
},
|
|
1285
|
+
fathom: {
|
|
1286
|
+
name: {
|
|
1287
|
+
singular: "Fathom",
|
|
1288
|
+
plural: "Fathoms"
|
|
1289
|
+
},
|
|
1290
|
+
to_anchor: 6
|
|
1291
|
+
},
|
|
1292
|
+
mi: {
|
|
1293
|
+
name: {
|
|
1294
|
+
singular: "Mile",
|
|
1295
|
+
plural: "Miles"
|
|
1296
|
+
},
|
|
1297
|
+
to_anchor: 5280
|
|
1298
|
+
},
|
|
1299
|
+
nMi: {
|
|
1300
|
+
name: {
|
|
1301
|
+
singular: "Nautical Mile",
|
|
1302
|
+
plural: "Nautical Miles"
|
|
1303
|
+
},
|
|
1304
|
+
to_anchor: 6076.12
|
|
1305
|
+
}
|
|
1306
|
+
}, Nr = {
|
|
1307
|
+
systems: {
|
|
1308
|
+
metric: kr,
|
|
1309
|
+
imperial: Lr
|
|
1310
|
+
},
|
|
1311
|
+
anchors: {
|
|
1312
|
+
metric: {
|
|
1313
|
+
imperial: {
|
|
1314
|
+
ratio: 3.28084
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
imperial: {
|
|
1318
|
+
metric: {
|
|
1319
|
+
ratio: 1 / 3.28084
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}, Ir = Xt({
|
|
1324
|
+
length: Nr
|
|
1325
|
+
});
|
|
1326
|
+
function Ur(t, r) {
|
|
1327
|
+
return Ir(t).from(Xe[O.kilometer]).to(Xe[r]);
|
|
1176
1328
|
}
|
|
1177
|
-
function
|
|
1329
|
+
function gt({
|
|
1178
1330
|
text: t,
|
|
1179
1331
|
unit: r,
|
|
1180
1332
|
locale: a
|
|
1181
1333
|
}) {
|
|
1182
|
-
return `${
|
|
1334
|
+
return `${lt(Ur(t, r), a, {
|
|
1183
1335
|
style: "unit",
|
|
1184
|
-
unit: r
|
|
1336
|
+
unit: ur[r]
|
|
1185
1337
|
})}`;
|
|
1186
1338
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return ve[t]?.type;
|
|
1189
|
-
}
|
|
1190
|
-
function Cr(t) {
|
|
1191
|
-
return Pr(t) === Xe.GoogleMaps;
|
|
1192
|
-
}
|
|
1193
|
-
function Ur({
|
|
1339
|
+
function Jr({
|
|
1194
1340
|
mapId: t,
|
|
1195
|
-
defaultProps: {
|
|
1196
|
-
|
|
1341
|
+
defaultProps: {
|
|
1342
|
+
locale: r = ye.locale,
|
|
1343
|
+
getColumnName: a,
|
|
1344
|
+
styles: s = ye.styles
|
|
1345
|
+
} = {
|
|
1346
|
+
getColumnName: ye.getColumnName
|
|
1197
1347
|
},
|
|
1198
|
-
layerProps:
|
|
1348
|
+
layerProps: i = {}
|
|
1199
1349
|
}) {
|
|
1200
|
-
const {
|
|
1201
|
-
if (!
|
|
1350
|
+
const { enable: f, unit: l, finished: E } = pt(), { setDistance: c, setFinished: g } = vt(), { isLoaded: h, basemap: T } = st(t), { getOverlayInstance: P } = Se(t), p = se(), y = qt(() => {
|
|
1351
|
+
if (!h || !mr(T))
|
|
1202
1352
|
return null;
|
|
1203
|
-
const
|
|
1204
|
-
return new
|
|
1205
|
-
}, [
|
|
1206
|
-
(
|
|
1207
|
-
|
|
1353
|
+
const F = P()?.getDiv();
|
|
1354
|
+
return new Jt(F, {});
|
|
1355
|
+
}, [h, P, T]), j = E ? s.colors?.finished : s.colors?.editing, U = M(
|
|
1356
|
+
(F, k) => {
|
|
1357
|
+
F.html = vr({
|
|
1208
1358
|
properties: {
|
|
1209
|
-
distance:
|
|
1210
|
-
text:
|
|
1211
|
-
locale:
|
|
1359
|
+
distance: gt({
|
|
1360
|
+
text: k.distance,
|
|
1361
|
+
locale: k.locale,
|
|
1212
1362
|
unit: l
|
|
1213
1363
|
})
|
|
1214
1364
|
},
|
|
@@ -1216,45 +1366,71 @@ function Ur({
|
|
|
1216
1366
|
});
|
|
1217
1367
|
},
|
|
1218
1368
|
[a, l]
|
|
1369
|
+
), x = M(
|
|
1370
|
+
({ editType: F, editContext: k }) => {
|
|
1371
|
+
F === J.AddPosition ? c(k.distance) : F === J.Finish && g(k.finished);
|
|
1372
|
+
},
|
|
1373
|
+
[c, g]
|
|
1219
1374
|
);
|
|
1220
|
-
if (
|
|
1375
|
+
if (Gt(() => {
|
|
1376
|
+
f || (p.current = void 0);
|
|
1377
|
+
}, [f]), !f || !h)
|
|
1221
1378
|
return null;
|
|
1222
|
-
const
|
|
1379
|
+
const _ = Vr(
|
|
1380
|
+
i,
|
|
1381
|
+
r,
|
|
1382
|
+
l,
|
|
1383
|
+
U,
|
|
1384
|
+
x,
|
|
1385
|
+
j || _e.guide
|
|
1386
|
+
);
|
|
1387
|
+
return !p.current && !_.mode && (p.current = new fr()), new lr({
|
|
1388
|
+
..._,
|
|
1389
|
+
mode: _?.mode || p.current,
|
|
1390
|
+
eventManager: y
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
function Vr(t, r, a, s, i, f) {
|
|
1394
|
+
const l = he(t, {
|
|
1223
1395
|
modeConfig: {
|
|
1224
1396
|
// We force distance due to conversion is addressed at feature getText level
|
|
1225
|
-
formatTooltip: (
|
|
1226
|
-
},
|
|
1227
|
-
onHover: (T) => (s?.onHover || m)(T, { distance: i, locale: r, unit: l }),
|
|
1228
|
-
onEdit: ({ editType: T, editContext: P }) => {
|
|
1229
|
-
T === G.AddPosition && h(P.distance), T === G.Finish && c(!0);
|
|
1397
|
+
formatTooltip: (g) => g
|
|
1230
1398
|
},
|
|
1399
|
+
onHover: s,
|
|
1400
|
+
onEdit: i,
|
|
1231
1401
|
_subLayerProps: {
|
|
1232
1402
|
tooltips: {
|
|
1233
|
-
getText: (
|
|
1403
|
+
getText: (g) => gt({ ...g, locale: r, unit: a }),
|
|
1234
1404
|
updateTriggers: {
|
|
1235
|
-
getText: [
|
|
1405
|
+
getText: [a, r]
|
|
1236
1406
|
}
|
|
1237
1407
|
}
|
|
1238
1408
|
}
|
|
1239
|
-
}),
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1409
|
+
}), E = he(cr, {
|
|
1410
|
+
_subLayerProps: {
|
|
1411
|
+
guides: {
|
|
1412
|
+
getLineColor: f,
|
|
1413
|
+
getFillColor: f
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
getEditHandlePointColor: f,
|
|
1417
|
+
getEditHandlePointOutlineColor: f
|
|
1243
1418
|
});
|
|
1419
|
+
return he(E, l);
|
|
1244
1420
|
}
|
|
1245
|
-
function
|
|
1246
|
-
const { distance: r, enable: a, unit: s } =
|
|
1421
|
+
function Xr({ children: t }) {
|
|
1422
|
+
const { distance: r, enable: a, unit: s } = pt(), { setDistance: i, setEnable: f } = vt();
|
|
1247
1423
|
return t({
|
|
1248
1424
|
enable: a,
|
|
1249
1425
|
distance: r,
|
|
1250
1426
|
unit: s,
|
|
1251
1427
|
onToggleButton: () => {
|
|
1252
|
-
i(0),
|
|
1428
|
+
i(0), f(!a);
|
|
1253
1429
|
}
|
|
1254
1430
|
});
|
|
1255
1431
|
}
|
|
1256
|
-
var
|
|
1257
|
-
function
|
|
1432
|
+
var G = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(G || {});
|
|
1433
|
+
function $r(t, { type: r, payload: a }) {
|
|
1258
1434
|
return {
|
|
1259
1435
|
SET_ENABLE: () => ({
|
|
1260
1436
|
...t,
|
|
@@ -1275,73 +1451,77 @@ function jr(t, { type: r, payload: a }) {
|
|
|
1275
1451
|
})
|
|
1276
1452
|
}[r]?.() ?? t;
|
|
1277
1453
|
}
|
|
1278
|
-
function
|
|
1454
|
+
function Qr({
|
|
1279
1455
|
children: t
|
|
1280
1456
|
}) {
|
|
1281
|
-
const [r, a] =
|
|
1457
|
+
const [r, a] = rt($r, Re.state), s = M(
|
|
1282
1458
|
(c) => {
|
|
1283
|
-
a({ type:
|
|
1459
|
+
a({ type: G.SetEnable, payload: c });
|
|
1284
1460
|
},
|
|
1285
1461
|
[a]
|
|
1286
|
-
), i =
|
|
1462
|
+
), i = M(
|
|
1287
1463
|
(c) => {
|
|
1288
|
-
a({ type:
|
|
1464
|
+
a({ type: G.SetFinished, payload: c });
|
|
1289
1465
|
},
|
|
1290
1466
|
[a]
|
|
1291
|
-
),
|
|
1467
|
+
), f = M(
|
|
1292
1468
|
(c) => {
|
|
1293
|
-
a({ type:
|
|
1469
|
+
a({ type: G.SetDistance, payload: c });
|
|
1294
1470
|
},
|
|
1295
1471
|
[a]
|
|
1296
|
-
), l =
|
|
1472
|
+
), l = M(
|
|
1297
1473
|
(c) => {
|
|
1298
|
-
a({ type:
|
|
1474
|
+
a({ type: G.SetUnit, payload: c });
|
|
1299
1475
|
},
|
|
1300
1476
|
[a]
|
|
1301
|
-
),
|
|
1477
|
+
), E = se({
|
|
1302
1478
|
setEnable: s,
|
|
1303
1479
|
setFinished: i,
|
|
1304
|
-
setDistance:
|
|
1480
|
+
setDistance: f,
|
|
1305
1481
|
setUnit: l
|
|
1306
1482
|
});
|
|
1307
|
-
return /* @__PURE__ */
|
|
1483
|
+
return /* @__PURE__ */ K.jsx(mt.Provider, { value: E.current, children: /* @__PURE__ */ K.jsx(dt.Provider, { value: r, children: t }) });
|
|
1308
1484
|
}
|
|
1309
1485
|
export {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1486
|
+
Xe as CONVERSIONS_UNITS,
|
|
1487
|
+
ge as CartoBasemapURL,
|
|
1488
|
+
er as CartoBasemapsNames,
|
|
1489
|
+
lr as CustomEditableGeojsonLayer,
|
|
1490
|
+
fr as CustomMeasureDistanceMode,
|
|
1491
|
+
_e as DEFAULT_COLORS,
|
|
1492
|
+
cr as DEFAULT_LAYER_PROPS,
|
|
1493
|
+
ye as DEFAULT_PROPS,
|
|
1494
|
+
Je as EVENT_MANAGER_EVENT_TYPES,
|
|
1495
|
+
J as EditType,
|
|
1496
|
+
N as FormatterTypes,
|
|
1497
|
+
Qt as GMapsBasemap,
|
|
1498
|
+
ur as INTL_UNITS,
|
|
1499
|
+
Ee as MAPS_BASEMAP,
|
|
1500
|
+
sr as MAP_MEASURE_LAYER_ID,
|
|
1501
|
+
L as MapActions,
|
|
1502
|
+
it as MapActionsContext,
|
|
1503
|
+
at as MapContext,
|
|
1504
|
+
Xr as MapMeasurementTools,
|
|
1505
|
+
Jr as MapMeasurementToolsLayer,
|
|
1506
|
+
Qr as MapMeasurementToolsProvider,
|
|
1507
|
+
O as MapMeasurementUnit,
|
|
1508
|
+
ir as MapMeasurementUnitTurf,
|
|
1509
|
+
Zr as MapProvider,
|
|
1510
|
+
ot as MapReferencesContext,
|
|
1511
|
+
nt as MapsTypes,
|
|
1512
|
+
Ur as convertKmTo,
|
|
1513
|
+
dr as getMapType,
|
|
1514
|
+
gt as getTextLayerFormattedDistance,
|
|
1515
|
+
mr as isGmaps,
|
|
1516
|
+
vr as objectToHtml,
|
|
1517
|
+
tr as reducer,
|
|
1518
|
+
st as useMap,
|
|
1519
|
+
rr as useMapActions,
|
|
1520
|
+
Kr as useMapActionsByID,
|
|
1521
|
+
qr as useMapByID,
|
|
1522
|
+
pt as useMapMeasurementTools,
|
|
1523
|
+
vt as useMapMeasurementToolsActions,
|
|
1524
|
+
Se as useMapRefences,
|
|
1525
|
+
Se as useMapReferences,
|
|
1526
|
+
Gr as useMapReferencesByID
|
|
1347
1527
|
};
|