tg-map-vue3 3.6.7 → 3.6.9

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,29 +1,29 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var Ir = Object.defineProperty;
3
- var Sr = (i, t, e) => t in i ? Ir(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
- var c = (i, t, e) => (Sr(i, typeof t != "symbol" ? t + "" : t, e), e);
5
- import { createCommentVNode as tt, computed as qt, defineComponent as w, markRaw as Ar, watch as Kt, openBlock as F, createElementBlock as U, mergeProps as ue, createElementVNode as Rr, normalizeClass as je, renderSlot as W, normalizeStyle as $r, getCurrentInstance as zr, inject as Dr, onMounted as Nr, onBeforeUnmount as Gr, toRaw as Ve, withDirectives as Zr, vShow as Wr } from "vue";
2
+ var Sr = Object.defineProperty;
3
+ var Ar = (i, t, e) => t in i ? Sr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
+ var c = (i, t, e) => (Ar(i, typeof t != "symbol" ? t + "" : t, e), e);
5
+ import { createCommentVNode as rt, computed as Kt, defineComponent as w, markRaw as Rr, watch as Xt, openBlock as F, createElementBlock as U, mergeProps as pe, createElementVNode as $r, normalizeClass as He, renderSlot as W, normalizeStyle as zr, getCurrentInstance as Dr, inject as Nr, onMounted as Gr, onBeforeUnmount as Zr, toRaw as Ve, withDirectives as Wr, vShow as jr } from "vue";
6
6
  function Y(i, t, e) {
7
7
  Object.keys(i).forEach((r) => {
8
8
  r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
9
9
  });
10
10
  }
11
11
  let Hr = 1;
12
- function jr() {
12
+ function Vr() {
13
13
  return Hr++;
14
14
  }
15
- function Se(i, t) {
16
- return t.__id__ || (t.__id__ = jr()), `${i}::${t.__id__}`;
15
+ function Re(i, t) {
16
+ return t.__id__ || (t.__id__ = Vr()), `${i}::${t.__id__}`;
17
17
  }
18
- var Xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
19
- function lt(i) {
18
+ var Jt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
19
+ function ht(i) {
20
20
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
21
21
  }
22
- var Jt = { exports: {} };
22
+ var Qt = { exports: {} };
23
23
  (function(i) {
24
24
  (function(t, e) {
25
25
  i.exports ? i.exports = e() : t.coordtransform = e();
26
- })(Xt, function() {
26
+ })(Jt, function() {
27
27
  var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
28
28
  function n(g, f, v, O) {
29
29
  this.west = Math.min(g, v), this.north = Math.max(f, O), this.east = Math.max(g, v), this.south = Math.min(f, O);
@@ -58,12 +58,12 @@ var Jt = { exports: {} };
58
58
  return !1;
59
59
  }
60
60
  function l(g, f) {
61
- var v = g - 65e-4, O = f - 6e-3, P = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), Q = P * Math.cos(E), ie = P * Math.sin(E);
61
+ var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), Q = x * Math.cos(E), ie = x * Math.sin(E);
62
62
  return [Q, ie];
63
63
  }
64
64
  function d(g, f) {
65
- var v = Math.sqrt(g * g + f * f) + 2e-5 * Math.sin(f * t), O = Math.atan2(f, g) + 3e-6 * Math.cos(g * t), P = v * Math.cos(O) + 65e-4, E = v * Math.sin(O) + 6e-3;
66
- return [P, E];
65
+ var v = Math.sqrt(g * g + f * f) + 2e-5 * Math.sin(f * t), O = Math.atan2(f, g) + 3e-6 * Math.cos(g * t), x = v * Math.cos(O) + 65e-4, E = v * Math.sin(O) + 6e-3;
66
+ return [x, E];
67
67
  }
68
68
  function u(g, f) {
69
69
  return o(g, f) ? b(g, f) : [g, f];
@@ -75,10 +75,10 @@ var Jt = { exports: {} };
75
75
  return [g * 2 - v[0], f * 2 - v[1]];
76
76
  }
77
77
  function b(g, f) {
78
- var v = _(g - 105, f - 35), O = T(g - 105, f - 35), P = f / 180 * e, E = Math.sin(P);
78
+ var v = _(g - 105, f - 35), O = T(g - 105, f - 35), x = f / 180 * e, E = Math.sin(x);
79
79
  E = 1 - s * E * E;
80
80
  var Q = Math.sqrt(E);
81
- v = v * 180 / (r * (1 - s) / (E * Q) * e), O = O * 180 / (r / Q * Math.cos(P) * e);
81
+ v = v * 180 / (r * (1 - s) / (E * Q) * e), O = O * 180 / (r / Q * Math.cos(x) * e);
82
82
  var ie = f + v, Ke = g + O;
83
83
  return [Ke, ie];
84
84
  }
@@ -115,69 +115,69 @@ var Jt = { exports: {} };
115
115
  }
116
116
  };
117
117
  });
118
- })(Jt);
119
- var Vr = Jt.exports;
120
- const se = /* @__PURE__ */ lt(Vr);
118
+ })(Qt);
119
+ var Fr = Qt.exports;
120
+ const se = /* @__PURE__ */ ht(Fr);
121
121
  function oe(i, t) {
122
122
  if (!i)
123
123
  throw new Error(`AssertionError: ${t}`);
124
124
  }
