@carto/ps-react-maps 1.3.3-alpha.0 → 1.3.3-alpha.1

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 CHANGED
@@ -1,8 +1,8 @@
1
- import Je, { createContext as J, useContext as K, useCallback as M, useReducer as Ke, useRef as pe, useMemo as Yt } from "react";
2
- import { EditableGeoJsonLayer as Bt } from "@nebula.gl/layers";
3
- import { MeasureDistanceMode as Wt } from "@nebula.gl/edit-modes";
4
- import { EventManager as Ht } from "mjolnir.js";
5
- var zt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(zt || {}), qt = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(qt || {});
1
+ import Je, { createContext as J, useContext as K, useCallback as w, useReducer as Ke, useRef as pe, useMemo as Wt } from "react";
2
+ import { EditableGeoJsonLayer as Ht } from "@nebula.gl/layers";
3
+ import { MeasureDistanceMode as zt } from "@nebula.gl/edit-modes";
4
+ import { EventManager as qt } from "mjolnir.js";
5
+ var Gt = /* @__PURE__ */ ((t) => (t.Roadmap = "roadmap", t.Satellite = "satellite", t.Hybrid = "hybrid", t))(Gt || {}), Zt = /* @__PURE__ */ ((t) => (t.DarkMatter = "dark-matter", t.Positron = "positron", t.Voyager = "voyager", t))(Zt || {});
6
6
  const de = {
7
7
  positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
8
8
  voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
@@ -64,25 +64,25 @@ const ve = {
64
64
  q.actions
65
65
  );
66
66
  var F = /* @__PURE__ */ ((t) => (t.SetViewState = "SetViewState", t.SetBasemap = "SetBasemap", t.SetResize = "SetResize", t.SetZoom = "SetZoom", t.SetLoaded = "SetLoaded", t))(F || {});
67
- function Gt(t, { type: n, payload: a }) {
67
+ function Jt(t, { type: r, payload: a }) {
68
68
  return {
69
69
  SetViewState: () => {
70
- const { id: i, viewState: v } = a, l = { ...t.maps };
70
+ const { id: i, viewState: p } = a, l = { ...t.maps };
71
71
  return l[i] = {
72
72
  ...t.maps[i],
73
- viewState: v
73
+ viewState: p
74
74
  }, {
75
75
  ...t,
76
76
  maps: l
77
77
  };
78
78
  },
79
79
  SetResize: () => {
80
- const { id: i, width: v, height: l } = a, h = { ...t.maps };
80
+ const { id: i, width: p, height: l } = a, h = { ...t.maps };
81
81
  return h[i] = {
82
82
  ...t.maps[i],
83
83
  viewState: {
84
84
  ...t.maps[i].viewState,
85
- width: v,
85
+ width: p,
86
86
  height: l
87
87
  }
88
88
  }, {
@@ -91,23 +91,23 @@ function Gt(t, { type: n, payload: a }) {
91
91
  };
92
92
  },
93
93
  SetBasemap: () => {
94
- const { id: i, basemap: v } = a, l = { ...t.maps }, { basemap: h } = l[i], u = ve[h]?.type, y = ve[v]?.type, E = u === y;
94
+ const { id: i, basemap: p } = a, l = { ...t.maps }, { basemap: h } = l[i], c = ve[h]?.type, y = ve[p]?.type, b = c === y;
95
95
  return l[i] = {
96
96
  ...t.maps[i],
97
- basemap: v,
98
- isLoaded: E
97
+ basemap: p,
98
+ isLoaded: b
99
99
  }, {
100
100
  ...t,
101
101
  maps: l
102
102
  };
103
103
  },
104
104
  SetZoom: () => {
105
- const { id: i, zoom: v } = a, l = { ...t.maps };
105
+ const { id: i, zoom: p } = a, l = { ...t.maps };
106
106
  return l[i] = {
107
107
  ...t.maps[i],
108
108
  viewState: {
109
109
  ...t.maps[i].viewState,
110
- zoom: v
110
+ zoom: p
111
111
  }
112
112
  }, {
113
113
  ...t,
@@ -115,58 +115,58 @@ function Gt(t, { type: n, payload: a }) {
115
115
  };
116
116
  },
117
117
  SetLoaded: () => {
118
- const { id: i, value: v } = a, l = { ...t.maps };
118
+ const { id: i, value: p } = a, l = { ...t.maps };
119
119
  return l[i] = {
120
120
  ...t.maps[i],
121
- isLoaded: v
121
+ isLoaded: p
122
122
  }, {
123
123
  ...t,
124
124
  maps: l
125
125
  };
126
126
  }
127
- }[n]?.() ?? t;
127
+ }[r]?.() ?? t;
128
128
  }
129
129
  function rt(t) {
130
130
  return K(Qe).maps[t];
131
131
  }
132
132
  function ge(t) {
133
- const n = K(et), { instanceRef: a, overlayRef: c } = n.current[t], i = M(() => {
133
+ const r = K(et), { instanceRef: a, overlayRef: s } = r.current[t], i = w(() => {
134
134
  const y = a?.current;
135
135
  return y?.deck || y?._deck;
136
- }, [a]), v = M(() => c?.current, [c]), l = M(() => i()._getViewState(), [i]), h = M(
136
+ }, [a]), p = w(() => s?.current, [s]), l = w(() => i()._getViewState(), [i]), h = w(
137
137
  (y) => i()?.getViewports(y),
138
138
  [i]
139
- ), u = M(
140
- (y = 0, E) => h(E)?.[y],
139
+ ), c = w(
140
+ (y = 0, b) => h(b)?.[y],
141
141
  [h]
142
142
  );
143
143
  return {
144
144
  instanceRef: a,
145
- overlayRef: c,
145
+ overlayRef: s,
146
146
  getDeckInstance: i,
147
- getOverlayInstance: v,
147
+ getOverlayInstance: p,
148
148
  getViewState: l,
149
- getViewport: u,
149
+ getViewport: c,
150
150
  getViewports: h
151
151
  };
152
152
  }
153
- function Zt(t) {
154
- const { setBasemap: n, setResize: a, setViewState: c, setZoom: i, setLoaded: v } = K(tt), { getViewport: l } = ge(t);
153
+ function Kt(t) {
154
+ const { setBasemap: r, setResize: a, setViewState: s, setZoom: i, setLoaded: p } = K(tt), { getViewport: l } = ge(t);
155
155
  return {
156
- setBasemap: (u) => n(u, t),
157
- setResize: (u) => a(u, t),
158
- setViewState: (u) => c(u, t),
159
- setZoom: (u) => i(u, t),
160
- setLoaded: (u) => v(u, t),
161
- fitBounds: (u, {
156
+ setBasemap: (c) => r(c, t),
157
+ setResize: (c) => a(c, t),
158
+ setViewState: (c) => s(c, t),
159
+ setZoom: (c) => i(c, t),
160
+ setLoaded: (c) => p(c, t),
161
+ fitBounds: (c, {
162
162
  boundsOptions: y,
163
- viewStateOptions: E
163
+ viewStateOptions: b
164
164
  } = {}) => {
165
165
  const _ = l(), { latitude: O, longitude: m, zoom: g } = _.fitBounds(
166
- u,
166
+ c,
167
167
  y
168
168
  );
169
- c({ ...E, latitude: O, longitude: m, zoom: g }, t);
169
+ s({ ...b, latitude: O, longitude: m, zoom: g }, t);
170
170
  }
171
171
  };
172
172
  }
@@ -177,9 +177,9 @@ function Lr(t) {
177
177
  return ge(t);
178
178
  }
179
179
  function Ir(t) {
180
- return Zt(t);
180
+ return Kt(t);
181
181
  }
182
- function Jt(t) {
182
+ function Xt(t) {
183
183
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
184
184
  }
185
185
  var me = { exports: {} }, B = {};
@@ -193,48 +193,48 @@ var me = { exports: {} }, B = {};
193
193
  * LICENSE file in the root directory of this source tree.
194
194
  */
195
195
  var Be;
196
- function Kt() {
196
+ function Qt() {
197
197
  return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
198
- var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
198
+ var t = Je, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
199
199
  function T(e) {
200
200
  if (e === null || typeof e != "object")
201
201
  return null;
202
- var r = g && e[g] || e[x];
203
- return typeof r == "function" ? r : null;
202
+ var n = g && e[g] || e[x];
203
+ return typeof n == "function" ? n : null;
204
204
  }
205
205
  var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
206
- function w(e) {
206
+ function M(e) {
207
207
  {
208
- for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
209
- o[s - 1] = arguments[s];
210
- ct("error", e, o);
208
+ for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++)
209
+ o[u - 1] = arguments[u];
210
+ ft("error", e, o);
211
211
  }
212
212
  }
213
- function ct(e, r, o) {
213
+ function ft(e, n, o) {
214
214
  {
215
- var s = P.ReactDebugCurrentFrame, p = s.getStackAddendum();
216
- p !== "" && (r += "%s", o = o.concat([p]));
217
- var b = o.map(function(d) {
215
+ var u = P.ReactDebugCurrentFrame, v = u.getStackAddendum();
216
+ v !== "" && (n += "%s", o = o.concat([v]));
217
+ var E = o.map(function(d) {
218
218
  return String(d);
219
219
  });
220
- b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
220
+ E.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, E);
221
221
  }
222
222
  }
223
- var lt = !1, ft = !1, dt = !1, pt = !1, vt = !1, be;
224
- be = Symbol.for("react.module.reference");
225
- function mt(e) {
226
- return !!(typeof e == "string" || typeof e == "function" || e === c || e === v || vt || e === i || e === y || e === E || pt || e === m || lt || ft || dt || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
223
+ var dt = !1, pt = !1, vt = !1, mt = !1, gt = !1, Ee;
224
+ Ee = Symbol.for("react.module.reference");
225
+ function yt(e) {
226
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === p || gt || e === i || e === y || e === b || mt || e === m || dt || pt || vt || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === c || // This needs to include all possible module reference object
227
227
  // types supported by any Flight configuration anywhere since
228
228
  // we don't know which Flight build this will end up being used
229
229
  // with.
230
- e.$$typeof === be || e.getModuleId !== void 0));
230
+ e.$$typeof === Ee || e.getModuleId !== void 0));
231
231
  }
232
- function gt(e, r, o) {
233
- var s = e.displayName;
234
- if (s)
235
- return s;
236
- var p = r.displayName || r.name || "";
237
- return p !== "" ? o + "(" + p + ")" : o;
232
+ function bt(e, n, o) {
233
+ var u = e.displayName;
234
+ if (u)
235
+ return u;
236
+ var v = n.displayName || n.name || "";
237
+ return v !== "" ? o + "(" + v + ")" : o;
238
238
  }
239
239
  function he(e) {
240
240
  return e.displayName || "Context";
@@ -242,41 +242,41 @@ function Kt() {
242
242
  function A(e) {
243
243
  if (e == null)
244
244
  return null;
245
- if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
245
+ if (typeof e.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
246
246
  return e.displayName || e.name || null;
247
247
  if (typeof e == "string")
248
248
  return e;
249
249
  switch (e) {
250
- case c:
250
+ case s:
251
251
  return "Fragment";
252
252
  case a:
253
253
  return "Portal";
254
- case v:
254
+ case p:
255
255
  return "Profiler";
256
256
  case i:
257
257
  return "StrictMode";
258
258
  case y:
259
259
  return "Suspense";
260
- case E:
260
+ case b:
261
261
  return "SuspenseList";
262
262
  }
263
263
  if (typeof e == "object")
264
264
  switch (e.$$typeof) {
265
265
  case h:
266
- var r = e;
267
- return he(r) + ".Consumer";
266
+ var n = e;
267
+ return he(n) + ".Consumer";
268
268
  case l:
269
269
  var o = e;
270
270
  return he(o._context) + ".Provider";
271
- case u:
272
- return gt(e, e.render, "ForwardRef");
271
+ case c:
272
+ return bt(e, e.render, "ForwardRef");
273
273
  case _:
274
- var s = e.displayName || null;
275
- return s !== null ? s : A(e.type) || "Memo";
274
+ var u = e.displayName || null;
275
+ return u !== null ? u : A(e.type) || "Memo";
276
276
  case O: {
277
- var p = e, b = p._payload, d = p._init;
277
+ var v = e, E = v._payload, d = v._init;
278
278
  try {
279
- return A(d(b));
279
+ return A(d(E));
280
280
  } catch {
281
281
  return null;
282
282
  }
@@ -284,14 +284,14 @@ function Kt() {
284
284
  }
285
285
  return null;
286
286
  }
287
- var L = Object.assign, $ = 0, Re, Se, _e, Te, we, Me, Oe;
287
+ var L = Object.assign, $ = 0, Re, Se, _e, Te, Me, we, Oe;
288
288
  function Pe() {
289
289
  }
290
290
  Pe.__reactDisabledLog = !0;
291
- function yt() {
291
+ function Et() {
292
292
  {
293
293
  if ($ === 0) {
294
- Re = console.log, Se = console.info, _e = console.warn, Te = console.error, we = console.group, Me = console.groupCollapsed, Oe = console.groupEnd;
294
+ Re = console.log, Se = console.info, _e = console.warn, Te = console.error, Me = console.group, we = console.groupCollapsed, Oe = console.groupEnd;
295
295
  var e = {
296
296
  configurable: !0,
297
297
  enumerable: !0,
@@ -311,7 +311,7 @@ function Kt() {
311
311
  $++;
312
312
  }
313
313
  }
314
- function Et() {
314
+ function ht() {
315
315
  {
316
316
  if ($--, $ === 0) {
317
317
  var e = {
@@ -333,28 +333,28 @@ function Kt() {
333
333
  value: Te
334
334
  }),
335
335
  group: L({}, e, {
336
- value: we
336
+ value: Me
337
337
  }),
338
338
  groupCollapsed: L({}, e, {
339
- value: Me
339
+ value: we
340
340
  }),
341
341
  groupEnd: L({}, e, {
342
342
  value: Oe
343
343
  })
344
344
  });
345
345
  }
346
- $ < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
346
+ $ < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
347
347
  }
348
348
  }
349
349
  var ae = P.ReactCurrentDispatcher, oe;
350
- function X(e, r, o) {
350
+ function X(e, n, o) {
351
351
  {
352
352
  if (oe === void 0)
353
353
  try {
354
354
  throw Error();
355
- } catch (p) {
356
- var s = p.stack.trim().match(/\n( *(at )?)/);
357
- oe = s && s[1] || "";
355
+ } catch (v) {
356
+ var u = v.stack.trim().match(/\n( *(at )?)/);
357
+ oe = u && u[1] || "";
358
358
  }
359
359
  return `
360
360
  ` + oe + e;
@@ -362,10 +362,10 @@ function Kt() {
362
362
  }
363
363
  var ie = !1, Q;
364
364
  {
365
- var bt = typeof WeakMap == "function" ? WeakMap : Map;
366
- Q = new bt();
365
+ var Rt = typeof WeakMap == "function" ? WeakMap : Map;
366
+ Q = new Rt();
367
367
  }
368
- function Ce(e, r) {
368
+ function Ce(e, n) {
369
369
  if (!e || ie)
370
370
  return "";
371
371
  {
@@ -373,14 +373,14 @@ function Kt() {
373
373
  if (o !== void 0)
374
374
  return o;
375
375
  }
376
- var s;
376
+ var u;
377
377
  ie = !0;
378
- var p = Error.prepareStackTrace;
378
+ var v = Error.prepareStackTrace;
379
379
  Error.prepareStackTrace = void 0;
380
- var b;
381
- b = ae.current, ae.current = null, yt();
380
+ var E;
381
+ E = ae.current, ae.current = null, Et();
382
382
  try {
383
- if (r) {
383
+ if (n) {
384
384
  var d = function() {
385
385
  throw Error();
386
386
  };
@@ -392,14 +392,14 @@ function Kt() {
392
392
  try {
393
393
  Reflect.construct(d, []);
394
394
  } catch (D) {
395
- s = D;
395
+ u = D;
396
396
  }
397
397
  Reflect.construct(e, [], d);
398
398
  } else {
399
399
  try {
400
400
  d.call();
401
401
  } catch (D) {
402
- s = D;
402
+ u = D;
403
403
  }
404
404
  e.call(d.prototype);
405
405
  }
@@ -407,14 +407,14 @@ function Kt() {
407
407
  try {
408
408
  throw Error();
409
409
  } catch (D) {
410
- s = D;
410
+ u = D;
411
411
  }
412
412
  e();
413
413
  }
414
414
  } catch (D) {
415
- if (D && s && typeof D.stack == "string") {
415
+ if (D && u && typeof D.stack == "string") {
416
416
  for (var f = D.stack.split(`
417
- `), C = s.stack.split(`
417
+ `), C = u.stack.split(`
418
418
  `), R = f.length - 1, S = C.length - 1; R >= 1 && S >= 0 && f[R] !== C[S]; )
419
419
  S--;
420
420
  for (; R >= 1 && S >= 0; R--, S--)
@@ -431,41 +431,41 @@ function Kt() {
431
431
  }
432
432
  }
433
433
  } finally {
434
- ie = !1, ae.current = b, Et(), Error.prepareStackTrace = p;
434
+ ie = !1, ae.current = E, ht(), Error.prepareStackTrace = v;
435
435
  }
436
436
  var N = e ? e.displayName || e.name : "", Ye = N ? X(N) : "";
437
437
  return typeof e == "function" && Q.set(e, Ye), Ye;
438
438
  }
439
- function ht(e, r, o) {
439
+ function St(e, n, o) {
440
440
  return Ce(e, !1);
441
441
  }
442
- function Rt(e) {
443
- var r = e.prototype;
444
- return !!(r && r.isReactComponent);
442
+ function _t(e) {
443
+ var n = e.prototype;
444
+ return !!(n && n.isReactComponent);
445
445
  }
446
- function ee(e, r, o) {
446
+ function ee(e, n, o) {
447
447
  if (e == null)
448
448
  return "";
449
449
  if (typeof e == "function")
450
- return Ce(e, Rt(e));
450
+ return Ce(e, _t(e));
451
451
  if (typeof e == "string")
452
452
  return X(e);
453
453
  switch (e) {
454
454
  case y:
455
455
  return X("Suspense");
456
- case E:
456
+ case b:
457
457
  return X("SuspenseList");
458
458
  }
459
459
  if (typeof e == "object")
460
460
  switch (e.$$typeof) {
461
- case u:
462
- return ht(e.render);
461
+ case c:
462
+ return St(e.render);
463
463
  case _:
464
- return ee(e.type, r, o);
464
+ return ee(e.type, n, o);
465
465
  case O: {
466
- var s = e, p = s._payload, b = s._init;
466
+ var u = e, v = u._payload, E = u._init;
467
467
  try {
468
- return ee(b(p), r, o);
468
+ return ee(E(v), n, o);
469
469
  } catch {
470
470
  }
471
471
  }
@@ -475,41 +475,41 @@ function Kt() {
475
475
  var te = Object.prototype.hasOwnProperty, je = {}, xe = P.ReactDebugCurrentFrame;
476
476
  function re(e) {
477
477
  if (e) {
478
- var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
478
+ var n = e._owner, o = ee(e.type, e._source, n ? n.type : null);
479
479
  xe.setExtraStackFrame(o);
480
480
  } else
481
481
  xe.setExtraStackFrame(null);
482
482
  }
483
- function St(e, r, o, s, p) {
483
+ function Tt(e, n, o, u, v) {
484
484
  {
485
- var b = Function.call.bind(te);
485
+ var E = Function.call.bind(te);
486
486
  for (var d in e)
487
- if (b(e, d)) {
487
+ if (E(e, d)) {
488
488
  var f = void 0;
489
489
  try {
490
490
  if (typeof e[d] != "function") {
491
- var C = Error((s || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
491
+ var C = Error((u || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
492
492
  throw C.name = "Invariant Violation", C;
493
493
  }
494
- f = e[d](r, d, s, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
494
+ f = e[d](n, d, u, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
495
495
  } catch (R) {
496
496
  f = R;
497
497
  }
498
- f && !(f instanceof Error) && (re(p), w("%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).", s || "React class", o, d, typeof f), re(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, re(p), w("Failed %s type: %s", o, f.message), re(null));
498
+ f && !(f instanceof Error) && (re(v), M("%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, d, typeof f), re(null)), f instanceof Error && !(f.message in je) && (je[f.message] = !0, re(v), M("Failed %s type: %s", o, f.message), re(null));
499
499
  }
500
500
  }
501
501
  }
502
- var _t = Array.isArray;
502
+ var Mt = Array.isArray;
503
503
  function se(e) {
504
- return _t(e);
504
+ return Mt(e);
505
505
  }
506
- function Tt(e) {
506
+ function wt(e) {
507
507
  {
508
- var r = typeof Symbol == "function" && Symbol.toStringTag, o = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
508
+ var n = typeof Symbol == "function" && Symbol.toStringTag, o = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
509
509
  return o;
510
510
  }
511
511
  }
512
- function wt(e) {
512
+ function Ot(e) {
513
513
  try {
514
514
  return Ae(e), !1;
515
515
  } catch {
@@ -520,42 +520,42 @@ function Kt() {
520
520
  return "" + e;
521
521
  }
522
522
  function De(e) {
523
- if (wt(e))
524
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tt(e)), Ae(e);
523
+ if (Ot(e))
524
+ return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(e)), Ae(e);
525
525
  }
526
- var V = P.ReactCurrentOwner, Mt = {
526
+ var V = P.ReactCurrentOwner, Pt = {
527
527
  key: !0,
528
528
  ref: !0,
529
529
  __self: !0,
530
530
  __source: !0
531
531
  }, Fe, ke, ue;
532
532
  ue = {};
533
- function Ot(e) {
533
+ function Ct(e) {
534
534
  if (te.call(e, "ref")) {
535
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
536
- if (r && r.isReactWarning)
535
+ var n = Object.getOwnPropertyDescriptor(e, "ref").get;
536
+ if (n && n.isReactWarning)
537
537
  return !1;
538
538
  }
539
539
  return e.ref !== void 0;
540
540
  }
541
- function Pt(e) {
541
+ function jt(e) {
542
542
  if (te.call(e, "key")) {
543
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
544
- if (r && r.isReactWarning)
543
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
544
+ if (n && n.isReactWarning)
545
545
  return !1;
546
546
  }
547
547
  return e.key !== void 0;
548
548
  }
549
- function Ct(e, r) {
550
- if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
549
+ function xt(e, n) {
550
+ if (typeof e.ref == "string" && V.current && n && V.current.stateNode !== n) {
551
551
  var o = A(V.current.type);
552
- ue[o] || (w('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(V.current.type), e.ref), ue[o] = !0);
552
+ ue[o] || (M('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(V.current.type), e.ref), ue[o] = !0);
553
553
  }
554
554
  }
555
- function jt(e, r) {
555
+ function At(e, n) {
556
556
  {
557
557
  var o = function() {
558
- Fe || (Fe = !0, w("%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)", r));
558
+ Fe || (Fe = !0, M("%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
559
  };
560
560
  o.isReactWarning = !0, Object.defineProperty(e, "key", {
561
561
  get: o,
@@ -563,10 +563,10 @@ function Kt() {
563
563
  });
564
564
  }
565
565
  }
566
- function xt(e, r) {
566
+ function Dt(e, n) {
567
567
  {
568
568
  var o = function() {
569
- ke || (ke = !0, w("%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)", r));
569
+ ke || (ke = !0, M("%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
570
  };
571
571
  o.isReactWarning = !0, Object.defineProperty(e, "ref", {
572
572
  get: o,
@@ -574,17 +574,17 @@ function Kt() {
574
574
  });
575
575
  }
576
576
  }
577
- var At = function(e, r, o, s, p, b, d) {
577
+ var Ft = function(e, n, o, u, v, E, d) {
578
578
  var f = {
579
579
  // This tag allows us to uniquely identify this as a React Element
580
- $$typeof: n,
580
+ $$typeof: r,
581
581
  // Built-in properties that belong on the element
582
582
  type: e,
583
- key: r,
583
+ key: n,
584
584
  ref: o,
585
585
  props: d,
586
586
  // Record the component responsible for creating this element.
587
- _owner: b
587
+ _owner: E
588
588
  };
589
589
  return f._store = {}, Object.defineProperty(f._store, "validated", {
590
590
  configurable: !1,
@@ -595,36 +595,36 @@ function Kt() {
595
595
  configurable: !1,
596
596
  enumerable: !1,
597
597
  writable: !1,
598
- value: s
598
+ value: u
599
599
  }), Object.defineProperty(f, "_source", {
600
600
  configurable: !1,
601
601
  enumerable: !1,
602
602
  writable: !1,
603
- value: p
603
+ value: v
604
604
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
605
605
  };
606
- function Dt(e, r, o, s, p) {
606
+ function kt(e, n, o, u, v) {
607
607
  {
608
- var b, d = {}, f = null, C = null;
609
- o !== void 0 && (De(o), f = "" + o), Pt(r) && (De(r.key), f = "" + r.key), Ot(r) && (C = r.ref, Ct(r, p));
610
- for (b in r)
611
- te.call(r, b) && !Mt.hasOwnProperty(b) && (d[b] = r[b]);
608
+ var E, d = {}, f = null, C = null;
609
+ o !== void 0 && (De(o), f = "" + o), jt(n) && (De(n.key), f = "" + n.key), Ct(n) && (C = n.ref, xt(n, v));
610
+ for (E in n)
611
+ te.call(n, E) && !Pt.hasOwnProperty(E) && (d[E] = n[E]);
612
612
  if (e && e.defaultProps) {
613
613
  var R = e.defaultProps;
614
- for (b in R)
615
- d[b] === void 0 && (d[b] = R[b]);
614
+ for (E in R)
615
+ d[E] === void 0 && (d[E] = R[E]);
616
616
  }
617
617
  if (f || C) {
618
618
  var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
619
- f && jt(d, S), C && xt(d, S);
619
+ f && At(d, S), C && Dt(d, S);
620
620
  }
621
- return At(e, f, C, p, s, V.current, d);
621
+ return Ft(e, f, C, v, u, V.current, d);
622
622
  }
623
623
  }
624
624
  var ce = P.ReactCurrentOwner, Le = P.ReactDebugCurrentFrame;
625
625
  function I(e) {
626
626
  if (e) {
627
- var r = e._owner, o = ee(e.type, e._source, r ? r.type : null);
627
+ var n = e._owner, o = ee(e.type, e._source, n ? n.type : null);
628
628
  Le.setExtraStackFrame(o);
629
629
  } else
630
630
  Le.setExtraStackFrame(null);
@@ -632,7 +632,7 @@ function Kt() {
632
632
  var le;
633
633
  le = !1;
634
634
  function fe(e) {
635
- return typeof e == "object" && e !== null && e.$$typeof === n;
635
+ return typeof e == "object" && e !== null && e.$$typeof === r;
636
636
  }
637
637
  function Ie() {
638
638
  {
@@ -646,137 +646,137 @@ Check the render method of \`` + e + "`.";
646
646
  return "";
647
647
  }
648
648
  }
649
- function Ft(e) {
649
+ function Lt(e) {
650
650
  {
651
651
  if (e !== void 0) {
652
- var r = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
652
+ var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
653
653
  return `
654
654
 
655
- Check your code at ` + r + ":" + o + ".";
655
+ Check your code at ` + n + ":" + o + ".";
656
656
  }
657
657
  return "";
658
658
  }
659
659
  }
660
660
  var Ne = {};
661
- function kt(e) {
661
+ function It(e) {
662
662
  {
663
- var r = Ie();
664
- if (!r) {
663
+ var n = Ie();
664
+ if (!n) {
665
665
  var o = typeof e == "string" ? e : e.displayName || e.name;
666
- o && (r = `
666
+ o && (n = `
667
667
 
668
668
  Check the top-level render call using <` + o + ">.");
669
669
  }
670
- return r;
670
+ return n;
671
671
  }
672
672
  }
673
- function Ue(e, r) {
673
+ function Ue(e, n) {
674
674
  {
675
675
  if (!e._store || e._store.validated || e.key != null)
676
676
  return;
677
677
  e._store.validated = !0;
678
- var o = kt(r);
678
+ var o = It(n);
679
679
  if (Ne[o])
680
680
  return;
681
681
  Ne[o] = !0;
682
- var s = "";
683
- e && e._owner && e._owner !== ce.current && (s = " It was passed a child from " + A(e._owner.type) + "."), I(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, s), I(null);
682
+ var u = "";
683
+ e && e._owner && e._owner !== ce.current && (u = " It was passed a child from " + A(e._owner.type) + "."), I(e), M('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), I(null);
684
684
  }
685
685
  }
686
- function $e(e, r) {
686
+ function $e(e, n) {
687
687
  {
688
688
  if (typeof e != "object")
689
689
  return;
690
690
  if (se(e))
691
691
  for (var o = 0; o < e.length; o++) {
692
- var s = e[o];
693
- fe(s) && Ue(s, r);
692
+ var u = e[o];
693
+ fe(u) && Ue(u, n);
694
694
  }
695
695
  else if (fe(e))
696
696
  e._store && (e._store.validated = !0);
697
697
  else if (e) {
698
- var p = T(e);
699
- if (typeof p == "function" && p !== e.entries)
700
- for (var b = p.call(e), d; !(d = b.next()).done; )
701
- fe(d.value) && Ue(d.value, r);
698
+ var v = T(e);
699
+ if (typeof v == "function" && v !== e.entries)
700
+ for (var E = v.call(e), d; !(d = E.next()).done; )
701
+ fe(d.value) && Ue(d.value, n);
702
702
  }
703
703
  }
704
704
  }
705
- function Lt(e) {
705
+ function Nt(e) {
706
706
  {
707
- var r = e.type;
708
- if (r == null || typeof r == "string")
707
+ var n = e.type;
708
+ if (n == null || typeof n == "string")
709
709
  return;
710
710
  var o;
711
- if (typeof r == "function")
712
- o = r.propTypes;
713
- else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
711
+ if (typeof n == "function")
712
+ o = n.propTypes;
713
+ else if (typeof n == "object" && (n.$$typeof === c || // Note: Memo only checks outer props here.
714
714
  // Inner props are checked in the reconciler.
715
- r.$$typeof === _))
716
- o = r.propTypes;
715
+ n.$$typeof === _))
716
+ o = n.propTypes;
717
717
  else
718
718
  return;
719
719
  if (o) {
720
- var s = A(r);
721
- St(o, e.props, "prop", s, e);
722
- } else if (r.PropTypes !== void 0 && !le) {
720
+ var u = A(n);
721
+ Tt(o, e.props, "prop", u, e);
722
+ } else if (n.PropTypes !== void 0 && !le) {
723
723
  le = !0;
724
- var p = A(r);
725
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
724
+ var v = A(n);
725
+ M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
726
726
  }
727
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
727
+ typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
728
728
  }
729
729
  }
730
- function It(e) {
730
+ function Ut(e) {
731
731
  {
732
- for (var r = Object.keys(e.props), o = 0; o < r.length; o++) {
733
- var s = r[o];
734
- if (s !== "children" && s !== "key") {
735
- I(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), I(null);
732
+ for (var n = Object.keys(e.props), o = 0; o < n.length; o++) {
733
+ var u = n[o];
734
+ if (u !== "children" && u !== "key") {
735
+ I(e), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), I(null);
736
736
  break;
737
737
  }
738
738
  }
739
- e.ref !== null && (I(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
739
+ e.ref !== null && (I(e), M("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
740
740
  }
741
741
  }
742
- function Ve(e, r, o, s, p, b) {
742
+ function Ve(e, n, o, u, v, E) {
743
743
  {
744
- var d = mt(e);
744
+ var d = yt(e);
745
745
  if (!d) {
746
746
  var f = "";
747
747
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
748
- var C = Ft(p);
748
+ var C = Lt(v);
749
749
  C ? f += C : f += Ie();
750
750
  var R;
751
- e === null ? R = "null" : se(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (A(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, f);
751
+ e === null ? R = "null" : se(e) ? R = "array" : e !== void 0 && e.$$typeof === r ? (R = "<" + (A(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, f);
752
752
  }
753
- var S = Dt(e, r, o, p, b);
753
+ var S = kt(e, n, o, v, E);
754
754
  if (S == null)
755
755
  return S;
756
756
  if (d) {
757
- var j = r.children;
757
+ var j = n.children;
758
758
  if (j !== void 0)
759
- if (s)
759
+ if (u)
760
760
  if (se(j)) {
761
761
  for (var N = 0; N < j.length; N++)
762
762
  $e(j[N], e);
763
763
  Object.freeze && Object.freeze(j);
764
764
  } else
765
- w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
765
+ M("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
766
  else
767
767
  $e(j, e);
768
768
  }
769
- return e === c ? It(S) : Lt(S), S;
769
+ return e === s ? Ut(S) : Nt(S), S;
770
770
  }
771
771
  }
772
- function Nt(e, r, o) {
773
- return Ve(e, r, o, !0);
772
+ function $t(e, n, o) {
773
+ return Ve(e, n, o, !0);
774
774
  }
775
- function Ut(e, r, o) {
776
- return Ve(e, r, o, !1);
775
+ function Vt(e, n, o) {
776
+ return Ve(e, n, o, !1);
777
777
  }
778
- var $t = Ut, Vt = Nt;
779
- B.Fragment = c, B.jsx = $t, B.jsxs = Vt;
778
+ var Yt = Vt, Bt = $t;
779
+ B.Fragment = s, B.jsx = Yt, B.jsxs = Bt;
780
780
  }()), B;
781
781
  }
782
782
  var W = {};
@@ -790,38 +790,38 @@ var W = {};
790
790
  * LICENSE file in the root directory of this source tree.
791
791
  */
792
792
  var We;
793
- function Xt() {
793
+ function er() {
794
794
  if (We)
795
795
  return W;
796
796
  We = 1;
797
- var t = Je, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
798
- function l(h, u, y) {
799
- var E, _ = {}, O = null, m = null;
800
- y !== void 0 && (O = "" + y), u.key !== void 0 && (O = "" + u.key), u.ref !== void 0 && (m = u.ref);
801
- for (E in u)
802
- c.call(u, E) && !v.hasOwnProperty(E) && (_[E] = u[E]);
797
+ var t = Je, 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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
798
+ function l(h, c, y) {
799
+ var b, _ = {}, O = null, m = null;
800
+ y !== void 0 && (O = "" + y), c.key !== void 0 && (O = "" + c.key), c.ref !== void 0 && (m = c.ref);
801
+ for (b in c)
802
+ s.call(c, b) && !p.hasOwnProperty(b) && (_[b] = c[b]);
803
803
  if (h && h.defaultProps)
804
- for (E in u = h.defaultProps, u)
805
- _[E] === void 0 && (_[E] = u[E]);
806
- return { $$typeof: n, type: h, key: O, ref: m, props: _, _owner: i.current };
804
+ for (b in c = h.defaultProps, c)
805
+ _[b] === void 0 && (_[b] = c[b]);
806
+ return { $$typeof: r, type: h, key: O, ref: m, props: _, _owner: i.current };
807
807
  }
808
808
  return W.Fragment = a, W.jsx = l, W.jsxs = l, W;
809
809
  }
810
- process.env.NODE_ENV === "production" ? me.exports = Xt() : me.exports = Kt();
810
+ process.env.NODE_ENV === "production" ? me.exports = er() : me.exports = Qt();
811
811
  var z = me.exports;
812
812
  function Nr({
813
813
  children: t,
814
- maps: n,
814
+ maps: r,
815
815
  externalSync: a
816
816
  }) {
817
- const [c, i] = Ke(Gt, {
817
+ const [s, i] = Ke(Jt, {
818
818
  ...q.state,
819
- maps: n.reduce((m, g) => (m[g.id] = {
819
+ maps: r.reduce((m, g) => (m[g.id] = {
820
820
  ...g,
821
821
  isLoaded: !1
822
822
  }, m), q.state.maps)
823
- }), v = pe(
824
- n.reduce((m, g) => (m[g.id] = {
823
+ }), p = pe(
824
+ r.reduce((m, g) => (m[g.id] = {
825
825
  instanceRef: {
826
826
  current: null
827
827
  },
@@ -829,15 +829,15 @@ function Nr({
829
829
  current: null
830
830
  }
831
831
  }, m), {})
832
- ), l = M(
832
+ ), l = w(
833
833
  (m, g, x) => {
834
- n[0].id === m && a?.({
834
+ r[0].id === m && a?.({
835
835
  type: g,
836
836
  payload: x
837
837
  });
838
838
  },
839
- [a, n]
840
- ), h = M(
839
+ [a, r]
840
+ ), h = w(
841
841
  (m, g) => {
842
842
  i({
843
843
  type: F.SetViewState,
@@ -848,7 +848,7 @@ function Nr({
848
848
  }), l(g, F.SetViewState, m);
849
849
  },
850
850
  [i, l]
851
- ), u = M(
851
+ ), c = w(
852
852
  ({ height: m, width: g }, x) => {
853
853
  i({
854
854
  type: F.SetResize,
@@ -860,7 +860,7 @@ function Nr({
860
860
  }), l(x, F.SetResize, { height: m, width: g });
861
861
  },
862
862
  [i, l]
863
- ), y = M(
863
+ ), y = w(
864
864
  (m, g) => {
865
865
  i({
866
866
  type: F.SetBasemap,
@@ -871,7 +871,7 @@ function Nr({
871
871
  });
872
872
  },
873
873
  [i]
874
- ), E = M(
874
+ ), b = w(
875
875
  (m, g) => {
876
876
  i({
877
877
  type: F.SetZoom,
@@ -882,7 +882,7 @@ function Nr({
882
882
  });
883
883
  },
884
884
  [i]
885
- ), _ = M(
885
+ ), _ = w(
886
886
  (m, g) => {
887
887
  i({
888
888
  type: F.SetLoaded,
@@ -896,16 +896,16 @@ function Nr({
896
896
  ), O = pe({
897
897
  setViewState: h,
898
898
  setBasemap: y,
899
- setResize: u,
900
- setZoom: E,
899
+ setResize: c,
900
+ setZoom: b,
901
901
  setLoaded: _
902
902
  });
903
- return /* @__PURE__ */ z.jsx(tt.Provider, { value: O.current, children: /* @__PURE__ */ z.jsx(et.Provider, { value: v, children: /* @__PURE__ */ z.jsx(Qe.Provider, { value: c, children: t }) }) });
903
+ return /* @__PURE__ */ z.jsx(tt.Provider, { value: O.current, children: /* @__PURE__ */ z.jsx(et.Provider, { value: p, children: /* @__PURE__ */ z.jsx(Qe.Provider, { value: s, children: t }) }) });
904
904
  }
905
- var ye = /* @__PURE__ */ ((t) => (t.kilometer = "kilometer", t.mile = "mile", t))(ye || {}), Qt = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(Qt || {}), G = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(G || {});
906
- class er extends Wt {
907
- handleClick(n, a) {
908
- super.handleClick(n, a), a.onEdit({
905
+ var ye = /* @__PURE__ */ ((t) => (t.kilometer = "kilometer", t.mile = "mile", t))(ye || {}), tr = /* @__PURE__ */ ((t) => (t.kilometer = "kilometers", t.mile = "miles", t))(tr || {}), G = /* @__PURE__ */ ((t) => (t.AddPosition = "addPosition", t.Finish = "finish", t))(G || {});
906
+ class rr extends zt {
907
+ handleClick(r, a) {
908
+ super.handleClick(r, a), a.onEdit({
909
909
  // data is the same
910
910
  updatedData: a.data,
911
911
  editType: G.AddPosition,
@@ -914,12 +914,12 @@ class er extends Wt {
914
914
  }
915
915
  });
916
916
  }
917
- handleKeyUp(n, a) {
917
+ handleKeyUp(r, a) {
918
918
  if (this._isMeasuringSessionFinished)
919
919
  return;
920
- n.stopPropagation();
921
- const { key: c } = n, i = this.getClickSequence().length;
922
- switch (c) {
920
+ r.stopPropagation();
921
+ const { key: s } = r, i = this.getClickSequence().length;
922
+ switch (s) {
923
923
  case "Enter":
924
924
  case "Escape":
925
925
  this._isMeasuringSessionFinished = !0, i === 1 && (this.resetClickSequence(), this._currentTooltips = []), a.onUpdateCursor("cell"), a.onEdit({
@@ -940,9 +940,9 @@ const He = [
940
940
  "panmove",
941
941
  "panend",
942
942
  "keyup"
943
- ], tr = "mapMeasureLayer", rr = {
944
- mode: er,
945
- id: tr,
943
+ ], nr = "mapMeasureLayer", ar = {
944
+ mode: rr,
945
+ id: nr,
946
946
  pickable: !0,
947
947
  billboard: !1,
948
948
  editHandlePointRadiusUnits: "pixels",
@@ -967,23 +967,23 @@ const He = [
967
967
  }
968
968
  }
969
969
  };
970
- class nr extends Bt {
970
+ class or extends Ht {
971
971
  eventManager;
972
- constructor(n) {
973
- super(n), this.eventManager = n.eventManager;
972
+ constructor(r) {
973
+ super(r), this.eventManager = r.eventManager;
974
974
  }
975
975
  _addEventHandlers() {
976
- const n = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
977
- for (const c of He)
978
- n.on(c, a, {
976
+ const r = this._getEventManager(), { eventHandler: a } = this.state._editableLayerState;
977
+ for (const s of He)
978
+ r.on(s, a, {
979
979
  // give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers
980
980
  priority: 100
981
981
  });
982
982
  }
983
- _removeEventHandlers(n = void 0) {
984
- const a = n || this._getEventManager(), { eventHandler: c } = this.state._editableLayerState;
983
+ _removeEventHandlers(r = void 0) {
984
+ const a = r || this._getEventManager(), { eventHandler: s } = this.state._editableLayerState;
985
985
  for (const i of He)
986
- a.off(i, c);
986
+ a.off(i, s);
987
987
  }
988
988
  _getEventManager() {
989
989
  return this.eventManager || this.context.deck.eventManager;
@@ -1011,142 +1011,142 @@ const nt = {
1011
1011
  day: "2-digit"
1012
1012
  }
1013
1013
  };
1014
- function at(t, n, a) {
1015
- return Intl.NumberFormat(n, a).format(t);
1014
+ function at(t, r, a) {
1015
+ return Intl.NumberFormat(r, a).format(t);
1016
1016
  }
1017
- function ot(t, n, a = {}) {
1018
- return at(t, n, { ...nt.NUMBER, ...a });
1017
+ function ot(t, r, a = {}) {
1018
+ return at(t, r, { ...nt.NUMBER, ...a });
1019
1019
  }
1020
- function ar(t, n, a = {}) {
1021
- return at(t, n, { ...nt.CURRENCY, ...a });
1020
+ function ir(t, r, a = {}) {
1021
+ return at(t, r, { ...nt.CURRENCY, ...a });
1022
1022
  }
1023
1023
  var k = /* @__PURE__ */ ((t) => (t.CURRENCY = "CURRENCY", t.DEFAULT = "DEFAULT", t.NUMBER = "NUMBER", t))(k || {});
1024
1024
  const ze = {
1025
1025
  [k.CURRENCY]: {
1026
1026
  type: k.CURRENCY,
1027
- format: (t, n) => ar(t, n)
1027
+ format: (t, r) => ir(t, r)
1028
1028
  },
1029
1029
  [k.NUMBER]: {
1030
1030
  type: k.NUMBER,
1031
- format: (t, n) => ot(t, n)
1031
+ format: (t, r) => ot(t, r)
1032
1032
  },
1033
1033
  [k.DEFAULT]: {
1034
1034
  type: k.DEFAULT,
1035
1035
  format: (t) => t.toLocaleString()
1036
1036
  }
1037
1037
  };
1038
- function or({
1038
+ function sr({
1039
1039
  properties: t,
1040
- formatters: n = {},
1040
+ formatters: r = {},
1041
1041
  includeColumns: a = Object.keys(t),
1042
- locale: c = "en-US",
1042
+ locale: s = "en-US",
1043
1043
  showColumnName: i = !0,
1044
- title: v,
1045
- getColumnName: l = lr,
1046
- getFieldHtml: h = sr,
1047
- getTitle: u = ir,
1048
- getValue: y = ur
1044
+ title: p,
1045
+ getColumnName: l = dr,
1046
+ getFieldHtml: h = cr,
1047
+ getTitle: c = ur,
1048
+ getValue: y = lr
1049
1049
  }) {
1050
- const E = v ? u(v) : "", O = a.reduce((m, g) => {
1051
- const x = n[g], T = t[g], P = y(T, c, x), w = i ? l(g) : "";
1052
- return m + h(w, P);
1050
+ const b = p ? c(p) : "", O = a.reduce((m, g) => {
1051
+ const x = r[g], T = t[g], P = y(T, s, x), M = i ? l(g) : "";
1052
+ return m + h(M, P);
1053
1053
  }, "");
1054
- return E + O;
1054
+ return b + O;
1055
1055
  }
1056
- function ir(t) {
1056
+ function ur(t) {
1057
1057
  return `<h3 style="margin: 0"><strong>${t}</strong></h3></br>`;
1058
1058
  }
1059
- function sr(t, n) {
1060
- return `${t}${n}</br>`;
1059
+ function cr(t, r) {
1060
+ return `${t}${r}</br>`;
1061
1061
  }
1062
- function ur(t, n, a) {
1062
+ function lr(t, r, a) {
1063
1063
  try {
1064
- return cr(a)(t, n);
1064
+ return fr(a)(t, r);
1065
1065
  } catch {
1066
1066
  return t;
1067
1067
  }
1068
1068
  }
1069
- function cr(t) {
1069
+ function fr(t) {
1070
1070
  return typeof t == "function" ? t : (t && ze[t] || ze[k.DEFAULT]).format;
1071
1071
  }
1072
- function lr(t) {
1072
+ function dr(t) {
1073
1073
  return `<strong>${t}</strong>: `;
1074
1074
  }
1075
- var fr = function(n) {
1076
- return dr(n) && !pr(n);
1075
+ var pr = function(r) {
1076
+ return vr(r) && !mr(r);
1077
1077
  };
1078
- function dr(t) {
1078
+ function vr(t) {
1079
1079
  return !!t && typeof t == "object";
1080
1080
  }
1081
- function pr(t) {
1082
- var n = Object.prototype.toString.call(t);
1083
- return n === "[object RegExp]" || n === "[object Date]" || gr(t);
1081
+ function mr(t) {
1082
+ var r = Object.prototype.toString.call(t);
1083
+ return r === "[object RegExp]" || r === "[object Date]" || br(t);
1084
1084
  }
1085
- var vr = typeof Symbol == "function" && Symbol.for, mr = vr ? Symbol.for("react.element") : 60103;
1086
- function gr(t) {
1087
- return t.$$typeof === mr;
1085
+ var gr = typeof Symbol == "function" && Symbol.for, yr = gr ? Symbol.for("react.element") : 60103;
1086
+ function br(t) {
1087
+ return t.$$typeof === yr;
1088
1088
  }
1089
- function yr(t) {
1089
+ function Er(t) {
1090
1090
  return Array.isArray(t) ? [] : {};
1091
1091
  }
1092
- function Z(t, n) {
1093
- return n.clone !== !1 && n.isMergeableObject(t) ? U(yr(t), t, n) : t;
1092
+ function Z(t, r) {
1093
+ return r.clone !== !1 && r.isMergeableObject(t) ? U(Er(t), t, r) : t;
1094
1094
  }
1095
- function Er(t, n, a) {
1096
- return t.concat(n).map(function(c) {
1097
- return Z(c, a);
1095
+ function hr(t, r, a) {
1096
+ return t.concat(r).map(function(s) {
1097
+ return Z(s, a);
1098
1098
  });
1099
1099
  }
1100
- function br(t, n) {
1101
- if (!n.customMerge)
1100
+ function Rr(t, r) {
1101
+ if (!r.customMerge)
1102
1102
  return U;
1103
- var a = n.customMerge(t);
1103
+ var a = r.customMerge(t);
1104
1104
  return typeof a == "function" ? a : U;
1105
1105
  }
1106
- function hr(t) {
1107
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
1108
- return Object.propertyIsEnumerable.call(t, n);
1106
+ function Sr(t) {
1107
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
1108
+ return Object.propertyIsEnumerable.call(t, r);
1109
1109
  }) : [];
1110
1110
  }
1111
1111
  function qe(t) {
1112
- return Object.keys(t).concat(hr(t));
1112
+ return Object.keys(t).concat(Sr(t));
1113
1113
  }
1114
- function it(t, n) {
1114
+ function it(t, r) {
1115
1115
  try {
1116
- return n in t;
1116
+ return r in t;
1117
1117
  } catch {
1118
1118
  return !1;
1119
1119
  }
1120
1120
  }
1121
- function Rr(t, n) {
1122
- return it(t, n) && !(Object.hasOwnProperty.call(t, n) && Object.propertyIsEnumerable.call(t, n));
1121
+ function _r(t, r) {
1122
+ return it(t, r) && !(Object.hasOwnProperty.call(t, r) && Object.propertyIsEnumerable.call(t, r));
1123
1123
  }
1124
- function Sr(t, n, a) {
1125
- var c = {};
1124
+ function Tr(t, r, a) {
1125
+ var s = {};
1126
1126
  return a.isMergeableObject(t) && qe(t).forEach(function(i) {
1127
- c[i] = Z(t[i], a);
1128
- }), qe(n).forEach(function(i) {
1129
- Rr(t, i) || (it(t, i) && a.isMergeableObject(n[i]) ? c[i] = br(i, a)(t[i], n[i], a) : c[i] = Z(n[i], a));
1130
- }), c;
1127
+ s[i] = Z(t[i], a);
1128
+ }), qe(r).forEach(function(i) {
1129
+ _r(t, i) || (it(t, i) && a.isMergeableObject(r[i]) ? s[i] = Rr(i, a)(t[i], r[i], a) : s[i] = Z(r[i], a));
1130
+ }), s;
1131
1131
  }
1132
- function U(t, n, a) {
1133
- a = a || {}, a.arrayMerge = a.arrayMerge || Er, a.isMergeableObject = a.isMergeableObject || fr, a.cloneUnlessOtherwiseSpecified = Z;
1134
- var c = Array.isArray(n), i = Array.isArray(t), v = c === i;
1135
- return v ? c ? a.arrayMerge(t, n, a) : Sr(t, n, a) : Z(n, a);
1132
+ function U(t, r, a) {
1133
+ a = a || {}, a.arrayMerge = a.arrayMerge || hr, a.isMergeableObject = a.isMergeableObject || pr, a.cloneUnlessOtherwiseSpecified = Z;
1134
+ var s = Array.isArray(r), i = Array.isArray(t), p = s === i;
1135
+ return p ? s ? a.arrayMerge(t, r, a) : Tr(t, r, a) : Z(r, a);
1136
1136
  }
1137
- U.all = function(n, a) {
1138
- if (!Array.isArray(n))
1137
+ U.all = function(r, a) {
1138
+ if (!Array.isArray(r))
1139
1139
  throw new Error("first argument should be an array");
1140
- return n.reduce(function(c, i) {
1141
- return U(c, i, a);
1140
+ return r.reduce(function(s, i) {
1141
+ return U(s, i, a);
1142
1142
  }, {});
1143
1143
  };
1144
- var _r = U, Tr = _r;
1145
- const Ge = /* @__PURE__ */ Jt(Tr), ne = () => {
1144
+ var Mr = U, wr = Mr;
1145
+ const Ge = /* @__PURE__ */ Xt(wr), ne = () => {
1146
1146
  throw new Error(
1147
1147
  "You forgot to wrap your component in <MeasurementToolsProvider>."
1148
1148
  );
1149
- }, Ee = {
1149
+ }, be = {
1150
1150
  state: {
1151
1151
  enable: !1,
1152
1152
  finished: !0,
@@ -1159,29 +1159,29 @@ const Ge = /* @__PURE__ */ Jt(Tr), ne = () => {
1159
1159
  setUnit: ne,
1160
1160
  setDistance: ne
1161
1161
  }
1162
- }, st = J(Ee.state), ut = J(Ee.actions);
1163
- function wr() {
1162
+ }, st = J(be.state), ut = J(be.actions);
1163
+ function ct() {
1164
1164
  return K(
1165
1165
  st
1166
1166
  );
1167
1167
  }
1168
- function Mr() {
1168
+ function lt() {
1169
1169
  return K(
1170
1170
  ut
1171
1171
  );
1172
1172
  }
1173
- function Or(t, n) {
1174
- const a = n === ye.kilometer ? 1 : 0.621371;
1173
+ function Or(t, r) {
1174
+ const a = r === ye.kilometer ? 1 : 0.621371;
1175
1175
  return t * a;
1176
1176
  }
1177
1177
  function Ze({
1178
1178
  text: t,
1179
- unit: n,
1179
+ unit: r,
1180
1180
  locale: a
1181
1181
  }) {
1182
- return `${ot(Or(t, n), a, {
1182
+ return `${ot(Or(t, r), a, {
1183
1183
  style: "unit",
1184
- unit: n
1184
+ unit: r
1185
1185
  })}`;
1186
1186
  }
1187
1187
  function Pr(t) {
@@ -1192,19 +1192,19 @@ function Cr(t) {
1192
1192
  }
1193
1193
  function Ur({
1194
1194
  mapId: t,
1195
- defaultProps: { locale: n = "en", getColumnName: a } = {
1195
+ defaultProps: { locale: r = "en", getColumnName: a } = {
1196
1196
  getColumnName: "<b>Total distance</b> "
1197
1197
  },
1198
- layerProps: c = {}
1198
+ layerProps: s = {}
1199
1199
  }) {
1200
- const { distance: i, enable: v, unit: l } = wr(), { setDistance: h, setFinished: u } = Mr(), { isLoaded: y, basemap: E } = rt(t), { getOverlayInstance: _ } = ge(t), O = Yt(() => {
1201
- if (!y || !Cr(E))
1200
+ const { distance: i, enable: p, unit: l } = ct(), { setDistance: h, setFinished: c } = lt(), { isLoaded: y, basemap: b } = rt(t), { getOverlayInstance: _ } = ge(t), O = Wt(() => {
1201
+ if (!y || !Cr(b))
1202
1202
  return null;
1203
1203
  const T = _()?.getDiv();
1204
- return new Ht(T, {});
1205
- }, [y, _, E]), m = M(
1204
+ return new qt(T, {});
1205
+ }, [y, _, b]), m = w(
1206
1206
  (T, P) => {
1207
- T.html = or({
1207
+ T.html = sr({
1208
1208
  properties: {
1209
1209
  distance: Ze({
1210
1210
  text: P.distance,
@@ -1217,33 +1217,44 @@ function Ur({
1217
1217
  },
1218
1218
  [a, l]
1219
1219
  );
1220
- if (!v || !y)
1220
+ if (!p || !y)
1221
1221
  return null;
1222
- const g = Ge(c, {
1222
+ const g = Ge(s, {
1223
1223
  modeConfig: {
1224
1224
  // We force distance due to conversion is addressed at feature getText level
1225
1225
  formatTooltip: (T) => T
1226
1226
  },
1227
- onHover: (T) => (c?.onHover || m)(T, { distance: i, locale: n, unit: l }),
1227
+ onHover: (T) => (s?.onHover || m)(T, { distance: i, locale: r, unit: l }),
1228
1228
  onEdit: ({ editType: T, editContext: P }) => {
1229
- T === G.AddPosition && h(P.distance), T === G.Finish && u(!0);
1229
+ T === G.AddPosition && h(P.distance), T === G.Finish && c(!0);
1230
1230
  },
1231
1231
  _subLayerProps: {
1232
1232
  tooltips: {
1233
- getText: (T) => Ze({ ...T, locale: n, unit: l }),
1233
+ getText: (T) => Ze({ ...T, locale: r, unit: l }),
1234
1234
  updateTriggers: {
1235
- getText: [l, n]
1235
+ getText: [l, r]
1236
1236
  }
1237
1237
  }
1238
1238
  }
1239
- }), x = Ge(rr, g);
1240
- return new nr({
1239
+ }), x = Ge(ar, g);
1240
+ return new or({
1241
1241
  ...x,
1242
1242
  eventManager: O
1243
1243
  });
1244
1244
  }
1245
+ function $r({ children: t }) {
1246
+ const { distance: r, enable: a, unit: s } = ct(), { setDistance: i, setEnable: p } = lt();
1247
+ return t({
1248
+ enable: a,
1249
+ distance: r,
1250
+ unit: s,
1251
+ onToggleButton: () => {
1252
+ i(0), p(!a);
1253
+ }
1254
+ });
1255
+ }
1245
1256
  var H = /* @__PURE__ */ ((t) => (t.SetEnable = "SET_ENABLE", t.SetFinished = "SET_FINISHED", t.SetDistance = "SET_DISTANCE", t.SetUnit = "SET_UNIT", t))(H || {});
1246
- function jr(t, { type: n, payload: a }) {
1257
+ function jr(t, { type: r, payload: a }) {
1247
1258
  return {
1248
1259
  SET_ENABLE: () => ({
1249
1260
  ...t,
@@ -1262,58 +1273,59 @@ function jr(t, { type: n, payload: a }) {
1262
1273
  ...t,
1263
1274
  unit: a
1264
1275
  })
1265
- }[n]?.() ?? t;
1276
+ }[r]?.() ?? t;
1266
1277
  }
1267
- function $r({
1278
+ function Vr({
1268
1279
  children: t
1269
1280
  }) {
1270
- const [n, a] = Ke(jr, Ee.state), c = M(
1271
- (u) => {
1272
- a({ type: H.SetEnable, payload: u });
1281
+ const [r, a] = Ke(jr, be.state), s = w(
1282
+ (c) => {
1283
+ a({ type: H.SetEnable, payload: c });
1273
1284
  },
1274
1285
  [a]
1275
- ), i = M(
1276
- (u) => {
1277
- a({ type: H.SetFinished, payload: u });
1286
+ ), i = w(
1287
+ (c) => {
1288
+ a({ type: H.SetFinished, payload: c });
1278
1289
  },
1279
1290
  [a]
1280
- ), v = M(
1281
- (u) => {
1282
- a({ type: H.SetDistance, payload: u });
1291
+ ), p = w(
1292
+ (c) => {
1293
+ a({ type: H.SetDistance, payload: c });
1283
1294
  },
1284
1295
  [a]
1285
- ), l = M(
1286
- (u) => {
1287
- a({ type: H.SetUnit, payload: u });
1296
+ ), l = w(
1297
+ (c) => {
1298
+ a({ type: H.SetUnit, payload: c });
1288
1299
  },
1289
1300
  [a]
1290
1301
  ), h = pe({
1291
- setEnable: c,
1302
+ setEnable: s,
1292
1303
  setFinished: i,
1293
- setDistance: v,
1304
+ setDistance: p,
1294
1305
  setUnit: l
1295
1306
  });
1296
- return /* @__PURE__ */ z.jsx(ut.Provider, { value: h.current, children: /* @__PURE__ */ z.jsx(st.Provider, { value: n, children: t }) });
1307
+ return /* @__PURE__ */ z.jsx(ut.Provider, { value: h.current, children: /* @__PURE__ */ z.jsx(st.Provider, { value: r, children: t }) });
1297
1308
  }
1298
1309
  export {
1299
1310
  de as CartoBasemapURL,
1300
- qt as CartoBasemapsNames,
1301
- nr as CustomEditableGeojsonLayer,
1302
- er as CustomMeasureDistanceMode,
1303
- rr as DEFAULT_LAYER_PROPS,
1311
+ Zt as CartoBasemapsNames,
1312
+ or as CustomEditableGeojsonLayer,
1313
+ rr as CustomMeasureDistanceMode,
1314
+ ar as DEFAULT_LAYER_PROPS,
1304
1315
  He as EVENT_MANAGER_EVENT_TYPES,
1305
1316
  G as EditType,
1306
1317
  k as FormatterTypes,
1307
- zt as GMapsBasemap,
1318
+ Gt as GMapsBasemap,
1308
1319
  ve as MAPS_BASEMAP,
1309
- tr as MAP_MEASURE_LAYER_ID,
1320
+ nr as MAP_MEASURE_LAYER_ID,
1310
1321
  F as MapActions,
1311
1322
  tt as MapActionsContext,
1312
1323
  Qe as MapContext,
1324
+ $r as MapMeasurementTools,
1313
1325
  Ur as MapMeasurementToolsLayer,
1314
- $r as MapMeasurementToolsProvider,
1326
+ Vr as MapMeasurementToolsProvider,
1315
1327
  ye as MapMeasurementUnit,
1316
- Qt as MapMeasurementUnitTurf,
1328
+ tr as MapMeasurementUnitTurf,
1317
1329
  Nr as MapProvider,
1318
1330
  et as MapReferencesContext,
1319
1331
  Xe as MapsTypes,
@@ -1321,14 +1333,14 @@ export {
1321
1333
  Pr as getMapType,
1322
1334
  Ze as getTextLayerFormattedDistance,
1323
1335
  Cr as isGmaps,
1324
- or as objectToHtml,
1325
- Gt as reducer,
1336
+ sr as objectToHtml,
1337
+ Jt as reducer,
1326
1338
  rt as useMap,
1327
- Zt as useMapActions,
1339
+ Kt as useMapActions,
1328
1340
  Ir as useMapActionsByID,
1329
1341
  kr as useMapByID,
1330
- wr as useMapMeasurementTools,
1331
- Mr as useMapMeasurementToolsActions,
1342
+ ct as useMapMeasurementTools,
1343
+ lt as useMapMeasurementToolsActions,
1332
1344
  ge as useMapRefences,
1333
1345
  ge as useMapReferences,
1334
1346
  Lr as useMapReferencesByID