tg-map-vue3 3.7.5 → 3.7.7

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
@@ -2,7 +2,7 @@
2
2
  var Ar = Object.defineProperty;
3
3
  var Rr = (i, t, e) => t in i ? Ar(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
4
  var c = (i, t, e) => (Rr(i, typeof t != "symbol" ? t + "" : t, e), e);
5
- import { createCommentVNode as it, computed as Xt, defineComponent as w, markRaw as $r, watch as Jt, openBlock as F, createElementBlock as U, mergeProps as me, createElementVNode as zr, normalizeClass as Ve, renderSlot as W, normalizeStyle as Dr, getCurrentInstance as Nr, inject as Gr, onMounted as Zr, onBeforeUnmount as Wr, toRaw as Fe, withDirectives as Hr, vShow as jr } from "vue";
5
+ import { createCommentVNode as it, computed as Xt, defineComponent as w, markRaw as $r, watch as Jt, openBlock as F, createElementBlock as U, mergeProps as ge, createElementVNode as zr, normalizeClass as Ve, renderSlot as W, normalizeStyle as Dr, getCurrentInstance as Nr, inject as Gr, onMounted as Zr, onBeforeUnmount as Wr, toRaw as Fe, withDirectives as jr, vShow as Hr } 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]);
@@ -25,11 +25,11 @@ var er = { exports: {} };
25
25
  i.exports ? i.exports = e() : t.coordtransform = e();
