vue3-google-map 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var d=document.createElement("style");d.appendChild(document.createTextNode(".mapdiv[data-v-7d660dd5]{width:100%;height:100%}.info-window-wrapper[data-v-45a4606d]{display:none}.mapdiv .info-window-wrapper[data-v-45a4606d]{display:inline-block}.custom-marker-wrapper[data-v-c7599d50]{display:none}.mapdiv .custom-marker-wrapper[data-v-c7599d50]{display:inline-block}")),document.head.appendChild(d)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- var Be = Object.defineProperty;
3
- var qe = (o, e, t) => e in o ? Be(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
4
- var te = (o, e, t) => (qe(o, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as M, ref as v, provide as z, watch as O, onMounted as Me, onBeforeUnmount as j, markRaw as E, toRef as B, openBlock as J, createElementBlock as Y, createElementVNode as ie, renderSlot as X, normalizeProps as Re, guardReactiveProps as Ze, inject as _, computed as K, withDirectives as Ne, vShow as Fe, Comment as be, mergeProps as Oe, createCommentVNode as Pe } from "vue";
6
- const q = Symbol("map"), R = Symbol("api"), xe = Symbol("marker"), Ee = Symbol("markerCluster"), Q = Symbol("CustomMarker"), Le = Symbol("mapTilesLoaded"), $ = [
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-174b771e]{width:100%;height:100%}.info-window-wrapper[data-v-45a4606d]{display:none}.mapdiv .info-window-wrapper[data-v-45a4606d]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
+ var qe = Object.defineProperty;
3
+ var Be = (n, e, t) => e in n ? qe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
+ var se = (n, e, t) => (Be(n, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { defineComponent as b, ref as y, provide as G, watch as O, onMounted as Me, onBeforeUnmount as B, markRaw as S, toRef as N, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ne, guardReactiveProps as Ze, inject as C, computed as J, withDirectives as De, vShow as Ue, Comment as Ee, mergeProps as Pe, createCommentVNode as Oe } from "vue";
6
+ const Z = Symbol("map"), D = Symbol("api"), xe = Symbol("marker"), Le = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Se = Symbol("mapTilesLoaded"), q = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -16,18 +16,59 @@ const q = Symbol("map"), R = Symbol("api"), xe = Symbol("marker"), Ee = Symbol("
16
16
  "mouseup",
17
17
  "rightclick"
18
18
  ];
19
- var De = function o(e, t) {
19
+ /*! *****************************************************************************
20
+ Copyright (c) Microsoft Corporation.
21
+
22
+ Permission to use, copy, modify, and/or distribute this software for any
23
+ purpose with or without fee is hereby granted.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
26
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
27
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
28
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
29
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
+ PERFORMANCE OF THIS SOFTWARE.
32
+ ***************************************************************************** */
33
+ function Fe(n, e, t, s) {
34
+ function r(o) {
35
+ return o instanceof t ? o : new t(function(a) {
36
+ a(o);
37
+ });
38
+ }
39
+ return new (t || (t = Promise))(function(o, a) {
40
+ function l(u) {
41
+ try {
42
+ h(s.next(u));
43
+ } catch (c) {
44
+ a(c);
45
+ }
46
+ }
47
+ function i(u) {
48
+ try {
49
+ h(s.throw(u));
50
+ } catch (c) {
51
+ a(c);
52
+ }
53
+ }
54
+ function h(u) {
55
+ u.done ? o(u.value) : r(u.value).then(l, i);
56
+ }
57
+ h((s = s.apply(n, e || [])).next());
58
+ });
59
+ }
60
+ var ze = function n(e, t) {
20
61
  if (e === t)
21
62
  return !0;
22
63
  if (e && t && typeof e == "object" && typeof t == "object") {
23
64
  if (e.constructor !== t.constructor)
24
65
  return !1;
25
- var s, r, n;
66
+ var s, r, o;
26
67
  if (Array.isArray(e)) {
27
68
  if (s = e.length, s != t.length)
28
69
  return !1;
29
70
  for (r = s; r-- !== 0; )
30
- if (!o(e[r], t[r]))
71
+ if (!n(e[r], t[r]))
31
72
  return !1;
32
73
  return !0;
33
74
  }
@@ -37,22 +78,26 @@ var De = function o(e, t) {
37
78
  return e.valueOf() === t.valueOf();
38
79
  if (e.toString !== Object.prototype.toString)
39
80
  return e.toString() === t.toString();
40
- if (n = Object.keys(e), s = n.length, s !== Object.keys(t).length)
81
+ if (o = Object.keys(e), s = o.length, s !== Object.keys(t).length)
41
82
  return !1;
42
83
  for (r = s; r-- !== 0; )
43
- if (!Object.prototype.hasOwnProperty.call(t, n[r]))
84
+ if (!Object.prototype.hasOwnProperty.call(t, o[r]))
44
85
  return !1;
45
86
  for (r = s; r-- !== 0; ) {
46
- var a = n[r];
47
- if (!o(e[a], t[a]))
87
+ var a = o[r];
88
+ if (!n(e[a], t[a]))
48
89
  return !1;
49
90
  }
50
91
  return !0;
51
92
  }
52
93
  return e !== e && t !== t;
53
94
  };
54
- const ue = "__googleMapsScriptId";
55
- class S {
95
+ const he = "__googleMapsScriptId";
96
+ var R;
97
+ (function(n) {
98
+ n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
99
+ })(R || (R = {}));
100
+ class A {
56
101
  /**
57
102
  * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
58
103
  * using this library, instead the defaults are set by the Google Maps
@@ -62,13 +107,13 @@ class S {
62
107
  * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
63
108
  * ```
64
109
  */
65
- constructor({ apiKey: e, channel: t, client: s, id: r = ue, libraries: n = [], language: a, region: c, version: i, mapIds: d, nonce: u, retries: l = 3, url: h = "https://maps.googleapis.com/maps/api/js" }) {
66
- if (this.CALLBACK = "__googleMapsCallback", this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.version = i, this.apiKey = e, this.channel = t, this.client = s, this.id = r || ue, this.libraries = n, this.language = a, this.region = c, this.mapIds = d, this.nonce = u, this.retries = l, this.url = h, S.instance) {
67
- if (!De(this.options, S.instance.options))
68
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(S.instance.options)}`);
69
- return S.instance;
110
+ constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = he, language: a, libraries: l = [], mapIds: i, nonce: h, region: u, retries: c = 3, url: d = "https://maps.googleapis.com/maps/api/js", version: p }) {
111
+ if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o || he, this.language = a, this.libraries = l, this.mapIds = i, this.nonce = h, this.region = u, this.retries = c, this.url = d, this.version = p, A.instance) {
112
+ if (!ze(this.options, A.instance.options))
113
+ throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(A.instance.options)}`);
114
+ return A.instance;
70
115
  }
71
- S.instance = this;
116
+ A.instance = this;
72
117
  }
73
118
  get options() {
74
119
  return {
@@ -82,9 +127,13 @@ class S {
82
127
  region: this.region,
83
128
  mapIds: this.mapIds,
84
129
  nonce: this.nonce,
85
- url: this.url
130
+ url: this.url,
131
+ authReferrerPolicy: this.authReferrerPolicy
86
132
  };
87
133
  }
134
+ get status() {
135
+ return this.errors.length ? R.FAILURE : this.done ? R.SUCCESS : this.loading ? R.LOADING : R.INITIALIZED;
136
+ }
88
137
  get failed() {
89
138
  return this.done && !this.loading && this.errors.length >= this.retries + 1;
90
139
  }
@@ -92,10 +141,11 @@ class S {
92
141
  * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
93
142
  *
94
143
  * @ignore
144
+ * @deprecated
95
145
  */
96
146
  createUrl() {
97
147
  let e = this.url;
98
- return e += `?callback=${this.CALLBACK}`, this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `&region=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), e;
148
+ return e += "?callback=__googleMapsCallback", this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `&region=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (e += `&auth_referrer_policy=${this.authReferrerPolicy}`), e;
99
149
  }
100
150
  deleteScript() {
101
151
  const e = document.getElementById(this.id);
@@ -103,6 +153,7 @@ class S {
103
153
  }
104
154
  /**
105
155
  * Load the Google Maps JavaScript API script and return a Promise.
156
+ * @deprecated, use importLibrary() instead.
106
157
  */
107
158
  load() {
108
159
  return this.loadPromise();
@@ -111,6 +162,7 @@ class S {
111
162
  * Load the Google Maps JavaScript API script and return a Promise.
112
163
  *
113
164
  * @ignore
165
+ * @deprecated, use importLibrary() instead.
114
166
  */
115
167
  loadPromise() {
116
168
  return new Promise((e, t) => {
@@ -119,8 +171,12 @@ class S {
119
171
  });
120
172
  });
121
173
  }
174
+ importLibrary(e) {
175
+ return this.execute(), google.maps.importLibrary(e);
176
+ }
122
177
  /**
123
178
  * Load the Google Maps JavaScript API script with a callback.
179
+ * @deprecated, use importLibrary() instead.
124
180
  */
125
181
  loadCallback(e) {
126
182
  this.callbacks.push(e), this.execute();
@@ -129,12 +185,45 @@ class S {
129
185
  * Set the script on document.
130
186
  */
131
187
  setScript() {
188
+ var e, t;
132
189
  if (document.getElementById(this.id)) {
133
190
  this.callback();
134
191
  return;
135
192
  }
136
- const e = this.createUrl(), t = document.createElement("script");
137
- t.id = this.id, t.type = "text/javascript", t.src = e, t.onerror = this.loadErrorCallback.bind(this), t.defer = !0, t.async = !0, this.nonce && (t.nonce = this.nonce), document.head.appendChild(t);
193
+ const s = {
194
+ key: this.apiKey,
195
+ channel: this.channel,
196
+ client: this.client,
197
+ libraries: this.libraries.length && this.libraries,
198
+ v: this.version,
199
+ mapIds: this.mapIds,
200
+ language: this.language,
201
+ region: this.region,
202
+ authReferrerPolicy: this.authReferrerPolicy
203
+ };
204
+ Object.keys(s).forEach(
205
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
206
+ (o) => !s[o] && delete s[o]
207
+ ), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
208
+ let a, l, i, h = "The Google Maps JavaScript API", u = "google", c = "importLibrary", d = "__ib__", p = document, f = window;
209
+ f = f[u] || (f[u] = {});
210
+ const m = f.maps || (f.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
211
+ // @ts-ignore
212
+ a || (a = new Promise((_, M) => Fe(this, void 0, void 0, function* () {
213
+ var P;
214
+ yield l = p.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
215
+ for (i in o)
216
+ v.set(i.replace(/[A-Z]/g, ($) => "_" + $[0].toLowerCase()), o[i]);
217
+ v.set("callback", u + ".maps." + d), l.src = this.url + "?" + v, m[d] = _, l.onerror = () => a = M(Error(h + " could not load.")), l.nonce = this.nonce || ((P = p.querySelector("script[nonce]")) === null || P === void 0 ? void 0 : P.nonce) || "", p.head.append(l);
218
+ })))
219
+ );
220
+ m[c] ? console.warn(h + " only loads once. Ignoring:", o) : m[c] = (_, ...M) => g.add(_) && w().then(() => m[c](_, ...M));
221
+ })(s);
222
+ const r = this.libraries.map((o) => this.importLibrary(o));
223
+ r.length || r.push(this.importLibrary("core")), Promise.all(r).then(() => this.callback(), (o) => {
224
+ const a = new ErrorEvent("error", { error: o });
225
+ this.loadErrorCallback(a);
226
+ });
138
227
  }
139
228
  /**
140
229
  * Reset the loader state.
@@ -148,15 +237,12 @@ class S {
148
237
  loadErrorCallback(e) {
149
238
  if (this.errors.push(e), this.errors.length <= this.retries) {
150
239
  const t = this.errors.length * Math.pow(2, this.errors.length);
151
- console.log(`Failed to load Google Maps script, retrying in ${t} ms.`), setTimeout(() => {
240
+ console.error(`Failed to load Google Maps script, retrying in ${t} ms.`), setTimeout(() => {
152
241
  this.deleteScript(), this.setScript();
153
242
  }, t);
154
243
  } else
155
244
  this.onerrorEvent = e, this.callback();
156
245
  }
157
- setCallback() {
158
- window.__googleMapsCallback = this.callback.bind(this);
159
- }
160
246
  callback() {
161
247
  this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
162
248
  e(this.onerrorEvent);
@@ -170,21 +256,21 @@ class S {
170
256
  console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."), this.callback();
171
257
  return;
172
258
  }
173
- this.loading || (this.loading = !0, this.setCallback(), this.setScript());
259
+ this.loading || (this.loading = !0, this.setScript());
174
260
  }
175
261
  }
176
262
  }
177
- function Ue(o) {
178
- return class extends o.OverlayView {
263
+ function Ve(n) {
264
+ return class extends n.OverlayView {
179
265
  constructor(s) {
180
266
  super();
181
- te(this, "element");
182
- te(this, "opts");
183
- const { element: r, ...n } = s;
184
- this.element = r, this.opts = n, this.opts.map && this.setMap(this.opts.map);
267
+ se(this, "element");
268
+ se(this, "opts");
269
+ const { element: r, ...o } = s;
270
+ this.element = r, this.opts = o, this.opts.map && this.setMap(this.opts.map);
185
271
  }
186
272
  getPosition() {
187
- return this.opts.position ? this.opts.position instanceof o.LatLng ? this.opts.position : new o.LatLng(this.opts.position) : null;
273
+ return this.opts.position ? this.opts.position instanceof n.LatLng ? this.opts.position : new n.LatLng(this.opts.position) : null;
188
274
  }
189
275
  getVisible() {
190
276
  if (!this.element)
@@ -201,52 +287,53 @@ function Ue(o) {
201
287
  draw() {
202
288
  if (!this.element)
203
289
  return;
204
- const r = this.getProjection().fromLatLngToDivPixel(this.getPosition());
290
+ const s = this.getProjection(), r = s == null ? void 0 : s.fromLatLngToDivPixel(this.getPosition());
205
291
  if (r) {
206
292
  this.element.style.position = "absolute";
207
- const n = this.element.offsetHeight, a = this.element.offsetWidth;
208
- let c, i;
293
+ const o = this.element.offsetHeight, a = this.element.offsetWidth;
294
+ let l, i;
209
295
  switch (this.opts.anchorPoint) {
210
296
  case "TOP_CENTER":
211
- c = r.x - a / 2, i = r.y;
297
+ l = r.x - a / 2, i = r.y;
212
298
  break;
213
299
  case "BOTTOM_CENTER":
214
- c = r.x - a / 2, i = r.y - n;
300
+ l = r.x - a / 2, i = r.y - o;
215
301
  break;
216
302
  case "LEFT_CENTER":
217
- c = r.x, i = r.y - n / 2;
303
+ l = r.x, i = r.y - o / 2;
218
304
  break;
219
305
  case "RIGHT_CENTER":
220
- c = r.x - a, i = r.y - n / 2;
306
+ l = r.x - a, i = r.y - o / 2;
221
307
  break;
222
308
  case "TOP_LEFT":
223
- c = r.x, i = r.y;
309
+ l = r.x, i = r.y;
224
310
  break;
225
311
  case "TOP_RIGHT":
226
- c = r.x - a, i = r.y;
312
+ l = r.x - a, i = r.y;
227
313
  break;
228
314
  case "BOTTOM_LEFT":
229
- c = r.x, i = r.y - n;
315
+ l = r.x, i = r.y - o;
230
316
  break;
231
317
  case "BOTTOM_RIGHT":
232
- c = r.x - a, i = r.y - n;
318
+ l = r.x - a, i = r.y - o;
233
319
  break;
234
320
  default:
235
- c = r.x - a / 2, i = r.y - n / 2;
321
+ l = r.x - a / 2, i = r.y - o / 2;
236
322
  }
237
- this.element.style.left = c + "px", this.element.style.top = i + "px", this.element.style.transform = `translateX(${this.opts.offsetX || 0}px) translateY(${this.opts.offsetY || 0}px)`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
323
+ this.element.style.left = l + "px", this.element.style.top = i + "px", this.element.style.transform = `translateX(${this.opts.offsetX || 0}px) translateY(${this.opts.offsetY || 0}px)`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
238
324
  }
239
325
  }
240
326
  onRemove() {
241
327
  this.element && this.element.remove();
242
328
  }
243
329
  setOptions(s) {
244
- this.opts = s, this.draw();
330
+ const { element: r, ...o } = s;
331
+ this.element = r, this.opts = o, this.draw();
245
332
  }
246
333
  };
247
334
  }
248
335
  let de;
249
- const he = [
336
+ const pe = [
250
337
  "bounds_changed",
251
338
  "center_changed",
252
339
  "click",
@@ -266,7 +353,7 @@ const he = [
266
353
  "tilesloaded",
267
354
  "tilt_changed",
268
355
  "zoom_changed"
269
- ], ze = M({
356
+ ], Ge = b({
270
357
  props: {
271
358
  apiPromise: {
272
359
  type: Promise
@@ -454,104 +541,104 @@ const he = [
454
541
  required: !1
455
542
  }
456
543
  },
457
- emits: he,
458
- setup(o, { emit: e }) {
459
- const t = v(), s = v(!1), r = v(), n = v(), a = v(!1);
460
- z(q, r), z(R, n), z(Le, a);
461
- const c = () => {
462
- const l = { ...o };
463
- Object.keys(l).forEach((m) => {
464
- l[m] === void 0 && delete l[m];
544
+ emits: pe,
545
+ setup(n, { emit: e }) {
546
+ const t = y(), s = y(!1), r = y(), o = y(), a = y(!1);
547
+ G(Z, r), G(D, o), G(Se, a);
548
+ const l = () => {
549
+ const c = { ...n };
550
+ Object.keys(c).forEach((m) => {
551
+ c[m] === void 0 && delete c[m];
465
552
  });
466
553
  const p = (m) => {
467
554
  var g;
468
- return m ? { position: (g = n.value) == null ? void 0 : g.ControlPosition[m] } : {};
555
+ return m ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[m] } : {};
469
556
  }, f = {
470
- scaleControlOptions: o.scaleControlStyle ? { style: o.scaleControlStyle } : {},
471
- panControlOptions: p(o.panControlPosition),
472
- zoomControlOptions: p(o.zoomControlPosition),
473
- rotateControlOptions: p(o.rotateControlPosition),
474
- streetViewControlOptions: p(o.streetViewControlPosition),
475
- fullscreenControlOptions: p(o.fullscreenControlPosition),
476
- disableDefaultUI: o.disableDefaultUi
557
+ scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
558
+ panControlOptions: p(n.panControlPosition),
559
+ zoomControlOptions: p(n.zoomControlPosition),
560
+ rotateControlOptions: p(n.rotateControlPosition),
561
+ streetViewControlOptions: p(n.streetViewControlPosition),
562
+ fullscreenControlOptions: p(n.fullscreenControlPosition),
563
+ disableDefaultUI: n.disableDefaultUi
477
564
  };
478
- return { ...l, ...f };
565
+ return { ...c, ...f };
479
566
  }, i = O(
480
- [n, r],
481
- ([l, h]) => {
482
- const p = l, f = h;
567
+ [o, r],
568
+ ([c, d]) => {
569
+ const p = c, f = d;
483
570
  p && f && (p.event.addListenerOnce(f, "tilesloaded", () => {
484
571
  a.value = !0;
485
572
  }), setTimeout(i, 0));
486
573
  },
487
574
  { immediate: !0 }
488
- ), d = () => {
575
+ ), h = () => {
489
576
  try {
490
- const { apiKey: l, region: h, version: p, language: f, libraries: m } = o;
491
- de = new S({ apiKey: l, region: h, version: p, language: f, libraries: m });
492
- } catch (l) {
493
- console.error(l);
577
+ const { apiKey: c, region: d, version: p, language: f, libraries: m } = n;
578
+ de = new A({ apiKey: c, region: d, version: p, language: f, libraries: m });
579
+ } catch (c) {
580
+ console.error(c);
494
581
  }
495
- }, u = (l) => {
496
- n.value = E(l.maps), r.value = E(new l.maps.Map(t.value, c()));
497
- const h = Ue(n.value);
498
- n.value[Q] = h, he.forEach((f) => {
582
+ }, u = (c) => {
583
+ o.value = S(c.maps), r.value = S(new c.maps.Map(t.value, l()));
584
+ const d = Ve(o.value);
585
+ o.value[ee] = d, pe.forEach((f) => {
499
586
  var m;
500
587
  (m = r.value) == null || m.addListener(f, (g) => e(f, g));
501
588
  }), s.value = !0;
502
- const p = Object.keys(o).filter(
589
+ const p = Object.keys(n).filter(
503
590
  (f) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(f)
504
- ).map((f) => B(o, f));
591
+ ).map((f) => N(n, f));
505
592
  O(
506
- [() => o.center, () => o.zoom, ...p],
507
- ([f, m], [g, y]) => {
508
- var G, b, F;
509
- const { center: w, zoom: C, ...T } = c();
510
- (G = r.value) == null || G.setOptions(T), m !== void 0 && m !== y && ((b = r.value) == null || b.setZoom(m));
511
- const N = !g || f.lng !== g.lng || f.lat !== g.lat;
512
- f && N && ((F = r.value) == null || F.panTo(f));
593
+ [() => n.center, () => n.zoom, ...p],
594
+ ([f, m], [g, v]) => {
595
+ var $, E, F;
596
+ const { center: w, zoom: _, ...M } = l();
597
+ ($ = r.value) == null || $.setOptions(M), m !== void 0 && m !== v && ((E = r.value) == null || E.setZoom(m));
598
+ const P = !g || f.lng !== g.lng || f.lat !== g.lat;
599
+ f && P && ((F = r.value) == null || F.panTo(f));
513
600
  }
514
601
  );
515
602
  };
516
603
  return Me(() => {
517
- o.apiPromise && o.apiPromise instanceof Promise ? o.apiPromise.then(u) : (d(), de.load().then(u));
518
- }), j(() => {
519
- var l;
520
- a.value = !1, r.value && ((l = n.value) == null || l.event.clearInstanceListeners(r.value));
521
- }), { mapRef: t, ready: s, map: r, api: n, mapTilesLoaded: a };
604
+ n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (h(), de.load().then(u));
605
+ }), B(() => {
606
+ var c;
607
+ a.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
608
+ }), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: a };
522
609
  }
523
610
  });
524
- const ee = (o, e) => {
525
- const t = o.__vccOpts || o;
611
+ const te = (n, e) => {
612
+ const t = n.__vccOpts || n;
526
613
  for (const [s, r] of e)
527
614
  t[s] = r;
528
615
  return t;
529
- }, Ve = {
616
+ }, He = {
530
617
  ref: "mapRef",
531
618
  class: "mapdiv"
532
619
  };
533
- function Ge(o, e, t, s, r, n) {
534
- return J(), Y("div", null, [
535
- ie("div", Ve, null, 512),
536
- X(o.$slots, "default", Re(Ze({ ready: o.ready, map: o.map, api: o.api, mapTilesLoaded: o.mapTilesLoaded })), void 0, !0)
620
+ function We(n, e, t, s, r, o) {
621
+ return Y(), X("div", null, [
622
+ ae("div", He, null, 512),
623
+ Q(n.$slots, "default", Ne(Ze({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
537
624
  ]);
538
625
  }
539
- const Ot = /* @__PURE__ */ ee(ze, [["render", Ge], ["__scopeId", "data-v-7d660dd5"]]);
540
- function He(o) {
541
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
626
+ const Ot = /* @__PURE__ */ te(Ge, [["render", We], ["__scopeId", "data-v-174b771e"]]);
627
+ function Ke(n) {
628
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
542
629
  }
543
- var We = function o(e, t) {
630
+ var Je = function n(e, t) {
544
631
  if (e === t)
545
632
  return !0;
546
633
  if (e && t && typeof e == "object" && typeof t == "object") {
547
634
  if (e.constructor !== t.constructor)
548
635
  return !1;
549
- var s, r, n;
636
+ var s, r, o;
550
637
  if (Array.isArray(e)) {
551
638
  if (s = e.length, s != t.length)
552
639
  return !1;
553
640
  for (r = s; r-- !== 0; )
554
- if (!o(e[r], t[r]))
641
+ if (!n(e[r], t[r]))
555
642
  return !1;
556
643
  return !0;
557
644
  }
@@ -561,51 +648,51 @@ var We = function o(e, t) {
561
648
  return e.valueOf() === t.valueOf();
562
649
  if (e.toString !== Object.prototype.toString)
563
650
  return e.toString() === t.toString();
564
- if (n = Object.keys(e), s = n.length, s !== Object.keys(t).length)
651
+ if (o = Object.keys(e), s = o.length, s !== Object.keys(t).length)
565
652
  return !1;
566
653
  for (r = s; r-- !== 0; )
567
- if (!Object.prototype.hasOwnProperty.call(t, n[r]))
654
+ if (!Object.prototype.hasOwnProperty.call(t, o[r]))
568
655
  return !1;
569
656
  for (r = s; r-- !== 0; ) {
570
- var a = n[r];
571
- if (!o(e[a], t[a]))
657
+ var a = o[r];
658
+ if (!n(e[a], t[a]))
572
659
  return !1;
573
660
  }
574
661
  return !0;
575
662
  }
576
663
  return e !== e && t !== t;
577
664
  };
578
- const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o === Q, Z = (o, e, t, s) => {
579
- const r = v(), n = _(q, v()), a = _(R, v()), c = _(Ee, v()), i = K(
580
- () => !!(c.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[Q]))
665
+ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n === ee, U = (n, e, t, s) => {
666
+ const r = y(), o = C(Z, y()), a = C(D, y()), l = C(Le, y()), i = J(
667
+ () => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[ee]))
581
668
  );
582
669
  return O(
583
- [n, t],
584
- (d, [u, l]) => {
670
+ [o, t],
671
+ (h, [u, c]) => {
585
672
  var p, f, m;
586
- const h = !A(t.value, l) || n.value !== u;
587
- !n.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = c.value) == null || p.removeMarker(r.value), (f = c.value) == null || f.addMarker(r.value))) : (Ke(o) ? r.value = E(
588
- new a.value[o](t.value)
589
- ) : Je(o) ? r.value = E(
590
- new a.value[o](t.value)
591
- ) : r.value = E(
592
- new a.value[o]({
673
+ const d = !T(t.value, c) || o.value !== u;
674
+ !o.value || !a.value || !d || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (f = l.value) == null || f.addMarker(r.value))) : (Ye(n) ? r.value = S(
675
+ new a.value[n](t.value)
676
+ ) : Xe(n) ? r.value = S(
677
+ new a.value[n](t.value)
678
+ ) : r.value = S(
679
+ new a.value[n]({
593
680
  ...t.value,
594
- map: n.value
681
+ map: o.value
595
682
  })
596
- ), i.value ? (m = c.value) == null || m.addMarker(r.value) : r.value.setMap(n.value), e.forEach((g) => {
597
- var y;
598
- (y = r.value) == null || y.addListener(g, (w) => s(g, w));
683
+ ), i.value ? (m = l.value) == null || m.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
684
+ var v;
685
+ (v = r.value) == null || v.addListener(g, (w) => s(g, w));
599
686
  })));
600
687
  },
601
688
  {
602
689
  immediate: !0
603
690
  }
604
- ), j(() => {
605
- var d, u;
606
- r.value && ((d = a.value) == null || d.event.clearInstanceListeners(r.value), i.value ? (u = c.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
691
+ ), B(() => {
692
+ var h, u;
693
+ r.value && ((h = a.value) == null || h.event.clearInstanceListeners(r.value), i.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
607
694
  }), r;
608
- }, pe = [
695
+ }, fe = [
609
696
  "animation_changed",
610
697
  "click",
611
698
  "dblclick",
@@ -629,7 +716,7 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
629
716
  "shape_changed",
630
717
  "title_changed",
631
718
  "visible_changed"
632
- ], Pt = M({
719
+ ], xt = b({
633
720
  name: "Marker",
634
721
  props: {
635
722
  options: {
@@ -637,15 +724,15 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
637
724
  required: !0
638
725
  }
639
726
  },
640
- emits: pe,
641
- setup(o, { emit: e, expose: t, slots: s }) {
642
- const r = B(o, "options"), n = Z("Marker", pe, r, e);
643
- return z(xe, n), t({ marker: n }), () => {
727
+ emits: fe,
728
+ setup(n, { emit: e, expose: t, slots: s }) {
729
+ const r = N(n, "options"), o = U("Marker", fe, r, e);
730
+ return G(xe, o), t({ marker: o }), () => {
644
731
  var a;
645
732
  return (a = s.default) == null ? void 0 : a.call(s);
646
733
  };
647
734
  }
648
- }), xt = M({
735
+ }), Lt = b({
649
736
  name: "Polyline",
650
737
  props: {
651
738
  options: {
@@ -653,13 +740,13 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
653
740
  required: !0
654
741
  }
655
742
  },
656
- emits: $,
657
- setup(o, { emit: e }) {
658
- const t = B(o, "options");
659
- return { polyline: Z("Polyline", $, t, e) };
743
+ emits: q,
744
+ setup(n, { emit: e }) {
745
+ const t = N(n, "options");
746
+ return { polyline: U("Polyline", q, t, e) };
660
747
  },
661
748
  render: () => null
662
- }), Et = M({
749
+ }), St = b({
663
750
  name: "Polygon",
664
751
  props: {
665
752
  options: {
@@ -667,13 +754,13 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
667
754
  required: !0
668
755
  }
669
756
  },
670
- emits: $,
671
- setup(o, { emit: e }) {
672
- const t = B(o, "options");
673
- return { polygon: Z("Polygon", $, t, e) };
757
+ emits: q,
758
+ setup(n, { emit: e }) {
759
+ const t = N(n, "options");
760
+ return { polygon: U("Polygon", q, t, e) };
674
761
  },
675
762
  render: () => null
676
- }), fe = $.concat(["bounds_changed"]), Lt = M({
763
+ }), me = q.concat(["bounds_changed"]), It = b({
677
764
  name: "Rectangle",
678
765
  props: {
679
766
  options: {
@@ -681,13 +768,13 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
681
768
  required: !0
682
769
  }
683
770
  },
684
- emits: fe,
685
- setup(o, { emit: e }) {
686
- const t = B(o, "options");
687
- return { rectangle: Z("Rectangle", fe, t, e) };
771
+ emits: me,
772
+ setup(n, { emit: e }) {
773
+ const t = N(n, "options");
774
+ return { rectangle: U("Rectangle", me, t, e) };
688
775
  },
689
776
  render: () => null
690
- }), me = $.concat(["center_changed", "radius_changed"]), St = M({
777
+ }), ge = q.concat(["center_changed", "radius_changed"]), At = b({
691
778
  name: "Circle",
692
779
  props: {
693
780
  options: {
@@ -695,13 +782,13 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
695
782
  required: !0
696
783
  }
697
784
  },
698
- emits: me,
699
- setup(o, { emit: e }) {
700
- const t = B(o, "options");
701
- return { circle: Z("Circle", me, t, e) };
785
+ emits: ge,
786
+ setup(n, { emit: e }) {
787
+ const t = N(n, "options");
788
+ return { circle: U("Circle", ge, t, e) };
702
789
  },
703
790
  render: () => null
704
- }), Ye = M({
791
+ }), Qe = b({
705
792
  props: {
706
793
  position: {
707
794
  type: String,
@@ -713,48 +800,48 @@ const A = /* @__PURE__ */ He(We), Ke = (o) => o === "Marker", Je = (o) => o ===
713
800
  }
714
801
  },
715
802
  emits: ["content:loaded"],
716
- setup(o, { emit: e }) {
717
- const t = v(null), s = _(q, v()), r = _(R, v()), n = _(Le, v(!1)), a = v(!1), c = O(
718
- [n, r, t],
719
- ([u, l, h]) => {
720
- l && u && h && (i(o.position), a.value = !0, e("content:loaded"), setTimeout(c, 0));
803
+ setup(n, { emit: e }) {
804
+ const t = y(null), s = C(Z, y()), r = C(D, y()), o = C(Se, y(!1)), a = y(!1), l = O(
805
+ [o, r, t],
806
+ ([u, c, d]) => {
807
+ c && u && d && (i(n.position), a.value = !0, e("content:loaded"), setTimeout(l, 0));
721
808
  },
722
809
  { immediate: !0 }
723
810
  ), i = (u) => {
724
811
  if (s.value && r.value && t.value) {
725
- const l = r.value.ControlPosition[u];
726
- s.value.controls[l].push(t.value);
812
+ const c = r.value.ControlPosition[u];
813
+ s.value.controls[c].push(t.value);
727
814
  }
728
- }, d = (u) => {
815
+ }, h = (u) => {
729
816
  if (s.value && r.value) {
730
- let l = null;
731
- const h = r.value.ControlPosition[u];
732
- s.value.controls[h].forEach((p, f) => {
733
- p === t.value && (l = f);
734
- }), l !== null && s.value.controls[h].removeAt(l);
817
+ let c = null;
818
+ const d = r.value.ControlPosition[u];
819
+ s.value.controls[d].forEach((p, f) => {
820
+ p === t.value && (c = f);
821
+ }), c !== null && s.value.controls[d].removeAt(c);
735
822
  }
736
823
  };
737
- return j(() => d(o.position)), O(
738
- () => o.position,
739
- (u, l) => {
740
- d(l), i(u);
824
+ return B(() => h(n.position)), O(
825
+ () => n.position,
826
+ (u, c) => {
827
+ h(c), i(u);
741
828
  }
742
829
  ), O(
743
- () => o.index,
830
+ () => n.index,
744
831
  (u) => {
745
- u && t.value && (t.value.index = o.index);
832
+ u && t.value && (t.value.index = n.index);
746
833
  }
747
834
  ), { controlRef: t, showContent: a };
748
835
  }
749
- }), Xe = { ref: "controlRef" };
750
- function Qe(o, e, t, s, r, n) {
751
- return Ne((J(), Y("div", Xe, [
752
- X(o.$slots, "default")
836
+ }), et = { ref: "controlRef" };
837
+ function tt(n, e, t, s, r, o) {
838
+ return De((Y(), X("div", et, [
839
+ Q(n.$slots, "default")
753
840
  ], 512)), [
754
- [Fe, o.showContent]
841
+ [Ue, n.showContent]
755
842
  ]);
756
843
  }
757
- const At = /* @__PURE__ */ ee(Ye, [["render", Qe]]), ge = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], et = M({
844
+ const Tt = /* @__PURE__ */ te(Qe, [["render", tt]]), ve = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], st = b({
758
845
  inheritAttrs: !1,
759
846
  props: {
760
847
  options: {
@@ -762,62 +849,62 @@ const At = /* @__PURE__ */ ee(Ye, [["render", Qe]]), ge = ["closeclick", "conten
762
849
  default: () => ({})
763
850
  }
764
851
  },
765
- emits: ge,
766
- setup(o, { slots: e, emit: t, expose: s }) {
767
- const r = v(), n = v(), a = _(q, v()), c = _(R, v()), i = _(xe, v());
768
- let d;
769
- const u = K(() => {
852
+ emits: ve,
853
+ setup(n, { slots: e, emit: t, expose: s }) {
854
+ const r = y(), o = y(), a = C(Z, y()), l = C(D, y()), i = C(xe, y());
855
+ let h;
856
+ const u = J(() => {
770
857
  var p;
771
- return (p = e.default) == null ? void 0 : p.call(e).some((f) => f.type !== be);
772
- }), l = (p) => {
858
+ return (p = e.default) == null ? void 0 : p.call(e).some((f) => f.type !== Ee);
859
+ }), c = (p) => {
773
860
  var f;
774
861
  return (f = r.value) == null ? void 0 : f.open({ map: a.value, anchor: i.value, ...p });
775
- }, h = () => {
862
+ }, d = () => {
776
863
  var p;
777
864
  return (p = r.value) == null ? void 0 : p.close();
778
865
  };
779
866
  return Me(() => {
780
867
  O(
781
- [a, () => o.options],
868
+ [a, () => n.options],
782
869
  ([p, f], [m, g]) => {
783
- const y = !A(f, g) || a.value !== m;
784
- a.value && c.value && y && (r.value ? (r.value.setOptions({
870
+ const v = !T(f, g) || a.value !== m;
871
+ a.value && l.value && v && (r.value ? (r.value.setOptions({
785
872
  ...f,
786
- content: u.value ? n.value : f.content
787
- }), i.value || l()) : (r.value = E(
788
- new c.value.InfoWindow({
873
+ content: u.value ? o.value : f.content
874
+ }), i.value || c()) : (r.value = S(
875
+ new l.value.InfoWindow({
789
876
  ...f,
790
- content: u.value ? n.value : f.content
877
+ content: u.value ? o.value : f.content
791
878
  })
792
- ), i.value ? d = i.value.addListener("click", () => {
793
- l();
794
- }) : l(), ge.forEach((w) => {
795
- var C;
796
- (C = r.value) == null || C.addListener(w, (T) => t(w, T));
879
+ ), i.value ? h = i.value.addListener("click", () => {
880
+ c();
881
+ }) : c(), ve.forEach((w) => {
882
+ var _;
883
+ (_ = r.value) == null || _.addListener(w, (M) => t(w, M));
797
884
  })));
798
885
  },
799
886
  {
800
887
  immediate: !0
801
888
  }
802
889
  );
803
- }), j(() => {
890
+ }), B(() => {
804
891
  var p;
805
- d && d.remove(), r.value && ((p = c.value) == null || p.event.clearInstanceListeners(r.value), h());
806
- }), s({ infoWindow: r, open: l, close: h }), { infoWindow: r, infoWindowRef: n, hasSlotContent: u, open: l, close: h };
892
+ h && h.remove(), r.value && ((p = l.value) == null || p.event.clearInstanceListeners(r.value), d());
893
+ }), s({ infoWindow: r, open: c, close: d }), { infoWindow: r, infoWindowRef: o, hasSlotContent: u, open: c, close: d };
807
894
  }
808
895
  });
809
- const tt = {
896
+ const rt = {
810
897
  key: 0,
811
898
  class: "info-window-wrapper"
812
899
  };
813
- function st(o, e, t, s, r, n) {
814
- return o.hasSlotContent ? (J(), Y("div", tt, [
815
- ie("div", Oe({ ref: "infoWindowRef" }, o.$attrs), [
816
- X(o.$slots, "default", {}, void 0, !0)
900
+ function nt(n, e, t, s, r, o) {
901
+ return n.hasSlotContent ? (Y(), X("div", rt, [
902
+ ae("div", Pe({ ref: "infoWindowRef" }, n.$attrs), [
903
+ Q(n.$slots, "default", {}, void 0, !0)
817
904
  ], 16)
818
- ])) : Pe("", !0);
905
+ ])) : Oe("", !0);
819
906
  }
820
- const Tt = /* @__PURE__ */ ee(et, [["render", st], ["__scopeId", "data-v-45a4606d"]]), ve = [
907
+ const $t = /* @__PURE__ */ te(st, [["render", nt], ["__scopeId", "data-v-45a4606d"]]), ye = [
821
908
  Int8Array,
822
909
  Uint8Array,
823
910
  Uint8ClampedArray,
@@ -827,8 +914,8 @@ const Tt = /* @__PURE__ */ ee(et, [["render", st], ["__scopeId", "data-v-45a4606
827
914
  Uint32Array,
828
915
  Float32Array,
829
916
  Float64Array
830
- ], se = 1, D = 8;
831
- class ae {
917
+ ], re = 1, z = 8;
918
+ class le {
832
919
  /**
833
920
  * Creates an index from raw `ArrayBuffer` data.
834
921
  * @param {ArrayBuffer} data
@@ -840,13 +927,13 @@ class ae {
840
927
  if (t !== 219)
841
928
  throw new Error("Data does not appear to be in a KDBush format.");
842
929
  const r = s >> 4;
843
- if (r !== se)
844
- throw new Error(`Got v${r} data when expected v${se}.`);
845
- const n = ve[s & 15];
846
- if (!n)
930
+ if (r !== re)
931
+ throw new Error(`Got v${r} data when expected v${re}.`);
932
+ const o = ye[s & 15];
933
+ if (!o)
847
934
  throw new Error("Unrecognized array type.");
848
- const [a] = new Uint16Array(e, 2, 1), [c] = new Uint32Array(e, 4, 1);
849
- return new ae(c, a, n, e);
935
+ const [a] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
936
+ return new le(l, a, o, e);
850
937
  }
851
938
  /**
852
939
  * Creates an index that will hold a given number of items.
@@ -859,10 +946,10 @@ class ae {
859
946
  if (isNaN(e) || e < 0)
860
947
  throw new Error(`Unpexpected numItems value: ${e}.`);
861
948
  this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = s, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
862
- const n = ve.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, c = e * this.IndexArrayType.BYTES_PER_ELEMENT, i = (8 - c % 8) % 8;
863
- if (n < 0)
949
+ const o = ye.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, i = (8 - l % 8) % 8;
950
+ if (o < 0)
864
951
  throw new Error(`Unexpected typed array class: ${s}.`);
865
- r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, D, e), this.coords = new this.ArrayType(this.data, D + c + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(D + a + c + i), this.ids = new this.IndexArrayType(this.data, D, e), this.coords = new this.ArrayType(this.data, D + c + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (se << 4) + n]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
952
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(z + a + l + i), this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (re << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
866
953
  }
867
954
  /**
868
955
  * Add a point to the index.
@@ -881,7 +968,7 @@ class ae {
881
968
  const e = this._pos >> 1;
882
969
  if (e !== this.numItems)
883
970
  throw new Error(`Added ${e} items when expected ${this.numItems}.`);
884
- return ne(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
971
+ return ie(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
885
972
  }
886
973
  /**
887
974
  * Search the index for items within a given bounding box.
@@ -894,20 +981,20 @@ class ae {
894
981
  range(e, t, s, r) {
895
982
  if (!this._finished)
896
983
  throw new Error("Data not yet indexed - call index.finish().");
897
- const { ids: n, coords: a, nodeSize: c } = this, i = [0, n.length - 1, 0], d = [];
984
+ const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], h = [];
898
985
  for (; i.length; ) {
899
- const u = i.pop() || 0, l = i.pop() || 0, h = i.pop() || 0;
900
- if (l - h <= c) {
901
- for (let g = h; g <= l; g++) {
902
- const y = a[2 * g], w = a[2 * g + 1];
903
- y >= e && y <= s && w >= t && w <= r && d.push(n[g]);
986
+ const u = i.pop() || 0, c = i.pop() || 0, d = i.pop() || 0;
987
+ if (c - d <= l) {
988
+ for (let g = d; g <= c; g++) {
989
+ const v = a[2 * g], w = a[2 * g + 1];
990
+ v >= e && v <= s && w >= t && w <= r && h.push(o[g]);
904
991
  }
905
992
  continue;
906
993
  }
907
- const p = h + l >> 1, f = a[2 * p], m = a[2 * p + 1];
908
- f >= e && f <= s && m >= t && m <= r && d.push(n[p]), (u === 0 ? e <= f : t <= m) && (i.push(h), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= f : r >= m) && (i.push(p + 1), i.push(l), i.push(1 - u));
994
+ const p = d + c >> 1, f = a[2 * p], m = a[2 * p + 1];
995
+ f >= e && f <= s && m >= t && m <= r && h.push(o[p]), (u === 0 ? e <= f : t <= m) && (i.push(d), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= f : r >= m) && (i.push(p + 1), i.push(c), i.push(1 - u));
909
996
  }
910
- return d;
997
+ return h;
911
998
  }
912
999
  /**
913
1000
  * Search the index for items within a given radius.
@@ -919,55 +1006,55 @@ class ae {
919
1006
  within(e, t, s) {
920
1007
  if (!this._finished)
921
1008
  throw new Error("Data not yet indexed - call index.finish().");
922
- const { ids: r, coords: n, nodeSize: a } = this, c = [0, r.length - 1, 0], i = [], d = s * s;
923
- for (; c.length; ) {
924
- const u = c.pop() || 0, l = c.pop() || 0, h = c.pop() || 0;
925
- if (l - h <= a) {
926
- for (let g = h; g <= l; g++)
927
- ye(n[2 * g], n[2 * g + 1], e, t) <= d && i.push(r[g]);
1009
+ const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], h = s * s;
1010
+ for (; l.length; ) {
1011
+ const u = l.pop() || 0, c = l.pop() || 0, d = l.pop() || 0;
1012
+ if (c - d <= a) {
1013
+ for (let g = d; g <= c; g++)
1014
+ we(o[2 * g], o[2 * g + 1], e, t) <= h && i.push(r[g]);
928
1015
  continue;
929
1016
  }
930
- const p = h + l >> 1, f = n[2 * p], m = n[2 * p + 1];
931
- ye(f, m, e, t) <= d && i.push(r[p]), (u === 0 ? e - s <= f : t - s <= m) && (c.push(h), c.push(p - 1), c.push(1 - u)), (u === 0 ? e + s >= f : t + s >= m) && (c.push(p + 1), c.push(l), c.push(1 - u));
1017
+ const p = d + c >> 1, f = o[2 * p], m = o[2 * p + 1];
1018
+ we(f, m, e, t) <= h && i.push(r[p]), (u === 0 ? e - s <= f : t - s <= m) && (l.push(d), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= f : t + s >= m) && (l.push(p + 1), l.push(c), l.push(1 - u));
932
1019
  }
933
1020
  return i;
934
1021
  }
935
1022
  }
936
- function ne(o, e, t, s, r, n) {
1023
+ function ie(n, e, t, s, r, o) {
937
1024
  if (r - s <= t)
938
1025
  return;
939
1026
  const a = s + r >> 1;
940
- Se(o, e, a, s, r, n), ne(o, e, t, s, a - 1, 1 - n), ne(o, e, t, a + 1, r, 1 - n);
1027
+ Ie(n, e, a, s, r, o), ie(n, e, t, s, a - 1, 1 - o), ie(n, e, t, a + 1, r, 1 - o);
941
1028
  }
942
- function Se(o, e, t, s, r, n) {
1029
+ function Ie(n, e, t, s, r, o) {
943
1030
  for (; r > s; ) {
944
1031
  if (r - s > 600) {
945
- const d = r - s + 1, u = t - s + 1, l = Math.log(d), h = 0.5 * Math.exp(2 * l / 3), p = 0.5 * Math.sqrt(l * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), f = Math.max(s, Math.floor(t - u * h / d + p)), m = Math.min(r, Math.floor(t + (d - u) * h / d + p));
946
- Se(o, e, t, f, m, n);
1032
+ const h = r - s + 1, u = t - s + 1, c = Math.log(h), d = 0.5 * Math.exp(2 * c / 3), p = 0.5 * Math.sqrt(c * d * (h - d) / h) * (u - h / 2 < 0 ? -1 : 1), f = Math.max(s, Math.floor(t - u * d / h + p)), m = Math.min(r, Math.floor(t + (h - u) * d / h + p));
1033
+ Ie(n, e, t, f, m, o);
947
1034
  }
948
- const a = e[2 * t + n];
949
- let c = s, i = r;
950
- for (U(o, e, s, t), e[2 * r + n] > a && U(o, e, s, r); c < i; ) {
951
- for (U(o, e, c, i), c++, i--; e[2 * c + n] < a; )
952
- c++;
953
- for (; e[2 * i + n] > a; )
1035
+ const a = e[2 * t + o];
1036
+ let l = s, i = r;
1037
+ for (V(n, e, s, t), e[2 * r + o] > a && V(n, e, s, r); l < i; ) {
1038
+ for (V(n, e, l, i), l++, i--; e[2 * l + o] < a; )
1039
+ l++;
1040
+ for (; e[2 * i + o] > a; )
954
1041
  i--;
955
1042
  }
956
- e[2 * s + n] === a ? U(o, e, s, i) : (i++, U(o, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
1043
+ e[2 * s + o] === a ? V(n, e, s, i) : (i++, V(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
957
1044
  }
958
1045
  }
959
- function U(o, e, t, s) {
960
- re(o, t, s), re(e, 2 * t, 2 * s), re(e, 2 * t + 1, 2 * s + 1);
1046
+ function V(n, e, t, s) {
1047
+ ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
961
1048
  }
962
- function re(o, e, t) {
963
- const s = o[e];
964
- o[e] = o[t], o[t] = s;
1049
+ function ne(n, e, t) {
1050
+ const s = n[e];
1051
+ n[e] = n[t], n[t] = s;
965
1052
  }
966
- function ye(o, e, t, s) {
967
- const r = o - t, n = e - s;
968
- return r * r + n * n;
1053
+ function we(n, e, t, s) {
1054
+ const r = n - t, o = e - s;
1055
+ return r * r + o * o;
969
1056
  }
970
- const rt = {
1057
+ const ot = {
971
1058
  minZoom: 0,
972
1059
  // min zoom to generate clusters on
973
1060
  maxZoom: 16,
@@ -988,26 +1075,26 @@ const rt = {
988
1075
  reduce: null,
989
1076
  // (accumulated, props) => { accumulated.sum += props.sum; }
990
1077
  // properties to use for individual points when running the reducer
991
- map: (o) => o
1078
+ map: (n) => n
992
1079
  // props => ({sum: props.my_value})
993
- }, we = Math.fround || ((o) => (e) => (o[0] = +e, o[0]))(new Float32Array(1)), L = 2, x = 3, oe = 4, P = 5, Ae = 6;
1080
+ }, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), I = 2, L = 3, oe = 4, x = 5, Ae = 6;
994
1081
  class Te {
995
1082
  constructor(e) {
996
- this.options = Object.assign(Object.create(rt), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1083
+ this.options = Object.assign(Object.create(ot), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
997
1084
  }
998
1085
  load(e) {
999
1086
  const { log: t, minZoom: s, maxZoom: r } = this.options;
1000
1087
  t && console.time("total time");
1001
- const n = `prepare ${e.length} points`;
1002
- t && console.time(n), this.points = e;
1088
+ const o = `prepare ${e.length} points`;
1089
+ t && console.time(o), this.points = e;
1003
1090
  const a = [];
1004
1091
  for (let i = 0; i < e.length; i++) {
1005
- const d = e[i];
1006
- if (!d.geometry)
1092
+ const h = e[i];
1093
+ if (!h.geometry)
1007
1094
  continue;
1008
- const [u, l] = d.geometry.coordinates, h = we(H(u)), p = we(W(l));
1095
+ const [u, c] = h.geometry.coordinates, d = _e(W(u)), p = _e(K(c));
1009
1096
  a.push(
1010
- h,
1097
+ d,
1011
1098
  p,
1012
1099
  // projected point coordinates
1013
1100
  1 / 0,
@@ -1020,47 +1107,47 @@ class Te {
1020
1107
  // number of points in a cluster
1021
1108
  ), this.options.reduce && a.push(0);
1022
1109
  }
1023
- let c = this.trees[r + 1] = this._createTree(a);
1024
- t && console.timeEnd(n);
1110
+ let l = this.trees[r + 1] = this._createTree(a);
1111
+ t && console.timeEnd(o);
1025
1112
  for (let i = r; i >= s; i--) {
1026
- const d = +Date.now();
1027
- c = this.trees[i] = this._createTree(this._cluster(c, i)), t && console.log("z%d: %d clusters in %dms", i, c.numItems, +Date.now() - d);
1113
+ const h = +Date.now();
1114
+ l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() - h);
1028
1115
  }
1029
1116
  return t && console.timeEnd("total time"), this;
1030
1117
  }
1031
1118
  getClusters(e, t) {
1032
1119
  let s = ((e[0] + 180) % 360 + 360) % 360 - 180;
1033
1120
  const r = Math.max(-90, Math.min(90, e[1]));
1034
- let n = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1121
+ let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1035
1122
  const a = Math.max(-90, Math.min(90, e[3]));
1036
1123
  if (e[2] - e[0] >= 360)
1037
- s = -180, n = 180;
1038
- else if (s > n) {
1039
- const l = this.getClusters([s, r, 180, a], t), h = this.getClusters([-180, r, n, a], t);
1040
- return l.concat(h);
1124
+ s = -180, o = 180;
1125
+ else if (s > o) {
1126
+ const c = this.getClusters([s, r, 180, a], t), d = this.getClusters([-180, r, o, a], t);
1127
+ return c.concat(d);
1041
1128
  }
1042
- const c = this.trees[this._limitZoom(t)], i = c.range(H(s), W(a), H(n), W(r)), d = c.data, u = [];
1043
- for (const l of i) {
1044
- const h = this.stride * l;
1045
- u.push(d[h + P] > 1 ? ke(d, h, this.clusterProps) : this.points[d[h + x]]);
1129
+ const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)), h = l.data, u = [];
1130
+ for (const c of i) {
1131
+ const d = this.stride * c;
1132
+ u.push(h[d + x] > 1 ? ke(h, d, this.clusterProps) : this.points[h[d + L]]);
1046
1133
  }
1047
1134
  return u;
1048
1135
  }
1049
1136
  getChildren(e) {
1050
- const t = this._getOriginId(e), s = this._getOriginZoom(e), r = "No cluster with the specified id.", n = this.trees[s];
1051
- if (!n)
1137
+ const t = this._getOriginId(e), s = this._getOriginZoom(e), r = "No cluster with the specified id.", o = this.trees[s];
1138
+ if (!o)
1052
1139
  throw new Error(r);
1053
- const a = n.data;
1140
+ const a = o.data;
1054
1141
  if (t * this.stride >= a.length)
1055
1142
  throw new Error(r);
1056
- const c = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], d = a[t * this.stride + 1], u = n.within(i, d, c), l = [];
1057
- for (const h of u) {
1058
- const p = h * this.stride;
1059
- a[p + oe] === e && l.push(a[p + P] > 1 ? ke(a, p, this.clusterProps) : this.points[a[p + x]]);
1143
+ const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], h = a[t * this.stride + 1], u = o.within(i, h, l), c = [];
1144
+ for (const d of u) {
1145
+ const p = d * this.stride;
1146
+ a[p + oe] === e && c.push(a[p + x] > 1 ? ke(a, p, this.clusterProps) : this.points[a[p + L]]);
1060
1147
  }
1061
- if (l.length === 0)
1148
+ if (c.length === 0)
1062
1149
  throw new Error(r);
1063
- return l;
1150
+ return c;
1064
1151
  }
1065
1152
  getLeaves(e, t, s) {
1066
1153
  t = t || 10, s = s || 0;
@@ -1068,31 +1155,31 @@ class Te {
1068
1155
  return this._appendLeaves(r, e, t, s, 0), r;
1069
1156
  }
1070
1157
  getTile(e, t, s) {
1071
- const r = this.trees[this._limitZoom(e)], n = Math.pow(2, e), { extent: a, radius: c } = this.options, i = c / a, d = (s - i) / n, u = (s + 1 + i) / n, l = {
1158
+ const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a, h = (s - i) / o, u = (s + 1 + i) / o, c = {
1072
1159
  features: []
1073
1160
  };
1074
1161
  return this._addTileFeatures(
1075
- r.range((t - i) / n, d, (t + 1 + i) / n, u),
1162
+ r.range((t - i) / o, h, (t + 1 + i) / o, u),
1076
1163
  r.data,
1077
1164
  t,
1078
1165
  s,
1079
- n,
1080
- l
1166
+ o,
1167
+ c
1081
1168
  ), t === 0 && this._addTileFeatures(
1082
- r.range(1 - i / n, d, 1, u),
1169
+ r.range(1 - i / o, h, 1, u),
1083
1170
  r.data,
1084
- n,
1171
+ o,
1085
1172
  s,
1086
- n,
1087
- l
1088
- ), t === n - 1 && this._addTileFeatures(
1089
- r.range(0, d, i / n, u),
1173
+ o,
1174
+ c
1175
+ ), t === o - 1 && this._addTileFeatures(
1176
+ r.range(0, h, i / o, u),
1090
1177
  r.data,
1091
1178
  -1,
1092
1179
  s,
1093
- n,
1094
- l
1095
- ), l.features.length ? l : null;
1180
+ o,
1181
+ c
1182
+ ), c.features.length ? c : null;
1096
1183
  }
1097
1184
  getClusterExpansionZoom(e) {
1098
1185
  let t = this._getOriginZoom(e) - 1;
@@ -1104,87 +1191,87 @@ class Te {
1104
1191
  }
1105
1192
  return t;
1106
1193
  }
1107
- _appendLeaves(e, t, s, r, n) {
1194
+ _appendLeaves(e, t, s, r, o) {
1108
1195
  const a = this.getChildren(t);
1109
- for (const c of a) {
1110
- const i = c.properties;
1111
- if (i && i.cluster ? n + i.point_count <= r ? n += i.point_count : n = this._appendLeaves(e, i.cluster_id, s, r, n) : n < r ? n++ : e.push(c), e.length === s)
1196
+ for (const l of a) {
1197
+ const i = l.properties;
1198
+ if (i && i.cluster ? o + i.point_count <= r ? o += i.point_count : o = this._appendLeaves(e, i.cluster_id, s, r, o) : o < r ? o++ : e.push(l), e.length === s)
1112
1199
  break;
1113
1200
  }
1114
- return n;
1201
+ return o;
1115
1202
  }
1116
1203
  _createTree(e) {
1117
- const t = new ae(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1204
+ const t = new le(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1118
1205
  for (let s = 0; s < e.length; s += this.stride)
1119
1206
  t.add(e[s], e[s + 1]);
1120
1207
  return t.finish(), t.data = e, t;
1121
1208
  }
1122
- _addTileFeatures(e, t, s, r, n, a) {
1123
- for (const c of e) {
1124
- const i = c * this.stride, d = t[i + P] > 1;
1125
- let u, l, h;
1126
- if (d)
1127
- u = Ie(t, i, this.clusterProps), l = t[i], h = t[i + 1];
1209
+ _addTileFeatures(e, t, s, r, o, a) {
1210
+ for (const l of e) {
1211
+ const i = l * this.stride, h = t[i + x] > 1;
1212
+ let u, c, d;
1213
+ if (h)
1214
+ u = $e(t, i, this.clusterProps), c = t[i], d = t[i + 1];
1128
1215
  else {
1129
- const m = this.points[t[i + x]];
1216
+ const m = this.points[t[i + L]];
1130
1217
  u = m.properties;
1131
- const [g, y] = m.geometry.coordinates;
1132
- l = H(g), h = W(y);
1218
+ const [g, v] = m.geometry.coordinates;
1219
+ c = W(g), d = K(v);
1133
1220
  }
1134
1221
  const p = {
1135
1222
  type: 1,
1136
1223
  geometry: [[
1137
- Math.round(this.options.extent * (l * n - s)),
1138
- Math.round(this.options.extent * (h * n - r))
1224
+ Math.round(this.options.extent * (c * o - s)),
1225
+ Math.round(this.options.extent * (d * o - r))
1139
1226
  ]],
1140
1227
  tags: u
1141
1228
  };
1142
1229
  let f;
1143
- d || this.options.generateId ? f = t[i + x] : f = this.points[t[i + x]].id, f !== void 0 && (p.id = f), a.features.push(p);
1230
+ h || this.options.generateId ? f = t[i + L] : f = this.points[t[i + L]].id, f !== void 0 && (p.id = f), a.features.push(p);
1144
1231
  }
1145
1232
  }
1146
1233
  _limitZoom(e) {
1147
1234
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1148
1235
  }
1149
1236
  _cluster(e, t) {
1150
- const { radius: s, extent: r, reduce: n, minPoints: a } = this.options, c = s / (r * Math.pow(2, t)), i = e.data, d = [], u = this.stride;
1151
- for (let l = 0; l < i.length; l += u) {
1152
- if (i[l + L] <= t)
1237
+ const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data, h = [], u = this.stride;
1238
+ for (let c = 0; c < i.length; c += u) {
1239
+ if (i[c + I] <= t)
1153
1240
  continue;
1154
- i[l + L] = t;
1155
- const h = i[l], p = i[l + 1], f = e.within(i[l], i[l + 1], c), m = i[l + P];
1241
+ i[c + I] = t;
1242
+ const d = i[c], p = i[c + 1], f = e.within(i[c], i[c + 1], l), m = i[c + x];
1156
1243
  let g = m;
1157
- for (const y of f) {
1158
- const w = y * u;
1159
- i[w + L] > t && (g += i[w + P]);
1244
+ for (const v of f) {
1245
+ const w = v * u;
1246
+ i[w + I] > t && (g += i[w + x]);
1160
1247
  }
1161
1248
  if (g > m && g >= a) {
1162
- let y = h * m, w = p * m, C, T = -1;
1163
- const N = ((l / u | 0) << 5) + (t + 1) + this.points.length;
1164
- for (const G of f) {
1165
- const b = G * u;
1166
- if (i[b + L] <= t)
1249
+ let v = d * m, w = p * m, _, M = -1;
1250
+ const P = ((c / u | 0) << 5) + (t + 1) + this.points.length;
1251
+ for (const $ of f) {
1252
+ const E = $ * u;
1253
+ if (i[E + I] <= t)
1167
1254
  continue;
1168
- i[b + L] = t;
1169
- const F = i[b + P];
1170
- y += i[b] * F, w += i[b + 1] * F, i[b + oe] = N, n && (C || (C = this._map(i, l, !0), T = this.clusterProps.length, this.clusterProps.push(C)), n(C, this._map(i, b)));
1255
+ i[E + I] = t;
1256
+ const F = i[E + x];
1257
+ v += i[E] * F, w += i[E + 1] * F, i[E + oe] = P, o && (_ || (_ = this._map(i, c, !0), M = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(i, E)));
1171
1258
  }
1172
- i[l + oe] = N, d.push(y / g, w / g, 1 / 0, N, -1, g), n && d.push(T);
1259
+ i[c + oe] = P, h.push(v / g, w / g, 1 / 0, P, -1, g), o && h.push(M);
1173
1260
  } else {
1174
- for (let y = 0; y < u; y++)
1175
- d.push(i[l + y]);
1261
+ for (let v = 0; v < u; v++)
1262
+ h.push(i[c + v]);
1176
1263
  if (g > 1)
1177
- for (const y of f) {
1178
- const w = y * u;
1179
- if (!(i[w + L] <= t)) {
1180
- i[w + L] = t;
1181
- for (let C = 0; C < u; C++)
1182
- d.push(i[w + C]);
1264
+ for (const v of f) {
1265
+ const w = v * u;
1266
+ if (!(i[w + I] <= t)) {
1267
+ i[w + I] = t;
1268
+ for (let _ = 0; _ < u; _++)
1269
+ h.push(i[w + _]);
1183
1270
  }
1184
1271
  }
1185
1272
  }
1186
1273
  }
1187
- return d;
1274
+ return h;
1188
1275
  }
1189
1276
  // get index of the point from which the cluster originated
1190
1277
  _getOriginId(e) {
@@ -1195,46 +1282,46 @@ class Te {
1195
1282
  return (e - this.points.length) % 32;
1196
1283
  }
1197
1284
  _map(e, t, s) {
1198
- if (e[t + P] > 1) {
1285
+ if (e[t + x] > 1) {
1199
1286
  const a = this.clusterProps[e[t + Ae]];
1200
1287
  return s ? Object.assign({}, a) : a;
1201
1288
  }
1202
- const r = this.points[e[t + x]].properties, n = this.options.map(r);
1203
- return s && n === r ? Object.assign({}, n) : n;
1289
+ const r = this.points[e[t + L]].properties, o = this.options.map(r);
1290
+ return s && o === r ? Object.assign({}, o) : o;
1204
1291
  }
1205
1292
  }
1206
- function ke(o, e, t) {
1293
+ function ke(n, e, t) {
1207
1294
  return {
1208
1295
  type: "Feature",
1209
- id: o[e + x],
1210
- properties: Ie(o, e, t),
1296
+ id: n[e + L],
1297
+ properties: $e(n, e, t),
1211
1298
  geometry: {
1212
1299
  type: "Point",
1213
- coordinates: [ot(o[e]), nt(o[e + 1])]
1300
+ coordinates: [it(n[e]), at(n[e + 1])]
1214
1301
  }
1215
1302
  };
1216
1303
  }
1217
- function Ie(o, e, t) {
1218
- const s = o[e + P], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, n = o[e + Ae], a = n === -1 ? {} : Object.assign({}, t[n]);
1304
+ function $e(n, e, t) {
1305
+ const s = n[e + x], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Ae], a = o === -1 ? {} : Object.assign({}, t[o]);
1219
1306
  return Object.assign(a, {
1220
1307
  cluster: !0,
1221
- cluster_id: o[e + x],
1308
+ cluster_id: n[e + L],
1222
1309
  point_count: s,
1223
1310
  point_count_abbreviated: r
1224
1311
  });
1225
1312
  }
1226
- function H(o) {
1227
- return o / 360 + 0.5;
1313
+ function W(n) {
1314
+ return n / 360 + 0.5;
1228
1315
  }
1229
- function W(o) {
1230
- const e = Math.sin(o * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1316
+ function K(n) {
1317
+ const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1231
1318
  return t < 0 ? 0 : t > 1 ? 1 : t;
1232
1319
  }
1233
- function ot(o) {
1234
- return (o - 0.5) * 360;
1320
+ function it(n) {
1321
+ return (n - 0.5) * 360;
1235
1322
  }
1236
- function nt(o) {
1237
- const e = (180 - o * 360) * Math.PI / 180;
1323
+ function at(n) {
1324
+ const e = (180 - n * 360) * Math.PI / 180;
1238
1325
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1239
1326
  }
1240
1327
  /*! *****************************************************************************
@@ -1251,13 +1338,13 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1251
1338
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1252
1339
  PERFORMANCE OF THIS SOFTWARE.
1253
1340
  ***************************************************************************** */
1254
- function le(o, e) {
1341
+ function ce(n, e) {
1255
1342
  var t = {};
1256
- for (var s in o)
1257
- Object.prototype.hasOwnProperty.call(o, s) && e.indexOf(s) < 0 && (t[s] = o[s]);
1258
- if (o != null && typeof Object.getOwnPropertySymbols == "function")
1259
- for (var r = 0, s = Object.getOwnPropertySymbols(o); r < s.length; r++)
1260
- e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(o, s[r]) && (t[s[r]] = o[s[r]]);
1343
+ for (var s in n)
1344
+ Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
1345
+ if (n != null && typeof Object.getOwnPropertySymbols == "function")
1346
+ for (var r = 0, s = Object.getOwnPropertySymbols(n); r < s.length; r++)
1347
+ e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
1261
1348
  return t;
1262
1349
  }
1263
1350
  class k {
@@ -1286,7 +1373,7 @@ class k {
1286
1373
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1287
1374
  }
1288
1375
  }
1289
- class V {
1376
+ class H {
1290
1377
  constructor({ markers: e, position: t }) {
1291
1378
  this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1292
1379
  }
@@ -1320,20 +1407,20 @@ class V {
1320
1407
  this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1321
1408
  }
1322
1409
  }
1323
- const it = (o, e, t, s) => {
1324
- const r = $e(o.getBounds(), e, s);
1325
- return t.filter((n) => r.contains(k.getPosition(n)));
1326
- }, $e = (o, e, t) => {
1327
- const { northEast: s, southWest: r } = at(o, e), n = lt({ northEast: s, southWest: r }, t);
1328
- return ct(n, e);
1329
- }, _e = (o, e, t) => {
1330
- const s = $e(o, e, t), r = s.getNorthEast(), n = s.getSouthWest();
1331
- return [n.lng(), n.lat(), r.lng(), r.lat()];
1332
- }, at = (o, e) => ({
1333
- northEast: e.fromLatLngToDivPixel(o.getNorthEast()),
1334
- southWest: e.fromLatLngToDivPixel(o.getSouthWest())
1335
- }), lt = ({ northEast: o, southWest: e }, t) => (o.x += t, o.y -= t, e.x -= t, e.y += t, { northEast: o, southWest: e }), ct = ({ northEast: o, southWest: e }, t) => {
1336
- const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(o);
1410
+ const lt = (n, e, t, s) => {
1411
+ const r = Re(n.getBounds(), e, s);
1412
+ return t.filter((o) => r.contains(k.getPosition(o)));
1413
+ }, Re = (n, e, t) => {
1414
+ const { northEast: s, southWest: r } = ct(n, e), o = ut({ northEast: s, southWest: r }, t);
1415
+ return ht(o, e);
1416
+ }, Ce = (n, e, t) => {
1417
+ const s = Re(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1418
+ return [o.lng(), o.lat(), r.lng(), r.lat()];
1419
+ }, ct = (n, e) => ({
1420
+ northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
1421
+ southWest: e.fromLatLngToDivPixel(n.getSouthWest())
1422
+ }), ut = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ht = ({ northEast: n, southWest: e }, t) => {
1423
+ const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
1337
1424
  return new google.maps.LatLngBounds(s, r);
1338
1425
  };
1339
1426
  class je {
@@ -1353,12 +1440,12 @@ class je {
1353
1440
  * ```
1354
1441
  */
1355
1442
  noop({ markers: e }) {
1356
- return dt(e);
1443
+ return pt(e);
1357
1444
  }
1358
1445
  }
1359
- class ut extends je {
1446
+ class dt extends je {
1360
1447
  constructor(e) {
1361
- var { viewportPadding: t = 60 } = e, s = le(e, ["viewportPadding"]);
1448
+ var { viewportPadding: t = 60 } = e, s = ce(e, ["viewportPadding"]);
1362
1449
  super(s), this.viewportPadding = 60, this.viewportPadding = t;
1363
1450
  }
1364
1451
  calculate({ markers: e, map: t, mapCanvasProjection: s }) {
@@ -1369,80 +1456,80 @@ class ut extends je {
1369
1456
  changed: !1
1370
1457
  } : {
1371
1458
  clusters: this.cluster({
1372
- markers: it(t, s, e, this.viewportPadding),
1459
+ markers: lt(t, s, e, this.viewportPadding),
1373
1460
  map: t,
1374
1461
  mapCanvasProjection: s
1375
1462
  })
1376
1463
  };
1377
1464
  }
1378
1465
  }
1379
- const dt = (o) => o.map((t) => new V({
1466
+ const pt = (n) => n.map((t) => new H({
1380
1467
  position: k.getPosition(t),
1381
1468
  markers: [t]
1382
1469
  }));
1383
- class ht extends je {
1470
+ class ft extends je {
1384
1471
  constructor(e) {
1385
- var { maxZoom: t, radius: s = 60 } = e, r = le(e, ["maxZoom", "radius"]);
1472
+ var { maxZoom: t, radius: s = 60 } = e, r = ce(e, ["maxZoom", "radius"]);
1386
1473
  super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
1387
1474
  }
1388
1475
  calculate(e) {
1389
1476
  let t = !1;
1390
1477
  const s = { zoom: e.map.getZoom() };
1391
- if (!A(e.markers, this.markers)) {
1478
+ if (!T(e.markers, this.markers)) {
1392
1479
  t = !0, this.markers = [...e.markers];
1393
- const r = this.markers.map((n) => {
1394
- const a = k.getPosition(n);
1480
+ const r = this.markers.map((o) => {
1481
+ const a = k.getPosition(o);
1395
1482
  return {
1396
1483
  type: "Feature",
1397
1484
  geometry: {
1398
1485
  type: "Point",
1399
1486
  coordinates: [a.lng(), a.lat()]
1400
1487
  },
1401
- properties: { marker: n }
1488
+ properties: { marker: o }
1402
1489
  };
1403
1490
  });
1404
1491
  this.superCluster.load(r);
1405
1492
  }
1406
- return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !A(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
1493
+ return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !T(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
1407
1494
  }
1408
1495
  cluster({ map: e }) {
1409
1496
  return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(e.getZoom())).map((t) => this.transformCluster(t));
1410
1497
  }
1411
1498
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1412
1499
  if (s.cluster)
1413
- return new V({
1414
- markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((n) => n.properties.marker),
1500
+ return new H({
1501
+ markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1415
1502
  position: { lat: t, lng: e }
1416
1503
  });
1417
1504
  const r = s.marker;
1418
- return new V({
1505
+ return new H({
1419
1506
  markers: [r],
1420
1507
  position: k.getPosition(r)
1421
1508
  });
1422
1509
  }
1423
1510
  }
1424
- class pt extends ut {
1511
+ class mt extends dt {
1425
1512
  constructor(e) {
1426
- var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, n = le(e, ["maxZoom", "radius", "viewportPadding"]);
1427
- super({ maxZoom: t, viewportPadding: r }), this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, n)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1513
+ var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ce(e, ["maxZoom", "radius", "viewportPadding"]);
1514
+ super({ maxZoom: t, viewportPadding: r }), this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1428
1515
  }
1429
1516
  calculate(e) {
1430
1517
  const t = {
1431
1518
  zoom: Math.round(e.map.getZoom()),
1432
- view: _e(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1519
+ view: Ce(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1433
1520
  };
1434
- let s = !A(this.state, t);
1435
- if (!A(e.markers, this.markers)) {
1521
+ let s = !T(this.state, t);
1522
+ if (!T(e.markers, this.markers)) {
1436
1523
  s = !0, this.markers = [...e.markers];
1437
- const r = this.markers.map((n) => {
1438
- const a = k.getPosition(n);
1524
+ const r = this.markers.map((o) => {
1525
+ const a = k.getPosition(o);
1439
1526
  return {
1440
1527
  type: "Feature",
1441
1528
  geometry: {
1442
1529
  type: "Point",
1443
1530
  coordinates: [a.lng(), a.lat()]
1444
1531
  },
1445
- properties: { marker: n }
1532
+ properties: { marker: o }
1446
1533
  };
1447
1534
  });
1448
1535
  this.superCluster.load(r);
@@ -1452,27 +1539,27 @@ class pt extends ut {
1452
1539
  cluster({ map: e, mapCanvasProjection: t }) {
1453
1540
  const s = {
1454
1541
  zoom: Math.round(e.getZoom()),
1455
- view: _e(e.getBounds(), t, this.viewportPadding)
1542
+ view: Ce(e.getBounds(), t, this.viewportPadding)
1456
1543
  };
1457
1544
  return this.superCluster.getClusters(s.view, s.zoom).map((r) => this.transformCluster(r));
1458
1545
  }
1459
1546
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1460
1547
  if (s.cluster)
1461
- return new V({
1462
- markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((n) => n.properties.marker),
1548
+ return new H({
1549
+ markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1463
1550
  position: { lat: t, lng: e }
1464
1551
  });
1465
1552
  const r = s.marker;
1466
- return new V({
1553
+ return new H({
1467
1554
  markers: [r],
1468
1555
  position: k.getPosition(r)
1469
1556
  });
1470
1557
  }
1471
1558
  }
1472
- class ft {
1559
+ class gt {
1473
1560
  constructor(e, t) {
1474
1561
  this.markers = { sum: e.length };
1475
- const s = t.map((n) => n.count), r = s.reduce((n, a) => n + a, 0);
1562
+ const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
1476
1563
  this.clusters = {
1477
1564
  count: t.length,
1478
1565
  markers: {
@@ -1484,7 +1571,7 @@ class ft {
1484
1571
  };
1485
1572
  }
1486
1573
  }
1487
- class mt {
1574
+ class vt {
1488
1575
  /**
1489
1576
  * The default render function for the library used by {@link MarkerClusterer}.
1490
1577
  *
@@ -1529,52 +1616,52 @@ class mt {
1529
1616
  <circle cx="120" cy="120" opacity=".3" r="90" />
1530
1617
  <circle cx="120" cy="120" opacity=".2" r="110" />
1531
1618
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
1532
- </svg>`, c = `Cluster of ${e} markers`, i = Number(google.maps.Marker.MAX_ZINDEX) + e;
1619
+ </svg>`, l = `Cluster of ${e} markers`, i = Number(google.maps.Marker.MAX_ZINDEX) + e;
1533
1620
  if (k.isAdvancedMarkerAvailable(r)) {
1534
1621
  const u = document.createElement("div");
1535
1622
  u.innerHTML = a;
1536
- const l = u.firstElementChild;
1537
- l.setAttribute("transform", "translate(0 25)");
1538
- const h = {
1623
+ const c = u.firstElementChild;
1624
+ c.setAttribute("transform", "translate(0 25)");
1625
+ const d = {
1539
1626
  map: r,
1540
1627
  position: t,
1541
1628
  zIndex: i,
1542
- title: c,
1543
- content: l
1629
+ title: l,
1630
+ content: c
1544
1631
  };
1545
- return new google.maps.marker.AdvancedMarkerElement(h);
1632
+ return new google.maps.marker.AdvancedMarkerElement(d);
1546
1633
  }
1547
- const d = {
1634
+ const h = {
1548
1635
  position: t,
1549
1636
  zIndex: i,
1550
- title: c,
1637
+ title: l,
1551
1638
  icon: {
1552
1639
  url: `data:image/svg+xml;base64,${btoa(a)}`,
1553
1640
  anchor: new google.maps.Point(25, 25)
1554
1641
  }
1555
1642
  };
1556
- return new google.maps.Marker(d);
1643
+ return new google.maps.Marker(h);
1557
1644
  }
1558
1645
  }
1559
- function gt(o, e) {
1646
+ function yt(n, e) {
1560
1647
  for (let t in e.prototype)
1561
- o.prototype[t] = e.prototype[t];
1648
+ n.prototype[t] = e.prototype[t];
1562
1649
  }
1563
- class ce {
1650
+ class ue {
1564
1651
  constructor() {
1565
- gt(ce, google.maps.OverlayView);
1652
+ yt(ue, google.maps.OverlayView);
1566
1653
  }
1567
1654
  }
1568
- var I;
1569
- (function(o) {
1570
- o.CLUSTERING_BEGIN = "clusteringbegin", o.CLUSTERING_END = "clusteringend", o.CLUSTER_CLICK = "click";
1571
- })(I || (I = {}));
1572
- const vt = (o, e, t) => {
1655
+ var j;
1656
+ (function(n) {
1657
+ n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
1658
+ })(j || (j = {}));
1659
+ const wt = (n, e, t) => {
1573
1660
  t.fitBounds(e.bounds);
1574
1661
  };
1575
- class yt extends ce {
1576
- constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new ht(s), renderer: n = new mt(), onClusterClick: a = vt }) {
1577
- super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = n, this.onClusterClick = a, e && this.setMap(e);
1662
+ class _t extends ue {
1663
+ constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new ft(s), renderer: o = new vt(), onClusterClick: a = wt }) {
1664
+ super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
1578
1665
  }
1579
1666
  addMarker(e, t) {
1580
1667
  this.markers.includes(e) || (this.markers.push(e), t || this.render());
@@ -1603,7 +1690,7 @@ class yt extends ce {
1603
1690
  render() {
1604
1691
  const e = this.getMap();
1605
1692
  if (e instanceof google.maps.Map && e.getProjection()) {
1606
- google.maps.event.trigger(this, I.CLUSTERING_BEGIN, this);
1693
+ google.maps.event.trigger(this, j.CLUSTERING_BEGIN, this);
1607
1694
  const { clusters: t, changed: s } = this.algorithm.calculate({
1608
1695
  markers: this.markers,
1609
1696
  map: e,
@@ -1613,12 +1700,12 @@ class yt extends ce {
1613
1700
  const r = /* @__PURE__ */ new Set();
1614
1701
  for (const a of t)
1615
1702
  a.markers.length == 1 && r.add(a.markers[0]);
1616
- const n = [];
1703
+ const o = [];
1617
1704
  for (const a of this.clusters)
1618
- a.marker != null && (a.markers.length == 1 ? r.has(a.marker) || k.setMap(a.marker, null) : n.push(a.marker));
1619
- this.clusters = t, this.renderClusters(), requestAnimationFrame(() => n.forEach((a) => k.setMap(a, null)));
1705
+ a.marker != null && (a.markers.length == 1 ? r.has(a.marker) || k.setMap(a.marker, null) : o.push(a.marker));
1706
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((a) => k.setMap(a, null)));
1620
1707
  }
1621
- google.maps.event.trigger(this, I.CLUSTERING_END, this);
1708
+ google.maps.event.trigger(this, j.CLUSTERING_END, this);
1622
1709
  }
1623
1710
  }
1624
1711
  onAdd() {
@@ -1631,19 +1718,19 @@ class yt extends ce {
1631
1718
  this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1632
1719
  }
1633
1720
  renderClusters() {
1634
- const e = new ft(this.markers, this.clusters), t = this.getMap();
1721
+ const e = new gt(this.markers, this.clusters), t = this.getMap();
1635
1722
  this.clusters.forEach((s) => {
1636
1723
  s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => k.setMap(r, null)), this.onClusterClick && s.marker.addListener(
1637
1724
  "click",
1638
1725
  /* istanbul ignore next */
1639
1726
  (r) => {
1640
- google.maps.event.trigger(this, I.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1727
+ google.maps.event.trigger(this, j.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1641
1728
  }
1642
1729
  )), k.setMap(s.marker, t);
1643
1730
  });
1644
1731
  }
1645
1732
  }
1646
- const Ce = Object.values(I), It = M({
1733
+ const be = Object.values(j), Rt = b({
1647
1734
  name: "MarkerCluster",
1648
1735
  props: {
1649
1736
  options: {
@@ -1651,37 +1738,37 @@ const Ce = Object.values(I), It = M({
1651
1738
  default: () => ({})
1652
1739
  }
1653
1740
  },
1654
- emits: Ce,
1655
- setup(o, { emit: e, expose: t, slots: s }) {
1656
- const r = v(), n = _(q, v()), a = _(R, v());
1657
- return z(Ee, r), O(
1658
- n,
1741
+ emits: be,
1742
+ setup(n, { emit: e, expose: t, slots: s }) {
1743
+ const r = y(), o = C(Z, y()), a = C(D, y());
1744
+ return G(Le, r), O(
1745
+ o,
1659
1746
  () => {
1660
- n.value && (r.value = E(
1661
- new yt({
1662
- map: n.value,
1747
+ o.value && (r.value = S(
1748
+ new _t({
1749
+ map: o.value,
1663
1750
  // Better perf than the default `SuperClusterAlgorithm`. See:
1664
1751
  // https://github.com/googlemaps/js-markerclusterer/pull/640
1665
- algorithm: new pt(o.options.algorithmOptions ?? {}),
1666
- ...o.options
1752
+ algorithm: new mt(n.options.algorithmOptions ?? {}),
1753
+ ...n.options
1667
1754
  })
1668
- ), Ce.forEach((c) => {
1755
+ ), be.forEach((l) => {
1669
1756
  var i;
1670
- (i = r.value) == null || i.addListener(c, (d) => e(c, d));
1757
+ (i = r.value) == null || i.addListener(l, (h) => e(l, h));
1671
1758
  }));
1672
1759
  },
1673
1760
  {
1674
1761
  immediate: !0
1675
1762
  }
1676
- ), j(() => {
1677
- var c;
1678
- r.value && ((c = a.value) == null || c.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1763
+ ), B(() => {
1764
+ var l;
1765
+ r.value && ((l = a.value) == null || l.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1679
1766
  }), t({ markerCluster: r }), () => {
1680
- var c;
1681
- return (c = s.default) == null ? void 0 : c.call(s);
1767
+ var l;
1768
+ return (l = s.default) == null ? void 0 : l.call(s);
1682
1769
  };
1683
1770
  }
1684
- }), wt = M({
1771
+ }), kt = b({
1685
1772
  inheritAttrs: !1,
1686
1773
  props: {
1687
1774
  options: {
@@ -1689,34 +1776,34 @@ const Ce = Object.values(I), It = M({
1689
1776
  required: !0
1690
1777
  }
1691
1778
  },
1692
- setup(o, { slots: e, emit: t, expose: s }) {
1693
- const r = v(), n = K(() => {
1779
+ setup(n, { slots: e, emit: t, expose: s }) {
1780
+ const r = y(), o = J(() => {
1694
1781
  var i;
1695
- return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== be);
1696
- }), a = K(() => ({
1697
- ...o.options,
1782
+ return (i = e.default) == null ? void 0 : i.call(e).some((h) => h.type !== Ee);
1783
+ }), a = J(() => ({
1784
+ ...n.options,
1698
1785
  element: r.value
1699
- })), c = Z(Q, [], a, t);
1786
+ })), l = U(ee, [], a, t);
1700
1787
  return s({
1701
- customMarker: c
1702
- }), { customMarkerRef: r, customMarker: c, hasSlotContent: n };
1788
+ customMarker: l
1789
+ }), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
1703
1790
  }
1704
1791
  });
1705
- const kt = {
1792
+ const Ct = {
1706
1793
  key: 0,
1707
1794
  class: "custom-marker-wrapper"
1708
1795
  };
1709
- function _t(o, e, t, s, r, n) {
1710
- return o.hasSlotContent ? (J(), Y("div", kt, [
1711
- ie("div", Oe({
1796
+ function bt(n, e, t, s, r, o) {
1797
+ return n.hasSlotContent ? (Y(), X("div", Ct, [
1798
+ ae("div", Pe({
1712
1799
  ref: "customMarkerRef",
1713
- style: { cursor: o.$attrs.onClick ? "pointer" : void 0 }
1714
- }, o.$attrs), [
1715
- X(o.$slots, "default", {}, void 0, !0)
1800
+ style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
1801
+ }, n.$attrs), [
1802
+ Q(n.$slots, "default", {}, void 0, !0)
1716
1803
  ], 16)
1717
- ])) : Pe("", !0);
1804
+ ])) : Oe("", !0);
1718
1805
  }
1719
- const $t = /* @__PURE__ */ ee(wt, [["render", _t], ["__scopeId", "data-v-c7599d50"]]), jt = M({
1806
+ const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343a"]]), qt = b({
1720
1807
  name: "HeatmapLayer",
1721
1808
  props: {
1722
1809
  options: {
@@ -1724,20 +1811,20 @@ const $t = /* @__PURE__ */ ee(wt, [["render", _t], ["__scopeId", "data-v-c7599d5
1724
1811
  default: () => ({})
1725
1812
  }
1726
1813
  },
1727
- setup(o) {
1728
- const e = v(), t = _(q, v()), s = _(R, v());
1814
+ setup(n) {
1815
+ const e = y(), t = C(Z, y()), s = C(D, y());
1729
1816
  return O(
1730
- [t, () => o.options],
1731
- ([r, n], [a, c]) => {
1732
- var d;
1733
- const i = !A(n, c) || t.value !== a;
1817
+ [t, () => n.options],
1818
+ ([r, o], [a, l]) => {
1819
+ var h;
1820
+ const i = !T(o, l) || t.value !== a;
1734
1821
  if (t.value && s.value && i) {
1735
- const u = structuredClone(n);
1822
+ const u = structuredClone(o);
1736
1823
  if (u.data && !(u.data instanceof s.value.MVCArray)) {
1737
- const l = s.value.LatLng;
1738
- u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof l || "location" in h && (h.location instanceof l || h.location === null) ? h : "location" in h ? { ...h, location: new l(h.location) } : new l(h));
1824
+ const c = s.value.LatLng;
1825
+ u.data = (h = u.data) == null ? void 0 : h.map((d) => d instanceof c || "location" in d && (d.location instanceof c || d.location === null) ? d : "location" in d ? { ...d, location: new c(d.location) } : new c(d));
1739
1826
  }
1740
- e.value ? e.value.setOptions(u) : e.value = E(
1827
+ e.value ? e.value.setOptions(u) : e.value = S(
1741
1828
  new s.value.visualization.HeatmapLayer({
1742
1829
  ...u,
1743
1830
  map: t.value
@@ -1746,22 +1833,22 @@ const $t = /* @__PURE__ */ ee(wt, [["render", _t], ["__scopeId", "data-v-c7599d5
1746
1833
  }
1747
1834
  },
1748
1835
  { immediate: !0 }
1749
- ), j(() => {
1836
+ ), B(() => {
1750
1837
  e.value && e.value.setMap(null);
1751
1838
  }), { heatmapLayer: e };
1752
1839
  },
1753
1840
  render: () => null
1754
1841
  });
1755
1842
  export {
1756
- St as Circle,
1757
- At as CustomControl,
1758
- $t as CustomMarker,
1843
+ At as Circle,
1844
+ Tt as CustomControl,
1845
+ jt as CustomMarker,
1759
1846
  Ot as GoogleMap,
1760
- jt as HeatmapLayer,
1761
- Tt as InfoWindow,
1762
- Pt as Marker,
1763
- It as MarkerCluster,
1764
- Et as Polygon,
1765
- xt as Polyline,
1766
- Lt as Rectangle
1847
+ qt as HeatmapLayer,
1848
+ $t as InfoWindow,
1849
+ xt as Marker,
1850
+ Rt as MarkerCluster,
1851
+ St as Polygon,
1852
+ Lt as Polyline,
1853
+ It as Rectangle
1767
1854
  };