@gx-design-vue/pro-utils 0.2.0-beta.66 → 0.2.0-beta.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pro-utils.js +287 -275
- package/dist/pro-utils.umd.cjs +13 -2
- package/dist/slots/index.d.ts +8 -14
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/isValid.d.ts +2 -0
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Gx Design Pro
|
|
3
|
+
* Version: 0.2.0-beta.67
|
|
4
|
+
* Author: gx12358
|
|
5
|
+
* Copyright (C) 2024 gx12358
|
|
6
|
+
* License: MIT License
|
|
7
|
+
* Description: Gx Design Pro Utils
|
|
8
|
+
* Date Created: 2025-08-14
|
|
9
|
+
* Homepage:
|
|
10
|
+
* Contact: gx12358@gmail.com
|
|
11
|
+
*/
|
|
12
|
+
import { Comment as J, Fragment as V, isVNode as m } from "vue";
|
|
13
|
+
class Ae {
|
|
3
14
|
constructor() {
|
|
4
15
|
this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
5
16
|
}
|
|
@@ -14,9 +25,9 @@ class we {
|
|
|
14
25
|
return n;
|
|
15
26
|
}
|
|
16
27
|
_utf8_decode(t) {
|
|
17
|
-
let n = "", r = 0, i = 0, o = 0,
|
|
28
|
+
let n = "", r = 0, i = 0, o = 0, f = 0;
|
|
18
29
|
for (; r < t.length; )
|
|
19
|
-
i = t.charCodeAt(r), i < 128 ? (n += String.fromCharCode(i), r++) : i > 191 && i < 224 ? (o = t.charCodeAt(r + 1), n += String.fromCharCode((i & 31) << 6 | o & 63), r += 2) : (o = t.charCodeAt(r + 1),
|
|
30
|
+
i = t.charCodeAt(r), i < 128 ? (n += String.fromCharCode(i), r++) : i > 191 && i < 224 ? (o = t.charCodeAt(r + 1), n += String.fromCharCode((i & 31) << 6 | o & 63), r += 2) : (o = t.charCodeAt(r + 1), f = t.charCodeAt(r + 2), n += String.fromCharCode((i & 15) << 12 | (o & 63) << 6 | f & 63), r += 3);
|
|
20
31
|
return n;
|
|
21
32
|
}
|
|
22
33
|
/**
|
|
@@ -26,9 +37,9 @@ class we {
|
|
|
26
37
|
* @description 加密方法
|
|
27
38
|
*/
|
|
28
39
|
encode(t) {
|
|
29
|
-
let n = "", r, i, o,
|
|
40
|
+
let n = "", r, i, o, f, s, c, u, l = 0;
|
|
30
41
|
for (t = this._utf8_encode(t); l < t.length; )
|
|
31
|
-
r = t.charCodeAt(l++), i = t.charCodeAt(l++), o = t.charCodeAt(l++),
|
|
42
|
+
r = t.charCodeAt(l++), i = t.charCodeAt(l++), o = t.charCodeAt(l++), f = r >> 2, s = (r & 3) << 4 | i >> 4, c = (i & 15) << 2 | o >> 6, u = o & 63, Number.isNaN(i) ? c = u = 64 : Number.isNaN(o) && (u = 64), n = n + this._keyStr.charAt(f) + this._keyStr.charAt(s) + this._keyStr.charAt(c) + this._keyStr.charAt(u);
|
|
32
43
|
return n;
|
|
33
44
|
}
|
|
34
45
|
/**
|
|
@@ -38,16 +49,16 @@ class we {
|
|
|
38
49
|
* @description 解密
|
|
39
50
|
*/
|
|
40
51
|
decode(t) {
|
|
41
|
-
let n = "", r, i, o,
|
|
52
|
+
let n = "", r, i, o, f, s, c, u, l = 0;
|
|
42
53
|
for (t = t.replace(/[^A-Z0-9+/=]/gi, ""); l < t.length; )
|
|
43
|
-
|
|
54
|
+
f = this._keyStr.indexOf(t.charAt(l++)), s = this._keyStr.indexOf(t.charAt(l++)), c = this._keyStr.indexOf(t.charAt(l++)), u = this._keyStr.indexOf(t.charAt(l++)), r = f << 2 | s >> 4, i = (s & 15) << 4 | c >> 2, o = (c & 3) << 6 | u, n = n + String.fromCharCode(r), c !== 64 && (n = n + String.fromCharCode(i)), u !== 64 && (n = n + String.fromCharCode(o));
|
|
44
55
|
return n = this._utf8_decode(n), n;
|
|
45
56
|
}
|
|
46
57
|
}
|
|
47
58
|
function Z(e, t) {
|
|
48
59
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
49
60
|
}
|
|
50
|
-
function
|
|
61
|
+
function w(e) {
|
|
51
62
|
return typeof e == "boolean";
|
|
52
63
|
}
|
|
53
64
|
function d(e) {
|
|
@@ -62,10 +73,10 @@ function p(e) {
|
|
|
62
73
|
function X(e) {
|
|
63
74
|
return typeof e == "string" || e instanceof String;
|
|
64
75
|
}
|
|
65
|
-
function
|
|
76
|
+
function xe(e) {
|
|
66
77
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
67
78
|
}
|
|
68
|
-
function
|
|
79
|
+
function Se(e) {
|
|
69
80
|
if (typeof e != "string")
|
|
70
81
|
return !1;
|
|
71
82
|
try {
|
|
@@ -75,7 +86,7 @@ function ve(e) {
|
|
|
75
86
|
return !1;
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
|
-
function
|
|
89
|
+
function ve() {
|
|
79
90
|
const e = navigator.userAgent || navigator.vendor;
|
|
80
91
|
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
|
|
81
92
|
}
|
|
@@ -102,7 +113,7 @@ function G(...e) {
|
|
|
102
113
|
}
|
|
103
114
|
return t.filter((n) => n).join(" ");
|
|
104
115
|
}
|
|
105
|
-
function
|
|
116
|
+
function W(e, t) {
|
|
106
117
|
if (typeof t != "string" && !Array.isArray(t))
|
|
107
118
|
return;
|
|
108
119
|
const n = Array.isArray(t) ? t : t.split(":");
|
|
@@ -114,12 +125,12 @@ function V(e, t) {
|
|
|
114
125
|
return;
|
|
115
126
|
return r;
|
|
116
127
|
}
|
|
117
|
-
const
|
|
128
|
+
const v = typeof window > "u";
|
|
118
129
|
function Q(e) {
|
|
119
130
|
return e.replace(/[-_](.)/g, (t, n) => n.toUpperCase());
|
|
120
131
|
}
|
|
121
132
|
const C = function(e, t) {
|
|
122
|
-
if (
|
|
133
|
+
if (v || !e || !t)
|
|
123
134
|
return "";
|
|
124
135
|
t = Q(t), t === "float" && (t = "cssFloat");
|
|
125
136
|
try {
|
|
@@ -131,8 +142,8 @@ const C = function(e, t) {
|
|
|
131
142
|
} catch {
|
|
132
143
|
return e.style[t];
|
|
133
144
|
}
|
|
134
|
-
}, k = (e, t) =>
|
|
135
|
-
if (
|
|
145
|
+
}, k = (e, t) => v ? void 0 : (t == null ? C(e, "overflow") : t ? C(e, "overflow-y") : C(e, "overflow-x")).match(/(scroll|auto|overlay)/), Oe = (e, t) => {
|
|
146
|
+
if (v)
|
|
136
147
|
return;
|
|
137
148
|
let n = e;
|
|
138
149
|
for (; n; ) {
|
|
@@ -143,8 +154,8 @@ const C = function(e, t) {
|
|
|
143
154
|
n = n.parentNode;
|
|
144
155
|
}
|
|
145
156
|
return n;
|
|
146
|
-
},
|
|
147
|
-
if (
|
|
157
|
+
}, Ce = (e, t) => {
|
|
158
|
+
if (v || !e || !t)
|
|
148
159
|
return !1;
|
|
149
160
|
const n = e.getBoundingClientRect();
|
|
150
161
|
let r;
|
|
@@ -155,7 +166,7 @@ const C = function(e, t) {
|
|
|
155
166
|
left: 0
|
|
156
167
|
} : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
|
|
157
168
|
};
|
|
158
|
-
function
|
|
169
|
+
function E(e) {
|
|
159
170
|
return e != null && e === e.window;
|
|
160
171
|
}
|
|
161
172
|
function K(e, t) {
|
|
@@ -163,44 +174,44 @@ function K(e, t) {
|
|
|
163
174
|
return 0;
|
|
164
175
|
const n = t ? "scrollTop" : "scrollLeft";
|
|
165
176
|
let r = 0;
|
|
166
|
-
return
|
|
177
|
+
return E(e) ? r = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? r = e.documentElement[n] : e && (r = e[n]), e && !E(e) && typeof r != "number" && (r = (e.ownerDocument || e).documentElement?.[n]), r;
|
|
167
178
|
}
|
|
168
|
-
let
|
|
169
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
170
|
-
let
|
|
171
|
-
const
|
|
172
|
-
function
|
|
173
|
-
|
|
179
|
+
let z = (e) => setTimeout(e, 16), b = (e) => clearTimeout(e);
|
|
180
|
+
typeof window < "u" && "requestAnimationFrame" in window && (z = (e) => window.requestAnimationFrame(e), b = (e) => window.cancelAnimationFrame(e));
|
|
181
|
+
let P = 0;
|
|
182
|
+
const D = /* @__PURE__ */ new Map();
|
|
183
|
+
function H(e) {
|
|
184
|
+
D.delete(e);
|
|
174
185
|
}
|
|
175
186
|
function R(e, t = 1) {
|
|
176
|
-
|
|
177
|
-
const n =
|
|
187
|
+
P += 1;
|
|
188
|
+
const n = P;
|
|
178
189
|
function r(i) {
|
|
179
190
|
if (i === 0)
|
|
180
|
-
|
|
191
|
+
H(n), e();
|
|
181
192
|
else {
|
|
182
|
-
const o =
|
|
193
|
+
const o = z(() => {
|
|
183
194
|
r(i - 1);
|
|
184
195
|
});
|
|
185
|
-
|
|
196
|
+
D.set(n, o);
|
|
186
197
|
}
|
|
187
198
|
}
|
|
188
199
|
return r(t), n;
|
|
189
200
|
}
|
|
190
201
|
R.cancel = (e) => {
|
|
191
|
-
const t =
|
|
192
|
-
return
|
|
202
|
+
const t = D.get(e);
|
|
203
|
+
return H(t), b(t);
|
|
193
204
|
};
|
|
194
205
|
function j(e, t, n, r) {
|
|
195
206
|
const i = n - t;
|
|
196
207
|
return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
197
208
|
}
|
|
198
|
-
function
|
|
199
|
-
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(),
|
|
200
|
-
const l = Date.now() - s, y = j(l > i ? i : l,
|
|
201
|
-
|
|
209
|
+
function Ie(e, t = {}) {
|
|
210
|
+
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), f = K(o, !0), s = Date.now(), c = () => {
|
|
211
|
+
const l = Date.now() - s, y = j(l > i ? i : l, f, e, i);
|
|
212
|
+
E(o) ? o.scrollTo(window.pageXOffset, y) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = y : o.scrollTop = y, l < i ? R(c) : typeof r == "function" && r();
|
|
202
213
|
};
|
|
203
|
-
o && R(
|
|
214
|
+
o && R(c);
|
|
204
215
|
}
|
|
205
216
|
function Ee(e) {
|
|
206
217
|
let t;
|
|
@@ -291,23 +302,23 @@ function h(e, t = /* @__PURE__ */ new Map()) {
|
|
|
291
302
|
function g(e, t, n) {
|
|
292
303
|
const r = [...Object.keys(t), ...ee(t)];
|
|
293
304
|
for (let i = 0; i < r.length; i++) {
|
|
294
|
-
const o = r[i],
|
|
295
|
-
(
|
|
305
|
+
const o = r[i], f = Object.getOwnPropertyDescriptor(e, o);
|
|
306
|
+
(f == null || f.writable) && (e[o] = h(t[o], n));
|
|
296
307
|
}
|
|
297
308
|
}
|
|
298
|
-
const re = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
299
|
-
function
|
|
309
|
+
const re = typeof process < "u" && process.versions != null && process.versions.node != null, Re = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !re;
|
|
310
|
+
function I(e, t, n, r) {
|
|
300
311
|
if (e === t)
|
|
301
312
|
return !0;
|
|
302
313
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
303
314
|
if (e.constructor !== t.constructor)
|
|
304
315
|
return !1;
|
|
305
|
-
let i, o,
|
|
316
|
+
let i, o, f;
|
|
306
317
|
if (Array.isArray(e)) {
|
|
307
318
|
if (i = e.length, i != t.length)
|
|
308
319
|
return !1;
|
|
309
320
|
for (o = i; o-- !== 0; )
|
|
310
|
-
if (!
|
|
321
|
+
if (!I(e[o], t[o], n, r))
|
|
311
322
|
return !1;
|
|
312
323
|
return !0;
|
|
313
324
|
}
|
|
@@ -318,7 +329,7 @@ function E(e, t, n, r) {
|
|
|
318
329
|
if (!t.has(o[0]))
|
|
319
330
|
return !1;
|
|
320
331
|
for (o of e.entries())
|
|
321
|
-
if (!
|
|
332
|
+
if (!I(o[1], t.get(o[0]), n, r))
|
|
322
333
|
return !1;
|
|
323
334
|
return !0;
|
|
324
335
|
}
|
|
@@ -344,24 +355,24 @@ function E(e, t, n, r) {
|
|
|
344
355
|
return e.valueOf() === t.valueOf();
|
|
345
356
|
if (e.toString !== Object.prototype.toString && e.toString)
|
|
346
357
|
return e.toString() === t.toString();
|
|
347
|
-
if (
|
|
358
|
+
if (f = Object.keys(e), i = f.length, i !== Object.keys(t).length)
|
|
348
359
|
return !1;
|
|
349
360
|
for (o = i; o-- !== 0; )
|
|
350
|
-
if (!Object.prototype.hasOwnProperty.call(t,
|
|
361
|
+
if (!Object.prototype.hasOwnProperty.call(t, f[o]))
|
|
351
362
|
return !1;
|
|
352
363
|
for (o = i; o-- !== 0; ) {
|
|
353
|
-
const s =
|
|
354
|
-
if (!n?.includes(s) && !(s === "_owner" && e.$$typeof) && !
|
|
364
|
+
const s = f[o];
|
|
365
|
+
if (!n?.includes(s) && !(s === "_owner" && e.$$typeof) && !I(e[s], t[s], n, r))
|
|
355
366
|
return r && console.log(s), !1;
|
|
356
367
|
}
|
|
357
368
|
return !0;
|
|
358
369
|
}
|
|
359
370
|
return e !== e && t !== t;
|
|
360
371
|
}
|
|
361
|
-
function
|
|
372
|
+
function Te(e) {
|
|
362
373
|
return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
363
374
|
}
|
|
364
|
-
const ie = (e) => e == null,
|
|
375
|
+
const ie = (e) => e == null, Ue = (e) => {
|
|
365
376
|
if (!e || !e.startsWith("http"))
|
|
366
377
|
return !1;
|
|
367
378
|
try {
|
|
@@ -370,13 +381,13 @@ const ie = (e) => e == null, Te = (e) => {
|
|
|
370
381
|
return console.error("isUrl error", t), !1;
|
|
371
382
|
}
|
|
372
383
|
};
|
|
373
|
-
function
|
|
384
|
+
function F(e) {
|
|
374
385
|
if (!e || typeof e != "object")
|
|
375
386
|
return !1;
|
|
376
387
|
const t = Object.getPrototypeOf(e);
|
|
377
388
|
return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
|
|
378
389
|
}
|
|
379
|
-
const
|
|
390
|
+
const De = (...e) => {
|
|
380
391
|
const t = {}, n = e.length;
|
|
381
392
|
let r, i = 0;
|
|
382
393
|
for (; i < n; i += 1)
|
|
@@ -387,18 +398,18 @@ const Ue = (...e) => {
|
|
|
387
398
|
} : t[r] = e[i][r]);
|
|
388
399
|
return t;
|
|
389
400
|
};
|
|
390
|
-
function
|
|
391
|
-
const r =
|
|
392
|
-
for (let
|
|
393
|
-
const s = o[
|
|
394
|
-
Array.isArray(
|
|
401
|
+
function A(e, t, n) {
|
|
402
|
+
const r = w(n?.omitNil) ? n?.omitNil : !0, i = w(n?.omitEmpty) ? n?.omitEmpty : !0, o = Object.keys(t);
|
|
403
|
+
for (let f = 0; f < o.length; f++) {
|
|
404
|
+
const s = o[f], c = t[s], u = e[s];
|
|
405
|
+
Array.isArray(c) ? Array.isArray(u) ? c.length === 0 && !i ? e[s] = c : e[s] = A(u, c, n) : e[s] = A([], c, n) : F(c) ? F(u) ? Object.keys(c).length === 0 && !i ? e[s] = c : e[s] = A(u, c, n) : e[s] = A({}, c, n) : r ? (u === void 0 || !ie(c)) && (e[s] = c) : e[s] = c;
|
|
395
406
|
}
|
|
396
407
|
return e;
|
|
397
408
|
}
|
|
398
|
-
let
|
|
399
|
-
const
|
|
409
|
+
let L = 0;
|
|
410
|
+
const M = (e = 21) => {
|
|
400
411
|
if (typeof window > "u" || !window.crypto)
|
|
401
|
-
return (
|
|
412
|
+
return (L += 1).toFixed(0);
|
|
402
413
|
let t = "";
|
|
403
414
|
const n = crypto.getRandomValues(new Uint8Array(e));
|
|
404
415
|
for (; e--; ) {
|
|
@@ -406,67 +417,67 @@ const L = (e = 21) => {
|
|
|
406
417
|
t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
407
418
|
}
|
|
408
419
|
return t;
|
|
409
|
-
},
|
|
420
|
+
}, Be = () => typeof window > "u" ? M() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : M(), Ne = (e) => {
|
|
410
421
|
if (e && e !== !0)
|
|
411
422
|
return e;
|
|
412
|
-
},
|
|
423
|
+
}, Pe = (e) => {
|
|
413
424
|
const t = {};
|
|
414
425
|
if (Object.keys(e || {}).forEach((n) => {
|
|
415
426
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
416
427
|
}), !(Object.keys(t).length < 1))
|
|
417
428
|
return t;
|
|
418
|
-
},
|
|
429
|
+
}, Fe = (e) => {
|
|
419
430
|
const t = {};
|
|
420
431
|
return Object.keys(e || {}).forEach((n) => {
|
|
421
432
|
Array.isArray(e[n]) && e[n]?.length === 0 || e[n] !== void 0 && (t[n] = e[n]);
|
|
422
433
|
}), t;
|
|
423
|
-
};
|
|
424
|
-
function
|
|
434
|
+
}, oe = (e) => e != null && e !== "";
|
|
435
|
+
function B(e) {
|
|
425
436
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
426
437
|
return Array.isArray(e) ? e[e.length - 1] : e.split(":")?.slice(-1)[0];
|
|
427
438
|
}
|
|
428
|
-
function
|
|
429
|
-
return e && (e.type === J || e.type ===
|
|
439
|
+
function se(e) {
|
|
440
|
+
return e && (e.type === J || e.type === V && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
430
441
|
}
|
|
431
|
-
function
|
|
432
|
-
return
|
|
442
|
+
function Le(e, t) {
|
|
443
|
+
return T(e[t]?.());
|
|
433
444
|
}
|
|
434
|
-
function
|
|
435
|
-
const
|
|
436
|
-
return
|
|
437
|
-
Array.isArray(
|
|
438
|
-
}),
|
|
445
|
+
function T(e = [], t = !0) {
|
|
446
|
+
const n = Array.isArray(e) ? e : [e], r = [];
|
|
447
|
+
return n.forEach((i) => {
|
|
448
|
+
Array.isArray(i) ? r.push(...T(i, t)) : i?.type === V || i?.type === "template" ? r.push(...T(i.children, t)) : i && m(i) ? t && !se(i) ? r.push(i) : t || r.push(i) : oe(i) && r.push(i);
|
|
449
|
+
}), r;
|
|
439
450
|
}
|
|
440
451
|
function q(e, ...t) {
|
|
441
452
|
return typeof e == "function" ? e?.(...t) : e;
|
|
442
453
|
}
|
|
443
|
-
function
|
|
444
|
-
const i =
|
|
454
|
+
function fe(e, t, n = "default", r) {
|
|
455
|
+
const i = B(n);
|
|
445
456
|
if (i) {
|
|
446
457
|
let o;
|
|
447
|
-
const
|
|
448
|
-
return
|
|
458
|
+
const f = W(t, n);
|
|
459
|
+
return f === !1 ? o = !1 : f === !0 ? o = e?.[i] : p(f) && r ? m(f) ? o = f : o = e?.[i] : o = f || e?.[i], r ? m(o) ? o : q(o) : o;
|
|
449
460
|
}
|
|
450
461
|
}
|
|
451
462
|
function ce(e, t, n = "default", r) {
|
|
452
|
-
const i =
|
|
463
|
+
const i = B(n);
|
|
453
464
|
if (i) {
|
|
454
465
|
let o;
|
|
455
|
-
const
|
|
456
|
-
return
|
|
466
|
+
const f = W(t, n);
|
|
467
|
+
return f === !1 ? o = !1 : f === !0 ? o = e?.[i]?.(r) : p(f) ? m(f) ? o = f : o = e?.[i]?.(r) : o = f || e?.[i]?.(r), m(o) ? o : q(o, r);
|
|
457
468
|
}
|
|
458
469
|
}
|
|
459
|
-
function
|
|
470
|
+
function Me(e, t, n, r) {
|
|
460
471
|
const i = {};
|
|
461
472
|
return e.forEach((o) => {
|
|
462
|
-
const
|
|
463
|
-
if (
|
|
464
|
-
const s = r?.render ? ce(t, n, o, r?.params) :
|
|
465
|
-
(
|
|
473
|
+
const f = B(o);
|
|
474
|
+
if (f) {
|
|
475
|
+
const s = r?.render ? ce(t, n, o, r?.params) : fe(t, n, o);
|
|
476
|
+
(w(s) || s) && (i[f] = s);
|
|
466
477
|
}
|
|
467
478
|
}), i;
|
|
468
479
|
}
|
|
469
|
-
const
|
|
480
|
+
const S = {
|
|
470
481
|
videoAllowType: [
|
|
471
482
|
"mp4",
|
|
472
483
|
"webm",
|
|
@@ -554,14 +565,14 @@ const v = {
|
|
|
554
565
|
"ape"
|
|
555
566
|
]
|
|
556
567
|
};
|
|
557
|
-
function
|
|
568
|
+
function $e(e) {
|
|
558
569
|
return e != null;
|
|
559
570
|
}
|
|
560
|
-
const
|
|
571
|
+
const _e = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
|
|
561
572
|
const i = r || (n ? "gx-pro" : "gx");
|
|
562
573
|
return t || (e ? `${i}-${e}` : i);
|
|
563
|
-
},
|
|
564
|
-
function
|
|
574
|
+
}, Ve = (e, t) => e ? a(e) ? e.join("-") : e.toString() : `${t || 0}`;
|
|
575
|
+
function We(e, { align: t, showIndex: n }) {
|
|
565
576
|
const r = O(e);
|
|
566
577
|
if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
|
|
567
578
|
const i = e[0];
|
|
@@ -570,7 +581,7 @@ function Ve(e, { align: t, showIndex: n }) {
|
|
|
570
581
|
align: t,
|
|
571
582
|
fixed: i.fixed,
|
|
572
583
|
width: 60,
|
|
573
|
-
uuid:
|
|
584
|
+
uuid: ae().uuid(15),
|
|
574
585
|
dataIndex: "sortIndex",
|
|
575
586
|
key: "sortIndex"
|
|
576
587
|
});
|
|
@@ -578,13 +589,13 @@ function Ve(e, { align: t, showIndex: n }) {
|
|
|
578
589
|
r.filter((i) => i.dataIndex !== "sortIndex");
|
|
579
590
|
return r;
|
|
580
591
|
}
|
|
581
|
-
function
|
|
592
|
+
function ze(e, ...t) {
|
|
582
593
|
return typeof e == "function" ? e(...t) : e;
|
|
583
594
|
}
|
|
584
|
-
function
|
|
595
|
+
function be(e) {
|
|
585
596
|
return JSON.parse(JSON.stringify(e));
|
|
586
597
|
}
|
|
587
|
-
function
|
|
598
|
+
function He(e, t) {
|
|
588
599
|
if (p(e)) {
|
|
589
600
|
const { pageSize: n = 10, total: r = 0 } = e;
|
|
590
601
|
let { current: i = 1 } = e;
|
|
@@ -592,19 +603,19 @@ function be(e, t) {
|
|
|
592
603
|
}
|
|
593
604
|
return 1;
|
|
594
605
|
}
|
|
595
|
-
function
|
|
606
|
+
function qe(e = [], t, n = "children") {
|
|
596
607
|
function r(i, o) {
|
|
597
|
-
return o.map((
|
|
598
|
-
const
|
|
599
|
-
return
|
|
608
|
+
return o.map((f, s) => {
|
|
609
|
+
const c = `${i}-${s + 1}`;
|
|
610
|
+
return f[n] && (f[n] = r(c, f[n])), f.sortIndex = c, f;
|
|
600
611
|
});
|
|
601
612
|
}
|
|
602
613
|
return O(e).map((i, o) => {
|
|
603
|
-
const
|
|
604
|
-
return i[n] && (i[n] = r(`${
|
|
614
|
+
const f = p(t) && t.current || 1, s = p(t) && t.pageSize || 10, c = `${(f - 1) * s + (o + 1)}`;
|
|
615
|
+
return i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
|
|
605
616
|
});
|
|
606
617
|
}
|
|
607
|
-
function
|
|
618
|
+
function Je(e, t) {
|
|
608
619
|
return a(e) ? e?.filter((n, r) => {
|
|
609
620
|
if (d(t))
|
|
610
621
|
return r <= t - 1;
|
|
@@ -618,28 +629,28 @@ function qe(e, t) {
|
|
|
618
629
|
return !0;
|
|
619
630
|
}) : [];
|
|
620
631
|
}
|
|
621
|
-
function fe(e, t, n, r = 0) {
|
|
622
|
-
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = e[n], c = t[n];
|
|
623
|
-
let s = 0;
|
|
624
|
-
return o < c ? s = i === 0 ? -1 : 0 : o > c && (s = i === 0 ? 0 : -1), s;
|
|
625
|
-
}
|
|
626
632
|
function ue(e, t, n, r = 0) {
|
|
627
|
-
const i = d(r) && (r === 0 || r === 1) ? r : 0, o =
|
|
633
|
+
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = e[n], f = t[n];
|
|
628
634
|
let s = 0;
|
|
629
|
-
return o <
|
|
635
|
+
return o < f ? s = i === 0 ? -1 : 0 : o > f && (s = i === 0 ? 0 : -1), s;
|
|
630
636
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
637
|
+
function le(e, t, n, r = 0) {
|
|
638
|
+
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = new Date(e[n]), f = new Date(t[n]);
|
|
639
|
+
let s = 0;
|
|
640
|
+
return o < f ? s = i === 0 ? -1 : 0 : o > f && (s = i === 0 ? 0 : -1), s;
|
|
633
641
|
}
|
|
634
642
|
function Ze(e, t, n = 0) {
|
|
635
643
|
return e.sort((r, i) => ue(r, i, t, n));
|
|
636
644
|
}
|
|
637
|
-
function Xe(e) {
|
|
645
|
+
function Xe(e, t, n = 0) {
|
|
646
|
+
return e.sort((r, i) => le(r, i, t, n));
|
|
647
|
+
}
|
|
648
|
+
function Ye(e) {
|
|
638
649
|
let t = O(e);
|
|
639
650
|
const n = new Set(t);
|
|
640
651
|
return t = Array.from(n), t;
|
|
641
652
|
}
|
|
642
|
-
function
|
|
653
|
+
function Ge(e, t) {
|
|
643
654
|
const n = ["null", "undefined"];
|
|
644
655
|
let r = !0;
|
|
645
656
|
return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
|
|
@@ -650,7 +661,7 @@ function Ye(e, t) {
|
|
|
650
661
|
success: r
|
|
651
662
|
};
|
|
652
663
|
}
|
|
653
|
-
function
|
|
664
|
+
function Qe(e) {
|
|
654
665
|
let t = "";
|
|
655
666
|
if (e > -1) {
|
|
656
667
|
const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
|
|
@@ -658,18 +669,18 @@ function Ge(e) {
|
|
|
658
669
|
}
|
|
659
670
|
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
660
671
|
}
|
|
661
|
-
function
|
|
672
|
+
function ae() {
|
|
662
673
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
663
674
|
return {
|
|
664
675
|
uuid(t, n) {
|
|
665
676
|
const r = e, i = [], o = n || r.length;
|
|
666
|
-
let
|
|
677
|
+
let f, s;
|
|
667
678
|
if (t)
|
|
668
|
-
for (
|
|
669
|
-
i[
|
|
679
|
+
for (f = 0; f < t; f += 1)
|
|
680
|
+
i[f] = r[Number.parseInt(String(Math.random() * o))];
|
|
670
681
|
else
|
|
671
|
-
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4",
|
|
672
|
-
i[
|
|
682
|
+
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", f = 0; f < 36; f += 1)
|
|
683
|
+
i[f] || (s = Math.random() * 16, i[f] = r[f === 19 ? s && 3 || 8 : s]);
|
|
673
684
|
return i.join("");
|
|
674
685
|
},
|
|
675
686
|
uuidFast() {
|
|
@@ -690,83 +701,83 @@ function le() {
|
|
|
690
701
|
}
|
|
691
702
|
};
|
|
692
703
|
}
|
|
693
|
-
function
|
|
704
|
+
function de(e, t) {
|
|
694
705
|
if (!Array.isArray(e) || e.length === 0)
|
|
695
706
|
return 0;
|
|
696
707
|
const n = t || "children";
|
|
697
708
|
return Math.max(...e.map((r) => {
|
|
698
709
|
const i = r[n];
|
|
699
|
-
return 1 + (i ?
|
|
710
|
+
return 1 + (i ? de(i, n) : 0);
|
|
700
711
|
}));
|
|
701
712
|
}
|
|
702
|
-
function
|
|
713
|
+
function pe(e, t = "children") {
|
|
703
714
|
let n = [];
|
|
704
715
|
return e.forEach((r) => {
|
|
705
|
-
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(
|
|
716
|
+
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(pe(r[t], t)));
|
|
706
717
|
}), n;
|
|
707
718
|
}
|
|
708
|
-
function
|
|
719
|
+
function ke(e, t) {
|
|
709
720
|
if (!e || !a(e) || e?.length === 0)
|
|
710
721
|
return [];
|
|
711
|
-
const { id: n = "id", parentId: r = "parentId", children: i = "children", emptyChildren: o = !0 } = t || {},
|
|
712
|
-
return s.map((
|
|
713
|
-
const u = s.filter((l) =>
|
|
714
|
-
return u.length > 0 ?
|
|
722
|
+
const { id: n = "id", parentId: r = "parentId", children: i = "children", emptyChildren: o = !0 } = t || {}, f = t?.rootId ?? 0, s = O(e);
|
|
723
|
+
return s.map((c) => (!o && c[i] && c[i]?.length === 0 && delete c[i], c)).filter((c) => {
|
|
724
|
+
const u = s.filter((l) => c[n] === l[r]);
|
|
725
|
+
return u.length > 0 ? c[i] = u : o && (c[i] = []), f === !1 ? !0 : c[r] === f;
|
|
715
726
|
});
|
|
716
727
|
}
|
|
717
|
-
function
|
|
728
|
+
function he(e, t) {
|
|
718
729
|
return e.map((n) => {
|
|
719
730
|
const r = { ...n };
|
|
720
|
-
return r.children && (r.children =
|
|
731
|
+
return r.children && (r.children = he(r.children, t)), t(r) || r.children && r.children.length > 0 ? r : null;
|
|
721
732
|
}).filter(Boolean);
|
|
722
733
|
}
|
|
723
|
-
function
|
|
734
|
+
function Ke(e, t, n) {
|
|
724
735
|
const { value: r, children: i } = n || {
|
|
725
736
|
value: "value",
|
|
726
737
|
children: "children"
|
|
727
738
|
};
|
|
728
739
|
let o = [];
|
|
729
|
-
function
|
|
740
|
+
function f(s, c) {
|
|
730
741
|
if (s[r] === t)
|
|
731
|
-
return o = [...
|
|
742
|
+
return o = [...c, s[r]], !0;
|
|
732
743
|
if (s[i]) {
|
|
733
744
|
for (const u of s[i])
|
|
734
|
-
if (
|
|
745
|
+
if (f(u, [...c, s[r]]))
|
|
735
746
|
return !0;
|
|
736
747
|
}
|
|
737
748
|
return !1;
|
|
738
749
|
}
|
|
739
750
|
for (const s of e)
|
|
740
|
-
if (
|
|
751
|
+
if (f(s, []))
|
|
741
752
|
break;
|
|
742
753
|
return o;
|
|
743
754
|
}
|
|
744
|
-
function
|
|
755
|
+
function je(e) {
|
|
745
756
|
return e && a(e) ? e[e.length - 1] : null;
|
|
746
757
|
}
|
|
747
|
-
function
|
|
758
|
+
function ye(e, t, n) {
|
|
748
759
|
const r = n?.value || "id", i = n?.children || "children";
|
|
749
760
|
for (const o of e) {
|
|
750
761
|
if (o[r] === t)
|
|
751
762
|
return o;
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
754
|
-
const s =
|
|
763
|
+
const f = o[i];
|
|
764
|
+
if (f) {
|
|
765
|
+
const s = ye(f, t, n);
|
|
755
766
|
if (s)
|
|
756
767
|
return s;
|
|
757
768
|
}
|
|
758
769
|
}
|
|
759
770
|
}
|
|
760
|
-
function
|
|
771
|
+
function et(e) {
|
|
761
772
|
return URL.createObjectURL(e);
|
|
762
773
|
}
|
|
763
|
-
function
|
|
774
|
+
function tt(e) {
|
|
764
775
|
return new Promise((t, n) => {
|
|
765
776
|
const r = new FileReader();
|
|
766
777
|
r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
|
|
767
778
|
});
|
|
768
779
|
}
|
|
769
|
-
function
|
|
780
|
+
function nt(e) {
|
|
770
781
|
const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
|
|
771
782
|
let i = r.length;
|
|
772
783
|
const o = new Uint8Array(i);
|
|
@@ -774,71 +785,71 @@ function tt(e) {
|
|
|
774
785
|
o[i] = r.charCodeAt(i);
|
|
775
786
|
return new Blob([o], { type: n });
|
|
776
787
|
}
|
|
777
|
-
function
|
|
788
|
+
function rt(e, t) {
|
|
778
789
|
const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
779
790
|
let o = i.length;
|
|
780
|
-
const
|
|
791
|
+
const f = new Uint8Array(o);
|
|
781
792
|
for (; o--; )
|
|
782
|
-
|
|
783
|
-
return new File([
|
|
793
|
+
f[o] = i.charCodeAt(o);
|
|
794
|
+
return new File([f], t, { type: r });
|
|
784
795
|
}
|
|
785
|
-
function
|
|
796
|
+
function it(e, t, n) {
|
|
786
797
|
return new window.File([e], t, { type: n });
|
|
787
798
|
}
|
|
788
|
-
function
|
|
799
|
+
function ge(e) {
|
|
789
800
|
if (!e || typeof e != "string")
|
|
790
801
|
return "";
|
|
791
802
|
const t = e.indexOf("?");
|
|
792
803
|
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
793
804
|
}
|
|
794
|
-
function
|
|
805
|
+
function U(e) {
|
|
795
806
|
if (!e || typeof e != "string")
|
|
796
807
|
return "";
|
|
797
|
-
const t =
|
|
808
|
+
const t = ge(e), n = t.lastIndexOf(".");
|
|
798
809
|
return n > 0 && `${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1] || "";
|
|
799
810
|
}
|
|
800
|
-
function
|
|
811
|
+
function x(e, t) {
|
|
801
812
|
if (t)
|
|
802
813
|
return t;
|
|
803
814
|
if (!e || e === "data:")
|
|
804
815
|
return "4";
|
|
805
816
|
let n = "4";
|
|
806
|
-
return
|
|
817
|
+
return N(e) ? e.includes("data:image/") ? n = "png" : e.includes("data:video/") ? n = "mp4" : e.includes("data:audio/") && (n = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? n = "png" : e.includes("video") ? n = "mp4" : e.includes("audio") && (n = "mp3")) : n = U(e).toLowerCase(), S.imageType.includes(n) ? "1" : S.videoType.includes(n) ? "3" : S.audioType.includes(n) ? "2" : "4";
|
|
807
818
|
}
|
|
808
|
-
function
|
|
819
|
+
function me(e) {
|
|
809
820
|
const { url: t = "", fileType: n = "1" } = e || {};
|
|
810
821
|
let r = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
811
822
|
function o() {
|
|
812
823
|
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
813
824
|
}
|
|
814
|
-
return t instanceof File ? r = URL.createObjectURL(t) :
|
|
825
|
+
return t instanceof File ? r = URL.createObjectURL(t) : N(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((f) => {
|
|
815
826
|
let s;
|
|
816
827
|
if (n === "4") {
|
|
817
|
-
|
|
828
|
+
f(i);
|
|
818
829
|
return;
|
|
819
830
|
}
|
|
820
831
|
n === "1" ? (s = document.createElement("img"), s.src = r) : n === "2" ? (s = document.createElement("audio"), s.src = r) : n === "3" && (s = document.createElement("video"), s.src = r), n === "1" ? s.onload = function() {
|
|
821
|
-
o(), i.play = !0, i.width = s.width || 0, i.height = s.height || 0,
|
|
832
|
+
o(), i.play = !0, i.width = s.width || 0, i.height = s.height || 0, f(i), s = null;
|
|
822
833
|
} : s.oncanplay = function() {
|
|
823
|
-
o(), i.play = !0, i.width = s?.videoWidth || 0, i.height = s?.videoHeight || 0, i.duration = s?.duration || 0,
|
|
834
|
+
o(), i.play = !0, i.width = s?.videoWidth || 0, i.height = s?.videoHeight || 0, i.duration = s?.duration || 0, f(i), s = null;
|
|
824
835
|
}, s.onerror = function() {
|
|
825
|
-
o(),
|
|
836
|
+
o(), f(i), s = null;
|
|
826
837
|
};
|
|
827
838
|
});
|
|
828
839
|
}
|
|
829
|
-
async function
|
|
840
|
+
async function ot(e) {
|
|
830
841
|
const { url: t = "", currentTime: n, videoSuffix: r = "", videoAllowPlay: i = !1 } = e;
|
|
831
|
-
let o = "",
|
|
832
|
-
return t instanceof File ? (o = URL.createObjectURL(t),
|
|
842
|
+
let o = "", f = r, s = "1", c;
|
|
843
|
+
return t instanceof File ? (o = URL.createObjectURL(t), f = U(t.name), s = x(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), s = x(t)) : N(t) ? (o = t, s = x(t)) : (t.includes("https") || t.includes("http")) && (o = t, f = U(t), s = x(t)), (f ? S.videoAllowType.includes(f.toLowerCase()) : !1) ? i ? $(o, n) : (c = await me({
|
|
833
844
|
url: o,
|
|
834
845
|
fileType: s
|
|
835
|
-
}),
|
|
846
|
+
}), c.play ? $(o, n) : new Promise((l) => {
|
|
836
847
|
l("");
|
|
837
848
|
})) : new Promise((l) => {
|
|
838
849
|
l("");
|
|
839
850
|
});
|
|
840
851
|
}
|
|
841
|
-
async function
|
|
852
|
+
async function $(e, t = 0) {
|
|
842
853
|
return new Promise((n) => {
|
|
843
854
|
let r = document.createElement("video");
|
|
844
855
|
r && (r.controls = !0, r.muted = !0, r.setAttribute("src", e), r.setAttribute("muted", String(!0)), r.setAttribute("crossorigin", "anonymous"), r.setAttribute("autoplay", String(!0)), r.addEventListener("loadeddata", async () => {
|
|
@@ -847,49 +858,49 @@ async function M(e, t = 0) {
|
|
|
847
858
|
i && i();
|
|
848
859
|
}); t < (r?.duration || 0); ) {
|
|
849
860
|
r && (r.currentTime = t), await new Promise((y) => i = y);
|
|
850
|
-
const o = document.createElement("canvas"),
|
|
851
|
-
o.width = r?.videoWidth || 0 *
|
|
861
|
+
const o = document.createElement("canvas"), f = 0.8, s = o.getContext("2d"), c = r?.videoWidth || 0 * f, u = r?.videoHeight || 0 * f, l = 0;
|
|
862
|
+
o.width = r?.videoWidth || 0 * f, o.height = r?.videoHeight || 0 * f, r && s.drawImage(r, 0, 0, c + l, u + l), r = null, n(c === 0 || u === 0 ? "" : o.toDataURL("image/png", 1));
|
|
852
863
|
}
|
|
853
864
|
}));
|
|
854
865
|
});
|
|
855
866
|
}
|
|
856
|
-
function
|
|
867
|
+
function N(e = "") {
|
|
857
868
|
return !!(e && [
|
|
858
869
|
"data:image/",
|
|
859
870
|
"data:video/",
|
|
860
871
|
"data:audio/"
|
|
861
872
|
].find((n) => e.includes(n)));
|
|
862
873
|
}
|
|
863
|
-
function
|
|
874
|
+
function st(e) {
|
|
864
875
|
return typeof e == "string" && /^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
|
|
865
876
|
}
|
|
866
|
-
function
|
|
877
|
+
function ft(e, t, n, r = !1) {
|
|
867
878
|
e && t && n && e.addEventListener(t, n, r);
|
|
868
879
|
}
|
|
869
880
|
function ct(e, t, n, r = !1) {
|
|
870
881
|
e && t && n && e.removeEventListener(t, n, r);
|
|
871
882
|
}
|
|
872
|
-
function
|
|
883
|
+
function ut() {
|
|
873
884
|
return /windows|win32/i.test(navigator.userAgent);
|
|
874
885
|
}
|
|
875
|
-
function
|
|
876
|
-
return
|
|
886
|
+
function lt(e) {
|
|
887
|
+
return w(e) ? e : !!e;
|
|
877
888
|
}
|
|
878
|
-
function
|
|
889
|
+
function _(e, t) {
|
|
879
890
|
const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
|
|
880
891
|
if (i) {
|
|
881
892
|
const o = i[0];
|
|
882
893
|
if (o.includes(".")) {
|
|
883
|
-
const [
|
|
894
|
+
const [f, s] = o.split(".");
|
|
884
895
|
if (/^0*$/.test(s))
|
|
885
|
-
return
|
|
896
|
+
return f;
|
|
886
897
|
}
|
|
887
898
|
return o;
|
|
888
899
|
}
|
|
889
900
|
return t.toString();
|
|
890
901
|
}
|
|
891
|
-
function
|
|
892
|
-
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4,
|
|
902
|
+
function at(e, t) {
|
|
903
|
+
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4, f = d(r) ? r : 2, s = n ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
|
|
893
904
|
if (!d(e))
|
|
894
905
|
return {
|
|
895
906
|
str: `${e}`,
|
|
@@ -900,7 +911,7 @@ function lt(e, t) {
|
|
|
900
911
|
str: `${e}`,
|
|
901
912
|
number: `${e}`
|
|
902
913
|
};
|
|
903
|
-
if (
|
|
914
|
+
if (f === 0) {
|
|
904
915
|
const u = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
|
|
905
916
|
return {
|
|
906
917
|
str: `${u}${s}`,
|
|
@@ -908,20 +919,20 @@ function lt(e, t) {
|
|
|
908
919
|
unit: s
|
|
909
920
|
};
|
|
910
921
|
}
|
|
911
|
-
let
|
|
912
|
-
return e < 1e8 ? (
|
|
913
|
-
str:
|
|
914
|
-
number:
|
|
922
|
+
let c;
|
|
923
|
+
return e < 1e8 ? (c = _(f, e / 1e4), {
|
|
924
|
+
str: c + s,
|
|
925
|
+
number: c,
|
|
915
926
|
unit: s
|
|
916
|
-
}) : (
|
|
917
|
-
str:
|
|
918
|
-
number:
|
|
927
|
+
}) : (c = _(f, e / 1e8), {
|
|
928
|
+
str: c + s,
|
|
929
|
+
number: c,
|
|
919
930
|
unit: s
|
|
920
931
|
});
|
|
921
932
|
}
|
|
922
|
-
function
|
|
933
|
+
function dt(e, t) {
|
|
923
934
|
let n = 0;
|
|
924
|
-
const r =
|
|
935
|
+
const r = w(t.removeAfter) ? t.removeAfter : !0, i = t.id || "hiddenElement", o = {
|
|
925
936
|
opacity: 0,
|
|
926
937
|
visibility: "hidden",
|
|
927
938
|
position: "fixed",
|
|
@@ -929,125 +940,126 @@ function at(e, t) {
|
|
|
929
940
|
top: 0,
|
|
930
941
|
left: 0
|
|
931
942
|
};
|
|
932
|
-
let
|
|
933
|
-
if (!
|
|
934
|
-
const
|
|
935
|
-
|
|
943
|
+
let f = document.querySelector(`#${i}`);
|
|
944
|
+
if (!f) {
|
|
945
|
+
const c = document.createElement("div");
|
|
946
|
+
c.id = i, document.body.appendChild(c), f = document.querySelector(`#${i}`);
|
|
936
947
|
}
|
|
937
|
-
Object.assign(
|
|
948
|
+
Object.assign(f.style, o);
|
|
938
949
|
const s = document.createElement(t.createName || "span");
|
|
939
|
-
return s.innerHTML = e, (t.cssObject || p(t.cssObject)) && Object.assign(s.style, t.cssObject),
|
|
950
|
+
return s.innerHTML = e, (t.cssObject || p(t.cssObject)) && Object.assign(s.style, t.cssObject), f.append(s), n = s.getBoundingClientRect()[t.type || "width"], r && f.removeChild(s), n;
|
|
940
951
|
}
|
|
941
|
-
function
|
|
952
|
+
function pt(e) {
|
|
942
953
|
e = d(e) && !Number.isNaN(e) ? e : 0;
|
|
943
954
|
const t = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], n = ["", "十", "百", "千", "万"];
|
|
944
955
|
e = Number.parseInt(`${e}`);
|
|
945
|
-
const r = (
|
|
946
|
-
const s =
|
|
947
|
-
let
|
|
956
|
+
const r = (f) => {
|
|
957
|
+
const s = f.toString().split("").reverse();
|
|
958
|
+
let c = "";
|
|
948
959
|
for (let u = 0; u < s.length; u++)
|
|
949
|
-
|
|
950
|
-
return
|
|
960
|
+
c = (u === 0 && s[u] === "0" || u > 0 && s[u] === "0" && s[u - 1] === "0" ? "" : (e < 20 && u > 0 ? "" : t[s[u]]) + (s[u] === "0" ? n[0] : n[u])) + c;
|
|
961
|
+
return c;
|
|
951
962
|
}, i = Math.floor(e / 1e4);
|
|
952
963
|
let o = e % 1e4;
|
|
953
964
|
return o.toString().length < 4 && (o = "0" + o), i ? r(i) + "万" + r(o) : r(e);
|
|
954
965
|
}
|
|
955
|
-
function
|
|
966
|
+
function ht(e, t) {
|
|
956
967
|
Object.keys(e).forEach((n) => {
|
|
957
968
|
t(n, e[n]);
|
|
958
969
|
});
|
|
959
970
|
}
|
|
960
971
|
export {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
972
|
+
Ae as Base64,
|
|
973
|
+
Ye as arrayRepeat,
|
|
974
|
+
Je as arraySlice,
|
|
975
|
+
it as blobToDataURL,
|
|
976
|
+
x as checkFileType,
|
|
966
977
|
G as classNames,
|
|
967
978
|
O as cloneDeep,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
979
|
+
ue as compareArray,
|
|
980
|
+
Ze as compareArraySort,
|
|
981
|
+
Xe as compareArrayTimeSort,
|
|
982
|
+
le as compareTime,
|
|
983
|
+
lt as convertValueBoolean,
|
|
973
984
|
g as copyProperties,
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
985
|
+
nt as dataURLtoBlob,
|
|
986
|
+
rt as dataURLtoFile,
|
|
987
|
+
be as deepCopy,
|
|
988
|
+
A as deepMerge,
|
|
989
|
+
S as fileTypes,
|
|
990
|
+
T as filterEmpty,
|
|
991
|
+
he as filterTree,
|
|
992
|
+
ye as findSourceByTree,
|
|
993
|
+
Ke as findValueAndAncestors,
|
|
994
|
+
ht as forInObject,
|
|
995
|
+
Qe as formatDuration,
|
|
996
|
+
_ as formatNumber,
|
|
997
|
+
Ve as genColumnKey,
|
|
998
|
+
$ as generateVideoPicture,
|
|
999
|
+
je as getArrayLast,
|
|
1000
|
+
tt as getBase64,
|
|
1001
|
+
et as getBlobUrl,
|
|
1002
|
+
U as getFileSuffix,
|
|
1003
|
+
pe as getLevelData,
|
|
1004
|
+
de as getMaxFloor,
|
|
1005
|
+
me as getMediaInfos,
|
|
1006
|
+
_e as getPrefixCls,
|
|
1007
|
+
ae as getRandomNumber,
|
|
997
1008
|
K as getScroll,
|
|
998
|
-
|
|
999
|
-
|
|
1009
|
+
Oe as getScrollContainer,
|
|
1010
|
+
fe as getSlot,
|
|
1000
1011
|
ce as getSlotVNode,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1012
|
+
Le as getSlotsChildren,
|
|
1013
|
+
Me as getSlotsProps,
|
|
1014
|
+
qe as getSortIndex,
|
|
1004
1015
|
ee as getSymbols,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1016
|
+
dt as getTextWidth,
|
|
1017
|
+
W as getValueFromObjectByKey,
|
|
1018
|
+
ot as getVideoCoverPicture,
|
|
1019
|
+
ge as getVideoFileUrl,
|
|
1020
|
+
He as handleCurrentPage,
|
|
1021
|
+
Ge as handleEmptyField,
|
|
1022
|
+
We as handleShowIndex,
|
|
1012
1023
|
Z as is,
|
|
1013
1024
|
a as isArray,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
+
N as isBase64,
|
|
1026
|
+
w as isBoolean,
|
|
1027
|
+
Re as isBrowser,
|
|
1028
|
+
st as isDataURLBase64,
|
|
1029
|
+
I as isDeepEqualReact,
|
|
1030
|
+
se as isEmptyElement,
|
|
1031
|
+
xe as isFunction,
|
|
1032
|
+
Te as isImg,
|
|
1033
|
+
Ce as isInContainer,
|
|
1034
|
+
Se as isJSONStr,
|
|
1035
|
+
ve as isMobile,
|
|
1025
1036
|
ie as isNil,
|
|
1026
|
-
|
|
1037
|
+
$e as isNotNil,
|
|
1027
1038
|
d as isNumber,
|
|
1028
1039
|
p as isObject,
|
|
1029
|
-
|
|
1040
|
+
F as isPlainObject,
|
|
1030
1041
|
te as isPrimitive,
|
|
1031
1042
|
k as isScroll,
|
|
1032
|
-
|
|
1043
|
+
v as isServer,
|
|
1033
1044
|
X as isString,
|
|
1034
1045
|
Y as isTablet,
|
|
1035
1046
|
ne as isTypedArray,
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
De as
|
|
1047
|
+
Ue as isUrl,
|
|
1048
|
+
oe as isValid,
|
|
1049
|
+
ut as isWindowsOs,
|
|
1050
|
+
De as merge,
|
|
1051
|
+
Be as nanoid,
|
|
1040
1052
|
ct as off,
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1053
|
+
Ne as omitBoolean,
|
|
1054
|
+
Pe as omitUndefined,
|
|
1055
|
+
Fe as omitUndefinedAndEmptyArr,
|
|
1056
|
+
ft as on,
|
|
1045
1057
|
R as raf,
|
|
1046
|
-
|
|
1047
|
-
|
|
1058
|
+
ze as runFunction,
|
|
1059
|
+
Ie as scrollTo,
|
|
1048
1060
|
q as slotRender,
|
|
1049
1061
|
Ee as throttleByAnimationFrame,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1062
|
+
pt as toChinesNum,
|
|
1063
|
+
at as toConvertNumberShow,
|
|
1064
|
+
ke as treeData
|
|
1053
1065
|
};
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
`);let n="";for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}_utf8_decode(t){let n="",r=0,i=0,o=0,f=0;for(;r<t.length;)i=t.charCodeAt(r),i<128?(n+=String.fromCharCode(i),r++):i>191&&i<224?(o=t.charCodeAt(r+1),n+=String.fromCharCode((i&31)<<6|o&63),r+=2):(o=t.charCodeAt(r+1),f=t.charCodeAt(r+2),n+=String.fromCharCode((i&15)<<12|(o&63)<<6|f&63),r+=3);return n}encode(t){let n="",r,i,o,f,c,u,s,a=0;for(t=this._utf8_encode(t);a<t.length;)r=t.charCodeAt(a++),i=t.charCodeAt(a++),o=t.charCodeAt(a++),f=r>>2,c=(r&3)<<4|i>>4,u=(i&15)<<2|o>>6,s=o&63,Number.isNaN(i)?u=s=64:Number.isNaN(o)&&(s=64),n=n+this._keyStr.charAt(f)+this._keyStr.charAt(c)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return n}decode(t){let n="",r,i,o,f,c,u,s,a=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");a<t.length;)f=this._keyStr.indexOf(t.charAt(a++)),c=this._keyStr.indexOf(t.charAt(a++)),u=this._keyStr.indexOf(t.charAt(a++)),s=this._keyStr.indexOf(t.charAt(a++)),r=f<<2|c>>4,i=(c&15)<<4|u>>2,o=(u&3)<<6|s,n=n+String.fromCharCode(r),u!==64&&(n=n+String.fromCharCode(i)),s!==64&&(n=n+String.fromCharCode(o));return n=this._utf8_decode(n),n}}function _(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function m(e){return typeof e=="boolean"}function y(e){return typeof e=="number"}function h(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&_(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function ye(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function me(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!z())}function z(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function q(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(W(r))t.push(r);else if(h(r))for(let i=0;i<r.length;i++){const o=q(r[i]);o&&t.push(o)}else if(g(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function N(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const n=Array.isArray(t)?t:t.split(":");let r=e;for(let i=0;i<n.length;i++)if(r&&Object.prototype.hasOwnProperty.call(r,n[i]))r=r[n[i]];else return;return r}const S=typeof window>"u";function pe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const B=function(e,t){if(S||!e||!t)return"";t=pe(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const r=document?.defaultView?.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},x=(e,t)=>S?void 0:(t==null?B(e,"overflow"):t?B(e,"overflow-y"):B(e,"overflow-x")).match(/(scroll|auto|overlay)/),we=(e,t)=>{if(S)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(x(n,t))return n;n=n.parentNode}return n},Se=(e,t)=>{if(S||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return P(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!P(e)&&typeof r!="number"&&(r=(e.ownerDocument||e).documentElement?.[n]),r}let J=e=>setTimeout(e,16),Z=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(J=e=>window.requestAnimationFrame(e),Z=e=>window.cancelAnimationFrame(e));let X=0;const F=new Map;function Y(e){F.delete(e)}function E(e,t=1){X+=1;const n=X;function r(i){if(i===0)Y(n),e();else{const o=J(()=>{r(i-1)});F.set(n,o)}}return r(t),n}E.cancel=e=>{const t=F.get(e);return Y(t),Z(t)};function Ae(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function ve(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),f=H(o,!0),c=Date.now(),u=()=>{const a=Date.now()-c,T=Ae(a>i?i:a,f,e,i);P(o)?o.scrollTo(window.pageXOffset,T):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,a<i?E(u):typeof r=="function"&&r()};o&&E(u)}function Oe(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}function G(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Q(e){return e==null||typeof e!="object"&&typeof e!="function"}function k(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A(e){return p(e)}function p(e,t=new Map){if(Q(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,p(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(p(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(k(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),w(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,w(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),w(n,e,t),n}return e}function w(e,t,n){const r=[...Object.keys(t),...G(t)];for(let i=0;i<r.length;i++){const o=r[i],f=Object.getOwnPropertyDescriptor(e,o);(f==null||f.writable)&&(e[o]=p(t[o],n))}}const Ce=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Te=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Ce;function U(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,f;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!U(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!U(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(f=Object.keys(e),i=f.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=i;o--!==0;){const c=f[o];if(!n?.includes(c)&&!(c==="_owner"&&e.$$typeof)&&!U(e[c],t[c],n,r))return r&&console.log(c),!1}return!0}return e!==e&&t!==t}function Ee(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const K=e=>e==null,Ue=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function D(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Ie=(...e)=>{const t={},n=e.length;let r,i=0;for(;i<n;i+=1)for(r in e[i])Object.prototype.hasOwnProperty.call(e[i],r)&&(typeof t[r]=="object"&&typeof e[i][r]=="object"&&t[r]!==void 0&&t[r]!==null&&!Array.isArray(t[r])&&!Array.isArray(e[i][r])?t[r]={...t[r],...e[i][r]}:t[r]=e[i][r]);return t};function v(e,t,n){const r=m(n?.omitNil)?n?.omitNil:!0,i=m(n?.omitEmpty)?n?.omitEmpty:!0,o=Object.keys(t);for(let f=0;f<o.length;f++){const c=o[f],u=t[c],s=e[c];Array.isArray(u)?Array.isArray(s)?u.length===0&&!i?e[c]=u:e[c]=v(s,u,n):e[c]=v([],u,n):D(u)?D(s)?Object.keys(u).length===0&&!i?e[c]=u:e[c]=v(s,u,n):e[c]=v({},u,n):r?(s===void 0||!K(u))&&(e[c]=u):e[c]=u}return e}let j=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(j+=1).toFixed(0);let t="";const n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},Re=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Ne=e=>{if(e&&e!==!0)return e},Be=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Pe=e=>{const t={};return Object.keys(e||{}).forEach(n=>{Array.isArray(e[n])&&e[n]?.length===0||e[n]!==void 0&&(t[n]=e[n])}),t};function L(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function te(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Fe(e,t){return M(e[t]?.())}function M(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):n?.type===d.Fragment?t.push(...M(n.children)):t.push(n)}),t.filter(n=>!te(n))}function V(e,...t){return typeof e=="function"?e?.(...t):e}function ne(e,t,n="default",r){const i=L(n);if(i){let o;const f=N(t,n);return f===!1?o=!1:f===!0?o=e?.[i]:g(f)&&r?d.isVNode(f)?o=f:o=e?.[i]:o=f||e?.[i],r?d.isVNode(o)?o:V(o):o}}function re(e,t,n="default",r){const i=L(n);if(i){let o;const f=N(t,n);return f===!1?o=!1:f===!0?o=e?.[i]?.(r):g(f)?d.isVNode(f)?o=f:o=e?.[i]?.(r):o=f||e?.[i]?.(r),d.isVNode(o)?o:V(o,r)}}function De(e,t,n,r){const i={};return e.forEach(o=>{const f=L(o);if(f){const c=r?.render?re(t,n,o,r?.params):ne(t,n,o);(m(c)||c)&&(i[f]=c)}}),i}const O={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]};function Le(e){return e!=null}const Me=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Ve=(e,t)=>e?h(e)?e.join("-"):e.toString():`${t||0}`;function be(e,{align:t,showIndex:n}){const r=A(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ce().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function $e(e,...t){return typeof e=="function"?e(...t):e}function _e(e){return JSON.parse(JSON.stringify(e))}function We(e,t){if(g(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function ze(e=[],t,n="children"){function r(i,o){return o.map((f,c)=>{const u=`${i}-${c+1}`;return f[n]&&(f[n]=r(u,f[n])),f.sortIndex=u,f})}return A(e).map((i,o)=>{const f=g(t)&&t.current||1,c=g(t)&&t.pageSize||10,u=`${(f-1)*c+(o+1)}`;return i[n]&&(i[n]=r(`${u}`,i[n])),i.sortIndex=u,i})}function qe(e,t){return h(e)?e?.filter((n,r)=>{if(y(t))return r<=t-1;if(h(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(h(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function ie(e,t,n,r=0){const i=y(r)&&(r===0||r===1)?r:0,o=e[n],f=t[n];let c=0;return o<f?c=i===0?-1:0:o>f&&(c=i===0?0:-1),c}function oe(e,t,n,r=0){const i=y(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),f=new Date(t[n]);let c=0;return o<f?c=i===0?-1:0:o>f&&(c=i===0?0:-1),c}function xe(e,t,n=0){return e.sort((r,i)=>ie(r,i,t,n))}function He(e,t,n=0){return e.sort((r,i)=>oe(r,i,t,n))}function Je(e){let t=A(e);const n=new Set(t);return t=Array.from(n),t}function Ze(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function Xe(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ce(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let f,c;if(t)for(f=0;f<t;f+=1)i[f]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",f=0;f<36;f+=1)i[f]||(c=Math.random()*16,i[f]=r[f===19?c&&3||8:c]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(r<=2&&(r=33554432+Math.random()*16777216||0),i=r&&15,r=r>4,n[o]=t[o===19?i&&3||8:i]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function fe(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=t||"children";return Math.max(...e.map(r=>{const i=r[n];return 1+(i?fe(i,n):0)}))}function le(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),h(r[t])&&r[t].length>0&&(n=n.concat(le(r[t],t)))}),n}function Ye(e,t){if(!e||!h(e)||e?.length===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",emptyChildren:o=!0}=t||{},f=t?.rootId??0,c=A(e);return c.map(u=>(!o&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const s=c.filter(a=>u[n]===a[r]);return s.length>0?u[i]=s:o&&(u[i]=[]),f===!1?!0:u[r]===f})}function ue(e,t){return e.map(n=>{const r={...n};return r.children&&(r.children=ue(r.children,t)),t(r)||r.children&&r.children.length>0?r:null}).filter(Boolean)}function Ge(e,t,n){const{value:r,children:i}=n||{value:"value",children:"children"};let o=[];function f(c,u){if(c[r]===t)return o=[...u,c[r]],!0;if(c[i]){for(const s of c[i])if(f(s,[...u,c[r]]))return!0}return!1}for(const c of e)if(f(c,[]))break;return o}function Qe(e){return e&&h(e)?e[e.length-1]:null}function se(e,t,n){const r=n?.value||"id",i=n?.children||"children";for(const o of e){if(o[r]===t)return o;const f=o[i];if(f){const c=se(f,t,n);if(c)return c}}}function ke(e){return URL.createObjectURL(e)}function Ke(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function je(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function et(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const f=new Uint8Array(o);for(;o--;)f[o]=i.charCodeAt(o);return new File([f],t,{type:r})}function tt(e,t,n){return new window.File([e],t,{type:n})}function ae(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function I(e){if(!e||typeof e!="string")return"";const t=ae(e),n=t.lastIndexOf(".");return n>0&&`${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1]||""}function C(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return R(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=I(e).toLowerCase(),O.imageType.includes(n)?"1":O.videoType.includes(n)?"3":O.audioType.includes(n)?"2":"4"}function de(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):R(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(f=>{let c;if(n==="4"){f(i);return}n==="1"?(c=document.createElement("img"),c.src=r):n==="2"?(c=document.createElement("audio"),c.src=r):n==="3"&&(c=document.createElement("video"),c.src=r),n==="1"?c.onload=function(){o(),i.play=!0,i.width=c.width||0,i.height=c.height||0,f(i),c=null}:c.oncanplay=function(){o(),i.play=!0,i.width=c?.videoWidth||0,i.height=c?.videoHeight||0,i.duration=c?.duration||0,f(i),c=null},c.onerror=function(){o(),f(i),c=null}})}async function nt(e){const{url:t="",currentTime:n,videoSuffix:r="",videoAllowPlay:i=!1}=e;let o="",f=r,c="1",u;return t instanceof File?(o=URL.createObjectURL(t),f=I(t.name),c=C(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),c=C(t)):R(t)?(o=t,c=C(t)):(t.includes("https")||t.includes("http"))&&(o=t,f=I(t),c=C(t)),(f?O.videoAllowType.includes(f.toLowerCase()):!1)?i?b(o,n):(u=await de({url:o,fileType:c}),u.play?b(o,n):new Promise(a=>{a("")})):new Promise(a=>{a("")})}async function b(e,t=0){return new Promise(n=>{let r=document.createElement("video");r&&(r.controls=!0,r.muted=!0,r.setAttribute("src",e),r.setAttribute("muted",String(!0)),r.setAttribute("crossorigin","anonymous"),r.setAttribute("autoplay",String(!0)),r.addEventListener("loadeddata",async()=>{let i;for(r?.addEventListener("seeked",async()=>{i&&i()});t<(r?.duration||0);){r&&(r.currentTime=t),await new Promise(T=>i=T);const o=document.createElement("canvas"),f=.8,c=o.getContext("2d"),u=r?.videoWidth||0*f,s=r?.videoHeight||0*f,a=0;o.width=r?.videoWidth||0*f,o.height=r?.videoHeight||0*f,r&&c.drawImage(r,0,0,u+a,s+a),r=null,n(u===0||s===0?"":o.toDataURL("image/png",1))}}))})}function R(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function rt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function it(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function ot(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function ct(){return/windows|win32/i.test(navigator.userAgent)}function ft(e){return m(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[f,c]=o.split(".");if(/^0*$/.test(c))return f}return o}return t.toString()}function lt(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=y(i)?i:1e4,f=y(r)?r:2,c=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!y(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(f===0){const s=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${s}${c}`,number:s,unit:c}}let u;return e<1e8?(u=$(f,e/1e4),{str:u+c,number:u,unit:c}):(u=$(f,e/1e8),{str:u+c,number:u,unit:c})}function ut(e,t){let n=0;const r=m(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",o={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let f=document.querySelector(`#${i}`);if(!f){const u=document.createElement("div");u.id=i,document.body.appendChild(u),f=document.querySelector(`#${i}`)}Object.assign(f.style,o);const c=document.createElement(t.createName||"span");return c.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.assign(c.style,t.cssObject),f.append(c),n=c.getBoundingClientRect()[t.type||"width"],r&&f.removeChild(c),n}function st(e){e=y(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=Number.parseInt(`${e}`);const r=f=>{const c=f.toString().split("").reverse();let u="";for(let s=0;s<c.length;s++)u=(s===0&&c[s]==="0"||s>0&&c[s]==="0"&&c[s-1]==="0"?"":(e<20&&s>0?"":t[c[s]])+(c[s]==="0"?n[0]:n[s]))+u;return u},i=Math.floor(e/1e4);let o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}function at(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}l.Base64=he,l.arrayRepeat=Je,l.arraySlice=qe,l.blobToDataURL=tt,l.checkFileType=C,l.classNames=q,l.cloneDeep=A,l.compareArray=ie,l.compareArraySort=xe,l.compareArrayTimeSort=He,l.compareTime=oe,l.convertValueBoolean=ft,l.copyProperties=w,l.dataURLtoBlob=je,l.dataURLtoFile=et,l.deepCopy=_e,l.deepMerge=v,l.fileTypes=O,l.filterEmpty=M,l.filterTree=ue,l.findSourceByTree=se,l.findValueAndAncestors=Ge,l.forInObject=at,l.formatDuration=Xe,l.formatNumber=$,l.genColumnKey=Ve,l.generateVideoPicture=b,l.getArrayLast=Qe,l.getBase64=Ke,l.getBlobUrl=ke,l.getFileSuffix=I,l.getLevelData=le,l.getMaxFloor=fe,l.getMediaInfos=de,l.getPrefixCls=Me,l.getRandomNumber=ce,l.getScroll=H,l.getScrollContainer=we,l.getSlot=ne,l.getSlotVNode=re,l.getSlotsChildren=Fe,l.getSlotsProps=De,l.getSortIndex=ze,l.getSymbols=G,l.getTextWidth=ut,l.getValueFromObjectByKey=N,l.getVideoCoverPicture=nt,l.getVideoFileUrl=ae,l.handleCurrentPage=We,l.handleEmptyField=Ze,l.handleShowIndex=be,l.is=_,l.isArray=h,l.isBase64=R,l.isBoolean=m,l.isBrowser=Te,l.isDataURLBase64=rt,l.isDeepEqualReact=U,l.isEmptyElement=te,l.isFunction=ye,l.isImg=Ee,l.isInContainer=Se,l.isJSONStr=ge,l.isMobile=me,l.isNil=K,l.isNotNil=Le,l.isNumber=y,l.isObject=g,l.isPlainObject=D,l.isPrimitive=Q,l.isScroll=x,l.isServer=S,l.isString=W,l.isTablet=z,l.isTypedArray=k,l.isUrl=Ue,l.isWindowsOs=ct,l.merge=Ie,l.nanoid=Re,l.off=ot,l.omitBoolean=Ne,l.omitUndefined=Be,l.omitUndefinedAndEmptyArr=Pe,l.on=it,l.raf=E,l.runFunction=$e,l.scrollTo=ve,l.slotRender=V,l.throttleByAnimationFrame=Oe,l.toChinesNum=st,l.toConvertNumberShow=lt,l.treeData=Ye,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
/*!
|
|
2
|
+
* Gx Design Pro
|
|
3
|
+
* Version: 0.2.0-beta.67
|
|
4
|
+
* Author: gx12358
|
|
5
|
+
* Copyright (C) 2024 gx12358
|
|
6
|
+
* License: MIT License
|
|
7
|
+
* Description: Gx Design Pro Utils
|
|
8
|
+
* Date Created: 2025-08-14
|
|
9
|
+
* Homepage:
|
|
10
|
+
* Contact: gx12358@gmail.com
|
|
11
|
+
*/
|
|
12
|
+
(function(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l.GPorUtils={},l.vue))})(this,(function(l,d){"use strict";class ge{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}_utf8_encode(t){t=t.replace(/\r\n/g,`
|
|
13
|
+
`);let n="";for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}_utf8_decode(t){let n="",r=0,i=0,o=0,c=0;for(;r<t.length;)i=t.charCodeAt(r),i<128?(n+=String.fromCharCode(i),r++):i>191&&i<224?(o=t.charCodeAt(r+1),n+=String.fromCharCode((i&31)<<6|o&63),r+=2):(o=t.charCodeAt(r+1),c=t.charCodeAt(r+2),n+=String.fromCharCode((i&15)<<12|(o&63)<<6|c&63),r+=3);return n}encode(t){let n="",r,i,o,c,f,u,s,a=0;for(t=this._utf8_encode(t);a<t.length;)r=t.charCodeAt(a++),i=t.charCodeAt(a++),o=t.charCodeAt(a++),c=r>>2,f=(r&3)<<4|i>>4,u=(i&15)<<2|o>>6,s=o&63,Number.isNaN(i)?u=s=64:Number.isNaN(o)&&(s=64),n=n+this._keyStr.charAt(c)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return n}decode(t){let n="",r,i,o,c,f,u,s,a=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");a<t.length;)c=this._keyStr.indexOf(t.charAt(a++)),f=this._keyStr.indexOf(t.charAt(a++)),u=this._keyStr.indexOf(t.charAt(a++)),s=this._keyStr.indexOf(t.charAt(a++)),r=c<<2|f>>4,i=(f&15)<<4|u>>2,o=(u&3)<<6|s,n=n+String.fromCharCode(r),u!==64&&(n=n+String.fromCharCode(i)),s!==64&&(n=n+String.fromCharCode(o));return n=this._utf8_decode(n),n}}function _(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function m(e){return typeof e=="boolean"}function g(e){return typeof e=="number"}function y(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function h(e){return e!==null&&_(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function he(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function me(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function pe(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!z())}function z(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function q(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(W(r))t.push(r);else if(y(r))for(let i=0;i<r.length;i++){const o=q(r[i]);o&&t.push(o)}else if(h(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function B(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const n=Array.isArray(t)?t:t.split(":");let r=e;for(let i=0;i<n.length;i++)if(r&&Object.prototype.hasOwnProperty.call(r,n[i]))r=r[n[i]];else return;return r}const A=typeof window>"u";function we(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const P=function(e,t){if(A||!e||!t)return"";t=we(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const r=document?.defaultView?.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},x=(e,t)=>A?void 0:(t==null?P(e,"overflow"):t?P(e,"overflow-y"):P(e,"overflow-x")).match(/(scroll|auto|overlay)/),Ae=(e,t)=>{if(A)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(x(n,t))return n;n=n.parentNode}return n},Se=(e,t)=>{if(A||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function F(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return F(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!F(e)&&typeof r!="number"&&(r=(e.ownerDocument||e).documentElement?.[n]),r}let J=e=>setTimeout(e,16),Z=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(J=e=>window.requestAnimationFrame(e),Z=e=>window.cancelAnimationFrame(e));let X=0;const D=new Map;function G(e){D.delete(e)}function U(e,t=1){X+=1;const n=X;function r(i){if(i===0)G(n),e();else{const o=J(()=>{r(i-1)});D.set(n,o)}}return r(t),n}U.cancel=e=>{const t=D.get(e);return G(t),Z(t)};function ve(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Oe(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),c=H(o,!0),f=Date.now(),u=()=>{const a=Date.now()-f,T=ve(a>i?i:a,c,e,i);F(o)?o.scrollTo(window.pageXOffset,T):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,a<i?U(u):typeof r=="function"&&r()};o&&U(u)}function Ce(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}function Y(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Q(e){return e==null||typeof e!="object"&&typeof e!="function"}function k(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function S(e){return p(e)}function p(e,t=new Map){if(Q(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,p(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(p(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(k(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),w(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,w(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),w(n,e,t),n}return e}function w(e,t,n){const r=[...Object.keys(t),...Y(t)];for(let i=0;i<r.length;i++){const o=r[i],c=Object.getOwnPropertyDescriptor(e,o);(c==null||c.writable)&&(e[o]=p(t[o],n))}}const Te=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ue=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Te;function I(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,c;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!I(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!I(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(c=Object.keys(e),i=c.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[o]))return!1;for(o=i;o--!==0;){const f=c[o];if(!n?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!I(e[f],t[f],n,r))return r&&console.log(f),!1}return!0}return e!==e&&t!==t}function Ie(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const K=e=>e==null,Re=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function L(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Ee=(...e)=>{const t={},n=e.length;let r,i=0;for(;i<n;i+=1)for(r in e[i])Object.prototype.hasOwnProperty.call(e[i],r)&&(typeof t[r]=="object"&&typeof e[i][r]=="object"&&t[r]!==void 0&&t[r]!==null&&!Array.isArray(t[r])&&!Array.isArray(e[i][r])?t[r]={...t[r],...e[i][r]}:t[r]=e[i][r]);return t};function v(e,t,n){const r=m(n?.omitNil)?n?.omitNil:!0,i=m(n?.omitEmpty)?n?.omitEmpty:!0,o=Object.keys(t);for(let c=0;c<o.length;c++){const f=o[c],u=t[f],s=e[f];Array.isArray(u)?Array.isArray(s)?u.length===0&&!i?e[f]=u:e[f]=v(s,u,n):e[f]=v([],u,n):L(u)?L(s)?Object.keys(u).length===0&&!i?e[f]=u:e[f]=v(s,u,n):e[f]=v({},u,n):r?(s===void 0||!K(u))&&(e[f]=u):e[f]=u}return e}let j=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(j+=1).toFixed(0);let t="";const n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},Ne=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Be=e=>{if(e&&e!==!0)return e},Pe=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Fe=e=>{const t={};return Object.keys(e||{}).forEach(n=>{Array.isArray(e[n])&&e[n]?.length===0||e[n]!==void 0&&(t[n]=e[n])}),t},te=e=>e!=null&&e!=="";function V(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function ne(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function De(e,t){return R(e[t]?.())}function R(e=[],t=!0){const n=Array.isArray(e)?e:[e],r=[];return n.forEach(i=>{Array.isArray(i)?r.push(...R(i,t)):i?.type===d.Fragment||i?.type==="template"?r.push(...R(i.children,t)):i&&d.isVNode(i)?t&&!ne(i)?r.push(i):t||r.push(i):te(i)&&r.push(i)}),r}function M(e,...t){return typeof e=="function"?e?.(...t):e}function re(e,t,n="default",r){const i=V(n);if(i){let o;const c=B(t,n);return c===!1?o=!1:c===!0?o=e?.[i]:h(c)&&r?d.isVNode(c)?o=c:o=e?.[i]:o=c||e?.[i],r?d.isVNode(o)?o:M(o):o}}function ie(e,t,n="default",r){const i=V(n);if(i){let o;const c=B(t,n);return c===!1?o=!1:c===!0?o=e?.[i]?.(r):h(c)?d.isVNode(c)?o=c:o=e?.[i]?.(r):o=c||e?.[i]?.(r),d.isVNode(o)?o:M(o,r)}}function Le(e,t,n,r){const i={};return e.forEach(o=>{const c=V(o);if(c){const f=r?.render?ie(t,n,o,r?.params):re(t,n,o);(m(f)||f)&&(i[c]=f)}}),i}const O={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]};function Ve(e){return e!=null}const Me=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},be=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function $e(e,{align:t,showIndex:n}){const r=S(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ce().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function _e(e,...t){return typeof e=="function"?e(...t):e}function We(e){return JSON.parse(JSON.stringify(e))}function ze(e,t){if(h(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function qe(e=[],t,n="children"){function r(i,o){return o.map((c,f)=>{const u=`${i}-${f+1}`;return c[n]&&(c[n]=r(u,c[n])),c.sortIndex=u,c})}return S(e).map((i,o)=>{const c=h(t)&&t.current||1,f=h(t)&&t.pageSize||10,u=`${(c-1)*f+(o+1)}`;return i[n]&&(i[n]=r(`${u}`,i[n])),i.sortIndex=u,i})}function xe(e,t){return y(e)?e?.filter((n,r)=>{if(g(t))return r<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function oe(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,o=e[n],c=t[n];let f=0;return o<c?f=i===0?-1:0:o>c&&(f=i===0?0:-1),f}function fe(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),c=new Date(t[n]);let f=0;return o<c?f=i===0?-1:0:o>c&&(f=i===0?0:-1),f}function He(e,t,n=0){return e.sort((r,i)=>oe(r,i,t,n))}function Je(e,t,n=0){return e.sort((r,i)=>fe(r,i,t,n))}function Ze(e){let t=S(e);const n=new Set(t);return t=Array.from(n),t}function Xe(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function Ge(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ce(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let c,f;if(t)for(c=0;c<t;c+=1)i[c]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",c=0;c<36;c+=1)i[c]||(f=Math.random()*16,i[c]=r[c===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(r<=2&&(r=33554432+Math.random()*16777216||0),i=r&&15,r=r>4,n[o]=t[o===19?i&&3||8:i]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function le(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=t||"children";return Math.max(...e.map(r=>{const i=r[n];return 1+(i?le(i,n):0)}))}function ue(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),y(r[t])&&r[t].length>0&&(n=n.concat(ue(r[t],t)))}),n}function Ye(e,t){if(!e||!y(e)||e?.length===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",emptyChildren:o=!0}=t||{},c=t?.rootId??0,f=S(e);return f.map(u=>(!o&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const s=f.filter(a=>u[n]===a[r]);return s.length>0?u[i]=s:o&&(u[i]=[]),c===!1?!0:u[r]===c})}function se(e,t){return e.map(n=>{const r={...n};return r.children&&(r.children=se(r.children,t)),t(r)||r.children&&r.children.length>0?r:null}).filter(Boolean)}function Qe(e,t,n){const{value:r,children:i}=n||{value:"value",children:"children"};let o=[];function c(f,u){if(f[r]===t)return o=[...u,f[r]],!0;if(f[i]){for(const s of f[i])if(c(s,[...u,f[r]]))return!0}return!1}for(const f of e)if(c(f,[]))break;return o}function ke(e){return e&&y(e)?e[e.length-1]:null}function ae(e,t,n){const r=n?.value||"id",i=n?.children||"children";for(const o of e){if(o[r]===t)return o;const c=o[i];if(c){const f=ae(c,t,n);if(f)return f}}}function Ke(e){return URL.createObjectURL(e)}function je(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function et(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function tt(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const c=new Uint8Array(o);for(;o--;)c[o]=i.charCodeAt(o);return new File([c],t,{type:r})}function nt(e,t,n){return new window.File([e],t,{type:n})}function de(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function E(e){if(!e||typeof e!="string")return"";const t=de(e),n=t.lastIndexOf(".");return n>0&&`${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1]||""}function C(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return N(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=E(e).toLowerCase(),O.imageType.includes(n)?"1":O.videoType.includes(n)?"3":O.audioType.includes(n)?"2":"4"}function ye(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):N(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(c=>{let f;if(n==="4"){c(i);return}n==="1"?(f=document.createElement("img"),f.src=r):n==="2"?(f=document.createElement("audio"),f.src=r):n==="3"&&(f=document.createElement("video"),f.src=r),n==="1"?f.onload=function(){o(),i.play=!0,i.width=f.width||0,i.height=f.height||0,c(i),f=null}:f.oncanplay=function(){o(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,c(i),f=null},f.onerror=function(){o(),c(i),f=null}})}async function rt(e){const{url:t="",currentTime:n,videoSuffix:r="",videoAllowPlay:i=!1}=e;let o="",c=r,f="1",u;return t instanceof File?(o=URL.createObjectURL(t),c=E(t.name),f=C(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),f=C(t)):N(t)?(o=t,f=C(t)):(t.includes("https")||t.includes("http"))&&(o=t,c=E(t),f=C(t)),(c?O.videoAllowType.includes(c.toLowerCase()):!1)?i?b(o,n):(u=await ye({url:o,fileType:f}),u.play?b(o,n):new Promise(a=>{a("")})):new Promise(a=>{a("")})}async function b(e,t=0){return new Promise(n=>{let r=document.createElement("video");r&&(r.controls=!0,r.muted=!0,r.setAttribute("src",e),r.setAttribute("muted",String(!0)),r.setAttribute("crossorigin","anonymous"),r.setAttribute("autoplay",String(!0)),r.addEventListener("loadeddata",async()=>{let i;for(r?.addEventListener("seeked",async()=>{i&&i()});t<(r?.duration||0);){r&&(r.currentTime=t),await new Promise(T=>i=T);const o=document.createElement("canvas"),c=.8,f=o.getContext("2d"),u=r?.videoWidth||0*c,s=r?.videoHeight||0*c,a=0;o.width=r?.videoWidth||0*c,o.height=r?.videoHeight||0*c,r&&f.drawImage(r,0,0,u+a,s+a),r=null,n(u===0||s===0?"":o.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function it(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function ot(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function ft(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function ct(){return/windows|win32/i.test(navigator.userAgent)}function lt(e){return m(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[c,f]=o.split(".");if(/^0*$/.test(f))return c}return o}return t.toString()}function ut(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=g(i)?i:1e4,c=g(r)?r:2,f=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!g(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(c===0){const s=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${s}${f}`,number:s,unit:f}}let u;return e<1e8?(u=$(c,e/1e4),{str:u+f,number:u,unit:f}):(u=$(c,e/1e8),{str:u+f,number:u,unit:f})}function st(e,t){let n=0;const r=m(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",o={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let c=document.querySelector(`#${i}`);if(!c){const u=document.createElement("div");u.id=i,document.body.appendChild(u),c=document.querySelector(`#${i}`)}Object.assign(c.style,o);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||h(t.cssObject))&&Object.assign(f.style,t.cssObject),c.append(f),n=f.getBoundingClientRect()[t.type||"width"],r&&c.removeChild(f),n}function at(e){e=g(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=Number.parseInt(`${e}`);const r=c=>{const f=c.toString().split("").reverse();let u="";for(let s=0;s<f.length;s++)u=(s===0&&f[s]==="0"||s>0&&f[s]==="0"&&f[s-1]==="0"?"":(e<20&&s>0?"":t[f[s]])+(f[s]==="0"?n[0]:n[s]))+u;return u},i=Math.floor(e/1e4);let o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}function dt(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}l.Base64=ge,l.arrayRepeat=Ze,l.arraySlice=xe,l.blobToDataURL=nt,l.checkFileType=C,l.classNames=q,l.cloneDeep=S,l.compareArray=oe,l.compareArraySort=He,l.compareArrayTimeSort=Je,l.compareTime=fe,l.convertValueBoolean=lt,l.copyProperties=w,l.dataURLtoBlob=et,l.dataURLtoFile=tt,l.deepCopy=We,l.deepMerge=v,l.fileTypes=O,l.filterEmpty=R,l.filterTree=se,l.findSourceByTree=ae,l.findValueAndAncestors=Qe,l.forInObject=dt,l.formatDuration=Ge,l.formatNumber=$,l.genColumnKey=be,l.generateVideoPicture=b,l.getArrayLast=ke,l.getBase64=je,l.getBlobUrl=Ke,l.getFileSuffix=E,l.getLevelData=ue,l.getMaxFloor=le,l.getMediaInfos=ye,l.getPrefixCls=Me,l.getRandomNumber=ce,l.getScroll=H,l.getScrollContainer=Ae,l.getSlot=re,l.getSlotVNode=ie,l.getSlotsChildren=De,l.getSlotsProps=Le,l.getSortIndex=qe,l.getSymbols=Y,l.getTextWidth=st,l.getValueFromObjectByKey=B,l.getVideoCoverPicture=rt,l.getVideoFileUrl=de,l.handleCurrentPage=ze,l.handleEmptyField=Xe,l.handleShowIndex=$e,l.is=_,l.isArray=y,l.isBase64=N,l.isBoolean=m,l.isBrowser=Ue,l.isDataURLBase64=it,l.isDeepEqualReact=I,l.isEmptyElement=ne,l.isFunction=he,l.isImg=Ie,l.isInContainer=Se,l.isJSONStr=me,l.isMobile=pe,l.isNil=K,l.isNotNil=Ve,l.isNumber=g,l.isObject=h,l.isPlainObject=L,l.isPrimitive=Q,l.isScroll=x,l.isServer=A,l.isString=W,l.isTablet=z,l.isTypedArray=k,l.isUrl=Re,l.isValid=te,l.isWindowsOs=ct,l.merge=Ee,l.nanoid=Ne,l.off=ft,l.omitBoolean=Be,l.omitUndefined=Pe,l.omitUndefinedAndEmptyArr=Fe,l.on=ot,l.raf=U,l.runFunction=_e,l.scrollTo=Oe,l.slotRender=M,l.throttleByAnimationFrame=Ce,l.toChinesNum=at,l.toConvertNumberShow=ut,l.treeData=Ye,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/slots/index.d.ts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { VNode } from 'vue';
|
|
1
|
+
import type { VNode } from 'vue';
|
|
3
2
|
export declare function isEmptyElement(c: any): any;
|
|
4
3
|
export declare function getSlotsChildren<T extends Readonly<Record<string, any>>>(slots: T, key: keyof T): VNode[];
|
|
5
|
-
export declare function filterEmpty(children?:
|
|
4
|
+
export declare function filterEmpty(children?: any[], isEmpty?: boolean): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
5
|
[key: string]: any;
|
|
7
6
|
}>[];
|
|
8
|
-
export declare function slotRender(slot:
|
|
7
|
+
export declare function slotRender(slot: Record<string, any>, ...arg: any): any;
|
|
9
8
|
/**
|
|
10
9
|
* @Author gx12358
|
|
11
10
|
* @DateTime 2024/2/2
|
|
12
11
|
* @lastTime 2024/2/2
|
|
13
|
-
* @description () => CustomRender
|
|
12
|
+
* @description Function () => CustomRender
|
|
14
13
|
*/
|
|
15
|
-
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys
|
|
16
|
-
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys: string | string[], render?: true): VNode;
|
|
14
|
+
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys?: string | string[], render?: boolean): T extends undefined ? any : T;
|
|
17
15
|
/**
|
|
18
16
|
* @Author gx12358
|
|
19
17
|
* @DateTime 2024/2/2
|
|
20
18
|
* @lastTime 2024/2/2
|
|
21
|
-
* @description
|
|
19
|
+
* @description VNode
|
|
22
20
|
*/
|
|
23
|
-
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys
|
|
21
|
+
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys?: string | string[], options?: any): T extends undefined ? any : T;
|
|
24
22
|
/**
|
|
25
23
|
* @Author gx12358
|
|
26
24
|
* @DateTime 2024/10/13
|
|
@@ -28,10 +26,6 @@ export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<strin
|
|
|
28
26
|
* @description 获取names的slots或者props的VNode
|
|
29
27
|
*/
|
|
30
28
|
export declare function getSlotsProps<T extends string, K = undefined>(names: T[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
31
|
-
render?:
|
|
29
|
+
render?: boolean;
|
|
32
30
|
params?: any;
|
|
33
31
|
}): K extends undefined ? Record<T, any> : K;
|
|
34
|
-
export declare function getSlotsProps<T extends string, K = undefined>(names: T[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
35
|
-
render?: true;
|
|
36
|
-
params?: any;
|
|
37
|
-
}): K extends undefined ? Record<T, WithFalse<VNode | VNode[]>> : K;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from 'vue';
|
|
2
2
|
import type { AlignType, BasicTablePageConfig, MaterialOptions, RecordType } from '../typings';
|
|
3
|
+
import isValid from './isValid';
|
|
3
4
|
export * from './config';
|
|
4
5
|
export * from './getSymbols';
|
|
5
6
|
export * from './isNotNil';
|
|
@@ -7,6 +8,7 @@ export * from './isPlainObject';
|
|
|
7
8
|
export * from './isPrimitive';
|
|
8
9
|
export * from './isTypedArray';
|
|
9
10
|
export * from './validate';
|
|
11
|
+
export { isValid };
|
|
10
12
|
export interface PrefixCls {
|
|
11
13
|
suffixCls?: string;
|
|
12
14
|
customizePrefixCls?: string;
|