vue3-google-map 0.17.1 → 0.19.0

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 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)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-f29e129b]{width:100%;height:100%}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var qe = Object.defineProperty;
3
3
  var Be = (n, e, t) => e in n ? qe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
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 = [
5
+ import { defineComponent as P, ref as y, provide as G, watch as O, onMounted as Me, onBeforeUnmount as B, markRaw as I, toRef as Z, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ze, guardReactiveProps as Ne, inject as C, computed as J, Comment as Ee, mergeProps as Pe, createCommentVNode as Oe } from "vue";
6
+ const N = Symbol("map"), U = Symbol("api"), xe = Symbol("marker"), Le = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Se = Symbol("mapTilesLoaded"), q = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -30,7 +30,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
30
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
31
  PERFORMANCE OF THIS SOFTWARE.
32
32
  ***************************************************************************** */
33
- function Fe(n, e, t, s) {
33
+ function Ue(n, e, t, s) {
34
34
  function r(o) {
35
35
  return o instanceof t ? o : new t(function(a) {
36
36
  a(o);
@@ -39,25 +39,25 @@ function Fe(n, e, t, s) {
39
39
  return new (t || (t = Promise))(function(o, a) {
40
40
  function l(u) {
41
41
  try {
42
- h(s.next(u));
42
+ d(s.next(u));
43
43
  } catch (c) {
44
44
  a(c);
45
45
  }
46
46
  }
47
47
  function i(u) {
48
48
  try {
49
- h(s.throw(u));
49
+ d(s.throw(u));
50
50
  } catch (c) {
51
51
  a(c);
52
52
  }
53
53
  }
54
- function h(u) {
54
+ function d(u) {
55
55
  u.done ? o(u.value) : r(u.value).then(l, i);
56
56
  }
57
- h((s = s.apply(n, e || [])).next());
57
+ d((s = s.apply(n, e || [])).next());
58
58
  });
59
59
  }
60
- var ze = function n(e, t) {
60
+ var De = function n(e, t) {
61
61
  if (e === t)
62
62
  return !0;
63
63
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -92,12 +92,12 @@ var ze = function n(e, t) {
92
92
  }
93
93
  return e !== e && t !== t;
94
94
  };
95
- const he = "__googleMapsScriptId";
95
+ const de = "__googleMapsScriptId";
96
96
  var R;
97
97
  (function(n) {
98
98
  n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
99
99
  })(R || (R = {}));
100
- class A {
100
+ class T {
101
101
  /**
102
102
  * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
103
103
  * using this library, instead the defaults are set by the Google Maps
@@ -107,13 +107,13 @@ class A {
107
107
  * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
108
108
  * ```
109
109
  */
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;
110
+ constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = de, language: a, libraries: l = [], mapIds: i, nonce: d, region: u, retries: c = 3, url: h = "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 || de, this.language = a, this.libraries = l, this.mapIds = i, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, T.instance) {
112
+ if (!De(this.options, T.instance.options))
113
+ throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(T.instance.options)}`);
114
+ return T.instance;
115
115
  }
116
- A.instance = this;
116
+ T.instance = this;
117
117
  }
118
118
  get options() {
119
119
  return {
@@ -205,19 +205,19 @@ class A {
205
205
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
206
206
  (o) => !s[o] && delete s[o]
207
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 = () => (
208
+ let a, l, i, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, m = window;
209
+ m = m[u] || (m[u] = {});
210
+ const f = m.maps || (m.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
211
211
  // @ts-ignore
212
- a || (a = new Promise((_, M) => Fe(this, void 0, void 0, function* () {
213
- var P;
212
+ a || (a = new Promise((_, E) => Ue(this, void 0, void 0, function* () {
213
+ var b;
214
214
  yield l = p.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
215
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);
216
+ v.set(i.replace(/[A-Z]/g, (x) => "_" + x[0].toLowerCase()), o[i]);
217
+ v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () => a = E(Error(d + " could not load.")), l.nonce = this.nonce || ((b = p.querySelector("script[nonce]")) === null || b === void 0 ? void 0 : b.nonce) || "", p.head.append(l);
218
218
  })))
219
219
  );
220
- m[c] ? console.warn(h + " only loads once. Ignoring:", o) : m[c] = (_, ...M) => g.add(_) && w().then(() => m[c](_, ...M));
220
+ f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...E) => g.add(_) && w().then(() => f[c](_, ...E));
221
221
  })(s);
222
222
  const r = this.libraries.map((o) => this.importLibrary(o));
223
223
  r.length || r.push(this.importLibrary("core")), Promise.all(r).then(() => this.callback(), (o) => {
@@ -260,7 +260,7 @@ class A {
260
260
  }
261
261
  }
262
262
  }
263
- function Ve(n) {
263
+ function Fe(n) {
264
264
  return class extends n.OverlayView {
265
265
  constructor(s) {
266
266
  super();
@@ -332,28 +332,31 @@ function Ve(n) {
332
332
  }
333
333
  };
334
334
  }
335
- let de;
335
+ let he;
336
336
  const pe = [
337
337
  "bounds_changed",
338
338
  "center_changed",
339
339
  "click",
340
+ "contextmenu",
340
341
  "dblclick",
341
342
  "drag",
342
343
  "dragend",
343
344
  "dragstart",
344
345
  "heading_changed",
345
346
  "idle",
347
+ "isfractionalzoomenabled_changed",
348
+ "mapcapabilities_changed",
346
349
  "maptypeid_changed",
347
350
  "mousemove",
348
351
  "mouseout",
349
352
  "mouseover",
350
353
  "projection_changed",
351
- "resize",
354
+ "renderingtype_changed",
352
355
  "rightclick",
353
356
  "tilesloaded",
354
357
  "tilt_changed",
355
358
  "zoom_changed"
356
- ], Ge = b({
359
+ ], Ve = P({
357
360
  props: {
358
361
  apiPromise: {
359
362
  type: Promise
@@ -435,6 +438,11 @@ const pe = [
435
438
  type: Number,
436
439
  required: !1
437
440
  },
441
+ isFractionalZoomEnabled: {
442
+ type: Boolean,
443
+ required: !1,
444
+ default: void 0
445
+ },
438
446
  keyboardShortcuts: {
439
447
  type: Boolean,
440
448
  required: !1,
@@ -544,16 +552,16 @@ const pe = [
544
552
  emits: pe,
545
553
  setup(n, { emit: e }) {
546
554
  const t = y(), s = y(!1), r = y(), o = y(), a = y(!1);
547
- G(Z, r), G(D, o), G(Se, a);
555
+ G(N, r), G(U, o), G(Se, a);
548
556
  const l = () => {
549
557
  const c = { ...n };
550
- Object.keys(c).forEach((m) => {
551
- c[m] === void 0 && delete c[m];
558
+ Object.keys(c).forEach((f) => {
559
+ c[f] === void 0 && delete c[f];
552
560
  });
553
- const p = (m) => {
561
+ const p = (f) => {
554
562
  var g;
555
- return m ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[m] } : {};
556
- }, f = {
563
+ return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
564
+ }, m = {
557
565
  scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
558
566
  panControlOptions: p(n.panControlPosition),
559
567
  zoomControlOptions: p(n.zoomControlPosition),
@@ -562,46 +570,46 @@ const pe = [
562
570
  fullscreenControlOptions: p(n.fullscreenControlPosition),
563
571
  disableDefaultUI: n.disableDefaultUi
564
572
  };
565
- return { ...c, ...f };
573
+ return { ...c, ...m };
566
574
  }, i = O(
567
575
  [o, r],
568
- ([c, d]) => {
569
- const p = c, f = d;
570
- p && f && (p.event.addListenerOnce(f, "tilesloaded", () => {
576
+ ([c, h]) => {
577
+ const p = c, m = h;
578
+ p && m && (p.event.addListenerOnce(m, "tilesloaded", () => {
571
579
  a.value = !0;
572
580
  }), setTimeout(i, 0));
573
581
  },
574
582
  { immediate: !0 }
575
- ), h = () => {
583
+ ), d = () => {
576
584
  try {
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 });
585
+ const { apiKey: c, region: h, version: p, language: m, libraries: f } = n;
586
+ he = new T({ apiKey: c, region: h, version: p, language: m, libraries: f });
579
587
  } catch (c) {
580
588
  console.error(c);
581
589
  }
582
590
  }, 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) => {
586
- var m;
587
- (m = r.value) == null || m.addListener(f, (g) => e(f, g));
591
+ o.value = I(c.maps), r.value = I(new c.maps.Map(t.value, l()));
592
+ const h = Fe(o.value);
593
+ o.value[ee] = h, pe.forEach((m) => {
594
+ var f;
595
+ (f = r.value) == null || f.addListener(m, (g) => e(m, g));
588
596
  }), s.value = !0;
589
597
  const p = Object.keys(n).filter(
590
- (f) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(f)
591
- ).map((f) => N(n, f));
598
+ (m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(m)
599
+ ).map((m) => Z(n, m));
592
600
  O(
593
601
  [() => 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));
602
+ ([m, f], [g, v]) => {
603
+ var x, M, F;
604
+ const { center: w, zoom: _, ...E } = l();
605
+ (x = r.value) == null || x.setOptions(E), f !== void 0 && f !== v && ((M = r.value) == null || M.setZoom(f));
606
+ const b = !g || m.lng !== g.lng || m.lat !== g.lat;
607
+ m && b && ((F = r.value) == null || F.panTo(m));
600
608
  }
601
609
  );
602
610
  };
603
611
  return Me(() => {
604
- n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (h(), de.load().then(u));
612
+ n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), he.load().then(u));
605
613
  }), B(() => {
606
614
  var c;
607
615
  a.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
@@ -613,21 +621,21 @@ const te = (n, e) => {
613
621
  for (const [s, r] of e)
614
622
  t[s] = r;
615
623
  return t;
616
- }, He = {
624
+ }, ze = {
617
625
  ref: "mapRef",
618
626
  class: "mapdiv"
619
627
  };
620
- function We(n, e, t, s, r, o) {
628
+ function Ge(n, e, t, s, r, o) {
621
629
  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)
630
+ ae("div", ze, null, 512),
631
+ Q(n.$slots, "default", Ze(Ne({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
624
632
  ]);
625
633
  }
626
- const Ot = /* @__PURE__ */ te(Ge, [["render", We], ["__scopeId", "data-v-174b771e"]]);
627
- function Ke(n) {
634
+ const Et = /* @__PURE__ */ te(Ve, [["render", Ge], ["__scopeId", "data-v-f29e129b"]]);
635
+ function He(n) {
628
636
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
629
637
  }
630
- var Je = function n(e, t) {
638
+ var We = function n(e, t) {
631
639
  if (e === t)
632
640
  return !0;
633
641
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -662,25 +670,25 @@ var Je = function n(e, t) {
662
670
  }
663
671
  return e !== e && t !== t;
664
672
  };
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(
673
+ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n === ee, D = (n, e, t, s) => {
674
+ const r = y(), o = C(N, y()), a = C(U, y()), l = C(Le, y()), i = J(
667
675
  () => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[ee]))
668
676
  );
669
677
  return O(
670
678
  [o, t],
671
- (h, [u, c]) => {
672
- var p, f, m;
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(
679
+ (d, [u, c]) => {
680
+ var p, m, f;
681
+ const h = !$(t.value, c) || o.value !== u;
682
+ !o.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (m = l.value) == null || m.addMarker(r.value))) : (Ke(n) ? r.value = I(
675
683
  new a.value[n](t.value)
676
- ) : Xe(n) ? r.value = S(
684
+ ) : Je(n) ? r.value = I(
677
685
  new a.value[n](t.value)
678
- ) : r.value = S(
686
+ ) : r.value = I(
679
687
  new a.value[n]({
680
688
  ...t.value,
681
689
  map: o.value
682
690
  })
683
- ), i.value ? (m = l.value) == null || m.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
691
+ ), i.value ? (f = l.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
684
692
  var v;
685
693
  (v = r.value) == null || v.addListener(g, (w) => s(g, w));
686
694
  })));
@@ -689,8 +697,8 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
689
697
  immediate: !0
690
698
  }
691
699
  ), 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));
700
+ var d, u;
701
+ r.value && ((d = a.value) == null || d.event.clearInstanceListeners(r.value), i.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
694
702
  }), r;
695
703
  }, fe = [
696
704
  "animation_changed",
@@ -716,7 +724,7 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
716
724
  "shape_changed",
717
725
  "title_changed",
718
726
  "visible_changed"
719
- ], xt = b({
727
+ ], Pt = P({
720
728
  name: "Marker",
721
729
  props: {
722
730
  options: {
@@ -726,13 +734,13 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
726
734
  },
727
735
  emits: fe,
728
736
  setup(n, { emit: e, expose: t, slots: s }) {
729
- const r = N(n, "options"), o = U("Marker", fe, r, e);
737
+ const r = Z(n, "options"), o = D("Marker", fe, r, e);
730
738
  return G(xe, o), t({ marker: o }), () => {
731
739
  var a;
732
740
  return (a = s.default) == null ? void 0 : a.call(s);
733
741
  };
734
742
  }
735
- }), Lt = b({
743
+ }), Ot = P({
736
744
  name: "Polyline",
737
745
  props: {
738
746
  options: {
@@ -742,11 +750,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
742
750
  },
743
751
  emits: q,
744
752
  setup(n, { emit: e }) {
745
- const t = N(n, "options");
746
- return { polyline: U("Polyline", q, t, e) };
753
+ const t = Z(n, "options");
754
+ return { polyline: D("Polyline", q, t, e) };
747
755
  },
748
756
  render: () => null
749
- }), St = b({
757
+ }), xt = P({
750
758
  name: "Polygon",
751
759
  props: {
752
760
  options: {
@@ -756,11 +764,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
756
764
  },
757
765
  emits: q,
758
766
  setup(n, { emit: e }) {
759
- const t = N(n, "options");
760
- return { polygon: U("Polygon", q, t, e) };
767
+ const t = Z(n, "options");
768
+ return { polygon: D("Polygon", q, t, e) };
761
769
  },
762
770
  render: () => null
763
- }), me = q.concat(["bounds_changed"]), It = b({
771
+ }), me = q.concat(["bounds_changed"]), Lt = P({
764
772
  name: "Rectangle",
765
773
  props: {
766
774
  options: {
@@ -770,11 +778,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
770
778
  },
771
779
  emits: me,
772
780
  setup(n, { emit: e }) {
773
- const t = N(n, "options");
774
- return { rectangle: U("Rectangle", me, t, e) };
781
+ const t = Z(n, "options");
782
+ return { rectangle: D("Rectangle", me, t, e) };
775
783
  },
776
784
  render: () => null
777
- }), ge = q.concat(["center_changed", "radius_changed"]), At = b({
785
+ }), ge = q.concat(["center_changed", "radius_changed"]), St = P({
778
786
  name: "Circle",
779
787
  props: {
780
788
  options: {
@@ -784,11 +792,11 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
784
792
  },
785
793
  emits: ge,
786
794
  setup(n, { emit: e }) {
787
- const t = N(n, "options");
788
- return { circle: U("Circle", ge, t, e) };
795
+ const t = Z(n, "options");
796
+ return { circle: D("Circle", ge, t, e) };
789
797
  },
790
798
  render: () => null
791
- }), Qe = b({
799
+ }), Ye = P({
792
800
  props: {
793
801
  position: {
794
802
  type: String,
@@ -801,110 +809,121 @@ const T = /* @__PURE__ */ Ke(Je), Ye = (n) => n === "Marker", Xe = (n) => n ===
801
809
  },
802
810
  emits: ["content:loaded"],
803
811
  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(
812
+ const t = y(null), s = C(N, y()), r = C(U, y()), o = C(Se, y(!1)), a = O(
805
813
  [o, r, t],
806
- ([u, c, d]) => {
807
- c && u && d && (i(n.position), a.value = !0, e("content:loaded"), setTimeout(l, 0));
814
+ ([d, u, c]) => {
815
+ u && d && c && (l(n.position), e("content:loaded"), setTimeout(a, 0));
808
816
  },
809
817
  { immediate: !0 }
810
- ), i = (u) => {
818
+ ), l = (d) => {
811
819
  if (s.value && r.value && t.value) {
812
- const c = r.value.ControlPosition[u];
813
- s.value.controls[c].push(t.value);
820
+ const u = r.value.ControlPosition[d];
821
+ s.value.controls[u].push(t.value);
814
822
  }
815
- }, h = (u) => {
823
+ }, i = (d) => {
816
824
  if (s.value && r.value) {
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);
825
+ let u = null;
826
+ const c = r.value.ControlPosition[d];
827
+ s.value.controls[c].forEach((h, p) => {
828
+ h === t.value && (u = p);
829
+ }), u !== null && s.value.controls[c].removeAt(u);
822
830
  }
823
831
  };
824
- return B(() => h(n.position)), O(
832
+ return B(() => i(n.position)), O(
825
833
  () => n.position,
826
- (u, c) => {
827
- h(c), i(u);
834
+ (d, u) => {
835
+ i(u), l(d);
828
836
  }
829
837
  ), O(
830
838
  () => n.index,
831
- (u) => {
832
- u && t.value && (t.value.index = n.index);
839
+ (d) => {
840
+ d && t.value && (t.value.index = n.index);
833
841
  }
834
- ), { controlRef: t, showContent: a };
835
- }
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")
840
- ], 512)), [
841
- [Ue, n.showContent]
842
- ]);
842
+ ), { controlRef: t };
843
+ }
844
+ });
845
+ const Xe = {
846
+ ref: "controlRef",
847
+ class: "custom-control-wrapper"
848
+ };
849
+ function Qe(n, e, t, s, r, o) {
850
+ return Y(), X("div", Xe, [
851
+ Q(n.$slots, "default", {}, void 0, !0)
852
+ ], 512);
843
853
  }
844
- const Tt = /* @__PURE__ */ te(Qe, [["render", tt]]), ve = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], st = b({
854
+ const It = /* @__PURE__ */ te(Ye, [["render", Qe], ["__scopeId", "data-v-d099a3a6"]]), ve = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], et = P({
845
855
  inheritAttrs: !1,
846
856
  props: {
847
857
  options: {
848
858
  type: Object,
849
859
  default: () => ({})
860
+ },
861
+ modelValue: {
862
+ type: Boolean
850
863
  }
851
864
  },
852
- emits: ve,
865
+ emits: [...ve, "update:modelValue"],
853
866
  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(() => {
857
- var p;
858
- return (p = e.default) == null ? void 0 : p.call(e).some((f) => f.type !== Ee);
859
- }), c = (p) => {
867
+ const r = y(), o = y(), a = C(N, y()), l = C(U, y()), i = C(xe, y());
868
+ let d, u = n.modelValue;
869
+ const c = J(() => {
860
870
  var f;
861
- return (f = r.value) == null ? void 0 : f.open({ map: a.value, anchor: i.value, ...p });
862
- }, d = () => {
863
- var p;
864
- return (p = r.value) == null ? void 0 : p.close();
871
+ return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== Ee);
872
+ }), h = (f) => {
873
+ u = f, t("update:modelValue", f);
874
+ }, p = (f) => {
875
+ r.value && (r.value.open({ map: a.value, anchor: i.value, ...f }), h(!0));
876
+ }, m = () => {
877
+ r.value && (r.value.close(), h(!1));
865
878
  };
866
879
  return Me(() => {
867
880
  O(
868
881
  [a, () => n.options],
869
- ([p, f], [m, g]) => {
870
- const v = !T(f, g) || a.value !== m;
871
- a.value && l.value && v && (r.value ? (r.value.setOptions({
872
- ...f,
873
- content: u.value ? o.value : f.content
874
- }), i.value || c()) : (r.value = S(
882
+ ([f, g], [v, w]) => {
883
+ var E;
884
+ const _ = !$(g, w) || a.value !== v;
885
+ a.value && l.value && _ && (r.value ? (r.value.setOptions({
886
+ ...g,
887
+ content: c.value ? o.value : g.content
888
+ }), i.value || p()) : (r.value = I(
875
889
  new l.value.InfoWindow({
876
- ...f,
877
- content: u.value ? o.value : f.content
890
+ ...g,
891
+ content: c.value ? o.value : g.content
878
892
  })
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));
884
- })));
893
+ ), i.value && (d = i.value.addListener("click", () => {
894
+ p();
895
+ })), (!i.value || u) && p(), ve.forEach((b) => {
896
+ var x;
897
+ (x = r.value) == null || x.addListener(b, (M) => t(b, M));
898
+ }), (E = r.value) == null || E.addListener("closeclick", () => h(!1))));
885
899
  },
886
900
  {
887
901
  immediate: !0
888
902
  }
903
+ ), O(
904
+ () => n.modelValue,
905
+ (f) => {
906
+ f !== u && (f ? p() : m());
907
+ }
889
908
  );
890
909
  }), B(() => {
891
- var p;
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 };
910
+ var f;
911
+ d && d.remove(), r.value && ((f = l.value) == null || f.event.clearInstanceListeners(r.value), m());
912
+ }), s({ infoWindow: r, open: p, close: m }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: m };
894
913
  }
895
914
  });
896
- const rt = {
915
+ const tt = {
897
916
  key: 0,
898
917
  class: "info-window-wrapper"
899
918
  };
900
- function nt(n, e, t, s, r, o) {
901
- return n.hasSlotContent ? (Y(), X("div", rt, [
919
+ function st(n, e, t, s, r, o) {
920
+ return n.hasSlotContent ? (Y(), X("div", tt, [
902
921
  ae("div", Pe({ ref: "infoWindowRef" }, n.$attrs), [
903
922
  Q(n.$slots, "default", {}, void 0, !0)
904
923
  ], 16)
905
924
  ])) : Oe("", !0);
906
925
  }
907
- const $t = /* @__PURE__ */ te(st, [["render", nt], ["__scopeId", "data-v-45a4606d"]]), ye = [
926
+ const At = /* @__PURE__ */ te(et, [["render", st], ["__scopeId", "data-v-cbe1707b"]]), ye = [
908
927
  Int8Array,
909
928
  Uint8Array,
910
929
  Uint8ClampedArray,
@@ -914,7 +933,7 @@ const $t = /* @__PURE__ */ te(st, [["render", nt], ["__scopeId", "data-v-45a4606
914
933
  Uint32Array,
915
934
  Float32Array,
916
935
  Float64Array
917
- ], re = 1, z = 8;
936
+ ], re = 1, V = 8;
918
937
  class le {
919
938
  /**
920
939
  * Creates an index from raw `ArrayBuffer` data.
@@ -949,7 +968,7 @@ class le {
949
968
  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
969
  if (o < 0)
951
970
  throw new Error(`Unexpected typed array class: ${s}.`);
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);
971
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(V + a + l + i), this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + 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);
953
972
  }
954
973
  /**
955
974
  * Add a point to the index.
@@ -981,20 +1000,20 @@ class le {
981
1000
  range(e, t, s, r) {
982
1001
  if (!this._finished)
983
1002
  throw new Error("Data not yet indexed - call index.finish().");
984
- const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], h = [];
1003
+ const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], d = [];
985
1004
  for (; i.length; ) {
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++) {
1005
+ const u = i.pop() || 0, c = i.pop() || 0, h = i.pop() || 0;
1006
+ if (c - h <= l) {
1007
+ for (let g = h; g <= c; g++) {
989
1008
  const v = a[2 * g], w = a[2 * g + 1];
990
- v >= e && v <= s && w >= t && w <= r && h.push(o[g]);
1009
+ v >= e && v <= s && w >= t && w <= r && d.push(o[g]);
991
1010
  }
992
1011
  continue;
993
1012
  }
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));
1013
+ const p = h + c >> 1, m = a[2 * p], f = a[2 * p + 1];
1014
+ m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (i.push(h), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= m : r >= f) && (i.push(p + 1), i.push(c), i.push(1 - u));
996
1015
  }
997
- return h;
1016
+ return d;
998
1017
  }
999
1018
  /**
1000
1019
  * Search the index for items within a given radius.
@@ -1006,16 +1025,16 @@ class le {
1006
1025
  within(e, t, s) {
1007
1026
  if (!this._finished)
1008
1027
  throw new Error("Data not yet indexed - call index.finish().");
1009
- const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], h = s * s;
1028
+ const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], d = s * s;
1010
1029
  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]);
1030
+ const u = l.pop() || 0, c = l.pop() || 0, h = l.pop() || 0;
1031
+ if (c - h <= a) {
1032
+ for (let g = h; g <= c; g++)
1033
+ we(o[2 * g], o[2 * g + 1], e, t) <= d && i.push(r[g]);
1015
1034
  continue;
1016
1035
  }
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));
1036
+ const p = h + c >> 1, m = o[2 * p], f = o[2 * p + 1];
1037
+ we(m, f, e, t) <= d && i.push(r[p]), (u === 0 ? e - s <= m : t - s <= f) && (l.push(h), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= m : t + s >= f) && (l.push(p + 1), l.push(c), l.push(1 - u));
1019
1038
  }
1020
1039
  return i;
1021
1040
  }
@@ -1029,21 +1048,21 @@ function ie(n, e, t, s, r, o) {
1029
1048
  function Ie(n, e, t, s, r, o) {
1030
1049
  for (; r > s; ) {
1031
1050
  if (r - s > 600) {
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);
1051
+ const d = r - s + 1, u = t - s + 1, c = Math.log(d), h = 0.5 * Math.exp(2 * c / 3), p = 0.5 * Math.sqrt(c * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), m = Math.max(s, Math.floor(t - u * h / d + p)), f = Math.min(r, Math.floor(t + (d - u) * h / d + p));
1052
+ Ie(n, e, t, m, f, o);
1034
1053
  }
1035
1054
  const a = e[2 * t + o];
1036
1055
  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; )
1056
+ for (z(n, e, s, t), e[2 * r + o] > a && z(n, e, s, r); l < i; ) {
1057
+ for (z(n, e, l, i), l++, i--; e[2 * l + o] < a; )
1039
1058
  l++;
1040
1059
  for (; e[2 * i + o] > a; )
1041
1060
  i--;
1042
1061
  }
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);
1062
+ e[2 * s + o] === a ? z(n, e, s, i) : (i++, z(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
1044
1063
  }
1045
1064
  }
1046
- function V(n, e, t, s) {
1065
+ function z(n, e, t, s) {
1047
1066
  ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
1048
1067
  }
1049
1068
  function ne(n, e, t) {
@@ -1054,7 +1073,7 @@ function we(n, e, t, s) {
1054
1073
  const r = n - t, o = e - s;
1055
1074
  return r * r + o * o;
1056
1075
  }
1057
- const ot = {
1076
+ const rt = {
1058
1077
  minZoom: 0,
1059
1078
  // min zoom to generate clusters on
1060
1079
  maxZoom: 16,
@@ -1077,10 +1096,10 @@ const ot = {
1077
1096
  // properties to use for individual points when running the reducer
1078
1097
  map: (n) => n
1079
1098
  // props => ({sum: props.my_value})
1080
- }, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), I = 2, L = 3, oe = 4, x = 5, Ae = 6;
1099
+ }, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), A = 2, S = 3, oe = 4, L = 5, Ae = 6;
1081
1100
  class Te {
1082
1101
  constructor(e) {
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 = [];
1102
+ 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 = [];
1084
1103
  }
1085
1104
  load(e) {
1086
1105
  const { log: t, minZoom: s, maxZoom: r } = this.options;
@@ -1089,12 +1108,12 @@ class Te {
1089
1108
  t && console.time(o), this.points = e;
1090
1109
  const a = [];
1091
1110
  for (let i = 0; i < e.length; i++) {
1092
- const h = e[i];
1093
- if (!h.geometry)
1111
+ const d = e[i];
1112
+ if (!d.geometry)
1094
1113
  continue;
1095
- const [u, c] = h.geometry.coordinates, d = _e(W(u)), p = _e(K(c));
1114
+ const [u, c] = d.geometry.coordinates, h = _e(W(u)), p = _e(K(c));
1096
1115
  a.push(
1097
- d,
1116
+ h,
1098
1117
  p,
1099
1118
  // projected point coordinates
1100
1119
  1 / 0,
@@ -1110,8 +1129,8 @@ class Te {
1110
1129
  let l = this.trees[r + 1] = this._createTree(a);
1111
1130
  t && console.timeEnd(o);
1112
1131
  for (let i = r; i >= s; i--) {
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);
1132
+ const d = +Date.now();
1133
+ l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() - d);
1115
1134
  }
1116
1135
  return t && console.timeEnd("total time"), this;
1117
1136
  }
@@ -1123,13 +1142,13 @@ class Te {
1123
1142
  if (e[2] - e[0] >= 360)
1124
1143
  s = -180, o = 180;
1125
1144
  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);
1145
+ const c = this.getClusters([s, r, 180, a], t), h = this.getClusters([-180, r, o, a], t);
1146
+ return c.concat(h);
1128
1147
  }
1129
- const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)), h = l.data, u = [];
1148
+ const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)), d = l.data, u = [];
1130
1149
  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]]);
1150
+ const h = this.stride * c;
1151
+ u.push(d[h + L] > 1 ? ke(d, h, this.clusterProps) : this.points[d[h + S]]);
1133
1152
  }
1134
1153
  return u;
1135
1154
  }
@@ -1140,10 +1159,10 @@ class Te {
1140
1159
  const a = o.data;
1141
1160
  if (t * this.stride >= a.length)
1142
1161
  throw new Error(r);
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]]);
1162
+ const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], d = a[t * this.stride + 1], u = o.within(i, d, l), c = [];
1163
+ for (const h of u) {
1164
+ const p = h * this.stride;
1165
+ a[p + oe] === e && c.push(a[p + L] > 1 ? ke(a, p, this.clusterProps) : this.points[a[p + S]]);
1147
1166
  }
1148
1167
  if (c.length === 0)
1149
1168
  throw new Error(r);
@@ -1155,25 +1174,25 @@ class Te {
1155
1174
  return this._appendLeaves(r, e, t, s, 0), r;
1156
1175
  }
1157
1176
  getTile(e, t, s) {
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 = {
1177
+ const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a, d = (s - i) / o, u = (s + 1 + i) / o, c = {
1159
1178
  features: []
1160
1179
  };
1161
1180
  return this._addTileFeatures(
1162
- r.range((t - i) / o, h, (t + 1 + i) / o, u),
1181
+ r.range((t - i) / o, d, (t + 1 + i) / o, u),
1163
1182
  r.data,
1164
1183
  t,
1165
1184
  s,
1166
1185
  o,
1167
1186
  c
1168
1187
  ), t === 0 && this._addTileFeatures(
1169
- r.range(1 - i / o, h, 1, u),
1188
+ r.range(1 - i / o, d, 1, u),
1170
1189
  r.data,
1171
1190
  o,
1172
1191
  s,
1173
1192
  o,
1174
1193
  c
1175
1194
  ), t === o - 1 && this._addTileFeatures(
1176
- r.range(0, h, i / o, u),
1195
+ r.range(0, d, i / o, u),
1177
1196
  r.data,
1178
1197
  -1,
1179
1198
  s,
@@ -1208,70 +1227,70 @@ class Te {
1208
1227
  }
1209
1228
  _addTileFeatures(e, t, s, r, o, a) {
1210
1229
  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];
1230
+ const i = l * this.stride, d = t[i + L] > 1;
1231
+ let u, c, h;
1232
+ if (d)
1233
+ u = $e(t, i, this.clusterProps), c = t[i], h = t[i + 1];
1215
1234
  else {
1216
- const m = this.points[t[i + L]];
1217
- u = m.properties;
1218
- const [g, v] = m.geometry.coordinates;
1219
- c = W(g), d = K(v);
1235
+ const f = this.points[t[i + S]];
1236
+ u = f.properties;
1237
+ const [g, v] = f.geometry.coordinates;
1238
+ c = W(g), h = K(v);
1220
1239
  }
1221
1240
  const p = {
1222
1241
  type: 1,
1223
1242
  geometry: [[
1224
1243
  Math.round(this.options.extent * (c * o - s)),
1225
- Math.round(this.options.extent * (d * o - r))
1244
+ Math.round(this.options.extent * (h * o - r))
1226
1245
  ]],
1227
1246
  tags: u
1228
1247
  };
1229
- let f;
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);
1248
+ let m;
1249
+ d || this.options.generateId ? m = t[i + S] : m = this.points[t[i + S]].id, m !== void 0 && (p.id = m), a.features.push(p);
1231
1250
  }
1232
1251
  }
1233
1252
  _limitZoom(e) {
1234
1253
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1235
1254
  }
1236
1255
  _cluster(e, 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;
1256
+ const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data, d = [], u = this.stride;
1238
1257
  for (let c = 0; c < i.length; c += u) {
1239
- if (i[c + I] <= t)
1258
+ if (i[c + A] <= t)
1240
1259
  continue;
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];
1243
- let g = m;
1244
- for (const v of f) {
1260
+ i[c + A] = t;
1261
+ const h = i[c], p = i[c + 1], m = e.within(i[c], i[c + 1], l), f = i[c + L];
1262
+ let g = f;
1263
+ for (const v of m) {
1245
1264
  const w = v * u;
1246
- i[w + I] > t && (g += i[w + x]);
1265
+ i[w + A] > t && (g += i[w + L]);
1247
1266
  }
1248
- if (g > m && g >= a) {
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)
1267
+ if (g > f && g >= a) {
1268
+ let v = h * f, w = p * f, _, E = -1;
1269
+ const b = ((c / u | 0) << 5) + (t + 1) + this.points.length;
1270
+ for (const x of m) {
1271
+ const M = x * u;
1272
+ if (i[M + A] <= t)
1254
1273
  continue;
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)));
1274
+ i[M + A] = t;
1275
+ const F = i[M + L];
1276
+ v += i[M] * F, w += i[M + 1] * F, i[M + oe] = b, o && (_ || (_ = this._map(i, c, !0), E = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(i, M)));
1258
1277
  }
1259
- i[c + oe] = P, h.push(v / g, w / g, 1 / 0, P, -1, g), o && h.push(M);
1278
+ i[c + oe] = b, d.push(v / g, w / g, 1 / 0, b, -1, g), o && d.push(E);
1260
1279
  } else {
1261
1280
  for (let v = 0; v < u; v++)
1262
- h.push(i[c + v]);
1281
+ d.push(i[c + v]);
1263
1282
  if (g > 1)
1264
- for (const v of f) {
1283
+ for (const v of m) {
1265
1284
  const w = v * u;
1266
- if (!(i[w + I] <= t)) {
1267
- i[w + I] = t;
1285
+ if (!(i[w + A] <= t)) {
1286
+ i[w + A] = t;
1268
1287
  for (let _ = 0; _ < u; _++)
1269
- h.push(i[w + _]);
1288
+ d.push(i[w + _]);
1270
1289
  }
1271
1290
  }
1272
1291
  }
1273
1292
  }
1274
- return h;
1293
+ return d;
1275
1294
  }
1276
1295
  // get index of the point from which the cluster originated
1277
1296
  _getOriginId(e) {
@@ -1282,30 +1301,30 @@ class Te {
1282
1301
  return (e - this.points.length) % 32;
1283
1302
  }
1284
1303
  _map(e, t, s) {
1285
- if (e[t + x] > 1) {
1304
+ if (e[t + L] > 1) {
1286
1305
  const a = this.clusterProps[e[t + Ae]];
1287
1306
  return s ? Object.assign({}, a) : a;
1288
1307
  }
1289
- const r = this.points[e[t + L]].properties, o = this.options.map(r);
1308
+ const r = this.points[e[t + S]].properties, o = this.options.map(r);
1290
1309
  return s && o === r ? Object.assign({}, o) : o;
1291
1310
  }
1292
1311
  }
1293
1312
  function ke(n, e, t) {
1294
1313
  return {
1295
1314
  type: "Feature",
1296
- id: n[e + L],
1315
+ id: n[e + S],
1297
1316
  properties: $e(n, e, t),
1298
1317
  geometry: {
1299
1318
  type: "Point",
1300
- coordinates: [it(n[e]), at(n[e + 1])]
1319
+ coordinates: [nt(n[e]), ot(n[e + 1])]
1301
1320
  }
1302
1321
  };
1303
1322
  }
1304
1323
  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]);
1324
+ const s = n[e + L], 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]);
1306
1325
  return Object.assign(a, {
1307
1326
  cluster: !0,
1308
- cluster_id: n[e + L],
1327
+ cluster_id: n[e + S],
1309
1328
  point_count: s,
1310
1329
  point_count_abbreviated: r
1311
1330
  });
@@ -1317,10 +1336,10 @@ function K(n) {
1317
1336
  const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1318
1337
  return t < 0 ? 0 : t > 1 ? 1 : t;
1319
1338
  }
1320
- function it(n) {
1339
+ function nt(n) {
1321
1340
  return (n - 0.5) * 360;
1322
1341
  }
1323
- function at(n) {
1342
+ function ot(n) {
1324
1343
  const e = (180 - n * 360) * Math.PI / 180;
1325
1344
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1326
1345
  }
@@ -1407,19 +1426,19 @@ class H {
1407
1426
  this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1408
1427
  }
1409
1428
  }
1410
- const lt = (n, e, t, s) => {
1429
+ const it = (n, e, t, s) => {
1411
1430
  const r = Re(n.getBounds(), e, s);
1412
1431
  return t.filter((o) => r.contains(k.getPosition(o)));
1413
1432
  }, 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);
1433
+ const { northEast: s, southWest: r } = at(n, e), o = lt({ northEast: s, southWest: r }, t);
1434
+ return ct(o, e);
1416
1435
  }, Ce = (n, e, t) => {
1417
1436
  const s = Re(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1418
1437
  return [o.lng(), o.lat(), r.lng(), r.lat()];
1419
- }, ct = (n, e) => ({
1438
+ }, at = (n, e) => ({
1420
1439
  northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
1421
1440
  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) => {
1441
+ }), lt = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ct = ({ northEast: n, southWest: e }, t) => {
1423
1442
  const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
1424
1443
  return new google.maps.LatLngBounds(s, r);
1425
1444
  };
@@ -1440,10 +1459,10 @@ class je {
1440
1459
  * ```
1441
1460
  */
1442
1461
  noop({ markers: e }) {
1443
- return pt(e);
1462
+ return dt(e);
1444
1463
  }
1445
1464
  }
1446
- class dt extends je {
1465
+ class ut extends je {
1447
1466
  constructor(e) {
1448
1467
  var { viewportPadding: t = 60 } = e, s = ce(e, ["viewportPadding"]);
1449
1468
  super(s), this.viewportPadding = 60, this.viewportPadding = t;
@@ -1456,18 +1475,18 @@ class dt extends je {
1456
1475
  changed: !1
1457
1476
  } : {
1458
1477
  clusters: this.cluster({
1459
- markers: lt(t, s, e, this.viewportPadding),
1478
+ markers: it(t, s, e, this.viewportPadding),
1460
1479
  map: t,
1461
1480
  mapCanvasProjection: s
1462
1481
  })
1463
1482
  };
1464
1483
  }
1465
1484
  }
1466
- const pt = (n) => n.map((t) => new H({
1485
+ const dt = (n) => n.map((t) => new H({
1467
1486
  position: k.getPosition(t),
1468
1487
  markers: [t]
1469
1488
  }));
1470
- class ft extends je {
1489
+ class ht extends je {
1471
1490
  constructor(e) {
1472
1491
  var { maxZoom: t, radius: s = 60 } = e, r = ce(e, ["maxZoom", "radius"]);
1473
1492
  super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
@@ -1475,7 +1494,7 @@ class ft extends je {
1475
1494
  calculate(e) {
1476
1495
  let t = !1;
1477
1496
  const s = { zoom: e.map.getZoom() };
1478
- if (!T(e.markers, this.markers)) {
1497
+ if (!$(e.markers, this.markers)) {
1479
1498
  t = !0, this.markers = [...e.markers];
1480
1499
  const r = this.markers.map((o) => {
1481
1500
  const a = k.getPosition(o);
@@ -1490,7 +1509,7 @@ class ft extends je {
1490
1509
  });
1491
1510
  this.superCluster.load(r);
1492
1511
  }
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 };
1512
+ return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !$(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
1494
1513
  }
1495
1514
  cluster({ map: e }) {
1496
1515
  return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(e.getZoom())).map((t) => this.transformCluster(t));
@@ -1508,7 +1527,7 @@ class ft extends je {
1508
1527
  });
1509
1528
  }
1510
1529
  }
1511
- class mt extends dt {
1530
+ class pt extends ut {
1512
1531
  constructor(e) {
1513
1532
  var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ce(e, ["maxZoom", "radius", "viewportPadding"]);
1514
1533
  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] };
@@ -1518,8 +1537,8 @@ class mt extends dt {
1518
1537
  zoom: Math.round(e.map.getZoom()),
1519
1538
  view: Ce(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1520
1539
  };
1521
- let s = !T(this.state, t);
1522
- if (!T(e.markers, this.markers)) {
1540
+ let s = !$(this.state, t);
1541
+ if (!$(e.markers, this.markers)) {
1523
1542
  s = !0, this.markers = [...e.markers];
1524
1543
  const r = this.markers.map((o) => {
1525
1544
  const a = k.getPosition(o);
@@ -1556,7 +1575,7 @@ class mt extends dt {
1556
1575
  });
1557
1576
  }
1558
1577
  }
1559
- class gt {
1578
+ class ft {
1560
1579
  constructor(e, t) {
1561
1580
  this.markers = { sum: e.length };
1562
1581
  const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
@@ -1571,7 +1590,7 @@ class gt {
1571
1590
  };
1572
1591
  }
1573
1592
  }
1574
- class vt {
1593
+ class mt {
1575
1594
  /**
1576
1595
  * The default render function for the library used by {@link MarkerClusterer}.
1577
1596
  *
@@ -1622,16 +1641,16 @@ class vt {
1622
1641
  u.innerHTML = a;
1623
1642
  const c = u.firstElementChild;
1624
1643
  c.setAttribute("transform", "translate(0 25)");
1625
- const d = {
1644
+ const h = {
1626
1645
  map: r,
1627
1646
  position: t,
1628
1647
  zIndex: i,
1629
1648
  title: l,
1630
1649
  content: c
1631
1650
  };
1632
- return new google.maps.marker.AdvancedMarkerElement(d);
1651
+ return new google.maps.marker.AdvancedMarkerElement(h);
1633
1652
  }
1634
- const h = {
1653
+ const d = {
1635
1654
  position: t,
1636
1655
  zIndex: i,
1637
1656
  title: l,
@@ -1640,27 +1659,27 @@ class vt {
1640
1659
  anchor: new google.maps.Point(25, 25)
1641
1660
  }
1642
1661
  };
1643
- return new google.maps.Marker(h);
1662
+ return new google.maps.Marker(d);
1644
1663
  }
1645
1664
  }
1646
- function yt(n, e) {
1665
+ function gt(n, e) {
1647
1666
  for (let t in e.prototype)
1648
1667
  n.prototype[t] = e.prototype[t];
1649
1668
  }
1650
1669
  class ue {
1651
1670
  constructor() {
1652
- yt(ue, google.maps.OverlayView);
1671
+ gt(ue, google.maps.OverlayView);
1653
1672
  }
1654
1673
  }
1655
1674
  var j;
1656
1675
  (function(n) {
1657
1676
  n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
1658
1677
  })(j || (j = {}));
1659
- const wt = (n, e, t) => {
1678
+ const vt = (n, e, t) => {
1660
1679
  t.fitBounds(e.bounds);
1661
1680
  };
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 }) {
1681
+ class yt extends ue {
1682
+ constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new ht(s), renderer: o = new mt(), onClusterClick: a = vt }) {
1664
1683
  super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
1665
1684
  }
1666
1685
  addMarker(e, t) {
@@ -1718,7 +1737,7 @@ class _t extends ue {
1718
1737
  this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1719
1738
  }
1720
1739
  renderClusters() {
1721
- const e = new gt(this.markers, this.clusters), t = this.getMap();
1740
+ const e = new ft(this.markers, this.clusters), t = this.getMap();
1722
1741
  this.clusters.forEach((s) => {
1723
1742
  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(
1724
1743
  "click",
@@ -1730,7 +1749,7 @@ class _t extends ue {
1730
1749
  });
1731
1750
  }
1732
1751
  }
1733
- const be = Object.values(j), Rt = b({
1752
+ const be = Object.values(j), Tt = P({
1734
1753
  name: "MarkerCluster",
1735
1754
  props: {
1736
1755
  options: {
@@ -1740,21 +1759,21 @@ const be = Object.values(j), Rt = b({
1740
1759
  },
1741
1760
  emits: be,
1742
1761
  setup(n, { emit: e, expose: t, slots: s }) {
1743
- const r = y(), o = C(Z, y()), a = C(D, y());
1762
+ const r = y(), o = C(N, y()), a = C(U, y());
1744
1763
  return G(Le, r), O(
1745
1764
  o,
1746
1765
  () => {
1747
- o.value && (r.value = S(
1748
- new _t({
1766
+ o.value && (r.value = I(
1767
+ new yt({
1749
1768
  map: o.value,
1750
1769
  // Better perf than the default `SuperClusterAlgorithm`. See:
1751
1770
  // https://github.com/googlemaps/js-markerclusterer/pull/640
1752
- algorithm: new mt(n.options.algorithmOptions ?? {}),
1771
+ algorithm: new pt(n.options.algorithmOptions ?? {}),
1753
1772
  ...n.options
1754
1773
  })
1755
1774
  ), be.forEach((l) => {
1756
1775
  var i;
1757
- (i = r.value) == null || i.addListener(l, (h) => e(l, h));
1776
+ (i = r.value) == null || i.addListener(l, (d) => e(l, d));
1758
1777
  }));
1759
1778
  },
1760
1779
  {
@@ -1768,7 +1787,7 @@ const be = Object.values(j), Rt = b({
1768
1787
  return (l = s.default) == null ? void 0 : l.call(s);
1769
1788
  };
1770
1789
  }
1771
- }), kt = b({
1790
+ }), wt = P({
1772
1791
  inheritAttrs: !1,
1773
1792
  props: {
1774
1793
  options: {
@@ -1779,22 +1798,22 @@ const be = Object.values(j), Rt = b({
1779
1798
  setup(n, { slots: e, emit: t, expose: s }) {
1780
1799
  const r = y(), o = J(() => {
1781
1800
  var i;
1782
- return (i = e.default) == null ? void 0 : i.call(e).some((h) => h.type !== Ee);
1801
+ return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== Ee);
1783
1802
  }), a = J(() => ({
1784
1803
  ...n.options,
1785
1804
  element: r.value
1786
- })), l = U(ee, [], a, t);
1805
+ })), l = D(ee, [], a, t);
1787
1806
  return s({
1788
1807
  customMarker: l
1789
1808
  }), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
1790
1809
  }
1791
1810
  });
1792
- const Ct = {
1811
+ const _t = {
1793
1812
  key: 0,
1794
1813
  class: "custom-marker-wrapper"
1795
1814
  };
1796
- function bt(n, e, t, s, r, o) {
1797
- return n.hasSlotContent ? (Y(), X("div", Ct, [
1815
+ function kt(n, e, t, s, r, o) {
1816
+ return n.hasSlotContent ? (Y(), X("div", _t, [
1798
1817
  ae("div", Pe({
1799
1818
  ref: "customMarkerRef",
1800
1819
  style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
@@ -1803,7 +1822,7 @@ function bt(n, e, t, s, r, o) {
1803
1822
  ], 16)
1804
1823
  ])) : Oe("", !0);
1805
1824
  }
1806
- const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343a"]]), qt = b({
1825
+ const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343a"]]), Rt = P({
1807
1826
  name: "HeatmapLayer",
1808
1827
  props: {
1809
1828
  options: {
@@ -1812,19 +1831,19 @@ const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343
1812
1831
  }
1813
1832
  },
1814
1833
  setup(n) {
1815
- const e = y(), t = C(Z, y()), s = C(D, y());
1834
+ const e = y(), t = C(N, y()), s = C(U, y());
1816
1835
  return O(
1817
1836
  [t, () => n.options],
1818
1837
  ([r, o], [a, l]) => {
1819
- var h;
1820
- const i = !T(o, l) || t.value !== a;
1838
+ var d;
1839
+ const i = !$(o, l) || t.value !== a;
1821
1840
  if (t.value && s.value && i) {
1822
1841
  const u = structuredClone(o);
1823
1842
  if (u.data && !(u.data instanceof s.value.MVCArray)) {
1824
1843
  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));
1844
+ u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof c || "location" in h && (h.location instanceof c || h.location === null) ? h : "location" in h ? { ...h, location: new c(h.location) } : new c(h));
1826
1845
  }
1827
- e.value ? e.value.setOptions(u) : e.value = S(
1846
+ e.value ? e.value.setOptions(u) : e.value = I(
1828
1847
  new s.value.visualization.HeatmapLayer({
1829
1848
  ...u,
1830
1849
  map: t.value
@@ -1840,15 +1859,15 @@ const jt = /* @__PURE__ */ te(kt, [["render", bt], ["__scopeId", "data-v-2d2d343
1840
1859
  render: () => null
1841
1860
  });
1842
1861
  export {
1843
- At as Circle,
1844
- Tt as CustomControl,
1845
- jt as CustomMarker,
1846
- Ot as GoogleMap,
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
1862
+ St as Circle,
1863
+ It as CustomControl,
1864
+ $t as CustomMarker,
1865
+ Et as GoogleMap,
1866
+ Rt as HeatmapLayer,
1867
+ At as InfoWindow,
1868
+ Pt as Marker,
1869
+ Tt as MarkerCluster,
1870
+ xt as Polygon,
1871
+ Ot as Polyline,
1872
+ Lt as Rectangle
1854
1873
  };