halo-fe 1.0.15 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +691 -687
- package/esm/drivers/cdns/Cdn.d.ts +12 -7
- package/esm/drivers/cdns/ICdn.d.ts +4 -4
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +1 -2
- package/esm/drivers/cdns/implements/ThirdCdn.d.ts +1 -7
- package/esm/drivers/tasks/ITask.d.ts +4 -1
- package/esm/drivers/tasks/Task.d.ts +2 -1
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +2 -2
- package/esm/plugins/index.d.ts +1 -6
- package/esm/types/CreateFeOptions.d.ts +1 -1
- package/esm/vite.config.d.ts +6 -0
- package/package.json +3 -4
- package/dist/assets/@monaco-editor-BCDRi0Ti.js +0 -258
- package/dist/assets/state-local-CEworIRt.js +0 -131
package/dist/main.js
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var n = (u, e, t) =>
|
4
|
-
import { _ as
|
5
|
-
import { defineAsyncComponent as
|
6
|
-
import { _ as
|
7
|
-
import { a as
|
8
|
-
import { F as
|
9
|
-
import { l as Oe } from "./assets/@monaco-editor-BCDRi0Ti.js";
|
1
|
+
var mt = Object.defineProperty;
|
2
|
+
var yt = (u, e, t) => e in u ? mt(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
3
|
+
var n = (u, e, t) => yt(u, typeof e != "symbol" ? e + "" : e, t);
|
4
|
+
import { _ as _e } from "./assets/underscore-B0BCaBxV.js";
|
5
|
+
import { defineAsyncComponent as vt, reactive as Ze, defineComponent as J, toRefs as re, openBlock as R, createElementBlock as B, createElementVNode as D, toDisplayString as pe, unref as m, renderSlot as fe, createCommentVNode as He, ref as j, onMounted as we, onUnmounted as xe, normalizeStyle as me, watch as H, normalizeClass as Ae, createTextVNode as bt, createBlock as et, withCtx as qe, mergeModels as We, useModel as tt, nextTick as Qe, withDirectives as wt, vShow as xt, createVNode as Ce, createStaticVNode as St, isRef as Be, Fragment as kt, renderList as Et, computed as Te } from "vue";
|
6
|
+
import { _ as Ct } from "./assets/underscore.string-oDfap0sE.js";
|
7
|
+
import { a as Tt } from "./assets/clone-DtpAsLoe.js";
|
8
|
+
import { F as $t } from "./assets/file-saver-Cnua3zoa.js";
|
10
9
|
import { h as se } from "./assets/moment-h96o7c8I.js";
|
11
|
-
import { c as
|
10
|
+
import { c as Lt } from "./assets/vue-i18n-CLr3brPz.js";
|
12
11
|
import { L as At } from "./assets/liquidjs-C-LVcoaY.js";
|
13
12
|
class U {
|
14
13
|
}
|
@@ -123,7 +122,7 @@ n(M, "size", (e) => {
|
|
123
122
|
throw new Error("暂未支持比TB更大的大小");
|
124
123
|
});
|
125
124
|
let ie = M;
|
126
|
-
const
|
125
|
+
const C = class C {
|
127
126
|
/**
|
128
127
|
* 获取分成指定片数量后的集合
|
129
128
|
*/
|
@@ -180,7 +179,7 @@ const T = class T {
|
|
180
179
|
/**
|
181
180
|
* 获取指定数组分成每片指定长度后的集合
|
182
181
|
*/
|
183
|
-
n(
|
182
|
+
n(C, "getChunks", (e, t) => {
|
184
183
|
let s = [];
|
185
184
|
for (let l = 0; l < e.length; l += t) {
|
186
185
|
let r = e.slice(l, l + t);
|
@@ -192,10 +191,10 @@ n(T, "getChunks", (e, t) => {
|
|
192
191
|
/**
|
193
192
|
* 取两个集合的交集
|
194
193
|
*/
|
195
|
-
n(
|
194
|
+
n(C, "intersect", (e, t) => e.filter((l) => t.indexOf(l) > -1)), /**
|
196
195
|
* 排除指定元素(差集)
|
197
196
|
*/
|
198
|
-
n(
|
197
|
+
n(C, "except", (e, t, s = null) => {
|
199
198
|
let l = t instanceof Array ? t : [t], r = [];
|
200
199
|
if (s == null)
|
201
200
|
r = e.filter((i) => l.indexOf(i) == -1);
|
@@ -210,19 +209,19 @@ n(T, "except", (e, t, s = null) => {
|
|
210
209
|
/**
|
211
210
|
* 求最大值,数据类型的比较函数要自己转换为数值类型
|
212
211
|
*/
|
213
|
-
n(
|
212
|
+
n(C, "max", (e, t) => _e.max(e, t)), /**
|
214
213
|
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
215
214
|
*/
|
216
|
-
n(
|
215
|
+
n(C, "min", (e, t) => _e.min(e, t)), /**
|
217
216
|
* 求平均值
|
218
217
|
*/
|
219
|
-
n(
|
220
|
-
let r =
|
218
|
+
n(C, "avg", (e, t, s = null) => {
|
219
|
+
let r = C.sum(e, t) / e.length;
|
221
220
|
return s == null ? r : parseFloat(r.toFixed(s));
|
222
221
|
}), /**
|
223
222
|
* 求和
|
224
223
|
*/
|
225
|
-
n(
|
224
|
+
n(C, "sum", (e, t, s = null) => {
|
226
225
|
let l = 0;
|
227
226
|
for (let i = 0; i < e.length; i++)
|
228
227
|
l += t(e[i]);
|
@@ -232,10 +231,10 @@ n(T, "sum", (e, t, s = null) => {
|
|
232
231
|
/**
|
233
232
|
* 是否包含
|
234
233
|
*/
|
235
|
-
n(
|
234
|
+
n(C, "contains", (e, t) => e.indexOf(t) > -1), /**
|
236
235
|
* 判断指定集合中的指定属性的值,是否包含关键词
|
237
236
|
*/
|
238
|
-
n(
|
237
|
+
n(C, "filterContains", (e, t, s) => {
|
239
238
|
let l = [];
|
240
239
|
if (!s)
|
241
240
|
return e;
|
@@ -253,7 +252,7 @@ n(T, "filterContains", (e, t, s) => {
|
|
253
252
|
/**
|
254
253
|
* 判断2个数组是否每个元素都相同
|
255
254
|
*/
|
256
|
-
n(
|
255
|
+
n(C, "same", (e, t) => {
|
257
256
|
if (e.length != t.length)
|
258
257
|
return !1;
|
259
258
|
let s = e.length >= t.length ? e : t, l = e.length < t.length ? e : t;
|
@@ -266,13 +265,13 @@ n(T, "same", (e, t) => {
|
|
266
265
|
/**
|
267
266
|
* 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
|
268
267
|
*/
|
269
|
-
n(
|
268
|
+
n(C, "distinct", (e, t) => {
|
270
269
|
let s = new Set(e.map((r) => t(r)));
|
271
270
|
return Array.from(s);
|
272
271
|
}), /**
|
273
272
|
* 连接值构建成新数组,重复项也会自动构建,不存在的值,会自动创建为一个新项
|
274
273
|
*/
|
275
|
-
n(
|
274
|
+
n(C, "fromValues", (e, t, s, l) => {
|
276
275
|
if (!e || e.length == 0 || !t || t.length == 0)
|
277
276
|
return [];
|
278
277
|
let r = [];
|
@@ -288,7 +287,7 @@ n(T, "fromValues", (e, t, s, l) => {
|
|
288
287
|
* @param split
|
289
288
|
* @param element 转换后添加的默认元素
|
290
289
|
*/
|
291
|
-
n(
|
290
|
+
n(C, "split", (e, t, s = null) => {
|
292
291
|
let l = [];
|
293
292
|
return e && (l = e.split(t)), s != null && l.push(s), l;
|
294
293
|
}), //#endregion
|
@@ -296,8 +295,8 @@ n(T, "split", (e, t, s = null) => {
|
|
296
295
|
/**
|
297
296
|
* 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
|
298
297
|
*/
|
299
|
-
n(
|
300
|
-
let t = [], s =
|
298
|
+
n(C, "combine", (...e) => {
|
299
|
+
let t = [], s = _e.max(e, (l) => l.length);
|
301
300
|
for (let l = 0; l < s.length; l++) {
|
302
301
|
let r = [], i;
|
303
302
|
for (let a = 0; a < e.length; a++) {
|
@@ -317,37 +316,37 @@ n(T, "combine", (...e) => {
|
|
317
316
|
/**
|
318
317
|
* 在指定元素前插入新元素,返回插入元素的索引
|
319
318
|
*/
|
320
|
-
n(
|
319
|
+
n(C, "insert", (e, t, s) => {
|
321
320
|
let l = e.indexOf(t);
|
322
321
|
return e.splice(l, 0, s), l;
|
323
322
|
}), /**
|
324
323
|
* 在指定元素后插入新元素,返回插入元素的索引
|
325
324
|
*/
|
326
|
-
n(
|
325
|
+
n(C, "append", (e, t, s) => {
|
327
326
|
let l = e.indexOf(t) + 1;
|
328
327
|
return e.splice(l, 0, s), l;
|
329
328
|
}), /**
|
330
329
|
* 不存在某元素时才添加某元素
|
331
330
|
*/
|
332
|
-
n(
|
331
|
+
n(C, "pushIfNotExist", (e, t) => {
|
333
332
|
e.indexOf(t) == -1 && e.push(t);
|
334
333
|
}), //#endregion
|
335
334
|
//#region 删除
|
336
335
|
/**
|
337
336
|
* 删除执行数组中的指定对象或者集合
|
338
337
|
*/
|
339
|
-
n(
|
338
|
+
n(C, "remove", (e, t) => {
|
340
339
|
if (U.isNumber(t))
|
341
340
|
e.splice(t, 1);
|
342
341
|
else if (U.isArray(t))
|
343
342
|
for (let s = 0; s < t.length; s++)
|
344
|
-
|
343
|
+
C.remove(e, t[s]);
|
345
344
|
else
|
346
345
|
e.splice(e.indexOf(t), 1);
|
347
346
|
}), /**
|
348
347
|
* 删除指定元素,并返回删除后的字符串
|
349
348
|
*/
|
350
|
-
n(
|
349
|
+
n(C, "removeIndex", (e, t, s) => {
|
351
350
|
let l = e.split(s);
|
352
351
|
return l.splice(t, 1), l.join(s);
|
353
352
|
}), //#endregion
|
@@ -356,7 +355,7 @@ n(T, "removeIndex", (e, t, s) => {
|
|
356
355
|
* 按照指定函数对数组排序
|
357
356
|
* order: asc desc null
|
358
357
|
*/
|
359
|
-
n(
|
358
|
+
n(C, "orderBy", (e, t, s = null) => {
|
360
359
|
if (t == null || s == null || e.length == 0 || e.length == 1)
|
361
360
|
return e;
|
362
361
|
t instanceof Function && (t = [t]);
|
@@ -373,7 +372,7 @@ n(T, "orderBy", (e, t, s = null) => {
|
|
373
372
|
/**
|
374
373
|
* 分组,封装成字典而不是集合,大数据场景速度提升百倍
|
375
374
|
*/
|
376
|
-
n(
|
375
|
+
n(C, "groupBy", (e, t, s = null) => {
|
377
376
|
let l = {};
|
378
377
|
if (e.forEach((r) => {
|
379
378
|
let i = t(r);
|
@@ -387,14 +386,14 @@ n(T, "groupBy", (e, t, s = null) => {
|
|
387
386
|
}), /**
|
388
387
|
* 分组
|
389
388
|
*/
|
390
|
-
n(
|
389
|
+
n(C, "groupByArray", (e, t) => {
|
391
390
|
let s = [];
|
392
391
|
return e.forEach((l) => {
|
393
392
|
let r = t(l), i = s.find((a) => a.key == r);
|
394
393
|
i == null && (i = { key: r, value: [] }, s.push(i)), i.value.push(l);
|
395
394
|
}), s;
|
396
395
|
});
|
397
|
-
let ge =
|
396
|
+
let ge = C;
|
398
397
|
const x = class x {
|
399
398
|
/**
|
400
399
|
* 根据字符串或数组,自动返回数组
|
@@ -421,7 +420,7 @@ n(x, "getUniqueId", (e = 32) => {
|
|
421
420
|
}), /**
|
422
421
|
* 填充字符串到指定长度,使用pad填充
|
423
422
|
*/
|
424
|
-
n(x, "padLeft", (e, t, s) =>
|
423
|
+
n(x, "padLeft", (e, t, s) => Ct.pad(e, t, s)), /**
|
425
424
|
* 去掉头部字符串
|
426
425
|
*/
|
427
426
|
n(x, "trimStart", (e, t) => {
|
@@ -542,8 +541,8 @@ n(x, "getBetween", (e, t, s) => {
|
|
542
541
|
* 填充字符串到指定长度,使用pad填充
|
543
542
|
*/
|
544
543
|
n(x, "padStart", (e, t, s) => e.padStart(t, s));
|
545
|
-
let
|
546
|
-
const
|
544
|
+
let Q = x;
|
545
|
+
const $e = class $e {
|
547
546
|
//#region 净化
|
548
547
|
/**
|
549
548
|
* 净化对象,返回不带默认属性的对象
|
@@ -598,7 +597,7 @@ const Te = class Te {
|
|
598
597
|
* 对对象进行深度克隆,同时可以移除Proxy对象
|
599
598
|
*/
|
600
599
|
static clone(e, t = null) {
|
601
|
-
let s =
|
600
|
+
let s = Tt(e, !0);
|
602
601
|
if (t == null)
|
603
602
|
return s;
|
604
603
|
if (U.isArray(e))
|
@@ -615,7 +614,7 @@ const Te = class Te {
|
|
615
614
|
static mergeTo(e, t) {
|
616
615
|
return e == null ? t : t == null ? e : U.isArray(t) ? t.slice() : (Object.keys(t).forEach((l) => {
|
617
616
|
let r = t[l];
|
618
|
-
typeof r == "object" ? e[l] =
|
617
|
+
typeof r == "object" ? e[l] = $e.mergeTo(e[l], r) : e[l] = r;
|
619
618
|
}), e);
|
620
619
|
}
|
621
620
|
//#endregion
|
@@ -641,7 +640,7 @@ const Te = class Te {
|
|
641
640
|
/**
|
642
641
|
* 手动复制,并对字段执行指定自定义处理
|
643
642
|
*/
|
644
|
-
n(
|
643
|
+
n($e, "copy", (e, t = null) => {
|
645
644
|
let s = [];
|
646
645
|
U.isObject(e) && s.push(e);
|
647
646
|
let l = [];
|
@@ -658,15 +657,15 @@ n(Te, "copy", (e, t = null) => {
|
|
658
657
|
/**
|
659
658
|
* 给对象添加多层属性,并赋值
|
660
659
|
*/
|
661
|
-
n(
|
660
|
+
n($e, "addProperties", (e, t, s) => {
|
662
661
|
let l = e;
|
663
662
|
for (let r = 0; r < t.length; r++) {
|
664
663
|
let i = t[r];
|
665
664
|
r == t.length - 1 ? l[i] = s : (l[i] || (l[i] = {}), l = l[i]);
|
666
665
|
}
|
667
666
|
});
|
668
|
-
let te =
|
669
|
-
class
|
667
|
+
let te = $e;
|
668
|
+
class Ue {
|
670
669
|
//#region 取值
|
671
670
|
/**
|
672
671
|
* 从指定字典中提取忽略大小写的key的值
|
@@ -727,7 +726,7 @@ class Fe {
|
|
727
726
|
}
|
728
727
|
//#endregion
|
729
728
|
}
|
730
|
-
const
|
729
|
+
const z = class z {
|
731
730
|
/**
|
732
731
|
* 获取指定地址路由对象
|
733
732
|
*/
|
@@ -856,7 +855,7 @@ const K = class K {
|
|
856
855
|
*/
|
857
856
|
static serialize(e, t = !0) {
|
858
857
|
let s = (r) => t ? encodeURIComponent(r) : r;
|
859
|
-
return
|
858
|
+
return Ue.join(e, s, "=", "&");
|
860
859
|
}
|
861
860
|
//endregion
|
862
861
|
//region 编码和解码
|
@@ -877,7 +876,7 @@ const K = class K {
|
|
877
876
|
/**
|
878
877
|
* 处理键值对的值
|
879
878
|
*/
|
880
|
-
n(
|
879
|
+
n(z, "handleQueryValue", (e, t) => {
|
881
880
|
let s = "";
|
882
881
|
if (e == null)
|
883
882
|
return s;
|
@@ -885,13 +884,13 @@ n(K, "handleQueryValue", (e, t) => {
|
|
885
884
|
if (e.length > 0)
|
886
885
|
for (let l = 0; l < e.length; l++) {
|
887
886
|
let r = te.clone(t);
|
888
|
-
r.push(""), s +=
|
887
|
+
r.push(""), s += z.handleQueryValue(e[l], r);
|
889
888
|
}
|
890
889
|
} else if (e instanceof Object) {
|
891
890
|
let l = Object.keys(e);
|
892
891
|
for (let r of l) {
|
893
892
|
let i = te.clone(t);
|
894
|
-
i.push(r), s +=
|
893
|
+
i.push(r), s += z.handleQueryValue(e[r], i);
|
895
894
|
}
|
896
895
|
} else {
|
897
896
|
let l = "";
|
@@ -904,27 +903,27 @@ n(K, "handleQueryValue", (e, t) => {
|
|
904
903
|
}), /**
|
905
904
|
* 自动根据后面路径,决定是否要合并Url
|
906
905
|
*/
|
907
|
-
n(
|
906
|
+
n(z, "concatUrl", (e, t) => z.httpOrHttps(t) ? t : e + t), /**
|
908
907
|
* 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
|
909
908
|
* ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
|
910
909
|
* ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
|
911
910
|
*/
|
912
|
-
n(
|
911
|
+
n(z, "getUrl", (e, t = null) => {
|
913
912
|
if (e == null)
|
914
913
|
return null;
|
915
914
|
if (t == null)
|
916
915
|
return e;
|
917
|
-
let s =
|
918
|
-
return
|
916
|
+
let s = z.deserialize(e), l = te.mergeTo(s, t);
|
917
|
+
return z.getPath(e) + "?" + z.getQuery(l);
|
919
918
|
}), /**
|
920
919
|
* 获取超链接配置对象
|
921
920
|
*/
|
922
|
-
n(
|
921
|
+
n(z, "getAnchor", (e, t = null) => {
|
923
922
|
let s = { href: null, target: null };
|
924
|
-
return
|
923
|
+
return z.httpOrHttps(e) ? (s.href = e, s.target = "_blank", s) : (s.href = z.getUrl(e, t), s);
|
925
924
|
});
|
926
|
-
let
|
927
|
-
class
|
925
|
+
let K = z;
|
926
|
+
class It {
|
928
927
|
/**
|
929
928
|
* 根据动态加载的组件对象,得到组件集合
|
930
929
|
*/
|
@@ -934,11 +933,11 @@ class Ot {
|
|
934
933
|
return l;
|
935
934
|
for (let i = 0; i < r.length; i++) {
|
936
935
|
const a = r[i];
|
937
|
-
let o =
|
936
|
+
let o = Q.trim(a, t, ".vue"), h = (s ? s + "-" : "") + Q.getDashName(o), d = e[a];
|
938
937
|
if (d.default)
|
939
938
|
l[h] = d.default;
|
940
939
|
else {
|
941
|
-
let p =
|
940
|
+
let p = vt(d);
|
942
941
|
l[h] = p;
|
943
942
|
}
|
944
943
|
}
|
@@ -956,10 +955,10 @@ class Ot {
|
|
956
955
|
/**
|
957
956
|
* 获取部分自定义组件名称
|
958
957
|
*/
|
959
|
-
n(
|
958
|
+
n(It, "getName", (e, t) => {
|
960
959
|
if (!e)
|
961
960
|
return null;
|
962
|
-
let s =
|
961
|
+
let s = K.getPath(e);
|
963
962
|
return s ? s == "/" ? t : t + s.replace(/\//g, "-").toLowerCase() : null;
|
964
963
|
});
|
965
964
|
const ce = class ce {
|
@@ -972,7 +971,7 @@ n(ce, "save", (e, t) => {
|
|
972
971
|
for (; l--; )
|
973
972
|
r[l] = s.charCodeAt(l);
|
974
973
|
let i = new Blob([r]);
|
975
|
-
|
974
|
+
$t.saveAs(i, t);
|
976
975
|
}), /**
|
977
976
|
* 获取文件扩展名
|
978
977
|
*/
|
@@ -992,7 +991,7 @@ n(ce, "isImage", (e) => {
|
|
992
991
|
let t = ce.getExtension(e);
|
993
992
|
return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(t) > -1;
|
994
993
|
});
|
995
|
-
let
|
994
|
+
let Oe = ce;
|
996
995
|
const Z = class Z {
|
997
996
|
//#region 颜色
|
998
997
|
/**
|
@@ -1026,7 +1025,7 @@ const Z = class Z {
|
|
1026
1025
|
let t = "";
|
1027
1026
|
for (let s = 0; s < e.length; s++) {
|
1028
1027
|
let l = e[s];
|
1029
|
-
|
1028
|
+
Q.isNullOrEmpty(l) || (t += l, s != e.length - 1 && (t += " "));
|
1030
1029
|
}
|
1031
1030
|
return t;
|
1032
1031
|
}
|
@@ -1210,13 +1209,13 @@ const Z = class Z {
|
|
1210
1209
|
* 获取行内标签,如: style(非link)
|
1211
1210
|
*/
|
1212
1211
|
static getInlineTagByUrl(e) {
|
1213
|
-
return
|
1212
|
+
return Oe.getExtension(e) == ".css" ? "style" : "script";
|
1214
1213
|
}
|
1215
1214
|
/**
|
1216
1215
|
* 获取资源标签,如: link
|
1217
1216
|
*/
|
1218
1217
|
static getTagByUrl(e) {
|
1219
|
-
return
|
1218
|
+
return Oe.getExtension(e) == ".css" ? "link" : "script";
|
1220
1219
|
}
|
1221
1220
|
//#endregion
|
1222
1221
|
//#region 文本
|
@@ -1347,15 +1346,15 @@ n(ue, "scroll", (e, t) => {
|
|
1347
1346
|
n(ue, "unscroll", (e, t) => {
|
1348
1347
|
e && e.removeEventListener("scroll", t, !0);
|
1349
1348
|
});
|
1350
|
-
class
|
1349
|
+
class Je {
|
1351
1350
|
}
|
1352
1351
|
/**
|
1353
1352
|
* 获取Html内容
|
1354
1353
|
*/
|
1355
|
-
n(
|
1354
|
+
n(Je, "getHtml", (e) => U.isNumber(e) ? e : e && e.replace(/\n/g, "<br/>")), /**
|
1356
1355
|
* 获取Html中的文字
|
1357
1356
|
*/
|
1358
|
-
n(
|
1357
|
+
n(Je, "getText", (e) => {
|
1359
1358
|
if (!e)
|
1360
1359
|
return null;
|
1361
1360
|
if (!U.isString(e))
|
@@ -1363,46 +1362,46 @@ n(Qe, "getText", (e) => {
|
|
1363
1362
|
let t = new RegExp("<[^<>]+>", "g");
|
1364
1363
|
return e.replace(t, "");
|
1365
1364
|
});
|
1366
|
-
class
|
1365
|
+
class Ot {
|
1367
1366
|
}
|
1368
1367
|
/**
|
1369
1368
|
* 获取base64图片地址
|
1370
1369
|
*/
|
1371
|
-
n(
|
1372
|
-
class
|
1370
|
+
n(Ot, "base64", (e) => "data:image/png;base64," + e);
|
1371
|
+
class Dt {
|
1373
1372
|
}
|
1374
1373
|
/**
|
1375
1374
|
* 加载乾坤子应用
|
1376
1375
|
*/
|
1377
|
-
n(
|
1376
|
+
n(Dt, "load", function(e, t, s, l) {
|
1378
1377
|
});
|
1379
|
-
const
|
1378
|
+
const Le = class Le {
|
1380
1379
|
};
|
1381
1380
|
/**
|
1382
1381
|
* 激发主框架事件
|
1383
1382
|
*/
|
1384
|
-
n(
|
1385
|
-
|
1383
|
+
n(Le, "emit", (e, t) => {
|
1384
|
+
Le.emits({ [e]: t });
|
1386
1385
|
}), /**
|
1387
1386
|
* 批量激发主框架事件
|
1388
1387
|
*/
|
1389
|
-
n(
|
1388
|
+
n(Le, "emits", (e) => {
|
1390
1389
|
var s, l;
|
1391
1390
|
let t = (l = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : l.emit;
|
1392
1391
|
t && Object.keys(e).forEach((r) => {
|
1393
1392
|
t(r, e[r]);
|
1394
1393
|
});
|
1395
1394
|
});
|
1396
|
-
let
|
1397
|
-
class
|
1395
|
+
let De = Le;
|
1396
|
+
class Ee {
|
1398
1397
|
}
|
1399
1398
|
/**
|
1400
1399
|
* 延时指定ms后执行指定任务
|
1401
1400
|
*/
|
1402
|
-
n(
|
1401
|
+
n(Ee, "delay", (e, t) => setTimeout(e, t)), /**
|
1403
1402
|
* 在执行指定延时后,每隔指定ms执行指定任务
|
1404
1403
|
*/
|
1405
|
-
n(
|
1404
|
+
n(Ee, "execute", (e, t, s) => {
|
1406
1405
|
if (!s) {
|
1407
1406
|
let l = setInterval(e, t);
|
1408
1407
|
return Promise.resolve(l);
|
@@ -1416,12 +1415,12 @@ n(ke, "execute", (e, t, s) => {
|
|
1416
1415
|
}), /**
|
1417
1416
|
* 清空定时器
|
1418
1417
|
*/
|
1419
|
-
n(
|
1418
|
+
n(Ee, "clearInterval", (e) => {
|
1420
1419
|
clearInterval(e);
|
1421
1420
|
}), /**
|
1422
1421
|
* 防抖(指定时间内只触发一次)
|
1423
1422
|
*/
|
1424
|
-
n(
|
1423
|
+
n(Ee, "debounce", (e, t) => {
|
1425
1424
|
let s = null;
|
1426
1425
|
return (l) => {
|
1427
1426
|
s && clearTimeout(s), s = setTimeout(e, t, l);
|
@@ -1429,7 +1428,7 @@ n(ke, "debounce", (e, t) => {
|
|
1429
1428
|
}), /**
|
1430
1429
|
* 节流:https://segmentfault.com/a/1190000018428170
|
1431
1430
|
*/
|
1432
|
-
n(
|
1431
|
+
n(Ee, "throttle", (e, t) => {
|
1433
1432
|
let s = !0;
|
1434
1433
|
return (l) => {
|
1435
1434
|
if (!s)
|
@@ -1439,16 +1438,11 @@ n(ke, "throttle", (e, t) => {
|
|
1439
1438
|
}, t, l);
|
1440
1439
|
};
|
1441
1440
|
});
|
1442
|
-
class
|
1441
|
+
class jt {
|
1443
1442
|
constructor() {
|
1444
1443
|
n(this, "value");
|
1445
1444
|
}
|
1446
1445
|
}
|
1447
|
-
let Hl = () => new Promise((u, e) => {
|
1448
|
-
import("echarts").then((t) => {
|
1449
|
-
u(t);
|
1450
|
-
});
|
1451
|
-
});
|
1452
1446
|
const O = class O {
|
1453
1447
|
};
|
1454
1448
|
/**
|
@@ -1508,19 +1502,19 @@ n(O, "localeTime", (e) => {
|
|
1508
1502
|
return se(e).add(s, "minutes").toDate();
|
1509
1503
|
});
|
1510
1504
|
let le = O;
|
1511
|
-
const
|
1505
|
+
const E = class E {
|
1512
1506
|
};
|
1513
1507
|
/**
|
1514
1508
|
* 从树结构数据中,递归获取指定主键的对象
|
1515
1509
|
*/
|
1516
|
-
n(
|
1510
|
+
n(E, "getById", (e, t, s, l) => {
|
1517
1511
|
if (!s)
|
1518
1512
|
return null;
|
1519
1513
|
let r = s.find((i) => i[t] == e) || null;
|
1520
1514
|
if (r != null)
|
1521
1515
|
return r;
|
1522
1516
|
for (let i = 0; i < s.length; i++) {
|
1523
|
-
let a =
|
1517
|
+
let a = E.getById(e, t, s[i][l], l);
|
1524
1518
|
if (a != null) {
|
1525
1519
|
r = a;
|
1526
1520
|
break;
|
@@ -1530,17 +1524,17 @@ n(C, "getById", (e, t, s, l) => {
|
|
1530
1524
|
}), /**
|
1531
1525
|
* 树节点
|
1532
1526
|
*/
|
1533
|
-
n(
|
1527
|
+
n(E, "getByIds", (e, t, s, l) => {
|
1534
1528
|
let r = ge.distinct(e, (a) => a), i = [];
|
1535
1529
|
return r.forEach((a) => {
|
1536
|
-
let o =
|
1530
|
+
let o = E.getById(a, t, s, l);
|
1537
1531
|
i.push(o);
|
1538
1532
|
}), i;
|
1539
1533
|
}), /**
|
1540
1534
|
* 找出指定层级集合中,指定对象的下一个对象
|
1541
1535
|
*/
|
1542
|
-
n(
|
1543
|
-
let r =
|
1536
|
+
n(E, "getNextById", (e, t, s, l) => {
|
1537
|
+
let r = E.getById(e, t, s, l), i = E.getParentsById(e, t, s, l);
|
1544
1538
|
if (i.length == 0) {
|
1545
1539
|
if (s.length == 1)
|
1546
1540
|
return null;
|
@@ -1555,43 +1549,43 @@ n(C, "getNextById", (e, t, s, l) => {
|
|
1555
1549
|
}), /**
|
1556
1550
|
* 获取兄弟节点
|
1557
1551
|
*/
|
1558
|
-
n(
|
1559
|
-
let r =
|
1552
|
+
n(E, "getSiblingsById", (e, t, s, l) => {
|
1553
|
+
let r = E.getParentById(e, t, s, l);
|
1560
1554
|
return r == null ? s : r[l];
|
1561
1555
|
}), /**
|
1562
1556
|
* 获取父节点
|
1563
1557
|
*/
|
1564
|
-
n(
|
1565
|
-
let r =
|
1558
|
+
n(E, "getParentById", (e, t, s, l) => {
|
1559
|
+
let r = E.getParentsById(e, t, s, l, !1);
|
1566
1560
|
return r[r.length - 1];
|
1567
1561
|
}), /**
|
1568
1562
|
* 从树结构数据中,递归获取指定主键的父元素集合
|
1569
1563
|
*/
|
1570
|
-
n(
|
1564
|
+
n(E, "getParentsById", (e, t, s, l, r = !1) => {
|
1571
1565
|
let i = [];
|
1572
|
-
return s == null ||
|
1566
|
+
return s == null || st(e, t, s, l, i, r), i;
|
1573
1567
|
}), /**
|
1574
1568
|
* 获取当前节点的所有孩子节点的集合
|
1575
1569
|
*/
|
1576
|
-
n(
|
1577
|
-
let i =
|
1578
|
-
return r && a.push(i),
|
1570
|
+
n(E, "getChildrenById", (e, t, s, l, r = !1) => {
|
1571
|
+
let i = E.getById(e, t, s, l), a = [];
|
1572
|
+
return r && a.push(i), Fe(i, l, a), a;
|
1579
1573
|
}), /**
|
1580
1574
|
* 获取当前节点的所有孩子节点的集合
|
1581
1575
|
*/
|
1582
|
-
n(
|
1576
|
+
n(E, "getChildren", (e, t, s = !1) => {
|
1583
1577
|
let l = [];
|
1584
|
-
return s && l.push(e),
|
1578
|
+
return s && l.push(e), Fe(e, t, l), l;
|
1585
1579
|
}), /**
|
1586
1580
|
* 搜索指定文本的树结构
|
1587
1581
|
*/
|
1588
|
-
n(
|
1582
|
+
n(E, "searchTree", (e, t, s, l) => {
|
1589
1583
|
let r = [];
|
1590
1584
|
if (!t)
|
1591
1585
|
return r;
|
1592
1586
|
let i = e ? e.toUpperCase() : "", a = U.isString(l) ? [l] : l;
|
1593
1587
|
for (let o of t) {
|
1594
|
-
let c = !1, h =
|
1588
|
+
let c = !1, h = E.getChildren(o, s, !0);
|
1595
1589
|
for (let d of h) {
|
1596
1590
|
for (let p of a) {
|
1597
1591
|
let g = d[p];
|
@@ -1604,7 +1598,7 @@ n(C, "searchTree", (e, t, s, l) => {
|
|
1604
1598
|
break;
|
1605
1599
|
}
|
1606
1600
|
if (c) {
|
1607
|
-
let d =
|
1601
|
+
let d = E.searchTree(e, o[s], s, l), p = { ...o, [s]: d };
|
1608
1602
|
r.push(p);
|
1609
1603
|
}
|
1610
1604
|
}
|
@@ -1612,8 +1606,8 @@ n(C, "searchTree", (e, t, s, l) => {
|
|
1612
1606
|
}), /**
|
1613
1607
|
* 删除指定子元素
|
1614
1608
|
*/
|
1615
|
-
n(
|
1616
|
-
let r =
|
1609
|
+
n(E, "removeById", (e, t, s, l) => {
|
1610
|
+
let r = E.getById(e, t, s, l), i = E.getParentsById(e, t, s, l);
|
1617
1611
|
if (i.length == 0) {
|
1618
1612
|
ge.remove(s, r);
|
1619
1613
|
return;
|
@@ -1623,12 +1617,12 @@ n(C, "removeById", (e, t, s, l) => {
|
|
1623
1617
|
}), /**
|
1624
1618
|
* 获取树结构扁平化后的节点信息
|
1625
1619
|
*/
|
1626
|
-
n(
|
1620
|
+
n(E, "getFlat", (e, t) => {
|
1627
1621
|
let s = [...e];
|
1628
1622
|
for (let l = 0; l < e.length; l++) {
|
1629
1623
|
let i = e[l][t];
|
1630
1624
|
if (i.length > 0) {
|
1631
|
-
let a =
|
1625
|
+
let a = E.getFlat(i, t);
|
1632
1626
|
s.push(...a);
|
1633
1627
|
}
|
1634
1628
|
}
|
@@ -1636,60 +1630,60 @@ n(C, "getFlat", (e, t) => {
|
|
1636
1630
|
}), /**
|
1637
1631
|
* 对树结点的数据进行重新映射,映射得到新的Tree数组
|
1638
1632
|
*/
|
1639
|
-
n(
|
1633
|
+
n(E, "map", (e, t, s, l) => {
|
1640
1634
|
let r = [];
|
1641
1635
|
for (let i = 0; i < e.length; i++) {
|
1642
1636
|
let a = e[i], o = l(a);
|
1643
1637
|
r.push(o);
|
1644
1638
|
let c = a[t];
|
1645
1639
|
if (c && c.length > 0) {
|
1646
|
-
let h =
|
1640
|
+
let h = E.map(c, t, s, l);
|
1647
1641
|
o[s] = h;
|
1648
1642
|
}
|
1649
1643
|
}
|
1650
1644
|
return r;
|
1651
1645
|
});
|
1652
|
-
let
|
1653
|
-
function
|
1646
|
+
let je = E;
|
1647
|
+
function st(u, e, t, s, l, r) {
|
1654
1648
|
for (let i = 0; i < t.length; i++) {
|
1655
1649
|
let a = t[i];
|
1656
1650
|
if (a[e] == u) {
|
1657
1651
|
r && l.push(a);
|
1658
1652
|
break;
|
1659
1653
|
} else
|
1660
|
-
|
1654
|
+
je.getById(u, e, a[s], s) != null && (l.push(a), st(u, e, a[s], s, l, r));
|
1661
1655
|
}
|
1662
1656
|
return l;
|
1663
1657
|
}
|
1664
|
-
function
|
1658
|
+
function Fe(u, e, t) {
|
1665
1659
|
let s = u[e];
|
1666
1660
|
if (!s || s.length == 0)
|
1667
1661
|
return t;
|
1668
1662
|
for (let l = 0; l < s.length; l++) {
|
1669
1663
|
let r = s[l];
|
1670
|
-
t.push(r),
|
1664
|
+
t.push(r), Fe(r, e, t);
|
1671
1665
|
}
|
1672
1666
|
return t;
|
1673
1667
|
}
|
1674
|
-
class
|
1668
|
+
class Xe {
|
1675
1669
|
}
|
1676
1670
|
/**
|
1677
1671
|
* 判断指定元素滚动条位置,是否到了页面底部
|
1678
1672
|
*/
|
1679
|
-
n(
|
1673
|
+
n(Xe, "isBottom", (e) => {
|
1680
1674
|
let t = document.querySelector(e);
|
1681
1675
|
return t ? t.scrollTop + t.clientHeight == t.scrollHeight : !1;
|
1682
1676
|
}), /**
|
1683
1677
|
* 滚动指定元素的滚动条到页面底部
|
1684
1678
|
*/
|
1685
|
-
n(
|
1679
|
+
n(Xe, "scrollToBottom", (e) => {
|
1686
1680
|
let t = document.querySelector(e);
|
1687
1681
|
if (!t)
|
1688
1682
|
return;
|
1689
1683
|
let s = t.scrollHeight - t.clientHeight;
|
1690
1684
|
t.scrollTop = s;
|
1691
1685
|
});
|
1692
|
-
class
|
1686
|
+
class Rt {
|
1693
1687
|
constructor() {
|
1694
1688
|
/**
|
1695
1689
|
* 是否美化
|
@@ -1697,13 +1691,13 @@ class _t {
|
|
1697
1691
|
n(this, "beautify", !1);
|
1698
1692
|
}
|
1699
1693
|
}
|
1700
|
-
class
|
1694
|
+
class W {
|
1701
1695
|
//#region 序列化
|
1702
1696
|
/**
|
1703
1697
|
* 对非字符串进行序列化
|
1704
1698
|
*/
|
1705
1699
|
static serializeWithoutString(e) {
|
1706
|
-
return typeof e == "string" ? e :
|
1700
|
+
return typeof e == "string" ? e : W.serialize(e, !0);
|
1707
1701
|
}
|
1708
1702
|
/**
|
1709
1703
|
* 把对象格式化为Json字符串
|
@@ -1711,10 +1705,10 @@ class J {
|
|
1711
1705
|
static serialize(e, t) {
|
1712
1706
|
if (e == null)
|
1713
1707
|
return null;
|
1714
|
-
t == null && (t = new
|
1708
|
+
t == null && (t = new Rt());
|
1715
1709
|
let l = (typeof t == "boolean" ? t : t.beautify) ? 2 : null, r;
|
1716
1710
|
if (typeof e == "string") {
|
1717
|
-
let a =
|
1711
|
+
let a = W.deserialize(e);
|
1718
1712
|
if (a == null)
|
1719
1713
|
return e;
|
1720
1714
|
r = a;
|
@@ -1761,7 +1755,7 @@ class J {
|
|
1761
1755
|
* 把json字符串合并到目标对象上
|
1762
1756
|
*/
|
1763
1757
|
static mergeTo(e, t) {
|
1764
|
-
if (
|
1758
|
+
if (Q.isNullOrEmpty(t) || e == null)
|
1765
1759
|
return;
|
1766
1760
|
let s = JSON.parse(t), l = Object.keys(s);
|
1767
1761
|
for (let r of l)
|
@@ -1810,7 +1804,7 @@ class J {
|
|
1810
1804
|
}
|
1811
1805
|
//#endregion
|
1812
1806
|
}
|
1813
|
-
class
|
1807
|
+
class lt {
|
1814
1808
|
/**
|
1815
1809
|
* 获取浏览器默认语言
|
1816
1810
|
*/
|
@@ -1818,7 +1812,7 @@ class rt {
|
|
1818
1812
|
return navigator.language == "zh-CN" ? "zh-cn" : "en";
|
1819
1813
|
}
|
1820
1814
|
}
|
1821
|
-
class
|
1815
|
+
class _t {
|
1822
1816
|
/**
|
1823
1817
|
* 清空对象中的空值
|
1824
1818
|
*/
|
@@ -1831,7 +1825,7 @@ class Bt {
|
|
1831
1825
|
* 签名字典
|
1832
1826
|
*/
|
1833
1827
|
static signDictionary(e, t = !0) {
|
1834
|
-
return this.clean(e),
|
1828
|
+
return this.clean(e), K.serialize(e, t);
|
1835
1829
|
}
|
1836
1830
|
}
|
1837
1831
|
class F {
|
@@ -1906,24 +1900,24 @@ class F {
|
|
1906
1900
|
}
|
1907
1901
|
//#endregion
|
1908
1902
|
}
|
1909
|
-
class
|
1903
|
+
class Re {
|
1910
1904
|
constructor() {
|
1911
1905
|
n(this, "type");
|
1912
1906
|
}
|
1913
1907
|
}
|
1914
|
-
class
|
1908
|
+
class Bt extends Re {
|
1915
1909
|
constructor() {
|
1916
1910
|
super(...arguments);
|
1917
1911
|
n(this, "type", "Json");
|
1918
1912
|
}
|
1919
1913
|
insert(t) {
|
1920
|
-
return
|
1914
|
+
return W.serialize(t.rows, !0);
|
1921
1915
|
}
|
1922
1916
|
update(t) {
|
1923
|
-
return
|
1917
|
+
return W.serialize(t.rows, !0);
|
1924
1918
|
}
|
1925
1919
|
}
|
1926
|
-
class
|
1920
|
+
class Pt extends Re {
|
1927
1921
|
constructor() {
|
1928
1922
|
super(...arguments);
|
1929
1923
|
n(this, "type", "Mongo");
|
@@ -1931,7 +1925,7 @@ class Ut extends _e {
|
|
1931
1925
|
insert(t) {
|
1932
1926
|
let { name: s, columns: l, rows: r } = t, i = "";
|
1933
1927
|
for (let a = 0; a < r.length; a++) {
|
1934
|
-
let o = r[a], c =
|
1928
|
+
let o = r[a], c = W.serialize(o, !0);
|
1935
1929
|
i += `db.${s}.insert(${c})`, a != r.length - 1 && (i += `\r
|
1936
1930
|
`);
|
1937
1931
|
}
|
@@ -1940,19 +1934,19 @@ class Ut extends _e {
|
|
1940
1934
|
update(t) {
|
1941
1935
|
let { name: s, columns: l, rows: r } = t, i = "", a = l.filter((o) => o.key).map((o) => o.name);
|
1942
1936
|
for (let o = 0; o < r.length; o++) {
|
1943
|
-
let c = r[o], h = te.extract(c, a), d =
|
1937
|
+
let c = r[o], h = te.extract(c, a), d = W.serialize(h, !0), p = W.serialize(c, !0);
|
1944
1938
|
i += `db.${s}.update(${d},{$set:${p})`, o != r.length - 1 && (i += `\r
|
1945
1939
|
`);
|
1946
1940
|
}
|
1947
1941
|
return i;
|
1948
1942
|
}
|
1949
1943
|
}
|
1950
|
-
class
|
1944
|
+
class Ve {
|
1951
1945
|
constructor() {
|
1952
1946
|
n(this, "type");
|
1953
1947
|
}
|
1954
1948
|
}
|
1955
|
-
const he = class he extends
|
1949
|
+
const he = class he extends Ve {
|
1956
1950
|
constructor() {
|
1957
1951
|
super(...arguments);
|
1958
1952
|
//#region 属性
|
@@ -2141,8 +2135,8 @@ const he = class he extends ze {
|
|
2141
2135
|
* 静态版本,保证所有数据库实例拿到最新版本信息
|
2142
2136
|
*/
|
2143
2137
|
n(he, "version", null);
|
2144
|
-
let
|
2145
|
-
class
|
2138
|
+
let Me = he;
|
2139
|
+
class Ut extends Ve {
|
2146
2140
|
constructor() {
|
2147
2141
|
super(...arguments);
|
2148
2142
|
//#region 属性
|
@@ -2213,7 +2207,7 @@ class Ft extends ze {
|
|
2213
2207
|
}
|
2214
2208
|
//#endregion
|
2215
2209
|
}
|
2216
|
-
class
|
2210
|
+
class Ft extends Ve {
|
2217
2211
|
constructor() {
|
2218
2212
|
super(...arguments);
|
2219
2213
|
n(this, "type", "Cookie");
|
@@ -2250,13 +2244,13 @@ class Mt extends ze {
|
|
2250
2244
|
dispose() {
|
2251
2245
|
}
|
2252
2246
|
}
|
2253
|
-
class
|
2247
|
+
class Mt extends F {
|
2254
2248
|
constructor() {
|
2255
2249
|
super(...arguments);
|
2256
2250
|
n(this, "_default");
|
2257
2251
|
}
|
2258
2252
|
get instances() {
|
2259
|
-
return [new
|
2253
|
+
return [new Me(), new Ut(), new Ft()];
|
2260
2254
|
}
|
2261
2255
|
/**
|
2262
2256
|
* 获取指定类型的提供程序
|
@@ -2278,7 +2272,7 @@ class Nt extends F {
|
|
2278
2272
|
return this.create("Storage");
|
2279
2273
|
}
|
2280
2274
|
}
|
2281
|
-
class
|
2275
|
+
class Ye {
|
2282
2276
|
/**
|
2283
2277
|
* 获取实际SQL字段名称
|
2284
2278
|
*/
|
@@ -2292,16 +2286,16 @@ class Ge {
|
|
2292
2286
|
if (e == null)
|
2293
2287
|
return "null";
|
2294
2288
|
let t = typeof e;
|
2295
|
-
return t == "number" || t == "boolean" ? e : t == "object" || t == "string" ? `'${(t == "object" ?
|
2289
|
+
return t == "number" || t == "boolean" ? e : t == "object" || t == "string" ? `'${(t == "object" ? W.serialize(e) : e).replace(/'/g, "''")}'` : e;
|
2296
2290
|
}
|
2297
2291
|
}
|
2298
|
-
class
|
2292
|
+
class Ne extends Re {
|
2299
2293
|
constructor() {
|
2300
2294
|
super(...arguments);
|
2301
2295
|
n(this, "type", "Sql");
|
2302
2296
|
}
|
2303
2297
|
insert(t) {
|
2304
|
-
let { name: s, columns: l, rows: r } = t, i = t.getIdentity(), a = "", h = l.filter((d) => !d.identity).map((d) =>
|
2298
|
+
let { name: s, columns: l, rows: r } = t, i = t.getIdentity(), a = "", h = l.filter((d) => !d.identity).map((d) => Ye.getSqlName(d.name)).join(", ");
|
2305
2299
|
for (let d = 0; d < r.length; d++) {
|
2306
2300
|
let p = r[d];
|
2307
2301
|
a += `INSERT INTO ${s}\r
|
@@ -2310,11 +2304,11 @@ class qe extends _e {
|
|
2310
2304
|
`, a += "(";
|
2311
2305
|
let g = Object.keys(p);
|
2312
2306
|
for (let w = 0; w < g.length; w++) {
|
2313
|
-
let
|
2314
|
-
if (i != null && i.name ==
|
2307
|
+
let q = g[w];
|
2308
|
+
if (i != null && i.name == q)
|
2315
2309
|
continue;
|
2316
|
-
let
|
2317
|
-
a += `${
|
2310
|
+
let X = p[q];
|
2311
|
+
a += `${Ye.getValue(X)}`, w != g.length - 1 && (a += ", ");
|
2318
2312
|
}
|
2319
2313
|
a += ")", d != r.length - 1 && (a += `\r
|
2320
2314
|
\r
|
@@ -2326,24 +2320,24 @@ class qe extends _e {
|
|
2326
2320
|
return "";
|
2327
2321
|
}
|
2328
2322
|
}
|
2329
|
-
class
|
2323
|
+
class Nt extends Re {
|
2330
2324
|
constructor() {
|
2331
2325
|
super(...arguments);
|
2332
2326
|
n(this, "type", "MySql");
|
2333
2327
|
}
|
2334
2328
|
insert(t) {
|
2335
|
-
return new
|
2329
|
+
return new Ne().insert(t);
|
2336
2330
|
}
|
2337
2331
|
update(t) {
|
2338
|
-
return new
|
2332
|
+
return new Ne().update(t);
|
2339
2333
|
}
|
2340
2334
|
}
|
2341
|
-
class
|
2335
|
+
class qt extends F {
|
2342
2336
|
open() {
|
2343
|
-
super.open(), super.instances = [new
|
2337
|
+
super.open(), super.instances = [new Bt(), new Pt(), new Nt(), new Ne()];
|
2344
2338
|
}
|
2345
2339
|
}
|
2346
|
-
class
|
2340
|
+
class Gl {
|
2347
2341
|
constructor() {
|
2348
2342
|
/**
|
2349
2343
|
* 表名
|
@@ -2365,9 +2359,12 @@ class er {
|
|
2365
2359
|
return this.columns == null || this.columns.length == 0 ? null : this.columns.find((t) => t.identity);
|
2366
2360
|
}
|
2367
2361
|
}
|
2368
|
-
class
|
2362
|
+
class rt {
|
2369
2363
|
constructor() {
|
2370
|
-
|
2364
|
+
/**
|
2365
|
+
* 任务实例,用于控制并发
|
2366
|
+
*/
|
2367
|
+
n(this, "task");
|
2371
2368
|
/**
|
2372
2369
|
* 异步加载脚本/样式内容,把内容处理为行内html
|
2373
2370
|
* 这种方式,依赖的内部资源,会从当前站点加载
|
@@ -2393,52 +2390,86 @@ class nt {
|
|
2393
2390
|
/**
|
2394
2391
|
* 通过注入DOM标签异步加载脚本或样式表,已防重
|
2395
2392
|
*/
|
2396
|
-
n(this, "loadResourceAsync", async (e) => {
|
2397
|
-
let
|
2398
|
-
for (let
|
2399
|
-
let
|
2400
|
-
let
|
2401
|
-
|
2402
|
-
|
2403
|
-
},
|
2404
|
-
|
2405
|
-
let
|
2406
|
-
throw
|
2393
|
+
n(this, "loadResourceAsync", async (e, t = null) => {
|
2394
|
+
let s = Q.getArray(e), l = [];
|
2395
|
+
for (let i of s) {
|
2396
|
+
let a = new Promise((o, c) => {
|
2397
|
+
let h = N.getByUrl(i);
|
2398
|
+
h != null ? o(h) : (h = N.createByUrl(i), document.head.appendChild(h), h.onload = (d) => {
|
2399
|
+
t == null || t(), o(h);
|
2400
|
+
}, h.onerror = (d) => {
|
2401
|
+
c(d);
|
2402
|
+
let p;
|
2403
|
+
throw d instanceof Event ? p = `${d.type}, 耗时: ${d.timeStamp}` : p = d, new Error(`脚本: ${i} 加载出错: ${p}`);
|
2407
2404
|
});
|
2408
2405
|
});
|
2409
|
-
|
2406
|
+
l.push(a);
|
2410
2407
|
}
|
2411
|
-
return await Promise.all(
|
2408
|
+
return await Promise.all(l);
|
2412
2409
|
});
|
2413
2410
|
}
|
2414
2411
|
//#endregion
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2412
|
+
//#region 开启
|
2413
|
+
async open(e) {
|
2414
|
+
this.task = await $.task.create("Memory"), this.task.taskLimit = 1;
|
2415
|
+
}
|
2416
|
+
async getMonaco(e = null) {
|
2417
|
+
let t = window.monaco;
|
2418
|
+
if (t)
|
2419
|
+
return t;
|
2420
|
+
let s = async () => {
|
2421
|
+
if (window.monaco)
|
2422
|
+
return Promise.resolve();
|
2423
|
+
await new Promise(async (r, i) => {
|
2424
|
+
let a = ["/loader.js"];
|
2425
|
+
await this.loadFilesAsync(e, a);
|
2426
|
+
let o = window.require;
|
2427
|
+
o.config({ paths: { vs: e } }), o(["vs/editor/editor.main"], (c) => {
|
2428
|
+
r(c);
|
2429
|
+
});
|
2430
|
+
});
|
2431
|
+
};
|
2432
|
+
return await this.task.concurrent(s), t = window.monaco, t;
|
2433
|
+
}
|
2434
|
+
async getQuill(e = null) {
|
2435
|
+
let t = window.Quill;
|
2436
|
+
if (t)
|
2437
|
+
return t;
|
2438
|
+
let s = ["/quill.snow.css", "/quill.js"], l = async () => {
|
2439
|
+
if (window.Quill)
|
2440
|
+
return Promise.resolve();
|
2441
|
+
await this.loadFilesAsync(e, s);
|
2442
|
+
};
|
2443
|
+
return await this.task.concurrent(l), t = window.Quill, t;
|
2444
|
+
}
|
2445
|
+
//#region 加载
|
2446
|
+
async loadFilesAsync(e, t, s = null) {
|
2447
|
+
let l = [];
|
2448
|
+
for (let r of t)
|
2449
|
+
l.push(e + r);
|
2450
|
+
await this.loadResourceAsync(l, s);
|
2420
2451
|
}
|
2421
2452
|
async loadAsync(e) {
|
2422
|
-
let t =
|
2453
|
+
let t = Q.getArray(e);
|
2423
2454
|
return await this.loadResourceAsync(t);
|
2424
2455
|
}
|
2425
2456
|
//#endregion
|
2426
2457
|
}
|
2427
|
-
class
|
2458
|
+
class Vt extends rt {
|
2428
2459
|
constructor() {
|
2429
2460
|
super(...arguments);
|
2430
2461
|
//#region 属性
|
2431
2462
|
n(this, "type", "Local");
|
2432
2463
|
}
|
2433
2464
|
//#endregion
|
2434
|
-
//#region 开启
|
2435
|
-
async open(t) {
|
2436
|
-
}
|
2437
|
-
//#endregion
|
2438
2465
|
async getCrypto() {
|
2439
2466
|
let t = ["/crypto-js.js"];
|
2440
2467
|
return await super.loadFilesAsync("/assets/crypto-js", t), window.CryptoJS;
|
2441
2468
|
}
|
2469
|
+
async getECharts() {
|
2470
|
+
let t = ["/echarts.min.js"];
|
2471
|
+
return await super.loadFilesAsync("/assets/echarts", t), window.echarts;
|
2472
|
+
}
|
2442
2473
|
async getElementPlus() {
|
2443
2474
|
let t = ["/index.css", "/theme-chalk/dark/css-vars.css"];
|
2444
2475
|
await super.loadFilesAsync("/assets/element-plus", t);
|
@@ -2448,14 +2479,10 @@ class zt extends nt {
|
|
2448
2479
|
await super.loadFilesAsync("/assets/@fortawesome/fontawesome-free", t);
|
2449
2480
|
}
|
2450
2481
|
async getMonaco() {
|
2451
|
-
return
|
2452
|
-
}
|
2453
|
-
getMonacoPath() {
|
2454
|
-
return "/assets/monaco-editor/min/vs";
|
2482
|
+
return await super.getMonaco("/assets/monaco-editor/min/vs");
|
2455
2483
|
}
|
2456
2484
|
async getQuill() {
|
2457
|
-
|
2458
|
-
return await super.loadFilesAsync("/assets/quill", t), window.Quill;
|
2485
|
+
return await super.getQuill("/assets/quill");
|
2459
2486
|
}
|
2460
2487
|
async getWeiXin() {
|
2461
2488
|
return Promise.resolve(void 0);
|
@@ -2465,28 +2492,23 @@ class zt extends nt {
|
|
2465
2492
|
return await super.loadFilesAsync("/assets/xlsx-js-style", t), window.XLSX;
|
2466
2493
|
}
|
2467
2494
|
}
|
2468
|
-
class
|
2495
|
+
class zt extends rt {
|
2469
2496
|
constructor() {
|
2470
2497
|
super(...arguments);
|
2471
2498
|
//#region 属性
|
2472
2499
|
n(this, "type", "Third");
|
2473
|
-
/**
|
2474
|
-
* 任务实例,用于控制并发
|
2475
|
-
*/
|
2476
|
-
n(this, "task");
|
2477
2500
|
n(this, "staticFileCdn", "https://cdn.staticfile.net");
|
2478
2501
|
n(this, "jdCdn", "https://unpkg.shop.jd.com");
|
2479
2502
|
}
|
2480
2503
|
//#endregion
|
2481
|
-
//#region 开启
|
2482
|
-
async open(t) {
|
2483
|
-
this.task = await $.task.create("Memory");
|
2484
|
-
}
|
2485
|
-
//#endregion
|
2486
2504
|
async getCrypto() {
|
2487
2505
|
let t = ["/crypto-js.js"];
|
2488
2506
|
return await super.loadFilesAsync(`${this.jdCdn}/crypto-js@4.2.0`, t), window.CryptoJS;
|
2489
2507
|
}
|
2508
|
+
async getECharts() {
|
2509
|
+
let t = ["/dist/echarts.min.js"];
|
2510
|
+
return await super.loadFilesAsync(`${this.jdCdn}/echarts@5.5.1`, t), window.echarts;
|
2511
|
+
}
|
2490
2512
|
async getElementPlus() {
|
2491
2513
|
let t = [
|
2492
2514
|
"/index.css",
|
@@ -2501,19 +2523,11 @@ class Kt extends nt {
|
|
2501
2523
|
];
|
2502
2524
|
await super.loadFilesAsync(`${this.jdCdn}/@fortawesome/fontawesome-free@6.5.2`, t);
|
2503
2525
|
}
|
2504
|
-
getMonacoPath() {
|
2505
|
-
return `${this.jdCdn}/monaco-editor@0.50.0/min/vs`;
|
2506
|
-
}
|
2507
2526
|
async getMonaco() {
|
2508
|
-
|
2509
|
-
await super.loadAsync(t);
|
2527
|
+
return super.getMonaco(`${this.jdCdn}/monaco-editor@0.50.0/min/vs`);
|
2510
2528
|
}
|
2511
2529
|
async getQuill() {
|
2512
|
-
|
2513
|
-
"/quill.snow.min.css",
|
2514
|
-
"/quill.js"
|
2515
|
-
], s = super.loadFilesAsync(`${this.staticFileCdn}/quill/2.0.2`, t);
|
2516
|
-
return await this.task.concurrent(s, 1), window.Quill;
|
2530
|
+
return super.getQuill(`${this.staticFileCdn}/quill/2.0.2`);
|
2517
2531
|
}
|
2518
2532
|
async getWeiXin() {
|
2519
2533
|
let t = ["/open/js/jweixin-1.6.0.js"];
|
@@ -2526,9 +2540,9 @@ class Kt extends nt {
|
|
2526
2540
|
return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, t), window.XLSX;
|
2527
2541
|
}
|
2528
2542
|
}
|
2529
|
-
class
|
2543
|
+
class Kt extends F {
|
2530
2544
|
open() {
|
2531
|
-
super.open(), super.instances = [new
|
2545
|
+
super.open(), super.instances = [new Vt(), new zt()];
|
2532
2546
|
}
|
2533
2547
|
/**
|
2534
2548
|
* 获取指定CDN实例
|
@@ -2538,7 +2552,7 @@ class Wt extends F {
|
|
2538
2552
|
return await s.open(t), s;
|
2539
2553
|
}
|
2540
2554
|
}
|
2541
|
-
class
|
2555
|
+
class Wt {
|
2542
2556
|
constructor() {
|
2543
2557
|
n(this, "type");
|
2544
2558
|
}
|
@@ -2551,7 +2565,7 @@ class Jt {
|
|
2551
2565
|
return JSON.parse(t);
|
2552
2566
|
}
|
2553
2567
|
}
|
2554
|
-
class
|
2568
|
+
class Qt extends Wt {
|
2555
2569
|
constructor() {
|
2556
2570
|
super(...arguments);
|
2557
2571
|
//#region 属性
|
@@ -2561,7 +2575,7 @@ class Xt extends Jt {
|
|
2561
2575
|
//#endregion
|
2562
2576
|
//#region 开启
|
2563
2577
|
async open(t) {
|
2564
|
-
this.crypto = await
|
2578
|
+
this.crypto = await ye.getCrypto();
|
2565
2579
|
}
|
2566
2580
|
//#endregion
|
2567
2581
|
encodeString(t) {
|
@@ -2573,9 +2587,9 @@ class Xt extends Jt {
|
|
2573
2587
|
return this.crypto.enc.Utf8.stringify(s);
|
2574
2588
|
}
|
2575
2589
|
}
|
2576
|
-
class
|
2590
|
+
class Jt extends F {
|
2577
2591
|
get instances() {
|
2578
|
-
return [new
|
2592
|
+
return [new Qt()];
|
2579
2593
|
}
|
2580
2594
|
/**
|
2581
2595
|
* 创建执行类型的Hash实例
|
@@ -2591,12 +2605,12 @@ class Qt extends F {
|
|
2591
2605
|
return await this.createIfAbsent("Base64");
|
2592
2606
|
}
|
2593
2607
|
}
|
2594
|
-
class
|
2608
|
+
class Xt {
|
2595
2609
|
constructor() {
|
2596
2610
|
n(this, "type");
|
2597
2611
|
}
|
2598
2612
|
}
|
2599
|
-
class
|
2613
|
+
class Yt extends Xt {
|
2600
2614
|
constructor() {
|
2601
2615
|
super(...arguments);
|
2602
2616
|
//#region 属性
|
@@ -2606,7 +2620,7 @@ class Gt extends Yt {
|
|
2606
2620
|
//#endregion
|
2607
2621
|
//#region 开启
|
2608
2622
|
async open(t) {
|
2609
|
-
this.xlsx = await
|
2623
|
+
this.xlsx = await ye.getXlsx();
|
2610
2624
|
}
|
2611
2625
|
//#endregion
|
2612
2626
|
export(t, s) {
|
@@ -2643,9 +2657,9 @@ class Gt extends Yt {
|
|
2643
2657
|
}), o["!cols"] = h, this.xlsx.writeFile(a, s);
|
2644
2658
|
}
|
2645
2659
|
}
|
2646
|
-
class
|
2660
|
+
class Gt extends F {
|
2647
2661
|
get instances() {
|
2648
|
-
return [new
|
2662
|
+
return [new Yt()];
|
2649
2663
|
}
|
2650
2664
|
/**
|
2651
2665
|
* 获取Excel实例
|
@@ -2655,19 +2669,19 @@ class Zt extends F {
|
|
2655
2669
|
return await s.open(t), s;
|
2656
2670
|
}
|
2657
2671
|
}
|
2658
|
-
class
|
2672
|
+
class Zt {
|
2659
2673
|
constructor() {
|
2660
2674
|
n(this, "type", "Json");
|
2661
2675
|
}
|
2662
2676
|
}
|
2663
|
-
class
|
2677
|
+
class Ht extends Zt {
|
2664
2678
|
}
|
2665
|
-
class
|
2679
|
+
class es extends F {
|
2666
2680
|
get instances() {
|
2667
|
-
return [new
|
2681
|
+
return [new Ht()];
|
2668
2682
|
}
|
2669
2683
|
}
|
2670
|
-
class
|
2684
|
+
class ts {
|
2671
2685
|
constructor() {
|
2672
2686
|
n(this, "type", "Sort");
|
2673
2687
|
}
|
@@ -2692,7 +2706,7 @@ class ss {
|
|
2692
2706
|
}
|
2693
2707
|
}
|
2694
2708
|
}
|
2695
|
-
class
|
2709
|
+
class ss {
|
2696
2710
|
constructor() {
|
2697
2711
|
n(this, "type", "I18N");
|
2698
2712
|
}
|
@@ -2705,7 +2719,7 @@ class ls {
|
|
2705
2719
|
copy(e, t, s) {
|
2706
2720
|
}
|
2707
2721
|
}
|
2708
|
-
class
|
2722
|
+
class ls {
|
2709
2723
|
constructor() {
|
2710
2724
|
n(this, "type", "Expression");
|
2711
2725
|
}
|
@@ -2718,9 +2732,9 @@ class rs {
|
|
2718
2732
|
copy(e, t, s) {
|
2719
2733
|
}
|
2720
2734
|
}
|
2721
|
-
class
|
2735
|
+
class rs extends F {
|
2722
2736
|
get instances() {
|
2723
|
-
return [new
|
2737
|
+
return [new ts(), new ss(), new ls()];
|
2724
2738
|
}
|
2725
2739
|
/**
|
2726
2740
|
* 获取指定特征实例
|
@@ -2730,12 +2744,12 @@ class ns extends F {
|
|
2730
2744
|
return s.open(null), s;
|
2731
2745
|
}
|
2732
2746
|
}
|
2733
|
-
class
|
2747
|
+
class nt {
|
2734
2748
|
constructor() {
|
2735
2749
|
n(this, "type");
|
2736
2750
|
}
|
2737
2751
|
}
|
2738
|
-
class
|
2752
|
+
class ns extends nt {
|
2739
2753
|
constructor() {
|
2740
2754
|
super(...arguments);
|
2741
2755
|
//#region 属性
|
@@ -2751,7 +2765,7 @@ class is extends it {
|
|
2751
2765
|
return Array.from(new Uint8Array(r)).map((o) => o.toString(16).padStart(2, "0")).join("");
|
2752
2766
|
}
|
2753
2767
|
}
|
2754
|
-
class
|
2768
|
+
class is extends nt {
|
2755
2769
|
constructor() {
|
2756
2770
|
super(...arguments);
|
2757
2771
|
//#region 属性
|
@@ -2761,7 +2775,7 @@ class as extends it {
|
|
2761
2775
|
//#endregion
|
2762
2776
|
//#region 开启
|
2763
2777
|
async open(t) {
|
2764
|
-
this.crypto = await
|
2778
|
+
this.crypto = await ye.getCrypto();
|
2765
2779
|
}
|
2766
2780
|
//#endregion
|
2767
2781
|
compute(t) {
|
@@ -2769,9 +2783,9 @@ class as extends it {
|
|
2769
2783
|
return Promise.resolve(s);
|
2770
2784
|
}
|
2771
2785
|
}
|
2772
|
-
class
|
2786
|
+
class as extends F {
|
2773
2787
|
get instances() {
|
2774
|
-
return [new
|
2788
|
+
return [new ns(), new is()];
|
2775
2789
|
}
|
2776
2790
|
async create(e, t) {
|
2777
2791
|
let s = await super.create(e);
|
@@ -2784,7 +2798,7 @@ class os extends F {
|
|
2784
2798
|
return await this.createIfAbsent("Md5");
|
2785
2799
|
}
|
2786
2800
|
}
|
2787
|
-
class
|
2801
|
+
class it {
|
2788
2802
|
constructor() {
|
2789
2803
|
/**
|
2790
2804
|
* 请求唯一标识
|
@@ -2842,11 +2856,11 @@ class at {
|
|
2842
2856
|
* 不能放在getRequest中处理,因为外部会直接调用当前send方法,而不走getRequest
|
2843
2857
|
*/
|
2844
2858
|
prepare() {
|
2845
|
-
this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && this.contentType == "application/json" && (this.body =
|
2859
|
+
this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && this.contentType == "application/json" && (this.body = W.serializeWithoutString(this.data)), this.data == null && this.body != null && this.contentType == "application/json" && (this.data = W.deserialize(this.body)), this.contentType != null && this.addHeader("content-type", this.contentType);
|
2846
2860
|
}
|
2847
2861
|
//#endregion
|
2848
2862
|
}
|
2849
|
-
class
|
2863
|
+
class at extends it {
|
2850
2864
|
constructor() {
|
2851
2865
|
super();
|
2852
2866
|
/**
|
@@ -2861,10 +2875,10 @@ class ot extends at {
|
|
2861
2875
|
* 实际请求地址
|
2862
2876
|
*/
|
2863
2877
|
n(this, "url");
|
2864
|
-
this.id =
|
2878
|
+
this.id = Q.getUniqueId(8);
|
2865
2879
|
}
|
2866
2880
|
}
|
2867
|
-
class
|
2881
|
+
class ze {
|
2868
2882
|
constructor() {
|
2869
2883
|
//#region 属性
|
2870
2884
|
n(this, "type");
|
@@ -2874,14 +2888,14 @@ class Ke {
|
|
2874
2888
|
//#endregion
|
2875
2889
|
//#region 开启
|
2876
2890
|
async open(e) {
|
2877
|
-
|
2891
|
+
W.mergeTo(this, e);
|
2878
2892
|
}
|
2879
2893
|
//#endregion
|
2880
2894
|
async get(e, t) {
|
2881
2895
|
return (await this.sendGet(e, t)).data;
|
2882
2896
|
}
|
2883
2897
|
async sendGet(e, t) {
|
2884
|
-
let s =
|
2898
|
+
let s = K.getUrl(e, t), l = this.getRequest("GET", "application/json", s);
|
2885
2899
|
return await this.send(l);
|
2886
2900
|
}
|
2887
2901
|
async post(e, t) {
|
@@ -2902,11 +2916,11 @@ class Ke {
|
|
2902
2916
|
* 获取请求消息
|
2903
2917
|
*/
|
2904
2918
|
getRequest(e, t, s, l = null) {
|
2905
|
-
let r = new
|
2906
|
-
return r.method = e, r.contentType = t, r.path = s, r.body =
|
2919
|
+
let r = new at();
|
2920
|
+
return r.method = e, r.contentType = t, r.path = s, r.body = W.serializeWithoutString(l), r;
|
2907
2921
|
}
|
2908
2922
|
}
|
2909
|
-
class
|
2923
|
+
class Ge extends it {
|
2910
2924
|
constructor() {
|
2911
2925
|
super(...arguments);
|
2912
2926
|
/**
|
@@ -2931,14 +2945,14 @@ class Ze extends at {
|
|
2931
2945
|
n(this, "request");
|
2932
2946
|
}
|
2933
2947
|
}
|
2934
|
-
class
|
2948
|
+
class os extends ze {
|
2935
2949
|
constructor() {
|
2936
2950
|
super(...arguments);
|
2937
2951
|
n(this, "type", "Default");
|
2938
2952
|
n(this, "baseUrl");
|
2939
2953
|
}
|
2940
2954
|
async send(t) {
|
2941
|
-
|
2955
|
+
Q.isNullOrEmpty(t.url) && (t.url = this.baseUrl + t.path), t.prepare();
|
2942
2956
|
let s;
|
2943
2957
|
return typeof XMLHttpRequest > "u" ? (s = await this.sendWithFetch(t), s) : (s = await this.sendWithXmlHttpRequest(t), s);
|
2944
2958
|
}
|
@@ -2946,7 +2960,7 @@ class us extends Ke {
|
|
2946
2960
|
* 使用Fetch发送请求,谷歌插件场景专用
|
2947
2961
|
*/
|
2948
2962
|
async sendWithFetch(t) {
|
2949
|
-
let s = (/* @__PURE__ */ new Date()).getTime(), l = new
|
2963
|
+
let s = (/* @__PURE__ */ new Date()).getTime(), l = new Ge();
|
2950
2964
|
l.request = t, l.id = t.id;
|
2951
2965
|
let r = {
|
2952
2966
|
method: t.method,
|
@@ -2965,7 +2979,7 @@ class us extends Ke {
|
|
2965
2979
|
* 使用XmlHttpRequest发送请求
|
2966
2980
|
*/
|
2967
2981
|
sendWithXmlHttpRequest(t) {
|
2968
|
-
let s = new
|
2982
|
+
let s = new Ge();
|
2969
2983
|
return s.request = t, s.id = t.id, new Promise(async (l, r) => {
|
2970
2984
|
var a;
|
2971
2985
|
await ((a = this.onRequest) == null ? void 0 : a.call(this, t));
|
@@ -2994,7 +3008,7 @@ class us extends Ke {
|
|
2994
3008
|
});
|
2995
3009
|
}
|
2996
3010
|
}
|
2997
|
-
class
|
3011
|
+
class us extends ze {
|
2998
3012
|
constructor() {
|
2999
3013
|
super(...arguments);
|
3000
3014
|
//#region 属性
|
@@ -3038,19 +3052,19 @@ class cs extends Ke {
|
|
3038
3052
|
hash_type: "sha256",
|
3039
3053
|
timestamp: parseInt((s / 1e3).toString())
|
3040
3054
|
};
|
3041
|
-
|
3042
|
-
let r =
|
3055
|
+
Q.isNullOrEmpty(t.body) || (l.jsonBody = t.body);
|
3056
|
+
let r = K.deserialize(t.path);
|
3043
3057
|
for (let p in r)
|
3044
3058
|
l[p] = r[p];
|
3045
|
-
let i =
|
3046
|
-
l =
|
3047
|
-
let a =
|
3048
|
-
l.sign = c.toLowerCase(), delete l.jsonBody, l =
|
3049
|
-
let h =
|
3050
|
-
return t.url =
|
3059
|
+
let i = K.getPath(t.path);
|
3060
|
+
l = Ue.sort(l);
|
3061
|
+
let a = _t.signDictionary(l, !1), o = `POST${i}?${a}${this.appSecret}`, c = await this.hasher.compute(o);
|
3062
|
+
l.sign = c.toLowerCase(), delete l.jsonBody, l = Ue.sort(l);
|
3063
|
+
let h = K.serialize(l);
|
3064
|
+
return t.url = K.concatUrl(this.baseUrl, i + "?" + h), await this.requester.send(t);
|
3051
3065
|
}
|
3052
3066
|
}
|
3053
|
-
class
|
3067
|
+
class cs extends ze {
|
3054
3068
|
constructor() {
|
3055
3069
|
super(...arguments);
|
3056
3070
|
//#region 属性
|
@@ -3101,20 +3115,20 @@ class ds extends Ke {
|
|
3101
3115
|
* 发送请求
|
3102
3116
|
*/
|
3103
3117
|
async send(t) {
|
3104
|
-
t.url =
|
3118
|
+
t.url = K.concatUrl(this.baseUrl, t.path), await this.onRequest(t);
|
3105
3119
|
let s = await this.http.send(t);
|
3106
3120
|
if (s.status != 200) {
|
3107
3121
|
let r;
|
3108
|
-
return s.status == 0 ? r = `网络异常,请检查接口访问是否正常: ${t.method} ${t.url}` : r = `接口加载异常: ${t.method}(${s.status ?? 0}) ${t.url}`,
|
3122
|
+
return s.status == 0 ? r = `网络异常,请检查接口访问是否正常: ${t.method} ${t.url}` : r = `接口加载异常: ${t.method}(${s.status ?? 0}) ${t.url}`, be.warning(r), Promise.reject(r);
|
3109
3123
|
}
|
3110
3124
|
let l = s.data;
|
3111
|
-
return l.code != "Ok" ? (
|
3125
|
+
return l.code != "Ok" ? (be.error(l.message), Promise.reject(l)) : s;
|
3112
3126
|
}
|
3113
3127
|
/**
|
3114
3128
|
* 请求预处理
|
3115
3129
|
*/
|
3116
3130
|
async beforeRequest(t) {
|
3117
|
-
if (
|
3131
|
+
if (K.httpOrHttps(t.path))
|
3118
3132
|
return Promise.resolve();
|
3119
3133
|
let s;
|
3120
3134
|
if (this.user == null)
|
@@ -3132,21 +3146,21 @@ class ds extends Ke {
|
|
3132
3146
|
handleError(t) {
|
3133
3147
|
if (t instanceof Object) {
|
3134
3148
|
let s = t.message;
|
3135
|
-
t.message == "Network Error" && (
|
3149
|
+
t.message == "Network Error" && (K.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), be.error(s);
|
3136
3150
|
} else
|
3137
|
-
|
3151
|
+
be.error(t.message);
|
3138
3152
|
return Promise.reject(t);
|
3139
3153
|
}
|
3140
3154
|
}
|
3141
|
-
class
|
3155
|
+
class ds extends F {
|
3142
3156
|
get instances() {
|
3143
|
-
return [new
|
3157
|
+
return [new os(), new us(), new cs()];
|
3144
3158
|
}
|
3145
3159
|
/**
|
3146
3160
|
* 创建并开启
|
3147
3161
|
*/
|
3148
3162
|
async createById(e, t = null) {
|
3149
|
-
t == null && (t = new
|
3163
|
+
t == null && (t = new jt());
|
3150
3164
|
let s = await super.createById(e, t), l = t.value;
|
3151
3165
|
return await s.open(l.Conn), s;
|
3152
3166
|
}
|
@@ -3164,12 +3178,12 @@ class hs extends F {
|
|
3164
3178
|
return await this.createIfAbsent("Halo");
|
3165
3179
|
}
|
3166
3180
|
}
|
3167
|
-
class
|
3181
|
+
class hs {
|
3168
3182
|
constructor() {
|
3169
3183
|
n(this, "type");
|
3170
3184
|
}
|
3171
3185
|
}
|
3172
|
-
class
|
3186
|
+
class ps extends hs {
|
3173
3187
|
constructor() {
|
3174
3188
|
super(...arguments);
|
3175
3189
|
n(this, "type", "Console");
|
@@ -3196,9 +3210,9 @@ class gs extends ps {
|
|
3196
3210
|
console.warn(t);
|
3197
3211
|
}
|
3198
3212
|
}
|
3199
|
-
class
|
3213
|
+
class gs extends F {
|
3200
3214
|
get instances() {
|
3201
|
-
return [new
|
3215
|
+
return [new ps()];
|
3202
3216
|
}
|
3203
3217
|
/**
|
3204
3218
|
* 获取控制台消息提示类型
|
@@ -3207,12 +3221,12 @@ class fs extends F {
|
|
3207
3221
|
return await super.create("Console");
|
3208
3222
|
}
|
3209
3223
|
}
|
3210
|
-
class
|
3224
|
+
class fs {
|
3211
3225
|
constructor() {
|
3212
3226
|
n(this, "type");
|
3213
3227
|
}
|
3214
3228
|
}
|
3215
|
-
class
|
3229
|
+
class ms extends fs {
|
3216
3230
|
constructor() {
|
3217
3231
|
super(...arguments);
|
3218
3232
|
n(this, "type", "Default");
|
@@ -3223,7 +3237,7 @@ class ys extends ms {
|
|
3223
3237
|
}
|
3224
3238
|
async getSign(t, s, l, r, i) {
|
3225
3239
|
let o = `${t}.${s}.${l ?? ""}.${r}.${i}`;
|
3226
|
-
return (await
|
3240
|
+
return (await dt.compute(o)).toUpperCase();
|
3227
3241
|
}
|
3228
3242
|
loginUrl(t) {
|
3229
3243
|
return "";
|
@@ -3231,9 +3245,9 @@ class ys extends ms {
|
|
3231
3245
|
dispose() {
|
3232
3246
|
}
|
3233
3247
|
}
|
3234
|
-
class
|
3248
|
+
class ys extends F {
|
3235
3249
|
get instances() {
|
3236
|
-
return [new
|
3250
|
+
return [new ms()];
|
3237
3251
|
}
|
3238
3252
|
/**
|
3239
3253
|
* 获取指定签名实例
|
@@ -3243,7 +3257,7 @@ class vs extends F {
|
|
3243
3257
|
return await s.open(null), s;
|
3244
3258
|
}
|
3245
3259
|
}
|
3246
|
-
class
|
3260
|
+
class vs {
|
3247
3261
|
constructor() {
|
3248
3262
|
//#region 属性
|
3249
3263
|
n(this, "type", "Bearer");
|
@@ -3275,7 +3289,7 @@ class bs {
|
|
3275
3289
|
await this.provider.deleteAsync("user"), await this.provider.deleteAsync("sso");
|
3276
3290
|
}
|
3277
3291
|
}
|
3278
|
-
class
|
3292
|
+
class bs {
|
3279
3293
|
constructor() {
|
3280
3294
|
//#region 属性
|
3281
3295
|
n(this, "type", "Nio");
|
@@ -3309,7 +3323,7 @@ class ws {
|
|
3309
3323
|
await this.provider.deleteAsync("user"), await this.provider.deleteAsync("sso");
|
3310
3324
|
}
|
3311
3325
|
}
|
3312
|
-
class
|
3326
|
+
class ot {
|
3313
3327
|
constructor() {
|
3314
3328
|
/**
|
3315
3329
|
* 用户标识
|
@@ -3329,7 +3343,7 @@ class ut {
|
|
3329
3343
|
n(this, "identity");
|
3330
3344
|
}
|
3331
3345
|
}
|
3332
|
-
class
|
3346
|
+
class ws {
|
3333
3347
|
constructor() {
|
3334
3348
|
n(this, "type", "WeiXin");
|
3335
3349
|
}
|
@@ -3341,7 +3355,7 @@ class xs {
|
|
3341
3355
|
return "";
|
3342
3356
|
}
|
3343
3357
|
async getUser() {
|
3344
|
-
let e = new
|
3358
|
+
let e = new ot();
|
3345
3359
|
return e.userId = "", e;
|
3346
3360
|
}
|
3347
3361
|
getAuth(e, t, s, l) {
|
@@ -3351,12 +3365,12 @@ class xs {
|
|
3351
3365
|
return Promise.resolve();
|
3352
3366
|
}
|
3353
3367
|
}
|
3354
|
-
class
|
3368
|
+
class xs {
|
3355
3369
|
constructor() {
|
3356
3370
|
n(this, "type");
|
3357
3371
|
}
|
3358
3372
|
}
|
3359
|
-
class
|
3373
|
+
class Ss extends xs {
|
3360
3374
|
constructor() {
|
3361
3375
|
super(...arguments);
|
3362
3376
|
//#region 属性
|
@@ -3378,10 +3392,10 @@ class ks extends Ss {
|
|
3378
3392
|
async getUser() {
|
3379
3393
|
let t = await this.provider.getAsync("anonymous");
|
3380
3394
|
if (!t) {
|
3381
|
-
let l =
|
3395
|
+
let l = Q.getUniqueId();
|
3382
3396
|
await this.provider.saveAsync("anonymous", l), t = l;
|
3383
3397
|
}
|
3384
|
-
let s = new
|
3398
|
+
let s = new ot();
|
3385
3399
|
return s.identity = { token: t }, s;
|
3386
3400
|
}
|
3387
3401
|
getAuth(t, s, l, r) {
|
@@ -3391,7 +3405,7 @@ class ks extends Ss {
|
|
3391
3405
|
await this.provider.deleteAsync("anonymous");
|
3392
3406
|
}
|
3393
3407
|
}
|
3394
|
-
class
|
3408
|
+
class ks {
|
3395
3409
|
constructor() {
|
3396
3410
|
//#region 属性
|
3397
3411
|
n(this, "type", "Secret");
|
@@ -3424,7 +3438,7 @@ class Es {
|
|
3424
3438
|
}
|
3425
3439
|
}
|
3426
3440
|
let S = null;
|
3427
|
-
class
|
3441
|
+
class Es {
|
3428
3442
|
/**
|
3429
3443
|
* 只实例化一次
|
3430
3444
|
*/
|
@@ -3454,8 +3468,8 @@ class Cs {
|
|
3454
3468
|
let s = S.t_title(), l;
|
3455
3469
|
s ? e ? t ? l = `${e}(${t}) - ${s}` : l = `${e} - ${s}` : l = s : t ? l = `${e}(${t})` : l = e, document.title = l;
|
3456
3470
|
});
|
3457
|
-
S = this, S.i18n =
|
3458
|
-
locale:
|
3471
|
+
S = this, S.i18n = Lt({
|
3472
|
+
locale: lt.getLanguage(),
|
3459
3473
|
//未载入配置前的语言
|
3460
3474
|
messages: {},
|
3461
3475
|
silentTranslationWarn: !0,
|
@@ -3584,7 +3598,7 @@ class Cs {
|
|
3584
3598
|
}
|
3585
3599
|
//#endregion
|
3586
3600
|
}
|
3587
|
-
class
|
3601
|
+
class Cs {
|
3588
3602
|
constructor() {
|
3589
3603
|
//#region 属性
|
3590
3604
|
/**
|
@@ -3639,7 +3653,7 @@ class Ts {
|
|
3639
3653
|
let s = await this.getConfig(t.type);
|
3640
3654
|
this[t.type] = s ?? t.content;
|
3641
3655
|
}
|
3642
|
-
N.removeClass(document.documentElement, de.theme), N.addClass(document.documentElement, this.theme),
|
3656
|
+
N.removeClass(document.documentElement, de.theme), N.addClass(document.documentElement, this.theme), De.emit("theme", this.theme), N.addClass(document.documentElement, this.layout), this.setBackground(this.background), N.addStyle(document.documentElement, "font-family", this.font);
|
3643
3657
|
}
|
3644
3658
|
/**
|
3645
3659
|
* 尝试添加架构
|
@@ -3701,11 +3715,11 @@ class Ts {
|
|
3701
3715
|
* 获取当前语言
|
3702
3716
|
*/
|
3703
3717
|
getLanguage() {
|
3704
|
-
let e =
|
3718
|
+
let e = lt.getLanguage();
|
3705
3719
|
return this.language || e || "zh-cn";
|
3706
3720
|
}
|
3707
3721
|
}
|
3708
|
-
class
|
3722
|
+
class Ts {
|
3709
3723
|
constructor() {
|
3710
3724
|
/**
|
3711
3725
|
* 环境变量
|
@@ -3716,10 +3730,10 @@ class $s {
|
|
3716
3730
|
* 使用环境变量
|
3717
3731
|
*/
|
3718
3732
|
useEnv(e) {
|
3719
|
-
this.env = e, this.env.base =
|
3733
|
+
this.env = e, this.env.base = Q.trimEnd(e.VITE_ROOT, "/");
|
3720
3734
|
}
|
3721
3735
|
}
|
3722
|
-
class
|
3736
|
+
class $s {
|
3723
3737
|
constructor() {
|
3724
3738
|
n(this, "logs", []);
|
3725
3739
|
}
|
@@ -3743,7 +3757,7 @@ class Ls {
|
|
3743
3757
|
this.logs = [];
|
3744
3758
|
}
|
3745
3759
|
}
|
3746
|
-
class
|
3760
|
+
class Ls {
|
3747
3761
|
constructor() {
|
3748
3762
|
if (typeof window > "u")
|
3749
3763
|
return;
|
@@ -3752,7 +3766,7 @@ class Is {
|
|
3752
3766
|
this[t] = e[t];
|
3753
3767
|
}
|
3754
3768
|
}
|
3755
|
-
let
|
3769
|
+
let Ie = new Ls();
|
3756
3770
|
class As {
|
3757
3771
|
constructor() {
|
3758
3772
|
//#region 属性
|
@@ -3827,10 +3841,10 @@ class As {
|
|
3827
3841
|
return L.get("/app/setting").then(({ data: e }) => (Object.keys(e).forEach((t) => {
|
3828
3842
|
let s = e[t];
|
3829
3843
|
s && (this[t] = s);
|
3830
|
-
}), N.addClass(document.documentElement, this.theme,
|
3844
|
+
}), N.addClass(document.documentElement, this.theme, Ie.web.theme), De.emits({ theme: this.theme }), Promise.resolve(e))).catch((e) => Promise.reject(e));
|
3831
3845
|
}
|
3832
3846
|
}
|
3833
|
-
class
|
3847
|
+
class Is {
|
3834
3848
|
constructor() {
|
3835
3849
|
//#region 属性
|
3836
3850
|
/**
|
@@ -3855,12 +3869,12 @@ class Os {
|
|
3855
3869
|
* 登录后,连接Socket
|
3856
3870
|
*/
|
3857
3871
|
async connect() {
|
3858
|
-
if (!
|
3872
|
+
if (!Ie.api.ws)
|
3859
3873
|
return;
|
3860
3874
|
if (this.socket == null || this.reconnect) {
|
3861
|
-
let t =
|
3875
|
+
let t = Ie.api.ws, s = new at();
|
3862
3876
|
s.path = t, s.method = "GET", await L.onRequest(s);
|
3863
|
-
let l = s.getHeader("Authorization"), r =
|
3877
|
+
let l = s.getHeader("Authorization"), r = K.encode(l), i = `${t}?authorization=${r}`;
|
3864
3878
|
this.socket = new WebSocket(i);
|
3865
3879
|
}
|
3866
3880
|
let e;
|
@@ -3869,7 +3883,7 @@ class Os {
|
|
3869
3883
|
}, this.socket.onmessage = (t) => {
|
3870
3884
|
this.handler && this.handler(t);
|
3871
3885
|
}, this.socket.onerror = (t) => {
|
3872
|
-
this.reconnect = !0, console.warn(`Socket连接失败:${
|
3886
|
+
this.reconnect = !0, console.warn(`Socket连接失败:${Ie.api.ws}`);
|
3873
3887
|
}, this.socket.onclose = (t) => {
|
3874
3888
|
this.connected = !1, this.reconnect && (e = setTimeout(async () => await this.connect(), 1e3));
|
3875
3889
|
};
|
@@ -3893,7 +3907,7 @@ class Os {
|
|
3893
3907
|
this.socket.close(), this.reconnect = !1, this.connected = null, this.handler = null;
|
3894
3908
|
}
|
3895
3909
|
}
|
3896
|
-
class
|
3910
|
+
class Os {
|
3897
3911
|
constructor() {
|
3898
3912
|
//#region 属性
|
3899
3913
|
/**
|
@@ -3928,35 +3942,26 @@ class Ds {
|
|
3928
3942
|
* 登录后,获取用户信息
|
3929
3943
|
*/
|
3930
3944
|
async loadInfo() {
|
3931
|
-
return L.get("/user/info").then(async ({ data: e }) =>
|
3932
|
-
await q.init(e.configs), this.user = e, this.debugger = e.debugger;
|
3933
|
-
let t = q.language == "en" ? null : q.language, s = {
|
3934
|
-
paths: { vs: we.getMonacoPath() },
|
3935
|
-
//加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
3936
|
-
"vs/nls": { availableLanguages: { "*": t } }
|
3937
|
-
//设置编辑器默认语言
|
3938
|
-
};
|
3939
|
-
return Oe.config(s), Promise.resolve(e);
|
3940
|
-
});
|
3945
|
+
return L.get("/user/info").then(async ({ data: e }) => (await Y.init(e.configs), this.user = e, this.debugger = e.debugger, Promise.resolve(e)));
|
3941
3946
|
}
|
3942
3947
|
/**
|
3943
3948
|
* 未登录,获取匿名登录信息
|
3944
3949
|
*/
|
3945
3950
|
async getAnonymous() {
|
3946
|
-
await
|
3951
|
+
await Y.init([]);
|
3947
3952
|
}
|
3948
3953
|
/**
|
3949
3954
|
* 根据路径获取路由
|
3950
3955
|
*/
|
3951
3956
|
getMenuByUrl(e) {
|
3952
|
-
let t =
|
3957
|
+
let t = K.getPath(e);
|
3953
3958
|
return this.menusFlat.find((l) => l.url.split("?")[0] == t);
|
3954
3959
|
}
|
3955
3960
|
/**
|
3956
3961
|
* 加载服务端路由
|
3957
3962
|
*/
|
3958
3963
|
async loadMenus() {
|
3959
|
-
return L.get("/user/menu").then(({ data: e }) => (this.menus = e, this.menusFlat =
|
3964
|
+
return L.get("/user/menu").then(({ data: e }) => (this.menus = e, this.menusFlat = je.getFlat(e, "children"), Promise.resolve(e)));
|
3960
3965
|
}
|
3961
3966
|
/**
|
3962
3967
|
* 退出登录
|
@@ -3965,11 +3970,11 @@ class Ds {
|
|
3965
3970
|
return L.post("/user/logout").then(async () => {
|
3966
3971
|
this.user = null, this.menus = null;
|
3967
3972
|
let e = await this.getSso();
|
3968
|
-
return await (await $.sso.create(e.type)).logout(),
|
3973
|
+
return await (await $.sso.create(e.type)).logout(), Rs.disconnect(), Promise.resolve();
|
3969
3974
|
});
|
3970
3975
|
}
|
3971
3976
|
}
|
3972
|
-
class
|
3977
|
+
class Ds {
|
3973
3978
|
constructor() {
|
3974
3979
|
//#region 属性
|
3975
3980
|
/**
|
@@ -4019,7 +4024,7 @@ class js {
|
|
4019
4024
|
});
|
4020
4025
|
}
|
4021
4026
|
}
|
4022
|
-
class
|
4027
|
+
class Zl extends F {
|
4023
4028
|
get instances() {
|
4024
4029
|
return [];
|
4025
4030
|
}
|
@@ -4033,26 +4038,26 @@ class tr extends F {
|
|
4033
4038
|
return null;
|
4034
4039
|
}
|
4035
4040
|
}
|
4036
|
-
let
|
4037
|
-
u.i18nSvc != null && (G = u.i18nSvc,
|
4041
|
+
let Y = new Cs(), Hl = Ze(new Ds()), er = new Ts(), G = new Es(), js = new $s(), de = Ze(new As()), Rs = new Is(), _s = new Os(), Bs = async (u) => {
|
4042
|
+
u.i18nSvc != null && (G = u.i18nSvc, Ps = G.t, Us = G.t_exists, Fs = G.t_sys, Ms = G.t_enum, Ns = G.t_field, qs = G.t_field_choose_placeholder, Vs = G.t_field_placeholder, zs = G.t_table, Ks = G.t_module, Ws = G.t_menu);
|
4038
4043
|
}, {
|
4039
|
-
t:
|
4040
|
-
t_exists:
|
4041
|
-
t_sys:
|
4042
|
-
t_enum:
|
4043
|
-
t_field:
|
4044
|
-
t_field_choose_placeholder:
|
4045
|
-
t_field_placeholder:
|
4046
|
-
t_table:
|
4047
|
-
t_module:
|
4048
|
-
t_menu:
|
4044
|
+
t: Ps,
|
4045
|
+
t_exists: Us,
|
4046
|
+
t_sys: Fs,
|
4047
|
+
t_enum: Ms,
|
4048
|
+
t_field: Ns,
|
4049
|
+
t_field_choose_placeholder: qs,
|
4050
|
+
t_field_placeholder: Vs,
|
4051
|
+
t_table: zs,
|
4052
|
+
t_module: Ks,
|
4053
|
+
t_menu: Ws
|
4049
4054
|
} = G;
|
4050
|
-
class
|
4055
|
+
class Qs extends F {
|
4051
4056
|
/**
|
4052
4057
|
* 获取实例
|
4053
4058
|
*/
|
4054
4059
|
get instances() {
|
4055
|
-
return [new
|
4060
|
+
return [new ks(), new bs(), new ws(), new vs(), new Ss()];
|
4056
4061
|
}
|
4057
4062
|
/**
|
4058
4063
|
* 获取指定SSO实例
|
@@ -4062,12 +4067,13 @@ class Xs extends F {
|
|
4062
4067
|
return await r.open(l), r;
|
4063
4068
|
}
|
4064
4069
|
}
|
4065
|
-
class
|
4070
|
+
class Js {
|
4066
4071
|
constructor() {
|
4067
4072
|
n(this, "type");
|
4073
|
+
n(this, "taskLimit");
|
4068
4074
|
}
|
4069
4075
|
}
|
4070
|
-
class
|
4076
|
+
class Xs extends Js {
|
4071
4077
|
constructor() {
|
4072
4078
|
super(...arguments);
|
4073
4079
|
//#region 属性
|
@@ -4077,7 +4083,7 @@ class Ys extends Qs {
|
|
4077
4083
|
* 待执行的任务队列
|
4078
4084
|
*/
|
4079
4085
|
n(this, "tasks", []);
|
4080
|
-
n(this, "taskLimit");
|
4086
|
+
n(this, "taskLimit", 1);
|
4081
4087
|
n(this, "taskExecuting", 0);
|
4082
4088
|
n(this, "taskResolves", []);
|
4083
4089
|
}
|
@@ -4093,9 +4099,9 @@ class Ys extends Qs {
|
|
4093
4099
|
/**
|
4094
4100
|
* 相同时间的并发数控制,不是1s内的并发数控制
|
4095
4101
|
*/
|
4096
|
-
concurrent(t
|
4097
|
-
return this.
|
4098
|
-
this.taskResolves.push(
|
4102
|
+
concurrent(t) {
|
4103
|
+
return this.tasks.push(t), new Promise((s, l) => {
|
4104
|
+
this.taskResolves.push(s), this.run();
|
4099
4105
|
});
|
4100
4106
|
}
|
4101
4107
|
/**
|
@@ -4105,12 +4111,12 @@ class Ys extends Qs {
|
|
4105
4111
|
if (this.taskExecuting >= this.taskLimit)
|
4106
4112
|
return;
|
4107
4113
|
if (this.tasks.length == 0) {
|
4108
|
-
for (let
|
4109
|
-
|
4114
|
+
for (let l of this.taskResolves)
|
4115
|
+
l(null);
|
4110
4116
|
return;
|
4111
4117
|
}
|
4112
|
-
let
|
4113
|
-
this.taskExecuting++,
|
4118
|
+
let s = this.tasks.shift()();
|
4119
|
+
this.taskExecuting++, s.then(() => {
|
4114
4120
|
this.taskExecuting--, this.run();
|
4115
4121
|
});
|
4116
4122
|
}
|
@@ -4121,17 +4127,17 @@ class Ys extends Qs {
|
|
4121
4127
|
clearInterval(this.intervalTimeout);
|
4122
4128
|
}
|
4123
4129
|
}
|
4124
|
-
class
|
4130
|
+
class Ys extends F {
|
4125
4131
|
get instances() {
|
4126
|
-
return [new
|
4132
|
+
return [new Xs()];
|
4127
4133
|
}
|
4128
4134
|
}
|
4129
|
-
class
|
4135
|
+
class Gs {
|
4130
4136
|
constructor() {
|
4131
4137
|
n(this, "type");
|
4132
4138
|
}
|
4133
4139
|
}
|
4134
|
-
class
|
4140
|
+
class Zs extends Gs {
|
4135
4141
|
constructor() {
|
4136
4142
|
super(...arguments);
|
4137
4143
|
n(this, "type", "Liquid");
|
@@ -4141,22 +4147,22 @@ class Hs extends Zs {
|
|
4141
4147
|
return await l.render(r, s);
|
4142
4148
|
}
|
4143
4149
|
}
|
4144
|
-
class
|
4150
|
+
class Hs extends F {
|
4145
4151
|
get instances() {
|
4146
|
-
return [new
|
4152
|
+
return [new Zs()];
|
4147
4153
|
}
|
4148
4154
|
}
|
4149
|
-
class
|
4155
|
+
class tr extends F {
|
4150
4156
|
get instances() {
|
4151
4157
|
return [];
|
4152
4158
|
}
|
4153
4159
|
}
|
4154
|
-
class
|
4160
|
+
class ut {
|
4155
4161
|
constructor() {
|
4156
4162
|
n(this, "type");
|
4157
4163
|
}
|
4158
4164
|
}
|
4159
|
-
class
|
4165
|
+
class el extends ut {
|
4160
4166
|
constructor() {
|
4161
4167
|
super(...arguments);
|
4162
4168
|
n(this, "type", "Tencent");
|
@@ -4177,7 +4183,7 @@ class tl extends ct {
|
|
4177
4183
|
startRecord() {
|
4178
4184
|
}
|
4179
4185
|
}
|
4180
|
-
class
|
4186
|
+
class tl extends ut {
|
4181
4187
|
constructor() {
|
4182
4188
|
super(...arguments);
|
4183
4189
|
n(this, "type", "Default");
|
@@ -4191,12 +4197,12 @@ class sl extends ct {
|
|
4191
4197
|
return "";
|
4192
4198
|
}
|
4193
4199
|
}
|
4194
|
-
class
|
4200
|
+
class sr extends F {
|
4195
4201
|
get instances() {
|
4196
|
-
return [new
|
4202
|
+
return [new tl(), new el()];
|
4197
4203
|
}
|
4198
4204
|
}
|
4199
|
-
class
|
4205
|
+
class ct {
|
4200
4206
|
/**
|
4201
4207
|
* 并缓存工厂实例
|
4202
4208
|
*/
|
@@ -4210,85 +4216,85 @@ class dt {
|
|
4210
4216
|
* Builder工厂
|
4211
4217
|
*/
|
4212
4218
|
static get builder() {
|
4213
|
-
return this.create(
|
4219
|
+
return this.create(qt);
|
4214
4220
|
}
|
4215
4221
|
/**
|
4216
4222
|
* CDN工厂
|
4217
4223
|
*/
|
4218
4224
|
static get cdn() {
|
4219
|
-
return this.create(
|
4225
|
+
return this.create(Kt);
|
4220
4226
|
}
|
4221
4227
|
/**
|
4222
4228
|
* 编码器工厂
|
4223
4229
|
*/
|
4224
4230
|
static get encoder() {
|
4225
|
-
return this.create(
|
4231
|
+
return this.create(Jt);
|
4226
4232
|
}
|
4227
4233
|
/**
|
4228
4234
|
* Excel工厂
|
4229
4235
|
*/
|
4230
4236
|
static get excel() {
|
4231
|
-
return this.create(
|
4237
|
+
return this.create(Gt);
|
4232
4238
|
}
|
4233
4239
|
/**
|
4234
4240
|
* Explainer工厂
|
4235
4241
|
*/
|
4236
4242
|
static get explainer() {
|
4237
|
-
return this.create(
|
4243
|
+
return this.create(es);
|
4238
4244
|
}
|
4239
4245
|
/**
|
4240
4246
|
* 特征工厂
|
4241
4247
|
*/
|
4242
4248
|
static get feature() {
|
4243
|
-
return this.create(
|
4249
|
+
return this.create(rs);
|
4244
4250
|
}
|
4245
4251
|
/**
|
4246
4252
|
* 哈希工厂
|
4247
4253
|
*/
|
4248
4254
|
static get hasher() {
|
4249
|
-
return this.create(
|
4255
|
+
return this.create(as);
|
4250
4256
|
}
|
4251
4257
|
/**
|
4252
4258
|
* Http请求工厂
|
4253
4259
|
*/
|
4254
4260
|
static get http() {
|
4255
|
-
return this.create(
|
4261
|
+
return this.create(ds);
|
4256
4262
|
}
|
4257
4263
|
/**
|
4258
4264
|
* 消息提示请求工厂
|
4259
4265
|
*/
|
4260
4266
|
static get messenger() {
|
4261
|
-
return this.create(
|
4267
|
+
return this.create(gs);
|
4262
4268
|
}
|
4263
4269
|
/**
|
4264
4270
|
* 提供程序工厂
|
4265
4271
|
*/
|
4266
4272
|
static get provider() {
|
4267
|
-
return this.create(
|
4273
|
+
return this.create(Mt);
|
4268
4274
|
}
|
4269
4275
|
/**
|
4270
4276
|
* 签名工厂
|
4271
4277
|
*/
|
4272
4278
|
static get signer() {
|
4273
|
-
return this.create(
|
4279
|
+
return this.create(ys);
|
4274
4280
|
}
|
4275
4281
|
/**
|
4276
4282
|
* SSO工厂
|
4277
4283
|
*/
|
4278
4284
|
static get sso() {
|
4279
|
-
return this.create(
|
4285
|
+
return this.create(Qs);
|
4280
4286
|
}
|
4281
4287
|
/**
|
4282
4288
|
* Task工厂
|
4283
4289
|
*/
|
4284
4290
|
static get task() {
|
4285
|
-
return this.create(
|
4291
|
+
return this.create(Ys);
|
4286
4292
|
}
|
4287
4293
|
/**
|
4288
4294
|
* 模板工厂
|
4289
4295
|
*/
|
4290
4296
|
static get template() {
|
4291
|
-
return this.create(
|
4297
|
+
return this.create(Hs);
|
4292
4298
|
}
|
4293
4299
|
//#endregion
|
4294
4300
|
}
|
@@ -4296,12 +4302,12 @@ class dt {
|
|
4296
4302
|
/**
|
4297
4303
|
* 工厂缓存
|
4298
4304
|
*/
|
4299
|
-
n(
|
4300
|
-
const $ =
|
4301
|
-
let
|
4302
|
-
|
4305
|
+
n(ct, "mappings", {});
|
4306
|
+
const $ = ct;
|
4307
|
+
let sl = {}, ye = {}, L = {}, dt = {}, ll = {}, be = {}, rl = async (u) => {
|
4308
|
+
ye = await $.cdn.createIfAbsent("Default", u.cdn), sl = await $.encoder.getBase64(), L = await $.http.getHalo(), dt = await $.hasher.getMd5(), ll = await $.provider.getStorage(), u.messenger == null ? be = await $.messenger.getConsole() : be = u.messenger;
|
4303
4309
|
};
|
4304
|
-
class
|
4310
|
+
class nl {
|
4305
4311
|
constructor() {
|
4306
4312
|
/**
|
4307
4313
|
* 消息发送对象
|
@@ -4321,10 +4327,10 @@ class il {
|
|
4321
4327
|
n(this, "cdn", "Local");
|
4322
4328
|
}
|
4323
4329
|
}
|
4324
|
-
const
|
4330
|
+
const il = { class: "ha-empty" }, al = { class: "empty-message" }, ol = {
|
4325
4331
|
key: 0,
|
4326
4332
|
class: "empty-content"
|
4327
|
-
},
|
4333
|
+
}, lr = /* @__PURE__ */ J({
|
4328
4334
|
__name: "Empty",
|
4329
4335
|
props: {
|
4330
4336
|
message: { type: String, default: "暂无数据" },
|
@@ -4332,15 +4338,15 @@ const al = { class: "ha-empty" }, ol = { class: "empty-message" }, ul = {
|
|
4332
4338
|
},
|
4333
4339
|
setup(u) {
|
4334
4340
|
let e = u, { message: t, hasData: s } = re(e);
|
4335
|
-
return (l, r) => (R(), B("div",
|
4336
|
-
D("div",
|
4337
|
-
m(s) ? (R(), B("div",
|
4341
|
+
return (l, r) => (R(), B("div", il, [
|
4342
|
+
D("div", al, pe(m(t)), 1),
|
4343
|
+
m(s) ? (R(), B("div", ol, [
|
4338
4344
|
fe(l.$slots, "default")
|
4339
|
-
])) :
|
4345
|
+
])) : He("", !0)
|
4340
4346
|
]));
|
4341
4347
|
}
|
4342
4348
|
});
|
4343
|
-
class
|
4349
|
+
class ht {
|
4344
4350
|
constructor(e, t) {
|
4345
4351
|
/**
|
4346
4352
|
* 距窗口左边的距离
|
@@ -4353,7 +4359,7 @@ class pt {
|
|
4353
4359
|
this.x = e, this.y = t;
|
4354
4360
|
}
|
4355
4361
|
}
|
4356
|
-
class
|
4362
|
+
class ul extends ht {
|
4357
4363
|
constructor() {
|
4358
4364
|
super(...arguments);
|
4359
4365
|
/**
|
@@ -4362,7 +4368,7 @@ class cl extends pt {
|
|
4362
4368
|
n(this, "affix");
|
4363
4369
|
}
|
4364
4370
|
}
|
4365
|
-
class
|
4371
|
+
class rr extends ht {
|
4366
4372
|
constructor(t, s, l, r) {
|
4367
4373
|
super(t, s);
|
4368
4374
|
n(this, "width");
|
@@ -4370,7 +4376,7 @@ class ar extends pt {
|
|
4370
4376
|
this.width = l, this.height = r;
|
4371
4377
|
}
|
4372
4378
|
}
|
4373
|
-
class
|
4379
|
+
class pt {
|
4374
4380
|
constructor() {
|
4375
4381
|
//#region 大小调整
|
4376
4382
|
n(this, "resizeObserver", null);
|
@@ -4459,7 +4465,7 @@ class gt {
|
|
4459
4465
|
return;
|
4460
4466
|
this.dragElement = e;
|
4461
4467
|
let s = !1, l = (a) => (s = !0, a.preventDefault(), t.init(a)), r = (a) => {
|
4462
|
-
let o = new
|
4468
|
+
let o = new ul(), c = t.range;
|
4463
4469
|
if (c == null)
|
4464
4470
|
o.x = a.clientX, o.y = a.clientY;
|
4465
4471
|
else {
|
@@ -4522,7 +4528,7 @@ class gt {
|
|
4522
4528
|
}
|
4523
4529
|
//#endregion
|
4524
4530
|
}
|
4525
|
-
class
|
4531
|
+
class nr {
|
4526
4532
|
constructor() {
|
4527
4533
|
n(this, "events", {});
|
4528
4534
|
/**
|
@@ -4644,14 +4650,14 @@ class or {
|
|
4644
4650
|
clearTimeout(this.timer);
|
4645
4651
|
}
|
4646
4652
|
}
|
4647
|
-
class
|
4653
|
+
class ir {
|
4648
4654
|
/**
|
4649
4655
|
* 对比数据变动
|
4650
4656
|
*/
|
4651
4657
|
delta(e, t, s, l) {
|
4652
4658
|
}
|
4653
4659
|
}
|
4654
|
-
class
|
4660
|
+
class ar {
|
4655
4661
|
/**
|
4656
4662
|
* 初始化,并绑定自动关闭上下文菜单事件
|
4657
4663
|
*/
|
@@ -4690,11 +4696,11 @@ class cr {
|
|
4690
4696
|
}
|
4691
4697
|
}
|
4692
4698
|
}
|
4693
|
-
const
|
4699
|
+
const cl = /* @__PURE__ */ J({
|
4694
4700
|
__name: "Fill",
|
4695
4701
|
emits: ["resize"],
|
4696
4702
|
setup(u, { emit: e }) {
|
4697
|
-
let t = e, s = j(), l = j(), r = j(), i = new
|
4703
|
+
let t = e, s = j(), l = j(), r = j(), i = new pt(), a = () => {
|
4698
4704
|
let h = N.siblings(s.value);
|
4699
4705
|
r.value = N.getHeight(h);
|
4700
4706
|
}, o = () => {
|
@@ -4702,9 +4708,9 @@ const dl = /* @__PURE__ */ Q({
|
|
4702
4708
|
}, c = () => {
|
4703
4709
|
o();
|
4704
4710
|
};
|
4705
|
-
return
|
4711
|
+
return we(() => {
|
4706
4712
|
a(), o(), i.resize(s.value, c);
|
4707
|
-
}),
|
4713
|
+
}), xe(() => {
|
4708
4714
|
i.dispose();
|
4709
4715
|
}), (h, d) => (R(), B("div", {
|
4710
4716
|
class: "ha-fill",
|
@@ -4715,25 +4721,25 @@ const dl = /* @__PURE__ */ Q({
|
|
4715
4721
|
fe(h.$slots, "default")
|
4716
4722
|
], 4));
|
4717
4723
|
}
|
4718
|
-
}),
|
4724
|
+
}), dl = /* @__PURE__ */ J({
|
4719
4725
|
__name: "Scroller",
|
4720
4726
|
props: {
|
4721
4727
|
options: {}
|
4722
4728
|
},
|
4723
4729
|
emits: ["scroll"],
|
4724
4730
|
setup(u, { expose: e, emit: t }) {
|
4725
|
-
let s = t, l = u, { options: r } = re(l), i = j(), a = j(), o = j(), c = j(), h = j(!1), d = null, p = null, g = new
|
4731
|
+
let s = t, l = u, { options: r } = re(l), i = j(), a = j(), o = j(), c = j(), h = j(!1), d = null, p = null, g = new pt(), w = j({ top: null, height: null }), q = (y) => {
|
4726
4732
|
if (p == 0)
|
4727
4733
|
return 0;
|
4728
4734
|
let v = p - d;
|
4729
4735
|
return y / v;
|
4730
|
-
},
|
4736
|
+
}, X = (y) => {
|
4731
4737
|
let v = d - w.value.height;
|
4732
4738
|
return y / v;
|
4733
4739
|
}, ae = (y) => {
|
4734
|
-
let v = y.target, _ =
|
4735
|
-
|
4736
|
-
},
|
4740
|
+
let v = y.target, _ = q(v.scrollTop);
|
4741
|
+
I(_), s("scroll", v);
|
4742
|
+
}, T = () => {
|
4737
4743
|
if (p == 0)
|
4738
4744
|
return 80;
|
4739
4745
|
let y = d / p;
|
@@ -4742,49 +4748,49 @@ const dl = /* @__PURE__ */ Q({
|
|
4742
4748
|
let v = d * y;
|
4743
4749
|
return ie.between(v, 80, 500);
|
4744
4750
|
}, f = (y, v) => {
|
4745
|
-
let _ =
|
4746
|
-
return ie.between(
|
4747
|
-
},
|
4748
|
-
let v =
|
4751
|
+
let _ = q(y), V = (d - v) * _;
|
4752
|
+
return ie.between(V, 0, d - v);
|
4753
|
+
}, k = (y) => {
|
4754
|
+
let v = T();
|
4749
4755
|
return { top: f(y, v), height: v };
|
4750
4756
|
}, b = (y) => {
|
4751
|
-
}, I = (y) => {
|
4752
|
-
let v = V(y);
|
4753
|
-
A(v);
|
4754
4757
|
}, A = (y) => {
|
4758
|
+
let v = q(y);
|
4759
|
+
I(v);
|
4760
|
+
}, I = (y) => {
|
4755
4761
|
let v = ie.between(y, 0, 1), _ = d - w.value.height;
|
4756
4762
|
w.value.top = _ * v;
|
4757
|
-
let
|
4758
|
-
r.value.scrollTop =
|
4763
|
+
let ve = (p - d) * v;
|
4764
|
+
r.value.scrollTop = ve, a.value.scrollTop != ve && (a.value.scrollTop = ve);
|
4759
4765
|
}, P = () => {
|
4760
4766
|
let y = r.value.scrollTop;
|
4761
|
-
w.value =
|
4767
|
+
w.value = k(y), A(y);
|
4762
4768
|
}, ee = (y) => {
|
4763
4769
|
d = N.getHeight(a.value), p = a.value.scrollHeight;
|
4764
|
-
let v =
|
4770
|
+
let v = T();
|
4765
4771
|
w.value.height = v, w.value.top = f(r.value.scrollTop, v);
|
4766
4772
|
}, oe = (y) => {
|
4767
4773
|
let v = y.target;
|
4768
4774
|
return parseInt(v.style.top);
|
4769
|
-
}, ne = (y, v, _,
|
4770
|
-
let
|
4771
|
-
|
4772
|
-
}, xe = (y) => {
|
4773
|
-
h.value = !0;
|
4775
|
+
}, ne = (y, v, _, V) => {
|
4776
|
+
let ve = y.y - v.y, gt = _ + ve, ft = X(gt);
|
4777
|
+
I(ft);
|
4774
4778
|
}, Se = (y) => {
|
4779
|
+
h.value = !0;
|
4780
|
+
}, ke = (y) => {
|
4775
4781
|
h.value = !1;
|
4776
4782
|
};
|
4777
|
-
return
|
4778
|
-
P(), g.scroll(a.value, ae), g.drag(c.value, { init: oe, handler: ne }), g.observe(a.value, ee), g.mouseDown(c.value,
|
4779
|
-
}),
|
4783
|
+
return we(() => {
|
4784
|
+
P(), g.scroll(a.value, ae), g.drag(c.value, { init: oe, handler: ne }), g.observe(a.value, ee), g.mouseDown(c.value, Se, ke);
|
4785
|
+
}), xe(() => {
|
4780
4786
|
g.dispose();
|
4781
4787
|
}), H(() => r.value.scrollTop, (y, v) => {
|
4782
|
-
let _ =
|
4783
|
-
|
4784
|
-
}), e({ scrollTo:
|
4788
|
+
let _ = q(y);
|
4789
|
+
I(_);
|
4790
|
+
}), e({ scrollTo: A, update: P }), (y, v) => (R(), B("div", {
|
4785
4791
|
ref_key: "scrollerRef",
|
4786
4792
|
ref: i,
|
4787
|
-
class:
|
4793
|
+
class: Ae(["ha-scroller", { hover: m(h) }])
|
4788
4794
|
}, [
|
4789
4795
|
D("div", {
|
4790
4796
|
ref_key: "containerRef",
|
@@ -4809,7 +4815,7 @@ const dl = /* @__PURE__ */ Q({
|
|
4809
4815
|
], 512)
|
4810
4816
|
], 2));
|
4811
4817
|
}
|
4812
|
-
}),
|
4818
|
+
}), or = /* @__PURE__ */ J({
|
4813
4819
|
__name: "Timer",
|
4814
4820
|
emits: ["change"],
|
4815
4821
|
setup(u, { expose: e, emit: t }) {
|
@@ -4824,14 +4830,14 @@ const dl = /* @__PURE__ */ Q({
|
|
4824
4830
|
}, d = () => {
|
4825
4831
|
clearInterval(i), r.value = l;
|
4826
4832
|
};
|
4827
|
-
return
|
4833
|
+
return xe(() => {
|
4828
4834
|
clearInterval(i);
|
4829
4835
|
}), e({ restart: c, start: o, stop: h, reset: d }), (p, g) => (R(), B("span", null, [
|
4830
4836
|
fe(p.$slots, "default"),
|
4831
|
-
|
4837
|
+
bt(pe(m(le).format(m(r), "HH:mm:ss SSS")), 1)
|
4832
4838
|
]));
|
4833
4839
|
}
|
4834
|
-
}),
|
4840
|
+
}), ur = /* @__PURE__ */ J({
|
4835
4841
|
__name: "Code",
|
4836
4842
|
props: {
|
4837
4843
|
config: { default: {} },
|
@@ -4841,56 +4847,56 @@ const dl = /* @__PURE__ */ Q({
|
|
4841
4847
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
4842
4848
|
setup(u, { expose: e, emit: t }) {
|
4843
4849
|
let s = t, l = u, { config: r, border: i, modelValue: a } = re(l), o = null, c = null, h = null, d = j(), p = (f) => f == "en" ? null : f, g = (f) => f == "default" ? null : "vs-dark", w = (f) => {
|
4844
|
-
if (
|
4850
|
+
if (Y.editor.completions[f])
|
4845
4851
|
return;
|
4846
|
-
let
|
4847
|
-
if (!
|
4852
|
+
let k = o.languages.getLanguages().find((A) => A.id == f);
|
4853
|
+
if (!k)
|
4848
4854
|
return;
|
4849
|
-
let b =
|
4850
|
-
b && b().then((
|
4851
|
-
|
4855
|
+
let b = k.loader;
|
4856
|
+
b && b().then((A) => {
|
4857
|
+
Y.editor.completions[f] || (q(A, f), Y.editor.completions[f] = !0);
|
4852
4858
|
});
|
4853
|
-
},
|
4854
|
-
provideCompletionItems: (
|
4855
|
-
let P =
|
4856
|
-
startLineNumber:
|
4857
|
-
endLineNumber:
|
4859
|
+
}, q = (f, k) => o.languages.registerCompletionItemProvider(k, {
|
4860
|
+
provideCompletionItems: (A, I) => {
|
4861
|
+
let P = A.getWordUntilPosition(I), ee = {
|
4862
|
+
startLineNumber: I.lineNumber,
|
4863
|
+
endLineNumber: I.lineNumber,
|
4858
4864
|
startColumn: P.startColumn,
|
4859
4865
|
endColumn: P.endColumn
|
4860
4866
|
}, oe = [];
|
4861
4867
|
const ne = ["builtinFunctions", "keywords", "operators"];
|
4862
|
-
for (let
|
4863
|
-
const
|
4864
|
-
let y = f.language[
|
4868
|
+
for (let Se = 0; Se < ne.length; Se++) {
|
4869
|
+
const ke = ne[Se];
|
4870
|
+
let y = f.language[ke];
|
4865
4871
|
y && y.forEach((v) => {
|
4866
|
-
let _ = v.toLowerCase(),
|
4872
|
+
let _ = v.toLowerCase(), V = {
|
4867
4873
|
label: _,
|
4868
4874
|
kind: null,
|
4869
4875
|
insertText: _,
|
4870
4876
|
range: ee,
|
4871
4877
|
documentation: v
|
4872
4878
|
};
|
4873
|
-
|
4879
|
+
ke == "keywords" ? (V.kind = o.languages.CompletionItemKind.Keyword, V.detail = "关键词") : ke == "operators" ? (V.kind = o.languages.CompletionItemKind.Operator, V.insertText += " ", V.detail = "操作符") : (V.kind = o.languages.CompletionItemKind.Function, V.insertText += "()", V.detail = "函数"), oe.push(V);
|
4874
4880
|
});
|
4875
4881
|
}
|
4876
4882
|
return { suggestions: oe };
|
4877
4883
|
}
|
4878
|
-
}),
|
4884
|
+
}), X = () => {
|
4879
4885
|
let f = null;
|
4880
|
-
r.value.schema && (f = r.value.category + "/" +
|
4881
|
-
let
|
4886
|
+
r.value.schema && (f = r.value.category + "/" + Q.getUniqueId(), Y.tryAddSchema(f, r.value.category, r.value.schema));
|
4887
|
+
let k = {
|
4882
4888
|
validate: !0,
|
4883
4889
|
allowComments: !0,
|
4884
4890
|
//允许配置注释
|
4885
4891
|
//保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
|
4886
|
-
schemas: te.clone(
|
4892
|
+
schemas: te.clone(Y.editor.schemas),
|
4887
4893
|
trailingCommas: "ignore"
|
4888
4894
|
//允许末尾逗号
|
4889
4895
|
};
|
4890
|
-
o.languages.json.jsonDefaults.setDiagnosticsOptions(
|
4896
|
+
o.languages.json.jsonDefaults.setDiagnosticsOptions(k), w(r.value.language);
|
4891
4897
|
let b = f ? o.Uri.parse(f) : null;
|
4892
4898
|
h = o.editor.createModel(a.value, r.value.language, b);
|
4893
|
-
let
|
4899
|
+
let A = {
|
4894
4900
|
tabSize: 2,
|
4895
4901
|
//Tab缩进大小
|
4896
4902
|
detectIndentation: !1,
|
@@ -4901,19 +4907,19 @@ const dl = /* @__PURE__ */ Q({
|
|
4901
4907
|
//默认已启用代码图
|
4902
4908
|
scrollbar: { verticalScrollbarSize: 0 },
|
4903
4909
|
//关闭最右侧垂直滚动条
|
4904
|
-
theme: g(
|
4910
|
+
theme: g(Y.theme),
|
4905
4911
|
automaticLayout: !0,
|
4906
4912
|
//根据父元素自动布局
|
4907
4913
|
model: h
|
4908
4914
|
};
|
4909
|
-
c = o.editor.create(d.value,
|
4910
|
-
let
|
4911
|
-
if (
|
4915
|
+
c = o.editor.create(d.value, A), r.value.scrollTop && c.setScrollTop(r.value.scrollTop);
|
4916
|
+
let I = r.value.selection;
|
4917
|
+
if (I) {
|
4912
4918
|
let P = {
|
4913
|
-
startLineNumber:
|
4914
|
-
endLineNumber:
|
4915
|
-
startColumn:
|
4916
|
-
endColumn:
|
4919
|
+
startLineNumber: I.startLine,
|
4920
|
+
endLineNumber: I.endLine,
|
4921
|
+
startColumn: I.startColumn,
|
4922
|
+
endColumn: I.endColumn
|
4917
4923
|
};
|
4918
4924
|
c.setSelection(P);
|
4919
4925
|
}
|
@@ -4924,41 +4930,41 @@ const dl = /* @__PURE__ */ Q({
|
|
4924
4930
|
s("update:modelValue", ee), s("change", ee);
|
4925
4931
|
});
|
4926
4932
|
};
|
4927
|
-
|
4928
|
-
o = await
|
4933
|
+
we(async () => {
|
4934
|
+
o = await ye.getMonaco(), d.value && (X(), s("mounted", o, c));
|
4929
4935
|
});
|
4930
4936
|
let ae = () => {
|
4931
4937
|
c == null || c.layout();
|
4932
|
-
},
|
4933
|
-
return
|
4938
|
+
}, T = () => c;
|
4939
|
+
return xe(() => {
|
4934
4940
|
h == null || h.dispose(), c == null || c.dispose();
|
4935
|
-
}), H(() =>
|
4941
|
+
}), H(() => Y.theme, (f, k) => {
|
4936
4942
|
let b = g(f);
|
4937
4943
|
o.editor.setTheme(b);
|
4938
|
-
}), H(() =>
|
4939
|
-
|
4940
|
-
}), H(() => a.value, (f,
|
4944
|
+
}), H(() => Y.language, (f, k) => {
|
4945
|
+
loader.config({ "vs/nls": { availableLanguages: { "*": p(f) } } });
|
4946
|
+
}), H(() => a.value, (f, k) => {
|
4941
4947
|
if (!c)
|
4942
4948
|
return;
|
4943
4949
|
let b = c.getValue();
|
4944
4950
|
f != b && c.setValue(f ?? "");
|
4945
|
-
}), H(() => r.value.language, (f,
|
4951
|
+
}), H(() => r.value.language, (f, k) => {
|
4946
4952
|
if (!c)
|
4947
4953
|
return;
|
4948
4954
|
let b = c.getModel();
|
4949
4955
|
o.editor.setModelLanguage(b, f), w(f);
|
4950
|
-
}), e({ layout: ae, getEditor:
|
4951
|
-
default:
|
4956
|
+
}), e({ layout: ae, getEditor: T }), (f, k) => (R(), et(cl, null, {
|
4957
|
+
default: qe(() => [
|
4952
4958
|
D("div", {
|
4953
4959
|
ref_key: "monacoEditorRef",
|
4954
4960
|
ref: d,
|
4955
|
-
class:
|
4961
|
+
class: Ae(["ha-code", { border: m(i) }])
|
4956
4962
|
}, null, 2)
|
4957
4963
|
]),
|
4958
4964
|
_: 1
|
4959
4965
|
}));
|
4960
4966
|
}
|
4961
|
-
}),
|
4967
|
+
}), cr = /* @__PURE__ */ J({
|
4962
4968
|
__name: "Compare",
|
4963
4969
|
props: {
|
4964
4970
|
inline: { type: Boolean, default: !1 },
|
@@ -4968,84 +4974,84 @@ const dl = /* @__PURE__ */ Q({
|
|
4968
4974
|
},
|
4969
4975
|
emits: ["update:modelValue", "update:original", "change"],
|
4970
4976
|
setup(u, { emit: e }) {
|
4971
|
-
let t = e, s = u, { inline: l, language: r, original: i, modelValue: a } = re(s), o = null, c = null, h = null, d = null, p = null, g = null, w = j(),
|
4972
|
-
c =
|
4977
|
+
let t = e, s = u, { inline: l, language: r, original: i, modelValue: a } = re(s), o = null, c = null, h = null, d = null, p = null, g = null, w = j(), q = j(), X = (T) => {
|
4978
|
+
c = T.editor.createModel(i.value, r.value), h = T.editor.createModel(a.value, r.value), o = T.editor.createDiffEditor(w.value, {
|
4973
4979
|
originalEditable: !0,
|
4974
4980
|
automaticLayout: !0,
|
4975
4981
|
renderSideBySide: !l.value,
|
4976
4982
|
//是否启用行内模式
|
4977
|
-
theme: ae(
|
4983
|
+
theme: ae(Y.theme)
|
4978
4984
|
}), o.setModel({ original: c, modified: h }), d = o.getOriginalEditor(), d.onDidChangeModelContent((f) => {
|
4979
|
-
let
|
4980
|
-
t("update:original",
|
4985
|
+
let k = d.getValue();
|
4986
|
+
t("update:original", k), t("change", k);
|
4981
4987
|
}), p = o.getModifiedEditor(), p.onDidChangeModelContent((f) => {
|
4982
|
-
let
|
4983
|
-
t("update:modelValue",
|
4988
|
+
let k = p.getValue();
|
4989
|
+
t("update:modelValue", k);
|
4984
4990
|
});
|
4985
|
-
}, ae = (
|
4986
|
-
return
|
4987
|
-
g =
|
4988
|
-
}), H(() =>
|
4989
|
-
let
|
4990
|
-
g.editor.setTheme(
|
4991
|
-
}), H(() => r.value, (
|
4992
|
-
c && g.editor.setModelLanguage(c,
|
4993
|
-
}), H(() => i.value, (
|
4991
|
+
}, ae = (T) => T == "default" ? null : "vs-dark";
|
4992
|
+
return we(async () => {
|
4993
|
+
g = await ye.getMonaco(), X(g);
|
4994
|
+
}), H(() => Y.theme, (T, f) => {
|
4995
|
+
let k = ae(T);
|
4996
|
+
g.editor.setTheme(k);
|
4997
|
+
}), H(() => r.value, (T, f) => {
|
4998
|
+
c && g.editor.setModelLanguage(c, T), h && g.editor.setModelLanguage(h, T);
|
4999
|
+
}), H(() => i.value, (T, f) => {
|
4994
5000
|
if (!c)
|
4995
5001
|
return;
|
4996
|
-
let
|
4997
|
-
|
4998
|
-
}), H(() => a.value, (
|
5002
|
+
let k = c.getValue();
|
5003
|
+
T != k && c.setValue(T ?? "");
|
5004
|
+
}), H(() => a.value, (T, f) => {
|
4999
5005
|
if (!h)
|
5000
5006
|
return;
|
5001
|
-
let
|
5002
|
-
|
5003
|
-
}), (
|
5007
|
+
let k = h.getValue();
|
5008
|
+
T != k && h.setValue(T ?? "");
|
5009
|
+
}), (T, f) => (R(), B("div", {
|
5004
5010
|
ref_key: "compareRef",
|
5005
5011
|
ref: w,
|
5006
5012
|
class: "ha-compare",
|
5007
|
-
style: me(m(
|
5013
|
+
style: me(m(q))
|
5008
5014
|
}, null, 4));
|
5009
5015
|
}
|
5010
|
-
}),
|
5016
|
+
}), Ke = (u, e) => {
|
5011
5017
|
const t = u.__vccOpts || u;
|
5012
5018
|
for (const [s, l] of e)
|
5013
5019
|
t[s] = l;
|
5014
5020
|
return t;
|
5015
|
-
},
|
5016
|
-
function
|
5017
|
-
return R(), B("div",
|
5021
|
+
}, hl = {}, pl = { class: "ha-option" };
|
5022
|
+
function gl(u, e) {
|
5023
|
+
return R(), B("div", pl, "选项");
|
5018
5024
|
}
|
5019
|
-
const
|
5020
|
-
|
5021
|
-
],
|
5025
|
+
const fl = /* @__PURE__ */ Ke(hl, [["render", gl]]), ml = { class: "ha-rich-text" }, yl = /* @__PURE__ */ St('<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 <ctrl+i>"></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), vl = [
|
5026
|
+
yl
|
5027
|
+
], dr = /* @__PURE__ */ J({
|
5022
5028
|
__name: "RichText",
|
5023
|
-
props: /* @__PURE__ */
|
5029
|
+
props: /* @__PURE__ */ We({
|
5024
5030
|
options: {}
|
5025
5031
|
}, {
|
5026
5032
|
modelValue: {},
|
5027
5033
|
modelModifiers: {}
|
5028
5034
|
}),
|
5029
|
-
emits: /* @__PURE__ */
|
5035
|
+
emits: /* @__PURE__ */ We(["change", "scroll"], ["update:modelValue"]),
|
5030
5036
|
setup(u, { expose: e, emit: t }) {
|
5031
|
-
let s = t, l = u, { options: r } = re(l), i =
|
5032
|
-
let
|
5037
|
+
let s = t, l = u, { options: r } = re(l), i = tt(u, "modelValue"), a, o = null, c = null, h = !1, d = !1, p = j(), g = j(), w = j(), q = j(!1), X = j({ style: null, options: { scrollTop: 0 } }), ae = (b) => {
|
5038
|
+
let A = le.getDateString(), I = getSelection(), P = I.getRangeAt(0), ee = P.startContainer;
|
5033
5039
|
if (ee.nodeName == "#text")
|
5034
|
-
ee.insertData(P.startOffset,
|
5040
|
+
ee.insertData(P.startOffset, A), P.setStart(ee, P.startOffset + A.length), I.removeAllRanges(), I.addRange(P);
|
5035
5041
|
else {
|
5036
|
-
let oe = document.createTextNode(
|
5042
|
+
let oe = document.createTextNode(A);
|
5037
5043
|
ee.appendChild(oe);
|
5038
5044
|
let ne = document.createRange();
|
5039
|
-
ne.selectNodeContents(oe), ne.setStart(oe, ne.startOffset +
|
5045
|
+
ne.selectNodeContents(oe), ne.setStart(oe, ne.startOffset + A.length), I.removeAllRanges(), I.addRange(ne);
|
5040
5046
|
}
|
5041
|
-
},
|
5047
|
+
}, T = (b) => {
|
5042
5048
|
if (o.scrollTop = b.scrollTop, h || d) {
|
5043
5049
|
h = !1, d = !1;
|
5044
5050
|
return;
|
5045
5051
|
}
|
5046
5052
|
c = b, s("scroll", b);
|
5047
|
-
}, f = () => `height: calc(100% - ${N.getHeight(g.value)}px)`,
|
5048
|
-
let b = await
|
5053
|
+
}, f = () => `height: calc(100% - ${N.getHeight(g.value)}px)`, k = async () => {
|
5054
|
+
let b = await ye.getQuill();
|
5049
5055
|
a = new b(p.value, {
|
5050
5056
|
modules: {
|
5051
5057
|
toolbar: {
|
@@ -5054,40 +5060,40 @@ const ml = /* @__PURE__ */ We(pl, [["render", fl]]), yl = { class: "ha-rich-text
|
|
5054
5060
|
}
|
5055
5061
|
},
|
5056
5062
|
theme: "snow"
|
5057
|
-
}),
|
5058
|
-
|
5059
|
-
}), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value,
|
5063
|
+
}), q.value = !0, Qe(() => {
|
5064
|
+
X.value.style = f();
|
5065
|
+
}), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value, X.value.options.scrollTop = r.value.scrollTop, a.on("text-change", (A, I, P) => {
|
5060
5066
|
o.innerHTML != i.value && (h = !0, i.value = o.innerHTML);
|
5061
|
-
}), o.addEventListener("paste", (
|
5067
|
+
}), o.addEventListener("paste", (A) => {
|
5062
5068
|
d = !0;
|
5063
5069
|
});
|
5064
5070
|
};
|
5065
|
-
return
|
5066
|
-
|
5067
|
-
}),
|
5071
|
+
return we(() => {
|
5072
|
+
k();
|
5073
|
+
}), xe(() => {
|
5068
5074
|
a = null;
|
5069
|
-
}), H(() => i.value, (b,
|
5075
|
+
}), H(() => i.value, (b, A) => {
|
5070
5076
|
o && o.innerHTML != b && (o.innerHTML = b);
|
5071
|
-
}), H(() => r.value.scrollTop, (b,
|
5072
|
-
b != null && (c == null ? void 0 : c.scrollTop) != b &&
|
5073
|
-
|
5077
|
+
}), H(() => r.value.scrollTop, (b, A) => {
|
5078
|
+
b != null && (c == null ? void 0 : c.scrollTop) != b && Qe(() => {
|
5079
|
+
X.value.options.scrollTop = b;
|
5074
5080
|
});
|
5075
|
-
}), e({}), (b,
|
5076
|
-
|
5081
|
+
}), e({}), (b, A) => (R(), B("div", ml, [
|
5082
|
+
wt(D("div", {
|
5077
5083
|
ref_key: "toolbarRef",
|
5078
5084
|
ref: g
|
5079
|
-
},
|
5080
|
-
[
|
5085
|
+
}, vl, 512), [
|
5086
|
+
[xt, m(q)]
|
5081
5087
|
]),
|
5082
|
-
|
5088
|
+
Ce(m(dl), {
|
5083
5089
|
ref_key: "scrollerRef",
|
5084
5090
|
ref: w,
|
5085
5091
|
class: "ql-body",
|
5086
|
-
options: m(
|
5087
|
-
onScroll: m(
|
5088
|
-
style: me(m(
|
5092
|
+
options: m(X).options,
|
5093
|
+
onScroll: m(T),
|
5094
|
+
style: me(m(X).style)
|
5089
5095
|
}, {
|
5090
|
-
default:
|
5096
|
+
default: qe(() => [
|
5091
5097
|
D("div", {
|
5092
5098
|
ref_key: "editorRef",
|
5093
5099
|
ref: p
|
@@ -5097,17 +5103,17 @@ const ml = /* @__PURE__ */ We(pl, [["render", fl]]), yl = { class: "ha-rich-text
|
|
5097
5103
|
}, 8, ["options", "onScroll", "style"])
|
5098
5104
|
]));
|
5099
5105
|
}
|
5100
|
-
}),
|
5106
|
+
}), bl = {}, wl = { class: "ha-select" }, xl = /* @__PURE__ */ D("div", { class: "select-title" }, "头", -1), Sl = /* @__PURE__ */ D("div", { class: "select-body" }, [
|
5101
5107
|
/* @__PURE__ */ D("input", { type: "text" })
|
5102
|
-
], -1),
|
5103
|
-
|
5104
|
-
|
5108
|
+
], -1), kl = [
|
5109
|
+
xl,
|
5110
|
+
Sl
|
5105
5111
|
];
|
5106
|
-
function
|
5107
|
-
return R(), B("div",
|
5112
|
+
function El(u, e) {
|
5113
|
+
return R(), B("div", wl, kl);
|
5108
5114
|
}
|
5109
|
-
const
|
5110
|
-
class
|
5115
|
+
const Pe = /* @__PURE__ */ Ke(bl, [["render", El]]);
|
5116
|
+
class hr {
|
5111
5117
|
/**
|
5112
5118
|
* 初始化
|
5113
5119
|
*/
|
@@ -5131,7 +5137,7 @@ class fr {
|
|
5131
5137
|
this.startLine = e, this.endLine = t, this.startColumn = s, this.endColumn = l;
|
5132
5138
|
}
|
5133
5139
|
}
|
5134
|
-
const
|
5140
|
+
const Cl = { class: "ha-condition" }, Tl = /* @__PURE__ */ J({
|
5135
5141
|
__name: "Condition",
|
5136
5142
|
props: {
|
5137
5143
|
name: {},
|
@@ -5140,48 +5146,48 @@ const Tl = { class: "ha-condition" }, $l = /* @__PURE__ */ Q({
|
|
5140
5146
|
},
|
5141
5147
|
setup(u) {
|
5142
5148
|
let e = u, { name: t, operator: s, value: l } = re(e);
|
5143
|
-
return (r, i) => (R(), B("div",
|
5144
|
-
|
5149
|
+
return (r, i) => (R(), B("div", Cl, [
|
5150
|
+
Ce(m(Pe), {
|
5145
5151
|
modelValue: m(t),
|
5146
|
-
"onUpdate:modelValue": i[0] || (i[0] = (a) =>
|
5152
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => Be(t) ? t.value = a : t = a)
|
5147
5153
|
}, null, 8, ["modelValue"]),
|
5148
|
-
|
5154
|
+
Ce(m(Pe), {
|
5149
5155
|
modelValue: m(s),
|
5150
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) =>
|
5156
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => Be(s) ? s.value = a : s = a)
|
5151
5157
|
}, {
|
5152
|
-
default:
|
5153
|
-
|
5158
|
+
default: qe(() => [
|
5159
|
+
Ce(m(fl))
|
5154
5160
|
]),
|
5155
5161
|
_: 1
|
5156
5162
|
}, 8, ["modelValue"]),
|
5157
|
-
|
5163
|
+
Ce(m(Pe), {
|
5158
5164
|
modelValue: m(l),
|
5159
|
-
"onUpdate:modelValue": i[2] || (i[2] = (a) =>
|
5165
|
+
"onUpdate:modelValue": i[2] || (i[2] = (a) => Be(l) ? l.value = a : l = a)
|
5160
5166
|
}, null, 8, ["modelValue"])
|
5161
5167
|
]));
|
5162
5168
|
}
|
5163
|
-
}),
|
5169
|
+
}), $l = { class: "ha-condition-group" }, pr = /* @__PURE__ */ J({
|
5164
5170
|
__name: "Index",
|
5165
5171
|
props: {
|
5166
5172
|
conditions: {}
|
5167
5173
|
},
|
5168
5174
|
setup(u) {
|
5169
5175
|
let e = u, { conditions: t } = re(e);
|
5170
|
-
return (s, l) => (R(), B("div",
|
5171
|
-
(R(!0), B(
|
5176
|
+
return (s, l) => (R(), B("div", $l, [
|
5177
|
+
(R(!0), B(kt, null, Et(m(t), (r) => (R(), et(m(Tl), {
|
5172
5178
|
name: r.name,
|
5173
5179
|
operator: r.operator,
|
5174
5180
|
value: r.value
|
5175
5181
|
}, null, 8, ["name", "operator", "value"]))), 256))
|
5176
5182
|
]));
|
5177
5183
|
}
|
5178
|
-
}),
|
5179
|
-
function
|
5184
|
+
}), Ll = {}, Al = { class: "ha-col" };
|
5185
|
+
function Il(u, e) {
|
5180
5186
|
return R(), B("div", Al, [
|
5181
5187
|
fe(u.$slots, "default")
|
5182
5188
|
]);
|
5183
5189
|
}
|
5184
|
-
const
|
5190
|
+
const gr = /* @__PURE__ */ Ke(Ll, [["render", Il]]), fr = /* @__PURE__ */ J({
|
5185
5191
|
__name: "Container",
|
5186
5192
|
props: {
|
5187
5193
|
container: { type: Boolean, default: !0 }
|
@@ -5189,30 +5195,30 @@ const yr = /* @__PURE__ */ We(Il, [["render", Ol]]), vr = /* @__PURE__ */ Q({
|
|
5189
5195
|
setup(u) {
|
5190
5196
|
let e = u, { container: t } = re(e);
|
5191
5197
|
return (s, l) => (R(), B("div", {
|
5192
|
-
class:
|
5198
|
+
class: Ae({ "ha-container": m(t) })
|
5193
5199
|
}, [
|
5194
5200
|
fe(s.$slots, "default")
|
5195
5201
|
], 2));
|
5196
5202
|
}
|
5197
|
-
}),
|
5203
|
+
}), mr = /* @__PURE__ */ J({
|
5198
5204
|
__name: "Row",
|
5199
5205
|
props: {
|
5200
5206
|
gap: {},
|
5201
5207
|
direction: {}
|
5202
5208
|
},
|
5203
5209
|
setup(u) {
|
5204
|
-
let e = u, { gap: t, direction: s } = re(e), l =
|
5210
|
+
let e = u, { gap: t, direction: s } = re(e), l = Te(() => {
|
5205
5211
|
let r = { gap: null };
|
5206
5212
|
return t.value && (r.gap = t.value + "px"), r;
|
5207
5213
|
});
|
5208
5214
|
return (r, i) => (R(), B("div", {
|
5209
|
-
class:
|
5215
|
+
class: Ae(["ha-row", m(s)]),
|
5210
5216
|
style: me(m(l))
|
5211
5217
|
}, [
|
5212
5218
|
fe(r.$slots, "default")
|
5213
5219
|
], 6));
|
5214
5220
|
}
|
5215
|
-
}),
|
5221
|
+
}), yr = /* @__PURE__ */ J({
|
5216
5222
|
__name: "Progress",
|
5217
5223
|
props: {
|
5218
5224
|
modelValue: { type: Boolean },
|
@@ -5220,7 +5226,7 @@ const yr = /* @__PURE__ */ We(Il, [["render", Ol]]), vr = /* @__PURE__ */ Q({
|
|
5220
5226
|
},
|
5221
5227
|
emits: ["update:modelValue"],
|
5222
5228
|
setup(u) {
|
5223
|
-
let e =
|
5229
|
+
let e = tt(u, "modelValue"), t = j(!0), s = j(0), l = null, r = () => {
|
5224
5230
|
s.value = 0, t.value = !0, l = setInterval(() => {
|
5225
5231
|
if (s.value < 100) {
|
5226
5232
|
s.value++;
|
@@ -5236,9 +5242,9 @@ const yr = /* @__PURE__ */ We(Il, [["render", Ol]]), vr = /* @__PURE__ */ Q({
|
|
5236
5242
|
}, 200));
|
5237
5243
|
}, c);
|
5238
5244
|
};
|
5239
|
-
return
|
5245
|
+
return we(() => {
|
5240
5246
|
e.value && r();
|
5241
|
-
}),
|
5247
|
+
}), xe(() => {
|
5242
5248
|
clearInterval(l);
|
5243
5249
|
}), H(() => e.value, (a, o) => {
|
5244
5250
|
a ? r() : i();
|
@@ -5246,163 +5252,161 @@ const yr = /* @__PURE__ */ We(Il, [["render", Ol]]), vr = /* @__PURE__ */ Q({
|
|
5246
5252
|
key: 0,
|
5247
5253
|
class: "ha-progress",
|
5248
5254
|
style: me({ width: m(s) + "%" })
|
5249
|
-
}, null, 4)) :
|
5255
|
+
}, null, 4)) : He("", !0);
|
5250
5256
|
}
|
5251
|
-
}),
|
5257
|
+
}), Ol = { class: "progress-tips" }, Dl = { class: "progress-tip info" }, jl = { class: "progress-tip success" }, Rl = { class: "progress-tip error" }, _l = { class: "progress-chart" }, Bl = { class: "progress-bar" }, Pl = { class: "progress-text" }, vr = /* @__PURE__ */ J({
|
5252
5258
|
__name: "SocketProgress",
|
5253
5259
|
props: {
|
5254
5260
|
progress: {}
|
5255
5261
|
},
|
5256
5262
|
setup(u) {
|
5257
|
-
let e = u, { progress: t } = re(e), s =
|
5263
|
+
let e = u, { progress: t } = re(e), s = Te(() => {
|
5258
5264
|
let a = t.value;
|
5259
5265
|
return (a.succeed ?? 0) + (a.errored ?? 0);
|
5260
|
-
}), l =
|
5266
|
+
}), l = Te(() => ie.getPercentage(s.value, t.value.total)), r = Te(() => ie.getProgressText(s.value, t.value.total)), i = Te(() => ie.getPercentageText(s.value, t.value.total));
|
5261
5267
|
return (a, o) => (R(), B("div", {
|
5262
|
-
class:
|
5268
|
+
class: Ae(["ha-socket-progress", { error: m(t).errored > 0 }])
|
5263
5269
|
}, [
|
5264
|
-
D("div",
|
5265
|
-
D("div",
|
5266
|
-
D("div",
|
5267
|
-
D("div",
|
5270
|
+
D("div", Ol, [
|
5271
|
+
D("div", Dl, "进度:" + pe(m(r)), 1),
|
5272
|
+
D("div", jl, "成功:" + pe(m(t).succeed ?? "-"), 1),
|
5273
|
+
D("div", Rl, "异常:" + pe(m(t).errored ?? "-"), 1)
|
5268
5274
|
]),
|
5269
|
-
D("div",
|
5270
|
-
D("div",
|
5275
|
+
D("div", _l, [
|
5276
|
+
D("div", Bl, [
|
5271
5277
|
D("div", {
|
5272
5278
|
class: "progress-percentage",
|
5273
5279
|
style: me({ width: m(l) + "%" })
|
5274
5280
|
}, null, 4)
|
5275
5281
|
]),
|
5276
|
-
D("div",
|
5282
|
+
D("div", Pl, pe(m(i)) + "%", 1)
|
5277
5283
|
])
|
5278
5284
|
], 2));
|
5279
5285
|
}
|
5280
|
-
}),
|
5281
|
-
|
5282
|
-
|
5283
|
-
],
|
5286
|
+
}), Ul = { class: "ha-tab" }, Fl = /* @__PURE__ */ D("div", { class: "tab-header" }, null, -1), Ml = /* @__PURE__ */ D("div", { class: "tab-body" }, null, -1), Nl = [
|
5287
|
+
Fl,
|
5288
|
+
Ml
|
5289
|
+
], br = /* @__PURE__ */ J({
|
5284
5290
|
__name: "Tab",
|
5285
5291
|
props: {
|
5286
5292
|
destroy: { type: Boolean }
|
5287
5293
|
},
|
5288
5294
|
setup(u) {
|
5289
|
-
return (e, t) => (R(), B("div",
|
5295
|
+
return (e, t) => (R(), B("div", Ul, Nl));
|
5290
5296
|
}
|
5291
5297
|
});
|
5292
|
-
let
|
5293
|
-
u == null && (u = new
|
5294
|
-
let e = await
|
5298
|
+
let wr = async (u) => {
|
5299
|
+
u == null && (u = new nl()), await rl(u), await Bs(u);
|
5300
|
+
let e = await _s.getSso(), t = { baseUrl: u.baseUrl, language: Y.language, user: e, platform: "pc" }, s = W.serialize(t);
|
5295
5301
|
await L.open(s), L.onResponse = async (l) => {
|
5296
5302
|
let r = l.data;
|
5297
|
-
return
|
5303
|
+
return js.add(r.code, r.message, r.stack, r.elapsed), Promise.resolve();
|
5298
5304
|
};
|
5299
5305
|
};
|
5300
5306
|
export {
|
5301
5307
|
ge as ArrayHelper,
|
5302
|
-
|
5303
|
-
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5307
|
-
|
5308
|
-
|
5308
|
+
lt as BrowserHelper,
|
5309
|
+
qt as BuilderFactory,
|
5310
|
+
rt as Cdn,
|
5311
|
+
Kt as CdnFactory,
|
5312
|
+
It as ComponentHelper,
|
5313
|
+
nl as CreateFeOptions,
|
5314
|
+
Ue as DictionaryHelper,
|
5309
5315
|
N as DomHelper,
|
5310
|
-
|
5311
|
-
|
5316
|
+
ul as DragEvent,
|
5317
|
+
Jt as EncoderFactory,
|
5312
5318
|
ue as EventHelper,
|
5313
|
-
|
5314
|
-
|
5315
|
-
|
5319
|
+
pt as EventUtility,
|
5320
|
+
Gt as ExcelFactory,
|
5321
|
+
es as ExplainerFactory,
|
5316
5322
|
$ as Factories,
|
5317
|
-
|
5318
|
-
|
5319
|
-
|
5320
|
-
|
5321
|
-
|
5322
|
-
|
5323
|
-
|
5324
|
-
|
5325
|
-
|
5326
|
-
|
5327
|
-
|
5328
|
-
|
5329
|
-
|
5330
|
-
|
5331
|
-
|
5332
|
-
|
5333
|
-
|
5334
|
-
|
5335
|
-
|
5336
|
-
|
5337
|
-
|
5338
|
-
|
5339
|
-
|
5340
|
-
|
5341
|
-
|
5342
|
-
|
5343
|
-
|
5344
|
-
|
5345
|
-
|
5346
|
-
|
5323
|
+
rs as FeatureFactory,
|
5324
|
+
Oe as FileHelper,
|
5325
|
+
ur as HaCode,
|
5326
|
+
gr as HaCol,
|
5327
|
+
cr as HaCompare,
|
5328
|
+
Tl as HaCondition,
|
5329
|
+
pr as HaConditionGroup,
|
5330
|
+
fr as HaContainer,
|
5331
|
+
lr as HaEmpty,
|
5332
|
+
cl as HaFill,
|
5333
|
+
fl as HaOption,
|
5334
|
+
yr as HaProgress,
|
5335
|
+
dr as HaRichText,
|
5336
|
+
mr as HaRow,
|
5337
|
+
dl as HaScroller,
|
5338
|
+
Pe as HaSelect,
|
5339
|
+
vr as HaSocketProgress,
|
5340
|
+
br as HaTab,
|
5341
|
+
or as HaTimer,
|
5342
|
+
cs as HaloHttp,
|
5343
|
+
as as HasherFactory,
|
5344
|
+
Je as HtmlHelper,
|
5345
|
+
ds as HttpFactory,
|
5346
|
+
at as HttpRequest,
|
5347
|
+
Ge as HttpResponse,
|
5348
|
+
Es as I18nSvc,
|
5349
|
+
Ot as ImageHelper,
|
5350
|
+
W as JsonHelper,
|
5351
|
+
nr as KeyboardUtility,
|
5352
|
+
ir as ListDelta,
|
5347
5353
|
ie as MathHelper,
|
5348
|
-
|
5349
|
-
|
5350
|
-
|
5351
|
-
|
5352
|
-
|
5354
|
+
hs as Messenger,
|
5355
|
+
gs as MessengerFactory,
|
5356
|
+
Dt as MicroHelper,
|
5357
|
+
De as MountHelper,
|
5358
|
+
ar as MouseUtility,
|
5353
5359
|
te as ObjectHelper,
|
5354
|
-
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5363
|
-
|
5364
|
-
|
5365
|
-
|
5366
|
-
|
5367
|
-
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5360
|
+
ht as Position,
|
5361
|
+
Mt as ProviderFactory,
|
5362
|
+
Gl as ProviderTable,
|
5363
|
+
hr as Range,
|
5364
|
+
rr as Rect,
|
5365
|
+
jt as Ref,
|
5366
|
+
Xe as ScrollHelper,
|
5367
|
+
_t as SignHelper,
|
5368
|
+
ys as SignerFactory,
|
5369
|
+
Ye as SqlHelper,
|
5370
|
+
Qs as SsoFactory,
|
5371
|
+
ot as SsoUser,
|
5372
|
+
Q as StringHelper,
|
5373
|
+
Zl as SvcFactory,
|
5374
|
+
Ys as TaskFactory,
|
5375
|
+
Ee as TaskHelper,
|
5376
|
+
Hs as TemplateFactory,
|
5371
5377
|
le as TimeHelper,
|
5372
|
-
|
5378
|
+
je as TreeHelper,
|
5373
5379
|
U as TypeHelper,
|
5374
|
-
|
5375
|
-
|
5376
|
-
|
5377
|
-
|
5378
|
-
|
5379
|
-
|
5380
|
-
|
5381
|
-
|
5382
|
-
|
5380
|
+
K as UrlHelper,
|
5381
|
+
tr as VideoFactory,
|
5382
|
+
sr as VoiceFactory,
|
5383
|
+
sl as base64,
|
5384
|
+
ye as cdn,
|
5385
|
+
Y as configSvc,
|
5386
|
+
wr as createFe,
|
5387
|
+
Hl as driverSvc,
|
5388
|
+
er as envSvc,
|
5383
5389
|
L as http,
|
5384
5390
|
G as i18nSvc,
|
5385
|
-
|
5386
|
-
|
5387
|
-
|
5388
|
-
|
5389
|
-
|
5390
|
-
ht as md5,
|
5391
|
-
ve as messenger,
|
5391
|
+
rl as initDriver,
|
5392
|
+
Bs as initSvc,
|
5393
|
+
js as logSvc,
|
5394
|
+
dt as md5,
|
5395
|
+
be as messenger,
|
5392
5396
|
se as moment,
|
5393
|
-
|
5397
|
+
Ie as settingRepo,
|
5394
5398
|
de as settingSvc,
|
5395
|
-
|
5396
|
-
|
5397
|
-
|
5398
|
-
|
5399
|
-
|
5400
|
-
|
5401
|
-
|
5402
|
-
|
5403
|
-
|
5404
|
-
|
5405
|
-
|
5406
|
-
|
5407
|
-
|
5399
|
+
Rs as socketSvc,
|
5400
|
+
ll as storage,
|
5401
|
+
Ps as t,
|
5402
|
+
Ms as t_enum,
|
5403
|
+
Us as t_exists,
|
5404
|
+
Ns as t_field,
|
5405
|
+
qs as t_field_choose_placeholder,
|
5406
|
+
Vs as t_field_placeholder,
|
5407
|
+
Ws as t_menu,
|
5408
|
+
Ks as t_module,
|
5409
|
+
Fs as t_sys,
|
5410
|
+
zs as t_table,
|
5411
|
+
_s as userSvc
|
5408
5412
|
};
|