halo-fe 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/dist/main.js +1282 -804
  2. package/dist/style.css +1 -0
  3. package/esm/coms/Code.vue.d.ts +41 -0
  4. package/esm/coms/Col.vue.d.ts +11 -0
  5. package/esm/coms/Compare.vue.d.ts +40 -0
  6. package/esm/coms/Container.vue.d.ts +23 -0
  7. package/esm/coms/Empty.vue.d.ts +26 -0
  8. package/esm/coms/Progress.vue.d.ts +8 -0
  9. package/esm/coms/Row.vue.d.ts +21 -0
  10. package/esm/coms/index.d.ts +8 -0
  11. package/esm/coms/types/CodeEmit.d.ts +23 -0
  12. package/esm/coms/types/CodeProps.d.ts +18 -0
  13. package/esm/coms/types/RowProps.d.ts +14 -0
  14. package/esm/coms/types/index.d.ts +4 -0
  15. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  16. package/esm/drivers/cdns/index.d.ts +2 -0
  17. package/esm/drivers/encoders/EncoderFactory.d.ts +2 -2
  18. package/esm/drivers/encoders/index.d.ts +2 -0
  19. package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
  20. package/esm/drivers/excels/index.d.ts +2 -1
  21. package/esm/drivers/explainers/index.d.ts +2 -0
  22. package/esm/drivers/factories/DriverFactory.d.ts +12 -12
  23. package/esm/drivers/factories/Factory.d.ts +1 -1
  24. package/esm/drivers/factories/IFactory.d.ts +1 -1
  25. package/esm/drivers/factories/index.d.ts +13 -1
  26. package/esm/drivers/features/FeatureFactory.d.ts +1 -1
  27. package/esm/drivers/features/index.d.ts +2 -1
  28. package/esm/drivers/hashers/HasherFactory.d.ts +2 -2
  29. package/esm/drivers/hashers/index.d.ts +2 -1
  30. package/esm/drivers/https/Http.d.ts +24 -0
  31. package/esm/drivers/https/HttpFactory.d.ts +20 -0
  32. package/esm/drivers/https/IHttp.d.ts +49 -0
  33. package/esm/drivers/https/entities/HttpMessage.d.ts +32 -0
  34. package/esm/drivers/https/entities/HttpRequest.d.ts +19 -0
  35. package/esm/drivers/{requesters → https}/entities/HttpResponse.d.ts +2 -5
  36. package/esm/drivers/{requesters/implements/DefaultRequester.d.ts → https/implements/DefaultHttp.d.ts} +4 -4
  37. package/esm/drivers/https/implements/HaloHttp.d.ts +37 -0
  38. package/esm/drivers/{requesters/implements/MkRequester.d.ts → https/implements/MkHttp.d.ts} +7 -7
  39. package/esm/drivers/https/index.d.ts +6 -0
  40. package/esm/drivers/index.d.ts +8 -8
  41. package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
  42. package/esm/drivers/providers/index.d.ts +2 -1
  43. package/esm/drivers/signers/ISigner.d.ts +2 -2
  44. package/esm/drivers/signers/Signer.d.ts +13 -0
  45. package/esm/drivers/signers/SignerFactory.d.ts +1 -1
  46. package/esm/drivers/signers/implements/DefaultSigner.d.ts +4 -4
  47. package/esm/drivers/signers/index.d.ts +2 -1
  48. package/esm/drivers/ssos/ISso.d.ts +1 -1
  49. package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
  50. package/esm/drivers/ssos/implements/AnonymousSso.d.ts +1 -1
  51. package/esm/drivers/ssos/implements/BearerSso.d.ts +1 -3
  52. package/esm/drivers/ssos/implements/NioSso.d.ts +1 -1
  53. package/esm/drivers/ssos/implements/SecretSso.d.ts +3 -3
  54. package/esm/drivers/ssos/implements/WeiXinSso.d.ts +1 -1
  55. package/esm/drivers/ssos/index.d.ts +2 -1
  56. package/esm/helpers/json-helper.d.ts +12 -4
  57. package/esm/helpers/object-helper.d.ts +4 -0
  58. package/esm/helpers/types/index.d.ts +0 -0
  59. package/esm/helpers/url-helper.d.ts +2 -2
  60. package/esm/main.d.ts +14 -3
  61. package/esm/services/index.d.ts +6 -12
  62. package/esm/services/types/IMessage.d.ts +14 -0
  63. package/esm/services/types/IMessager.d.ts +14 -0
  64. package/esm/services/types/index.d.ts +2 -0
  65. package/esm/stores/config.d.ts +10 -6
  66. package/esm/stores/driver.d.ts +2 -6
  67. package/esm/stores/index.d.ts +3 -2
  68. package/esm/stores/setting.d.ts +0 -4
  69. package/esm/stores/user.d.ts +3 -7
  70. package/esm/utilities/AffixUtility.d.ts +10 -0
  71. package/esm/utilities/EventUtility.d.ts +30 -0
  72. package/esm/utilities/KeyboardUtility.d.ts +73 -0
  73. package/esm/utilities/MouseUtility.d.ts +24 -0
  74. package/esm/utilities/index.d.ts +4 -0
  75. package/package.json +8 -8
  76. package/dist/vendor-axios-ud9O0vdJ.js +0 -1670
  77. package/esm/drivers/driver-helper.d.ts +0 -46
  78. package/esm/drivers/requesters/IRequester.d.ts +0 -25
  79. package/esm/drivers/requesters/Requester.d.ts +0 -13
  80. package/esm/drivers/requesters/RequesterFactory.d.ts +0 -21
  81. package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
  82. package/esm/drivers/requesters/implements/LocalRequester.d.ts +0 -43
  83. package/esm/drivers/requesters/index.d.ts +0 -5
  84. /package/esm/{thirds → plugins}/index.d.ts +0 -0
