@local-logic/maps 0.0.10 → 0.0.12

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 (49) hide show
  1. package/dist/{index-BYlamtEc.js → index-B3NH4rqN.js} +30 -17
  2. package/dist/index-B9YXnLOH.js +42 -0
  3. package/dist/index-BcpSqK0X.js +74 -0
  4. package/dist/{index-DgHrPgsK.js → index-Bd7meO8V.js} +245 -234
  5. package/dist/index-BhldVNew.js +35 -0
  6. package/dist/index-Bu4XEiYU.js +74 -0
  7. package/dist/{index-CR8t37Oz.js → index-CzBPD5Sw.js} +10 -10
  8. package/dist/index-DFdfOz0d.js +34 -0
  9. package/dist/index-DsrEcQq0.js +71 -0
  10. package/dist/{index-BtwgeEEU.js → index-LKvWHhi6.js} +14 -14
  11. package/dist/{index-BsnsAUt5.js → index-UEadmVww.js} +2 -1
  12. package/dist/{index-JQfyhSrg.js → index-aDlW4ps0.js} +5 -5
  13. package/dist/index.es.js +1 -1
  14. package/dist/index.umd.js +30 -26
  15. package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
  16. package/dist/src/components/Map/Root/Layers/Google/index.d.ts.map +1 -1
  17. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts +2 -1
  18. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts.map +1 -1
  19. package/dist/src/components/Map/Root/Markers/Google/index.d.ts +1 -1
  20. package/dist/src/components/Map/Root/Markers/Google/index.d.ts.map +1 -1
  21. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts +1 -1
  22. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts.map +1 -1
  23. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts +1 -1
  24. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts.map +1 -1
  25. package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
  26. package/dist/src/components/Map/Root/Markers/styles.d.ts +2 -2
  27. package/dist/src/components/Map/Root/Markers/styles.d.ts.map +1 -1
  28. package/dist/src/components/Map/Root/Markers/types.d.ts +1 -0
  29. package/dist/src/components/Map/Root/Markers/types.d.ts.map +1 -1
  30. package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -1
  31. package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -1
  32. package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -1
  33. package/dist/src/components/Map/Root/Popup/styles.d.ts +1 -1
  34. package/dist/src/components/Map/Root/Popup/styles.d.ts.map +1 -1
  35. package/dist/src/components/Map/Root/constants.d.ts +1 -0
  36. package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
  37. package/dist/src/components/Map/Root/context.d.ts +1 -0
  38. package/dist/src/components/Map/Root/context.d.ts.map +1 -1
  39. package/dist/src/components/Map/Root/types.d.ts +1 -0
  40. package/dist/src/components/Map/Root/types.d.ts.map +1 -1
  41. package/dist/style.css +2 -2
  42. package/dist/{styles-uPzJnzVS.js → styles-ChFj97uV.js} +1 -1
  43. package/package.json +1 -1
  44. package/dist/index-9RZYMoMG.js +0 -39
  45. package/dist/index-BOuko7CL.js +0 -32
  46. package/dist/index-CRQ5kxRL.js +0 -65
  47. package/dist/index-D5uhfwEH.js +0 -31
  48. package/dist/index-DNKXUpkv.js +0 -65
  49. package/dist/index-DnsF5I7I.js +0 -62