125
- function rt(i) {
125
+ function it(i) {
126
126
  throw new Error(`Unexpected object: ${i}`);
127
127
  }
128
- function Rs() {
128
+ function $s() {
129
129
  }
130
- function it(i) {
130
+ function st(i) {
131
131
  return i;
132
132
  }
133
- function $s(i, t) {
133
+ function zs(i, t) {
134
134
  return i instanceof t;
135
135
  }
136
- function zs(i, t) {
136
+ function Ds(i, t) {
137
137
  if (i instanceof t)
138
138
  return i;
139
139
  }
140
- function st(i, t) {
140
+ function nt(i, t) {
141
141
  return (i == null ? void 0 : i.$options.name) === t.name;
142
142
  }
143
- function Qt(i, t) {
144
- return st(i, t) ? i : void 0;
143
+ function er(i, t) {
144
+ return nt(i, t) ? i : void 0;
145
145
  }
146
- function ht(i, t, e) {
146
+ function ct(i, t, e) {
147
147
  let r = t;
148
148
  for (; r; ) {
149
- if (st(r, i))
149
+ if (nt(r, i))
150
150
  return r;
151
- if (e && st(r, e))
151
+ if (e && nt(r, e))
152
152
  return;
153
153
  r = r.$parent;
154
154
  }
155
155
  }
156
- function Ds(i) {
156
+ function Ns(i) {
157
157
  return i;
158
158
  }
159
159
  function C(i) {
160
160
  throw new Error(i);
161
161
  }
162
- function ct(i) {
162
+ function dt(i) {
163
163
  throw new Error(`Unsupported: ${i}`);
164
164
  }
165
- function Ns(i) {
165
+ function Gs(i) {
166
166
  throw new Error(`todo: ${i}`);
167
167
  }
168
- function Gs(i) {
168
+ function Zs(i) {
169
169
  return i;
170
170
  }
171
- function ve(...i) {
171
+ function Te(...i) {
172
172
  }
173
- function Zs(i) {
173
+ function Ws(i) {
174
174
  return i != null;
175
175
  }
176
- function Fr(i) {
176
+ function Ur(i) {
177
177
  return i[1] != null;
178
178
  }
179
- var B = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(B || {});
180
- const Je = "wgs84", k = class {
179
+ var P = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(P || {});
180
+ const Je = "wgs84", B = class {
181
181
  constructor(t, e, r) {
182
182
  this.lat = t, this.lng = e, this.coord = r;
183
183
  }
@@ -199,23 +199,23 @@ const Je = "wgs84", k = class {
199
199
  }
200
200
  /** @param coord Baidu Map的坐标一般都是bd09 */
201
201
  static fromBaidu(t, e) {
202
- return new k(t.lat, t.lng, e);
202
+ return new B(t.lat, t.lng, e);
203
203
  }
204
204
  /** @param coord Google Map的坐标依据地图类型不同是不一样的 */
205
205
  static fromGoogle(t, e) {
206
- return new k(t.lat(), t.lng(), e);
206
+ return new B(t.lat(), t.lng(), e);
207
207
  }
208
208
  static fromHere(t, e) {
209
- return new k(t.lat, t.lng, e);
209
+ return new B(t.lat, t.lng, e);
210
210
  }
211
211
  static fromLiteral(t) {
212
- return new k(t.lat, t.lng, t.coord || Je);
212
+ return new B(t.lat, t.lng, t.coord || Je);
213
213
  }
214
214
  static fromLngLat(t, e, r = Je) {
215
- return new k(e, t, r);
215
+ return new B(e, t, r);
216
216
  }
217
217
  static create(t, e, r = Je) {
218
- return new k(t, e, r);
218
+ return new B(t, e, r);
219
219
  }
220
220
  /** 转换坐标到指定坐标系 */
221
221
  to(t) {
@@ -223,7 +223,7 @@ const Je = "wgs84", k = class {
223
223
  if (this.coord === e)
224
224
  return this;
225
225
  const [r, s] = this._convert(e);
226
- return new k(s, r, e);
226
+ return new B(s, r, e);
227
227
  }
228
228
  /**
229
229
  * TODO: normalize要不要默认设为true, 和google的行为保持一致?
@@ -233,7 +233,7 @@ const Je = "wgs84", k = class {
233
233
  */
234
234
  toBaidu(t, e = !1) {
235
235
  let r = this.lat, s = this.lng;
236
- return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = k._normalize(s, r)), new BMap.Point(s, r);
236
+ return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = B._normalize(s, r)), new BMap.Point(s, r);
237
237
  }
238
238
  /**
239
239
  * 转换成google的经纬度, 内部会自动进行标准化
@@ -272,8 +272,8 @@ const Je = "wgs84", k = class {
272
272
  * @see _normalize {@macro latlng_normalize}
273
273
  */
274
274
  normalize() {
275
- const [t, e] = k._normalize(this.lng, this.lat);
276
- return e === this.lat && t === this.lng ? this : new k(e, t, this.coord);
275
+ const [t, e] = B._normalize(this.lng, this.lat);
276
+ return e === this.lat && t === this.lng ? this : new B(e, t, this.coord);
277
277
  }
278
278
  equals(t) {
279
279
  return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
@@ -282,8 +282,8 @@ const Je = "wgs84", k = class {
282
282
  return JSON.stringify(this);
283
283
  }
284
284
  };
285
- let y = k;
286
- c(y, "ZERO", k.create(0, 0));
285
+ let y = B;
286
+ c(y, "ZERO", B.create(0, 0));
287
287
  const te = class {
288
288
  /**
289
289
  * 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
@@ -411,67 +411,67 @@ var V;
411
411
  }
412
412
  i.getCoordType = e;
413
413
  })(V || (V = {}));
414
- var Ur = function(t) {
415
- return Yr(t) && !qr(t);
414
+ var Yr = function(t) {
415
+ return qr(t) && !Kr(t);
416
416
  };
417
- function Yr(i) {
417
+ function qr(i) {
418
418
  return !!i && typeof i == "object";
419
419
  }
420
- function qr(i) {
420
+ function Kr(i) {
421
421
  var t = Object.prototype.toString.call(i);
422
- return t === "[object RegExp]" || t === "[object Date]" || Jr(i);
423
- }
424
- var Kr = typeof Symbol == "function" && Symbol.for, Xr = Kr ? Symbol.for("react.element") : 60103;
425
- function Jr(i) {
426
- return i.$$typeof === Xr;
422
+ return t === "[object RegExp]" || t === "[object Date]" || Qr(i);
427
423
  }
424
+ var Xr = typeof Symbol == "function" && Symbol.for, Jr = Xr ? Symbol.for("react.element") : 60103;
428
425
  function Qr(i) {
426
+ return i.$$typeof === Jr;
427
+ }
428
+ function ei(i) {
429
429
  return Array.isArray(i) ? [] : {};
430
430
  }
431
- function _e(i, t) {
432
- return t.clone !== !1 && t.isMergeableObject(i) ? le(Qr(i), i, t) : i;
431
+ function Me(i, t) {
432
+ return t.clone !== !1 && t.isMergeableObject(i) ? le(ei(i), i, t) : i;
433
433
  }
434
- function ei(i, t, e) {
434
+ function ti(i, t, e) {
435
435
  return i.concat(t).map(function(r) {
436
- return _e(r, e);
436
+ return Me(r, e);
437
437
  });
438
438
  }
439
- function ti(i, t) {
439
+ function ri(i, t) {
440
440
  if (!t.customMerge)
441
441
  return le;
442
442
  var e = t.customMerge(i);
443
443
  return typeof e == "function" ? e : le;
444
444
  }
445
- function ri(i) {
445
+ function ii(i) {
446
446
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
447
447
  return Object.propertyIsEnumerable.call(i, t);
448
448
  }) : [];
449
449
  }
450
- function Gt(i) {
451
- return Object.keys(i).concat(ri(i));
450
+ function Zt(i) {
451
+ return Object.keys(i).concat(ii(i));
452
452
  }
453
- function er(i, t) {
453
+ function tr(i, t) {
454
454
  try {
455
455
  return t in i;
456
456
  } catch {
457
457
  return !1;
458
458
  }
459
459
  }
460
- function ii(i, t) {
461
- return er(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
460
+ function si(i, t) {
461
+ return tr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
462
462
  }
463
- function si(i, t, e) {
463
+ function ni(i, t, e) {
464
464
  var r = {};
465
- return e.isMergeableObject(i) && Gt(i).forEach(function(s) {
466
- r[s] = _e(i[s], e);
467
- }), Gt(t).forEach(function(s) {
468
- ii(i, s) || (er(i, s) && e.isMergeableObject(t[s]) ? r[s] = ti(s, e)(i[s], t[s], e) : r[s] = _e(t[s], e));
465
+ return e.isMergeableObject(i) && Zt(i).forEach(function(s) {
466
+ r[s] = Me(i[s], e);
467
+ }), Zt(t).forEach(function(s) {
468
+ si(i, s) || (tr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ri(s, e)(i[s], t[s], e) : r[s] = Me(t[s], e));
469
469
  }), r;
470
470
  }
471
471
  function le(i, t, e) {
472
- e = e || {}, e.arrayMerge = e.arrayMerge || ei, e.isMergeableObject = e.isMergeableObject || Ur, e.cloneUnlessOtherwiseSpecified = _e;
472
+ e = e || {}, e.arrayMerge = e.arrayMerge || ti, e.isMergeableObject = e.isMergeableObject || Yr, e.cloneUnlessOtherwiseSpecified = Me;
473
473
  var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
474
- return n ? r ? e.arrayMerge(i, t, e) : si(i, t, e) : _e(t, e);
474
+ return n ? r ? e.arrayMerge(i, t, e) : ni(i, t, e) : Me(t, e);
475
475
  }
476
476
  le.all = function(t, e) {
477
477
  if (!Array.isArray(t))
@@ -480,8 +480,8 @@ le.all = function(t, e) {
480
480
  return le(r, s, e);
481
481
  }, {});
482
482
  };
483
- var ni = le, oi = ni;
484
- const tr = /* @__PURE__ */ lt(oi), Ae = ["3.0"], ai = {
483
+ var oi = le, ai = oi;
484
+ const rr = /* @__PURE__ */ ht(ai), $e = ["3.0"], li = {
485
485
  baidu: {
486
486
  version: "3.0",
487
487
  // 在build时会被静态替换, 导致使用者不能无法设置它
@@ -496,24 +496,24 @@ const tr = /* @__PURE__ */ lt(oi), Ae = ["3.0"], ai = {
496
496
  libraries: ["places"]
497
497
  },
498
498
  here: {
499
- version: Ae[0],
499
+ version: $e[0],
500
500
  key: ""
501
501
  }
502
502
  };
503
- let rr;
504
- function ir() {
505
- return rr || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
503
+ let ir;
504
+ function sr() {
505
+ return ir || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
506
506
  }
507
- function li(i) {
508
- i != null && (rr = tr(ai, i));
507
+ function hi(i) {
508
+ i != null && (ir = rr(li, i));
509
509
  }
510
- var nt;
510
+ var ot;
511
511
  ((i) => {
512
512
  function t(e) {
513
513
  return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
514
514
  }
515
515
  i.isScrollable = t;
516
- })(nt || (nt = {}));
516
+ })(ot || (ot = {}));
517
517
  var he;
518
518
  ((i) => {
519
519
  function t(h, o) {
@@ -573,19 +573,19 @@ var ce;
573
573
  }
574
574
  i.listenChanged = r;
575
575
  })(ce || (ce = {}));
576
- function sr(i, t, e) {
576
+ function nr(i, t, e) {
577
577
  return i.addListener(t, e).remove;
578
578
  }
579
- function hi(i, t, e) {
579
+ function ci(i, t, e) {
580
580
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
581
581
  }
582
- function ci(i, t, e, r) {
582
+ function di(i, t, e, r) {
583
583
  return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
584
584
  }
585
- function Zt(i, t, e) {
585
+ function Wt(i, t, e) {
586
586
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
587
587
  }
588
- class nr {
588
+ class or {
589
589
  constructor(t, e) {
590
590
  c(this, "eventMap", /* @__PURE__ */ new Map());
591
591
  c(this, "target", void 0);
@@ -597,7 +597,7 @@ class nr {
597
597
  }
598
598
  class Fe {
599
599
  constructor(t, e) {
600
- c(this, "eventHub", new or());
600
+ c(this, "eventHub", new ar());
601
601
  this.delegate = t, this.options = e;
602
602
  }
603
603
  notify(t) {
@@ -624,14 +624,14 @@ class Fe {
624
624
  this.delegate.removeEventListener(t, e);
625
625
  }
626
626
  }
627
- const Nt = class extends nr {
627
+ const Gt = class extends or {
628
628
  addEventListener(t, e) {
629
- const r = Se(t, e);
629
+ const r = Re(t, e);
630
630
  if (this.eventMap.get(r)) {
631
631
  console.warn("listener已经添加过了", r, e);
632
632
  return;
633
633
  }
634
- const s = this.inner.addListener(Nt.EVENT_TYPE_MAP[t] || t, (n) => {
634
+ const s = this.inner.addListener(Gt.EVENT_TYPE_MAP[t] || t, (n) => {
635
635
  const a = {
636
636
  type: t,
637
637
  target: this.target,
@@ -642,11 +642,11 @@ const Nt = class extends nr {
642
642
  this.eventMap.set(r, s);
643
643
  }
644
644
  removeEventListener(t, e) {
645
- const r = Se(t, e), s = this.eventMap.get(r);
645
+ const r = Re(t, e), s = this.eventMap.get(r);
646
646
  s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
647
647
  }
648
648
  };
649
- let re = Nt;
649
+ let re = Gt;
650
650
  // 事件类型映射: tg => google
651
651
  c(re, "EVENT_TYPE_MAP", {
652
652
  "center-changed": "center_changed",
@@ -664,9 +664,9 @@ c(re, "EVENT_TYPE_MAP", {
664
664
  "map-mouseup": "mouseup",
665
665
  "map-dblclick": "dblclick"
666
666
  });
667
- const Ge = class extends nr {
667
+ const Ze = class extends or {
668
668
  addEventListener(t, e) {
669
- const r = Se(t, e);
669
+ const r = Re(t, e);
670
670
  if (this.eventMap.get(r)) {
671
671
  console.warn("listener已经添加过了", r, e);
672
672
  return;
@@ -679,14 +679,14 @@ const Ge = class extends nr {
679
679
  };
680
680
  n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
681
681
  };
682
- this.inner.addEventListener(Ge.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
682
+ this.inner.addEventListener(Ze.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
683
683
  }
684
684
  removeEventListener(t, e) {
685
- const r = Se(t, e), s = this.eventMap.get(r);
686
- s ? (this.inner.removeEventListener(Ge.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
685
+ const r = Re(t, e), s = this.eventMap.get(r);
686
+ s ? (this.inner.removeEventListener(Ze.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
687
687
  }
688
688
  };
689
- let ae = Ge;
689
+ let ae = Ze;
690
690
  // cSpell:words clickclose
691
691
  // 事件类型映射, tg => baidu
692
692
  c(ae, "EVENT_TYPE_MAP", {
@@ -697,7 +697,7 @@ c(ae, "EVENT_TYPE_MAP", {
697
697
  "zoom-changed": "zoomend",
698
698
  "map-type-changed": "maptypechange"
699
699
  });
700
- class or {
700
+ class ar {
701
701
  constructor() {
702
702
  c(this, "typeMap", /* @__PURE__ */ new Map());
703
703
  }
@@ -718,7 +718,7 @@ class or {
718
718
  e && e.forEach((r) => r.call(t.target, t));
719
719
  }
720
720
  }
721
- class Wt {
721
+ class jt {
722
722
  /**
723
723
  * `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
724
724
  */
@@ -736,7 +736,7 @@ class Wt {
736
736
  return this.keyToValue.get(t) ?? C();
737
737
  }
738
738
  }
739
- class di {
739
+ class ui {
740
740
  constructor(t, e = 10) {
741
741
  c(this, "map", /* @__PURE__ */ new Map());
742
742
  this.values = t, this.maxSize4Debug = e;
@@ -765,7 +765,7 @@ class di {
765
765
  return this.getOrNull(t, e) ?? C(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
766
766
  }
767
767
  }
768
- class fe {
768
+ class ye {
769
769
  constructor(t) {
770
770
  c(this, "value");
771
771
  this.creator = t;
@@ -793,7 +793,7 @@ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
793
793
  /* RIGHT_BOTTOM */
794
794
  ];
795
795
  function s() {
796
- return t || (t = new Wt(r, [
796
+ return t || (t = new jt(r, [
797
797
  /* | @tg/map |名字相同| baidu | */
798
798
  /* TOP_LEFT = */
799
799
  BMAP_ANCHOR_TOP_LEFT,
@@ -823,7 +823,7 @@ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
823
823
  }
824
824
  i.getBaidu = s;
825
825
  function n() {
826
- return e || (e = new Wt(r, [
826
+ return e || (e = new jt(r, [
827
827
  google.maps.ControlPosition.TOP_LEFT,
828
828
  google.maps.ControlPosition.TOP_CENTER,
829
829
  google.maps.ControlPosition.TOP_RIGHT,
@@ -840,16 +840,16 @@ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
840
840
  }
841
841
  i.getGoogle = n;
842
842
  })(z || (z = {}));
843
- class ui {
843
+ class pi {
844
844
  constructor(t) {
845
845
  /** 实际添加到地图中的control对象 */
846
846
  c(this, "inner");
847
847
  this.position = t;
848
848
  }
849
849
  }
850
- class ar {
850
+ class lr {
851
851
  }
852
- class dt extends ar {
852
+ class ut extends lr {
853
853
  constructor(t, e) {
854
854
  super(), this.inner = t, this.position = e;
855
855
  }
@@ -872,7 +872,7 @@ class dt extends ar {
872
872
  t.innerMap.removeControl(this.inner);
873
873
  }
874
874
  }
875
- class ut extends ar {
875
+ class pt extends lr {
876
876
  constructor(e, r) {
877
877
  super();
878
878
  c(this, "visible", !1);
@@ -909,7 +909,7 @@ class ut extends ar {
909
909
  });
910
910
  }
911
911
  }
912
- var lr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(lr || {});
912
+ var hr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(hr || {});
913
913
  class A {
914
914
  constructor(t, e, r, s) {
915
915
  this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
@@ -918,7 +918,7 @@ class A {
918
918
  return this.id;
919
919
  }
920
920
  getBaiduCoordType() {
921
- return B.bd09;
921
+ return P.bd09;
922
922
  }
923
923
  asBaiduMapType() {
924
924
  return this.baidu();
@@ -931,19 +931,19 @@ class A {
931
931
  return this.google();
932
932
  }
933
933
  asGoogleMapType() {
934
- ct("google的内置地图没有对应的实例");
934
+ dt("google的内置地图没有对应的实例");
935
935
  }
936
936
  }
937
- class Ws {
937
+ class js {
938
938
  constructor(t, e) {
939
- c(this, "baiduLayerCached", new fe(() => {
939
+ c(this, "baiduLayerCached", new ye(() => {
940
940
  const t = new BMap.TileLayer({});
941
941
  return t.getTilesUrl = (e, r) => {
942
942
  const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
943
943
  return this.options.getTileUrl({ x: n, y: a }, r);
944
944
  }, t;
945
945
  }));
946
- c(this, "baiduMapTypeCached", new fe(() => {
946
+ c(this, "baiduMapTypeCached", new ye(() => {
947
947
  const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
948
948
  maxZoom: this.options.maxZoom,
949
949
  minZoom: this.options.minZoom,
@@ -951,7 +951,7 @@ class Ws {
951
951
  });
952
952
  return t.__baidu_map_type__ = this, t;
953
953
  }));
954
- c(this, "googleCached", new fe(() => {
954
+ c(this, "googleCached", new ye(() => {
955
955
  const t = new google.maps.ImageMapType({
956
956
  getTileUrl: (e, r) => this.options.getTileUrl(e, r),
957
957
  tileSize: new google.maps.Size(256, 256),
@@ -983,13 +983,13 @@ class Ws {
983
983
  return this.googleCached.get();
984
984
  }
985
985
  asGoogleLayer() {
986
- ct("这个方法不会被调用");
986
+ dt("这个方法不会被调用");
987
987
  }
988
988
  }
989
- class pi {
989
+ class gi {
990
990
  constructor() {
991
- c(this, "baiduCache", new fe(() => new BMap.TrafficLayer()));
992
- c(this, "googleCache", new fe(() => new google.maps.TrafficLayer()));
991
+ c(this, "baiduCache", new ye(() => new BMap.TrafficLayer()));
992
+ c(this, "googleCache", new ye(() => new google.maps.TrafficLayer()));
993
993
  }
994
994
  asBaiduLayer() {
995
995
  return this.baiduCache.get();
@@ -1000,19 +1000,19 @@ class pi {
1000
1000
  }
1001
1001
  var $;
1002
1002
  ((i) => {
1003
- i.NORMAL = new A("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, B.gcj02), i.SATELLITE = new A("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, B.wgs84), i.HYBRID = new A("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, B.gcj02), i.TERRAIN = new A("terrain", () => (
1003
+ i.NORMAL = new A("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, P.gcj02), i.SATELLITE = new A("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, P.wgs84), i.HYBRID = new A("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, P.gcj02), i.TERRAIN = new A("terrain", () => (
1004
1004
  /* 三维 */
1005
1005
  BMAP_PERSPECTIVE_MAP
1006
1006
  ), () => (
1007
1007
  /* 地形 */
1008
1008
  google.maps.MapTypeId.TERRAIN
1009
- ), B.wgs84), i.BUILD_IN_MAP_TYPES = new di([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
1009
+ ), P.wgs84), i.BUILD_IN_MAP_TYPES = new ui([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
1010
1010
  })($ || ($ = {}));
1011
- var hr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(hr || {});
1012
- const cr = [$.NORMAL, $.SATELLITE, $.HYBRID];
1013
- class pt extends dt {
1011
+ var cr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(cr || {});
1012
+ const dr = [$.NORMAL, $.SATELLITE, $.HYBRID];
1013
+ class gt extends ut {
1014
1014
  static create(t) {
1015
- const e = t.mapTypes ?? cr, r = {
1015
+ const e = t.mapTypes ?? dr, r = {
1016
1016
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
1017
1017
  horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
1018
1018
  dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
@@ -1020,11 +1020,11 @@ class pt extends dt {
1020
1020
  type: t.type && r[t.type],
1021
1021
  mapTypes: e.map((n) => n.asBaiduMapType())
1022
1022
  });
1023
- return t.position && s.setAnchor(z.getBaidu().toValue(t.position)), new pt(s, t.position);
1023
+ return t.position && s.setAnchor(z.getBaidu().toValue(t.position)), new gt(s, t.position);
1024
1024
  }
1025
1025
  }
1026
- const ne = class extends ut {
1027
- constructor(t = "default", e = S.TOP_LEFT, r = cr) {
1026
+ const ne = class extends pt {
1027
+ constructor(t = "default", e = S.TOP_LEFT, r = dr) {
1028
1028
  super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
1029
1029
  default: google.maps.MapTypeControlStyle.DEFAULT,
1030
1030
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
@@ -1044,43 +1044,43 @@ const ne = class extends ut {
1044
1044
  });
1045
1045
  }
1046
1046
  };
1047
- let ke = ne;
1048
- c(ke, "type2google");
1049
- class gt extends dt {
1047
+ let Ie = ne;
1048
+ c(Ie, "type2google");
1049
+ class mt extends ut {
1050
1050
  static create(t) {
1051
1051
  const e = new BMap.ScaleControl({
1052
1052
  anchor: t.position && z.getBaidu().toValue(t.position)
1053
1053
  });
1054
- return new gt(e, t.position);
1054
+ return new mt(e, t.position);
1055
1055
  }
1056
1056
  }
1057
- class mt extends ut {
1057
+ class ft extends pt {
1058
1058
  static create(t) {
1059
- return new mt(t.position);
1059
+ return new ft(t.position);
1060
1060
  }
1061
1061
  constructor(t = S.BOTTOM_RIGHT) {
1062
1062
  super("scale", t);
1063
1063
  }
1064
1064
  }
1065
- class ft extends dt {
1065
+ class yt extends ut {
1066
1066
  static create(t) {
1067
1067
  const e = new BMap.NavigationControl({
1068
1068
  type: BMAP_NAVIGATION_CONTROL_ZOOM,
1069
1069
  // enableGeolocation: true,
1070
1070
  anchor: t.position && z.getBaidu().toValue(t.position)
1071
1071
  });
1072
- return new ft(e, t.position);
1072
+ return new yt(e, t.position);
1073
1073
  }
1074
1074
  }
1075
- class yt extends ut {
1075
+ class vt extends pt {
1076
1076
  static create(t) {
1077
- return new yt(t.position);
1077
+ return new vt(t.position);
1078
1078
  }
1079
1079
  constructor(t = S.RIGHT_BOTTOM) {
1080
1080
  super("zoom", t);
1081
1081
  }
1082
1082
  }
1083
- function gi(i) {
1083
+ function mi(i) {
1084
1084
  let t, e, r;
1085
1085
  const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", h = "__ib__", o = document, l = window, d = l[n] || (l[n] = {}), u = d.maps || (d.maps = {}), p = /* @__PURE__ */ new Set(), b = new URLSearchParams(), _ = () => t || (t = new Promise(async (T, g) => {
1086
1086
  var f;
@@ -1091,17 +1091,17 @@ function gi(i) {
1091
1091
  }));
1092
1092
  u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (T, ...g) => p.add(T) && _().then(() => u[a](T, ...g));
1093
1093
  }
1094
- let mi, fi;
1094
+ let fi, yi;
1095
1095
  const J = {
1096
1096
  /** Google的坐标0点 */
1097
1097
  get LATLNG_ZERO() {
1098
- return mi ?? (mi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1098
+ return fi ?? (fi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1099
1099
  },
1100
1100
  get BOUNDS_ZERO() {
1101
- return fi ?? (fi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1101
+ return yi ?? (yi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1102
1102
  }
1103
1103
  };
1104
- function dr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1104
+ function ur(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1105
1105
  for (const e of i)
1106
1106
  for (const r of e.types)
1107
1107
  switch (r) {
@@ -1126,9 +1126,9 @@ function dr(i, t = { country: "", province: "", city: "", district: "", street:
1126
1126
  }
1127
1127
  return t;
1128
1128
  }
1129
- function ur(i, t) {
1129
+ function pr(i, t) {
1130
1130
  var r;
1131
- const e = i.address_components && dr(i.address_components);
1131
+ const e = i.address_components && ur(i.address_components);
1132
1132
  return {
1133
1133
  country: (e == null ? void 0 : e.country) ?? "",
1134
1134
  province: (e == null ? void 0 : e.province) ?? "",
@@ -1139,9 +1139,9 @@ function ur(i, t) {
1139
1139
  title: i.name ?? ""
1140
1140
  };
1141
1141
  }
1142
- class pr {
1142
+ class gr {
1143
1143
  }
1144
- class yi extends pr {
1144
+ class vi extends gr {
1145
1145
  constructor(e, r) {
1146
1146
  super();
1147
1147
  c(this, "inner");
@@ -1157,7 +1157,7 @@ class yi extends pr {
1157
1157
  this.inner.setBounds(e.toGoogle(this.map.coordType));
1158
1158
  }
1159
1159
  addResultListener(e) {
1160
- return sr(this.inner, "place_changed", () => {
1160
+ return nr(this.inner, "place_changed", () => {
1161
1161
  const r = this.inner.getPlace(), s = {
1162
1162
  title: r.name ?? "",
1163
1163
  province: "",
@@ -1167,11 +1167,11 @@ class yi extends pr {
1167
1167
  streetNumber: "",
1168
1168
  country: ""
1169
1169
  };
1170
- r.address_components && dr(r.address_components, s), e(s);
1170
+ r.address_components && ur(r.address_components, s), e(s);
1171
1171
  });
1172
1172
  }
1173
1173
  }
1174
- class vi extends pr {
1174
+ class _i extends gr {
1175
1175
  constructor(e, r) {
1176
1176
  super();
1177
1177
  c(this, "inner");
@@ -1185,7 +1185,7 @@ class vi extends pr {
1185
1185
  const s = () => {
1186
1186
  this.inner.setLocation(this.map.innerMap);
1187
1187
  };
1188
- this.removeableArray.push(Zt(this.map, "center-changed", s)), this.removeableArray.push(Zt(this.map, "zoom-changed", s));
1188
+ this.removeableArray.push(Wt(this.map, "center-changed", s)), this.removeableArray.push(Wt(this.map, "zoom-changed", s));
1189
1189
  }
1190
1190
  }
1191
1191
  setBounds(e) {
@@ -1193,14 +1193,14 @@ class vi extends pr {
1193
1193
  }
1194
1194
  addResultListener(e) {
1195
1195
  let r = 0;
1196
- const s = hi(this.inner, "confirm", (a) => {
1196
+ const s = ci(this.inner, "confirm", (a) => {
1197
1197
  const h = a.item.value;
1198
1198
  r = Date.now(), e(Object.assign({
1199
1199
  title: h.business,
1200
1200
  country: ""
1201
1201
  // Baidu的自动完成只支持中国
1202
1202
  }, h));
1203
- }), n = ci(this.input, "keyup", (a) => {
1203
+ }), n = di(this.input, "keyup", (a) => {
1204
1204
  a.key === "Enter" && Date.now() - r > 100 && e({
1205
1205
  title: this.input.value,
1206
1206
  country: "",
@@ -1216,75 +1216,109 @@ class vi extends pr {
1216
1216
  };
1217
1217
  }
1218
1218
  }
1219
- class gr {
1219
+ class mr {
1220
1220
  constructor(t) {
1221
1221
  this.options = t;
1222
1222
  }
1223
1223
  }
1224
- function Re(i, t, e) {
1225
- const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(Fr));
1224
+ function ve(i, t, e) {
1225
+ const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(Ur));
1226
1226
  return r.search = "?" + s.toString(), r;
1227
1227
  }
1228
- const Ze = class extends gr {
1228
+ function Qe() {
1229
+ const i = window.location.hostname.split(".").filter((t) => !de.isInt(t));
1230
+ return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
1231
+ }
1232
+ const We = class extends mr {
1229
1233
  /** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
1230
1234
  directions(t, e, r) {
1231
- return Re(Ze.BASE_URL, "dir/", {
1235
+ return ve(We.BASE_URL, "dir/", {
1232
1236
  api: "1",
1233
1237
  // {@template google_map_normal_gcj02}
1234
1238
  // google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
1235
1239
  // {@endtemplate}
1236
- origin: V.toString(t, B.gcj02),
1237
- destination: V.toString(e, B.gcj02),
1240
+ origin: V.toString(t, P.gcj02),
1241
+ destination: V.toString(e, P.gcj02),
1238
1242
  travelmode: r
1239
1243
  });
1240
1244
  }
1241
1245
  /** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
1242
1246
  search(t) {
1243
- return Re(Ze.BASE_URL, "search/", {
1247
+ return ve(We.BASE_URL, "search/", {
1244
1248
  api: "1",
1245
1249
  // {@macro google_map_normal_gcj02}
1246
- query: V.toString(t, B.gcj02)
1250
+ query: V.toString(t, P.gcj02)
1247
1251
  });
1248
1252
  }
1249
1253
  };
1250
- let Be = Ze;
1251
- c(Be, "BASE_URL", "https://www.google.com/maps/");
1252
- const We = class extends gr {
1253
- /** @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1 */
1254
+ let Se = We;
1255
+ c(Se, "BASE_URL", "https://www.google.com/maps/");
1256
+ const be = class extends mr {
1257
+ /**
1258
+ * 导航
1259
+ * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1
1260
+ * */
1254
1261
  directions(t, e, r = "driving") {
1255
- const s = V.getCoordType(e) ?? V.getCoordType(t) ?? B.bd09, n = V.toString(e, s);
1256
- return Re(We.BASE_URL, "direction", {
1262
+ const s = V.getCoordType(e) ?? V.getCoordType(t) ?? P.bd09, n = V.toString(e, s);
1263
+ return ve(be.BASE_URL, "direction", {
1257
1264
  // baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
1258
1265
  origin: V.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
1259
1266
  destination: n,
1260
1267
  // 默认就是bd09
1261
- coord_type: s === B.bd09 ? void 0 : s,
1268
+ coord_type: s === P.bd09 ? void 0 : s,
1262
1269
  mode: r,
1263
1270
  output: "html",
1264
1271
  region: "中国",
1265
- src: window.location.hostname
1272
+ src: Qe()
1266
1273
  });
1267
1274
  }
1268
- /** @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5 */
1269
1275
  search(t) {
1270
- return Re(We.BASE_URL, "geocoder", {
1276
+ return typeof t == "string" ? this.geocoderApi(t) : this.markerApi(t, "", "");
1277
+ }
1278
+ /**
1279
+ * 显示经纬度, {@link markerApi}中途跳转的url, 一定能够定位到
1280
+ * */
1281
+ latlngApi(t) {
1282
+ const e = t.to(P.bd09);
1283
+ return new URL(`https://map.baidu.com/?latlng=${e.lat},${e.lng}`);
1284
+ }
1285
+ /**
1286
+ * 显示marker点, 由于缓存等因素的存在, 不一定能够定位到点
1287
+ * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD
1288
+ */
1289
+ markerApi(t, e, r) {
1290
+ return ve(be.BASE_URL, "marker", {
1291
+ location: `${t.lat},${t.lng}`,
1292
+ coord_type: t.coord === P.bd09 ? void 0 : t.coord,
1293
+ title: e,
1294
+ content: r,
1295
+ output: "html",
1296
+ src: Qe()
1297
+ });
1298
+ }
1299
+ /**
1300
+ * 编码/反编码, 由于缓存等因素的存在, 不一定能够定位到点
1301
+ * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5
1302
+ * */
1303
+ geocoderApi(t) {
1304
+ return ve(be.BASE_URL, "geocoder", {
1271
1305
  ...typeof t == "string" ? {
1272
1306
  address: t
1273
1307
  } : {
1274
1308
  location: `${t.lat},${t.lng}`,
1275
1309
  // 默认就是bd09
1276
- coord_type: t.coord === B.bd09 ? void 0 : t.coord
1310
+ coord_type: t.coord === P.bd09 ? void 0 : t.coord
1277
1311
  },
1278
1312
  output: "html",
1279
- src: window.location.hostname
1313
+ src: Qe()
1280
1314
  });
1281
1315
  }
1282
1316
  };
1283
- let Ie = We;
1284
- c(Ie, "BASE_URL", "https://api.map.baidu.com/");
1285
- let _i = class mr {
1317
+ let Ae = be;
1318
+ c(Ae, "BASE_URL", "https://api.map.baidu.com/");
1319
+ let bi = class fr {
1286
1320
  constructor(t, e, r) {
1287
- this.extend(mr, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1321
+ this.extend(fr, google.maps.OverlayView), this.map_ = t, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1288
1322
  var s = r || {};
1289
1323
  this.zIndex_ = s.zIndex || google.maps.Marker.MAX_ZINDEX + 1, this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || null, this.styles_ = s.styles || [], this.imagePath_ = s.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = s.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, s.zoomOnClick != null && (this.zoomOnClick_ = s.zoomOnClick), this.averageCenter_ = !1, s.averageCenter != null && (this.averageCenter_ = s.averageCenter), this.setupStyles_(), this.setMap(t), this.prevZoom_ = this.map_.getZoom();
1290
1324
  var n = this;
@@ -1703,7 +1737,7 @@ let _i = class mr {
1703
1737
  if (r && r.isMarkerInClusterBounds(t))
1704
1738
  r.addMarker(t);
1705
1739
  else {
1706
- var o = new bi(this);
1740
+ var o = new Ti(this);
1707
1741
  o.addMarker(t), this.clusters_.push(o);
1708
1742
  }
1709
1743
  }
@@ -1720,9 +1754,9 @@ let _i = class mr {
1720
1754
  ), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
1721
1755
  !s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
1722
1756
  }
1723
- }, bi = class {
1757
+ }, Ti = class {
1724
1758
  constructor(t) {
1725
- this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new vt(
1759
+ this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new _t(
1726
1760
  this,
1727
1761
  t.getStyles(),
1728
1762
  t.getGridSize()
@@ -1856,9 +1890,9 @@ let _i = class mr {
1856
1890
  this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
1857
1891
  }
1858
1892
  };
1859
- class vt {
1893
+ class _t {
1860
1894
  constructor(t, e, r) {
1861
- t.getMarkerClusterer().extend(vt, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1895
+ t.getMarkerClusterer().extend(_t, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1862
1896
  }
1863
1897
  /**
1864
1898
  * Triggers the clusterclick event and zoom's if the option is set.
@@ -1989,11 +2023,11 @@ class vt {
1989
2023
  ), e.join("");
1990
2024
  }
1991
2025
  }
1992
- var fr = { exports: {} };
2026
+ var yr = { exports: {} };
1993
2027
  (function(i, t) {
1994
2028
  (function(e, r) {
1995
2029
  i.exports = r();
1996
- })(Xt, function() {
2030
+ })(Jt, function() {
1997
2031
  var e, r = e = r || { version: "1.3.8" }, s = {};
1998
2032
  r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
1999
2033
  return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
@@ -2182,25 +2216,25 @@ var fr = { exports: {} };
2182
2216
  });
2183
2217
  }, h;
2184
2218
  });
2185
- })(fr);
2186
- var Ti = fr.exports;
2187
- const Ht = /* @__PURE__ */ lt(Ti);
2188
- var yr = function(i, t, e) {
2189
- t = Mi(t);
2219
+ })(yr);
2220
+ var Mi = yr.exports;
2221
+ const Ht = /* @__PURE__ */ ht(Mi);
2222
+ var vr = function(i, t, e) {
2223
+ t = Oi(t);
2190
2224
  var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
2191
2225
  r.x += e, r.y -= e, s.x -= e, s.y += e;
2192
2226
  var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
2193
2227
  return new BMap.Bounds(a, n);
2194
- }, Mi = function(i) {
2195
- var t = Pe(i.getNorthEast().lng, -180, 180), e = Pe(i.getSouthWest().lng, -180, 180), r = Pe(i.getNorthEast().lat, -74, 74), s = Pe(i.getSouthWest().lat, -74, 74);
2228
+ }, Oi = function(i) {
2229
+ var t = ke(i.getNorthEast().lng, -180, 180), e = ke(i.getSouthWest().lng, -180, 180), r = ke(i.getNorthEast().lat, -74, 74), s = ke(i.getSouthWest().lat, -74, 74);
2196
2230
  return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
2197
- }, Pe = function(i, t, e) {
2231
+ }, ke = function(i, t, e) {
2198
2232
  return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
2199
- }, vr = function(i) {
2233
+ }, _r = function(i) {
2200
2234
  return Object.prototype.toString.call(i) === "[object Array]";
2201
- }, _r = function(i, t) {
2235
+ }, br = function(i, t) {
2202
2236
  var e = -1;
2203
- if (vr(t)) {
2237
+ if (_r(t)) {
2204
2238
  if (t.indexOf)
2205
2239
  e = t.indexOf(i);
2206
2240
  else
@@ -2228,7 +2262,7 @@ var yr = function(i, t, e) {
2228
2262
  r._redraw();
2229
2263
  });
2230
2264
  var s = e.markers;
2231
- vr(s) && this.addMarkers(s);
2265
+ _r(s) && this.addMarkers(s);
2232
2266
  }
2233
2267
  };
2234
2268
  M.prototype.addMarkers = function(i) {
@@ -2239,7 +2273,7 @@ M.prototype.addMarkers = function(i) {
2239
2273
  }
2240
2274
  };
2241
2275
  M.prototype._pushMarkerTo = function(i) {
2242
- var t = _r(i, this._markers);
2276
+ var t = br(i, this._markers);
2243
2277
  t === -1 && (i.isInCluster = !1, this._markers.push(i));
2244
2278
  };
2245
2279
  M.prototype.addMarker = function(i) {
@@ -2248,7 +2282,7 @@ M.prototype.addMarker = function(i) {
2248
2282
  M.prototype._createClusters = function() {
2249
2283
  var i = this._map.getBounds();
2250
2284
  if (i.getCenter()) {
2251
- for (var t = yr(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2285
+ for (var t = vr(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2252
2286
  !r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
2253
2287
  for (var s = this._markers.length, e = 0; e < s; e++)
2254
2288
  this._clusters[e] && this._clusters[e].render();
@@ -2288,7 +2322,7 @@ M.prototype._removeMarkersFromMap = function() {
2288
2322
  }
2289
2323
  };
2290
2324
  M.prototype._removeMarker = function(i) {
2291
- var t = _r(i, this._markers);
2325
+ var t = br(i, this._markers);
2292
2326
  return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
2293
2327
  };
2294
2328
  M.prototype.removeMarker = function(i) {
@@ -2412,7 +2446,7 @@ N.prototype.isReal = function(i) {
2412
2446
  };
2413
2447
  N.prototype.updateGridBounds = function() {
2414
2448
  var i = new BMap.Bounds(this._center, this._center);
2415
- this._gridBounds = yr(this._map, i, this._markerClusterer.getGridSize());
2449
+ this._gridBounds = vr(this._map, i, this._markerClusterer.getGridSize());
2416
2450
  };
2417
2451
  N.prototype.updateClusterMarker = function() {
2418
2452
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
@@ -2442,7 +2476,7 @@ N.prototype.getBounds = function() {
2442
2476
  N.prototype.getCenter = function() {
2443
2477
  return this._center;
2444
2478
  };
2445
- var $e;
2479
+ var ze;
2446
2480
  ((i) => {
2447
2481
  function t(r) {
2448
2482
  return {
@@ -2467,8 +2501,8 @@ var $e;
2467
2501
  };
2468
2502
  }
2469
2503
  i.toGoogle = e;
2470
- })($e || ($e = {}));
2471
- class br {
2504
+ })(ze || (ze = {}));
2505
+ class Tr {
2472
2506
  constructor(t) {
2473
2507
  this.map = t;
2474
2508
  }
@@ -2493,7 +2527,7 @@ class br {
2493
2527
  return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
2494
2528
  }
2495
2529
  }
2496
- class Oi extends br {
2530
+ class Ci extends Tr {
2497
2531
  constructor(e, r) {
2498
2532
  var n;
2499
2533
  super(e);
@@ -2505,7 +2539,7 @@ class Oi extends br {
2505
2539
  maxZoom: r.maxZoom,
2506
2540
  minClusterSize: r.minClusterSize,
2507
2541
  isAverageCenter: r.averageCenter,
2508
- styles: (n = r.styles) == null ? void 0 : n.map((a) => $e.toBaidu(a)),
2542
+ styles: (n = r.styles) == null ? void 0 : n.map((a) => ze.toBaidu(a)),
2509
2543
  zIndex: r.zIndex
2510
2544
  });
2511
2545
  const s = r.stylesIndexCalculator;
@@ -2515,12 +2549,12 @@ class Oi extends br {
2515
2549
  this.inner._redraw();
2516
2550
  }
2517
2551
  }
2518
- class Ci extends br {
2552
+ class wi extends Tr {
2519
2553
  constructor(e, r) {
2520
2554
  var n, a;
2521
2555
  super(e);
2522
2556
  c(this, "inner");
2523
- this.inner = new _i(
2557
+ this.inner = new bi(
2524
2558
  e.innerMap,
2525
2559
  // google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
2526
2560
  (n = r.markers) == null ? void 0 : n.map((h) => h.innerOverlay),
@@ -2529,7 +2563,7 @@ class Ci extends br {
2529
2563
  maxZoom: r.maxZoom,
2530
2564
  minimumClusterSize: r.minClusterSize,
2531
2565
  averageCenter: r.averageCenter,
2532
- styles: (a = r.styles) == null ? void 0 : a.map((h) => $e.toGoogle(h)),
2566
+ styles: (a = r.styles) == null ? void 0 : a.map((h) => ze.toGoogle(h)),
2533
2567
  zIndex: r.zIndex
2534
2568
  }
2535
2569
  );
@@ -2544,11 +2578,11 @@ class Ci extends br {
2544
2578
  this.inner.repaint();
2545
2579
  }
2546
2580
  }
2547
- class Tr {
2581
+ class Mr {
2548
2582
  constructor() {
2549
2583
  }
2550
2584
  }
2551
- class wi extends Tr {
2585
+ class Ei extends Mr {
2552
2586
  constructor(e, r) {
2553
2587
  super();
2554
2588
  c(this, "inner");
@@ -2582,7 +2616,7 @@ class wi extends Tr {
2582
2616
  switch (h) {
2583
2617
  case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
2584
2618
  case google.maps.places.PlacesServiceStatus.OK: {
2585
- const o = (a ?? []).map((l) => ur(l, this.map));
2619
+ const o = (a ?? []).map((l) => pr(l, this.map));
2586
2620
  s(o);
2587
2621
  break;
2588
2622
  }
@@ -2594,7 +2628,7 @@ class wi extends Tr {
2594
2628
  });
2595
2629
  }
2596
2630
  }
2597
- class Ei extends Tr {
2631
+ class Li extends Mr {
2598
2632
  constructor(e, r) {
2599
2633
  super();
2600
2634
  c(this, "searchRequestMap", /* @__PURE__ */ new Map());
@@ -2626,7 +2660,7 @@ class Ei extends Tr {
2626
2660
  return new Promise((s, n) => {
2627
2661
  const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
2628
2662
  onSearchComplete: (h) => {
2629
- Array.isArray(h) && ct("当前只支持一次搜索一条数据");
2663
+ Array.isArray(h) && dt("当前只支持一次搜索一条数据");
2630
2664
  const o = a.getStatus();
2631
2665
  switch (o) {
2632
2666
  case BMAP_STATUS_SUCCESS: {
@@ -2660,7 +2694,7 @@ class Ei extends Tr {
2660
2694
  });
2661
2695
  }
2662
2696
  }
2663
- class Mr {
2697
+ class Or {
2664
2698
  constructor(t, e) {
2665
2699
  c(this, "onData");
2666
2700
  c(this, "onError");
@@ -2672,26 +2706,26 @@ class Mr {
2672
2706
  * @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
2673
2707
  * */
2674
2708
  setSearchListener(t, e) {
2675
- return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, ve;
2709
+ return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Te;
2676
2710
  }
2677
2711
  }
2678
- class Li extends Mr {
2712
+ class Pi extends Or {
2679
2713
  constructor(e, r) {
2680
2714
  super(e, r.input);
2681
2715
  c(this, "searchBox");
2682
2716
  this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
2683
2717
  }
2684
2718
  setSearchListener(e, r) {
2685
- return super.setSearchListener(e, r), sr(this.searchBox, "places_changed", () => {
2719
+ return super.setSearchListener(e, r), nr(this.searchBox, "places_changed", () => {
2686
2720
  const s = this.searchBox.getPlaces();
2687
- e((s ?? []).map((n) => ur(n, this.map)));
2721
+ e((s ?? []).map((n) => pr(n, this.map)));
2688
2722
  });
2689
2723
  }
2690
2724
  search() {
2691
2725
  this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
2692
2726
  }
2693
2727
  }
2694
- class Pi extends Mr {
2728
+ class xi extends Or {
2695
2729
  constructor(e, r) {
2696
2730
  super(e, r.input);
2697
2731
  c(this, "autocomplete");
@@ -2710,8 +2744,8 @@ class Pi extends Mr {
2710
2744
  this.placesService.search(e).then(this.onData, this.onError);
2711
2745
  }
2712
2746
  }
2713
- var xi = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(xi || {});
2714
- class _t {
2747
+ var ki = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(ki || {});
2748
+ class bt {
2715
2749
  constructor(t) {
2716
2750
  c(this, "latestInfoWindow");
2717
2751
  /** 使用{@link setEventTargetDelegate}初始化 */
@@ -2764,7 +2798,7 @@ class _t {
2764
2798
  * Copyright (c) 2014-2017, Jon Schlinkert.
2765
2799
  * Released under the MIT License.
2766
2800
  */
2767
- function ki(i) {
2801
+ function Bi(i) {
2768
2802
  return i != null && typeof i == "object" && Array.isArray(i) === !1;
2769
2803
  }
2770
2804
  /*!
@@ -2773,14 +2807,14 @@ function ki(i) {
2773
2807
  * Copyright (c) 2014-2017, Jon Schlinkert.
2774
2808
  * Released under the MIT License.
2775
2809
  */
2776
- function jt(i) {
2777
- return ki(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2810
+ function Vt(i) {
2811
+ return Bi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2778
2812
  }
2779
- function Or(i) {
2813
+ function Cr(i) {
2780
2814
  var t, e;
2781
- return !(jt(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, jt(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2815
+ return !(Vt(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, Vt(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2782
2816
  }
2783
- var be;
2817
+ var Oe;
2784
2818
  ((i) => {
2785
2819
  function t(h, o) {
2786
2820
  return h.reduce((l, d) => (l[o(d)] = d, l), {});
@@ -2795,27 +2829,27 @@ var be;
2795
2829
  }
2796
2830
  i.toJsonSafely = r;
2797
2831
  function s(h) {
2798
- Or(h) && Object.keys(h).forEach((o) => {
2832
+ Cr(h) && Object.keys(h).forEach((o) => {
2799
2833
  h[o] === void 0 ? delete h[o] : s(h[o]);
2800
2834
  });
2801
2835
  }
2802
2836
  i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
2803
2837
  function n(h, ...o) {
2804
- const l = Vt(o), d = {};
2838
+ const l = Ft(o), d = {};
2805
2839
  for (const u in h)
2806
2840
  l(u) || (d[u] = h[u]);
2807
2841
  return d;
2808
2842
  }
2809
2843
  i.omit = n;
2810
2844
  function a(h, ...o) {
2811
- const l = Vt(o), d = {};
2845
+ const l = Ft(o), d = {};
2812
2846
  for (const u in h)
2813
2847
  l(u) && (d[u] = h[u]);
2814
2848
  return d;
2815
2849
  }
2816
2850
  i.pick = a;
2817
- })(be || (be = {}));
2818
- function Vt(i) {
2851
+ })(Oe || (Oe = {}));
2852
+ function Ft(i) {
2819
2853
  if (i.length <= 4)
2820
2854
  return i.includes.bind(i);
2821
2855
  {
@@ -2823,20 +2857,20 @@ function Vt(i) {
2823
2857
  return t.has.bind(t);
2824
2858
  }
2825
2859
  }
2826
- be.toJsonSafely;
2827
- const Bi = ["single", "multi"];
2828
- var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), ot;
2860
+ Oe.toJsonSafely;
2861
+ const Ii = ["single", "multi"];
2862
+ var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), at;
2829
2863
  ((i) => {
2830
2864
  function t(e) {
2831
- be.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2865
+ Oe.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2832
2866
  const r = { center: y.ZERO, zoom: 5 };
2833
- return tr(r, e || {}, {
2834
- isMergeableObject: Or
2867
+ return rr(r, e || {}, {
2868
+ isMergeableObject: Cr
2835
2869
  });
2836
2870
  }
2837
2871
  i.create = t;
2838
- })(ot || (ot = {}));
2839
- class Cr {
2872
+ })(at || (at = {}));
2873
+ class wr {
2840
2874
  constructor(t, e, r) {
2841
2875
  c(this, "_delegate");
2842
2876
  this.innerOverlay = t, this.coordType = e, this.map = r;
@@ -2854,7 +2888,7 @@ class Cr {
2854
2888
  this.map.removeOverlay(this);
2855
2889
  }
2856
2890
  }
2857
- class bt extends Cr {
2891
+ class Tt extends wr {
2858
2892
  constructor(t, e, r) {
2859
2893
  super(t, e, r);
2860
2894
  }
@@ -2868,7 +2902,7 @@ class bt extends Cr {
2868
2902
  this.innerOverlay.setVisible(t);
2869
2903
  }
2870
2904
  }
2871
- class Ue extends Cr {
2905
+ class Ue extends wr {
2872
2906
  constructor(t, e, r) {
2873
2907
  super(t, e, r);
2874
2908
  }
@@ -2890,7 +2924,7 @@ class Ue extends Cr {
2890
2924
  return t !== void 0 && (t || this.setVisible(!1)), this;
2891
2925
  }
2892
2926
  }
2893
- const He = class extends Ue {
2927
+ const je = class extends Ue {
2894
2928
  constructor(t, e, r, s) {
2895
2929
  super(t, e, r), this.state = s;
2896
2930
  }
@@ -2904,7 +2938,7 @@ const He = class extends Ue {
2904
2938
  this.innerOverlay.setStrokeColor(t);
2905
2939
  }
2906
2940
  setStrokeOpacity(t) {
2907
- this.innerOverlay.setStrokeOpacity(t + He.OPACITY_DELTA);
2941
+ this.innerOverlay.setStrokeOpacity(t + je.OPACITY_DELTA);
2908
2942
  }
2909
2943
  setStrokeWeight(t) {
2910
2944
  this.innerOverlay.setStrokeWeight(t);
@@ -2913,10 +2947,10 @@ const He = class extends Ue {
2913
2947
  this.innerOverlay.setFillColor(t);
2914
2948
  }
2915
2949
  setFillOpacity(t) {
2916
- this.innerOverlay.setFillOpacity(t + He.OPACITY_DELTA);
2950
+ this.innerOverlay.setFillOpacity(t + je.OPACITY_DELTA);
2917
2951
  }
2918
2952
  };
2919
- let I = He;
2953
+ let I = je;
2920
2954
  /**
2921
2955
  * baidu地图的透明度属性有如下问题:
2922
2956
  * - 在透明度为0时, 无法隐藏掉颜色
@@ -2924,7 +2958,7 @@ let I = He;
2924
2958
  * 故统一加个0.001, 规避这些问题...
2925
2959
  */
2926
2960
  c(I, "OPACITY_DELTA", 1e-3);
2927
- class Ye extends bt {
2961
+ class Ye extends Tt {
2928
2962
  isEditable() {
2929
2963
  return this.innerOverlay.getEditable();
2930
2964
  }
@@ -2947,7 +2981,7 @@ class Ye extends bt {
2947
2981
  this.innerOverlay.setOptions({ fillOpacity: t });
2948
2982
  }
2949
2983
  }
2950
- class Tt extends I {
2984
+ class Mt extends I {
2951
2985
  constructor() {
2952
2986
  super(...arguments);
2953
2987
  c(this, "prevCenter");
@@ -2978,7 +3012,7 @@ class Tt extends I {
2978
3012
  strokeWeight: e.strokeWeight,
2979
3013
  fillColor: e.fillColor,
2980
3014
  fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
2981
- }), n = new Tt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3015
+ }), n = new Mt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2982
3016
  return n.state.editable && setTimeout(() => {
2983
3017
  n.state.editable && s.enableEditing();
2984
3018
  }, 0), n;
@@ -3009,7 +3043,7 @@ class Tt extends I {
3009
3043
  return this.innerOverlay.getRadius();
3010
3044
  }
3011
3045
  }
3012
- class Mt extends Ye {
3046
+ class Ot extends Ye {
3013
3047
  static create(t) {
3014
3048
  const e = this.coordType, r = new google.maps.Circle({
3015
3049
  center: t.center.toGoogle(e),
@@ -3023,7 +3057,7 @@ class Mt extends Ye {
3023
3057
  fillOpacity: t.fillOpacity,
3024
3058
  visible: t.visible
3025
3059
  });
3026
- return new Mt(r, e, this);
3060
+ return new Ot(r, e, this);
3027
3061
  }
3028
3062
  setCenter(t) {
3029
3063
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
@@ -3038,10 +3072,10 @@ class Mt extends Ye {
3038
3072
  return this.innerOverlay.getRadius();
3039
3073
  }
3040
3074
  }
3041
- function wr() {
3075
+ function Er() {
3042
3076
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
3043
3077
  }
3044
- const Ft = {
3078
+ const Ut = {
3045
3079
  /** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
3046
3080
  equals(i, t) {
3047
3081
  return i.lat === t.lat && i.lng === t.lng;
@@ -3051,12 +3085,12 @@ var X;
3051
3085
  ((i) => {
3052
3086
  i.ZERO = { x: 0, y: 0 };
3053
3087
  })(X || (X = {}));
3054
- let Qe;
3055
- function Ii(i, t, e, r, s, n) {
3056
- return Qe || (Qe = Si()), new Qe(i, t, e, r, s, n);
3088
+ let et;
3089
+ function Si(i, t, e, r, s, n) {
3090
+ return et || (et = Ai()), new et(i, t, e, r, s, n);
3057
3091
  }
3058
- function Si() {
3059
- wr();
3092
+ function Ai() {
3093
+ Er();
3060
3094
  const i = new BMap.Point(0, 0);
3061
3095
  return class extends BMap.OverlayV3 {
3062
3096
  constructor(r, s = i, n = X.ZERO, a, h = 654, o = "") {
@@ -3122,7 +3156,7 @@ function Si() {
3122
3156
  }
3123
3157
  };
3124
3158
  }
3125
- class Ot {
3159
+ class Ct {
3126
3160
  constructor(t) {
3127
3161
  this.delegate = t, this.delegate.setTarget(this);
3128
3162
  }
@@ -3133,7 +3167,7 @@ class Ot {
3133
3167
  this.delegate.removeEventListener(t, e);
3134
3168
  }
3135
3169
  }
3136
- class Ct extends Ot {
3170
+ class wt extends Ct {
3137
3171
  constructor(t, e, r) {
3138
3172
  super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
3139
3173
  }
@@ -3143,7 +3177,7 @@ class Ct extends Ot {
3143
3177
  offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
3144
3178
  enableAutoPan: !t.disableAutoPan
3145
3179
  });
3146
- return new Ct(r, this, { position: e });
3180
+ return new wt(r, this, { position: e });
3147
3181
  }
3148
3182
  isOpen() {
3149
3183
  return this.inner.isOpen();
@@ -3162,10 +3196,10 @@ class Ct extends Ot {
3162
3196
  this.state.position = t, this.inner.isOpen() && this.open();
3163
3197
  }
3164
3198
  }
3165
- class wt extends Ot {
3199
+ class Et extends Ct {
3166
3200
  constructor(e, r) {
3167
3201
  super(new re(e, r));
3168
- c(this, "eventHub", new or());
3202
+ c(this, "eventHub", new ar());
3169
3203
  c(this, "isOpened", !1);
3170
3204
  this.inner = e, this.map = r, e.addListener("closeclick", () => {
3171
3205
  this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
@@ -3182,7 +3216,7 @@ class wt extends Ot {
3182
3216
  position: r.toGoogle(this.coordType),
3183
3217
  disableAutoPan: e.disableAutoPan
3184
3218
  });
3185
- return new wt(s, this);
3219
+ return new Et(s, this);
3186
3220
  }
3187
3221
  isOpen() {
3188
3222
  return this.isOpened;
@@ -3220,13 +3254,13 @@ class wt extends Ot {
3220
3254
  this.inner.setPosition(e.toGoogle(this.map.coordType));
3221
3255
  }
3222
3256
  }
3223
- class Et extends Ue {
3257
+ class Lt extends Ue {
3224
3258
  constructor(t, e, r) {
3225
3259
  super(t, e, r), this.baiduMap = r;
3226
3260
  }
3227
3261
  static create(t) {
3228
3262
  var s;
3229
- const e = this.coordType, r = Ii(
3263
+ const e = this.coordType, r = Si(
3230
3264
  t.content,
3231
3265
  (s = t.position) == null ? void 0 : s.toBaidu(e),
3232
3266
  t.offset,
@@ -3234,7 +3268,7 @@ class Et extends Ue {
3234
3268
  t.maxWidth,
3235
3269
  t.borderClass
3236
3270
  );
3237
- return new Et(r, e, this);
3271
+ return new Lt(r, e, this);
3238
3272
  }
3239
3273
  open(t) {
3240
3274
  this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
@@ -3255,7 +3289,7 @@ class Et extends Ue {
3255
3289
  this.innerOverlay.setZIndex(t);
3256
3290
  }
3257
3291
  }
3258
- class Lt extends Ot {
3292
+ class Pt extends Ct {
3259
3293
  constructor(t, e, r) {
3260
3294
  super(new re(t, r)), this.inner = t, this.coordType = e, this.map = r;
3261
3295
  }
@@ -3272,7 +3306,7 @@ class Lt extends Ot {
3272
3306
  var h;
3273
3307
  const a = (h = t.content.parentElement) == null ? void 0 : h.parentElement;
3274
3308
  a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
3275
- }), new Lt(r, e, this);
3309
+ }), new Pt(r, e, this);
3276
3310
  }
3277
3311
  open(t) {
3278
3312
  this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
@@ -3300,32 +3334,36 @@ class Lt extends Ot {
3300
3334
  this.inner.setZIndex(t);
3301
3335
  }
3302
3336
  }
3303
- var Te;
3337
+ var de;
3304
3338
  ((i) => {
3305
- function t(s, n) {
3306
- if (s !== void 0)
3307
- return Object.values(n).includes(s) ? s : void 0;
3339
+ function t(n, a) {
3340
+ if (n !== void 0)
3341
+ return Object.values(a).includes(n) ? n : void 0;
3308
3342
  }
3309
3343
  i.toEnumOrNull = t;
3310
- function e(s) {
3311
- return s.split(`
3312
- `).map((n) => n.trim()).join(`
3344
+ function e(n) {
3345
+ return n.split(`
3346
+ `).map((a) => a.trim()).join(`
3313
3347
  `);
3314
3348
  }
3315
3349
  i.trimIndent = e;
3316
- function r(s) {
3317
- return s.replace(/([^A-Z]?)([A-Z])/g, (n, a, h) => a ? `${a}-${h.toLowerCase()}` : h.toLowerCase());
3350
+ function r(n) {
3351
+ return n.replace(/([^A-Z]?)([A-Z])/g, (a, h, o) => h ? `${h}-${o.toLowerCase()}` : o.toLowerCase());
3318
3352
  }
3319
3353
  i.pascal2kebab = r;
3320
- })(Te || (Te = {}));
3321
- const Ai = {
3354
+ function s(n) {
3355
+ return /^-?\d+$/.test(n);
3356
+ }
3357
+ i.isInt = s;
3358
+ })(de || (de = {}));
3359
+ const Ri = {
3322
3360
  /** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
3323
3361
  basename(i, t) {
3324
3362
  const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
3325
3363
  return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
3326
3364
  }
3327
3365
  };
3328
- var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Me || {}), Oe;
3366
+ var Ce = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Ce || {}), we;
3329
3367
  ((i) => {
3330
3368
  function t(r, s) {
3331
3369
  switch (r) {
@@ -3338,7 +3376,7 @@ var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3338
3376
  case "map":
3339
3377
  return s.mapPane;
3340
3378
  default:
3341
- rt(r);
3379
+ it(r);
3342
3380
  }
3343
3381
  }
3344
3382
  i.toGoogle = t;
@@ -3353,12 +3391,12 @@ var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3353
3391
  case "map":
3354
3392
  return s.mapPane;
3355
3393
  default:
3356
- rt(r);
3394
+ it(r);
3357
3395
  }
3358
3396
  }
3359
3397
  i.toBaidu = e;
3360
- })(Oe || (Oe = {}));
3361
- class Ri {
3398
+ })(we || (we = {}));
3399
+ class $i {
3362
3400
  constructor(t, e) {
3363
3401
  c(this, "baidu");
3364
3402
  c(this, "google");
@@ -3379,12 +3417,12 @@ class Ri {
3379
3417
  asBaidu() {
3380
3418
  if (!this.baidu) {
3381
3419
  const t = this;
3382
- wr();
3420
+ Er();
3383
3421
  class e extends BMap.OverlayV3 {
3384
3422
  initialize(n) {
3385
3423
  var o;
3386
3424
  const a = t.create(), h = n.getPanes();
3387
- return (o = Oe.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
3425
+ return (o = we.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
3388
3426
  }
3389
3427
  draw() {
3390
3428
  t.draw();
@@ -3409,7 +3447,7 @@ class Ri {
3409
3447
  class e extends google.maps.OverlayView {
3410
3448
  onAdd() {
3411
3449
  const s = t.create(), n = this.getPanes() ?? C("onAdd回调中一定会有panes");
3412
- Oe.toGoogle(t.mapPane, n).appendChild(s);
3450
+ we.toGoogle(t.mapPane, n).appendChild(s);
3413
3451
  }
3414
3452
  draw() {
3415
3453
  t.draw();
@@ -3431,13 +3469,13 @@ class Ri {
3431
3469
  return this.google;
3432
3470
  }
3433
3471
  }
3434
- let et;
3435
- function $i(i, t, e, r, s) {
3436
- return et || (et = zi()), new et(i, t, e, r, s);
3472
+ let tt;
3473
+ function zi(i, t, e, r, s) {
3474
+ return tt || (tt = Di()), new tt(i, t, e, r, s);
3437
3475
  }
3438
- function zi() {
3476
+ function Di() {
3439
3477
  return class extends google.maps.OverlayView {
3440
- constructor(e, r, s, n = Me.overlayMouseTarget, a) {
3478
+ constructor(e, r, s, n = Ce.overlayMouseTarget, a) {
3441
3479
  super();
3442
3480
  c(this, "container");
3443
3481
  this.position = r, this.offset = s, this._mapPane = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", a && this.setZIndex(a), this.container.addEventListener("click", () => {
@@ -3453,7 +3491,7 @@ function zi() {
3453
3491
  }
3454
3492
  onAdd() {
3455
3493
  const e = this.getPanes() ?? C("onAdd回调中一定能够获取panes");
3456
- Oe.toGoogle(this._mapPane, e).appendChild(this.container);
3494
+ we.toGoogle(this._mapPane, e).appendChild(this.container);
3457
3495
  }
3458
3496
  draw() {
3459
3497
  var e, r;
@@ -3489,7 +3527,7 @@ function zi() {
3489
3527
  }
3490
3528
  };
3491
3529
  }
3492
- var de;
3530
+ var ue;
3493
3531
  ((i) => {
3494
3532
  function t(r) {
3495
3533
  return typeof r == "string" ? r : r.outerHTML;
@@ -3503,8 +3541,8 @@ var de;
3503
3541
  return r;
3504
3542
  }
3505
3543
  i.toElement = e;
3506
- })(de || (de = {}));
3507
- class Pt extends Ue {
3544
+ })(ue || (ue = {}));
3545
+ class xt extends Ue {
3508
3546
  constructor(e, r, s, n) {
3509
3547
  super(e, r, s);
3510
3548
  c(this, "icon");
@@ -3515,7 +3553,7 @@ class Pt extends Ue {
3515
3553
  }
3516
3554
  static create(e) {
3517
3555
  var a;
3518
- const r = this.coordType, s = new BMap.Label(de.toString(e.content), {
3556
+ const r = this.coordType, s = new BMap.Label(ue.toString(e.content), {
3519
3557
  position: (a = e.position) == null ? void 0 : a.toBaidu(r),
3520
3558
  offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
3521
3559
  });
@@ -3524,7 +3562,7 @@ class Pt extends Ue {
3524
3562
  padding: "0px",
3525
3563
  backgroundColor: "unset"
3526
3564
  });
3527
- const n = new Pt(s, r, this, e.content);
3565
+ const n = new xt(s, r, this, e.content);
3528
3566
  return s.__label__ = n, n;
3529
3567
  }
3530
3568
  setContentInternal(e, r = !1) {
@@ -3535,7 +3573,7 @@ class Pt extends Ue {
3535
3573
  characterData: !0,
3536
3574
  childList: !0,
3537
3575
  subtree: !0
3538
- })), r || this.innerOverlay.setContent(de.toString(e)), this.content = e);
3576
+ })), r || this.innerOverlay.setContent(ue.toString(e)), this.content = e);
3539
3577
  }
3540
3578
  setZIndex(e) {
3541
3579
  this.innerOverlay.setZIndex(e);
@@ -3590,7 +3628,7 @@ class Pt extends Ue {
3590
3628
  e.__icon__.scale,
3591
3629
  e.__icon__.strokeWeight
3592
3630
  ].map((_) => _ ?? "").join(",");
3593
- console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, Te.trimIndent(
3631
+ console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, de.trimIndent(
3594
3632
  `
3595
3633
  为了保证Label的位置正确, 请将SymbolIcon(${b})中baiduLabelOffset的值改写成:
3596
3634
  ${JSON.stringify({ x: l, y: d })}
@@ -3604,23 +3642,23 @@ class Pt extends Ue {
3604
3642
  this.iconAnchor && (n -= this.iconAnchor.width, a -= this.iconAnchor.height), r && (n += r.width, a += r.height), this.innerOverlay.setOffset(new BMap.Size(n, a)), this.icon = e, this.iconAnchor = r;
3605
3643
  }
3606
3644
  }
3607
- class xt extends bt {
3645
+ class kt extends Tt {
3608
3646
  static create(t) {
3609
3647
  var s;
3610
- const e = this.coordType, r = $i(
3611
- de.toElement(t.content),
3648
+ const e = this.coordType, r = zi(
3649
+ ue.toElement(t.content),
3612
3650
  (s = t.position) == null ? void 0 : s.toGoogle(e),
3613
3651
  t.offset,
3614
3652
  t.mapPane,
3615
3653
  t.zIndex
3616
3654
  );
3617
- return new xt(r, e, this);
3655
+ return new kt(r, e, this);
3618
3656
  }
3619
3657
  setZIndex(t) {
3620
3658
  this.innerOverlay.setZIndex(t);
3621
3659
  }
3622
3660
  setContent(t) {
3623
- this.innerOverlay.setElement(de.toElement(t));
3661
+ this.innerOverlay.setElement(ue.toElement(t));
3624
3662
  }
3625
3663
  getPosition() {
3626
3664
  const t = this.innerOverlay.getPosition();
@@ -3636,11 +3674,11 @@ class xt extends bt {
3636
3674
  this.innerOverlay.setOffset(t);
3637
3675
  }
3638
3676
  }
3639
- const ze = {
3640
- toGoogle: (i) => "url" in i ? De.toGoogle(i) : Ne.toGoogle(i),
3641
- toBaidu: (i) => "url" in i ? De.toBaidu(i) : Ne.toBaidu(i)
3677
+ const De = {
3678
+ toGoogle: (i) => "url" in i ? Ne.toGoogle(i) : Ge.toGoogle(i),
3679
+ toBaidu: (i) => "url" in i ? Ne.toBaidu(i) : Ge.toBaidu(i)
3642
3680
  };
3643
- var De;
3681
+ var Ne;
3644
3682
  ((i) => {
3645
3683
  function t(r) {
3646
3684
  return {
@@ -3664,8 +3702,8 @@ var De;
3664
3702
  });
3665
3703
  }
3666
3704
  i.toBaidu = e;
3667
- })(De || (De = {}));
3668
- var Ne;
3705
+ })(Ne || (Ne = {}));
3706
+ var Ge;
3669
3707
  ((i) => {
3670
3708
  function t(r) {
3671
3709
  return {
@@ -3696,22 +3734,22 @@ var Ne;
3696
3734
  return s.__icon__ = r, s;
3697
3735
  }
3698
3736
  i.toBaidu = e;
3699
- })(Ne || (Ne = {}));
3700
- const Fs = {
3737
+ })(Ge || (Ge = {}));
3738
+ const Us = {
3701
3739
  CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
3702
3740
  BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
3703
3741
  BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
3704
3742
  FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
3705
3743
  FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
3706
3744
  };
3707
- class Ce extends Ue {
3745
+ class Ee extends Ue {
3708
3746
  constructor(t, e, r, s) {
3709
3747
  super(t, e, r), this.state = s;
3710
3748
  }
3711
3749
  static create(t) {
3712
3750
  const e = this.coordType, r = t.icon, s = {
3713
3751
  title: t.title,
3714
- icon: r && ze.toBaidu(r),
3752
+ icon: r && De.toBaidu(r),
3715
3753
  enableClicking: t.clickable,
3716
3754
  enableDragging: t.draggable,
3717
3755
  // baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
@@ -3720,7 +3758,7 @@ class Ce extends Ue {
3720
3758
  }, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
3721
3759
  t.zIndex !== void 0 && n.setZIndex(t.zIndex);
3722
3760
  const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
3723
- return new Ce(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3761
+ return new Ee(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3724
3762
  }
3725
3763
  getPosition() {
3726
3764
  return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
@@ -3736,7 +3774,7 @@ class Ce extends Ue {
3736
3774
  return this.innerOverlay.getTitle();
3737
3775
  }
3738
3776
  setIcon(t) {
3739
- const e = ze.toBaidu(t);
3777
+ const e = De.toBaidu(t);
3740
3778
  this.innerOverlay.setIcon(e);
3741
3779
  const r = this.getLabel();
3742
3780
  r && r.attachIcon(e);
@@ -3771,7 +3809,7 @@ class Ce extends Ue {
3771
3809
  return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
3772
3810
  }
3773
3811
  }
3774
- class kt extends bt {
3812
+ class Bt extends Tt {
3775
3813
  constructor() {
3776
3814
  super(...arguments);
3777
3815
  c(this, "label");
@@ -3785,7 +3823,7 @@ class kt extends bt {
3785
3823
  title: e.title,
3786
3824
  zIndex: e.zIndex,
3787
3825
  visible: e.visible,
3788
- icon: s && ze.toGoogle(s),
3826
+ icon: s && De.toGoogle(s),
3789
3827
  clickable: e.clickable,
3790
3828
  draggable: e.draggable,
3791
3829
  // google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
@@ -3794,7 +3832,7 @@ class kt extends bt {
3794
3832
  // InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
3795
3833
  anchorPoint: new google.maps.Point(0, 0)
3796
3834
  };
3797
- return new kt(new google.maps.Marker(n), r, this);
3835
+ return new Bt(new google.maps.Marker(n), r, this);
3798
3836
  }
3799
3837
  getPosition() {
3800
3838
  return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
@@ -3809,7 +3847,7 @@ class kt extends bt {
3809
3847
  return this.innerOverlay.getTitle() || "";
3810
3848
  }
3811
3849
  setIcon(e) {
3812
- this.innerOverlay.setIcon(ze.toGoogle(e));
3850
+ this.innerOverlay.setIcon(De.toGoogle(e));
3813
3851
  }
3814
3852
  getIcon() {
3815
3853
  return this.innerOverlay.getIcon();
@@ -3847,7 +3885,7 @@ class kt extends bt {
3847
3885
  this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
3848
3886
  }
3849
3887
  }
3850
- class Bt extends I {
3888
+ class It extends I {
3851
3889
  constructor() {
3852
3890
  super(...arguments);
3853
3891
  c(this, "eventHubDelegate");
@@ -3883,7 +3921,7 @@ class Bt extends I {
3883
3921
  });
3884
3922
  }
3885
3923
  }
3886
- class It extends Bt {
3924
+ class St extends It {
3887
3925
  constructor() {
3888
3926
  super(...arguments);
3889
3927
  c(this, "pathEditedEventType", "path-edited");
@@ -3896,7 +3934,7 @@ class It extends Bt {
3896
3934
  strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3897
3935
  strokeWeight: e.strokeWeight
3898
3936
  });
3899
- return new It(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3937
+ return new St(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3900
3938
  }
3901
3939
  getPath() {
3902
3940
  return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
@@ -3905,7 +3943,7 @@ class It extends Bt {
3905
3943
  this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
3906
3944
  }
3907
3945
  }
3908
- class St extends Ye {
3946
+ class At extends Ye {
3909
3947
  constructor() {
3910
3948
  super(...arguments);
3911
3949
  c(this, "pathChangedListeners");
@@ -3921,7 +3959,7 @@ class St extends Ye {
3921
3959
  strokeWeight: e.strokeWeight,
3922
3960
  visible: e.visible
3923
3961
  });
3924
- return new St(s, r, this);
3962
+ return new At(s, r, this);
3925
3963
  }
3926
3964
  setupPathChangedListeners() {
3927
3965
  const e = () => {
@@ -3952,7 +3990,7 @@ class St extends Ye {
3952
3990
  this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((s) => s.toGoogle(this.coordType))), (r = this.eventHubDelegate) != null && r.hasListener("path-edited") && this.setupPathChangedListeners();
3953
3991
  }
3954
3992
  }
3955
- class At extends Bt {
3993
+ class Rt extends It {
3956
3994
  constructor() {
3957
3995
  super(...arguments);
3958
3996
  c(this, "pathEditedEventType", "paths-edited");
@@ -3969,7 +4007,7 @@ class At extends Bt {
3969
4007
  fillColor: e.fillColor,
3970
4008
  fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
3971
4009
  });
3972
- return new At(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4010
+ return new Rt(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3973
4011
  }
3974
4012
  getPaths() {
3975
4013
  return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
@@ -3978,7 +4016,7 @@ class At extends Bt {
3978
4016
  e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
3979
4017
  }
3980
4018
  }
3981
- class Rt extends Ye {
4019
+ class $t extends Ye {
3982
4020
  constructor() {
3983
4021
  super(...arguments);
3984
4022
  c(this, "pathChangedListeners");
@@ -3996,7 +4034,7 @@ class Rt extends Ye {
3996
4034
  fillOpacity: e.fillOpacity,
3997
4035
  visible: e.visible
3998
4036
  });
3999
- return new Rt(s, r, this);
4037
+ return new $t(s, r, this);
4000
4038
  }
4001
4039
  setupPathChangedListeners() {
4002
4040
  const e = () => {
@@ -4032,7 +4070,7 @@ class Rt extends Ye {
4032
4070
  this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((s) => s.map((n) => n.toGoogle(this.coordType)))), (r = this.eventHubDelegate) != null && r.hasListener("paths-edited") && this.setupPathChangedListeners();
4033
4071
  }
4034
4072
  }
4035
- class $t extends Bt {
4073
+ class zt extends It {
4036
4074
  constructor(e, r, s, n) {
4037
4075
  super(e, r, s, n);
4038
4076
  c(this, "pathEditedEventType", "bounds-changed");
@@ -4047,7 +4085,7 @@ class $t extends Bt {
4047
4085
  if (r.length === 4)
4048
4086
  if (a > r.length) {
4049
4087
  for (let o = 0; o < a; o++)
4050
- if (r[o] == null || !Ft.equals(s[o], r[o])) {
4088
+ if (r[o] == null || !Ut.equals(s[o], r[o])) {
4051
4089
  const l = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], b = s[(o + 2) % a];
4052
4090
  let _;
4053
4091
  d.lat === p.lat ? _ = new BMap.Point(d.lng, u.lat) : d.lng === p.lng ? _ = new BMap.Point(u.lng, d.lat) : _ = u, n = [l, b, _];
@@ -4055,7 +4093,7 @@ class $t extends Bt {
4055
4093
  }
4056
4094
  } else if (a === r.length) {
4057
4095
  for (let o = 0; o < a; o++)
4058
- if (!Ft.equals(s[o], r[o])) {
4096
+ if (!Ut.equals(s[o], r[o])) {
4059
4097
  n = [
4060
4098
  s[o],
4061
4099
  s[(o + 2) % 4]
@@ -4080,7 +4118,7 @@ class $t extends Bt {
4080
4118
  fillColor: e.fillColor,
4081
4119
  fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4082
4120
  });
4083
- return new $t(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4121
+ return new zt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4084
4122
  }
4085
4123
  getBounds() {
4086
4124
  return R.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
@@ -4092,7 +4130,7 @@ class $t extends Bt {
4092
4130
  }) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
4093
4131
  }
4094
4132
  }
4095
- class zt extends Ye {
4133
+ class Dt extends Ye {
4096
4134
  static create(t) {
4097
4135
  const e = this.coordType, r = new google.maps.Rectangle({
4098
4136
  bounds: t.bounds.toGoogle(e),
@@ -4105,7 +4143,7 @@ class zt extends Ye {
4105
4143
  fillOpacity: t.fillOpacity,
4106
4144
  visible: t.visible
4107
4145
  });
4108
- return new zt(r, e, this);
4146
+ return new Dt(r, e, this);
4109
4147
  }
4110
4148
  getBounds() {
4111
4149
  return R.fromGoogle(this.innerOverlay.getBounds() ?? J.BOUNDS_ZERO, this.coordType);
@@ -4116,24 +4154,24 @@ class zt extends Ye {
4116
4154
  }
4117
4155
  }
4118
4156
  const ee = 1;
4119
- class Di extends _t {
4157
+ class Ni extends bt {
4120
4158
  constructor(e, r) {
4121
4159
  var s;
4122
4160
  super(e);
4123
4161
  c(this, "buildInMapTypeId2BIMT");
4124
4162
  c(this, "baiduMapType2BIMT");
4125
4163
  c(this, "map");
4126
- c(this, "createLabel", Pt.create);
4127
- c(this, "createCircle", Tt.create);
4128
- c(this, "createPolygon", At.create);
4129
- c(this, "createPolyline", It.create);
4130
- c(this, "createRectangle", $t.create);
4131
- c(this, "createInfoWindow", Ct.create);
4132
- c(this, "createInfoBox", Et.create);
4133
- c(this, "createMarker", Ce.create);
4134
- c(this, "createMapTypeControl", pt.create);
4135
- c(this, "createZoomControl", ft.create);
4136
- c(this, "createScaleControl", gt.create);
4164
+ c(this, "createLabel", xt.create);
4165
+ c(this, "createCircle", Mt.create);
4166
+ c(this, "createPolygon", Rt.create);
4167
+ c(this, "createPolyline", St.create);
4168
+ c(this, "createRectangle", zt.create);
4169
+ c(this, "createInfoWindow", wt.create);
4170
+ c(this, "createInfoBox", Lt.create);
4171
+ c(this, "createMarker", Ee.create);
4172
+ c(this, "createMapTypeControl", gt.create);
4173
+ c(this, "createZoomControl", yt.create);
4174
+ c(this, "createScaleControl", mt.create);
4137
4175
  this.buildInMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getId), this.baiduMapType2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
4138
4176
  minZoom: r.minZoom && r.minZoom + ee,
4139
4177
  maxZoom: r.maxZoom && r.maxZoom + ee,
@@ -4149,7 +4187,7 @@ class Di extends _t {
4149
4187
  });
4150
4188
  }
4151
4189
  setGestureHandling(e = j.auto) {
4152
- switch (e === j.auto && (e = this.element.parentElement && nt.isScrollable(this.element.parentElement) ? j.cooperative : j.greedy), e) {
4190
+ switch (e === j.auto && (e = this.element.parentElement && ot.isScrollable(this.element.parentElement) ? j.cooperative : j.greedy), e) {
4153
4191
  case j.cooperative:
4154
4192
  this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
4155
4193
  break;
@@ -4282,39 +4320,39 @@ class Di extends _t {
4282
4320
  e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4283
4321
  }
4284
4322
  createMarkerClusterer(e) {
4285
- return new Oi(this, e);
4323
+ return new Ci(this, e);
4286
4324
  }
4287
4325
  createAutocomplete(e) {
4288
- return new vi(this, e);
4326
+ return new _i(this, e);
4289
4327
  }
4290
4328
  createSearchBox(e) {
4291
- return new Pi(this, e);
4329
+ return new xi(this, e);
4292
4330
  }
4293
4331
  createPlacesService(e) {
4294
- return new Ei(this, e);
4332
+ return new Li(this, e);
4295
4333
  }
4296
4334
  createMapUrls(e) {
4297
- return new Ie(e);
4335
+ return new Ae(e);
4298
4336
  }
4299
4337
  }
4300
- class Ni extends _t {
4338
+ class Gi extends bt {
4301
4339
  constructor(e, r) {
4302
4340
  var n;
4303
4341
  super(e);
4304
4342
  c(this, "buildInMapTypeId2BIMT");
4305
4343
  c(this, "googleMapTypeId2BIMT");
4306
4344
  c(this, "map");
4307
- c(this, "createLabel", xt.create);
4308
- c(this, "createCircle", Mt.create);
4309
- c(this, "createPolygon", Rt.create);
4310
- c(this, "createPolyline", St.create);
4311
- c(this, "createRectangle", zt.create);
4312
- c(this, "createInfoWindow", wt.create);
4313
- c(this, "createInfoBox", Lt.create);
4314
- c(this, "createMarker", kt.create);
4315
- c(this, "createMapTypeControl", ke.create);
4316
- c(this, "createZoomControl", yt.create);
4317
- c(this, "createScaleControl", mt.create);
4345
+ c(this, "createLabel", kt.create);
4346
+ c(this, "createCircle", Ot.create);
4347
+ c(this, "createPolygon", $t.create);
4348
+ c(this, "createPolyline", At.create);
4349
+ c(this, "createRectangle", Dt.create);
4350
+ c(this, "createInfoWindow", Et.create);
4351
+ c(this, "createInfoBox", Pt.create);
4352
+ c(this, "createMarker", Bt.create);
4353
+ c(this, "createMapTypeControl", Ie.create);
4354
+ c(this, "createZoomControl", vt.create);
4355
+ c(this, "createScaleControl", ft.create);
4318
4356
  this.mapOptions = r, this.buildInMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getId), this.googleMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getGoogleMapTypeId);
4319
4357
  const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
4320
4358
  this.map = new google.maps.Map(e, {
@@ -4443,30 +4481,30 @@ class Ni extends _t {
4443
4481
  }
4444
4482
  }
4445
4483
  createMarkerClusterer(e) {
4446
- return new Ci(this, e);
4484
+ return new wi(this, e);
4447
4485
  }
4448
4486
  createAutocomplete(e) {
4449
- return new yi(this, e);
4487
+ return new vi(this, e);
4450
4488
  }
4451
4489
  createSearchBox(e) {
4452
- return new Li(this, e);
4490
+ return new Pi(this, e);
4453
4491
  }
4454
4492
  createPlacesService(e) {
4455
- return new wi(this, e);
4493
+ return new Ei(this, e);
4456
4494
  }
4457
4495
  createMapUrls(e) {
4458
- return new Be(e);
4496
+ return new Se(e);
4459
4497
  }
4460
4498
  }
4461
- class Gi extends _t {
4499
+ class Zi extends bt {
4462
4500
  constructor(e, r) {
4463
4501
  var a;
4464
4502
  super(e);
4465
4503
  c(this, "map");
4466
4504
  c(this, "defaultLayers");
4467
4505
  this.mapOptions = r;
4468
- const s = ir().here;
4469
- Ae.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${Ae}`);
4506
+ const s = sr().here;
4507
+ $e.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${$e}`);
4470
4508
  const n = new H.service.Platform({
4471
4509
  app_id: s.key.split(",")[0],
4472
4510
  app_code: s.key.split(",")[1]
@@ -4480,7 +4518,7 @@ class Gi extends _t {
4480
4518
  return this.map;
4481
4519
  }
4482
4520
  get coordType() {
4483
- return B.wgs84;
4521
+ return P.wgs84;
4484
4522
  }
4485
4523
  getCenter() {
4486
4524
  return y.fromHere(this.map.getCenter(), this.coordType);
@@ -4610,50 +4648,50 @@ class Gi extends _t {
4610
4648
  throw new Error("Method not implemented.");
4611
4649
  }
4612
4650
  }
4613
- var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(G || {}), at;
4651
+ var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(G || {}), lt;
4614
4652
  ((i) => {
4615
4653
  function t(e, r, s) {
4616
- const n = ot.create(s);
4654
+ const n = at.create(s);
4617
4655
  switch (e) {
4618
4656
  case "google":
4619
- return new Ni(r, n);
4657
+ return new Gi(r, n);
4620
4658
  case "baidu":
4621
- return new Di(r, n);
4659
+ return new Ni(r, n);
4622
4660
  case "here":
4623
- return new Gi(r, n);
4661
+ return new Zi(r, n);
4624
4662
  }
4625
4663
  }
4626
4664
  i.createMap = t;
4627
- })(at || (at = {}));
4628
- function Zi({ type: i, config: t }) {
4629
- const e = window, r = Wi(i);
4665
+ })(lt || (lt = {}));
4666
+ function Wi({ type: i, config: t }) {
4667
+ const e = window, r = ji(i);
4630
4668
  if (e[r])
4631
4669
  return Promise.resolve();
4632
4670
  switch (i !== G.here && !t.key && C(`请先配置${i}地图的key`), i) {
4633
4671
  case G.google:
4634
- return {}.VITE_FALSE ? (gi({
4672
+ return {}.VITE_FALSE ? (mi({
4635
4673
  key: t.key,
4636
4674
  v: "3.52"
4637
4675
  // v: config.version,
4638
- }), google.maps.importLibrary("core")) : Ut(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
4676
+ }), google.maps.importLibrary("core")) : Yt(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
4639
4677
  case G.baidu:
4640
- return Ut(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4678
+ return Yt(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4641
4679
  case G.here:
4642
- return ge(pe("core", t.version)).then(() => Promise.all([
4680
+ return me(ge("core", t.version)).then(() => Promise.all([
4643
4681
  // 其他大多数模块都可以同时载入
4644
- ge(pe("service", t.version)),
4645
- ge(pe("mapevents", t.version)),
4646
- ge(pe("clustering", t.version)),
4647
- ge(pe("ui", t.version))
4682
+ me(ge("service", t.version)),
4683
+ me(ge("mapevents", t.version)),
4684
+ me(ge("clustering", t.version)),
4685
+ me(ge("ui", t.version))
4648
4686
  ])).catch((s) => (delete e[r], Promise.reject(s)));
4649
4687
  default:
4650
- rt(i);
4688
+ it(i);
4651
4689
  }
4652
4690
  }
4653
- function pe(i, t = Ae[0]) {
4691
+ function ge(i, t = $e[0]) {
4654
4692
  return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
4655
4693
  }
4656
- function Wi(i) {
4694
+ function ji(i) {
4657
4695
  switch (i) {
4658
4696
  case G.google:
4659
4697
  return "google";
@@ -4664,7 +4702,7 @@ function Wi(i) {
4664
4702
  }
4665
4703
  }
4666
4704
  let Hi = 0;
4667
- function Ut(i, t = "callback") {
4705
+ function Yt(i, t = "callback") {
4668
4706
  return new Promise((e, r) => {
4669
4707
  const s = `__callback${Hi++}`;
4670
4708
  window[s] = e;
@@ -4672,7 +4710,7 @@ function Ut(i, t = "callback") {
4672
4710
  n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
4673
4711
  });
4674
4712
  }
4675
- function ge(i) {
4713
+ function me(i) {
4676
4714
  return new Promise((t, e) => {
4677
4715
  const r = document.createElement("script");
4678
4716
  r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
@@ -4685,7 +4723,7 @@ function Z(i, t) {
4685
4723
  validator: (e) => Object.values(i).includes(e)
4686
4724
  };
4687
4725
  }
4688
- function ji(i, t) {
4726
+ function Vi(i, t) {
4689
4727
  return {
4690
4728
  type: String,
4691
4729
  default: t,
@@ -4704,7 +4742,7 @@ function m(i, t) {
4704
4742
  default: t
4705
4743
  };
4706
4744
  }
4707
- function Us(i) {
4745
+ function Ys(i) {
4708
4746
  const t = {};
4709
4747
  return Object.entries(i).forEach(([e, r]) => {
4710
4748
  const s = `__${e}`;
@@ -4721,37 +4759,37 @@ function Us(i) {
4721
4759
  };
4722
4760
  }), t;
4723
4761
  }
4724
- const me = {
4762
+ const fe = {
4725
4763
  enumerable: !0,
4726
4764
  configurable: !0,
4727
- get: ve,
4728
- set: ve
4765
+ get: Te,
4766
+ set: Te
4729
4767
  };
4730
- function Vi(i) {
4768
+ function Fi(i) {
4731
4769
  return Object.keys(i).forEach((t) => {
4732
4770
  const e = i[t];
4733
4771
  let r = !1;
4734
- typeof e == "function" ? (me.get = e, me.set = ve, r = !0) : typeof e == "object" && typeof e.get == "function" && (me.get = e.get, me.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, me));
4772
+ typeof e == "function" ? (fe.get = e, fe.set = Te, r = !0) : typeof e == "object" && typeof e.get == "function" && (fe.get = e.get, fe.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, fe));
4735
4773
  }), i;
4736
4774
  }
4737
- function Ys(i) {
4738
- return Vi(i);
4775
+ function qs(i) {
4776
+ return Fi(i);
4739
4777
  }
4740
- function Er() {
4741
- return tt();
4778
+ function Lr() {
4779
+ return rt();
4742
4780
  }
4743
- function xe(i, t) {
4781
+ function Be(i, t) {
4744
4782
  const e = i.$options[t];
4745
4783
  if (e)
4746
4784
  for (const r of e)
4747
4785
  r.call(i);
4748
4786
  }
4749
- function qs(i, t) {
4787
+ function Ks(i, t) {
4750
4788
  for (const e of i)
4751
4789
  if (e.$options.name === t.name)
4752
4790
  return e;
4753
4791
  }
4754
- function Ks(i, t) {
4792
+ function Xs(i, t) {
4755
4793
  if (!i.default)
4756
4794
  return;
4757
4795
  const e = i.default();
@@ -4759,12 +4797,12 @@ function Ks(i, t) {
4759
4797
  if ((r == null ? void 0 : r.type).name === t.name)
4760
4798
  return r;
4761
4799
  }
4762
- function Fi(i, t) {
4800
+ function Ui(i, t) {
4763
4801
  const e = {}, r = {}, s = {};
4764
4802
  return Object.keys(i).forEach((n) => {
4765
- n.startsWith("on") ? e[Te.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4803
+ n.startsWith("on") ? e[de.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4766
4804
  }), t && Object.keys(t).forEach((n) => {
4767
- n.startsWith("on") && (s[Te.pascal2kebab(n.substring(2))] = t[n]);
4805
+ n.startsWith("on") && (s[de.pascal2kebab(n.substring(2))] = t[n]);
4768
4806
  }), {
4769
4807
  /** class/style/未声明的属性 等 */
4770
4808
  binds: r,
@@ -4775,12 +4813,12 @@ function Fi(i, t) {
4775
4813
  };
4776
4814
  }
4777
4815
  function q(i, t) {
4778
- return qt(() => Fi(i, t));
4816
+ return Kt(() => Ui(i, t));
4779
4817
  }
4780
4818
  function L() {
4781
4819
  return Function;
4782
4820
  }
4783
- const Xs = () => {
4821
+ const Js = () => {
4784
4822
  let i, t;
4785
4823
  function e(s) {
4786
4824
  console.log(s), i = s && s.type, t = Date.now();
@@ -4789,27 +4827,27 @@ const Xs = () => {
4789
4827
  ((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
4790
4828
  }
4791
4829
  return { eventLog: e, eventLogLess: r };
4792
- }, Dt = "$map", we = "onCreate", Ee = "onDestroy", x = w({
4793
- inject: [Dt],
4830
+ }, Nt = "$map", Le = "onCreate", Pe = "onDestroy", k = w({
4831
+ inject: [Nt],
4794
4832
  mounted() {
4795
- xe(this, we);
4833
+ Be(this, Le);
4796
4834
  },
4797
4835
  beforeUnmount() {
4798
- xe(this, Ee);
4836
+ Be(this, Pe);
4799
4837
  },
4800
4838
  methods: {
4801
4839
  recreate() {
4802
- xe(this, Ee), xe(this, we);
4840
+ Be(this, Pe), Be(this, Le);
4803
4841
  }
4804
4842
  },
4805
4843
  render() {
4806
- return Er();
4844
+ return Lr();
4807
4845
  }
4808
- }), Ui = w({
4846
+ }), Yi = w({
4809
4847
  name: "tg-map",
4810
4848
  provide() {
4811
4849
  return {
4812
- [Dt]: qt(() => this.map)
4850
+ [Nt]: Kt(() => this.map)
4813
4851
  };
4814
4852
  },
4815
4853
  inheritAttrs: !1,
@@ -4846,12 +4884,12 @@ const Xs = () => {
4846
4884
  * 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
4847
4885
  * @see MapOptions.infoWindowMode
4848
4886
  */
4849
- infoWindowMode: ji(Bi),
4887
+ infoWindowMode: Vi(Ii),
4850
4888
  gestureHandling: Z(j),
4851
4889
  minZoom: m(Number),
4852
4890
  maxZoom: m(Number),
4853
4891
  mapStyle: m(Object),
4854
- mapTypeId: Z(lr),
4892
+ mapTypeId: Z(hr),
4855
4893
  /** 地图类型对象, 优先级比mapTypeId高 */
4856
4894
  mapType: m(Object),
4857
4895
  hideLogo: m(Boolean),
@@ -4874,13 +4912,13 @@ const Xs = () => {
4874
4912
  },
4875
4913
  data() {
4876
4914
  return {
4877
- map: it(),
4915
+ map: st(),
4878
4916
  isDestroyed: !1
4879
4917
  };
4880
4918
  },
4881
4919
  computed: {
4882
4920
  propsJson() {
4883
- return be.toJsonSafely(this.$props);
4921
+ return Oe.toJsonSafely(this.$props);
4884
4922
  }
4885
4923
  },
4886
4924
  watch: {
@@ -4912,7 +4950,7 @@ const Xs = () => {
4912
4950
  async mounted() {
4913
4951
  const i = this.type;
4914
4952
  try {
4915
- await Zi({ type: i, config: ir()[i] });
4953
+ await Wi({ type: i, config: sr()[i] });
4916
4954
  } catch (s) {
4917
4955
  this.$emit("error", s);
4918
4956
  return;
@@ -4921,7 +4959,7 @@ const Xs = () => {
4921
4959
  console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
4922
4960
  return;
4923
4961
  }
4924
- const t = at.createMap(
4962
+ const t = lt.createMap(
4925
4963
  i,
4926
4964
  this.$refs.map,
4927
4965
  /* options: */
@@ -4936,12 +4974,12 @@ const Xs = () => {
4936
4974
  buildInMapTypeId: this.mapTypeId
4937
4975
  }
4938
4976
  );
4939
- if (this.map = Ar(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), Y(
4977
+ if (this.map = Rr(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), Y(
4940
4978
  this.attrs.listeners,
4941
4979
  t,
4942
4980
  /* excludes: */
4943
4981
  ["load"]
4944
- ), this.$emit("load", t), Kt([
4982
+ ), this.$emit("load", t), Xt([
4945
4983
  () => this.zoom,
4946
4984
  () => this.center
4947
4985
  //
@@ -4975,22 +5013,22 @@ const K = (i, t) => {
4975
5013
  e[r] = s;
4976
5014
  return e;
4977
5015
  };
4978
- function Yi(i, t, e, r, s, n) {
4979
- return F(), U("div", ue({ class: "tg-map" }, i.attrs.binds), [
4980
- Rr("div", {
5016
+ function qi(i, t, e, r, s, n) {
5017
+ return F(), U("div", pe({ class: "tg-map" }, i.attrs.binds), [
5018
+ $r("div", {
4981
5019
  ref: "map",
4982
- class: je({
5020
+ class: He({
4983
5021
  "tg-map__map": !0,
4984
5022
  [`tg-map__map--hide-logo-${i.type}`]: i.hideLogo
4985
5023
  })
4986
5024
  }, null, 2),
4987
- tt("", !0),
4988
- i.map ? W(i.$slots, "default", { key: 1 }) : tt("", !0),
5025
+ rt("", !0),
5026
+ i.map ? W(i.$slots, "default", { key: 1 }) : rt("", !0),
4989
5027
  W(i.$slots, "overlay")
4990
5028
  ], 16);
4991
5029
  }
4992
- const Le = /* @__PURE__ */ K(Ui, [["render", Yi]]);
4993
- function qi(i) {
5030
+ const xe = /* @__PURE__ */ K(Yi, [["render", qi]]);
5031
+ function Ki(i) {
4994
5032
  if (i == null)
4995
5033
  return;
4996
5034
  let t;
@@ -5001,7 +5039,7 @@ function qi(i) {
5001
5039
  t = i;
5002
5040
  return `${t}px`;
5003
5041
  }
5004
- const Ki = w({
5042
+ const Xi = w({
5005
5043
  name: "tg-map-widget",
5006
5044
  props: {
5007
5045
  left: {
@@ -5027,20 +5065,20 @@ const Ki = w({
5027
5065
  }
5028
5066
  },
5029
5067
  methods: {
5030
- dimen: qi
5068
+ dimen: Ki
5031
5069
  }
5032
5070
  });
5033
- function Xi(i, t, e, r, s, n) {
5071
+ function Ji(i, t, e, r, s, n) {
5034
5072
  return F(), U("div", {
5035
- class: je(i.$options.name),
5036
- style: $r({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
5073
+ class: He(i.$options.name),
5074
+ style: zr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
5037
5075
  }, [
5038
5076
  W(i.$slots, "default")
5039
5077
  ], 6);
5040
5078
  }
5041
- const Ji = /* @__PURE__ */ K(Ki, [["render", Xi]]), Qi = w({
5079
+ const Qi = /* @__PURE__ */ K(Xi, [["render", Ji]]), es = w({
5042
5080
  name: "tg-custom-control",
5043
- mixins: [x],
5081
+ mixins: [k],
5044
5082
  props: {
5045
5083
  position: Z(S, S.RIGHT_BOTTOM)
5046
5084
  },
@@ -5055,8 +5093,8 @@ const Ji = /* @__PURE__ */ K(Ki, [["render", Xi]]), Qi = w({
5055
5093
  }
5056
5094
  },
5057
5095
  onCreate() {
5058
- Qt(this.$parent, Le) || console.warn("请将tg-custom-control放到tg-map中");
5059
- const { $el: i } = this, t = class extends ui {
5096
+ er(this.$parent, xe) || console.warn("请将tg-custom-control放到tg-map中");
5097
+ const { $el: i } = this, t = class extends pi {
5060
5098
  onCreateElement() {
5061
5099
  return i;
5062
5100
  }
@@ -5067,19 +5105,19 @@ const Ji = /* @__PURE__ */ K(Ki, [["render", Xi]]), Qi = w({
5067
5105
  this.$map.removeCustomControl(this.control);
5068
5106
  }
5069
5107
  });
5070
- function es(i, t, e, r, s, n) {
5108
+ function ts(i, t, e, r, s, n) {
5071
5109
  return F(), U("div", {
5072
- class: je(i.$options.name)
5110
+ class: He(i.$options.name)
5073
5111
  }, [
5074
5112
  W(i.$slots, "default")
5075
5113
  ], 2);
5076
5114
  }
5077
- const ts = /* @__PURE__ */ K(Qi, [["render", es]]), rs = w({
5115
+ const rs = /* @__PURE__ */ K(es, [["render", ts]]), is = w({
5078
5116
  name: "tg-map-type-control",
5079
- mixins: [x],
5117
+ mixins: [k],
5080
5118
  props: {
5081
5119
  position: Z(S, S.TOP_LEFT),
5082
- type: Z(hr),
5120
+ type: Z(cr),
5083
5121
  mapTypes: m(Array)
5084
5122
  },
5085
5123
  setup() {
@@ -5107,9 +5145,9 @@ const ts = /* @__PURE__ */ K(Qi, [["render", es]]), rs = w({
5107
5145
  onDestroy() {
5108
5146
  this.$map.removeControl(this.control);
5109
5147
  }
5110
- }), is = w({
5148
+ }), ss = w({
5111
5149
  name: "tg-scale-control",
5112
- mixins: [x],
5150
+ mixins: [k],
5113
5151
  props: {
5114
5152
  position: Z(S, S.BOTTOM_RIGHT)
5115
5153
  },
@@ -5130,32 +5168,32 @@ const ts = /* @__PURE__ */ K(Qi, [["render", es]]), rs = w({
5130
5168
  this.$map.removeControl(this.control);
5131
5169
  }
5132
5170
  });
5133
- function Lr() {
5171
+ function Pr() {
5134
5172
  var e;
5135
- const i = (e = zr()) == null ? void 0 : e.type;
5173
+ const i = (e = Dr()) == null ? void 0 : e.type;
5136
5174
  let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
5137
5175
  if (!t) {
5138
5176
  const r = i == null ? void 0 : i.__file;
5139
- r && (t = Ai.basename(r, ".vue"));
5177
+ r && (t = Ri.basename(r, ".vue"));
5140
5178
  }
5141
5179
  return t;
5142
5180
  }
5143
- function ss() {
5144
- const i = Dr(Dt);
5181
+ function ns() {
5182
+ const i = Nr(Nt);
5145
5183
  let t, e;
5146
- return i == null && C(`<${Lr() || "unknown"}>必须作为<tg-map>的子代组件`), {
5184
+ return i == null && C(`<${Pr() || "unknown"}>必须作为<tg-map>的子代组件`), {
5147
5185
  mapRef: i,
5148
5186
  /** 读取map对象, 只要放在<tg-map>里面的组件(除#overlay插槽外)都能够立即读取到map对象 */
5149
5187
  get map() {
5150
5188
  return i.value ?? C("map尚未初始化");
5151
5189
  },
5152
5190
  /** 地图元素创建回调 */
5153
- [we](r) {
5154
- Nr(r), t && C(`${we}只能调用一次`), t = r;
5191
+ [Le](r) {
5192
+ Gr(r), t && C(`${Le}只能调用一次`), t = r;
5155
5193
  },
5156
5194
  /** 地图元素销毁回调 */
5157
- [Ee](r) {
5158
- Gr(r), e && C(`${Ee}只能调用一次`), e = r;
5195
+ [Pe](r) {
5196
+ Zr(r), e && C(`${Pe}只能调用一次`), e = r;
5159
5197
  },
5160
5198
  /** 重新创建地图元素 */
5161
5199
  recreate() {
@@ -5163,25 +5201,25 @@ function ss() {
5163
5201
  }
5164
5202
  };
5165
5203
  }
5166
- const ns = w({
5204
+ const os = w({
5167
5205
  name: "tg-zoom-control",
5168
5206
  props: {
5169
5207
  position: Z(S, S.RIGHT_BOTTOM)
5170
5208
  },
5171
5209
  setup(i) {
5172
5210
  let t = void 0;
5173
- const { map: e, onCreate: r, onDestroy: s } = ss();
5211
+ const { map: e, onCreate: r, onDestroy: s } = ns();
5174
5212
  return r(() => {
5175
5213
  t = e.createZoomControl(i), e.addControl(t);
5176
5214
  }), s(() => {
5177
5215
  e.removeControl(t);
5178
- }), Kt(() => i.position, (n) => {
5216
+ }), Xt(() => i.position, (n) => {
5179
5217
  t.setPosition(n);
5180
- }), Er;
5218
+ }), Lr;
5181
5219
  }
5182
- }), os = w({
5220
+ }), as = w({
5183
5221
  name: "tg-marker-clusterer",
5184
- mixins: [x],
5222
+ mixins: [k],
5185
5223
  // markers从this.$children中读取, 故需要省略(Omit)
5186
5224
  props: {
5187
5225
  gridSize: m(Number),
@@ -5243,16 +5281,16 @@ const ns = w({
5243
5281
  }
5244
5282
  }
5245
5283
  });
5246
- function as(i, t, e, r, s, n) {
5284
+ function ls(i, t, e, r, s, n) {
5247
5285
  return F(), U("div", {
5248
- class: je(i.$options.name)
5286
+ class: He(i.$options.name)
5249
5287
  }, [
5250
5288
  W(i.$slots, "default")
5251
5289
  ], 2);
5252
5290
  }
5253
- const Pr = /* @__PURE__ */ K(os, [["render", as]]), ls = w({
5291
+ const xr = /* @__PURE__ */ K(as, [["render", ls]]), hs = w({
5254
5292
  name: "tg-traffic-layer",
5255
- mixins: [x],
5293
+ mixins: [k],
5256
5294
  // 请直接使用v-if来控制它的显隐
5257
5295
  // 没有属性时, 写`{}`类型推断会有问题, 故注释掉
5258
5296
  // props: {} satisfies Props<{}>,
@@ -5263,14 +5301,14 @@ const Pr = /* @__PURE__ */ K(os, [["render", as]]), ls = w({
5263
5301
  },
5264
5302
  watch: {},
5265
5303
  onCreate() {
5266
- this.layer = new pi(), this.$map.addLayer(this.layer);
5304
+ this.layer = new gi(), this.$map.addLayer(this.layer);
5267
5305
  },
5268
5306
  onDestroy() {
5269
5307
  this.$map.removeLayer(this.layer);
5270
5308
  }
5271
- }), hs = w({
5309
+ }), cs = w({
5272
5310
  name: "tg-circle",
5273
- mixins: [x],
5311
+ mixins: [k],
5274
5312
  inheritAttrs: !1,
5275
5313
  props: {
5276
5314
  center: D(y),
@@ -5348,7 +5386,7 @@ const Pr = /* @__PURE__ */ K(os, [["render", as]]), ls = w({
5348
5386
  this.$map.removeOverlay(this.overlay);
5349
5387
  }
5350
5388
  });
5351
- class cs extends Ri {
5389
+ class ds extends $i {
5352
5390
  constructor(t, e, r, s) {
5353
5391
  super(t, e), this.content = r, this.position = s;
5354
5392
  }
@@ -5363,11 +5401,11 @@ class cs extends Ri {
5363
5401
  this.position = t, this.draw();
5364
5402
  }
5365
5403
  }
5366
- const ds = w({
5404
+ const us = w({
5367
5405
  name: "tg-element-overlay",
5368
- mixins: [x],
5406
+ mixins: [k],
5369
5407
  props: {
5370
- mapPane: Z(Me, Me.overlayMouseTarget),
5408
+ mapPane: Z(Ce, Ce.overlayMouseTarget),
5371
5409
  position: D(y)
5372
5410
  },
5373
5411
  setup() {
@@ -5389,22 +5427,22 @@ const ds = w({
5389
5427
  }
5390
5428
  },
5391
5429
  onCreate() {
5392
- this.overlay = new cs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5430
+ this.overlay = new ds(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5393
5431
  },
5394
5432
  onDestroy() {
5395
5433
  this.$map.removeElementOverlay(this.overlay);
5396
5434
  }
5397
5435
  });
5398
- function us(i, t, e, r, s, n) {
5399
- return F(), U("div", ue({
5436
+ function ps(i, t, e, r, s, n) {
5437
+ return F(), U("div", pe({
5400
5438
  class: i.$options.name
5401
5439
  }, i.$attrs), [
5402
5440
  W(i.$slots, "default")
5403
5441
  ], 16);
5404
5442
  }
5405
- const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5443
+ const gs = /* @__PURE__ */ K(us, [["render", ps]]), ms = w({
5406
5444
  name: "tg-marker",
5407
- mixins: [x],
5445
+ mixins: [k],
5408
5446
  inheritAttrs: !1,
5409
5447
  props: {
5410
5448
  position: D(y),
@@ -5424,8 +5462,8 @@ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5424
5462
  return {
5425
5463
  attrs: q(t, i),
5426
5464
  marker: void 0,
5427
- label: it(),
5428
- info: it(),
5465
+ label: st(),
5466
+ info: st(),
5429
5467
  emittedPosition: void 0
5430
5468
  };
5431
5469
  },
@@ -5445,7 +5483,7 @@ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5445
5483
  i ? this.marker.setIcon(i) : this.recreate();
5446
5484
  },
5447
5485
  clickable(i) {
5448
- this.marker instanceof Ce ? this.recreate() : this.marker.setClickable(i);
5486
+ this.marker instanceof Ee ? this.recreate() : this.marker.setClickable(i);
5449
5487
  },
5450
5488
  draggable(i) {
5451
5489
  this.marker.setDraggable(i);
@@ -5457,7 +5495,7 @@ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5457
5495
  this.recreate();
5458
5496
  },
5459
5497
  zIndex(i) {
5460
- this.marker instanceof Ce ? this.recreate() : this.marker.setZIndex(i);
5498
+ this.marker instanceof Ee ? this.recreate() : this.marker.setZIndex(i);
5461
5499
  },
5462
5500
  visible(i) {
5463
5501
  this.marker.setVisible(i);
@@ -5476,7 +5514,7 @@ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5476
5514
  },
5477
5515
  methods: {
5478
5516
  $clusterer() {
5479
- return Qt(this.$parent, Pr);
5517
+ return er(this.$parent, xr);
5480
5518
  },
5481
5519
  onAddLabel(i) {
5482
5520
  this.label = i, this.marker && this.marker.setLabel(i.overlay);
@@ -5495,16 +5533,16 @@ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5495
5533
  }
5496
5534
  }
5497
5535
  });
5498
- function ms(i, t, e, r, s, n) {
5499
- return F(), U("div", ue({
5536
+ function fs(i, t, e, r, s, n) {
5537
+ return F(), U("div", pe({
5500
5538
  class: i.$options.name
5501
5539
  }, i.attrs.binds), [
5502
5540
  W(i.$slots, "default")
5503
5541
  ], 16);
5504
5542
  }
5505
- const qe = /* @__PURE__ */ K(gs, [["render", ms]]), fs = w({
5543
+ const qe = /* @__PURE__ */ K(ms, [["render", fs]]), ys = w({
5506
5544
  name: "tg-info-box",
5507
- mixins: [x],
5545
+ mixins: [k],
5508
5546
  inheritAttrs: !1,
5509
5547
  props: {
5510
5548
  show: D(Boolean),
@@ -5565,7 +5603,7 @@ const qe = /* @__PURE__ */ K(gs, [["render", ms]]), fs = w({
5565
5603
  return this.$el;
5566
5604
  },
5567
5605
  $marker() {
5568
- return ht(qe, this.$parent, Le);
5606
+ return ct(qe, this.$parent, xe);
5569
5607
  },
5570
5608
  open(i) {
5571
5609
  this.overlay.open(i);
@@ -5575,16 +5613,16 @@ const qe = /* @__PURE__ */ K(gs, [["render", ms]]), fs = w({
5575
5613
  }
5576
5614
  }
5577
5615
  });
5578
- function ys(i, t, e, r, s, n) {
5579
- return F(), U("div", ue({
5616
+ function vs(i, t, e, r, s, n) {
5617
+ return F(), U("div", pe({
5580
5618
  class: i.$options.name
5581
5619
  }, i.attrs.binds), [
5582
5620
  W(i.$slots, "default")
5583
5621
  ], 16);
5584
5622
  }
5585
- const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5623
+ const _s = /* @__PURE__ */ K(ys, [["render", vs]]), bs = w({
5586
5624
  name: "tg-info-window",
5587
- mixins: [x],
5625
+ mixins: [k],
5588
5626
  inheritAttrs: !1,
5589
5627
  props: {
5590
5628
  show: D(Boolean),
@@ -5623,7 +5661,7 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5623
5661
  return this.$el;
5624
5662
  },
5625
5663
  $marker() {
5626
- return ht(qe, this.$parent, Le);
5664
+ return ct(qe, this.$parent, xe);
5627
5665
  },
5628
5666
  getOptions() {
5629
5667
  return {
@@ -5646,24 +5684,24 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5646
5684
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
5647
5685
  }
5648
5686
  });
5649
- function bs(i, t, e, r, s, n) {
5650
- return Zr((F(), U("div", ue({
5687
+ function Ts(i, t, e, r, s, n) {
5688
+ return Wr((F(), U("div", pe({
5651
5689
  class: i.$options.name
5652
5690
  }, i.attrs.binds), [
5653
5691
  W(i.$slots, "default")
5654
5692
  ], 16)), [
5655
- [Wr, i.show]
5693
+ [jr, i.show]
5656
5694
  ]);
5657
5695
  }
5658
- const Ts = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5696
+ const Ms = /* @__PURE__ */ K(bs, [["render", Ts]]), Os = w({
5659
5697
  name: "tg-label",
5660
- mixins: [x],
5698
+ mixins: [k],
5661
5699
  inheritAttrs: !1,
5662
5700
  props: {
5663
5701
  position: m(y),
5664
5702
  offset: m(Object),
5665
5703
  zIndex: m(Number),
5666
- mapPane: Z(Me)
5704
+ mapPane: Z(Ce)
5667
5705
  },
5668
5706
  emits: void 0,
5669
5707
  setup(i, { attrs: t }) {
@@ -5698,7 +5736,7 @@ const Ts = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5698
5736
  return (i = this.$marker()) == null ? void 0 : i.marker;
5699
5737
  },
5700
5738
  $marker() {
5701
- return ht(qe, this.$parent, Le);
5739
+ return ct(qe, this.$parent, xe);
5702
5740
  },
5703
5741
  getOptions() {
5704
5742
  return {
@@ -5717,16 +5755,16 @@ const Ts = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5717
5755
  this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
5718
5756
  }
5719
5757
  });
5720
- function Os(i, t, e, r, s, n) {
5721
- return F(), U("div", ue({
5758
+ function Cs(i, t, e, r, s, n) {
5759
+ return F(), U("div", pe({
5722
5760
  class: i.$options.name
5723
5761
  }, i.attrs.binds), [
5724
5762
  W(i.$slots, "default")
5725
5763
  ], 16);
5726
5764
  }
5727
- const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5765
+ const ws = /* @__PURE__ */ K(Os, [["render", Cs]]), Es = w({
5728
5766
  name: "tg-polygon",
5729
- mixins: [x],
5767
+ mixins: [k],
5730
5768
  inheritAttrs: !1,
5731
5769
  props: {
5732
5770
  paths: D(Array),
@@ -5793,9 +5831,9 @@ const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5793
5831
  onDestroy() {
5794
5832
  this.$map.removeOverlay(this.overlay);
5795
5833
  }
5796
- }), Es = w({
5834
+ }), Ls = w({
5797
5835
  name: "tg-polyline",
5798
- mixins: [x],
5836
+ mixins: [k],
5799
5837
  inheritAttrs: !1,
5800
5838
  props: {
5801
5839
  path: D(Array),
@@ -5854,9 +5892,9 @@ const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5854
5892
  onDestroy() {
5855
5893
  this.$map.removeOverlay(this.overlay);
5856
5894
  }
5857
- }), Ls = w({
5895
+ }), Ps = w({
5858
5896
  name: "tg-rectangle",
5859
- mixins: [x],
5897
+ mixins: [k],
5860
5898
  inheritAttrs: !1,
5861
5899
  props: {
5862
5900
  bounds: D(Object),
@@ -5920,14 +5958,14 @@ const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5920
5958
  onDestroy() {
5921
5959
  this.$map.removeOverlay(this.overlay);
5922
5960
  }
5923
- }), Ps = ["beforeUpdate", "updated"], Js = {
5961
+ }), xs = ["beforeUpdate", "updated"], Qs = {
5924
5962
  install(i, t = {}) {
5925
5963
  if (t.enable !== !1) {
5926
5964
  const e = w({
5927
5965
  beforeCreate() {
5928
- const r = Lr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
5929
- t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ps.includes(a) || console.debug("[lifecycle]", r, a);
5930
- } : ve;
5966
+ const r = Pr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
5967
+ t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : xs.includes(a) || console.debug("[lifecycle]", r, a);
5968
+ } : Te;
5931
5969
  n("beforeCreate"), this.__life_impl = n;
5932
5970
  },
5933
5971
  created() {
@@ -5966,186 +6004,186 @@ const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5966
6004
  i.mixin(e);
5967
6005
  }
5968
6006
  }
5969
- }, xs = 6378137;
5970
- function ye(i) {
6007
+ }, ks = 6378137;
6008
+ function _e(i) {
5971
6009
  return i * Math.PI / 180;
5972
6010
  }
5973
- function Yt(i) {
6011
+ function qt(i) {
5974
6012
  return i * 180 / Math.PI;
5975
6013
  }
5976
- function ks(i, t) {
6014
+ function Bs(i, t) {
5977
6015
  if (i.lat === t.lat && i.lng === t.lng)
5978
6016
  return 0;
5979
- const e = ye((i.lat + t.lat) / 2), r = ye((i.lat - t.lat) / 2), s = ye((i.lng - t.lng) / 2);
6017
+ const e = _e((i.lat + t.lat) / 2), r = _e((i.lat - t.lat) / 2), s = _e((i.lng - t.lng) / 2);
5980
6018
  let n = Math.sin(r), a = Math.sin(s), h = Math.sin(e);
5981
- const o = xs, l = 1 / 298.257;
6019
+ const o = ks, l = 1 / 298.257;
5982
6020
  n = n * n, a = a * a, h = h * h;
5983
6021
  const d = n * (1 - a) + (1 - h) * a, u = (1 - n) * (1 - a) + h * a, p = Math.atan(Math.sqrt(d / u)), b = Math.sqrt(d * u) / p, _ = 2 * p * o, T = (3 * b - 1) / 2 / u, g = (3 * b + 1) / 2 / d;
5984
6022
  return _ * (1 + l * (T * h * (1 - n) - g * (1 - h) * n));
5985
6023
  }
5986
- function Bs(i, t, e) {
5987
- const s = 63567523142e-4, n = 1 / 298.257223563, a = ye(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(ye(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), b = d * h, _ = 1 - b * b, T = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + T / 16384 * (4096 + T * (-768 + T * (320 - 175 * T))), f = T / 1024 * (256 + T * (-128 + T * (74 - 47 * T)));
5988
- let v = 0, O = 0, P = 0, E = e / (s * g), Q = 2 * Math.PI;
6024
+ function Is(i, t, e) {
6025
+ const s = 63567523142e-4, n = 1 / 298.257223563, a = _e(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(_e(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), b = d * h, _ = 1 - b * b, T = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + T / 16384 * (4096 + T * (-768 + T * (320 - 175 * T))), f = T / 1024 * (256 + T * (-128 + T * (74 - 47 * T)));
6026
+ let v = 0, O = 0, x = 0, E = e / (s * g), Q = 2 * Math.PI;
5989
6027
  for (; Math.abs(E - Q) > 1e-12; ) {
5990
- v = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
5991
- const Br = f * O * (v + f / 4 * (P * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
5992
- Q = E, E = e / (s * g) + Br;
6028
+ v = Math.cos(2 * p + E), O = Math.sin(E), x = Math.cos(E);
6029
+ const Ir = f * O * (v + f / 4 * (x * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
6030
+ Q = E, E = e / (s * g) + Ir;
5993
6031
  }
5994
- const ie = u * O - d * P * o, Ke = Math.atan2(
5995
- u * P + d * O * o,
6032
+ const ie = u * O - d * x * o, Ke = Math.atan2(
6033
+ u * x + d * O * o,
5996
6034
  (1 - n) * Math.sqrt(b * b + ie * ie)
5997
- ), xr = Math.atan2(O * h, d * P - u * O * o), Xe = n / 16 * _ * (4 + n * (4 - 3 * _)), kr = xr - (1 - Xe) * n * b * (E + Xe * O * (v + Xe * P * (-1 + 2 * v * v)));
5998
- return { lng: i.lng + Yt(kr), lat: Yt(Ke) };
6035
+ ), kr = Math.atan2(O * h, d * x - u * O * o), Xe = n / 16 * _ * (4 + n * (4 - 3 * _)), Br = kr - (1 - Xe) * n * b * (E + Xe * O * (v + Xe * x * (-1 + 2 * v * v)));
6036
+ return { lng: i.lng + qt(Br), lat: qt(Ke) };
5999
6037
  }
6000
- const Qs = {
6001
- getDistance: ks,
6002
- getDestination: Bs
6003
- }, en = {
6038
+ const en = {
6039
+ getDistance: Bs,
6040
+ getDestination: Is
6041
+ }, tn = {
6004
6042
  install(i, t) {
6005
- if (li(t), {}.VITE_FALSE) {
6006
- const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Le, "./TgMapWidget.vue": Ji, "./controls/TgCustomControl.vue": ts, "./controls/TgMapTypeControl.vue": rs, "./controls/TgScaleControl.vue": is, "./controls/TgZoomControl.vue": ns, "./extra/TgMarkerClusterer.vue": Pr, "./layers/TgTrafficLayer.vue": ls, "./overlays/TgCircle.vue": hs, "./overlays/TgElementOverlay.vue": ps, "./overlays/TgInfoBox.vue": vs, "./overlays/TgInfoWindow.vue": Ts, "./overlays/TgLabel.vue": Cs, "./overlays/TgMarker.vue": qe, "./overlays/TgPolygon.vue": ws, "./overlays/TgPolyline.vue": Es, "./overlays/TgRectangle.vue": Ls });
6043
+ if (hi(t), {}.VITE_FALSE) {
6044
+ const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": xe, "./TgMapWidget.vue": Qi, "./controls/TgCustomControl.vue": rs, "./controls/TgMapTypeControl.vue": is, "./controls/TgScaleControl.vue": ss, "./controls/TgZoomControl.vue": os, "./extra/TgMarkerClusterer.vue": xr, "./layers/TgTrafficLayer.vue": hs, "./overlays/TgCircle.vue": cs, "./overlays/TgElementOverlay.vue": gs, "./overlays/TgInfoBox.vue": _s, "./overlays/TgInfoWindow.vue": Ms, "./overlays/TgLabel.vue": ws, "./overlays/TgMarker.vue": qe, "./overlays/TgPolygon.vue": Es, "./overlays/TgPolyline.vue": Ls, "./overlays/TgRectangle.vue": Ps });
6007
6045
  Object.keys(r).forEach((s) => {
6008
6046
  const n = r[s];
6009
6047
  i.component(n.name ?? C(`Tg开头的组件必须设置name: ${s}`), n);
6010
6048
  });
6011
6049
  }
6012
6050
  const e = i.config.optionMergeStrategies;
6013
- e[we] = e[Ee] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
6051
+ e[Le] = e[Pe] = (r, s) => r ? [...new Set([].concat(r, s))] : Array.isArray(s) ? s : [s];
6014
6052
  }
6015
6053
  };
6016
6054
  export {
6017
- ar as AbstractControl,
6018
- _t as AbstractMap,
6055
+ lr as AbstractControl,
6056
+ bt as AbstractMap,
6019
6057
  he as Arrays,
6020
- pr as Autocomplete,
6021
- vi as BaiduAutocomplete,
6022
- Tt as BaiduCircle,
6023
- dt as BaiduControl,
6024
- Et as BaiduInfoBoxOverlay,
6025
- Ct as BaiduInfoWindow,
6026
- pt as BaiduMapTypeControl,
6027
- Ie as BaiduMapUrls,
6028
- Ce as BaiduMarker,
6029
- Oi as BaiduMarkerClusterer,
6058
+ gr as Autocomplete,
6059
+ _i as BaiduAutocomplete,
6060
+ Mt as BaiduCircle,
6061
+ ut as BaiduControl,
6062
+ Lt as BaiduInfoBoxOverlay,
6063
+ wt as BaiduInfoWindow,
6064
+ gt as BaiduMapTypeControl,
6065
+ Ae as BaiduMapUrls,
6066
+ Ee as BaiduMarker,
6067
+ Ci as BaiduMarkerClusterer,
6030
6068
  Ue as BaiduOverlay,
6031
- Ei as BaiduPlacesService,
6032
- Bt as BaiduPolyShape,
6033
- At as BaiduPolygon,
6034
- It as BaiduPolyline,
6035
- $t as BaiduRectangle,
6036
- gt as BaiduScaleControl,
6037
- Pi as BaiduSearchBox,
6038
- ft as BaiduZoomControl,
6069
+ Li as BaiduPlacesService,
6070
+ It as BaiduPolyShape,
6071
+ Rt as BaiduPolygon,
6072
+ St as BaiduPolyline,
6073
+ zt as BaiduRectangle,
6074
+ mt as BaiduScaleControl,
6075
+ xi as BaiduSearchBox,
6076
+ yt as BaiduZoomControl,
6039
6077
  A as BuildInMapType,
6040
- lr as BuildInMapTypeId,
6041
- fe as CachedValue,
6078
+ hr as BuildInMapTypeId,
6079
+ ye as CachedValue,
6042
6080
  S as ControlPosition,
6043
6081
  z as ControlPositionConverter,
6044
- B as CoordType,
6045
- ui as CustomControl,
6046
- di as FastFindValues,
6047
- yi as GoogleAutocomplete,
6048
- Mt as GoogleCircle,
6049
- ut as GoogleControl,
6050
- Lt as GoogleInfoBoxOverlay,
6051
- wt as GoogleInfoWindow,
6052
- ke as GoogleMapTypeControl,
6053
- Be as GoogleMapUrls,
6054
- kt as GoogleMarker,
6055
- Ci as GoogleMarkerClusterer,
6056
- bt as GoogleOverlay,
6057
- wi as GooglePlacesService,
6058
- Rt as GooglePolygon,
6059
- St as GooglePolyline,
6060
- zt as GoogleRectangle,
6061
- mt as GoogleScaleControl,
6062
- Li as GoogleSearchBox,
6063
- yt as GoogleZoomControl,
6064
- De as Icon,
6065
- Ws as ImageMapType,
6066
- Ot as InfoWindow,
6067
- Wt as KeyValue,
6082
+ P as CoordType,
6083
+ pi as CustomControl,
6084
+ ui as FastFindValues,
6085
+ vi as GoogleAutocomplete,
6086
+ Ot as GoogleCircle,
6087
+ pt as GoogleControl,
6088
+ Pt as GoogleInfoBoxOverlay,
6089
+ Et as GoogleInfoWindow,
6090
+ Ie as GoogleMapTypeControl,
6091
+ Se as GoogleMapUrls,
6092
+ Bt as GoogleMarker,
6093
+ wi as GoogleMarkerClusterer,
6094
+ Tt as GoogleOverlay,
6095
+ Ei as GooglePlacesService,
6096
+ $t as GooglePolygon,
6097
+ At as GooglePolyline,
6098
+ Dt as GoogleRectangle,
6099
+ ft as GoogleScaleControl,
6100
+ Pi as GoogleSearchBox,
6101
+ vt as GoogleZoomControl,
6102
+ Ne as Icon,
6103
+ js as ImageMapType,
6104
+ Ct as InfoWindow,
6105
+ jt as KeyValue,
6068
6106
  y as LatLng,
6069
6107
  R as LatLngBounds,
6070
- Js as LifecycleLogPlugin,
6108
+ Qs as LifecycleLogPlugin,
6071
6109
  V as Location,
6072
- we as MIXIN_HOOK_CREATE,
6073
- Ee as MIXIN_HOOK_DESTROY,
6074
- Dt as MIXIN_MAP_NAME,
6110
+ Le as MIXIN_HOOK_CREATE,
6111
+ Pe as MIXIN_HOOK_DESTROY,
6112
+ Nt as MIXIN_MAP_NAME,
6075
6113
  ce as MVCArrays,
6076
- x as MapMixin,
6114
+ k as MapMixin,
6077
6115
  $ as MapType,
6078
- hr as MapTypeControlType,
6079
- gr as MapUrls,
6080
- xi as MapZoom,
6081
- br as MarkerClusterer,
6082
- be as Objects,
6083
- Cr as Overlay,
6084
- Tr as PlacesService,
6116
+ cr as MapTypeControlType,
6117
+ mr as MapUrls,
6118
+ ki as MapZoom,
6119
+ Tr as MarkerClusterer,
6120
+ Oe as Objects,
6121
+ wr as Overlay,
6122
+ Mr as PlacesService,
6085
6123
  X as Point,
6086
- Mr as SearchBox,
6087
- Qs as SphericalUtils,
6088
- Te as Strings,
6089
- Ne as SymbolIcon,
6090
- Fs as SymbolPath,
6091
- hs as TgCircle,
6092
- ts as TgCustomControl,
6093
- ps as TgElementOverlay,
6094
- vs as TgInfoBox,
6095
- Ts as TgInfoWindow,
6096
- Cs as TgLabel,
6097
- Le as TgMap,
6098
- at as TgMapFactory,
6124
+ Or as SearchBox,
6125
+ en as SphericalUtils,
6126
+ de as Strings,
6127
+ Ge as SymbolIcon,
6128
+ Us as SymbolPath,
6129
+ cs as TgCircle,
6130
+ rs as TgCustomControl,
6131
+ gs as TgElementOverlay,
6132
+ _s as TgInfoBox,
6133
+ Ms as TgInfoWindow,
6134
+ ws as TgLabel,
6135
+ xe as TgMap,
6136
+ lt as TgMapFactory,
6099
6137
  G as TgMapType,
6100
- rs as TgMapTypeControl,
6101
- Ji as TgMapWidget,
6138
+ is as TgMapTypeControl,
6139
+ Qi as TgMapWidget,
6102
6140
  qe as TgMarker,
6103
- Pr as TgMarkerClusterer,
6104
- ws as TgPolygon,
6105
- Es as TgPolyline,
6106
- Ls as TgRectangle,
6107
- is as TgScaleControl,
6108
- ls as TgTrafficLayer,
6109
- ns as TgZoomControl,
6110
- pi as TrafficLayer,
6111
- ze as UnionIcon,
6141
+ xr as TgMarkerClusterer,
6142
+ Es as TgPolygon,
6143
+ Ls as TgPolyline,
6144
+ Ps as TgRectangle,
6145
+ ss as TgScaleControl,
6146
+ hs as TgTrafficLayer,
6147
+ os as TgZoomControl,
6148
+ gi as TrafficLayer,
6149
+ De as UnionIcon,
6112
6150
  oe as assert,
6113
- rt as assertNever,
6114
- xe as callHook,
6115
- Us as computedSaveOnThis,
6116
- Er as createEmptyVNode,
6117
- Vi as createPropertyObject,
6118
- Ys as createPropertyObjectTyped,
6119
- Gs as debug,
6120
- en as default,
6151
+ it as assertNever,
6152
+ Be as callHook,
6153
+ Ys as computedSaveOnThis,
6154
+ Lr as createEmptyVNode,
6155
+ Fi as createPropertyObject,
6156
+ qs as createPropertyObjectTyped,
6157
+ Zs as debug,
6158
+ tn as default,
6121
6159
  L as eventProp,
6122
- Ks as extractVNodeFromSlotsByComponent,
6123
- ht as findAncestorComponentByType,
6124
- qs as findByComponentType,
6125
- Bs as getDestination,
6126
- ir as getTgMapConfig,
6127
- st as isComponentByType,
6128
- Zs as isDef,
6129
- Fr as isEntryValueDef,
6130
- $s as isInstanceOf,
6131
- Rs as lateinit,
6132
- ve as noop,
6160
+ Xs as extractVNodeFromSlotsByComponent,
6161
+ ct as findAncestorComponentByType,
6162
+ Ks as findByComponentType,
6163
+ Is as getDestination,
6164
+ sr as getTgMapConfig,
6165
+ nt as isComponentByType,
6166
+ Ws as isDef,
6167
+ Ur as isEntryValueDef,
6168
+ zs as isInstanceOf,
6169
+ $s as lateinit,
6170
+ Te as noop,
6133
6171
  m as optionalProp,
6134
- Ai as path,
6172
+ Ri as path,
6135
6173
  D as requiredProp,
6136
- zs as safeAs,
6137
- Qt as safeAsComponent,
6138
- li as setTgMapConfig,
6139
- Fi as splitAttrs,
6174
+ Ds as safeAs,
6175
+ er as safeAsComponent,
6176
+ hi as setTgMapConfig,
6177
+ Ui as splitAttrs,
6140
6178
  Z as stringEnumProp,
6141
- ji as stringUnionPropFromValues,
6179
+ Vi as stringUnionPropFromValues,
6142
6180
  C as throwError,
6143
- ct as throwUnsupported,
6144
- Ns as todo,
6145
- it as typed,
6146
- Ds as unwrapStringEnumValue,
6147
- Xs as useEventLogMethods,
6181
+ dt as throwUnsupported,
6182
+ Gs as todo,
6183
+ st as typed,
6184
+ Ns as unwrapStringEnumValue,
6185
+ Js as useEventLogMethods,
6148
6186
  q as useSplittedAttrs,
6149
- ss as useTgMapInner
6187
+ ns as useTgMapInner
6150
6188
  };
6151
6189
  //# sourceMappingURL=tg-map.js.map