package/dist/main.js CHANGED
@@ -1,75 +1,64 @@
1
- import { C as z } from "./vendor-crypto-js-B6Qe-gIg.js";
2
- import { defineAsyncComponent as jt } from "vue";
3
- import { _ as Bt } from "./vendor-underscore.string-vrHhfBaT.js";
4
- import { _ as rt } from "./vendor-underscore-DVTek3G4.js";
5
- import { F as At } from "./vendor-file-saver-DKXzEV2Q.js";
6
- import { b as qt } from "./vendor-clone-NGbTzSwJ.js";
7
- import { l as Ut } from "./vendor-@monaco-editor-DKC4UNw_.js";
8
- import { h as I } from "./vendor-moment-h96o7c8I.js";
9
- import { d as P } from "./vendor-pinia-DVLspbiC.js";
10
- import { a as Lt, A as Nt } from "./vendor-axios-ud9O0vdJ.js";
11
- import { utils as nt, writeFile as $t } from "xlsx-js-style";
12
- class Pt {
13
- }
14
- class ht {
15
- post(t, e) {
16
- let s = new Pt();
17
- return s.path = t, s.method = "POST", s.body = e, this.send(s);
18
- }
19
- }
20
- class Ft extends ht {
21
- constructor() {
22
- super(...arguments), this.type = "Default";
23
- }
24
- open(t) {
25
- }
26
- send(t) {
27
- return new Promise((e, s) => {
28
- let r = (/* @__PURE__ */ new Date()).getTime(), n = new XMLHttpRequest();
29
- if (n.open(t.method, t.url), t.headers != null)
30
- for (let l of t.headers)
31
- n.setRequestHeader(l, t.headers[l]);
32
- t.contentType != null && n.setRequestHeader("content-type", t.contentType), n.onreadystatechange = () => {
33
- if (n.readyState == 4) {
34
- let i = { elapsed: (/* @__PURE__ */ new Date()).getTime() - r, body: n.responseText, request: t };
35
- e(i);
36
- }
37
- }, n.onerror = (l) => {
38
- let a = { elapsed: (/* @__PURE__ */ new Date()).getTime() - r, body: n.responseText, request: t };
39
- e(a);
40
- }, n.send(t.body);
41
- });
42
- }
43
- }
44
- class Ct {
45
- }
46
- class Rt extends Ct {
47
- constructor() {
48
- super(...arguments), this.type = "Sha256";
49
- }
50
- open(t) {
51
- }
52
- async compute(t) {
53
- let s = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", s);
54
- return Array.from(new Uint8Array(r)).map((i) => i.toString(16).padStart(2, "0")).join("");
55
- }
56
- }
57
- class Dt extends Ct {
1
+ import { utils as Ut, writeFile as ge } from "xlsx-js-style";
2
+ import { defineAsyncComponent as fe, defineComponent as _, toRefs as tt, ref as at, onMounted as le, onUnmounted as ie, watch as P, openBlock as z, createElementBlock as M, normalizeClass as Rt, unref as T, renderSlot as It, normalizeStyle as Vt, createElementVNode as me, toDisplayString as pe, createCommentVNode as ae, computed as ye } from "vue";
3
+ import { _ as be } from "./vendor-underscore.string-vrHhfBaT.js";
4
+ import { _ as Dt } from "./vendor-underscore-DVTek3G4.js";
5
+ import { F as we } from "./vendor-file-saver-DKXzEV2Q.js";
6
+ import { b as ve } from "./vendor-clone-NGbTzSwJ.js";
7
+ import { l as bt } from "./vendor-@monaco-editor-DKC4UNw_.js";
8
+ import { h as N } from "./vendor-moment-h96o7c8I.js";
9
+ import { d as G } from "./vendor-pinia-DVLspbiC.js";
10
+ import { C as st } from "./vendor-crypto-js-B6Qe-gIg.js";
11
+ let $t;
12
+ window._setting ? $t = window._setting : $t = window.setting;
13
+ const mt = $t;
14
+ let pt = {}, Se = (a) => {
15
+ pt = a;
16
+ };
17
+ class xe {
58
18
  constructor() {
59
- super(...arguments), this.type = "Md5";
19
+ this.type = "xlsx";
60
20
  }
61
21
  open(t) {
62
22
  }
63
- compute(t) {
64
- let e = z.MD5(t).toString();
65
- return Promise.resolve(e);
23
+ export(t, e) {
24
+ if (!e)
25
+ throw new Error("Excel名称不能为空");
26
+ t || (t = []);
27
+ let s;
28
+ t.length > 0 ? s = Object.keys(t[0]) : s = [];
29
+ let r = [], n = [];
30
+ if (s.forEach((c) => {
31
+ n.push(c);
32
+ }), r.push(n), t.length > 0)
33
+ for (let c = 0; c < t.length; c++) {
34
+ let h = t[c], g = [];
35
+ Object.keys(h).forEach((v) => {
36
+ g.push(h[v]);
37
+ }), r.push(g);
38
+ }
39
+ let l = Ut.book_new(), i = Ut.json_to_sheet(r, { skipHeader: !0 });
40
+ Ut.book_append_sheet(l, i, "abc");
41
+ let o = 65;
42
+ for (let c = 0; c < s.length; c++) {
43
+ let g = `${String.fromCharCode(o + c)}1`;
44
+ i[g].s = {
45
+ alignment: { horizontal: "center" },
46
+ font: { bold: !0, color: { rgb: "000000" } },
47
+ fill: { fgColor: { rgb: "409eff" } }
48
+ };
49
+ }
50
+ let u = [];
51
+ s.forEach((c) => {
52
+ let h = t[0][c], g = { wpx: 50 };
53
+ typeof h == "string" && (g.wpx = 100), u.push(g);
54
+ }), i["!cols"] = u, ge(l, e);
66
55
  }
67
56
  }
68
- class E {
57
+ class L {
69
58
  /**
70
59
  * 创建指定类型驱动
71
60
  */
72
- create(t, e) {
61
+ async create(t, e) {
73
62
  if (!t)
74
63
  throw new Error("驱动类型不能为空");
75
64
  let r = this.getInstances().find((n) => n.type.toLowerCase() == t.toLowerCase());
@@ -78,34 +67,31 @@ class E {
78
67
  return r;
79
68
  }
80
69
  }
81
- class gt extends E {
70
+ class ke extends L {
82
71
  getInstances() {
83
- return [new Rt(), new Dt()];
84
- }
85
- create(t, e) {
86
- let s = super.create(t);
87
- return s.open(null), s;
72
+ return [new xe()];
88
73
  }
89
74
  /**
90
- * 获取MD5 Hash对象
75
+ * 获取Excel实例
91
76
  */
92
- getMd5() {
93
- return this.md5 != null ? this.md5 : (this.md5 = this.create("Md5"), this.md5);
77
+ async create(t, e) {
78
+ let s = await super.create(t);
79
+ return s.open(e), s;
94
80
  }
95
81
  }
96
- const q = class q {
82
+ const J = class J {
97
83
  };
98
- q.isString = (t) => Object.prototype.toString.call(t) == "[object String]", q.isObject = (t) => Object.prototype.toString.call(t) == "[object Object]", q.isArray = (t) => Object.prototype.toString.call(t) == "[object Array]", q.isNumber = (t) => {
84
+ J.isString = (t) => Object.prototype.toString.call(t) == "[object String]", J.isObject = (t) => Object.prototype.toString.call(t) == "[object Object]", J.isArray = (t) => Object.prototype.toString.call(t) == "[object Array]", J.isNumber = (t) => {
99
85
  let e = Object.prototype.toString.call(t);
100
86
  return e == "[object Number]" || e == "[object BigInt]";
101
- }, q.isBoolean = (t) => Object.prototype.toString.call(t) == "[object Boolean]";
102
- let y = q;
103
- const h = class h {
87
+ }, J.isBoolean = (t) => Object.prototype.toString.call(t) == "[object Boolean]";
88
+ let x = J;
89
+ const f = class f {
104
90
  /**
105
91
  * 根据字符串或数组,自动返回数组
106
92
  */
107
93
  static getArray(t) {
108
- return y.isString(t) ? [t.toString()] : t instanceof Array ? t : [];
94
+ return x.isString(t) ? [t.toString()] : t instanceof Array ? t : [];
109
95
  }
110
96
  /**
111
97
  * 忽略大小写比较
@@ -115,23 +101,23 @@ const h = class h {
115
101
  return s == r;
116
102
  }
117
103
  };
118
- h.getUniqueId = () => {
104
+ f.getUniqueId = () => {
119
105
  let t = Date.now().toString(36);
120
106
  return t += Math.random().toString(36).substring(2), t;
121
- }, h.padLeft = (t, e, s) => Bt.pad(t, e, s), h.trimStart = (t, e) => {
107
+ }, f.padLeft = (t, e, s) => be.pad(t, e, s), f.trimStart = (t, e) => {
122
108
  if (e == null)
123
109
  return t;
124
110
  let s = t.indexOf(e);
125
111
  return t.substring(s + e.length);
126
- }, h.trimEnd = (t, e) => {
112
+ }, f.trimEnd = (t, e) => {
127
113
  if (e == null)
128
114
  return t;
129
115
  let s = t.lastIndexOf(e);
130
116
  return t.substring(0, s);
131
- }, h.trim = (t, e, s) => {
132
- let r = h.trimStart(t, e);
133
- return h.trimEnd(r, s);
134
- }, h.getDashName = (t) => {
117
+ }, f.trim = (t, e, s) => {
118
+ let r = f.trimStart(t, e);
119
+ return f.trimEnd(r, s);
120
+ }, f.getDashName = (t) => {
135
121
  if (!t)
136
122
  return null;
137
123
  let e = "";
@@ -140,7 +126,7 @@ h.getUniqueId = () => {
140
126
  r == "/" ? e += "-" : r >= "A" && r <= "Z" ? (s > 0 && t[s - 1] != "/" && (e += "-"), e += r.toLowerCase()) : e += r;
141
127
  }
142
128
  return e;
143
- }, h.containsIgnoreCase = (t, e) => {
129
+ }, f.containsIgnoreCase = (t, e) => {
144
130
  if (!t)
145
131
  return !0;
146
132
  let s = e instanceof Array ? e : [e];
@@ -152,26 +138,26 @@ h.getUniqueId = () => {
152
138
  return !0;
153
139
  }
154
140
  return !1;
155
- }, h.getTextFromHtml = (t) => {
141
+ }, f.getTextFromHtml = (t) => {
156
142
  if (!t)
157
143
  return null;
158
144
  let e = new RegExp("<.+?>", "g");
159
145
  return t.replace(e, "");
160
- }, h.isNumber = (t) => t != null && !isNaN(t), h.isEmail = (t) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t), h.isJson = (t) => {
146
+ }, f.isNumber = (t) => t != null && !isNaN(t), f.isEmail = (t) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t), f.isJson = (t) => {
161
147
  try {
162
148
  if (!t)
163
149
  return !1;
164
150
  let e = JSON.parse(t);
165
- return y.isObject(e);
151
+ return x.isObject(e);
166
152
  } catch {
167
153
  return !1;
168
154
  }
169
- }, h.isJsonp = (t) => {
155
+ }, f.isJsonp = (t) => {
170
156
  if (!t)
171
157
  return !1;
172
158
  let e = t.indexOf("("), s = t.lastIndexOf(")"), r = t.substring(e + 1, s);
173
- return !!h.isJson(r);
174
- }, h.isHtml = (t) => {
159
+ return !!f.isJson(r);
160
+ }, f.isHtml = (t) => {
175
161
  if (!t)
176
162
  return !1;
177
163
  let e = document.createElement("div");
@@ -180,18 +166,18 @@ h.getUniqueId = () => {
180
166
  if (s[r].nodeType == 1)
181
167
  return !0;
182
168
  return !1;
183
- }, h.getContentType = (t) => h.isJson(t) || h.isJsonp(t) ? "json" : h.isHtml(t) ? "html" : "text", h.isNullOrEmpty = (t) => t == null || h.isEmpty(t), h.isEmpty = (t) => t == "", h.isPassword = (t) => !0, h.getNumberOrNull = (t) => t == null || isNaN(t) ? 0 : parseFloat(t), h.format = (t, e) => {
169
+ }, f.getContentType = (t) => f.isJson(t) || f.isJsonp(t) ? "json" : f.isHtml(t) ? "html" : "text", f.isNullOrEmpty = (t) => t == null || f.isEmpty(t), f.isEmpty = (t) => t == "", f.isPassword = (t) => !0, f.getNumberOrNull = (t) => t == null || isNaN(t) ? 0 : parseFloat(t), f.format = (t, e) => {
184
170
  let s = parseFloat(t), r;
185
171
  return e ? r = s.toFixed(e).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") : r = s.toLocaleString(), r;
186
- }, h.getBetween = (t, e, s) => {
172
+ }, f.getBetween = (t, e, s) => {
187
173
  let r = t.indexOf(e);
188
174
  if (r == -1)
189
175
  return null;
190
176
  let n = r + e.length, l = t.substring(n), i = l.indexOf(s);
191
177
  return i == -1 ? null : l.substring(0, i);
192
178
  };
193
- let C = h;
194
- class qe {
179
+ let B = f;
180
+ class Os {
195
181
  /**
196
182
  * 根据动态加载的组件对象,得到组件集合
197
183
  */
@@ -201,37 +187,37 @@ class qe {
201
187
  return r;
202
188
  for (let l = 0; l < n.length; l++) {
203
189
  const i = n[l];
204
- let a = C.trim(i, e, ".vue"), c = (s ? s + "-" : "") + C.getDashName(a), g = t[i];
205
- if (g.default)
206
- r[c] = g.default;
190
+ let o = B.trim(i, e, ".vue"), c = (s ? s + "-" : "") + B.getDashName(o), h = t[i];
191
+ if (h.default)
192
+ r[c] = h.default;
207
193
  else {
208
- let p = jt(g);
209
- r[c] = p;
194
+ let g = fe(h);
195
+ r[c] = g;
210
196
  }
211
197
  }
212
198
  return r;
213
199
  }
214
200
  }
215
- const f = class f {
201
+ const p = class p {
216
202
  };
217
- f.getChunks = (t, e) => {
203
+ p.getChunks = (t, e) => {
218
204
  let s = [];
219
205
  for (let r = 0; r < t.length; r += e) {
220
206
  let n = t.slice(r, r + e);
221
207
  s.push(n);
222
208
  }
223
209
  return s;
224
- }, f.intersect = (t, e) => t.filter((r) => e.indexOf(r) > -1), f.except = (t, e, s = null) => {
210
+ }, p.intersect = (t, e) => t.filter((r) => e.indexOf(r) > -1), p.except = (t, e, s = null) => {
225
211
  let r = e instanceof Array ? e : [e], n = [];
226
212
  if (s == null)
227
213
  n = t.filter((l) => r.indexOf(l) == -1);
228
214
  else
229
215
  for (let l = 0; l < t.length; l++) {
230
216
  let i = t[l];
231
- r.find((o) => s(i, o)) || n.push(i);
217
+ r.find((u) => s(i, u)) || n.push(i);
232
218
  }
233
219
  return n;
234
- }, f.contains = (t, e) => t.indexOf(e) > -1, f.filterContains = (t, e, s) => {
220
+ }, p.contains = (t, e) => t.indexOf(e) > -1, p.filterContains = (t, e, s) => {
235
221
  let r = [];
236
222
  if (!s)
237
223
  return t;
@@ -239,12 +225,12 @@ f.getChunks = (t, e) => {
239
225
  let l = t[n];
240
226
  if (l)
241
227
  for (let i = 0; i < e.length; i++) {
242
- let a = e[i];
243
- l[a].toString().toUpperCase().includes(s.toUpperCase()) && r.push(l);
228
+ let o = e[i];
229
+ l[o].toString().toUpperCase().includes(s.toUpperCase()) && r.push(l);
244
230
  }
245
231
  }
246
232
  return r;
247
- }, f.same = (t, e) => {
233
+ }, p.same = (t, e) => {
248
234
  if (t.length != e.length)
249
235
  return !1;
250
236
  let s = t.length >= e.length ? t : e, r = t.length < e.length ? t : e;
@@ -252,77 +238,77 @@ f.getChunks = (t, e) => {
252
238
  if (s[n] != r[n])
253
239
  return !1;
254
240
  return !0;
255
- }, f.max = (t, e) => rt.max(t, e), f.min = (t, e) => rt.min(t, e), f.sum = (t, e, s = null) => {
241
+ }, p.max = (t, e) => Dt.max(t, e), p.min = (t, e) => Dt.min(t, e), p.sum = (t, e, s = null) => {
256
242
  let r = 0;
257
243
  for (let l = 0; l < t.length; l++)
258
244
  r += e(t[l]);
259
245
  return s == null ? r : parseFloat(r.toFixed(s));
260
- }, f.avg = (t, e, s = null) => {
261
- let n = f.sum(t, e) / t.length;
246
+ }, p.avg = (t, e, s = null) => {
247
+ let n = p.sum(t, e) / t.length;
262
248
  return s == null ? n : parseFloat(n.toFixed(s));
263
- }, f.distinct = (t, e) => {
249
+ }, p.distinct = (t, e) => {
264
250
  let s = new Set(t.map((n) => e(n)));
265
251
  return Array.from(s);
266
- }, f.pushIfNotExist = (t, e) => {
252
+ }, p.pushIfNotExist = (t, e) => {
267
253
  t.indexOf(e) == -1 && t.push(e);
268
- }, f.fromValues = (t, e, s, r) => {
254
+ }, p.fromValues = (t, e, s, r) => {
269
255
  if (!t || t.length == 0 || !e || e.length == 0)
270
256
  return [];
271
257
  let n = [];
272
258
  return t.forEach((l) => {
273
- let i = e.find((a) => a[s] == l);
259
+ let i = e.find((o) => o[s] == l);
274
260
  i || (i = { [s]: l, [r]: l }), n.push(i);
275
261
  }), n;
276
- }, f.removeIndex = (t, e, s) => {
262
+ }, p.removeIndex = (t, e, s) => {
277
263
  let r = t.split(s);
278
264
  return r.splice(e, 1), r.join(s);
279
- }, f.split = (t, e, s = null) => {
265
+ }, p.split = (t, e, s = null) => {
280
266
  let r = [];
281
267
  return t && (r = t.split(e)), s != null && r.push(s), r;
282
- }, f.combine = (...t) => {
283
- let e = [], s = rt.max(t, (r) => r.length);
268
+ }, p.combine = (...t) => {
269
+ let e = [], s = Dt.max(t, (r) => r.length);
284
270
  for (let r = 0; r < s.length; r++) {
285
271
  let n = [], l;
286
272
  for (let i = 0; i < t.length; i++) {
287
- let a = t[i][r];
288
- a != null && (l = a);
273
+ let o = t[i][r];
274
+ o != null && (l = o);
289
275
  break;
290
276
  }
291
277
  for (let i = 0; i < t.length; i++) {
292
- let a = t[i][r];
293
- a != null ? n.push(a) : n.push(l);
278
+ let o = t[i][r];
279
+ o != null ? n.push(o) : n.push(l);
294
280
  }
295
281
  e.push(n);
296
282
  }
297
283
  return e;
298
- }, f.insert = (t, e, s) => {
284
+ }, p.insert = (t, e, s) => {
299
285
  let r = t.indexOf(e);
300
286
  return t.splice(r, 0, s), r;
301
- }, f.append = (t, e, s) => {
287
+ }, p.append = (t, e, s) => {
302
288
  let r = t.indexOf(e) + 1;
303
289
  return t.splice(r, 0, s), r;
304
- }, f.remove = (t, e) => {
305
- if (y.isNumber(e))
290
+ }, p.remove = (t, e) => {
291
+ if (x.isNumber(e))
306
292
  t.splice(e, 1);
307
- else if (y.isArray(e))
293
+ else if (x.isArray(e))
308
294
  for (let s = 0; s < e.length; s++)
309
- f.remove(t, e[s]);
295
+ p.remove(t, e[s]);
310
296
  else
311
297
  t.splice(t.indexOf(e), 1);
312
- }, f.orderBy = (t, e, s = !0) => {
313
- y.isArray(e) || (e = [e]);
298
+ }, p.orderBy = (t, e, s = !0) => {
299
+ x.isArray(e) || (e = [e]);
314
300
  let r = t.sort((n, l) => {
315
301
  let i = e[0](n) - e[0](l);
316
302
  return i == 0 && e[1] ? e[1](n) - e[1](l) : i;
317
303
  });
318
304
  return s ? r.reverse() : r;
319
- }, f.groupByArray = (t, e) => {
305
+ }, p.groupByArray = (t, e) => {
320
306
  let s = [];
321
307
  return t.forEach((r) => {
322
308
  let n = e(r), l = s.find((i) => i.key == n);
323
309
  l == null && (l = { key: n, value: [] }, s.push(l)), l.value.push(r);
324
310
  }), s;
325
- }, f.groupBy = (t, e, s = null) => {
311
+ }, p.groupBy = (t, e, s = null) => {
326
312
  let r = {};
327
313
  return t.forEach((n) => {
328
314
  let l = e(n);
@@ -331,10 +317,10 @@ f.getChunks = (t, e) => {
331
317
  r[n] = s(r[n]);
332
318
  }), r;
333
319
  };
334
- let T = f;
335
- class Ue {
320
+ let rt = p;
321
+ class Is {
336
322
  }
337
- const J = class J {
323
+ const nt = class nt {
338
324
  /**
339
325
  * 根据字符串Ascii码得到固定颜色字典
340
326
  */
@@ -348,10 +334,10 @@ const J = class J {
348
334
  }
349
335
  for (let r = 0; r < t.length; r++) {
350
336
  let n = t[r], l = 0;
351
- for (let g = 0; g < n.length; g++)
352
- l += n.charCodeAt(g);
353
- let i = l / s, a = 255 * i, o = 255 * (1 - i), c = 255 * (1 - i);
354
- e[n] = `rgb(${a}, ${o}, ${c})`;
337
+ for (let h = 0; h < n.length; h++)
338
+ l += n.charCodeAt(h);
339
+ let i = l / s, o = 255 * i, u = 255 * (1 - i), c = 255 * (1 - i);
340
+ e[n] = `rgb(${o}, ${u}, ${c})`;
355
341
  }
356
342
  return e;
357
343
  }
@@ -365,7 +351,7 @@ const J = class J {
365
351
  let e = "";
366
352
  for (let s = 0; s < t.length; s++) {
367
353
  let r = t[s];
368
- C.isNullOrEmpty(r) || (e += r, s != t.length - 1 && (e += " "));
354
+ B.isNullOrEmpty(r) || (e += r, s != t.length - 1 && (e += " "));
369
355
  }
370
356
  return e;
371
357
  }
@@ -474,13 +460,13 @@ const J = class J {
474
460
  let l = t.querySelector(s);
475
461
  if (!l)
476
462
  return null;
477
- let i = {}, a = t.getBoundingClientRect(), o = r.getBoundingClientRect(), g = t.querySelector(e).getBoundingClientRect(), p = l.getBoundingClientRect(), j = o.height - g.top;
463
+ let i = {}, o = t.getBoundingClientRect(), u = r.getBoundingClientRect(), h = t.querySelector(e).getBoundingClientRect(), g = l.getBoundingClientRect(), v = u.height - h.top;
478
464
  if (n == "right") {
479
- i.left = `${a.left + a.width}px`;
480
- let D;
481
- p.height > o.height ? D = o.height : D = p.height, i.height = `${D}px`, D + g.top > o.height ? (i.top = "initial", i.bottom = "0px") : i.top = `${a.top}px`;
465
+ i.left = `${o.left + o.width}px`;
466
+ let k;
467
+ g.height > u.height ? k = u.height : k = g.height, i.height = `${k}px`, k + h.top > u.height ? (i.top = "initial", i.bottom = "0px") : i.top = `${o.top}px`;
482
468
  } else if (n == "bottom")
483
- j -= g.height, i.left = `${a.left}px`, i.top = `${a.top + a.height}px`, j < p.height ? i.height = `${j}px` : i.height = `${p.height}px`;
469
+ v -= h.height, i.left = `${o.left}px`, i.top = `${o.top + o.height}px`, v < g.height ? i.height = `${v}px` : i.height = `${g.height}px`;
484
470
  else
485
471
  throw new Error(`暂未支持的position:${n}`);
486
472
  return i;
@@ -494,8 +480,8 @@ const J = class J {
494
480
  return 0;
495
481
  let s = [];
496
482
  for (let n = 0; n < e.length; n++) {
497
- let l = e[n], i = getComputedStyle(l), a = i.zIndex == "auto" ? 0 : i.zIndex;
498
- s.push(a);
483
+ let l = e[n], i = getComputedStyle(l), o = i.zIndex == "auto" ? 0 : i.zIndex;
484
+ s.push(o);
499
485
  }
500
486
  return Math.max(...s);
501
487
  }
@@ -541,7 +527,7 @@ const J = class J {
541
527
  }
542
528
  //#endregion
543
529
  };
544
- J.addClass = (t, e, s = null) => {
530
+ nt.addClass = (t, e, s = null) => {
545
531
  let r;
546
532
  if (e == null || e == "") {
547
533
  if (s == null || s == "")
@@ -550,7 +536,7 @@ J.addClass = (t, e, s = null) => {
550
536
  } else
551
537
  r = e;
552
538
  t.classList.add(r);
553
- }, J.removeClass = (t, e, s = null) => {
539
+ }, nt.removeClass = (t, e, s = null) => {
554
540
  if (e == null || e == "")
555
541
  return;
556
542
  let r = [];
@@ -563,20 +549,20 @@ J.addClass = (t, e, s = null) => {
563
549
  let l = r[n];
564
550
  s != l && l.classList.remove(e);
565
551
  }
566
- }, J.getWidthOrHeight = (t, e, s = null) => {
552
+ }, nt.getWidthOrHeight = (t, e, s = null) => {
567
553
  let r = 0, n = [];
568
- y.isArray(t) ? n.push(...t) : n.push(t);
554
+ x.isArray(t) ? n.push(...t) : n.push(t);
569
555
  for (let l = 0; l < n.length; l++) {
570
556
  let i = n[l];
571
557
  if (!i || !i.getBoundingClientRect)
572
558
  continue;
573
- let a = i.getBoundingClientRect();
574
- r += a[e], s && (r += s(i));
559
+ let o = i.getBoundingClientRect();
560
+ r += o[e], s && (r += s(i));
575
561
  }
576
562
  return r;
577
563
  };
578
- let $ = J;
579
- class X {
564
+ let V = nt;
565
+ class wt {
580
566
  /**
581
567
  * 从指定字典中提取忽略大小写的key的值
582
568
  */
@@ -608,61 +594,61 @@ class X {
608
594
  return n;
609
595
  let l = Object.keys(t);
610
596
  for (let i = 0; i < l.length; i++) {
611
- let a = l[i], o = e == null ? t[a] : e(t[a]);
612
- n = n.concat(a).concat(s).concat(o), i != l.length - 1 && (n += r);
597
+ let o = l[i], u = e == null ? t[o] : e(t[o]);
598
+ n = n.concat(o).concat(s).concat(u), i != l.length - 1 && (n += r);
613
599
  }
614
600
  return n;
615
601
  }
616
602
  // #endregion
617
603
  }
618
- const B = class B {
604
+ const F = class F {
619
605
  };
620
- B.bind = (t, e, s) => {
606
+ F.bind = (t, e, s) => {
621
607
  e && t.forEach((r) => {
622
608
  e.addEventListener(r, s, !0);
623
609
  });
624
- }, B.unbind = (t, e, s) => {
610
+ }, F.unbind = (t, e, s) => {
625
611
  e && t.forEach((r) => {
626
612
  e.removeEventListener(r, s, !0);
627
613
  });
628
- }, B.click = (t, e) => {
614
+ }, F.click = (t, e) => {
629
615
  t && t.addEventListener("click", e, !0);
630
- }, B.unclick = (t, e) => {
616
+ }, F.unclick = (t, e) => {
631
617
  t && t.removeEventListener("click", e, !0);
632
- }, B.scroll = (t, e) => {
618
+ }, F.scroll = (t, e) => {
633
619
  t && t.addEventListener("scroll", e, !0);
634
- }, B.unscroll = (t, e) => {
620
+ }, F.unscroll = (t, e) => {
635
621
  t && t.removeEventListener("scroll", e, !0);
636
622
  };
637
- let pt = B;
638
- const A = class A {
623
+ let vt = F;
624
+ const R = class R {
639
625
  };
640
- A.save = (t, e) => {
626
+ R.save = (t, e) => {
641
627
  let s = window.atob(t), r = s.length, n = new Uint8Array(r);
642
628
  for (; r--; )
643
629
  n[r] = s.charCodeAt(r);
644
630
  let l = new Blob([n]);
645
- At.saveAs(l, e);
646
- }, A.getExtension = (t) => {
631
+ we.saveAs(l, e);
632
+ }, R.getExtension = (t) => {
647
633
  let e = t.lastIndexOf(".");
648
634
  return e == -1 ? "" : t.substring(e).split("?")[0];
649
- }, A.isExcel = (t) => {
650
- let e = A.getExtension(t);
635
+ }, R.isExcel = (t) => {
636
+ let e = R.getExtension(t);
651
637
  return [".xls", ".xlsx"].indexOf(e) > -1;
652
- }, A.isImage = (t) => {
653
- let e = A.getExtension(t);
638
+ }, R.isImage = (t) => {
639
+ let e = R.getExtension(t);
654
640
  return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(e) > -1;
655
641
  };
656
- let Z = A;
657
- const dt = class dt {
642
+ let St = R;
643
+ const zt = class zt {
658
644
  };
659
- dt.getHtml = (t) => y.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>");
660
- let yt = dt;
661
- const ft = class ft {
645
+ zt.getHtml = (t) => x.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>");
646
+ let Gt = zt;
647
+ const Mt = class Mt {
662
648
  };
663
- ft.base64 = (t) => "data:image/png;base64," + t;
664
- let bt = ft;
665
- const b = class b {
649
+ Mt.base64 = (t) => "data:image/png;base64," + t;
650
+ let Zt = Mt;
651
+ const S = class S {
666
652
  /**
667
653
  * 生成指定范围内的随机数
668
654
  */
@@ -678,50 +664,50 @@ const b = class b {
678
664
  return Math.max(...t);
679
665
  }
680
666
  };
681
- b.filterPage = (t, e, s) => {
667
+ S.filterPage = (t, e, s) => {
682
668
  let r = (e - 1) * s, n = e * s;
683
- return t.filter((i, a) => a >= r && a < n);
684
- }, b.pageCount = (t, e) => Math.ceil(t / e), b.round = (t, e) => t.toFixed(e), b.ceil = (t) => Math.ceil(t), b.getPercentage = (t, e) => {
669
+ return t.filter((i, o) => o >= r && o < n);
670
+ }, S.pageCount = (t, e) => Math.ceil(t / e), S.round = (t, e) => t.toFixed(e), S.ceil = (t) => Math.ceil(t), S.getPercentage = (t, e) => {
685
671
  if (!t || !e)
686
672
  return 0;
687
- let s = t / e * 100, r = b.round(s, 2);
673
+ let s = t / e * 100, r = S.round(s, 2);
688
674
  return parseFloat(r);
689
- }, b.getPercentageText = (t, e) => b.getPercentage(t, e).toFixed(2), b.getProgressText = (t, e) => `${t ?? "-"}/${e ?? "-"}`, b.size = (t) => {
675
+ }, S.getPercentageText = (t, e) => S.getPercentage(t, e).toFixed(2), S.getProgressText = (t, e) => `${t ?? "-"}/${e ?? "-"}`, S.size = (t) => {
690
676
  if (!t)
691
677
  return "OKB";
692
678
  let e = 1024, s = e * 1024;
693
679
  if (t < s)
694
- return b.round(t / e, 2) + "KB";
680
+ return S.round(t / e, 2) + "KB";
695
681
  let r = s * 1024;
696
682
  if (t < r)
697
- return b.round(t / s, 2) + "MB";
683
+ return S.round(t / s, 2) + "MB";
698
684
  let n = r * 1024;
699
685
  if (t < n)
700
- return b.round(t / r, 2) + "GB";
686
+ return S.round(t / r, 2) + "GB";
701
687
  let l = n * 1024;
702
688
  if (t < l)
703
- return b.round(t / n, 2) + "TB";
689
+ return S.round(t / n, 2) + "TB";
704
690
  throw new Error("暂未支持比TB更大的大小");
705
691
  };
706
- let xt = b;
707
- const mt = class mt {
692
+ let Ht = S;
693
+ const qt = class qt {
708
694
  };
709
- mt.load = function(t, e, s, r) {
695
+ qt.load = function(t, e, s, r) {
710
696
  };
711
- let wt = mt;
712
- const M = class M {
697
+ let _t = qt;
698
+ const lt = class lt {
713
699
  };
714
- M.emit = (t, e) => {
715
- M.emits({ [t]: e });
716
- }, M.emits = (t) => {
700
+ lt.emit = (t, e) => {
701
+ lt.emits({ [t]: e });
702
+ }, lt.emits = (t) => {
717
703
  var s, r;
718
704
  let e = (r = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : r.emit;
719
705
  e && Object.keys(t).forEach((n) => {
720
706
  e(n, t[n]);
721
707
  });
722
708
  };
723
- let G = M;
724
- const U = class U {
709
+ let xt = lt;
710
+ const Y = class Y {
725
711
  /**
726
712
  * 净化对象,返回不带默认属性的对象
727
713
  */
@@ -729,7 +715,7 @@ const U = class U {
729
715
  let e = {}, s = Object.keys(t);
730
716
  for (let r = 0; r < s.length; r++) {
731
717
  let n = s[r], l = t[n];
732
- l != null && (y.isObject(l) ? e[n] = this.pure(l) : e[n] = t[n]);
718
+ l != null && (x.isObject(l) ? e[n] = this.pure(l) : e[n] = t[n]);
733
719
  }
734
720
  return e;
735
721
  }
@@ -754,71 +740,85 @@ const U = class U {
754
740
  }
755
741
  return r;
756
742
  }
743
+ /**
744
+ * 获取对象不区分大小写的key
745
+ */
746
+ static getKey(t, e) {
747
+ if (t == null)
748
+ return null;
749
+ let s = Object.keys(t);
750
+ for (let r = 0; r < s.length; r++) {
751
+ let n = s[r];
752
+ if (n.toLowerCase() == e.toLowerCase())
753
+ return n;
754
+ }
755
+ return null;
756
+ }
757
757
  };
758
- U.copy = (t, e = null) => {
758
+ Y.copy = (t, e = null) => {
759
759
  let s = [];
760
- y.isObject(t) && s.push(t);
760
+ x.isObject(t) && s.push(t);
761
761
  let r = [];
762
762
  for (let n = 0; n < s.length; n++) {
763
763
  let l = s[n], i = {};
764
- Object.keys(l).forEach((a) => {
765
- let o = l[a];
766
- e && e[a] ? i[a] = e[a]() : i[a] = o;
764
+ Object.keys(l).forEach((o) => {
765
+ let u = l[o];
766
+ e && e[o] ? i[o] = e[o]() : i[o] = u;
767
767
  }), r.push(i);
768
768
  }
769
- return y.isObject(t) ? r[0] : r;
770
- }, U.clone = (t, e = null) => {
771
- let s = qt(t, !0);
769
+ return x.isObject(t) ? r[0] : r;
770
+ }, Y.clone = (t, e = null) => {
771
+ let s = ve(t, !0);
772
772
  if (e == null)
773
773
  return s;
774
- if (y.isArray(t))
774
+ if (x.isArray(t))
775
775
  for (let r = 0; r < s.length; r++)
776
776
  e(s[r]);
777
- else y.isObject(t) && e(s);
777
+ else x.isObject(t) && e(s);
778
778
  return s;
779
- }, U.mergeTo = (t, e) => t == null ? e : e == null ? t : y.isArray(e) ? e.slice() : (Object.keys(e).forEach((r) => {
779
+ }, Y.mergeTo = (t, e) => t == null ? e : e == null ? t : x.isArray(e) ? e.slice() : (Object.keys(e).forEach((r) => {
780
780
  let n = e[r];
781
- typeof n == "object" ? t[r] = U.mergeTo(t[r], n) : t[r] = n;
782
- }), t), U.addProperties = (t, e, s) => {
781
+ typeof n == "object" ? t[r] = Y.mergeTo(t[r], n) : t[r] = n;
782
+ }), t), Y.addProperties = (t, e, s) => {
783
783
  let r = t;
784
784
  for (let n = 0; n < e.length; n++) {
785
785
  let l = e[n];
786
786
  n == e.length - 1 ? r[l] = s : (r[l] || (r[l] = {}), r = r[l]);
787
787
  }
788
788
  };
789
- let F = U;
790
- const O = class O {
789
+ let K = Y;
790
+ const U = class U {
791
791
  };
792
- O.loadContentAsync = async (t) => {
792
+ U.loadContentAsync = async (t) => {
793
793
  let e = t instanceof Array ? t : [t], s = [];
794
794
  for (let r = 0; r < e.length; r++) {
795
- let n = e[r], l = new Promise((i, a) => {
796
- let o = new XMLHttpRequest();
797
- o.open("GET", n, !1), o.onreadystatechange = () => {
798
- if (o.readyState == 4) {
799
- let c = O.getInnerTagByUrl(n);
800
- c.appendChild(document.createTextNode(o.responseText)), document.head.appendChild(c), i();
795
+ let n = e[r], l = new Promise((i, o) => {
796
+ let u = new XMLHttpRequest();
797
+ u.open("GET", n, !1), u.onreadystatechange = () => {
798
+ if (u.readyState == 4) {
799
+ let c = U.getInnerTagByUrl(n);
800
+ c.appendChild(document.createTextNode(u.responseText)), document.head.appendChild(c), i();
801
801
  }
802
- }, o.onerror = () => {
803
- a();
804
- }, o.send(null);
802
+ }, u.onerror = () => {
803
+ o();
804
+ }, u.send(null);
805
805
  });
806
806
  s.push(l);
807
807
  }
808
808
  return Promise.all(s);
809
- }, O.loadPathAsync = async (t, e) => {
809
+ }, U.loadPathAsync = async (t, e) => {
810
810
  let s = [];
811
811
  for (let r = 0; r < e.length; r++)
812
812
  s.push(t + e[r]);
813
- await O.loadAsync(s);
814
- }, O.loadAsync = async (t) => {
815
- let e = C.getArray(t), s = [];
813
+ await U.loadAsync(s);
814
+ }, U.loadAsync = async (t) => {
815
+ let e = B.getArray(t), s = [];
816
816
  for (let r = 0; r < e.length; r++) {
817
817
  let n = new Promise((l, i) => {
818
- let a = e[r], o = O.getOuterTagByUrl(a);
819
- document.head.appendChild(o), o.onload = (c) => {
818
+ let o = e[r], u = U.getOuterTagByUrl(o);
819
+ document.head.appendChild(u), u.onload = (c) => {
820
820
  l(c);
821
- }, o.onerror = (c) => {
821
+ }, u.onerror = (c) => {
822
822
  i(c);
823
823
  };
824
824
  });
@@ -831,18 +831,18 @@ O.loadContentAsync = async (t) => {
831
831
  n();
832
832
  });
833
833
  });
834
- }, O.loadAll = (...t) => Promise.all(t), O.getInnerTagByUrl = (t) => Z.getExtension(t).substring(1) == "css" ? document.createElement("style") : document.createElement("script"), O.getOuterTagByUrl = (t) => {
835
- if (Z.getExtension(t).substring(1) == "css") {
834
+ }, U.loadAll = (...t) => Promise.all(t), U.getInnerTagByUrl = (t) => St.getExtension(t).substring(1) == "css" ? document.createElement("style") : document.createElement("script"), U.getOuterTagByUrl = (t) => {
835
+ if (St.getExtension(t).substring(1) == "css") {
836
836
  let r = document.createElement("link");
837
837
  return r.rel = "stylesheet", r.href = t, r;
838
838
  }
839
839
  let s = document.createElement("script");
840
840
  return s.src = t, s;
841
841
  };
842
- let H = O;
843
- const L = class L {
842
+ let kt = U;
843
+ const Q = class Q {
844
844
  };
845
- L.delay = (t, e) => setTimeout(t, e), L.execute = (t, e, s) => {
845
+ Q.delay = (t, e) => setTimeout(t, e), Q.execute = (t, e, s) => {
846
846
  if (!s) {
847
847
  let r = setInterval(t, e);
848
848
  return Promise.resolve(r);
@@ -853,14 +853,14 @@ L.delay = (t, e) => setTimeout(t, e), L.execute = (t, e, s) => {
853
853
  r(n);
854
854
  }, s);
855
855
  });
856
- }, L.clearInterval = (t) => {
856
+ }, Q.clearInterval = (t) => {
857
857
  clearInterval(t);
858
- }, L.debounce = (t, e) => {
858
+ }, Q.debounce = (t, e) => {
859
859
  let s = null;
860
860
  return (r) => {
861
861
  s && clearTimeout(s), s = setTimeout(t, e, r);
862
862
  };
863
- }, L.throttle = (t, e) => {
863
+ }, Q.throttle = (t, e) => {
864
864
  let s = !0;
865
865
  return (r) => {
866
866
  if (!s)
@@ -870,185 +870,192 @@ L.delay = (t, e) => setTimeout(t, e), L.execute = (t, e, s) => {
870
870
  }, e, r);
871
871
  };
872
872
  };
873
- let St = L;
874
- const m = class m {
873
+ let te = Q;
874
+ function js() {
875
+ return new Promise((a, t) => {
876
+ import("echarts").then((e) => {
877
+ a(e);
878
+ });
879
+ });
880
+ }
881
+ const w = class w {
875
882
  };
876
- m.getTimestamp = (t = null) => (t ? new Date(t) : /* @__PURE__ */ new Date()).getTime(), m.getTime = (t = null) => t ? new Date(t) : /* @__PURE__ */ new Date(), m.format = (t, e) => I(t).format(e), m.getDateTimeString = () => m.formatSecondTime(/* @__PURE__ */ new Date()), m.getDateString = () => m.formatDate(/* @__PURE__ */ new Date()), m.getTimeString = () => m.formatTime(/* @__PURE__ */ new Date()), m.formatSecondTime = (t) => I(t).format("YYYY-MM-DD HH:mm:ss"), m.formatMillisecondTime = (t) => t ? I(t).format("YYYY-MM-DD HH:mm:ss SSS") : null, m.formatTime = (t) => t ? I(t).format("HH:mm:ss SSS") : null, m.formatDate = (t) => t ? I(t).format("YYYY-MM-DD") : null, m.addDays = (t, e) => t ? I(t).add(e, "days").format() : null, m.addMonths = (t, e) => t ? I(t).add(e, "months").format() : null, m.isWeekend = (t) => {
883
+ w.getTimestamp = (t = null) => (t ? new Date(t) : /* @__PURE__ */ new Date()).getTime(), w.getTime = (t = null) => t ? new Date(t) : /* @__PURE__ */ new Date(), w.format = (t, e) => N(t).format(e), w.getDateTimeString = () => w.formatSecondTime(/* @__PURE__ */ new Date()), w.getDateString = () => w.formatDate(/* @__PURE__ */ new Date()), w.getTimeString = () => w.formatTime(/* @__PURE__ */ new Date()), w.formatSecondTime = (t) => N(t).format("YYYY-MM-DD HH:mm:ss"), w.formatMillisecondTime = (t) => t ? N(t).format("YYYY-MM-DD HH:mm:ss SSS") : null, w.formatTime = (t) => t ? N(t).format("HH:mm:ss SSS") : null, w.formatDate = (t) => t ? N(t).format("YYYY-MM-DD") : null, w.addDays = (t, e) => t ? N(t).add(e, "days").format() : null, w.addMonths = (t, e) => t ? N(t).add(e, "months").format() : null, w.isWeekend = (t) => {
877
884
  if (!t)
878
885
  return !1;
879
- let e = I(t).format("d");
886
+ let e = N(t).format("d");
880
887
  return e == "6" || e == "0";
881
- }, m.localeTime = (t) => {
888
+ }, w.localeTime = (t) => {
882
889
  if (!t)
883
890
  return null;
884
891
  let s = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
885
- return I(t).add(s, "minutes").format();
892
+ return N(t).add(s, "minutes").format();
886
893
  };
887
- let R = m;
888
- const d = class d {
894
+ let q = w;
895
+ const m = class m {
889
896
  };
890
- d.getById = (t, e, s, r) => {
897
+ m.getById = (t, e, s, r) => {
891
898
  if (!s)
892
899
  return null;
893
900
  let n = s.find((l) => l[e] == t) || null;
894
901
  if (n != null)
895
902
  return n;
896
903
  for (let l = 0; l < s.length; l++) {
897
- let i = d.getById(t, e, s[l][r], r);
904
+ let i = m.getById(t, e, s[l][r], r);
898
905
  if (i != null) {
899
906
  n = i;
900
907
  break;
901
908
  }
902
909
  }
903
910
  return n;
904
- }, d.getByIds = (t, e, s, r) => {
905
- let n = T.distinct(t, (i) => i), l = [];
911
+ }, m.getByIds = (t, e, s, r) => {
912
+ let n = rt.distinct(t, (i) => i), l = [];
906
913
  return n.forEach((i) => {
907
- let a = d.getById(i, e, s, r);
908
- l.push(a);
914
+ let o = m.getById(i, e, s, r);
915
+ l.push(o);
909
916
  }), l;
910
- }, d.getNextById = (t, e, s, r) => {
911
- let n = d.getById(t, e, s, r), l = d.getParentsById(t, e, s, r);
917
+ }, m.getNextById = (t, e, s, r) => {
918
+ let n = m.getById(t, e, s, r), l = m.getParentsById(t, e, s, r);
912
919
  if (l.length == 0) {
913
920
  if (s.length == 1)
914
921
  return null;
915
922
  let c = s.indexOf(n);
916
923
  return c == s.length - 1 ? s[c - 1] : s[c + 1];
917
924
  }
918
- let i = l[l.length - 1], a = i[r];
919
- if (a.length == 1)
925
+ let i = l[l.length - 1], o = i[r];
926
+ if (o.length == 1)
920
927
  return i;
921
- let o = a.indexOf(n);
922
- return o == a.length - 1 ? a[o - 1] : a[o + 1];
923
- }, d.getSiblingsById = (t, e, s, r) => {
924
- let n = d.getParentById(t, e, s, r);
928
+ let u = o.indexOf(n);
929
+ return u == o.length - 1 ? o[u - 1] : o[u + 1];
930
+ }, m.getSiblingsById = (t, e, s, r) => {
931
+ let n = m.getParentById(t, e, s, r);
925
932
  return n == null ? s : n[r];
926
- }, d.getParentById = (t, e, s, r) => {
927
- let n = d.getParentsById(t, e, s, r, !1);
933
+ }, m.getParentById = (t, e, s, r) => {
934
+ let n = m.getParentsById(t, e, s, r, !1);
928
935
  return n[n.length - 1];
929
- }, d.getParentsById = (t, e, s, r, n = !1) => {
936
+ }, m.getParentsById = (t, e, s, r, n = !1) => {
930
937
  let l = [];
931
- return vt(t, e, s, r, l, n), l;
932
- }, d.getChildrenById = (t, e, s, r, n = !1) => {
933
- let l = d.getById(t, e, s, r), i = [];
934
- return n && i.push(l), it(l, r, i), i;
935
- }, d.getChildren = (t, e, s = !1) => {
938
+ return oe(t, e, s, r, l, n), l;
939
+ }, m.getChildrenById = (t, e, s, r, n = !1) => {
940
+ let l = m.getById(t, e, s, r), i = [];
941
+ return n && i.push(l), Nt(l, r, i), i;
942
+ }, m.getChildren = (t, e, s = !1) => {
936
943
  let r = [];
937
- return s && r.push(t), it(t, e, r), r;
938
- }, d.searchTree = (t, e, s, r) => {
944
+ return s && r.push(t), Nt(t, e, r), r;
945
+ }, m.searchTree = (t, e, s, r) => {
939
946
  let n = [];
940
947
  if (!e)
941
948
  return n;
942
- let l = t ? t.toUpperCase() : "", i = y.isString(r) ? [r] : r;
943
- for (let a of e) {
944
- let o = !1, c = d.getChildren(a, s, !0);
945
- for (let g of c) {
946
- for (let p of i) {
947
- let j = g[p];
948
- if ((j ? j.toUpperCase() : "").indexOf(l) > -1) {
949
- o = !0;
949
+ let l = t ? t.toUpperCase() : "", i = x.isString(r) ? [r] : r;
950
+ for (let o of e) {
951
+ let u = !1, c = m.getChildren(o, s, !0);
952
+ for (let h of c) {
953
+ for (let g of i) {
954
+ let v = h[g];
955
+ if ((v ? v.toUpperCase() : "").indexOf(l) > -1) {
956
+ u = !0;
950
957
  break;
951
958
  }
952
959
  }
953
- if (o)
960
+ if (u)
954
961
  break;
955
962
  }
956
- if (o) {
957
- let g = d.searchTree(t, a[s], s, r), p = { ...a, [s]: g };
958
- n.push(p);
963
+ if (u) {
964
+ let h = m.searchTree(t, o[s], s, r), g = { ...o, [s]: h };
965
+ n.push(g);
959
966
  }
960
967
  }
961
968
  return n;
962
- }, d.removeById = (t, e, s, r) => {
963
- let n = d.getById(t, e, s, r), l = d.getParentsById(t, e, s, r);
969
+ }, m.removeById = (t, e, s, r) => {
970
+ let n = m.getById(t, e, s, r), l = m.getParentsById(t, e, s, r);
964
971
  if (l.length == 0) {
965
- T.remove(s, n);
972
+ rt.remove(s, n);
966
973
  return;
967
974
  }
968
975
  let i = l[l.length - 1];
969
- T.remove(i[r], n);
970
- }, d.getFlat = (t, e) => {
976
+ rt.remove(i[r], n);
977
+ }, m.getFlat = (t, e) => {
971
978
  let s = [...t];
972
979
  for (let r = 0; r < t.length; r++) {
973
980
  let l = t[r][e];
974
981
  if (l.length > 0) {
975
- let i = d.getFlat(l, e);
982
+ let i = m.getFlat(l, e);
976
983
  s.push(...i);
977
984
  }
978
985
  }
979
986
  return s;
980
- }, d.map = (t, e, s, r) => {
987
+ }, m.map = (t, e, s, r) => {
981
988
  let n = [];
982
989
  for (let l = 0; l < t.length; l++) {
983
- let i = t[l], a = r(i);
984
- n.push(a);
985
- let o = i[e];
986
- if (o && o.length > 0) {
987
- let c = d.map(o, e, s, r);
988
- a[s] = c;
990
+ let i = t[l], o = r(i);
991
+ n.push(o);
992
+ let u = i[e];
993
+ if (u && u.length > 0) {
994
+ let c = m.map(u, e, s, r);
995
+ o[s] = c;
989
996
  }
990
997
  }
991
998
  return n;
992
999
  };
993
- let _ = d;
994
- function vt(u, t, e, s, r, n) {
1000
+ let Ct = m;
1001
+ function oe(a, t, e, s, r, n) {
995
1002
  for (let l = 0; l < e.length; l++) {
996
1003
  let i = e[l];
997
- if (i[t] == u) {
1004
+ if (i[t] == a) {
998
1005
  n && r.push(i);
999
1006
  break;
1000
1007
  } else
1001
- _.getById(u, t, i[s], s) != null && (r.push(i), vt(u, t, i[s], s, r, n));
1008
+ Ct.getById(a, t, i[s], s) != null && (r.push(i), oe(a, t, i[s], s, r, n));
1002
1009
  }
1003
1010
  return r;
1004
1011
  }
1005
- function it(u, t, e) {
1006
- let s = u[t];
1012
+ function Nt(a, t, e) {
1013
+ let s = a[t];
1007
1014
  if (!s || s.length == 0)
1008
1015
  return e;
1009
1016
  for (let r = 0; r < s.length; r++) {
1010
1017
  let n = s[r];
1011
- e.push(n), it(n, t, e);
1018
+ e.push(n), Nt(n, t, e);
1012
1019
  }
1013
1020
  return e;
1014
1021
  }
1015
- const v = class v {
1022
+ const D = class D {
1016
1023
  };
1017
- v.get = (t, e = null) => localStorage.getItem(t) ?? e, v.set = (t, e) => localStorage.setItem(t, e), v.getObject = (t) => JSON.parse(localStorage.getItem(t)), v.setObject = (t, e) => localStorage.setItem(t, JSON.stringify(e)), v.remove = (t) => localStorage.removeItem(t), v.getLeftStorage = () => {
1024
+ D.get = (t, e = null) => localStorage.getItem(t) ?? e, D.set = (t, e) => localStorage.setItem(t, e), D.getObject = (t) => JSON.parse(localStorage.getItem(t)), D.setObject = (t, e) => localStorage.setItem(t, JSON.stringify(e)), D.remove = (t) => localStorage.removeItem(t), D.getLeftStorage = () => {
1018
1025
  let t = 0;
1019
1026
  return Object.keys(localStorage).forEach((s) => {
1020
1027
  t += localStorage.getItem(s).length;
1021
1028
  }), 1e-4 * 1024 - t / 1024;
1022
- }, v.canStorage = (t) => {
1029
+ }, D.canStorage = (t) => {
1023
1030
  let e = JSON.stringify(t).length / 1024;
1024
- return v.getLeftStorage() > e;
1031
+ return D.getLeftStorage() > e;
1025
1032
  };
1026
- let x = v;
1027
- const et = class et {
1033
+ let E = D;
1034
+ const Et = class Et {
1028
1035
  };
1029
- et.isBottom = (t) => {
1036
+ Et.isBottom = (t) => {
1030
1037
  let e = document.querySelector(t);
1031
1038
  return e ? e.scrollTop + e.clientHeight == e.scrollHeight : !1;
1032
- }, et.scrollToBottom = (t) => {
1039
+ }, Et.scrollToBottom = (t) => {
1033
1040
  let e = document.querySelector(t);
1034
1041
  if (!e)
1035
1042
  return;
1036
1043
  let s = e.scrollHeight - e.clientHeight;
1037
1044
  e.scrollTop = s;
1038
1045
  };
1039
- let kt = et;
1040
- class zt {
1046
+ let ee = Et;
1047
+ class ut {
1041
1048
  /**
1042
- * 从树集合构建出Json对象
1049
+ * 把字符串格式化为Json字符串
1043
1050
  */
1044
- static buildObject(t, e, s) {
1045
- return ut(t, e, 1, s);
1051
+ static stringify(t) {
1052
+ return t == null ? null : JSON.stringify(t, null, 2);
1046
1053
  }
1047
1054
  /**
1048
- * 把字符串格式化为Json字符串
1055
+ * 对非字符串进行序列化
1049
1056
  */
1050
- static stringify(t) {
1051
- return JSON.stringify(t, null, 2);
1057
+ static stringifyWithString(t) {
1058
+ return typeof t == "string" ? t : ut.stringify(t);
1052
1059
  }
1053
1060
  /**
1054
1061
  * 把字符串格式化为Json字符串
@@ -1064,6 +1071,12 @@ class zt {
1064
1071
  }
1065
1072
  return JSON.stringify(e, null, 2);
1066
1073
  }
1074
+ /**
1075
+ * 反序列化成json对象
1076
+ */
1077
+ static parse(t) {
1078
+ return JSON.parse(t);
1079
+ }
1067
1080
  /**
1068
1081
  * 根据props中的.自动分割得到属性值
1069
1082
  */
@@ -1083,7 +1096,7 @@ class zt {
1083
1096
  * 把json字符串合并到目标对象上
1084
1097
  */
1085
1098
  static mergeTo(t, e) {
1086
- if (C.isNullOrEmpty(e))
1099
+ if (B.isNullOrEmpty(e))
1087
1100
  return;
1088
1101
  let s = JSON.parse(e);
1089
1102
  Object.keys(s).forEach((n) => {
@@ -1091,32 +1104,38 @@ class zt {
1091
1104
  t[n] = l;
1092
1105
  });
1093
1106
  }
1107
+ /**
1108
+ * 从树集合构建出Json对象
1109
+ */
1110
+ static buildObject(t, e, s) {
1111
+ return Pt(t, e, 1, s);
1112
+ }
1094
1113
  }
1095
- function ut(u, t, e, s) {
1096
- if (!u || u.length == 0)
1114
+ function Pt(a, t, e, s) {
1115
+ if (!a || a.length == 0)
1097
1116
  return "{}";
1098
1117
  let r = `{
1099
1118
  `;
1100
- for (let n = 0; n < u.length; n++) {
1101
- let l = u[n], i = s(l);
1102
- i.type == "array" ? (i.remark && (r += Q(2 * e) + "//" + i.remark + `
1103
- `), r += lt(2 * e, i.key) + "[", r += ut(l[t], t, e + 1, s), r += "]", n != u.length - 1 && (r += ",")) : i.type == "object" ? (i.remark && (r += Q(2 * e) + "//" + i.remark + `
1104
- `), r += lt(2 * e, i.key), r += ut(l[t], t, e + 1, s), n != u.length - 1 && (r += ",")) : (r += lt(2 * e, i.key), i.type == "string" ? r += '""' : i.type == "date" ? r += `"${R.getDateTimeString()}"` : i.type == "int" || i.type == "number" ? r += "0" : i.type == "boolean" ? r += "false" : r += null, n != u.length - 1 && (r += ","), i.remark && (r += " //" + i.remark)), r += `
1119
+ for (let n = 0; n < a.length; n++) {
1120
+ let l = a[n], i = s(l);
1121
+ i.type == "array" ? (i.remark && (r += yt(2 * e) + "//" + i.remark + `
1122
+ `), r += Lt(2 * e, i.key) + "[", r += Pt(l[t], t, e + 1, s), r += "]", n != a.length - 1 && (r += ",")) : i.type == "object" ? (i.remark && (r += yt(2 * e) + "//" + i.remark + `
1123
+ `), r += Lt(2 * e, i.key), r += Pt(l[t], t, e + 1, s), n != a.length - 1 && (r += ",")) : (r += Lt(2 * e, i.key), i.type == "string" ? r += '""' : i.type == "date" ? r += `"${q.getDateTimeString()}"` : i.type == "int" || i.type == "number" ? r += "0" : i.type == "boolean" ? r += "false" : r += null, n != a.length - 1 && (r += ","), i.remark && (r += " //" + i.remark)), r += `
1105
1124
  `;
1106
1125
  }
1107
- return r += Q(2 * (e - 1)), r += "}", r;
1126
+ return r += yt(2 * (e - 1)), r += "}", r;
1108
1127
  }
1109
- function Q(u) {
1128
+ function yt(a) {
1110
1129
  let t = "";
1111
- for (let e = 0; e < u; e++)
1130
+ for (let e = 0; e < a; e++)
1112
1131
  t += " ";
1113
1132
  return t;
1114
1133
  }
1115
- function lt(u, t) {
1116
- let e = Q(u);
1134
+ function Lt(a, t) {
1135
+ let e = yt(a);
1117
1136
  return e += '"' + t + '": ', e;
1118
1137
  }
1119
- let Et = P("setting", {
1138
+ let ue = G("setting", {
1120
1139
  state() {
1121
1140
  return {
1122
1141
  loaded: !1,
@@ -1154,11 +1173,7 @@ let Et = P("setting", {
1154
1173
  */
1155
1174
  business: null,
1156
1175
  upload: null,
1157
- version: null,
1158
- /**
1159
- * 请求器
1160
- */
1161
- requester: k.getRequester().getLocal()
1176
+ version: null
1162
1177
  };
1163
1178
  },
1164
1179
  actions: {
@@ -1172,13 +1187,13 @@ let Et = P("setting", {
1172
1187
  * 加载设置
1173
1188
  */
1174
1189
  async loadSetting() {
1175
- return this.requester.get("/app/setting").then(({ data: u }) => (Object.keys(u).forEach((t) => {
1176
- let e = u[t];
1190
+ return j.get("/app/setting").then(({ data: a }) => (Object.keys(a).forEach((t) => {
1191
+ let e = a[t];
1177
1192
  e && (this[t] = e);
1178
- }), $.addClass(document.documentElement, this.theme, window.setting.web.theme), G.emits({ theme: this.theme }), Promise.resolve(u))).catch((u) => Promise.reject(u));
1193
+ }), V.addClass(document.documentElement, this.theme, window.setting.web.theme), xt.emits({ theme: this.theme }), Promise.resolve(a))).catch((a) => Promise.reject(a));
1179
1194
  }
1180
1195
  }
1181
- }), tt = P("config", {
1196
+ }), H = G("config", {
1182
1197
  state() {
1183
1198
  return {
1184
1199
  /**
@@ -1205,46 +1220,66 @@ let Et = P("setting", {
1205
1220
  * 文件布局方式
1206
1221
  */
1207
1222
  fileLayout: null,
1208
- /**
1209
- * 请求器
1210
- */
1211
- requester: k.getRequester().getLocal()
1223
+ //编辑器架构配置
1224
+ editor: {
1225
+ schemas: [],
1226
+ //编辑器架构集合
1227
+ completions: {}
1228
+ //智能提示是否注册信息,防止重复注册
1229
+ }
1212
1230
  };
1213
1231
  },
1214
1232
  actions: {
1215
1233
  /**
1216
1234
  * 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
1217
1235
  */
1218
- init(u) {
1219
- let t = Et();
1220
- this.background = t.background, this.theme = t.theme, this.layout = t.layout, this.language = t.language, this.font = t.font, u.forEach((e) => {
1236
+ init(a) {
1237
+ let t = ue();
1238
+ this.background = t.background, this.theme = t.theme, this.layout = t.layout, this.language = t.language, this.font = t.font, a.forEach((e) => {
1221
1239
  let s = this.getLocalConfig(e.type);
1222
1240
  this[e.type] = s ?? e.content;
1223
- }), $.removeClass(document.documentElement, t.theme), $.addClass(document.documentElement, this.theme), G.emit("theme", this.theme), $.addClass(document.documentElement, this.layout), this.setBackground(this.background), $.addStyle(document.documentElement, "font-family", this.font);
1241
+ }), V.removeClass(document.documentElement, t.theme), V.addClass(document.documentElement, this.theme), xt.emit("theme", this.theme), V.addClass(document.documentElement, this.layout), this.setBackground(this.background), V.addStyle(document.documentElement, "font-family", this.font);
1242
+ },
1243
+ /**
1244
+ * 尝试添加架构
1245
+ */
1246
+ tryAddSchema(a, t, e) {
1247
+ let s = this.editor.schemas.find((r) => r.fileMatch == t);
1248
+ if (s != null) {
1249
+ s.schema = e;
1250
+ return;
1251
+ }
1252
+ s = {
1253
+ uri: a,
1254
+ //必须。也用于防止 重复创建或者覆盖 架构对象
1255
+ fileMatch: [t],
1256
+ //VIP:匹配到的路径,将会自动使用该schema
1257
+ schema: e
1258
+ }, this.editor.schemas.push(s);
1224
1259
  },
1225
1260
  /**
1226
1261
  * 获取本地配置
1227
1262
  */
1228
- getLocalConfig(u) {
1229
- return x.getObject(u);
1263
+ getLocalConfig(a) {
1264
+ return E.getObject(a);
1230
1265
  },
1231
1266
  /**
1232
1267
  * 设置背景
1233
1268
  */
1234
- setBackground(u) {
1235
- let t = `url("/default/backgrounds/${u}") center / cover no-repeat`, e = this.layout == "desktop" ? "unset" : 0.05, s = document.createElement("style");
1236
- s.innerText = `html::before{content:'';width:100%;height:100%;position:absolute;background:${t};opacity:${e};`, document.head.appendChild(s), this.background = u;
1269
+ setBackground(a) {
1270
+ let t = `url("/default/backgrounds/${a}") center / cover no-repeat`, e = this.layout == "desktop" ? "unset" : 0.05, s = document.createElement("style");
1271
+ s.innerText = `html::before{content:'';width:100%;height:100%;position:absolute;background:${t};opacity:${e};`, document.head.appendChild(s), this.background = a;
1237
1272
  },
1238
1273
  /**
1239
1274
  * 加载用户配置
1240
1275
  */
1241
- async loadConfig(u, t = !0) {
1276
+ async loadConfig(a, t = !0) {
1242
1277
  if (t) {
1243
- let e = this.getLocalConfig(u);
1278
+ let e = this.getLocalConfig(a);
1244
1279
  if (e)
1245
1280
  return Promise.resolve(e);
1246
1281
  }
1247
- return this.requester.get(`/user/config?type=${u}`).then((e) => {
1282
+ return j.get(`/user/config?type=${a}`).then((e) => {
1248
1283
  let s = e.data ? JSON.parse(e.data) : null;
1249
1284
  return Promise.resolve(s);
1250
1285
  });
@@ -1252,44 +1287,68 @@ let Et = P("setting", {
1252
1287
  /**
1253
1288
  * 全量保存用户配置
1254
1289
  */
1255
- async saveConfig(u, t, e = !0) {
1256
- return e && x.setObject(u, t), this.requester.post(`/user/config?type=${u}`, t).then((s) => Promise.resolve(!0));
1290
+ async saveConfig(a, t, e = !0) {
1291
+ return e && E.setObject(a, t), j.post(`/user/config?type=${a}`, t).then((s) => Promise.resolve(!0));
1257
1292
  },
1258
1293
  /**
1259
1294
  * 部分保存用户配置
1260
1295
  */
1261
- async patchConfig(u, t) {
1262
- return this.requester.patch(`/user/config?type=${u}`, t).then((e) => Promise.resolve(!0));
1296
+ async patchConfig(a, t) {
1297
+ return j.patch(`/user/config?type=${a}`, t).then((e) => Promise.resolve(!0));
1263
1298
  }
1264
1299
  }
1265
- }), Ot = P("log", {
1300
+ }), Bs = G("driver", {
1266
1301
  state() {
1267
1302
  return {
1268
- logs: []
1303
+ /**
1304
+ * 加载完毕状态记录
1305
+ */
1306
+ loaded: {
1307
+ apps: !1,
1308
+ envs: !1
1309
+ },
1310
+ /**
1311
+ * 是否加载中状态,用于并发场景 防止重复拉取接口
1312
+ */
1313
+ loading: {
1314
+ apps: !1,
1315
+ envs: !1
1316
+ },
1317
+ /**
1318
+ * 应用集合,存储到Store中,防止每一个Driver实例重复加载
1319
+ */
1320
+ apps: [],
1321
+ /**
1322
+ * 环境集合,存储到Store中,防止每一个Driver实例重复加载
1323
+ */
1324
+ envs: []
1269
1325
  };
1270
1326
  },
1271
1327
  actions: {
1272
1328
  /**
1273
- * 手动添加日志
1274
- */
1275
- add(u, t, e, s = null) {
1276
- let r = R.getTimeString();
1277
- this.logs.unshift({ time: r, code: u, message: t, stack: e, elapsed: s });
1278
- },
1279
- /**
1280
- * 删除日志
1329
+ * 加载应用选项
1281
1330
  */
1282
- remove(u) {
1283
- this.logs.splice(u, 1);
1331
+ async loadApps(a = !1) {
1332
+ if (!this.loading.apps && !(!a && this.loaded.apps))
1333
+ return this.loading.apps = !0, j.post("/app/options").then((t) => {
1334
+ this.apps = t.data, this.loaded.apps = !0;
1335
+ }).finally(() => {
1336
+ this.loading.apps = !1;
1337
+ });
1284
1338
  },
1285
1339
  /**
1286
- * 清空日志
1340
+ * 加载环境选项
1287
1341
  */
1288
- clear() {
1289
- this.logs = [];
1342
+ async loadEnvs(a = !1) {
1343
+ if (!this.loading.envs && (this.loading.envs = !0, !(!a && this.loaded.envs)))
1344
+ return j.post("/env/options").then((t) => {
1345
+ this.envs = t.data, this.loaded.envs = !0;
1346
+ }).finally(() => {
1347
+ this.loading.envs = !1;
1348
+ });
1290
1349
  }
1291
1350
  }
1292
- }), Tt = P("env", {
1351
+ }), Ce = G("env", {
1293
1352
  state() {
1294
1353
  return {
1295
1354
  //环境变量
@@ -1300,14 +1359,38 @@ let Et = P("setting", {
1300
1359
  /**
1301
1360
  * 使用环境变量
1302
1361
  */
1303
- useEnv(u) {
1304
- this.env = u, this.env.base = C.trimEnd(u.VITE_ROOT, "/");
1362
+ useEnv(a) {
1363
+ this.env = a, this.env.base = B.trimEnd(a.VITE_ROOT, "/");
1364
+ }
1365
+ }
1366
+ }), se = G("log", {
1367
+ state() {
1368
+ return {
1369
+ logs: []
1370
+ };
1371
+ },
1372
+ actions: {
1373
+ /**
1374
+ * 手动添加日志
1375
+ */
1376
+ add(a, t, e, s = null) {
1377
+ let r = q.getTimeString();
1378
+ this.logs.unshift({ time: r, code: a, message: t, stack: e, elapsed: s });
1379
+ },
1380
+ /**
1381
+ * 删除日志
1382
+ */
1383
+ remove(a) {
1384
+ this.logs.splice(a, 1);
1385
+ },
1386
+ /**
1387
+ * 清空日志
1388
+ */
1389
+ clear() {
1390
+ this.logs = [];
1305
1391
  }
1306
1392
  }
1307
- }), at;
1308
- window._setting ? at = window._setting : at = window.setting;
1309
- const K = at;
1310
- let Jt = P("socket", {
1393
+ }), Ee = G("socket", {
1311
1394
  state() {
1312
1395
  return {
1313
1396
  socket: null,
@@ -1325,28 +1408,28 @@ let Jt = P("socket", {
1325
1408
  * 登录后,连接Socket
1326
1409
  */
1327
1410
  async connect() {
1328
- if (!K.api.ws)
1411
+ if (!mt.api.ws)
1329
1412
  return;
1330
1413
  if (this.socket == null || this.reconnect) {
1331
- let t = K.api.ws, s = await It().getAuthorization(t), r = S.encode(s), n = `${t}?authorization=${r}`;
1414
+ let t = mt.api.ws, s = await ce().getAuth(t), r = O.encode(s), n = `${t}?authorization=${r}`;
1332
1415
  this.socket = new WebSocket(n);
1333
1416
  }
1334
- let u;
1417
+ let a;
1335
1418
  this.socket.onopen = (t) => {
1336
- clearTimeout(u), this.connected = !0;
1419
+ clearTimeout(a), this.connected = !0;
1337
1420
  }, this.socket.onmessage = (t) => {
1338
1421
  this.handler && this.handler(t);
1339
1422
  }, this.socket.onerror = (t) => {
1340
- this.reconnect = !0, console.warn(`Socket连接失败:${K.api.ws}`);
1423
+ this.reconnect = !0, console.warn(`Socket连接失败:${mt.api.ws}`);
1341
1424
  }, this.socket.onclose = (t) => {
1342
- this.connected = !1, this.reconnect && (u = setTimeout(async () => await this.connect(), 1e3));
1425
+ this.connected = !1, this.reconnect && (a = setTimeout(async () => await this.connect(), 1e3));
1343
1426
  };
1344
1427
  },
1345
1428
  /**
1346
1429
  * 订阅并替换Socket事件处理程序
1347
1430
  */
1348
- subscribe(u = null) {
1349
- this.handler = u;
1431
+ subscribe(a = null) {
1432
+ this.handler = a;
1350
1433
  },
1351
1434
  /**
1352
1435
  * 取消订阅Socket事件处理程序,防止内存泄漏
@@ -1362,7 +1445,7 @@ let Jt = P("socket", {
1362
1445
  }
1363
1446
  }
1364
1447
  });
1365
- const It = P("user", {
1448
+ const ce = G("user", {
1366
1449
  state: () => ({
1367
1450
  user: null,
1368
1451
  //用户信息
@@ -1371,132 +1454,72 @@ const It = P("user", {
1371
1454
  menusFlat: null,
1372
1455
  debugger: null,
1373
1456
  //是否调试人
1374
- env: null,
1457
+ env: null
1375
1458
  //当前访问环境
1376
- /**
1377
- * 请求器
1378
- */
1379
- requester: k.getRequester().getLocal()
1380
1459
  }),
1381
1460
  actions: {
1382
1461
  /**
1383
1462
  * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
1384
1463
  */
1385
- getSso() {
1386
- return x.getObject("sso");
1464
+ async getSso() {
1465
+ return await (await I.getProvider().getDefault("user")).getAsync("sso");
1387
1466
  },
1388
1467
  /**
1389
1468
  * 登录后,获取用户信息
1390
1469
  */
1391
1470
  async loadInfo() {
1392
- return this.requester.get("/user/info").then(({ data: u }) => {
1393
- let t = Tt(), e = tt();
1394
- e.init(u.configs);
1395
- let s = t.env.VITE_CDN == "true" ? "StaticFile" : "Local", r = t.env.VITE_BASE, n = k.getCdn().create(s, r);
1396
- this.user = u, this.debugger = u.debugger;
1471
+ return j.get("/user/info").then(async ({ data: a }) => {
1472
+ let t = Ce(), e = H();
1473
+ e.init(a.configs);
1474
+ let s = t.env.VITE_CDN == "true" ? "StaticFile" : "Local", r = t.env.VITE_BASE, n = await I.getCdn().create(s, r);
1475
+ this.user = a, this.debugger = a.debugger;
1397
1476
  let l = e.language == "en" ? null : e.language, i = {
1398
1477
  paths: { vs: n.getPath("monaco-editor") },
1399
1478
  //加载monaco cdn压缩资源包,可以大幅减少本地请求数量
1400
1479
  "vs/nls": { availableLanguages: { "*": l } }
1401
1480
  //设置编辑器默认语言
1402
1481
  };
1403
- return Ut.config(i), Promise.resolve(u);
1482
+ return bt.config(i), Promise.resolve(a);
1404
1483
  });
1405
1484
  },
1406
1485
  /**
1407
1486
  * 通过完整url和请求体,获取授权头
1408
1487
  */
1409
- async getAuthorization(u, t = null) {
1410
- let e = this.getSso();
1488
+ async getAuth(a, t = null) {
1489
+ let e = await this.getSso();
1411
1490
  if (e == null)
1412
1491
  return "pc";
1413
- let s = R.getTimestamp(), n = await k.getSigner().create("default").getSign(e.userId, u, t, s, e.secret);
1414
- return k.getSso().create(e.type).getAuthorization(e.identity.token, s, n, this.env);
1492
+ let s = q.getTimestamp(), n = await (await I.getSigner().create("default")).getSign(e.userId, a, t, s, e.secret);
1493
+ return (await I.getSso().create(e.type)).getAuth(e.identity.token, s, n, this.env);
1415
1494
  },
1416
1495
  /**
1417
1496
  * 未登录,获取匿名登录信息
1418
1497
  */
1419
1498
  getAnonymous() {
1420
- tt().init([]);
1499
+ H().init([]);
1421
1500
  },
1422
1501
  /**
1423
1502
  * 根据路径获取路由
1424
1503
  */
1425
- getMenuByUrl(u) {
1426
- let t = S.getPath(u);
1504
+ getMenuByUrl(a) {
1505
+ let t = O.getPath(a);
1427
1506
  return this.menusFlat.find((s) => s.url.split("?")[0] == t);
1428
1507
  },
1429
1508
  /**
1430
1509
  * 加载服务端路由
1431
1510
  */
1432
1511
  async loadMenus() {
1433
- return this.requester.get("/user/menu").then(({ data: u }) => (this.menus = u, this.menusFlat = _.getFlat(u, "children"), Promise.resolve(u)));
1512
+ return j.get("/user/menu").then(({ data: a }) => (this.menus = a, this.menusFlat = Ct.getFlat(a, "children"), Promise.resolve(a)));
1434
1513
  },
1435
1514
  /**
1436
1515
  * 退出登录
1437
1516
  */
1438
1517
  async logout() {
1439
- return this.requester.post("/user/logout").then(() => (this.user = null, this.menus = null, k.getSso().create(this.getSso().type).logout(), Jt().disconnect(), Promise.resolve()));
1440
- }
1441
- }
1442
- });
1443
- P("driver", {
1444
- state() {
1445
- return {
1446
- /**
1447
- * 加载完毕状态记录
1448
- */
1449
- loaded: {
1450
- apps: !1,
1451
- envs: !1
1452
- },
1453
- /**
1454
- * 是否加载中状态,用于并发场景 防止重复拉取接口
1455
- */
1456
- loading: {
1457
- apps: !1,
1458
- envs: !1
1459
- },
1460
- /**
1461
- * 应用集合,存储到Store中,防止每一个Driver实例重复加载
1462
- */
1463
- apps: [],
1464
- /**
1465
- * 环境集合,存储到Store中,防止每一个Driver实例重复加载
1466
- */
1467
- envs: [],
1468
- /**
1469
- * 请求器
1470
- */
1471
- requester: k.getRequester().getLocal()
1472
- };
1473
- },
1474
- actions: {
1475
- /**
1476
- * 加载应用选项
1477
- */
1478
- async loadApps(u = !1) {
1479
- if (!this.loading.apps && !(!u && this.loaded.apps))
1480
- return this.loading.apps = !0, this.requester.post("/app/options").then((t) => {
1481
- this.apps = t.data, this.loaded.apps = !0;
1482
- }).finally(() => {
1483
- this.loading.apps = !1;
1484
- });
1485
- },
1486
- /**
1487
- * 加载环境选项
1488
- */
1489
- async loadEnvs(u = !1) {
1490
- if (!this.loading.envs && (this.loading.envs = !0, !(!u && this.loaded.envs)))
1491
- return this.requester.post("/env/options").then((t) => {
1492
- this.envs = t.data, this.loaded.envs = !0;
1493
- }).finally(() => {
1494
- this.loading.envs = !1;
1495
- });
1518
+ return j.post("/user/logout").then(async () => (this.user = null, this.menus = null, (await I.getSso().create(this.getSso().type)).logout(), Ee().disconnect(), Promise.resolve()));
1496
1519
  }
1497
1520
  }
1498
1521
  });
1499
- class Le {
1522
+ class As {
1500
1523
  /**
1501
1524
  * 获取浏览器默认语言
1502
1525
  */
@@ -1507,11 +1530,11 @@ class Le {
1507
1530
  * 获取当前语言
1508
1531
  */
1509
1532
  static getCurrentLanguage() {
1510
- let t = tt(), e = this.getBrowserLanguage();
1533
+ let t = H(), e = this.getBrowserLanguage();
1511
1534
  return t.language || e || "zh-cn";
1512
1535
  }
1513
1536
  }
1514
- const w = class w {
1537
+ const C = class C {
1515
1538
  /**
1516
1539
  * 获取指定地址路由对象
1517
1540
  */
@@ -1628,8 +1651,8 @@ const w = class w {
1628
1651
  static deserializeQs(t, e = !0) {
1629
1652
  let s = {}, r = t.split("&");
1630
1653
  for (let n = 0; n < r.length; n++) {
1631
- let l = r[n], i = l.indexOf("="), a = l.substring(0, i), o = l.substring(i + 1);
1632
- s[a] = e ? decodeURIComponent(o) : o;
1654
+ let l = r[n], i = l.indexOf("="), o = l.substring(0, i), u = l.substring(i + 1);
1655
+ s[o] = e ? decodeURIComponent(u) : u;
1633
1656
  }
1634
1657
  return s;
1635
1658
  }
@@ -1638,7 +1661,7 @@ const w = class w {
1638
1661
  */
1639
1662
  static serialize(t, e = !0) {
1640
1663
  let s = (n) => e ? encodeURIComponent(n) : n;
1641
- return X.join(t, s, "=", "&");
1664
+ return wt.join(t, s, "=", "&");
1642
1665
  }
1643
1666
  //endregion
1644
1667
  //region 编码和解码
@@ -1651,16 +1674,16 @@ const w = class w {
1651
1674
  /**
1652
1675
  * 把指定对象转换成base64字符串
1653
1676
  */
1654
- static base64(t) {
1677
+ static async base64(t) {
1655
1678
  let e = JSON.stringify(t);
1656
- return k.getEncoder().getBase64().encode(e);
1679
+ return (await ne.getBase64()).encode(e);
1657
1680
  }
1658
1681
  /**
1659
1682
  * 把指定base64字符串解析为原对象
1660
1683
  */
1661
- static base64Decode(t) {
1662
- let e = k.getEncoder().getBase64().decode(t);
1663
- return JSON.parse(e);
1684
+ static async base64Decode(t) {
1685
+ let s = (await ne.getBase64()).decode(t);
1686
+ return JSON.parse(s);
1664
1687
  }
1665
1688
  //endregion
1666
1689
  /**
@@ -1670,21 +1693,21 @@ const w = class w {
1670
1693
  return t ? t.indexOf("http://") > -1 || t.indexOf("https://") > -1 : !1;
1671
1694
  }
1672
1695
  };
1673
- w.handleQueryValue = (t, e) => {
1696
+ C.handleQueryValue = (t, e) => {
1674
1697
  let s = "";
1675
1698
  if (t == null)
1676
1699
  return s;
1677
1700
  if (t instanceof Array) {
1678
1701
  if (t.length > 0)
1679
1702
  for (let r = 0; r < t.length; r++) {
1680
- let n = F.clone(e);
1681
- n.push(""), s += w.handleQueryValue(t[r], n);
1703
+ let n = K.clone(e);
1704
+ n.push(""), s += C.handleQueryValue(t[r], n);
1682
1705
  }
1683
1706
  } else if (t instanceof Object) {
1684
1707
  let r = Object.keys(t);
1685
1708
  for (let n of r) {
1686
- let l = F.clone(e);
1687
- l.push(n), s += w.handleQueryValue(t[n], l);
1709
+ let l = K.clone(e);
1710
+ l.push(n), s += C.handleQueryValue(t[n], l);
1688
1711
  }
1689
1712
  } else {
1690
1713
  let r = "";
@@ -1694,19 +1717,19 @@ w.handleQueryValue = (t, e) => {
1694
1717
  n = n.replace(/'/g, "%27"), n = n.replace(/%20/g, "+"), n = n.replace(/%5B/g, "["), n = n.replace(/%5D/g, "]"), n = n.replace(/%2C/g, ","), n = n.replace(/%3A/g, ":"), n = n.replace(/%24/g, "$"), s += `&${r}=${n}`;
1695
1718
  }
1696
1719
  return s;
1697
- }, w.concatUrl = (t, e) => w.httpOrHttps(e) ? e : t + e, w.getUrl = (t, e = null) => {
1720
+ }, C.concatUrl = (t, e) => C.httpOrHttps(e) ? e : t + e, C.getUrl = (t, e = null) => {
1698
1721
  if (t == null)
1699
1722
  return null;
1700
1723
  if (e == null)
1701
1724
  return t;
1702
- let s = w.deserialize(t), r = F.mergeTo(s, e);
1703
- return w.getPath(t) + "?" + w.getQuery(r);
1704
- }, w.getAnchor = (t, e = null) => {
1725
+ let s = C.deserialize(t), r = K.mergeTo(s, e);
1726
+ return C.getPath(t) + "?" + C.getQuery(r);
1727
+ }, C.getAnchor = (t, e = null) => {
1705
1728
  let s = { href: null, target: null };
1706
- return w.httpOrHttps(t) ? (s.href = t, s.target = "_blank", s) : (s.href = w.getUrl(t, e), s);
1729
+ return C.httpOrHttps(t) ? (s.href = t, s.target = "_blank", s) : (s.href = C.getUrl(t, e), s);
1707
1730
  };
1708
- let S = w;
1709
- class Mt {
1731
+ let O = C;
1732
+ class Oe {
1710
1733
  /**
1711
1734
  * 清空对象中的空值
1712
1735
  */
@@ -1719,182 +1742,256 @@ class Mt {
1719
1742
  * 签名字典
1720
1743
  */
1721
1744
  static signDictionary(t, e = !0) {
1722
- return this.clean(t), S.serialize(t, e);
1745
+ return this.clean(t), O.serialize(t, e);
1723
1746
  }
1724
1747
  }
1725
- class Wt extends ht {
1748
+ class he {
1726
1749
  constructor() {
1727
- super(...arguments), this.type = "Mk";
1750
+ this.headers = {};
1728
1751
  }
1729
1752
  /**
1730
- * 危险操作,会暴露敏感信息
1753
+ * 获取指定Key的值
1731
1754
  */
1732
- open(t) {
1733
- zt.mergeTo(this, t), this.requester = k.getRequester().getDefault(), this.hasher = gt.create("Sha256");
1755
+ getHeader(t) {
1756
+ if (this.headers == null)
1757
+ return null;
1758
+ let e = K.getKey(this.headers, t);
1759
+ return e ? this.headers[e] : null;
1734
1760
  }
1735
1761
  /**
1736
- * 危险操作,会暴露敏感信息
1762
+ * 添加请求头
1737
1763
  */
1738
- async send(t) {
1739
- let e = R.getTimestamp(), s = {
1740
- app_id: this.appId,
1741
- hash_type: "sha256",
1742
- timestamp: parseInt((e / 1e3).toString())
1743
- };
1744
- C.isNullOrEmpty(t.body) || (s.jsonBody = t.body);
1745
- let r = S.deserialize(t.path);
1746
- for (let g in r)
1747
- s[g] = r[g];
1748
- let n = S.getPath(t.path);
1749
- s = X.sort(s);
1750
- let l = Mt.signDictionary(s, !1), i = `POST${n}?${l}${this.appSecret}`, a = await this.hasher.compute(i);
1751
- s.sign = a.toLowerCase(), delete s.jsonBody, s = X.sort(s);
1752
- let o = S.serialize(s);
1753
- return t.url = S.concatUrl(this.baseUrl, n + "?" + o), await this.requester.send(t);
1764
+ addHeaders(t) {
1765
+ if (t != null)
1766
+ for (let e in t)
1767
+ this.headers[e] = t[e];
1754
1768
  }
1755
1769
  }
1756
- class Vt extends ht {
1757
- constructor() {
1758
- super(...arguments), this.type = "Local";
1770
+ class Ie extends he {
1771
+ }
1772
+ class Kt {
1773
+ //#endregion
1774
+ async get(t) {
1775
+ return (await this.sendGet(t)).data;
1759
1776
  }
1760
- open(t) {
1761
- this.request = Lt.create({
1762
- baseURL: K.api.url
1763
- // withCredentials: true, // send cookies when cross-domain requests
1764
- // timeout: 15000
1765
- }), this.request.interceptors.request.use(
1766
- async (e) => {
1767
- if (S.httpOrHttps(e.url))
1768
- return e;
1769
- let s = It(), r = S.getUrl(e.baseURL + e.url, e.params);
1770
- if (e.headers.Authorization = await s.getAuthorization(r, e.data), !e.headers["Accept-Language"]) {
1771
- let n = tt();
1772
- e.headers["Accept-Language"] = n.language;
1773
- }
1774
- return e;
1775
- },
1776
- (e) => (console.log(e), Promise.reject(e))
1777
- );
1777
+ async sendGet(t) {
1778
+ let e = this.getRequest("GET", t);
1779
+ return await this.send(e);
1778
1780
  }
1779
- send(t) {
1780
- return Promise.resolve(void 0);
1781
+ async post(t, e) {
1782
+ return (await this.sendPost(t, e)).data;
1783
+ }
1784
+ async sendPost(t, e) {
1785
+ let s = this.getRequest("POST", t, e);
1786
+ return await this.send(s);
1787
+ }
1788
+ async patch(t) {
1789
+ return (await this.sendPatch(t, null)).data;
1790
+ }
1791
+ async sendPatch(t, e) {
1792
+ let s = this.getRequest("PATCH", t);
1793
+ return await this.send(s);
1781
1794
  }
1782
1795
  /**
1783
- * GET请求
1796
+ * 获取请求消息
1784
1797
  */
1785
- async get(t, e = null, s = null) {
1786
- let r = { method: "get", url: t, params: e, headers: s };
1787
- return this.request(r).then((n) => this.handleResponse(n)).catch((n) => this.handleError(n));
1798
+ getRequest(t, e, s = null) {
1799
+ let r = new Ie();
1800
+ return r.path = e, r.method = t, r.body = ut.stringifyWithString(s), r;
1801
+ }
1802
+ }
1803
+ class re extends he {
1804
+ }
1805
+ class je extends Kt {
1806
+ constructor() {
1807
+ super(...arguments), this.type = "Default";
1808
+ }
1809
+ async open(t) {
1810
+ }
1811
+ send(t) {
1812
+ return new Promise((e, s) => {
1813
+ var l;
1814
+ (l = this.onRequest) == null || l.call(this, t);
1815
+ let r = (/* @__PURE__ */ new Date()).getTime(), n = new XMLHttpRequest();
1816
+ if (n.open(t.method, t.url), t.headers != null)
1817
+ for (let i in t.headers)
1818
+ n.setRequestHeader(i, t.headers[i]);
1819
+ t.contentType != null && n.setRequestHeader("content-type", t.contentType), n.onreadystatechange = () => {
1820
+ var i;
1821
+ if (n.readyState == 4) {
1822
+ let o = new re();
1823
+ o.elapsed = (/* @__PURE__ */ new Date()).getTime() - r, o.body = n.responseText, o.request = t;
1824
+ let u = n.getAllResponseHeaders().split(`\r
1825
+ `), c = {};
1826
+ for (let g = 0; g < u.length; g++) {
1827
+ let v = u[g].split(": "), k = v.shift();
1828
+ k == null || k == "" || (c[k] = v.join(": "));
1829
+ }
1830
+ o.headers = c;
1831
+ let h = o.getHeader("content-type");
1832
+ h != null && (o.contentType = h, h.indexOf("application/json") > -1 && (o.data = ut.parse(o.body))), (i = this.onResponse) == null || i.call(this, o), e(o);
1833
+ }
1834
+ }, n.onerror = (i) => {
1835
+ var u;
1836
+ let o = new re();
1837
+ o.elapsed = (/* @__PURE__ */ new Date()).getTime() - r, o.body = n.responseText, o.request = t, (u = this.onResponse) == null || u.call(this, o), e(o);
1838
+ }, n.send(t.body);
1839
+ });
1840
+ }
1841
+ }
1842
+ class Be extends Kt {
1843
+ constructor() {
1844
+ super(...arguments), this.type = "Mk";
1788
1845
  }
1789
1846
  /**
1790
- * POST请求
1847
+ * 危险操作,会暴露敏感信息
1791
1848
  */
1792
- async post(t, e = null, s = null) {
1793
- return this.request.post(t, e, s).then((r) => this.handleResponse(r)).catch((r) => this.handleError(r));
1849
+ async open(t) {
1850
+ ut.mergeTo(this, t), this.requester = await I.getHttp().getDefault(), this.hasher = await I.getHasher().create("Sha256");
1794
1851
  }
1852
+ //#endregion
1795
1853
  /**
1796
- * PATCH请求
1854
+ * 危险操作,会暴露敏感信息
1797
1855
  */
1798
- async patch(t, e = null, s = null) {
1799
- return this.request.patch(t, e, s).then((r) => this.handleResponse(r)).catch((r) => this.handleError(r));
1856
+ async send(t) {
1857
+ let e = q.getTimestamp(), s = {
1858
+ app_id: this.appId,
1859
+ hash_type: "sha256",
1860
+ timestamp: parseInt((e / 1e3).toString())
1861
+ };
1862
+ B.isNullOrEmpty(t.body) || (s.jsonBody = t.body);
1863
+ let r = O.deserialize(t.path);
1864
+ for (let h in r)
1865
+ s[h] = r[h];
1866
+ let n = O.getPath(t.path);
1867
+ s = wt.sort(s);
1868
+ let l = Oe.signDictionary(s, !1), i = `POST${n}?${l}${this.appSecret}`, o = await this.hasher.compute(i);
1869
+ s.sign = o.toLowerCase(), delete s.jsonBody, s = wt.sort(s);
1870
+ let u = O.serialize(s);
1871
+ return t.url = O.concatUrl(this.baseUrl, n + "?" + u), await this.requester.send(t);
1872
+ }
1873
+ }
1874
+ class Ae extends Kt {
1875
+ constructor() {
1876
+ super(...arguments), this.type = "Halo", this.baseUrl = null;
1800
1877
  }
1801
1878
  /**
1802
- * 处理响应信息 或 响应体信息
1879
+ * 开启
1803
1880
  */
1804
- handleResponse(t) {
1805
- if (S.httpOrHttps(t.config.url))
1806
- return Promise.resolve(t.data);
1807
- let e = t.config.tip;
1808
- return this.handleResponseBody(t.data, e);
1881
+ async open(t) {
1882
+ this.baseUrl = t, this.http = await I.getHttp().getDefault(), this.http.onResponse = (e) => {
1883
+ let s = e.data;
1884
+ se().add(s.code, s.message, s.stack, s.elapsed);
1885
+ };
1809
1886
  }
1887
+ //#endregion
1810
1888
  /**
1811
- * 处理响应体信息,并自动添加响应通知
1889
+ * 发送请求
1812
1890
  */
1813
- handleResponseBody(t, e = !1) {
1814
- return Ot().add(t.code, t.message, t.stack, t.elapsed), e && t.code == "Ok" && this.messageService.success(t.message), t.code != "Ok" ? Promise.reject(t) : Promise.resolve(t);
1891
+ async send(t) {
1892
+ t.url = O.concatUrl(this.baseUrl, t.path);
1893
+ let e = await this.getHeaders(t);
1894
+ t.addHeaders(e);
1895
+ let s = await this.http.send(t), r = s.data;
1896
+ return r.code == "Ok" ? s : (pt.error(r.message), Promise.reject(r));
1897
+ }
1898
+ /**
1899
+ * 获取请求头
1900
+ */
1901
+ async getHeaders(t) {
1902
+ let e = {};
1903
+ if (O.httpOrHttps(t.path))
1904
+ return e;
1905
+ let s = ce();
1906
+ if (e.Authorization = await s.getAuth(t.url, t.body), !t.getHeader("Accept-Language")) {
1907
+ let r = H();
1908
+ e["Accept-Language"] = r.language;
1909
+ }
1910
+ return e;
1815
1911
  }
1816
1912
  /**
1817
1913
  * 处理网络错误和响应错误场景
1818
1914
  */
1819
1915
  handleError(t) {
1820
- if (t instanceof Nt) {
1821
- Ot().add("error", t.message, t.stack);
1916
+ if (t instanceof Object) {
1917
+ se().add("error", t.message, t.stack);
1822
1918
  let s = t.message;
1823
- t.message == "Network Error" && (S.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), this.messageService.error(s);
1919
+ t.message == "Network Error" && (O.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), pt.error(s);
1824
1920
  } else
1825
- this.messageService.error(t.message);
1921
+ pt.error(t.message);
1826
1922
  return Promise.reject(t);
1827
1923
  }
1828
1924
  }
1829
- class Yt extends E {
1925
+ class Ue extends L {
1830
1926
  getInstances() {
1831
- return [new Ft(), new Wt(), new Vt()];
1832
- }
1833
- create(t, e) {
1834
- return super.create(t);
1927
+ return [new je(), new Be(), new Ae()];
1835
1928
  }
1836
1929
  /**
1837
1930
  * 获取默认请求器
1838
1931
  */
1839
- getDefault() {
1840
- return this._default != null ? this._default : (this._default = this.create("Default"), this._default);
1932
+ async getDefault() {
1933
+ return this._default != null ? this._default : (this._default = await this.create("Default"), this._default);
1841
1934
  }
1842
1935
  /**
1843
1936
  * 获取本地请求实例
1844
1937
  * 获取完毕后,下游第一行代码就要配置消息服务
1845
1938
  */
1846
- getLocal() {
1847
- return this.local == null && (this.local = this.create("Local")), this.local;
1939
+ async getHalo() {
1940
+ if (this.halo == null) {
1941
+ let t = await this.create("Halo");
1942
+ await t.open(mt.api.url), this.halo = t;
1943
+ }
1944
+ return this.halo;
1848
1945
  }
1849
1946
  }
1850
- class Qt {
1947
+ class De {
1851
1948
  }
1852
- class Kt extends Qt {
1949
+ class Le extends De {
1853
1950
  constructor() {
1854
1951
  super(...arguments), this.type = "Base64";
1855
1952
  }
1856
1953
  open(t) {
1857
1954
  }
1858
1955
  encode(t) {
1859
- let e = z.enc.Utf8.parse(t);
1860
- return z.enc.Base64.stringify(e);
1956
+ let e = st.enc.Utf8.parse(t);
1957
+ return st.enc.Base64.stringify(e);
1861
1958
  }
1862
1959
  decode(t) {
1863
- let e = z.enc.Base64.parse(t);
1864
- return z.enc.Utf8.stringify(e);
1960
+ let e = st.enc.Base64.parse(t);
1961
+ return st.enc.Utf8.stringify(e);
1865
1962
  }
1866
1963
  }
1867
- class Xt extends E {
1964
+ class $e extends L {
1868
1965
  getInstances() {
1869
- return [new Kt()];
1966
+ return [new Le()];
1870
1967
  }
1871
1968
  /**
1872
1969
  * 创建执行类型的Hash实例
1873
1970
  */
1874
- create(t, e) {
1875
- let s = super.create(t);
1971
+ async create(t, e) {
1972
+ let s = await super.create(t);
1876
1973
  return s.open(null), s;
1877
1974
  }
1878
1975
  /**
1879
1976
  * 获取Base64 编码器对象
1880
1977
  */
1881
- getBase64() {
1882
- return this.base64 != null ? this.base64 : (this.base64 = this.create("Base64"), this.base64);
1978
+ async getBase64() {
1979
+ return this.base64 != null ? this.base64 : (this.base64 = await this.create("Base64"), this.base64);
1883
1980
  }
1884
1981
  }
1885
- class Zt {
1982
+ class Ne {
1983
+ }
1984
+ class Pe extends Ne {
1886
1985
  constructor() {
1887
- this.type = "Default";
1986
+ super(...arguments), this.type = "Default";
1888
1987
  }
1889
- open(t) {
1890
- this.hasher = gt.getMd5();
1988
+ async open(t) {
1989
+ this.hasher = await I.getHasher().getMd5();
1891
1990
  }
1892
1991
  callback(t) {
1893
1992
  }
1894
1993
  async getSign(t, e, s, r, n) {
1895
- let l = "";
1896
- s && (y.isString(s) ? l = s.toString() : l = JSON.stringify(s));
1897
- let i = `${t}.${e}.${l}.${r}.${n}`;
1994
+ let i = `${t}.${e}.${s ?? ""}.${r}.${n}`;
1898
1995
  return (await this.hasher.compute(i)).toUpperCase();
1899
1996
  }
1900
1997
  loginUrl(t) {
@@ -1903,49 +2000,46 @@ class Zt {
1903
2000
  dispose() {
1904
2001
  }
1905
2002
  }
1906
- class Gt extends E {
2003
+ class Te extends L {
1907
2004
  getInstances() {
1908
- return [new Zt()];
2005
+ return [new Pe()];
1909
2006
  }
1910
2007
  /**
1911
2008
  * 获取指定签名实例
1912
2009
  */
1913
- create(t, e) {
1914
- let s = super.create(t);
1915
- return s.open(null), s;
2010
+ async create(t, e) {
2011
+ let s = await super.create(t);
2012
+ return await s.open(null), s;
1916
2013
  }
1917
2014
  }
1918
- const st = class st {
2015
+ const Ot = class Ot {
1919
2016
  constructor() {
1920
2017
  this.type = "Bearer";
1921
2018
  }
1922
2019
  open(t) {
1923
- this.requester = k.getRequester().getLocal();
1924
2020
  }
2021
+ //#endregion
1925
2022
  async login(t) {
1926
- return this.requester.post(`/user/login?type=${this.type}`, t).then((e) => {
1927
- let s = e.data;
1928
- return x.setObject("sso", s), Promise.resolve(e);
1929
- });
2023
+ return j.post(`/user/login?type=${this.type}`, t).then(async (e) => (await (await I.getProvider().getDefault("user")).saveAsync("sso", e.data), Promise.resolve(e)));
1930
2024
  }
1931
2025
  loginUrl(t) {
1932
2026
  return "";
1933
2027
  }
1934
2028
  getUser() {
1935
- let t = x.getObject("sso");
2029
+ let t = E.getObject("sso");
1936
2030
  return { userId: t.userId, token: t.token, secret: t.userSecret };
1937
2031
  }
1938
- getAuthorization(t, e, s, r = "") {
2032
+ getAuth(t, e, s, r = "") {
1939
2033
  let n = `${this.type} ${t} ${e} ${s} pc`;
1940
2034
  return r && (n += " " + r), n;
1941
2035
  }
1942
2036
  logout() {
1943
- x.remove(st.loginKey), x.remove("sso");
2037
+ E.remove(Ot.loginKey), E.remove("sso");
1944
2038
  }
1945
2039
  };
1946
- st.loginKey = "user";
1947
- let V = st;
1948
- class Ht {
2040
+ Ot.loginKey = "user";
2041
+ let ot = Ot;
2042
+ class Fe {
1949
2043
  constructor() {
1950
2044
  this.type = "Nio";
1951
2045
  }
@@ -1953,23 +2047,23 @@ class Ht {
1953
2047
  this.url = t.url, this.app_id = t.app_id;
1954
2048
  }
1955
2049
  async login(t) {
1956
- x.setObject("sso", t);
2050
+ E.setObject("sso", t);
1957
2051
  }
1958
2052
  loginUrl(t) {
1959
2053
  let e = encodeURIComponent(t);
1960
2054
  return `${this.url}/oauth2/authorize?client_id=${this.app_id}&redirect_uri=${e}&response_type=code`;
1961
2055
  }
1962
2056
  getUser() {
1963
- return x.getObject(V.loginKey);
2057
+ return E.getObject(ot.loginKey);
1964
2058
  }
1965
- getAuthorization(t, e, s, r) {
2059
+ getAuth(t, e, s, r) {
1966
2060
  return `${this.type} ${t} ${e} ${s} pc`;
1967
2061
  }
1968
2062
  logout() {
1969
- x.remove("sso");
2063
+ E.remove("sso");
1970
2064
  }
1971
2065
  }
1972
- class _t {
2066
+ class Re {
1973
2067
  constructor() {
1974
2068
  this.type = "WeiXin";
1975
2069
  }
@@ -1983,13 +2077,13 @@ class _t {
1983
2077
  getUser() {
1984
2078
  return { userId: "", token: "", secret: "" };
1985
2079
  }
1986
- getAuthorization(t, e, s, r) {
2080
+ getAuth(t, e, s, r) {
1987
2081
  return "";
1988
2082
  }
1989
2083
  logout() {
1990
2084
  }
1991
2085
  }
1992
- class te {
2086
+ class Ve {
1993
2087
  constructor() {
1994
2088
  this.type = "Anonymous";
1995
2089
  }
@@ -2001,79 +2095,78 @@ class te {
2001
2095
  return "";
2002
2096
  }
2003
2097
  getUser() {
2004
- let t = x.get("anonymous");
2098
+ let t = E.get("anonymous");
2005
2099
  if (!t) {
2006
- let e = C.getUniqueId();
2007
- x.set("anonymous", e), t = e;
2100
+ let e = B.getUniqueId();
2101
+ E.set("anonymous", e), t = e;
2008
2102
  }
2009
2103
  return { userId: "", token: t, secret: "" };
2010
2104
  }
2011
- getAuthorization(t, e, s, r) {
2105
+ getAuth(t, e, s, r) {
2012
2106
  return `Anonymous ${t} pc`;
2013
2107
  }
2014
2108
  logout() {
2015
2109
  }
2016
2110
  }
2017
- class ee {
2111
+ class Ke {
2018
2112
  constructor() {
2019
2113
  this.type = "Secret";
2020
2114
  }
2021
2115
  open(t) {
2022
- this.requester = k.getRequester().getLocal();
2023
2116
  }
2024
2117
  async login(t) {
2025
- return this.requester.post(`/user/login?type=${this.type}`, t).then((e) => {
2118
+ return j.post(`/user/login?type=${this.type}`, t).then((e) => {
2026
2119
  let s = e.data;
2027
- return x.setObject("sso", s), Promise.resolve(e);
2120
+ return E.setObject("sso", s), Promise.resolve(e);
2028
2121
  });
2029
2122
  }
2030
2123
  loginUrl(t) {
2031
2124
  return "";
2032
2125
  }
2033
2126
  getUser() {
2034
- let t = x.getObject(V.loginKey);
2127
+ let t = E.getObject(ot.loginKey);
2035
2128
  return { userId: t.userId, token: t.token, secret: t.userSecret };
2036
2129
  }
2037
- getAuthorization(t, e, s, r) {
2130
+ getAuth(t, e, s, r) {
2038
2131
  return `${this.type} ${t} ${e} ${s} pc`;
2039
2132
  }
2040
2133
  logout() {
2041
2134
  }
2042
2135
  }
2043
- class se extends E {
2136
+ class ze extends L {
2044
2137
  /**
2045
2138
  * @extends {getInstances}
2046
2139
  */
2047
2140
  getInstances() {
2048
- return [new ee(), new Ht(), new _t(), new V(), new te()];
2141
+ return [new Ke(), new Fe(), new Re(), new ot(), new Ve()];
2049
2142
  }
2050
2143
  /**
2051
2144
  * 获取指定SSO实例
2052
2145
  */
2053
- create(t, e) {
2054
- let r = Et().ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), n = { url: r == null ? void 0 : r.url, app_id: r == null ? void 0 : r.appId }, l = super.create(t);
2146
+ async create(t, e) {
2147
+ let r = ue().ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), n = { url: r == null ? void 0 : r.url, app_id: r == null ? void 0 : r.appId }, l = await super.create(t);
2055
2148
  return l.open(n), l;
2056
2149
  }
2057
2150
  }
2058
- class Y {
2151
+ class ct {
2059
2152
  getPath(t) {
2060
- let e = X.getValueIgnoreCase(t, this.mappings);
2061
- return S.httpOrHttps(e) ? e : this.baseUrl + e;
2153
+ let e = wt.getValueIgnoreCase(t, this.mappings);
2154
+ return O.httpOrHttps(e) ? e : this.baseUrl + e;
2062
2155
  }
2063
2156
  async loadPathAsync(t, e) {
2064
2157
  let s = this.baseUrl + t;
2065
- await H.loadPathAsync(s, e);
2158
+ await kt.loadPathAsync(s, e);
2066
2159
  }
2067
2160
  async loadAsync(t) {
2068
- let e = C.getArray(t), s = [];
2161
+ let e = B.getArray(t), s = [];
2069
2162
  for (let r = 0; r < e.length; r++) {
2070
2163
  let n = this.getPath(e[r]);
2071
2164
  s.push(n);
2072
2165
  }
2073
- return await H.loadAsync(s);
2166
+ return await kt.loadAsync(s);
2074
2167
  }
2075
2168
  }
2076
- class re extends Y {
2169
+ class Me extends ct {
2077
2170
  constructor() {
2078
2171
  super(...arguments), this.type = "Jsdelivr", this.mappings = {
2079
2172
  "monaco-editor": "/npm/monaco-editor@0.49.0/min/vs"
@@ -2083,7 +2176,7 @@ class re extends Y {
2083
2176
  this.baseUrl = "https://cdn.jsdelivr.net";
2084
2177
  }
2085
2178
  }
2086
- class ne extends Y {
2179
+ class qe extends ct {
2087
2180
  constructor() {
2088
2181
  super(...arguments), this.type = "StaticFile", this.mappings = {
2089
2182
  //通过cdn引入样式文件,并且打包文件中不会包括样式文件
@@ -2091,7 +2184,7 @@ class ne extends Y {
2091
2184
  // 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
2092
2185
  //首次加载4.11s
2093
2186
  //不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
2094
- "monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.49.0/min/vs",
2187
+ "monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs",
2095
2188
  quill: "/quill/2.0.2/quill.snow.min.css",
2096
2189
  "fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
2097
2190
  };
@@ -2100,7 +2193,7 @@ class ne extends Y {
2100
2193
  this.baseUrl = "https://cdn.staticfile.net";
2101
2194
  }
2102
2195
  }
2103
- class le extends Y {
2196
+ class We extends ct {
2104
2197
  constructor() {
2105
2198
  super(...arguments), this.type = "BootCdn", this.mappings = {
2106
2199
  "element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
@@ -2112,7 +2205,7 @@ class le extends Y {
2112
2205
  this.baseUrl = "https://cdn.bootcdn.net";
2113
2206
  }
2114
2207
  }
2115
- class ie extends Y {
2208
+ class Je extends ct {
2116
2209
  constructor() {
2117
2210
  super(...arguments), this.type = "Local", this.mappings = {
2118
2211
  //引入本地样式文件,会导致始终打包进打包文件
@@ -2131,7 +2224,7 @@ class ie extends Y {
2131
2224
  this.baseUrl = t;
2132
2225
  }
2133
2226
  }
2134
- class ue extends Y {
2227
+ class Ye extends ct {
2135
2228
  constructor() {
2136
2229
  super(...arguments), this.type = "Unpkg", this.mappings = {
2137
2230
  //首次加载很不稳定: 30s+, 稳定后: 首次加载2.5s(使用https加载,可以防止本地http访问外部http资源时的请求警告)
@@ -2142,83 +2235,31 @@ class ue extends Y {
2142
2235
  this.baseUrl = "https://unpkg.com";
2143
2236
  }
2144
2237
  }
2145
- class ae extends E {
2238
+ class Qe extends L {
2146
2239
  getInstances() {
2147
- return [new re(), new ne(), new le(), new ie(), new ue()];
2240
+ return [new Me(), new qe(), new We(), new Je(), new Ye()];
2148
2241
  }
2149
2242
  /**
2150
2243
  * 获取指定CDN实例
2151
2244
  */
2152
- create(t, e) {
2153
- let s = super.create(t);
2245
+ async create(t, e) {
2246
+ let s = await super.create(t);
2154
2247
  return s.open(e), s;
2155
2248
  }
2156
2249
  }
2157
- class oe {
2250
+ class Xe {
2158
2251
  constructor() {
2159
2252
  this.type = "Json";
2160
2253
  }
2161
2254
  }
2162
- class ce extends oe {
2163
- }
2164
- class he extends E {
2165
- getInstances() {
2166
- return [new ce()];
2167
- }
2168
- }
2169
- class ge {
2170
- constructor() {
2171
- this.type = "xlsx";
2172
- }
2173
- open(t) {
2174
- }
2175
- export(t, e) {
2176
- if (!e)
2177
- throw new Error("Excel名称不能为空");
2178
- t || (t = []);
2179
- let s;
2180
- t.length > 0 ? s = Object.keys(t[0]) : s = [];
2181
- let r = [], n = [];
2182
- if (s.forEach((c) => {
2183
- n.push(c);
2184
- }), r.push(n), t.length > 0)
2185
- for (let c = 0; c < t.length; c++) {
2186
- let g = t[c], p = [];
2187
- Object.keys(g).forEach((j) => {
2188
- p.push(g[j]);
2189
- }), r.push(p);
2190
- }
2191
- let l = nt.book_new(), i = nt.json_to_sheet(r, { skipHeader: !0 });
2192
- nt.book_append_sheet(l, i, "abc");
2193
- let a = 65;
2194
- for (let c = 0; c < s.length; c++) {
2195
- let p = `${String.fromCharCode(a + c)}1`;
2196
- i[p].s = {
2197
- alignment: { horizontal: "center" },
2198
- font: { bold: !0, color: { rgb: "000000" } },
2199
- fill: { fgColor: { rgb: "409eff" } }
2200
- };
2201
- }
2202
- let o = [];
2203
- s.forEach((c) => {
2204
- let g = t[0][c], p = { wpx: 50 };
2205
- typeof g == "string" && (p.wpx = 100), o.push(p);
2206
- }), i["!cols"] = o, $t(l, e);
2207
- }
2255
+ class Ge extends Xe {
2208
2256
  }
2209
- class de extends E {
2257
+ class Ze extends L {
2210
2258
  getInstances() {
2211
- return [new ge()];
2212
- }
2213
- /**
2214
- * 获取Excel实例
2215
- */
2216
- create(t, e) {
2217
- let s = super.create(t);
2218
- return s.open(e), s;
2259
+ return [new Ge()];
2219
2260
  }
2220
2261
  }
2221
- class fe {
2262
+ class He {
2222
2263
  constructor() {
2223
2264
  this.type = "Sort";
2224
2265
  }
@@ -2243,7 +2284,7 @@ class fe {
2243
2284
  }
2244
2285
  }
2245
2286
  }
2246
- class me {
2287
+ class _e {
2247
2288
  constructor() {
2248
2289
  this.type = "I18N";
2249
2290
  }
@@ -2256,7 +2297,7 @@ class me {
2256
2297
  copy(t, e, s) {
2257
2298
  }
2258
2299
  }
2259
- class pe {
2300
+ class ts {
2260
2301
  constructor() {
2261
2302
  this.type = "Expression";
2262
2303
  }
@@ -2269,19 +2310,58 @@ class pe {
2269
2310
  copy(t, e, s) {
2270
2311
  }
2271
2312
  }
2272
- class ye extends E {
2313
+ class es extends L {
2273
2314
  getInstances() {
2274
- return [new fe(), new me(), new pe()];
2315
+ return [new He(), new _e(), new ts()];
2275
2316
  }
2276
2317
  /**
2277
2318
  * 获取指定特征实例
2278
2319
  */
2279
- create(t, e) {
2280
- let s = super.create(t);
2320
+ async create(t, e) {
2321
+ let s = await super.create(t);
2281
2322
  return s.open(null), s;
2282
2323
  }
2283
2324
  }
2284
- class be {
2325
+ class de {
2326
+ }
2327
+ class ss extends de {
2328
+ constructor() {
2329
+ super(...arguments), this.type = "Sha256";
2330
+ }
2331
+ open(t) {
2332
+ }
2333
+ async compute(t) {
2334
+ let s = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", s);
2335
+ return Array.from(new Uint8Array(r)).map((i) => i.toString(16).padStart(2, "0")).join("");
2336
+ }
2337
+ }
2338
+ class rs extends de {
2339
+ constructor() {
2340
+ super(...arguments), this.type = "Md5";
2341
+ }
2342
+ open(t) {
2343
+ }
2344
+ compute(t) {
2345
+ let e = st.MD5(t).toString();
2346
+ return Promise.resolve(e);
2347
+ }
2348
+ }
2349
+ class ns extends L {
2350
+ getInstances() {
2351
+ return [new ss(), new rs()];
2352
+ }
2353
+ async create(t, e) {
2354
+ let s = await super.create(t);
2355
+ return s.open(null), s;
2356
+ }
2357
+ /**
2358
+ * 获取MD5 Hash对象
2359
+ */
2360
+ async getMd5() {
2361
+ return this.md5 != null ? this.md5 : (this.md5 = await this.create("Md5"), this.md5);
2362
+ }
2363
+ }
2364
+ class ls {
2285
2365
  createAsync(t) {
2286
2366
  return Promise.resolve(void 0);
2287
2367
  }
@@ -2308,7 +2388,7 @@ class be {
2308
2388
  dispose() {
2309
2389
  }
2310
2390
  }
2311
- const N = class N extends be {
2391
+ const X = class X extends ls {
2312
2392
  constructor() {
2313
2393
  super(...arguments), this.type = "IndexedDb", this.database = null, this.store = null, this.objectStoreNames = null;
2314
2394
  }
@@ -2320,7 +2400,7 @@ const N = class N extends be {
2320
2400
  let r = indexedDB.open(t);
2321
2401
  r.onsuccess = (n) => {
2322
2402
  let l = n.target.result;
2323
- N.version = l.version, this.objectStoreNames = l.objectStoreNames, e(N.version);
2403
+ X.version = l.version, this.objectStoreNames = l.objectStoreNames, e(X.version);
2324
2404
  }, r.onerror = (n) => {
2325
2405
  s(n.target);
2326
2406
  };
@@ -2331,7 +2411,7 @@ const N = class N extends be {
2331
2411
  */
2332
2412
  async createAsync(t) {
2333
2413
  return this.store = t, this.objectStoreNames.contains(t) ? Promise.resolve(!0) : new Promise((e, s) => {
2334
- let r = indexedDB.open(this.database, ++N.version);
2414
+ let r = indexedDB.open(this.database, ++X.version);
2335
2415
  r.onupgradeneeded = (n) => {
2336
2416
  let l = n.target.result;
2337
2417
  l.objectStoreNames.contains(this.store) || l.createObjectStore(this.store);
@@ -2347,7 +2427,7 @@ const N = class N extends be {
2347
2427
  */
2348
2428
  async openDbAsync() {
2349
2429
  return new Promise((t, e) => {
2350
- let s = indexedDB.open(this.database, N.version);
2430
+ let s = indexedDB.open(this.database, X.version);
2351
2431
  s.onsuccess = (r) => {
2352
2432
  let n = r.target.result;
2353
2433
  t(n);
@@ -2367,17 +2447,17 @@ const N = class N extends be {
2367
2447
  return;
2368
2448
  }
2369
2449
  let n = e.transaction(this.store, "readonly");
2370
- n.oncomplete = (a) => {
2450
+ n.oncomplete = (o) => {
2371
2451
  e.close();
2372
- }, n.onerror = (a) => {
2373
- r(a);
2452
+ }, n.onerror = (o) => {
2453
+ r(o);
2374
2454
  };
2375
2455
  let i = n.objectStore(this.store).get(t);
2376
- i.onsuccess = (a) => {
2377
- let o = a.target.result;
2378
- s(o);
2379
- }, i.onerror = (a) => {
2380
- r(a.target);
2456
+ i.onsuccess = (o) => {
2457
+ let u = o.target.result;
2458
+ s(u);
2459
+ }, i.onerror = (o) => {
2460
+ r(o.target);
2381
2461
  };
2382
2462
  });
2383
2463
  }
@@ -2390,17 +2470,17 @@ const N = class N extends be {
2390
2470
  let s = await this.openDbAsync();
2391
2471
  return new Promise((r, n) => {
2392
2472
  let l = s.transaction(this.store, "readwrite");
2393
- l.oncomplete = (o) => {
2473
+ l.oncomplete = (u) => {
2394
2474
  s.close();
2395
- }, l.onerror = (o) => {
2396
- n(o);
2475
+ }, l.onerror = (u) => {
2476
+ n(u);
2397
2477
  };
2398
- let a = l.objectStore(this.store).add(e, t);
2399
- a.onsuccess = (o) => {
2400
- let c = o.target.result;
2478
+ let o = l.objectStore(this.store).add(e, t);
2479
+ o.onsuccess = (u) => {
2480
+ let c = u.target.result;
2401
2481
  r(c);
2402
- }, a.onerror = (o) => {
2403
- let c = o.target.error;
2482
+ }, o.onerror = (u) => {
2483
+ let c = u.target.error;
2404
2484
  n(c.message);
2405
2485
  };
2406
2486
  });
@@ -2424,13 +2504,13 @@ const N = class N extends be {
2424
2504
  }, l.onerror = (c) => {
2425
2505
  n(c);
2426
2506
  };
2427
- let i = F.clone(e), o = l.objectStore(this.store).put(i, t);
2428
- o.onsuccess = (c) => {
2429
- let g = c.target.result;
2430
- r(g);
2431
- }, o.onerror = (c) => {
2432
- let g = c.target.error;
2433
- n(g.message);
2507
+ let i = K.clone(e), u = l.objectStore(this.store).put(i, t);
2508
+ u.onsuccess = (c) => {
2509
+ let h = c.target.result;
2510
+ r(h);
2511
+ }, u.onerror = (c) => {
2512
+ let h = c.target.error;
2513
+ n(h.message);
2434
2514
  };
2435
2515
  });
2436
2516
  }
@@ -2443,18 +2523,18 @@ const N = class N extends be {
2443
2523
  let e = await this.openDbAsync();
2444
2524
  return new Promise((s, r) => {
2445
2525
  let n = e.transaction(this.store, "readwrite");
2446
- n.oncomplete = (a) => {
2526
+ n.oncomplete = (o) => {
2447
2527
  e.close();
2448
- }, n.onerror = (a) => {
2449
- r(a);
2528
+ }, n.onerror = (o) => {
2529
+ r(o);
2450
2530
  };
2451
2531
  let i = n.objectStore(this.store).delete(t);
2452
- i.onsuccess = (a) => {
2453
- let o = a.target.result;
2454
- s(o);
2455
- }, i.onerror = (a) => {
2456
- let o = a.target.error.message;
2457
- r(o);
2532
+ i.onsuccess = (o) => {
2533
+ let u = o.target.result;
2534
+ s(u);
2535
+ }, i.onerror = (o) => {
2536
+ let u = o.target.error.message;
2537
+ r(u);
2458
2538
  };
2459
2539
  });
2460
2540
  }
@@ -2469,32 +2549,33 @@ const N = class N extends be {
2469
2549
  dispose() {
2470
2550
  }
2471
2551
  };
2472
- N.version = null;
2473
- let ot = N;
2474
- class xe extends E {
2552
+ X.version = null;
2553
+ let Tt = X;
2554
+ class is extends L {
2475
2555
  getInstances() {
2476
- return [new ot()];
2556
+ return [new Tt()];
2477
2557
  }
2478
2558
  /**
2479
2559
  * 获取指定类型的提供程序
2480
2560
  */
2481
- create(t, e) {
2482
- return super.create(t);
2561
+ async create(t, e) {
2562
+ let s = await super.create(t);
2563
+ return await s.openAsync(e), s;
2483
2564
  }
2484
2565
  /**
2485
- * 获取并开启 指定类型的驱动程序
2566
+ * 获取并开启默认驱动程序
2486
2567
  */
2487
- async getDefault(t, e = null) {
2488
- return this._default != null ? this._default : (this._default = this.create(t), await this._default.openAsync("halo"), e != null && await this._default.createAsync(e), this._default);
2568
+ async getDefault(t) {
2569
+ return this._default != null ? this._default : (this._default = await this.create("IndexedDb", "halo"), t != null && await this._default.createAsync(t), this._default);
2489
2570
  }
2490
2571
  }
2491
- const W = class W {
2572
+ const it = class it {
2492
2573
  /**
2493
2574
  * 获取并缓存工厂实例
2494
2575
  */
2495
2576
  static create(t, e) {
2496
- let s = W.mappings[t];
2497
- return s || (s = new e(), W.mappings[t] = s), s;
2577
+ let s = it.mappings[t];
2578
+ return s || (s = new e(), it.mappings[t] = s), s;
2498
2579
  }
2499
2580
  //#endregion
2500
2581
  //#region 工厂实例
@@ -2502,94 +2583,491 @@ const W = class W {
2502
2583
  *获取CDN工厂
2503
2584
  */
2504
2585
  static getCdn() {
2505
- return this.create("CdnFactory", ae);
2586
+ return this.create("CdnFactory", Qe);
2506
2587
  }
2507
2588
  /**
2508
2589
  *获取编码器工厂
2509
2590
  */
2510
2591
  static getEncoder() {
2511
- return this.create("EncoderFactory", Xt);
2592
+ return this.create("EncoderFactory", $e);
2512
2593
  }
2513
2594
  /**
2514
2595
  *获取Excel工厂
2515
2596
  */
2516
2597
  static getExcel() {
2517
- return this.create("ExcelFactory", de);
2598
+ return this.create("ExcelFactory", ke);
2518
2599
  }
2519
2600
  /**
2520
2601
  *获取Explainer工厂
2521
2602
  */
2522
2603
  static getExplainer() {
2523
- return this.create("ExplainerFactory", he);
2604
+ return this.create("ExplainerFactory", Ze);
2524
2605
  }
2525
2606
  /**
2526
2607
  *获取特征工厂
2527
2608
  */
2528
2609
  static getFeature() {
2529
- return this.create("FeatureFactory", ye);
2610
+ return this.create("FeatureFactory", es);
2530
2611
  }
2531
2612
  /**
2532
2613
  *获取哈希工厂
2533
2614
  */
2534
2615
  static getHasher() {
2535
- return this.create("HasherFactory", gt);
2616
+ return this.create("HasherFactory", ns);
2536
2617
  }
2537
2618
  /**
2538
2619
  *获取提供程序工厂
2539
2620
  */
2540
2621
  static getProvider() {
2541
- return this.create("ProviderFactory", xe);
2622
+ return this.create("ProviderFactory", is);
2542
2623
  }
2543
2624
  /**
2544
- *获取请求器工厂
2625
+ *获取Http请求工厂
2545
2626
  */
2546
- static getRequester() {
2547
- return this.create("RequesterFactory", Yt);
2627
+ static getHttp() {
2628
+ return this.create("HttpFactory", Ue);
2548
2629
  }
2549
2630
  /**
2550
2631
  *获取签名工厂
2551
2632
  */
2552
2633
  static getSigner() {
2553
- return this.create("SignerFactory", Gt);
2634
+ return this.create("SignerFactory", Te);
2554
2635
  }
2555
2636
  /**
2556
2637
  *获取SSO工厂
2557
2638
  */
2558
2639
  static getSso() {
2559
- return this.create("SsoFactory", se);
2640
+ return this.create("SsoFactory", ze);
2560
2641
  }
2561
2642
  //#endregion
2562
2643
  };
2563
- W.mappings = {};
2564
- let ct = W;
2565
- const k = ct;
2644
+ it.mappings = {};
2645
+ let Ft = it;
2646
+ const I = Ft;
2647
+ let as = I.getHttp(), ne = I.getEncoder(), j = {}, os = async () => {
2648
+ j = await as.getHalo();
2649
+ };
2650
+ const Us = /* @__PURE__ */ _({
2651
+ __name: "Code",
2652
+ props: {
2653
+ config: { default: {} },
2654
+ border: { type: Boolean },
2655
+ modelValue: {}
2656
+ },
2657
+ emits: ["mounted", "change", "scroll", "update:modelValue"],
2658
+ setup(a, { expose: t, emit: e }) {
2659
+ let s = e, r = a, { config: n, border: l, modelValue: i } = tt(r), o = null, u = null, c = null, h = H(), g = at(), v = (d) => d == "en" ? null : d, k = (d) => d == "default" ? null : "vs-dark", ht = (d) => {
2660
+ if (h.editor.completions[d])
2661
+ return;
2662
+ let y = o.languages.getLanguages().find((W) => W.id == d);
2663
+ if (!y)
2664
+ return;
2665
+ let A = y.loader;
2666
+ A && A().then((W) => {
2667
+ h.editor.completions[d] || (dt(W, d), h.editor.completions[d] = !0);
2668
+ });
2669
+ }, dt = (d, y) => o.languages.registerCompletionItemProvider(y, {
2670
+ provideCompletionItems: (W, Z) => {
2671
+ let et = W.getWordUntilPosition(Z), ft = {
2672
+ startLineNumber: Z.lineNumber,
2673
+ endLineNumber: Z.lineNumber,
2674
+ startColumn: et.startColumn,
2675
+ endColumn: et.endColumn
2676
+ }, Wt = [];
2677
+ const Jt = ["builtinFunctions", "keywords", "operators"];
2678
+ for (let Bt = 0; Bt < Jt.length; Bt++) {
2679
+ const At = Jt[Bt];
2680
+ let Yt = d.language[At];
2681
+ Yt && Yt.forEach((Qt) => {
2682
+ let Xt = Qt.toLowerCase(), $ = {
2683
+ label: Xt,
2684
+ kind: null,
2685
+ insertText: Xt,
2686
+ range: ft,
2687
+ documentation: Qt
2688
+ };
2689
+ At == "keywords" ? ($.kind = o.languages.CompletionItemKind.Keyword, $.detail = "关键词") : At == "operators" ? ($.kind = o.languages.CompletionItemKind.Operator, $.insertText += " ", $.detail = "操作符") : ($.kind = o.languages.CompletionItemKind.Function, $.insertText += "()", $.detail = "函数"), Wt.push($);
2690
+ });
2691
+ }
2692
+ return { suggestions: Wt };
2693
+ }
2694
+ }), jt = () => {
2695
+ var Z;
2696
+ let d = null;
2697
+ n.value.schema && (d = n.value.category + "/" + B.getUniqueId(), h.tryAddSchema(d, n.value.category, n.value.schema));
2698
+ let y = {
2699
+ validate: !0,
2700
+ allowComments: !0,
2701
+ //允许配置注释
2702
+ //保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
2703
+ schemas: K.clone(h.editor.schemas),
2704
+ trailingCommas: "ignore"
2705
+ //允许末尾逗号
2706
+ };
2707
+ o.languages.json.jsonDefaults.setDiagnosticsOptions(y), ht(n.value.language);
2708
+ let A = d ? o.Uri.parse(d) : null;
2709
+ c = o.editor.createModel(i.value, n.value.language, A);
2710
+ let W = {
2711
+ tabSize: 2,
2712
+ //Tab缩进大小
2713
+ detectIndentation: !1,
2714
+ //根据初始化的内容,自动检测缩进大小
2715
+ readOnly: n.value.readonly,
2716
+ lineNumbers: n.value.lineNumbers,
2717
+ minimap: { enabled: n.value.minimap, showSlider: "always" },
2718
+ //默认已启用代码图
2719
+ scrollbar: { verticalScrollbarSize: 0 },
2720
+ //关闭最右侧垂直滚动条
2721
+ theme: k(h.theme),
2722
+ automaticLayout: !0,
2723
+ //根据父元素自动布局
2724
+ model: c
2725
+ };
2726
+ u = o.editor.create(g.value, W), (Z = n.value.scrollTop) != null && Z.value && u.setScrollTop(n.value.scrollTop.value), u.onDidScrollChange((et) => {
2727
+ s("scroll", et.scrollTop);
2728
+ }), u.onDidChangeModelContent((et) => {
2729
+ let ft = u.getValue();
2730
+ s("update:modelValue", ft), s("change", ft);
2731
+ });
2732
+ };
2733
+ le(async () => {
2734
+ o = await bt.init(), g.value && (jt(), s("mounted", o, u));
2735
+ });
2736
+ let gt = () => {
2737
+ u == null || u.layout();
2738
+ }, b = () => u;
2739
+ return ie(() => {
2740
+ c == null || c.dispose(), u == null || u.dispose();
2741
+ }), P(() => h.theme, (d, y) => {
2742
+ let A = k(d);
2743
+ o.editor.setTheme(A);
2744
+ }), P(() => h.language, (d, y) => {
2745
+ bt.config({ "vs/nls": { availableLanguages: { "*": v(d) } } });
2746
+ }), P(() => i.value, (d, y) => {
2747
+ if (!u)
2748
+ return;
2749
+ let A = u.getValue();
2750
+ d != A && u.setValue(d ?? "");
2751
+ }), P(() => n.value.language, (d, y) => {
2752
+ if (!u)
2753
+ return;
2754
+ let A = u.getModel();
2755
+ o.editor.setModelLanguage(A, d), ht(d);
2756
+ }), t({ layout: gt, getEditor: b }), (d, y) => (z(), M("div", {
2757
+ ref_key: "monacoEditorRef",
2758
+ ref: g,
2759
+ class: Rt(["ha-code", { border: T(l) }])
2760
+ }, null, 2));
2761
+ }
2762
+ }), us = (a, t) => {
2763
+ const e = a.__vccOpts || a;
2764
+ for (const [s, r] of t)
2765
+ e[s] = r;
2766
+ return e;
2767
+ }, cs = {}, hs = { class: "ha-col" };
2768
+ function ds(a, t) {
2769
+ return z(), M("div", hs, [
2770
+ It(a.$slots, "default")
2771
+ ]);
2772
+ }
2773
+ const Ds = /* @__PURE__ */ us(cs, [["render", ds]]), Ls = /* @__PURE__ */ _({
2774
+ __name: "Compare",
2775
+ props: {
2776
+ inline: { type: Boolean, default: !1 },
2777
+ language: { type: String },
2778
+ original: { type: String },
2779
+ modelValue: { type: String }
2780
+ },
2781
+ emits: ["update:modelValue", "update:original", "change"],
2782
+ setup(a, { emit: t }) {
2783
+ let e = t, s = a, { inline: r, language: n, original: l, modelValue: i } = tt(s), o = null, u = null, c = null, h = null, g = null, v = null, k = at(), ht = at(), dt = H(), jt = (b) => {
2784
+ u = b.editor.createModel(l.value, n.value), c = b.editor.createModel(i.value, n.value), o = b.editor.createDiffEditor(k.value, {
2785
+ originalEditable: !0,
2786
+ automaticLayout: !0,
2787
+ renderSideBySide: !r.value,
2788
+ //是否启用行内模式
2789
+ theme: gt(dt.theme)
2790
+ }), o.setModel({ original: u, modified: c }), h = o.getOriginalEditor(), h.onDidChangeModelContent((d) => {
2791
+ let y = h.getValue();
2792
+ e("update:original", y), e("change", y);
2793
+ }), g = o.getModifiedEditor(), g.onDidChangeModelContent((d) => {
2794
+ let y = g.getValue();
2795
+ e("update:modelValue", y);
2796
+ });
2797
+ }, gt = (b) => b == "default" ? null : "vs-dark";
2798
+ return bt.init().then((b) => {
2799
+ v = b, jt(b);
2800
+ }), P(() => dt.theme, (b, d) => {
2801
+ let y = gt(b);
2802
+ v.editor.setTheme(y);
2803
+ }), P(() => n.value, (b, d) => {
2804
+ u && v.editor.setModelLanguage(u, b), c && v.editor.setModelLanguage(c, b);
2805
+ }), P(() => l.value, (b, d) => {
2806
+ if (!u)
2807
+ return;
2808
+ let y = u.getValue();
2809
+ b != y && u.setValue(b ?? "");
2810
+ }), P(() => i.value, (b, d) => {
2811
+ if (!c)
2812
+ return;
2813
+ let y = c.getValue();
2814
+ b != y && c.setValue(b ?? "");
2815
+ }), (b, d) => (z(), M("div", {
2816
+ ref_key: "compareRef",
2817
+ ref: k,
2818
+ class: "ha-compare",
2819
+ style: Vt(T(ht))
2820
+ }, null, 4));
2821
+ }
2822
+ }), $s = /* @__PURE__ */ _({
2823
+ __name: "Container",
2824
+ props: {
2825
+ container: { type: Boolean, default: !0 }
2826
+ },
2827
+ setup(a) {
2828
+ let t = a, { container: e } = tt(t);
2829
+ return (s, r) => (z(), M("div", {
2830
+ class: Rt({ "ha-container": T(e) })
2831
+ }, [
2832
+ It(s.$slots, "default")
2833
+ ], 2));
2834
+ }
2835
+ }), gs = { class: "ha-empty" }, fs = { class: "empty-message" }, ms = {
2836
+ key: 0,
2837
+ class: "empty-content"
2838
+ }, Ns = /* @__PURE__ */ _({
2839
+ __name: "Empty",
2840
+ props: {
2841
+ message: { type: String, default: "暂无数据" },
2842
+ hasData: Boolean
2843
+ },
2844
+ setup(a) {
2845
+ let t = a, { message: e, hasData: s } = tt(t);
2846
+ return (r, n) => (z(), M("div", gs, [
2847
+ me("div", fs, pe(T(e)), 1),
2848
+ T(s) ? (z(), M("div", ms, [
2849
+ It(r.$slots, "default")
2850
+ ])) : ae("", !0)
2851
+ ]));
2852
+ }
2853
+ }), Ps = /* @__PURE__ */ _({
2854
+ __name: "Progress",
2855
+ props: {
2856
+ modelValue: Boolean
2857
+ },
2858
+ setup(a) {
2859
+ let t = a, { modelValue: e } = tt(t), s = at(!0), r = at(0), n = null, l = () => {
2860
+ r.value = 0, s.value = !0, n = setInterval(() => {
2861
+ if (r.value < 100) {
2862
+ r.value++;
2863
+ return;
2864
+ }
2865
+ clearInterval(n);
2866
+ }, 50);
2867
+ }, i = () => {
2868
+ clearInterval(n);
2869
+ let o = 100 - r.value, u = 200, c = 20, h = o / (u / c), g = setInterval(() => {
2870
+ r.value += h, !(r.value < 100) && (r.value = 100, clearInterval(g), setTimeout(() => {
2871
+ s.value = !1;
2872
+ }, 200));
2873
+ }, c);
2874
+ };
2875
+ return le(() => {
2876
+ e.value && l();
2877
+ }), ie(() => {
2878
+ clearInterval(n);
2879
+ }), P(() => e.value, (o, u) => {
2880
+ o ? l() : i();
2881
+ }), (o, u) => T(s) ? (z(), M("div", {
2882
+ key: 0,
2883
+ class: "ha-progress",
2884
+ style: Vt({ width: T(r) + "%" })
2885
+ }, null, 4)) : ae("", !0);
2886
+ }
2887
+ }), Ts = /* @__PURE__ */ _({
2888
+ __name: "Row",
2889
+ props: {
2890
+ gap: {},
2891
+ direction: {}
2892
+ },
2893
+ setup(a) {
2894
+ let t = a, { gap: e, direction: s } = tt(t), r = ye(() => {
2895
+ let n = { gap: null };
2896
+ return e.value && (n.gap = e.value + "px"), n;
2897
+ });
2898
+ return (n, l) => (z(), M("div", {
2899
+ class: Rt(["ha-row", T(s)]),
2900
+ style: Vt(T(r))
2901
+ }, [
2902
+ It(n.$slots, "default")
2903
+ ], 6));
2904
+ }
2905
+ });
2906
+ class Fs {
2907
+ /**
2908
+ * 初始化,并绑定自动关闭上下文菜单事件
2909
+ */
2910
+ constructor(t, e = null) {
2911
+ if (this.closeTriggers = [], this.close = () => {
2912
+ this.container && (this.container.style.display = "none");
2913
+ }, this.show = (s) => {
2914
+ let n = V.parentAbsolute(this.container).getBoundingClientRect(), l = s.clientX - n.left, i = s.clientY - n.top - 2;
2915
+ this.container.style.display = "block", this.container.style.left = l + "px", this.container.style.top = i + "px";
2916
+ }, this.dispose = () => {
2917
+ for (let s = 0; s < this.closeTriggers.length; s++) {
2918
+ let r = this.closeTriggers[s];
2919
+ vt.unbind(["click", "scroll"], r, this.close);
2920
+ }
2921
+ this.container != null && this.container.removeEventListener("click", this.close), this.container = null, this.closeTriggers = [];
2922
+ }, t != null && (this.container = t, this.container.addEventListener("click", this.close), e)) {
2923
+ this.closeTriggers.push(...e);
2924
+ for (let s = 0; s < this.closeTriggers.length; s++) {
2925
+ let r = this.closeTriggers[s];
2926
+ vt.bind(["click", "scroll"], r, this.close);
2927
+ }
2928
+ }
2929
+ }
2930
+ }
2931
+ class Rs {
2932
+ constructor() {
2933
+ this.events = {}, this.add = (t, e, s, r, n, l) => {
2934
+ let i = this.events[r];
2935
+ i || (i = function(o) {
2936
+ s(o) && (e && e(o), n && o.preventDefault());
2937
+ }, this.events[r] = i), t.addEventListener(l, i);
2938
+ }, this.remove = (t, e, s) => {
2939
+ t.removeEventListener(s, this.events[e]), this.events[e] = null;
2940
+ }, this.keydown = (t, e, s, r, n = !1) => {
2941
+ this.add(t, e, s, r, n, "keydown");
2942
+ }, this.removeKeydown = (t, e) => {
2943
+ this.remove(t, e, "keydown");
2944
+ }, this.ctrlS = (t, e) => {
2945
+ this.keydown(t, e, (s) => s.ctrlKey && s.key == "s", "ctrlS", !0);
2946
+ }, this.removeCtrlS = (t) => {
2947
+ this.removeKeydown(t, "ctrlS");
2948
+ }, this.ctrlEnter = (t, e) => {
2949
+ this.keydown(t, e, (s) => s.ctrlKey && s.key == "Enter", "ctrlEnter");
2950
+ }, this.removeCtrlEnter = (t) => {
2951
+ this.removeKeydown(t, "ctrlEnter");
2952
+ }, this.lastKeyTime = null, this.isKeyLastUp = !1, this.doubleKey = (t, e, s, r = !1) => {
2953
+ this.keydown(t, e, (n) => {
2954
+ if (n.key != s)
2955
+ return !1;
2956
+ let l = (/* @__PURE__ */ new Date()).getTime(), i = l - this.lastKeyTime;
2957
+ return this.lastKeyTime = l, i < 200 && this.isKeyLastUp;
2958
+ }, "double" + s, r), this.keyup(t, () => {
2959
+ this.isKeyLastUp = !0;
2960
+ }, (n) => n.key == s ? !0 : (this.isKeyLastUp = !1, !1), "double" + s + ".keyup");
2961
+ }, this.removeDoubleKey = (t, e) => {
2962
+ this.removeKeydown(t, "double" + e), this.removeKeyup(t, "double" + e + ".keyup");
2963
+ }, this.keyup = (t, e, s, r, n = !1) => {
2964
+ this.add(t, e, s, r, n, "keyup");
2965
+ }, this.removeKeyup = (t, e) => {
2966
+ this.remove(t, e, "keyup");
2967
+ }, this.isCtrl = !1, this.ctrl = (t) => {
2968
+ this.keydown(t, () => this.isCtrl = !0, (e) => e.ctrlKey, "ctrlDown"), this.keyup(t, () => this.isCtrl = !1, (e) => e.key == "Control", "ctrlUp");
2969
+ }, this.removeCtrl = (t) => {
2970
+ this.removeKeydown(t, "ctrlDown"), this.removeKeyup(t, "ctrlUp");
2971
+ }, this.timer = null, this.touchStart = null, this.touch = (t, e) => {
2972
+ this.touchStart = function(s) {
2973
+ debugger;
2974
+ return this.timer = setTimeout(() => {
2975
+ s.preventDefault(), e();
2976
+ }, 800), !0;
2977
+ }, t.addEventListener("touchstart", this.touchStart), t.addEventListener("touchmove", this.touchEnd), t.addEventListener("touchend", this.touchEnd);
2978
+ }, this.removeTouch = (t) => {
2979
+ debugger;
2980
+ t.removeEventListener("touchstart", this.touchStart), t.removeEventListener("touchmove", this.touchEnd), t.removeEventListener("touchend", this.touchEnd);
2981
+ };
2982
+ }
2983
+ touchEnd() {
2984
+ clearTimeout(this.timer);
2985
+ }
2986
+ }
2987
+ class Vs {
2988
+ constructor() {
2989
+ this.resizeObserver = null, this.resizeHandler = null, this.resize = (t, e, s = 100) => {
2990
+ this.resizeHandler = (r) => {
2991
+ this.debounce(e, s, r);
2992
+ }, this.resizeObserver = new ResizeObserver(this.resizeHandler), this.resizeObserver.observe(t);
2993
+ }, this.unresize = (t) => {
2994
+ this.resizeObserver && this.resizeObserver.unobserve(t);
2995
+ }, this.debounce = (t, e, s = null) => {
2996
+ this.lastDebounceTime == null && (this.lastDebounceTime = q.getTimestamp());
2997
+ let r = q.getTimestamp();
2998
+ this.lastDebounceTimeout != null && clearTimeout(this.lastDebounceTimeout), this.lastDebounceTimeout = setTimeout(t, e, s), this.lastDebounceTime = r;
2999
+ }, this.clearDebounce = () => {
3000
+ clearTimeout(this.lastDebounceTimeout);
3001
+ }, this.throttle = () => {
3002
+ };
3003
+ }
3004
+ }
3005
+ let Ks = async (a) => {
3006
+ Se(a), await os();
3007
+ };
2566
3008
  export {
2567
- T as ArrayHelper,
2568
- qe as ComponentHelper,
2569
- Ue as CookieHelper,
2570
- X as DictionaryHelper,
2571
- $ as DomHelper,
2572
- k as DriverFactory,
2573
- pt as EventHelper,
2574
- Z as FileHelper,
2575
- yt as HtmlHelper,
2576
- Le as I18nHelper,
2577
- bt as ImageHelper,
2578
- zt as JsonHelper,
2579
- xt as MathHelper,
2580
- wt as MicroHelper,
2581
- G as MountHelper,
2582
- F as ObjectHelper,
2583
- Yt as RequesterFactory,
2584
- H as ScriptHelper,
2585
- kt as ScrollHelper,
2586
- K as SettingService,
2587
- Mt as SignHelper,
2588
- x as StorageHelper,
2589
- C as StringHelper,
2590
- St as TaskHelper,
2591
- R as TimeHelper,
2592
- _ as TreeHelper,
2593
- y as TypeHelper,
2594
- S as UrlHelper
3009
+ rt as ArrayHelper,
3010
+ Os as ComponentHelper,
3011
+ Is as CookieHelper,
3012
+ wt as DictionaryHelper,
3013
+ V as DomHelper,
3014
+ I as DriverFactory,
3015
+ vt as EventHelper,
3016
+ Vs as EventUtility,
3017
+ ke as ExcelFactory,
3018
+ es as FeatureFactory,
3019
+ St as FileHelper,
3020
+ Us as HaCode,
3021
+ Ds as HaCol,
3022
+ Ls as HaCompare,
3023
+ $s as HaContainer,
3024
+ Ns as HaEmpty,
3025
+ Ps as HaProgress,
3026
+ Ts as HaRow,
3027
+ Ae as HaloHttp,
3028
+ ns as HasherFactory,
3029
+ Gt as HtmlHelper,
3030
+ Ue as HttpFactory,
3031
+ Ie as HttpRequest,
3032
+ re as HttpResponse,
3033
+ As as I18nHelper,
3034
+ Zt as ImageHelper,
3035
+ ut as JsonHelper,
3036
+ Rs as KeyboardUtility,
3037
+ Ht as MathHelper,
3038
+ _t as MicroHelper,
3039
+ xt as MountHelper,
3040
+ Fs as MouseUtility,
3041
+ K as ObjectHelper,
3042
+ is as ProviderFactory,
3043
+ kt as ScriptHelper,
3044
+ ee as ScrollHelper,
3045
+ mt as SettingService,
3046
+ Oe as SignHelper,
3047
+ Te as SignerFactory,
3048
+ ze as SsoFactory,
3049
+ E as StorageHelper,
3050
+ B as StringHelper,
3051
+ te as TaskHelper,
3052
+ q as TimeHelper,
3053
+ Ct as TreeHelper,
3054
+ x as TypeHelper,
3055
+ O as UrlHelper,
3056
+ Ks as createHalo,
3057
+ ne as encoderFactory,
3058
+ j as http,
3059
+ as as httpFactory,
3060
+ js as loadEcharts,
3061
+ bt as loader,
3062
+ pt as messager,
3063
+ N as moment,
3064
+ os as setHttp,
3065
+ Se as setMessager,
3066
+ H as useConfigStore,
3067
+ Bs as useDriverStore,
3068
+ Ce as useEnvStore,
3069
+ se as useLogStore,
3070
+ ue as useSettingStore,
3071
+ Ee as useSocketStore,
3072
+ ce as useUserStore
2595
3073
  };