gis-common 3.1.10 → 3.1.11

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.
@@ -1,7 +1,7 @@
1
- var G = Object.defineProperty;
2
- var z = (t, e, n) => e in t ? G(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var v = (t, e, n) => z(t, typeof e != "symbol" ? e + "" : e, n);
4
- const b = {
1
+ var z = Object.defineProperty;
2
+ var H = (e, t, n) => t in e ? z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var f = (e, t, n) => H(e, typeof t != "symbol" ? t + "" : t, n);
4
+ const x = {
5
5
  MAP_RENDER: "mapRender",
6
6
  MAP_READY: "mapReady",
7
7
  MOUSE_CLICK: "click",
@@ -23,7 +23,7 @@ const b = {
23
23
  WEB_SOCKET_ERROR: "webSocketError",
24
24
  WEB_SOCKET_MESSAGE: "webSocketMessage",
25
25
  WEB_SOCKET_CLOSE: "webSocketClose"
26
- }, m = {
26
+ }, p = {
27
27
  LOGIN_EXPIRED: "登录信息过期,请重新登录",
28
28
  CROSS_ERROR: "跨域访问",
29
29
  UNEXIST_RESOURCE: "资源不存在",
@@ -44,7 +44,7 @@ const b = {
44
44
  PARAMETER_ERROR_OBJECT: "格式类型验证失败:必须是对象",
45
45
  PARAMETER_ERROR_LACK: "参数缺失",
46
46
  STRING_CHECK_LOSS: "字符缺少关键字"
47
- }, H = {
47
+ }, Q = {
48
48
  SUPER_MAP_IMAGES: "SuperMapImages",
49
49
  // 超图影像服务 栅格数据
50
50
  SUPER_MAP_DATA: "SuperMapData",
@@ -58,7 +58,7 @@ const b = {
58
58
  // addS3MGroupLayer(url, options, index) 添加S3M分组图层。
59
59
  TERRAIN_LAYER: "TerrainFileLayer"
60
60
  // 地形图层, 需要单独处理
61
- }, K = {
61
+ }, X = {
62
62
  POINT: "point",
63
63
  POLYLINE: "polyline",
64
64
  POLYGON: "polygon",
@@ -68,7 +68,15 @@ const b = {
68
68
  LABEL: "label",
69
69
  MODEL: "model",
70
70
  WALL: "wall"
71
- }, J = {
71
+ }, V = {
72
+ DISTANCE: "distance",
73
+ AREA: "area",
74
+ HEIGHT: "height"
75
+ }, Z = {
76
+ ADD: "add",
77
+ REMOVE: "remove",
78
+ INIT: "init"
79
+ }, tt = {
72
80
  /**
73
81
  * 多属性的动画函数
74
82
  * @param {*} ele 需要运动的节点
@@ -76,215 +84,258 @@ const b = {
76
84
  * @param {*} timefn 运动的形式,默认是缓冲运动
77
85
  * @param {*} speed 运动的速度
78
86
  */
79
- animate(t, e, n, r = "swing", a = 5) {
80
- for (var s in e)
81
- e[s] = {
82
- target: s === "opacity" ? parseInt(e[s] * 100) : e[s],
87
+ animate(e, t, n, s = "swing", a = 5) {
88
+ for (var r in t)
89
+ t[r] = {
90
+ target: r === "opacity" ? parseInt(t[r] * 100) : t[r],
83
91
  // 需要计算得到
84
- iNow: parseInt(s === "opacity" ? getComputedStyle(t)[s] * 100 : getComputedStyle(t)[s])
92
+ iNow: parseInt(r === "opacity" ? getComputedStyle(e)[r] * 100 : getComputedStyle(e)[r])
85
93
  };
86
- r === "liner" && (a = e[s].iNow < e[s].target ? Math.abs(a) : -Math.abs(a)), clearInterval(t.timer), t.timer = setInterval(function() {
87
- for (var i in e) {
88
- var o = e[i].target, c = e[i].iNow;
89
- if (r === "swing" && (a = (o - c) / 20, a = a > 0 ? Math.ceil(a) : Math.floor(a)), Math.abs(o - c) <= Math.abs(a)) {
90
- i === "opacity" ? t.style[i] = o / 100 : t.style[i] = o + "px", delete e[i];
91
- for (var l in e)
94
+ s === "liner" && (a = t[r].iNow < t[r].target ? Math.abs(a) : -Math.abs(a)), clearInterval(e.timer), e.timer = setInterval(function() {
95
+ for (var i in t) {
96
+ var o = t[i].target, c = t[i].iNow;
97
+ if (s === "swing" && (a = (o - c) / 20, a = a > 0 ? Math.ceil(a) : Math.floor(a)), Math.abs(o - c) <= Math.abs(a)) {
98
+ i === "opacity" ? e.style[i] = o / 100 : e.style[i] = o + "px", delete t[i];
99
+ for (var l in t)
92
100
  return !1;
93
- clearInterval(t.timer), typeof n == "function" && n();
101
+ clearInterval(e.timer), typeof n == "function" && n();
94
102
  } else
95
- e[i].iNow += a, i === "opacity" ? t.style[i] = e[i].iNow / 100 : t.style[i] = e[i].iNow + "px";
103
+ t[i].iNow += a, i === "opacity" ? e.style[i] = t[i].iNow / 100 : e.style[i] = t[i].iNow + "px";
96
104
  }
97
105
  }, 30);
98
106
  }
99
107
  }, E = {
100
108
  /**
101
- * 判断数据类型
109
+ * 获取数据类型
102
110
  *
103
- * @param {*} data
104
- * @returns {*}
111
+ * @param data 待判断的数据
112
+ * @returns 返回数据类型字符串
105
113
  */
106
- getDataType(t) {
107
- return Object.prototype.toString.call(t).slice(8, -1);
114
+ getDataType(e) {
115
+ return Object.prototype.toString.call(e).slice(8, -1);
108
116
  },
109
- isEmpty(t) {
110
- if (t == null)
117
+ isEmpty(e) {
118
+ if (e == null)
111
119
  return !0;
112
- switch (this.getDataType(t)) {
120
+ switch (this.getDataType(e)) {
113
121
  case "String":
114
- return t.trim() === "";
122
+ return e.trim() === "";
115
123
  case "Array":
116
- return !t.length;
124
+ return !e.length;
117
125
  case "Object":
118
- return !Object.keys(t).length;
126
+ return !Object.keys(e).length;
119
127
  case "Boolean":
120
- return !t;
128
+ return !e;
121
129
  default:
122
130
  return !1;
123
131
  }
124
132
  },
125
- isNotEmpty(t) {
126
- return !this.isEmpty(t);
133
+ isNotEmpty(e) {
134
+ return !this.isEmpty(e);
127
135
  },
128
- json2form(t) {
129
- const e = new FormData();
130
- return Object.keys(t).forEach((n) => {
131
- e.append(n, t[n] instanceof Object ? JSON.stringify(t[n]) : t[n]);
132
- }), e;
136
+ json2form(e) {
137
+ const t = new FormData();
138
+ return Object.keys(e).forEach((n) => {
139
+ t.append(n, e[n] instanceof Object ? JSON.stringify(e[n]) : e[n]);
140
+ }), t;
133
141
  },
134
142
  /**
135
- * json转换成get参数形式
143
+ * json对象转换为查询字符串
136
144
  *
137
- * @param {*} json
138
- * @returns {*}
145
+ * @param json 待转换的json对象
146
+ * @returns 转换后的查询字符串
139
147
  */
140
- json2Query(t) {
141
- var e = [];
142
- for (var n in t) {
143
- var r = n, a = t[n];
144
- e.push(r + "=" + a);
148
+ json2Query(e) {
149
+ var t = [];
150
+ for (var n in e) {
151
+ var s = n, a = e[n];
152
+ t.push(s + "=" + a);
145
153
  }
146
- var s = e.join("&");
147
- return s;
154
+ var r = t.join("&");
155
+ return r;
148
156
  },
157
+ /**
158
+ * 生成GUID
159
+ *
160
+ * @returns 返回一个由8个16进制数组成的GUID字符串
161
+ */
149
162
  generateGuid() {
150
- const t = function() {
163
+ const e = function() {
151
164
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
152
165
  };
153
- return t() + t() + t() + t() + t() + t() + t() + t();
166
+ return e() + e() + e() + e() + e() + e() + e() + e();
154
167
  },
155
- decodeDict(...t) {
156
- let e = "";
157
- if (t.length > 1) {
158
- const n = t.slice(1, t.length % 2 === 0 ? t.length - 1 : t.length);
159
- for (let r = 0; r < n.length; r = r + 2) {
160
- const a = n[r];
161
- t[0] === a && (e = n[r + 1]);
168
+ /**
169
+ * 将参数进行解码并返回解码后的字符串
170
+ *
171
+ * @param args 参数
172
+ * @returns 解码后的字符串
173
+ */
174
+ decodeDict(...e) {
175
+ let t = "";
176
+ if (e.length > 1) {
177
+ const n = e.slice(1, e.length % 2 === 0 ? e.length - 1 : e.length);
178
+ for (let s = 0; s < n.length; s = s + 2) {
179
+ const a = n[s];
180
+ e[0] === a && (t = n[s + 1]);
162
181
  }
163
- !e && t.length % 2 === 0 && (e = t[t.length - 1]);
182
+ !t && e.length % 2 === 0 && (t = e[e.length - 1]);
164
183
  } else
165
- e = t[0];
166
- return e;
184
+ t = e[0];
185
+ return t;
167
186
  },
168
187
  /**
188
+ * 将一个或多个对象的所有可枚举属性复制到目标对象。
169
189
  *
170
- * @param {*} dest
171
- * @param {...any} args
172
- * @returns 等同于L.extend
190
+ * @param dest 目标对象,用于接收复制的属性。
191
+ * @param args 一个或多个源对象,用于提供要复制的属性。
192
+ * @returns 返回目标对象,包含所有复制的属性。
173
193
  */
174
- extend(t, ...e) {
175
- let n, r, a, s;
176
- for (r = 0, a = e.length; r < a; r++) {
177
- s = e[r];
178
- for (n in s)
179
- t[n] = s[n];
194
+ extend(e, ...t) {
195
+ let n, s, a, r;
196
+ for (s = 0, a = t.length; s < a; s++) {
197
+ r = t[s];
198
+ for (n in r)
199
+ e[n] = r[n];
180
200
  }
181
- return t;
182
- },
183
- rgb2hex(t) {
184
- var e = "#" + (16777216 + (t[0] << 16) + (t[1] << 8) + t[2]).toString(16).slice(1);
185
201
  return e;
186
202
  },
187
203
  /**
188
- * 将平级对象列表转换为树形结构对象列表
204
+ * 将RGB颜色值转换为十六进制颜色值
189
205
  *
190
- * @param {Array} data
191
- * @param {string} [idPropertyName="id"]
192
- * @param {string} [parentIdPropertyName="parentId"]
193
- * @param {string} [childrenPropertyName="children"]
194
- * @returns {*}
206
+ * @param rgb RGB颜色值数组,包含三个0-255之间的整数
207
+ * @returns 转换后的十六进制颜色值,以#开头
208
+ */
209
+ rgb2hex(e) {
210
+ var t = "#" + (16777216 + (e[0] << 16) + (e[1] << 8) + e[2]).toString(16).slice(1);
211
+ return t;
212
+ },
213
+ /**
214
+ * 将扁平化数组转换为树形结构数组
215
+ *
216
+ * @param data 扁平化数组
217
+ * @param idPropertyName 数据中标识id的字段名,默认为'id'
218
+ * @param parentIdPropertyName 数据中标识父节点id的字段名,默认为'parentId'
219
+ * @param childrenPropertyName 树形结构中标识子节点的字段名,默认为'children'
220
+ * @returns 转换后的树形结构数组
195
221
  */
196
- convertToTree2(t, e = "id", n = "parentId", r = "children") {
222
+ convertToTree2(e, t = "id", n = "parentId", s = "children") {
197
223
  const a = [];
198
- function s(i) {
199
- const o = i[e], c = t.filter((l) => l.hasOwnProperty(n) && l[n] === o);
200
- c.length > 0 && (c.forEach(s), i[r] = c);
224
+ function r(i) {
225
+ const o = e.filter((c) => c[n] === i[t]).map((c) => (a.some((l) => l[t] === c[t]) || r(c), c));
226
+ o.length > 0 && (i[s] = o);
201
227
  }
202
- for (const i of t)
203
- t.findIndex((o) => o[e] === i[n]) === -1 && (s(i), a.push(i));
204
- return a;
228
+ return e.forEach((i) => {
229
+ e.some((o) => o[n] === i[t]) || (r(i), a.push(i));
230
+ }), a;
205
231
  },
206
232
  /**
207
233
  * 异步加载script
208
234
  *
209
235
  * @param {*} url
210
236
  */
211
- asyncLoadScript(t) {
212
- return new Promise((e, n) => {
237
+ asyncLoadScript(e) {
238
+ return new Promise((t, n) => {
213
239
  try {
214
- var r = document.createElement("script");
215
- r.readyState ? r.onreadystatechange = function() {
216
- (r.readyState === "complete" || r.readyState === "loaded") && e(r);
217
- } : r.onload = function() {
218
- e(r);
219
- }, r.type = "text/javascript", r.src = t, document.body.appendChild(r);
220
- } catch (a) {
221
- n(a);
240
+ const s = document.createElement("script");
241
+ s.type = "text/javascript", s.src = e, "readyState" in s ? s.onreadystatechange = function() {
242
+ (s.readyState === "complete" || s.readyState === "loaded") && t(s);
243
+ } : (s.onload = function() {
244
+ t(s);
245
+ }, s.onerror = function() {
246
+ n(new Error("Script failed to load for URL: " + e));
247
+ }), document.body.appendChild(s);
248
+ } catch (s) {
249
+ n(s);
222
250
  }
223
251
  });
224
252
  },
225
- loadStyle(t) {
226
- t.forEach((e) => {
253
+ /**
254
+ * 加载样式文件
255
+ *
256
+ * @param urls 样式文件URL数组
257
+ * @returns 无返回值
258
+ */
259
+ loadStyle(e) {
260
+ e.forEach((t) => {
227
261
  const n = document.createElement("link");
228
- n.href = e, n.rel = "stylesheet", n.type = "text/css", document.head.appendChild(n);
262
+ n.href = t, n.rel = "stylesheet", n.type = "text/css", n.onerror = function() {
263
+ console.error(`Style loading failed for URL: ${t}`);
264
+ }, document.head.appendChild(n);
229
265
  });
230
266
  },
231
267
  /**
232
- * 提取json中的value组成一个新的字符串
233
- * eg: template('aaa{key}', json)
268
+ * 将模板字符串中的占位符替换为给定对象中的值
234
269
  *
235
- * @param {*} str
236
- * @param {*} data
237
- * @returns {*}
270
+ * @param str 模板字符串
271
+ * @param data 包含替换值的对象
272
+ * @returns 替换后的字符串
273
+ * @throws 当对象中没有找到与占位符对应的值时,抛出错误
238
274
  */
239
- template(t, e) {
275
+ template(e, t) {
240
276
  const n = /\{ *([\w_-]+) *\}/g;
241
- return t.replace(n, function(r, a) {
242
- var s = e[a];
243
- if (s === void 0)
244
- throw new Error(m.JSON_VALUE_ERROR + r);
245
- return typeof s == "function" && (s = s(e)), s;
277
+ return e.replace(n, (s, a) => {
278
+ const r = t[a];
279
+ if (r === void 0)
280
+ throw new Error(`${p.JSON_VALUE_ERROR}: ${s}`);
281
+ return typeof r == "function" ? r(t) : r;
246
282
  });
247
283
  },
248
- deleteEmptyProperty(t) {
284
+ /**
285
+ * 删除对象中所有值为空的属性
286
+ *
287
+ * @param data 待处理的对象
288
+ * @returns 返回处理后的对象
289
+ */
290
+ deleteEmptyProperty(e) {
249
291
  return Object.fromEntries(
250
- Object.keys(t).filter((e) => !this.isEmpty(t[e])).map((e) => [e, t[e]])
292
+ Object.keys(e).filter((t) => !this.isEmpty(e[t])).map((t) => [t, e[t]])
251
293
  );
252
294
  },
253
- deepAssign() {
254
- let t = arguments.length, e = arguments[0];
255
- this.getDataType(e) !== "Object" && (e = {});
256
- for (let n = 1; n < t; n++) {
257
- let r = arguments[n];
258
- if (this.getDataType(r) === "Object")
259
- for (let a in r)
260
- a === "__proto__" || e === r[a] || (this.getDataType(r[a]) === "Object" ? e[a] = this.deepAssign(e[a], r[a]) : e[a] = r[a]);
261
- }
295
+ deepAssign(e, ...t) {
296
+ (typeof e != "object" || e === null) && (e = {});
297
+ for (const n of t)
298
+ if (typeof n == "object" && n !== null)
299
+ for (const s in n)
300
+ Object.prototype.hasOwnProperty.call(n, s) && (typeof n[s] == "object" && n[s] !== null ? (e[s] || (e[s] = Array.isArray(n[s]) ? [] : {}), this.deepAssign(e[s], n[s])) : e[s] = n[s]);
262
301
  return e;
263
302
  },
264
- handleCopyValue(t) {
265
- if (!navigator.clipboard && window.isSecureContext)
266
- return navigator.clipboard.writeText(t);
303
+ /**
304
+ * 复制文本到剪贴板
305
+ *
306
+ * @param text 要复制的文本
307
+ * @returns 返回一个Promise,表示复制操作的结果
308
+ */
309
+ handleCopyValue(e) {
310
+ if (navigator.clipboard && window.isSecureContext)
311
+ return navigator.clipboard.writeText(e);
267
312
  {
268
- const e = document.createElement("textarea");
269
- return e.style.position = "fixed", e.style.top = e.style.left = "-100vh", e.style.opacity = "0", e.value = t, document.body.appendChild(e), e.focus(), e.select(), new Promise((n, r) => {
270
- document.execCommand("copy") ? n() : r(new Error("copy failed")), e.remove();
313
+ const t = document.createElement("textarea");
314
+ return t.style.position = "fixed", t.style.top = t.style.left = "-100vh", t.style.opacity = "0", t.value = e, document.body.appendChild(t), t.focus(), t.select(), new Promise((n, s) => {
315
+ try {
316
+ document.execCommand("copy"), n();
317
+ } catch {
318
+ s(new Error("copy failed"));
319
+ } finally {
320
+ t.remove();
321
+ }
271
322
  });
272
323
  }
273
324
  }
274
325
  };
275
- Array.prototype.groupBy = function(t) {
276
- var e = {};
326
+ Array.prototype.groupBy = function(e) {
327
+ var t = {};
277
328
  return this.forEach(function(n) {
278
- var r = JSON.stringify(t(n));
279
- e[r] = e[r] || [], e[r].push(n);
280
- }), Object.keys(e).map((n) => e[n]);
329
+ var s = JSON.stringify(e(n));
330
+ t[s] = t[s] || [], t[s].push(n);
331
+ }), Object.keys(t).map((n) => t[n]);
281
332
  };
282
- Array.prototype.distinct = function(t = (e) => e) {
283
- const e = [], n = {};
284
- return this.forEach((r) => {
285
- const a = t(r);
286
- !n[a] && (n[a] = e.push(r));
287
- }), e;
333
+ Array.prototype.distinct = function(e = (t) => t) {
334
+ const t = [], n = {};
335
+ return this.forEach((s) => {
336
+ const a = e(s);
337
+ !n[a] && (n[a] = t.push(s));
338
+ }), t;
288
339
  };
289
340
  Array.prototype.max = function() {
290
341
  return Math.max.apply({}, this);
@@ -293,85 +344,85 @@ Array.prototype.min = function() {
293
344
  return Math.min.apply({}, this);
294
345
  };
295
346
  Array.prototype.sum = function() {
296
- return this.length > 0 ? this.reduce((t = 0, e = 0) => t + e) : 0;
347
+ return this.length > 0 ? this.reduce((e = 0, t = 0) => e + t) : 0;
297
348
  };
298
349
  Array.prototype.avg = function() {
299
350
  return this.length ? this.sum() / this.length : 0;
300
351
  };
301
- Array.prototype.desc = function(t = (e) => e) {
302
- return this.sort((e, n) => t(n) - t(e));
352
+ Array.prototype.desc = function(e = (t) => t) {
353
+ return this.sort((t, n) => e(n) - e(t));
303
354
  };
304
- Array.prototype.asc = function(t = (e) => e) {
305
- return this.sort((e, n) => t(e) - t(n));
355
+ Array.prototype.asc = function(e = (t) => t) {
356
+ return this.sort((t, n) => e(t) - e(n));
306
357
  };
307
358
  Array.prototype.clear = function() {
308
359
  return this.length = 0, this;
309
360
  };
310
- const V = {
311
- asArray(t) {
312
- return E.isEmpty(t) ? [] : Array.isArray(t) ? t : [t];
313
- },
314
- generateArray(t) {
315
- return [...new Array(t).keys()];
316
- },
317
- union(...t) {
318
- let e = [];
319
- return t.forEach((n) => {
320
- Array.isArray(n) && (e = e.concat(n.filter((r) => !e.includes(r))));
321
- }), e;
322
- },
323
- intersection(...t) {
324
- let e = t[0] || [];
325
- return t.forEach((n) => {
326
- Array.isArray(n) && (e = e.filter((r) => n.includes(r)));
327
- }), e;
328
- },
329
- unionAll(...t) {
330
- return [...t].flat().filter((e) => !!e);
331
- },
332
- difference(...t) {
333
- return this.union(...t).filter((e) => !this.intersection(...t).includes(e));
361
+ const et = {
362
+ asArray(e) {
363
+ return E.isEmpty(e) ? [] : Array.isArray(e) ? e : [e];
364
+ },
365
+ generateArray(e) {
366
+ return [...new Array(e).keys()];
367
+ },
368
+ union(...e) {
369
+ let t = [];
370
+ return e.forEach((n) => {
371
+ Array.isArray(n) && (t = t.concat(n.filter((s) => !t.includes(s))));
372
+ }), t;
373
+ },
374
+ intersection(...e) {
375
+ let t = e[0] || [];
376
+ return e.forEach((n) => {
377
+ Array.isArray(n) && (t = t.filter((s) => n.includes(s)));
378
+ }), t;
379
+ },
380
+ unionAll(...e) {
381
+ return [...e].flat().filter((t) => !!t);
382
+ },
383
+ difference(...e) {
384
+ return this.union(...e).filter((t) => !this.intersection(...e).includes(t));
334
385
  }
335
- }, Q = {
336
- getUrlParams(t = window.location.href, e = !0) {
337
- const n = /([^&=]+)=([\w\W]*?)(&|$|#)/g, { search: r, hash: a } = new URL(t), s = [r, a];
386
+ }, nt = {
387
+ getUrlParams(e = window.location.href, t = !0) {
388
+ const n = /([^&=]+)=([\w\W]*?)(&|$|#)/g, { search: s, hash: a } = new URL(e), r = [s, a];
338
389
  let i = {};
339
- for (let o = 0; o < s.length; o++) {
340
- const c = s[o];
390
+ for (let o = 0; o < r.length; o++) {
391
+ const c = r[o];
341
392
  if (c) {
342
393
  const h = c.replace(/#|\//g, "").split("?");
343
394
  if (h.length > 1)
344
395
  for (let u = 1; u < h.length; u++) {
345
396
  let d;
346
397
  for (; d = n.exec(h[u]); )
347
- i[d[1]] = e ? decodeURIComponent(d[2]) : d[2];
398
+ i[d[1]] = t ? decodeURIComponent(d[2]) : d[2];
348
399
  }
349
400
  }
350
401
  }
351
402
  return i;
352
403
  },
353
404
  getExplorer() {
354
- var t = window.navigator.userAgent;
355
- if (t.indexOf("MSIE") >= 0 || window.ActiveXObject || "ActiveXObject" in window)
405
+ var e = window.navigator.userAgent;
406
+ if (e.indexOf("MSIE") >= 0 || window.ActiveXObject || "ActiveXObject" in window)
356
407
  return "IE";
357
- if (t.indexOf("Firefox") >= 0)
408
+ if (e.indexOf("Firefox") >= 0)
358
409
  return "Firefox";
359
- if (t.indexOf("Chrome") >= 0)
410
+ if (e.indexOf("Chrome") >= 0)
360
411
  return "Chrome";
361
- if (t.indexOf("Opera") >= 0)
412
+ if (e.indexOf("Opera") >= 0)
362
413
  return "Opera";
363
- if (t.indexOf("Safari") >= 0)
414
+ if (e.indexOf("Safari") >= 0)
364
415
  return "Safari";
365
416
  },
366
417
  detectOS() {
367
- let t = "";
368
- const e = navigator.userAgent.indexOf("Windows", 0) != -1 ? 1 : 0, n = navigator.userAgent.indexOf("mac", 0) != -1 ? 1 : 0, r = navigator.userAgent.indexOf("Linux", 0) != -1 ? 1 : 0, a = navigator.userAgent.indexOf("X11", 0) != -1 ? 1 : 0;
369
- return e ? t = "MS Windows" : n ? t = "Apple mac" : r ? t = "Linux" : a && (t = "Unix"), t;
418
+ let e = "";
419
+ const t = navigator.userAgent.indexOf("Windows", 0) != -1 ? 1 : 0, n = navigator.userAgent.indexOf("mac", 0) != -1 ? 1 : 0, s = navigator.userAgent.indexOf("Linux", 0) != -1 ? 1 : 0, a = navigator.userAgent.indexOf("X11", 0) != -1 ? 1 : 0;
420
+ return t ? e = "MS Windows" : n ? e = "Apple mac" : s ? e = "Linux" : a && (e = "Unix"), e;
370
421
  },
371
- switchFullScreen(t) {
372
- if (t) {
373
- const e = document.documentElement;
374
- e.requestFullscreen ? e.requestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen && e.webkitRequestFullscreen();
422
+ switchFullScreen(e) {
423
+ if (e) {
424
+ const t = document.documentElement;
425
+ t.requestFullscreen ? t.requestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen && t.webkitRequestFullscreen();
375
426
  } else
376
427
  document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen();
377
428
  },
@@ -379,124 +430,126 @@ const V = {
379
430
  * scale屏幕适配方案
380
431
  */
381
432
  refreshScale() {
382
- const t = document.documentElement.clientWidth, e = document.documentElement.clientHeight, n = document.getElementById("app").style, r = t / e, a = 16 / 9;
383
- let s = t / 1920;
384
- r > a && (s = e / 1080), n.transformOrigin = "left top", n.transform = `scale(${s}) translateX(-49.99%)`, n.width = `${t / s}px`;
433
+ const e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = document.getElementById("app").style, s = e / t, a = 16 / 9;
434
+ let r = e / 1920;
435
+ s > a && (r = t / 1080), n.transformOrigin = "left top", n.transform = `scale(${r}) translateX(-49.99%)`, n.width = `${e / r}px`;
385
436
  },
386
437
  /**
387
438
  * rem屏幕适配方案
388
439
  */
389
440
  getHtmlFontSize() {
390
- const t = document.documentElement.clientWidth || document.body.clientWidth, e = document.querySelector("html");
391
- e.style.fontSize = t / 192 + "px";
441
+ const e = document.documentElement.clientWidth || document.body.clientWidth, t = document.querySelector("html");
442
+ t.style.fontSize = e / 192 + "px";
392
443
  }
393
- }, X = {
394
- set: function(t, e, n = 30) {
395
- var r = /* @__PURE__ */ new Date();
396
- r.setTime(r.getTime() + n * 24 * 60 * 60 * 1e3), document.cookie = t + "=" + escape(e) + ";expires=" + r.toUTCString();
397
- },
398
- remove: function(t) {
399
- var e = /* @__PURE__ */ new Date();
400
- e.setTime(e.getTime() - 1);
401
- var n = this.get(t);
402
- n != null && (document.cookie = t + "=" + n + ";expires=" + e.toUTCString());
403
- },
404
- get: function(t) {
405
- var e = document.cookie.match(new RegExp("(^| )" + t + "=([^;]*)(;|$)"));
406
- return e != null ? e[2] : "";
444
+ }, st = {
445
+ set: function(e, t, n = 30) {
446
+ var s = /* @__PURE__ */ new Date();
447
+ s.setTime(s.getTime() + n * 24 * 60 * 60 * 1e3), document.cookie = e + "=" + escape(t) + ";expires=" + s.toUTCString();
448
+ },
449
+ remove: function(e) {
450
+ var t = /* @__PURE__ */ new Date();
451
+ t.setTime(t.getTime() - 1);
452
+ var n = this.get(e);
453
+ n != null && (document.cookie = e + "=" + n + ";expires=" + t.toUTCString());
454
+ },
455
+ get: function(e) {
456
+ var t = document.cookie.match(new RegExp("(^| )" + e + "=([^;]*)(;|$)"));
457
+ return t != null ? t[2] : "";
407
458
  }
408
- }, Z = {
459
+ }, rt = {
409
460
  PI: 3.141592653589793,
410
461
  XPI: 3.141592653589793 * 3e3 / 180,
411
- delta(t, e) {
412
- const r = 0.006693421622965943;
413
- let a = this.transformLat(e - 105, t - 35), s = this.transformLon(e - 105, t - 35);
414
- const i = t / 180 * this.PI;
462
+ delta(e, t) {
463
+ const s = 0.006693421622965943;
464
+ let a = this.transformLat(t - 105, e - 35), r = this.transformLon(t - 105, e - 35);
465
+ const i = e / 180 * this.PI;
415
466
  let o = Math.sin(i);
416
- o = 1 - r * o * o;
467
+ o = 1 - s * o * o;
417
468
  const c = Math.sqrt(o);
418
- return a = a * 180 / (6378245 * (1 - r) / (o * c) * this.PI), s = s * 180 / (6378245 / c * Math.cos(i) * this.PI), { lat: a, lng: s };
469
+ return a = a * 180 / (6378245 * (1 - s) / (o * c) * this.PI), r = r * 180 / (6378245 / c * Math.cos(i) * this.PI), { lat: a, lng: r };
419
470
  },
420
471
  // WGS-84 to GCJ-02
421
- gcjEncrypt(t, e) {
422
- if (this.outOfChina(t, e))
423
- return { lat: t, lng: e };
424
- const n = this.delta(t, e);
425
- return { lat: t + n.lat, lng: e + n.lng };
472
+ gcjEncrypt(e, t) {
473
+ if (this.outOfChina(e, t))
474
+ return { lat: e, lng: t };
475
+ const n = this.delta(e, t);
476
+ return { lat: e + n.lat, lng: t + n.lng };
426
477
  },
427
478
  // GCJ-02 to WGS-84
428
- gcjDecrypt(t, e) {
429
- if (this.outOfChina(t, e))
430
- return { lat: t, lng: e };
431
- const n = this.delta(t, e);
432
- return { lat: t - n.lat, lng: e - n.lng };
479
+ gcjDecrypt(e, t) {
480
+ if (this.outOfChina(e, t))
481
+ return { lat: e, lng: t };
482
+ const n = this.delta(e, t);
483
+ return { lat: e - n.lat, lng: t - n.lng };
433
484
  },
434
485
  // GCJ-02 to WGS-84 exactly
435
- gcjDecryptExact(t, e) {
436
- let a = 0.01, s = 0.01, i = t - a, o = e - s, c = t + a, l = e + s, h = 0, u = 0, d = 0;
486
+ gcjDecryptExact(e, t) {
487
+ let a = 0.01, r = 0.01, i = e - a, o = t - r, c = e + a, l = t + r, h = 0, u = 0, d = 0;
437
488
  for (; ; ) {
438
489
  h = (i + c) / 2, u = (o + l) / 2;
439
- const f = this.gcjEncrypt(h, u);
440
- if (a = f.lat - t, s = f.lng - e, Math.abs(a) < 1e-9 && Math.abs(s) < 1e-9 || (a > 0 ? c = h : i = h, s > 0 ? l = u : o = u, ++d > 1e4)) break;
490
+ const R = this.gcjEncrypt(h, u);
491
+ if (a = R.lat - e, r = R.lng - t, Math.abs(a) < 1e-9 && Math.abs(r) < 1e-9 || (a > 0 ? c = h : i = h, r > 0 ? l = u : o = u, ++d > 1e4)) break;
441
492
  }
442
493
  return { lat: h, lng: u };
443
494
  },
444
495
  // GCJ-02 to BD-09
445
- bdEncrypt(t, e) {
446
- const n = e, r = t, a = Math.sqrt(n * n + r * r) + 2e-5 * Math.sin(r * this.XPI), s = Math.atan2(r, n) + 3e-6 * Math.cos(n * this.XPI), i = a * Math.cos(s) + 65e-4;
447
- return { lat: a * Math.sin(s) + 6e-3, lng: i };
496
+ bdEncrypt(e, t) {
497
+ const n = t, s = e, a = Math.sqrt(n * n + s * s) + 2e-5 * Math.sin(s * this.XPI), r = Math.atan2(s, n) + 3e-6 * Math.cos(n * this.XPI), i = a * Math.cos(r) + 65e-4;
498
+ return { lat: a * Math.sin(r) + 6e-3, lng: i };
448
499
  },
449
500
  // BD-09 to GCJ-02
450
- bdDecrypt(t, e) {
451
- const n = e - 65e-4, r = t - 6e-3, a = Math.sqrt(n * n + r * r) - 2e-5 * Math.sin(r * this.XPI), s = Math.atan2(r, n) - 3e-6 * Math.cos(n * this.XPI), i = a * Math.cos(s);
452
- return { lat: a * Math.sin(s), lng: i };
501
+ bdDecrypt(e, t) {
502
+ const n = t - 65e-4, s = e - 6e-3, a = Math.sqrt(n * n + s * s) - 2e-5 * Math.sin(s * this.XPI), r = Math.atan2(s, n) - 3e-6 * Math.cos(n * this.XPI), i = a * Math.cos(r);
503
+ return { lat: a * Math.sin(r), lng: i };
453
504
  },
454
505
  // WGS-84 to Web mercator
455
506
  // mercatorLat -> y mercatorLon -> x
456
- mercatorEncrypt(t, e) {
457
- const n = e * 2003750834e-2 / 180;
458
- let r = Math.log(Math.tan((90 + t) * this.PI / 360)) / (this.PI / 180);
459
- return r = r * 2003750834e-2 / 180, { lat: r, lng: n };
507
+ mercatorEncrypt(e, t) {
508
+ const n = t * 2003750834e-2 / 180;
509
+ let s = Math.log(Math.tan((90 + e) * this.PI / 360)) / (this.PI / 180);
510
+ return s = s * 2003750834e-2 / 180, { lat: s, lng: n };
460
511
  },
461
512
  // Web mercator to WGS-84
462
513
  // mercatorLat -> y mercatorLon -> x
463
- mercatorDecrypt(t, e) {
464
- const n = e / 2003750834e-2 * 180;
465
- let r = t / 2003750834e-2 * 180;
466
- return r = 180 / this.PI * (2 * Math.atan(Math.exp(r * this.PI / 180)) - this.PI / 2), { lat: r, lng: n };
514
+ mercatorDecrypt(e, t) {
515
+ const n = t / 2003750834e-2 * 180;
516
+ let s = e / 2003750834e-2 * 180;
517
+ return s = 180 / this.PI * (2 * Math.atan(Math.exp(s * this.PI / 180)) - this.PI / 2), { lat: s, lng: n };
467
518
  },
468
519
  // two point's distance
469
- distance(t, e, n, r) {
470
- const s = Math.cos(t * this.PI / 180) * Math.cos(n * this.PI / 180) * Math.cos((e - r) * this.PI / 180), i = Math.sin(t * this.PI / 180) * Math.sin(n * this.PI / 180);
471
- let o = s + i;
520
+ distance(e, t, n, s) {
521
+ const r = Math.cos(e * this.PI / 180) * Math.cos(n * this.PI / 180) * Math.cos((t - s) * this.PI / 180), i = Math.sin(e * this.PI / 180) * Math.sin(n * this.PI / 180);
522
+ let o = r + i;
472
523
  return o > 1 && (o = 1), o < -1 && (o = -1), Math.acos(o) * 6371e3;
473
524
  },
474
- outOfChina(t, e) {
475
- return e < 72.004 || e > 137.8347 || t < 0.8293 || t > 55.8271;
525
+ outOfChina(e, t) {
526
+ return t < 72.004 || t > 137.8347 || e < 0.8293 || e > 55.8271;
476
527
  },
477
- transformLat(t, e) {
478
- let n = -100 + 2 * t + 3 * e + 0.2 * e * e + 0.1 * t * e + 0.2 * Math.sqrt(Math.abs(t));
479
- return n += (20 * Math.sin(6 * t * this.PI) + 20 * Math.sin(2 * t * this.PI)) * 2 / 3, n += (20 * Math.sin(e * this.PI) + 40 * Math.sin(e / 3 * this.PI)) * 2 / 3, n += (160 * Math.sin(e / 12 * this.PI) + 320 * Math.sin(e * this.PI / 30)) * 2 / 3, n;
528
+ transformLat(e, t) {
529
+ let n = -100 + 2 * e + 3 * t + 0.2 * t * t + 0.1 * e * t + 0.2 * Math.sqrt(Math.abs(e));
530
+ return n += (20 * Math.sin(6 * e * this.PI) + 20 * Math.sin(2 * e * this.PI)) * 2 / 3, n += (20 * Math.sin(t * this.PI) + 40 * Math.sin(t / 3 * this.PI)) * 2 / 3, n += (160 * Math.sin(t / 12 * this.PI) + 320 * Math.sin(t * this.PI / 30)) * 2 / 3, n;
480
531
  },
481
- transformLon(t, e) {
482
- let n = 300 + t + 2 * e + 0.1 * t * t + 0.1 * t * e + 0.1 * Math.sqrt(Math.abs(t));
483
- return n += (20 * Math.sin(6 * t * this.PI) + 20 * Math.sin(2 * t * this.PI)) * 2 / 3, n += (20 * Math.sin(t * this.PI) + 40 * Math.sin(t / 3 * this.PI)) * 2 / 3, n += (150 * Math.sin(t / 12 * this.PI) + 300 * Math.sin(t / 30 * this.PI)) * 2 / 3, n;
532
+ transformLon(e, t) {
533
+ let n = 300 + e + 2 * t + 0.1 * e * e + 0.1 * e * t + 0.1 * Math.sqrt(Math.abs(e));
534
+ return n += (20 * Math.sin(6 * e * this.PI) + 20 * Math.sin(2 * e * this.PI)) * 2 / 3, n += (20 * Math.sin(e * this.PI) + 40 * Math.sin(e / 3 * this.PI)) * 2 / 3, n += (150 * Math.sin(e / 12 * this.PI) + 300 * Math.sin(e / 30 * this.PI)) * 2 / 3, n;
484
535
  },
485
- randomCoordinate(t, e, n, r) {
536
+ randomCoordinate(e, t, n, s) {
486
537
  return {
487
- lat: Math.random() * (r - e) + e,
488
- lng: Math.random() * (n - t) + t
538
+ lat: Math.random() * (s - t) + t,
539
+ lng: Math.random() * (n - e) + e
489
540
  };
490
541
  }
491
542
  };
492
- Date.prototype.format = function(t) {
493
- const e = {
543
+ Date.prototype.format = function(e) {
544
+ const t = {
494
545
  "M+": this.getMonth() + 1,
495
546
  // 月份
496
547
  "d+": this.getDate(),
497
548
  // 日
498
- "h+": this.getHours(),
549
+ "h+": this.getHours() % 12,
499
550
  // 小时
551
+ "H+": this.getHours(),
552
+ // 小时 (24小时制)
500
553
  "m+": this.getMinutes(),
501
554
  // 分
502
555
  "s+": this.getSeconds(),
@@ -506,45 +559,48 @@ Date.prototype.format = function(t) {
506
559
  S: this.getMilliseconds()
507
560
  // 毫秒
508
561
  };
509
- /(y+)/.test(t) && (t = t.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
510
- for (const n in e)
511
- new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? e[n] : ("00" + e[n]).substr(("" + e[n]).length)));
512
- return t;
562
+ /(y+)/.test(e) && (e = e.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
563
+ for (const n in t)
564
+ if (new RegExp("(" + n + ")").test(e)) {
565
+ const s = n.length === 1 ? 1 : Number(n.slice(1));
566
+ e = e.replace(RegExp.$1, ("00" + t[n]).substr(("" + t[n]).length + s - (t[n] + "").length));
567
+ }
568
+ return e;
513
569
  };
514
- Date.prototype.addDate = function(t, e) {
570
+ Date.prototype.addDate = function(e, t) {
515
571
  const n = new Date(this);
516
- switch (t) {
572
+ switch (e) {
517
573
  case "y":
518
- n.setFullYear(this.getFullYear() + e);
574
+ n.setFullYear(this.getFullYear() + t);
519
575
  break;
520
576
  case "q":
521
- n.setMonth(this.getMonth() + e * 3);
577
+ n.setMonth(this.getMonth() + t * 3);
522
578
  break;
523
579
  case "M":
524
- n.setMonth(this.getMonth() + e);
580
+ n.setMonth(this.getMonth() + t);
525
581
  break;
526
582
  case "w":
527
- n.setDate(this.getDate() + e * 7);
583
+ n.setDate(this.getDate() + t * 7);
528
584
  break;
529
585
  case "d":
530
- n.setDate(this.getDate() + e);
586
+ n.setDate(this.getDate() + t);
531
587
  break;
532
588
  case "h":
533
- n.setHours(this.getHours() + e);
589
+ n.setHours(this.getHours() + t);
534
590
  break;
535
591
  case "m":
536
- n.setMinutes(this.getMinutes() + e);
592
+ n.setMinutes(this.getMinutes() + t);
537
593
  break;
538
594
  case "s":
539
- n.setSeconds(this.getSeconds() + e);
595
+ n.setSeconds(this.getSeconds() + t);
540
596
  break;
541
597
  default:
542
- n.setDate(this.getDate() + e);
598
+ n.setDate(this.getDate() + t);
543
599
  break;
544
600
  }
545
601
  return n;
546
602
  };
547
- const tt = {
603
+ const at = {
548
604
  lastMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1),
549
605
  thisMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1),
550
606
  nextMonthDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() + 1, 1),
@@ -554,28 +610,28 @@ const tt = {
554
610
  lastDayDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), (/* @__PURE__ */ new Date()).getDate() - 1),
555
611
  thisDayDate: new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)),
556
612
  nextDayDate: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), (/* @__PURE__ */ new Date()).getDate() + 1),
557
- parseDate(t) {
558
- if (typeof t == "string") {
559
- var e = t.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) *$/);
560
- if (e && e.length > 3) return new Date(parseInt(e[1]), parseInt(e[2]) - 1, parseInt(e[3]));
561
- if (e = t.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) +(\d{1,2}):(\d{1,2}):(\d{1,2}) *$/), e && e.length > 6)
613
+ parseDate(e) {
614
+ if (typeof e == "string") {
615
+ var t = e.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) *$/);
616
+ if (t && t.length > 3) return new Date(parseInt(t[1]), parseInt(t[2]) - 1, parseInt(t[3]));
617
+ if (t = e.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) +(\d{1,2}):(\d{1,2}):(\d{1,2}) *$/), t && t.length > 6)
562
618
  return new Date(
563
- parseInt(e[1]),
564
- parseInt(e[2]) - 1,
565
- parseInt(e[3]),
566
- parseInt(e[4]),
567
- parseInt(e[5]),
568
- parseInt(e[6])
619
+ parseInt(t[1]),
620
+ parseInt(t[2]) - 1,
621
+ parseInt(t[3]),
622
+ parseInt(t[4]),
623
+ parseInt(t[5]),
624
+ parseInt(t[6])
569
625
  );
570
- if (e = t.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) +(\d{1,2}):(\d{1,2}):(\d{1,2})\.(\d{1,9}) *$/), e && e.length > 7)
626
+ if (t = e.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) +(\d{1,2}):(\d{1,2}):(\d{1,2})\.(\d{1,9}) *$/), t && t.length > 7)
571
627
  return new Date(
572
- parseInt(e[1]),
573
- parseInt(e[2]) - 1,
574
- parseInt(e[3]),
575
- parseInt(e[4]),
576
- parseInt(e[5]),
577
- parseInt(e[6]),
578
- parseInt(e[7])
628
+ parseInt(t[1]),
629
+ parseInt(t[2]) - 1,
630
+ parseInt(t[3]),
631
+ parseInt(t[4]),
632
+ parseInt(t[5]),
633
+ parseInt(t[6]),
634
+ parseInt(t[7])
579
635
  );
580
636
  }
581
637
  return null;
@@ -587,91 +643,168 @@ const tt = {
587
643
  * @param {*} endTime
588
644
  * @returns {*}
589
645
  */
590
- formatDateInterval(t, e) {
591
- const n = new Date(t), a = new Date(e).getTime() - n.getTime(), s = Math.floor(a / (24 * 3600 * 1e3)), i = a % (24 * 3600 * 1e3), o = Math.floor(i / (3600 * 1e3)), c = i % (3600 * 1e3), l = Math.floor(c / (60 * 1e3)), h = c % (60 * 1e3), u = Math.round(h / 1e3);
646
+ formatDateInterval(e, t) {
647
+ const n = new Date(e), a = new Date(t).getTime() - n.getTime(), r = Math.floor(a / (24 * 3600 * 1e3)), i = a % (24 * 3600 * 1e3), o = Math.floor(i / (3600 * 1e3)), c = i % (3600 * 1e3), l = Math.floor(c / (60 * 1e3)), h = c % (60 * 1e3), u = Math.round(h / 1e3);
592
648
  let d = "";
593
- return s > 0 && (d += s + "天"), o > 0 && (d += o + "时"), l > 0 && (d += l + "分"), u > 0 && (d += u + "秒"), s === 0 && o === 0 && l === 0 && u === 0 && (d = "少于1秒"), d;
649
+ return r > 0 && (d += r + "天"), o > 0 && (d += o + "时"), l > 0 && (d += l + "分"), u > 0 && (d += u + "秒"), r === 0 && o === 0 && l === 0 && u === 0 && (d = "少于1秒"), d;
594
650
  },
595
- formatterCounter(t) {
596
- const e = function(o) {
651
+ formatterCounter(e) {
652
+ const t = function(o) {
597
653
  return (o > 10 ? "" : "0") + (o || 0);
598
- }, n = e(Math.floor(t / 3600)), r = t % 3600, a = e(Math.floor(r / 60)), s = r % 60, i = e(Math.round(s));
654
+ }, n = t(Math.floor(e / 3600)), s = e % 3600, a = t(Math.floor(s / 60)), r = s % 60, i = t(Math.round(r));
599
655
  return `${n}:${a}:${i}`;
600
656
  },
601
- sleep(t) {
657
+ sleep(e) {
602
658
  }
603
659
  };
604
- function U(t) {
605
- return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
660
+ function j(e) {
661
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
606
662
  }
607
- function L(t) {
608
- return U(t).split(/\s+/);
663
+ function U(e) {
664
+ return j(e).split(/\s+/);
609
665
  }
610
- const et = {
611
- getStyle(t, e) {
612
- let n = t.style[e] || t.currentStyle && t.currentStyle[e];
613
- if ((!n || n === "auto") && document.defaultView) {
614
- const r = document.defaultView.getComputedStyle(t, null);
615
- n = r ? r[e] : null;
666
+ const it = {
667
+ /**
668
+ * 获取元素的样式值
669
+ *
670
+ * @param el 元素对象
671
+ * @param style 样式属性名称
672
+ * @returns 元素的样式值,如果获取不到则返回 null
673
+ */
674
+ getStyle(e, t) {
675
+ var s;
676
+ let n = e.style[t];
677
+ if (!n || n === "auto") {
678
+ const a = (s = document.defaultView) == null ? void 0 : s.getComputedStyle(e, null);
679
+ n = a ? a[t] : null, n === "auto" && (n = null);
616
680
  }
617
- return n === "auto" ? null : n;
681
+ return n;
618
682
  },
619
- create(t, e, n) {
620
- const r = document.createElement(t);
621
- return r.className = e || "", n && n.appendChild(r), r;
683
+ /**
684
+ * 创建一个HTML元素
685
+ *
686
+ * @param tagName 元素标签名
687
+ * @param className 元素类名
688
+ * @param container 父容器,若传入,则新创建的元素会被添加到该容器中
689
+ * @returns 返回新创建的HTML元素
690
+ */
691
+ create(e, t, n) {
692
+ const s = document.createElement(e);
693
+ return s.className = t || "", n && n.appendChild(s), s;
622
694
  },
623
- remove(t) {
624
- const e = t.parentNode;
625
- e && e.removeChild(t);
626
- },
627
- empty(t) {
628
- for (; t.firstChild; )
629
- t.removeChild(t.firstChild);
630
- },
631
- toFront(t) {
632
- const e = t.parentNode;
633
- e && e.lastChild !== t && e.appendChild(t);
634
- },
635
- toBack(t) {
636
- const e = t.parentNode;
637
- e && e.firstChild !== t && e.insertBefore(t, e.firstChild);
638
- },
639
- getClass(t) {
640
- return t.correspondingElement && (t = t.correspondingElement), t.className.baseVal === void 0 ? t.className : t.className.baseVal;
641
- },
642
- hasClass(t, e) {
643
- if (t.classList !== void 0)
644
- return t.classList.contains(e);
645
- const n = this.getClass(t);
646
- return n.length > 0 && new RegExp("(^|\\s)" + e + "(\\s|$)").test(n);
647
- },
648
- addClass(t, e) {
649
- if (t.classList !== void 0) {
650
- const n = L(e);
651
- for (let r = 0, a = n.length; r < a; r++)
652
- t.classList.add(n[r]);
653
- } else if (!this.hasClass(t, e)) {
654
- const n = this.getClass(t);
655
- this.setClass(t, (n ? n + " " : "") + e);
695
+ /**
696
+ * 从父节点中移除指定元素。
697
+ *
698
+ * @param el 要移除的元素对象,必须包含parentNode属性。
699
+ */
700
+ remove(e) {
701
+ const t = e.parentNode;
702
+ t && t.removeChild(e);
703
+ },
704
+ /**
705
+ * 清空给定元素的子节点
706
+ *
707
+ * @param el 要清空子节点的元素,包含firstChild和removeChild属性
708
+ */
709
+ empty(e) {
710
+ for (; e.firstChild; )
711
+ e.removeChild(e.firstChild);
712
+ },
713
+ /**
714
+ * 将元素移到父节点的最前面
715
+ *
716
+ * @param el 要移动的元素,需要包含 parentNode 属性
717
+ */
718
+ toFront(e) {
719
+ const t = e.parentNode;
720
+ t && t.lastChild !== e && t.appendChild(e);
721
+ },
722
+ /**
723
+ * 将元素移动到其父节点的最前面
724
+ *
725
+ * @param el 要移动的元素,需要包含parentNode属性
726
+ */
727
+ toBack(e) {
728
+ const t = e.parentNode;
729
+ t && t.firstChild !== e && t.insertBefore(e, t.firstChild);
730
+ },
731
+ /**
732
+ * 获取元素的类名
733
+ *
734
+ * @param el 包含对应元素和类名的对象
735
+ * @param el.correspondingElement 对应的元素
736
+ * @param el.className 类名对象
737
+ * @param el.className.baseVal 类名字符串
738
+ * @returns 返回元素的类名字符串
739
+ */
740
+ getClass(e) {
741
+ return ((e == null ? void 0 : e.host) || e).className.toString();
742
+ },
743
+ /**
744
+ * 判断元素是否包含指定类名
745
+ *
746
+ * @param el 元素对象,包含classList属性,classList属性包含contains方法
747
+ * @param name 要判断的类名
748
+ * @returns 返回一个布尔值,表示元素是否包含指定类名
749
+ */
750
+ hasClass(e, t) {
751
+ var s;
752
+ if ((s = e.classList) != null && s.contains(t))
753
+ return !0;
754
+ const n = this.getClass(e);
755
+ return n.length > 0 && new RegExp(`(^|\\s)${t}(\\s|$)`).test(n);
756
+ },
757
+ /**
758
+ * 给指定的 HTML 元素添加类名
759
+ *
760
+ * @param el 要添加类名的 HTML 元素
761
+ * @param name 要添加的类名,多个类名之间用空格分隔
762
+ */
763
+ addClass(e, t) {
764
+ if (e.classList !== void 0) {
765
+ const n = U(t);
766
+ for (let s = 0, a = n.length; s < a; s++)
767
+ e.classList.add(n[s]);
768
+ } else if (!this.hasClass(e, t)) {
769
+ const n = this.getClass(e);
770
+ this.setClass(e, (n ? n + " " : "") + t);
656
771
  }
657
772
  },
658
- removeClass(t, e) {
659
- t.classList !== void 0 ? L(e).forEach((r) => t.classList.remove(r)) : this.setClass(t, U((" " + this.getClass(t) + " ").replace(" " + e + " ", " ")));
773
+ /**
774
+ * 从元素中移除指定类名
775
+ *
776
+ * @param el 要移除类名的元素
777
+ * @param name 要移除的类名,多个类名用空格分隔
778
+ */
779
+ removeClass(e, t) {
780
+ e.classList !== void 0 ? U(t).forEach((s) => e.classList.remove(s)) : this.setClass(e, (" " + this.getClass(e) + " ").replace(" " + t + " ", " ").trim());
660
781
  },
661
- setClass(t, e) {
662
- t.className.baseVal === void 0 ? t.className = e : t.className.baseVal = e;
782
+ /**
783
+ * 设置元素的 CSS 类名
784
+ *
785
+ * @param el HTML 或 SVG 元素
786
+ * @param name 要设置的类名,多个类名之间用空格分隔
787
+ */
788
+ setClass(e, t) {
789
+ "classList" in e && (e.classList.value = "", t.split(" ").forEach((n) => e.classList.add(n)));
663
790
  },
664
- parseFromString(t) {
665
- return new DOMParser().parseFromString(t, "text/xml").children[0];
791
+ /**
792
+ * 从字符串中解析XML文档,并返回根节点
793
+ *
794
+ * @param str 要解析的XML字符串
795
+ * @returns 解析后的XML文档的根节点
796
+ */
797
+ parseFromString(e) {
798
+ return new DOMParser().parseFromString(e, "text/xml").children[0];
666
799
  }
667
800
  }, g = {
668
801
  DEG2RAD: Math.PI / 180,
669
802
  RAD2DEG: 180 / Math.PI,
670
- randInt(t, e) {
671
- return t + Math.floor(Math.random() * (e - t + 1));
803
+ randInt(e, t) {
804
+ return e + Math.floor(Math.random() * (t - e + 1));
672
805
  },
673
- randFloat(t, e) {
674
- return t + Math.random() * (e - t);
806
+ randFloat(e, t) {
807
+ return e + Math.random() * (t - e);
675
808
  },
676
809
  /**
677
810
  * 角度转弧度
@@ -679,8 +812,8 @@ const et = {
679
812
  * @param {*} degrees
680
813
  * @returns {*}
681
814
  */
682
- degreesToRadians(t) {
683
- return t * this.DEG2RAD;
815
+ degreesToRadians(e) {
816
+ return e * this.DEG2RAD;
684
817
  },
685
818
  /**
686
819
  * 角度转弧度
@@ -688,8 +821,8 @@ const et = {
688
821
  * @param {*} degrees
689
822
  * @returns {*}
690
823
  */
691
- toRadians(t) {
692
- return t * this.DEG2RAD;
824
+ toRadians(e) {
825
+ return e * this.DEG2RAD;
693
826
  },
694
827
  /**
695
828
  * 弧度转角度
@@ -697,8 +830,8 @@ const et = {
697
830
  * @param {*} radians
698
831
  * @returns {*}
699
832
  */
700
- radiansToDegrees(t) {
701
- return t * this.RAD2DEG;
833
+ radiansToDegrees(e) {
834
+ return e * this.RAD2DEG;
702
835
  },
703
836
  /**
704
837
  * 弧度转角度
@@ -706,74 +839,76 @@ const et = {
706
839
  * @param {*} radians
707
840
  * @returns {*}
708
841
  */
709
- toDegrees(t) {
710
- return t * this.RAD2DEG;
842
+ toDegrees(e) {
843
+ return e * this.RAD2DEG;
711
844
  },
712
- formatFloat(t, e = 2) {
713
- return Math.round(t * Math.pow(10, e)) / Math.pow(10, e);
845
+ formatFloat(e, t = 2) {
846
+ return Math.round(e * Math.pow(10, t)) / Math.pow(10, t);
714
847
  }
715
- }, j = {
848
+ }, q = {
716
849
  toRadian: Math.PI / 180,
717
850
  R: 6371393,
718
851
  /**
719
- * 验证经纬度坐标
852
+ * 判断给定的经纬度是否合法
720
853
  *
721
- * @param {*} lng
722
- * @param {*} lat
723
- * @returns {*} {boolean}
854
+ * @param lng 经度值
855
+ * @param lat 纬度值
856
+ * @returns 如果经纬度合法,返回true;否则返回false
724
857
  */
725
- isLnglat(t, e) {
726
- return !isNaN(t) && !isNaN(e) && +e > -90 && +e < 90 && +t > -180 && +t < 180;
858
+ isLnglat(e, t) {
859
+ return !isNaN(e) && !isNaN(t) && +t > -90 && +t < 90 && +e > -180 && +e < 180;
727
860
  },
728
861
  /**
729
- * 格式化经纬度(转度分秒)
862
+ * 格式化经纬度为度分秒格式
730
863
  *
731
- * @param {*} lng
732
- * @param {*} lat
733
- * @returns {*}
864
+ * @param lng 经度
865
+ * @param lat 纬度
866
+ * @returns 返回格式化后的经纬度字符串,格式为:经度度分秒,纬度度分秒
734
867
  */
735
- formatLnglat(t, e) {
868
+ formatLnglat(e, t) {
736
869
  let n = "";
737
- function r(a) {
738
- const s = parseFloat(a), i = parseInt(s);
739
- let o = parseInt((s - i) * 60), c = (s - i) * 3600 - o * 60;
740
- return i + "°" + o + "′" + c.toFixed(2) + "″";
870
+ function s(a) {
871
+ const r = Math.floor(a), i = Math.floor((a - r) * 60), o = (a - r) * 3600 - i * 60;
872
+ return `${r}°${i}′${o.toFixed(2)}″`;
741
873
  }
742
- return t && e && (n = r(t) + "," + r(e)), n;
874
+ return this.isLnglat(e, t) ? n = s(e) + "," + s(t) : isNaN(e) ? isNaN(t) || (n = s(t)) : n = s(e), n;
743
875
  },
744
876
  /**
745
- * 度分秒转十进制
877
+ * 将经纬度字符串转换为度
746
878
  *
747
- * @param {*} lng
748
- * @param {*} lat
749
- * @returns {*}
879
+ * @param lng 经度字符串
880
+ * @param lat 纬度字符串
881
+ * @returns 转换后的经纬度对象
750
882
  */
751
- transformLnglat(t, e) {
752
- function n(r) {
753
- for (var a = /[sw]/i.test(r), s = a ? -1 : 1, i = r.match(/[\d.]+/g), o = 0, c = 0, l = i.length; c < l; c++)
754
- o += i[c] / s, s *= 60;
883
+ transformLnglat(e, t) {
884
+ function n(s) {
885
+ let r = /[sw]/i.test(s) ? -1 : 1;
886
+ const i = s.match(/[\d.]+/g) || [];
887
+ let o = 0;
888
+ for (let c = 0; c < i.length; c++)
889
+ o += parseFloat(i[c]) / r, r *= 60;
755
890
  return o;
756
891
  }
757
- if (t && e)
892
+ if (e && t)
758
893
  return {
759
- lng: n(t),
760
- lat: n(e)
894
+ lng: n(e),
895
+ lat: n(t)
761
896
  };
762
897
  },
763
898
  /**
764
- * 判断点是否在多边形内
899
+ * 射线法判断点是否在多边形内
765
900
  *
766
- * @param {*} p
767
- * @param {*} poly
768
- * @returns {*}
901
+ * @param p 点对象,包含x和y属性
902
+ * @param poly 多边形顶点数组,可以是字符串数组或对象数组
903
+ * @returns 返回字符串,表示点相对于多边形的位置:'in'表示在多边形内,'out'表示在多边形外,'on'表示在多边形上
769
904
  */
770
- rayCasting(t, e) {
771
- for (var n = t.x, r = t.y, a = !1, s = 0, i = e.length, o = i - 1; s < i; o = s, s++) {
772
- var c = e[s].x, l = e[s].y, h = e[o].x, u = e[o].y;
773
- if (c === n && l === r || h === n && u === r)
905
+ rayCasting(e, t) {
906
+ for (var n = e.x, s = e.y, a = !1, r = 0, i = t.length, o = i - 1; r < i; o = r, r++) {
907
+ var c = t[r].x, l = t[r].y, h = t[o].x, u = t[o].y;
908
+ if (c === n && l === s || h === n && u === s)
774
909
  return "on";
775
- if (l < r && u >= r || l >= r && u < r) {
776
- var d = c + (r - l) * (h - c) / (u - l);
910
+ if (l < s && u >= s || l >= s && u < s) {
911
+ var d = c + (s - l) * (h - c) / (u - l);
777
912
  if (d === n)
778
913
  return "on";
779
914
  d > n && (a = !a);
@@ -782,148 +917,172 @@ const et = {
782
917
  return a ? "in" : "out";
783
918
  },
784
919
  /**
785
- * 计算两点距离
920
+ * 计算两个WGS-84坐标点之间的距离
786
921
  *
787
- * @param {*} fromPoint
788
- * @param {*} toPoint
789
- * @returns {*}
922
+ * @param fromPoint 起始点坐标
923
+ * @param toPoint 目标点坐标
924
+ * @returns 返回两个坐标点之间的距离,单位为米
790
925
  */
791
- wgs84PointsDistance(t, e) {
926
+ wgs84PointsDistance(e, t) {
792
927
  var n = Math.PI;
793
- function r(W) {
794
- return W * n / 180;
928
+ function s(G) {
929
+ return G * n / 180;
795
930
  }
796
931
  if (arguments.length != 2)
797
932
  return 0;
798
- lon1 = t.x, lat1 = t.y, lon2 = e.x, lat2 = e.y;
799
- var a = 6378137, s = 63567523142e-4, i = 1 / 298.257223563, o = r(lon2 - lon1), c = Math.atan((1 - i) * Math.tan(r(lat1))), l = Math.atan((1 - i) * Math.tan(r(lat2))), h = Math.sin(c), u = Math.cos(c), d = Math.sin(l), f = Math.cos(l), R = o, _, C = 100;
933
+ const a = e.x, r = e.y, i = t.x, o = t.y;
934
+ var c = 6378137, l = 63567523142e-4, h = 1 / 298.257223563, u = s(i - a), d = Math.atan((1 - h) * Math.tan(s(r))), R = Math.atan((1 - h) * Math.tan(s(o))), O = Math.sin(d), v = Math.cos(d), A = Math.sin(R), w = Math.cos(R), D = u, L, N = 100;
800
935
  do {
801
- var A = Math.sin(R), x = Math.cos(R), w = Math.sqrt(
802
- f * A * (f * A) + (u * d - h * f * x) * (u * d - h * f * x)
936
+ var I = Math.sin(D), T = Math.cos(D), y = Math.sqrt(
937
+ w * I * (w * I) + (v * A - O * w * T) * (v * A - O * w * T)
803
938
  );
804
- if (w == 0) return 0;
805
- var D = h * d + u * f * x, P = Math.atan2(w, D), I = u * f * A / w, O = 1 - I * I, p = D - 2 * h * d / O;
806
- isNaN(p) && (p = 0);
807
- var S = i / 16 * O * (4 + i * (4 - 3 * O));
808
- _ = R, R = o + (1 - S) * i * I * (P + S * w * (p + S * D * (-1 + 2 * p * p)));
809
- } while (Math.abs(R - _) > 1e-12 && --C > 0);
810
- if (C == 0)
939
+ if (y == 0) return 0;
940
+ var S = O * A + v * w * T, k = Math.atan2(y, S), C = v * w * I / y, b = 1 - C * C, m = S - 2 * O * A / b;
941
+ isNaN(m) && (m = 0);
942
+ var _ = h / 16 * b * (4 + h * (4 - 3 * b));
943
+ L = D, D = u + (1 - _) * h * C * (k + _ * y * (m + _ * S * (-1 + 2 * m * m)));
944
+ } while (Math.abs(D - L) > 1e-12 && --N > 0);
945
+ if (N == 0)
811
946
  return NaN;
812
- var M = O * (a * a - s * s) / (s * s), F = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), T = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M))), B = T * w * (p + T / 4 * (D * (-1 + 2 * p * p) - T / 6 * p * (-3 + 4 * w * w) * (-3 + 4 * p * p))), $ = s * F * (P - B);
813
- return $;
947
+ var M = b * (c * c - l * l) / (l * l), $ = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), P = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M))), B = P * y * (m + P / 4 * (S * (-1 + 2 * m * m) - P / 6 * m * (-3 + 4 * y * y) * (-3 + 4 * m * m))), W = l * $ * (k - B);
948
+ return W;
814
949
  },
815
950
  /**
816
- * P1绕一个坐标点P2旋转θ角度后,新的坐标的计算公式
951
+ * 旋转点
817
952
  *
818
- * @param {*} p1
819
- * @param {*} p2
820
- * @param {*} θ 旋转角度,正:表示顺时针,负:表示逆时针
953
+ * @param p1 旋转前点坐标
954
+ * @param p2 旋转中心坐标
955
+ * @param θ 旋转角度(顺时针旋转为正)
956
+ * @returns 旋转后点坐标
821
957
  */
822
- rotatePoint(t, e, n) {
823
- const r = (t.x - e.x) * Math.cos(Math.PI / 180 * -n) - (t.y - e.y) * Math.sin(Math.PI / 180 * -n) + e.x, a = (t.x - e.x) * Math.sin(Math.PI / 180 * -n) + (t.y - e.y) * Math.cos(Math.PI / 180 * -n) + e.y;
824
- return { x: r, y: a };
958
+ rotatePoint(e, t, n) {
959
+ const s = (e.x - t.x) * Math.cos(Math.PI / 180 * -n) - (e.y - t.y) * Math.sin(Math.PI / 180 * -n) + t.x, a = (e.x - t.x) * Math.sin(Math.PI / 180 * -n) + (e.y - t.y) * Math.cos(Math.PI / 180 * -n) + t.y;
960
+ return { x: s, y: a };
825
961
  },
826
- calcBearAndDis(t, e) {
827
- const { x: n, y: r } = t, { x: a, y: s } = e, i = a - n, o = s - r, c = Math.sqrt(i * i + o * o);
962
+ /**
963
+ * 根据两个平面坐标点计算方位角和距离
964
+ *
965
+ * @param p1 第一个点的坐标对象
966
+ * @param p2 第二个点的坐标对象
967
+ * @returns 返回一个对象,包含angle和distance属性,分别表示两点之间的角度(以度为单位,取值范围为0~359)和距离
968
+ */
969
+ calcBearAndDis(e, t) {
970
+ const { x: n, y: s } = e, { x: a, y: r } = t, i = a - n, o = r - s, c = Math.sqrt(i * i + o * o);
828
971
  return { angle: (Math.atan2(o, i) * (180 / Math.PI) + 360 + 90) % 360, distance: c };
829
972
  },
830
973
  /**
831
- * 计算latlng2相对于latlng1的方位角和距离
974
+ * 根据两个经纬度点计算方位角和距离
832
975
  *
833
- * @param {*} latlng1
834
- * @param {*} latlng2
835
- * @returns {*} {boolean}
976
+ * @param latlng1 第一个经纬度点
977
+ * @param latlng2 第二个经纬度点
978
+ * @returns 包含方位角和距离的对象
836
979
  */
837
- calcBearAndDisByPoints(t, e) {
838
- var n = parseFloat(t.lat), r = parseFloat(t.lng), a = parseFloat(e.lat), s = parseFloat(e.lng), i = Math.sin((s - r) * this.toRadian) * Math.cos(a * this.toRadian), o = Math.cos(n * this.toRadian) * Math.sin(a * this.toRadian) - Math.sin(n * this.toRadian) * Math.cos(a * this.toRadian) * Math.cos((s - r) * this.toRadian), c = Math.atan2(i, o) * (180 / Math.PI), l = (a - n) * this.toRadian, h = (s - r) * this.toRadian, u = Math.sin(l / 2) * Math.sin(l / 2) + Math.cos(n * this.toRadian) * Math.cos(a * this.toRadian) * Math.sin(h / 2) * Math.sin(h / 2), d = 2 * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u)), f = this.R * d;
980
+ calcBearAndDisByPoints(e, t) {
981
+ var n = e.lat * 1, s = e.lng * 1, a = t.lat * 1, r = t.lng * 1, i = Math.sin((r - s) * this.toRadian) * Math.cos(a * this.toRadian), o = Math.cos(n * this.toRadian) * Math.sin(a * this.toRadian) - Math.sin(n * this.toRadian) * Math.cos(a * this.toRadian) * Math.cos((r - s) * this.toRadian), c = Math.atan2(i, o) * (180 / Math.PI), l = (a - n) * this.toRadian, h = (r - s) * this.toRadian, u = Math.sin(l / 2) * Math.sin(l / 2) + Math.cos(n * this.toRadian) * Math.cos(a * this.toRadian) * Math.sin(h / 2) * Math.sin(h / 2), d = 2 * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u)), R = this.R * d;
839
982
  return {
840
983
  angle: c,
841
- distance: f
984
+ distance: R
842
985
  };
843
986
  },
844
987
  /**
845
- * 根据方位角和距离生成新的坐标
988
+ * 根据给定的经纬度、角度和距离计算新的经纬度点
846
989
  *
847
- * @param {*} latlng
848
- * @param {*} angle
849
- * @param {*} distance
850
- * @returns {*}
990
+ * @param latlng 给定的经纬度点,类型为LngLat
991
+ * @param angle 角度值,单位为度,表示从当前点出发的方向
992
+ * @param distance 距离值,单位为米,表示从当前点出发的距离
993
+ * @returns 返回计算后的新经纬度点,类型为{lat: number, lng: number}
851
994
  */
852
- calcPointByBearAndDis(t, e, n) {
853
- const r = g.toRadians(parseFloat(t.lat)), a = g.toRadians(parseFloat(t.lng));
854
- e = parseFloat(e), n = parseFloat(n);
855
- const s = n / this.R;
856
- e = g.toRadians(e);
857
- const i = Math.asin(Math.sin(r) * Math.cos(s) + Math.cos(r) * Math.sin(s) * Math.cos(e)), o = a + Math.atan2(Math.sin(e) * Math.sin(s) * Math.cos(r), Math.cos(s) - Math.sin(r) * Math.sin(i));
995
+ calcPointByBearAndDis(e, t, n) {
996
+ const s = g.toRadians(e.lat * 1), a = g.toRadians(e.lng * 1), r = n / this.R;
997
+ t = g.toRadians(t);
998
+ const i = Math.asin(Math.sin(s) * Math.cos(r) + Math.cos(s) * Math.sin(r) * Math.cos(t)), o = a + Math.atan2(Math.sin(t) * Math.sin(r) * Math.cos(s), Math.cos(r) - Math.sin(s) * Math.sin(i));
858
999
  return {
859
1000
  lat: g.toDegrees(i),
860
1001
  lng: g.toDegrees(o)
861
1002
  };
862
1003
  },
863
- mercatorTolonlat(t, e) {
864
- const n = t / 2003750834e-2 * 180;
865
- var r = e / 2003750834e-2 * 180;
866
- const a = 180 / Math.PI * (2 * Math.atan(Math.exp(r * Math.PI / 180)) - Math.PI / 2);
1004
+ /**
1005
+ * 将墨卡托坐标转换为经纬度坐标
1006
+ *
1007
+ * @param x 墨卡托坐标的x值
1008
+ * @param y 墨卡托坐标的y值
1009
+ * @returns 返回包含转换后的经度lng和纬度lat的对象
1010
+ */
1011
+ mercatorTolonlat(e, t) {
1012
+ const n = e / 2003750834e-2 * 180;
1013
+ var s = t / 2003750834e-2 * 180;
1014
+ const a = 180 / Math.PI * (2 * Math.atan(Math.exp(s * Math.PI / 180)) - Math.PI / 2);
867
1015
  return { lng: n, lat: a };
868
1016
  },
869
- lonlatToMercator(t, e) {
1017
+ /**
1018
+ * 将经纬度坐标转换为墨卡托坐标
1019
+ *
1020
+ * @param lng 经度值
1021
+ * @param lat 纬度值
1022
+ * @returns 墨卡托坐标对象,包含x和y属性
1023
+ */
1024
+ lonlatToMercator(e, t) {
870
1025
  var n = 6378137;
871
- const r = t * Math.PI / 180 * n;
872
- var a = e * Math.PI / 180;
873
- const s = n / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a)));
874
- return { x: r, y: s };
1026
+ const s = e * Math.PI / 180 * n;
1027
+ var a = t * Math.PI / 180;
1028
+ const r = n / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a)));
1029
+ return { x: s, y: r };
875
1030
  }
876
- }, nt = {
1031
+ }, ot = {
877
1032
  /**
878
- * 将base64类型编码的图片转换成blob类型
1033
+ * 将Base64编码的字符串转换为Blob对象
879
1034
  *
880
- * @param {*} data
881
- * @returns {*}
1035
+ * @param data Base64编码的字符串
1036
+ * @returns 转换后的Blob对象
882
1037
  */
883
- convertBase64ToBlob(t) {
884
- for (var e = t.split(",")[0].split(":")[1].split(";")[0], n = window.atob(t.split(",")[1]), r = new ArrayBuffer(n.length), a = new Uint8Array(r), s = 0; s < n.length; s++)
885
- a[s] = n.charCodeAt(s);
886
- var i = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
887
- return i ? (i = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)(), i.append(r), i.getBlob(e)) : (i = new Blob([r], {
888
- type: e
889
- }), i);
1038
+ convertBase64ToBlob(e) {
1039
+ const t = e.split(",")[0].split(":")[1].split(";")[0], n = atob(e.split(",")[1]), s = new Array(n.length);
1040
+ for (let i = 0; i < n.length; i++)
1041
+ s[i] = n.charCodeAt(i);
1042
+ const a = new Uint8Array(s);
1043
+ return new Blob([a], { type: t });
890
1044
  },
891
1045
  /**
892
- * 将url图片转换成base64编码的图片,也可用于图片压缩
1046
+ * 将图片的URL转换为Base64编码
893
1047
  *
894
- * @param {*} url 需要转换的图片url
895
- * @param {*} width 指定宽高,如未指定则使用默认宽度
896
- * @param {*} height
897
- * @returns {*}
1048
+ * @param url 图片的URL地址
1049
+ * @param width 图片的宽度,默认为图片原始宽度
1050
+ * @param height 图片的高度,默认为图片原始高度
1051
+ * @returns 返回Promise对象,解析后得到包含Base64编码数据的对象
898
1052
  */
899
- convertUrlToBase64(t, e, n) {
900
- return new Promise(function(r, a) {
901
- var s = new Image();
902
- s.crossOrigin = "Anonymous", s.src = t, s.onload = function() {
1053
+ convertUrlToBase64(e, t, n) {
1054
+ return new Promise((s, a) => {
1055
+ var r = new Image();
1056
+ r.crossOrigin = "Anonymous", r.src = e, r.onload = function() {
903
1057
  var i = document.createElement("canvas");
904
- i.width = e || s.width, i.height = n || s.height;
1058
+ i.width = t || r.width, i.height = n || r.height;
905
1059
  var o = i.getContext("2d");
906
- o.drawImage(s, 0, 0, s.width, s.height);
907
- var c = s.src.substring(s.src.lastIndexOf(".") + 1).toLowerCase(), l = i.toDataURL("image/" + c), h = {
1060
+ if (!o) {
1061
+ a(new Error("Failed to get canvas context"));
1062
+ return;
1063
+ }
1064
+ o.drawImage(r, 0, 0, r.width, r.height);
1065
+ var c = r.src.substring(r.src.lastIndexOf(".") + 1).toLowerCase(), l = i.toDataURL("image/" + c), h = {
908
1066
  dataURL: l,
909
1067
  type: "image/" + c,
910
1068
  ext: c
911
1069
  };
912
- r(h);
913
- };
1070
+ s(h);
1071
+ }, r.onerror = a;
914
1072
  });
915
1073
  },
916
1074
  /**
917
- * 将base64类型编码的图片转换成file类型
1075
+ * 将base64字符串转换为文件对象
918
1076
  *
919
- * @param {*} dataurl
920
- * @param {*} filename
921
- * @returns {*}
1077
+ * @param dataurl 包含base64字符串的数据URL
1078
+ * @param filename 文件的名称
1079
+ * @returns 返回文件对象
922
1080
  */
923
- convertBase64ToFile(t, e) {
924
- for (var n = t.split(","), r = n[0].match(/:(.*?);/)[1], a = atob(n[1]), s = a.length, i = new Uint8Array(s); s--; )
925
- i[s] = a.charCodeAt(s);
926
- return new File([i], e, { type: r });
1081
+ convertBase64ToFile(e, t) {
1082
+ const n = e.split(","), s = n[0].match(/:(.*?);/), a = s ? s[1] : "image/png", r = atob(n[1]), i = new Uint8Array(r.length);
1083
+ for (let c = 0; c < r.length; c++)
1084
+ i[c] = r.charCodeAt(c);
1085
+ return new File([i], t, { type: a });
927
1086
  },
928
1087
  /**
929
1088
  * 直接下载文件,支持blob类型和url类型
@@ -931,164 +1090,175 @@ const et = {
931
1090
  * @param {*} data
932
1091
  * @param {*} saveName
933
1092
  */
934
- downloadFromFile(t, e) {
935
- if (typeof t == "object")
936
- if (t instanceof Blob)
937
- t = URL.createObjectURL(t);
1093
+ downloadFromFile(e, t) {
1094
+ if (typeof e == "object")
1095
+ if (e instanceof Blob)
1096
+ e = URL.createObjectURL(e);
938
1097
  else {
939
- const r = JSON.stringify(t), a = new Blob([r], { type: "text/json" });
940
- t = window.URL.createObjectURL(a);
1098
+ const s = JSON.stringify(e), a = new Blob([s], { type: "text/json" });
1099
+ e = window.URL.createObjectURL(a);
941
1100
  }
942
- else if (typeof t == "string" && t.indexOf("http") === -1) {
943
- const r = new Blob([t], { type: "text/json" });
944
- t = window.URL.createObjectURL(r);
1101
+ else if (typeof e == "string" && e.indexOf("http") === -1) {
1102
+ const s = new Blob([e], { type: "text/json" });
1103
+ e = window.URL.createObjectURL(s);
945
1104
  }
946
1105
  var n = document.createElement("a");
947
- n.href = t, n.download = e || "", n.click(), window.URL.revokeObjectURL(n.href);
1106
+ n.href = e, n.download = t || "", n.click(), window.URL.revokeObjectURL(n.href);
948
1107
  }
949
- }, rt = {
1108
+ }, ct = {
950
1109
  /**
951
- * @desc 在事件被触发n秒后再执行回调函数,如果在这n秒内又被触发,则重新计时
952
- * @desc 防止onresize,scroll,mousemove ,mousehover等,会被频繁触发影响性能
953
- * @param func 需要执行的函数
954
- * @param wait 延迟执行时间(毫秒)
955
- * @param immediate---true 表立即执行,false 表非立即执行
956
- * eg: window.addEventListener("resize",debounce(handle,1000));
957
- * @returns {*}
1110
+ * 防抖函数,在指定的等待时间内,如果连续触发事件,则只在最后一次触发后执行函数。
1111
+ *
1112
+ * @param func 需要防抖的函数。
1113
+ * @param wait 等待时间,单位毫秒。
1114
+ * @param immediate 是否立即执行函数,默认为true
1115
+ * @returns 返回防抖后的函数。
958
1116
  */
959
- debounce(t, e, n = !0) {
960
- let r, a, s, i, o;
1117
+ debounce(e, t, n = !0) {
1118
+ let s = null, a, r, i, o;
961
1119
  const c = function() {
962
- const l = +/* @__PURE__ */ new Date() - i;
963
- l < e && l > 0 ? r = setTimeout(c, e - l) : (r = null, n || (o = t.apply(s, a), r || (s = a = null)));
1120
+ const l = Date.now() - i;
1121
+ l < t && l > 0 ? s = setTimeout(c, t - l) : (s = null, n || (o = e.apply(r, a)));
964
1122
  };
965
1123
  return function(...l) {
966
- s = this, i = +/* @__PURE__ */ new Date();
967
- const h = n && !r;
968
- return r || (r = setTimeout(c, e)), h && (o = t.apply(s, l), s = l = null), o;
1124
+ r = this, i = Date.now();
1125
+ const h = n && !s;
1126
+ return s || (s = setTimeout(c, t)), h && (o = e.apply(r, l), s || (r = l = null)), o;
969
1127
  };
970
1128
  },
971
- /**
972
- * 规定一个单位时间,在这个单位时间内,只能有一次触发事件的回调函数执行,如果在同一个单位时间内某事件被触发多次,只有一次能生效
973
- *
974
- * @param {*} func
975
- * @param {*} wait
976
- * @param {*} type 1 表时间戳版,2 表定时器版
977
- * @returns {*}
978
- */
979
- throttle(t, e, n) {
980
- if (n === 1)
981
- var r = 0;
982
- else if (n === 2)
983
- var a;
984
- return function() {
985
- let s = this, i = arguments;
1129
+ throttle(e, t, n) {
1130
+ let s = 0, a = null;
1131
+ return function(...r) {
1132
+ const i = this;
986
1133
  if (n === 1) {
987
- let o = Date.now();
988
- o - r > e && (t.apply(s, i), r = o);
1134
+ const o = Date.now();
1135
+ o - s > t && (e.apply(i, r), s = o);
989
1136
  } else n === 2 && (a || (a = setTimeout(() => {
990
- a = null, t.apply(s, i);
991
- }, e)));
1137
+ a = null, e.apply(i, r);
1138
+ }, t)));
992
1139
  };
993
1140
  },
994
1141
  /**
995
- * 延时递归
1142
+ * 递归调用函数,以一定的频率和持续时间执行。
996
1143
  *
997
- * @param {Number} frequency 间隔时间ms
998
- * @param {Number} duration 持续时间ms
1144
+ * @param fun 要递归调用的函数。
1145
+ * @param frequency 每次调用函数之间的时间间隔,单位为毫秒,默认为500毫秒。
1146
+ * @param duration 函数递归调用的总时长,单位为毫秒,默认为5000毫秒。
999
1147
  */
1000
- recurve(t, e = 500, n = 5e3) {
1001
- let r = 0;
1002
- setTimeout(function a() {
1003
- r++, r < Math.floor(n / e) && (t.call(this), setTimeout(a, e));
1004
- });
1148
+ recurve(e, t = 500, n = 5e3) {
1149
+ let s = 0;
1150
+ setTimeout(() => {
1151
+ s++, s < Math.floor(n / t) && (e.call(this), setTimeout(this.recurve.bind(this, e, t, n), t));
1152
+ }, t);
1005
1153
  }
1006
- }, q = {
1154
+ }, Y = {
1007
1155
  /**
1008
- * 常用正则验证
1156
+ * 校验字符串是否符合指定类型
1009
1157
  *
1010
- * @param {*} str
1011
- * @param {*} type
1012
- * @returns {*}
1158
+ * @param str 待校验字符串
1159
+ * @param type 校验类型,可选值包括:
1160
+ * - 'phone': 手机号码
1161
+ * - 'tel': 座机
1162
+ * - 'card': 身份证
1163
+ * - 'pwd': 密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线)
1164
+ * - 'postal': 邮政编码
1165
+ * - 'QQ': QQ号
1166
+ * - 'email': 邮箱
1167
+ * - 'money': 金额(小数点2位)
1168
+ * - 'URL': 网址
1169
+ * - 'IP': IP地址
1170
+ * - 'date': 日期时间
1171
+ * - 'number': 数字
1172
+ * - 'english': 英文
1173
+ * - 'chinese': 中文
1174
+ * - 'lower': 小写字母
1175
+ * - 'upper': 大写字母
1176
+ * - 'HTML': HTML标记
1177
+ * @returns 校验结果,符合返回true,否则返回false
1013
1178
  */
1014
- checkStr(t, e) {
1015
- switch (e) {
1179
+ checkStr(e, t) {
1180
+ switch (t) {
1016
1181
  case "phone":
1017
- return /^1[3|4|5|6|7|8|9][0-9]{9}$/.test(t);
1182
+ return /^1[3|4|5|6|7|8|9][0-9]{9}$/.test(e);
1018
1183
  case "tel":
1019
- return /^(0\d{2,3}-\d{7,8})(-\d{1,4})?$/.test(t);
1184
+ return /^(0\d{2,3}-\d{7,8})(-\d{1,4})?$/.test(e);
1020
1185
  case "card":
1021
- return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(t);
1186
+ return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(e);
1022
1187
  case "pwd":
1023
- return /^[a-zA-Z]\w{5,17}$/.test(t);
1188
+ return /^[a-zA-Z]\w{5,17}$/.test(e);
1024
1189
  case "postal":
1025
- return /[1-9]\d{5}(?!\d)/.test(t);
1190
+ return /[1-9]\d{5}(?!\d)/.test(e);
1026
1191
  case "QQ":
1027
- return /^[1-9][0-9]{4,9}$/.test(t);
1192
+ return /^[1-9][0-9]{4,9}$/.test(e);
1028
1193
  case "email":
1029
- return /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(t);
1194
+ return /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(e);
1030
1195
  case "money":
1031
- return /^\d*(?:\.\d{0,2})?$/.test(t);
1196
+ return /^\d*(?:\.\d{0,2})?$/.test(e);
1032
1197
  case "URL":
1033
- return /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(t);
1198
+ return /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(e);
1034
1199
  case "IP":
1035
- return /((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))/.test(t);
1200
+ return /((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))/.test(e);
1036
1201
  case "date":
1037
- return /^(\d{4})\-(\d{2})\-(\d{2}) (\d{2})(?:\:\d{2}|:(\d{2}):(\d{2}))$/.test(t) || /^(\d{4})\-(\d{2})\-(\d{2})$/.test(t);
1202
+ return /^(\d{4})\-(\d{2})\-(\d{2}) (\d{2})(?:\:\d{2}|:(\d{2}):(\d{2}))$/.test(e) || /^(\d{4})\-(\d{2})\-(\d{2})$/.test(e);
1038
1203
  case "number":
1039
- return /^[0-9]$/.test(t);
1204
+ return /^[0-9]$/.test(e);
1040
1205
  case "english":
1041
- return /^[a-zA-Z]+$/.test(t);
1206
+ return /^[a-zA-Z]+$/.test(e);
1042
1207
  case "chinese":
1043
- return /^[\u4E00-\u9FA5]+$/.test(t);
1208
+ return /^[\u4E00-\u9FA5]+$/.test(e);
1044
1209
  case "lower":
1045
- return /^[a-z]+$/.test(t);
1210
+ return /^[a-z]+$/.test(e);
1046
1211
  case "upper":
1047
- return /^[A-Z]+$/.test(t);
1212
+ return /^[A-Z]+$/.test(e);
1048
1213
  case "HTML":
1049
- return /<("[^"]*"|'[^']*'|[^'">])*>/.test(t);
1214
+ return /<("[^"]*"|'[^']*'|[^'">])*>/.test(e);
1050
1215
  default:
1051
1216
  return !0;
1052
1217
  }
1053
1218
  },
1054
1219
  /**
1055
- * 字符串大小写转换 type: 1:首字母大写 2:首页母小写 3:大小写转换 4:全部大写 5:全部小写
1220
+ * 转换字符串大小写
1056
1221
  *
1057
- * @param {*} str
1058
- * @param {*} type
1059
- * @returns {*}
1222
+ * @param str 待转换的字符串
1223
+ * @param type 转换类型,可选值为 1-5,默认为 4
1224
+ * 1:首字母大写,其余小写
1225
+ * 2:首字母小写,其余大写
1226
+ * 3:字母大小写反转
1227
+ * 4:全部大写
1228
+ * 5:全部小写
1229
+ * @returns 转换后的字符串
1060
1230
  */
1061
- changeCase(t, e) {
1062
- switch (e = e || 4, e) {
1231
+ changeCase(e, t) {
1232
+ switch (t = t || 4, t) {
1063
1233
  case 1:
1064
- return t.replace(/\b\w+\b/g, function(n) {
1234
+ return e.replace(/\b\w+\b/g, function(n) {
1065
1235
  return n.substring(0, 1).toUpperCase() + n.substring(1).toLowerCase();
1066
1236
  });
1067
1237
  case 2:
1068
- return t.replace(/\b\w+\b/g, function(n) {
1238
+ return e.replace(/\b\w+\b/g, function(n) {
1069
1239
  return n.substring(0, 1).toLowerCase() + n.substring(1).toUpperCase();
1070
1240
  });
1071
1241
  case 3:
1072
- return t.split("").map(function(n) {
1242
+ return e.split("").map(function(n) {
1073
1243
  return /[a-z]/.test(n) ? n.toUpperCase() : n.toLowerCase();
1074
1244
  }).join("");
1075
1245
  case 4:
1076
- return t.toUpperCase();
1246
+ return e.toUpperCase();
1077
1247
  case 5:
1078
- return t.toLowerCase();
1248
+ return e.toLowerCase();
1079
1249
  default:
1080
- return t;
1250
+ return e;
1081
1251
  }
1082
1252
  },
1083
1253
  /**
1084
- * 处理字符串模板
1085
- * eg: tag`${abc}`
1086
- * @param {*} strArray
1087
- * @param {*} args
1088
- * @returns {*}
1254
+ * 根据字符串数组和参数生成新的字符串
1255
+ *
1256
+ * @param strArray 字符串数组
1257
+ * @param args 可变参数列表,支持 Object、Array 类型和任意其他类型,若为 null 或 undefined,则按类型默认转换为 '{}'、'[]' 或 ''
1258
+ * @returns 返回生成的新字符串
1089
1259
  */
1090
- tag(t, ...e) {
1091
- return e = e.map((n) => {
1260
+ tag(e, ...t) {
1261
+ return t = t.map((n) => {
1092
1262
  switch (E.getDataType(n)) {
1093
1263
  case "Object":
1094
1264
  return n || "{}";
@@ -1097,150 +1267,159 @@ const et = {
1097
1267
  default:
1098
1268
  return n || "";
1099
1269
  }
1100
- }), t.reduce((n, r, a) => `${n}${e[a - 1]}${r}`);
1270
+ }), e.reduce((n, s, a) => `${n}${t[a - 1]}${s}`);
1101
1271
  },
1102
1272
  /**
1103
- * 获取字符串字节长度
1104
- * @param {*} str
1105
- * @returns {*}
1273
+ * 计算字符串的字节长度
1274
+ *
1275
+ * @param str 需要计算字节长度的字符串
1276
+ * @returns 返回字符串的字节长度
1106
1277
  */
1107
- getByteLength(t) {
1108
- return t.replace(/[\u0391-\uFFE5]/g, "aa").length;
1278
+ getByteLength(e) {
1279
+ return e.replace(/[\u0391-\uFFE5]/g, "aa").length;
1109
1280
  },
1110
1281
  /**
1111
- * 根据字节长度截取字符串
1112
- * @param {*} str
1113
- * @param {*} n
1114
- * @returns {*}
1282
+ * 截取字符串中指定字节长度的子串
1283
+ *
1284
+ * @param str 字符串对象,包含replace、length和substring方法
1285
+ * @param start 截取起始位置
1286
+ * @param n 截取字节长度
1287
+ * @returns 返回截取后的子串
1115
1288
  */
1116
- subStringByte(t, e, n) {
1117
- var r = /[^\x00-\xff]/g;
1118
- if (t.replace(r, "mm").length <= n)
1119
- return t;
1120
- for (var a = Math.floor(n / 2), s = a; s < t.length; s++) {
1121
- let i = t.substring(e, s);
1122
- if (i.replace(r, "mm").length >= n)
1289
+ subStringByte(e, t, n) {
1290
+ var s = /[^\x00-\xff]/g;
1291
+ if (e.replace(s, "mm").length <= n)
1292
+ return e;
1293
+ for (var a = Math.floor(n / 2), r = a; r < e.length; r++) {
1294
+ let i = e.substring(t, r);
1295
+ if (i.replace(s, "mm").length >= n)
1123
1296
  return i;
1124
1297
  }
1125
- return t;
1298
+ return e;
1126
1299
  },
1127
- asString(t) {
1128
- if (E.isEmpty(t))
1300
+ /**
1301
+ * 将值转换为字符串
1302
+ *
1303
+ * @param value 要转换的值
1304
+ * @returns 转换后的字符串,如果值为空,则返回空字符串
1305
+ */
1306
+ asString(e) {
1307
+ if (E.isEmpty(e))
1129
1308
  return "";
1130
- switch (E.getDataType()) {
1309
+ switch (E.getDataType(e)) {
1131
1310
  case "Object":
1132
1311
  case "Array":
1133
- return JSON.stringify(t);
1312
+ return JSON.stringify(e);
1134
1313
  default:
1135
- return t;
1314
+ return e;
1136
1315
  }
1137
1316
  }
1138
- }, st = {
1139
- notNull(t) {
1140
- if (E.isEmpty(t))
1141
- throw Error("不能为空:>>>" + t);
1317
+ }, lt = {
1318
+ notNull(e) {
1319
+ if (E.isEmpty(e))
1320
+ throw Error("不能为空:>>>" + e);
1142
1321
  },
1143
- legalLnglat(t, e) {
1144
- if (!j.isLnglat(t, e))
1145
- throw Error(m.COORDINATE_ERROR);
1322
+ legalLnglat(e, t) {
1323
+ if (!q.isLnglat(e, t))
1324
+ throw Error(p.COORDINATE_ERROR);
1146
1325
  },
1147
- contain(t, ...e) {
1326
+ contain(e, ...t) {
1148
1327
  let n = !1;
1149
- const r = e.length || 0;
1150
- for (let a = 0, s = r; a < s; a++)
1151
- n = t.indexOf(e[a]) >= 0;
1328
+ const s = t.length || 0;
1329
+ for (let a = 0, r = s; a < r; a++)
1330
+ n = e.indexOf(t[a]) >= 0;
1152
1331
  if (n)
1153
- throw Error(m.STRING_CHECK_LOSS);
1332
+ throw Error(p.STRING_CHECK_LOSS);
1154
1333
  },
1155
1334
  verify: {
1156
- array(t) {
1157
- if (E.getDataType(t) !== "Array")
1158
- throw Error(m.PARAMETER_ERROR_ARRAY + ":>>>" + t);
1335
+ array(e) {
1336
+ if (E.getDataType(e) !== "Array")
1337
+ throw Error(p.PARAMETER_ERROR_ARRAY + ":>>>" + e);
1159
1338
  },
1160
- function(t) {
1161
- if (E.getDataType(t) !== "Function")
1162
- throw Error(m.PARAMETER_ERROR_FUNCTION + ":>>>" + t);
1339
+ function(e) {
1340
+ if (E.getDataType(e) !== "Function")
1341
+ throw Error(p.PARAMETER_ERROR_FUNCTION + ":>>>" + e);
1163
1342
  },
1164
- object(t) {
1165
- if (E.getDataType(t) !== "Object")
1166
- throw Error(m.PARAMETER_ERROR_OBJECT + ":>>>" + t);
1343
+ object(e) {
1344
+ if (E.getDataType(e) !== "Object")
1345
+ throw Error(p.PARAMETER_ERROR_OBJECT + ":>>>" + e);
1167
1346
  }
1168
1347
  },
1169
- legalJSON(t) {
1348
+ legalJSON(e) {
1170
1349
  try {
1171
- JSON.parse(t);
1350
+ JSON.parse(e);
1172
1351
  } catch {
1173
- throw Error(m.JSON_PARSE_ERROR + ":>>>" + t);
1352
+ throw Error(p.JSON_PARSE_ERROR + ":>>>" + e);
1174
1353
  }
1175
1354
  },
1176
- legalData(t, e) {
1177
- const n = q.checkStr(t, e);
1178
- let r = "";
1179
- switch (e) {
1355
+ legalData(e, t) {
1356
+ const n = Y.checkStr(e, t);
1357
+ let s = "";
1358
+ switch (t) {
1180
1359
  case "phone":
1181
- r = "电话";
1360
+ s = "电话";
1182
1361
  break;
1183
1362
  case "tel":
1184
- r = "座机";
1363
+ s = "座机";
1185
1364
  break;
1186
1365
  case "card":
1187
- r = "身份证";
1366
+ s = "身份证";
1188
1367
  break;
1189
1368
  case "pwd":
1190
- r = "密码";
1369
+ s = "密码";
1191
1370
  break;
1192
1371
  case "postal":
1193
- r = "邮政编码";
1372
+ s = "邮政编码";
1194
1373
  break;
1195
1374
  case "QQ":
1196
- r = "QQ";
1375
+ s = "QQ";
1197
1376
  break;
1198
1377
  case "email":
1199
- r = "邮箱";
1378
+ s = "邮箱";
1200
1379
  break;
1201
1380
  case "money":
1202
- r = "金额";
1381
+ s = "金额";
1203
1382
  break;
1204
1383
  case "URL":
1205
- r = "网址";
1384
+ s = "网址";
1206
1385
  break;
1207
1386
  case "IP":
1208
- r = "IP";
1387
+ s = "IP";
1209
1388
  break;
1210
1389
  case "date":
1211
- r = "日期时间";
1390
+ s = "日期时间";
1212
1391
  break;
1213
1392
  case "number":
1214
- r = "数字";
1393
+ s = "数字";
1215
1394
  break;
1216
1395
  case "english":
1217
- r = "英文";
1396
+ s = "英文";
1218
1397
  break;
1219
1398
  case "chinese":
1220
- r = "中文";
1399
+ s = "中文";
1221
1400
  break;
1222
1401
  case "lower":
1223
- r = "小写";
1402
+ s = "小写";
1224
1403
  break;
1225
1404
  case "upper":
1226
- r = "大写";
1405
+ s = "大写";
1227
1406
  break;
1228
1407
  case "HTML":
1229
- r = "HTML标记";
1408
+ s = "HTML标记";
1230
1409
  break;
1231
1410
  }
1232
1411
  if (!n)
1233
- throw Error(m.PARAMETER_ERROR + ":>>>不是" + r);
1412
+ throw Error(p.PARAMETER_ERROR + ":>>>不是" + s);
1234
1413
  }
1235
1414
  };
1236
- class at {
1237
- constructor(e) {
1415
+ class ht {
1416
+ constructor(t) {
1238
1417
  /**
1239
1418
  * Creates an instance of AudioPlayer.
1240
1419
  * @param {*} url
1241
1420
  */
1242
- v(this, "audio");
1243
- this.audio = new Audio(), this.audio.src = e;
1421
+ f(this, "audio");
1422
+ this.audio = new Audio(), this.audio.src = t;
1244
1423
  }
1245
1424
  play() {
1246
1425
  !this.muted && this.audio.play();
@@ -1254,18 +1433,18 @@ class at {
1254
1433
  /**
1255
1434
  * @description 设置静音状态,如果静音,autoplay属性将失效
1256
1435
  */
1257
- set muted(e) {
1258
- this.audio.muted = e;
1436
+ set muted(t) {
1437
+ this.audio.muted = t;
1259
1438
  }
1260
1439
  }
1261
- class it {
1262
- constructor(e) {
1263
- E.getDataType(e) === "String" && (e = document.querySelector("#" + e)), this.ctx = e.getContext("2d");
1440
+ class ut {
1441
+ constructor(t) {
1442
+ E.getDataType(t) === "String" && (t = document.querySelector("#" + t)), this.ctx = t.getContext("2d");
1264
1443
  }
1265
- drawLine(e, n, r, a, s = {}) {
1444
+ drawLine(t, n, s, a, r = {}) {
1266
1445
  this.cxt.beginPath();
1267
- const i = s.width || 1, o = s.color || "#000";
1268
- this.cxt.lineWidth = i, this.cxt.fillStyle = o, this.cxt.moveTo(e, n), this.cxt.lineTo(r, a), this.cxt.closePath(), this.cxt.fill();
1446
+ const i = r.width || 1, o = r.color || "#000";
1447
+ this.cxt.lineWidth = i, this.cxt.fillStyle = o, this.cxt.moveTo(t, n), this.cxt.lineTo(s, a), this.cxt.closePath(), this.cxt.fill();
1269
1448
  }
1270
1449
  /**
1271
1450
  * 绘制圆弧
@@ -1280,18 +1459,18 @@ class it {
1280
1459
  * @param {*} bgColor 圆弧的颜色
1281
1460
  * @memberof CanvasDrawer
1282
1461
  */
1283
- drawArc(e, n, r, a, s, i, o, c) {
1284
- o ? (this.cxt.fillStyle = c, this.cxt.beginPath(), this.cxt.arc(e, n, r, g.degreesToRadians(a), g.degreesToRadians(s), i), this.cxt.closePath(), this.cxt.fill()) : (this.cxt.strokeStyle = c, this.cxt.beginPath(), this.cxt.arc(e, n, r, g.degreesToRadians(a), g.degreesToRadians(s), i), this.cxt.stroke());
1462
+ drawArc(t, n, s, a, r, i, o, c) {
1463
+ o ? (this.cxt.fillStyle = c, this.cxt.beginPath(), this.cxt.arc(t, n, s, g.degreesToRadians(a), g.degreesToRadians(r), i), this.cxt.closePath(), this.cxt.fill()) : (this.cxt.strokeStyle = c, this.cxt.beginPath(), this.cxt.arc(t, n, s, g.degreesToRadians(a), g.degreesToRadians(r), i), this.cxt.stroke());
1285
1464
  }
1286
1465
  }
1287
- class ot {
1288
- constructor(e = 1) {
1289
- this.magnification = e;
1466
+ class dt {
1467
+ constructor(t = 1) {
1468
+ this.magnification = t;
1290
1469
  }
1291
1470
  // 获取系统类型
1292
1471
  _getSystem() {
1293
- var e = navigator.userAgent.toLowerCase();
1294
- if (e.indexOf("windows") >= 0)
1472
+ var t = navigator.userAgent.toLowerCase();
1473
+ if (t.indexOf("windows") >= 0)
1295
1474
  return !0;
1296
1475
  }
1297
1476
  // 获取页面缩放比例
@@ -1299,143 +1478,146 @@ class ot {
1299
1478
  // let t = this;
1300
1479
  // }
1301
1480
  // 监听方法兼容写法
1302
- _addHandler(e, n, r) {
1303
- e.addEventListener ? e.addEventListener(n, r, !1) : e.attachEvent ? e.attachEvent("on" + n, r) : e["on" + n] = r;
1481
+ _addHandler(t, n, s) {
1482
+ t.addEventListener ? t.addEventListener(n, s, !1) : t.attachEvent ? t.attachEvent("on" + n, s) : t["on" + n] = s;
1304
1483
  }
1305
1484
  // 校正浏览器缩放比例
1306
1485
  _correct() {
1307
- let e = window.innerWidth;
1308
- if (typeof e != "number" && (document.compatMode == "CSS1Compat" ? e = document.documentElement.clientWidth : e = document.body.clientWidth), e <= 750) {
1309
- const r = document.documentElement.clientWidth / e;
1310
- document.documentElement.style.fontSize = this.magnification * 75 * Math.min(r, 2) + "px";
1311
- } else if (e > 750 && e <= 1200) {
1312
- const r = document.documentElement.clientWidth / e;
1313
- document.documentElement.style.fontSize = this.magnification * 85 * Math.min(r, 2) + "px";
1486
+ let t = window.innerWidth;
1487
+ if (typeof t != "number" && (document.compatMode == "CSS1Compat" ? t = document.documentElement.clientWidth : t = document.body.clientWidth), t <= 750) {
1488
+ const s = document.documentElement.clientWidth / t;
1489
+ document.documentElement.style.fontSize = this.magnification * 75 * Math.min(s, 2) + "px";
1490
+ } else if (t > 750 && t <= 1200) {
1491
+ const s = document.documentElement.clientWidth / t;
1492
+ document.documentElement.style.fontSize = this.magnification * 85 * Math.min(s, 2) + "px";
1314
1493
  } else {
1315
- const r = document.documentElement.clientWidth / 1920;
1316
- document.documentElement.style.fontSize = this.magnification * 100 * Math.min(r, 2) + "px";
1494
+ const s = document.documentElement.clientWidth / 1920;
1495
+ document.documentElement.style.fontSize = this.magnification * 100 * Math.min(s, 2) + "px";
1317
1496
  }
1318
1497
  }
1319
1498
  // 监听页面缩放
1320
1499
  _watch() {
1321
- let e = this;
1322
- e._addHandler(window, "resize", function() {
1323
- e._correct();
1500
+ let t = this;
1501
+ t._addHandler(window, "resize", function() {
1502
+ t._correct();
1324
1503
  });
1325
1504
  }
1326
1505
  // 初始化页面比例
1327
1506
  init() {
1328
- let e = this;
1329
- e._getSystem() && (e._correct(), e._watch());
1507
+ let t = this;
1508
+ t._getSystem() && (t._correct(), t._watch());
1330
1509
  }
1331
1510
  }
1332
- function k() {
1333
- }
1334
- Object.assign(k.prototype, {
1335
- /**
1336
- * 添加监听器
1337
- * @param type{string}
1338
- * @param listener{function}
1339
- * @param mutexStatus{boolean}
1340
- */
1341
- addEventListener(t, e, n, r = !1) {
1342
- this._listeners === void 0 && (this._listeners = {}), this._mutex = this._mutex || {}, this._context = n;
1343
- const a = this._mutex, s = this._listeners;
1344
- return s[t] === void 0 && (s[t] = []), s[t].indexOf(e) === -1 && (r && (a[t] = e), s[t].push(e)), this;
1345
- },
1346
- hasEventListener(t, e) {
1347
- if (this._listeners === void 0) return !1;
1348
- const n = this._listeners;
1349
- return n[t] !== void 0 && n[t].indexOf(e) !== -1;
1350
- },
1351
- removeEventListener(t, e) {
1511
+ class K {
1512
+ constructor() {
1513
+ f(this, "_listeners");
1514
+ f(this, "_mutex", {});
1515
+ f(this, "_context");
1516
+ }
1517
+ addEventListener(t, n, s, a = !1) {
1518
+ this._listeners === void 0 && (this._listeners = {}), this._context = s;
1519
+ const r = this._mutex, i = this._listeners;
1520
+ return i[t] === void 0 && (i[t] = []), i[t].indexOf(n) === -1 && (a && (r[t] = n), i[t].push(n)), this;
1521
+ }
1522
+ hasEventListener(t, n) {
1523
+ if (this._listeners === null || this._listeners === void 0) return !1;
1524
+ const s = this._listeners;
1525
+ return s[t] !== void 0 && s[t].indexOf(n) !== -1;
1526
+ }
1527
+ removeEventListener(t, n) {
1352
1528
  if (this._listeners === void 0) return;
1353
- const r = this._listeners[t];
1354
- if (this._mutex[t] === e && (this._mutex[t] = null), r !== void 0) {
1355
- const a = r.map((s) => s.toString()).indexOf(e.toString());
1356
- a !== -1 && r.splice(a, 1);
1529
+ const a = this._listeners[t];
1530
+ if (this._mutex[t] === n && (this._mutex[t] = null), a !== void 0) {
1531
+ const r = a.map((i) => i.toString()).indexOf(n.toString());
1532
+ r !== -1 && a.splice(r, 1);
1357
1533
  }
1358
- },
1359
- /**
1360
- * 派发事件
1361
- * @param event{{type: string, message: {}}}
1362
- */
1534
+ }
1363
1535
  dispatchEvent(t) {
1364
1536
  if (this._listeners === void 0) return;
1365
- const n = this._listeners[t.type];
1366
- if (n !== void 0) {
1537
+ const s = this._listeners[t.type];
1538
+ if (s !== void 0) {
1367
1539
  t.target = this;
1368
- const r = n.slice(0);
1369
- if (this._mutex[t.type]) {
1370
- r.find((s) => s === this._mutex[t.type]).call(this._context || this, t);
1371
- return;
1540
+ const a = s.slice(0);
1541
+ if (this._mutex[t.type] !== void 0) {
1542
+ const r = a.find((i) => i === this._mutex[t.type]);
1543
+ if (r) {
1544
+ r.call(this._context || this, t);
1545
+ return;
1546
+ }
1547
+ }
1548
+ for (let r = 0, i = a.length; r < i; r++) {
1549
+ const o = a[r];
1550
+ typeof o == "function" && o.call(this._context || this, t);
1372
1551
  }
1373
- for (let a = 0, s = r.length; a < s; a++)
1374
- r[a].call(this._context || this, t);
1375
1552
  }
1376
- },
1553
+ }
1377
1554
  removeAllListener() {
1378
1555
  this._mutex = {};
1379
1556
  for (const t in this._listeners)
1380
1557
  this._listeners[t] = [];
1381
1558
  }
1382
- });
1383
- Object.assign(Map.prototype, {
1559
+ }
1560
+ class F extends Map {
1384
1561
  isEmpty() {
1385
1562
  return this.size === 0;
1386
- },
1563
+ }
1387
1564
  _values() {
1388
- return Array.from(Map.prototype.values.call(this));
1389
- },
1565
+ return Array.from(this.values());
1566
+ }
1390
1567
  _keys() {
1391
- return Array.from(Map.prototype.keys.call(this));
1392
- },
1568
+ return Array.from(this.keys());
1569
+ }
1393
1570
  _entries() {
1394
- return Array.from(Map.prototype.entries.call(this));
1571
+ return Array.from(this.entries());
1572
+ }
1573
+ fromEntries() {
1395
1574
  }
1396
- });
1397
- function N() {
1398
- return /* @__PURE__ */ new Map();
1399
1575
  }
1400
- N.fromEntries = function(t = []) {
1401
- const e = new N();
1402
- return t.forEach((n) => {
1403
- Array.isArray(n) && n.length === 2 && e.set(n[0], n[1]);
1404
- }), e;
1576
+ F.prototype.fromEntries = function(e = []) {
1577
+ const t = new F();
1578
+ return e.forEach((n) => {
1579
+ Array.isArray(n) && n.length === 2 && t.set(n[0], n[1]);
1580
+ }), t;
1405
1581
  };
1406
- class y extends k {
1407
- constructor(e = "ws://127.0.0.1:10088") {
1408
- super(), this.maxCheckTimes = 10, this.url = e, this.checkTimes = 0, this.connectStatus = !1, this.connect(), this.connCheckStatus(this.maxCheckTimes), y.instance = this;
1582
+ class ft extends K {
1583
+ constructor(n = "ws://127.0.0.1:10088") {
1584
+ super();
1585
+ f(this, "maxCheckTimes", 10);
1586
+ f(this, "url");
1587
+ f(this, "checkTimes", 0);
1588
+ f(this, "connectStatus", !1);
1589
+ f(this, "client", null);
1590
+ this.maxCheckTimes = 10, this.url = n, this.checkTimes = 0, this.connect(), this.connCheckStatus(this.maxCheckTimes);
1409
1591
  }
1410
1592
  connect() {
1411
1593
  if (this.disconnect(), this.url)
1412
1594
  try {
1413
1595
  if (console.info("创建ws连接>>>" + this.url), this.client = new WebSocket(this.url), this.client) {
1414
- const e = this;
1415
- this.client.onopen = function(n) {
1416
- e.dispatchEvent({
1417
- type: b.WEB_SOCKET_CONNECT,
1418
- message: n
1596
+ const n = this;
1597
+ this.client.onopen = function(s) {
1598
+ n.dispatchEvent({
1599
+ type: x.WEB_SOCKET_CONNECT,
1600
+ message: s
1419
1601
  });
1420
- }, this.client.onmessage = function(n) {
1421
- e.connectStatus = !0, e.dispatchEvent({
1422
- type: b.WEB_SOCKET_MESSAGE,
1423
- message: n
1602
+ }, this.client.onmessage = function(s) {
1603
+ n.connectStatus = !0, n.dispatchEvent({
1604
+ type: x.WEB_SOCKET_MESSAGE,
1605
+ message: s
1424
1606
  });
1425
- }, this.client.onclose = function(n) {
1426
- e.dispatchEvent({
1427
- type: b.WEB_SOCKET_CLOSE,
1428
- message: n
1607
+ }, this.client.onclose = function(s) {
1608
+ n.dispatchEvent({
1609
+ type: x.WEB_SOCKET_CLOSE,
1610
+ message: s
1429
1611
  });
1430
- }, this.checkTimes === this.maxCheckTimes && (this.client.onerror = function(n) {
1431
- e.dispatchEvent({
1432
- type: b.WEB_SOCKET_ERROR,
1433
- message: n
1612
+ }, this.checkTimes === this.maxCheckTimes && (this.client.onerror = function(s) {
1613
+ n.dispatchEvent({
1614
+ type: x.WEB_SOCKET_ERROR,
1615
+ message: s
1434
1616
  });
1435
1617
  });
1436
1618
  }
1437
- } catch (e) {
1438
- console.error("创建ws连接失败" + this.url + ":" + e);
1619
+ } catch (n) {
1620
+ console.error("创建ws连接失败" + this.url + ":" + n);
1439
1621
  }
1440
1622
  }
1441
1623
  disconnect() {
@@ -1446,36 +1628,30 @@ class y extends k {
1446
1628
  this.client = null;
1447
1629
  }
1448
1630
  }
1449
- connCheckStatus(e) {
1450
- this.checkTimes > e || setTimeout(() => {
1451
- this.checkTimes++, this.client && this.client.readyState !== 0 && this.client.readyState !== 1 && this.connect(), this.connCheckStatus(e);
1631
+ connCheckStatus(n) {
1632
+ this.checkTimes > n || setTimeout(() => {
1633
+ this.checkTimes++, this.client && this.client.readyState !== 0 && this.client.readyState !== 1 && this.connect(), this.connCheckStatus(n);
1452
1634
  }, 2e3);
1453
1635
  }
1454
- send(e) {
1455
- return this.client && this.client.readyState === 1 ? (this.client.send(e), !0) : (console.error(this.url + "消息发送失败:" + e), !1);
1636
+ send(n) {
1637
+ return this.client && this.client.readyState === 1 ? (this.client.send(n), !0) : (console.error(this.url + "消息发送失败:" + n), !1);
1456
1638
  }
1457
1639
  heartbeat() {
1458
1640
  setTimeout(() => {
1459
1641
  this.client && this.client.readyState === 1 && this.send("HeartBeat"), console.log("HeartBeat," + this.url), setTimeout(this.heartbeat, 3e4);
1460
1642
  }, 1e3);
1461
1643
  }
1462
- static getInstance() {
1463
- return y.instance ? y.instance : Object.freeze(new y());
1464
- }
1465
- static get _instance() {
1466
- return this.getInstance();
1467
- }
1468
1644
  }
1469
- class ct {
1470
- constructor(e = 1) {
1471
- v(this, "cacheType");
1472
- v(this, "storage");
1473
- if (this.cacheType = e, e === 1)
1645
+ class mt {
1646
+ constructor(t = 1) {
1647
+ f(this, "cacheType");
1648
+ f(this, "storage");
1649
+ if (this.cacheType = t, t === 1)
1474
1650
  this.storage = window.localStorage;
1475
- else if (e === 2)
1651
+ else if (t === 2)
1476
1652
  this.storage = window.sessionStorage;
1477
1653
  else
1478
- throw new Error(m.PARAMETER_ERROR);
1654
+ throw new Error(p.PARAMETER_ERROR);
1479
1655
  }
1480
1656
  /**
1481
1657
  * 设置带过期时间的LocalStorage
@@ -1484,39 +1660,39 @@ class ct {
1484
1660
  * @param expired 以秒为单位,默认为1小时
1485
1661
  * @returns {Object}
1486
1662
  */
1487
- setItem(e, n, r) {
1488
- const a = { key: e, value: n };
1663
+ setItem(t, n, s) {
1664
+ const a = { key: t, value: n };
1489
1665
  if (this.cacheType === 1) {
1490
- const s = Date.now();
1491
- r && (a.expired = s + r * 1e3);
1666
+ const r = Date.now();
1667
+ s && (a.expired = r + s * 1e3);
1492
1668
  }
1493
- return this.storage[e] = JSON.stringify(a), a;
1669
+ return this.storage[t] = JSON.stringify(a), a;
1494
1670
  }
1495
1671
  /***
1496
1672
  * 获取带过期时间的缓存
1497
1673
  * @param key
1498
1674
  * @returns {null|*}
1499
1675
  */
1500
- getItem(e) {
1501
- const n = this.storage.getItem(e);
1676
+ getItem(t) {
1677
+ const n = this.storage.getItem(t);
1502
1678
  if (n === null)
1503
1679
  return null;
1504
- const r = JSON.parse(n) || {};
1680
+ const s = JSON.parse(n) || {};
1505
1681
  if (this.cacheType === 1) {
1506
- const a = r.expired ? new Date(r.expired).getTime() : Date.now();
1682
+ const a = s.expired ? new Date(s.expired).getTime() : Date.now();
1507
1683
  if (Date.now() > a)
1508
- return this.remove(e), null;
1684
+ return this.remove(t), null;
1509
1685
  }
1510
- return r.value;
1686
+ return s.value;
1511
1687
  }
1512
1688
  /**
1513
1689
  * 移除指定缓存
1514
1690
  * @param keys
1515
1691
  */
1516
- remove(e) {
1517
- e && (e.indexOf(",") > -1 ? e.split(",").forEach((n) => {
1692
+ remove(t) {
1693
+ t && (t.indexOf(",") > -1 ? t.split(",").forEach((n) => {
1518
1694
  this.storage.removeItem(n);
1519
- }) : this.storage.removeItem(e));
1695
+ }) : this.storage.removeItem(t));
1520
1696
  }
1521
1697
  /**
1522
1698
  * 移出全部缓存
@@ -1526,29 +1702,31 @@ class ct {
1526
1702
  }
1527
1703
  }
1528
1704
  export {
1529
- J as AnimateUtils,
1530
- V as ArrayUtils,
1531
- st as AssertUtils,
1532
- at as AudioPlayer,
1533
- Q as BrowserUtils,
1534
- it as CanvasDrawer,
1535
- X as Cookie,
1536
- Z as CoordsUtils,
1537
- tt as DateUtils,
1538
- ot as DevicePixelRatio,
1539
- et as DomUtils,
1540
- m as ErrorType,
1541
- k as EventDispatcher,
1542
- b as EventType,
1543
- nt as FileUtils,
1544
- j as GeoUtils,
1545
- K as GraphicType,
1546
- N as HashMap,
1547
- H as LayerType,
1705
+ tt as AnimateUtils,
1706
+ et as ArrayUtils,
1707
+ lt as AssertUtils,
1708
+ ht as AudioPlayer,
1709
+ nt as BrowserUtils,
1710
+ ut as CanvasDrawer,
1711
+ st as Cookie,
1712
+ rt as CoordsUtils,
1713
+ at as DateUtils,
1714
+ dt as DevicePixelRatio,
1715
+ it as DomUtils,
1716
+ p as ErrorType,
1717
+ K as EventDispatcher,
1718
+ x as EventType,
1719
+ ot as FileUtils,
1720
+ q as GeoUtils,
1721
+ X as GraphicType,
1722
+ F as HashMap,
1723
+ Q as LayerType,
1548
1724
  g as MathUtils,
1549
- rt as OptimizeUtils,
1550
- q as StringUtils,
1725
+ V as MeasureMode,
1726
+ Z as ObjectState,
1727
+ ct as OptimizeUtils,
1728
+ Y as StringUtils,
1551
1729
  E as Utils,
1552
- y as WebSocketClient,
1553
- ct as WebStorage
1730
+ ft as WebSocketClient,
1731
+ mt as WebStorage
1554
1732
  };