nhanh-pure-function 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,72 +1,72 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".nhanh-pure-function{--nhanh: 2233}.no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
- var it = Object.defineProperty;
3
- var Q = (n) => {
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
+ var ct = Object.defineProperty;
3
+ var et = (n) => {
4
4
  throw TypeError(n);
5
5
  };
6
- var st = (n, e, t) => e in n ? it(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
7
- var E = (n, e, t) => st(n, typeof e != "symbol" ? e + "" : e, t), tt = (n, e, t) => e.has(n) || Q("Cannot " + t);
8
- var c = (n, e, t) => (tt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), h = (n, e, t) => e.has(n) ? Q("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), m = (n, e, t, o) => (tt(n, e, "write to private field"), o ? o.call(n, t) : e.set(n, t), t);
9
- function vt(n, e = 500) {
10
- let t, o = !0;
11
- function r(i) {
12
- if (!o) return;
13
- t || (t = i);
14
- let s = Math.min((i - t) / e, 1);
15
- n(s), i - t < e && requestAnimationFrame(r);
6
+ var at = (n, t, e) => t in n ? ct(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
7
+ var F = (n, t, e) => at(n, typeof t != "symbol" ? t + "" : t, e), nt = (n, t, e) => t.has(n) || et("Cannot " + e);
8
+ var a = (n, t, e) => (nt(n, t, "read from private field"), e ? e.call(n) : t.get(n)), h = (n, t, e) => t.has(n) ? et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), f = (n, t, e, r) => (nt(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
9
+ function bt(n, t = 500) {
10
+ let e, r = !0;
11
+ function o(i) {
12
+ if (!r) return;
13
+ e || (e = i);
14
+ let s = Math.min((i - e) / t, 1);
15
+ n(s), i - e < t && requestAnimationFrame(o);
16
16
  }
17
- return requestAnimationFrame(r), () => o = !1;
17
+ return requestAnimationFrame(o), () => r = !1;
18
18
  }
19
- function bt(n, e, t, o, r = 2) {
20
- let i = n, s = !1, a = 1, u = n, l = e, d = t;
21
- const f = () => {
22
- const x = (l - u) / d;
23
- return Number(x.toFixed(r));
19
+ function _t(n, t, e, r, o = 2) {
20
+ let i = n, s = !1, c = 1, u = n, l = t, m = e;
21
+ const d = () => {
22
+ const w = (l - u) / m;
23
+ return Number(w.toFixed(o));
24
24
  };
25
- let w = f();
26
- const L = (x) => Math.min(Math.max(x, u), l), A = (x) => Number(x.toFixed(r)), B = (x, X, H) => {
27
- const I = [];
28
- return x >= X && I.push("最小值必须小于最大值"), H <= 0 && I.push("分段数必须为正数"), I;
29
- }, rt = (x, X, H) => {
30
- const I = B(x, X, H);
31
- return I.length > 0 ? (console.error(`参数更新失败: ${I.join("; ")}`), !1) : (u = x, l = X, d = H, w = f(), i = L(i), !0);
32
- }, J = () => {
33
- s && (a = i >= l ? -1 : i <= u ? 1 : a, i = L(i + w * a), o(A(i)), requestAnimationFrame(J));
25
+ let g = d();
26
+ const v = (w) => Math.min(Math.max(w, u), l), E = (w) => Number(w.toFixed(o)), T = (w, W, V) => {
27
+ const R = [];
28
+ return w >= W && R.push("最小值必须小于最大值"), V <= 0 ? R.push("分段数必须为正数") : d() == 0 && R.push("数值精度过低,致使动画步长为 0"), R;
29
+ }, k = (w, W, V) => {
30
+ const R = T(w, W, V);
31
+ return R.length > 0 ? (console.error(`参数更新失败: ${R.join("; ")}`), !1) : (u = w, l = W, m = V, g = d(), i = v(i), !0);
32
+ }, H = () => {
33
+ s && (c = i >= l ? -1 : i <= u ? 1 : c, i = v(i + g * c), r(E(i)), requestAnimationFrame(H));
34
34
  };
35
35
  return {
36
36
  /** 启动/继续动画 */
37
- play(x = i) {
38
- if (i = L(x), B(u, l, d).length)
39
- return console.warn("配置参数错误", this.getParams());
40
- s || (s = !0, J());
37
+ play(w = i) {
38
+ if (i = v(w), T(u, l, m).length)
39
+ return console.error("配置参数错误", this.getParams());
40
+ s || (s = !0, H());
41
41
  },
42
42
  /** 暂停动画 */
43
43
  pause() {
44
44
  s = !1;
45
45
  },
46
46
  /** 获取当前值 */
47
- getCurrent: () => A(i),
47
+ getCurrent: () => E(i),
48
48
  /** 是否正在运行 */
49
49
  isPlaying: () => s,
50
50
  /** 更新参数(不中断动画) */
51
- updateParams: rt,
51
+ updateParams: k,
52
52
  /** 获取当前参数 */
53
- getParams: () => ({ min: u, max: l, steps: d, precision: r, stepSize: w })
53
+ getParams: () => ({ min: u, max: l, steps: m, precision: o, stepSize: g })
54
54
  };
55
55
  }
56
- function _t(n, e, t, o, r = 2) {
57
- if (t <= 0) return;
58
- const i = (f) => Number(f.toFixed(r)), s = e - n, a = i(Math.abs(s) / t);
59
- if (a === 0) return;
56
+ function Mt(n, t, e, r, o = 2) {
57
+ if (e <= 0) return console.error("动画步数 必须为正数");
58
+ const i = (d) => Number(d.toFixed(o)), s = t - n, c = i(Math.abs(s) / e);
59
+ if (c === 0) return console.error("数值精度过低,致使动画步长为 0");
60
60
  const u = Math.sign(s);
61
61
  let l = n;
62
- const d = () => {
63
- l = i(l + a * u), (u > 0 ? l < e : l > e) ? (o(l), requestAnimationFrame(d)) : o(e);
62
+ const m = () => {
63
+ l = i(l + c * u), (u > 0 ? l < t : l > t) ? (r(l), requestAnimationFrame(m)) : r(t);
64
64
  };
65
- d();
65
+ m();
66
66
  }
67
- function Et(n, e = "image/png") {
67
+ function Et(n, t = "image/png") {
68
68
  try {
69
- let t, o = e;
69
+ let e, r = t;
70
70
  if (n instanceof File)
71
71
  return URL.createObjectURL(n);
72
72
  if (typeof n == "string") {
@@ -75,80 +75,80 @@ function Et(n, e = "image/png") {
75
75
  if (s) {
76
76
  if (!s[2])
77
77
  return console.error("无效的数据 URL:缺少 base64 编码声明");
78
- if (o = s[1] || o, i = s[3], !i)
78
+ if (r = s[1] || r, i = s[3], !i)
79
79
  return console.error("数据 URL 包含空有效负载");
80
80
  }
81
81
  i = i.replace(/[^A-Za-z0-9+/=]/g, "");
82
- const a = atob(i);
83
- t = new Uint8Array(a.length);
84
- for (let u = 0; u < a.length; u++)
85
- t[u] = a.charCodeAt(u);
82
+ const c = atob(i);
83
+ e = new Uint8Array(c.length);
84
+ for (let u = 0; u < c.length; u++)
85
+ e[u] = c.charCodeAt(u);
86
86
  } else if (n instanceof ArrayBuffer)
87
- t = new Uint8Array(n);
87
+ e = new Uint8Array(n);
88
88
  else if (n instanceof Uint8Array)
89
- t = n;
89
+ e = n;
90
90
  else
91
91
  return console.error(
92
92
  "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
93
93
  );
94
- const r = new Blob([t], { type: o });
95
- return URL.createObjectURL(r);
96
- } catch (t) {
94
+ const o = new Blob([e], { type: r });
95
+ return URL.createObjectURL(o);
96
+ } catch (e) {
97
97
  return console.error(
98
98
  "数据到 ImageURL 的转换失败:",
99
- t.message,
100
- t.stack || "没有可用的堆栈跟踪"
99
+ e.message,
100
+ e.stack || "没有可用的堆栈跟踪"
101
101
  ), null;
102
102
  }
103
103
  }
104
- function Mt(n, e = 10) {
105
- let t = 0, o = e;
106
- function r() {
107
- if (o > 0)
108
- o--, requestAnimationFrame(r);
104
+ function Ft(n, t = 10) {
105
+ let e = 0, r = t;
106
+ function o() {
107
+ if (r > 0)
108
+ r--, requestAnimationFrame(o);
109
109
  else {
110
- const s = (+/* @__PURE__ */ new Date() - t) / e, a = 1e3 / s;
111
- n(Number(a.toFixed(2)), Number(s.toFixed(2)));
110
+ const s = (+/* @__PURE__ */ new Date() - e) / t, c = 1e3 / s;
111
+ n(Number(c.toFixed(2)), Number(s.toFixed(2)));
112
112
  }
113
113
  }
114
114
  requestAnimationFrame(() => {
115
- t = +/* @__PURE__ */ new Date(), r();
115
+ e = +/* @__PURE__ */ new Date(), o();
116
116
  });
117
117
  }
118
- function Ft(n) {
119
- const e = () => Promise.resolve(), t = (a) => (console.error(a), Promise.reject(a));
120
- function o() {
121
- return navigator.clipboard.writeText(n).then(e).catch(t);
122
- }
118
+ function Ct(n) {
119
+ const t = () => Promise.resolve(), e = (c) => (console.error(c), Promise.reject(c));
123
120
  function r() {
124
- const a = document.createElement("div");
125
- a.innerText = n, document.body.appendChild(a);
121
+ return navigator.clipboard.writeText(n).then(t).catch(e);
122
+ }
123
+ function o() {
124
+ const c = document.createElement("div");
125
+ c.innerText = n, document.body.appendChild(c);
126
126
  const u = document.createRange();
127
- u.selectNodeContents(a);
127
+ u.selectNodeContents(c);
128
128
  const l = window.getSelection();
129
- let d = !1;
130
- return l && (l.removeAllRanges(), l.addRange(u), d = document.execCommand("copy")), document.body.removeChild(a), d ? Promise.resolve() : Promise.reject();
129
+ let m = !1;
130
+ return l && (l.removeAllRanges(), l.addRange(u), m = document.execCommand("copy")), document.body.removeChild(c), m ? Promise.resolve() : Promise.reject();
131
131
  }
132
132
  function i() {
133
- const a = document.createElement("textarea");
134
- a.value = n, document.body.appendChild(a), a.select(), a.setSelectionRange(0, n.length);
133
+ const c = document.createElement("textarea");
134
+ c.value = n, document.body.appendChild(c), c.select(), c.setSelectionRange(0, n.length);
135
135
  let u = !1;
136
- return document.activeElement === a && (u = document.execCommand("Copy", !0)), document.body.removeChild(a), u ? Promise.resolve() : Promise.reject();
136
+ return document.activeElement === c && (u = document.execCommand("Copy", !0)), document.body.removeChild(c), u ? Promise.resolve() : Promise.reject();
137
137
  }
138
138
  function s() {
139
- return r().then(e).catch(() => {
140
- i().then(e).catch(() => t("复制方式尽皆失效"));
139
+ return o().then(t).catch(() => {
140
+ i().then(t).catch(() => e("复制方式尽皆失效"));
141
141
  });
142
142
  }
143
- return navigator.clipboard ? o().catch(s) : s();
143
+ return navigator.clipboard ? r().catch(s) : s();
144
144
  }
145
- class ct {
145
+ class lt {
146
146
  /** 请使用静态方法 */
147
147
  constructor() {
148
148
  }
149
149
  /** 添加已有窗口 */
150
- static add(e, t) {
151
- this.keys.set(e, t);
150
+ static add(t, e) {
151
+ this.keys.set(t, e);
152
152
  }
153
153
  /**
154
154
  * 根据键打开或聚焦窗口
@@ -158,15 +158,15 @@ class ct {
158
158
  * @param windowFeatures 新窗口的特性
159
159
  * @returns 返回已打开或新打开的窗口
160
160
  */
161
- static open(e, t, o, r) {
162
- const i = this.keys.get(e);
161
+ static open(t, e, r, o) {
162
+ const i = this.keys.get(t);
163
163
  if (i && !i.closed)
164
164
  return i.focus(), i;
165
165
  {
166
- const s = window.open(t, o, r);
166
+ const s = window.open(e, r, o);
167
167
  if (s)
168
- return this.keys.set(e, s), s;
169
- console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(e);
168
+ return this.keys.set(t, s), s;
169
+ console.error("window.open failed: 可能是浏览器阻止了弹出窗口"), this.keys.delete(t);
170
170
  }
171
171
  }
172
172
  /**
@@ -174,37 +174,36 @@ class ct {
174
174
  * @param key 窗口的唯一键
175
175
  * @returns 如果窗口打开则返回true,否则返回false
176
176
  */
177
- static isOpen(e) {
178
- const t = this.keys.get(e);
179
- return t != null && t.closed && this.keys.delete(e), this.keys.has(e);
177
+ static isOpen(t) {
178
+ const e = this.keys.get(t);
179
+ return e != null && e.closed && this.keys.delete(t), this.keys.has(t);
180
180
  }
181
181
  /**
182
182
  * 获取与指定键关联的窗口
183
183
  * @param key 窗口的唯一键
184
184
  * @returns 返回对应的窗口,如果窗口已关闭则返回undefined
185
185
  */
186
- static getWindow(e) {
187
- if (this.isOpen(e)) return this.keys.get(e);
186
+ static getWindow(t) {
187
+ if (this.isOpen(t)) return this.keys.get(t);
188
188
  }
189
189
  /**
190
190
  * 关闭与指定键关联的窗口
191
191
  * @param key 窗口的唯一键
192
192
  */
193
- static close(e) {
194
- const t = this.keys.get(e);
195
- t && (t.close(), this.keys.delete(e));
193
+ static close(t) {
194
+ const e = this.keys.get(t);
195
+ e && (e.close(), this.keys.delete(t));
196
196
  }
197
197
  /**
198
198
  * 关闭所有打开的窗口并清空Map
199
199
  */
200
200
  static closeAll() {
201
- this.keys.forEach((e, t) => e.close()), this.keys.clear();
201
+ this.keys.forEach((t, e) => t.close()), this.keys.clear();
202
202
  }
203
203
  }
204
204
  // 存储键与对应窗口的Map
205
- E(ct, "keys", /* @__PURE__ */ new Map());
206
- const at = {
207
- /* 常见扩展名映射 */
205
+ F(lt, "keys", /* @__PURE__ */ new Map());
206
+ const ut = {
208
207
  ".mp3": "audio/mpeg",
209
208
  ".mp4": "video/mp4",
210
209
  ".m4a": "audio/mp4",
@@ -266,8 +265,7 @@ const at = {
266
265
  ".otf": "font/otf",
267
266
  ".eot": "application/vnd.ms-fontobject",
268
267
  ".map": "application/json"
269
- // 可根据需要继续扩展
270
- }, V = {
268
+ }, J = {
271
269
  image: [
272
270
  ".jpg",
273
271
  ".jpeg",
@@ -447,7 +445,7 @@ const at = {
447
445
  ".awk",
448
446
  ".php"
449
447
  ]
450
- }, et = [
448
+ }, rt = [
451
449
  "",
452
450
  "万",
453
451
  "亿",
@@ -462,41 +460,41 @@ const at = {
462
460
  "载",
463
461
  "极"
464
462
  ];
465
- function Ct(n) {
463
+ function Lt(n) {
466
464
  return n.charAt(0).toUpperCase() + n.slice(1);
467
465
  }
468
- function Pt(n, e, t = 2) {
469
- return !Number.isFinite(n) || !Number.isFinite(e) || !Number.isFinite(t) ? (console.error("所有参数必须是有限的数字"), "") : e === 0 ? (console.error("分母不能为零"), "") : t < 0 ? (console.error("小数位数不能为负数"), "") : (n / e * 100).toFixed(t) + "%";
466
+ function Tt(n, t, e = 2) {
467
+ return !Number.isFinite(n) || !Number.isFinite(t) || !Number.isFinite(e) ? (console.error("所有参数必须是有限的数字"), "") : t === 0 ? (console.error("分母不能为零"), "") : e < 0 ? (console.error("小数位数不能为负数"), "") : (n / t * 100).toFixed(e) + "%";
470
468
  }
471
- function Lt(n) {
472
- const t = n.toString().split("."), o = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
473
- return t.length > 1 ? o + "." + t[1] : o;
469
+ function Pt(n) {
470
+ const e = n.toString().split("."), r = e[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
471
+ return e.length > 1 ? r + "." + e[1] : r;
474
472
  }
475
- function Ut(n, e) {
476
- const t = {
473
+ function Ut(n, t) {
474
+ const e = {
477
475
  join: !0,
478
476
  suffix: "",
479
477
  decimalPlaces: 2
480
- }, { join: o, suffix: r, decimalPlaces: i } = {
481
- ...t,
482
- ...e || {}
478
+ }, { join: r, suffix: o, decimalPlaces: i } = {
479
+ ...e,
480
+ ...t || {}
483
481
  }, s = Number(n);
484
- if (isNaN(s)) return o ? `0${r}` : [0, r];
485
- const a = Math.abs(s), u = s >= 0, l = Math.max(0, Math.floor(Math.log10(a) / 4)), d = Math.pow(1e4, l), f = a / d, w = (u ? 1 : -1) * parseFloat(f.toFixed(Math.max(0, i)));
486
- return o ? `${w}${et[l]}${r}` : [w, et[l] + r];
482
+ if (isNaN(s)) return r ? `0${o}` : [0, o];
483
+ const c = Math.abs(s), u = s >= 0, l = Math.max(0, Math.floor(Math.log10(c) / 4)), m = Math.pow(1e4, l), d = c / m, g = (u ? 1 : -1) * parseFloat(d.toFixed(Math.max(0, i)));
484
+ return r ? `${g}${rt[l]}${o}` : [g, rt[l] + o];
487
485
  }
488
- function Tt(n) {
489
- const e = ["B", "KB", "MB", "GB", "TB", "PB"];
490
- let t = 0;
486
+ function Rt(n) {
487
+ const t = ["B", "KB", "MB", "GB", "TB", "PB"];
488
+ let e = 0;
491
489
  for (; n > 1024; )
492
- n /= 1024, t++;
493
- return `${Math.round(n * 100) / 100} ${e[t]}`;
490
+ n /= 1024, e++;
491
+ return `${Math.round(n * 100) / 100} ${t[e]}`;
494
492
  }
495
- function jt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
496
- const o = new Date(n);
497
- if (isNaN(o.getTime()))
493
+ function jt(n, t = "YYYY-MM-DD hh:mm:ss", e = !0) {
494
+ const r = new Date(n);
495
+ if (isNaN(r.getTime()))
498
496
  return console.error("Invalid date"), "";
499
- const r = {
497
+ const o = {
500
498
  YYYY: (i) => i.getFullYear(),
501
499
  MM: (i) => i.getMonth() + 1,
502
500
  // Adjust for 0-based month
@@ -506,53 +504,85 @@ function jt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
506
504
  ss: (i) => i.getSeconds(),
507
505
  ms: (i) => i.getMilliseconds()
508
506
  };
509
- return e.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
510
- const s = r[i](o);
511
- return t ? String(s).padStart(2, "0") : String(s);
507
+ return t.replace(/YYYY|MM|DD|hh|mm|ss|ms/g, (i) => {
508
+ const s = o[i](r);
509
+ return e ? String(s).padStart(2, "0") : String(s);
512
510
  });
513
511
  }
514
- function Z(n, e = "file") {
515
- if (!n || (n = String(n).trim(), n === "")) return e;
516
- const t = n.split("/");
517
- return t[t.length - 1].split("?")[0];
512
+ function Q(n, t = "file") {
513
+ if (!n || (n = String(n).trim(), n === "")) return t;
514
+ const e = n.split("/");
515
+ return e[e.length - 1].split("?")[0];
518
516
  }
519
- function Rt(n, e) {
520
- return n = n.replace(/([^a-zA-Z][a-z])/g, (t) => t.toUpperCase()), e ? n.replace(/[^a-zA-Z]+/g, "") : n;
517
+ function It(n, t) {
518
+ return n = n.replace(/([^a-zA-Z][a-z])/g, (e) => e.toUpperCase()), t ? n.replace(/[^a-zA-Z]+/g, "") : n;
521
519
  }
522
- function At(n, e, t = ",") {
523
- const o = new RegExp(
524
- `(^|${t})${e}(${t}|$)`,
520
+ function At(n, t, e = ",") {
521
+ const r = new RegExp(
522
+ `(^|${e})${t}(${e}|$)`,
525
523
  "g"
526
524
  );
527
- return n.replace(o, function(r, i, s) {
528
- return i === s ? t : "";
525
+ return n.replace(r, function(o, i, s) {
526
+ return i === s ? e : "";
529
527
  });
530
528
  }
531
- function It(n) {
529
+ function St(n) {
532
530
  return !(n === null || typeof n != "object" || Array.isArray(n));
533
531
  }
534
- function lt(n, e = 2) {
535
- return Array.isArray(n) && n.length >= e && n.every((t) => typeof t == "number" && Number.isFinite(t));
532
+ function mt(n, t = 2) {
533
+ if (Array.isArray(n) && n.length >= t) {
534
+ for (let r = 0; r < n.length; r++)
535
+ if (typeof n[r] != "number" || !Number.isFinite(n[r])) return !1;
536
+ } else return !1;
537
+ return !0;
536
538
  }
537
- function kt(n, e = 1, t = 2) {
538
- return Array.isArray(n) && n.length >= e && n.every((o) => lt(o, t));
539
+ function kt(n, t = 1, e = 2) {
540
+ if (Array.isArray(n) && n.length >= t) {
541
+ for (let o = 0; o < n.length; o++)
542
+ if (!mt(n[o], e)) return !1;
543
+ } else return !1;
544
+ return !0;
539
545
  }
540
- function St(n, e, t) {
541
- return Math.abs(n - e) <= t;
546
+ function Dt(n, t, e) {
547
+ return Math.abs(n - t) <= e;
542
548
  }
543
- function Dt(n, e) {
544
- let t = !1;
545
- const { x: o, y: r } = n, i = e.length;
546
- for (let s = 0, a = i - 1; s < i; a = s++) {
547
- const u = e[s].x, l = e[s].y, d = e[a].x, f = e[a].y;
548
- l > r != f > r && o < (d - u) * (r - l) / (f - l) + u && (t = !t);
549
+ function zt(n, t) {
550
+ let e = !1;
551
+ const { x: r, y: o } = n, i = t.length;
552
+ for (let s = 0, c = i - 1; s < i; c = s++) {
553
+ const u = t[s].x, l = t[s].y, m = t[c].x, d = t[c].y;
554
+ l > o != d > o && r < (m - u) * (o - l) / (d - l) + u && (e = !e);
555
+ }
556
+ return e;
557
+ }
558
+ function Ot(n, t, e, r) {
559
+ const o = Math.min(n[0], t[0]), i = Math.max(n[0], t[0]), s = Math.min(n[1], t[1]), c = Math.max(n[1], t[1]), u = [
560
+ [o, s],
561
+ // 左上
562
+ [i, s],
563
+ // 右上
564
+ [i, c],
565
+ // 右下
566
+ [o, c]
567
+ // 左下
568
+ ], l = r[1] - e[1], m = e[0] - r[0], d = r[0] * e[1] - e[0] * r[1];
569
+ if (l === 0 && m === 0) {
570
+ const [T, k] = e;
571
+ return T >= o && T <= i && k >= s && k <= c;
549
572
  }
550
- return t;
573
+ const g = 1e-10;
574
+ let v = !1, E = !1;
575
+ for (const [T, k] of u) {
576
+ const H = l * T + m * k + d;
577
+ if (Math.abs(H) < g || (H > g ? v = !0 : E = !0, v && E))
578
+ return !0;
579
+ }
580
+ return v && E;
551
581
  }
552
- function nt(n) {
582
+ function ot(n) {
553
583
  return Array.isArray(n) ? "array" : n === null ? "null" : typeof n;
554
584
  }
555
- function zt(n) {
585
+ function Nt(n) {
556
586
  return [
557
587
  "https:",
558
588
  // HTTPS协议,用于安全地浏览网页
@@ -574,51 +604,51 @@ function zt(n) {
574
604
  // Remote Desktop Protocol,用于安全的远程桌面连接
575
605
  "vpn:"
576
606
  // VPN协议,用于创建安全的网络连接
577
- ].some((t) => n.startsWith(t));
607
+ ].some((e) => n.startsWith(e));
578
608
  }
579
- function Ot(n) {
580
- return new Promise((e, t) => {
609
+ function qt(n) {
610
+ return new Promise((t, e) => {
581
611
  if (typeof n != "string" || n.trim() === "" || !n.includes("://")) {
582
- t(new Error("Invalid URL: Must be a non-empty string"));
612
+ e(new Error("Invalid URL: Must be a non-empty string"));
583
613
  return;
584
614
  }
585
615
  try {
586
616
  new XMLHttpRequest().open("HEAD", n, !0);
587
617
  } catch (i) {
588
- t(new Error(`Invalid URL format: ${i.message}`));
618
+ e(new Error(`Invalid URL format: ${i.message}`));
589
619
  return;
590
620
  }
591
- const o = new XMLHttpRequest();
592
- o.open("HEAD", n, !0);
593
- const r = (i) => {
594
- t(new Error(`Request failed: ${i.type}`));
621
+ const r = new XMLHttpRequest();
622
+ r.open("HEAD", n, !0);
623
+ const o = (i) => {
624
+ e(new Error(`Request failed: ${i.type}`));
595
625
  };
596
- o.onreadystatechange = function() {
597
- o.readyState === XMLHttpRequest.DONE && (o.status === 0 ? t(new Error("Network error or CORS blocked")) : o.status >= 200 && o.status < 300 ? e(!0) : t(new Error(`HTTP Error: ${o.status}`)));
598
- }, o.onerror = r, o.onabort = r, o.ontimeout = r;
626
+ r.onreadystatechange = function() {
627
+ r.readyState === XMLHttpRequest.DONE && (r.status === 0 ? e(new Error("Network error or CORS blocked")) : r.status >= 200 && r.status < 300 ? t(!0) : e(new Error(`HTTP Error: ${r.status}`)));
628
+ }, r.onerror = o, r.onabort = o, r.ontimeout = o;
599
629
  try {
600
- o.send();
630
+ r.send();
601
631
  } catch (i) {
602
- t(new Error(`Request send failed: ${i.message}`));
632
+ e(new Error(`Request send failed: ${i.message}`));
603
633
  }
604
634
  });
605
635
  }
606
- const C = class C {
636
+ const P = class P {
607
637
  constructor() {
608
- if (new.target === C)
638
+ if (new.target === P)
609
639
  throw new Error("请直接使用静态方法,而不是实例化此类");
610
640
  }
611
- static check(e, t) {
612
- if (!e || typeof e != "string")
613
- return console.error("Invalid URL provided"), t ? !1 : "unknown";
614
- const o = Z(e).toLowerCase();
615
- if (t) {
616
- if (!V.hasOwnProperty(t))
617
- return console.error(`Unknown file type: ${t}`), "unknown";
618
- const r = V[t];
619
- return C._checkExtension(o, r);
641
+ static check(t, e) {
642
+ if (!t || typeof t != "string")
643
+ return console.error("Invalid URL provided"), e ? !1 : "unknown";
644
+ const r = Q(t).toLowerCase();
645
+ if (e) {
646
+ if (!J.hasOwnProperty(e))
647
+ return console.error(`Unknown file type: ${e}`), "unknown";
648
+ const o = J[e];
649
+ return P._checkExtension(r, o);
620
650
  }
621
- return C._detectFileType(o);
651
+ return P._detectFileType(r);
622
652
  }
623
653
  /**
624
654
  * 静态方法,用于解析地址信息
@@ -628,10 +658,10 @@ const C = class C {
628
658
  * @param {string} url - 以逗号分隔的URL字符串,每个URL代表一个资源的位置
629
659
  * @returns {Array} - 包含每个URL及其相关信息(名称和类型)的对象数组
630
660
  */
631
- static parseAddresses(e) {
632
- return !e || typeof e != "string" ? (console.error("Invalid URL provided"), []) : e.split(",").map((t) => {
633
- const o = Z(t), r = this.check(t);
634
- return { url: t, name: o, type: r };
661
+ static parseAddresses(t) {
662
+ return !t || typeof t != "string" ? (console.error("Invalid URL provided"), []) : t.split(",").map((e) => {
663
+ const r = Q(e), o = this.check(e);
664
+ return { url: e, name: r, type: o };
635
665
  });
636
666
  }
637
667
  /**
@@ -640,12 +670,12 @@ const C = class C {
640
670
  * @param {string} [accept] - 可接受的 MIME 类型模式(如 "image/*, text/plain")
641
671
  * @returns {boolean} - 如果类型匹配,则返回 true,否则返回 false
642
672
  */
643
- static matchesMimeType(e, t) {
644
- if (!t) return !0;
645
- if (typeof e != "string" || typeof t != "string") return !1;
646
- const o = C._normalizeType(e), r = t.split(",").map((a) => C._normalizeType(a.trim())), [i, s = "*"] = o.split("/");
647
- return r.some((a) => {
648
- const [u, l = "*"] = a.split("/");
673
+ static matchesMimeType(t, e) {
674
+ if (!e) return !0;
675
+ if (typeof t != "string" || typeof e != "string") return !1;
676
+ const r = P._normalizeType(t), o = e.split(",").map((c) => P._normalizeType(c.trim())), [i, s = "*"] = r.split("/");
677
+ return o.some((c) => {
678
+ const [u, l = "*"] = c.split("/");
649
679
  return (u === "*" || i === "*" || u === i) && (l === "*" || s === "*" || l === s);
650
680
  });
651
681
  }
@@ -657,8 +687,8 @@ const C = class C {
657
687
  * @param {string} type - 文件类型或MIME类型字符串
658
688
  * @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
659
689
  */
660
- static _normalizeType(e) {
661
- return e.startsWith(".") && !e.includes("/") ? at[e.toLowerCase()] || e : e.includes("/") ? e : `${e}/*`;
690
+ static _normalizeType(t) {
691
+ return t.startsWith(".") && !t.includes("/") ? ut[t.toLowerCase()] || t : t.includes("/") ? t : `${t}/*`;
662
692
  }
663
693
  /**
664
694
  * 检查URL是否具有任何指定的文件扩展名
@@ -666,198 +696,201 @@ const C = class C {
666
696
  * @param {string[]} validExtensions - 有效文件扩展名的数组
667
697
  * @returns {boolean} - 如果URL具有任何指定的文件扩展名,则返回true,否则返回false
668
698
  */
669
- static _checkExtension(e, t) {
670
- return t.some((o) => e.endsWith(o));
699
+ static _checkExtension(t, e) {
700
+ return e.some((r) => t.endsWith(r));
671
701
  }
672
702
  /**
673
703
  * 检测文件URL的类型
674
704
  * @param {string} url - 文件的URL
675
705
  * @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
676
706
  */
677
- static _detectFileType(e) {
678
- for (const [t, o] of C.cachedEntries)
679
- if (o.some((r) => e.endsWith(r)))
680
- return t;
707
+ static _detectFileType(t) {
708
+ for (const [e, r] of P.cachedEntries)
709
+ if (r.some((o) => t.endsWith(o)))
710
+ return e;
681
711
  return "unknown";
682
712
  }
683
713
  };
684
714
  // 缓存文件扩展名的条目,以提高性能
685
- E(C, "cachedEntries", Object.entries(V));
686
- let ot = C;
687
- function Nt(n) {
715
+ F(P, "cachedEntries", Object.entries(J));
716
+ let it = P;
717
+ function $t(n) {
688
718
  if (typeof n != "function")
689
719
  return console.error("非函数:", n);
690
- const e = function(t) {
691
- t.didTimeout || t.timeRemaining() <= 0 ? requestIdleCallback(e) : n();
720
+ const t = function(e) {
721
+ e.didTimeout || e.timeRemaining() <= 0 ? requestIdleCallback(t) : n();
692
722
  };
693
- requestIdleCallback(e);
723
+ requestIdleCallback(t);
694
724
  }
695
- function qt(n, e) {
696
- const t = +/* @__PURE__ */ new Date();
697
- return new Promise((o, r) => {
725
+ function Yt(n, t) {
726
+ const e = +/* @__PURE__ */ new Date();
727
+ return new Promise((r, o) => {
698
728
  const i = () => {
699
- if (+/* @__PURE__ */ new Date() - t >= e) return r("超时");
700
- if (n()) return o("完成");
729
+ if (+/* @__PURE__ */ new Date() - e >= t) return o("超时");
730
+ if (n()) return r("完成");
701
731
  requestIdleCallback(i);
702
732
  };
703
733
  i();
704
734
  });
705
735
  }
706
- function K(n, e, t = [], o = +/* @__PURE__ */ new Date()) {
707
- if (o < +/* @__PURE__ */ new Date() - 50) {
736
+ function tt(n, t, e = [], r = +/* @__PURE__ */ new Date()) {
737
+ if (r < +/* @__PURE__ */ new Date() - 50) {
708
738
  console.error("_MergeObjects 合并异常:疑似死循环");
709
739
  return;
710
740
  }
711
- const r = nt(n), i = nt(e);
712
- if (r != i) return e;
713
- if (r == "object" || r == "array") {
714
- if (t.some(([s, a]) => s == n && a == e)) return n;
715
- if (t.push([n, e]), r == "object") {
716
- for (const s in e)
717
- if (Object.prototype.hasOwnProperty.call(e, s)) {
718
- const a = e[s], u = n[s], l = K(
741
+ const o = ot(n), i = ot(t);
742
+ if (o != i) return t;
743
+ if (o == "object" || o == "array") {
744
+ if (e.some(([s, c]) => s == n && c == t)) return n;
745
+ if (e.push([n, t]), o == "object") {
746
+ for (const s in t)
747
+ if (Object.prototype.hasOwnProperty.call(t, s)) {
748
+ const c = t[s], u = n[s], l = tt(
719
749
  u,
720
- a,
721
- t,
722
- o
750
+ c,
751
+ e,
752
+ r
723
753
  );
724
754
  n[s] = l;
725
755
  }
726
756
  return n;
727
- } else if (r == "array")
728
- return e.forEach((s, a) => {
729
- const u = s, l = n[a], d = K(
757
+ } else if (o == "array")
758
+ return t.forEach((s, c) => {
759
+ const u = s, l = n[c], m = tt(
730
760
  l,
731
761
  u,
732
- t,
733
- o
762
+ e,
763
+ r
734
764
  );
735
- n[a] = d;
765
+ n[c] = m;
736
766
  }), n;
737
- } else return e;
767
+ } else return t;
738
768
  }
739
- function $t(n = "") {
740
- return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
741
- const t = Math.random() * 16 | 0;
742
- return (e === "x" ? t : t & 3 | 8).toString(16);
769
+ function Xt(n = "") {
770
+ return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
771
+ const e = Math.random() * 16 | 0;
772
+ return (t === "x" ? e : e & 3 | 8).toString(16);
743
773
  });
744
774
  }
745
- function ut(n, e) {
746
- let t;
747
- return function(...o) {
748
- clearTimeout(t), t = setTimeout(() => {
749
- n(...o), t = void 0;
750
- }, e);
775
+ function ft(n, t) {
776
+ let e;
777
+ return function(...r) {
778
+ clearTimeout(e), e = setTimeout(() => {
779
+ n(...r), e = void 0;
780
+ }, t);
751
781
  };
752
782
  }
753
- function Yt(n, e) {
754
- let t = -1 / 0;
755
- return function(...o) {
756
- const r = performance.now();
757
- if (r - t > e) {
758
- t = r;
783
+ function Bt(n, t) {
784
+ let e = -1 / 0;
785
+ return function(...r) {
786
+ const o = performance.now();
787
+ if (o - e > t) {
788
+ e = o;
759
789
  try {
760
- n(...o);
790
+ n(...r);
761
791
  } catch (i) {
762
792
  console.error("Throttled function execution failed:", i);
763
793
  }
764
794
  }
765
795
  };
766
796
  }
767
- function Bt(n, e) {
768
- const t = e.split(".");
769
- return t.reduce((o, r, i) => (r in o || (i === t.length - 1 ? o[r] = void 0 : o[r] = {}), o[r]), n);
797
+ function Ht(n, t, e) {
798
+ if (!n || !t) return n;
799
+ const r = t.split(".");
800
+ return r.reduce((o, i, s) => o.hasOwnProperty(i) ? o[i] : s === r.length - 1 ? o[i] = e : o[i] = {}, n);
770
801
  }
771
- function Xt(n, e) {
772
- const t = e.split(".");
773
- return t.reduce((o, r, i) => o.hasOwnProperty(r) ? o[r] : o[r] = i == t.length - 1 ? void 0 : {}, n);
802
+ function Wt(n, t) {
803
+ if (!n || !t) return n;
804
+ const e = t.split(".");
805
+ return e.reduce((r, o, i) => r.hasOwnProperty(o) ? r[o] : i == e.length - 1 ? void 0 : {}, n);
774
806
  }
775
- function Ht(n, e, t) {
776
- const o = e.split(".");
777
- return o.reduce((r, i, s) => (s === o.length - 1 && (r[i] = t), r[i]), n);
778
- }
779
- function Wt(n) {
780
- return n.map((e, t) => n.slice(t).concat(n.slice(0, t)));
807
+ function Vt(n, t, e) {
808
+ if (!n || !t) return n;
809
+ const r = t.split(".");
810
+ return r.reduce((o, i, s) => (s === r.length - 1 && (o[i] = e), o.hasOwnProperty(i) ? o[i] : o[i] = {}), n);
781
811
  }
782
812
  function Gt(n) {
783
- const e = window.structuredClone, t = (o) => o === null || typeof o != "object" ? o : K(Array.isArray(o) ? [] : {}, o);
813
+ return n.map((t, e) => n.slice(e).concat(n.slice(0, e)));
814
+ }
815
+ function Zt(n) {
816
+ const t = window.structuredClone, e = (r) => r === null || typeof r != "object" ? r : tt(Array.isArray(r) ? [] : {}, r);
784
817
  try {
785
- return e ? e(n) : t(n);
786
- } catch (o) {
787
- return console.error("structuredClone error:", o), e && t(n);
818
+ return t ? t(n) : e(n);
819
+ } catch (r) {
820
+ return console.error("structuredClone error:", r), t && e(n);
788
821
  }
789
822
  }
790
- function Vt(n, e, t = 30) {
823
+ function Kt(n, t, e = 30) {
791
824
  if (typeof n != "function")
792
825
  return console.error("第一个参数必须是一个函数。");
793
- if (!Array.isArray(e))
826
+ if (!Array.isArray(t))
794
827
  return console.error("第二个参数必须是一个数组。");
795
- let o = [], r = 0;
796
- const i = (s, a) => {
797
- for (const [u, l] of a)
828
+ let r = [], o = 0;
829
+ const i = (s, c) => {
830
+ for (const [u, l] of c)
798
831
  if (s >= u)
799
832
  return l;
800
833
  return "black";
801
834
  };
802
835
  return function(...s) {
803
- const a = performance.now(), u = n(...s), l = performance.now() - a;
804
- o.push(l), o.length > t && o.shift(), r = o.reduce((w, L) => w + L, 0) / o.length || 0;
805
- const d = i(l, e), f = i(r, e);
836
+ const c = performance.now(), u = n(...s), l = performance.now() - c;
837
+ r.push(l), r.length > e && r.shift(), o = r.reduce((g, v) => g + v, 0) / r.length || 0;
838
+ const m = i(l, t), d = i(o, t);
806
839
  return console.log(
807
840
  `%c单次耗时:${l.toFixed(2)}ms
808
- %c平均耗时(${o.length}次):${r.toFixed(2)}ms`,
809
- `color: ${d}; padding: 2px 0;`,
810
- `color: ${f}; padding: 2px 0;`
841
+ %c平均耗时(${r.length}次):${o.toFixed(2)}ms`,
842
+ `color: ${m}; padding: 2px 0;`,
843
+ `color: ${d}; padding: 2px 0;`
811
844
  ), u;
812
845
  };
813
846
  }
814
- function Zt(n) {
815
- const e = Date.now();
816
- let t = performance.now();
817
- for (; Date.now() - e < n; ) {
818
- t = Math.sin(t) * 1e6, (t > 1e6 || t < -1e6) && (t = 0);
847
+ function Jt(n) {
848
+ const t = Date.now();
849
+ let e = performance.now();
850
+ for (; Date.now() - t < n; ) {
851
+ e = Math.sin(e) * 1e6, (e > 1e6 || e < -1e6) && (e = 0);
819
852
  try {
820
- const o = t.toString().substring(0, 8);
821
- history.replaceState(null, "", `#${o}`);
853
+ const r = e.toString().substring(0, 8);
854
+ history.replaceState(null, "", `#${r}`);
822
855
  } catch {
823
856
  }
824
857
  }
825
- return Date.now() - e;
858
+ return Date.now() - t;
826
859
  }
827
- function Kt(n) {
828
- const e = ut(n, 100);
829
- let t = 0, o = 0;
830
- return function(r) {
831
- const i = r.target;
860
+ function Qt(n) {
861
+ const t = ft(n, 100);
862
+ let e = 0, r = 0;
863
+ return function(o) {
864
+ const i = o.target;
832
865
  if (!i || !(i instanceof Element)) return;
833
866
  const {
834
867
  scrollTop: s,
835
- scrollHeight: a,
868
+ scrollHeight: c,
836
869
  clientHeight: u,
837
870
  scrollLeft: l,
838
- scrollWidth: d,
839
- clientWidth: f
871
+ scrollWidth: m,
872
+ clientWidth: d
840
873
  } = i;
841
- function w() {
842
- if (t == s) return;
843
- const A = t > s;
844
- if (t = s, A) return;
845
- a - s - u <= 1 && e("vertical");
874
+ function g() {
875
+ if (e == s) return;
876
+ const E = e > s;
877
+ if (e = s, E) return;
878
+ c - s - u <= 1 && t("vertical");
846
879
  }
847
- function L() {
848
- if (o == l) return;
849
- const A = o > l;
850
- if (o = l, A) return;
851
- d - l - f <= 1 && e("horizontal");
880
+ function v() {
881
+ if (r == l) return;
882
+ const E = r > l;
883
+ if (r = l, E) return;
884
+ m - l - d <= 1 && t("horizontal");
852
885
  }
853
- w(), L();
886
+ g(), v();
854
887
  };
855
888
  }
856
- function Jt(n, e, t) {
857
- const { isClickAllowed: o, uiLibrary: r = ["naiveUI", "ElementPlus", "Element"] } = t || {}, i = function(u) {
889
+ function te(n, t, e) {
890
+ const { isClickAllowed: r, uiLibrary: o = ["naiveUI", "ElementPlus", "Element"] } = e || {}, i = function(u) {
858
891
  const l = [];
859
- for (const d in u)
860
- Object.hasOwnProperty.call(u, d) && r.includes(d) && l.push(...u[d]);
892
+ for (const m in u)
893
+ Object.hasOwnProperty.call(u, m) && o.includes(m) && l.push(...u[m]);
861
894
  return l;
862
895
  }({
863
896
  naiveUI: [
@@ -869,37 +902,37 @@ function Jt(n, e, t) {
869
902
  Element: [".el-popper"]
870
903
  });
871
904
  function s() {
872
- e(), document.removeEventListener("mousedown", a);
905
+ t(), document.removeEventListener("mousedown", c);
873
906
  }
874
- function a(u) {
875
- if (o) {
876
- const f = o(u);
877
- if (f) return;
878
- if (f === !1) return s();
907
+ function c(u) {
908
+ if (r) {
909
+ const d = r(u);
910
+ if (d) return;
911
+ if (d === !1) return s();
879
912
  }
880
913
  const l = u.target;
881
914
  if (!(l instanceof Element) || !l.isConnected) return;
882
- n.concat(i).some((f) => !!(l != null && l.closest(f))) || s();
915
+ n.concat(i).some((d) => !!(l != null && l.closest(d))) || s();
883
916
  }
884
917
  requestAnimationFrame(
885
- () => document.addEventListener("mousedown", a)
918
+ () => document.addEventListener("mousedown", c)
886
919
  );
887
920
  }
888
- var y, U, T, S, D, M, F, P, z;
889
- class Qt {
921
+ var y, j, I, z, O, C, L, U, N;
922
+ class ee {
890
923
  constructor() {
891
924
  h(this, y);
892
- h(this, U, !1);
893
- h(this, T, {});
894
- h(this, S, 0);
895
- h(this, D, 0);
896
- h(this, M, 0);
897
- h(this, F, 0);
898
- h(this, P);
899
- h(this, z);
925
+ h(this, j, !1);
926
+ h(this, I, {});
927
+ h(this, z, 0);
928
+ h(this, O, 0);
929
+ h(this, C, 0);
930
+ h(this, L, 0);
931
+ h(this, U);
932
+ h(this, N);
900
933
  }
901
- init(e, t) {
902
- m(this, y, e), m(this, P, t == null ? void 0 : t.limit), m(this, z, t == null ? void 0 : t.dragDom), m(this, T, {
934
+ init(t, e) {
935
+ f(this, y, t), f(this, U, e == null ? void 0 : e.limit), f(this, N, e == null ? void 0 : e.dragDom), f(this, I, {
903
936
  mousedown: this.mousedown.bind(this),
904
937
  mousemove: this.mousemove.bind(this),
905
938
  mouseup: this.mouseup.bind(this)
@@ -908,47 +941,47 @@ class Qt {
908
941
  finish() {
909
942
  this.bindOrUnbindEvent("unbind");
910
943
  }
911
- bindOrUnbindEvent(e) {
912
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
913
- if (!c(this, y)) return console.error("No DOM");
914
- c(this, y)[t]("mousedown", c(this, T).mousedown), document[t]("mousemove", c(this, T).mousemove), document[t]("mouseup", c(this, T).mouseup);
944
+ bindOrUnbindEvent(t) {
945
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
946
+ if (!a(this, y)) return console.error("No DOM");
947
+ a(this, y)[e]("mousedown", a(this, I).mousedown), document[e]("mousemove", a(this, I).mousemove), document[e]("mouseup", a(this, I).mouseup);
915
948
  }
916
949
  alterLocation() {
917
- if (!c(this, y)) return console.error("No DOM");
918
- c(this, P) && (m(this, M, Math.min(c(this, M), c(this, P).max.top)), m(this, M, Math.max(c(this, M), c(this, P).min.top)), m(this, F, Math.min(c(this, F), c(this, P).max.left)), m(this, F, Math.max(c(this, F), c(this, P).min.left))), c(this, y).style.setProperty("--top", c(this, M) + "px"), c(this, y).style.setProperty("--left", c(this, F) + "px");
950
+ if (!a(this, y)) return console.error("No DOM");
951
+ a(this, U) && (f(this, C, Math.min(a(this, C), a(this, U).max.top)), f(this, C, Math.max(a(this, C), a(this, U).min.top)), f(this, L, Math.min(a(this, L), a(this, U).max.left)), f(this, L, Math.max(a(this, L), a(this, U).min.left))), a(this, y).style.setProperty("--top", a(this, C) + "px"), a(this, y).style.setProperty("--left", a(this, L) + "px");
919
952
  }
920
- mousedown(e) {
921
- if (!c(this, y)) return console.error("No DOM");
922
- if (c(this, z) && e.target != c(this, z)) return;
923
- document.body.classList.add("no-select"), m(this, U, !0);
924
- const t = c(this, y).getBoundingClientRect(), { pageX: o, pageY: r } = e;
925
- m(this, S, o), m(this, D, r), m(this, M, t.y), m(this, F, t.x);
953
+ mousedown(t) {
954
+ if (!a(this, y)) return console.error("No DOM");
955
+ if (a(this, N) && t.target != a(this, N)) return;
956
+ document.body.classList.add("no-select"), f(this, j, !0);
957
+ const e = a(this, y).getBoundingClientRect(), { pageX: r, pageY: o } = t;
958
+ f(this, z, r), f(this, O, o), f(this, C, e.y), f(this, L, e.x);
926
959
  }
927
- mousemove(e) {
928
- const { pageX: t, pageY: o } = e;
929
- c(this, U) && (m(this, M, c(this, M) + (o - c(this, D))), m(this, F, c(this, F) + (t - c(this, S))), m(this, S, t), m(this, D, o), this.alterLocation());
960
+ mousemove(t) {
961
+ const { pageX: e, pageY: r } = t;
962
+ a(this, j) && (f(this, C, a(this, C) + (r - a(this, O))), f(this, L, a(this, L) + (e - a(this, z))), f(this, z, e), f(this, O, r), this.alterLocation());
930
963
  }
931
964
  mouseup() {
932
- c(this, U) && (m(this, U, !1), document.body.classList.remove("no-select"));
965
+ a(this, j) && (f(this, j, !1), document.body.classList.remove("no-select"));
933
966
  }
934
967
  }
935
- y = new WeakMap(), U = new WeakMap(), T = new WeakMap(), S = new WeakMap(), D = new WeakMap(), M = new WeakMap(), F = new WeakMap(), P = new WeakMap(), z = new WeakMap();
936
- var v, j, R, O, N, b, _, g, q, $;
937
- class te {
968
+ y = new WeakMap(), j = new WeakMap(), I = new WeakMap(), z = new WeakMap(), O = new WeakMap(), C = new WeakMap(), L = new WeakMap(), U = new WeakMap(), N = new WeakMap();
969
+ var b, A, S, q, $, _, M, x, Y, X;
970
+ class ne {
938
971
  constructor() {
939
- h(this, v);
940
- h(this, j, !1);
941
- h(this, R, {});
942
- h(this, O, 0);
943
- h(this, N, 0);
944
- h(this, b, 0);
972
+ h(this, b);
973
+ h(this, A, !1);
974
+ h(this, S, {});
975
+ h(this, q, 0);
976
+ h(this, $, 0);
945
977
  h(this, _, 0);
946
- h(this, g);
947
- h(this, q);
948
- h(this, $);
978
+ h(this, M, 0);
979
+ h(this, x);
980
+ h(this, Y);
981
+ h(this, X);
949
982
  }
950
- init(e, t = {}) {
951
- m(this, v, e), m(this, g, t.limit), m(this, q, t.update_move), m(this, $, t.update_up), m(this, R, {
983
+ init(t, e = {}) {
984
+ f(this, b, t), f(this, x, e.limit), f(this, Y, e.update_move), f(this, X, e.update_up), f(this, S, {
952
985
  mousedown: this.mousedown.bind(this),
953
986
  mousemove: this.mousemove.bind(this),
954
987
  mouseup: this.mouseup.bind(this)
@@ -957,216 +990,245 @@ class te {
957
990
  finish() {
958
991
  this.bindOrUnbindEvent("unbind");
959
992
  }
960
- bindOrUnbindEvent(e) {
961
- const t = e === "bind" ? "addEventListener" : "removeEventListener";
962
- if (!c(this, v)) return console.error("No DOM");
963
- c(this, v)[t]("mousedown", c(this, R).mousedown), document[t]("mousemove", c(this, R).mousemove), document[t]("mouseup", c(this, R).mouseup);
993
+ bindOrUnbindEvent(t) {
994
+ const e = t === "bind" ? "addEventListener" : "removeEventListener";
995
+ if (!a(this, b)) return console.error("No DOM");
996
+ a(this, b)[e]("mousedown", a(this, S).mousedown), document[e]("mousemove", a(this, S).mousemove), document[e]("mouseup", a(this, S).mouseup);
964
997
  }
965
998
  updateValue() {
966
- const e = {
967
- top: c(this, b),
968
- left: c(this, _),
999
+ const t = {
1000
+ top: a(this, _),
1001
+ left: a(this, M),
969
1002
  percentage: { top: 0, left: 0 }
970
1003
  };
971
- if (c(this, g)) {
972
- const t = (o) => c(this, g) ? (e[o] - c(this, g).min[o]) / (c(this, g).max[o] - c(this, g).min[o]) : 0;
973
- e.percentage = {
974
- top: t("top") || 0,
975
- left: t("left") || 0
1004
+ if (a(this, x)) {
1005
+ const e = (r) => a(this, x) ? (t[r] - a(this, x).min[r]) / (a(this, x).max[r] - a(this, x).min[r]) : 0;
1006
+ t.percentage = {
1007
+ top: e("top") || 0,
1008
+ left: e("left") || 0
976
1009
  };
977
1010
  }
978
- return e;
1011
+ return t;
979
1012
  }
980
1013
  alterLocation() {
981
- if (!c(this, v)) return console.error("No DOM");
982
- c(this, g) && (m(this, b, Math.min(c(this, b), c(this, g).max.top)), m(this, b, Math.max(c(this, b), c(this, g).min.top)), m(this, _, Math.min(c(this, _), c(this, g).max.left)), m(this, _, Math.max(c(this, _), c(this, g).min.left))), c(this, q) && c(this, q).call(this, this.updateValue()), c(this, v).style.setProperty("--top", c(this, b) + "px"), c(this, v).style.setProperty("--left", c(this, _) + "px");
1014
+ if (!a(this, b)) return console.error("No DOM");
1015
+ a(this, x) && (f(this, _, Math.min(a(this, _), a(this, x).max.top)), f(this, _, Math.max(a(this, _), a(this, x).min.top)), f(this, M, Math.min(a(this, M), a(this, x).max.left)), f(this, M, Math.max(a(this, M), a(this, x).min.left))), a(this, Y) && a(this, Y).call(this, this.updateValue()), a(this, b).style.setProperty("--top", a(this, _) + "px"), a(this, b).style.setProperty("--left", a(this, M) + "px");
983
1016
  }
984
- mousedown(e) {
985
- if (!c(this, v)) return console.error("No DOM");
986
- document.body.classList.add("no-select"), m(this, j, !0);
987
- const t = c(this, v).getBoundingClientRect();
988
- m(this, N, t.y), m(this, O, t.x);
989
- const { pageX: o, pageY: r } = e;
990
- m(this, b, r - c(this, N)), m(this, _, o - c(this, O)), this.alterLocation();
1017
+ mousedown(t) {
1018
+ if (!a(this, b)) return console.error("No DOM");
1019
+ document.body.classList.add("no-select"), f(this, A, !0);
1020
+ const e = a(this, b).getBoundingClientRect();
1021
+ f(this, $, e.y), f(this, q, e.x);
1022
+ const { pageX: r, pageY: o } = t;
1023
+ f(this, _, o - a(this, $)), f(this, M, r - a(this, q)), this.alterLocation();
991
1024
  }
992
- mousemove(e) {
993
- const { pageX: t, pageY: o } = e;
994
- c(this, j) && (m(this, b, o - c(this, N)), m(this, _, t - c(this, O)), this.alterLocation());
1025
+ mousemove(t) {
1026
+ const { pageX: e, pageY: r } = t;
1027
+ a(this, A) && (f(this, _, r - a(this, $)), f(this, M, e - a(this, q)), this.alterLocation());
995
1028
  }
996
1029
  mouseup() {
997
- c(this, j) && (m(this, j, !1), document.body.classList.remove("no-select"), c(this, $) && c(this, $).call(this, this.updateValue()));
1030
+ a(this, A) && (f(this, A, !1), document.body.classList.remove("no-select"), a(this, X) && a(this, X).call(this, this.updateValue()));
998
1031
  }
999
1032
  }
1000
- v = new WeakMap(), j = new WeakMap(), R = new WeakMap(), O = new WeakMap(), N = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), q = new WeakMap(), $ = new WeakMap();
1001
- function mt(n) {
1002
- const e = n || document.documentElement;
1003
- return e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : Promise.reject("No Fullscreen API");
1033
+ b = new WeakMap(), A = new WeakMap(), S = new WeakMap(), q = new WeakMap(), $ = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), X = new WeakMap();
1034
+ function K(n) {
1035
+ if (typeof n == "string") {
1036
+ const t = document.querySelector(n);
1037
+ if (!t) throw new Error(`Element "${n}" not found`);
1038
+ return t;
1039
+ } else
1040
+ return n || document.documentElement;
1004
1041
  }
1005
- function dt() {
1042
+ function dt(n) {
1043
+ const t = K(n);
1044
+ return t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : Promise.reject("No Fullscreen API");
1045
+ }
1046
+ function ht() {
1006
1047
  const n = document;
1007
1048
  return document.exitFullscreen ? document.exitFullscreen() : n.mozCancelFullScreen ? n.mozCancelFullScreen() : n.webkitExitFullscreen ? n.webkitExitFullscreen() : n.msExitFullscreen ? n.msExitFullscreen() : Promise.reject("No ExitFullscreen API");
1008
1049
  }
1009
- function ft(n) {
1010
- const e = document, t = document.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement;
1011
- return n ? n == t : document.documentElement == t || screen.width == window.innerWidth && screen.height == window.innerHeight;
1050
+ function st(n) {
1051
+ const t = K(n), e = document, r = document.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement;
1052
+ return t == r;
1012
1053
  }
1013
- function ee(n) {
1014
- return function() {
1015
- ft(n) ? dt() : mt(n);
1054
+ function re(n) {
1055
+ return n = K(n), function() {
1056
+ st(n) ? ht() : dt(n);
1016
1057
  };
1017
1058
  }
1018
- function ne(n, e) {
1059
+ function oe(n, t) {
1060
+ const e = K(t), r = () => {
1061
+ n(st(e));
1062
+ };
1063
+ return document.addEventListener("fullscreenchange", r), document.addEventListener("webkitfullscreenchange", r), document.addEventListener("mozfullscreenchange", r), document.addEventListener("MSFullscreenChange", r), r(), () => {
1064
+ document.removeEventListener("fullscreenchange", r), document.removeEventListener("webkitfullscreenchange", r), document.removeEventListener("mozfullscreenchange", r), document.removeEventListener("MSFullscreenChange", r);
1065
+ };
1066
+ }
1067
+ function ie(n, t) {
1019
1068
  if (typeof n == "number") return n;
1020
1069
  if (/px/.test(n)) return Number(n.replace(/px/, "")) || 0;
1021
- const t = document.createElement("div");
1022
- t.style.width = n, e = e || document.body, e.appendChild(t);
1023
- const o = t.getBoundingClientRect().width;
1024
- return e.removeChild(t), o;
1070
+ const e = document.createElement("div");
1071
+ e.style.width = n, t = t || document.body, t.appendChild(e);
1072
+ const r = e.getBoundingClientRect().width;
1073
+ return t.removeChild(e), r;
1025
1074
  }
1026
- function oe(n, e) {
1075
+ function se(n, t) {
1027
1076
  if (!n) return;
1028
- let t, o;
1029
- if (typeof e == "string") {
1030
- const i = document.querySelector(e);
1077
+ let e, r;
1078
+ if (typeof t == "string") {
1079
+ const i = document.querySelector(t);
1031
1080
  if (!i) return;
1032
1081
  const s = i.getBoundingClientRect();
1033
- t = s.width, o = s.height;
1034
- } else if (Array.isArray(e))
1035
- t = e[0], o = e[1];
1082
+ e = s.width, r = s.height;
1083
+ } else if (Array.isArray(t))
1084
+ e = t[0], r = t[1];
1036
1085
  else {
1037
- const i = e.getBoundingClientRect();
1038
- t = i.width, o = i.height;
1086
+ const i = t.getBoundingClientRect();
1087
+ e = i.width, r = i.height;
1039
1088
  }
1040
- const r = t / o;
1041
- return r > n ? [n * o, o] : r < n ? [t, t / n] : [t, o];
1089
+ const o = e / r;
1090
+ return o > n ? [n * r, r] : o < n ? [e, e / n] : [e, r];
1042
1091
  }
1043
- function re(n, e = 5e3) {
1044
- return new Promise((t, o) => {
1045
- const r = new Image();
1046
- r.src = n;
1092
+ function ce(n, t = 5e3) {
1093
+ return new Promise((e, r) => {
1094
+ const o = new Image();
1095
+ o.src = n;
1047
1096
  const i = setTimeout(() => {
1048
- o(new Error("图片加载超时")), r.onload = null, r.onerror = null;
1049
- }, e);
1050
- r.onload = () => {
1097
+ r(new Error("图片加载超时")), o.onload = null, o.onerror = null;
1098
+ }, t);
1099
+ o.onload = () => {
1051
1100
  clearTimeout(i);
1052
- const s = r.naturalWidth, a = r.naturalHeight, u = s / a;
1053
- t([r, u]);
1054
- }, r.onerror = () => {
1055
- clearTimeout(i), o(new Error("图片加载失败"));
1056
- }, r.crossOrigin = "Anonymous";
1101
+ const s = o.naturalWidth, c = o.naturalHeight, u = s / c;
1102
+ e([o, u]);
1103
+ }, o.onerror = () => {
1104
+ clearTimeout(i), r(new Error("图片加载失败"));
1105
+ }, o.crossOrigin = "Anonymous";
1057
1106
  });
1058
1107
  }
1059
- function ie(n) {
1060
- return new Promise((e, t) => {
1061
- fetch(n).then((o) => e(o.text())).catch((o) => {
1062
- console.error("Error fetching :", o), t(o);
1108
+ function ae(n) {
1109
+ return new Promise((t, e) => {
1110
+ fetch(n).then((r) => t(r.text())).catch((r) => {
1111
+ console.error("Error fetching :", r), e(r);
1063
1112
  });
1064
1113
  });
1065
1114
  }
1066
- function ht(n, e) {
1067
- return new Promise((t, o) => {
1115
+ function pt(n, t) {
1116
+ return new Promise((e, r) => {
1068
1117
  try {
1069
- e = e || Z(n, "downloaded_file"), fetch(n).then((r) => (r.ok || o(`文件下载失败,状态码: ${r.status}`), r.blob())).then((r) => {
1070
- const i = URL.createObjectURL(r), s = document.createElement("a");
1071
- s.href = i, s.download = decodeURIComponent(e), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), t(r);
1072
- }).catch(o);
1073
- } catch (r) {
1074
- o(r);
1118
+ t = t || Q(n, "downloaded_file"), fetch(n).then((o) => (o.ok || r(`文件下载失败,状态码: ${o.status}`), o.blob())).then((o) => {
1119
+ const i = URL.createObjectURL(o), s = document.createElement("a");
1120
+ s.href = i, s.download = decodeURIComponent(t), document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i), e(o);
1121
+ }).catch(r);
1122
+ } catch (o) {
1123
+ r(o);
1075
1124
  }
1076
1125
  });
1077
1126
  }
1078
- function se(n, e, t) {
1079
- if (!t) {
1080
- let i = e.replace(/^[^.]+./, "");
1081
- i = i == e ? "text/plain" : "application/" + i, t = { type: i };
1127
+ function le(n, t, e) {
1128
+ if (!e) {
1129
+ let i = t.replace(/^[^.]+./, "");
1130
+ i = i == t ? "text/plain" : "application/" + i, e = { type: i };
1082
1131
  }
1083
- const o = new Blob(n, t), r = URL.createObjectURL(o);
1084
- ht(r, e);
1085
- }
1086
- const pt = Math.PI / 2, W = Math.PI / 180, G = 6378137, gt = 85.05112878;
1087
- function ce(n, e) {
1088
- const t = Math.max(Math.min(n, 180), -180), o = Math.max(Math.min(e, gt), -85.05112878), r = t * W * G, i = o * W, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * G;
1089
- return [r, s];
1090
- }
1091
- function ae(n, e) {
1092
- const t = n / G / W, o = (2 * Math.atan(Math.exp(e / G)) - pt) / W;
1093
- return [t, o];
1094
- }
1095
- function le(n, e, t) {
1096
- const [o, r] = n, [i, s] = e, [a, u] = t, l = (a - i) ** 2 + (u - s) ** 2;
1097
- if (l === 0) return Math.sqrt((o - i) ** 2 + (r - s) ** 2);
1098
- let d = ((o - i) * (a - i) + (r - s) * (u - s)) / l;
1099
- return d = Math.max(0, Math.min(1, d)), Math.sqrt(
1100
- (o - (i + d * (a - i))) ** 2 + (r - (s + d * (u - s))) ** 2
1132
+ const r = new Blob(n, e), o = URL.createObjectURL(r);
1133
+ pt(o, t);
1134
+ }
1135
+ const gt = Math.PI / 2, G = Math.PI / 180, Z = 6378137, xt = 85.05112878;
1136
+ function ue(n, t) {
1137
+ const e = Math.max(Math.min(n, 180), -180), r = Math.max(Math.min(t, xt), -85.05112878), o = e * G * Z, i = r * G, s = Math.log(Math.tan(Math.PI / 4 + i / 2)) * Z;
1138
+ return [o, s];
1139
+ }
1140
+ function me(n, t) {
1141
+ const e = n / Z / G, r = (2 * Math.atan(Math.exp(t / Z)) - gt) / G;
1142
+ return [e, r];
1143
+ }
1144
+ function fe(n, t, e) {
1145
+ const [r, o] = n, [i, s] = t, [c, u] = e, l = (c - i) ** 2 + (u - s) ** 2;
1146
+ if (l === 0) return Math.sqrt((r - i) ** 2 + (o - s) ** 2);
1147
+ let m = ((r - i) * (c - i) + (o - s) * (u - s)) / l;
1148
+ return m = Math.max(0, Math.min(1, m)), Math.sqrt(
1149
+ (r - (i + m * (c - i))) ** 2 + (o - (s + m * (u - s))) ** 2
1101
1150
  );
1102
1151
  }
1103
- function ue(n, e, t, o, r) {
1104
- const i = n + t * Math.cos(o), s = e + t * Math.sin(o), a = n + t * Math.cos(r), u = e + t * Math.sin(r);
1152
+ function de(n, t, e, r, o, i = 1, s = 1) {
1153
+ const c = n + e * Math.cos(r) * i, u = t + e * Math.sin(r) * s, l = n + e * Math.cos(o) * i, m = t + e * Math.sin(o) * s;
1105
1154
  return [
1106
- [i, s],
1107
- [a, u]
1155
+ [c, u],
1156
+ [l, m]
1108
1157
  ];
1109
1158
  }
1110
- function me(n, e, t, o) {
1111
- return Math.sqrt(Math.pow(t - n, 2) + Math.pow(o - e, 2));
1159
+ function he(n, t, e, r) {
1160
+ return Math.hypot(Math.abs(e - n), Math.abs(r - t));
1161
+ }
1162
+ function pe(n, t, e, r) {
1163
+ const o = (n + e) / 2, i = (t + r) / 2;
1164
+ return { x: o, y: i };
1112
1165
  }
1113
- function de(n, e, t, o) {
1114
- const r = (n + t) / 2, i = (e + o) / 2;
1115
- return { x: r, y: i };
1166
+ function ge(n, t, e, r) {
1167
+ const [o, i] = n, [s, c] = t;
1168
+ let u = 1 / 0;
1169
+ if (s !== 0) {
1170
+ const l = s > 0 ? (e - o) / s : -o / s;
1171
+ l > 0 && (u = Math.min(u, l));
1172
+ }
1173
+ if (c !== 0) {
1174
+ const l = c > 0 ? (r - i) / c : -i / c;
1175
+ l > 0 && (u = Math.min(u, l));
1176
+ }
1177
+ return u === 1 / 0 ? n : [o + s * u, i + c * u];
1116
1178
  }
1117
- class k {
1118
- constructor(e, t) {
1119
- E(this, "resolve");
1120
- E(this, "reject");
1121
- this.resolve = e, this.reject = t;
1179
+ class D {
1180
+ constructor(t, e) {
1181
+ F(this, "resolve");
1182
+ F(this, "reject");
1183
+ this.resolve = t, this.reject = e;
1122
1184
  }
1123
- run(e) {
1124
- var t, o;
1125
- return e instanceof Promise ? e.then((r) => {
1185
+ run(t) {
1186
+ var e, r;
1187
+ return t instanceof Promise ? t.then((o) => {
1126
1188
  var i;
1127
- return (i = this.resolve) == null || i.call(this), r;
1128
- }).catch((r) => {
1189
+ return (i = this.resolve) == null || i.call(this), o;
1190
+ }).catch((o) => {
1129
1191
  var i;
1130
- return (i = this.reject) == null || i.call(this), Promise.reject(r);
1131
- }) : e ? (t = this.resolve) == null || t.call(this) : (o = this.reject) == null || o.call(this), e;
1192
+ return (i = this.reject) == null || i.call(this), Promise.reject(o);
1193
+ }) : t ? (e = this.resolve) == null || e.call(this) : (r = this.reject) == null || r.call(this), t;
1132
1194
  }
1133
1195
  }
1134
- class xt extends k {
1135
- constructor(e) {
1136
- super(), this.resolve = e;
1196
+ class wt extends D {
1197
+ constructor(t) {
1198
+ super(), this.resolve = t;
1137
1199
  }
1138
- warning(...e) {
1139
- const t = () => {
1140
- var o, r;
1141
- return (r = (o = Y.tips).warning) == null ? void 0 : r.call(o, ...e);
1200
+ warning(...t) {
1201
+ const e = () => {
1202
+ var r, o;
1203
+ return (o = (r = B.tips).warning) == null ? void 0 : o.call(r, ...t);
1142
1204
  };
1143
- return new k(this.resolve, t);
1205
+ return new D(this.resolve, e);
1144
1206
  }
1145
- error(...e) {
1146
- const t = () => {
1147
- var o, r;
1148
- return (r = (o = Y.tips).error) == null ? void 0 : r.call(o, ...e);
1207
+ error(...t) {
1208
+ const e = () => {
1209
+ var r, o;
1210
+ return (o = (r = B.tips).error) == null ? void 0 : o.call(r, ...t);
1149
1211
  };
1150
- return new k(this.resolve, t);
1212
+ return new D(this.resolve, e);
1151
1213
  }
1152
1214
  }
1153
- class wt extends k {
1154
- constructor(e) {
1155
- super(), this.reject = e;
1215
+ class vt extends D {
1216
+ constructor(t) {
1217
+ super(), this.reject = t;
1156
1218
  }
1157
- info(...e) {
1158
- const t = () => {
1159
- var o, r;
1160
- return (r = (o = Y.tips).info) == null ? void 0 : r.call(o, ...e);
1219
+ info(...t) {
1220
+ const e = () => {
1221
+ var r, o;
1222
+ return (o = (r = B.tips).info) == null ? void 0 : o.call(r, ...t);
1161
1223
  };
1162
- return new k(t, this.reject);
1224
+ return new D(e, this.reject);
1163
1225
  }
1164
- success(...e) {
1165
- const t = () => {
1166
- var o, r;
1167
- return (r = (o = Y.tips).success) == null ? void 0 : r.call(o, ...e);
1226
+ success(...t) {
1227
+ const e = () => {
1228
+ var r, o;
1229
+ return (o = (r = B.tips).success) == null ? void 0 : o.call(r, ...t);
1168
1230
  };
1169
- return new k(t, this.reject);
1231
+ return new D(e, this.reject);
1170
1232
  }
1171
1233
  }
1172
1234
  const p = class p {
@@ -1178,95 +1240,98 @@ const p = class p {
1178
1240
  if (new.target === p)
1179
1241
  throw new Error("请直接使用静态方法,而不是实例化此类");
1180
1242
  }
1181
- static register(e, t) {
1182
- if (typeof t != "function")
1243
+ static register(t, e) {
1244
+ if (typeof e != "function")
1183
1245
  return console.error("TipHandler must be a function");
1184
- p.tips[e] = t;
1246
+ p.tips[t] = e;
1185
1247
  }
1186
- static resolveTip(e) {
1187
- return function(...t) {
1188
- const o = () => {
1189
- var r, i;
1190
- return (i = (r = p.tips)[e]) == null ? void 0 : i.call(r, ...t);
1248
+ static resolveTip(t) {
1249
+ return function(...e) {
1250
+ const r = () => {
1251
+ var o, i;
1252
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1191
1253
  };
1192
- return new xt(o);
1254
+ return new wt(r);
1193
1255
  };
1194
1256
  }
1195
- static rejectTip(e) {
1196
- return function(...t) {
1197
- const o = () => {
1198
- var r, i;
1199
- return (i = (r = p.tips)[e]) == null ? void 0 : i.call(r, ...t);
1257
+ static rejectTip(t) {
1258
+ return function(...e) {
1259
+ const r = () => {
1260
+ var o, i;
1261
+ return (i = (o = p.tips)[t]) == null ? void 0 : i.call(o, ...e);
1200
1262
  };
1201
- return new wt(o);
1263
+ return new vt(r);
1202
1264
  };
1203
1265
  }
1204
1266
  };
1205
- E(p, "tips", {
1267
+ F(p, "tips", {
1206
1268
  info: void 0,
1207
1269
  success: void 0,
1208
1270
  warning: void 0,
1209
1271
  error: void 0
1210
- }), E(p, "info", p.resolveTip("info")), E(p, "success", p.resolveTip("success")), E(p, "warning", p.rejectTip("warning")), E(p, "error", p.rejectTip("error"));
1211
- let Y = p;
1272
+ }), F(p, "info", p.resolveTip("info")), F(p, "success", p.resolveTip("success")), F(p, "warning", p.rejectTip("warning")), F(p, "error", p.rejectTip("error"));
1273
+ let B = p;
1212
1274
  export {
1213
- bt as _Animate_CreateOscillator,
1214
- _t as _Animate_NumericTransition,
1215
- vt as _Animate_Schedule,
1275
+ _t as _Animate_CreateOscillator,
1276
+ Mt as _Animate_NumericTransition,
1277
+ bt as _Animate_Schedule,
1216
1278
  Et as _Blob_ConvertDataToImageUrl,
1217
- Ft as _Browser_CopyToClipboard,
1218
- Mt as _Browser_GetFrameRate,
1219
- ct as _Browser_KeyedWindowManager,
1220
- oe as _Element_CalculateCanvasSize,
1221
- Jt as _Element_CloseOnOutsideClick,
1222
- Qt as _Element_Drag,
1223
- mt as _Element_EnterFullscreen,
1224
- dt as _Element_ExitFullscreen,
1225
- ee as _Element_Fullscreen,
1226
- ne as _Element_GetOtherSizeInPixels,
1227
- ft as _Element_IsFullscreen,
1228
- re as _Element_LoadImage,
1229
- te as _Element_LocalDrag,
1230
- Kt as _Element_ScrollEndListener,
1231
- se as _File_CreateAndDownload,
1232
- ht as _File_Download,
1233
- ie as _File_Read,
1234
- Rt as _Format_CamelCase,
1235
- Ct as _Format_CapitalizeFirstLetter,
1279
+ Ct as _Browser_CopyToClipboard,
1280
+ Ft as _Browser_GetFrameRate,
1281
+ lt as _Browser_KeyedWindowManager,
1282
+ se as _Element_CalculateCanvasSize,
1283
+ te as _Element_CloseOnOutsideClick,
1284
+ ee as _Element_Drag,
1285
+ dt as _Element_EnterFullscreen,
1286
+ ht as _Element_ExitFullscreen,
1287
+ re as _Element_Fullscreen,
1288
+ oe as _Element_FullscreenObserver,
1289
+ ie as _Element_GetOtherSizeInPixels,
1290
+ st as _Element_IsFullscreen,
1291
+ ce as _Element_LoadImage,
1292
+ ne as _Element_LocalDrag,
1293
+ Qt as _Element_ScrollEndListener,
1294
+ le as _File_CreateAndDownload,
1295
+ pt as _File_Download,
1296
+ ae as _File_Read,
1297
+ It as _Format_CamelCase,
1298
+ Lt as _Format_CapitalizeFirstLetter,
1236
1299
  At as _Format_ExcludeSubstring,
1237
- Tt as _Format_FileSize,
1238
- Z as _Format_HrefName,
1239
- Lt as _Format_NumberWithCommas,
1300
+ Rt as _Format_FileSize,
1301
+ Q as _Format_HrefName,
1302
+ Pt as _Format_NumberWithCommas,
1240
1303
  Ut as _Format_NumberWithUnit,
1241
- Pt as _Format_Percentage,
1304
+ Tt as _Format_Percentage,
1242
1305
  jt as _Format_Timestamp,
1243
- me as _Math_CalculateDistance2D,
1244
- ue as _Math_GetArcPoints,
1245
- de as _Math_GetMidpoint,
1246
- ce as _Math_LngLatToPlane,
1247
- ae as _Math_PlaneToLngLat,
1248
- le as _Math_PointToLineDistance,
1249
- Y as _Tip,
1250
- Gt as _Utility_Clone,
1251
- ut as _Utility_Debounce,
1252
- Nt as _Utility_ExecuteWhenIdle,
1253
- $t as _Utility_GenerateUUID,
1254
- Xt as _Utility_GetTargetByPath,
1255
- Bt as _Utility_InitTargetByPath,
1256
- K as _Utility_MergeObjects,
1257
- Wt as _Utility_RotateList,
1258
- Zt as _Utility_Sleep,
1259
- Yt as _Utility_Throttle,
1260
- Vt as _Utility_TimeConsumption,
1261
- Ht as _Utility_UpdateTargetByPath,
1262
- qt as _Utility_WaitForCondition,
1263
- Ot as _Valid_CheckConnectionWithXHR,
1264
- nt as _Valid_DataType,
1265
- ot as _Valid_FileTypeChecker,
1306
+ he as _Math_CalculateDistance2D,
1307
+ de as _Math_GetArcPoints,
1308
+ ge as _Math_GetBoundaryIntersection,
1309
+ pe as _Math_GetMidpoint,
1310
+ ue as _Math_LngLatToPlane,
1311
+ me as _Math_PlaneToLngLat,
1312
+ fe as _Math_PointToLineDistance,
1313
+ B as _Tip,
1314
+ Zt as _Utility_Clone,
1315
+ ft as _Utility_Debounce,
1316
+ $t as _Utility_ExecuteWhenIdle,
1317
+ Xt as _Utility_GenerateUUID,
1318
+ Wt as _Utility_GetTargetByPath,
1319
+ Ht as _Utility_InitTargetByPath,
1320
+ tt as _Utility_MergeObjects,
1321
+ Gt as _Utility_RotateList,
1322
+ Vt as _Utility_SetTargetByPath,
1323
+ Jt as _Utility_Sleep,
1324
+ Bt as _Utility_Throttle,
1325
+ Kt as _Utility_TimeConsumption,
1326
+ Yt as _Utility_WaitForCondition,
1327
+ qt as _Valid_CheckConnectionWithXHR,
1328
+ ot as _Valid_DataType,
1329
+ Ot as _Valid_DoesInfiniteLineIntersectRectangle,
1330
+ it as _Valid_FileTypeChecker,
1266
1331
  kt as _Valid_Is2DNumberArray,
1267
- St as _Valid_IsInMargin,
1268
- lt as _Valid_IsNumberArray,
1269
- It as _Valid_IsObject,
1270
- Dt as _Valid_IsPointInPolygon,
1271
- zt as _Valid_IsSecureContext
1332
+ Dt as _Valid_IsInMargin,
1333
+ mt as _Valid_IsNumberArray,
1334
+ St as _Valid_IsObject,
1335
+ zt as _Valid_IsPointInPolygon,
1336
+ Nt as _Valid_IsSecureContext
1272
1337
  };