@@ -1,16 +1,16 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
- import * as B from "react";
3
- import ot, { useContext as at, useMemo as v, lazy as _, useRef as V, useState as D, useEffect as ct } from "react";
4
- const X = ot.createContext({}), Z = () => at(X), R = {
2
+ import * as D from "react";
3
+ import at, { useContext as ct, useState as U, useMemo as P, lazy as A, useRef as H, useEffect as ut } from "react";
4
+ const et = at.createContext({}), Z = () => ct(et), R = {
5
5
  zoom: 14,
6
6
  pitch: 0,
7
7
  bearing: 0,
8
8
  cooperativeGestures: !1
9
- }, H = {
9
+ }, J = {
10
10
  maptiler: "600d69cb-288d-445e-9839-3dfe4d76b31a",
11
11
  mapbox: "locallogic/cmb9nz9kb011501ru8drq8fqf",
12
12
  google: "a7ff20eb973126bb"
13
- }, ut = 13, ht = 22, lt = 30, pt = "w-full h-full relative overflow-hidden", ft = _(() => import("./index-JQfyhSrg.js")), dt = _(() => import("./index-CR8t37Oz.js")), gt = _(() => import("./index-BtwgeEEU.js")), mt = _(() => import("./index-qqbvBkdn.js")), yt = ({ children: r }) => {
13
+ }, K = 13, ht = 22, lt = 30, pt = 60, ft = "w-full h-full relative overflow-hidden", dt = A(() => import("./index-aDlW4ps0.js")), gt = A(() => import("./index-CzBPD5Sw.js")), mt = A(() => import("./index-LKvWHhi6.js")), yt = A(() => import("./index-qqbvBkdn.js")), wt = ({ children: r }) => {
14
14
  const {
15
15
  mapProvider: t,
16
16
  center: e,
@@ -18,86 +18,86 @@ const X = ot.createContext({}), Z = () => at(X), R = {
18
18
  pitch: i = R.pitch,
19
19
  bearing: o = R.bearing,
20
20
  cooperativeGestures: a = R.cooperativeGestures,
21
- zoomPosition: u
22
- } = Z(), s = v(() => {
21
+ zoomPosition: c
22
+ } = Z(), [s] = U(n), h = P(() => {
23
23
  switch (t == null ? void 0 : t.name) {
24
24
  case "maptiler":
25
- return ft;
26
- case "google":
27
25
  return dt;
28
- case "mapbox":
26
+ case "google":
29
27
  return gt;
30
- default:
28
+ case "mapbox":
31
29
  return mt;
30
+ default:
31
+ return yt;
32
32
  }
33
33
  }, [t]);
34
34
  return /* @__PURE__ */ T(
35
35
  "div",
36
36
  {
37
- className: pt,
37
+ className: ft,
38
38
  "data-testid": "base-map",
39
39
  "data-map-provider-name": t == null ? void 0 : t.name,
40
- "data-map-provider-theme": (t == null ? void 0 : t.theme) || H[t == null ? void 0 : t.name] || H.maptiler,
41
- "data-zoom": n,
40
+ "data-map-provider-theme": (t == null ? void 0 : t.theme) || J[t == null ? void 0 : t.name] || J.maptiler,
41
+ "data-initial-zoom": s,
42
42
  "data-pitch": i,
43
43
  "data-bearing": o,
44
44
  "data-cooperative-gestures": a,
45
- "data-zoom-position": u,
45
+ "data-zoom-position": c,
46
46
  "data-center-latitude": e.latitude,
47
47
  "data-center-longitude": e.longitude,
48
- children: /* @__PURE__ */ T(s, { children: r })
48
+ children: /* @__PURE__ */ T(h, { children: r })
49
49
  }
50
50
  );
51
- }, wt = _(() => import("./index-Do_dW76Q.js")), Mt = _(() => import("./index-BCa658u4.js")), _t = _(() => import("./index-CNxLnZ8O.js"));
52
- function At(r) {
53
- const { mapProvider: t } = Z(), e = v(() => {
51
+ }, Mt = A(() => import("./index-Do_dW76Q.js")), _t = A(() => import("./index-BCa658u4.js")), At = A(() => import("./index-CNxLnZ8O.js"));
52
+ function Et(r) {
53
+ const { mapProvider: t } = Z(), e = P(() => {
54
54
  switch (t == null ? void 0 : t.name) {
55
55
  case "maptiler":
56
- return wt;
57
- case "google":
58
56
  return Mt;
59
- case "mapbox":
57
+ case "google":
60
58
  return _t;
59
+ case "mapbox":
60
+ return At;
61
61
  default:
62
62
  return null;
63
63
  }
64
64
  }, [t]);
65
65
  return e ? /* @__PURE__ */ T(e, { ...r }) : null;
66
66
  }
67
- function tt(r, t, e = {}) {
67
+ function nt(r, t, e = {}) {
68
68
  const n = { type: "Feature" };
69
69
  return (e.id === 0 || e.id) && (n.id = e.id), e.bbox && (n.bbox = e.bbox), n.properties = t || {}, n.geometry = r, n;
70
70
  }
71
- function Et(r, t, e = {}) {
71
+ function bt(r, t, e = {}) {
72
72
  if (!r)
73
73
  throw new Error("coordinates is required");
74
74
  if (!Array.isArray(r))
75
75
  throw new Error("coordinates must be an Array");
76
76
  if (r.length < 2)
77
77
  throw new Error("coordinates must be at least 2 numbers long");
78
- if (!J(r[0]) || !J(r[1]))
78
+ if (!W(r[0]) || !W(r[1]))
79
79
  throw new Error("coordinates must contain numbers");
80
- return tt({
80
+ return nt({
81
81
  type: "Point",
82
82
  coordinates: r
83
83
  }, t, e);
84
84
  }
85
- function bt(r, t, e = {}) {
86
- return tt({
85
+ function St(r, t, e = {}) {
86
+ return nt({
87
87
  type: "MultiPoint",
88
88
  coordinates: r
89
89
  }, t, e);
90
90
  }
91
- function J(r) {
91
+ function W(r) {
92
92
  return !isNaN(r) && r !== null && !Array.isArray(r);
93
93
  }
94
- function et(r, t, e) {
94
+ function rt(r, t, e) {
95
95
  if (r !== null)
96
- for (var n, i, o, a, u, s, h, l = 0, c = 0, p, d = r.type, y = d === "FeatureCollection", f = d === "Feature", m = y ? r.features.length : 1, g = 0; g < m; g++) {
97
- h = y ? r.features[g].geometry : f ? r.geometry : r, p = h ? h.type === "GeometryCollection" : !1, u = p ? h.geometries.length : 1;
98
- for (var M = 0; M < u; M++) {
99
- var w = 0, A = 0;
100
- if (a = p ? h.geometries[M] : h, a !== null) {
96
+ for (var n, i, o, a, c, s, h, l = 0, u = 0, p, d = r.type, g = d === "FeatureCollection", M = d === "Feature", w = g ? r.features.length : 1, y = 0; y < w; y++) {
97
+ h = g ? r.features[y].geometry : M ? r.geometry : r, p = h ? h.type === "GeometryCollection" : !1, c = p ? h.geometries.length : 1;
98
+ for (var f = 0; f < c; f++) {
99
+ var m = 0, _ = 0;
100
+ if (a = p ? h.geometries[f] : h, a !== null) {
101
101
  s = a.coordinates;
102
102
  var E = a.type;
103
103
  switch (l = 0, E) {
@@ -106,28 +106,28 @@ function et(r, t, e) {
106
106
  case "Point":
107
107
  if (t(
108
108
  s,
109
- c,
110
- g,
111
- w,
112
- A
109
+ u,
110
+ y,
111
+ m,
112
+ _
113
113
  ) === !1)
114
114
  return !1;
115
- c++, w++;
115
+ u++, m++;
116
116
  break;
117
117
  case "LineString":
118
118
  case "MultiPoint":
119
119
  for (n = 0; n < s.length; n++) {
120
120
  if (t(
121
121
  s[n],
122
- c,
123
- g,
124
- w,
125
- A
122
+ u,
123
+ y,
124
+ m,
125
+ _
126
126
  ) === !1)
127
127
  return !1;
128
- c++, E === "MultiPoint" && w++;
128
+ u++, E === "MultiPoint" && m++;
129
129
  }
130
- E === "LineString" && w++;
130
+ E === "LineString" && m++;
131
131
  break;
132
132
  case "Polygon":
133
133
  case "MultiLineString":
@@ -135,40 +135,40 @@ function et(r, t, e) {
135
135
  for (i = 0; i < s[n].length - l; i++) {
136
136
  if (t(
137
137
  s[n][i],
138
- c,
139
- g,
140
- w,
141
- A
138
+ u,
139
+ y,
140
+ m,
141
+ _
142
142
  ) === !1)
143
143
  return !1;
144
- c++;
144
+ u++;
145
145
  }
146
- E === "MultiLineString" && w++, E === "Polygon" && A++;
146
+ E === "MultiLineString" && m++, E === "Polygon" && _++;
147
147
  }
148
- E === "Polygon" && w++;
148
+ E === "Polygon" && m++;
149
149
  break;
150
150
  case "MultiPolygon":
151
151
  for (n = 0; n < s.length; n++) {
152
- for (A = 0, i = 0; i < s[n].length; i++) {
152
+ for (_ = 0, i = 0; i < s[n].length; i++) {
153
153
  for (o = 0; o < s[n][i].length - l; o++) {
154
154
  if (t(
155
155
  s[n][i][o],
156
- c,
157
- g,
158
- w,
159
- A
156
+ u,
157
+ y,
158
+ m,
159
+ _
160
160
  ) === !1)
161
161
  return !1;
162
- c++;
162
+ u++;
163
163
  }
164
- A++;
164
+ _++;
165
165
  }
166
- w++;
166
+ m++;
167
167
  }
168
168
  break;
169
169
  case "GeometryCollection":
170
170
  for (n = 0; n < a.geometries.length; n++)
171
- if (et(a.geometries[n], t) === !1)
171
+ if (rt(a.geometries[n], t) === !1)
172
172
  return !1;
173
173
  break;
174
174
  default:
@@ -178,15 +178,15 @@ function et(r, t, e) {
178
178
  }
179
179
  }
180
180
  }
181
- function St(r, t = {}) {
181
+ function Ot(r, t = {}) {
182
182
  if (r.bbox != null && t.recompute !== !0)
183
183
  return r.bbox;
184
184
  const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
185
- return et(r, (n) => {
185
+ return rt(r, (n) => {
186
186
  e[0] > n[0] && (e[0] = n[0]), e[1] > n[1] && (e[1] = n[1]), e[2] < n[0] && (e[2] = n[0]), e[3] < n[1] && (e[3] = n[1]);
187
187
  }), e;
188
188
  }
189
- const K = [
189
+ const Y = [
190
190
  Int8Array,
191
191
  Uint8Array,
192
192
  Uint8ClampedArray,
@@ -196,8 +196,8 @@ const K = [
196
196
  Uint32Array,
197
197
  Float32Array,
198
198
  Float64Array
199
- ], F = 1, L = 8;
200
- class j {
199
+ ], G = 1, L = 8;
200
+ class I {
201
201
  /**
202
202
  * Creates an index from raw `ArrayBuffer` data.
203
203
  * @param {ArrayBuffer} data
@@ -209,13 +209,13 @@ class j {
209
209
  if (e !== 219)
210
210
  throw new Error("Data does not appear to be in a KDBush format.");
211
211
  const i = n >> 4;
212
- if (i !== F)
213
- throw new Error(`Got v${i} data when expected v${F}.`);
214
- const o = K[n & 15];
212
+ if (i !== G)
213
+ throw new Error(`Got v${i} data when expected v${G}.`);
214
+ const o = Y[n & 15];
215
215
  if (!o)
216
216
  throw new Error("Unrecognized array type.");
217
- const [a] = new Uint16Array(t, 2, 1), [u] = new Uint32Array(t, 4, 1);
218
- return new j(u, a, o, t);
217
+ const [a] = new Uint16Array(t, 2, 1), [c] = new Uint32Array(t, 4, 1);
218
+ return new I(c, a, o, t);
219
219
  }
220
220
  /**
221
221
  * Creates an index that will hold a given number of items.
@@ -227,10 +227,10 @@ class j {
227
227
  constructor(t, e = 64, n = Float64Array, i) {
228
228
  if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`);
229
229
  this.numItems = +t, this.nodeSize = Math.min(Math.max(+e, 2), 65535), this.ArrayType = n, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array;
230
- const o = K.indexOf(this.ArrayType), a = t * 2 * this.ArrayType.BYTES_PER_ELEMENT, u = t * this.IndexArrayType.BYTES_PER_ELEMENT, s = (8 - u % 8) % 8;
230
+ const o = Y.indexOf(this.ArrayType), a = t * 2 * this.ArrayType.BYTES_PER_ELEMENT, c = t * this.IndexArrayType.BYTES_PER_ELEMENT, s = (8 - c % 8) % 8;
231
231
  if (o < 0)
232
232
  throw new Error(`Unexpected typed array class: ${n}.`);
233
- i && i instanceof ArrayBuffer ? (this.data = i, this.ids = new this.IndexArrayType(this.data, L, t), this.coords = new this.ArrayType(this.data, L + u + s, t * 2), this._pos = t * 2, this._finished = !0) : (this.data = new ArrayBuffer(L + a + u + s), this.ids = new this.IndexArrayType(this.data, L, t), this.coords = new this.ArrayType(this.data, L + u + s, t * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (F << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = e, new Uint32Array(this.data, 4, 1)[0] = t);
233
+ i && i instanceof ArrayBuffer ? (this.data = i, this.ids = new this.IndexArrayType(this.data, L, t), this.coords = new this.ArrayType(this.data, L + c + s, t * 2), this._pos = t * 2, this._finished = !0) : (this.data = new ArrayBuffer(L + a + c + s), this.ids = new this.IndexArrayType(this.data, L, t), this.coords = new this.ArrayType(this.data, L + c + s, t * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (G << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = e, new Uint32Array(this.data, 4, 1)[0] = t);
234
234
  }
235
235
  /**
236
236
  * Add a point to the index.
@@ -249,7 +249,7 @@ class j {
249
249
  const t = this._pos >> 1;
250
250
  if (t !== this.numItems)
251
251
  throw new Error(`Added ${t} items when expected ${this.numItems}.`);
252
- return $(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
252
+ return j(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
253
253
  }
254
254
  /**
255
255
  * Search the index for items within a given bounding box.
@@ -261,18 +261,18 @@ class j {
261
261
  */
262
262
  range(t, e, n, i) {
263
263
  if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
264
- const { ids: o, coords: a, nodeSize: u } = this, s = [0, o.length - 1, 0], h = [];
264
+ const { ids: o, coords: a, nodeSize: c } = this, s = [0, o.length - 1, 0], h = [];
265
265
  for (; s.length; ) {
266
- const l = s.pop() || 0, c = s.pop() || 0, p = s.pop() || 0;
267
- if (c - p <= u) {
268
- for (let m = p; m <= c; m++) {
269
- const g = a[2 * m], M = a[2 * m + 1];
270
- g >= t && g <= n && M >= e && M <= i && h.push(o[m]);
266
+ const l = s.pop() || 0, u = s.pop() || 0, p = s.pop() || 0;
267
+ if (u - p <= c) {
268
+ for (let w = p; w <= u; w++) {
269
+ const y = a[2 * w], f = a[2 * w + 1];
270
+ y >= t && y <= n && f >= e && f <= i && h.push(o[w]);
271
271
  }
272
272
  continue;
273
273
  }
274
- const d = p + c >> 1, y = a[2 * d], f = a[2 * d + 1];
275
- y >= t && y <= n && f >= e && f <= i && h.push(o[d]), (l === 0 ? t <= y : e <= f) && (s.push(p), s.push(d - 1), s.push(1 - l)), (l === 0 ? n >= y : i >= f) && (s.push(d + 1), s.push(c), s.push(1 - l));
274
+ const d = p + u >> 1, g = a[2 * d], M = a[2 * d + 1];
275
+ g >= t && g <= n && M >= e && M <= i && h.push(o[d]), (l === 0 ? t <= g : e <= M) && (s.push(p), s.push(d - 1), s.push(1 - l)), (l === 0 ? n >= g : i >= M) && (s.push(d + 1), s.push(u), s.push(1 - l));
276
276
  }
277
277
  return h;
278
278
  }
@@ -285,35 +285,35 @@ class j {
285
285
  */
286
286
  within(t, e, n) {
287
287
  if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
288
- const { ids: i, coords: o, nodeSize: a } = this, u = [0, i.length - 1, 0], s = [], h = n * n;
289
- for (; u.length; ) {
290
- const l = u.pop() || 0, c = u.pop() || 0, p = u.pop() || 0;
291
- if (c - p <= a) {
292
- for (let m = p; m <= c; m++)
293
- W(o[2 * m], o[2 * m + 1], t, e) <= h && s.push(i[m]);
288
+ const { ids: i, coords: o, nodeSize: a } = this, c = [0, i.length - 1, 0], s = [], h = n * n;
289
+ for (; c.length; ) {
290
+ const l = c.pop() || 0, u = c.pop() || 0, p = c.pop() || 0;
291
+ if (u - p <= a) {
292
+ for (let w = p; w <= u; w++)
293
+ q(o[2 * w], o[2 * w + 1], t, e) <= h && s.push(i[w]);
294
294
  continue;
295
295
  }
296
- const d = p + c >> 1, y = o[2 * d], f = o[2 * d + 1];
297
- W(y, f, t, e) <= h && s.push(i[d]), (l === 0 ? t - n <= y : e - n <= f) && (u.push(p), u.push(d - 1), u.push(1 - l)), (l === 0 ? t + n >= y : e + n >= f) && (u.push(d + 1), u.push(c), u.push(1 - l));
296
+ const d = p + u >> 1, g = o[2 * d], M = o[2 * d + 1];
297
+ q(g, M, t, e) <= h && s.push(i[d]), (l === 0 ? t - n <= g : e - n <= M) && (c.push(p), c.push(d - 1), c.push(1 - l)), (l === 0 ? t + n >= g : e + n >= M) && (c.push(d + 1), c.push(u), c.push(1 - l));
298
298
  }
299
299
  return s;
300
300
  }
301
301
  }
302
- function $(r, t, e, n, i, o) {
302
+ function j(r, t, e, n, i, o) {
303
303
  if (i - n <= e) return;
304
304
  const a = n + i >> 1;
305
- nt(r, t, a, n, i, o), $(r, t, e, n, a - 1, 1 - o), $(r, t, e, a + 1, i, 1 - o);
305
+ st(r, t, a, n, i, o), j(r, t, e, n, a - 1, 1 - o), j(r, t, e, a + 1, i, 1 - o);
306
306
  }
307
- function nt(r, t, e, n, i, o) {
307
+ function st(r, t, e, n, i, o) {
308
308
  for (; i > n; ) {
309
309
  if (i - n > 600) {
310
- const h = i - n + 1, l = e - n + 1, c = Math.log(h), p = 0.5 * Math.exp(2 * c / 3), d = 0.5 * Math.sqrt(c * p * (h - p) / h) * (l - h / 2 < 0 ? -1 : 1), y = Math.max(n, Math.floor(e - l * p / h + d)), f = Math.min(i, Math.floor(e + (h - l) * p / h + d));
311
- nt(r, t, e, y, f, o);
310
+ const h = i - n + 1, l = e - n + 1, u = Math.log(h), p = 0.5 * Math.exp(2 * u / 3), d = 0.5 * Math.sqrt(u * p * (h - p) / h) * (l - h / 2 < 0 ? -1 : 1), g = Math.max(n, Math.floor(e - l * p / h + d)), M = Math.min(i, Math.floor(e + (h - l) * p / h + d));
311
+ st(r, t, e, g, M, o);
312
312
  }
313
313
  const a = t[2 * e + o];
314
- let u = n, s = i;
315
- for (C(r, t, n, e), t[2 * i + o] > a && C(r, t, n, i); u < s; ) {
316
- for (C(r, t, u, s), u++, s--; t[2 * u + o] < a; ) u++;
314
+ let c = n, s = i;
315
+ for (C(r, t, n, e), t[2 * i + o] > a && C(r, t, n, i); c < s; ) {
316
+ for (C(r, t, c, s), c++, s--; t[2 * c + o] < a; ) c++;
317
317
  for (; t[2 * s + o] > a; ) s--;
318
318
  }
319
319
  t[2 * n + o] === a ? C(r, t, n, s) : (s++, C(r, t, s, i)), s <= e && (n = s + 1), e <= s && (i = s - 1);
@@ -326,7 +326,7 @@ function N(r, t, e) {
326
326
  const n = r[t];
327
327
  r[t] = r[e], r[e] = n;
328
328
  }
329
- function W(r, t, e, n) {
329
+ function q(r, t, e, n) {
330
330
  const i = r - e, o = t - n;
331
331
  return i * i + o * o;
332
332
  }
@@ -353,7 +353,7 @@ const xt = {
353
353
  // properties to use for individual points when running the reducer
354
354
  map: (r) => r
355
355
  // props => ({sum: props.my_value})
356
- }, Y = Math.fround || /* @__PURE__ */ ((r) => (t) => (r[0] = +t, r[0]))(new Float32Array(1)), P = 2, S = 3, G = 4, b = 5, rt = 6;
356
+ }, Q = Math.fround || /* @__PURE__ */ ((r) => (t) => (r[0] = +t, r[0]))(new Float32Array(1)), x = 2, S = 3, $ = 4, b = 5, it = 6;
357
357
  class Pt {
358
358
  constructor(t) {
359
359
  this.options = Object.assign(Object.create(xt), t), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
@@ -367,7 +367,7 @@ class Pt {
367
367
  for (let s = 0; s < t.length; s++) {
368
368
  const h = t[s];
369
369
  if (!h.geometry) continue;
370
- const [l, c] = h.geometry.coordinates, p = Y(U(l)), d = Y(z(c));
370
+ const [l, u] = h.geometry.coordinates, p = Q(z(l)), d = Q(B(u));
371
371
  a.push(
372
372
  p,
373
373
  d,
@@ -382,11 +382,11 @@ class Pt {
382
382
  // number of points in a cluster
383
383
  ), this.options.reduce && a.push(0);
384
384
  }
385
- let u = this.trees[i + 1] = this._createTree(a);
385
+ let c = this.trees[i + 1] = this._createTree(a);
386
386
  e && console.timeEnd(o);
387
387
  for (let s = i; s >= n; s--) {
388
388
  const h = +Date.now();
389
- u = this.trees[s] = this._createTree(this._cluster(u, s)), e && console.log("z%d: %d clusters in %dms", s, u.numItems, +Date.now() - h);
389
+ c = this.trees[s] = this._createTree(this._cluster(c, s)), e && console.log("z%d: %d clusters in %dms", s, c.numItems, +Date.now() - h);
390
390
  }
391
391
  return e && console.timeEnd("total time"), this;
392
392
  }
@@ -398,13 +398,13 @@ class Pt {
398
398
  if (t[2] - t[0] >= 360)
399
399
  n = -180, o = 180;
400
400
  else if (n > o) {
401
- const c = this.getClusters([n, i, 180, a], e), p = this.getClusters([-180, i, o, a], e);
402
- return c.concat(p);
401
+ const u = this.getClusters([n, i, 180, a], e), p = this.getClusters([-180, i, o, a], e);
402
+ return u.concat(p);
403
403
  }
404
- const u = this.trees[this._limitZoom(e)], s = u.range(U(n), z(a), U(o), z(i)), h = u.data, l = [];
405
- for (const c of s) {
406
- const p = this.stride * c;
407
- l.push(h[p + b] > 1 ? q(h, p, this.clusterProps) : this.points[h[p + S]]);
404
+ const c = this.trees[this._limitZoom(e)], s = c.range(z(n), B(a), z(o), B(i)), h = c.data, l = [];
405
+ for (const u of s) {
406
+ const p = this.stride * u;
407
+ l.push(h[p + b] > 1 ? k(h, p, this.clusterProps) : this.points[h[p + S]]);
408
408
  }
409
409
  return l;
410
410
  }
@@ -413,13 +413,13 @@ class Pt {
413
413
  if (!o) throw new Error(i);
414
414
  const a = o.data;
415
415
  if (e * this.stride >= a.length) throw new Error(i);
416
- const u = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), s = a[e * this.stride], h = a[e * this.stride + 1], l = o.within(s, h, u), c = [];
416
+ const c = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), s = a[e * this.stride], h = a[e * this.stride + 1], l = o.within(s, h, c), u = [];
417
417
  for (const p of l) {
418
418
  const d = p * this.stride;
419
- a[d + G] === t && c.push(a[d + b] > 1 ? q(a, d, this.clusterProps) : this.points[a[d + S]]);
419
+ a[d + $] === t && u.push(a[d + b] > 1 ? k(a, d, this.clusterProps) : this.points[a[d + S]]);
420
420
  }
421
- if (c.length === 0) throw new Error(i);
422
- return c;
421
+ if (u.length === 0) throw new Error(i);
422
+ return u;
423
423
  }
424
424
  getLeaves(t, e, n) {
425
425
  e = e || 10, n = n || 0;
@@ -427,7 +427,7 @@ class Pt {
427
427
  return this._appendLeaves(i, t, e, n, 0), i;
428
428
  }
429
429
  getTile(t, e, n) {
430
- const i = this.trees[this._limitZoom(t)], o = Math.pow(2, t), { extent: a, radius: u } = this.options, s = u / a, h = (n - s) / o, l = (n + 1 + s) / o, c = {
430
+ const i = this.trees[this._limitZoom(t)], o = Math.pow(2, t), { extent: a, radius: c } = this.options, s = c / a, h = (n - s) / o, l = (n + 1 + s) / o, u = {
431
431
  features: []
432
432
  };
433
433
  return this._addTileFeatures(
@@ -436,22 +436,22 @@ class Pt {
436
436
  e,
437
437
  n,
438
438
  o,
439
- c
439
+ u
440
440
  ), e === 0 && this._addTileFeatures(
441
441
  i.range(1 - s / o, h, 1, l),
442
442
  i.data,
443
443
  o,
444
444
  n,
445
445
  o,
446
- c
446
+ u
447
447
  ), e === o - 1 && this._addTileFeatures(
448
448
  i.range(0, h, s / o, l),
449
449
  i.data,
450
450
  -1,
451
451
  n,
452
452
  o,
453
- c
454
- ), c.features.length ? c : null;
453
+ u
454
+ ), u.features.length ? u : null;
455
455
  }
456
456
  getClusterExpansionZoom(t) {
457
457
  let e = this._getOriginZoom(t) - 1;
@@ -464,74 +464,74 @@ class Pt {
464
464
  }
465
465
  _appendLeaves(t, e, n, i, o) {
466
466
  const a = this.getChildren(e);
467
- for (const u of a) {
468
- const s = u.properties;
469
- if (s && s.cluster ? o + s.point_count <= i ? o += s.point_count : o = this._appendLeaves(t, s.cluster_id, n, i, o) : o < i ? o++ : t.push(u), t.length === n) break;
467
+ for (const c of a) {
468
+ const s = c.properties;
469
+ if (s && s.cluster ? o + s.point_count <= i ? o += s.point_count : o = this._appendLeaves(t, s.cluster_id, n, i, o) : o < i ? o++ : t.push(c), t.length === n) break;
470
470
  }
471
471
  return o;
472
472
  }
473
473
  _createTree(t) {
474
- const e = new j(t.length / this.stride | 0, this.options.nodeSize, Float32Array);
474
+ const e = new I(t.length / this.stride | 0, this.options.nodeSize, Float32Array);
475
475
  for (let n = 0; n < t.length; n += this.stride) e.add(t[n], t[n + 1]);
476
476
  return e.finish(), e.data = t, e;
477
477
  }
478
478
  _addTileFeatures(t, e, n, i, o, a) {
479
- for (const u of t) {
480
- const s = u * this.stride, h = e[s + b] > 1;
481
- let l, c, p;
479
+ for (const c of t) {
480
+ const s = c * this.stride, h = e[s + b] > 1;
481
+ let l, u, p;
482
482
  if (h)
483
- l = st(e, s, this.clusterProps), c = e[s], p = e[s + 1];
483
+ l = ot(e, s, this.clusterProps), u = e[s], p = e[s + 1];
484
484
  else {
485
- const f = this.points[e[s + S]];
486
- l = f.properties;
487
- const [m, g] = f.geometry.coordinates;
488
- c = U(m), p = z(g);
485
+ const M = this.points[e[s + S]];
486
+ l = M.properties;
487
+ const [w, y] = M.geometry.coordinates;
488
+ u = z(w), p = B(y);
489
489
  }
490
490
  const d = {
491
491
  type: 1,
492
492
  geometry: [[
493
- Math.round(this.options.extent * (c * o - n)),
493
+ Math.round(this.options.extent * (u * o - n)),
494
494
  Math.round(this.options.extent * (p * o - i))
495
495
  ]],
496
496
  tags: l
497
497
  };
498
- let y;
499
- h || this.options.generateId ? y = e[s + S] : y = this.points[e[s + S]].id, y !== void 0 && (d.id = y), a.features.push(d);
498
+ let g;
499
+ h || this.options.generateId ? g = e[s + S] : g = this.points[e[s + S]].id, g !== void 0 && (d.id = g), a.features.push(d);
500
500
  }
501
501
  }
502
502
  _limitZoom(t) {
503
503
  return Math.max(this.options.minZoom, Math.min(Math.floor(+t), this.options.maxZoom + 1));
504
504
  }
505
505
  _cluster(t, e) {
506
- const { radius: n, extent: i, reduce: o, minPoints: a } = this.options, u = n / (i * Math.pow(2, e)), s = t.data, h = [], l = this.stride;
507
- for (let c = 0; c < s.length; c += l) {
508
- if (s[c + P] <= e) continue;
509
- s[c + P] = e;
510
- const p = s[c], d = s[c + 1], y = t.within(s[c], s[c + 1], u), f = s[c + b];
511
- let m = f;
512
- for (const g of y) {
513
- const M = g * l;
514
- s[M + P] > e && (m += s[M + b]);
506
+ const { radius: n, extent: i, reduce: o, minPoints: a } = this.options, c = n / (i * Math.pow(2, e)), s = t.data, h = [], l = this.stride;
507
+ for (let u = 0; u < s.length; u += l) {
508
+ if (s[u + x] <= e) continue;
509
+ s[u + x] = e;
510
+ const p = s[u], d = s[u + 1], g = t.within(s[u], s[u + 1], c), M = s[u + b];
511
+ let w = M;
512
+ for (const y of g) {
513
+ const f = y * l;
514
+ s[f + x] > e && (w += s[f + b]);
515
515
  }
516
- if (m > f && m >= a) {
517
- let g = p * f, M = d * f, w, A = -1;
518
- const E = ((c / l | 0) << 5) + (e + 1) + this.points.length;
519
- for (const it of y) {
520
- const x = it * l;
521
- if (s[x + P] <= e) continue;
522
- s[x + P] = e;
523
- const I = s[x + b];
524
- g += s[x] * I, M += s[x + 1] * I, s[x + G] = E, o && (w || (w = this._map(s, c, !0), A = this.clusterProps.length, this.clusterProps.push(w)), o(w, this._map(s, x)));
516
+ if (w > M && w >= a) {
517
+ let y = p * M, f = d * M, m, _ = -1;
518
+ const E = ((u / l | 0) << 5) + (e + 1) + this.points.length;
519
+ for (const F of g) {
520
+ const O = F * l;
521
+ if (s[O + x] <= e) continue;
522
+ s[O + x] = e;
523
+ const V = s[O + b];
524
+ y += s[O] * V, f += s[O + 1] * V, s[O + $] = E, o && (m || (m = this._map(s, u, !0), _ = this.clusterProps.length, this.clusterProps.push(m)), o(m, this._map(s, O)));
525
525
  }
526
- s[c + G] = E, h.push(g / m, M / m, 1 / 0, E, -1, m), o && h.push(A);
526
+ s[u + $] = E, h.push(y / w, f / w, 1 / 0, E, -1, w), o && h.push(_);
527
527
  } else {
528
- for (let g = 0; g < l; g++) h.push(s[c + g]);
529
- if (m > 1)
530
- for (const g of y) {
531
- const M = g * l;
532
- if (!(s[M + P] <= e)) {
533
- s[M + P] = e;
534
- for (let w = 0; w < l; w++) h.push(s[M + w]);
528
+ for (let y = 0; y < l; y++) h.push(s[u + y]);
529
+ if (w > 1)
530
+ for (const y of g) {
531
+ const f = y * l;
532
+ if (!(s[f + x] <= e)) {
533
+ s[f + x] = e;
534
+ for (let m = 0; m < l; m++) h.push(s[f + m]);
535
535
  }
536
536
  }
537
537
  }
@@ -548,26 +548,26 @@ class Pt {
548
548
  }
549
549
  _map(t, e, n) {
550
550
  if (t[e + b] > 1) {
551
- const a = this.clusterProps[t[e + rt]];
551
+ const a = this.clusterProps[t[e + it]];
552
552
  return n ? Object.assign({}, a) : a;
553
553
  }
554
554
  const i = this.points[t[e + S]].properties, o = this.options.map(i);
555
555
  return n && o === i ? Object.assign({}, o) : o;
556
556
  }
557
557
  }
558
- function q(r, t, e) {
558
+ function k(r, t, e) {
559
559
  return {
560
560
  type: "Feature",
561
561
  id: r[t + S],
562
- properties: st(r, t, e),
562
+ properties: ot(r, t, e),
563
563
  geometry: {
564
564
  type: "Point",
565
- coordinates: [Ot(r[t]), Tt(r[t + 1])]
565
+ coordinates: [vt(r[t]), Tt(r[t + 1])]
566
566
  }
567
567
  };
568
568
  }
569
- function st(r, t, e) {
570
- const n = r[t + b], i = n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${Math.round(n / 100) / 10}k` : n, o = r[t + rt], a = o === -1 ? {} : Object.assign({}, e[o]);
569
+ function ot(r, t, e) {
570
+ const n = r[t + b], i = n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${Math.round(n / 100) / 10}k` : n, o = r[t + it], a = o === -1 ? {} : Object.assign({}, e[o]);
571
571
  return Object.assign(a, {
572
572
  cluster: !0,
573
573
  cluster_id: r[t + S],
@@ -575,26 +575,26 @@ function st(r, t, e) {
575
575
  point_count_abbreviated: i
576
576
  });
577
577
  }
578
- function U(r) {
578
+ function z(r) {
579
579
  return r / 360 + 0.5;
580
580
  }
581
- function z(r) {
581
+ function B(r) {
582
582
  const t = Math.sin(r * Math.PI / 180), e = 0.5 - 0.25 * Math.log((1 + t) / (1 - t)) / Math.PI;
583
583
  return e < 0 ? 0 : e > 1 ? 1 : e;
584
584
  }
585
- function Ot(r) {
585
+ function vt(r) {
586
586
  return (r - 0.5) * 360;
587
587
  }
588
588
  function Tt(r) {
589
589
  const t = (180 - r * 360) * Math.PI / 180;
590
590
  return 360 * Math.atan(Math.exp(t)) / Math.PI - 90;
591
591
  }
592
- var Q = Object.prototype.hasOwnProperty;
593
- function k(r, t, e) {
592
+ var X = Object.prototype.hasOwnProperty;
593
+ function tt(r, t, e) {
594
594
  for (e of r.keys())
595
- if (O(e, t)) return e;
595
+ if (v(e, t)) return e;
596
596
  }
597
- function O(r, t) {
597
+ function v(r, t) {
598
598
  var e, n, i;
599
599
  if (r === t) return !0;
600
600
  if (r && t && (e = r.constructor) === t.constructor) {
@@ -602,21 +602,21 @@ function O(r, t) {
602
602
  if (e === RegExp) return r.toString() === t.toString();
603
603
  if (e === Array) {
604
604
  if ((n = r.length) === t.length)
605
- for (; n-- && O(r[n], t[n]); ) ;
605
+ for (; n-- && v(r[n], t[n]); ) ;
606
606
  return n === -1;
607
607
  }
608
608
  if (e === Set) {
609
609
  if (r.size !== t.size)
610
610
  return !1;
611
611
  for (n of r)
612
- if (i = n, i && typeof i == "object" && (i = k(t, i), !i) || !t.has(i)) return !1;
612
+ if (i = n, i && typeof i == "object" && (i = tt(t, i), !i) || !t.has(i)) return !1;
613
613
  return !0;
614
614
  }
615
615
  if (e === Map) {
616
616
  if (r.size !== t.size)
617
617
  return !1;
618
618
  for (n of r)
619
- if (i = n[0], i && typeof i == "object" && (i = k(t, i), !i) || !O(n[1], t.get(i)))
619
+ if (i = n[0], i && typeof i == "object" && (i = tt(t, i), !i) || !v(n[1], t.get(i)))
620
620
  return !1;
621
621
  return !0;
622
622
  }
@@ -635,57 +635,64 @@ function O(r, t) {
635
635
  if (!e || typeof r == "object") {
636
636
  n = 0;
637
637
  for (e in r)
638
- if (Q.call(r, e) && ++n && !Q.call(t, e) || !(e in t) || !O(r[e], t[e])) return !1;
638
+ if (X.call(r, e) && ++n && !X.call(t, e) || !(e in t) || !v(r[e], t[e])) return !1;
639
639
  return Object.keys(t).length === n;
640
640
  }
641
641
  }
642
642
  return r !== r && t !== t;
643
643
  }
644
- function vt(r) {
645
- var t = B.useRef(r), e = B.useRef(0);
646
- return O(r, t.current) || (t.current = r, e.current += 1), B.useMemo(function() {
644
+ function Lt(r) {
645
+ var t = D.useRef(r), e = D.useRef(0);
646
+ return v(r, t.current) || (t.current = r, e.current += 1), D.useMemo(function() {
647
647
  return t.current;
648
648
  }, [e.current]);
649
649
  }
650
- function Lt(r, t) {
651
- return B.useEffect(r, vt(t));
650
+ function Ct(r, t) {
651
+ return D.useEffect(r, Lt(t));
652
652
  }
653
- var Ct = function(t) {
654
- var e = t.points, n = t.bounds, i = t.zoom, o = t.options, a = t.disableRefresh, u = V(), s = V(), h = D([]), l = h[0], c = h[1], p = Math.round(i);
655
- return Lt(function() {
656
- a !== !0 && ((!u.current || !O(s.current, e) || !O(u.current.options, o)) && (u.current = new Pt(o), u.current.load(e)), n && c(u.current.getClusters(n, p)), s.current = e);
653
+ var Rt = function(t) {
654
+ var e = t.points, n = t.bounds, i = t.zoom, o = t.options, a = t.disableRefresh, c = H(), s = H(), h = U([]), l = h[0], u = h[1], p = Math.round(i);
655
+ return Ct(function() {
656
+ a !== !0 && ((!c.current || !v(s.current, e) || !v(c.current.options, o)) && (c.current = new Pt(o), c.current.load(e)), n && u(c.current.getClusters(n, p)), s.current = e);
657
657
  }, [e, n, p, o, a]), {
658
658
  clusters: l,
659
- supercluster: u.current
659
+ supercluster: c.current
660
660
  };
661
661
  };
662
- const Rt = _(() => import("./index-CRQ5kxRL.js")), Zt = _(() => import("./index-DnsF5I7I.js")), Ut = _(() => import("./index-DNKXUpkv.js"));
663
- function zt({ markers: r, markerBoundsPadding: t = 1e-3, onClick: e, ...n }) {
664
- const { mapProvider: i, center: o, bounds: a, zoom: u } = Z(), [s, h] = D(a);
665
- ct(() => {
666
- const f = r.length > 0 ? r.map((g) => [g.latitude, g.longitude]) : [[o.latitude, o.longitude]], m = St(bt(f));
667
- h(m);
668
- }, [r, o]);
669
- const l = v(() => typeof t == "number" ? {
662
+ const Ut = A(() => import("./index-Bu4XEiYU.js")), Zt = A(() => import("./index-DsrEcQq0.js")), zt = A(() => import("./index-BcpSqK0X.js"));
663
+ function Bt({ markers: r, markerBoundsPadding: t = 1e-3, onClick: e, ...n }) {
664
+ const { mapProvider: i, activeMarker: o, center: a, bounds: c, zoom: s } = Z(), [h, l] = U(c);
665
+ ut(() => {
666
+ const f = r.length > 0 ? r.map((_) => [_.latitude, _.longitude]) : [[a.latitude, a.longitude]], m = Ot(St(f));
667
+ l(m);
668
+ }, [r, a]);
669
+ const u = P(() => typeof t == "number" ? {
670
670
  top: t,
671
671
  bottom: t,
672
672
  left: t,
673
673
  right: t
674
- } : t, [t]), { clusters: c, supercluster: p } = Ct({
675
- points: r.map((f) => Et([f.longitude, f.latitude], f)),
676
- bounds: a,
677
- zoom: u,
678
- options: { radius: lt, minZoom: ut, maxZoom: ht }
679
- }), d = (f) => {
680
- var m, g, M;
674
+ } : t, [t]), p = P(
675
+ () => ({
676
+ points: r.map((f) => bt([f.longitude, f.latitude], f)),
677
+ bounds: c,
678
+ zoom: s,
679
+ options: {
680
+ radius: i.name === "google" && s > K ? pt : lt,
681
+ minZoom: K,
682
+ maxZoom: ht
683
+ }
684
+ }),
685
+ [r, i, c, s]
686
+ ), { clusters: d, supercluster: g } = Rt(p), M = (f) => {
687
+ var m, _, E;
681
688
  if (!("properties" in f))
682
689
  throw new Error("Cluster does not have properties");
683
- if ((m = f.properties) != null && m.cluster && typeof ((g = f.properties) == null ? void 0 : g.cluster_id) == "number") {
690
+ if ((m = f.properties) != null && m.cluster && typeof ((_ = f.properties) == null ? void 0 : _.cluster_id) == "number") {
684
691
  e == null || e({
685
692
  id: `${f.properties.cluster_id}`,
686
693
  latitude: f.geometry.coordinates[1],
687
694
  longitude: f.geometry.coordinates[0],
688
- markers: ((M = p == null ? void 0 : p.getLeaves(f.properties.cluster_id)) == null ? void 0 : M.map((w) => w.properties)) ?? []
695
+ markers: ((E = g == null ? void 0 : g.getLeaves(f.properties.cluster_id)) == null ? void 0 : E.map((F) => F.properties)) ?? []
689
696
  });
690
697
  return;
691
698
  }
@@ -695,14 +702,17 @@ function zt({ markers: r, markerBoundsPadding: t = 1e-3, onClick: e, ...n }) {
695
702
  longitude: f.properties.longitude,
696
703
  markers: [f.properties]
697
704
  });
698
- }, y = v(() => {
705
+ }, w = (f) => {
706
+ var m;
707
+ return !g || !o ? !1 : o.id === `${f}` ? !0 : ((m = g.getLeaves(f)) == null ? void 0 : m.find((_) => _.properties.id === o.id)) !== void 0;
708
+ }, y = P(() => {
699
709
  switch (i == null ? void 0 : i.name) {
700
710
  case "maptiler":
701
- return Rt;
711
+ return Ut;
702
712
  case "google":
703
713
  return Zt;
704
714
  case "mapbox":
705
- return Ut;
715
+ return zt;
706
716
  default:
707
717
  return null;
708
718
  }
@@ -710,63 +720,64 @@ function zt({ markers: r, markerBoundsPadding: t = 1e-3, onClick: e, ...n }) {
710
720
  return y ? /* @__PURE__ */ T(
711
721
  y,
712
722
  {
713
- clusters: c,
714
- markerBounds: s,
715
- markerBoundsPadding: l,
716
- onClick: d,
723
+ clusters: d,
724
+ markerBounds: h,
725
+ markerBoundsPadding: u,
726
+ onClick: M,
727
+ doesSuperclusterContainActiveMarker: w,
717
728
  ...n
718
729
  }
719
730
  ) : null;
720
731
  }
721
- const Bt = _(() => import("./index-BOuko7CL.js")), Dt = _(() => import("./index-9RZYMoMG.js")), Ft = _(() => import("./index-D5uhfwEH.js"));
732
+ const Dt = A(() => import("./index-BhldVNew.js")), Ft = A(() => import("./index-B9YXnLOH.js")), Gt = A(() => import("./index-DFdfOz0d.js"));
722
733
  function Nt({ children: r, ...t }) {
723
- const { mapProvider: e } = Z(), n = v(() => {
734
+ const { mapProvider: e } = Z(), n = P(() => {
724
735
  switch (e == null ? void 0 : e.name) {
725
736
  case "maptiler":
726
- return Bt;
727
- case "google":
728
737
  return Dt;
729
- case "mapbox":
738
+ case "google":
730
739
  return Ft;
740
+ case "mapbox":
741
+ return Gt;
731
742
  default:
732
743
  return null;
733
744
  }
734
745
  }, [e]);
735
746
  return n ? /* @__PURE__ */ T(n, { ...t, children: r }) : null;
736
747
  }
737
- const Gt = _(() => import("./index-CTk5bvm9.js")), $t = _(() => import("./index-BsnsAUt5.js")), jt = _(() => import("./index-DVitM43i.js"));
738
- function It(r) {
739
- const { mapProvider: t } = Z(), e = v(() => {
748
+ const $t = A(() => import("./index-CTk5bvm9.js")), jt = A(() => import("./index-UEadmVww.js")), It = A(() => import("./index-DVitM43i.js"));
749
+ function Vt(r) {
750
+ const { mapProvider: t } = Z(), e = P(() => {
740
751
  switch (t == null ? void 0 : t.name) {
741
752
  case "maptiler":
742
- return Gt;
743
- case "google":
744
753
  return $t;
745
- case "mapbox":
754
+ case "google":
746
755
  return jt;
756
+ case "mapbox":
757
+ return It;
747
758
  default:
748
759
  return null;
749
760
  }
750
761
  }, [t]);
751
762
  return e ? /* @__PURE__ */ T(e, { ...r }) : null;
752
763
  }
753
- function Vt(r) {
754
- const [t, e] = D(r.zoom || R.zoom), [n, i] = D();
755
- return /* @__PURE__ */ T(X.Provider, { value: { ...r, bounds: n, setBounds: i, zoom: t, setZoom: e }, children: r.children });
764
+ function Ht(r) {
765
+ const [t, e] = U(r.zoom || R.zoom), [n, i] = U();
766
+ return /* @__PURE__ */ T(et.Provider, { value: { ...r, bounds: n, setBounds: i, zoom: t, setZoom: e }, children: r.children });
756
767
  }
757
- const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
768
+ const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
758
769
  __proto__: null,
759
- BaseMap: yt,
760
- CenterPin: At,
761
- Layers: It,
762
- Markers: zt,
770
+ BaseMap: wt,
771
+ CenterPin: Et,
772
+ Layers: Vt,
773
+ Markers: Bt,
763
774
  Popup: Nt,
764
- Root: Vt
775
+ Root: Ht
765
776
  }, Symbol.toStringTag, { value: "Module" }));
766
777
  export {
767
- ut as M,
768
- H as a,
778
+ K as M,
779
+ J as a,
769
780
  R as d,
770
- Kt as i,
781
+ Wt as i,
771
782
  Z as u
772
783
  };