tg-map-vue3 4.2.7 → 4.2.8

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/tg-map.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { noop as x, typed as O, lateinit as l, path as te, throwError as w, Arrays as V, deepEqual as se } from "tg-commons";
2
- import { Strings as G, TgMapType as D, unwrapStringEnumValue as d, loadCachedMap as re, TgMapFactory as ie, BuildInMapTypeId as z, GestureHandlingOptions as W, bindEvents as v, MapType as oe, Objects as ae, InfoWindowModeValues as ne, LatLng as y, dimen as le, ControlPosition as c, CustomControl as he, MapTypeControlType as de, TrafficLayer as pe, MapPane as A, ElementOverlay as ce, BaiduMarker as q, GoogleMap as X, wrapComponentElementForGoogle as K, setTgMapConfig as me } from "tg-map-core";
2
+ import { Strings as G, TgMapType as D, unwrapStringEnumValue as d, loadCachedMap as ie, TgMapFactory as re, BuildInMapTypeId as z, GestureHandlingOptions as W, bindEvents as v, MapType as oe, Objects as ae, InfoWindowModeValues as ne, LatLng as y, dimen as le, ControlPosition as m, CustomControl as he, MapTypeControlType as de, TrafficLayer as pe, MapPane as A, ElementOverlay as me, BaiduMarker as q, GoogleMap as X, wrapComponentElementForGoogle as K, setTgMapConfig as ce } from "tg-map-core";
3
3
  export * from "tg-map-core";
4
4
  import { createCommentVNode as Z, computed as J, defineComponent as n, markRaw as ue, watch as k, createElementBlock as b, openBlock as C, mergeProps as M, createElementVNode as fe, renderSlot as f, normalizeClass as L, normalizeStyle as ye, getCurrentInstance as ve, inject as ge, onBeforeUnmount as $e, onMounted as be, toRaw as B, withDirectives as Ce, vShow as _e } from "vue";
5
5
  import "tg-map-core/dist/tg-map-core.css";
@@ -7,17 +7,17 @@ function u(e, t) {
7
7
  return {
8
8
  type: String,
9
9
  default: t,
10
- validator: (r) => Object.values(e).includes(r)
10
+ validator: (i) => Object.values(e).includes(i)
11
11
  };
12
12
  }
13
13
  function ke(e, t) {
14
14
  return {
15
15
  type: String,
16
16
  default: t,
17
- validator: (r) => e.includes(r)
17
+ validator: (i) => e.includes(i)
18
18
  };
19
19
  }
