@gx-design-vue/pro-utils 0.2.0-beta.42 → 0.2.0-beta.44

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { Comment as z, Fragment as j, isVNode as m } from "vue";
2
- const w = typeof window > "u";
1
+ import { Comment as z, Fragment as I, isVNode as h } from "vue";
2
+ const y = typeof window > "u";
3
3
  /**
4
4
  * @vue/shared v3.5.11
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -7,53 +7,53 @@ const w = typeof window > "u";
7
7
  **/
8
8
  process.env.NODE_ENV !== "production" && Object.freeze({});
9
9
  process.env.NODE_ENV !== "production" && Object.freeze([]);
10
- const H = (e) => {
11
- const n = /* @__PURE__ */ Object.create(null);
12
- return (r) => n[r] || (n[r] = e(r));
13
- }, W = /-(\w)/g, _ = H(
14
- (e) => e.replace(W, (n, r) => r ? r.toUpperCase() : "")
15
- ), y = function(e, n) {
10
+ const W = (e) => {
11
+ const t = /* @__PURE__ */ Object.create(null);
12
+ return (r) => t[r] || (t[r] = e(r));
13
+ }, H = /-(\w)/g, _ = W(
14
+ (e) => e.replace(H, (t, r) => r ? r.toUpperCase() : "")
15
+ ), v = function(e, t) {
16
16
  var r;
17
- if (w || !e || !n)
17
+ if (y || !e || !t)
18
18
  return "";
19
- n = _(n), n === "float" && (n = "cssFloat");
19
+ t = _(t), t === "float" && (t = "cssFloat");
20
20
  try {
21
- const t = e.style[n];
22
- if (t)
23
- return t;
21
+ const n = e.style[t];
22
+ if (n)
23
+ return n;
24
24
  const i = (r = document == null ? void 0 : document.defaultView) == null ? void 0 : r.getComputedStyle(e, "");
25
- return i ? i[n] : "";
25
+ return i ? i[t] : "";
26
26
  } catch {
27
- return e.style[n];
27
+ return e.style[t];
28
28
  }
29
- }, q = (e, n) => w ? void 0 : (n == null ? y(e, "overflow") : n ? y(e, "overflow-y") : y(e, "overflow-x")).match(/(scroll|auto|overlay)/), ue = (e, n) => {
30
- if (w)
29
+ }, q = (e, t) => y ? void 0 : (t == null ? v(e, "overflow") : t ? v(e, "overflow-y") : v(e, "overflow-x")).match(/(scroll|auto|overlay)/), se = (e, t) => {
30
+ if (y)
31
31
  return;
32
32
  let r = e;
33
33
  for (; r; ) {
34
34
  if ([window, document, document.documentElement].includes(r))
35
35
  return window;
36
- if (q(r, n))
36
+ if (q(r, t))
37
37
  return r;
38
38
  r = r.parentNode;
39
39
  }
40
40
  return r;
41
- }, ce = (e, n) => {
42
- if (w || !e || !n)
41
+ }, ae = (e, t) => {
42
+ if (y || !e || !t)
43
43
  return !1;
44
44
  const r = e.getBoundingClientRect();
45
- let t;
46
- return [window, document, document.documentElement, null, void 0].includes(n) ? t = {
45
+ let n;
46
+ return [window, document, document.documentElement, null, void 0].includes(t) ? n = {
47
47
  top: 0,
48
48
  right: window.innerWidth,
49
49
  bottom: window.innerHeight,
50
50
  left: 0
51
- } : t = n.getBoundingClientRect(), r.top < t.bottom && r.bottom > t.top && r.right > t.left && r.left < t.right;
51
+ } : n = t.getBoundingClientRect(), r.top < n.bottom && r.bottom > n.top && r.right > n.left && r.left < n.right;
52
52
  };
53
- function fe(e) {
53
+ function le(e) {
54
54
  return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
55
55
  }
56
- const ae = (e) => e == null, le = (e) => {
56
+ const de = (e) => e == null, pe = (e) => {
57
57
  if (!e || !e.startsWith("http"))
58
58
  return !1;
59
59
  try {
@@ -61,140 +61,157 @@ const ae = (e) => e == null, le = (e) => {
61
61
  } catch {
62
62
  return !1;
63
63
  }
64
- }, se = (...e) => {
65
- const n = {}, r = e.length;
66
- let t, i = 0;
64
+ }, ge = (...e) => {
65
+ const t = {}, r = e.length;
66
+ let n, i = 0;
67
67
  for (; i < r; i += 1)
68
- for (t in e[i])
69
- e[i].hasOwnProperty(t) && (typeof n[t] == "object" && typeof e[i][t] == "object" && n[t] !== void 0 && n[t] !== null && !Array.isArray(n[t]) && !Array.isArray(e[i][t]) ? n[t] = {
70
- ...n[t],
71
- ...e[i][t]
72
- } : n[t] = e[i][t]);
73
- return n;
68
+ for (n in e[i])
69
+ e[i].hasOwnProperty(n) && (typeof t[n] == "object" && typeof e[i][n] == "object" && t[n] !== void 0 && t[n] !== null && !Array.isArray(t[n]) && !Array.isArray(e[i][n]) ? t[n] = {
70
+ ...t[n],
71
+ ...e[i][n]
72
+ } : t[n] = e[i][n]);
73
+ return t;
74
74
  };
75
- let R = 0;
76
- const b = (e = 21) => {
75
+ let j = 0;
76
+ const U = (e = 21) => {
77
77
  if (typeof window > "u" || !window.crypto)
78
- return (R += 1).toFixed(0);
79
- let n = "";
78
+ return (j += 1).toFixed(0);
79
+ let t = "";
80
80
  const r = crypto.getRandomValues(new Uint8Array(e));
81
81
  for (; e--; ) {
82
- const t = 63 & r[e];
83
- n += t < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t < 63 ? "_" : "-";
82
+ const n = 63 & r[e];
83
+ t += n < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n < 63 ? "_" : "-";
84
84
  }
85
- return n;
86
- }, de = () => typeof window > "u" ? b() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : b();
87
- function F(e, n) {
88
- if (typeof n != "string" && !Array.isArray(n))
85
+ return t;
86
+ }, me = () => typeof window > "u" ? U() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : U();
87
+ function C(e, t) {
88
+ if (typeof t != "string" && !Array.isArray(t))
89
89
  return;
90
- const r = Array.isArray(n) ? n : n.split(":");
91
- let t = e;
90
+ const r = Array.isArray(t) ? t : t.split(":");
91
+ let n = e;
92
92
  for (let i = 0; i < r.length; i++)
93
- if (t && t.hasOwnProperty(r[i]))
94
- t = t[r[i]];
93
+ if (n && n.hasOwnProperty(r[i]))
94
+ n = n[r[i]];
95
95
  else
96
96
  return;
97
- return t;
97
+ return n;
98
98
  }
99
- const J = Object.prototype.toString;
100
- function L(e, n) {
101
- return J.call(e) === `[object ${n}]`;
99
+ function J(e, t) {
100
+ return Object.prototype.toString.call(e) === `[object ${t}]`;
102
101
  }
103
- function D(e) {
104
- return L(e, "Boolean");
102
+ function $(e) {
103
+ return typeof e == "boolean";
105
104
  }
106
- function pe(e) {
105
+ function d(e) {
107
106
  return typeof e == "number";
108
107
  }
109
- function B(e) {
108
+ function p(e) {
110
109
  return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
111
110
  }
112
- function d(e) {
113
- return e !== null && L(e, "Object");
111
+ function l(e) {
112
+ return e !== null && J(e, "Object");
114
113
  }
115
114
  function X(e) {
116
115
  return typeof e == "string" || e instanceof String;
117
116
  }
118
- function ge(e) {
117
+ function we(e) {
119
118
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
120
119
  }
120
+ function he(e) {
121
+ if (typeof e != "string")
122
+ return !1;
123
+ try {
124
+ const t = JSON.parse(e);
125
+ return typeof t == "object" && t !== null;
126
+ } catch {
127
+ return !1;
128
+ }
129
+ }
130
+ function ye() {
131
+ const e = navigator.userAgent || navigator.vendor;
132
+ return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Z());
133
+ }
134
+ function Z() {
135
+ const e = navigator.userAgent || navigator.vendor;
136
+ return !!(/iPad/.test(e) || /Macintosh/.test(e) && "ontouchend" in document || /Android/.test(e) && !/Mobile/.test(e));
137
+ }
121
138
  function Y(...e) {
122
- const n = [];
139
+ const t = [];
123
140
  for (let r = 0; r < e.length; r++) {
124
- const t = e[r];
125
- if (t) {
126
- if (X(t))
127
- n.push(t);
128
- else if (B(t))
129
- for (let i = 0; i < t.length; i++) {
130
- const o = Y(t[i]);
131
- o && n.push(o);
141
+ const n = e[r];
142
+ if (n) {
143
+ if (X(n))
144
+ t.push(n);
145
+ else if (p(n))
146
+ for (let i = 0; i < n.length; i++) {
147
+ const o = Y(n[i]);
148
+ o && t.push(o);
132
149
  }
133
- else if (d(t))
134
- for (const i in t)
135
- t[i] && n.push(i);
150
+ else if (l(n))
151
+ for (const i in n)
152
+ n[i] && t.push(i);
136
153
  }
137
154
  }
138
- return n.filter((r) => r).join(" ");
139
- }
140
- let C = (e) => setTimeout(e, 16), P = (e) => clearTimeout(e);
141
- typeof window < "u" && "requestAnimationFrame" in window && (C = (e) => window.requestAnimationFrame(e), P = (e) => window.cancelAnimationFrame(e));
142
- let I = 0;
143
- const S = /* @__PURE__ */ new Map();
144
- function N(e) {
145
- S.delete(e);
146
- }
147
- function x(e, n = 1) {
148
- I += 1;
149
- const r = I;
150
- function t(i) {
155
+ return t.filter((r) => r).join(" ");
156
+ }
157
+ let B = (e) => setTimeout(e, 16), P = (e) => clearTimeout(e);
158
+ typeof window < "u" && "requestAnimationFrame" in window && (B = (e) => window.requestAnimationFrame(e), P = (e) => window.cancelAnimationFrame(e));
159
+ let F = 0;
160
+ const R = /* @__PURE__ */ new Map();
161
+ function M(e) {
162
+ R.delete(e);
163
+ }
164
+ function S(e, t = 1) {
165
+ F += 1;
166
+ const r = F;
167
+ function n(i) {
151
168
  if (i === 0)
152
- N(r), e();
169
+ M(r), e();
153
170
  else {
154
- const o = C(() => {
155
- t(i - 1);
171
+ const o = B(() => {
172
+ n(i - 1);
156
173
  });
157
- S.set(r, o);
174
+ R.set(r, o);
158
175
  }
159
176
  }
160
- return t(n), r;
177
+ return n(t), r;
161
178
  }
162
- x.cancel = (e) => {
163
- const n = S.get(e);
164
- return N(n), P(n);
179
+ S.cancel = (e) => {
180
+ const t = R.get(e);
181
+ return M(t), P(t);
165
182
  };
166
- function v(e) {
183
+ function O(e) {
167
184
  return e != null && e === e.window;
168
185
  }
169
- function G(e, n) {
186
+ function G(e, t) {
170
187
  var i;
171
188
  if (typeof window > "u")
172
189
  return 0;
173
- const r = n ? "scrollTop" : "scrollLeft";
174
- let t = 0;
175
- return v(e) ? t = e[n ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? t = e.documentElement[r] : e && (t = e[r]), e && !v(e) && typeof t != "number" && (t = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[r]), t;
176
- }
177
- function Q(e, n, r, t) {
178
- const i = r - n;
179
- return e /= t / 2, e < 1 ? i / 2 * e * e * e + n : i / 2 * ((e -= 2) * e * e + 2) + n;
180
- }
181
- function me(e, n = {}) {
182
- const { getContainer: r = () => window, callback: t, duration: i = 450 } = n, o = r(), u = G(o, !0), c = Date.now(), f = () => {
183
- const l = Date.now() - c, s = Q(l > i ? i : l, u, e, i);
184
- v(o) ? o.scrollTo(window.pageXOffset, s) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = s : o.scrollTop = s, l < i ? x(f) : typeof t == "function" && t();
190
+ const r = t ? "scrollTop" : "scrollLeft";
191
+ let n = 0;
192
+ return O(e) ? n = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? n = e.documentElement[r] : e && (n = e[r]), e && !O(e) && typeof n != "number" && (n = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[r]), n;
193
+ }
194
+ function Q(e, t, r, n) {
195
+ const i = r - t;
196
+ return e /= n / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
197
+ }
198
+ function xe(e, t = {}) {
199
+ const { getContainer: r = () => window, callback: n, duration: i = 450 } = t, o = r(), u = G(o, !0), c = Date.now(), f = () => {
200
+ const a = Date.now() - c, g = Q(a > i ? i : a, u, e, i);
201
+ O(o) ? o.scrollTo(window.pageXOffset, g) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = g : o.scrollTop = g, a < i ? S(f) : typeof n == "function" && n();
185
202
  };
186
- x(f);
203
+ o && S(f);
187
204
  }
188
- function we(e) {
189
- let n;
205
+ function ve(e) {
206
+ let t;
190
207
  const r = (i) => () => {
191
- n = null, e(...i);
192
- }, t = (...i) => {
193
- n == null && (n = requestAnimationFrame(r(i)));
208
+ t = null, e(...i);
209
+ }, n = (...i) => {
210
+ t == null && (t = requestAnimationFrame(r(i)));
194
211
  };
195
- return t.cancel = () => cancelAnimationFrame(n), t;
212
+ return n.cancel = () => cancelAnimationFrame(t), n;
196
213
  }
197
- const g = {
214
+ const w = {
198
215
  videoAllowType: [
199
216
  "mp4",
200
217
  "webm",
@@ -223,446 +240,533 @@ const g = {
223
240
  ],
224
241
  audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
225
242
  };
226
- function h(e, n, r, t) {
227
- if (e === n)
243
+ function A(e, t, r, n) {
244
+ if (e === t)
228
245
  return !0;
229
- if (e && n && typeof e == "object" && typeof n == "object") {
230
- if (e.constructor !== n.constructor)
246
+ if (e && t && typeof e == "object" && typeof t == "object") {
247
+ if (e.constructor !== t.constructor)
231
248
  return !1;
232
249
  let i, o, u;
233
250
  if (Array.isArray(e)) {
234
- if (i = e.length, i != n.length)
251
+ if (i = e.length, i != t.length)
235
252
  return !1;
236
253
  for (o = i; o-- !== 0; )
237
- if (!h(e[o], n[o], r, t))
254
+ if (!A(e[o], t[o], r, n))
238
255
  return !1;
239
256
  return !0;
240
257
  }
241
- if (e instanceof Map && n instanceof Map) {
242
- if (e.size !== n.size)
258
+ if (e instanceof Map && t instanceof Map) {
259
+ if (e.size !== t.size)
243
260
  return !1;
244
261
  for (o of e.entries())
245
- if (!n.has(o[0]))
262
+ if (!t.has(o[0]))
246
263
  return !1;
247
264
  for (o of e.entries())
248
- if (!h(o[1], n.get(o[0]), r, t))
265
+ if (!A(o[1], t.get(o[0]), r, n))
249
266
  return !1;
250
267
  return !0;
251
268
  }
252
- if (e instanceof Set && n instanceof Set) {
253
- if (e.size !== n.size)
269
+ if (e instanceof Set && t instanceof Set) {
270
+ if (e.size !== t.size)
254
271
  return !1;
255
272
  for (o of e.entries())
256
- if (!n.has(o[0]))
273
+ if (!t.has(o[0]))
257
274
  return !1;
258
275
  return !0;
259
276
  }
260
- if (ArrayBuffer.isView(e) && ArrayBuffer.isView(n)) {
261
- if (i = e.length, i != n.length)
277
+ if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
278
+ if (i = e.length, i != t.length)
262
279
  return !1;
263
280
  for (o = i; o-- !== 0; )
264
- if (e[o] !== n[o])
281
+ if (e[o] !== t[o])
265
282
  return !1;
266
283
  return !0;
267
284
  }
268
285
  if (e.constructor === RegExp)
269
- return e.source === n.source && e.flags === n.flags;
286
+ return e.source === t.source && e.flags === t.flags;
270
287
  if (e.valueOf !== Object.prototype.valueOf && e.valueOf)
271
- return e.valueOf() === n.valueOf();
288
+ return e.valueOf() === t.valueOf();
272
289
  if (e.toString !== Object.prototype.toString && e.toString)
273
- return e.toString() === n.toString();
274
- if (u = Object.keys(e), i = u.length, i !== Object.keys(n).length)
290
+ return e.toString() === t.toString();
291
+ if (u = Object.keys(e), i = u.length, i !== Object.keys(t).length)
275
292
  return !1;
276
293
  for (o = i; o-- !== 0; )
277
- if (!Object.prototype.hasOwnProperty.call(n, u[o]))
294
+ if (!Object.prototype.hasOwnProperty.call(t, u[o]))
278
295
  return !1;
279
296
  for (o = i; o-- !== 0; ) {
280
297
  const c = u[o];
281
- if (!(r != null && r.includes(c)) && !(c === "_owner" && e.$$typeof) && !h(e[c], n[c], r, t))
282
- return t && console.log(c), !1;
298
+ if (!(r != null && r.includes(c)) && !(c === "_owner" && e.$$typeof) && !A(e[c], t[c], r, n))
299
+ return n && console.log(c), !1;
283
300
  }
284
301
  return !0;
285
302
  }
286
- return e !== e && n !== n;
303
+ return e !== e && t !== t;
287
304
  }
288
- const Z = typeof process < "u" && process.versions != null && process.versions.node != null, ye = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !Z, he = (e) => {
305
+ const k = typeof process < "u" && process.versions != null && process.versions.node != null, Ae = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !k, Se = (e) => {
289
306
  if (e && e !== !0)
290
307
  return e;
291
- }, xe = (e) => {
292
- const n = {};
308
+ }, Oe = (e) => {
309
+ const t = {};
293
310
  if (Object.keys(e || {}).forEach((r) => {
294
- e[r] !== void 0 && (n[r] = e[r]);
295
- }), !(Object.keys(n).length < 1))
296
- return n;
297
- }, ve = (e) => {
298
- const n = {};
311
+ e[r] !== void 0 && (t[r] = e[r]);
312
+ }), !(Object.keys(t).length < 1))
313
+ return t;
314
+ }, Ee = (e) => {
315
+ const t = {};
299
316
  return Object.keys(e || {}).forEach((r) => {
300
- var t;
301
- Array.isArray(e[r]) && ((t = e[r]) == null ? void 0 : t.length) === 0 || e[r] !== void 0 && (n[r] = e[r]);
302
- }), n;
317
+ var n;
318
+ Array.isArray(e[r]) && ((n = e[r]) == null ? void 0 : n.length) === 0 || e[r] !== void 0 && (t[r] = e[r]);
319
+ }), t;
303
320
  };
304
- function O(e) {
305
- var n;
321
+ function b(e) {
322
+ var t;
306
323
  if (!(typeof e != "string" && !Array.isArray(e)))
307
- return Array.isArray(e) ? e[e.length - 1] : (n = e.split(":")) == null ? void 0 : n.slice(-1)[0];
324
+ return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
308
325
  }
309
- function k(e) {
310
- return e && (e.type === z || e.type === j && e.children.length === 0 || e.type === Text && e.children.trim() === "");
326
+ function K(e) {
327
+ return e && (e.type === z || e.type === I && e.children.length === 0 || e.type === Text && e.children.trim() === "");
311
328
  }
312
- function Ae(e, n) {
329
+ function Re(e, t) {
313
330
  var r;
314
- return M((r = e[n]) == null ? void 0 : r.call(e));
331
+ return N((r = e[t]) == null ? void 0 : r.call(e));
315
332
  }
316
- function M(e = []) {
317
- const n = [];
333
+ function N(e = []) {
334
+ const t = [];
318
335
  return e.forEach((r) => {
319
- Array.isArray(r) ? n.push(...r) : (r == null ? void 0 : r.type) === j ? n.push(...M(r.children)) : n.push(r);
320
- }), n.filter((r) => !k(r));
336
+ Array.isArray(r) ? t.push(...r) : (r == null ? void 0 : r.type) === I ? t.push(...N(r.children)) : t.push(r);
337
+ }), t.filter((r) => !K(r));
321
338
  }
322
- function V(e, ...n) {
323
- return typeof e == "function" ? e == null ? void 0 : e(...n) : e;
339
+ function V(e, ...t) {
340
+ return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
324
341
  }
325
- function K(e, n, r = "default", t) {
326
- const i = O(r);
342
+ function ee(e, t, r = "default", n) {
343
+ const i = b(r);
327
344
  if (i) {
328
345
  let o;
329
- const u = F(n, r);
330
- return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : d(u) && t ? m(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), t ? m(o) ? o : V(o) : o;
346
+ const u = C(t, r);
347
+ return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : l(u) && n ? h(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), n ? h(o) ? o : V(o) : o;
331
348
  }
332
349
  }
333
- function ee(e, n, r = "default", t) {
350
+ function te(e, t, r = "default", n) {
334
351
  var o, u, c;
335
- const i = O(r);
352
+ const i = b(r);
336
353
  if (i) {
337
354
  let f;
338
- const a = F(n, r);
339
- return a === !1 ? f = !1 : a === !0 ? f = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, t) : d(a) ? m(a) ? f = a : f = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, t) : f = a || ((c = e == null ? void 0 : e[i]) == null ? void 0 : c.call(e, t)), m(f) ? f : V(f, t);
355
+ const s = C(t, r);
356
+ return s === !1 ? f = !1 : s === !0 ? f = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, n) : l(s) ? h(s) ? f = s : f = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, n) : f = s || ((c = e == null ? void 0 : e[i]) == null ? void 0 : c.call(e, n)), h(f) ? f : V(f, n);
340
357
  }
341
358
  }
342
- function Se(e, n, r, t) {
359
+ function be(e, t, r, n) {
343
360
  const i = {};
344
361
  return e.forEach((o) => {
345
- const u = O(o);
362
+ const u = b(o);
346
363
  if (u) {
347
- const c = t != null && t.render ? ee(n, r, o, t == null ? void 0 : t.params) : K(n, r, o);
348
- (D(c) || c) && (i[u] = c);
364
+ const c = n != null && n.render ? te(t, r, o, n == null ? void 0 : n.params) : ee(t, r, o);
365
+ ($(c) || c) && (i[u] = c);
349
366
  }
350
367
  }), i;
351
368
  }
352
- const Oe = ({ suffixCls: e, customizePrefixCls: n, isPor: r, className: t }) => {
353
- const i = t || (r ? "gx-pro" : "gx");
354
- return n || (e ? `${i}-${e}` : i);
355
- }, Ue = (e, n) => e ? Array.isArray(e) ? e.join("-") : e.toString() : `${n}`;
356
- function Ee(e, { align: n, showIndex: r }) {
357
- const t = U(e);
369
+ const Te = ({ suffixCls: e, customizePrefixCls: t, isPor: r, className: n }) => {
370
+ const i = n || (r ? "gx-pro" : "gx");
371
+ return t || (e ? `${i}-${e}` : i);
372
+ }, je = (e, t) => e ? p(e) ? e.join("-") : e.toString() : `${t || 0}`;
373
+ function Ue(e, { align: t, showIndex: r }) {
374
+ const n = x(e);
358
375
  if (r && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
359
376
  const i = e[0];
360
- t.unshift({
377
+ n.unshift({
361
378
  title: "序号",
362
- align: n,
379
+ align: t,
363
380
  fixed: i.fixed,
364
381
  width: 60,
365
- uuid: ne().uuid(15),
382
+ uuid: ie().uuid(15),
366
383
  dataIndex: "sortIndex",
367
384
  key: "sortIndex"
368
385
  });
369
386
  } else
370
- t.filter((i) => i.dataIndex !== "sortIndex");
371
- return t;
387
+ n.filter((i) => i.dataIndex !== "sortIndex");
388
+ return n;
372
389
  }
373
- function Re(e, ...n) {
374
- return typeof e == "function" ? e(...n) : e;
390
+ function Fe(e, ...t) {
391
+ return typeof e == "function" ? e(...t) : e;
375
392
  }
376
- function U(e) {
393
+ function x(e) {
377
394
  return JSON.parse(JSON.stringify(e));
378
395
  }
379
- function be(e, n) {
380
- if (d(e)) {
381
- const { pageSize: r = 10, total: t = 0 } = e;
396
+ function De(e, t) {
397
+ if (l(e)) {
398
+ const { pageSize: r = 10, total: n = 0 } = e;
382
399
  let { current: i = 1 } = e;
383
- return t - n <= r * (i - 1) && (i = i - 1), i === 0 ? 1 : i;
400
+ return n - t <= r * (i - 1) && (i = i - 1), i === 0 ? 1 : i;
384
401
  }
385
402
  return 1;
386
403
  }
387
- function Ie(e = [], n, r = "children") {
388
- function t(i, o) {
404
+ function Le(e = [], t, r = "children") {
405
+ function n(i, o) {
389
406
  return o.map((u, c) => {
390
407
  const f = `${i}-${c + 1}`;
391
- return u[r] && (u[r] = t(f, u[r])), u.sortIndex = f, u;
408
+ return u[r] && (u[r] = n(f, u[r])), u.sortIndex = f, u;
392
409
  });
393
410
  }
394
- return U(e).map((i, o) => {
395
- let u = o;
396
- const c = d(n) && n.current || 1, f = d(n) && n.pageSize || 10;
397
- return u = c ? (c - 1) * f + (o + 1) : o + 1, i[r] && (i[r] = t(`${u}`, i[r])), i.sortIndex = u, i;
411
+ return x(e).map((i, o) => {
412
+ const u = l(t) && t.current || 1, c = l(t) && t.pageSize || 10, f = `${u ? (u - 1) * c + (o + 1) : o + 1}`;
413
+ return i[r] && (i[r] = n(`${f}`, i[r])), i.sortIndex = f, i;
398
414
  });
399
415
  }
400
- function Te(e, n, r, t) {
401
- const i = e[r], o = n[r];
402
- let u = 0;
403
- return i < o ? u = t === 0 ? -1 : 0 : i > o && (u = t === 0 ? 0 : -1), u;
416
+ function Ie(e, t) {
417
+ return p(e) ? e == null ? void 0 : e.filter((r, n) => {
418
+ if (d(t))
419
+ return n <= t - 1;
420
+ if (p(t) && t.length === 2) {
421
+ const i = t[0] - 1, o = t[1] ? t[1] - 1 : e.length - 1;
422
+ return n <= o && n >= i;
423
+ } else if (p(t) && t.length === 1) {
424
+ const i = t[0] - 1, o = e.length - 1;
425
+ return n <= o && n >= i;
426
+ }
427
+ return !0;
428
+ }) : [];
429
+ }
430
+ function ne(e, t, r, n = 0) {
431
+ const i = d(n) && (n === 0 || n === 1) ? n : 0, o = e[r], u = t[r];
432
+ let c = 0;
433
+ return o < u ? c = i === 0 ? -1 : 0 : o > u && (c = i === 0 ? 0 : -1), c;
434
+ }
435
+ function re(e, t, r, n = 0) {
436
+ const i = d(n) && (n === 0 || n === 1) ? n : 0, o = new Date(e[r]), u = new Date(t[r]);
437
+ let c = 0;
438
+ return o < u ? c = i === 0 ? -1 : 0 : o > u && (c = i === 0 ? 0 : -1), c;
439
+ }
440
+ function Ce(e, t, r = 0) {
441
+ return e.sort((n, i) => ne(n, i, t, r));
442
+ }
443
+ function $e(e, t, r = 0) {
444
+ return e.sort((n, i) => re(n, i, t, r));
404
445
  }
405
- function je(e) {
406
- let n = U(e);
407
- const r = new Set(n);
408
- return n = Array.from(r), n;
446
+ function Be(e) {
447
+ let t = x(e);
448
+ const r = new Set(t);
449
+ return t = Array.from(r), t;
409
450
  }
410
- function Fe(e, n) {
451
+ function Pe(e, t) {
411
452
  const r = ["null", "undefined"];
412
- let t = !0;
413
- return e === 0 ? t = !0 : r.includes(e) ? t = !1 : e || (t = !1), t ? {
453
+ let n = !0;
454
+ return e === 0 ? n = !0 : r.includes(e) ? n = !1 : e || (n = !1), n ? {
414
455
  value: e,
415
- success: t
456
+ success: n
416
457
  } : {
417
- value: n === "" ? n : n || "-",
418
- success: t
458
+ value: t === "" ? t : t || "-",
459
+ success: n
419
460
  };
420
461
  }
421
- function Le(e) {
422
- let n = "";
462
+ function Me(e) {
463
+ let t = "";
423
464
  if (e > -1) {
424
- const r = Math.floor(e / 3600), t = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
425
- r < 10 ? n = "0" + r + ":" : n = r + ":", t < 10 && (n += "0"), n += t + ":", i < 10 && (n += "0"), n += i;
465
+ const r = Math.floor(e / 3600), n = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
466
+ r < 10 ? t = "0" + r + ":" : t = r + ":", n < 10 && (t += "0"), t += n + ":", i < 10 && (t += "0"), t += i;
426
467
  }
427
- return n.split(":")[0] === "00" ? `${n.split(":")[1]}:${n.split(":")[2]}` : n;
468
+ return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
428
469
  }
429
- function ne() {
470
+ function ie() {
430
471
  const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
431
472
  return {
432
- uuid(n, r) {
433
- const t = e, i = [], o = r || t.length;
473
+ uuid(t, r) {
474
+ const n = e, i = [], o = r || n.length;
434
475
  let u, c;
435
- if (n)
436
- for (u = 0; u < n; u += 1)
437
- i[u] = t[Number.parseInt(String(Math.random() * o))];
476
+ if (t)
477
+ for (u = 0; u < t; u += 1)
478
+ i[u] = n[Number.parseInt(String(Math.random() * o))];
438
479
  else
439
480
  for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", u = 0; u < 36; u += 1)
440
- i[u] || (c = Math.random() * 16, i[u] = t[u === 19 ? c && 3 || 8 : c]);
481
+ i[u] || (c = Math.random() * 16, i[u] = n[u === 19 ? c && 3 || 8 : c]);
441
482
  return i.join("");
442
483
  },
443
484
  uuidFast() {
444
- const n = e, r = Array.from({ length: 36 });
445
- let t = 0, i, o;
485
+ const t = e, r = Array.from({ length: 36 });
486
+ let n = 0, i, o;
446
487
  for (o = 0; o < 36; o += 1)
447
- o === 8 || o === 13 || o === 18 || o === 23 ? r[o] = "-" : o === 14 ? r[o] = "4" : (t <= 2 && (t = 33554432 + Math.random() * 16777216 || 0), i = t && 15, t = t > 4, r[o] = n[o === 19 ? i && 3 || 8 : i]);
488
+ o === 8 || o === 13 || o === 18 || o === 23 ? r[o] = "-" : o === 14 ? r[o] = "4" : (n <= 2 && (n = 33554432 + Math.random() * 16777216 || 0), i = n && 15, n = n > 4, r[o] = t[o === 19 ? i && 3 || 8 : i]);
448
489
  return r.join("");
449
490
  },
450
491
  uuidString() {
451
492
  return this.uuidFast().replace(new RegExp("-", "g"), "");
452
493
  },
453
494
  uuidCompact() {
454
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (n) => {
495
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
455
496
  const r = Math.random() * 16 || 0;
456
- return (n === "x" ? r : r && 3 || 8).toString(16);
497
+ return (t === "x" ? r : r && 3 || 8).toString(16);
457
498
  });
458
499
  }
459
500
  };
460
501
  }
461
- function De(e = []) {
462
- let n = 0;
463
- function r(t = [], i) {
464
- t.forEach((o) => {
465
- o.floor = i, i > n && (n = i), o.children && o.children.length > 0 && r(o.children, i + 1);
502
+ function Ne(e = [], t = "children") {
503
+ let r = 0;
504
+ function n(i = [], o) {
505
+ i.forEach((u) => {
506
+ u.floor = o, o > r && (r = o), u[t] && u[t].length > 0 && n(u[t], o + 1);
466
507
  });
467
508
  }
468
- return r(e, 1), n;
509
+ return n(e, 1), r;
469
510
  }
470
- function te(e, n = "children") {
511
+ function oe(e, t = "children") {
471
512
  let r = [];
472
- return e.forEach((t) => {
473
- r.push(t), B(t[n]) && t[n].length > 0 && (r = r.concat(te(t[n])));
513
+ return e.forEach((n) => {
514
+ r.push(n), p(n[t]) && n[t].length > 0 && (r = r.concat(oe(n[t])));
474
515
  }), r;
475
516
  }
476
- function Be(e, n, r, t, i) {
477
- n = n || "id", r = r || "parentId", t = t || "children", i = i || 0;
478
- const o = JSON.parse(JSON.stringify(e));
517
+ function Ve(e, t, r, n, i) {
518
+ t = t || "id", r = r || "parentId", n = n || "children", i = i || 0;
519
+ const o = x(e);
479
520
  return o.filter((u) => {
480
- const c = o.filter((f) => u[n] === f[r || "parentId"]);
481
- return c.length > 0 ? u[t || "children"] = c : delete u[t || "children"], u[r || "parentId"] === i;
521
+ const c = o.filter((f) => u[t] === f[r]);
522
+ return c.length > 0 ? u[n] = c : u[n] = [], u[r] === i;
482
523
  });
483
524
  }
484
- function Ce(e) {
525
+ function ze(e) {
485
526
  return URL.createObjectURL(e);
486
527
  }
487
- function Pe(e) {
488
- return new Promise((n, r) => {
489
- const t = new FileReader();
490
- t.readAsDataURL(e), t.onload = () => n(t.result), t.onerror = (i) => r(i);
528
+ function We(e) {
529
+ return new Promise((t, r) => {
530
+ const n = new FileReader();
531
+ n.readAsDataURL(e), n.onload = () => t(n.result), n.onerror = (i) => r(i);
491
532
  });
492
533
  }
493
- function Ne(e) {
494
- const n = e.split(","), r = n[0].match(/:(.*?);/)[1], t = atob(n[1]);
495
- let i = t.length;
534
+ function He(e) {
535
+ const t = e.split(","), r = t[0].match(/:(.*?);/)[1], n = atob(t[1]);
536
+ let i = n.length;
496
537
  const o = new Uint8Array(i);
497
538
  for (; i--; )
498
- o[i] = t.charCodeAt(i);
539
+ o[i] = n.charCodeAt(i);
499
540
  return new Blob([o], { type: r });
500
541
  }
501
- function Me(e, n) {
502
- const r = e.split(","), t = r[0].match(/:(.*?);/)[1], i = atob(r[1]);
542
+ function _e(e, t) {
543
+ const r = e.split(","), n = r[0].match(/:(.*?);/)[1], i = atob(r[1]);
503
544
  let o = i.length;
504
545
  const u = new Uint8Array(o);
505
546
  for (; o--; )
506
547
  u[o] = i.charCodeAt(o);
507
- return new File([u], n, { type: t });
548
+ return new File([u], t, { type: n });
508
549
  }
509
- function Ve(e, n, r) {
510
- return new window.File([e], n, { type: r });
550
+ function qe(e, t, r) {
551
+ return new window.File([e], t, { type: r });
511
552
  }
512
- function re(e = "") {
513
- const n = e.indexOf("?");
514
- return n > 0 ? `${e.substring(0, n)}` : e;
553
+ function ue(e) {
554
+ if (!e || typeof e != "string")
555
+ return "";
556
+ const t = e.indexOf("?");
557
+ return t > 0 ? `${e.substring(0, t)}` : e;
515
558
  }
516
- function A(e = "") {
517
- e = re(e);
518
- const n = e.lastIndexOf(".");
519
- return n > 0 ? `${e.substring(n).split("?")[0]}`.split(".")[1] : "";
559
+ function E(e) {
560
+ var n, i, o, u, c;
561
+ if (!e || typeof e != "string")
562
+ return "";
563
+ const t = ue(e), r = t.lastIndexOf(".");
564
+ return r > 0 && ((c = (u = `${(o = (i = (n = t == null ? void 0 : t.substring) == null ? void 0 : n.call(t, r)) == null ? void 0 : i.split("?")) == null ? void 0 : o[0]}`) == null ? void 0 : u.split(".")) == null ? void 0 : c[1]) || "";
520
565
  }
521
- function p(e, n) {
522
- if (n)
523
- return n;
566
+ function m(e, t) {
567
+ if (t)
568
+ return t;
524
569
  if (!e || e === "data:")
525
570
  return "4";
526
571
  let r = "4";
527
- return E(e) ? e.includes("data:image/") ? r = "png" : e.includes("data:video/") ? r = "mp4" : e.includes("data:audio/") && (r = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? r = "png" : e.includes("video") ? r = "mp4" : e.includes("audio") && (r = "mp3")) : r = A(e).toLowerCase(), g.imageType.includes(r) ? "1" : g.videoType.includes(r) ? "3" : g.audioType.includes(r) ? "2" : "4";
572
+ return T(e) ? e.includes("data:image/") ? r = "png" : e.includes("data:video/") ? r = "mp4" : e.includes("data:audio/") && (r = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? r = "png" : e.includes("video") ? r = "mp4" : e.includes("audio") && (r = "mp3")) : r = E(e).toLowerCase(), w.imageType.includes(r) ? "1" : w.videoType.includes(r) ? "3" : w.audioType.includes(r) ? "2" : "4";
528
573
  }
529
- function ie(e) {
530
- const { url: n = "", fileType: r = "1" } = e;
531
- let t = "";
532
- return n instanceof File ? t = URL.createObjectURL(n) : E(n) ? t = n : n instanceof Blob ? t = URL.createObjectURL(n) : (n.includes("https") || n.includes("http")) && (t = n), new Promise((i) => {
533
- let o;
534
- r === "1" ? (o = document.createElement("img"), o.src = t) : r === "2" ? (o = document.createElement("audio"), o.src = t) : r === "3" && (o = document.createElement("video"), o.src = t), r === "1" ? o.onload = function() {
535
- i({
536
- play: !0,
537
- width: o.width || 0,
538
- height: o.height || 0
539
- }), o = null;
540
- } : o.oncanplay = function() {
541
- i({
542
- play: !0,
543
- duration: o.duration,
544
- width: (o == null ? void 0 : o.videoWidth) || 0,
545
- height: (o == null ? void 0 : o.videoHeight) || 0
546
- }), o = null;
547
- }, o.onerror = function() {
548
- i({
549
- play: !1
550
- }), o = null;
574
+ function ce(e) {
575
+ const { url: t = "", fileType: r = "1" } = e || {};
576
+ let n = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
577
+ function o() {
578
+ i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
579
+ }
580
+ return t instanceof File ? n = URL.createObjectURL(t) : T(t) ? n = t : t instanceof Blob ? n = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (n = t), new Promise((u) => {
581
+ let c;
582
+ r === "1" ? (c = document.createElement("img"), c.src = n) : r === "2" ? (c = document.createElement("audio"), c.src = n) : r === "3" && (c = document.createElement("video"), c.src = n), r === "1" ? c.onload = function() {
583
+ o(), i.play = !0, i.width = c.width || 0, i.height = c.height || 0, u(i), c = null;
584
+ } : c.oncanplay = function() {
585
+ o(), i.play = !0, i.width = (c == null ? void 0 : c.videoWidth) || 0, i.height = (c == null ? void 0 : c.videoHeight) || 0, i.duration = (c == null ? void 0 : c.duration) || 0, u(i), c = null;
586
+ }, c.onerror = function() {
587
+ o(), u(i), c = null;
551
588
  };
552
589
  });
553
590
  }
554
- async function $e(e) {
555
- const { url: n = "", currentTime: r, videoSuffix: t = "", vidoeAllowPlay: i = !1 } = e;
556
- let o = "", u = t, c = "1", f;
557
- return n instanceof File ? (o = URL.createObjectURL(n), u = A(n.name), c = p(n.name)) : n instanceof Blob ? (o = URL.createObjectURL(n), c = p(n)) : E(n) ? (o = n, c = p(n)) : (n.includes("https") || n.includes("http")) && (o = n, u = A(n), c = p(n)), (u ? g.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? T(o, r) : (f = await ie({
591
+ async function Je(e) {
592
+ const { url: t = "", currentTime: r, videoSuffix: n = "", vidoeAllowPlay: i = !1 } = e;
593
+ let o = "", u = n, c = "1", f;
594
+ return t instanceof File ? (o = URL.createObjectURL(t), u = E(t.name), c = m(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = m(t)) : T(t) ? (o = t, c = m(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = E(t), c = m(t)), (u ? w.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? D(o, r) : (f = await ce({
558
595
  url: o,
559
596
  fileType: c
560
- }), f.play ? T(o, r) : new Promise((l) => {
561
- l("");
562
- })) : new Promise((l) => {
563
- l("");
597
+ }), f.play ? D(o, r) : new Promise((a) => {
598
+ a("");
599
+ })) : new Promise((a) => {
600
+ a("");
564
601
  });
565
602
  }
566
- async function T(e, n = 0) {
603
+ async function D(e, t = 0) {
567
604
  return new Promise((r) => {
568
- let t = document.createElement("video");
569
- t.controls = !0, t.muted = !0, t.setAttribute("src", e), t.setAttribute("muted", String(!0)), t.setAttribute("crossorigin", "anonymous"), t.setAttribute("autoplay", String(!0)), t && t.addEventListener("loadeddata", async function() {
605
+ let n = document.createElement("video");
606
+ n && (n.controls = !0, n.muted = !0, n.setAttribute("src", e), n.setAttribute("muted", String(!0)), n.setAttribute("crossorigin", "anonymous"), n.setAttribute("autoplay", String(!0)), n.addEventListener("loadeddata", async function() {
570
607
  let i;
571
- t == null || t.addEventListener("seeked", async function() {
608
+ for (n == null || n.addEventListener("seeked", async function() {
572
609
  i && i();
573
- });
574
- const o = (t == null ? void 0 : t.duration) || 0;
575
- for (; n < o; ) {
576
- t && (t.currentTime = n), await new Promise(($) => i = $);
577
- const u = document.createElement("canvas"), c = 0.8, f = u.getContext("2d"), a = (t == null ? void 0 : t.videoWidth) || 0 * c, l = (t == null ? void 0 : t.videoHeight) || 0 * c, s = 0;
578
- u.width = (t == null ? void 0 : t.videoWidth) || 0 * c, u.height = (t == null ? void 0 : t.videoHeight) || 0 * c, f.drawImage(t, 0, 0, a + s, l + s), t = null, r(a === 0 || l === 0 ? "" : u.toDataURL("image/png", 1));
610
+ }); t < ((n == null ? void 0 : n.duration) || 0); ) {
611
+ n && (n.currentTime = t), await new Promise((g) => i = g);
612
+ const o = document.createElement("canvas"), u = 0.8, c = o.getContext("2d"), f = (n == null ? void 0 : n.videoWidth) || 0 * u, s = (n == null ? void 0 : n.videoHeight) || 0 * u, a = 0;
613
+ o.width = (n == null ? void 0 : n.videoWidth) || 0 * u, o.height = (n == null ? void 0 : n.videoHeight) || 0 * u, n && c.drawImage(n, 0, 0, f + a, s + a), n = null, r(f === 0 || s === 0 ? "" : o.toDataURL("image/png", 1));
579
614
  }
580
- });
615
+ }));
581
616
  });
582
617
  }
583
- function E(e = "") {
618
+ function T(e = "") {
584
619
  return !!(e && [
585
620
  "data:image/",
586
621
  "data:video/",
587
622
  "data:audio/"
588
623
  ].find((r) => e.includes(r)));
589
624
  }
590
- function ze(e, n, r, t = !1) {
591
- e && n && r && e.addEventListener(n, r, t);
625
+ function Xe(e) {
626
+ return typeof e == "string" && /^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
592
627
  }
593
- function He(e, n, r, t = !1) {
594
- e && n && r && e.removeEventListener(n, r, t);
628
+ function Ze(e, t, r, n = !1) {
629
+ e && t && r && e.addEventListener(t, r, n);
595
630
  }
596
- function We() {
631
+ function Ye(e, t, r, n = !1) {
632
+ e && t && r && e.removeEventListener(t, r, n);
633
+ }
634
+ function Ge() {
597
635
  return /windows|win32/i.test(navigator.userAgent);
598
636
  }
599
- function _e(e) {
600
- return D(e) ? e : !!e;
637
+ function Qe(e) {
638
+ return $(e) ? e : !!e;
639
+ }
640
+ function L(e, t) {
641
+ const r = `^\\d+(?:\\.\\d{0,${e}})?`, n = new RegExp(r), i = t.toString().match(n);
642
+ if (i) {
643
+ const o = i[0];
644
+ if (o.includes(".")) {
645
+ const [u, c] = o.split(".");
646
+ if (/^0*$/.test(c))
647
+ return u;
648
+ }
649
+ return o;
650
+ }
651
+ return t.toString();
652
+ }
653
+ function ke(e, t) {
654
+ const { toChinese: r = !1, fixed: n = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4, u = d(n) ? n : 2, c = r ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
655
+ if (!d(e))
656
+ return {
657
+ str: `${e}`,
658
+ number: `${e}`
659
+ };
660
+ if (e < o)
661
+ return {
662
+ str: `${e}`,
663
+ number: `${e}`
664
+ };
665
+ if (u === 0) {
666
+ const s = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
667
+ return {
668
+ str: `${s}${c}`,
669
+ number: s,
670
+ unit: c
671
+ };
672
+ }
673
+ let f;
674
+ return e < 1e8 ? (f = L(u, e / 1e4), {
675
+ str: f + c,
676
+ number: f,
677
+ unit: c
678
+ }) : (f = L(u, e / 1e8), {
679
+ str: f + c,
680
+ number: f,
681
+ unit: c
682
+ });
683
+ }
684
+ function Ke(e, t) {
685
+ let r = 0;
686
+ const n = document.querySelector(t.root || "hiddenElement");
687
+ if (!n)
688
+ return 0;
689
+ const i = document.createElement(t.createName || "span");
690
+ return i.innerHTML = e, (t.cssObject || l(t.cssObject)) && Object.keys(t.cssObject).forEach((o) => {
691
+ var u, c;
692
+ (u = t.cssObject) != null && u[o] && (i.style[o] = (c = t.cssObject) == null ? void 0 : c[o]);
693
+ }), n.append(i), r = i.getBoundingClientRect()[t.type || "width"], n.removeChild(i), r;
601
694
  }
602
695
  export {
603
- je as arrayRepeat,
604
- Ve as blobToDataURL,
605
- p as checkFileType,
696
+ Be as arrayRepeat,
697
+ Ie as arraySlice,
698
+ qe as blobToDataURL,
699
+ m as checkFileType,
606
700
  Y as classNames,
607
- Te as compareArray,
608
- _e as convertValueBoolean,
609
- Ne as dataURLtoBlob,
610
- Me as dataURLtoFile,
611
- U as deepCopy,
612
- M as filterEmpty,
613
- Le as formatDuraton,
614
- Ue as genColumnKey,
615
- T as generateVidoePicture,
616
- Pe as getBase64,
617
- Ce as getBlobUrl,
618
- A as getFileSuffix,
619
- te as getLevelData,
620
- De as getMaxFloor,
621
- ie as getMediaInfos,
622
- Oe as getPrefixCls,
623
- ne as getRandomNumber,
701
+ ne as compareArray,
702
+ Ce as compareArraySort,
703
+ $e as compareArrayTimeSort,
704
+ re as compareToMaxTime,
705
+ Qe as convertValueBoolean,
706
+ He as dataURLtoBlob,
707
+ _e as dataURLtoFile,
708
+ x as deepCopy,
709
+ N as filterEmpty,
710
+ Me as formatDuraton,
711
+ L as formatNumber,
712
+ je as genColumnKey,
713
+ D as generateVidoePicture,
714
+ We as getBase64,
715
+ ze as getBlobUrl,
716
+ E as getFileSuffix,
717
+ oe as getLevelData,
718
+ Ne as getMaxFloor,
719
+ ce as getMediaInfos,
720
+ Te as getPrefixCls,
721
+ ie as getRandomNumber,
624
722
  G as getScroll,
625
- ue as getScrollContainer,
626
- K as getSlot,
627
- ee as getSlotVNode,
628
- Ae as getSlotsChildren,
629
- Se as getSlotsProps,
630
- Ie as getSortIndex,
631
- F as getValueFromObjectByKey,
632
- $e as getVideoCoverPicture,
633
- re as getVideoFileUrl,
634
- g as globalConfig,
635
- be as handleCurrentPage,
636
- Ee as handleShowIndex,
637
- Fe as hanndleField,
638
- L as is,
639
- B as isArray,
640
- E as isBase64,
641
- D as isBoolean,
642
- ye as isBrowser,
643
- h as isDeepEqualReact,
644
- k as isEmptyElement,
645
- ge as isFunction,
646
- fe as isImg,
647
- ce as isInContainer,
648
- ae as isNil,
649
- pe as isNumber,
650
- d as isObject,
723
+ se as getScrollContainer,
724
+ ee as getSlot,
725
+ te as getSlotVNode,
726
+ Re as getSlotsChildren,
727
+ be as getSlotsProps,
728
+ Le as getSortIndex,
729
+ Ke as getTextWidth,
730
+ C as getValueFromObjectByKey,
731
+ Je as getVideoCoverPicture,
732
+ ue as getVideoFileUrl,
733
+ w as globalConfig,
734
+ De as handleCurrentPage,
735
+ Ue as handleShowIndex,
736
+ Pe as hanndleEmptyField,
737
+ J as is,
738
+ p as isArray,
739
+ T as isBase64,
740
+ $ as isBoolean,
741
+ Ae as isBrowser,
742
+ Xe as isDataURLBase64,
743
+ A as isDeepEqualReact,
744
+ K as isEmptyElement,
745
+ we as isFunction,
746
+ le as isImg,
747
+ ae as isInContainer,
748
+ he as isJSONStr,
749
+ ye as isMobile,
750
+ de as isNil,
751
+ d as isNumber,
752
+ l as isObject,
651
753
  q as isScroll,
652
- w as isServer,
754
+ y as isServer,
653
755
  X as isString,
654
- le as isUrl,
655
- We as isWindowsOs,
656
- se as merge,
657
- de as nanoid,
658
- He as off,
659
- he as omitBoolean,
660
- xe as omitUndefined,
661
- ve as omitUndefinedAndEmptyArr,
662
- ze as on,
663
- Re as runFunction,
664
- me as scrollTo,
756
+ Z as isTablet,
757
+ pe as isUrl,
758
+ Ge as isWindowsOs,
759
+ ge as merge,
760
+ me as nanoid,
761
+ Ye as off,
762
+ Se as omitBoolean,
763
+ Oe as omitUndefined,
764
+ Ee as omitUndefinedAndEmptyArr,
765
+ Ze as on,
766
+ Fe as runFunction,
767
+ xe as scrollTo,
665
768
  V as slotRender,
666
- we as throttleByAnimationFrame,
667
- Be as treeData
769
+ ve as throttleByAnimationFrame,
770
+ ke as toConvertNumberShow,
771
+ Ve as treeData
668
772
  };