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