20
- function m(e) {
20
+ function c(e) {
21
21
  return {
22
22
  type: e,
23
23
  required: !0
@@ -31,12 +31,12 @@ function s(e, t) {
31
31
  }
32
32
  function tt(e) {
33
33
  const t = {};
34
- return Object.entries(e).forEach(([r, i]) => {
35
- const o = `__${r}`;
36
- t[r] = {
34
+ return Object.entries(e).forEach(([i, r]) => {
35
+ const o = `__${i}`;
36
+ t[i] = {
37
37
  get() {
38
38
  const a = this[o];
39
- return a === void 0 ? i : a;
39
+ return a === void 0 ? r : a;
40
40
  },
41
41
  set(a) {
42
42
  this[o] = a;
@@ -54,9 +54,9 @@ const T = {
54
54
  };
55
55
  function Te(e) {
56
56
  return Object.keys(e).forEach((t) => {
57
- const r = e[t];
58
- let i = !1;
59
- typeof r == "function" ? (T.get = r, T.set = x, i = !0) : typeof r == "object" && typeof r.get == "function" && (T.get = r.get, T.set = r.set, i = !0), i && (e[t] = Object.defineProperty(e, t, T));
57
+ const i = e[t];
58
+ let r = !1;
59
+ typeof i == "function" ? (T.get = i, T.set = x, r = !0) : typeof i == "object" && typeof i.get == "function" && (T.get = i.get, T.set = i.set, r = !0), r && (e[t] = Object.defineProperty(e, t, T));
60
60
  }), e;
61
61
  }
62
62
  function st(e) {
@@ -66,34 +66,34 @@ function E() {
66
66
  return Z();
67
67
  }
68
68
  function S(e, t) {
69
- const r = e.$options[t];
70
- if (r)
71
- for (const i of r)
72
- i.call(e);
73
- }
74
- function rt(e, t) {
75
- for (const r of e)
76
- if (r.$options.name === t.name)
77
- return r;
69
+ const i = e.$options[t];
70
+ if (i)
71
+ for (const r of i)
72
+ r.call(e);
78
73
  }
79
74
  function it(e, t) {
80
- if (!e.default) return;
81
- const r = e.default();
82
- for (const i of r)
83
- if ((i == null ? void 0 : i.type).name === t.name)
75
+ for (const i of e)
76
+ if (i.$options.name === t.name)
84
77
  return i;
85
78
  }
79
+ function rt(e, t) {
80
+ if (!e.default) return;
81
+ const i = e.default();
82
+ for (const r of i)
83
+ if ((r == null ? void 0 : r.type).name === t.name)
84
+ return r;
85
+ }
86
86
  function Oe(e, t) {
87
- const r = {}, i = {}, o = {};
87
+ const i = {}, r = {}, o = {};
88
88
  return Object.keys(e).forEach((a) => {
89
- a.startsWith("on") ? r[G.pascal2kebab(a.substring(2))] = e[a] : i[a] = e[a];
89
+ a.startsWith("on") ? i[G.pascal2kebab(a.substring(2))] = e[a] : r[a] = e[a];
90
90
  }), t && Object.keys(t).forEach((a) => {
91
91
  a.startsWith("on") && (o[G.pascal2kebab(a.substring(2))] = t[a]);
92
92
  }), {
93
93
  /** class/style/未声明的属性 等 */
94
- binds: i,
94
+ binds: r,
95
95
  /** 未声明的事件 */
96
- listeners: r,
96
+ listeners: i,
97
97
  /** 声明在`props`中的事件 */
98
98
  listenerProps: o
99
99
  };
@@ -106,13 +106,13 @@ function h() {
106
106
  }
107
107
  const ot = () => {
108
108
  let e, t;
109
- function r(o) {
109
+ function i(o) {
110
110
  console.log(o), e = o && o.type, t = Date.now();
111
111
  }
112
- function i(o) {
113
- ((o && o.type) !== e || Date.now() - (t ?? 0) > 1e3) && r(o);
112
+ function r(o) {
113
+ ((o && o.type) !== e || Date.now() - (t ?? 0) > 1e3) && i(o);
114
114
  }
115
- return { eventLog: r, eventLogLess: i };
115
+ return { eventLog: i, eventLogLess: r };
116
116
  };
117
117
  function R(e, t) {
118
118
  return (e == null ? void 0 : e.$options.name) === t.name;
@@ -120,14 +120,14 @@ function R(e, t) {
120
120
  function Y(e, t) {
121
121
  return R(e, t) ? e : void 0;
122
122
  }
123
- function U(e, t, r) {
124
- let i = t;
125
- for (; i; ) {
126
- if (R(i, e))
127
- return i;
128
- if (r && R(i, r))
123
+ function U(e, t, i) {
124
+ let r = t;
125
+ for (; r; ) {
126
+ if (R(r, e))
127
+ return r;
128
+ if (i && R(r, i))
129
129
  return;
130
- i = i.$parent;
130
+ r = r.$parent;
131
131
  }
132
132
  }
133
133
  const j = "$map", P = "onCreate", I = "onDestroy", p = n({
@@ -157,7 +157,7 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
157
157
  * - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
158
158
  * @see AbstractMapEventMap.center-changed
159
159
  */
160
- center: m(y),
160
+ center: c(y),
161
161
  /**
162
162
  * 同步center的延时
163
163
  * @default 300
@@ -176,7 +176,7 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
176
176
  * @deprecated 用的太少, 故maptalks未实现该属性
177
177
  */
178
178
  lastCenter: s(y),
179
- zoom: m(Number),
179
+ zoom: c(Number),
180
180
  /**
181
181
  * 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
182
182
  * @see MapOptions.infoWindowMode
@@ -264,7 +264,7 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
264
264
  async mounted() {
265
265
  const e = d(this.type, D);
266
266
  try {
267
- await re(e);
267
+ await ie(e);
268
268
  } catch (o) {
269
269
  this.$emit("error", o);
270
270
  return;
@@ -273,7 +273,7 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
273
273
  console.warn(`tg-map(type=${e})已销毁, 不需要继续执行`);
274
274
  return;
275
275
  }
276
- const t = ie.createMap(
276
+ const t = re.createMap(
277
277
  e,
278
278
  this.$refs.map,
279
279
  /* options: */
@@ -293,6 +293,7 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
293
293
  if (this.map = ue(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), v(
294
294
  this.attrs.listeners,
295
295
  t,
296
+ this.$emit,
296
297
  /* excludes: */
297
298
  ["load"]
298
299
  ), this.$emit("load", t), k([
@@ -312,10 +313,10 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
312
313
  })), this.attrs.listenerProps["update:zoom"] && t.addEventListener("zoom-changed", () => {
313
314
  this.$emit("update:zoom", t.getZoom());
314
315
  });
315
- const r = this.attrs.listenerProps["update:map-type"], i = this.attrs.listenerProps["update:map-type-id"];
316
- (r || i) && t.addEventListener("map-type-changed", () => {
316
+ const i = this.attrs.listenerProps["update:map-type"], r = this.attrs.listenerProps["update:map-type-id"];
317
+ (i || r) && t.addEventListener("map-type-changed", () => {
317
318
  const o = t.getMapType();
318
- r && this.$emit("update:map-type", o), i && this.$emit("update:map-type-id", o.id);
319
+ i && this.$emit("update:map-type", o), r && this.$emit("update:map-type-id", o.id);
319
320
  });
320
321
  },
321
322
  unmounted() {
@@ -323,12 +324,12 @@ const j = "$map", P = "onCreate", I = "onDestroy", p = n({
323
324
  },
324
325
  methods: {}
325
326
  }), $ = (e, t) => {
326
- const r = e.__vccOpts || e;
327
- for (const [i, o] of t)
328
- r[i] = o;
329
- return r;
327
+ const i = e.__vccOpts || e;
328
+ for (const [r, o] of t)
329
+ i[r] = o;
330
+ return i;
330
331
  };
331
- function Me(e, t, r, i, o, a) {
332
+ function Me(e, t, i, r, o, a) {
332
333
  return C(), b("div", M({ class: "tg-map" }, e.attrs.binds), [
333
334
  fe("div", {
334
335
  ref: "map",
@@ -371,7 +372,7 @@ const N = /* @__PURE__ */ $(Ie, [["render", Me]]), we = n({
371
372
  dimen: le
372
373
  }
373
374
  });
374
- function Se(e, t, r, i, o, a) {
375
+ function Se(e, t, i, r, o, a) {
375
376
  return C(), b("div", {
376
377
  class: L(e.$options.name),
377
378
  style: ye({ left: e.dimen(e.left), top: e.dimen(e.topValue), right: e.dimen(e.right), bottom: e.dimen(e.bottom) })
@@ -383,7 +384,7 @@ const at = /* @__PURE__ */ $(we, [["render", Se]]), xe = n({
383
384
  name: "tg-custom-control",
384
385
  mixins: [p],
385
386
  props: {
386
- position: u(c, c.RIGHT_BOTTOM)
387
+ position: u(m, m.RIGHT_BOTTOM)
387
388
  },
388
389
  setup() {
389
390
  return {
@@ -402,13 +403,13 @@ const at = /* @__PURE__ */ $(we, [["render", Se]]), xe = n({
402
403
  return e;
403
404
  }
404
405
  };
405
- this.control = new t(d(this.position, c)), this.$map.addCustomControl(this.control);
406
+ this.control = new t(d(this.position, m)), this.$map.addCustomControl(this.control);
406
407
  },
407
408
  onDestroy() {
408
409
  this.$map.removeCustomControl(this.control);
409
410
  }
410
411
  });
411
- function Ae(e, t, r, i, o, a) {
412
+ function Ae(e, t, i, r, o, a) {
412
413
  return C(), b("div", {
413
414
  class: L(e.$options.name)
414
415
  }, [
@@ -419,7 +420,7 @@ const nt = /* @__PURE__ */ $(xe, [["render", Ae]]), lt = n({
419
420
  name: "tg-map-type-control",
420
421
  mixins: [p],
421
422
  props: {
422
- position: u(c, c.TOP_LEFT),
423
+ position: u(m, m.TOP_LEFT),
423
424
  type: u(de),
424
425
  mapTypes: s(Array)
425
426
  },
@@ -452,7 +453,7 @@ const nt = /* @__PURE__ */ $(xe, [["render", Ae]]), lt = n({
452
453
  name: "tg-scale-control",
453
454
  mixins: [p],
454
455
  props: {
455
- position: u(c, c.BOTTOM_RIGHT)
456
+ position: u(m, m.BOTTOM_RIGHT)
456
457
  },
457
458
  setup() {
458
459
  return {
@@ -472,18 +473,18 @@ const nt = /* @__PURE__ */ $(xe, [["render", Ae]]), lt = n({
472
473
  }
473
474
  });
474
475
  function Q() {
475
- var r;
476
- const e = (r = ve()) == null ? void 0 : r.type;
476
+ var i;
477
+ const e = (i = ve()) == null ? void 0 : i.type;
477
478
  let t = (e == null ? void 0 : e.name) ?? (e == null ? void 0 : e.__name);
478
479
  if (!t) {
479
- const i = e == null ? void 0 : e.__file;
480
- i && (t = te.basename(i, ".vue"));
480
+ const r = e == null ? void 0 : e.__file;
481
+ r && (t = te.basename(r, ".vue"));
481
482
  }
482
483
  return t;
483
484
  }
484
485
  function F() {
485
486
  const e = ge(j);
486
- let t, r;
487
+ let t, i;
487
488
  return e == null && w(`<${Q() || "unknown"}>必须作为<tg-map>的子代组件`), {
488
489
  mapRef: e,
489
490
  /** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
@@ -491,69 +492,69 @@ function F() {
491
492
  return e.value ?? w("map尚未初始化");
492
493
  },
493
494
  /** 地图元素创建回调 */
494
- [P](i) {
495
- be(i), t && w(`${P}只能调用一次`), t = i;
495
+ [P](r) {
496
+ be(r), t && w(`${P}只能调用一次`), t = r;
496
497
  },
497
498
  /** 地图元素销毁回调 */
498
- [I](i) {
499
- $e(i), r && w(`${I}只能调用一次`), r = i;
499
+ [I](r) {
500
+ $e(r), i && w(`${I}只能调用一次`), i = r;
500
501
  },
501
502
  /** 重新创建地图元素 */
502
503
  recreate() {
503
- r == null || r(), t == null || t();
504
+ i == null || i(), t == null || t();
504
505
  }
505
506
  };
506
507
  }
507
508
  const dt = n({
508
509
  name: "tg-street-view-control",
509
510
  props: {
510
- position: u(c, c.RIGHT_BOTTOM)
511
+ position: u(m, m.RIGHT_BOTTOM)
511
512
  },
512
513
  setup(e) {
513
514
  let t = l();
514
- const { map: r, onCreate: i, onDestroy: o } = F();
515
- return i(() => {
516
- t = r.createStreetViewControl(d(e)), r.addControl(t);
515
+ const { map: i, onCreate: r, onDestroy: o } = F();
516
+ return r(() => {
517
+ t = i.createStreetViewControl(d(e)), i.addControl(t);
517
518
  }), o(() => {
518
- r.removeControl(t);
519
+ i.removeControl(t);
519
520
  }), k(() => e.position, (a) => {
520
- t.setPosition(d(a, c));
521
+ t.setPosition(d(a, m));
521
522
  }), E;
522
523
  }
523
524
  }), pt = n({
524
525
  name: "tg-zoom-control",
525
526
  props: {
526
- position: u(c, c.RIGHT_BOTTOM),
527
+ position: u(m, m.RIGHT_BOTTOM),
527
528
  showZoomLevel: s(Boolean)
528
529
  },
529
530
  setup(e) {
530
531
  let t = l();
531
- const { map: r, onCreate: i, onDestroy: o } = F();
532
- return i(() => {
533
- t = r.createZoomControl(d(e)), r.addControl(t);
532
+ const { map: i, onCreate: r, onDestroy: o } = F();
533
+ return r(() => {
534
+ t = i.createZoomControl(d(e)), i.addControl(t);
534
535
  }), o(() => {
535
- r.removeControl(t);
536
+ i.removeControl(t);
536
537
  }), k(() => e.position, (a) => {
537
- t.setPosition(d(a, c));
538
+ t.setPosition(d(a, m));
538
539
  }), k(() => e.showZoomLevel, (a) => {
539
540
  t.setShowZoomLevel(a ?? !0);
540
541
  }), E;
541
542
  }
542
- }), ct = n({
543
+ }), mt = n({
543
544
  name: "tg-heatmap",
544
545
  props: {
545
546
  maxIntensity: s(Number),
546
547
  gradient: s(Object),
547
548
  opacity: s(Number),
548
549
  radius: s(Number),
549
- data: m(Array)
550
+ data: c(Array)
550
551
  },
551
552
  setup(e) {
552
- const { map: t, onCreate: r, onDestroy: i } = F();
553
+ const { map: t, onCreate: i, onDestroy: r } = F();
553
554
  let o = l();
554
- return r(() => {
555
+ return i(() => {
555
556
  o = t.createHeatmap(e);
556
- }), i(() => {
557
+ }), r(() => {
557
558
  o.remove();
558
559
  }), k(() => e.data, (a) => o.setData(a)), k(
559
560
  [() => e.maxIntensity, () => e.gradient, () => e.opacity, () => e.radius],
@@ -628,14 +629,14 @@ const dt = n({
628
629
  }
629
630
  }
630
631
  });
631
- function Be(e, t, r, i, o, a) {
632
+ function Be(e, t, i, r, o, a) {
632
633
  return C(), b("div", {
633
634
  class: L(e.$options.name)
634
635
  }, [
635
636
  f(e.$slots, "default")
636
637
  ], 2);
637
638
  }
638
- const Ee = /* @__PURE__ */ $(Le, [["render", Be]]), mt = n({
639
+ const Ee = /* @__PURE__ */ $(Le, [["render", Be]]), ct = n({
639
640
  name: "tg-traffic-layer",
640
641
  mixins: [p],
641
642
  // 请直接使用v-if来控制它的显隐
@@ -658,8 +659,8 @@ const Ee = /* @__PURE__ */ $(Le, [["render", Be]]), mt = n({
658
659
  mixins: [p],
659
660
  inheritAttrs: !1,
660
661
  props: {
661
- center: m(y),
662
- radius: m(Number),
662
+ center: c(y),
663
+ radius: c(Number),
663
664
  clickable: s(Boolean),
664
665
  editable: s(Boolean),
665
666
  strokeColor: s(String),
@@ -727,7 +728,7 @@ const Ee = /* @__PURE__ */ $(Le, [["render", Be]]), mt = n({
727
728
  }
728
729
  },
729
730
  onCreate() {
730
- this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:center"] && this.overlay.addEventListener("center-changed", () => {
731
+ this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay, this.$emit), this.attrs.listenerProps["update:center"] && this.overlay.addEventListener("center-changed", () => {
731
732
  this.$emit("update:center", this.emittedCenter = this.overlay.getCenter());
732
733
  }), this.attrs.listenerProps["update:radius"] && this.overlay.addEventListener("radius-changed", () => {
733
734
  this.$emit("update:radius", this.emittedRadius = this.overlay.getRadius());
@@ -737,16 +738,16 @@ const Ee = /* @__PURE__ */ $(Le, [["render", Be]]), mt = n({
737
738
  this.$map.removeOverlay(this.overlay);
738
739
  }
739
740
  });
740
- class Ne extends ce {
741
- constructor(t, r, i, o) {
742
- super(t, r), this.content = i, this.position = o;
741
+ class Ne extends me {
742
+ constructor(t, i, r, o) {
743
+ super(t, i), this.content = r, this.position = o;
743
744
  }
744
745
  onCreate() {
745
746
  return this.content;
746
747
  }
747
748
  onDraw(t) {
748
- const r = t.fromLatLngToOverlayPoint(this.position);
749
- this.content.style.left = r.x + "px", this.content.style.top = r.y + "px";
749
+ const i = t.fromLatLngToOverlayPoint(this.position);
750
+ this.content.style.left = i.x + "px", this.content.style.top = i.y + "px";
750
751
  }
751
752
  setPosition(t) {
752
753
  this.position = t, this.draw();
@@ -757,7 +758,7 @@ const De = n({
757
758
  mixins: [p],
758
759
  props: {
759
760
  mapPane: u(A, A.overlayMouseTarget),
760
- position: m(y)
761
+ position: c(y)
761
762
  },
762
763
  setup() {
763
764
  return {
@@ -784,7 +785,7 @@ const De = n({
784
785
  this.$map.removeElementOverlay(this.overlay);
785
786
  }
786
787
  });
787
- function ze(e, t, r, i, o, a) {
788
+ function ze(e, t, i, r, o, a) {
788
789
  return C(), b("div", M({
789
790
  class: e.$options.name
790
791
  }, e.$attrs), [
@@ -792,7 +793,7 @@ function ze(e, t, r, i, o, a) {
792
793
  ], 16);
793
794
  }
794
795
  const ft = /* @__PURE__ */ $(De, [["render", ze]]), We = {
795
- position: m(y),
796
+ position: c(y),
796
797
  title: s(String),
797
798
  label: s(Object),
798
799
  icon: s(Object),
@@ -869,7 +870,7 @@ const ft = /* @__PURE__ */ $(De, [["render", ze]]), We = {
869
870
  }
870
871
  },
871
872
  onCreate() {
872
- this.marker = this.$map.createMarker(this), this.labelOverlay && this.marker.attachLabelOverlay(this.labelOverlay.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), v(this.attrs.listeners, this.marker), this.attrs.listenerProps["update:position"] && this.marker.addEventListener("dragend", (e) => {
873
+ this.marker = this.$map.createMarker(this), this.labelOverlay && this.marker.attachLabelOverlay(this.labelOverlay.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), v(this.attrs.listeners, this.marker, this.$emit), this.attrs.listenerProps["update:position"] && this.marker.addEventListener("dragend", (e) => {
873
874
  this.$emit("update:position", this.emittedPosition = e.position);
874
875
  });
875
876
  },
@@ -897,7 +898,7 @@ const ft = /* @__PURE__ */ $(De, [["render", ze]]), We = {
897
898
  }
898
899
  }
899
900
  });
900
- function Re(e, t, r, i, o, a) {
901
+ function Re(e, t, i, r, o, a) {
901
902
  return f(e.$slots, "default");
902
903
  }
903
904
  const H = /* @__PURE__ */ $(Ze, [["render", Re]]), Ue = n({
@@ -905,7 +906,7 @@ const H = /* @__PURE__ */ $(Ze, [["render", Re]]), Ue = n({
905
906
  mixins: [p],
906
907
  inheritAttrs: !1,
907
908
  props: {
908
- show: m(Boolean),
909
+ show: c(Boolean),
909
910
  position: s(y),
910
911
  offset: s(Object),
911
912
  maxWidth: s(Number),
@@ -947,7 +948,7 @@ const H = /* @__PURE__ */ $(Ze, [["render", Re]]), Ue = n({
947
948
  onCreate() {
948
949
  this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.attrs.listenerProps["update:show"] && this.overlay.addEventListener("closeclick", () => {
949
950
  this.$emit("update:show", !1);
950
- }), v(this.attrs.listeners, this.overlay);
951
+ }), v(this.attrs.listeners, this.overlay, this.$emit);
951
952
  },
952
953
  onDestroy() {
953
954
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
@@ -978,7 +979,7 @@ const H = /* @__PURE__ */ $(Ze, [["render", Re]]), Ue = n({
978
979
  }
979
980
  }
980
981
  });
981
- function je(e, t, r, i, o, a) {
982
+ function je(e, t, i, r, o, a) {
982
983
  return C(), b("div", M({
983
984
  class: e.$options.name
984
985
  }, e.attrs.binds), [
@@ -990,7 +991,7 @@ const yt = /* @__PURE__ */ $(Ue, [["render", je]]), Fe = n({
990
991
  mixins: [p],
991
992
  inheritAttrs: !1,
992
993
  props: {
993
- show: m(Boolean),
994
+ show: c(Boolean),
994
995
  position: s(y),
995
996
  maxWidth: s(Number),
996
997
  offset: s(Object),
@@ -1043,13 +1044,13 @@ const yt = /* @__PURE__ */ $(Ue, [["render", je]]), Fe = n({
1043
1044
  this.$emit("update:show", !0);
1044
1045
  }), this.overlay.addEventListener("close", () => {
1045
1046
  this.$emit("update:show", !1);
1046
- }), v(this.attrs.listeners, this.overlay);
1047
+ }), v(this.attrs.listeners, this.overlay, this.$emit);
1047
1048
  },
1048
1049
  onDestroy() {
1049
1050
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
1050
1051
  }
1051
1052
  });
1052
- function He(e, t, r, i, o, a) {
1053
+ function He(e, t, i, r, o, a) {
1053
1054
  return Ce((C(), b("div", M({
1054
1055
  class: e.$options.name
1055
1056
  }, e.attrs.binds), [
@@ -1114,13 +1115,13 @@ const vt = /* @__PURE__ */ $(Fe, [["render", He]]), Ve = n({
1114
1115
  }
1115
1116
  },
1116
1117
  onCreate() {
1117
- this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay);
1118
+ this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay, this.$emit);
1118
1119
  },
1119
1120
  onDestroy() {
1120
1121
  this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
1121
1122
  }
1122
1123
  });
1123
- function Ge(e, t, r, i, o, a) {
1124
+ function Ge(e, t, i, r, o, a) {
1124
1125
  return C(), b("div", M({
1125
1126
  class: e.$options.name
1126
1127
  }, e.attrs.binds), [
@@ -1128,7 +1129,7 @@ function Ge(e, t, r, i, o, a) {
1128
1129
  ], 16);
1129
1130
  }
1130
1131
  const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1131
- paths: m(Array),
1132
+ paths: c(Array),
1132
1133
  clickable: s(Boolean),
1133
1134
  editable: s(Boolean),
1134
1135
  strokeColor: s(String),
@@ -1157,7 +1158,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1157
1158
  handler(e) {
1158
1159
  if (this.emittedPaths != null) {
1159
1160
  const t = this.emittedPaths;
1160
- if (this.emittedPaths = void 0, t.length === e.length && t.every((r, i) => r === B(e[i])))
1161
+ if (this.emittedPaths = void 0, t.length === e.length && t.every((i, r) => i === B(e[r])))
1161
1162
  return;
1162
1163
  }
1163
1164
  this.overlay.setPaths(e);
@@ -1193,7 +1194,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1193
1194
  }
1194
1195
  },
1195
1196
  onCreate() {
1196
- this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:paths"] && this.overlay.addEventListener("paths-edited", () => {
1197
+ this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay, this.$emit), this.attrs.listenerProps["update:paths"] && this.overlay.addEventListener("paths-edited", () => {
1197
1198
  this.$emit("update:paths", this.emittedPaths = this.overlay.getPaths());
1198
1199
  });
1199
1200
  },
@@ -1205,7 +1206,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1205
1206
  mixins: [p],
1206
1207
  inheritAttrs: !1,
1207
1208
  props: {
1208
- path: m(Array),
1209
+ path: c(Array),
1209
1210
  icons: s(Array),
1210
1211
  clickable: s(Boolean),
1211
1212
  editable: s(Boolean),
@@ -1265,7 +1266,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1265
1266
  }
1266
1267
  },
1267
1268
  onCreate() {
1268
- this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:path"] && this.overlay.addEventListener("path-edited", () => {
1269
+ this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay, this.$emit), this.attrs.listenerProps["update:path"] && this.overlay.addEventListener("path-edited", () => {
1269
1270
  this.$emit("update:path", this.emittedPath = this.overlay.getPath());
1270
1271
  });
1271
1272
  },
@@ -1277,7 +1278,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1277
1278
  mixins: [p],
1278
1279
  inheritAttrs: !1,
1279
1280
  props: {
1280
- bounds: m(Object),
1281
+ bounds: c(Object),
1281
1282
  clickable: s(Boolean),
1282
1283
  editable: s(Boolean),
1283
1284
  strokeColor: s(String),
@@ -1335,7 +1336,7 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1335
1336
  }
1336
1337
  },
1337
1338
  onCreate() {
1338
- this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay), this.attrs.listenerProps["update:bounds"] && this.overlay.addEventListener("bounds-changed", () => {
1339
+ this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), v(this.attrs.listeners, this.overlay, this.$emit), this.attrs.listenerProps["update:bounds"] && this.overlay.addEventListener("bounds-changed", () => {
1339
1340
  this.$emit("update:bounds", this.emittedBounds = this.overlay.getBounds());
1340
1341
  });
1341
1342
  },
@@ -1345,10 +1346,10 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1345
1346
  }), Xe = ["beforeUpdate", "updated"], _t = {
1346
1347
  install(e, t = {}) {
1347
1348
  if (t.enable !== !1) {
1348
- const r = n({
1349
+ const i = n({
1349
1350
  beforeCreate() {
1350
- const i = Q() ?? "", a = (t.nameRegex || /^[A-Z]/).test(i) ? (_) => {
1351
- t.hookNames ? t.hookNames.includes(_) && console.debug("[lifecycle]", i, _) : Xe.includes(_) || console.debug("[lifecycle]", i, _);
1351
+ const r = Q() ?? "", a = (t.nameRegex || /^[A-Z]/).test(r) ? (_) => {
1352
+ t.hookNames ? t.hookNames.includes(_) && console.debug("[lifecycle]", r, _) : Xe.includes(_) || console.debug("[lifecycle]", r, _);
1352
1353
  } : x;
1353
1354
  a("beforeCreate"), this.__life_impl = a;
1354
1355
  },
@@ -1374,8 +1375,8 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1374
1375
  this.__life("unmounted");
1375
1376
  },
1376
1377
  methods: {
1377
- __life(i) {
1378
- this.__life_impl(i);
1378
+ __life(r) {
1379
+ this.__life_impl(r);
1379
1380
  }
1380
1381
  },
1381
1382
  onCreate() {
@@ -1385,14 +1386,14 @@ const gt = /* @__PURE__ */ $(Ve, [["render", Ge]]), qe = {
1385
1386
  this.__life("onDestroy");
1386
1387
  }
1387
1388
  });
1388
- e.mixin(r);
1389
+ e.mixin(i);
1389
1390
  }
1390
1391
  }
1391
1392
  }, kt = {
1392
1393
  install(e, t) {
1393
- me(t);
1394
- const r = e.config.optionMergeStrategies;
1395
- r[P] = r[I] = (i, o) => i ? [...new Set([].concat(i, o))] : Array.isArray(o) ? o : [o];
1394
+ ce(t);
1395
+ const i = e.config.optionMergeStrategies;
1396
+ i[P] = i[I] = (r, o) => r ? [...new Set([].concat(r, o))] : Array.isArray(o) ? o : [o];
1396
1397
  }
1397
1398
  };
1398
1399
  export {
@@ -1404,7 +1405,7 @@ export {
1404
1405
  ut as TgCircle,
1405
1406
  nt as TgCustomControl,
1406
1407
  ft as TgElementOverlay,
1407
- ct as TgHeatmap,
1408
+ mt as TgHeatmap,
1408
1409
  yt as TgInfoBox,
1409
1410
  vt as TgInfoWindow,
1410
1411
  gt as TgLabel,
@@ -1418,7 +1419,7 @@ export {
1418
1419
  Ct as TgRectangle,
1419
1420
  ht as TgScaleControl,
1420
1421
  dt as TgStreetViewControl,
1421
- mt as TgTrafficLayer,
1422
+ ct as TgTrafficLayer,
1422
1423
  pt as TgZoomControl,
1423
1424
  S as callHook,
1424
1425
  tt as computedSaveOnThis,
@@ -1427,12 +1428,12 @@ export {
1427
1428
  st as createPropertyObjectTyped,
1428
1429
  kt as default,
1429
1430
  h as eventProp,
1430
- it as extractVNodeFromSlotsByComponent,
1431
+ rt as extractVNodeFromSlotsByComponent,
1431
1432
  U as findAncestorComponentByType,
1432
- rt as findByComponentType,
1433
+ it as findByComponentType,
1433
1434
  R as isComponentByType,
1434
1435
  s as optionalProp,
1435
- m as requiredProp,
1436
+ c as requiredProp,
1436
1437
  Y as safeAsComponent,
1437
1438
  Oe as splitAttrs,
1438
1439
  u as stringEnumProp,