halo-fe 1.0.20 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -1,35 +1,35 @@
1
1
  var vt = Object.defineProperty;
2
2
  var wt = (u, t, e) => t in u ? vt(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e;
3
3
  var n = (u, t, e) => wt(u, typeof t != "symbol" ? t + "" : t, e);
4
- import { _ as Re } from "./assets/underscore-B0BCaBxV.js";
5
- import { defineAsyncComponent as bt, reactive as Ge, defineComponent as Q, toRefs as se, openBlock as O, createElementBlock as _, createElementVNode as D, toDisplayString as pe, unref as y, renderSlot as ge, createCommentVNode as Ze, watch as X, ref as I, onMounted as be, onUnmounted as xe, normalizeStyle as fe, normalizeClass as Ae, createTextVNode as xt, createBlock as He, withCtx as Ne, mergeModels as Ke, useModel as et, nextTick as We, withDirectives as kt, vShow as St, createVNode as Ce, createStaticVNode as Et, isRef as _e, Fragment as Ct, renderList as Tt, computed as Te } from "vue";
4
+ import { _ as Ie } from "./assets/underscore-B0BCaBxV.js";
5
+ import { defineAsyncComponent as bt, reactive as Ye, defineComponent as Q, toRefs as se, openBlock as I, createElementBlock as B, createElementVNode as D, toDisplayString as de, unref as y, renderSlot as he, createCommentVNode as Ge, watch as J, ref as R, onMounted as ve, onUnmounted as we, normalizeStyle as pe, normalizeClass as $e, createTextVNode as xt, createBlock as Ze, withCtx as Fe, mergeModels as Ve, useModel as He, nextTick as ze, withDirectives as kt, vShow as St, createVNode as Se, createStaticVNode as Ct, isRef as Oe, Fragment as Et, renderList as Tt, computed as Ce } from "vue";
6
6
  import { _ as $t } from "./assets/underscore.string-oDfap0sE.js";
7
7
  import { a as Lt } from "./assets/clone-DtpAsLoe.js";
8
8
  import { F as At } from "./assets/file-saver-Cnua3zoa.js";
9
- import { h as ee } from "./assets/moment-h96o7c8I.js";
9
+ import { h as H } from "./assets/moment-h96o7c8I.js";
10
10
  import { L as Dt } from "./assets/liquidjs-C-LVcoaY.js";
11
- class U {
11
+ class F {
12
12
  }
13
13
  /**
14
14
  * 判断输入类型是否是字符串类型 null -> false
15
15
  */
16
- n(U, "isString", (t) => Object.prototype.toString.call(t) == "[object String]"), /**
16
+ n(F, "isString", (t) => Object.prototype.toString.call(t) == "[object String]"), /**
17
17
  * 判断输入类型是否是Object类型
18
18
  */
19
- n(U, "isObject", (t) => Object.prototype.toString.call(t) == "[object Object]"), /**
19
+ n(F, "isObject", (t) => Object.prototype.toString.call(t) == "[object Object]"), /**
20
20
  * 判断输入类型是否是Array类型
21
21
  */
22
- n(U, "isArray", (t) => Object.prototype.toString.call(t) == "[object Array]"), /**
22
+ n(F, "isArray", (t) => Object.prototype.toString.call(t) == "[object Array]"), /**
23
23
  * 判断输入类型是否是Number类型,null -> false
24
24
  */
25
- n(U, "isNumber", (t) => {
25
+ n(F, "isNumber", (t) => {
26
26
  let e = Object.prototype.toString.call(t);
27
27
  return e == "[object Number]" || e == "[object BigInt]";
28
28
  }), /**
29
29
  * 判断输入类型是否是isBoolean类型
30
30
  */
31
- n(U, "isBoolean", (t) => Object.prototype.toString.call(t) == "[object Boolean]");
32
- const F = class F {
31
+ n(F, "isBoolean", (t) => Object.prototype.toString.call(t) == "[object Boolean]");
32
+ const q = class q {
33
33
  /**
34
34
  * 获取最大值
35
35
  */
@@ -69,64 +69,64 @@ const F = class F {
69
69
  /**
70
70
  * 过滤某一页数据
71
71
  */
72
- n(F, "filterPage", (t, e, s) => {
72
+ n(q, "filterPage", (t, e, s) => {
73
73
  let l = (e - 1) * s, r = e * s;
74
74
  return t.filter((a, o) => o >= l && o < r);
75
75
  }), /**
76
76
  * 总页数
77
77
  */
78
- n(F, "pageCount", (t, e) => Math.ceil(t / e)), //#endregion
78
+ n(q, "pageCount", (t, e) => Math.ceil(t / e)), //#endregion
79
79
  //#region 求值
80
80
  /**
81
81
  * 四舍五入
82
82
  */
83
- n(F, "round", (t, e) => t.toFixed(e)), /**
83
+ n(q, "round", (t, e) => t.toFixed(e)), /**
84
84
  * 天花板函数
85
85
  */
86
- n(F, "ceil", (t) => Math.ceil(t)), //#endregion
86
+ n(q, "ceil", (t) => Math.ceil(t)), //#endregion
87
87
  //#region 进度
88
88
  /**
89
89
  * 获取百分比
90
90
  */
91
- n(F, "getPercentage", (t, e) => {
91
+ n(q, "getPercentage", (t, e) => {
92
92
  if (!t || !e)
93
93
  return 0;
94
- let s = t / e * 100, l = F.round(s, 2);
94
+ let s = t / e * 100, l = q.round(s, 2);
95
95
  return parseFloat(l);
96
96
  }), /**
97
97
  * 获取进度文本
98
98
  */
99
- n(F, "getProgressText", (t, e) => `${t ?? "-"}/${e ?? "-"}`), /**
99
+ n(q, "getProgressText", (t, e) => `${t ?? "-"}/${e ?? "-"}`), /**
100
100
  * 获取百分比,保留2位小数
101
101
  */
102
- n(F, "getPercentageText", (t, e) => F.getPercentage(t, e).toFixed(2)), //#endregion
102
+ n(q, "getPercentageText", (t, e) => q.getPercentage(t, e).toFixed(2)), //#endregion
103
103
  /**
104
104
  * 获取大小
105
105
  */
106
- n(F, "size", (t) => {
106
+ n(q, "size", (t) => {
107
107
  if (!t)
108
108
  return "OKB";
109
109
  let e = 1024, s = e * 1024;
110
110
  if (t < s)
111
- return F.round(t / e, 2) + "KB";
111
+ return q.round(t / e, 2) + "KB";
112
112
  let l = s * 1024;
113
113
  if (t < l)
114
- return F.round(t / s, 2) + "MB";
114
+ return q.round(t / s, 2) + "MB";
115
115
  let r = l * 1024;
116
116
  if (t < r)
117
- return F.round(t / l, 2) + "GB";
117
+ return q.round(t / l, 2) + "GB";
118
118
  let i = r * 1024;
119
119
  if (t < i)
120
- return F.round(t / r, 2) + "TB";
120
+ return q.round(t / r, 2) + "TB";
121
121
  throw new Error("暂未支持比TB更大的大小");
122
122
  });
123
- let ne = F;
123
+ let Z = q;
124
124
  const S = class S {
125
125
  /**
126
126
  * 获取分成指定片数量后的集合
127
127
  */
128
128
  static getChunksByCount(t, e) {
129
- let s = [], l = ne.ceil(t.length / e);
129
+ let s = [], l = Z.ceil(t.length / e);
130
130
  for (let r = 0; r < t.length; r += l) {
131
131
  let i = this.getRange(t, r, l);
132
132
  s.push(i);
@@ -214,10 +214,10 @@ n(S, "except", (t, e, s = null) => {
214
214
  /**
215
215
  * 求最大值,数据类型的比较函数要自己转换为数值类型
216
216
  */
217
- n(S, "max", (t, e) => Re.max(t, e)), /**
217
+ n(S, "max", (t, e) => Ie.max(t, e)), /**
218
218
  * 求最小值,数据类型的比较函数要自己转换为数值类型
219
219
  */
220
- n(S, "min", (t, e) => Re.min(t, e)), /**
220
+ n(S, "min", (t, e) => Ie.min(t, e)), /**
221
221
  * 求平均值
222
222
  */
223
223
  n(S, "avg", (t, e, s = null) => {
@@ -301,7 +301,7 @@ n(S, "split", (t, e, s = null) => {
301
301
  * 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
302
302
  */
303
303
  n(S, "combine", (...t) => {
304
- let e = [], s = Re.max(t, (l) => l.length);
304
+ let e = [], s = Ie.max(t, (l) => l.length);
305
305
  for (let l = 0; l < s.length; l++) {
306
306
  let r = [], i;
307
307
  for (let a = 0; a < t.length; a++) {
@@ -341,9 +341,9 @@ n(S, "pushIfNotExist", (t, e) => {
341
341
  * 删除执行数组中的指定对象或者集合
342
342
  */
343
343
  n(S, "remove", (t, e) => {
344
- if (U.isNumber(e))
344
+ if (F.isNumber(e))
345
345
  t.splice(e, 1);
346
- else if (U.isArray(e))
346
+ else if (F.isArray(e))
347
347
  for (let s = 0; s < e.length; s++)
348
348
  S.remove(t, e[s]);
349
349
  else
@@ -398,14 +398,8 @@ n(S, "groupByArray", (t, e) => {
398
398
  i == null && (i = { key: r, value: [] }, s.push(i)), i.value.push(l);
399
399
  }), s;
400
400
  });
401
- let ue = S;
402
- const x = class x {
403
- /**
404
- * 根据字符串或数组,自动返回数组
405
- */
406
- static getArray(t) {
407
- return t == null ? [] : typeof t == "string" ? [t.toString()] : t instanceof Array ? t : [];
408
- }
401
+ let oe = S;
402
+ const b = class b {
409
403
  /**
410
404
  * 忽略大小写比较
411
405
  */
@@ -413,11 +407,19 @@ const x = class x {
413
407
  let s = t.toUpperCase(), l = e.toUpperCase();
414
408
  return s == l;
415
409
  }
410
+ /**
411
+ * 根据字符串或数组,自动返回数组
412
+ */
413
+ static getArray(t) {
414
+ return t == null ? [] : typeof t == "string" ? [t.toString()] : t instanceof Array ? t : [];
415
+ }
416
+ //#endregion
416
417
  };
418
+ //#region 生成
417
419
  /**
418
420
  * 生成唯一字符串
419
421
  */
420
- n(x, "getUniqueId", (t = 32) => {
422
+ n(b, "getUniqueId", (t = 32) => {
421
423
  let e = "";
422
424
  for (let s = 0; s < t; s++)
423
425
  e += Math.random().toString(36).charAt(2);
@@ -425,10 +427,14 @@ n(x, "getUniqueId", (t = 32) => {
425
427
  }), /**
426
428
  * 填充字符串到指定长度,使用pad填充
427
429
  */
428
- n(x, "padLeft", (t, e, s) => $t.pad(t, e, s)), /**
430
+ n(b, "padLeft", (t, e, s) => $t.pad(t, e, s)), /**
431
+ * 填充字符串到指定长度,使用pad填充
432
+ */
433
+ n(b, "padStart", (t, e, s) => t.padStart(e, s)), //#endregion
434
+ /**
429
435
  * 去掉头部字符串
430
436
  */
431
- n(x, "trimStart", (t, e) => {
437
+ n(b, "trimStart", (t, e) => {
432
438
  if (e == null)
433
439
  return t;
434
440
  let s = t.indexOf(e);
@@ -436,7 +442,7 @@ n(x, "trimStart", (t, e) => {
436
442
  }), /**
437
443
  * 去掉尾部字符串
438
444
  */
439
- n(x, "trimEnd", (t, e) => {
445
+ n(b, "trimEnd", (t, e) => {
440
446
  if (e == null)
441
447
  return t;
442
448
  let s = t.lastIndexOf(e);
@@ -444,13 +450,13 @@ n(x, "trimEnd", (t, e) => {
444
450
  }), /**
445
451
  * 去掉头尾字符串
446
452
  */
447
- n(x, "trim", (t, e, s) => {
448
- let l = x.trimStart(t, e);
449
- return x.trimEnd(l, s);
453
+ n(b, "trim", (t, e, s) => {
454
+ let l = b.trimStart(t, e);
455
+ return b.trimEnd(l, s);
450
456
  }), /**
451
457
  * 获取中划线命名法
452
458
  */
453
- n(x, "getDashName", (t) => {
459
+ n(b, "getDashName", (t) => {
454
460
  if (!t)
455
461
  return null;
456
462
  let e = "";
@@ -459,51 +465,46 @@ n(x, "getDashName", (t) => {
459
465
  l == "/" ? e += "-" : l >= "A" && l <= "Z" ? (s > 0 && t[s - 1] != "/" && (e += "-"), e += l.toLowerCase()) : e += l;
460
466
  }
461
467
  return e;
462
- }), /**
463
- * 忽略大小写包含判断,支持从数组中搜索关键词
468
+ }), //#region 判断
469
+ /**
470
+ * 判断字符串是否为空或空串
464
471
  */
465
- n(x, "containsIgnoreCase", (t, e) => {
466
- if (!t)
467
- return !0;
468
- let s = e instanceof Array ? e : [e];
469
- for (let l = 0; l < s.length; l++) {
470
- let r = s[l];
471
- if (!r)
472
- return !1;
473
- if (r.toString().toUpperCase().includes(t.toUpperCase()))
474
- return !0;
475
- }
476
- return !1;
477
- }), /**
472
+ n(b, "isNullOrEmpty", (t) => t == null || b.isEmpty(t)), /**
473
+ * 判断字符串是否为空或空串
474
+ */
475
+ n(b, "isEmpty", (t) => t == ""), /**
476
+ * 判断是否符合密码要求
477
+ */
478
+ n(b, "isPassword", (t) => !0), /**
478
479
  * 判断是否是数字类型,这样支持0
479
480
  */
480
- n(x, "isNumber", (t) => t != null && !isNaN(t)), /**
481
+ n(b, "isNumber", (t) => t != null && !isNaN(t)), /**
481
482
  * 验证是否是邮箱格式
482
483
  */
483
- n(x, "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)), /**
484
+ n(b, "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)), /**
484
485
  * 判断是否是json
485
486
  */
486
- n(x, "isJson", (t) => {
487
+ n(b, "isJson", (t) => {
487
488
  try {
488
489
  if (!t)
489
490
  return !1;
490
491
  let e = JSON.parse(t);
491
- return U.isObject(e);
492
+ return F.isObject(e);
492
493
  } catch {
493
494
  return !1;
494
495
  }
495
496
  }), /**
496
497
  * 判断是否是isJsonp
497
498
  */
498
- n(x, "isJsonp", (t) => {
499
+ n(b, "isJsonp", (t) => {
499
500
  if (!t)
500
501
  return !1;
501
502
  let e = t.indexOf("("), s = t.lastIndexOf(")"), l = t.substring(e + 1, s);
502
- return !!x.isJson(l);
503
+ return !!b.isJson(l);
503
504
  }), /**
504
505
  * 判断是否是html
505
506
  */
506
- n(x, "isHtml", (t) => {
507
+ n(b, "isHtml", (t) => {
507
508
  if (!t)
508
509
  return !1;
509
510
  let e = document.createElement("div");
@@ -513,41 +514,67 @@ n(x, "isHtml", (t) => {
513
514
  return !0;
514
515
  return !1;
515
516
  }), /**
516
- * 获取内容类型
517
- */
518
- n(x, "getContentType", (t) => x.isJson(t) || x.isJsonp(t) ? "json" : x.isHtml(t) ? "html" : "text"), /**
519
- * 判断字符串是否为空或空串
517
+ * 是否以字符串开头
520
518
  */
521
- n(x, "isNullOrEmpty", (t) => t == null || x.isEmpty(t)), /**
522
- * 判断字符串是否为空或空串
519
+ n(b, "startWith", (t, e) => t == null ? !1 : t.startsWith(e)), //#endregion
520
+ //#region 包含
521
+ /**
522
+ * 忽略大小写包含判断,支持从数组中搜索关键词
523
523
  */
524
- n(x, "isEmpty", (t) => t == ""), /**
525
- * 判断是否符合密码要求
524
+ n(b, "containsIgnoreCase", (t, e) => {
525
+ if (!t)
526
+ return !0;
527
+ let s = e instanceof Array ? e : [e];
528
+ for (let l = 0; l < s.length; l++) {
529
+ let r = s[l];
530
+ if (!r)
531
+ return !1;
532
+ if (r.toString().toUpperCase().includes(t.toUpperCase()))
533
+ return !0;
534
+ }
535
+ return !1;
536
+ }), //#endregion
537
+ /**
538
+ * 获取内容类型
526
539
  */
527
- n(x, "isPassword", (t) => !0), /**
540
+ n(b, "getContentType", (t) => b.isJson(t) || b.isJsonp(t) ? "json" : b.isHtml(t) ? "html" : "text"), //#region 获取值
541
+ /**
528
542
  * 获取数据值或者空
529
543
  */
530
- n(x, "getNumberOrNull", (t) => t == null || isNaN(t) ? 0 : parseFloat(t)), /**
531
- * 格式化成留指定位数的小数
532
- */
533
- n(x, "format", (t, e) => {
534
- let s = parseFloat(t), l;
535
- return e ? l = s.toFixed(e).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") : l = s.toLocaleString(), l;
536
- }), /**
544
+ n(b, "getNumberOrNull", (t) => t == null || isNaN(t) ? 0 : parseFloat(t)), /**
537
545
  * 获取两个字符串之间的字符串
538
546
  */
539
- n(x, "getBetween", (t, e, s) => {
547
+ n(b, "getBetween", (t, e, s) => {
540
548
  let l = t.indexOf(e);
541
549
  if (l == -1)
542
550
  return null;
543
551
  let r = l + e.length, i = t.substring(r), a = i.indexOf(s);
544
552
  return a == -1 ? null : i.substring(0, a);
553
+ }), //#endregion
554
+ //#region 格式化
555
+ /**
556
+ * 按占位符格式化成字符串
557
+ */
558
+ n(b, "format", (t, e) => {
559
+ if (t == null)
560
+ return t;
561
+ let s = [];
562
+ typeof e == "string" ? s.push(e) : s.push(...e);
563
+ let l = t;
564
+ for (let r = 0; r < s.length; r++) {
565
+ let i = s[r];
566
+ l = l.replace(`{${r}}`, i);
567
+ }
568
+ return l;
545
569
  }), /**
546
- * 填充字符串到指定长度,使用pad填充
570
+ * 格式化成留指定位数的小数
547
571
  */
548
- n(x, "padStart", (t, e, s) => t.padStart(e, s));
549
- let W = x;
550
- const $e = class $e {
572
+ n(b, "formatDigits", (t, e) => {
573
+ let s = parseFloat(t), l;
574
+ return e ? l = s.toFixed(e).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") : l = s.toLocaleString(), l;
575
+ });
576
+ let M = b;
577
+ const Ee = class Ee {
551
578
  //#region 净化
552
579
  /**
553
580
  * 净化对象,返回不带默认属性的对象
@@ -556,7 +583,7 @@ const $e = class $e {
556
583
  let e = {}, s = Object.keys(t);
557
584
  for (let l = 0; l < s.length; l++) {
558
585
  let r = s[l], i = t[r];
559
- i != null && (U.isObject(i) ? e[r] = this.pure(i) : e[r] = t[r]);
586
+ i != null && (F.isObject(i) ? e[r] = this.pure(i) : e[r] = t[r]);
560
587
  }
561
588
  return e;
562
589
  }
@@ -605,10 +632,10 @@ const $e = class $e {
605
632
  let s = Lt(t, !0);
606
633
  if (e == null)
607
634
  return s;
608
- if (U.isArray(t))
635
+ if (F.isArray(t))
609
636
  for (let l = 0; l < s.length; l++)
610
637
  e(s[l]);
611
- else U.isObject(t) && e(s);
638
+ else F.isObject(t) && e(s);
612
639
  return s;
613
640
  }
614
641
  //#endregion
@@ -617,9 +644,9 @@ const $e = class $e {
617
644
  * 合并来源对象到目标对象上
618
645
  */
619
646
  static mergeTo(t, e) {
620
- return t == null ? e : e == null ? t : U.isArray(e) ? e.slice() : (Object.keys(e).forEach((l) => {
647
+ return t == null ? e : e == null ? t : F.isArray(e) ? e.slice() : (Object.keys(e).forEach((l) => {
621
648
  let r = e[l];
622
- typeof r == "object" ? t[l] = $e.mergeTo(t[l], r) : t[l] = r;
649
+ typeof r == "object" ? t[l] = Ee.mergeTo(t[l], r) : t[l] = r;
623
650
  }), t);
624
651
  }
625
652
  //#endregion
@@ -645,9 +672,9 @@ const $e = class $e {
645
672
  /**
646
673
  * 手动复制,并对字段执行指定自定义处理
647
674
  */
648
- n($e, "copy", (t, e = null) => {
675
+ n(Ee, "copy", (t, e = null) => {
649
676
  let s = [];
650
- U.isObject(t) && s.push(t);
677
+ F.isObject(t) && s.push(t);
651
678
  let l = [];
652
679
  for (let r = 0; r < s.length; r++) {
653
680
  let i = s[r], a = {};
@@ -656,21 +683,21 @@ n($e, "copy", (t, e = null) => {
656
683
  e && e[o] ? a[o] = e[o]() : a[o] = c;
657
684
  }), l.push(a);
658
685
  }
659
- return U.isObject(t) ? l[0] : l;
686
+ return F.isObject(t) ? l[0] : l;
660
687
  }), //#endregion
661
688
  //#region 赋值
662
689
  /**
663
690
  * 给对象添加多层属性,并赋值
664
691
  */
665
- n($e, "addProperties", (t, e, s) => {
692
+ n(Ee, "addProperties", (t, e, s) => {
666
693
  let l = t;
667
694
  for (let r = 0; r < e.length; r++) {
668
695
  let i = e[r];
669
696
  r == e.length - 1 ? l[i] = s : (l[i] || (l[i] = {}), l = l[i]);
670
697
  }
671
698
  });
672
- let Y = $e;
673
- class Pe {
699
+ let X = Ee;
700
+ class _e {
674
701
  //#region 取值
675
702
  /**
676
703
  * 从指定字典中提取忽略大小写的key的值
@@ -731,7 +758,7 @@ class Pe {
731
758
  }
732
759
  //#endregion
733
760
  }
734
- const z = class z {
761
+ const K = class K {
735
762
  /**
736
763
  * 获取指定地址路由对象
737
764
  */
@@ -860,7 +887,7 @@ const z = class z {
860
887
  */
861
888
  static serialize(t, e = !0) {
862
889
  let s = (r) => e ? encodeURIComponent(r) : r;
863
- return Pe.join(t, s, "=", "&");
890
+ return _e.join(t, s, "=", "&");
864
891
  }
865
892
  //endregion
866
893
  //region 编码和解码
@@ -881,21 +908,21 @@ const z = class z {
881
908
  /**
882
909
  * 处理键值对的值
883
910
  */
884
- n(z, "handleQueryValue", (t, e) => {
911
+ n(K, "handleQueryValue", (t, e) => {
885
912
  let s = "";
886
913
  if (t == null)
887
914
  return s;
888
915
  if (t instanceof Array) {
889
916
  if (t.length > 0)
890
917
  for (let l = 0; l < t.length; l++) {
891
- let r = Y.clone(e);
892
- r.push(""), s += z.handleQueryValue(t[l], r);
918
+ let r = X.clone(e);
919
+ r.push(""), s += K.handleQueryValue(t[l], r);
893
920
  }
894
921
  } else if (t instanceof Object) {
895
922
  let l = Object.keys(t);
896
923
  for (let r of l) {
897
- let i = Y.clone(e);
898
- i.push(r), s += z.handleQueryValue(t[r], i);
924
+ let i = X.clone(e);
925
+ i.push(r), s += K.handleQueryValue(t[r], i);
899
926
  }
900
927
  } else {
901
928
  let l = "";
@@ -908,27 +935,27 @@ n(z, "handleQueryValue", (t, e) => {
908
935
  }), /**
909
936
  * 自动根据后面路径,决定是否要合并Url
910
937
  */
911
- n(z, "concatUrl", (t, e) => z.httpOrHttps(e) ? e : t + e), /**
938
+ n(K, "concatUrl", (t, e) => K.httpOrHttps(e) ? e : t + e), /**
912
939
  * 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
913
940
  * ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
914
941
  * ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
915
942
  */
916
- n(z, "getUrl", (t, e = null) => {
943
+ n(K, "getUrl", (t, e = null) => {
917
944
  if (t == null)
918
945
  return null;
919
946
  if (e == null)
920
947
  return t;
921
- let s = z.deserialize(t), l = Y.mergeTo(s, e);
922
- return z.getPath(t) + "?" + z.getQuery(l);
948
+ let s = K.deserialize(t), l = X.mergeTo(s, e);
949
+ return K.getPath(t) + "?" + K.getQuery(l);
923
950
  }), /**
924
951
  * 获取超链接配置对象
925
952
  */
926
- n(z, "getAnchor", (t, e = null) => {
953
+ n(K, "getAnchor", (t, e = null) => {
927
954
  let s = { href: null, target: null };
928
- return z.httpOrHttps(t) ? (s.href = t, s.target = "_blank", s) : (s.href = z.getUrl(t, e), s);
955
+ return K.httpOrHttps(t) ? (s.href = t, s.target = "_blank", s) : (s.href = K.getUrl(t, e), s);
929
956
  });
930
- let K = z;
931
- class It {
957
+ let W = K;
958
+ class Rt {
932
959
  /**
933
960
  * 根据动态加载的组件对象,得到组件集合
934
961
  */
@@ -938,7 +965,7 @@ class It {
938
965
  return l;
939
966
  for (let i = 0; i < r.length; i++) {
940
967
  const a = r[i];
941
- let o = W.trim(a, e, ".vue"), h = (s ? s + "-" : "") + W.getDashName(o), d = t[a];
968
+ let o = M.trim(a, e, ".vue"), h = (s ? s + "-" : "") + M.getDashName(o), d = t[a];
942
969
  if (d.default)
943
970
  l[h] = d.default;
944
971
  else {
@@ -960,18 +987,18 @@ class It {
960
987
  /**
961
988
  * 获取部分自定义组件名称
962
989
  */
963
- n(It, "getName", (t, e) => {
990
+ n(Rt, "getName", (t, e) => {
964
991
  if (!t)
965
992
  return null;
966
- let s = K.getPath(t);
993
+ let s = W.getPath(t);
967
994
  return s ? s == "/" ? e : e + s.replace(/\//g, "-").toLowerCase() : null;
968
995
  });
969
- const oe = class oe {
996
+ const ae = class ae {
970
997
  };
971
998
  /**
972
999
  * 保存文件
973
1000
  */
974
- n(oe, "save", (t, e) => {
1001
+ n(ae, "save", (t, e) => {
975
1002
  let s = window.atob(t), l = s.length, r = new Uint8Array(l);
976
1003
  for (; l--; )
977
1004
  r[l] = s.charCodeAt(l);
@@ -980,24 +1007,24 @@ n(oe, "save", (t, e) => {
980
1007
  }), /**
981
1008
  * 获取文件扩展名
982
1009
  */
983
- n(oe, "getExtension", (t) => {
1010
+ n(ae, "getExtension", (t) => {
984
1011
  let e = t.lastIndexOf(".");
985
1012
  return e == -1 ? "" : t.substring(e).split("?")[0];
986
1013
  }), /**
987
1014
  * 判断当前文件名是否是excel文件
988
1015
  */
989
- n(oe, "isExcel", (t) => {
990
- let e = oe.getExtension(t);
1016
+ n(ae, "isExcel", (t) => {
1017
+ let e = ae.getExtension(t);
991
1018
  return [".xls", ".xlsx"].indexOf(e) > -1;
992
1019
  }), /**
993
1020
  * 判断当前文件是否是图片文件
994
1021
  */
995
- n(oe, "isImage", (t) => {
996
- let e = oe.getExtension(t);
1022
+ n(ae, "isImage", (t) => {
1023
+ let e = ae.getExtension(t);
997
1024
  return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(e) > -1;
998
1025
  });
999
- let Ie = oe;
1000
- const G = class G {
1026
+ let Ae = ae;
1027
+ const Y = class Y {
1001
1028
  //#region 颜色
1002
1029
  /**
1003
1030
  * 根据字符串Ascii码得到固定颜色字典
@@ -1030,7 +1057,7 @@ const G = class G {
1030
1057
  let e = "";
1031
1058
  for (let s = 0; s < t.length; s++) {
1032
1059
  let l = t[s];
1033
- W.isNullOrEmpty(l) || (e += l, s != t.length - 1 && (e += " "));
1060
+ M.isNullOrEmpty(l) || (e += l, s != t.length - 1 && (e += " "));
1034
1061
  }
1035
1062
  return e;
1036
1063
  }
@@ -1150,13 +1177,13 @@ const G = class G {
1150
1177
  let i = t.querySelector(s);
1151
1178
  if (!i)
1152
1179
  return null;
1153
- let a = {}, o = t.getBoundingClientRect(), c = l.getBoundingClientRect(), d = t.querySelector(e).getBoundingClientRect(), p = i.getBoundingClientRect(), f = c.height - d.top;
1180
+ let a = {}, o = t.getBoundingClientRect(), c = l.getBoundingClientRect(), d = t.querySelector(e).getBoundingClientRect(), p = i.getBoundingClientRect(), g = c.height - d.top;
1154
1181
  if (r == "right") {
1155
1182
  a.left = `${o.left + o.width}px`;
1156
- let b;
1157
- p.height > c.height ? b = c.height : b = p.height, a.height = `${b}px`, b + d.top > c.height ? (a.top = "initial", a.bottom = "0px") : a.top = `${o.top}px`;
1183
+ let x;
1184
+ p.height > c.height ? x = c.height : x = p.height, a.height = `${x}px`, x + d.top > c.height ? (a.top = "initial", a.bottom = "0px") : a.top = `${o.top}px`;
1158
1185
  } else if (r == "bottom")
1159
- f -= d.height, a.left = `${o.left}px`, a.top = `${o.top + o.height}px`, f < p.height ? a.height = `${f}px` : a.height = `${p.height}px`;
1186
+ g -= d.height, a.left = `${o.left}px`, a.top = `${o.top + o.height}px`, g < p.height ? a.height = `${g}px` : a.height = `${p.height}px`;
1160
1187
  else
1161
1188
  throw new Error(`暂未支持的position:${r}`);
1162
1189
  return a;
@@ -1214,13 +1241,13 @@ const G = class G {
1214
1241
  * 获取行内标签,如: style(非link)
1215
1242
  */
1216
1243
  static getInlineTagByUrl(t) {
1217
- return Ie.getExtension(t) == ".css" ? "style" : "script";
1244
+ return Ae.getExtension(t) == ".css" ? "style" : "script";
1218
1245
  }
1219
1246
  /**
1220
1247
  * 获取资源标签,如: link
1221
1248
  */
1222
1249
  static getTagByUrl(t) {
1223
- return Ie.getExtension(t) == ".css" ? "link" : "script";
1250
+ return Ae.getExtension(t) == ".css" ? "link" : "script";
1224
1251
  }
1225
1252
  //#endregion
1226
1253
  //#region 文本
@@ -1238,7 +1265,7 @@ const G = class G {
1238
1265
  /**
1239
1266
  * 添加类
1240
1267
  */
1241
- n(G, "addClass", (t, e, s = null) => {
1268
+ n(Y, "addClass", (t, e, s = null) => {
1242
1269
  let l;
1243
1270
  if (e == null || e == "") {
1244
1271
  if (s == null || s == "")
@@ -1250,7 +1277,7 @@ n(G, "addClass", (t, e, s = null) => {
1250
1277
  }), /**
1251
1278
  * 删除类
1252
1279
  */
1253
- n(G, "removeClass", (t, e, s = null) => {
1280
+ n(Y, "removeClass", (t, e, s = null) => {
1254
1281
  if (e == null || e == "")
1255
1282
  return;
1256
1283
  let l = [];
@@ -1268,7 +1295,7 @@ n(G, "removeClass", (t, e, s = null) => {
1268
1295
  /**
1269
1296
  * 获取dom宽度或高度
1270
1297
  */
1271
- n(G, "getWidthOrHeight", (t, e, s = null) => {
1298
+ n(Y, "getWidthOrHeight", (t, e, s = null) => {
1272
1299
  let l = 0, r = [];
1273
1300
  t instanceof Array && r.push(...t), t instanceof HTMLCollection ? r.push(...t) : r.push(t);
1274
1301
  for (let i = 0; i < r.length; i++) {
@@ -1282,21 +1309,21 @@ n(G, "getWidthOrHeight", (t, e, s = null) => {
1282
1309
  }), /**
1283
1310
  * 根据路径获取标签(无src)
1284
1311
  */
1285
- n(G, "createEmptyByUrl", (t) => {
1286
- let e = G.getInlineTagByUrl(t);
1312
+ n(Y, "createEmptyByUrl", (t) => {
1313
+ let e = Y.getInlineTagByUrl(t);
1287
1314
  return document.createElement(e);
1288
1315
  }), /**
1289
1316
  * 根据路径获取待加载的元素,同时包含Url
1290
1317
  */
1291
- n(G, "createByUrl", (t) => {
1292
- let e = G.getTagByUrl(t), s = document.createElement(e);
1318
+ n(Y, "createByUrl", (t) => {
1319
+ let e = Y.getTagByUrl(t), s = document.createElement(e);
1293
1320
  return s instanceof HTMLLinkElement ? (s.href = t, s.rel = "stylesheet") : s instanceof HTMLScriptElement && (s.src = t), s;
1294
1321
  }), /**
1295
1322
  * 根据路径获取元素
1296
1323
  * VIP:已废弃,不能用改方法判断资源是否加载完毕,因为可能只是脚本创建,资源还未加载完毕
1297
1324
  */
1298
- n(G, "getByUrl", (t) => {
1299
- let e = G.getTagByUrl(t), s = document.querySelectorAll(e);
1325
+ n(Y, "getByUrl", (t) => {
1326
+ let e = Y.getTagByUrl(t), s = document.querySelectorAll(e);
1300
1327
  for (let l of s) {
1301
1328
  if (l instanceof HTMLLinkElement && l.href == t)
1302
1329
  return l;
@@ -1309,104 +1336,104 @@ n(G, "getByUrl", (t) => {
1309
1336
  /**
1310
1337
  * 判断选择器内容是否溢出
1311
1338
  */
1312
- n(G, "isEllipsis", (t) => {
1339
+ n(Y, "isEllipsis", (t) => {
1313
1340
  let e = document.querySelector(t);
1314
1341
  return e.clientWidth < e.scrollWidth;
1315
1342
  });
1316
- let R = G;
1317
- class ae {
1343
+ let j = Y;
1344
+ class ie {
1318
1345
  }
1319
1346
  /**
1320
1347
  * 批量绑定事件,执行指定处理函数
1321
1348
  */
1322
- n(ae, "bind", (t, e, s) => {
1349
+ n(ie, "bind", (t, e, s) => {
1323
1350
  e && t.forEach((l) => {
1324
1351
  e.addEventListener(l, s, !0);
1325
1352
  });
1326
1353
  }), /**
1327
1354
  * 批量绑定事件,执行指定处理函数
1328
1355
  */
1329
- n(ae, "unbind", (t, e, s) => {
1356
+ n(ie, "unbind", (t, e, s) => {
1330
1357
  e && t.forEach((l) => {
1331
1358
  e.removeEventListener(l, s, !0);
1332
1359
  });
1333
1360
  }), /**
1334
1361
  * 绑定点击处理函数
1335
1362
  */
1336
- n(ae, "click", (t, e) => {
1363
+ n(ie, "click", (t, e) => {
1337
1364
  t && t.addEventListener("click", e, !0);
1338
1365
  }), /**
1339
1366
  * 解除点击监听
1340
1367
  */
1341
- n(ae, "unclick", (t, e) => {
1368
+ n(ie, "unclick", (t, e) => {
1342
1369
  t && t.removeEventListener("click", e, !0);
1343
1370
  }), /**
1344
1371
  * 绑定滚动处理函数
1345
1372
  */
1346
- n(ae, "scroll", (t, e) => {
1373
+ n(ie, "scroll", (t, e) => {
1347
1374
  t && t.addEventListener("scroll", e, !0);
1348
1375
  }), /**
1349
1376
  * 移除滚动处理函数,防止内存泄漏
1350
1377
  */
1351
- n(ae, "unscroll", (t, e) => {
1378
+ n(ie, "unscroll", (t, e) => {
1352
1379
  t && t.removeEventListener("scroll", e, !0);
1353
1380
  });
1354
- class Qe {
1381
+ class Ke {
1355
1382
  }
1356
1383
  /**
1357
1384
  * 获取Html内容
1358
1385
  */
1359
- n(Qe, "getHtml", (t) => U.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>")), /**
1386
+ n(Ke, "getHtml", (t) => F.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>")), /**
1360
1387
  * 获取Html中的文字
1361
1388
  */
1362
- n(Qe, "getText", (t) => {
1389
+ n(Ke, "getText", (t) => {
1363
1390
  if (!t)
1364
1391
  return null;
1365
- if (!U.isString(t))
1392
+ if (!F.isString(t))
1366
1393
  return t;
1367
1394
  let e = new RegExp("<[^<>]+>", "g");
1368
1395
  return t.replace(e, "");
1369
1396
  });
1370
- class Ot {
1397
+ class It {
1371
1398
  }
1372
1399
  /**
1373
1400
  * 获取base64图片地址
1374
1401
  */
1375
- n(Ot, "base64", (t) => "data:image/png;base64," + t);
1376
- class jt {
1402
+ n(It, "base64", (t) => "data:image/png;base64," + t);
1403
+ class Ot {
1377
1404
  }
1378
1405
  /**
1379
1406
  * 加载乾坤子应用
1380
1407
  */
1381
- n(jt, "load", function(t, e, s, l) {
1408
+ n(Ot, "load", function(t, e, s, l) {
1382
1409
  });
1383
- const Le = class Le {
1410
+ const Te = class Te {
1384
1411
  };
1385
1412
  /**
1386
1413
  * 激发主框架事件
1387
1414
  */
1388
- n(Le, "emit", (t, e) => {
1389
- Le.emits({ [t]: e });
1415
+ n(Te, "emit", (t, e) => {
1416
+ Te.emits({ [t]: e });
1390
1417
  }), /**
1391
1418
  * 批量激发主框架事件
1392
1419
  */
1393
- n(Le, "emits", (t) => {
1420
+ n(Te, "emits", (t) => {
1394
1421
  var s, l;
1395
1422
  let e = (l = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : l.emit;
1396
1423
  e && Object.keys(t).forEach((r) => {
1397
1424
  e(r, t[r]);
1398
1425
  });
1399
1426
  });
1400
- let we = Le;
1401
- class Ee {
1427
+ let ye = Te;
1428
+ class ke {
1402
1429
  }
1403
1430
  /**
1404
1431
  * 延时指定ms后执行指定任务
1405
1432
  */
1406
- n(Ee, "delay", (t, e) => setTimeout(t, e)), /**
1433
+ n(ke, "delay", (t, e) => setTimeout(t, e)), /**
1407
1434
  * 在执行指定延时后,每隔指定ms执行指定任务
1408
1435
  */
1409
- n(Ee, "execute", (t, e, s) => {
1436
+ n(ke, "execute", (t, e, s) => {
1410
1437
  if (!s) {
1411
1438
  let l = setInterval(t, e);
1412
1439
  return Promise.resolve(l);
@@ -1420,12 +1447,12 @@ n(Ee, "execute", (t, e, s) => {
1420
1447
  }), /**
1421
1448
  * 清空定时器
1422
1449
  */
1423
- n(Ee, "clearInterval", (t) => {
1450
+ n(ke, "clearInterval", (t) => {
1424
1451
  clearInterval(t);
1425
1452
  }), /**
1426
1453
  * 防抖(指定时间内只触发一次)
1427
1454
  */
1428
- n(Ee, "debounce", (t, e) => {
1455
+ n(ke, "debounce", (t, e) => {
1429
1456
  let s = null;
1430
1457
  return (l) => {
1431
1458
  s && clearTimeout(s), s = setTimeout(t, e, l);
@@ -1433,7 +1460,7 @@ n(Ee, "debounce", (t, e) => {
1433
1460
  }), /**
1434
1461
  * 节流:https://segmentfault.com/a/1190000018428170
1435
1462
  */
1436
- n(Ee, "throttle", (t, e) => {
1463
+ n(ke, "throttle", (t, e) => {
1437
1464
  let s = !0;
1438
1465
  return (l) => {
1439
1466
  if (!s)
@@ -1443,7 +1470,7 @@ n(Ee, "throttle", (t, e) => {
1443
1470
  }, e, l);
1444
1471
  };
1445
1472
  });
1446
- class Rt {
1473
+ class jt {
1447
1474
  constructor() {
1448
1475
  n(this, "value");
1449
1476
  }
@@ -1459,7 +1486,7 @@ n(A, "getTimestamp", (t = null) => (t ? new Date(t) : /* @__PURE__ */ new Date()
1459
1486
  n(A, "getTime", (t = null) => t ? new Date(t) : /* @__PURE__ */ new Date()), /**
1460
1487
  * 格式化时间
1461
1488
  */
1462
- n(A, "format", (t, e) => ee(t).format(e)), /**
1489
+ n(A, "format", (t, e) => H(t).format(e)), /**
1463
1490
  * 获取当前日期时间的字符串
1464
1491
  */
1465
1492
  n(A, "getDateTimeString", () => A.formatSecondTime(/* @__PURE__ */ new Date())), /**
@@ -1471,31 +1498,31 @@ n(A, "getDateString", () => A.formatDate(/* @__PURE__ */ new Date())), /**
1471
1498
  n(A, "getTimeString", () => A.formatTime(/* @__PURE__ */ new Date())), /**
1472
1499
  * 对时间值进行时间格式化
1473
1500
  */
1474
- n(A, "formatSecondTime", (t) => ee(t).format("YYYY-MM-DD HH:mm:ss")), /**
1501
+ n(A, "formatSecondTime", (t) => H(t).format("YYYY-MM-DD HH:mm:ss")), /**
1475
1502
  * 对时间值进行时间格式化
1476
1503
  */
1477
- n(A, "formatMillisecondTime", (t) => t ? ee(t).format("YYYY-MM-DD HH:mm:ss SSS") : null), /**
1504
+ n(A, "formatMillisecondTime", (t) => t ? H(t).format("YYYY-MM-DD HH:mm:ss SSS") : null), /**
1478
1505
  * 格式化成24小时时间格式
1479
1506
  */
1480
- n(A, "formatTime", (t) => t ? ee(t).format("HH:mm:ss SSS") : null), /**
1507
+ n(A, "formatTime", (t) => t ? H(t).format("HH:mm:ss SSS") : null), /**
1481
1508
  * 对时间值进行日期格式化
1482
1509
  */
1483
- n(A, "formatDate", (t) => t ? ee(t).format("YYYY-MM-DD") : null), /**
1510
+ n(A, "formatDate", (t) => t ? H(t).format("YYYY-MM-DD") : null), /**
1484
1511
  * 添加天数
1485
1512
  */
1486
- n(A, "addDays", (t, e) => t ? ee(t).add(e, "days").toDate() : null), /**
1513
+ n(A, "addDays", (t, e) => t ? H(t).add(e, "days").toDate() : null), /**
1487
1514
  * 添加月份
1488
1515
  */
1489
- n(A, "addMonths", (t, e) => t ? ee(t).add(e, "months").toDate() : null), /**
1516
+ n(A, "addMonths", (t, e) => t ? H(t).add(e, "months").toDate() : null), /**
1490
1517
  * 添加小时
1491
1518
  */
1492
- n(A, "addHours", (t, e) => t ? ee(t).add(e, "hours").toDate() : null), /**
1519
+ n(A, "addHours", (t, e) => t ? H(t).add(e, "hours").toDate() : null), /**
1493
1520
  * 判断指定时间是否是周末
1494
1521
  */
1495
1522
  n(A, "isWeekend", (t) => {
1496
1523
  if (!t)
1497
1524
  return !1;
1498
- let e = ee(t).format("d");
1525
+ let e = H(t).format("d");
1499
1526
  return e == "6" || e == "0";
1500
1527
  }), /**
1501
1528
  * 把中国时间,转换为当地时间
@@ -1504,7 +1531,7 @@ n(A, "localeTime", (t) => {
1504
1531
  if (!t)
1505
1532
  return null;
1506
1533
  let s = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
1507
- return ee(t).add(s, "minutes").toDate();
1534
+ return H(t).add(s, "minutes").toDate();
1508
1535
  });
1509
1536
  let te = A;
1510
1537
  const k = class k {
@@ -1530,7 +1557,7 @@ n(k, "getById", (t, e, s, l) => {
1530
1557
  * 树节点
1531
1558
  */
1532
1559
  n(k, "getByIds", (t, e, s, l) => {
1533
- let r = ue.distinct(t, (a) => a), i = [];
1560
+ let r = oe.distinct(t, (a) => a), i = [];
1534
1561
  return r.forEach((a) => {
1535
1562
  let o = k.getById(a, e, s, l);
1536
1563
  i.push(o);
@@ -1568,19 +1595,19 @@ n(k, "getParentById", (t, e, s, l) => {
1568
1595
  */
1569
1596
  n(k, "getParentsById", (t, e, s, l, r = !1) => {
1570
1597
  let i = [];
1571
- return s == null || tt(t, e, s, l, i, r), i;
1598
+ return s == null || et(t, e, s, l, i, r), i;
1572
1599
  }), /**
1573
1600
  * 获取当前节点的所有孩子节点的集合
1574
1601
  */
1575
1602
  n(k, "getChildrenById", (t, e, s, l, r = !1) => {
1576
1603
  let i = k.getById(t, e, s, l), a = [];
1577
- return r && a.push(i), Ue(i, l, a), a;
1604
+ return r && a.push(i), Be(i, l, a), a;
1578
1605
  }), /**
1579
1606
  * 获取当前节点的所有孩子节点的集合
1580
1607
  */
1581
1608
  n(k, "getChildren", (t, e, s = !1) => {
1582
1609
  let l = [];
1583
- return s && l.push(t), Ue(t, e, l), l;
1610
+ return s && l.push(t), Be(t, e, l), l;
1584
1611
  }), /**
1585
1612
  * 搜索指定文本的树结构
1586
1613
  */
@@ -1588,13 +1615,13 @@ n(k, "searchTree", (t, e, s, l) => {
1588
1615
  let r = [];
1589
1616
  if (!e)
1590
1617
  return r;
1591
- let i = t ? t.toUpperCase() : "", a = U.isString(l) ? [l] : l;
1618
+ let i = t ? t.toUpperCase() : "", a = F.isString(l) ? [l] : l;
1592
1619
  for (let o of e) {
1593
1620
  let c = !1, h = k.getChildren(o, s, !0);
1594
1621
  for (let d of h) {
1595
1622
  for (let p of a) {
1596
- let f = d[p];
1597
- if ((f ? f.toUpperCase() : "").indexOf(i) > -1) {
1623
+ let g = d[p];
1624
+ if ((g ? g.toUpperCase() : "").indexOf(i) > -1) {
1598
1625
  c = !0;
1599
1626
  break;
1600
1627
  }
@@ -1614,11 +1641,11 @@ n(k, "searchTree", (t, e, s, l) => {
1614
1641
  n(k, "removeById", (t, e, s, l) => {
1615
1642
  let r = k.getById(t, e, s, l), i = k.getParentsById(t, e, s, l);
1616
1643
  if (i.length == 0) {
1617
- ue.remove(s, r);
1644
+ oe.remove(s, r);
1618
1645
  return;
1619
1646
  }
1620
1647
  let a = i[i.length - 1];
1621
- ue.remove(a[l], r);
1648
+ oe.remove(a[l], r);
1622
1649
  }), /**
1623
1650
  * 获取树结构扁平化后的节点信息
1624
1651
  */
@@ -1648,40 +1675,40 @@ n(k, "map", (t, e, s, l) => {
1648
1675
  }
1649
1676
  return r;
1650
1677
  });
1651
- let Oe = k;
1652
- function tt(u, t, e, s, l, r) {
1678
+ let De = k;
1679
+ function et(u, t, e, s, l, r) {
1653
1680
  for (let i = 0; i < e.length; i++) {
1654
1681
  let a = e[i];
1655
1682
  if (a[t] == u) {
1656
1683
  r && l.push(a);
1657
1684
  break;
1658
1685
  } else
1659
- Oe.getById(u, t, a[s], s) != null && (l.push(a), tt(u, t, a[s], s, l, r));
1686
+ De.getById(u, t, a[s], s) != null && (l.push(a), et(u, t, a[s], s, l, r));
1660
1687
  }
1661
1688
  return l;
1662
1689
  }
1663
- function Ue(u, t, e) {
1690
+ function Be(u, t, e) {
1664
1691
  let s = u[t];
1665
1692
  if (!s || s.length == 0)
1666
1693
  return e;
1667
1694
  for (let l = 0; l < s.length; l++) {
1668
1695
  let r = s[l];
1669
- e.push(r), Ue(r, t, e);
1696
+ e.push(r), Be(r, t, e);
1670
1697
  }
1671
1698
  return e;
1672
1699
  }
1673
- class Je {
1700
+ class We {
1674
1701
  }
1675
1702
  /**
1676
1703
  * 判断指定元素滚动条位置,是否到了页面底部
1677
1704
  */
1678
- n(Je, "isBottom", (t) => {
1705
+ n(We, "isBottom", (t) => {
1679
1706
  let e = document.querySelector(t);
1680
1707
  return e ? e.scrollTop + e.clientHeight == e.scrollHeight : !1;
1681
1708
  }), /**
1682
1709
  * 滚动指定元素的滚动条到页面底部
1683
1710
  */
1684
- n(Je, "scrollToBottom", (t) => {
1711
+ n(We, "scrollToBottom", (t) => {
1685
1712
  let e = document.querySelector(t);
1686
1713
  if (!e)
1687
1714
  return;
@@ -1696,13 +1723,13 @@ class _t {
1696
1723
  n(this, "beautify", !1);
1697
1724
  }
1698
1725
  }
1699
- class M {
1726
+ class _ {
1700
1727
  //#region 序列化
1701
1728
  /**
1702
1729
  * 对非字符串进行序列化
1703
1730
  */
1704
1731
  static serializeWithoutString(t) {
1705
- return typeof t == "string" ? t : M.serialize(t, !0);
1732
+ return typeof t == "string" ? t : _.serialize(t, !0);
1706
1733
  }
1707
1734
  /**
1708
1735
  * 把对象格式化为Json字符串
@@ -1713,7 +1740,7 @@ class M {
1713
1740
  e == null && (e = new _t());
1714
1741
  let l = (typeof e == "boolean" ? e : e.beautify) ? 2 : null, r;
1715
1742
  if (typeof t == "string") {
1716
- let a = M.deserialize(t);
1743
+ let a = _.deserialize(t);
1717
1744
  if (a == null)
1718
1745
  return t;
1719
1746
  r = a;
@@ -1774,7 +1801,7 @@ class M {
1774
1801
  * 把json字符串合并到目标对象上
1775
1802
  */
1776
1803
  static mergeTo(t, e) {
1777
- if (W.isNullOrEmpty(e) || t == null)
1804
+ if (M.isNullOrEmpty(e) || t == null)
1778
1805
  return;
1779
1806
  let s = JSON.parse(e), l = Object.keys(s);
1780
1807
  for (let r of l)
@@ -1823,7 +1850,7 @@ class M {
1823
1850
  }
1824
1851
  //#endregion
1825
1852
  }
1826
- class st {
1853
+ class tt {
1827
1854
  /**
1828
1855
  * 获取浏览器默认语言
1829
1856
  */
@@ -1844,10 +1871,10 @@ class Bt {
1844
1871
  * 签名字典
1845
1872
  */
1846
1873
  static signDictionary(t, e = !0) {
1847
- return this.clean(t), K.serialize(t, e);
1874
+ return this.clean(t), W.serialize(t, e);
1848
1875
  }
1849
1876
  }
1850
- class B {
1877
+ class P {
1851
1878
  constructor() {
1852
1879
  //#region 属性
1853
1880
  /**
@@ -1924,24 +1951,24 @@ class B {
1924
1951
  }
1925
1952
  //#endregion
1926
1953
  }
1927
- class je {
1954
+ class Re {
1928
1955
  constructor() {
1929
1956
  n(this, "type");
1930
1957
  }
1931
1958
  }
1932
- class Pt extends je {
1959
+ class Pt extends Re {
1933
1960
  constructor() {
1934
1961
  super(...arguments);
1935
1962
  n(this, "type", "Json");
1936
1963
  }
1937
1964
  insert(e) {
1938
- return M.serialize(e.rows, !0);
1965
+ return _.serialize(e.rows, !0);
1939
1966
  }
1940
1967
  update(e) {
1941
- return M.serialize(e.rows, !0);
1968
+ return _.serialize(e.rows, !0);
1942
1969
  }
1943
1970
  }
1944
- class Ut extends je {
1971
+ class Ut extends Re {
1945
1972
  constructor() {
1946
1973
  super(...arguments);
1947
1974
  n(this, "type", "Mongo");
@@ -1949,7 +1976,7 @@ class Ut extends je {
1949
1976
  insert(e) {
1950
1977
  let { name: s, columns: l, rows: r } = e, i = "";
1951
1978
  for (let a = 0; a < r.length; a++) {
1952
- let o = r[a], c = M.serialize(o, !0);
1979
+ let o = r[a], c = _.serialize(o, !0);
1953
1980
  i += `db.${s}.insert(${c})`, a != r.length - 1 && (i += `\r
1954
1981
  `);
1955
1982
  }
@@ -1958,19 +1985,19 @@ class Ut extends je {
1958
1985
  update(e) {
1959
1986
  let { name: s, columns: l, rows: r } = e, i = "", a = l.filter((o) => o.key).map((o) => o.name);
1960
1987
  for (let o = 0; o < r.length; o++) {
1961
- let c = r[o], h = Y.extract(c, a), d = M.serialize(h, !0), p = M.serialize(c, !0);
1988
+ let c = r[o], h = X.extract(c, a), d = _.serialize(h, !0), p = _.serialize(c, !0);
1962
1989
  i += `db.${s}.update(${d},{$set:${p})`, o != r.length - 1 && (i += `\r
1963
1990
  `);
1964
1991
  }
1965
1992
  return i;
1966
1993
  }
1967
1994
  }
1968
- class Ve {
1995
+ class Me {
1969
1996
  constructor() {
1970
1997
  n(this, "type");
1971
1998
  }
1972
1999
  }
1973
- const he = class he extends Ve {
2000
+ const ce = class ce extends Me {
1974
2001
  constructor() {
1975
2002
  super(...arguments);
1976
2003
  //#region 属性
@@ -1989,7 +2016,7 @@ const he = class he extends Ve {
1989
2016
  let r = indexedDB.open(e);
1990
2017
  r.onsuccess = (i) => {
1991
2018
  let a = i.target.result;
1992
- he.version = a.version, this.objectStoreNames = a.objectStoreNames, s(he.version);
2019
+ ce.version = a.version, this.objectStoreNames = a.objectStoreNames, s(ce.version);
1993
2020
  }, r.onerror = (i) => {
1994
2021
  l(i.target);
1995
2022
  };
@@ -2000,7 +2027,7 @@ const he = class he extends Ve {
2000
2027
  */
2001
2028
  async createAsync(e) {
2002
2029
  return this.store = e, this.objectStoreNames.contains(e) ? Promise.resolve(!0) : new Promise((s, l) => {
2003
- let r = indexedDB.open(this.database, ++he.version);
2030
+ let r = indexedDB.open(this.database, ++ce.version);
2004
2031
  r.onupgradeneeded = (i) => {
2005
2032
  let a = i.target.result;
2006
2033
  a.objectStoreNames.contains(this.store) || a.createObjectStore(this.store);
@@ -2016,7 +2043,7 @@ const he = class he extends Ve {
2016
2043
  */
2017
2044
  async openDbAsync() {
2018
2045
  return new Promise((e, s) => {
2019
- let l = indexedDB.open(this.database, he.version);
2046
+ let l = indexedDB.open(this.database, ce.version);
2020
2047
  l.onsuccess = (r) => {
2021
2048
  let i = r.target.result;
2022
2049
  e(i);
@@ -2102,7 +2129,7 @@ const he = class he extends Ve {
2102
2129
  }, a.onerror = (d) => {
2103
2130
  i(d);
2104
2131
  };
2105
- let o = Y.clone(s), h = a.objectStore(this.store).put(o, e);
2132
+ let o = X.clone(s), h = a.objectStore(this.store).put(o, e);
2106
2133
  h.onsuccess = (d) => {
2107
2134
  let p = d.target.result;
2108
2135
  r(p);
@@ -2158,9 +2185,9 @@ const he = class he extends Ve {
2158
2185
  /**
2159
2186
  * 静态版本,保证所有数据库实例拿到最新版本信息
2160
2187
  */
2161
- n(he, "version", null);
2162
- let Fe = he;
2163
- class Ft extends Ve {
2188
+ n(ce, "version", null);
2189
+ let Pe = ce;
2190
+ class Ft extends Me {
2164
2191
  constructor() {
2165
2192
  super(...arguments);
2166
2193
  //#region 属性
@@ -2231,7 +2258,7 @@ class Ft extends Ve {
2231
2258
  }
2232
2259
  //#endregion
2233
2260
  }
2234
- class Mt extends Ve {
2261
+ class Mt extends Me {
2235
2262
  constructor() {
2236
2263
  super(...arguments);
2237
2264
  n(this, "type", "Cookie");
@@ -2268,13 +2295,13 @@ class Mt extends Ve {
2268
2295
  dispose() {
2269
2296
  }
2270
2297
  }
2271
- class Nt extends B {
2298
+ class qt extends P {
2272
2299
  constructor() {
2273
2300
  super(...arguments);
2274
2301
  n(this, "_default");
2275
2302
  }
2276
2303
  get instances() {
2277
- return [new Fe(), new Ft(), new Mt()];
2304
+ return [new Pe(), new Ft(), new Mt()];
2278
2305
  }
2279
2306
  /**
2280
2307
  * 获取指定类型的提供程序
@@ -2296,7 +2323,7 @@ class Nt extends B {
2296
2323
  return this.create("Storage");
2297
2324
  }
2298
2325
  }
2299
- class Xe {
2326
+ class Qe {
2300
2327
  /**
2301
2328
  * 获取实际SQL字段名称
2302
2329
  */
@@ -2310,29 +2337,29 @@ class Xe {
2310
2337
  if (t == null)
2311
2338
  return "null";
2312
2339
  let e = typeof t;
2313
- return e == "number" || e == "boolean" ? t : e == "object" || e == "string" ? `'${(e == "object" ? M.serialize(t) : t).replace(/'/g, "''")}'` : t;
2340
+ return e == "number" || e == "boolean" ? t : e == "object" || e == "string" ? `'${(e == "object" ? _.serialize(t) : t).replace(/'/g, "''")}'` : t;
2314
2341
  }
2315
2342
  }
2316
- class Me extends je {
2343
+ class Ue extends Re {
2317
2344
  constructor() {
2318
2345
  super(...arguments);
2319
2346
  n(this, "type", "Sql");
2320
2347
  }
2321
2348
  insert(e) {
2322
- let { name: s, columns: l, rows: r } = e, i = e.getIdentity(), a = "", h = l.filter((d) => !d.identity).map((d) => Xe.getSqlName(d.name)).join(", ");
2349
+ let { name: s, columns: l, rows: r } = e, i = e.getIdentity(), a = "", h = l.filter((d) => !d.identity).map((d) => Qe.getSqlName(d.name)).join(", ");
2323
2350
  for (let d = 0; d < r.length; d++) {
2324
2351
  let p = r[d];
2325
2352
  a += `INSERT INTO ${s}\r
2326
2353
  `, a += `(${h})\r
2327
2354
  `, a += `VALUES\r
2328
2355
  `, a += "(";
2329
- let f = Object.keys(p);
2330
- for (let b = 0; b < f.length; b++) {
2331
- let N = f[b];
2356
+ let g = Object.keys(p);
2357
+ for (let x = 0; x < g.length; x++) {
2358
+ let N = g[x];
2332
2359
  if (i != null && i.name == N)
2333
2360
  continue;
2334
2361
  let V = p[N];
2335
- a += `${Xe.getValue(V)}`, b != f.length - 1 && (a += ", ");
2362
+ a += `${Qe.getValue(V)}`, x != g.length - 1 && (a += ", ");
2336
2363
  }
2337
2364
  a += ")", d != r.length - 1 && (a += `\r
2338
2365
  \r
@@ -2344,24 +2371,24 @@ class Me extends je {
2344
2371
  return "";
2345
2372
  }
2346
2373
  }
2347
- class Vt extends je {
2374
+ class Nt extends Re {
2348
2375
  constructor() {
2349
2376
  super(...arguments);
2350
2377
  n(this, "type", "MySql");
2351
2378
  }
2352
2379
  insert(e) {
2353
- return new Me().insert(e);
2380
+ return new Ue().insert(e);
2354
2381
  }
2355
2382
  update(e) {
2356
- return new Me().update(e);
2383
+ return new Ue().update(e);
2357
2384
  }
2358
2385
  }
2359
- class qt extends B {
2386
+ class Vt extends P {
2360
2387
  open() {
2361
- super.open(), super.instances = [new Pt(), new Ut(), new Vt(), new Me()];
2388
+ super.open(), super.instances = [new Pt(), new Ut(), new Nt(), new Ue()];
2362
2389
  }
2363
2390
  }
2364
- class tr {
2391
+ class Hl {
2365
2392
  constructor() {
2366
2393
  /**
2367
2394
  * 表名
@@ -2383,7 +2410,7 @@ class tr {
2383
2410
  return this.columns == null || this.columns.length == 0 ? null : this.columns.find((e) => e.identity);
2384
2411
  }
2385
2412
  }
2386
- class lt {
2413
+ class st {
2387
2414
  constructor() {
2388
2415
  /**
2389
2416
  * 任务实例,用于控制并发
@@ -2400,7 +2427,7 @@ class lt {
2400
2427
  let c = new XMLHttpRequest();
2401
2428
  c.open("GET", r, !1), c.onreadystatechange = () => {
2402
2429
  if (c.readyState == 4 && c.status == 200) {
2403
- let h = R.createEmptyByUrl(r);
2430
+ let h = j.createEmptyByUrl(r);
2404
2431
  h.appendChild(document.createTextNode(c.responseText)), document.head.appendChild(h), a();
2405
2432
  }
2406
2433
  }, c.onerror = () => {
@@ -2415,11 +2442,11 @@ class lt {
2415
2442
  * 通过注入DOM标签异步加载脚本或样式表,已防重
2416
2443
  */
2417
2444
  n(this, "loadResourceAsync", async (t) => {
2418
- let e = W.getArray(t), s = [];
2445
+ let e = M.getArray(t), s = [];
2419
2446
  for (let r of e) {
2420
2447
  let i = new Promise((a, o) => {
2421
- let c = R.getByUrl(r);
2422
- c != null ? a(c) : (c = R.createByUrl(r), document.head.appendChild(c), c.onload = (h) => {
2448
+ let c = j.getByUrl(r);
2449
+ c != null ? a(c) : (c = j.createByUrl(r), document.head.appendChild(c), c.onload = (h) => {
2423
2450
  a(c);
2424
2451
  }, c.onerror = (h) => {
2425
2452
  o(h);
@@ -2435,7 +2462,14 @@ class lt {
2435
2462
  //#endregion
2436
2463
  //#region 开启
2437
2464
  async open(t) {
2438
- this.task = await E.task.create("Memory"), this.task.taskLimit = 1;
2465
+ this.task = await C.task.create("Memory"), this.task.taskLimit = 1;
2466
+ }
2467
+ async getECharts(t) {
2468
+ let e = window.echarts;
2469
+ if (e)
2470
+ return e;
2471
+ let s = ["/dist/echarts.min.js"];
2472
+ return await this.loadFilesAsync(t, s), e = window.echarts, e;
2439
2473
  }
2440
2474
  async getMonaco(t = null) {
2441
2475
  let e = window.monaco;
@@ -2475,12 +2509,12 @@ class lt {
2475
2509
  await this.loadResourceAsync(s);
2476
2510
  }
2477
2511
  async loadAsync(t) {
2478
- let e = W.getArray(t);
2512
+ let e = M.getArray(t);
2479
2513
  return await this.loadResourceAsync(e);
2480
2514
  }
2481
2515
  //#endregion
2482
2516
  }
2483
- class zt extends lt {
2517
+ class zt extends st {
2484
2518
  constructor() {
2485
2519
  super(...arguments);
2486
2520
  //#region 属性
@@ -2489,35 +2523,34 @@ class zt extends lt {
2489
2523
  //#endregion
2490
2524
  async getCrypto() {
2491
2525
  let e = ["/crypto-js.js"];
2492
- return await super.loadFilesAsync("/assets/crypto-js", e), window.CryptoJS;
2526
+ return await super.loadFilesAsync("/assets/crypto-js@4.2.0", e), window.CryptoJS;
2493
2527
  }
2494
2528
  async getECharts() {
2495
- let e = ["/echarts.min.js"];
2496
- return await super.loadFilesAsync("/assets/echarts", e), window.echarts;
2529
+ return await super.getECharts("/assets/echarts@5.5.1");
2497
2530
  }
2498
2531
  async getElementPlus() {
2499
- let e = ["/index.css", "/theme-chalk/dark/css-vars.css"];
2500
- await super.loadFilesAsync("/assets/element-plus", e);
2532
+ let e = ["/dist/index.css", "/theme-chalk/dark/css-vars.css"];
2533
+ await super.loadFilesAsync("/assets/element-plus@2.7.8", e);
2501
2534
  }
2502
2535
  async getFortAwesome() {
2503
2536
  let e = ["/css/all.min.css"];
2504
- await super.loadFilesAsync("/assets/@fortawesome/fontawesome-free", e);
2537
+ await super.loadFilesAsync("/assets/@fortawesome@6.5.2/fontawesome-free", e);
2505
2538
  }
2506
2539
  async getMonaco() {
2507
- return await super.getMonaco("/assets/monaco-editor/min/vs");
2540
+ return await super.getMonaco("/assets/monaco-editor@0.50.0/min/vs");
2508
2541
  }
2509
2542
  async getQuill() {
2510
- return await super.getQuill("/assets/quill");
2543
+ return await super.getQuill("/assets/quill@2.0.2/dist");
2511
2544
  }
2512
2545
  async getWeiXin() {
2513
2546
  return Promise.resolve(void 0);
2514
2547
  }
2515
2548
  async getXlsx() {
2516
- let e = ["/xlsx.min.js"];
2517
- return await super.loadFilesAsync("/assets/xlsx-js-style", e), window.XLSX;
2549
+ let e = ["/dist/xlsx.min.js"];
2550
+ return await super.loadFilesAsync("/assets/xlsx-js-style@1.2.0", e), window.XLSX;
2518
2551
  }
2519
2552
  }
2520
- class Kt extends lt {
2553
+ class Kt extends st {
2521
2554
  constructor() {
2522
2555
  super(...arguments);
2523
2556
  //#region 属性
@@ -2531,8 +2564,7 @@ class Kt extends lt {
2531
2564
  return await super.loadFilesAsync(`${this.jdCdn}/crypto-js@4.2.0`, e), window.CryptoJS;
2532
2565
  }
2533
2566
  async getECharts() {
2534
- let e = ["/dist/echarts.min.js"];
2535
- return await super.loadFilesAsync(`${this.jdCdn}/echarts@5.5.1`, e), window.echarts;
2567
+ return await super.getECharts(`${this.jdCdn}/echarts@5.5.1`);
2536
2568
  }
2537
2569
  async getElementPlus() {
2538
2570
  let e = [
@@ -2565,7 +2597,7 @@ class Kt extends lt {
2565
2597
  return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, e), window.XLSX;
2566
2598
  }
2567
2599
  }
2568
- class Wt extends B {
2600
+ class Wt extends P {
2569
2601
  open() {
2570
2602
  super.open(), super.instances = [new zt(), new Kt()];
2571
2603
  }
@@ -2600,7 +2632,7 @@ class Jt extends Qt {
2600
2632
  //#endregion
2601
2633
  //#region 开启
2602
2634
  async open(e) {
2603
- this.crypto = await me.getCrypto();
2635
+ this.crypto = await fe.getCrypto();
2604
2636
  }
2605
2637
  //#endregion
2606
2638
  encodeString(e) {
@@ -2612,7 +2644,7 @@ class Jt extends Qt {
2612
2644
  return this.crypto.enc.Utf8.stringify(s);
2613
2645
  }
2614
2646
  }
2615
- class Xt extends B {
2647
+ class Xt extends P {
2616
2648
  get instances() {
2617
2649
  return [new Jt()];
2618
2650
  }
@@ -2645,7 +2677,7 @@ class Gt extends Yt {
2645
2677
  //#endregion
2646
2678
  //#region 开启
2647
2679
  async open(e) {
2648
- this.xlsx = await me.getXlsx();
2680
+ this.xlsx = await fe.getXlsx();
2649
2681
  }
2650
2682
  //#endregion
2651
2683
  export(e, s) {
@@ -2659,17 +2691,17 @@ class Gt extends Yt {
2659
2691
  i.push(d);
2660
2692
  }), r.push(i), e.length > 0)
2661
2693
  for (let d = 0; d < e.length; d++) {
2662
- let p = e[d], f = [];
2663
- Object.keys(p).forEach((b) => {
2664
- f.push(p[b]);
2665
- }), r.push(f);
2694
+ let p = e[d], g = [];
2695
+ Object.keys(p).forEach((x) => {
2696
+ g.push(p[x]);
2697
+ }), r.push(g);
2666
2698
  }
2667
2699
  let a = this.xlsx.utils.book_new(), o = this.xlsx.utils.json_to_sheet(r, { skipHeader: !0 });
2668
2700
  this.xlsx.utils.book_append_sheet(a, o, "abc");
2669
2701
  let c = 65;
2670
2702
  for (let d = 0; d < l.length; d++) {
2671
- let f = `${String.fromCharCode(c + d)}1`;
2672
- o[f].s = {
2703
+ let g = `${String.fromCharCode(c + d)}1`;
2704
+ o[g].s = {
2673
2705
  alignment: { horizontal: "center" },
2674
2706
  font: { bold: !0, color: { rgb: "000000" } },
2675
2707
  fill: { fgColor: { rgb: "409eff" } }
@@ -2677,12 +2709,12 @@ class Gt extends Yt {
2677
2709
  }
2678
2710
  let h = [];
2679
2711
  l.forEach((d) => {
2680
- let p = e[0][d], f = { wpx: 50 };
2681
- typeof p == "string" && (f.wpx = 100), h.push(f);
2712
+ let p = e[0][d], g = { wpx: 50 };
2713
+ typeof p == "string" && (g.wpx = 100), h.push(g);
2682
2714
  }), o["!cols"] = h, this.xlsx.writeFile(a, s);
2683
2715
  }
2684
2716
  }
2685
- class Zt extends B {
2717
+ class Zt extends P {
2686
2718
  get instances() {
2687
2719
  return [new Gt()];
2688
2720
  }
@@ -2701,7 +2733,7 @@ class Ht {
2701
2733
  }
2702
2734
  class es extends Ht {
2703
2735
  }
2704
- class ts extends B {
2736
+ class ts extends P {
2705
2737
  get instances() {
2706
2738
  return [new es()];
2707
2739
  }
@@ -2757,7 +2789,7 @@ class rs {
2757
2789
  copy(t, e, s) {
2758
2790
  }
2759
2791
  }
2760
- class ns extends B {
2792
+ class ns extends P {
2761
2793
  get instances() {
2762
2794
  return [new ss(), new ls(), new rs()];
2763
2795
  }
@@ -2769,12 +2801,12 @@ class ns extends B {
2769
2801
  return s.open(null), s;
2770
2802
  }
2771
2803
  }
2772
- class rt {
2804
+ class lt {
2773
2805
  constructor() {
2774
2806
  n(this, "type");
2775
2807
  }
2776
2808
  }
2777
- class is extends rt {
2809
+ class is extends lt {
2778
2810
  constructor() {
2779
2811
  super(...arguments);
2780
2812
  //#region 属性
@@ -2790,7 +2822,7 @@ class is extends rt {
2790
2822
  return Array.from(new Uint8Array(r)).map((o) => o.toString(16).padStart(2, "0")).join("");
2791
2823
  }
2792
2824
  }
2793
- class as extends rt {
2825
+ class as extends lt {
2794
2826
  constructor() {
2795
2827
  super(...arguments);
2796
2828
  //#region 属性
@@ -2800,7 +2832,7 @@ class as extends rt {
2800
2832
  //#endregion
2801
2833
  //#region 开启
2802
2834
  async open(e) {
2803
- this.crypto = await me.getCrypto();
2835
+ this.crypto = await fe.getCrypto();
2804
2836
  }
2805
2837
  //#endregion
2806
2838
  compute(e) {
@@ -2808,7 +2840,7 @@ class as extends rt {
2808
2840
  return Promise.resolve(s);
2809
2841
  }
2810
2842
  }
2811
- class os extends B {
2843
+ class os extends P {
2812
2844
  get instances() {
2813
2845
  return [new is(), new as()];
2814
2846
  }
@@ -2823,7 +2855,7 @@ class os extends B {
2823
2855
  return await this.createIfAbsent("Md5");
2824
2856
  }
2825
2857
  }
2826
- class nt {
2858
+ class rt {
2827
2859
  constructor() {
2828
2860
  /**
2829
2861
  * 请求唯一标识
@@ -2857,7 +2889,7 @@ class nt {
2857
2889
  getHeader(t) {
2858
2890
  if (this.headers == null)
2859
2891
  return null;
2860
- let e = Y.getKey(this.headers, t);
2892
+ let e = X.getKey(this.headers, t);
2861
2893
  return e ? this.headers[e] : null;
2862
2894
  }
2863
2895
  /**
@@ -2881,11 +2913,11 @@ class nt {
2881
2913
  * 不能放在getRequest中处理,因为外部会直接调用当前send方法,而不走getRequest
2882
2914
  */
2883
2915
  prepare() {
2884
- this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && this.contentType == "application/json" && (this.body = M.serializeWithoutString(this.data)), this.data == null && this.body != null && this.contentType == "application/json" && (this.data = M.deserialize(this.body)), this.contentType != null && this.addHeader("content-type", this.contentType);
2916
+ this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && M.startWith(this.contentType, "application/json") && (this.body = _.serializeWithoutString(this.data)), this.data == null && this.body != null && M.startWith(this.contentType, "application/json") && (this.data = _.deserialize(this.body)), this.contentType != null && this.addHeader("content-type", this.contentType);
2885
2917
  }
2886
2918
  //#endregion
2887
2919
  }
2888
- class it extends nt {
2920
+ class nt extends rt {
2889
2921
  constructor() {
2890
2922
  super();
2891
2923
  /**
@@ -2900,52 +2932,60 @@ class it extends nt {
2900
2932
  * 实际请求地址
2901
2933
  */
2902
2934
  n(this, "url");
2903
- this.id = W.getUniqueId(8);
2935
+ this.id = M.getUniqueId(8);
2904
2936
  }
2905
2937
  }
2906
2938
  class qe {
2907
2939
  constructor() {
2908
2940
  //#region 属性
2909
2941
  n(this, "type");
2910
- n(this, "onRequest");
2911
- n(this, "onResponse");
2942
+ /**
2943
+ * 默认请求器
2944
+ */
2945
+ n(this, "http");
2946
+ //#endregion
2947
+ n(this, "get", async (t, e) => (await this.sendGet(t, e)).data);
2948
+ n(this, "sendGet", async (t, e) => {
2949
+ let s = W.getUrl(t, e), l = this.getRequest("GET", "application/json", s);
2950
+ return await this.send(l);
2951
+ });
2952
+ n(this, "post", async (t, e) => (await this.sendPost(t, e)).data);
2953
+ n(this, "sendPost", async (t, e) => {
2954
+ let s = this.getRequest("POST", "application/json", t, e);
2955
+ return await this.send(s);
2956
+ });
2957
+ n(this, "patch", async (t) => (await this.sendPatch(t)).data);
2958
+ n(this, "sendPatch", async (t, e) => {
2959
+ let s = this.getRequest("PATCH", "application/json", t);
2960
+ return await this.send(s);
2961
+ });
2962
+ /**
2963
+ * 获取请求消息
2964
+ */
2965
+ n(this, "getRequest", (t, e, s, l = null) => {
2966
+ let r = new nt();
2967
+ return r.method = t, r.contentType = e, r.path = s, r.body = _.serializeWithoutString(l), r;
2968
+ });
2912
2969
  }
2913
2970
  //#endregion
2914
2971
  //#region 开启
2915
2972
  async open(t) {
2916
- M.mergeTo(this, t);
2917
- }
2918
- //#endregion
2919
- async get(t, e) {
2920
- return (await this.sendGet(t, e)).data;
2973
+ _.mergeTo(this, t);
2921
2974
  }
2922
- async sendGet(t, e) {
2923
- let s = K.getUrl(t, e), l = this.getRequest("GET", "application/json", s);
2924
- return await this.send(l);
2975
+ get onRequest() {
2976
+ return this.http == null ? null : this.http.onRequest;
2925
2977
  }
2926
- async post(t, e) {
2927
- return (await this.sendPost(t, e)).data;
2978
+ set onRequest(t) {
2979
+ this.http != null && (this.http.onRequest = t);
2928
2980
  }
2929
- async sendPost(t, e) {
2930
- let s = this.getRequest("POST", "application/json", t, e);
2931
- return await this.send(s);
2981
+ get onResponse() {
2982
+ return this.http == null ? null : this.http.onResponse;
2932
2983
  }
2933
- async patch(t) {
2934
- return (await this.sendPatch(t)).data;
2935
- }
2936
- async sendPatch(t, e) {
2937
- let s = this.getRequest("PATCH", "application/json", t);
2938
- return await this.send(s);
2939
- }
2940
- /**
2941
- * 获取请求消息
2942
- */
2943
- getRequest(t, e, s, l = null) {
2944
- let r = new it();
2945
- return r.method = t, r.contentType = e, r.path = s, r.body = M.serializeWithoutString(l), r;
2984
+ set onResponse(t) {
2985
+ this.http != null && (this.http.onResponse = t);
2946
2986
  }
2947
2987
  }
2948
- class Ye extends nt {
2988
+ class Je extends rt {
2949
2989
  constructor() {
2950
2990
  super(...arguments);
2951
2991
  /**
@@ -2973,11 +3013,29 @@ class Ye extends nt {
2973
3013
  class us extends qe {
2974
3014
  constructor() {
2975
3015
  super(...arguments);
3016
+ //#region 属性
2976
3017
  n(this, "type", "Default");
2977
3018
  n(this, "baseUrl");
3019
+ n(this, "_onRequest");
3020
+ n(this, "_onResponse");
3021
+ }
3022
+ //#endregion
3023
+ //#region 开启
3024
+ get onRequest() {
3025
+ return this._onRequest;
3026
+ }
3027
+ set onRequest(e) {
3028
+ this._onRequest = e;
3029
+ }
3030
+ get onResponse() {
3031
+ return this._onResponse;
3032
+ }
3033
+ set onResponse(e) {
3034
+ this._onResponse = e;
2978
3035
  }
3036
+ //#endregion
2979
3037
  async send(e) {
2980
- W.isNullOrEmpty(e.url) && (e.url = this.baseUrl + e.path), e.prepare();
3038
+ M.isNullOrEmpty(e.url) && (e.url = this.baseUrl + e.path), e.prepare();
2981
3039
  let s;
2982
3040
  return typeof XMLHttpRequest > "u" ? (s = await this.sendWithFetch(e), s) : (s = await this.sendWithXmlHttpRequest(e), s);
2983
3041
  }
@@ -2985,7 +3043,7 @@ class us extends qe {
2985
3043
  * 使用Fetch发送请求,谷歌插件场景专用
2986
3044
  */
2987
3045
  async sendWithFetch(e) {
2988
- let s = (/* @__PURE__ */ new Date()).getTime(), l = new Ye();
3046
+ let s = (/* @__PURE__ */ new Date()).getTime(), l = new Je();
2989
3047
  l.request = e, l.id = e.id;
2990
3048
  let r = {
2991
3049
  method: e.method,
@@ -3004,7 +3062,7 @@ class us extends qe {
3004
3062
  * 使用XmlHttpRequest发送请求
3005
3063
  */
3006
3064
  sendWithXmlHttpRequest(e) {
3007
- let s = new Ye();
3065
+ let s = new Je();
3008
3066
  return s.request = e, s.id = e.id, new Promise(async (l, r) => {
3009
3067
  var a;
3010
3068
  await ((a = this.onRequest) == null ? void 0 : a.call(this, e));
@@ -3021,8 +3079,8 @@ class us extends qe {
3021
3079
  let c = i.getAllResponseHeaders().split(`\r
3022
3080
  `), h = {};
3023
3081
  for (let d = 0; d < c.length; d++) {
3024
- let p = c[d].split(": "), f = p.shift();
3025
- f == null || f == "" || (h[f] = p.join(": "));
3082
+ let p = c[d].split(": "), g = p.shift();
3083
+ g == null || g == "" || (h[g] = p.join(": "));
3026
3084
  }
3027
3085
  s.headers = h, s.contentType = s.getHeader("content-type"), s.prepare(), s.elapsed = s.time.getTime() - e.time.getTime(), await ((o = this.onResponse) == null ? void 0 : o.call(this, s)), l(s);
3028
3086
  }
@@ -3050,43 +3108,39 @@ class cs extends qe {
3050
3108
  * AppSecret
3051
3109
  */
3052
3110
  n(this, "appSecret", "");
3053
- /**
3054
- * 默认请求器
3055
- */
3056
- n(this, "requester");
3057
3111
  /**
3058
3112
  * Hash计算器
3059
3113
  */
3060
3114
  n(this, "hasher");
3061
- }
3062
- //#endregion
3063
- //#region 开启
3064
- /**
3065
- * 危险操作,会暴露敏感信息
3066
- */
3067
- async open(e) {
3068
- await super.open(e), this.requester = await E.http.getDefault(), this.hasher = await E.hasher.create("Sha256");
3069
- }
3070
- //#endregion
3071
- /**
3072
- * 危险操作,会暴露敏感信息
3073
- */
3074
- async send(e) {
3075
- let s = te.getTimestamp(), l = {
3076
- app_id: this.appId,
3077
- hash_type: "sha256",
3078
- timestamp: parseInt((s / 1e3).toString())
3079
- };
3080
- W.isNullOrEmpty(e.body) || (l.jsonBody = e.body);
3081
- let r = K.deserialize(e.path);
3082
- for (let p in r)
3083
- l[p] = r[p];
3084
- let i = K.getPath(e.path);
3085
- l = Pe.sort(l);
3086
- let a = Bt.signDictionary(l, !1), o = `POST${i}?${a}${this.appSecret}`, c = await this.hasher.compute(o);
3087
- l.sign = c.toLowerCase(), delete l.jsonBody, l = Pe.sort(l);
3088
- let h = K.serialize(l);
3089
- return e.url = K.concatUrl(this.baseUrl, i + "?" + h), await this.requester.send(e);
3115
+ //#endregion
3116
+ //#region 开启
3117
+ /**
3118
+ * 危险操作,会暴露敏感信息
3119
+ */
3120
+ n(this, "open", async (e) => {
3121
+ await super.open(e), this.http = await C.http.getDefault(), this.hasher = await C.hasher.create("Sha256");
3122
+ });
3123
+ //#endregion
3124
+ /**
3125
+ * 危险操作,会暴露敏感信息
3126
+ */
3127
+ n(this, "send", async (e) => {
3128
+ let s = te.getTimestamp(), l = {
3129
+ app_id: this.appId,
3130
+ hash_type: "sha256",
3131
+ timestamp: parseInt((s / 1e3).toString())
3132
+ };
3133
+ M.isNullOrEmpty(e.body) || (l.jsonBody = e.body);
3134
+ let r = W.deserialize(e.path);
3135
+ for (let p in r)
3136
+ l[p] = r[p];
3137
+ let i = W.getPath(e.path);
3138
+ l = _e.sort(l);
3139
+ let a = Bt.signDictionary(l, !1), o = `POST${i}?${a}${this.appSecret}`, c = await this.hasher.compute(o);
3140
+ l.sign = c.toLowerCase(), delete l.jsonBody, l = _e.sort(l);
3141
+ let h = W.serialize(l);
3142
+ return e.url = W.concatUrl(this.baseUrl, i + "?" + h), await this.http.send(e);
3143
+ });
3090
3144
  }
3091
3145
  }
3092
3146
  class ds extends qe {
@@ -3114,10 +3168,6 @@ class ds extends qe {
3114
3168
  * 当前终端
3115
3169
  */
3116
3170
  n(this, "platform");
3117
- /**
3118
- * 默认请求器
3119
- */
3120
- n(this, "http");
3121
3171
  /**
3122
3172
  * 单点登录配置
3123
3173
  */
@@ -3126,65 +3176,61 @@ class ds extends qe {
3126
3176
  * 单点登录配置
3127
3177
  */
3128
3178
  n(this, "signer");
3129
- }
3130
- //#endregion
3131
- //#region 开启
3132
- /**
3133
- * 开启
3134
- */
3135
- async open(e) {
3136
- await super.open(e), this.http = await E.http.getDefault(), this.user != null && (this.sso = await E.sso.create(this.user.type)), this.signer = await E.signer.createIfAbsent("default"), this.onRequest == null && (this.onRequest = this.beforeRequest);
3137
- }
3138
- //#endregion
3139
- /**
3140
- * 发送请求
3141
- */
3142
- async send(e) {
3143
- debugger;
3144
- e.url = K.concatUrl(this.baseUrl, e.path), await this.onRequest(e);
3145
- let s = await this.http.send(e);
3146
- if (s.status != 200) {
3147
- let r;
3148
- if (s.status == 0)
3149
- r = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url}`;
3179
+ //#endregion
3180
+ //#region 开启
3181
+ n(this, "open", async (e) => {
3182
+ await super.open(e), this.http = await C.http.getDefault(), this.user != null && (this.sso = await C.sso.create(this.user.type)), this.signer = await C.signer.createIfAbsent("default"), this.onRequest == null && (this.onRequest = this.beforeRequest);
3183
+ });
3184
+ //#endregion
3185
+ /**
3186
+ * 发送请求
3187
+ */
3188
+ n(this, "send", async (e) => {
3189
+ e.url = W.concatUrl(this.baseUrl, e.path), await this.onRequest(e);
3190
+ let s = await this.http.send(e);
3191
+ if (s.status != 200) {
3192
+ let r;
3193
+ if (s.status == 0)
3194
+ r = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url}`;
3195
+ else {
3196
+ let i = s.status ? `(${s.status})` : "";
3197
+ r = `接口加载异常: ${e.method}${i} ${e.url}`;
3198
+ }
3199
+ return me.warning(r), Promise.reject(r);
3200
+ }
3201
+ let l = s.data;
3202
+ return l.code == null || l.code == "Ok" ? s : (me.error(l.message), Promise.reject(l));
3203
+ });
3204
+ /**
3205
+ * 请求预处理
3206
+ */
3207
+ n(this, "beforeRequest", async (e) => {
3208
+ if (W.httpOrHttps(e.path))
3209
+ return Promise.resolve();
3210
+ let s;
3211
+ if (this.user == null)
3212
+ s = this.platform;
3150
3213
  else {
3151
- let i = s.status ? `(${s.status})` : "";
3152
- r = `接口加载异常: ${e.method}${i} ${e.url}`;
3214
+ let r = te.getTimestamp(), i = await this.signer.getSign(this.user.userId, e.url, e.body, r, this.user.secret);
3215
+ s = this.sso.getAuth(this.user.identity.token, r, i, this.platform, this.env);
3153
3216
  }
3154
- return ve.warning(r), Promise.reject(r);
3155
- }
3156
- let l = s.data;
3157
- return l.code != "Ok" ? (ve.error(l.message), Promise.reject(l)) : s;
3158
- }
3159
- /**
3160
- * 请求预处理
3161
- */
3162
- async beforeRequest(e) {
3163
- if (K.httpOrHttps(e.path))
3164
- return Promise.resolve();
3165
- let s;
3166
- if (this.user == null)
3167
- s = this.platform;
3168
- else {
3169
- let r = te.getTimestamp(), i = await this.signer.getSign(this.user.userId, e.url, e.body, r, this.user.secret);
3170
- s = this.sso.getAuth(this.user.identity.token, r, i, this.platform, this.env);
3171
- }
3172
- let l = {};
3173
- l.Authorization = s, e.getHeader("Accept-Language") || (l["Accept-Language"] = this.language), e.addHeaders(l);
3174
- }
3175
- /**
3176
- * 处理网络错误和响应错误场景
3177
- */
3178
- handleError(e) {
3179
- if (e instanceof Object) {
3180
- let s = e.message;
3181
- e.message == "Network Error" && (K.httpOrHttps(e.config.url) ? s = "接口网络错误: " + e.config.url : s = "接口网络错误: " + e.config.baseURL + e.config.url), ve.error(s);
3182
- } else
3183
- ve.error(e.message);
3184
- return Promise.reject(e);
3217
+ let l = {};
3218
+ l.Authorization = s, e.getHeader("Accept-Language") || (l["Accept-Language"] = this.language), e.addHeaders(l);
3219
+ });
3220
+ /**
3221
+ * 处理网络错误和响应错误场景
3222
+ */
3223
+ n(this, "handleError", (e) => {
3224
+ if (e instanceof Object) {
3225
+ let s = e.message;
3226
+ e.message == "Network Error" && (W.httpOrHttps(e.config.url) ? s = "接口网络错误: " + e.config.url : s = "接口网络错误: " + e.config.baseURL + e.config.url), me.error(s);
3227
+ } else
3228
+ me.error(e.message);
3229
+ return Promise.reject(e);
3230
+ });
3185
3231
  }
3186
3232
  }
3187
- class hs extends B {
3233
+ class hs extends P {
3188
3234
  get instances() {
3189
3235
  return [new us(), new cs(), new ds()];
3190
3236
  }
@@ -3192,7 +3238,7 @@ class hs extends B {
3192
3238
  * 创建并开启
3193
3239
  */
3194
3240
  async createById(t, e = null) {
3195
- e == null && (e = new Rt());
3241
+ e == null && (e = new jt());
3196
3242
  let s = await super.createById(t, e), l = e.value;
3197
3243
  return await s.open(l.Conn), s;
3198
3244
  }
@@ -3216,13 +3262,18 @@ class ps {
3216
3262
  n(this, "type");
3217
3263
  n(this, "lang");
3218
3264
  n(this, "messages", {});
3265
+ /**
3266
+ * 已加载的语言集合
3267
+ */
3268
+ n(this, "loaded", []);
3219
3269
  //#endregion
3270
+ //#region 翻译
3220
3271
  n(this, "t", (t, e) => {
3221
3272
  if (!t)
3222
3273
  return null;
3223
3274
  if (!this.t_exists(t)) {
3224
3275
  let s = t.split(".");
3225
- return ue.getLast(s, 2).join(".");
3276
+ return oe.getLast(s, 2).join(".");
3226
3277
  }
3227
3278
  return typeof e == "string" ? this.translate(t, [e]) : this.translate(t, e);
3228
3279
  });
@@ -3246,6 +3297,7 @@ class ps {
3246
3297
  n(this, "t_field_choose_placeholder", (t, e) => this.t("common.please_choose") + this.t(`_business.Ctl_Table_Field.Label.${t}.${e}`));
3247
3298
  n(this, "t_sys", (t) => this.t(`sys.${t}`));
3248
3299
  n(this, "t_title", () => this.t("sys.title"));
3300
+ //#endregion
3249
3301
  //#region 设置标题
3250
3302
  /**
3251
3303
  * 根据key设置多语言标题
@@ -3261,6 +3313,7 @@ class ps {
3261
3313
  let s = this.t_title(), l;
3262
3314
  s ? t ? e ? l = `${t}(${e}) - ${s}` : l = `${t} - ${s}` : l = s : e ? l = `${t}(${e})` : l = t, document.title = l;
3263
3315
  });
3316
+ //#endregion
3264
3317
  //#region 加载
3265
3318
  n(this, "addMessages", (t) => {
3266
3319
  let e = Object.keys(t);
@@ -3268,53 +3321,55 @@ class ps {
3268
3321
  this.messages[s] = t[s];
3269
3322
  this.setTitle(this.t("common.loading") + "...");
3270
3323
  });
3271
- /**
3272
- * 切换语言,自动加载菜单
3273
- */
3274
- n(this, "switchI18n", async (t) => {
3275
- Object.keys(this.messages).indexOf(t) == -1 && await this.loadI18n(t), this.lang = t;
3324
+ n(this, "switch", async (t) => {
3325
+ if (this.loaded.includes(t)) {
3326
+ this.lang = t;
3327
+ return;
3328
+ }
3329
+ await this.load(t), this.lang = t, this.loaded.push(t);
3276
3330
  });
3277
3331
  }
3278
3332
  //#endregion
3279
3333
  //#region 开启
3280
3334
  async open(t) {
3281
- let s = await (await E.provider.getDefault("sys")).getAsync("app");
3282
- this.lang = (s == null ? void 0 : s.language) ?? st.getLanguage();
3335
+ _.mergeTo(this, t);
3283
3336
  }
3284
3337
  //#endregion
3285
3338
  }
3286
- class gs extends ps {
3339
+ class fs extends ps {
3287
3340
  constructor() {
3288
3341
  super(...arguments);
3289
3342
  n(this, "type", "Default");
3290
3343
  //#endregion
3291
3344
  n(this, "translate", (e, s) => {
3292
- let l = this.messages[this.lang], r = e.split(".");
3293
- return M.getValue(l, r);
3345
+ let l = this.messages[this.lang], r = e.split("."), i = _.getValue(l, r);
3346
+ return s == null ? i : M.format(i, s);
3294
3347
  });
3295
3348
  n(this, "t_exists", (e) => {
3296
3349
  if (!e)
3297
3350
  return null;
3298
3351
  let s = this.messages[this.lang], l = e.split(".");
3299
- return M.hasKey(s, l);
3352
+ return _.hasKey(s, l);
3300
3353
  });
3301
- n(this, "loadI18n", async (e) => {
3354
+ n(this, "load", async (e) => {
3302
3355
  e == null && (e = this.lang);
3303
3356
  let s = new Promise(async (r) => {
3304
3357
  let i = { conditions: [{ name: "lang", value: e }] };
3305
3358
  return T.post("/i18n", i).then(({ data: a }) => {
3306
- a.forEach((o) => {
3307
- let c = `${e}.${o.Module}.${o.Key}`.split(".");
3308
- Y.addProperties(this.messages, c, o.Value);
3309
- }), r(a);
3359
+ for (let o of a) {
3360
+ let c = `${e}.${o.Kind}.${o.Key}`.split(".");
3361
+ X.addProperties(this.messages, c, o.Value);
3362
+ }
3363
+ r(a);
3310
3364
  });
3311
3365
  }), l = new Promise((r) => {
3312
3366
  let i = { conditions: [{ name: "lang", value: e }] };
3313
3367
  T.post("/i18n_business", i).then(({ data: a }) => {
3314
- a.forEach((o) => {
3368
+ for (let o of a) {
3315
3369
  let c = `${e}._business.${o.Table}.${o.Field}.${o.Key}`.split(".");
3316
- Y.addProperties(this.messages, c, o.Value);
3317
- }), r(a);
3370
+ X.addProperties(this.messages, c, o.Value);
3371
+ }
3372
+ r(a);
3318
3373
  });
3319
3374
  });
3320
3375
  await Promise.all([s, l]);
@@ -3325,20 +3380,12 @@ class gs extends ps {
3325
3380
  await super.open(e);
3326
3381
  }
3327
3382
  }
3328
- class fs extends B {
3383
+ class gs extends P {
3329
3384
  //#region 开启
3330
3385
  open() {
3331
- super.open(), super.addType(new gs());
3386
+ super.open(), super.addType(new fs());
3332
3387
  }
3333
3388
  //#endregion
3334
- /**
3335
- * 获取默认多语言
3336
- */
3337
- async getDefault() {
3338
- return await super.createIfAbsent("Default", "Default", async (e) => {
3339
- await e.open();
3340
- });
3341
- }
3342
3389
  }
3343
3390
  class ms {
3344
3391
  constructor() {
@@ -3372,7 +3419,7 @@ class ys extends ms {
3372
3419
  console.warn(e);
3373
3420
  }
3374
3421
  }
3375
- class vs extends B {
3422
+ class vs extends P {
3376
3423
  get instances() {
3377
3424
  return [new ys()];
3378
3425
  }
@@ -3407,7 +3454,7 @@ class bs extends ws {
3407
3454
  dispose() {
3408
3455
  }
3409
3456
  }
3410
- class xs extends B {
3457
+ class xs extends P {
3411
3458
  get instances() {
3412
3459
  return [new bs()];
3413
3460
  }
@@ -3431,11 +3478,11 @@ class ks {
3431
3478
  //#endregion
3432
3479
  //#region 开启
3433
3480
  async open(t) {
3434
- this.provider = await E.provider.getDefault("user");
3481
+ this.provider = await C.provider.getDefault("user");
3435
3482
  }
3436
3483
  //#endregion
3437
3484
  async login(t) {
3438
- return T.post(`/user/login?type=${this.type}`, t).then(async (e) => (await this.provider.saveAsync("sso", e.data), T.user = e.data, T.sso = await E.sso.create(e.data.type), Promise.resolve(e)));
3485
+ return T.post(`/user/login?type=${this.type}`, t).then(async (e) => (await this.provider.saveAsync("sso", e.data), T.user = e.data, T.sso = await C.sso.create(e.data.type), Promise.resolve(e)));
3439
3486
  }
3440
3487
  loginUrl(t) {
3441
3488
  return "";
@@ -3465,11 +3512,11 @@ class Ss {
3465
3512
  //#endregion
3466
3513
  //#region 开启
3467
3514
  async open(t) {
3468
- this.url = t.url, this.app_id = t.app_id, this.provider = await E.provider.getDefault("user");
3515
+ this.url = t.url, this.app_id = t.app_id, this.provider = await C.provider.getDefault("user");
3469
3516
  }
3470
3517
  //#endregion
3471
3518
  async login(t) {
3472
- await this.provider.saveAsync("sso", t), T.user = t, T.sso = await E.sso.create(t.type);
3519
+ await this.provider.saveAsync("sso", t), T.user = t, T.sso = await C.sso.create(t.type);
3473
3520
  }
3474
3521
  loginUrl(t) {
3475
3522
  let e = encodeURIComponent(t);
@@ -3485,7 +3532,7 @@ class Ss {
3485
3532
  await this.provider.deleteAsync("user"), await this.provider.deleteAsync("sso");
3486
3533
  }
3487
3534
  }
3488
- class at {
3535
+ class it {
3489
3536
  constructor() {
3490
3537
  /**
3491
3538
  * 用户标识
@@ -3505,7 +3552,7 @@ class at {
3505
3552
  n(this, "identity");
3506
3553
  }
3507
3554
  }
3508
- class Es {
3555
+ class Cs {
3509
3556
  constructor() {
3510
3557
  n(this, "type", "WeiXin");
3511
3558
  }
@@ -3517,7 +3564,7 @@ class Es {
3517
3564
  return "";
3518
3565
  }
3519
3566
  async getUser() {
3520
- let t = new at();
3567
+ let t = new it();
3521
3568
  return t.userId = "", t;
3522
3569
  }
3523
3570
  getAuth(t, e, s, l) {
@@ -3527,12 +3574,12 @@ class Es {
3527
3574
  return Promise.resolve();
3528
3575
  }
3529
3576
  }
3530
- class Cs {
3577
+ class Es {
3531
3578
  constructor() {
3532
3579
  n(this, "type");
3533
3580
  }
3534
3581
  }
3535
- class Ts extends Cs {
3582
+ class Ts extends Es {
3536
3583
  constructor() {
3537
3584
  super(...arguments);
3538
3585
  //#region 属性
@@ -3544,7 +3591,7 @@ class Ts extends Cs {
3544
3591
  }
3545
3592
  //#endregion
3546
3593
  async open(e) {
3547
- this.provider = await E.provider.getDefault("user");
3594
+ this.provider = await C.provider.getDefault("user");
3548
3595
  }
3549
3596
  async login(e) {
3550
3597
  }
@@ -3554,10 +3601,10 @@ class Ts extends Cs {
3554
3601
  async getUser() {
3555
3602
  let e = await this.provider.getAsync("anonymous");
3556
3603
  if (!e) {
3557
- let l = W.getUniqueId();
3604
+ let l = M.getUniqueId();
3558
3605
  await this.provider.saveAsync("anonymous", l), e = l;
3559
3606
  }
3560
- let s = new at();
3607
+ let s = new it();
3561
3608
  return s.identity = { token: e }, s;
3562
3609
  }
3563
3610
  getAuth(e, s, l, r) {
@@ -3578,7 +3625,7 @@ class $s {
3578
3625
  }
3579
3626
  //#endregion
3580
3627
  async open(t) {
3581
- this.provider = await E.provider.getDefault("user");
3628
+ this.provider = await C.provider.getDefault("user");
3582
3629
  }
3583
3630
  async login(t) {
3584
3631
  return T.post(`/user/login?type=${this.type}`, t).then(async (e) => {
@@ -3635,9 +3682,9 @@ class As {
3635
3682
  n(this, "app", new Ls());
3636
3683
  }
3637
3684
  }
3638
- class ot {
3685
+ class at {
3639
3686
  }
3640
- class ut extends ot {
3687
+ class ot extends at {
3641
3688
  constructor() {
3642
3689
  super(...arguments);
3643
3690
  //#region 属性
@@ -3663,23 +3710,26 @@ class ut extends ot {
3663
3710
  */
3664
3711
  completions: {}
3665
3712
  });
3666
- }
3667
- //#endregion
3668
- //#region 开启
3669
- open() {
3670
- let e = this.sys.app;
3671
- e.background = de.background, e.theme = de.theme, e.layout = de.layout, e.language = de.language, e.font = de.font;
3672
- }
3673
- /**
3674
- * 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
3675
- */
3676
- async bind(e) {
3677
- for (let l of e) {
3678
- let i = await this.get(l.kind, l.type) ?? l.content;
3679
- Y.addProperties(this, [l.kind, l.type], i);
3680
- }
3681
- let s = this.sys.app;
3682
- R.removeClass(document.documentElement, de.theme), R.addClass(document.documentElement, s.theme), we.emit("theme", s.theme), R.addClass(document.documentElement, s.layout), this.setBackground(s.background), R.addStyle(document.documentElement, "font-family", s.font);
3713
+ //#endregion
3714
+ //#region 开启
3715
+ /**
3716
+ * 初始化绑定基础配置信息
3717
+ */
3718
+ n(this, "open", (e) => {
3719
+ let s = this.sys.app;
3720
+ s.background = e.background, s.theme = e.theme, s.layout = e.layout, s.language = e.language, s.font = e.font;
3721
+ });
3722
+ /**
3723
+ * 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
3724
+ */
3725
+ n(this, "bind", async (e) => {
3726
+ for (let r of e) {
3727
+ let a = await this.get(r.kind, r.type) ?? r.content;
3728
+ X.addProperties(this, [r.kind, r.type], a);
3729
+ }
3730
+ let s = this.sys.app, l = document.documentElement;
3731
+ j.removeClass(l, ct.theme), j.addClass(l, s.theme), ye.emit("theme", s.theme), j.addClass(l, s.layout), this.setBackground(s.background), j.addStyle(l, "font-family", s.font);
3732
+ });
3683
3733
  }
3684
3734
  /**
3685
3735
  * 尝试添加架构
@@ -3703,7 +3753,7 @@ class ut extends ot {
3703
3753
  * 获取本地配置
3704
3754
  */
3705
3755
  async get(e, s) {
3706
- return await (await E.provider.getDefault(e)).getAsync(s);
3756
+ return await (await C.provider.getDefault(e)).getAsync(s);
3707
3757
  }
3708
3758
  /**
3709
3759
  * 设置背景
@@ -3720,11 +3770,11 @@ class ut extends ot {
3720
3770
  let s = this.sys.app, l = document.documentElement, r = e.layout;
3721
3771
  l.classList.remove(s.layout), l.classList.add(r), s.layout = r;
3722
3772
  let i = e.theme;
3723
- R.removeClass(l, s.theme), R.addClass(l, i), s.theme = i, we.emit("theme", i);
3773
+ j.removeClass(l, s.theme), j.addClass(l, i), s.theme = i, ye.emit("theme", i);
3724
3774
  let a = e.background;
3725
- this.setBackground(a), we.emit("background", a);
3775
+ this.setBackground(a), ye.emit("background", a);
3726
3776
  let o = e.font;
3727
- s.font = o, R.addStyle(l, "font-family", o);
3777
+ s.font = o, j.addStyle(l, "font-family", o);
3728
3778
  }
3729
3779
  //#region 配置
3730
3780
  /**
@@ -3745,7 +3795,7 @@ class ut extends ot {
3745
3795
  * 全量保存用户配置
3746
3796
  */
3747
3797
  async save(e, s, l, r = !0) {
3748
- return r && await (await E.provider.getDefault(e)).saveAsync(s, l), T.post(`/user/config?kind=${e}&type=${s}`, l).then((i) => Promise.resolve(!0));
3798
+ return r && await (await C.provider.getDefault(e)).saveAsync(s, l), T.post(`/user/config?kind=${e}&type=${s}`, l).then((i) => Promise.resolve(!0));
3749
3799
  }
3750
3800
  /**
3751
3801
  * 部分保存用户配置
@@ -3758,7 +3808,7 @@ class ut extends ot {
3758
3808
  * 获取当前语言
3759
3809
  */
3760
3810
  getLanguage() {
3761
- let e = st.getLanguage();
3811
+ let e = tt.getLanguage();
3762
3812
  return this.sys.app.language || e || "zh-cn";
3763
3813
  }
3764
3814
  }
@@ -3773,10 +3823,10 @@ class Ds {
3773
3823
  * 使用环境变量
3774
3824
  */
3775
3825
  useEnv(t) {
3776
- this.env = t, this.env.base = W.trimEnd(t.VITE_ROOT, "/");
3826
+ this.env = t, this.env.base = M.trimEnd(t.VITE_ROOT, "/");
3777
3827
  }
3778
3828
  }
3779
- class Is {
3829
+ class Rs {
3780
3830
  constructor() {
3781
3831
  /**
3782
3832
  * 日志集合
@@ -3803,7 +3853,7 @@ class Is {
3803
3853
  this.logs = [];
3804
3854
  }
3805
3855
  }
3806
- class Os {
3856
+ class Is {
3807
3857
  constructor() {
3808
3858
  /**
3809
3859
  * 获取侧边栏宽度
@@ -3816,8 +3866,8 @@ class Os {
3816
3866
  this[e] = t[e];
3817
3867
  }
3818
3868
  }
3819
- let De = new Os();
3820
- class js {
3869
+ let Le = new Is();
3870
+ class Os {
3821
3871
  constructor() {
3822
3872
  //#region 属性
3823
3873
  n(this, "loaded", !1);
@@ -3888,13 +3938,17 @@ class js {
3888
3938
  * 加载设置
3889
3939
  */
3890
3940
  async load() {
3891
- return T.get("/app/setting").then(({ data: t }) => (Object.keys(t).forEach((e) => {
3892
- let s = t[e];
3893
- s && (this[e] = s);
3894
- }), R.addClass(document.documentElement, this.theme, De.web.theme), we.emits({ theme: this.theme }), Promise.resolve(t))).catch((t) => Promise.reject(t));
3941
+ return T.get("/app/setting").then(({ data: t }) => {
3942
+ let e = Object.keys(t);
3943
+ for (let s of e) {
3944
+ let l = t[s];
3945
+ l && (this[s] = l);
3946
+ }
3947
+ return j.addClass(document.documentElement, this.theme, Le.web.theme), ye.emits({ theme: this.theme }), Promise.resolve(t);
3948
+ }).catch((t) => Promise.reject(t));
3895
3949
  }
3896
3950
  }
3897
- class Rs {
3951
+ class js {
3898
3952
  constructor() {
3899
3953
  //#region 属性
3900
3954
  /**
@@ -3919,12 +3973,12 @@ class Rs {
3919
3973
  * 登录后,连接Socket
3920
3974
  */
3921
3975
  async connect() {
3922
- if (!De.api.ws)
3976
+ if (!Le.api.ws)
3923
3977
  return;
3924
3978
  if (this.socket == null || this.reconnect) {
3925
- let e = De.api.ws, s = new it();
3979
+ let e = Le.api.ws, s = new nt();
3926
3980
  s.path = e, s.method = "GET", await T.onRequest(s);
3927
- let l = s.getHeader("Authorization"), r = K.encode(l), i = `${e}?authorization=${r}`;
3981
+ let l = s.getHeader("Authorization"), r = W.encode(l), i = `${e}?authorization=${r}`;
3928
3982
  this.socket = new WebSocket(i);
3929
3983
  }
3930
3984
  let t;
@@ -3933,7 +3987,7 @@ class Rs {
3933
3987
  }, this.socket.onmessage = (e) => {
3934
3988
  this.handler && this.handler(e);
3935
3989
  }, this.socket.onerror = (e) => {
3936
- this.reconnect = !0, console.warn(`Socket连接失败:${De.api.ws}`);
3990
+ this.reconnect = !0, console.warn(`Socket连接失败:${Le.api.ws}`);
3937
3991
  }, this.socket.onclose = (e) => {
3938
3992
  this.connected = !1, this.reconnect && (t = setTimeout(async () => await this.connect(), 1e3));
3939
3993
  };
@@ -3986,32 +4040,32 @@ class _s {
3986
4040
  * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
3987
4041
  */
3988
4042
  async getSso() {
3989
- return await (await E.provider.getDefault("user")).getEntity("sso");
4043
+ return await (await C.provider.getDefault("user")).getEntity("sso");
3990
4044
  }
3991
4045
  /**
3992
4046
  * 登录后,获取用户信息
3993
4047
  */
3994
4048
  async loadInfo() {
3995
- return T.get("/user/info").then(async ({ data: t }) => (await H.bind(t.configs), this.user = t, this.debugger = t.debugger, Promise.resolve(t)));
4049
+ return T.get("/user/info").then(async ({ data: t }) => (await ee.bind(t.configs), this.user = t, this.debugger = t.debugger, Promise.resolve(t)));
3996
4050
  }
3997
4051
  /**
3998
4052
  * 未登录,获取匿名登录信息
3999
4053
  */
4000
4054
  async getAnonymous() {
4001
- await H.bind([]);
4055
+ await ee.bind([]);
4002
4056
  }
4003
4057
  /**
4004
4058
  * 根据路径获取路由
4005
4059
  */
4006
4060
  getMenuByUrl(t) {
4007
- let e = K.getPath(t);
4061
+ let e = W.getPath(t);
4008
4062
  return this.menusFlat.find((l) => l.url.split("?")[0] == e);
4009
4063
  }
4010
4064
  /**
4011
4065
  * 加载服务端路由
4012
4066
  */
4013
4067
  async loadMenus() {
4014
- return T.get("/user/menu").then(({ data: t }) => (this.menus = t, this.menusFlat = Oe.getFlat(t, "children"), Promise.resolve(t)));
4068
+ return T.get("/user/menu").then(({ data: t }) => (this.menus = t, this.menusFlat = De.getFlat(t, "children"), Promise.resolve(t)));
4015
4069
  }
4016
4070
  /**
4017
4071
  * 退出登录
@@ -4020,11 +4074,11 @@ class _s {
4020
4074
  return T.post("/user/logout").then(async () => {
4021
4075
  this.user = null, this.menus = null;
4022
4076
  let t = await this.getSso();
4023
- return await (await E.sso.create(t.type)).logout(), Us.disconnect(), Promise.resolve();
4077
+ return await (await C.sso.create(t.type)).logout(), Us.disconnect(), Promise.resolve();
4024
4078
  });
4025
4079
  }
4026
4080
  }
4027
- class ct extends ot {
4081
+ class ut extends at {
4028
4082
  constructor() {
4029
4083
  super(...arguments);
4030
4084
  //#region 属性
@@ -4076,11 +4130,11 @@ class ct extends ot {
4076
4130
  });
4077
4131
  }
4078
4132
  }
4079
- class Bs extends B {
4133
+ class Bs extends P {
4080
4134
  open() {
4081
4135
  super.open(), super.instances = [
4082
- new ut(),
4083
- new ct()
4136
+ new ot(),
4137
+ new ut()
4084
4138
  ];
4085
4139
  }
4086
4140
  static() {
@@ -4093,31 +4147,29 @@ class Bs extends B {
4093
4147
  return await super.createIfAbsent("Config");
4094
4148
  }
4095
4149
  }
4096
- let H = new ut(), sr = Ge(new ct()), lr = new Ds(), Ps = new Is(), de = Ge(new js()), Us = new Rs(), Fs = new _s(), Ms = async (u) => {
4097
- H.open();
4098
- };
4099
- class Ns extends B {
4150
+ let ct = Ye(new Os()), ee = new ot(), er = Ye(new ut()), tr = new Ds(), Ps = new Rs(), Us = new js(), Fs = new _s();
4151
+ class Ms extends P {
4100
4152
  /**
4101
4153
  * 获取实例
4102
4154
  */
4103
4155
  get instances() {
4104
- return [new $s(), new Ss(), new Es(), new ks(), new Ts()];
4156
+ return [new $s(), new Ss(), new Cs(), new ks(), new Ts()];
4105
4157
  }
4106
4158
  /**
4107
4159
  * 获取指定SSO实例
4108
4160
  */
4109
4161
  async create(t, e) {
4110
- let s = de.ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), l = { url: s == null ? void 0 : s.url, app_id: s == null ? void 0 : s.appId }, r = await super.create(t);
4162
+ let s = ct.ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), l = { url: s == null ? void 0 : s.url, app_id: s == null ? void 0 : s.appId }, r = await super.create(t);
4111
4163
  return await r.open(l), r;
4112
4164
  }
4113
4165
  }
4114
- class Vs {
4166
+ class qs {
4115
4167
  constructor() {
4116
4168
  n(this, "type");
4117
4169
  n(this, "taskLimit");
4118
4170
  }
4119
4171
  }
4120
- class qs extends Vs {
4172
+ class Ns extends qs {
4121
4173
  constructor() {
4122
4174
  super(...arguments);
4123
4175
  //#region 属性
@@ -4135,7 +4187,7 @@ class qs extends Vs {
4135
4187
  async execute(e, s, l) {
4136
4188
  if (e.length == 0)
4137
4189
  return;
4138
- let r = ue.getChunksByCount(e, s), i = ue.create(r, (a, o) => l(a, o));
4190
+ let r = oe.getChunksByCount(e, s), i = oe.create(r, (a, o) => l(a, o));
4139
4191
  await Promise.all(i);
4140
4192
  }
4141
4193
  async executeFrequency(e, s, l, r) {
@@ -4171,17 +4223,17 @@ class qs extends Vs {
4171
4223
  clearInterval(this.intervalTimeout);
4172
4224
  }
4173
4225
  }
4174
- class zs extends B {
4226
+ class Vs extends P {
4175
4227
  get instances() {
4176
- return [new qs()];
4228
+ return [new Ns()];
4177
4229
  }
4178
4230
  }
4179
- class Ks {
4231
+ class zs {
4180
4232
  constructor() {
4181
4233
  n(this, "type");
4182
4234
  }
4183
4235
  }
4184
- class Ws extends Ks {
4236
+ class Ks extends zs {
4185
4237
  constructor() {
4186
4238
  super(...arguments);
4187
4239
  n(this, "type", "Liquid");
@@ -4191,12 +4243,12 @@ class Ws extends Ks {
4191
4243
  return await l.render(r, s);
4192
4244
  }
4193
4245
  }
4194
- class Qs extends B {
4246
+ class Ws extends P {
4195
4247
  get instances() {
4196
- return [new Ws()];
4248
+ return [new Ks()];
4197
4249
  }
4198
4250
  }
4199
- class rr extends B {
4251
+ class sr extends P {
4200
4252
  get instances() {
4201
4253
  return [];
4202
4254
  }
@@ -4206,7 +4258,7 @@ class dt {
4206
4258
  n(this, "type");
4207
4259
  }
4208
4260
  }
4209
- class Js extends dt {
4261
+ class Qs extends dt {
4210
4262
  constructor() {
4211
4263
  super(...arguments);
4212
4264
  n(this, "type", "Tencent");
@@ -4227,7 +4279,7 @@ class Js extends dt {
4227
4279
  startRecord() {
4228
4280
  }
4229
4281
  }
4230
- class Xs extends dt {
4282
+ class Js extends dt {
4231
4283
  constructor() {
4232
4284
  super(...arguments);
4233
4285
  n(this, "type", "Default");
@@ -4241,9 +4293,9 @@ class Xs extends dt {
4241
4293
  return "";
4242
4294
  }
4243
4295
  }
4244
- class nr extends B {
4296
+ class lr extends P {
4245
4297
  get instances() {
4246
- return [new Xs(), new Js()];
4298
+ return [new Js(), new Qs()];
4247
4299
  }
4248
4300
  }
4249
4301
  class ht {
@@ -4252,7 +4304,7 @@ class ht {
4252
4304
  * Builder工厂
4253
4305
  */
4254
4306
  static get builder() {
4255
- return this.create(qt);
4307
+ return this.create(Vt);
4256
4308
  }
4257
4309
  /**
4258
4310
  * CDN工厂
@@ -4300,7 +4352,7 @@ class ht {
4300
4352
  * 多语言工厂
4301
4353
  */
4302
4354
  static get i18n() {
4303
- return this.create(fs);
4355
+ return this.create(gs);
4304
4356
  }
4305
4357
  /**
4306
4358
  * 消息提示请求工厂
@@ -4312,7 +4364,7 @@ class ht {
4312
4364
  * 提供程序工厂
4313
4365
  */
4314
4366
  static get provider() {
4315
- return this.create(Nt);
4367
+ return this.create(qt);
4316
4368
  }
4317
4369
  /**
4318
4370
  * 签名工厂
@@ -4324,19 +4376,19 @@ class ht {
4324
4376
  * SSO工厂
4325
4377
  */
4326
4378
  static get sso() {
4327
- return this.create(Ns);
4379
+ return this.create(Ms);
4328
4380
  }
4329
4381
  /**
4330
4382
  * Task工厂
4331
4383
  */
4332
4384
  static get task() {
4333
- return this.create(zs);
4385
+ return this.create(Vs);
4334
4386
  }
4335
4387
  /**
4336
4388
  * 模板工厂
4337
4389
  */
4338
4390
  static get template() {
4339
- return this.create(Qs);
4391
+ return this.create(Ws);
4340
4392
  }
4341
4393
  //#endregion
4342
4394
  //#region 服务工厂
@@ -4361,14 +4413,15 @@ class ht {
4361
4413
  * 工厂缓存
4362
4414
  */
4363
4415
  n(ht, "mappings", {});
4364
- const E = ht;
4365
- let Ys = {}, me = {}, T = {}, J = {}, pt = {}, Gs = {}, ve = {}, Zs = async (u) => {
4366
- let e = await (await E.provider.getDefault("sys")).getAsync("app");
4367
- (e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn), me = await E.cdn.createIfAbsent("Default", u.cdn), Ys = await E.encoder.getBase64(), T = await E.http.getHalo(), J = await E.i18n.getDefault(), J.addMessages(u.lang), pt = await E.hasher.getMd5(), Gs = await E.template.create("Liquid"), u.messenger == null ? ve = await E.messenger.getConsole() : ve = u.messenger;
4368
- }, Hs = async () => {
4369
- el = J.t, tl = J.t_exists, sl = J.t_sys, ll = J.t_enum, rl = J.t_field, nl = J.t_field_choose_placeholder, il = J.t_field_placeholder, al = J.t_table, ol = J.t_module, ul = J.t_menu, await J.loadI18n();
4370
- }, el = {}, tl = {}, sl = {}, ll = {}, rl = {}, nl = {}, il = {}, al = {}, ol = {}, ul = {};
4371
- class cl {
4416
+ const C = ht;
4417
+ let Xs = {}, fe = {}, T = {}, Xe = {}, pt = {}, Ys = {}, me = {}, Gs = async (u) => {
4418
+ let e = await (await C.provider.getDefault("sys")).getAsync("app");
4419
+ (e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn), fe = await C.cdn.createIfAbsent("Default", u.cdn), Xs = await C.encoder.getBase64(), T = await C.http.getHalo(), Xe = await C.i18n.createIfAbsent("Default", "Default", async (s) => {
4420
+ let l = (e == null ? void 0 : e.language) ?? tt.getLanguage(), r = _.serialize({ lang: l });
4421
+ await s.open(r), Zs = s.t, Hs = s.t_exists, el = s.t_sys, tl = s.t_enum, sl = s.t_field, ll = s.t_field_choose_placeholder, rl = s.t_field_placeholder, nl = s.t_table, il = s.t_module, al = s.t_menu;
4422
+ }), Xe.addMessages(u.lang), pt = await C.hasher.getMd5(), Ys = await C.template.create("Liquid"), u.messenger == null ? me = await C.messenger.getConsole() : me = u.messenger;
4423
+ }, Zs = {}, Hs = {}, el = {}, tl = {}, sl = {}, ll = {}, rl = {}, nl = {}, il = {}, al = {};
4424
+ class ol {
4372
4425
  constructor() {
4373
4426
  /**
4374
4427
  * 消息发送对象
@@ -4388,10 +4441,10 @@ class cl {
4388
4441
  n(this, "cdn", "Local");
4389
4442
  }
4390
4443
  }
4391
- const dl = { class: "ha-empty" }, hl = { class: "empty-message" }, pl = {
4444
+ const ul = { class: "ha-empty" }, cl = { class: "empty-message" }, dl = {
4392
4445
  key: 0,
4393
4446
  class: "empty-content"
4394
- }, ir = /* @__PURE__ */ Q({
4447
+ }, rr = /* @__PURE__ */ Q({
4395
4448
  __name: "Empty",
4396
4449
  props: {
4397
4450
  message: { type: String, default: "暂无数据" },
@@ -4399,15 +4452,15 @@ const dl = { class: "ha-empty" }, hl = { class: "empty-message" }, pl = {
4399
4452
  },
4400
4453
  setup(u) {
4401
4454
  let t = u, { message: e, hasData: s } = se(t);
4402
- return (l, r) => (O(), _("div", dl, [
4403
- D("div", hl, pe(y(e)), 1),
4404
- y(s) ? (O(), _("div", pl, [
4405
- ge(l.$slots, "default")
4406
- ])) : Ze("", !0)
4455
+ return (l, r) => (I(), B("div", ul, [
4456
+ D("div", cl, de(y(e)), 1),
4457
+ y(s) ? (I(), B("div", dl, [
4458
+ he(l.$slots, "default")
4459
+ ])) : Ge("", !0)
4407
4460
  ]));
4408
4461
  }
4409
4462
  });
4410
- class gt {
4463
+ class ft {
4411
4464
  constructor(t, e) {
4412
4465
  /**
4413
4466
  * 距窗口左边的距离
@@ -4420,7 +4473,7 @@ class gt {
4420
4473
  this.x = t, this.y = e;
4421
4474
  }
4422
4475
  }
4423
- class gl extends gt {
4476
+ class hl extends ft {
4424
4477
  constructor() {
4425
4478
  super(...arguments);
4426
4479
  /**
@@ -4429,7 +4482,7 @@ class gl extends gt {
4429
4482
  n(this, "affix");
4430
4483
  }
4431
4484
  }
4432
- class ar extends gt {
4485
+ class nr extends ft {
4433
4486
  constructor(e, s, l, r) {
4434
4487
  super(e, s);
4435
4488
  n(this, "width");
@@ -4437,7 +4490,7 @@ class ar extends gt {
4437
4490
  this.width = l, this.height = r;
4438
4491
  }
4439
4492
  }
4440
- class ft {
4493
+ class gt {
4441
4494
  constructor() {
4442
4495
  //#region 大小调整
4443
4496
  n(this, "resizeObserver", null);
@@ -4526,12 +4579,12 @@ class ft {
4526
4579
  return;
4527
4580
  this.dragElement = t;
4528
4581
  let s = !1, l = (a) => (s = !0, a.preventDefault(), e.init(a)), r = (a) => {
4529
- let o = new gl(), c = e.range;
4582
+ let o = new hl(), c = e.range;
4530
4583
  if (c == null)
4531
4584
  o.x = a.clientX, o.y = a.clientY;
4532
4585
  else {
4533
- let { x: h, y: d, width: p, height: f } = c;
4534
- a.clientX < h ? o.x = h : a.clientX > h + p ? o.x = h + p : o.x = a.clientX, a.clientY < d ? o.y = d : a.clientY > d + f ? o.y = d + f : o.y = a.clientY;
4586
+ let { x: h, y: d, width: p, height: g } = c;
4587
+ a.clientX < h ? o.x = h : a.clientX > h + p ? o.x = h + p : o.x = a.clientX, a.clientY < d ? o.y = d : a.clientY > d + g ? o.y = d + g : o.y = a.clientY;
4535
4588
  }
4536
4589
  if (e.affix) {
4537
4590
  if (e.range == null)
@@ -4589,7 +4642,7 @@ class ft {
4589
4642
  }
4590
4643
  //#endregion
4591
4644
  }
4592
- class or {
4645
+ class ir {
4593
4646
  constructor() {
4594
4647
  n(this, "events", {});
4595
4648
  /**
@@ -4711,14 +4764,14 @@ class or {
4711
4764
  clearTimeout(this.timer);
4712
4765
  }
4713
4766
  }
4714
- class ur {
4767
+ class ar {
4715
4768
  /**
4716
4769
  * 对比数据变动
4717
4770
  */
4718
4771
  delta(t, e, s, l) {
4719
4772
  }
4720
4773
  }
4721
- class cr {
4774
+ class or {
4722
4775
  /**
4723
4776
  * 初始化,并绑定自动关闭上下文菜单事件
4724
4777
  */
@@ -4735,7 +4788,7 @@ class cr {
4735
4788
  * 根据鼠标事件,显示右键上下文弹窗
4736
4789
  */
4737
4790
  n(this, "show", (t) => {
4738
- let s = R.parentAbsolute(this.container).getBoundingClientRect(), l = t.clientX - s.left, r = t.clientY - s.top - 2;
4791
+ let s = j.parentAbsolute(this.container).getBoundingClientRect(), l = t.clientX - s.left, r = t.clientY - s.top - 2;
4739
4792
  this.container.style.display = "block", this.container.style.left = l + "px", this.container.style.top = r + "px";
4740
4793
  });
4741
4794
  /**
@@ -4744,7 +4797,7 @@ class cr {
4744
4797
  n(this, "dispose", () => {
4745
4798
  for (let t = 0; t < this.closeTriggers.length; t++) {
4746
4799
  let e = this.closeTriggers[t];
4747
- ae.unbind(["click", "scroll"], e, this.close);
4800
+ ie.unbind(["click", "scroll"], e, this.close);
4748
4801
  }
4749
4802
  this.container != null && this.container.removeEventListener("click", this.close), this.container = null, this.closeTriggers = [];
4750
4803
  });
@@ -4752,18 +4805,75 @@ class cr {
4752
4805
  this.closeTriggers.push(...e);
4753
4806
  for (let s = 0; s < this.closeTriggers.length; s++) {
4754
4807
  let l = this.closeTriggers[s];
4755
- ae.bind(["click", "scroll"], l, this.close);
4808
+ ie.bind(["click", "scroll"], l, this.close);
4756
4809
  }
4757
4810
  }
4758
4811
  }
4759
4812
  }
4760
- class dr {
4813
+ class ur {
4814
+ constructor() {
4815
+ //#region 属性
4816
+ /**
4817
+ * 随机数总长度
4818
+ */
4819
+ n(this, "length");
4820
+ /**
4821
+ * 当前显示元素之前的数组
4822
+ */
4823
+ n(this, "history", []);
4824
+ /**
4825
+ * 即将要显示的数组(未空表示用户还没看过,可随机生成)
4826
+ */
4827
+ n(this, "future", []);
4828
+ /**
4829
+ * 当前元素指针,索引值,用于指示当前显示的数在所有数组中的位置
4830
+ */
4831
+ n(this, "current", null);
4832
+ }
4833
+ //#endregion
4834
+ /**
4835
+ * 是否有上一个数
4836
+ */
4837
+ get hasPrev() {
4838
+ return this.history.length > 0;
4839
+ }
4840
+ /**
4841
+ * 是否有下一个数
4842
+ */
4843
+ get hasNext() {
4844
+ return this.history.length + 1 < this.length;
4845
+ }
4846
+ /**
4847
+ * 获取轨迹中的上一个数的索引,箭头函数可能会导致数据更新,但是UI不更新
4848
+ */
4849
+ prev() {
4850
+ this.current--;
4851
+ let t = this.history.pop();
4852
+ return this.future.splice(0, 0, t), t;
4853
+ }
4854
+ /**
4855
+ * 获取下一个数
4856
+ * 优先从轨迹获取,轨迹没有则取随机数
4857
+ */
4858
+ next() {
4859
+ if (this.future.length > 0) {
4860
+ this.current++;
4861
+ let e = this.future.shift();
4862
+ return this.history.push(e), e;
4863
+ }
4864
+ let t = Z.random(0, this.length);
4865
+ for (; this.history.includes(t); )
4866
+ t = Z.random(0, this.length);
4867
+ return this.current != null && this.history.push(t), this.current = this.history.length, t;
4868
+ }
4869
+ }
4870
+ class cr {
4761
4871
  /**
4762
4872
  * 开启表单监控
4763
4873
  */
4764
4874
  async open(t, e, s) {
4765
- let l = await E.provider.getDefault(e), r = await l.getAsync(s);
4766
- r && Y.mergeTo(t, r), X(() => t, (i, a) => {
4875
+ let l = await C.provider.getDefault(e), r = await l.getAsync(s);
4876
+ r && X.mergeTo(t, r), J(() => t, (i, a) => {
4767
4877
  l && l.saveAsync(s, t);
4768
4878
  }, { deep: !0 });
4769
4879
  }
@@ -4773,49 +4883,49 @@ class dr {
4773
4883
  dispose() {
4774
4884
  }
4775
4885
  }
4776
- const fl = /* @__PURE__ */ Q({
4886
+ const pl = /* @__PURE__ */ Q({
4777
4887
  __name: "Fill",
4778
4888
  emits: ["resize"],
4779
4889
  setup(u, { emit: t }) {
4780
- let e = t, s = I(), l = I(), r = I(), i = new ft(), a = () => {
4781
- let h = R.siblings(s.value);
4782
- r.value = R.getHeight(h);
4890
+ let e = t, s = R(), l = R(), r = R(), i = new gt(), a = () => {
4891
+ let h = j.siblings(s.value);
4892
+ r.value = j.getHeight(h);
4783
4893
  }, o = () => {
4784
- l.value = R.getHeight(s.value), e("resize", l.value);
4894
+ l.value = j.getHeight(s.value), e("resize", l.value);
4785
4895
  }, c = () => {
4786
4896
  o();
4787
4897
  };
4788
- return be(() => {
4898
+ return ve(() => {
4789
4899
  a(), o(), i.resize(s.value, c);
4790
- }), xe(() => {
4900
+ }), we(() => {
4791
4901
  i.dispose();
4792
- }), (h, d) => (O(), _("div", {
4902
+ }), (h, d) => (I(), B("div", {
4793
4903
  class: "ha-fill",
4794
4904
  ref_key: "fillRef",
4795
4905
  ref: s,
4796
- style: fe({ height: `calc(100% - ${y(r)}px)` })
4906
+ style: pe({ height: `calc(100% - ${y(r)}px)` })
4797
4907
  }, [
4798
- ge(h.$slots, "default")
4908
+ he(h.$slots, "default")
4799
4909
  ], 4));
4800
4910
  }
4801
- }), ml = /* @__PURE__ */ Q({
4911
+ }), fl = /* @__PURE__ */ Q({
4802
4912
  __name: "Scroller",
4803
4913
  props: {
4804
4914
  options: {}
4805
4915
  },
4806
4916
  emits: ["scroll"],
4807
4917
  setup(u, { expose: t, emit: e }) {
4808
- let s = e, l = u, { options: r } = se(l), i = I(), a = I(), o = I(), c = I(), h = I(!1), d = null, p = null, f = new ft(), b = I({ top: null, height: null }), N = (v) => {
4918
+ let s = e, l = u, { options: r } = se(l), i = R(), a = R(), o = R(), c = R(), h = R(!1), d = null, p = null, g = new gt(), x = R({ top: null, height: null }), N = (v) => {
4809
4919
  if (p == 0)
4810
4920
  return 0;
4811
4921
  let w = p - d;
4812
4922
  return v / w;
4813
4923
  }, V = (v) => {
4814
- let w = d - b.value.height;
4924
+ let w = d - x.value.height;
4815
4925
  return v / w;
4816
- }, ce = (v) => {
4817
- let w = v.target, j = N(w.scrollTop);
4818
- L(j), s("scroll", w);
4926
+ }, ue = (v) => {
4927
+ let w = v.target, O = N(w.scrollTop);
4928
+ L(O), s("scroll", w);
4819
4929
  }, le = () => {
4820
4930
  if (p == 0)
4821
4931
  return 80;
@@ -4823,80 +4933,80 @@ const fl = /* @__PURE__ */ Q({
4823
4933
  if (v == 1)
4824
4934
  return 0;
4825
4935
  let w = d * v;
4826
- return ne.between(w, 80, 500);
4827
- }, g = (v, w) => {
4828
- let j = N(v), q = (d - w) * j;
4829
- return ne.between(q, 0, d - w);
4830
- }, C = (v) => {
4936
+ return Z.between(w, 80, 500);
4937
+ }, f = (v, w) => {
4938
+ let O = N(v), z = (d - w) * O;
4939
+ return Z.between(z, 0, d - w);
4940
+ }, E = (v) => {
4831
4941
  let w = le();
4832
- return { top: g(v, w), height: w };
4942
+ return { top: f(v, w), height: w };
4833
4943
  }, m = (v) => {
4834
4944
  }, $ = (v) => {
4835
4945
  let w = N(v);
4836
4946
  L(w);
4837
4947
  }, L = (v) => {
4838
- let w = ne.between(v, 0, 1), j = d - b.value.height;
4839
- b.value.top = j * w;
4840
- let ye = (p - d) * w;
4841
- r.value.scrollTop = ye, a.value.scrollTop != ye && (a.value.scrollTop = ye);
4842
- }, P = () => {
4948
+ let w = Z.between(v, 0, 1), O = d - x.value.height;
4949
+ x.value.top = O * w;
4950
+ let ge = (p - d) * w;
4951
+ r.value.scrollTop = ge, a.value.scrollTop != ge && (a.value.scrollTop = ge);
4952
+ }, U = () => {
4843
4953
  let v = r.value.scrollTop;
4844
- b.value = C(v), $(v);
4845
- }, Z = (v) => {
4846
- d = R.getHeight(a.value), p = a.value.scrollHeight;
4954
+ x.value = E(v), $(v);
4955
+ }, G = (v) => {
4956
+ d = j.getHeight(a.value), p = a.value.scrollHeight;
4847
4957
  let w = le();
4848
- b.value.height = w, b.value.top = g(r.value.scrollTop, w);
4849
- }, ie = (v) => {
4958
+ x.value.height = w, x.value.top = f(r.value.scrollTop, w);
4959
+ }, ne = (v) => {
4850
4960
  let w = v.target;
4851
4961
  return parseInt(w.style.top);
4852
- }, re = (v, w, j, q) => {
4853
- let ye = v.y - w.y, mt = j + ye, yt = V(mt);
4962
+ }, re = (v, w, O, z) => {
4963
+ let ge = v.y - w.y, mt = O + ge, yt = V(mt);
4854
4964
  L(yt);
4855
- }, ke = (v) => {
4965
+ }, be = (v) => {
4856
4966
  h.value = !0;
4857
- }, Se = (v) => {
4967
+ }, xe = (v) => {
4858
4968
  h.value = !1;
4859
4969
  };
4860
- return be(() => {
4861
- P(), f.scroll(a.value, ce), f.drag(c.value, { init: ie, handler: re }), f.observe(a.value, Z), f.mouseDown(c.value, ke, Se);
4862
- }), xe(() => {
4863
- f.dispose();
4864
- }), X(() => r.value.scrollTop, (v, w) => {
4865
- let j = N(v);
4866
- L(j);
4867
- }), t({ scrollTo: $, update: P }), (v, w) => (O(), _("div", {
4970
+ return ve(() => {
4971
+ U(), g.scroll(a.value, ue), g.drag(c.value, { init: ne, handler: re }), g.observe(a.value, G), g.mouseDown(c.value, be, xe);
4972
+ }), we(() => {
4973
+ g.dispose();
4974
+ }), J(() => r.value.scrollTop, (v, w) => {
4975
+ let O = N(v);
4976
+ L(O);
4977
+ }), t({ scrollTo: $, update: U }), (v, w) => (I(), B("div", {
4868
4978
  ref_key: "scrollerRef",
4869
4979
  ref: i,
4870
- class: Ae(["ha-scroller", { hover: y(h) }])
4980
+ class: $e(["ha-scroller", { hover: y(h) }])
4871
4981
  }, [
4872
4982
  D("div", {
4873
4983
  ref_key: "containerRef",
4874
4984
  ref: a,
4875
4985
  class: "scroller-container"
4876
4986
  }, [
4877
- ge(v.$slots, "default")
4987
+ he(v.$slots, "default")
4878
4988
  ], 512),
4879
4989
  D("div", {
4880
4990
  ref_key: "trackRef",
4881
4991
  ref: o,
4882
4992
  class: "scroller-track",
4883
4993
  onClick: w[0] || (w[0] = //@ts-ignore
4884
- (...j) => y(m) && y(m)(...j))
4994
+ (...O) => y(m) && y(m)(...O))
4885
4995
  }, [
4886
4996
  D("div", {
4887
4997
  ref_key: "thumbRef",
4888
4998
  ref: c,
4889
4999
  class: "scroller-thumb",
4890
- style: fe({ top: `${y(b).top}px`, height: `${y(b).height}px` })
4891
- }, pe(y(r).scrollTop), 5)
5000
+ style: pe({ top: `${y(x).top}px`, height: `${y(x).height}px` })
5001
+ }, de(y(r).scrollTop), 5)
4892
5002
  ], 512)
4893
5003
  ], 2));
4894
5004
  }
4895
- }), hr = /* @__PURE__ */ Q({
5005
+ }), dr = /* @__PURE__ */ Q({
4896
5006
  __name: "Timer",
4897
5007
  emits: ["change"],
4898
5008
  setup(u, { expose: t, emit: e }) {
4899
- let s = e, l = -8 * 60 * 60 * 1e3, r = I(l), i = null, a = 5, o = () => {
5009
+ let s = e, l = -8 * 60 * 60 * 1e3, r = R(l), i = null, a = 5, o = () => {
4900
5010
  i == null && (i = setInterval(() => {
4901
5011
  r.value += a, s("change", r.value);
4902
5012
  }, a));
@@ -4907,14 +5017,14 @@ const fl = /* @__PURE__ */ Q({
4907
5017
  }, d = () => {
4908
5018
  clearInterval(i), r.value = l;
4909
5019
  };
4910
- return xe(() => {
5020
+ return we(() => {
4911
5021
  clearInterval(i);
4912
- }), t({ restart: c, start: o, stop: h, reset: d }), (p, f) => (O(), _("span", null, [
4913
- ge(p.$slots, "default"),
4914
- xt(pe(y(te).format(y(r), "HH:mm:ss SSS")), 1)
5022
+ }), t({ restart: c, start: o, stop: h, reset: d }), (p, g) => (I(), B("span", null, [
5023
+ he(p.$slots, "default"),
5024
+ xt(de(y(te).format(y(r), "HH:mm:ss SSS")), 1)
4915
5025
  ]));
4916
5026
  }
4917
- }), pr = /* @__PURE__ */ Q({
5027
+ }), hr = /* @__PURE__ */ Q({
4918
5028
  __name: "Code",
4919
5029
  props: {
4920
5030
  config: { default: {} },
@@ -4923,55 +5033,55 @@ const fl = /* @__PURE__ */ Q({
4923
5033
  },
4924
5034
  emits: ["mounted", "change", "scroll", "update:modelValue"],
4925
5035
  setup(u, { expose: t, emit: e }) {
4926
- let s = e, l = u, { config: r, border: i, modelValue: a } = se(l), o = null, c = null, h = null, d = I(), { app: p } = H.sys, f = (g) => g == "default" ? null : "vs-dark", b = (g) => {
4927
- if (H.editor.completions[g])
5036
+ let s = e, l = u, { config: r, border: i, modelValue: a } = se(l), o = null, c = null, h = null, d = R(), { app: p } = ee.sys, g = (f) => f == "default" ? null : "vs-dark", x = (f) => {
5037
+ if (ee.editor.completions[f])
4928
5038
  return;
4929
- let C = o.languages.getLanguages().find(($) => $.id == g);
4930
- if (!C)
5039
+ let E = o.languages.getLanguages().find(($) => $.id == f);
5040
+ if (!E)
4931
5041
  return;
4932
- let m = C.loader;
5042
+ let m = E.loader;
4933
5043
  m && m().then(($) => {
4934
- H.editor.completions[g] || (N($, g), H.editor.completions[g] = !0);
5044
+ ee.editor.completions[f] || (N($, f), ee.editor.completions[f] = !0);
4935
5045
  });
4936
- }, N = (g, C) => o.languages.registerCompletionItemProvider(C, {
5046
+ }, N = (f, E) => o.languages.registerCompletionItemProvider(E, {
4937
5047
  provideCompletionItems: ($, L) => {
4938
- let P = $.getWordUntilPosition(L), Z = {
5048
+ let U = $.getWordUntilPosition(L), G = {
4939
5049
  startLineNumber: L.lineNumber,
4940
5050
  endLineNumber: L.lineNumber,
4941
- startColumn: P.startColumn,
4942
- endColumn: P.endColumn
4943
- }, ie = [];
5051
+ startColumn: U.startColumn,
5052
+ endColumn: U.endColumn
5053
+ }, ne = [];
4944
5054
  const re = ["builtinFunctions", "keywords", "operators"];
4945
- for (let ke = 0; ke < re.length; ke++) {
4946
- const Se = re[ke];
4947
- let v = g.language[Se];
5055
+ for (let be = 0; be < re.length; be++) {
5056
+ const xe = re[be];
5057
+ let v = f.language[xe];
4948
5058
  v && v.forEach((w) => {
4949
- let j = w.toLowerCase(), q = {
4950
- label: j,
5059
+ let O = w.toLowerCase(), z = {
5060
+ label: O,
4951
5061
  kind: null,
4952
- insertText: j,
4953
- range: Z,
5062
+ insertText: O,
5063
+ range: G,
4954
5064
  documentation: w
4955
5065
  };
4956
- Se == "keywords" ? (q.kind = o.languages.CompletionItemKind.Keyword, q.detail = "关键词") : Se == "operators" ? (q.kind = o.languages.CompletionItemKind.Operator, q.insertText += " ", q.detail = "操作符") : (q.kind = o.languages.CompletionItemKind.Function, q.insertText += "()", q.detail = "函数"), ie.push(q);
5066
+ xe == "keywords" ? (z.kind = o.languages.CompletionItemKind.Keyword, z.detail = "关键词") : xe == "operators" ? (z.kind = o.languages.CompletionItemKind.Operator, z.insertText += " ", z.detail = "操作符") : (z.kind = o.languages.CompletionItemKind.Function, z.insertText += "()", z.detail = "函数"), ne.push(z);
4957
5067
  });
4958
5068
  }
4959
- return { suggestions: ie };
5069
+ return { suggestions: ne };
4960
5070
  }
4961
5071
  }), V = () => {
4962
- let g = null;
4963
- r.value.schema && (g = r.value.category + "/" + W.getUniqueId(), H.tryAddSchema(g, r.value.category, r.value.schema));
4964
- let C = {
5072
+ let f = null;
5073
+ r.value.schema && (f = r.value.category + "/" + M.getUniqueId(), ee.tryAddSchema(f, r.value.category, r.value.schema));
5074
+ let E = {
4965
5075
  validate: !0,
4966
5076
  allowComments: !0,
4967
5077
  //允许配置注释
4968
5078
  //保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
4969
- schemas: Y.clone(H.editor.schemas),
5079
+ schemas: X.clone(ee.editor.schemas),
4970
5080
  trailingCommas: "ignore"
4971
5081
  //允许末尾逗号
4972
5082
  };
4973
- o.languages.json.jsonDefaults.setDiagnosticsOptions(C), b(r.value.language);
4974
- let m = g ? o.Uri.parse(g) : null;
5083
+ o.languages.json.jsonDefaults.setDiagnosticsOptions(E), x(r.value.language);
5084
+ let m = f ? o.Uri.parse(f) : null;
4975
5085
  h = o.editor.createModel(a.value, r.value.language, m);
4976
5086
  let $ = {
4977
5087
  tabSize: 2,
@@ -4984,7 +5094,7 @@ const fl = /* @__PURE__ */ Q({
4984
5094
  //默认已启用代码图
4985
5095
  scrollbar: { verticalScrollbarSize: 0 },
4986
5096
  //关闭最右侧垂直滚动条
4987
- theme: f(p.theme),
5097
+ theme: g(p.theme),
4988
5098
  automaticLayout: !0,
4989
5099
  //根据父元素自动布局
4990
5100
  model: h
@@ -4992,55 +5102,55 @@ const fl = /* @__PURE__ */ Q({
4992
5102
  c = o.editor.create(d.value, $), r.value.scrollTop && c.setScrollTop(r.value.scrollTop);
4993
5103
  let L = r.value.selection;
4994
5104
  if (L) {
4995
- let P = {
5105
+ let U = {
4996
5106
  startLineNumber: L.startLine,
4997
5107
  endLineNumber: L.endLine,
4998
5108
  startColumn: L.startColumn,
4999
5109
  endColumn: L.endColumn
5000
5110
  };
5001
- c.setSelection(P);
5111
+ c.setSelection(U);
5002
5112
  }
5003
- c.onDidScrollChange((P) => {
5004
- s("scroll", P.scrollTop);
5005
- }), c.onDidChangeModelContent((P) => {
5006
- let Z = c.getValue();
5007
- s("update:modelValue", Z), s("change", Z);
5113
+ c.onDidScrollChange((U) => {
5114
+ s("scroll", U.scrollTop);
5115
+ }), c.onDidChangeModelContent((U) => {
5116
+ let G = c.getValue();
5117
+ s("update:modelValue", G), s("change", G);
5008
5118
  });
5009
5119
  };
5010
- be(async () => {
5011
- o = await me.getMonaco(), d.value && (V(), s("mounted", o, c));
5120
+ ve(async () => {
5121
+ o = await fe.getMonaco(), d.value && (V(), s("mounted", o, c));
5012
5122
  });
5013
- let ce = () => {
5123
+ let ue = () => {
5014
5124
  c == null || c.layout();
5015
5125
  }, le = () => c;
5016
- return xe(() => {
5126
+ return we(() => {
5017
5127
  h == null || h.dispose(), c == null || c.dispose();
5018
- }), X(() => p.theme, (g, C) => {
5019
- let m = f(g);
5128
+ }), J(() => p.theme, (f, E) => {
5129
+ let m = g(f);
5020
5130
  o.editor.setTheme(m);
5021
- }), X(() => p.language, (g, C) => {
5022
- }), X(() => a.value, (g, C) => {
5131
+ }), J(() => p.language, (f, E) => {
5132
+ }), J(() => a.value, (f, E) => {
5023
5133
  if (!c)
5024
5134
  return;
5025
5135
  let m = c.getValue();
5026
- g != m && c.setValue(g ?? "");
5027
- }), X(() => r.value.language, (g, C) => {
5136
+ f != m && c.setValue(f ?? "");
5137
+ }), J(() => r.value.language, (f, E) => {
5028
5138
  if (!c)
5029
5139
  return;
5030
5140
  let m = c.getModel();
5031
- o.editor.setModelLanguage(m, g), b(g);
5032
- }), t({ layout: ce, getEditor: le }), (g, C) => (O(), He(fl, null, {
5033
- default: Ne(() => [
5141
+ o.editor.setModelLanguage(m, f), x(f);
5142
+ }), t({ layout: ue, getEditor: le }), (f, E) => (I(), Ze(pl, null, {
5143
+ default: Fe(() => [
5034
5144
  D("div", {
5035
5145
  ref_key: "monacoEditorRef",
5036
5146
  ref: d,
5037
- class: Ae(["ha-code", { border: y(i) }])
5147
+ class: $e(["ha-code", { border: y(i) }])
5038
5148
  }, null, 2)
5039
5149
  ]),
5040
5150
  _: 1
5041
5151
  }));
5042
5152
  }
5043
- }), gr = /* @__PURE__ */ Q({
5153
+ }), pr = /* @__PURE__ */ Q({
5044
5154
  __name: "Compare",
5045
5155
  props: {
5046
5156
  inline: { type: Boolean, default: !1 },
@@ -5050,75 +5160,75 @@ const fl = /* @__PURE__ */ Q({
5050
5160
  },
5051
5161
  emits: ["update:modelValue", "update:original", "change"],
5052
5162
  setup(u, { emit: t }) {
5053
- let e = t, s = u, { inline: l, language: r, original: i, modelValue: a } = se(s), o = null, c = null, h = null, d = null, p = null, f = null, b = I(), N = I(), { app: V } = H.sys, ce = (g) => {
5054
- c = g.editor.createModel(i.value, r.value), h = g.editor.createModel(a.value, r.value), o = g.editor.createDiffEditor(b.value, {
5163
+ let e = t, s = u, { inline: l, language: r, original: i, modelValue: a } = se(s), o = null, c = null, h = null, d = null, p = null, g = null, x = R(), N = R(), { app: V } = ee.sys, ue = (f) => {
5164
+ c = f.editor.createModel(i.value, r.value), h = f.editor.createModel(a.value, r.value), o = f.editor.createDiffEditor(x.value, {
5055
5165
  originalEditable: !0,
5056
5166
  automaticLayout: !0,
5057
5167
  renderSideBySide: !l.value,
5058
5168
  //是否启用行内模式
5059
5169
  theme: le(V.theme)
5060
- }), o.setModel({ original: c, modified: h }), d = o.getOriginalEditor(), d.onDidChangeModelContent((C) => {
5170
+ }), o.setModel({ original: c, modified: h }), d = o.getOriginalEditor(), d.onDidChangeModelContent((E) => {
5061
5171
  let m = d.getValue();
5062
5172
  e("update:original", m), e("change", m);
5063
- }), p = o.getModifiedEditor(), p.onDidChangeModelContent((C) => {
5173
+ }), p = o.getModifiedEditor(), p.onDidChangeModelContent((E) => {
5064
5174
  let m = p.getValue();
5065
5175
  e("update:modelValue", m);
5066
5176
  });
5067
- }, le = (g) => g == "default" ? null : "vs-dark";
5068
- return be(async () => {
5069
- f = await me.getMonaco(), ce(f);
5070
- }), X(() => V.theme, (g, C) => {
5071
- let m = le(g);
5072
- f.editor.setTheme(m);
5073
- }), X(() => r.value, (g, C) => {
5074
- c && f.editor.setModelLanguage(c, g), h && f.editor.setModelLanguage(h, g);
5075
- }), X(() => i.value, (g, C) => {
5177
+ }, le = (f) => f == "default" ? null : "vs-dark";
5178
+ return ve(async () => {
5179
+ g = await fe.getMonaco(), ue(g);
5180
+ }), J(() => V.theme, (f, E) => {
5181
+ let m = le(f);
5182
+ g.editor.setTheme(m);
5183
+ }), J(() => r.value, (f, E) => {
5184
+ c && g.editor.setModelLanguage(c, f), h && g.editor.setModelLanguage(h, f);
5185
+ }), J(() => i.value, (f, E) => {
5076
5186
  if (!c)
5077
5187
  return;
5078
5188
  let m = c.getValue();
5079
- g != m && c.setValue(g ?? "");
5080
- }), X(() => a.value, (g, C) => {
5189
+ f != m && c.setValue(f ?? "");
5190
+ }), J(() => a.value, (f, E) => {
5081
5191
  if (!h)
5082
5192
  return;
5083
5193
  let m = h.getValue();
5084
- g != m && h.setValue(g ?? "");
5085
- }), (g, C) => (O(), _("div", {
5194
+ f != m && h.setValue(f ?? "");
5195
+ }), (f, E) => (I(), B("div", {
5086
5196
  ref_key: "compareRef",
5087
- ref: b,
5197
+ ref: x,
5088
5198
  class: "ha-compare",
5089
- style: fe(y(N))
5199
+ style: pe(y(N))
5090
5200
  }, null, 4));
5091
5201
  }
5092
- }), ze = (u, t) => {
5202
+ }), Ne = (u, t) => {
5093
5203
  const e = u.__vccOpts || u;
5094
5204
  for (const [s, l] of t)
5095
5205
  e[s] = l;
5096
5206
  return e;
5097
- }, yl = {}, vl = { class: "ha-option" };
5098
- function wl(u, t) {
5099
- return O(), _("div", vl, "选项");
5207
+ }, gl = {}, ml = { class: "ha-option" };
5208
+ function yl(u, t) {
5209
+ return I(), B("div", ml, "选项");
5100
5210
  }
5101
- const bl = /* @__PURE__ */ ze(yl, [["render", wl]]), xl = { class: "ha-rich-text" }, kl = /* @__PURE__ */ Et('<div class="ql-formats"><button class="ql-bold" data-toggle="tooltip" data-placement="bottom" title="Bold"></button><button class="ql-italic" data-toggle="tooltip" data-placement="bottom" title="Italic &lt;ctrl+i&gt;"></button><button class="ql-date" data-toggle="tooltip" data-placement="bottom" title="Date"></button><button class="ql-underline" data-toggle="tooltip" data-placement="bottom" title="Underline"></button><button class="ql-strike" data-toggle="tooltip" data-placement="bottom" title="Strike"></button></div><div class="ql-formats"><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="ordered"></button><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="bullet"></button><select class="ql-color"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select><select class="ql-background"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select></div><div class="ql-formats"><button class="ql-code-block" data-toggle="tooltip" data-placement="bottom" title="Code"></button><button class="ql-blockquote" data-toggle="tooltip" data-placement="bottom" title="Block quote"></button><button class="ql-link" data-toggle="tooltip" data-placement="bottom" title="Link"></button></div><div class="ql-formats"><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="1"></button><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="2"></button><select class="ql-align"><option selected></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></div><div class="ql-formats"><select class="ql-size"><option value="small"></option><option selected></option><option value="large"></option><option value="huge"></option></select><select class="ql-header"><option value=""></option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option></select></div><div class="ql-formats"><select class="ql-font"><option selected></option><option value="serif"></option><option value="monospace"></option></select></div><div class="ql-formats"><button class="ql-image" data-toggle="tooltip" data-placement="bottom" title="Image"></button><button class="ql-video" data-toggle="tooltip" data-placement="bottom" title="Video"></button><button class="ql-clean" data-toggle="tooltip" data-placement="bottom" title="Clean"></button></div>', 7), Sl = [
5102
- kl
5211
+ const vl = /* @__PURE__ */ Ne(gl, [["render", yl]]), wl = { class: "ha-rich-text" }, bl = /* @__PURE__ */ Ct('<div class="ql-formats"><button class="ql-bold" data-toggle="tooltip" data-placement="bottom" title="Bold"></button><button class="ql-italic" data-toggle="tooltip" data-placement="bottom" title="Italic &lt;ctrl+i&gt;"></button><button class="ql-date" data-toggle="tooltip" data-placement="bottom" title="Date"></button><button class="ql-underline" data-toggle="tooltip" data-placement="bottom" title="Underline"></button><button class="ql-strike" data-toggle="tooltip" data-placement="bottom" title="Strike"></button></div><div class="ql-formats"><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="ordered"></button><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="bullet"></button><select class="ql-color"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select><select class="ql-background"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select></div><div class="ql-formats"><button class="ql-code-block" data-toggle="tooltip" data-placement="bottom" title="Code"></button><button class="ql-blockquote" data-toggle="tooltip" data-placement="bottom" title="Block quote"></button><button class="ql-link" data-toggle="tooltip" data-placement="bottom" title="Link"></button></div><div class="ql-formats"><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="1"></button><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="2"></button><select class="ql-align"><option selected></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></div><div class="ql-formats"><select class="ql-size"><option value="small"></option><option selected></option><option value="large"></option><option value="huge"></option></select><select class="ql-header"><option value=""></option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option></select></div><div class="ql-formats"><select class="ql-font"><option selected></option><option value="serif"></option><option value="monospace"></option></select></div><div class="ql-formats"><button class="ql-image" data-toggle="tooltip" data-placement="bottom" title="Image"></button><button class="ql-video" data-toggle="tooltip" data-placement="bottom" title="Video"></button><button class="ql-clean" data-toggle="tooltip" data-placement="bottom" title="Clean"></button></div>', 7), xl = [
5212
+ bl
5103
5213
  ], fr = /* @__PURE__ */ Q({
5104
5214
  __name: "RichText",
5105
- props: /* @__PURE__ */ Ke({
5215
+ props: /* @__PURE__ */ Ve({
5106
5216
  options: {}
5107
5217
  }, {
5108
5218
  modelValue: {},
5109
5219
  modelModifiers: {}
5110
5220
  }),
5111
- emits: /* @__PURE__ */ Ke(["change", "scroll"], ["update:modelValue"]),
5221
+ emits: /* @__PURE__ */ Ve(["change", "scroll"], ["update:modelValue"]),
5112
5222
  setup(u, { expose: t, emit: e }) {
5113
- let s = e, l = u, { options: r } = se(l), i = et(u, "modelValue"), a, o = null, c = null, h = !1, d = !1, p = I(), f = I(), b = I(), N = I(!1), V = I({ style: null, options: { scrollTop: 0 } }), ce = (m) => {
5114
- let $ = te.getDateString(), L = getSelection(), P = L.getRangeAt(0), Z = P.startContainer;
5115
- if (Z.nodeName == "#text")
5116
- Z.insertData(P.startOffset, $), P.setStart(Z, P.startOffset + $.length), L.removeAllRanges(), L.addRange(P);
5223
+ let s = e, l = u, { options: r } = se(l), i = He(u, "modelValue"), a, o = null, c = null, h = !1, d = !1, p = R(), g = R(), x = R(), N = R(!1), V = R({ style: null, options: { scrollTop: 0 } }), ue = (m) => {
5224
+ let $ = te.getDateString(), L = getSelection(), U = L.getRangeAt(0), G = U.startContainer;
5225
+ if (G.nodeName == "#text")
5226
+ G.insertData(U.startOffset, $), U.setStart(G, U.startOffset + $.length), L.removeAllRanges(), L.addRange(U);
5117
5227
  else {
5118
- let ie = document.createTextNode($);
5119
- Z.appendChild(ie);
5228
+ let ne = document.createTextNode($);
5229
+ G.appendChild(ne);
5120
5230
  let re = document.createRange();
5121
- re.selectNodeContents(ie), re.setStart(ie, re.startOffset + $.length), L.removeAllRanges(), L.addRange(re);
5231
+ re.selectNodeContents(ne), re.setStart(ne, re.startOffset + $.length), L.removeAllRanges(), L.addRange(re);
5122
5232
  }
5123
5233
  }, le = (m) => {
5124
5234
  if (o.scrollTop = m.scrollTop, h || d) {
@@ -5126,50 +5236,50 @@ const bl = /* @__PURE__ */ ze(yl, [["render", wl]]), xl = { class: "ha-rich-text
5126
5236
  return;
5127
5237
  }
5128
5238
  c = m, s("scroll", m);
5129
- }, g = () => `height: calc(100% - ${R.getHeight(f.value)}px)`, C = async () => {
5130
- let m = await me.getQuill();
5239
+ }, f = () => `height: calc(100% - ${j.getHeight(g.value)}px)`, E = async () => {
5240
+ let m = await fe.getQuill();
5131
5241
  a = new m(p.value, {
5132
5242
  modules: {
5133
5243
  toolbar: {
5134
- container: f.value,
5135
- handlers: { date: ce }
5244
+ container: g.value,
5245
+ handlers: { date: ue }
5136
5246
  }
5137
5247
  },
5138
5248
  theme: "snow"
5139
- }), N.value = !0, We(() => {
5140
- V.value.style = g();
5141
- }), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value, V.value.options.scrollTop = r.value.scrollTop, a.on("text-change", ($, L, P) => {
5249
+ }), N.value = !0, ze(() => {
5250
+ V.value.style = f();
5251
+ }), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value, V.value.options.scrollTop = r.value.scrollTop, a.on("text-change", ($, L, U) => {
5142
5252
  o.innerHTML != i.value && (h = !0, i.value = o.innerHTML);
5143
5253
  }), o.addEventListener("paste", ($) => {
5144
5254
  d = !0;
5145
5255
  });
5146
5256
  };
5147
- return be(() => {
5148
- C();
5149
- }), xe(() => {
5257
+ return ve(() => {
5258
+ E();
5259
+ }), we(() => {
5150
5260
  a = null;
5151
- }), X(() => i.value, (m, $) => {
5261
+ }), J(() => i.value, (m, $) => {
5152
5262
  o && o.innerHTML != m && (o.innerHTML = m);
5153
- }), X(() => r.value.scrollTop, (m, $) => {
5154
- m != null && (c == null ? void 0 : c.scrollTop) != m && We(() => {
5263
+ }), J(() => r.value.scrollTop, (m, $) => {
5264
+ m != null && (c == null ? void 0 : c.scrollTop) != m && ze(() => {
5155
5265
  V.value.options.scrollTop = m;
5156
5266
  });
5157
- }), t({}), (m, $) => (O(), _("div", xl, [
5267
+ }), t({}), (m, $) => (I(), B("div", wl, [
5158
5268
  kt(D("div", {
5159
5269
  ref_key: "toolbarRef",
5160
- ref: f
5161
- }, Sl, 512), [
5270
+ ref: g
5271
+ }, xl, 512), [
5162
5272
  [St, y(N)]
5163
5273
  ]),
5164
- Ce(y(ml), {
5274
+ Se(y(fl), {
5165
5275
  ref_key: "scrollerRef",
5166
- ref: b,
5276
+ ref: x,
5167
5277
  class: "ql-body",
5168
5278
  options: y(V).options,
5169
5279
  onScroll: y(le),
5170
- style: fe(y(V).style)
5280
+ style: pe(y(V).style)
5171
5281
  }, {
5172
- default: Ne(() => [
5282
+ default: Fe(() => [
5173
5283
  D("div", {
5174
5284
  ref_key: "editorRef",
5175
5285
  ref: p
@@ -5179,17 +5289,17 @@ const bl = /* @__PURE__ */ ze(yl, [["render", wl]]), xl = { class: "ha-rich-text
5179
5289
  }, 8, ["options", "onScroll", "style"])
5180
5290
  ]));
5181
5291
  }
5182
- }), El = {}, Cl = { class: "ha-select" }, Tl = /* @__PURE__ */ D("div", { class: "select-title" }, "头", -1), $l = /* @__PURE__ */ D("div", { class: "select-body" }, [
5292
+ }), kl = {}, Sl = { class: "ha-select" }, Cl = /* @__PURE__ */ D("div", { class: "select-title" }, "头", -1), El = /* @__PURE__ */ D("div", { class: "select-body" }, [
5183
5293
  /* @__PURE__ */ D("input", { type: "text" })
5184
- ], -1), Ll = [
5185
- Tl,
5186
- $l
5294
+ ], -1), Tl = [
5295
+ Cl,
5296
+ El
5187
5297
  ];
5188
- function Al(u, t) {
5189
- return O(), _("div", Cl, Ll);
5298
+ function $l(u, t) {
5299
+ return I(), B("div", Sl, Tl);
5190
5300
  }
5191
- const Be = /* @__PURE__ */ ze(El, [["render", Al]]);
5192
- class mr {
5301
+ const je = /* @__PURE__ */ Ne(kl, [["render", $l]]);
5302
+ class gr {
5193
5303
  /**
5194
5304
  * 初始化
5195
5305
  */
@@ -5213,7 +5323,7 @@ class mr {
5213
5323
  this.startLine = t, this.endLine = e, this.startColumn = s, this.endColumn = l;
5214
5324
  }
5215
5325
  }
5216
- const Dl = { class: "ha-condition" }, Il = /* @__PURE__ */ Q({
5326
+ const Ll = { class: "ha-condition" }, Al = /* @__PURE__ */ Q({
5217
5327
  __name: "Condition",
5218
5328
  props: {
5219
5329
  name: {},
@@ -5222,79 +5332,79 @@ const Dl = { class: "ha-condition" }, Il = /* @__PURE__ */ Q({
5222
5332
  },
5223
5333
  setup(u) {
5224
5334
  let t = u, { name: e, operator: s, value: l } = se(t);
5225
- return (r, i) => (O(), _("div", Dl, [
5226
- Ce(y(Be), {
5335
+ return (r, i) => (I(), B("div", Ll, [
5336
+ Se(y(je), {
5227
5337
  modelValue: y(e),
5228
- "onUpdate:modelValue": i[0] || (i[0] = (a) => _e(e) ? e.value = a : e = a)
5338
+ "onUpdate:modelValue": i[0] || (i[0] = (a) => Oe(e) ? e.value = a : e = a)
5229
5339
  }, null, 8, ["modelValue"]),
5230
- Ce(y(Be), {
5340
+ Se(y(je), {
5231
5341
  modelValue: y(s),
5232
- "onUpdate:modelValue": i[1] || (i[1] = (a) => _e(s) ? s.value = a : s = a)
5342
+ "onUpdate:modelValue": i[1] || (i[1] = (a) => Oe(s) ? s.value = a : s = a)
5233
5343
  }, {
5234
- default: Ne(() => [
5235
- Ce(y(bl))
5344
+ default: Fe(() => [
5345
+ Se(y(vl))
5236
5346
  ]),
5237
5347
  _: 1
5238
5348
  }, 8, ["modelValue"]),
5239
- Ce(y(Be), {
5349
+ Se(y(je), {
5240
5350
  modelValue: y(l),
5241
- "onUpdate:modelValue": i[2] || (i[2] = (a) => _e(l) ? l.value = a : l = a)
5351
+ "onUpdate:modelValue": i[2] || (i[2] = (a) => Oe(l) ? l.value = a : l = a)
5242
5352
  }, null, 8, ["modelValue"])
5243
5353
  ]));
5244
5354
  }
5245
- }), Ol = { class: "ha-condition-group" }, yr = /* @__PURE__ */ Q({
5355
+ }), Dl = { class: "ha-condition-group" }, mr = /* @__PURE__ */ Q({
5246
5356
  __name: "Index",
5247
5357
  props: {
5248
5358
  conditions: {}
5249
5359
  },
5250
5360
  setup(u) {
5251
5361
  let t = u, { conditions: e } = se(t);
5252
- return (s, l) => (O(), _("div", Ol, [
5253
- (O(!0), _(Ct, null, Tt(y(e), (r) => (O(), He(y(Il), {
5362
+ return (s, l) => (I(), B("div", Dl, [
5363
+ (I(!0), B(Et, null, Tt(y(e), (r) => (I(), Ze(y(Al), {
5254
5364
  name: r.name,
5255
5365
  operator: r.operator,
5256
5366
  value: r.value
5257
5367
  }, null, 8, ["name", "operator", "value"]))), 256))
5258
5368
  ]));
5259
5369
  }
5260
- }), jl = {}, Rl = { class: "ha-col" };
5261
- function _l(u, t) {
5262
- return O(), _("div", Rl, [
5263
- ge(u.$slots, "default")
5370
+ }), Rl = {}, Il = { class: "ha-col" };
5371
+ function Ol(u, t) {
5372
+ return I(), B("div", Il, [
5373
+ he(u.$slots, "default")
5264
5374
  ]);
5265
5375
  }
5266
- const vr = /* @__PURE__ */ ze(jl, [["render", _l]]), wr = /* @__PURE__ */ Q({
5376
+ const yr = /* @__PURE__ */ Ne(Rl, [["render", Ol]]), vr = /* @__PURE__ */ Q({
5267
5377
  __name: "Container",
5268
5378
  props: {
5269
5379
  container: { type: Boolean, default: !0 }
5270
5380
  },
5271
5381
  setup(u) {
5272
5382
  let t = u, { container: e } = se(t);
5273
- return (s, l) => (O(), _("div", {
5274
- class: Ae({ "ha-container": y(e) })
5383
+ return (s, l) => (I(), B("div", {
5384
+ class: $e({ "ha-container": y(e) })
5275
5385
  }, [
5276
- ge(s.$slots, "default")
5386
+ he(s.$slots, "default")
5277
5387
  ], 2));
5278
5388
  }
5279
- }), br = /* @__PURE__ */ Q({
5389
+ }), wr = /* @__PURE__ */ Q({
5280
5390
  __name: "Row",
5281
5391
  props: {
5282
5392
  gap: {},
5283
5393
  direction: {}
5284
5394
  },
5285
5395
  setup(u) {
5286
- let t = u, { gap: e, direction: s } = se(t), l = Te(() => {
5396
+ let t = u, { gap: e, direction: s } = se(t), l = Ce(() => {
5287
5397
  let r = { gap: null };
5288
5398
  return e.value && (r.gap = e.value + "px"), r;
5289
5399
  });
5290
- return (r, i) => (O(), _("div", {
5291
- class: Ae(["ha-row", y(s)]),
5292
- style: fe(y(l))
5400
+ return (r, i) => (I(), B("div", {
5401
+ class: $e(["ha-row", y(s)]),
5402
+ style: pe(y(l))
5293
5403
  }, [
5294
- ge(r.$slots, "default")
5404
+ he(r.$slots, "default")
5295
5405
  ], 6));
5296
5406
  }
5297
- }), xr = /* @__PURE__ */ Q({
5407
+ }), br = /* @__PURE__ */ Q({
5298
5408
  __name: "Progress",
5299
5409
  props: {
5300
5410
  modelValue: { type: Boolean },
@@ -5302,7 +5412,7 @@ const vr = /* @__PURE__ */ ze(jl, [["render", _l]]), wr = /* @__PURE__ */ Q({
5302
5412
  },
5303
5413
  emits: ["update:modelValue"],
5304
5414
  setup(u) {
5305
- let t = et(u, "modelValue"), e = I(!0), s = I(0), l = null, r = () => {
5415
+ let t = He(u, "modelValue"), e = R(!0), s = R(0), l = null, r = () => {
5306
5416
  s.value = 0, e.value = !0, l = setInterval(() => {
5307
5417
  if (s.value < 100) {
5308
5418
  s.value++;
@@ -5318,177 +5428,172 @@ const vr = /* @__PURE__ */ ze(jl, [["render", _l]]), wr = /* @__PURE__ */ Q({
5318
5428
  }, 200));
5319
5429
  }, c);
5320
5430
  };
5321
- return be(() => {
5431
+ return ve(() => {
5322
5432
  t.value && r();
5323
- }), xe(() => {
5433
+ }), we(() => {
5324
5434
  clearInterval(l);
5325
- }), X(() => t.value, (a, o) => {
5435
+ }), J(() => t.value, (a, o) => {
5326
5436
  a ? r() : i();
5327
- }), (a, o) => y(e) ? (O(), _("div", {
5437
+ }), (a, o) => y(e) ? (I(), B("div", {
5328
5438
  key: 0,
5329
5439
  class: "ha-progress",
5330
- style: fe({ width: y(s) + "%" })
5331
- }, null, 4)) : Ze("", !0);
5440
+ style: pe({ width: y(s) + "%" })
5441
+ }, null, 4)) : Ge("", !0);
5332
5442
  }
5333
- }), Bl = { class: "progress-tips" }, Pl = { class: "progress-tip info" }, Ul = { class: "progress-tip success" }, Fl = { class: "progress-tip error" }, Ml = { class: "progress-chart" }, Nl = { class: "progress-bar" }, Vl = { class: "progress-text" }, kr = /* @__PURE__ */ Q({
5443
+ }), jl = { class: "progress-tips" }, _l = { class: "progress-tip info" }, Bl = { class: "progress-tip success" }, Pl = { class: "progress-tip error" }, Ul = { class: "progress-chart" }, Fl = { class: "progress-bar" }, Ml = { class: "progress-text" }, xr = /* @__PURE__ */ Q({
5334
5444
  __name: "SocketProgress",
5335
5445
  props: {
5336
5446
  progress: {}
5337
5447
  },
5338
5448
  setup(u) {
5339
- let t = u, { progress: e } = se(t), s = Te(() => {
5449
+ let t = u, { progress: e } = se(t), s = Ce(() => {
5340
5450
  let a = e.value;
5341
5451
  return (a.succeed ?? 0) + (a.errored ?? 0);
5342
- }), l = Te(() => ne.getPercentage(s.value, e.value.total)), r = Te(() => ne.getProgressText(s.value, e.value.total)), i = Te(() => ne.getPercentageText(s.value, e.value.total));
5343
- return (a, o) => (O(), _("div", {
5344
- class: Ae(["ha-socket-progress", { error: y(e).errored > 0 }])
5452
+ }), l = Ce(() => Z.getPercentage(s.value, e.value.total)), r = Ce(() => Z.getProgressText(s.value, e.value.total)), i = Ce(() => Z.getPercentageText(s.value, e.value.total));
5453
+ return (a, o) => (I(), B("div", {
5454
+ class: $e(["ha-socket-progress", { error: y(e).errored > 0 }])
5345
5455
  }, [
5346
- D("div", Bl, [
5347
- D("div", Pl, "进度:" + pe(y(r)), 1),
5348
- D("div", Ul, "成功:" + pe(y(e).succeed ?? "-"), 1),
5349
- D("div", Fl, "异常:" + pe(y(e).errored ?? "-"), 1)
5456
+ D("div", jl, [
5457
+ D("div", _l, "进度:" + de(y(r)), 1),
5458
+ D("div", Bl, "成功:" + de(y(e).succeed ?? "-"), 1),
5459
+ D("div", Pl, "异常:" + de(y(e).errored ?? "-"), 1)
5350
5460
  ]),
5351
- D("div", Ml, [
5352
- D("div", Nl, [
5461
+ D("div", Ul, [
5462
+ D("div", Fl, [
5353
5463
  D("div", {
5354
5464
  class: "progress-percentage",
5355
- style: fe({ width: y(l) + "%" })
5465
+ style: pe({ width: y(l) + "%" })
5356
5466
  }, null, 4)
5357
5467
  ]),
5358
- D("div", Vl, pe(y(i)) + "%", 1)
5468
+ D("div", Ml, de(y(i)) + "%", 1)
5359
5469
  ])
5360
5470
  ], 2));
5361
5471
  }
5362
- }), ql = { class: "ha-tab" }, zl = /* @__PURE__ */ D("div", { class: "tab-header" }, null, -1), Kl = /* @__PURE__ */ D("div", { class: "tab-body" }, null, -1), Wl = [
5363
- zl,
5364
- Kl
5365
- ], Sr = /* @__PURE__ */ Q({
5472
+ }), ql = { class: "ha-tab" }, Nl = /* @__PURE__ */ D("div", { class: "tab-header" }, null, -1), Vl = /* @__PURE__ */ D("div", { class: "tab-body" }, null, -1), zl = [
5473
+ Nl,
5474
+ Vl
5475
+ ], kr = /* @__PURE__ */ Q({
5366
5476
  __name: "Tab",
5367
5477
  props: {
5368
5478
  destroy: { type: Boolean }
5369
5479
  },
5370
5480
  setup(u) {
5371
- return (t, e) => (O(), _("div", ql, Wl));
5481
+ return (t, e) => (I(), B("div", ql, zl));
5372
5482
  }
5373
5483
  });
5374
- let Er = async (u) => {
5375
- u == null && (u = new cl()), await Zs(u), await Ms();
5376
- let t = await Fs.getSso(), e = H.sys.app, s = { baseUrl: u.baseUrl, language: e.language, user: t, platform: "pc" }, l = M.serialize(s);
5377
- debugger;
5378
- await T.open(l), await Hs();
5379
- debugger;
5380
- T.onResponse = async (r) => {
5381
- debugger;
5484
+ let Sr = async (u) => {
5485
+ u == null && (u = new ol()), await Gs(u);
5486
+ let t = await Fs.getSso(), e = ee.sys.app, s = { baseUrl: u.baseUrl, language: e.language, user: t, platform: "pc" }, l = _.serialize(s);
5487
+ await T.open(l), T.onResponse = async (r) => {
5382
5488
  let i = r.data;
5383
5489
  return Ps.add(i.code, i.message, i.stack, i.elapsed), Promise.resolve();
5384
5490
  };
5385
5491
  };
5386
5492
  export {
5387
- ue as ArrayHelper,
5388
- st as BrowserHelper,
5389
- qt as BuilderFactory,
5390
- lt as Cdn,
5493
+ oe as ArrayHelper,
5494
+ tt as BrowserHelper,
5495
+ Vt as BuilderFactory,
5496
+ st as Cdn,
5391
5497
  Wt as CdnFactory,
5392
- It as ComponentHelper,
5393
- cl as CreateFeOptions,
5394
- Pe as DictionaryHelper,
5395
- R as DomHelper,
5396
- gl as DragEvent,
5498
+ Rt as ComponentHelper,
5499
+ ol as CreateFeOptions,
5500
+ _e as DictionaryHelper,
5501
+ j as DomHelper,
5502
+ hl as DragEvent,
5397
5503
  Xt as EncoderFactory,
5398
- ae as EventHelper,
5399
- ft as EventUtility,
5504
+ ie as EventHelper,
5505
+ gt as EventUtility,
5400
5506
  Zt as ExcelFactory,
5401
5507
  ts as ExplainerFactory,
5402
- E as Factories,
5508
+ C as Factories,
5403
5509
  ns as FeatureFactory,
5404
- Ie as FileHelper,
5405
- pr as HaCode,
5406
- vr as HaCol,
5407
- gr as HaCompare,
5408
- Il as HaCondition,
5409
- yr as HaConditionGroup,
5410
- wr as HaContainer,
5411
- ir as HaEmpty,
5412
- fl as HaFill,
5413
- bl as HaOption,
5414
- xr as HaProgress,
5510
+ Ae as FileHelper,
5511
+ hr as HaCode,
5512
+ yr as HaCol,
5513
+ pr as HaCompare,
5514
+ Al as HaCondition,
5515
+ mr as HaConditionGroup,
5516
+ vr as HaContainer,
5517
+ rr as HaEmpty,
5518
+ pl as HaFill,
5519
+ vl as HaOption,
5520
+ br as HaProgress,
5415
5521
  fr as HaRichText,
5416
- br as HaRow,
5417
- ml as HaScroller,
5418
- Be as HaSelect,
5419
- kr as HaSocketProgress,
5420
- Sr as HaTab,
5421
- hr as HaTimer,
5522
+ wr as HaRow,
5523
+ fl as HaScroller,
5524
+ je as HaSelect,
5525
+ xr as HaSocketProgress,
5526
+ kr as HaTab,
5527
+ dr as HaTimer,
5422
5528
  ds as HaloHttp,
5423
5529
  os as HasherFactory,
5424
- Qe as HtmlHelper,
5530
+ Ke as HtmlHelper,
5425
5531
  hs as HttpFactory,
5426
- it as HttpRequest,
5427
- Ye as HttpResponse,
5428
- fs as I18nFactory,
5429
- Ot as ImageHelper,
5430
- M as JsonHelper,
5431
- or as KeyboardUtility,
5432
- ur as ListDelta,
5433
- ne as MathHelper,
5532
+ nt as HttpRequest,
5533
+ Je as HttpResponse,
5534
+ gs as I18nFactory,
5535
+ It as ImageHelper,
5536
+ _ as JsonHelper,
5537
+ ir as KeyboardUtility,
5538
+ ar as ListDelta,
5539
+ Z as MathHelper,
5434
5540
  ms as Messenger,
5435
5541
  vs as MessengerFactory,
5436
- jt as MicroHelper,
5437
- we as MountHelper,
5438
- cr as MouseUtility,
5439
- Y as ObjectHelper,
5440
- gt as Position,
5441
- Nt as ProviderFactory,
5442
- tr as ProviderTable,
5443
- mr as Range,
5444
- ar as Rect,
5445
- Rt as Ref,
5446
- dr as SaveUtility,
5447
- Je as ScrollHelper,
5542
+ Ot as MicroHelper,
5543
+ ye as MountHelper,
5544
+ or as MouseUtility,
5545
+ X as ObjectHelper,
5546
+ ft as Position,
5547
+ qt as ProviderFactory,
5548
+ Hl as ProviderTable,
5549
+ ur as RandomUtility,
5550
+ gr as Range,
5551
+ nr as Rect,
5552
+ jt as Ref,
5553
+ cr as SaveUtility,
5554
+ We as ScrollHelper,
5448
5555
  Bt as SignHelper,
5449
5556
  xs as SignerFactory,
5450
- Xe as SqlHelper,
5451
- Ns as SsoFactory,
5452
- at as SsoUser,
5453
- W as StringHelper,
5557
+ Qe as SqlHelper,
5558
+ Ms as SsoFactory,
5559
+ it as SsoUser,
5560
+ M as StringHelper,
5454
5561
  Bs as SvcFactory,
5455
- zs as TaskFactory,
5456
- Ee as TaskHelper,
5457
- Qs as TemplateFactory,
5562
+ Vs as TaskFactory,
5563
+ ke as TaskHelper,
5564
+ Ws as TemplateFactory,
5458
5565
  te as TimeHelper,
5459
- Oe as TreeHelper,
5460
- U as TypeHelper,
5461
- K as UrlHelper,
5462
- rr as VideoFactory,
5463
- nr as VoiceFactory,
5464
- Ys as base64,
5465
- me as cdn,
5466
- H as configSvc,
5467
- Er as createFe,
5468
- sr as driverSvc,
5469
- lr as envSvc,
5566
+ De as TreeHelper,
5567
+ F as TypeHelper,
5568
+ W as UrlHelper,
5569
+ sr as VideoFactory,
5570
+ lr as VoiceFactory,
5571
+ Xs as base64,
5572
+ fe as cdn,
5573
+ ee as configSvc,
5574
+ Sr as createFe,
5575
+ er as driverSvc,
5576
+ tr as envSvc,
5470
5577
  T as http,
5471
- J as i18n,
5472
- Zs as initDriver,
5473
- Hs as initI18n,
5474
- Ms as initSvc,
5578
+ Xe as i18n,
5579
+ Gs as initDriver,
5475
5580
  Ps as logSvc,
5476
5581
  pt as md5,
5477
- ve as messenger,
5478
- ee as moment,
5479
- De as settingRepo,
5480
- de as settingSvc,
5582
+ me as messenger,
5583
+ H as moment,
5584
+ Le as settingRepo,
5585
+ ct as settingSvc,
5481
5586
  Us as socketSvc,
5482
- el as t,
5483
- ll as t_enum,
5484
- tl as t_exists,
5485
- rl as t_field,
5486
- nl as t_field_choose_placeholder,
5487
- il as t_field_placeholder,
5488
- ul as t_menu,
5489
- ol as t_module,
5490
- sl as t_sys,
5491
- al as t_table,
5492
- Gs as template,
5587
+ Zs as t,
5588
+ tl as t_enum,
5589
+ Hs as t_exists,
5590
+ sl as t_field,
5591
+ ll as t_field_choose_placeholder,
5592
+ rl as t_field_placeholder,
5593
+ al as t_menu,
5594
+ il as t_module,
5595
+ el as t_sys,
5596
+ nl as t_table,
5597
+ Ys as template,
5493
5598
  Fs as userSvc
5494
5599
  };