26
26
  })(Qt, function() {
27
27
  var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
28
- function n(g, y, b, O) {
29
- this.west = Math.min(g, b), this.north = Math.max(y, O), this.east = Math.max(g, b), this.south = Math.min(y, O);
28
+ function n(g, f, v, O) {
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);
30
30
  }
31
- n.prototype.contain = function(g, y) {
32
- return this.west <= g && this.east >= g && this.north >= y && this.south <= y;
31
+ n.prototype.contain = function(g, f) {
32
+ return this.west <= g && this.east >= g && this.north >= f && this.south <= f;
33
33
  };
34
34
  var a = [
35
35
  new n(79.4462, 49.2204, 96.33, 42.8899),
@@ -38,7 +38,7 @@ var er = { exports: {} };
38
38
  new n(82.9684, 29.5297, 97.0352, 26.7186),
39
39
  new n(97.0253, 29.5297, 124.367395, 20.414096),
40
40
  new n(107.975793, 20.414096, 111.744104, 17.871542)
41
- ], d = [
41
+ ], h = [
42
42
  new n(119.921265, 25.398623, 122.497559, 21.785006),
43
43
  new n(101.8652, 22.284, 106.665, 20.0988),
44
44
  new n(106.4525, 21.5422, 108.051, 20.4878),
@@ -47,93 +47,93 @@ var er = { exports: {} };
47
47
  new n(131.2662, 44.8922, 137.0227, 42.5692),
48
48
  new n(73.1246, 35.398637, 77.948114, 29.5297)
49
49
  ];
50
- function o(g, y) {
51
- for (var b = 0; b < a.length; b++)
52
- if (a[b].contain(g, y)) {
53
- for (var O = 0; O < d.length; O++)
54
- if (d[O].contain(g, y))
50
+ function o(g, f) {
51
+ for (var v = 0; v < a.length; v++)
52
+ if (a[v].contain(g, f)) {
53
+ for (var O = 0; O < h.length; O++)
54
+ if (h[O].contain(g, f))
55
55
  return !1;
56
56
  return !0;
57
57
  }
58
58
  return !1;
59
59
  }
60
- function l(g, y) {
61
- var b = g - 65e-4, O = y - 6e-3, P = Math.sqrt(b * b + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, b) - 3e-6 * Math.cos(b * t), ee = P * Math.cos(E), se = P * Math.sin(E);
62
- return [ee, se];
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);
62
+ return [Q, ie];
63
63
  }
64
- function h(g, y) {
65
- var b = Math.sqrt(g * g + y * y) + 2e-5 * Math.sin(y * t), O = Math.atan2(y, g) + 3e-6 * Math.cos(g * t), P = b * Math.cos(O) + 65e-4, E = b * Math.sin(O) + 6e-3;
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
66
  return [P, E];
67
67
  }
68
- function u(g, y) {
69
- return o(g, y) ? f(g, y) : [g, y];
68
+ function u(g, f) {
69
+ return o(g, f) ? b(g, f) : [g, f];
70
70
  }
71
- function p(g, y) {
72
- if (!o(g, y))
73
- return [g, y];
74
- var b = f(g, y);
75
- return [g * 2 - b[0], y * 2 - b[1]];
71
+ function p(g, f) {
72
+ if (!o(g, f))
73
+ return [g, f];
74
+ var v = b(g, f);
75
+ return [g * 2 - v[0], f * 2 - v[1]];
76
76
  }
77
- function f(g, y) {
78
- var b = _(g - 105, y - 35), O = M(g - 105, y - 35), P = y / 180 * e, E = Math.sin(P);
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);
79
79
  E = 1 - s * E * E;
80
- var ee = Math.sqrt(E);
81
- b = b * 180 / (r * (1 - s) / (E * ee) * e), O = O * 180 / (r / ee * Math.cos(P) * e);
82
- var se = y + b, Xe = g + O;
83
- return [Xe, se];
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);
82
+ var ie = f + v, Xe = g + O;
83
+ return [Xe, ie];
84
84
  }
85
- function _(g, y) {
86
- var b = -100 + 2 * g + 3 * y + 0.2 * y * y + 0.1 * g * y + 0.2 * Math.sqrt(Math.abs(g));
87
- return b += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, b += (20 * Math.sin(y * e) + 40 * Math.sin(y / 3 * e)) * 2 / 3, b += (160 * Math.sin(y / 12 * e) + 320 * Math.sin(y * e / 30)) * 2 / 3, b;
85
+ function _(g, f) {
86
+ var v = -100 + 2 * g + 3 * f + 0.2 * f * f + 0.1 * g * f + 0.2 * Math.sqrt(Math.abs(g));
87
+ return v += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, v += (20 * Math.sin(f * e) + 40 * Math.sin(f / 3 * e)) * 2 / 3, v += (160 * Math.sin(f / 12 * e) + 320 * Math.sin(f * e / 30)) * 2 / 3, v;
88
88
  }
89
- function M(g, y) {
90
- var b = 300 + g + 2 * y + 0.1 * g * g + 0.1 * g * y + 0.1 * Math.sqrt(Math.abs(g));
91
- return b += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, b += (20 * Math.sin(g * e) + 40 * Math.sin(g / 3 * e)) * 2 / 3, b += (150 * Math.sin(g / 12 * e) + 300 * Math.sin(g / 30 * e)) * 2 / 3, b;
89
+ function T(g, f) {
90
+ var v = 300 + g + 2 * f + 0.1 * g * g + 0.1 * g * f + 0.1 * Math.sqrt(Math.abs(g));
91
+ return v += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, v += (20 * Math.sin(g * e) + 40 * Math.sin(g / 3 * e)) * 2 / 3, v += (150 * Math.sin(g / 12 * e) + 300 * Math.sin(g / 30 * e)) * 2 / 3, v;
92
92
  }
93
93
  return {
94
94
  // 向前兼容
95
95
  bd09togcj02: l,
96
- gcj02tobd09: h,
96
+ gcj02tobd09: d,
97
97
  wgs84togcj02: u,
98
98
  gcj02towgs84: p,
99
99
  // 小驼峰命名风格
100
100
  bd09ToGcj02: l,
101
- gcj02ToBd09: h,
101
+ gcj02ToBd09: d,
102
102
  wgs84ToGcj02: u,
103
103
  gcj02ToWgs84: p,
104
- bd09ToWgs84: function(g, y) {
105
- if (!o(g, y))
106
- return [g, y];
107
- var b = l(g, y);
108
- return p(b[0], b[1]);
104
+ bd09ToWgs84: function(g, f) {
105
+ if (!o(g, f))
106
+ return [g, f];
107
+ var v = l(g, f);
108
+ return p(v[0], v[1]);
109
109
  },
110
- wgs84ToBd09: function(g, y) {
111
- if (!o(g, y))
112
- return [g, y];
113
- var b = u(g, y);
114
- return h(b[0], b[1]);
110
+ wgs84ToBd09: function(g, f) {
111
+ if (!o(g, f))
112
+ return [g, f];
113
+ var v = u(g, f);
114
+ return d(v[0], v[1]);
115
115
  }
116
116
  };
117
117
  });
118
118
  })(er);
119
119
  var Ur = er.exports;
120
- const ne = /* @__PURE__ */ ct(Ur);
121
- function ae(i, t) {
120
+ const se = /* @__PURE__ */ ct(Ur);
121
+ function oe(i, t) {
122
122
  if (!i)
123
123
  throw new Error(`AssertionError: ${t}`);
124
124
  }
125
125
  function st(i) {
126
126
  throw new Error(`Unexpected object: ${i}`);
127
127
  }
128
- function Gs() {
128
+ function zs() {
129
129
  }
130
130
  function nt(i) {
131
131
  return i;
132
132
  }
133
- function Zs(i, t) {
133
+ function Ds(i, t) {
134
134
  return i instanceof t;
135
135
  }
136
- function Ws(i, t) {
136
+ function Ns(i, t) {
137
137
  if (i instanceof t)
138
138
  return i;
139
139
  }
@@ -153,7 +153,7 @@ function dt(i, t, e) {
153
153
  r = r.$parent;
154
154
  }
155
155
  }
156
- function Hs(i) {
156
+ function Gs(i) {
157
157
  return i;
158
158
  }
159
159
  function C(i) {
@@ -162,26 +162,22 @@ function C(i) {
162
162
  function ut(i) {
163
163
  throw new Error(`Unsupported: ${i}`);
164
164
  }
165
- function js(i) {
165
+ function Zs(i) {
166
166
  throw new Error(`todo: ${i}`);
167
167
  }
168
- function Vs(i) {
168
+ function Ws(i) {
169
169
  return i;
170
170
  }
171
- function Oe(...i) {
171
+ function Me(...i) {
172
172
  }
173
- function Fs(i) {
173
+ function js(i) {
174
174
  return i != null;
175
175
  }
176
176
  function Yr(i) {
177
177
  return i[1] != null;
178
178
  }
179
- function qr(i) {
180
- let t = null;
181
- return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
182
- }
183
179
  var x = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(x || {});
184
- const Qe = "wgs84", I = class {
180
+ const Qe = "wgs84", B = class {
185
181
  constructor(t, e, r) {
186
182
  this.lat = t, this.lng = e, this.coord = r;
187
183
  }
@@ -203,23 +199,23 @@ const Qe = "wgs84", I = class {
203
199
  }
204
200
  /** @param coord Baidu Map的坐标一般都是bd09 */
205
201
  static fromBaidu(t, e) {
206
- return new I(t.lat, t.lng, e);
202
+ return new B(t.lat, t.lng, e);
207
203
  }
208
204
  /** @param coord Google Map的坐标依据地图类型不同是不一样的 */
209
205
  static fromGoogle(t, e) {
210
- return new I(t.lat(), t.lng(), e);
206
+ return new B(t.lat(), t.lng(), e);
211
207
  }
212
208
  static fromHere(t, e) {
213
- return new I(t.lat, t.lng, e);
209
+ return new B(t.lat, t.lng, e);
214
210
  }
215
211
  static fromLiteral(t) {
216
- return new I(t.lat, t.lng, t.coord || Qe);
212
+ return new B(t.lat, t.lng, t.coord || Qe);
217
213
  }
218
214
  static fromLngLat(t, e, r = Qe) {
219
- return new I(e, t, r);
215
+ return new B(e, t, r);
220
216
  }
221
217
  static create(t, e, r = Qe) {
222
- return new I(t, e, r);
218
+ return new B(t, e, r);
223
219
  }
224
220
  /** 转换坐标到指定坐标系 */
225
221
  to(t) {
@@ -227,7 +223,7 @@ const Qe = "wgs84", I = class {
227
223
  if (this.coord === e)
228
224
  return this;
229
225
  const [r, s] = this._convert(e);
230
- return new I(s, r, e);
226
+ return new B(s, r, e);
231
227
  }
232
228
  /**
233
229
  * TODO: normalize要不要默认设为true, 和google的行为保持一致?
@@ -237,7 +233,7 @@ const Qe = "wgs84", I = class {
237
233
  */
238
234
  toBaidu(t, e = !1) {
239
235
  let r = this.lat, s = this.lng;
240
- return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = I._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);
241
237
  }
242
238
  /**
243
239
  * 转换成google的经纬度, 内部会自动进行标准化
@@ -263,11 +259,11 @@ const Qe = "wgs84", I = class {
263
259
  _convert(t) {
264
260
  switch (this.coord) {
265
261
  case "bd09":
266
- return t === "gcj02" ? ne.bd09ToGcj02(this.lng, this.lat) : ne.bd09ToWgs84(this.lng, this.lat);
262
+ return t === "gcj02" ? se.bd09ToGcj02(this.lng, this.lat) : se.bd09ToWgs84(this.lng, this.lat);
267
263
  case "gcj02":
268
- return t === "wgs84" ? ne.gcj02ToWgs84(this.lng, this.lat) : ne.gcj02ToBd09(this.lng, this.lat);
264
+ return t === "wgs84" ? se.gcj02ToWgs84(this.lng, this.lat) : se.gcj02ToBd09(this.lng, this.lat);
269
265
  case "wgs84":
270
- return t === "bd09" ? ne.wgs84ToBd09(this.lng, this.lat) : ne.wgs84ToGcj02(this.lng, this.lat);
266
+ return t === "bd09" ? se.wgs84ToBd09(this.lng, this.lat) : se.wgs84ToGcj02(this.lng, this.lat);
271
267
  }
272
268
  throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`);
273
269
  }
@@ -276,8 +272,8 @@ const Qe = "wgs84", I = class {
276
272
  * @see _normalize {@macro latlng_normalize}
277
273
  */
278
274
  normalize() {
279
- const [t, e] = I._normalize(this.lng, this.lat);
280
- return e === this.lat && t === this.lng ? this : new I(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);
281
277
  }
282
278
  equals(t) {
283
279
  return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
@@ -286,9 +282,9 @@ const Qe = "wgs84", I = class {
286
282
  return JSON.stringify(this);
287
283
  }
288
284
  };
289
- let v = I;
290
- c(v, "ZERO", I.create(0, 0));
291
- const re = class {
285
+ let y = B;
286
+ c(y, "ZERO", B.create(0, 0));
287
+ const te = class {
292
288
  /**
293
289
  * 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
294
290
  * @param sw 西南, lat/lng更小
@@ -296,7 +292,7 @@ const re = class {
296
292
  */
297
293
  constructor(t, e) {
298
294
  c(this, "coord");
299
- this.sw = t, this.ne = e, ae(t.coord === e.coord, "sw和ne的coord应该相同"), ae(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), ae(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
295
+ this.sw = t, this.ne = e, oe(t.coord === e.coord, "sw和ne的coord应该相同"), oe(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), oe(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
300
296
  }
301
297
  static isBetweenLng(t, e, r) {
302
298
  return t <= e ? t <= r && r <= e : t <= r || r <= e;
@@ -304,7 +300,7 @@ const re = class {
304
300
  static fromArray(t) {
305
301
  if (t.length === 0)
306
302
  return;
307
- const e = new re.Builder(t[0]);
303
+ const e = new te.Builder(t[0]);
308
304
  for (let r = 1; r < t.length; r++)
309
305
  e.include(t[r]);
310
306
  return e.build();
@@ -313,15 +309,15 @@ const re = class {
313
309
  return this.fromArray(t) ?? C("positions中没有点");
314
310
  }
315
311
  static fromGoogle(t, e) {
316
- return new re(
317
- v.fromGoogle(t.getSouthWest(), e),
318
- v.fromGoogle(t.getNorthEast(), e)
312
+ return new te(
313
+ y.fromGoogle(t.getSouthWest(), e),
314
+ y.fromGoogle(t.getNorthEast(), e)
319
315
  );
320
316
  }
321
317
  static fromBaidu(t, e) {
322
- return new re(
323
- v.fromBaidu(t.getSouthWest(), e),
324
- v.fromBaidu(t.getNorthEast(), e)
318
+ return new te(
319
+ y.fromBaidu(t.getSouthWest(), e),
320
+ y.fromBaidu(t.getNorthEast(), e)
325
321
  );
326
322
  }
327
323
  static create(t, e) {
@@ -332,13 +328,13 @@ const re = class {
332
328
  }
333
329
  contains(t) {
334
330
  const { lat: e, lng: r } = t.to(this.coord);
335
- return this.sw.lat <= e && e <= this.ne.lat && re.isBetweenLng(this.sw.lng, this.ne.lng, r);
331
+ return this.sw.lat <= e && e <= this.ne.lat && te.isBetweenLng(this.sw.lng, this.ne.lng, r);
336
332
  }
337
333
  getCenter() {
338
334
  if (this.sw.equals(this.ne))
339
335
  return this.sw;
340
336
  const t = (this.sw.lat + this.ne.lat) / 2, e = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
341
- return v.create(t, e, this.coord);
337
+ return y.create(t, e, this.coord);
342
338
  }
343
339
  toString() {
344
340
  return JSON.stringify(this);
@@ -354,9 +350,9 @@ const re = class {
354
350
  const t = this.sw.coord;
355
351
  return [
356
352
  this.sw,
357
- v.fromLngLat(this.sw.lng, this.ne.lat, t),
353
+ y.fromLngLat(this.sw.lng, this.ne.lat, t),
358
354
  this.ne,
359
- v.fromLngLat(this.ne.lng, this.sw.lat, t)
355
+ y.fromLngLat(this.ne.lng, this.sw.lat, t)
360
356
  ];
361
357
  }
362
358
  toGoogle(t) {
@@ -369,8 +365,8 @@ const re = class {
369
365
  return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
370
366
  }
371
367
  };
372
- let R = re;
373
- c(R, "EMPTY", new re(v.ZERO, v.ZERO));
368
+ let R = te;
369
+ c(R, "EMPTY", new te(y.ZERO, y.ZERO));
374
370
  ((i) => {
375
371
  class t {
376
372
  constructor(r) {
@@ -384,9 +380,9 @@ c(R, "EMPTY", new re(v.ZERO, v.ZERO));
384
380
  build() {
385
381
  return new i(
386
382
  // sw对应min
387
- v.create(this.minLat, this.minLng, this.coord),
383
+ y.create(this.minLat, this.minLng, this.coord),
388
384
  // ne对应max
389
- v.create(this.maxLat, this.maxLng, this.coord)
385
+ y.create(this.maxLat, this.maxLng, this.coord)
390
386
  );
391
387
  }
392
388
  include(r) {
@@ -415,6 +411,102 @@ var V;
415
411
  }
416
412
  i.getCoordType = e;
417
413
  })(V || (V = {}));
414
+ var qr = function(t) {
415
+ return Kr(t) && !Xr(t);
416
+ };
417
+ function Kr(i) {
418
+ return !!i && typeof i == "object";
419
+ }
420
+ function Xr(i) {
421
+ var t = Object.prototype.toString.call(i);
422
+ return t === "[object RegExp]" || t === "[object Date]" || ei(i);
423
+ }
424
+ var Jr = typeof Symbol == "function" && Symbol.for, Qr = Jr ? Symbol.for("react.element") : 60103;
425
+ function ei(i) {
426
+ return i.$$typeof === Qr;
427
+ }
428
+ function ti(i) {
429
+ return Array.isArray(i) ? [] : {};
430
+ }
431
+ function Oe(i, t) {
432
+ return t.clone !== !1 && t.isMergeableObject(i) ? le(ti(i), i, t) : i;
433
+ }
434
+ function ri(i, t, e) {
435
+ return i.concat(t).map(function(r) {
436
+ return Oe(r, e);
437
+ });
438
+ }
439
+ function ii(i, t) {
440
+ if (!t.customMerge)
441
+ return le;
442
+ var e = t.customMerge(i);
443
+ return typeof e == "function" ? e : le;
444
+ }
445
+ function si(i) {
446
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
447
+ return Object.propertyIsEnumerable.call(i, t);
448
+ }) : [];
449
+ }
450
+ function Wt(i) {
451
+ return Object.keys(i).concat(si(i));
452
+ }
453
+ function rr(i, t) {
454
+ try {
455
+ return t in i;
456
+ } catch {
457
+ return !1;
458
+ }
459
+ }
460
+ function ni(i, t) {
461
+ return rr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
462
+ }
463
+ function oi(i, t, e) {
464
+ var r = {};
465
+ return e.isMergeableObject(i) && Wt(i).forEach(function(s) {
466
+ r[s] = Oe(i[s], e);
467
+ }), Wt(t).forEach(function(s) {
468
+ ni(i, s) || (rr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ii(s, e)(i[s], t[s], e) : r[s] = Oe(t[s], e));
469
+ }), r;
470
+ }
471
+ function le(i, t, e) {
472
+ e = e || {}, e.arrayMerge = e.arrayMerge || ri, e.isMergeableObject = e.isMergeableObject || qr, e.cloneUnlessOtherwiseSpecified = Oe;
473
+ var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
474
+ return n ? r ? e.arrayMerge(i, t, e) : oi(i, t, e) : Oe(t, e);
475
+ }
476
+ le.all = function(t, e) {
477
+ if (!Array.isArray(t))
478
+ throw new Error("first argument should be an array");
479
+ return t.reduce(function(r, s) {
480
+ return le(r, s, e);
481
+ }, {});
482
+ };
483
+ var ai = le, li = ai;
484
+ const ir = /* @__PURE__ */ ct(li), ze = ["3.0"], hi = {
485
+ baidu: {
486
+ version: "3.0",
487
+ // 在build时会被静态替换, 导致使用者不能无法设置它
488
+ // @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
489
+ // @see @vite_process_env_detail
490
+ key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
491
+ },
492
+ google: {
493
+ version: "quarterly",
494
+ key: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",
495
+ language: "en-us",
496
+ libraries: ["places"]
497
+ },
498
+ here: {
499
+ version: ze[0],
500
+ key: ""
501
+ }
502
+ };
503
+ let sr;
504
+ function nr() {
505
+ return sr || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
506
+ }
507
+ function ci(i) {
508
+ i != null && (sr = ir(hi, i));
509
+ }
418
510
  var at;
419
511
  ((i) => {
420
512
  function t(e) {
@@ -424,35 +516,35 @@ var at;
424
516
  })(at || (at = {}));
425
517
  var he;
426
518
  ((i) => {
427
- function t(d, o) {
428
- return d.length === o.length && d.every((l, h) => l === o[h]);
519
+ function t(h, o) {
520
+ return h.length === o.length && h.every((l, d) => l === o[d]);
429
521
  }
430
522
  i.equals = t;
431
- function e(d, o) {
432
- const l = d.indexOf(o);
523
+ function e(h, o) {
524
+ const l = h.indexOf(o);
433
525
  if (l !== -1)
434
- return d.splice(l, 1)[0];
526
+ return h.splice(l, 1)[0];
435
527
  }
436
528
  i.remove = e;
437
- function r(d, o) {
438
- for (const l of d)
529
+ function r(h, o) {
530
+ for (const l of h)
439
531
  if (l instanceof o)
440
532
  return l;
441
533
  }
442
534
  i.findByType = r;
443
- function s(d, o) {
444
- return d.includes(o);
535
+ function s(h, o) {
536
+ return h.includes(o);
445
537
  }
446
538
  i.includesTyped = s;
447
- function n(d, o, l) {
448
- const h = o >= 0 ? o : d.length + o;
539
+ function n(h, o, l) {
540
+ const d = o >= 0 ? o : h.length + o;
449
541
  if (l === void 0)
450
- return d[h];
451
- d[h] = l;
542
+ return h[d];
543
+ h[d] = l;
452
544
  }
453
545
  i.at = n;
454
- function a(d) {
455
- return d.length > 0;
546
+ function a(h) {
547
+ return h.length > 0;
456
548
  }
457
549
  i.isNotEmpty = a;
458
550
  })(he || (he = {}));
@@ -460,9 +552,9 @@ var ce;
460
552
  ((i) => {
461
553
  function t(s, n) {
462
554
  const a = s.getLength();
463
- for (let d = 0; d < a; d++)
464
- if (s.getAt(d) === n)
465
- return d;
555
+ for (let h = 0; h < a; h++)
556
+ if (s.getAt(h) === n)
557
+ return h;
466
558
  return -1;
467
559
  }
468
560
  i.indexOf = t;
@@ -481,19 +573,19 @@ var ce;
481
573
  }
482
574
  i.listenChanged = r;
483
575
  })(ce || (ce = {}));
484
- function rr(i, t, e) {
576
+ function or(i, t, e) {
485
577
  return i.addListener(t, e).remove;
486
578
  }
487
- function Kr(i, t, e) {
579
+ function di(i, t, e) {
488
580
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
489
581
  }
490
- function Xr(i, t, e, r) {
582
+ function ui(i, t, e, r) {
491
583
  return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
492
584
  }
493
- function Wt(i, t, e) {
585
+ function jt(i, t, e) {
494
586
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
495
587
  }
496
- class ir {
588
+ class ar {
497
589
  constructor(t, e) {
498
590
  c(this, "eventMap", /* @__PURE__ */ new Map());
499
591
  c(this, "target", void 0);
@@ -505,7 +597,7 @@ class ir {
505
597
  }
506
598
  class Ue {
507
599
  constructor(t, e) {
508
- c(this, "eventHub", new sr());
600
+ c(this, "eventHub", new lr());
509
601
  this.delegate = t, this.options = e;
510
602
  }
511
603
  notify(t) {
@@ -532,7 +624,7 @@ class Ue {
532
624
  this.delegate.removeEventListener(t, e);
533
625
  }
534
626
  }
535
- const Zt = class extends ir {
627
+ const Zt = class extends ar {
536
628
  addEventListener(t, e) {
537
629
  const r = $e(t, e);
538
630
  if (this.eventMap.get(r)) {
@@ -545,7 +637,7 @@ const Zt = class extends ir {
545
637
  target: this.target,
546
638
  originalEvent: n
547
639
  };
548
- n != null && n.latLng && (a.position = v.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
640
+ n != null && n.latLng && (a.position = y.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
549
641
  });
550
642
  this.eventMap.set(r, s);
551
643
  }
@@ -554,9 +646,9 @@ const Zt = class extends ir {
554
646
  s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
555
647
  }
556
648
  };
557
- let ie = Zt;
649
+ let re = Zt;
558
650
  // 事件类型映射: tg => google
559
- c(ie, "EVENT_TYPE_MAP", {
651
+ c(re, "EVENT_TYPE_MAP", {
560
652
  "center-changed": "center_changed",
561
653
  "zoom-changed": "zoom_changed",
562
654
  "radius-changed": "radius_changed",
@@ -572,7 +664,7 @@ c(ie, "EVENT_TYPE_MAP", {
572
664
  "map-mouseup": "mouseup",
573
665
  "map-dblclick": "dblclick"
574
666
  });
575
- const We = class extends ir {
667
+ const We = class extends ar {
576
668
  addEventListener(t, e) {
577
669
  const r = $e(t, e);
578
670
  if (this.eventMap.get(r)) {
@@ -585,7 +677,7 @@ const We = class extends ir {
585
677
  target: this.target,
586
678
  originalEvent: n
587
679
  };
588
- n.point && (a.position = v.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
680
+ n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
589
681
  };
590
682
  this.inner.addEventListener(We.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
591
683
  }
@@ -594,10 +686,10 @@ const We = class extends ir {
594
686
  s ? (this.inner.removeEventListener(We.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
595
687
  }
596
688
  };
597
- let le = We;
689
+ let ae = We;
598
690
  // cSpell:words clickclose
599
691
  // 事件类型映射, tg => baidu
600
- c(le, "EVENT_TYPE_MAP", {
692
+ c(ae, "EVENT_TYPE_MAP", {
601
693
  drag: "dragging",
602
694
  closeclick: "clickclose",
603
695
  // baidu不支持contextmenu事件, 将其映射为rightclick
@@ -605,7 +697,7 @@ c(le, "EVENT_TYPE_MAP", {
605
697
  "zoom-changed": "zoomend",
606
698
  "map-type-changed": "maptypechange"
607
699
  });
608
- class sr {
700
+ class lr {
609
701
  constructor() {
610
702
  c(this, "typeMap", /* @__PURE__ */ new Map());
611
703
  }
@@ -633,7 +725,7 @@ class Ht {
633
725
  constructor(t, e) {
634
726
  c(this, "keyToValue", /* @__PURE__ */ new Map());
635
727
  c(this, "valueToKey", /* @__PURE__ */ new Map());
636
- ae(t.length === e.length);
728
+ oe(t.length === e.length);
637
729
  for (let r = t.length - 1; r >= 0; r--)
638
730
  this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
639
731
  }
@@ -644,7 +736,7 @@ class Ht {
644
736
  return this.keyToValue.get(t) ?? C();
645
737
  }
646
738
  }
647
- class Jr {
739
+ class pi {
648
740
  constructor(t, e = 10) {
649
741
  c(this, "map", /* @__PURE__ */ new Map());
650
742
  this.values = t, this.maxSize4Debug = e;
@@ -673,7 +765,7 @@ class Jr {
673
765
  return this.getOrNull(t, e) ?? C(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
674
766
  }
675
767
  }
676
- class _e {
768
+ class ve {
677
769
  constructor(t) {
678
770
  c(this, "value");
679
771
  this.creator = t;
@@ -748,16 +840,16 @@ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
748
840
  }
749
841
  i.getGoogle = n;
750
842
  })(z || (z = {}));
751
- class Qr {
843
+ class gi {
752
844
  constructor(t) {
753
845
  /** 实际添加到地图中的control对象 */
754
846
  c(this, "inner");
755
847
  this.position = t;
756
848
  }
757
849
  }
758
- class nr {
850
+ class hr {
759
851
  }
760
- class pt extends nr {
852
+ class pt extends hr {
761
853
  constructor(t, e) {
762
854
  super(), this.inner = t, this.position = e;
763
855
  }
@@ -780,7 +872,7 @@ class pt extends nr {
780
872
  t.innerMap.removeControl(this.inner);
781
873
  }
782
874
  }
783
- class gt extends nr {
875
+ class gt extends hr {
784
876
  constructor(e, r) {
785
877
  super();
786
878
  c(this, "visible", !1);
@@ -817,7 +909,7 @@ class gt extends nr {
817
909
  });
818
910
  }
819
911
  }
820
- var or = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(or || {});
912
+ var cr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(cr || {});
821
913
  class A {
822
914
  constructor(t, e, r, s) {
823
915
  this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
@@ -842,16 +934,16 @@ class A {
842
934
  ut("google的内置地图没有对应的实例");
843
935
  }
844
936
  }
845
- class Us {
937
+ class Hs {
846
938
  constructor(t, e) {
847
- c(this, "baiduLayerCached", new _e(() => {
939
+ c(this, "baiduLayerCached", new ve(() => {
848
940
  const t = new BMap.TileLayer({});
849
941
  return t.getTilesUrl = (e, r) => {
850
942
  const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
851
943
  return this.options.getTileUrl({ x: n, y: a }, r);
852
944
  }, t;
853
945
  }));
854
- c(this, "baiduMapTypeCached", new _e(() => {
946
+ c(this, "baiduMapTypeCached", new ve(() => {
855
947
  const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
856
948
  maxZoom: this.options.maxZoom,
857
949
  minZoom: this.options.minZoom,
@@ -859,7 +951,7 @@ class Us {
859
951
  });
860
952
  return t.__baidu_map_type__ = this, t;
861
953
  }));
862
- c(this, "googleCached", new _e(() => {
954
+ c(this, "googleCached", new ve(() => {
863
955
  const t = new google.maps.ImageMapType({
864
956
  getTileUrl: (e, r) => this.options.getTileUrl(e, r),
865
957
  tileSize: new google.maps.Size(256, 256),
@@ -894,10 +986,10 @@ class Us {
894
986
  ut("这个方法不会被调用");
895
987
  }
896
988
  }
897
- class ei {
989
+ class mi {
898
990
  constructor() {
899
- c(this, "baiduCache", new _e(() => new BMap.TrafficLayer()));
900
- c(this, "googleCache", new _e(() => new google.maps.TrafficLayer()));
991
+ c(this, "baiduCache", new ve(() => new BMap.TrafficLayer()));
992
+ c(this, "googleCache", new ve(() => new google.maps.TrafficLayer()));
901
993
  }
902
994
  asBaiduLayer() {
903
995
  return this.baiduCache.get();
@@ -914,13 +1006,13 @@ var $;
914
1006
  ), () => (
915
1007
  /* 地形 */
916
1008
  google.maps.MapTypeId.TERRAIN
917
- ), x.wgs84), i.BUILD_IN_MAP_TYPES = new Jr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
1009
+ ), x.wgs84), i.BUILD_IN_MAP_TYPES = new pi([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
918
1010
  })($ || ($ = {}));
919
- var ar = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(ar || {});
920
- const lr = [$.NORMAL, $.SATELLITE, $.HYBRID];
1011
+ var dr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(dr || {});
1012
+ const ur = [$.NORMAL, $.SATELLITE, $.HYBRID];
921
1013
  class mt extends pt {
922
1014
  static create(t) {
923
- const e = t.mapTypes ?? lr, r = {
1015
+ const e = t.mapTypes ?? ur, r = {
924
1016
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
925
1017
  horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
926
1018
  dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
@@ -931,20 +1023,20 @@ class mt extends pt {
931
1023
  return t.position && s.setAnchor(z.getBaidu().toValue(t.position)), new mt(s, t.position);
932
1024
  }
933
1025
  }
934
- const oe = class extends gt {
935
- constructor(t = "default", e = S.TOP_LEFT, r = lr) {
936
- super("mapType", e), this.type = t, this.mapTypes = r, oe.type2google || (oe.type2google = {
1026
+ const ne = class extends gt {
1027
+ constructor(t = "default", e = S.TOP_LEFT, r = ur) {
1028
+ super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
937
1029
  default: google.maps.MapTypeControlStyle.DEFAULT,
938
1030
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
939
1031
  dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
940
1032
  });
941
1033
  }
942
1034
  static create(t) {
943
- return new oe(t.type, t.position, t.mapTypes);
1035
+ return new ne(t.type, t.position, t.mapTypes);
944
1036
  }
945
1037
  onCreateOptions() {
946
1038
  const t = super.onCreateOptions();
947
- return t.style = oe.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof A ? e.getGoogleMapTypeId() : e.id), t;
1039
+ return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof A ? e.getGoogleMapTypeId() : e.id), t;
948
1040
  }
949
1041
  addTo(t) {
950
1042
  super.addTo(t), this.mapTypes.forEach((e) => {
@@ -952,7 +1044,7 @@ const oe = class extends gt {
952
1044
  });
953
1045
  }
954
1046
  };
955
- let Se = oe;
1047
+ let Se = ne;
956
1048
  c(Se, "type2google");
957
1049
  class ft extends pt {
958
1050
  static create(t) {
@@ -988,28 +1080,28 @@ class _t extends gt {
988
1080
  super("zoom", t);
989
1081
  }
990
1082
  }
991
- function ti(i) {
1083
+ function fi(i) {
992
1084
  let t, e, r;
993
- const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", d = "__ib__", o = document, l = window, h = l[n] || (l[n] = {}), u = h.maps || (h.maps = {}), p = /* @__PURE__ */ new Set(), f = new URLSearchParams(), _ = () => t || (t = new Promise(async (M, g) => {
994
- var y;
995
- await (e = o.createElement("script")), f.set("libraries", [...p] + "");
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
+ var f;
1087
+ await (e = o.createElement("script")), b.set("libraries", [...p] + "");
996
1088
  for (r in i)
997
- f.set(r.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), i[r]);
998
- f.set("callback", n + ".maps." + d), e.src = `https://maps.${n}apis.com/maps/api/js?` + f, u[d] = M, e.onerror = () => t = g(Error(s + " could not load.")), e.nonce = ((y = o.querySelector("script[nonce]")) == null ? void 0 : y.nonce) || "", o.head.append(e);
1089
+ b.set(r.replace(/[A-Z]/g, (v) => "_" + v[0].toLowerCase()), i[r]);
1090
+ b.set("callback", n + ".maps." + h), e.src = `https://maps.${n}apis.com/maps/api/js?` + b, u[h] = T, e.onerror = () => t = g(Error(s + " could not load.")), e.nonce = ((f = o.querySelector("script[nonce]")) == null ? void 0 : f.nonce) || "", o.head.append(e);
999
1091
  }));
1000
- u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (M, ...g) => p.add(M) && _().then(() => u[a](M, ...g));
1092
+ u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (T, ...g) => p.add(T) && _().then(() => u[a](T, ...g));
1001
1093
  }
1002
- let ri, ii;
1094
+ let yi, vi;
1003
1095
  const J = {
1004
1096
  /** Google的坐标0点 */
1005
1097
  get LATLNG_ZERO() {
1006
- return ri ?? (ri = new google.maps.LatLng({ lat: 0, lng: 0 }));
1098
+ return yi ?? (yi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1007
1099
  },
1008
1100
  get BOUNDS_ZERO() {
1009
- return ii ?? (ii = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1101
+ return vi ?? (vi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1010
1102
  }
1011
1103
  };
1012
- function hr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1104
+ function pr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1013
1105
  for (const e of i)
1014
1106
  for (const r of e.types)
1015
1107
  switch (r) {
@@ -1034,22 +1126,22 @@ function hr(i, t = { country: "", province: "", city: "", district: "", street:
1034
1126
  }
1035
1127
  return t;
1036
1128
  }
1037
- function cr(i, t) {
1129
+ function gr(i, t) {
1038
1130
  var r;
1039
- const e = i.address_components && hr(i.address_components);
1131
+ const e = i.address_components && pr(i.address_components);
1040
1132
  return {
1041
1133
  country: (e == null ? void 0 : e.country) ?? "",
1042
1134
  province: (e == null ? void 0 : e.province) ?? "",
1043
1135
  city: (e == null ? void 0 : e.city) ?? "",
1044
1136
  id: i.place_id ?? "",
1045
1137
  address: i.formatted_address ?? "",
1046
- position: v.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? J.LATLNG_ZERO, t.coordType),
1138
+ position: y.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? J.LATLNG_ZERO, t.coordType),
1047
1139
  title: i.name ?? ""
1048
1140
  };
1049
1141
  }
1050
- class dr {
1142
+ class mr {
1051
1143
  }
1052
- class si extends dr {
1144
+ class _i extends mr {
1053
1145
  constructor(e, r) {
1054
1146
  super();
1055
1147
  c(this, "inner");
@@ -1065,7 +1157,7 @@ class si extends dr {
1065
1157
  this.inner.setBounds(e.toGoogle(this.map.coordType));
1066
1158
  }
1067
1159
  addResultListener(e) {
1068
- return rr(this.inner, "place_changed", () => {
1160
+ return or(this.inner, "place_changed", () => {
1069
1161
  const r = this.inner.getPlace(), s = {
1070
1162
  title: r.name ?? "",
1071
1163
  province: "",
@@ -1075,11 +1167,11 @@ class si extends dr {
1075
1167
  streetNumber: "",
1076
1168
  country: ""
1077
1169
  };
1078
- r.address_components && hr(r.address_components, s), e(s);
1170
+ r.address_components && pr(r.address_components, s), e(s);
1079
1171
  });
1080
1172
  }
1081
1173
  }
1082
- class ni extends dr {
1174
+ class bi extends mr {
1083
1175
  constructor(e, r) {
1084
1176
  super();
1085
1177
  c(this, "inner");
@@ -1093,7 +1185,7 @@ class ni extends dr {
1093
1185
  const s = () => {
1094
1186
  this.inner.setLocation(this.map.innerMap);
1095
1187
  };
1096
- this.removeableArray.push(Wt(this.map, "center-changed", s)), this.removeableArray.push(Wt(this.map, "zoom-changed", s));
1188
+ this.removeableArray.push(jt(this.map, "center-changed", s)), this.removeableArray.push(jt(this.map, "zoom-changed", s));
1097
1189
  }
1098
1190
  }
1099
1191
  setBounds(e) {
@@ -1101,14 +1193,14 @@ class ni extends dr {
1101
1193
  }
1102
1194
  addResultListener(e) {
1103
1195
  let r = 0;
1104
- const s = Kr(this.inner, "confirm", (a) => {
1105
- const d = a.item.value;
1196
+ const s = di(this.inner, "confirm", (a) => {
1197
+ const h = a.item.value;
1106
1198
  r = Date.now(), e(Object.assign({
1107
- title: d.business,
1199
+ title: h.business,
1108
1200
  country: ""
1109
1201
  // Baidu的自动完成只支持中国
1110
- }, d));
1111
- }), n = Xr(this.input, "keyup", (a) => {
1202
+ }, h));
1203
+ }), n = ui(this.input, "keyup", (a) => {
1112
1204
  a.key === "Enter" && Date.now() - r > 100 && e({
1113
1205
  title: this.input.value,
1114
1206
  country: "",
@@ -1124,23 +1216,23 @@ class ni extends dr {
1124
1216
  };
1125
1217
  }
1126
1218
  }
1127
- class ur {
1219
+ class fr {
1128
1220
  constructor(t) {
1129
1221
  this.options = t;
1130
1222
  }
1131
1223
  }
1132
- function be(i, t, e) {
1224
+ function _e(i, t, e) {
1133
1225
  const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(Yr));
1134
1226
  return r.search = "?" + s.toString(), r;
1135
1227
  }
1136
1228
  function et() {
1137
- const i = window.location.hostname.split(".").filter((t) => !ue.isInt(t));
1229
+ const i = window.location.hostname.split(".").filter((t) => !de.isInt(t));
1138
1230
  return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
1139
1231
  }
1140
- const He = class extends ur {
1232
+ const je = class extends fr {
1141
1233
  /** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
1142
1234
  directions(t, e, r) {
1143
- return be(He.BASE_URL, "dir/", {
1235
+ return _e(je.BASE_URL, "dir/", {
1144
1236
  api: "1",
1145
1237
  // {@template google_map_normal_gcj02}
1146
1238
  // google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
@@ -1152,23 +1244,23 @@ const He = class extends ur {
1152
1244
  }
1153
1245
  /** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
1154
1246
  search(t) {
1155
- return be(He.BASE_URL, "search/", {
1247
+ return _e(je.BASE_URL, "search/", {
1156
1248
  api: "1",
1157
1249
  // {@macro google_map_normal_gcj02}
1158
1250
  query: V.toString(t, x.gcj02)
1159
1251
  });
1160
1252
  }
1161
1253
  };
1162
- let Ae = He;
1254
+ let Ae = je;
1163
1255
  c(Ae, "BASE_URL", "https://www.google.com/maps/");
1164
- const Te = class extends ur {
1256
+ const Te = class extends fr {
1165
1257
  /**
1166
1258
  * 导航
1167
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
1168
1260
  * */
1169
1261
  directions(t, e, r = "driving") {
1170
1262
  const s = V.getCoordType(e) ?? V.getCoordType(t) ?? x.bd09, n = V.toString(e, s);
1171
- return be(Te.BASE_URL, "direction", {
1263
+ return _e(Te.BASE_URL, "direction", {
1172
1264
  // baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
1173
1265
  origin: V.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
1174
1266
  destination: n,
@@ -1195,7 +1287,7 @@ const Te = class extends ur {
1195
1287
  * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD
1196
1288
  */
1197
1289
  markerApi(t, e, r) {
1198
- return be(Te.BASE_URL, "marker", {
1290
+ return _e(Te.BASE_URL, "marker", {
1199
1291
  location: `${t.lat},${t.lng}`,
1200
1292
  coord_type: t.coord === x.bd09 ? void 0 : t.coord,
1201
1293
  title: e,
@@ -1209,7 +1301,7 @@ const Te = class extends ur {
1209
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
1210
1302
  * */
1211
1303
  geocoderApi(t) {
1212
- return be(Te.BASE_URL, "geocoder", {
1304
+ return _e(Te.BASE_URL, "geocoder", {
1213
1305
  ...typeof t == "string" ? {
1214
1306
  address: t
1215
1307
  } : {
@@ -1224,18 +1316,18 @@ const Te = class extends ur {
1224
1316
  };
1225
1317
  let Re = Te;
1226
1318
  c(Re, "BASE_URL", "https://api.map.baidu.com/");
1227
- let oi = class pr {
1319
+ let Ti = class yr {
1228
1320
  constructor(t, e, r) {
1229
- this.extend(pr, 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(yr, 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;
1230
1322
  var s = r || {};
1231
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();
1232
1324
  var n = this;
1233
1325
  google.maps.event.addListener(this.map_, "zoom_changed", function() {
1234
- var a = n.map_.getZoom(), d = n.map_.minZoom || 0, o = Math.min(
1326
+ var a = n.map_.getZoom(), h = n.map_.minZoom || 0, o = Math.min(
1235
1327
  n.map_.maxZoom || 100,
1236
1328
  n.map_.mapTypes[n.map_.getMapTypeId()].maxZoom
1237
1329
  );
1238
- a = Math.min(Math.max(a, d), o), n.prevZoom_ != a && (n.prevZoom_ = a, n.resetViewport());
1330
+ a = Math.min(Math.max(a, h), o), n.prevZoom_ != a && (n.prevZoom_ = a, n.resetViewport());
1239
1331
  }), google.maps.event.addListener(this.map_, "idle", function() {
1240
1332
  n.redraw();
1241
1333
  }), e && (e.length || Object.keys(e).length) && this.addMarkers(e, !1);
@@ -1478,8 +1570,8 @@ let oi = class pr {
1478
1570
  */
1479
1571
  removeMarkers(t, e) {
1480
1572
  for (var r = t === this.getMarkers() ? t.slice() : t, s = !1, n = 0, a; a = r[n]; n++) {
1481
- var d = this.removeMarker_(a);
1482
- s = s || d;
1573
+ var h = this.removeMarker_(a);
1574
+ s = s || h;
1483
1575
  }
1484
1576
  if (!e && s)
1485
1577
  return this.resetViewport(), this.redraw(), !0;
@@ -1566,8 +1658,8 @@ let oi = class pr {
1566
1658
  n.x += this.gridSize_, n.y -= this.gridSize_;
1567
1659
  var a = e.fromLatLngToDivPixel(s);
1568
1660
  a.x -= this.gridSize_, a.y += this.gridSize_;
1569
- var d = e.fromDivPixelToLatLng(n), o = e.fromDivPixelToLatLng(a);
1570
- return t.extend(d), t.extend(o), t;
1661
+ var h = e.fromDivPixelToLatLng(n), o = e.fromDivPixelToLatLng(a);
1662
+ return t.extend(h), t.extend(o), t;
1571
1663
  }
1572
1664
  /**
1573
1665
  * Determins if a marker is contained in a bounds.
@@ -1625,7 +1717,7 @@ let oi = class pr {
1625
1717
  distanceBetweenPoints_(t, e) {
1626
1718
  if (!t || !e)
1627
1719
  return 0;
1628
- var r = 6371, s = (e.lat() - t.lat()) * Math.PI / 180, n = (e.lng() - t.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(t.lat() * Math.PI / 180) * Math.cos(e.lat() * Math.PI / 180) * Math.sin(n / 2) * Math.sin(n / 2), d = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), o = r * d;
1720
+ var r = 6371, s = (e.lat() - t.lat()) * Math.PI / 180, n = (e.lng() - t.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(t.lat() * Math.PI / 180) * Math.cos(e.lat() * Math.PI / 180) * Math.sin(n / 2) * Math.sin(n / 2), h = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), o = r * h;
1629
1721
  return o;
1630
1722
  }
1631
1723
  /**
@@ -1638,14 +1730,14 @@ let oi = class pr {
1638
1730
  for (var e = 4e4, r = null, s = 0, n; n = this.clusters_[s]; s++) {
1639
1731
  var a = n.getCenter();
1640
1732
  if (a) {
1641
- var d = this.distanceBetweenPoints_(a, t.getPosition());
1642
- d < e && (e = d, r = n);
1733
+ var h = this.distanceBetweenPoints_(a, t.getPosition());
1734
+ h < e && (e = h, r = n);
1643
1735
  }
1644
1736
  }
1645
1737
  if (r && r.isMarkerInClusterBounds(t))
1646
1738
  r.addMarker(t);
1647
1739
  else {
1648
- var o = new ai(this);
1740
+ var o = new Mi(this);
1649
1741
  o.addMarker(t), this.clusters_.push(o);
1650
1742
  }
1651
1743
  }
@@ -1662,7 +1754,7 @@ let oi = class pr {
1662
1754
  ), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
1663
1755
  !s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
1664
1756
  }
1665
- }, ai = class {
1757
+ }, Mi = class {
1666
1758
  constructor(t) {
1667
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 bt(
1668
1760
  this,
@@ -1931,7 +2023,7 @@ class bt {
1931
2023
  ), e.join("");
1932
2024
  }
1933
2025
  }
1934
- var gr = { exports: {} };
2026
+ var vr = { exports: {} };
1935
2027
  (function(i, t) {
1936
2028
  (function(e, r) {
1937
2029
  i.exports = r();
@@ -1947,55 +2039,55 @@ var gr = { exports: {} };
1947
2039
  return r.lang.isString(o) ? document.getElementById(o) : o;
1948
2040
  }, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(o, l) {
1949
2041
  o = r.dom._g(o);
1950
- var h = r.dom.getDocument(o), u;
1951
- return h.defaultView && h.defaultView.getComputedStyle && (u = h.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
1952
- }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, h) {
1953
- for (var u = 0, p = r.dom._styleFilter, f; f = p[u]; u++)
1954
- (f = f[h]) && (l = f(o, l));
2042
+ var d = r.dom.getDocument(o), u;
2043
+ return d.defaultView && d.defaultView.getComputedStyle && (u = d.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
2044
+ }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, d) {
2045
+ for (var u = 0, p = r.dom._styleFilter, b; b = p[u]; u++)
2046
+ (b = b[d]) && (l = b(o, l));
1955
2047
  return l;
1956
2048
  }, r.string = r.string || {}, r.string.toCamelCase = function(o) {
1957
2049
  return o.indexOf("-") < 0 && o.indexOf("_") < 0 ? o : o.replace(/[-_][^-_]/g, function(l) {
1958
2050
  return l.charAt(1).toUpperCase();
1959
2051
  });
1960
2052
  }, r.dom.getStyle = function(o, l) {
1961
- var h = r.dom;
1962
- o = h.g(o), l = r.string.toCamelCase(l);
1963
- var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || h.getComputedStyle(o, l);
2053
+ var d = r.dom;
2054
+ o = d.g(o), l = r.string.toCamelCase(l);
2055
+ var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || d.getComputedStyle(o, l);
1964
2056
  if (!u) {
1965
- var p = h._styleFixer[l];
2057
+ var p = d._styleFixer[l];
1966
2058
  p && (u = p.get ? p.get(o) : r.dom.getStyle(o, p));
1967
2059
  }
1968
- return (p = h._styleFilter) && (u = p.filter(l, u, "get")), u;
2060
+ return (p = d._styleFilter) && (u = p.filter(l, u, "get")), u;
1969
2061
  }, r.getStyle = r.dom.getStyle, /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (r.browser.opera = +RegExp.$1), r.browser.isWebkit = /webkit/i.test(navigator.userAgent), r.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), r.browser.isStrict = document.compatMode == "CSS1Compat", r.dom.getPosition = function(o) {
1970
2062
  o = r.dom.g(o);
1971
- var l = r.dom.getDocument(o), h = r.browser, u = r.dom.getStyle;
1972
- h.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
1973
- var p = { left: 0, top: 0 }, f = h.ie && !h.isStrict ? l.body : l.documentElement, _, M;
1974
- if (o == f)
2063
+ var l = r.dom.getDocument(o), d = r.browser, u = r.dom.getStyle;
2064
+ d.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
2065
+ var p = { left: 0, top: 0 }, b = d.ie && !d.isStrict ? l.body : l.documentElement, _, T;
2066
+ if (o == b)
1975
2067
  return p;
1976
2068
  if (o.getBoundingClientRect) {
1977
- M = o.getBoundingClientRect(), p.left = Math.floor(M.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), p.top = Math.floor(M.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), p.left -= l.documentElement.clientLeft, p.top -= l.documentElement.clientTop;
1978
- var g = l.body, y = parseInt(u(g, "borderLeftWidth")), b = parseInt(u(g, "borderTopWidth"));
1979
- h.ie && !h.isStrict && (p.left -= isNaN(y) ? 2 : y, p.top -= isNaN(b) ? 2 : b);
2069
+ T = o.getBoundingClientRect(), p.left = Math.floor(T.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), p.top = Math.floor(T.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), p.left -= l.documentElement.clientLeft, p.top -= l.documentElement.clientTop;
2070
+ var g = l.body, f = parseInt(u(g, "borderLeftWidth")), v = parseInt(u(g, "borderTopWidth"));
2071
+ d.ie && !d.isStrict && (p.left -= isNaN(f) ? 2 : f, p.top -= isNaN(v) ? 2 : v);
1980
2072
  } else {
1981
2073
  _ = o;
1982
2074
  do {
1983
- if (p.left += _.offsetLeft, p.top += _.offsetTop, h.isWebkit > 0 && u(_, "position") == "fixed") {
2075
+ if (p.left += _.offsetLeft, p.top += _.offsetTop, d.isWebkit > 0 && u(_, "position") == "fixed") {
1984
2076
  p.left += l.body.scrollLeft, p.top += l.body.scrollTop;
1985
2077
  break;
1986
2078
  }
1987
2079
  _ = _.offsetParent;
1988
2080
  } while (_ && _ != o);
1989
- for ((h.opera > 0 || h.isWebkit > 0 && u(o, "position") == "absolute") && (p.top -= l.body.offsetTop), _ = o.offsetParent; _ && _ != l.body; )
1990
- p.left -= _.scrollLeft, (!h.opera || _.tagName != "TR") && (p.top -= _.scrollTop), _ = _.offsetParent;
2081
+ for ((d.opera > 0 || d.isWebkit > 0 && u(o, "position") == "absolute") && (p.top -= l.body.offsetTop), _ = o.offsetParent; _ && _ != l.body; )
2082
+ p.left -= _.scrollLeft, (!d.opera || _.tagName != "TR") && (p.top -= _.scrollTop), _ = _.offsetParent;
1991
2083
  }
1992
2084
  return p;
1993
- }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, h) {
2085
+ }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, d) {
1994
2086
  l = l.replace(/^on/i, ""), o = r.dom._g(o);
1995
2087
  var u = function(g) {
1996
- h.call(o, g);
1997
- }, p = r.event._listeners, f = r.event._eventFilter, _, M = l;
1998
- return l = l.toLowerCase(), f && f[l] && (_ = f[l](o, l, u), M = _.type, u = _.listener), o.addEventListener ? o.addEventListener(M, u, !1) : o.attachEvent && o.attachEvent("on" + M, u), p[p.length] = [o, l, h, u, M], o;
2088
+ d.call(o, g);
2089
+ }, p = r.event._listeners, b = r.event._eventFilter, _, T = l;
2090
+ return l = l.toLowerCase(), b && b[l] && (_ = b[l](o, l, u), T = _.type, u = _.listener), o.addEventListener ? o.addEventListener(T, u, !1) : o.attachEvent && o.attachEvent("on" + T, u), p[p.length] = [o, l, d, u, T], o;
1999
2091
  }, r.on = r.event.on, function() {
2000
2092
  var o = s[r.guid];
2001
2093
  r.lang.guid = function() {
@@ -2014,135 +2106,135 @@ var gr = { exports: {} };
2014
2106
  return "[object " + (this._className || "Object") + "]";
2015
2107
  }, r.lang.Event = function(o, l) {
2016
2108
  this.type = o, this.returnValue = !0, this.target = l || null, this.currentTarget = null;
2017
- }, r.lang.Class.prototype.addEventListener = function(o, l, h) {
2109
+ }, r.lang.Class.prototype.addEventListener = function(o, l, d) {
2018
2110
  if (r.lang.isFunction(l)) {
2019
2111
  !this.__listeners && (this.__listeners = {});
2020
2112
  var u = this.__listeners, p;
2021
- if (typeof h == "string" && h) {
2022
- if (/[^\w\-]/.test(h))
2023
- throw "nonstandard key:" + h;
2024
- l.hashCode = h, p = h;
2113
+ if (typeof d == "string" && d) {
2114
+ if (/[^\w\-]/.test(d))
2115
+ throw "nonstandard key:" + d;
2116
+ l.hashCode = d, p = d;
2025
2117
  }
2026
2118
  o.indexOf("on") != 0 && (o = "on" + o), typeof u[o] != "object" && (u[o] = {}), p = p || r.lang.guid(), l.hashCode = p, u[o][p] = l;
2027
2119
  }
2028
2120
  }, r.lang.Class.prototype.removeEventListener = function(o, l) {
2029
2121
  if (!(typeof l < "u" && (r.lang.isFunction(l) && !(l = l.hashCode) || !r.lang.isString(l)))) {
2030
2122
  !this.__listeners && (this.__listeners = {}), o.indexOf("on") != 0 && (o = "on" + o);
2031
- var h = this.__listeners;
2032
- if (h[o])
2123
+ var d = this.__listeners;
2124
+ if (d[o])
2033
2125
  if (typeof l < "u")
2034
- h[o][l] && delete h[o][l];
2126
+ d[o][l] && delete d[o][l];
2035
2127
  else
2036
- for (var u in h[o])
2037
- delete h[o][u];
2128
+ for (var u in d[o])
2129
+ delete d[o][u];
2038
2130
  }
2039
2131
  }, r.lang.Class.prototype.dispatchEvent = function(o, l) {
2040
2132
  r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}), l = l || {};
2041
- for (var h in l)
2042
- o[h] = l[h];
2043
- var h, u = this.__listeners, p = o.type;
2133
+ for (var d in l)
2134
+ o[d] = l[d];
2135
+ var d, u = this.__listeners, p = o.type;
2044
2136
  if (o.target = o.target || this, o.currentTarget = this, p.indexOf("on") != 0 && (p = "on" + p), r.lang.isFunction(this[p]) && this[p].apply(this, arguments), typeof u[p] == "object")
2045
- for (h in u[p])
2046
- u[p][h].apply(this, arguments);
2137
+ for (d in u[p])
2138
+ u[p][d].apply(this, arguments);
2047
2139
  return o.returnValue;
2048
- }, r.lang.inherits = function(o, l, h) {
2049
- var u, p, f = o.prototype, _ = new Function();
2140
+ }, r.lang.inherits = function(o, l, d) {
2141
+ var u, p, b = o.prototype, _ = new Function();
2050
2142
  _.prototype = l.prototype, p = o.prototype = new _();
2051
- for (u in f)
2052
- p[u] = f[u];
2053
- o.prototype.constructor = o, o.superClass = l.prototype, typeof h == "string" && (p._className = h);
2143
+ for (u in b)
2144
+ p[u] = b[u];
2145
+ o.prototype.constructor = o, o.superClass = l.prototype, typeof d == "string" && (p._className = d);
2054
2146
  }, r.inherits = r.lang.inherits;
2055
- var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", d = function(o, l, h) {
2147
+ var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", h = function(o, l, d) {
2056
2148
  try {
2057
2149
  BMap;
2058
2150
  } catch {
2059
2151
  throw Error("Baidu Map JS API is not ready yet!");
2060
2152
  }
2061
- e.lang.inherits(d, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = l, this._options = h || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
2153
+ e.lang.inherits(h, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = l, this._options = d || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
2062
2154
  };
2063
- return d.prototype._setupDefaultStyles = function() {
2064
- for (var o = [53, 56, 66, 78, 90], l = 0, h; h = o[l]; l++)
2155
+ return h.prototype._setupDefaultStyles = function() {
2156
+ for (var o = [53, 56, 66, 78, 90], l = 0, d; d = o[l]; l++)
2065
2157
  this._styles.push({
2066
2158
  url: n + l + "." + a,
2067
- size: new BMap.Size(h, h)
2159
+ size: new BMap.Size(d, d)
2068
2160
  });
2069
- }, d.prototype.initialize = function(o) {
2161
+ }, h.prototype.initialize = function(o) {
2070
2162
  return this._map = o, this._domElement = document.createElement("div"), this._updateCss(), this._updateText(), this._updatePosition(), this._bind(), this._map.getPanes().markerMouseTarget.appendChild(this._domElement), this._domElement;
2071
- }, d.prototype.draw = function() {
2163
+ }, h.prototype.draw = function() {
2072
2164
  this._map && this._updatePosition();
2073
- }, d.prototype.getText = function() {
2165
+ }, h.prototype.getText = function() {
2074
2166
  return this._text;
2075
- }, d.prototype.setText = function(o) {
2167
+ }, h.prototype.setText = function(o) {
2076
2168
  o && (!this._text || this._text.toString() != o.toString()) && (this._text = o, this._updateText(), this._updateCss(), this._updatePosition());
2077
- }, d.prototype.getPosition = function() {
2169
+ }, h.prototype.getPosition = function() {
2078
2170
  return this._position;
2079
- }, d.prototype.setPosition = function(o) {
2171
+ }, h.prototype.setPosition = function(o) {
2080
2172
  o && (!this._position || !this._position.equals(o)) && (this._position = o, this._updatePosition());
2081
- }, d.prototype.getStyleByText = function(o, l) {
2082
- var h = parseInt(o), u = parseInt(h / 10);
2173
+ }, h.prototype.getStyleByText = function(o, l) {
2174
+ var d = parseInt(o), u = parseInt(d / 10);
2083
2175
  return u = Math.max(0, u), u = Math.min(u, l.length - 1), l[u];
2084
- }, d.prototype._updateCss = function() {
2176
+ }, h.prototype._updateCss = function() {
2085
2177
  if (this._domElement) {
2086
2178
  var o = this.getStyleByText(this._text, this._styles);
2087
2179
  this._domElement.style.cssText = this._buildCssText(o);
2088
2180
  }
2089
- }, d.prototype._updateText = function() {
2181
+ }, h.prototype._updateText = function() {
2090
2182
  this._domElement && (this._domElement.innerHTML = this._text);
2091
- }, d.prototype._updatePosition = function() {
2183
+ }, h.prototype._updatePosition = function() {
2092
2184
  if (this._domElement && this._position) {
2093
2185
  var o = this._domElement.style, l = this._map.pointToOverlayPixel(this._position);
2094
2186
  l.x -= Math.ceil(parseInt(o.width) / 2), l.y -= Math.ceil(parseInt(o.height) / 2), o.left = l.x + "px", o.top = l.y + "px";
2095
2187
  }
2096
- }, d.prototype._buildCssText = function(o) {
2097
- var l = o.url, h = o.size, u = o.anchor, p = o.offset, f = o.textColor || "black", _ = o.textSize || 10, M = [];
2098
- if (this._zIndex && M.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
2099
- M.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
2188
+ }, h.prototype._buildCssText = function(o) {
2189
+ var l = o.url, d = o.size, u = o.anchor, p = o.offset, b = o.textColor || "black", _ = o.textSize || 10, T = [];
2190
+ if (this._zIndex && T.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
2191
+ T.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
2100
2192
  else {
2101
- M.push("background-image:url(" + l + ");");
2193
+ T.push("background-image:url(" + l + ");");
2102
2194
  var g = "0 0";
2103
- p instanceof BMap.Size && (g = p.width + "px " + p.height + "px"), M.push("background-position:" + g + ";");
2195
+ p instanceof BMap.Size && (g = p.width + "px " + p.height + "px"), T.push("background-position:" + g + ";");
2104
2196
  }
2105
- return h instanceof BMap.Size && (u instanceof BMap.Size ? (u.height > 0 && u.height < h.height && M.push("height:" + (h.height - u.height) + "px; padding-top:" + u.height + "px;"), u.width > 0 && u.width < h.width && M.push("width:" + (h.width - u.width) + "px; padding-left:" + u.width + "px;")) : (M.push("height:" + h.height + "px; line-height:" + h.height + "px;"), M.push("width:" + h.width + "px; text-align:center;"))), M.push("cursor:pointer; color:" + f + "; position:absolute; font-size:" + _ + "px; font-family:Arial,sans-serif; font-weight:bold"), M.join("");
2106
- }, d.prototype._bind = function() {
2197
+ return d instanceof BMap.Size && (u instanceof BMap.Size ? (u.height > 0 && u.height < d.height && T.push("height:" + (d.height - u.height) + "px; padding-top:" + u.height + "px;"), u.width > 0 && u.width < d.width && T.push("width:" + (d.width - u.width) + "px; padding-left:" + u.width + "px;")) : (T.push("height:" + d.height + "px; line-height:" + d.height + "px;"), T.push("width:" + d.width + "px; text-align:center;"))), T.push("cursor:pointer; color:" + b + "; position:absolute; font-size:" + _ + "px; font-family:Arial,sans-serif; font-weight:bold"), T.join("");
2198
+ }, h.prototype._bind = function() {
2107
2199
  if (!this._domElement)
2108
2200
  return;
2109
- var o = this, l = this._map, h = e.lang.Event;
2110
- function u(p, f) {
2111
- var _ = p.srcElement || p.target, M = p.clientX || p.pageX, g = p.clientY || p.pageY;
2112
- if (p && f && M && g && _) {
2113
- var y = e.dom.getPosition(l.getContainer());
2114
- f.pixel = new BMap.Pixel(M - y.left, g - y.top), f.point = l.pixelToPoint(f.pixel);
2201
+ var o = this, l = this._map, d = e.lang.Event;
2202
+ function u(p, b) {
2203
+ var _ = p.srcElement || p.target, T = p.clientX || p.pageX, g = p.clientY || p.pageY;
2204
+ if (p && b && T && g && _) {
2205
+ var f = e.dom.getPosition(l.getContainer());
2206
+ b.pixel = new BMap.Pixel(T - f.left, g - f.top), b.point = l.pixelToPoint(b.pixel);
2115
2207
  }
2116
- return f;
2208
+ return b;
2117
2209
  }
2118
2210
  e.event.on(this._domElement, "mouseover", function(p) {
2119
- o.dispatchEvent(u(p, new h("onmouseover")));
2211
+ o.dispatchEvent(u(p, new d("onmouseover")));
2120
2212
  }), e.event.on(this._domElement, "mouseout", function(p) {
2121
- o.dispatchEvent(u(p, new h("onmouseout")));
2213
+ o.dispatchEvent(u(p, new d("onmouseout")));
2122
2214
  }), e.event.on(this._domElement, "click", function(p) {
2123
- o.dispatchEvent(u(p, new h("onclick")));
2215
+ o.dispatchEvent(u(p, new d("onclick")));
2124
2216
  });
2125
- }, d;
2217
+ }, h;
2126
2218
  });
2127
- })(gr);
2128
- var li = gr.exports;
2129
- const jt = /* @__PURE__ */ ct(li);
2130
- var mr = function(i, t, e) {
2131
- t = hi(t);
2219
+ })(vr);
2220
+ var Oi = vr.exports;
2221
+ const Vt = /* @__PURE__ */ ct(Oi);
2222
+ var _r = function(i, t, e) {
2223
+ t = Ci(t);
2132
2224
  var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
2133
2225
  r.x += e, r.y -= e, s.x -= e, s.y += e;
2134
2226
  var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
2135
2227
  return new BMap.Bounds(a, n);
2136
- }, hi = function(i) {
2137
- var t = Ie(i.getNorthEast().lng, -180, 180), e = Ie(i.getSouthWest().lng, -180, 180), r = Ie(i.getNorthEast().lat, -74, 74), s = Ie(i.getSouthWest().lat, -74, 74);
2228
+ }, Ci = function(i) {
2229
+ var t = Be(i.getNorthEast().lng, -180, 180), e = Be(i.getSouthWest().lng, -180, 180), r = Be(i.getNorthEast().lat, -74, 74), s = Be(i.getSouthWest().lat, -74, 74);
2138
2230
  return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
2139
- }, Ie = function(i, t, e) {
2231
+ }, Be = function(i, t, e) {
2140
2232
  return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
2141
- }, fr = function(i) {
2233
+ }, br = function(i) {
2142
2234
  return Object.prototype.toString.call(i) === "[object Array]";
2143
- }, yr = function(i, t) {
2235
+ }, Tr = function(i, t) {
2144
2236
  var e = -1;
2145
- if (fr(t)) {
2237
+ if (br(t)) {
2146
2238
  if (t.indexOf)
2147
2239
  e = t.indexOf(i);
2148
2240
  else
@@ -2153,7 +2245,7 @@ var mr = function(i, t, e) {
2153
2245
  }
2154
2246
  }
2155
2247
  return e;
2156
- }, T = function(i, t) {
2248
+ }, M = function(i, t) {
2157
2249
  try {
2158
2250
  BMap;
2159
2251
  } catch {
@@ -2170,33 +2262,33 @@ var mr = function(i, t, e) {
2170
2262
  r._redraw();
2171
2263
  });
2172
2264
  var s = e.markers;
2173
- fr(s) && this.addMarkers(s);
2265
+ br(s) && this.addMarkers(s);
2174
2266
  }
2175
2267
  };
2176
- T.prototype.addMarkers = function(i) {
2268
+ M.prototype.addMarkers = function(i) {
2177
2269
  if (i.length) {
2178
2270
  for (var t = 0, e = i.length; t < e; t++)
2179
2271
  this._pushMarkerTo(i[t]);
2180
2272
  this._createClusters();
2181
2273
  }
2182
2274
  };
2183
- T.prototype._pushMarkerTo = function(i) {
2184
- var t = yr(i, this._markers);
2275
+ M.prototype._pushMarkerTo = function(i) {
2276
+ var t = Tr(i, this._markers);
2185
2277
  t === -1 && (i.isInCluster = !1, this._markers.push(i));
2186
2278
  };
2187
- T.prototype.addMarker = function(i) {
2279
+ M.prototype.addMarker = function(i) {
2188
2280
  this._pushMarkerTo(i), this._createClusters();
2189
2281
  };
2190
- T.prototype._createClusters = function() {
2282
+ M.prototype._createClusters = function() {
2191
2283
  var i = this._map.getBounds();
2192
2284
  if (i.getCenter()) {
2193
- for (var t = mr(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2285
+ for (var t = _r(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2194
2286
  !r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
2195
2287
  for (var s = this._markers.length, e = 0; e < s; e++)
2196
2288
  this._clusters[e] && this._clusters[e].render();
2197
2289
  }
2198
2290
  };
2199
- T.prototype._addToClosestCluster = function(i) {
2291
+ M.prototype._addToClosestCluster = function(i) {
2200
2292
  var t = 4e6, e = null;
2201
2293
  i.getPosition();
2202
2294
  for (var r = 0, s; s = this._clusters[r]; r++) {
@@ -2213,100 +2305,100 @@ T.prototype._addToClosestCluster = function(i) {
2213
2305
  s.addMarker(i), this._clusters.push(s);
2214
2306
  }
2215
2307
  };
2216
- T.prototype._clearLastClusters = function() {
2308
+ M.prototype._clearLastClusters = function() {
2217
2309
  for (var i = 0, t; t = this._clusters[i]; i++)
2218
2310
  t.remove();
2219
2311
  this._clusters = [], this._removeMarkersFromCluster();
2220
2312
  };
2221
- T.prototype._removeMarkersFromCluster = function() {
2313
+ M.prototype._removeMarkersFromCluster = function() {
2222
2314
  for (var i = 0, t; t = this._markers[i]; i++)
2223
2315
  t.isInCluster = !1;
2224
2316
  };
2225
- T.prototype._removeMarkersFromMap = function() {
2317
+ M.prototype._removeMarkersFromMap = function() {
2226
2318
  for (var i = 0, t; t = this._markers[i]; i++) {
2227
2319
  t.isInCluster = !1;
2228
2320
  var e = t.getLabel();
2229
2321
  this._map.removeOverlay(t), t.setLabel(e);
2230
2322
  }
2231
2323
  };
2232
- T.prototype._removeMarker = function(i) {
2233
- var t = yr(i, this._markers);
2324
+ M.prototype._removeMarker = function(i) {
2325
+ var t = Tr(i, this._markers);
2234
2326
  return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
2235
2327
  };
2236
- T.prototype.removeMarker = function(i) {
2328
+ M.prototype.removeMarker = function(i) {
2237
2329
  var t = this._removeMarker(i);
2238
2330
  return t && (this._clearLastClusters(), this._createClusters()), t;
2239
2331
  };
2240
- T.prototype.removeMarkers = function(i) {
2332
+ M.prototype.removeMarkers = function(i) {
2241
2333
  for (var t = !1, e = 0; e < i.length; e++) {
2242
2334
  var r = this._removeMarker(i[e]);
2243
2335
  t = t || r;
2244
2336
  }
2245
2337
  return t && (this._clearLastClusters(), this._createClusters()), t;
2246
2338
  };
2247
- T.prototype.clearMarkers = function() {
2339
+ M.prototype.clearMarkers = function() {
2248
2340
  this._clearLastClusters(), this._removeMarkersFromMap(), this._markers = [];
2249
2341
  };
2250
- T.prototype._redraw = function() {
2342
+ M.prototype._redraw = function() {
2251
2343
  this._clearLastClusters(), this._createClusters();
2252
2344
  };
2253
- T.prototype.getGridSize = function() {
2345
+ M.prototype.getGridSize = function() {
2254
2346
  return this._gridSize;
2255
2347
  };
2256
- T.prototype.setGridSize = function(i) {
2348
+ M.prototype.setGridSize = function(i) {
2257
2349
  this._gridSize = i, this._redraw();
2258
2350
  };
2259
- T.prototype.getMaxZoom = function() {
2351
+ M.prototype.getMaxZoom = function() {
2260
2352
  return this._maxZoom;
2261
2353
  };
2262
- T.prototype.setMaxZoom = function(i) {
2354
+ M.prototype.setMaxZoom = function(i) {
2263
2355
  this._maxZoom = i, this._redraw();
2264
2356
  };
2265
- T.prototype.getZIndex = function() {
2357
+ M.prototype.getZIndex = function() {
2266
2358
  return this._zIndex;
2267
2359
  };
2268
- T.prototype.setZIndex = function(i) {
2360
+ M.prototype.setZIndex = function(i) {
2269
2361
  this._zIndex != i && (this.zIndex = i, this._redraw());
2270
2362
  };
2271
- T.prototype.getStyles = function() {
2363
+ M.prototype.getStyles = function() {
2272
2364
  return this._styles;
2273
2365
  };
2274
- T.prototype.setStyles = function(i) {
2366
+ M.prototype.setStyles = function(i) {
2275
2367
  this._styles = i, this._redraw();
2276
2368
  };
2277
- T.prototype.getMinClusterSize = function() {
2369
+ M.prototype.getMinClusterSize = function() {
2278
2370
  return this._minClusterSize;
2279
2371
  };
2280
- T.prototype.setMinClusterSize = function(i) {
2372
+ M.prototype.setMinClusterSize = function(i) {
2281
2373
  this._minClusterSize = i, this._redraw();
2282
2374
  };
2283
- T.prototype.isAverageCenter = function() {
2375
+ M.prototype.isAverageCenter = function() {
2284
2376
  return this._isAverageCenter;
2285
2377
  };
2286
- T.prototype.getMap = function() {
2378
+ M.prototype.getMap = function() {
2287
2379
  return this._map;
2288
2380
  };
2289
- T.prototype.getMarkers = function() {
2381
+ M.prototype.getMarkers = function() {
2290
2382
  return this._markers;
2291
2383
  };
2292
- T.prototype.getClustersCount = function() {
2384
+ M.prototype.getClustersCount = function() {
2293
2385
  for (var i = 0, t = 0, e; e = this._clusters[t]; t++)
2294
2386
  e.isReal() && i++;
2295
2387
  return i;
2296
2388
  };
2297
- T.prototype._textCalculator = function(i) {
2389
+ M.prototype._textCalculator = function(i) {
2298
2390
  return i.length.toString();
2299
2391
  };
2300
- T.prototype._stylesIndexCalculator = null;
2301
- T.prototype.setTextCalculator = function(i) {
2392
+ M.prototype._stylesIndexCalculator = null;
2393
+ M.prototype.setTextCalculator = function(i) {
2302
2394
  this._textCalculator = i;
2303
2395
  };
2304
- T.prototype.setStylesIndexCalculator = function(i) {
2396
+ M.prototype.setStylesIndexCalculator = function(i) {
2305
2397
  this._stylesIndexCalculator = i;
2306
2398
  };
2307
2399
  function N(i) {
2308
2400
  var t = this;
2309
- this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new jt(this._center, this._markers.length, {
2401
+ this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new Vt(this._center, this._markers.length, {
2310
2402
  styles: this._markerClusterer.getStyles(),
2311
2403
  zIndex: i._zIndex
2312
2404
  }), this._clusterMarker.getStyleByText = function(e, r) {
@@ -2314,7 +2406,7 @@ function N(i) {
2314
2406
  var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
2315
2407
  return r[s];
2316
2408
  }
2317
- return jt.prototype.getStyleByText.call(this, e, r);
2409
+ return Vt.prototype.getStyleByText.call(this, e, r);
2318
2410
  }, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
2319
2411
  t._map.setViewport(t.getBounds());
2320
2412
  });
@@ -2354,7 +2446,7 @@ N.prototype.isReal = function(i) {
2354
2446
  };
2355
2447
  N.prototype.updateGridBounds = function() {
2356
2448
  var i = new BMap.Bounds(this._center, this._center);
2357
- this._gridBounds = mr(this._map, i, this._markerClusterer.getGridSize());
2449
+ this._gridBounds = _r(this._map, i, this._markerClusterer.getGridSize());
2358
2450
  };
2359
2451
  N.prototype.updateClusterMarker = function() {
2360
2452
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
@@ -2384,7 +2476,7 @@ N.prototype.getBounds = function() {
2384
2476
  N.prototype.getCenter = function() {
2385
2477
  return this._center;
2386
2478
  };
2387
- var ze;
2479
+ var De;
2388
2480
  ((i) => {
2389
2481
  function t(r) {
2390
2482
  return {
@@ -2409,8 +2501,8 @@ var ze;
2409
2501
  };
2410
2502
  }
2411
2503
  i.toGoogle = e;
2412
- })(ze || (ze = {}));
2413
- class vr {
2504
+ })(De || (De = {}));
2505
+ class Mr {
2414
2506
  constructor(t) {
2415
2507
  this.map = t;
2416
2508
  }
@@ -2435,62 +2527,62 @@ class vr {
2435
2527
  return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
2436
2528
  }
2437
2529
  }
2438
- class ci extends vr {
2530
+ class wi extends Mr {
2439
2531
  constructor(e, r) {
2440
2532
  var n;
2441
2533
  super(e);
2442
2534
  c(this, "inner");
2443
- this.inner = new T(e.innerMap, {
2535
+ this.inner = new M(e.innerMap, {
2444
2536
  // baidu的构造器中的markers, 会触发重绘, 会导致使用旧的calculator计算cluster
2445
2537
  // markers: options.markers?.map(it => (it as BaiduMarker).innerOverlay),
2446
2538
  gridSize: r.gridSize,
2447
2539
  maxZoom: r.maxZoom,
2448
2540
  minClusterSize: r.minClusterSize,
2449
2541
  isAverageCenter: r.averageCenter,
2450
- styles: (n = r.styles) == null ? void 0 : n.map((a) => ze.toBaidu(a)),
2542
+ styles: (n = r.styles) == null ? void 0 : n.map((a) => De.toBaidu(a)),
2451
2543
  zIndex: r.zIndex
2452
2544
  });
2453
2545
  const s = r.stylesIndexCalculator;
2454
- s && this.inner.setStylesIndexCalculator((a, d) => s(a.length, d)), r.markers && this.addMarkers(r.markers);
2546
+ s && this.inner.setStylesIndexCalculator((a, h) => s(a.length, h)), r.markers && this.addMarkers(r.markers);
2455
2547
  }
2456
2548
  recreate() {
2457
2549
  this.inner._redraw();
2458
2550
  }
2459
2551
  }
2460
- class di extends vr {
2552
+ class Ei extends Mr {
2461
2553
  constructor(e, r) {
2462
2554
  var n, a;
2463
2555
  super(e);
2464
2556
  c(this, "inner");
2465
- this.inner = new oi(
2557
+ this.inner = new Ti(
2466
2558
  e.innerMap,
2467
2559
  // google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
2468
- (n = r.markers) == null ? void 0 : n.map((d) => d.innerOverlay),
2560
+ (n = r.markers) == null ? void 0 : n.map((h) => h.innerOverlay),
2469
2561
  {
2470
2562
  gridSize: r.gridSize,
2471
2563
  maxZoom: r.maxZoom,
2472
2564
  minimumClusterSize: r.minClusterSize,
2473
2565
  averageCenter: r.averageCenter,
2474
- styles: (a = r.styles) == null ? void 0 : a.map((d) => ze.toGoogle(d)),
2566
+ styles: (a = r.styles) == null ? void 0 : a.map((h) => De.toGoogle(h)),
2475
2567
  zIndex: r.zIndex
2476
2568
  }
2477
2569
  );
2478
2570
  const s = r.stylesIndexCalculator;
2479
- s && this.inner.setCalculator((d, o) => ({
2480
- text: d.length,
2571
+ s && this.inner.setCalculator((h, o) => ({
2572
+ text: h.length,
2481
2573
  // google内部, 取index时, 会`-1`...故我们这里`+1`, 抵消掉它
2482
- index: s(d.length, o) + 1
2574
+ index: s(h.length, o) + 1
2483
2575
  }));
2484
2576
  }
2485
2577
  recreate() {
2486
2578
  this.inner.repaint();
2487
2579
  }
2488
2580
  }
2489
- class _r {
2581
+ class Or {
2490
2582
  constructor() {
2491
2583
  }
2492
2584
  }
2493
- class ui extends _r {
2585
+ class Li extends Or {
2494
2586
  constructor(e, r) {
2495
2587
  super();
2496
2588
  c(this, "inner");
@@ -2499,7 +2591,7 @@ class ui extends _r {
2499
2591
  search(e, r) {
2500
2592
  return this.searchImpl(
2501
2593
  e,
2502
- r instanceof v ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
2594
+ r instanceof y ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
2503
2595
  );
2504
2596
  }
2505
2597
  searchInBounds(e, r) {
@@ -2520,23 +2612,23 @@ class ui extends _r {
2520
2612
  // 'address_components', // TODO: 2023/04/28 ipcjs 查询请求不支持该字段...
2521
2613
  ],
2522
2614
  locationBias: r
2523
- }, (a, d) => {
2524
- switch (d) {
2615
+ }, (a, h) => {
2616
+ switch (h) {
2525
2617
  case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
2526
2618
  case google.maps.places.PlacesServiceStatus.OK: {
2527
- const o = (a ?? []).map((l) => cr(l, this.map));
2619
+ const o = (a ?? []).map((l) => gr(l, this.map));
2528
2620
  s(o);
2529
2621
  break;
2530
2622
  }
2531
2623
  default:
2532
- n(new Error(`status: ${d}`));
2624
+ n(new Error(`status: ${h}`));
2533
2625
  break;
2534
2626
  }
2535
2627
  });
2536
2628
  });
2537
2629
  }
2538
2630
  }
2539
- class pi extends _r {
2631
+ class xi extends Or {
2540
2632
  constructor(e, r) {
2541
2633
  super();
2542
2634
  c(this, "searchRequestMap", /* @__PURE__ */ new Map());
@@ -2548,7 +2640,7 @@ class pi extends _r {
2548
2640
  }
2549
2641
  search(e, r) {
2550
2642
  return this.newSearch(
2551
- r instanceof v ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
2643
+ r instanceof y ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
2552
2644
  (s) => {
2553
2645
  s.search(e);
2554
2646
  }
@@ -2567,20 +2659,20 @@ class pi extends _r {
2567
2659
  newSearch(e, r) {
2568
2660
  return new Promise((s, n) => {
2569
2661
  const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
2570
- onSearchComplete: (d) => {
2571
- Array.isArray(d) && ut("当前只支持一次搜索一条数据");
2662
+ onSearchComplete: (h) => {
2663
+ Array.isArray(h) && ut("当前只支持一次搜索一条数据");
2572
2664
  const o = a.getStatus();
2573
2665
  switch (o) {
2574
2666
  case BMAP_STATUS_SUCCESS: {
2575
2667
  const l = [];
2576
- for (let h = 0; h < d.getCurrentNumPois(); h++) {
2577
- const u = d.getPoi(h);
2668
+ for (let d = 0; d < h.getCurrentNumPois(); d++) {
2669
+ const u = h.getPoi(d);
2578
2670
  l.push({
2579
2671
  id: u.uid,
2580
2672
  city: u.city,
2581
2673
  country: "",
2582
2674
  // 百度地图只支持中国
2583
- position: v.fromBaidu(u.point, this.map.coordType),
2675
+ position: y.fromBaidu(u.point, this.map.coordType),
2584
2676
  province: u.province,
2585
2677
  title: u.title,
2586
2678
  address: u.address
@@ -2602,7 +2694,7 @@ class pi extends _r {
2602
2694
  });
2603
2695
  }
2604
2696
  }
2605
- class br {
2697
+ class Cr {
2606
2698
  constructor(t, e) {
2607
2699
  c(this, "onData");
2608
2700
  c(this, "onError");
@@ -2614,26 +2706,26 @@ class br {
2614
2706
  * @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
2615
2707
  * */
2616
2708
  setSearchListener(t, e) {
2617
- return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Oe;
2709
+ return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Me;
2618
2710
  }
2619
2711
  }
2620
- class gi extends br {
2712
+ class Pi extends Cr {
2621
2713
  constructor(e, r) {
2622
2714
  super(e, r.input);
2623
2715
  c(this, "searchBox");
2624
2716
  this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
2625
2717
  }
2626
2718
  setSearchListener(e, r) {
2627
- return super.setSearchListener(e, r), rr(this.searchBox, "places_changed", () => {
2719
+ return super.setSearchListener(e, r), or(this.searchBox, "places_changed", () => {
2628
2720
  const s = this.searchBox.getPlaces();
2629
- e((s ?? []).map((n) => cr(n, this.map)));
2721
+ e((s ?? []).map((n) => gr(n, this.map)));
2630
2722
  });
2631
2723
  }
2632
2724
  search() {
2633
2725
  this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
2634
2726
  }
2635
2727
  }
2636
- class mi extends br {
2728
+ class ki extends Cr {
2637
2729
  constructor(e, r) {
2638
2730
  super(e, r.input);
2639
2731
  c(this, "autocomplete");
@@ -2652,8 +2744,8 @@ class mi extends br {
2652
2744
  this.placesService.search(e).then(this.onData, this.onError);
2653
2745
  }
2654
2746
  }
2655
- var fi = /* @__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))(fi || {});
2656
- class Mt {
2747
+ var Bi = /* @__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))(Bi || {});
2748
+ class Tt {
2657
2749
  constructor(t) {
2658
2750
  c(this, "latestInfoWindow");
2659
2751
  /** 使用{@link setEventTargetDelegate}初始化 */
@@ -2700,77 +2792,6 @@ class Mt {
2700
2792
  this.innerMap.setZoom(t);
2701
2793
  }
2702
2794
  }
2703
- var yi = function(t) {
2704
- return vi(t) && !_i(t);
2705
- };
2706
- function vi(i) {
2707
- return !!i && typeof i == "object";
2708
- }
2709
- function _i(i) {
2710
- var t = Object.prototype.toString.call(i);
2711
- return t === "[object RegExp]" || t === "[object Date]" || Ti(i);
2712
- }
2713
- var bi = typeof Symbol == "function" && Symbol.for, Mi = bi ? Symbol.for("react.element") : 60103;
2714
- function Ti(i) {
2715
- return i.$$typeof === Mi;
2716
- }
2717
- function Oi(i) {
2718
- return Array.isArray(i) ? [] : {};
2719
- }
2720
- function Ce(i, t) {
2721
- return t.clone !== !1 && t.isMergeableObject(i) ? de(Oi(i), i, t) : i;
2722
- }
2723
- function Ci(i, t, e) {
2724
- return i.concat(t).map(function(r) {
2725
- return Ce(r, e);
2726
- });
2727
- }
2728
- function wi(i, t) {
2729
- if (!t.customMerge)
2730
- return de;
2731
- var e = t.customMerge(i);
2732
- return typeof e == "function" ? e : de;
2733
- }
2734
- function Ei(i) {
2735
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
2736
- return Object.propertyIsEnumerable.call(i, t);
2737
- }) : [];
2738
- }
2739
- function Vt(i) {
2740
- return Object.keys(i).concat(Ei(i));
2741
- }
2742
- function Mr(i, t) {
2743
- try {
2744
- return t in i;
2745
- } catch {
2746
- return !1;
2747
- }
2748
- }
2749
- function Li(i, t) {
2750
- return Mr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
2751
- }
2752
- function xi(i, t, e) {
2753
- var r = {};
2754
- return e.isMergeableObject(i) && Vt(i).forEach(function(s) {
2755
- r[s] = Ce(i[s], e);
2756
- }), Vt(t).forEach(function(s) {
2757
- Li(i, s) || (Mr(i, s) && e.isMergeableObject(t[s]) ? r[s] = wi(s, e)(i[s], t[s], e) : r[s] = Ce(t[s], e));
2758
- }), r;
2759
- }
2760
- function de(i, t, e) {
2761
- e = e || {}, e.arrayMerge = e.arrayMerge || Ci, e.isMergeableObject = e.isMergeableObject || yi, e.cloneUnlessOtherwiseSpecified = Ce;
2762
- var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
2763
- return n ? r ? e.arrayMerge(i, t, e) : xi(i, t, e) : Ce(t, e);
2764
- }
2765
- de.all = function(t, e) {
2766
- if (!Array.isArray(t))
2767
- throw new Error("first argument should be an array");
2768
- return t.reduce(function(r, s) {
2769
- return de(r, s, e);
2770
- }, {});
2771
- };
2772
- var Pi = de, ki = Pi;
2773
- const Tr = /* @__PURE__ */ ct(ki);
2774
2795
  /*!
2775
2796
  * isobject <https://github.com/jonschlinkert/isobject>
2776
2797
  *
@@ -2789,66 +2810,45 @@ function Ii(i) {
2789
2810
  function Ft(i) {
2790
2811
  return Ii(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2791
2812
  }
2792
- function Or(i) {
2813
+ function wr(i) {
2793
2814
  var t, e;
2794
2815
  return !(Ft(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, Ft(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2795
2816
  }
2796
- var Q;
2817
+ var Ce;
2797
2818
  ((i) => {
2798
- function t(h, u) {
2799
- return h.reduce((p, f) => (p[u(f)] = f, p), {});
2819
+ function t(h, o) {
2820
+ return h.reduce((l, d) => (l[o(d)] = d, l), {});
2800
2821
  }
2801
2822
  i.fromArray = t;
2802
2823
  function e(h) {
2803
- return h.reduce((u, p) => (u[p[0]] = p[1], u), {});
2824
+ return h.reduce((o, l) => (o[l[0]] = l[1], o), {});
2804
2825
  }
2805
2826
  i.fromEntries = e;
2806
2827
  function r(h) {
2807
- return JSON.stringify(h, (u, p) => typeof p == "object" && Object.getPrototypeOf(p) !== Object.prototype ? p.toString !== Object.prototype.toString ? p.toString() : `[object ${Object.getPrototypeOf(p).constructor.name}]` : p);
2828
+ return JSON.stringify(h, (o, l) => typeof l == "object" && Object.getPrototypeOf(l) !== Object.prototype ? l.toString !== Object.prototype.toString ? l.toString() : `[object ${Object.getPrototypeOf(l).constructor.name}]` : l);
2808
2829
  }
2809
2830
  i.toJsonSafely = r;
2810
2831
  function s(h) {
2811
- Or(h) && Object.keys(h).forEach((u) => {
2812
- h[u] === void 0 ? delete h[u] : s(h[u]);
2832
+ wr(h) && Object.keys(h).forEach((o) => {
2833
+ h[o] === void 0 ? delete h[o] : s(h[o]);
2813
2834
  });
2814
2835
  }
2815
2836
  i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
2816
- function n(h, u, p) {
2817
- let f = h[u];
2818
- return f === void 0 && (f = p(), h[u] = f), f;
2819
- }
2820
- i.putIfAbsent = n;
2821
- function a(h, ...u) {
2822
- const p = Ut(u), f = {};
2823
- for (const _ in h)
2824
- p(_) || (f[_] = h[_]);
2825
- return f;
2826
- }
2827
- i.omit = a;
2828
- function d(h, ...u) {
2829
- const p = Ut(u), f = {};
2830
- for (const _ in h)
2831
- p(_) && (f[_] = h[_]);
2832
- return f;
2833
- }
2834
- i.pick = d;
2835
- function o(h, u) {
2836
- const p = typeof u == "string" ? u.split(".") : u;
2837
- let f = h;
2838
- for (const _ of p) {
2839
- if (f == null)
2840
- return;
2841
- f = f[_];
2842
- }
2843
- return f;
2844
- }
2845
- i.get = o;
2846
- function l(h, u) {
2847
- const p = typeof u == "string" ? u.split(".") : u, f = o(h, p.slice(0, -1)), _ = p[p.length - 1];
2848
- f != null && delete f[_];
2849
- }
2850
- i.del = l;
2851
- })(Q || (Q = {}));
2837
+ function n(h, ...o) {
2838
+ const l = Ut(o), d = {};
2839
+ for (const u in h)
2840
+ l(u) || (d[u] = h[u]);
2841
+ return d;
2842
+ }
2843
+ i.omit = n;
2844
+ function a(h, ...o) {
2845
+ const l = Ut(o), d = {};
2846
+ for (const u in h)
2847
+ l(u) && (d[u] = h[u]);
2848
+ return d;
2849
+ }
2850
+ i.pick = a;
2851
+ })(Ce || (Ce = {}));
2852
2852
  function Ut(i) {
2853
2853
  if (i.length <= 4)
2854
2854
  return i.includes.bind(i);
@@ -2857,20 +2857,20 @@ function Ut(i) {
2857
2857
  return t.has.bind(t);
2858
2858
  }
2859
2859
  }
2860
- Q.toJsonSafely;
2861
- const Bi = ["single", "multi"];
2860
+ Ce.toJsonSafely;
2861
+ const Si = ["single", "multi"];
2862
2862
  var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), lt;
2863
2863
  ((i) => {
2864
2864
  function t(e) {
2865
- Q.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2866
- const r = { center: v.ZERO, zoom: 5 };
2867
- return Tr(r, e || {}, {
2868
- isMergeableObject: Or
2865
+ Ce.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2866
+ const r = { center: y.ZERO, zoom: 5 };
2867
+ return ir(r, e || {}, {
2868
+ isMergeableObject: wr
2869
2869
  });
2870
2870
  }
2871
2871
  i.create = t;
2872
2872
  })(lt || (lt = {}));
2873
- class Cr {
2873
+ class Er {
2874
2874
  constructor(t, e) {
2875
2875
  c(this, "_delegate");
2876
2876
  this.innerOverlay = t, this.coordType = e;
@@ -2888,12 +2888,12 @@ class Cr {
2888
2888
  this.map.removeOverlay(this);
2889
2889
  }
2890
2890
  }
2891
- class Tt extends Cr {
2891
+ class Mt extends Er {
2892
2892
  constructor(t, e, r) {
2893
2893
  super(t, e), this.map = r;
2894
2894
  }
2895
2895
  createDelegate() {
2896
- return new ie(this.innerOverlay, this.map);
2896
+ return new re(this.innerOverlay, this.map);
2897
2897
  }
2898
2898
  isVisible() {
2899
2899
  return this.innerOverlay.getVisible();
@@ -2902,12 +2902,12 @@ class Tt extends Cr {
2902
2902
  this.innerOverlay.setVisible(t);
2903
2903
  }
2904
2904
  }
2905
- class Ye extends Cr {
2905
+ class Ye extends Er {
2906
2906
  constructor(t, e, r) {
2907
2907
  super(t, e), this.map = r;
2908
2908
  }
2909
2909
  createDelegate() {
2910
- return new le(this.innerOverlay, this.map);
2910
+ return new ae(this.innerOverlay, this.map);
2911
2911
  }
2912
2912
  /** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
2913
2913
  get overlay() {
@@ -2924,7 +2924,7 @@ class Ye extends Cr {
2924
2924
  return t !== void 0 && (t || this.setVisible(!1)), this;
2925
2925
  }
2926
2926
  }
2927
- const je = class extends Ye {
2927
+ const He = class extends Ye {
2928
2928
  constructor(t, e, r, s) {
2929
2929
  super(t, e, r), this.state = s;
2930
2930
  }
@@ -2938,7 +2938,7 @@ const je = class extends Ye {
2938
2938
  this.innerOverlay.setStrokeColor(t);
2939
2939
  }
2940
2940
  setStrokeOpacity(t) {
2941
- this.innerOverlay.setStrokeOpacity(t + je.OPACITY_DELTA);
2941
+ this.innerOverlay.setStrokeOpacity(t + He.OPACITY_DELTA);
2942
2942
  }
2943
2943
  setStrokeWeight(t) {
2944
2944
  this.innerOverlay.setStrokeWeight(t);
@@ -2947,18 +2947,18 @@ const je = class extends Ye {
2947
2947
  this.innerOverlay.setFillColor(t);
2948
2948
  }
2949
2949
  setFillOpacity(t) {
2950
- this.innerOverlay.setFillOpacity(t + je.OPACITY_DELTA);
2950
+ this.innerOverlay.setFillOpacity(t + He.OPACITY_DELTA);
2951
2951
  }
2952
2952
  };
2953
- let B = je;
2953
+ let I = He;
2954
2954
  /**
2955
2955
  * baidu地图的透明度属性有如下问题:
2956
2956
  * - 在透明度为0时, 无法隐藏掉颜色
2957
2957
  * - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
2958
2958
  * 故统一加个0.001, 规避这些问题...
2959
2959
  */
2960
- c(B, "OPACITY_DELTA", 1e-3);
2961
- class qe extends Tt {
2960
+ c(I, "OPACITY_DELTA", 1e-3);
2961
+ class qe extends Mt {
2962
2962
  isEditable() {
2963
2963
  return this.innerOverlay.getEditable();
2964
2964
  }
@@ -2981,7 +2981,7 @@ class qe extends Tt {
2981
2981
  this.innerOverlay.setOptions({ fillOpacity: t });
2982
2982
  }
2983
2983
  }
2984
- class Ot extends B {
2984
+ class Ot extends I {
2985
2985
  constructor() {
2986
2986
  super(...arguments);
2987
2987
  c(this, "prevCenter");
@@ -3008,10 +3008,10 @@ class Ot extends B {
3008
3008
  enableEditing: !1,
3009
3009
  // options.editable,
3010
3010
  strokeColor: e.strokeColor,
3011
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
3011
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3012
3012
  strokeWeight: e.strokeWeight,
3013
3013
  fillColor: e.fillColor,
3014
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
3014
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
3015
3015
  }), n = new Ot(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3016
3016
  return n.state.editable && setTimeout(() => {
3017
3017
  n.state.editable && s.enableEditing();
@@ -3034,7 +3034,7 @@ class Ot extends B {
3034
3034
  }, 0));
3035
3035
  }
3036
3036
  getCenter() {
3037
- return v.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
3037
+ return y.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
3038
3038
  }
3039
3039
  setRadius(e) {
3040
3040
  this.isDoingSetRadius = !0, this.innerOverlay.setRadius(e), this.isDoingSetRadius = !1;
@@ -3063,7 +3063,7 @@ class Ct extends qe {
3063
3063
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
3064
3064
  }
3065
3065
  getCenter() {
3066
- return v.fromGoogle(this.innerOverlay.getCenter() ?? J.LATLNG_ZERO, this.coordType);
3066
+ return y.fromGoogle(this.innerOverlay.getCenter() ?? J.LATLNG_ZERO, this.coordType);
3067
3067
  }
3068
3068
  setRadius(t) {
3069
3069
  this.innerOverlay.setRadius(t);
@@ -3072,7 +3072,7 @@ class Ct extends qe {
3072
3072
  return this.innerOverlay.getRadius();
3073
3073
  }
3074
3074
  }
3075
- function wr() {
3075
+ function Lr() {
3076
3076
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
3077
3077
  }
3078
3078
  const Yt = {
@@ -3086,14 +3086,14 @@ var X;
3086
3086
  i.ZERO = { x: 0, y: 0 };
3087
3087
  })(X || (X = {}));
3088
3088
  let tt;
3089
- function Si(i, t, e, r, s, n) {
3090
- return tt || (tt = Ai()), new tt(i, t, e, r, s, n);
3089
+ function Ai(i, t, e, r, s, n) {
3090
+ return tt || (tt = Ri()), new tt(i, t, e, r, s, n);
3091
3091
  }
3092
- function Ai() {
3093
- wr();
3092
+ function Ri() {
3093
+ Lr();
3094
3094
  const i = new BMap.Point(0, 0);
3095
3095
  return class extends BMap.OverlayV3 {
3096
- constructor(r, s = i, n = X.ZERO, a, d = 654, o = "") {
3096
+ constructor(r, s = i, n = X.ZERO, a, h = 654, o = "") {
3097
3097
  super();
3098
3098
  // 类表达式不能有私有成员, 故改成public
3099
3099
  c(this, "container");
@@ -3104,10 +3104,10 @@ function Ai() {
3104
3104
  this.content = r, this.position = s, this.offset = n;
3105
3105
  const l = "baidu-info-box-container";
3106
3106
  this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute", this.border = document.createElement("div"), this.border.className = `${l}__border ${o}`, this.inner = document.createElement("div"), this.inner.className = l + "__inner";
3107
- const h = document.createElement("img");
3108
- h.className = l + "__close", h.src = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23000000%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%0A%3C%2Fsvg%3E%0A", h.addEventListener("click", () => {
3107
+ const d = document.createElement("img");
3108
+ d.className = l + "__close", d.src = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23000000%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%0A%3C%2Fsvg%3E%0A", d.addEventListener("click", () => {
3109
3109
  this.close(), this.dispatchEvent({ type: "onclickclose" });
3110
- }), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(h), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(d), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
3110
+ }), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(d), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(h), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
3111
3111
  }
3112
3112
  initialize(r) {
3113
3113
  return this.map = r, r.getPanes().floatPane.appendChild(this.container), this.container;
@@ -3169,10 +3169,10 @@ class wt {
3169
3169
  }
3170
3170
  class Et extends wt {
3171
3171
  constructor(t, e, r) {
3172
- super(new le(t, e)), this.inner = t, this.map = e, this.state = r;
3172
+ super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
3173
3173
  }
3174
3174
  static create(t) {
3175
- const e = t.position || v.ZERO, r = new BMap.InfoWindow(t.content, {
3175
+ const e = t.position || y.ZERO, r = new BMap.InfoWindow(t.content, {
3176
3176
  maxWidth: t.maxWidth,
3177
3177
  offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
3178
3178
  enableAutoPan: !t.disableAutoPan
@@ -3183,14 +3183,14 @@ class Et extends wt {
3183
3183
  return this.inner.isOpen();
3184
3184
  }
3185
3185
  open(t) {
3186
- t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || v.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
3186
+ t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || y.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
3187
3187
  }
3188
3188
  close() {
3189
3189
  this.inner.isOpen() && this.map.innerMap.closeInfoWindow();
3190
3190
  }
3191
3191
  getPosition() {
3192
3192
  const t = this.inner.getPosition();
3193
- return t && v.fromBaidu(t, this.map.coordType) || this.state.position || v.ZERO;
3193
+ return t && y.fromBaidu(t, this.map.coordType) || this.state.position || y.ZERO;
3194
3194
  }
3195
3195
  setPosition(t) {
3196
3196
  this.state.position = t, this.inner.isOpen() && this.open();
@@ -3198,8 +3198,8 @@ class Et extends wt {
3198
3198
  }
3199
3199
  class Lt extends wt {
3200
3200
  constructor(e, r) {
3201
- super(new ie(e, r));
3202
- c(this, "eventHub", new sr());
3201
+ super(new re(e, r));
3202
+ c(this, "eventHub", new lr());
3203
3203
  c(this, "isOpened", !1);
3204
3204
  this.inner = e, this.map = r, e.addListener("closeclick", () => {
3205
3205
  this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
@@ -3209,7 +3209,7 @@ class Lt extends wt {
3209
3209
  });
3210
3210
  }
3211
3211
  static create(e) {
3212
- const r = e.position || v.ZERO, s = new google.maps.InfoWindow({
3212
+ const r = e.position || y.ZERO, s = new google.maps.InfoWindow({
3213
3213
  content: e.content,
3214
3214
  maxWidth: e.maxWidth,
3215
3215
  pixelOffset: e.offset && new google.maps.Size(e.offset.x, e.offset.y),
@@ -3248,7 +3248,7 @@ class Lt extends wt {
3248
3248
  this.isOpened && (this.isOpened = !1, this.inner.close(), this.eventHub.notify({ type: "close", target: this }));
3249
3249
  }
3250
3250
  getPosition() {
3251
- return v.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.map.coordType);
3251
+ return y.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.map.coordType);
3252
3252
  }
3253
3253
  setPosition(e) {
3254
3254
  this.inner.setPosition(e.toGoogle(this.map.coordType));
@@ -3260,7 +3260,7 @@ class xt extends Ye {
3260
3260
  }
3261
3261
  static create(t) {
3262
3262
  var s;
3263
- const e = this.coordType, r = Si(
3263
+ const e = this.coordType, r = Ai(
3264
3264
  t.content,
3265
3265
  (s = t.position) == null ? void 0 : s.toBaidu(e),
3266
3266
  t.offset,
@@ -3277,7 +3277,7 @@ class xt extends Ye {
3277
3277
  this.innerOverlay.close();
3278
3278
  }
3279
3279
  getPosition() {
3280
- return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3280
+ return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3281
3281
  }
3282
3282
  setPosition(t) {
3283
3283
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType));
@@ -3291,7 +3291,7 @@ class xt extends Ye {
3291
3291
  }
3292
3292
  class Pt extends wt {
3293
3293
  constructor(t, e, r) {
3294
- super(new ie(t, r)), this.inner = t, this.coordType = e, this.map = r;
3294
+ super(new re(t, r)), this.inner = t, this.coordType = e, this.map = r;
3295
3295
  }
3296
3296
  static create(t) {
3297
3297
  var n;
@@ -3303,8 +3303,8 @@ class Pt extends wt {
3303
3303
  maxWidth: t.maxWidth
3304
3304
  }), s = t.borderClass;
3305
3305
  return s && r.addListener("domready", () => {
3306
- var d;
3307
- const a = (d = t.content.parentElement) == null ? void 0 : d.parentElement;
3306
+ var h;
3307
+ const a = (h = t.content.parentElement) == null ? void 0 : h.parentElement;
3308
3308
  a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
3309
3309
  }), new Pt(r, e, this);
3310
3310
  }
@@ -3315,7 +3315,7 @@ class Pt extends wt {
3315
3315
  this.inner.close();
3316
3316
  }
3317
3317
  getPosition() {
3318
- return v.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.coordType);
3318
+ return y.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.coordType);
3319
3319
  }
3320
3320
  setPosition(t) {
3321
3321
  this.coordType = this.map.coordType, this.inner.setPosition(t.toGoogle(this.coordType));
@@ -3334,7 +3334,7 @@ class Pt extends wt {
3334
3334
  this.inner.setZIndex(t);
3335
3335
  }
3336
3336
  }
3337
- var ue;
3337
+ var de;
3338
3338
  ((i) => {
3339
3339
  function t(n, a) {
3340
3340
  if (n !== void 0)
@@ -3348,15 +3348,15 @@ var ue;
3348
3348
  }
3349
3349
  i.trimIndent = e;
3350
3350
  function r(n) {
3351
- return n.replace(/([^A-Z]?)([A-Z])/g, (a, d, o) => d ? `${d}-${o.toLowerCase()}` : o.toLowerCase());
3351
+ return n.replace(/([^A-Z]?)([A-Z])/g, (a, h, o) => h ? `${h}-${o.toLowerCase()}` : o.toLowerCase());
3352
3352
  }
3353
3353
  i.pascal2kebab = r;
3354
3354
  function s(n) {
3355
3355
  return /^-?\d+$/.test(n);
3356
3356
  }
3357
3357
  i.isInt = s;
3358
- })(ue || (ue = {}));
3359
- const Ri = {
3358
+ })(de || (de = {}));
3359
+ const $i = {
3360
3360
  /** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
3361
3361
  basename(i, t) {
3362
3362
  const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
@@ -3396,7 +3396,7 @@ var we = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3396
3396
  }
3397
3397
  i.toBaidu = e;
3398
3398
  })(Ee || (Ee = {}));
3399
- class $i {
3399
+ class zi {
3400
3400
  constructor(t, e) {
3401
3401
  c(this, "baidu");
3402
3402
  c(this, "google");
@@ -3417,12 +3417,12 @@ class $i {
3417
3417
  asBaidu() {
3418
3418
  if (!this.baidu) {
3419
3419
  const t = this;
3420
- wr();
3420
+ Lr();
3421
3421
  class e extends BMap.OverlayV3 {
3422
3422
  initialize(n) {
3423
3423
  var o;
3424
- const a = t.create(), d = n.getPanes();
3425
- return (o = Ee.toBaidu(t.mapPane, d)) == null || o.appendChild(a), a;
3424
+ const a = t.create(), h = n.getPanes();
3425
+ return (o = Ee.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
3426
3426
  }
3427
3427
  draw() {
3428
3428
  t.draw();
@@ -3435,7 +3435,7 @@ class $i {
3435
3435
  return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
3436
3436
  },
3437
3437
  fromOverlayPointToLatLng(s) {
3438
- return v.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
3438
+ return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
3439
3439
  }
3440
3440
  };
3441
3441
  }
@@ -3462,7 +3462,7 @@ class $i {
3462
3462
  return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? X.ZERO;
3463
3463
  },
3464
3464
  fromOverlayPointToLatLng(r) {
3465
- return v.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? J.LATLNG_ZERO, t.map.coordType);
3465
+ return y.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? J.LATLNG_ZERO, t.map.coordType);
3466
3466
  }
3467
3467
  };
3468
3468
  }
@@ -3470,10 +3470,10 @@ class $i {
3470
3470
  }
3471
3471
  }
3472
3472
  let rt;
3473
- function zi(i, t, e, r, s) {
3474
- return rt || (rt = Di()), new rt(i, t, e, r, s);
3473
+ function Di(i, t, e, r, s) {
3474
+ return rt || (rt = Ni()), new rt(i, t, e, r, s);
3475
3475
  }
3476
- function Di() {
3476
+ function Ni() {
3477
3477
  return class extends google.maps.OverlayView {
3478
3478
  constructor(e, r, s, n = we.overlayMouseTarget, a) {
3479
3479
  super();
@@ -3527,7 +3527,7 @@ function Di() {
3527
3527
  }
3528
3528
  };
3529
3529
  }
3530
- var pe;
3530
+ var ue;
3531
3531
  ((i) => {
3532
3532
  function t(r) {
3533
3533
  return typeof r == "string" ? r : r.outerHTML;
@@ -3541,7 +3541,7 @@ var pe;
3541
3541
  return r;
3542
3542
  }
3543
3543
  i.toElement = e;
3544
- })(pe || (pe = {}));
3544
+ })(ue || (ue = {}));
3545
3545
  class kt extends Ye {
3546
3546
  constructor(e, r, s, n) {
3547
3547
  super(e, r, s);
@@ -3553,7 +3553,7 @@ class kt extends Ye {
3553
3553
  }
3554
3554
  static create(e) {
3555
3555
  var a;
3556
- const r = this.coordType, s = new BMap.Label(pe.toString(e.content), {
3556
+ const r = this.coordType, s = new BMap.Label(ue.toString(e.content), {
3557
3557
  position: (a = e.position) == null ? void 0 : a.toBaidu(r),
3558
3558
  offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
3559
3559
  });
@@ -3573,13 +3573,13 @@ class kt extends Ye {
3573
3573
  characterData: !0,
3574
3574
  childList: !0,
3575
3575
  subtree: !0
3576
- })), r || this.innerOverlay.setContent(pe.toString(e)), this.content = e);
3576
+ })), r || this.innerOverlay.setContent(ue.toString(e)), this.content = e);
3577
3577
  }
3578
3578
  setZIndex(e) {
3579
3579
  this.innerOverlay.setZIndex(e);
3580
3580
  }
3581
3581
  getPosition() {
3582
- return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3582
+ return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3583
3583
  }
3584
3584
  setPosition(e) {
3585
3585
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toBaidu(this.coordType));
@@ -3601,7 +3601,7 @@ class kt extends Ye {
3601
3601
  * @description baidu中Label默认左上角对齐Icon的左上, 我们要将其转换为对齐marker的position
3602
3602
  * */
3603
3603
  attachIcon(e) {
3604
- var d;
3604
+ var h;
3605
3605
  let r;
3606
3606
  if (e instanceof BMap.Icon)
3607
3607
  r = e.anchor;
@@ -3609,29 +3609,29 @@ class kt extends Ye {
3609
3609
  if (e.anchor)
3610
3610
  r = e.anchor;
3611
3611
  else {
3612
- const o = ((d = e.__icon__) == null ? void 0 : d.baiduLabelOffset) ?? { x: 0, y: 0 };
3612
+ const o = ((h = e.__icon__) == null ? void 0 : h.baiduLabelOffset) ?? { x: 0, y: 0 };
3613
3613
  r = {
3614
3614
  width: e.style.anchor.width + o.x,
3615
3615
  height: e.style.anchor.height + o.y
3616
3616
  }, process.env.NODE_ENV !== "production" && setTimeout(() => {
3617
3617
  var u, p;
3618
- if (ae(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
3618
+ if (oe(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
3619
3619
  console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
3620
3620
  return;
3621
3621
  }
3622
- const l = e.anchor.width - e.style.anchor.width, h = e.anchor.height - e.style.anchor.height;
3623
- if (o.x !== l || o.y !== h) {
3624
- const f = [
3622
+ const l = e.anchor.width - e.style.anchor.width, d = e.anchor.height - e.style.anchor.height;
3623
+ if (o.x !== l || o.y !== d) {
3624
+ const b = [
3625
3625
  (u = e.__icon__.anchor) == null ? void 0 : u.x,
3626
3626
  (p = e.__icon__.anchor) == null ? void 0 : p.y,
3627
3627
  e.__icon__.rotation,
3628
3628
  e.__icon__.scale,
3629
3629
  e.__icon__.strokeWeight
3630
3630
  ].map((_) => _ ?? "").join(",");
3631
- console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, ue.trimIndent(
3631
+ console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, de.trimIndent(
3632
3632
  `
3633
- 为了保证Label的位置正确, 请将SymbolIcon(${f})中baiduLabelOffset的值改写成:
3634
- ${JSON.stringify({ x: l, y: h })}
3633
+ 为了保证Label的位置正确, 请将SymbolIcon(${b})中baiduLabelOffset的值改写成:
3634
+ ${JSON.stringify({ x: l, y: d })}
3635
3635
  `
3636
3636
  ));
3637
3637
  }
@@ -3642,27 +3642,27 @@ class kt extends Ye {
3642
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;
3643
3643
  }
3644
3644
  }
3645
- class It extends Tt {
3645
+ class Bt extends Mt {
3646
3646
  static create(t) {
3647
3647
  var s;
3648
- const e = this.coordType, r = zi(
3649
- pe.toElement(t.content),
3648
+ const e = this.coordType, r = Di(
3649
+ ue.toElement(t.content),
3650
3650
  (s = t.position) == null ? void 0 : s.toGoogle(e),
3651
3651
  t.offset,
3652
3652
  t.mapPane,
3653
3653
  t.zIndex
3654
3654
  );
3655
- return new It(r, e, this);
3655
+ return new Bt(r, e, this);
3656
3656
  }
3657
3657
  setZIndex(t) {
3658
3658
  this.innerOverlay.setZIndex(t);
3659
3659
  }
3660
3660
  setContent(t) {
3661
- this.innerOverlay.setElement(pe.toElement(t));
3661
+ this.innerOverlay.setElement(ue.toElement(t));
3662
3662
  }
3663
3663
  getPosition() {
3664
3664
  const t = this.innerOverlay.getPosition();
3665
- return t ? v.fromGoogle(t, this.coordType) : v.ZERO;
3665
+ return t ? y.fromGoogle(t, this.coordType) : y.ZERO;
3666
3666
  }
3667
3667
  setPosition(t) {
3668
3668
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toGoogle(this.coordType));
@@ -3674,11 +3674,11 @@ class It extends Tt {
3674
3674
  this.innerOverlay.setOffset(t);
3675
3675
  }
3676
3676
  }
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)
3677
+ const Ne = {
3678
+ toGoogle: (i) => "url" in i ? Ge.toGoogle(i) : pe.toGoogle(i),
3679
+ toBaidu: (i) => "url" in i ? Ge.toBaidu(i) : pe.toBaidu(i)
3680
3680
  };
3681
- var Ne;
3681
+ var Ge;
3682
3682
  ((i) => {
3683
3683
  function t(r) {
3684
3684
  return {
@@ -3702,8 +3702,8 @@ var Ne;
3702
3702
  });
3703
3703
  }
3704
3704
  i.toBaidu = e;
3705
- })(Ne || (Ne = {}));
3706
- var ge;
3705
+ })(Ge || (Ge = {}));
3706
+ var pe;
3707
3707
  ((i) => {
3708
3708
  function t(r) {
3709
3709
  return {
@@ -3734,19 +3734,19 @@ var ge;
3734
3734
  return s.__icon__ = r, s;
3735
3735
  }
3736
3736
  i.toBaidu = e;
3737
- })(ge || (ge = {}));
3738
- const Xs = {
3737
+ })(pe || (pe = {}));
3738
+ const Ys = {
3739
3739
  CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
3740
3740
  BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
3741
3741
  BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
3742
3742
  FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
3743
3743
  FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
3744
3744
  };
3745
- var Ge;
3745
+ var Ze;
3746
3746
  ((i) => {
3747
3747
  function t(r) {
3748
3748
  return {
3749
- icon: ge.toGoogle(r.icon),
3749
+ icon: pe.toGoogle(r.icon),
3750
3750
  offset: r.offset,
3751
3751
  repeat: r.repeat,
3752
3752
  fixedRotation: r.fixedRotation
@@ -3755,14 +3755,14 @@ var Ge;
3755
3755
  i.toGoogle = t;
3756
3756
  function e(r) {
3757
3757
  return new BMap.IconSequence(
3758
- ge.toBaidu(r.icon),
3758
+ pe.toBaidu(r.icon),
3759
3759
  r.offset,
3760
3760
  r.repeat ?? "",
3761
3761
  r.fixedRotation
3762
3762
  );
3763
3763
  }
3764
3764
  i.toBaidu = e;
3765
- })(Ge || (Ge = {}));
3765
+ })(Ze || (Ze = {}));
3766
3766
  class Le extends Ye {
3767
3767
  constructor(t, e, r, s) {
3768
3768
  super(t, e, r), this.state = s;
@@ -3770,7 +3770,7 @@ class Le extends Ye {
3770
3770
  static create(t) {
3771
3771
  const e = this.coordType, r = t.icon, s = {
3772
3772
  title: t.title,
3773
- icon: r && De.toBaidu(r),
3773
+ icon: r && Ne.toBaidu(r),
3774
3774
  enableClicking: t.clickable,
3775
3775
  enableDragging: t.draggable,
3776
3776
  // baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
@@ -3778,11 +3778,11 @@ class Le extends Ye {
3778
3778
  draggingCursor: t.cursor
3779
3779
  }, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
3780
3780
  n.__create_by_tg__ = !0, t.zIndex !== void 0 && n.setZIndex(t.zIndex);
3781
- const a = t.clickable === void 0 ? !0 : t.clickable, d = !!t.draggable;
3782
- return new Le(n, e, this, { clickable: a, draggable: d, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3781
+ const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
3782
+ return new Le(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3783
3783
  }
3784
3784
  getPosition() {
3785
- return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3785
+ return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3786
3786
  }
3787
3787
  setPosition(t) {
3788
3788
  var e;
@@ -3795,7 +3795,7 @@ class Le extends Ye {
3795
3795
  return this.innerOverlay.getTitle();
3796
3796
  }
3797
3797
  setIcon(t) {
3798
- const e = De.toBaidu(t);
3798
+ const e = Ne.toBaidu(t);
3799
3799
  this.innerOverlay.setIcon(e);
3800
3800
  const r = this.getLabel();
3801
3801
  r && r.attachIcon(e);
@@ -3830,7 +3830,7 @@ class Le extends Ye {
3830
3830
  return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
3831
3831
  }
3832
3832
  }
3833
- class Bt extends Tt {
3833
+ class It extends Mt {
3834
3834
  constructor() {
3835
3835
  super(...arguments);
3836
3836
  c(this, "label");
@@ -3844,7 +3844,7 @@ class Bt extends Tt {
3844
3844
  title: e.title,
3845
3845
  zIndex: e.zIndex,
3846
3846
  visible: e.visible,
3847
- icon: s && De.toGoogle(s),
3847
+ icon: s && Ne.toGoogle(s),
3848
3848
  clickable: e.clickable,
3849
3849
  draggable: e.draggable,
3850
3850
  // google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
@@ -3853,10 +3853,10 @@ class Bt extends Tt {
3853
3853
  // InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
3854
3854
  anchorPoint: new google.maps.Point(0, 0)
3855
3855
  };
3856
- return new Bt(new google.maps.Marker(n), r, this);
3856
+ return new It(new google.maps.Marker(n), r, this);
3857
3857
  }
3858
3858
  getPosition() {
3859
- return v.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
3859
+ return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
3860
3860
  }
3861
3861
  setPosition(e) {
3862
3862
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toGoogle(this.coordType));
@@ -3868,7 +3868,7 @@ class Bt extends Tt {
3868
3868
  return this.innerOverlay.getTitle() || "";
3869
3869
  }
3870
3870
  setIcon(e) {
3871
- this.innerOverlay.setIcon(De.toGoogle(e));
3871
+ this.innerOverlay.setIcon(Ne.toGoogle(e));
3872
3872
  }
3873
3873
  getIcon() {
3874
3874
  return this.innerOverlay.getIcon();
@@ -3906,7 +3906,7 @@ class Bt extends Tt {
3906
3906
  this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
3907
3907
  }
3908
3908
  }
3909
- class St extends B {
3909
+ class St extends I {
3910
3910
  constructor() {
3911
3911
  super(...arguments);
3912
3912
  c(this, "eventHubDelegate");
@@ -3949,21 +3949,21 @@ class At extends St {
3949
3949
  }
3950
3950
  static create(e) {
3951
3951
  var n, a;
3952
- const r = this.coordType, s = new BMap.Polyline(e.path.map((d) => d.toBaidu(r)), {
3952
+ const r = this.coordType, s = new BMap.Polyline(e.path.map((h) => h.toBaidu(r)), {
3953
3953
  enableClicking: e.clickable,
3954
3954
  enableEditing: e.editable,
3955
3955
  strokeColor: e.strokeColor,
3956
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
3956
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3957
3957
  strokeWeight: e.strokeWeight,
3958
- icons: (n = e.icons) == null ? void 0 : n.map(Ge.toBaidu)
3958
+ icons: (n = e.icons) == null ? void 0 : n.map(Ze.toBaidu)
3959
3959
  });
3960
3960
  return new At(s, r, this, {
3961
3961
  editable: !!e.editable,
3962
- symbolIcons: (a = e.icons) == null ? void 0 : a.map((d) => d.icon)
3962
+ symbolIcons: (a = e.icons) == null ? void 0 : a.map((h) => h.icon)
3963
3963
  }).visibleOptionInternal(e.visible);
3964
3964
  }
3965
3965
  getPath() {
3966
- return this.innerOverlay.getPath().map((e) => v.fromBaidu(e, this.coordType));
3966
+ return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
3967
3967
  }
3968
3968
  setPath(e) {
3969
3969
  this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
@@ -3980,8 +3980,8 @@ class At extends St {
3980
3980
  const a = n.getIcon();
3981
3981
  if (!(a instanceof BMap.Symbol))
3982
3982
  return !1;
3983
- const d = a;
3984
- return d.__icon__ ? (o = this.state.symbolIcons) == null ? void 0 : o.includes(d.__icon__) : !1;
3983
+ const h = a;
3984
+ return h.__icon__ ? (o = this.state.symbolIcons) == null ? void 0 : o.includes(h.__icon__) : !1;
3985
3985
  }).forEach((s) => this.map.innerMap.removeOverlay(s));
3986
3986
  }
3987
3987
  }
@@ -4001,7 +4001,7 @@ class Rt extends qe {
4001
4001
  strokeOpacity: e.strokeOpacity,
4002
4002
  strokeWeight: e.strokeWeight,
4003
4003
  visible: e.visible,
4004
- icons: (n = e.icons) == null ? void 0 : n.map(Ge.toGoogle)
4004
+ icons: (n = e.icons) == null ? void 0 : n.map(Ze.toGoogle)
4005
4005
  });
4006
4006
  return new Rt(s, r, this);
4007
4007
  }
@@ -4026,7 +4026,7 @@ class Rt extends qe {
4026
4026
  getPath() {
4027
4027
  const e = [];
4028
4028
  return this.innerOverlay.getPath().forEach((r) => {
4029
- e.push(v.fromGoogle(r, this.coordType));
4029
+ e.push(y.fromGoogle(r, this.coordType));
4030
4030
  }), e;
4031
4031
  }
4032
4032
  setPath(e) {
@@ -4046,15 +4046,15 @@ class $t extends St {
4046
4046
  enableClicking: e.clickable,
4047
4047
  enableEditing: e.editable,
4048
4048
  strokeColor: e.strokeColor,
4049
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
4049
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
4050
4050
  strokeWeight: e.strokeWeight,
4051
4051
  fillColor: e.fillColor,
4052
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
4052
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4053
4053
  });
4054
4054
  return new $t(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4055
4055
  }
4056
4056
  getPaths() {
4057
- return [this.innerOverlay.getPath().map((e) => v.fromBaidu(e, this.coordType))];
4057
+ return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
4058
4058
  }
4059
4059
  setPaths(e) {
4060
4060
  e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
@@ -4105,7 +4105,7 @@ class zt extends qe {
4105
4105
  return e.forEach((s) => {
4106
4106
  const n = [];
4107
4107
  r.push(n), s.forEach((a) => {
4108
- n.push(v.fromGoogle(a, this.coordType));
4108
+ n.push(y.fromGoogle(a, this.coordType));
4109
4109
  });
4110
4110
  }), r;
4111
4111
  }
@@ -4130,9 +4130,9 @@ class Dt extends St {
4130
4130
  if (a > r.length) {
4131
4131
  for (let o = 0; o < a; o++)
4132
4132
  if (r[o] == null || !Yt.equals(s[o], r[o])) {
4133
- const l = s[(o - 2 + a) % a], h = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], f = s[(o + 2) % a];
4133
+ 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];
4134
4134
  let _;
4135
- h.lat === p.lat ? _ = new BMap.Point(h.lng, u.lat) : h.lng === p.lng ? _ = new BMap.Point(u.lng, h.lat) : _ = u, n = [l, f, _];
4135
+ 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, _];
4136
4136
  break;
4137
4137
  }
4138
4138
  } else if (a === r.length) {
@@ -4146,8 +4146,8 @@ class Dt extends St {
4146
4146
  }
4147
4147
  } else
4148
4148
  a < r.length;
4149
- const d = R.fromArray(n.map((o) => v.fromBaidu(o, this.coordType)));
4150
- d && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(d.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
4149
+ const h = R.fromArray(n.map((o) => y.fromBaidu(o, this.coordType)));
4150
+ h && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(h.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
4151
4151
  }, 0);
4152
4152
  });
4153
4153
  this.addEventListener("bounds-changed", this.onBoundsChanged);
@@ -4157,10 +4157,10 @@ class Dt extends St {
4157
4157
  enableClicking: e.clickable,
4158
4158
  enableEditing: e.editable,
4159
4159
  strokeColor: e.strokeColor,
4160
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
4160
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
4161
4161
  strokeWeight: e.strokeWeight,
4162
4162
  fillColor: e.fillColor,
4163
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
4163
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4164
4164
  });
4165
4165
  return new Dt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4166
4166
  }
@@ -4197,8 +4197,8 @@ class Nt extends qe {
4197
4197
  e.equals(this.innerOverlay.getBounds()) || this.innerOverlay.setBounds(e);
4198
4198
  }
4199
4199
  }
4200
- const te = 1;
4201
- class Ni extends Mt {
4200
+ const ee = 1;
4201
+ class Gi extends Tt {
4202
4202
  constructor(e, r) {
4203
4203
  var s;
4204
4204
  super(e);
@@ -4217,12 +4217,12 @@ class Ni extends Mt {
4217
4217
  c(this, "createZoomControl", vt.create);
4218
4218
  c(this, "createScaleControl", ft.create);
4219
4219
  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, {
4220
- minZoom: r.minZoom && r.minZoom + te,
4221
- maxZoom: r.maxZoom && r.maxZoom + te,
4220
+ minZoom: r.minZoom && r.minZoom + ee,
4221
+ maxZoom: r.maxZoom && r.maxZoom + ee,
4222
4222
  mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
4223
4223
  enableMapClick: !1
4224
4224
  // 关闭底图点击功能
4225
- }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + te), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new le(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
4225
+ }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + ee), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new ae(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
4226
4226
  const a = n.target.__info_box__;
4227
4227
  a && (console.debug("add:info-box", a), this.map.addOverlay(a));
4228
4228
  }), this.map.addEventListener("removeoverlay", (n) => {
@@ -4264,7 +4264,7 @@ class Ni extends Mt {
4264
4264
  super.removeEventListener(e, r);
4265
4265
  }
4266
4266
  fromContainerPointToLatLng(e) {
4267
- return v.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
4267
+ return y.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
4268
4268
  }
4269
4269
  fromLatLngToContainerPoint(e) {
4270
4270
  return this.innerMap.pointToPixel(e.toBaidu(this.coordType));
@@ -4279,22 +4279,22 @@ class Ni extends Mt {
4279
4279
  e ? this.map.enableDoubleClickZoom() : this.map.disableDoubleClickZoom();
4280
4280
  }
4281
4281
  getCenter() {
4282
- return v.fromBaidu(this.map.getCenter(), this.coordType);
4282
+ return y.fromBaidu(this.map.getCenter(), this.coordType);
4283
4283
  }
4284
4284
  setCenter(e) {
4285
4285
  this.map.setCenter(e.toBaidu(this.coordType));
4286
4286
  }
4287
4287
  getZoom() {
4288
- return super.getZoom() - te;
4288
+ return super.getZoom() - ee;
4289
4289
  }
4290
4290
  setZoom(e) {
4291
- return super.setZoom(e + te);
4291
+ return super.setZoom(e + ee);
4292
4292
  }
4293
4293
  setMinZoom(e) {
4294
- this.map.setMinZoom(e + te);
4294
+ this.map.setMinZoom(e + ee);
4295
4295
  }
4296
4296
  setMaxZoom(e) {
4297
- this.map.setMaxZoom(e + te);
4297
+ this.map.setMaxZoom(e + ee);
4298
4298
  }
4299
4299
  setMapStyle(e) {
4300
4300
  this.map.setMapStyleV2((e == null ? void 0 : e.baidu) ?? { styleJson: [] });
@@ -4361,39 +4361,39 @@ class Ni extends Mt {
4361
4361
  }
4362
4362
  }
4363
4363
  removeCustomControl(e) {
4364
- e.inner && (ae(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4364
+ e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4365
4365
  }
4366
4366
  createMarkerClusterer(e) {
4367
- return new ci(this, e);
4367
+ return new wi(this, e);
4368
4368
  }
4369
4369
  createAutocomplete(e) {
4370
- return new ni(this, e);
4370
+ return new bi(this, e);
4371
4371
  }
4372
4372
  createSearchBox(e) {
4373
- return new mi(this, e);
4373
+ return new ki(this, e);
4374
4374
  }
4375
4375
  createPlacesService(e) {
4376
- return new pi(this, e);
4376
+ return new xi(this, e);
4377
4377
  }
4378
4378
  createMapUrls(e) {
4379
4379
  return new Re(e);
4380
4380
  }
4381
4381
  }
4382
- class Gi extends Mt {
4382
+ class Zi extends Tt {
4383
4383
  constructor(e, r) {
4384
4384
  var n, a;
4385
4385
  super(e);
4386
4386
  c(this, "buildInMapTypeId2BIMT");
4387
4387
  c(this, "googleMapTypeId2BIMT");
4388
4388
  c(this, "map");
4389
- c(this, "createLabel", It.create);
4389
+ c(this, "createLabel", Bt.create);
4390
4390
  c(this, "createCircle", Ct.create);
4391
4391
  c(this, "createPolygon", zt.create);
4392
4392
  c(this, "createPolyline", Rt.create);
4393
4393
  c(this, "createRectangle", Nt.create);
4394
4394
  c(this, "createInfoWindow", Lt.create);
4395
4395
  c(this, "createInfoBox", Pt.create);
4396
- c(this, "createMarker", Bt.create);
4396
+ c(this, "createMarker", It.create);
4397
4397
  c(this, "createMapTypeControl", Se.create);
4398
4398
  c(this, "createZoomControl", _t.create);
4399
4399
  c(this, "createScaleControl", yt.create);
@@ -4410,7 +4410,7 @@ class Gi extends Mt {
4410
4410
  styles: (n = r.mapStyle) == null ? void 0 : n.google.styles,
4411
4411
  mapId: (a = r.mapStyle) == null ? void 0 : a.google.mapId,
4412
4412
  mapTypeId: s == null ? void 0 : s.getGoogleMapTypeId()
4413
- }), this.setEventTargetDelegate(new ie(this.map, this));
4413
+ }), this.setEventTargetDelegate(new re(this.map, this));
4414
4414
  }
4415
4415
  setGestureHandling(e) {
4416
4416
  this.map.setOptions({
@@ -4426,21 +4426,21 @@ class Gi extends Mt {
4426
4426
  fromContainerPointToLatLng(e) {
4427
4427
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
4428
4428
  if (r == null || s == null)
4429
- return v.ZERO;
4430
- const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), d = this.innerMap.getZoom();
4431
- if (n == null || a == null || d == null)
4432
- return v.ZERO;
4433
- const o = Math.pow(2, d), l = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
4434
- return v.fromGoogle(r.fromPointToLatLng(l) ?? J.LATLNG_ZERO, this.coordType);
4429
+ return y.ZERO;
4430
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), h = this.innerMap.getZoom();
4431
+ if (n == null || a == null || h == null)
4432
+ return y.ZERO;
4433
+ const o = Math.pow(2, h), l = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
4434
+ return y.fromGoogle(r.fromPointToLatLng(l) ?? J.LATLNG_ZERO, this.coordType);
4435
4435
  }
4436
4436
  fromLatLngToContainerPoint(e) {
4437
4437
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
4438
4438
  if (r == null || s == null)
4439
4439
  return X.ZERO;
4440
- const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), d = this.innerMap.getZoom();
4441
- if (n == null || a == null || d == null)
4440
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), h = this.innerMap.getZoom();
4441
+ if (n == null || a == null || h == null)
4442
4442
  return X.ZERO;
4443
- const o = Math.pow(2, d), l = r.fromLatLngToPoint(e.toGoogle(this.coordType));
4443
+ const o = Math.pow(2, h), l = r.fromLatLngToPoint(e.toGoogle(this.coordType));
4444
4444
  return l == null ? X.ZERO : { x: (l.x - n.x) * o, y: (l.y - a.y) * o };
4445
4445
  }
4446
4446
  setDefaultCursor(e) {
@@ -4453,7 +4453,7 @@ class Gi extends Mt {
4453
4453
  this.map.setOptions({ disableDoubleClickZoom: !e });
4454
4454
  }
4455
4455
  getCenter() {
4456
- return v.fromGoogle(this.map.getCenter() ?? J.LATLNG_ZERO, this.coordType);
4456
+ return y.fromGoogle(this.map.getCenter() ?? J.LATLNG_ZERO, this.coordType);
4457
4457
  }
4458
4458
  setCenter(e) {
4459
4459
  this.map.setCenter(e.toGoogle(this.coordType));
@@ -4529,56 +4529,30 @@ class Gi extends Mt {
4529
4529
  }
4530
4530
  }
4531
4531
  createMarkerClusterer(e) {
4532
- return new di(this, e);
4532
+ return new Ei(this, e);
4533
4533
  }
4534
4534
  createAutocomplete(e) {
4535
- return new si(this, e);
4535
+ return new _i(this, e);
4536
4536
  }
4537
4537
  createSearchBox(e) {
4538
- return new gi(this, e);
4538
+ return new Pi(this, e);
4539
4539
  }
4540
4540
  createPlacesService(e) {
4541
- return new ui(this, e);
4541
+ return new Li(this, e);
4542
4542
  }
4543
4543
  createMapUrls(e) {
4544
4544
  return new Ae(e);
4545
4545
  }
4546
4546
  }
4547
- const Ze = ["3.0"], Zi = {
4548
- baidu: {
4549
- version: "3.0",
4550
- // 在build时会被静态替换, 导致使用者不能无法设置它
4551
- // @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
4552
- // @see @vite_process_env_detail
4553
- key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
4554
- },
4555
- google: {
4556
- version: "quarterly",
4557
- key: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",
4558
- language: "en-us",
4559
- libraries: ["places"]
4560
- },
4561
- here: {
4562
- version: Ze[0],
4563
- key: ""
4564
- }
4565
- };
4566
- let Er;
4567
- function Lr() {
4568
- return Er || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
4569
- }
4570
- function Wi(i) {
4571
- i != null && (Er = Tr(Zi, i));
4572
- }
4573
- class Hi extends Mt {
4547
+ class Wi extends Tt {
4574
4548
  constructor(e, r) {
4575
4549
  var a;
4576
4550
  super(e);
4577
4551
  c(this, "map");
4578
4552
  c(this, "defaultLayers");
4579
4553
  this.mapOptions = r;
4580
- const s = Lr().here;
4581
- Ze.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${Ze}`);
4554
+ const s = nr().here;
4555
+ ze.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${ze}`);
4582
4556
  const n = new H.service.Platform({
4583
4557
  app_id: s.key.split(",")[0],
4584
4558
  app_code: s.key.split(",")[1]
@@ -4595,7 +4569,7 @@ class Hi extends Mt {
4595
4569
  return x.wgs84;
4596
4570
  }
4597
4571
  getCenter() {
4598
- return v.fromHere(this.map.getCenter(), this.coordType);
4572
+ return y.fromHere(this.map.getCenter(), this.coordType);
4599
4573
  }
4600
4574
  setCenter(e) {
4601
4575
  this.map.setCenter(e.toHere(this.coordType));
@@ -4728,26 +4702,22 @@ var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
4728
4702
  const n = lt.create(s);
4729
4703
  switch (e) {
4730
4704
  case "google":
4731
- return new Gi(r, n);
4705
+ return new Zi(r, n);
4732
4706
  case "baidu":
4733
- return new Ni(r, n);
4707
+ return new Gi(r, n);
4734
4708
  case "here":
4735
- return new Hi(r, n);
4709
+ return new Wi(r, n);
4736
4710
  }
4737
4711
  }
4738
4712
  i.createMap = t;
4739
4713
  })(ht || (ht = {}));
4740
- const ji = {};
4741
- function Vi(i) {
4742
- return Q.putIfAbsent(ji, i, () => qr(() => Fi({ type: i, config: Lr()[i] })))();
4743
- }
4744
- function Fi({ type: i, config: t }) {
4745
- const e = window, r = Ui(i);
4746
- if (Q.get(e, r))
4714
+ function ji({ type: i, config: t }) {
4715
+ const e = window, r = Hi(i);
4716
+ if (e[r])
4747
4717
  return Promise.resolve();
4748
4718
  switch (i !== G.here && !t.key && C(`请先配置${i}地图的key`), i) {
4749
4719
  case G.google:
4750
- return {}.VITE_FALSE ? (ti({
4720
+ return {}.VITE_FALSE ? (fi({
4751
4721
  key: t.key,
4752
4722
  v: "3.52"
4753
4723
  // v: config.version,
@@ -4755,40 +4725,40 @@ function Fi({ type: i, config: t }) {
4755
4725
  case G.baidu:
4756
4726
  return qt(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4757
4727
  case G.here:
4758
- return ye(fe("core", t.version)).then(() => Promise.all([
4728
+ return fe(me("core", t.version)).then(() => Promise.all([
4759
4729
  // 其他大多数模块都可以同时载入
4760
- ye(fe("service", t.version)),
4761
- ye(fe("mapevents", t.version)),
4762
- ye(fe("clustering", t.version)),
4763
- ye(fe("ui", t.version))
4764
- ])).catch((s) => (Q.del(e, r), Promise.reject(s)));
4730
+ fe(me("service", t.version)),
4731
+ fe(me("mapevents", t.version)),
4732
+ fe(me("clustering", t.version)),
4733
+ fe(me("ui", t.version))
4734
+ ])).catch((s) => (delete e[r], Promise.reject(s)));
4765
4735
  default:
4766
4736
  st(i);
4767
4737
  }
4768
4738
  }
4769
- function fe(i, t = Ze[0]) {
4739
+ function me(i, t = ze[0]) {
4770
4740
  return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
4771
4741
  }
4772
- function Ui(i) {
4742
+ function Hi(i) {
4773
4743
  switch (i) {
4774
4744
  case G.google:
4775
- return "google.maps";
4745
+ return "google";
4776
4746
  case G.baidu:
4777
4747
  return "BMap";
4778
4748
  case G.here:
4779
4749
  return "H";
4780
4750
  }
4781
4751
  }
4782
- let Yi = 0;
4752
+ let Vi = 0;
4783
4753
  function qt(i, t = "callback") {
4784
4754
  return new Promise((e, r) => {
4785
- const s = `__callback${Yi++}`;
4755
+ const s = `__callback${Vi++}`;
4786
4756
  window[s] = e;
4787
4757
  const n = document.createElement("script");
4788
4758
  n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
4789
4759
  });
4790
4760
  }
4791
- function ye(i) {
4761
+ function fe(i) {
4792
4762
  return new Promise((t, e) => {
4793
4763
  const r = document.createElement("script");
4794
4764
  r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
@@ -4801,7 +4771,7 @@ function Z(i, t) {
4801
4771
  validator: (e) => Object.values(i).includes(e)
4802
4772
  };
4803
4773
  }
4804
- function qi(i, t) {
4774
+ function Fi(i, t) {
4805
4775
  return {
4806
4776
  type: String,
4807
4777
  default: t,
@@ -4820,7 +4790,7 @@ function m(i, t) {
4820
4790
  default: t
4821
4791
  };
4822
4792
  }
4823
- function Js(i) {
4793
+ function qs(i) {
4824
4794
  const t = {};
4825
4795
  return Object.entries(i).forEach(([e, r]) => {
4826
4796
  const s = `__${e}`;
@@ -4837,37 +4807,37 @@ function Js(i) {
4837
4807
  };
4838
4808
  }), t;
4839
4809
  }
4840
- const ve = {
4810
+ const ye = {
4841
4811
  enumerable: !0,
4842
4812
  configurable: !0,
4843
- get: Oe,
4844
- set: Oe
4813
+ get: Me,
4814
+ set: Me
4845
4815
  };
4846
- function Ki(i) {
4816
+ function Ui(i) {
4847
4817
  return Object.keys(i).forEach((t) => {
4848
4818
  const e = i[t];
4849
4819
  let r = !1;
4850
- typeof e == "function" ? (ve.get = e, ve.set = Oe, r = !0) : typeof e == "object" && typeof e.get == "function" && (ve.get = e.get, ve.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, ve));
4820
+ typeof e == "function" ? (ye.get = e, ye.set = Me, r = !0) : typeof e == "object" && typeof e.get == "function" && (ye.get = e.get, ye.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, ye));
4851
4821
  }), i;
4852
4822
  }
4853
- function Qs(i) {
4854
- return Ki(i);
4823
+ function Ks(i) {
4824
+ return Ui(i);
4855
4825
  }
4856
4826
  function xr() {
4857
4827
  return it();
4858
4828
  }
4859
- function Be(i, t) {
4829
+ function Ie(i, t) {
4860
4830
  const e = i.$options[t];
4861
4831
  if (e)
4862
4832
  for (const r of e)
4863
4833
  r.call(i);
4864
4834
  }
4865
- function en(i, t) {
4835
+ function Xs(i, t) {
4866
4836
  for (const e of i)
4867
4837
  if (e.$options.name === t.name)
4868
4838
  return e;
4869
4839
  }
4870
- function tn(i, t) {
4840
+ function Js(i, t) {
4871
4841
  if (!i.default)
4872
4842
  return;
4873
4843
  const e = i.default();
@@ -4875,12 +4845,12 @@ function tn(i, t) {
4875
4845
  if ((r == null ? void 0 : r.type).name === t.name)
4876
4846
  return r;
4877
4847
  }
4878
- function Xi(i, t) {
4848
+ function Yi(i, t) {
4879
4849
  const e = {}, r = {}, s = {};
4880
4850
  return Object.keys(i).forEach((n) => {
4881
- n.startsWith("on") ? e[ue.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4851
+ n.startsWith("on") ? e[de.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4882
4852
  }), t && Object.keys(t).forEach((n) => {
4883
- n.startsWith("on") && (s[ue.pascal2kebab(n.substring(2))] = t[n]);
4853
+ n.startsWith("on") && (s[de.pascal2kebab(n.substring(2))] = t[n]);
4884
4854
  }), {
4885
4855
  /** class/style/未声明的属性 等 */
4886
4856
  binds: r,
@@ -4891,12 +4861,12 @@ function Xi(i, t) {
4891
4861
  };
4892
4862
  }
4893
4863
  function q(i, t) {
4894
- return Xt(() => Xi(i, t));
4864
+ return Xt(() => Yi(i, t));
4895
4865
  }
4896
4866
  function L() {
4897
4867
  return Function;
4898
4868
  }
4899
- const rn = () => {
4869
+ const Qs = () => {
4900
4870
  let i, t;
4901
4871
  function e(s) {
4902
4872
  console.log(s), i = s && s.type, t = Date.now();
@@ -4908,20 +4878,20 @@ const rn = () => {
4908
4878
  }, Gt = "$map", xe = "onCreate", Pe = "onDestroy", k = w({
4909
4879
  inject: [Gt],
4910
4880
  mounted() {
4911
- Be(this, xe);
4881
+ Ie(this, xe);
4912
4882
  },
4913
4883
  beforeUnmount() {
4914
- Be(this, Pe);
4884
+ Ie(this, Pe);
4915
4885
  },
4916
4886
  methods: {
4917
4887
  recreate() {
4918
- Be(this, Pe), Be(this, xe);
4888
+ Ie(this, Pe), Ie(this, xe);
4919
4889
  }
4920
4890
  },
4921
4891
  render() {
4922
4892
  return xr();
4923
4893
  }
4924
- }), Ji = w({
4894
+ }), qi = w({
4925
4895
  name: "tg-map",
4926
4896
  provide() {
4927
4897
  return {
@@ -4940,7 +4910,7 @@ const rn = () => {
4940
4910
  * - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
4941
4911
  * @see AbstractMapEventMap.center-changed
4942
4912
  * */
4943
- center: D(v),
4913
+ center: D(y),
4944
4914
  /**
4945
4915
  * 同步center的延时
4946
4916
  * @default 300
@@ -4951,23 +4921,23 @@ const rn = () => {
4951
4921
  * 仅用来获取center的值, 需要设置center的值请使用`center`属性
4952
4922
  * @see center
4953
4923
  * */
4954
- currentCenter: m(v),
4924
+ currentCenter: m(y),
4955
4925
  /**
4956
4926
  * 仅用于获取tg-map销毁时的最后的center的值
4957
4927
  * @see center
4958
4928
  */
4959
- lastCenter: m(v),
4929
+ lastCenter: m(y),
4960
4930
  zoom: D(Number),
4961
4931
  /**
4962
4932
  * 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
4963
4933
  * @see MapOptions.infoWindowMode
4964
4934
  */
4965
- infoWindowMode: qi(Bi),
4935
+ infoWindowMode: Fi(Si),
4966
4936
  gestureHandling: Z(j),
4967
4937
  minZoom: m(Number),
4968
4938
  maxZoom: m(Number),
4969
4939
  mapStyle: m(Object),
4970
- mapTypeId: Z(or),
4940
+ mapTypeId: Z(cr),
4971
4941
  /** 地图类型对象, 优先级比mapTypeId高 */
4972
4942
  mapType: m(Object),
4973
4943
  hideLogo: m(Boolean),
@@ -4996,7 +4966,7 @@ const rn = () => {
4996
4966
  },
4997
4967
  computed: {
4998
4968
  propsJson() {
4999
- return Q.toJsonSafely(this.$props);
4969
+ return Ce.toJsonSafely(this.$props);
5000
4970
  }
5001
4971
  },
5002
4972
  watch: {
@@ -5028,7 +4998,7 @@ const rn = () => {
5028
4998
  async mounted() {
5029
4999
  const i = this.type;
5030
5000
  try {
5031
- await Vi(i);
5001
+ await ji({ type: i, config: nr()[i] });
5032
5002
  } catch (s) {
5033
5003
  this.$emit("error", s);
5034
5004
  return;
@@ -5061,8 +5031,8 @@ const rn = () => {
5061
5031
  () => this.zoom,
5062
5032
  () => this.center
5063
5033
  //
5064
- ], ([s, n], [a, d]) => {
5065
- s !== a && t.setZoom(s), n !== d && (t.getCenter().equals(n) || t.setCenter(n));
5034
+ ], ([s, n], [a, h]) => {
5035
+ s !== a && t.setZoom(s), n !== h && (t.getCenter().equals(n) || t.setCenter(n));
5066
5036
  }), "update:center" in this.attrs.listenerProps) {
5067
5037
  const s = () => this.$emit("update:center", t.getCenter());
5068
5038
  t.addEventListener("center-changed", () => {
@@ -5091,8 +5061,8 @@ const K = (i, t) => {
5091
5061
  e[r] = s;
5092
5062
  return e;
5093
5063
  };
5094
- function Qi(i, t, e, r, s, n) {
5095
- return F(), U("div", me({ class: "tg-map" }, i.attrs.binds), [
5064
+ function Ki(i, t, e, r, s, n) {
5065
+ return F(), U("div", ge({ class: "tg-map" }, i.attrs.binds), [
5096
5066
  zr("div", {
5097
5067
  ref: "map",
5098
5068
  class: Ve({
@@ -5105,8 +5075,8 @@ function Qi(i, t, e, r, s, n) {
5105
5075
  W(i.$slots, "overlay")
5106
5076
  ], 16);
5107
5077
  }
5108
- const ke = /* @__PURE__ */ K(Ji, [["render", Qi]]);
5109
- function es(i) {
5078
+ const ke = /* @__PURE__ */ K(qi, [["render", Ki]]);
5079
+ function Xi(i) {
5110
5080
  if (i == null)
5111
5081
  return;
5112
5082
  let t;
@@ -5117,7 +5087,7 @@ function es(i) {
5117
5087
  t = i;
5118
5088
  return `${t}px`;
5119
5089
  }
5120
- const ts = w({
5090
+ const Ji = w({
5121
5091
  name: "tg-map-widget",
5122
5092
  props: {
5123
5093
  left: {
@@ -5143,10 +5113,10 @@ const ts = w({
5143
5113
  }
5144
5114
  },
5145
5115
  methods: {
5146
- dimen: es
5116
+ dimen: Xi
5147
5117
  }
5148
5118
  });
5149
- function rs(i, t, e, r, s, n) {
5119
+ function Qi(i, t, e, r, s, n) {
5150
5120
  return F(), U("div", {
5151
5121
  class: Ve(i.$options.name),
5152
5122
  style: Dr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
@@ -5154,7 +5124,7 @@ function rs(i, t, e, r, s, n) {
5154
5124
  W(i.$slots, "default")
5155
5125
  ], 6);
5156
5126
  }
5157
- const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5127
+ const es = /* @__PURE__ */ K(Ji, [["render", Qi]]), ts = w({
5158
5128
  name: "tg-custom-control",
5159
5129
  mixins: [k],
5160
5130
  props: {
@@ -5172,7 +5142,7 @@ const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5172
5142
  },
5173
5143
  onCreate() {
5174
5144
  tr(this.$parent, ke) || console.warn("请将tg-custom-control放到tg-map中");
5175
- const { $el: i } = this, t = class extends Qr {
5145
+ const { $el: i } = this, t = class extends gi {
5176
5146
  onCreateElement() {
5177
5147
  return i;
5178
5148
  }
@@ -5183,19 +5153,19 @@ const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5183
5153
  this.$map.removeCustomControl(this.control);
5184
5154
  }
5185
5155
  });
5186
- function ns(i, t, e, r, s, n) {
5156
+ function rs(i, t, e, r, s, n) {
5187
5157
  return F(), U("div", {
5188
5158
  class: Ve(i.$options.name)
5189
5159
  }, [
5190
5160
  W(i.$slots, "default")
5191
5161
  ], 2);
5192
5162
  }
5193
- const os = /* @__PURE__ */ K(ss, [["render", ns]]), as = w({
5163
+ const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5194
5164
  name: "tg-map-type-control",
5195
5165
  mixins: [k],
5196
5166
  props: {
5197
5167
  position: Z(S, S.TOP_LEFT),
5198
- type: Z(ar),
5168
+ type: Z(dr),
5199
5169
  mapTypes: m(Array)
5200
5170
  },
5201
5171
  setup() {
@@ -5223,7 +5193,7 @@ const os = /* @__PURE__ */ K(ss, [["render", ns]]), as = w({
5223
5193
  onDestroy() {
5224
5194
  this.$map.removeControl(this.control);
5225
5195
  }
5226
- }), ls = w({
5196
+ }), ns = w({
5227
5197
  name: "tg-scale-control",
5228
5198
  mixins: [k],
5229
5199
  props: {
@@ -5252,11 +5222,11 @@ function Pr() {
5252
5222
  let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
5253
5223
  if (!t) {
5254
5224
  const r = i == null ? void 0 : i.__file;
5255
- r && (t = Ri.basename(r, ".vue"));
5225
+ r && (t = $i.basename(r, ".vue"));
5256
5226
  }
5257
5227
  return t;
5258
5228
  }
5259
- function hs() {
5229
+ function os() {
5260
5230
  const i = Gr(Gt);
5261
5231
  let t, e;
5262
5232
  return i == null && C(`<${Pr() || "unknown"}>必须作为<tg-map>的子代组件`), {
@@ -5279,14 +5249,14 @@ function hs() {
5279
5249
  }
5280
5250
  };
5281
5251
  }
5282
- const cs = w({
5252
+ const as = w({
5283
5253
  name: "tg-zoom-control",
5284
5254
  props: {
5285
5255
  position: Z(S, S.RIGHT_BOTTOM)
5286
5256
  },
5287
5257
  setup(i) {
5288
5258
  let t = void 0;
5289
- const { map: e, onCreate: r, onDestroy: s } = hs();
5259
+ const { map: e, onCreate: r, onDestroy: s } = os();
5290
5260
  return r(() => {
5291
5261
  t = e.createZoomControl(i), e.addControl(t);
5292
5262
  }), s(() => {
@@ -5295,7 +5265,7 @@ const cs = w({
5295
5265
  t.setPosition(n);
5296
5266
  }), xr;
5297
5267
  }
5298
- }), ds = w({
5268
+ }), ls = w({
5299
5269
  name: "tg-marker-clusterer",
5300
5270
  mixins: [k],
5301
5271
  // markers从this.$children中读取, 故需要省略(Omit)
@@ -5359,14 +5329,14 @@ const cs = w({
5359
5329
  }
5360
5330
  }
5361
5331
  });
5362
- function us(i, t, e, r, s, n) {
5332
+ function hs(i, t, e, r, s, n) {
5363
5333
  return F(), U("div", {
5364
5334
  class: Ve(i.$options.name)
5365
5335
  }, [
5366
5336
  W(i.$slots, "default")
5367
5337
  ], 2);
5368
5338
  }
5369
- const kr = /* @__PURE__ */ K(ds, [["render", us]]), ps = w({
5339
+ const kr = /* @__PURE__ */ K(ls, [["render", hs]]), cs = w({
5370
5340
  name: "tg-traffic-layer",
5371
5341
  mixins: [k],
5372
5342
  // 请直接使用v-if来控制它的显隐
@@ -5379,17 +5349,17 @@ const kr = /* @__PURE__ */ K(ds, [["render", us]]), ps = w({
5379
5349
  },
5380
5350
  watch: {},
5381
5351
  onCreate() {
5382
- this.layer = new ei(), this.$map.addLayer(this.layer);
5352
+ this.layer = new mi(), this.$map.addLayer(this.layer);
5383
5353
  },
5384
5354
  onDestroy() {
5385
5355
  this.$map.removeLayer(this.layer);
5386
5356
  }
5387
- }), gs = w({
5357
+ }), ds = w({
5388
5358
  name: "tg-circle",
5389
5359
  mixins: [k],
5390
5360
  inheritAttrs: !1,
5391
5361
  props: {
5392
- center: D(v),
5362
+ center: D(y),
5393
5363
  radius: D(Number),
5394
5364
  clickable: m(Boolean),
5395
5365
  editable: m(Boolean),
@@ -5464,7 +5434,7 @@ const kr = /* @__PURE__ */ K(ds, [["render", us]]), ps = w({
5464
5434
  this.$map.removeOverlay(this.overlay);
5465
5435
  }
5466
5436
  });
5467
- class ms extends $i {
5437
+ class us extends zi {
5468
5438
  constructor(t, e, r, s) {
5469
5439
  super(t, e), this.content = r, this.position = s;
5470
5440
  }
@@ -5479,12 +5449,12 @@ class ms extends $i {
5479
5449
  this.position = t, this.draw();
5480
5450
  }
5481
5451
  }
5482
- const fs = w({
5452
+ const ps = w({
5483
5453
  name: "tg-element-overlay",
5484
5454
  mixins: [k],
5485
5455
  props: {
5486
5456
  mapPane: Z(we, we.overlayMouseTarget),
5487
- position: D(v)
5457
+ position: D(y)
5488
5458
  },
5489
5459
  setup() {
5490
5460
  return {
@@ -5505,25 +5475,25 @@ const fs = w({
5505
5475
  }
5506
5476
  },
5507
5477
  onCreate() {
5508
- this.overlay = new ms(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5478
+ this.overlay = new us(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5509
5479
  },
5510
5480
  onDestroy() {
5511
5481
  this.$map.removeElementOverlay(this.overlay);
5512
5482
  }
5513
5483
  });
5514
- function ys(i, t, e, r, s, n) {
5515
- return F(), U("div", me({
5484
+ function gs(i, t, e, r, s, n) {
5485
+ return F(), U("div", ge({
5516
5486
  class: i.$options.name
5517
5487
  }, i.$attrs), [
5518
5488
  W(i.$slots, "default")
5519
5489
  ], 16);
5520
5490
  }
5521
- const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5491
+ const ms = /* @__PURE__ */ K(ps, [["render", gs]]), fs = w({
5522
5492
  name: "tg-marker",
5523
5493
  mixins: [k],
5524
5494
  inheritAttrs: !1,
5525
5495
  props: {
5526
- position: D(v),
5496
+ position: D(y),
5527
5497
  title: m(String),
5528
5498
  icon: m(Object),
5529
5499
  clickable: m(Boolean),
@@ -5533,6 +5503,11 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5533
5503
  zIndex: m(Number),
5534
5504
  visible: m(Boolean),
5535
5505
  normalizePositionForBaidu: m(Boolean),
5506
+ /**
5507
+ * 是否自动添加到TgMarkerClusterer中去
5508
+ * @default true
5509
+ */
5510
+ autoAddToClusterer: m(Boolean, !0),
5536
5511
  "onUpdate:position": L()
5537
5512
  },
5538
5513
  emits: void 0,
@@ -5542,7 +5517,8 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5542
5517
  marker: void 0,
5543
5518
  label: nt(),
5544
5519
  info: nt(),
5545
- emittedPosition: void 0
5520
+ emittedPosition: void 0,
5521
+ autoAddToClustererWhenCreate: i.autoAddToClusterer
5546
5522
  };
5547
5523
  },
5548
5524
  watch: {
@@ -5580,15 +5556,18 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5580
5556
  },
5581
5557
  normalizePositionForBaidu() {
5582
5558
  this.recreate();
5559
+ },
5560
+ autoAddToClusterer() {
5561
+ this.recreate();
5583
5562
  }
5584
5563
  },
5585
5564
  onCreate() {
5586
- this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), Y(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5565
+ this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), Y(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5587
5566
  this.$emit("update:position", this.emittedPosition = i.position);
5588
5567
  });
5589
5568
  },
5590
5569
  onDestroy() {
5591
- this.$clusterer() ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
5570
+ this.$clusterer() && this.autoAddToClustererWhenCreate ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
5592
5571
  },
5593
5572
  methods: {
5594
5573
  $clusterer() {
@@ -5611,20 +5590,20 @@ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5611
5590
  }
5612
5591
  }
5613
5592
  });
5614
- function bs(i, t, e, r, s, n) {
5615
- return F(), U("div", me({
5593
+ function ys(i, t, e, r, s, n) {
5594
+ return F(), U("div", ge({
5616
5595
  class: i.$options.name
5617
5596
  }, i.attrs.binds), [
5618
5597
  W(i.$slots, "default")
5619
5598
  ], 16);
5620
5599
  }
5621
- const Ke = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5600
+ const Ke = /* @__PURE__ */ K(fs, [["render", ys]]), vs = w({
5622
5601
  name: "tg-info-box",
5623
5602
  mixins: [k],
5624
5603
  inheritAttrs: !1,
5625
5604
  props: {
5626
5605
  show: D(Boolean),
5627
- position: m(v),
5606
+ position: m(y),
5628
5607
  offset: m(Object),
5629
5608
  maxWidth: m(Number),
5630
5609
  borderClass: m(String),
@@ -5691,20 +5670,20 @@ const Ke = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5691
5670
  }
5692
5671
  }
5693
5672
  });
5694
- function Ts(i, t, e, r, s, n) {
5695
- return F(), U("div", me({
5673
+ function _s(i, t, e, r, s, n) {
5674
+ return F(), U("div", ge({
5696
5675
  class: i.$options.name
5697
5676
  }, i.attrs.binds), [
5698
5677
  W(i.$slots, "default")
5699
5678
  ], 16);
5700
5679
  }
5701
- const Os = /* @__PURE__ */ K(Ms, [["render", Ts]]), Cs = w({
5680
+ const bs = /* @__PURE__ */ K(vs, [["render", _s]]), Ts = w({
5702
5681
  name: "tg-info-window",
5703
5682
  mixins: [k],
5704
5683
  inheritAttrs: !1,
5705
5684
  props: {
5706
5685
  show: D(Boolean),
5707
- position: m(v),
5686
+ position: m(y),
5708
5687
  maxWidth: m(Number),
5709
5688
  offset: m(Object),
5710
5689
  disableAutoPan: m(Boolean),
@@ -5762,21 +5741,21 @@ const Os = /* @__PURE__ */ K(Ms, [["render", Ts]]), Cs = w({
5762
5741
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
5763
5742
  }
5764
5743
  });
5765
- function ws(i, t, e, r, s, n) {
5766
- return Hr((F(), U("div", me({
5744
+ function Ms(i, t, e, r, s, n) {
5745
+ return jr((F(), U("div", ge({
5767
5746
  class: i.$options.name
5768
5747
  }, i.attrs.binds), [
5769
5748
  W(i.$slots, "default")
5770
5749
  ], 16)), [
5771
- [jr, i.show]
5750
+ [Hr, i.show]
5772
5751
  ]);
5773
5752
  }
5774
- const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5753
+ const Os = /* @__PURE__ */ K(Ts, [["render", Ms]]), Cs = w({
5775
5754
  name: "tg-label",
5776
5755
  mixins: [k],
5777
5756
  inheritAttrs: !1,
5778
5757
  props: {
5779
- position: m(v),
5758
+ position: m(y),
5780
5759
  offset: m(Object),
5781
5760
  zIndex: m(Number),
5782
5761
  mapPane: Z(we)
@@ -5833,14 +5812,14 @@ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5833
5812
  this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
5834
5813
  }
5835
5814
  });
5836
- function xs(i, t, e, r, s, n) {
5837
- return F(), U("div", me({
5815
+ function ws(i, t, e, r, s, n) {
5816
+ return F(), U("div", ge({
5838
5817
  class: i.$options.name
5839
5818
  }, i.attrs.binds), [
5840
5819
  W(i.$slots, "default")
5841
5820
  ], 16);
5842
5821
  }
5843
- const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
5822
+ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5844
5823
  name: "tg-polygon",
5845
5824
  mixins: [k],
5846
5825
  inheritAttrs: !1,
@@ -5909,7 +5888,7 @@ const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
5909
5888
  onDestroy() {
5910
5889
  this.$map.removeOverlay(this.overlay);
5911
5890
  }
5912
- }), Is = w({
5891
+ }), xs = w({
5913
5892
  name: "tg-polyline",
5914
5893
  mixins: [k],
5915
5894
  inheritAttrs: !1,
@@ -5977,7 +5956,7 @@ const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
5977
5956
  onDestroy() {
5978
5957
  this.overlay.remove();
5979
5958
  }
5980
- }), Bs = w({
5959
+ }), Ps = w({
5981
5960
  name: "tg-rectangle",
5982
5961
  mixins: [k],
5983
5962
  inheritAttrs: !1,
@@ -6043,14 +6022,14 @@ const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
6043
6022
  onDestroy() {
6044
6023
  this.$map.removeOverlay(this.overlay);
6045
6024
  }
6046
- }), Ss = ["beforeUpdate", "updated"], sn = {
6025
+ }), ks = ["beforeUpdate", "updated"], en = {
6047
6026
  install(i, t = {}) {
6048
6027
  if (t.enable !== !1) {
6049
6028
  const e = w({
6050
6029
  beforeCreate() {
6051
6030
  const r = Pr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
6052
- t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ss.includes(a) || console.debug("[lifecycle]", r, a);
6053
- } : Oe;
6031
+ t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : ks.includes(a) || console.debug("[lifecycle]", r, a);
6032
+ } : Me;
6054
6033
  n("beforeCreate"), this.__life_impl = n;
6055
6034
  },
6056
6035
  created() {
@@ -6089,44 +6068,44 @@ const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
6089
6068
  i.mixin(e);
6090
6069
  }
6091
6070
  }
6092
- }, As = 6378137;
6093
- function Me(i) {
6071
+ }, Bs = 6378137;
6072
+ function be(i) {
6094
6073
  return i * Math.PI / 180;
6095
6074
  }
6096
6075
  function Kt(i) {
6097
6076
  return i * 180 / Math.PI;
6098
6077
  }
6099
- function Rs(i, t) {
6078
+ function Is(i, t) {
6100
6079
  if (i.lat === t.lat && i.lng === t.lng)
6101
6080
  return 0;
6102
- const e = Me((i.lat + t.lat) / 2), r = Me((i.lat - t.lat) / 2), s = Me((i.lng - t.lng) / 2);
6103
- let n = Math.sin(r), a = Math.sin(s), d = Math.sin(e);
6104
- const o = As, l = 1 / 298.257;
6105
- n = n * n, a = a * a, d = d * d;
6106
- const h = n * (1 - a) + (1 - d) * a, u = (1 - n) * (1 - a) + d * a, p = Math.atan(Math.sqrt(h / u)), f = Math.sqrt(h * u) / p, _ = 2 * p * o, M = (3 * f - 1) / 2 / u, g = (3 * f + 1) / 2 / h;
6107
- return _ * (1 + l * (M * d * (1 - n) - g * (1 - d) * n));
6108
- }
6109
- function $s(i, t, e) {
6110
- const s = 63567523142e-4, n = 1 / 298.257223563, a = Me(t), d = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(Me(i.lat)), h = 1 / Math.sqrt(1 + l * l), u = l * h, p = Math.atan2(l, o), f = h * d, _ = 1 - f * f, M = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), y = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M)));
6111
- let b = 0, O = 0, P = 0, E = e / (s * g), ee = 2 * Math.PI;
6112
- for (; Math.abs(E - ee) > 1e-12; ) {
6113
- b = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
6114
- const Sr = y * O * (b + y / 4 * (P * (-1 + 2 * b * b) - y / 6 * b * (-3 + 4 * O * O) * (-3 + 4 * b * b)));
6115
- ee = E, E = e / (s * g) + Sr;
6116
- }
6117
- const se = u * O - h * P * o, Xe = Math.atan2(
6118
- u * P + h * O * o,
6119
- (1 - n) * Math.sqrt(f * f + se * se)
6120
- ), Ir = Math.atan2(O * d, h * P - u * O * o), Je = n / 16 * _ * (4 + n * (4 - 3 * _)), Br = Ir - (1 - Je) * n * f * (E + Je * O * (b + Je * P * (-1 + 2 * b * b)));
6121
- return { lng: i.lng + Kt(Br), lat: Kt(Xe) };
6122
- }
6123
- const nn = {
6124
- getDistance: Rs,
6125
- getDestination: $s
6126
- }, on = {
6081
+ const e = be((i.lat + t.lat) / 2), r = be((i.lat - t.lat) / 2), s = be((i.lng - t.lng) / 2);
6082
+ let n = Math.sin(r), a = Math.sin(s), h = Math.sin(e);
6083
+ const o = Bs, l = 1 / 298.257;
6084
+ n = n * n, a = a * a, h = h * h;
6085
+ 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;
6086
+ return _ * (1 + l * (T * h * (1 - n) - g * (1 - h) * n));
6087
+ }
6088
+ function Ss(i, t, e) {
6089
+ const s = 63567523142e-4, n = 1 / 298.257223563, a = be(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(be(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)));
6090
+ let v = 0, O = 0, P = 0, E = e / (s * g), Q = 2 * Math.PI;
6091
+ for (; Math.abs(E - Q) > 1e-12; ) {
6092
+ v = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
6093
+ const Sr = f * O * (v + f / 4 * (P * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
6094
+ Q = E, E = e / (s * g) + Sr;
6095
+ }
6096
+ const ie = u * O - d * P * o, Xe = Math.atan2(
6097
+ u * P + d * O * o,
6098
+ (1 - n) * Math.sqrt(b * b + ie * ie)
6099
+ ), Br = Math.atan2(O * h, d * P - u * O * o), Je = n / 16 * _ * (4 + n * (4 - 3 * _)), Ir = Br - (1 - Je) * n * b * (E + Je * O * (v + Je * P * (-1 + 2 * v * v)));
6100
+ return { lng: i.lng + Kt(Ir), lat: Kt(Xe) };
6101
+ }
6102
+ const tn = {
6103
+ getDistance: Is,
6104
+ getDestination: Ss
6105
+ }, rn = {
6127
6106
  install(i, t) {
6128
- if (Wi(t), {}.VITE_FALSE) {
6129
- const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": ke, "./TgMapWidget.vue": is, "./controls/TgCustomControl.vue": os, "./controls/TgMapTypeControl.vue": as, "./controls/TgScaleControl.vue": ls, "./controls/TgZoomControl.vue": cs, "./extra/TgMarkerClusterer.vue": kr, "./layers/TgTrafficLayer.vue": ps, "./overlays/TgCircle.vue": gs, "./overlays/TgElementOverlay.vue": vs, "./overlays/TgInfoBox.vue": Os, "./overlays/TgInfoWindow.vue": Es, "./overlays/TgLabel.vue": Ps, "./overlays/TgMarker.vue": Ke, "./overlays/TgPolygon.vue": ks, "./overlays/TgPolyline.vue": Is, "./overlays/TgRectangle.vue": Bs });
6107
+ if (ci(t), {}.VITE_FALSE) {
6108
+ const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": ke, "./TgMapWidget.vue": es, "./controls/TgCustomControl.vue": is, "./controls/TgMapTypeControl.vue": ss, "./controls/TgScaleControl.vue": ns, "./controls/TgZoomControl.vue": as, "./extra/TgMarkerClusterer.vue": kr, "./layers/TgTrafficLayer.vue": cs, "./overlays/TgCircle.vue": ds, "./overlays/TgElementOverlay.vue": ms, "./overlays/TgInfoBox.vue": bs, "./overlays/TgInfoWindow.vue": Os, "./overlays/TgLabel.vue": Es, "./overlays/TgMarker.vue": Ke, "./overlays/TgPolygon.vue": Ls, "./overlays/TgPolyline.vue": xs, "./overlays/TgRectangle.vue": Ps });
6130
6109
  Object.keys(r).forEach((s) => {
6131
6110
  const n = r[s];
6132
6111
  i.component(n.name ?? C(`Tg开头的组件必须设置name: ${s}`), n);
@@ -6137,11 +6116,11 @@ const nn = {
6137
6116
  }
6138
6117
  };
6139
6118
  export {
6140
- nr as AbstractControl,
6141
- Mt as AbstractMap,
6119
+ hr as AbstractControl,
6120
+ Tt as AbstractMap,
6142
6121
  he as Arrays,
6143
- dr as Autocomplete,
6144
- ni as BaiduAutocomplete,
6122
+ mr as Autocomplete,
6123
+ bi as BaiduAutocomplete,
6145
6124
  Ot as BaiduCircle,
6146
6125
  pt as BaiduControl,
6147
6126
  xt as BaiduInfoBoxOverlay,
@@ -6149,52 +6128,52 @@ export {
6149
6128
  mt as BaiduMapTypeControl,
6150
6129
  Re as BaiduMapUrls,
6151
6130
  Le as BaiduMarker,
6152
- ci as BaiduMarkerClusterer,
6131
+ wi as BaiduMarkerClusterer,
6153
6132
  Ye as BaiduOverlay,
6154
- pi as BaiduPlacesService,
6133
+ xi as BaiduPlacesService,
6155
6134
  St as BaiduPolyShape,
6156
6135
  $t as BaiduPolygon,
6157
6136
  At as BaiduPolyline,
6158
6137
  Dt as BaiduRectangle,
6159
6138
  ft as BaiduScaleControl,
6160
- mi as BaiduSearchBox,
6139
+ ki as BaiduSearchBox,
6161
6140
  vt as BaiduZoomControl,
6162
6141
  A as BuildInMapType,
6163
- or as BuildInMapTypeId,
6164
- _e as CachedValue,
6142
+ cr as BuildInMapTypeId,
6143
+ ve as CachedValue,
6165
6144
  S as ControlPosition,
6166
6145
  z as ControlPositionConverter,
6167
6146
  x as CoordType,
6168
- Qr as CustomControl,
6169
- $i as ElementOverlay,
6170
- Jr as FastFindValues,
6147
+ gi as CustomControl,
6148
+ zi as ElementOverlay,
6149
+ pi as FastFindValues,
6171
6150
  j as GestureHandlingOptions,
6172
- si as GoogleAutocomplete,
6151
+ _i as GoogleAutocomplete,
6173
6152
  Ct as GoogleCircle,
6174
6153
  gt as GoogleControl,
6175
6154
  Pt as GoogleInfoBoxOverlay,
6176
6155
  Lt as GoogleInfoWindow,
6177
6156
  Se as GoogleMapTypeControl,
6178
6157
  Ae as GoogleMapUrls,
6179
- Bt as GoogleMarker,
6180
- di as GoogleMarkerClusterer,
6181
- Tt as GoogleOverlay,
6182
- ui as GooglePlacesService,
6158
+ It as GoogleMarker,
6159
+ Ei as GoogleMarkerClusterer,
6160
+ Mt as GoogleOverlay,
6161
+ Li as GooglePlacesService,
6183
6162
  zt as GooglePolygon,
6184
6163
  Rt as GooglePolyline,
6185
6164
  Nt as GoogleRectangle,
6186
6165
  yt as GoogleScaleControl,
6187
- gi as GoogleSearchBox,
6166
+ Pi as GoogleSearchBox,
6188
6167
  _t as GoogleZoomControl,
6189
- Ne as Icon,
6190
- Ge as IconSequence,
6191
- Us as ImageMapType,
6168
+ Ge as Icon,
6169
+ Ze as IconSequence,
6170
+ Hs as ImageMapType,
6192
6171
  wt as InfoWindow,
6193
- Bi as InfoWindowModeValues,
6172
+ Si as InfoWindowModeValues,
6194
6173
  Ht as KeyValue,
6195
- v as LatLng,
6174
+ y as LatLng,
6196
6175
  R as LatLngBounds,
6197
- sn as LifecycleLogPlugin,
6176
+ en as LifecycleLogPlugin,
6198
6177
  V as Location,
6199
6178
  xe as MIXIN_HOOK_CREATE,
6200
6179
  Pe as MIXIN_HOOK_DESTROY,
@@ -6205,78 +6184,77 @@ export {
6205
6184
  we as MapPane,
6206
6185
  Ee as MapPanes,
6207
6186
  $ as MapType,
6208
- ar as MapTypeControlType,
6209
- ur as MapUrls,
6210
- fi as MapZoom,
6211
- vr as MarkerClusterer,
6212
- Q as Objects,
6213
- Cr as Overlay,
6214
- _r as PlacesService,
6187
+ dr as MapTypeControlType,
6188
+ fr as MapUrls,
6189
+ Bi as MapZoom,
6190
+ Mr as MarkerClusterer,
6191
+ Ce as Objects,
6192
+ Er as Overlay,
6193
+ Or as PlacesService,
6215
6194
  X as Point,
6216
- br as SearchBox,
6217
- nn as SphericalUtils,
6218
- ue as Strings,
6219
- ge as SymbolIcon,
6220
- Xs as SymbolPath,
6221
- gs as TgCircle,
6222
- os as TgCustomControl,
6223
- vs as TgElementOverlay,
6224
- Os as TgInfoBox,
6225
- Es as TgInfoWindow,
6226
- Ps as TgLabel,
6195
+ Cr as SearchBox,
6196
+ tn as SphericalUtils,
6197
+ de as Strings,
6198
+ pe as SymbolIcon,
6199
+ Ys as SymbolPath,
6200
+ ds as TgCircle,
6201
+ is as TgCustomControl,
6202
+ ms as TgElementOverlay,
6203
+ bs as TgInfoBox,
6204
+ Os as TgInfoWindow,
6205
+ Es as TgLabel,
6227
6206
  ke as TgMap,
6228
6207
  ht as TgMapFactory,
6229
6208
  G as TgMapType,
6230
- as as TgMapTypeControl,
6231
- is as TgMapWidget,
6209
+ ss as TgMapTypeControl,
6210
+ es as TgMapWidget,
6232
6211
  Ke as TgMarker,
6233
6212
  kr as TgMarkerClusterer,
6234
- ks as TgPolygon,
6235
- Is as TgPolyline,
6236
- Bs as TgRectangle,
6237
- ls as TgScaleControl,
6238
- ps as TgTrafficLayer,
6239
- cs as TgZoomControl,
6240
- ei as TrafficLayer,
6241
- De as UnionIcon,
6242
- ae as assert,
6213
+ Ls as TgPolygon,
6214
+ xs as TgPolyline,
6215
+ Ps as TgRectangle,
6216
+ ns as TgScaleControl,
6217
+ cs as TgTrafficLayer,
6218
+ as as TgZoomControl,
6219
+ mi as TrafficLayer,
6220
+ Ne as UnionIcon,
6221
+ oe as assert,
6243
6222
  st as assertNever,
6244
- Be as callHook,
6245
- Js as computedSaveOnThis,
6246
- qr as createAsyncSingleton,
6223
+ Ie as callHook,
6224
+ qs as computedSaveOnThis,
6247
6225
  xr as createEmptyVNode,
6248
- Ki as createPropertyObject,
6249
- Qs as createPropertyObjectTyped,
6250
- Vs as debug,
6251
- on as default,
6226
+ Ui as createPropertyObject,
6227
+ Ks as createPropertyObjectTyped,
6228
+ Ws as debug,
6229
+ rn as default,
6252
6230
  L as eventProp,
6253
- tn as extractVNodeFromSlotsByComponent,
6231
+ Js as extractVNodeFromSlotsByComponent,
6254
6232
  dt as findAncestorComponentByType,
6255
- en as findByComponentType,
6256
- $s as getDestination,
6257
- Lr as getTgMapConfig,
6233
+ Xs as findByComponentType,
6234
+ Ss as getDestination,
6235
+ nr as getTgMapConfig,
6258
6236
  ot as isComponentByType,
6259
- Fs as isDef,
6237
+ js as isDef,
6260
6238
  Yr as isEntryValueDef,
6261
- Zs as isInstanceOf,
6262
- Gs as lateinit,
6263
- Oe as noop,
6239
+ Ds as isInstanceOf,
6240
+ zs as lateinit,
6241
+ Me as noop,
6264
6242
  m as optionalProp,
6265
- Ri as path,
6243
+ $i as path,
6266
6244
  D as requiredProp,
6267
- Ws as safeAs,
6245
+ Ns as safeAs,
6268
6246
  tr as safeAsComponent,
6269
- Wi as setTgMapConfig,
6270
- Xi as splitAttrs,
6247
+ ci as setTgMapConfig,
6248
+ Yi as splitAttrs,
6271
6249
  Z as stringEnumProp,
6272
- qi as stringUnionPropFromValues,
6250
+ Fi as stringUnionPropFromValues,
6273
6251
  C as throwError,
6274
6252
  ut as throwUnsupported,
6275
- js as todo,
6253
+ Zs as todo,
6276
6254
  nt as typed,
6277
- Hs as unwrapStringEnumValue,
6278
- rn as useEventLogMethods,
6255
+ Gs as unwrapStringEnumValue,
6256
+ Qs as useEventLogMethods,
6279
6257
  q as useSplittedAttrs,
6280
- hs as useTgMapInner
6258
+ os as useTgMapInner
6281
6259
  };
6282
6260
  //# sourceMappingURL=tg-map.js.map