@gx-design-vue/pro-utils 0.2.0-beta.5 → 0.2.0-beta.50

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.
@@ -1,558 +0,0 @@
1
- import { isVNode as j } from "vue";
2
- import { cloneDeep as E } from "lodash-es";
3
- const h = typeof window > "u";
4
- process.env.NODE_ENV !== "production" && Object.freeze({});
5
- process.env.NODE_ENV !== "production" && Object.freeze([]);
6
- const F = (e) => {
7
- const t = /* @__PURE__ */ Object.create(null);
8
- return (n) => t[n] || (t[n] = e(n));
9
- }, L = /-(\w)/g, D = F((e) => e.replace(L, (t, n) => n ? n.toUpperCase() : "")), y = function(e, t) {
10
- var n;
11
- if (h || !e || !t)
12
- return "";
13
- t = D(t), t === "float" && (t = "cssFloat");
14
- try {
15
- const r = e.style[t];
16
- if (r)
17
- return r;
18
- const i = (n = document == null ? void 0 : document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
19
- return i ? i[t] : "";
20
- } catch {
21
- return e.style[t];
22
- }
23
- }, I = (e, t) => h ? void 0 : (t == null ? y(e, "overflow") : t ? y(e, "overflow-y") : y(e, "overflow-x")).match(/(scroll|auto|overlay)/), Y = (e, t) => {
24
- if (h)
25
- return;
26
- let n = e;
27
- for (; n; ) {
28
- if ([window, document, document.documentElement].includes(n))
29
- return window;
30
- if (I(n, t))
31
- return n;
32
- n = n.parentNode;
33
- }
34
- return n;
35
- }, G = (e, t) => {
36
- if (h || !e || !t)
37
- return !1;
38
- const n = e.getBoundingClientRect();
39
- let r;
40
- return [window, document, document.documentElement, null, void 0].includes(t) ? r = {
41
- top: 0,
42
- right: window.innerWidth,
43
- bottom: window.innerHeight,
44
- left: 0
45
- } : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
46
- }, U = Object.prototype.toString;
47
- function b(e, t) {
48
- return U.call(e) === `[object ${t}]`;
49
- }
50
- function R(e) {
51
- return b(e, "Boolean");
52
- }
53
- function Q(e) {
54
- return typeof e == "number";
55
- }
56
- function B(e) {
57
- return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
58
- }
59
- function p(e) {
60
- return e !== null && b(e, "Object");
61
- }
62
- function C(e) {
63
- return typeof e == "string" || e instanceof String;
64
- }
65
- function Z(e) {
66
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
67
- }
68
- function P(...e) {
69
- const t = [];
70
- for (let n = 0; n < e.length; n++) {
71
- const r = e[n];
72
- if (r) {
73
- if (C(r))
74
- t.push(r);
75
- else if (B(r))
76
- for (let i = 0; i < r.length; i++) {
77
- const o = P(r[i]);
78
- o && t.push(o);
79
- }
80
- else if (p(r))
81
- for (const i in r)
82
- r[i] && t.push(i);
83
- }
84
- }
85
- return t.filter((n) => n).join(" ");
86
- }
87
- let M = 0;
88
- const s = {};
89
- function g(e, t = 1) {
90
- const n = M++;
91
- let r = t;
92
- function i() {
93
- r -= 1, r <= 0 ? (e(), delete s[n]) : s[n] = requestAnimationFrame(i);
94
- }
95
- return s[n] = requestAnimationFrame(i), n;
96
- }
97
- g.cancel = function(t) {
98
- t !== void 0 && (cancelAnimationFrame(s[t]), delete s[t]);
99
- };
100
- g.ids = s;
101
- function S(e) {
102
- return e != null && e === e.window;
103
- }
104
- function N(e, t) {
105
- var i;
106
- if (typeof window > "u")
107
- return 0;
108
- const n = t ? "scrollTop" : "scrollLeft";
109
- let r = 0;
110
- return S(e) ? r = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? r = e.documentElement[n] : e && (r = e[n]), e && !S(e) && typeof r != "number" && (r = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[n]), r;
111
- }
112
- function $(e, t, n, r) {
113
- const i = n - t;
114
- return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
115
- }
116
- function K(e, t = {}) {
117
- const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), c = N(o, !0), u = Date.now(), f = () => {
118
- const l = Date.now() - u, w = $(l > i ? i : l, c, e, i);
119
- S(o) ? o.scrollTo(window.pageXOffset, w) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = w : o.scrollTop = w, l < i ? g(f) : typeof r == "function" && r();
120
- };
121
- g(f);
122
- }
123
- function ee(e) {
124
- let t;
125
- const n = (i) => () => {
126
- t = null, e(...i);
127
- }, r = (...i) => {
128
- t == null && (t = requestAnimationFrame(n(i)));
129
- };
130
- return r.cancel = () => cancelAnimationFrame(t), r;
131
- }
132
- const m = {
133
- videoAllowType: [
134
- "mp4",
135
- "webm",
136
- "ogg"
137
- ],
138
- audioAllowType: ["mp3"],
139
- imageType: ["bmp", "png", "gif", "jpg", "jpeg", "psd", "tif"],
140
- videoType: [
141
- "mp4",
142
- "swf",
143
- "rmvb",
144
- "avi",
145
- "flv",
146
- "mpg",
147
- "rm",
148
- "mov",
149
- "asf",
150
- "3gp",
151
- "mkv",
152
- "ts",
153
- "f4v",
154
- "webm",
155
- "m4v",
156
- "3g2",
157
- "m3u8"
158
- ],
159
- audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
160
- }, te = (...e) => {
161
- const t = {}, n = e.length;
162
- let r, i = 0;
163
- for (; i < n; i += 1)
164
- for (r in e[i])
165
- e[i].hasOwnProperty(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] = {
166
- ...t[r],
167
- ...e[i][r]
168
- } : t[r] = e[i][r]);
169
- return t;
170
- };
171
- function x(e, t, n, r) {
172
- if (e === t)
173
- return !0;
174
- if (e && t && typeof e == "object" && typeof t == "object") {
175
- if (e.constructor !== t.constructor)
176
- return !1;
177
- let i, o, c;
178
- if (Array.isArray(e)) {
179
- if (i = e.length, i != t.length)
180
- return !1;
181
- for (o = i; o-- !== 0; )
182
- if (!x(e[o], t[o], n, r))
183
- return !1;
184
- return !0;
185
- }
186
- if (e instanceof Map && t instanceof Map) {
187
- if (e.size !== t.size)
188
- return !1;
189
- for (o of e.entries())
190
- if (!t.has(o[0]))
191
- return !1;
192
- for (o of e.entries())
193
- if (!x(o[1], t.get(o[0]), n, r))
194
- return !1;
195
- return !0;
196
- }
197
- if (e instanceof Set && t instanceof Set) {
198
- if (e.size !== t.size)
199
- return !1;
200
- for (o of e.entries())
201
- if (!t.has(o[0]))
202
- return !1;
203
- return !0;
204
- }
205
- if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
206
- if (i = e.length, i != t.length)
207
- return !1;
208
- for (o = i; o-- !== 0; )
209
- if (e[o] !== t[o])
210
- return !1;
211
- return !0;
212
- }
213
- if (e.constructor === RegExp)
214
- return e.source === t.source && e.flags === t.flags;
215
- if (e.valueOf !== Object.prototype.valueOf && e.valueOf)
216
- return e.valueOf() === t.valueOf();
217
- if (e.toString !== Object.prototype.toString && e.toString)
218
- return e.toString() === t.toString();
219
- if (c = Object.keys(e), i = c.length, i !== Object.keys(t).length)
220
- return !1;
221
- for (o = i; o-- !== 0; )
222
- if (!Object.prototype.hasOwnProperty.call(t, c[o]))
223
- return !1;
224
- for (o = i; o-- !== 0; ) {
225
- const u = c[o];
226
- if (!(n != null && n.includes(u)) && !(u === "_owner" && e.$$typeof) && !x(e[u], t[u], n, r))
227
- return r && console.log(u), !1;
228
- }
229
- return !0;
230
- }
231
- return e !== e && t !== t;
232
- }
233
- const V = (
234
- // @ts-ignore
235
- typeof process < "u" && process.versions != null && process.versions.node != null
236
- ), ne = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !V, re = (e) => {
237
- if (e && e !== !0)
238
- return e;
239
- }, ie = (e) => {
240
- const t = {};
241
- if (Object.keys(e || {}).forEach((n) => {
242
- e[n] !== void 0 && (t[n] = e[n]);
243
- }), !(Object.keys(t).length < 1))
244
- return t;
245
- }, z = (e) => e.length === 1 && (String(e[0].type) === String(Symbol("Comment")) || String(e[0].type) === String(Symbol("Fragment")) || String(e[0].type) === String(Symbol()));
246
- function oe(e) {
247
- return z(e) && j(e[0].children) ? e[0].children : e;
248
- }
249
- function ce(e, t, n = "default") {
250
- return t[n] === !1 ? !1 : R(t[n]) && t[n] ? (e == null ? void 0 : e[n]) || t[n] : t[n] || e[n];
251
- }
252
- function H(e, t, n = "default") {
253
- var r, i;
254
- return t[n] === !1 ? !1 : R(t[n]) && t[n] ? ((r = e == null ? void 0 : e[n]) == null ? void 0 : r.call(e)) || t[n] : t[n] || ((i = e[n]) == null ? void 0 : i.call(e));
255
- }
256
- function ue(e, t, n) {
257
- const r = {};
258
- return e.forEach((i) => {
259
- r[i] = H(t, n, i);
260
- }), r;
261
- }
262
- const fe = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
263
- const i = r || (n ? "gx-pro" : "gx");
264
- return t || (e ? `${i}-${e}` : i);
265
- }, le = (e, t) => e ? Array.isArray(e) ? e.join("-") : e.toString() : `${t}`;
266
- function se(e, { align: t, showIndex: n }) {
267
- const r = E(e);
268
- if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
269
- const i = e[0];
270
- r.unshift({
271
- title: "序号",
272
- align: t,
273
- fixed: i.fixed,
274
- width: 60,
275
- uuid: q().uuid(15),
276
- dataIndex: "sortIndex",
277
- key: "sortIndex"
278
- });
279
- } else
280
- r.filter((i) => i.dataIndex !== "sortIndex");
281
- return r;
282
- }
283
- function ae(e, ...t) {
284
- return typeof e == "function" ? e(...t) : e;
285
- }
286
- function T(e) {
287
- return JSON.parse(JSON.stringify(e));
288
- }
289
- function de(e, t) {
290
- if (p(e)) {
291
- const { pageSize: n = 10, total: r = 0 } = e;
292
- let { current: i = 1 } = e;
293
- return r - t <= n * (i - 1) && (i = i - 1), i === 0 ? 1 : i;
294
- }
295
- return 1;
296
- }
297
- function me(e = [], t, n = "children") {
298
- function r(i, o) {
299
- return o.map((c, u) => {
300
- const f = `${i}-${u + 1}`;
301
- return c[n] && (c[n] = r(f, c[n])), c.sortIndex = f, c;
302
- });
303
- }
304
- return T(e).map((i, o) => {
305
- let c = o;
306
- const u = p(t) && t.current || 1, f = p(t) && t.pageSize || 10;
307
- return c = u ? (u - 1) * f + (o + 1) : o + 1, i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
308
- });
309
- }
310
- function pe(e, t, n, r) {
311
- const i = e[n], o = t[n];
312
- let c = 0;
313
- return i < o ? c = r === 0 ? -1 : 0 : i > o && (c = r === 0 ? 0 : -1), c;
314
- }
315
- function ge(e) {
316
- let t = T(e);
317
- const n = new Set(t);
318
- return t = Array.from(n), t;
319
- }
320
- function he(e, t) {
321
- const n = ["null", "undefined"];
322
- let r = !0;
323
- return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
324
- value: e,
325
- success: r
326
- } : {
327
- value: t === "" ? t : t || "-",
328
- success: r
329
- };
330
- }
331
- function we(e) {
332
- let t = "";
333
- if (e > -1) {
334
- const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = parseInt(String(e % 60));
335
- n < 10 ? t = "0" + n + ":" : t = n + ":", r < 10 && (t += "0"), t += r + ":", i < 10 && (t += "0"), t += i;
336
- }
337
- return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
338
- }
339
- function q() {
340
- const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
341
- return {
342
- uuid(t, n) {
343
- const r = e, i = [], o = n || r.length;
344
- let c, u;
345
- if (t)
346
- for (c = 0; c < t; c += 1)
347
- i[c] = r[parseInt(String(Math.random() * o))];
348
- else
349
- for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", c = 0; c < 36; c += 1)
350
- i[c] || (u = Math.random() * 16, i[c] = r[c === 19 ? u && 3 || 8 : u]);
351
- return i.join("");
352
- },
353
- uuidFast() {
354
- const t = e, n = new Array(36);
355
- let r = 0, i, o;
356
- for (o = 0; o < 36; o += 1)
357
- 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]);
358
- return n.join("");
359
- },
360
- uuidString() {
361
- return this.uuidFast().replace(new RegExp("-", "g"), "");
362
- },
363
- uuidCompact() {
364
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
365
- const n = Math.random() * 16 || 0;
366
- return (t === "x" ? n : n && 3 || 8).toString(16);
367
- });
368
- }
369
- };
370
- }
371
- function ye(e = []) {
372
- let t = 0;
373
- function n(r = [], i) {
374
- r.forEach((o) => {
375
- o.floor = i, i > t && (t = i), o.children && o.children.length > 0 && n(o.children, i + 1);
376
- });
377
- }
378
- return n(e, 1), t;
379
- }
380
- function W(e, t = "children") {
381
- let n = [];
382
- return e.forEach((r) => {
383
- n.push(r), r[t] && r[t].length > 0 && (n = n.concat(W(r[t])));
384
- }), n;
385
- }
386
- function xe(e, t, n, r, i) {
387
- t = t || "id", n = n || "parentId", r = r || "children", i = i || 0;
388
- const o = JSON.parse(JSON.stringify(e));
389
- return o.filter((c) => {
390
- const u = o.filter((f) => c[t] === f[n || "parentId"]);
391
- return u.length > 0 ? c[r || "children"] = u : delete c[r || "children"], c[n || "parentId"] === i;
392
- });
393
- }
394
- function Se(e) {
395
- return URL.createObjectURL(e);
396
- }
397
- function ve(e) {
398
- return new Promise((t, n) => {
399
- const r = new FileReader();
400
- r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
401
- });
402
- }
403
- function Ae(e) {
404
- const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
405
- let i = r.length;
406
- const o = new Uint8Array(i);
407
- for (; i--; )
408
- o[i] = r.charCodeAt(i);
409
- return new Blob([o], { type: n });
410
- }
411
- function Oe(e, t) {
412
- const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
413
- let o = i.length;
414
- const c = new Uint8Array(o);
415
- for (; o--; )
416
- c[o] = i.charCodeAt(o);
417
- return new File([c], t, { type: r });
418
- }
419
- function be(e, t, n) {
420
- return new window.File([e], t, { type: n });
421
- }
422
- function k(e = "") {
423
- const t = e.indexOf("?");
424
- return t > 0 ? `${e.substring(0, t)}` : e;
425
- }
426
- function v(e = "") {
427
- e = k(e);
428
- const t = e.lastIndexOf(".");
429
- return t > 0 ? `${e.substring(t).split("?")[0]}`.split(".")[1] : "";
430
- }
431
- function d(e, t) {
432
- if (t)
433
- return t;
434
- if (!e || e === "data:")
435
- return "4";
436
- let n = "4";
437
- return A(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 = v(e).toLowerCase(), m.imageType.includes(n) ? "1" : m.videoType.includes(n) ? "3" : m.audioType.includes(n) ? "2" : "4";
438
- }
439
- function J(e) {
440
- const { url: t = "", fileType: n = "1" } = e;
441
- let r = "";
442
- return t instanceof File ? r = URL.createObjectURL(t) : A(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise(function(i) {
443
- let o;
444
- n === "1" ? (o = document.createElement("img"), o.src = r) : n === "2" ? (o = document.createElement("audio"), o.src = r) : n === "3" && (o = document.createElement("video"), o.src = r), n === "1" ? o.onload = function() {
445
- i({
446
- play: !0,
447
- width: o.width || 0,
448
- height: o.height || 0
449
- }), o = null;
450
- } : o.oncanplay = function() {
451
- i({
452
- play: !0,
453
- duration: o.duration,
454
- width: (o == null ? void 0 : o.videoWidth) || 0,
455
- height: (o == null ? void 0 : o.videoHeight) || 0
456
- }), o = null;
457
- }, o.onerror = function() {
458
- i({
459
- play: !1
460
- }), o = null;
461
- };
462
- });
463
- }
464
- async function Re(e) {
465
- const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
466
- let o = "", c = r, u = "1", f;
467
- return t instanceof File ? (o = URL.createObjectURL(t), c = v(t.name), u = d(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), u = d(t)) : A(t) ? (o = t, u = d(t)) : (t.includes("https") || t.includes("http")) && (o = t, c = v(t), u = d(t)), (c ? m.videoAllowType.includes(c.toLowerCase()) : !1) ? i ? O(o, n) : (f = await J({
468
- url: o,
469
- fileType: u
470
- }), f.play ? O(o, n) : new Promise(function(l) {
471
- l("");
472
- })) : new Promise(function(l) {
473
- l("");
474
- });
475
- }
476
- async function O(e, t) {
477
- let n = document.createElement("video");
478
- n.style.display = "none", n.controls = !0, n.muted = !0, t && (n.currentTime = t), n.setAttribute("src", e), n.setAttribute("muted", String(!0)), n.setAttribute("crossorigin", "anonymous"), n.setAttribute("autoplay", String(!0));
479
- const r = document.createElement("canvas"), i = 0.8, o = 100, c = r.getContext("2d");
480
- return new Promise(function(u) {
481
- n && n.addEventListener("canplay", function() {
482
- setTimeout(function() {
483
- const f = (n == null ? void 0 : n.videoWidth) || 0 * i, a = (n == null ? void 0 : n.videoHeight) || 0 * i, l = 0;
484
- r.width = (n == null ? void 0 : n.videoWidth) || 0 * i, r.height = (n == null ? void 0 : n.videoHeight) || 0 * i, c.drawImage(n, 0, 0, f + l, a + l), n = null, u(f === 0 || a === 0 ? "" : r.toDataURL("image/png", 1));
485
- }, o);
486
- }, !1);
487
- });
488
- }
489
- function A(e = "") {
490
- return !!(e && [
491
- "data:image/",
492
- "data:video/",
493
- "data:audio/"
494
- ].find((n) => e.includes(n)));
495
- }
496
- function Te(e, t, n, r = !1) {
497
- e && t && n && e.addEventListener(t, n, r);
498
- }
499
- function je(e, t, n, r = !1) {
500
- e && t && n && e.removeEventListener(t, n, r);
501
- }
502
- export {
503
- ge as arrayRepeat,
504
- be as blobToDataURL,
505
- d as checkFileType,
506
- P as classNames,
507
- pe as compareArray,
508
- Ae as dataURLtoBlob,
509
- Oe as dataURLtoFile,
510
- T as deepCopy,
511
- we as formatDuraton,
512
- le as genColumnKey,
513
- O as generateVidoePicture,
514
- ve as getBase64,
515
- Se as getBlobUrl,
516
- v as getFileSuffix,
517
- W as getLevelData,
518
- ye as getMaxFloor,
519
- J as getMediaInfos,
520
- fe as getPrefixCls,
521
- q as getRandomNumber,
522
- oe as getRealVNode,
523
- N as getScroll,
524
- Y as getScrollContainer,
525
- ce as getSlot,
526
- H as getSlotVNode,
527
- ue as getSlotsProps,
528
- me as getSortIndex,
529
- Re as getVideoCoverPicture,
530
- k as getVideoFileUrl,
531
- m as globalConfig,
532
- de as handleCurrentPage,
533
- se as handleShowIndex,
534
- he as hanndleField,
535
- b as is,
536
- B as isArray,
537
- A as isBase64,
538
- R as isBoolean,
539
- ne as isBrowser,
540
- x as isDeepEqualReact,
541
- Z as isFunction,
542
- G as isInContainer,
543
- Q as isNumber,
544
- p as isObject,
545
- I as isScroll,
546
- h as isServer,
547
- z as isSlotFragment,
548
- C as isString,
549
- te as merge,
550
- je as off,
551
- re as omitBoolean,
552
- ie as omitUndefined,
553
- Te as on,
554
- ae as runFunction,
555
- K as scrollTo,
556
- ee as throttleByAnimationFrame,
557
- xe as treeData
558
- };
@@ -1 +0,0 @@
1
- (function(c,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],d):(c=typeof globalThis<"u"?globalThis:c||self,d(c.PorUtils={},c.vue,c.lodashEs))})(this,function(c,d,$){"use strict";const g=typeof window>"u";process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const q=e=>{const n=Object.create(null);return t=>n[t]||(n[t]=e(t))},z=/-(\w)/g,H=q(e=>e.replace(z,(n,t)=>t?t.toUpperCase():"")),O=function(e,n){var t;if(g||!e||!n)return"";n=H(n),n==="float"&&(n="cssFloat");try{const i=e.style[n];if(i)return i;const r=(t=document==null?void 0:document.defaultView)==null?void 0:t.getComputedStyle(e,"");return r?r[n]:""}catch{return e.style[n]}},U=(e,n)=>g?void 0:(n==null?O(e,"overflow"):n?O(e,"overflow-y"):O(e,"overflow-x")).match(/(scroll|auto|overlay)/),k=(e,n)=>{if(g)return;let t=e;for(;t;){if([window,document,document.documentElement].includes(t))return window;if(U(t,n))return t;t=t.parentNode}return t},W=(e,n)=>{if(g||!e||!n)return!1;const t=e.getBoundingClientRect();let i;return[window,document,document.documentElement,null,void 0].includes(n)?i={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:i=n.getBoundingClientRect(),t.top<i.bottom&&t.bottom>i.top&&t.right>i.left&&t.left<i.right},J=Object.prototype.toString;function b(e,n){return J.call(e)===`[object ${n}]`}function F(e){return b(e,"Boolean")}function _(e){return typeof e=="number"}function L(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function m(e){return e!==null&&b(e,"Object")}function D(e){return typeof e=="string"||e instanceof String}function X(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function B(...e){const n=[];for(let t=0;t<e.length;t++){const i=e[t];if(i){if(D(i))n.push(i);else if(L(i))for(let r=0;r<i.length;r++){const o=B(i[r]);o&&n.push(o)}else if(m(i))for(const r in i)i[r]&&n.push(r)}}return n.filter(t=>t).join(" ")}let Y=0;const s={};function w(e,n=1){const t=Y++;let i=n;function r(){i-=1,i<=0?(e(),delete s[t]):s[t]=requestAnimationFrame(r)}return s[t]=requestAnimationFrame(r),t}w.cancel=function(n){n!==void 0&&(cancelAnimationFrame(s[n]),delete s[n])},w.ids=s;function R(e){return e!=null&&e===e.window}function I(e,n){var r;if(typeof window>"u")return 0;const t=n?"scrollTop":"scrollLeft";let i=0;return R(e)?i=e[n?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[t]:e&&(i=e[t]),e&&!R(e)&&typeof i!="number"&&(i=(r=(e.ownerDocument||e).documentElement)==null?void 0:r[t]),i}function G(e,n,t,i){const r=t-n;return e/=i/2,e<1?r/2*e*e*e+n:r/2*((e-=2)*e*e+2)+n}function Q(e,n={}){const{getContainer:t=()=>window,callback:i,duration:r=450}=n,o=t(),u=I(o,!0),f=Date.now(),l=()=>{const a=Date.now()-f,E=G(a>r?r:a,u,e,r);R(o)?o.scrollTo(window.pageXOffset,E):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=E:o.scrollTop=E,a<r?w(l):typeof i=="function"&&i()};w(l)}function Z(e){let n;const t=r=>()=>{n=null,e(...r)},i=(...r)=>{n==null&&(n=requestAnimationFrame(t(r)))};return i.cancel=()=>cancelAnimationFrame(n),i}const h={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]},K=(...e)=>{const n={},t=e.length;let i,r=0;for(;r<t;r+=1)for(i in e[r])e[r].hasOwnProperty(i)&&(typeof n[i]=="object"&&typeof e[r][i]=="object"&&n[i]!==void 0&&n[i]!==null&&!Array.isArray(n[i])&&!Array.isArray(e[r][i])?n[i]={...n[i],...e[r][i]}:n[i]=e[r][i]);return n};function S(e,n,t,i){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;let r,o,u;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!S(e[o],n[o],t,i))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!S(o[1],n.get(o[0]),t,i))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===n.toString();if(u=Object.keys(e),r=u.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,u[o]))return!1;for(o=r;o--!==0;){const f=u[o];if(!(t!=null&&t.includes(f))&&!(f==="_owner"&&e.$$typeof)&&!S(e[f],n[f],t,i))return i&&console.log(f),!1}return!0}return e!==e&&n!==n}const ee=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,ne=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!ee,te=e=>{if(e&&e!==!0)return e},ie=e=>{const n={};if(Object.keys(e||{}).forEach(t=>{e[t]!==void 0&&(n[t]=e[t])}),!(Object.keys(n).length<1))return n},C=e=>e.length===1&&(String(e[0].type)===String(Symbol("Comment"))||String(e[0].type)===String(Symbol("Fragment"))||String(e[0].type)===String(Symbol()));function re(e){return C(e)&&d.isVNode(e[0].children)?e[0].children:e}function oe(e,n,t="default"){return n[t]===!1?!1:F(n[t])&&n[t]?(e==null?void 0:e[t])||n[t]:n[t]||e[t]}function x(e,n,t="default"){var i,r;return n[t]===!1?!1:F(n[t])&&n[t]?((i=e==null?void 0:e[t])==null?void 0:i.call(e))||n[t]:n[t]||((r=e[t])==null?void 0:r.call(e))}function ce(e,n,t){const i={};return e.forEach(r=>{i[r]=x(n,t,r)}),i}const ue=({suffixCls:e,customizePrefixCls:n,isPor:t,className:i})=>{const r=i||(t?"gx-pro":"gx");return n||(e?`${r}-${e}`:r)},fe=(e,n)=>e?Array.isArray(e)?e.join("-"):e.toString():`${n}`;function le(e,{align:n,showIndex:t}){const i=$.cloneDeep(e);if(t&&e.length&&e.every(r=>r.dataIndex!=="sortIndex")){const r=e[0];i.unshift({title:"序号",align:n,fixed:r.fixed,width:60,uuid:P().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else i.filter(r=>r.dataIndex!=="sortIndex");return i}function ae(e,...n){return typeof e=="function"?e(...n):e}function T(e){return JSON.parse(JSON.stringify(e))}function se(e,n){if(m(e)){const{pageSize:t=10,total:i=0}=e;let{current:r=1}=e;return i-n<=t*(r-1)&&(r=r-1),r===0?1:r}return 1}function de(e=[],n,t="children"){function i(r,o){return o.map((u,f)=>{const l=`${r}-${f+1}`;return u[t]&&(u[t]=i(l,u[t])),u.sortIndex=l,u})}return T(e).map((r,o)=>{let u=o;const f=m(n)&&n.current||1,l=m(n)&&n.pageSize||10;return u=f?(f-1)*l+(o+1):o+1,r[t]&&(r[t]=i(`${u}`,r[t])),r.sortIndex=u,r})}function ge(e,n,t,i){const r=e[t],o=n[t];let u=0;return r<o?u=i===0?-1:0:r>o&&(u=i===0?0:-1),u}function me(e){let n=T(e);const t=new Set(n);return n=Array.from(t),n}function he(e,n){const t=["null","undefined"];let i=!0;return e===0?i=!0:t.includes(e)?i=!1:e||(i=!1),i?{value:e,success:i}:{value:n===""?n:n||"-",success:i}}function ye(e){let n="";if(e>-1){const t=Math.floor(e/3600),i=Math.floor(e/60)%60,r=parseInt(String(e%60));t<10?n="0"+t+":":n=t+":",i<10&&(n+="0"),n+=i+":",r<10&&(n+="0"),n+=r}return n.split(":")[0]==="00"?`${n.split(":")[1]}:${n.split(":")[2]}`:n}function P(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(n,t){const i=e,r=[],o=t||i.length;let u,f;if(n)for(u=0;u<n;u+=1)r[u]=i[parseInt(String(Math.random()*o))];else for(r[8]="-",r[13]="-",r[18]="-",r[23]="-",r[14]="4",u=0;u<36;u+=1)r[u]||(f=Math.random()*16,r[u]=i[u===19?f&&3||8:f]);return r.join("")},uuidFast(){const n=e,t=new Array(36);let i=0,r,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?t[o]="-":o===14?t[o]="4":(i<=2&&(i=33554432+Math.random()*16777216||0),r=i&&15,i=i>4,t[o]=n[o===19?r&&3||8:r]);return t.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const t=Math.random()*16||0;return(n==="x"?t:t&&3||8).toString(16)})}}}function we(e=[]){let n=0;function t(i=[],r){i.forEach(o=>{o.floor=r,r>n&&(n=r),o.children&&o.children.length>0&&t(o.children,r+1)})}return t(e,1),n}function N(e,n="children"){let t=[];return e.forEach(i=>{t.push(i),i[n]&&i[n].length>0&&(t=t.concat(N(i[n])))}),t}function Se(e,n,t,i,r){n=n||"id",t=t||"parentId",i=i||"children",r=r||0;const o=JSON.parse(JSON.stringify(e));return o.filter(u=>{const f=o.filter(l=>u[n]===l[t||"parentId"]);return f.length>0?u[i||"children"]=f:delete u[i||"children"],u[t||"parentId"]===r})}function pe(e){return URL.createObjectURL(e)}function ve(e){return new Promise((n,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>n(i.result),i.onerror=r=>t(r)})}function Ae(e){const n=e.split(","),t=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let r=i.length;const o=new Uint8Array(r);for(;r--;)o[r]=i.charCodeAt(r);return new Blob([o],{type:t})}function Oe(e,n){const t=e.split(","),i=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let o=r.length;const u=new Uint8Array(o);for(;o--;)u[o]=r.charCodeAt(o);return new File([u],n,{type:i})}function be(e,n,t){return new window.File([e],n,{type:t})}function M(e=""){const n=e.indexOf("?");return n>0?`${e.substring(0,n)}`:e}function p(e=""){e=M(e);const n=e.lastIndexOf(".");return n>0?`${e.substring(n).split("?")[0]}`.split(".")[1]:""}function y(e,n){if(n)return n;if(!e||e==="data:")return"4";let t="4";return v(e)?e.includes("data:image/")?t="png":e.includes("data:video/")?t="mp4":e.includes("data:audio/")&&(t="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?t="png":e.includes("video")?t="mp4":e.includes("audio")&&(t="mp3")):t=p(e).toLowerCase(),h.imageType.includes(t)?"1":h.videoType.includes(t)?"3":h.audioType.includes(t)?"2":"4"}function V(e){const{url:n="",fileType:t="1"}=e;let i="";return n instanceof File?i=URL.createObjectURL(n):v(n)?i=n:n instanceof Blob?i=URL.createObjectURL(n):(n.includes("https")||n.includes("http"))&&(i=n),new Promise(function(r){let o;t==="1"?(o=document.createElement("img"),o.src=i):t==="2"?(o=document.createElement("audio"),o.src=i):t==="3"&&(o=document.createElement("video"),o.src=i),t==="1"?o.onload=function(){r({play:!0,width:o.width||0,height:o.height||0}),o=null}:o.oncanplay=function(){r({play:!0,duration:o.duration,width:(o==null?void 0:o.videoWidth)||0,height:(o==null?void 0:o.videoHeight)||0}),o=null},o.onerror=function(){r({play:!1}),o=null}})}async function Fe(e){const{url:n="",currentTime:t,videoSuffix:i="",vidoeAllowPlay:r=!1}=e;let o="",u=i,f="1",l;return n instanceof File?(o=URL.createObjectURL(n),u=p(n.name),f=y(n.name)):n instanceof Blob?(o=URL.createObjectURL(n),f=y(n)):v(n)?(o=n,f=y(n)):(n.includes("https")||n.includes("http"))&&(o=n,u=p(n),f=y(n)),(u?h.videoAllowType.includes(u.toLowerCase()):!1)?r?j(o,t):(l=await V({url:o,fileType:f}),l.play?j(o,t):new Promise(function(a){a("")})):new Promise(function(a){a("")})}async function j(e,n){let t=document.createElement("video");t.style.display="none",t.controls=!0,t.muted=!0,n&&(t.currentTime=n),t.setAttribute("src",e),t.setAttribute("muted",String(!0)),t.setAttribute("crossorigin","anonymous"),t.setAttribute("autoplay",String(!0));const i=document.createElement("canvas"),r=.8,o=100,u=i.getContext("2d");return new Promise(function(f){t&&t.addEventListener("canplay",function(){setTimeout(function(){const l=(t==null?void 0:t.videoWidth)||0*r,A=(t==null?void 0:t.videoHeight)||0*r,a=0;i.width=(t==null?void 0:t.videoWidth)||0*r,i.height=(t==null?void 0:t.videoHeight)||0*r,u.drawImage(t,0,0,l+a,A+a),t=null,f(l===0||A===0?"":i.toDataURL("image/png",1))},o)},!1)})}function v(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(t=>e.includes(t)))}function Re(e,n,t,i=!1){e&&n&&t&&e.addEventListener(n,t,i)}function Te(e,n,t,i=!1){e&&n&&t&&e.removeEventListener(n,t,i)}c.arrayRepeat=me,c.blobToDataURL=be,c.checkFileType=y,c.classNames=B,c.compareArray=ge,c.dataURLtoBlob=Ae,c.dataURLtoFile=Oe,c.deepCopy=T,c.formatDuraton=ye,c.genColumnKey=fe,c.generateVidoePicture=j,c.getBase64=ve,c.getBlobUrl=pe,c.getFileSuffix=p,c.getLevelData=N,c.getMaxFloor=we,c.getMediaInfos=V,c.getPrefixCls=ue,c.getRandomNumber=P,c.getRealVNode=re,c.getScroll=I,c.getScrollContainer=k,c.getSlot=oe,c.getSlotVNode=x,c.getSlotsProps=ce,c.getSortIndex=de,c.getVideoCoverPicture=Fe,c.getVideoFileUrl=M,c.globalConfig=h,c.handleCurrentPage=se,c.handleShowIndex=le,c.hanndleField=he,c.is=b,c.isArray=L,c.isBase64=v,c.isBoolean=F,c.isBrowser=ne,c.isDeepEqualReact=S,c.isFunction=X,c.isInContainer=W,c.isNumber=_,c.isObject=m,c.isScroll=U,c.isServer=g,c.isSlotFragment=C,c.isString=D,c.merge=K,c.off=Te,c.omitBoolean=te,c.omitUndefined=ie,c.on=Re,c.runFunction=ae,c.scrollTo=Q,c.throttleByAnimationFrame=Z,c.treeData=Se,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});