@mi-avalon/libs 0.0.25 → 0.0.26
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/constants/date.d.ts +2 -0
- package/dist/constants/date.js +2 -0
- package/dist/constants/pattern.d.ts +66 -0
- package/dist/constants/pattern.js +66 -22
- package/dist/index.es.js +1323 -1034
- package/dist/index.umd.js +16 -16
- package/dist/utils/calc.d.ts +179 -12
- package/dist/utils/calc.js +355 -81
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import { theme as
|
|
7
|
-
import
|
|
8
|
-
function
|
|
1
|
+
var Xr = Object.defineProperty;
|
|
2
|
+
var Qr = (n, e, t) => e in n ? Xr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var m = (n, e, t) => (Qr(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import * as W from "react";
|
|
5
|
+
import Ve, { createContext as tr, useContext as rr, useEffect as ie, Component as en, useState as Y, useRef as K, useCallback as oe } from "react";
|
|
6
|
+
import { theme as ze, ConfigProvider as nr, Button as Pe, Affix as tn, Card as ar, Breadcrumb as It, Descriptions as Lt, Input as nt, InputNumber as rn, DatePicker as sr, Select as nn, Radio as an, Checkbox as sn, Upload as on, Mentions as cn, Cascader as ln, TreeSelect as un, Form as it, Row as fn, Col as dn, Modal as hn, Table as gn } from "antd";
|
|
7
|
+
import pn from "react-dom";
|
|
8
|
+
function mn(n, e) {
|
|
9
9
|
for (var t = 0; t < e.length; t++) {
|
|
10
|
-
const
|
|
11
|
-
if (typeof
|
|
12
|
-
for (const s in
|
|
13
|
-
if (s !== "default" && !(s in
|
|
14
|
-
const o = Object.getOwnPropertyDescriptor(
|
|
15
|
-
o && Object.defineProperty(
|
|
10
|
+
const r = e[t];
|
|
11
|
+
if (typeof r != "string" && !Array.isArray(r)) {
|
|
12
|
+
for (const s in r)
|
|
13
|
+
if (s !== "default" && !(s in n)) {
|
|
14
|
+
const o = Object.getOwnPropertyDescriptor(r, s);
|
|
15
|
+
o && Object.defineProperty(n, s, o.get ? o : {
|
|
16
16
|
enumerable: !0,
|
|
17
|
-
get: () =>
|
|
17
|
+
get: () => r[s]
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
return Object.freeze(Object.defineProperty(
|
|
22
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function vn(n) {
|
|
25
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var ct = { exports: {} }, _e = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.production.min.js
|
|
@@ -34,25 +34,25 @@ var it = { exports: {} }, Re = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
var
|
|
37
|
+
var Yt;
|
|
38
|
+
function bn() {
|
|
39
|
+
if (Yt)
|
|
40
|
+
return _e;
|
|
41
|
+
Yt = 1;
|
|
42
|
+
var n = Ve, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
43
43
|
function i(l, u, c) {
|
|
44
44
|
var g, d = {}, b = null, O = null;
|
|
45
45
|
c !== void 0 && (b = "" + c), u.key !== void 0 && (b = "" + u.key), u.ref !== void 0 && (O = u.ref);
|
|
46
46
|
for (g in u)
|
|
47
|
-
|
|
47
|
+
r.call(u, g) && !o.hasOwnProperty(g) && (d[g] = u[g]);
|
|
48
48
|
if (l && l.defaultProps)
|
|
49
49
|
for (g in u = l.defaultProps, u)
|
|
50
50
|
d[g] === void 0 && (d[g] = u[g]);
|
|
51
51
|
return { $$typeof: e, type: l, key: b, ref: O, props: d, _owner: s.current };
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return _e.Fragment = t, _e.jsx = i, _e.jsxs = i, _e;
|
|
54
54
|
}
|
|
55
|
-
var
|
|
55
|
+
var Ee = {};
|
|
56
56
|
/**
|
|
57
57
|
* @license React
|
|
58
58
|
* react-jsx-runtime.development.js
|
|
@@ -62,17 +62,17 @@ var _e = {};
|
|
|
62
62
|
* This source code is licensed under the MIT license found in the
|
|
63
63
|
* LICENSE file in the root directory of this source tree.
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
66
|
-
function
|
|
67
|
-
return
|
|
68
|
-
var
|
|
69
|
-
function
|
|
65
|
+
var Ht;
|
|
66
|
+
function yn() {
|
|
67
|
+
return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
|
|
68
|
+
var n = Ve, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), P = Symbol.iterator, T = "@@iterator";
|
|
69
|
+
function H(a) {
|
|
70
70
|
if (a === null || typeof a != "object")
|
|
71
71
|
return null;
|
|
72
|
-
var f =
|
|
72
|
+
var f = P && a[P] || a[T];
|
|
73
73
|
return typeof f == "function" ? f : null;
|
|
74
74
|
}
|
|
75
|
-
var j =
|
|
75
|
+
var j = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
76
76
|
function y(a) {
|
|
77
77
|
{
|
|
78
78
|
for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), v = 1; v < f; v++)
|
|
@@ -82,34 +82,34 @@ function vn() {
|
|
|
82
82
|
}
|
|
83
83
|
function E(a, f, h) {
|
|
84
84
|
{
|
|
85
|
-
var v = j.ReactDebugCurrentFrame,
|
|
86
|
-
|
|
87
|
-
var _ = h.map(function(
|
|
88
|
-
return String(
|
|
85
|
+
var v = j.ReactDebugCurrentFrame, C = v.getStackAddendum();
|
|
86
|
+
C !== "" && (f += "%s", h = h.concat([C]));
|
|
87
|
+
var _ = h.map(function(x) {
|
|
88
|
+
return String(x);
|
|
89
89
|
});
|
|
90
90
|
_.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, _);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
function
|
|
96
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
93
|
+
var M = !1, B = !1, ne = !1, J = !1, xe = !1, X;
|
|
94
|
+
X = Symbol.for("react.module.reference");
|
|
95
|
+
function ce(a) {
|
|
96
|
+
return !!(typeof a == "string" || typeof a == "function" || a === r || a === o || xe || a === s || a === c || a === g || J || a === O || M || B || ne || typeof a == "object" && a !== null && (a.$$typeof === b || a.$$typeof === d || a.$$typeof === i || a.$$typeof === l || a.$$typeof === u || // This needs to include all possible module reference object
|
|
97
97
|
// types supported by any Flight configuration anywhere since
|
|
98
98
|
// we don't know which Flight build this will end up being used
|
|
99
99
|
// with.
|
|
100
|
-
a.$$typeof ===
|
|
100
|
+
a.$$typeof === X || a.getModuleId !== void 0));
|
|
101
101
|
}
|
|
102
102
|
function Ce(a, f, h) {
|
|
103
103
|
var v = a.displayName;
|
|
104
104
|
if (v)
|
|
105
105
|
return v;
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var C = f.displayName || f.name || "";
|
|
107
|
+
return C !== "" ? h + "(" + C + ")" : h;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function z(a) {
|
|
110
110
|
return a.displayName || "Context";
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function D(a) {
|
|
113
113
|
if (a == null)
|
|
114
114
|
return null;
|
|
115
115
|
if (typeof a.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
|
@@ -117,7 +117,7 @@ function vn() {
|
|
|
117
117
|
if (typeof a == "string")
|
|
118
118
|
return a;
|
|
119
119
|
switch (a) {
|
|
120
|
-
case
|
|
120
|
+
case r:
|
|
121
121
|
return "Fragment";
|
|
122
122
|
case t:
|
|
123
123
|
return "Portal";
|
|
@@ -134,19 +134,19 @@ function vn() {
|
|
|
134
134
|
switch (a.$$typeof) {
|
|
135
135
|
case l:
|
|
136
136
|
var f = a;
|
|
137
|
-
return
|
|
137
|
+
return z(f) + ".Consumer";
|
|
138
138
|
case i:
|
|
139
139
|
var h = a;
|
|
140
|
-
return
|
|
140
|
+
return z(h._context) + ".Provider";
|
|
141
141
|
case u:
|
|
142
142
|
return Ce(a, a.render, "ForwardRef");
|
|
143
143
|
case d:
|
|
144
144
|
var v = a.displayName || null;
|
|
145
|
-
return v !== null ? v :
|
|
145
|
+
return v !== null ? v : D(a.type) || "Memo";
|
|
146
146
|
case b: {
|
|
147
|
-
var
|
|
147
|
+
var C = a, _ = C._payload, x = C._init;
|
|
148
148
|
try {
|
|
149
|
-
return
|
|
149
|
+
return D(x(_));
|
|
150
150
|
} catch {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
@@ -154,18 +154,18 @@ function vn() {
|
|
|
154
154
|
}
|
|
155
155
|
return null;
|
|
156
156
|
}
|
|
157
|
-
var
|
|
158
|
-
function
|
|
157
|
+
var V = Object.assign, S = 0, $, ee, q, le, te, ke, xt;
|
|
158
|
+
function Ct() {
|
|
159
159
|
}
|
|
160
|
-
|
|
161
|
-
function
|
|
160
|
+
Ct.__reactDisabledLog = !0;
|
|
161
|
+
function _r() {
|
|
162
162
|
{
|
|
163
163
|
if (S === 0) {
|
|
164
|
-
$ = console.log,
|
|
164
|
+
$ = console.log, ee = console.info, q = console.warn, le = console.error, te = console.group, ke = console.groupCollapsed, xt = console.groupEnd;
|
|
165
165
|
var a = {
|
|
166
166
|
configurable: !0,
|
|
167
167
|
enumerable: !0,
|
|
168
|
-
value:
|
|
168
|
+
value: Ct,
|
|
169
169
|
writable: !0
|
|
170
170
|
};
|
|
171
171
|
Object.defineProperties(console, {
|
|
@@ -181,7 +181,7 @@ function vn() {
|
|
|
181
181
|
S++;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Er() {
|
|
185
185
|
{
|
|
186
186
|
if (S--, S === 0) {
|
|
187
187
|
var a = {
|
|
@@ -190,88 +190,88 @@ function vn() {
|
|
|
190
190
|
writable: !0
|
|
191
191
|
};
|
|
192
192
|
Object.defineProperties(console, {
|
|
193
|
-
log:
|
|
193
|
+
log: V({}, a, {
|
|
194
194
|
value: $
|
|
195
195
|
}),
|
|
196
|
-
info:
|
|
197
|
-
value:
|
|
196
|
+
info: V({}, a, {
|
|
197
|
+
value: ee
|
|
198
198
|
}),
|
|
199
|
-
warn:
|
|
200
|
-
value:
|
|
199
|
+
warn: V({}, a, {
|
|
200
|
+
value: q
|
|
201
201
|
}),
|
|
202
|
-
error:
|
|
203
|
-
value:
|
|
202
|
+
error: V({}, a, {
|
|
203
|
+
value: le
|
|
204
204
|
}),
|
|
205
|
-
group:
|
|
206
|
-
value:
|
|
205
|
+
group: V({}, a, {
|
|
206
|
+
value: te
|
|
207
207
|
}),
|
|
208
|
-
groupCollapsed:
|
|
208
|
+
groupCollapsed: V({}, a, {
|
|
209
209
|
value: ke
|
|
210
210
|
}),
|
|
211
|
-
groupEnd:
|
|
212
|
-
value:
|
|
211
|
+
groupEnd: V({}, a, {
|
|
212
|
+
value: xt
|
|
213
213
|
})
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
S < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
var Ze = j.ReactCurrentDispatcher,
|
|
220
|
-
function
|
|
219
|
+
var Ze = j.ReactCurrentDispatcher, Ge;
|
|
220
|
+
function Ae(a, f, h) {
|
|
221
221
|
{
|
|
222
|
-
if (
|
|
222
|
+
if (Ge === void 0)
|
|
223
223
|
try {
|
|
224
224
|
throw Error();
|
|
225
|
-
} catch (
|
|
226
|
-
var v =
|
|
227
|
-
|
|
225
|
+
} catch (C) {
|
|
226
|
+
var v = C.stack.trim().match(/\n( *(at )?)/);
|
|
227
|
+
Ge = v && v[1] || "";
|
|
228
228
|
}
|
|
229
229
|
return `
|
|
230
|
-
` +
|
|
230
|
+
` + Ge + a;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
var Ke = !1,
|
|
233
|
+
var Ke = !1, $e;
|
|
234
234
|
{
|
|
235
|
-
var
|
|
236
|
-
|
|
235
|
+
var Or = typeof WeakMap == "function" ? WeakMap : Map;
|
|
236
|
+
$e = new Or();
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function St(a, f) {
|
|
239
239
|
if (!a || Ke)
|
|
240
240
|
return "";
|
|
241
241
|
{
|
|
242
|
-
var h =
|
|
242
|
+
var h = $e.get(a);
|
|
243
243
|
if (h !== void 0)
|
|
244
244
|
return h;
|
|
245
245
|
}
|
|
246
246
|
var v;
|
|
247
247
|
Ke = !0;
|
|
248
|
-
var
|
|
248
|
+
var C = Error.prepareStackTrace;
|
|
249
249
|
Error.prepareStackTrace = void 0;
|
|
250
250
|
var _;
|
|
251
|
-
_ = Ze.current, Ze.current = null,
|
|
251
|
+
_ = Ze.current, Ze.current = null, _r();
|
|
252
252
|
try {
|
|
253
253
|
if (f) {
|
|
254
|
-
var
|
|
254
|
+
var x = function() {
|
|
255
255
|
throw Error();
|
|
256
256
|
};
|
|
257
|
-
if (Object.defineProperty(
|
|
257
|
+
if (Object.defineProperty(x.prototype, "props", {
|
|
258
258
|
set: function() {
|
|
259
259
|
throw Error();
|
|
260
260
|
}
|
|
261
261
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
262
262
|
try {
|
|
263
|
-
Reflect.construct(
|
|
263
|
+
Reflect.construct(x, []);
|
|
264
264
|
} catch (Z) {
|
|
265
265
|
v = Z;
|
|
266
266
|
}
|
|
267
|
-
Reflect.construct(a, [],
|
|
267
|
+
Reflect.construct(a, [], x);
|
|
268
268
|
} else {
|
|
269
269
|
try {
|
|
270
|
-
|
|
270
|
+
x.call();
|
|
271
271
|
} catch (Z) {
|
|
272
272
|
v = Z;
|
|
273
273
|
}
|
|
274
|
-
a.call(
|
|
274
|
+
a.call(x.prototype);
|
|
275
275
|
}
|
|
276
276
|
} else {
|
|
277
277
|
try {
|
|
@@ -283,149 +283,149 @@ function vn() {
|
|
|
283
283
|
}
|
|
284
284
|
} catch (Z) {
|
|
285
285
|
if (Z && v && typeof Z.stack == "string") {
|
|
286
|
-
for (var
|
|
287
|
-
`),
|
|
288
|
-
`),
|
|
286
|
+
for (var w = Z.stack.split(`
|
|
287
|
+
`), F = v.stack.split(`
|
|
288
|
+
`), k = w.length - 1, A = F.length - 1; k >= 1 && A >= 0 && w[k] !== F[A]; )
|
|
289
289
|
A--;
|
|
290
|
-
for (;
|
|
291
|
-
if (
|
|
292
|
-
if (
|
|
290
|
+
for (; k >= 1 && A >= 0; k--, A--)
|
|
291
|
+
if (w[k] !== F[A]) {
|
|
292
|
+
if (k !== 1 || A !== 1)
|
|
293
293
|
do
|
|
294
|
-
if (
|
|
295
|
-
var
|
|
296
|
-
` +
|
|
297
|
-
return a.displayName &&
|
|
294
|
+
if (k--, A--, A < 0 || w[k] !== F[A]) {
|
|
295
|
+
var Q = `
|
|
296
|
+
` + w[k].replace(" at new ", " at ");
|
|
297
|
+
return a.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", a.displayName)), typeof a == "function" && $e.set(a, Q), Q;
|
|
298
298
|
}
|
|
299
|
-
while (
|
|
299
|
+
while (k >= 1 && A >= 0);
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
} finally {
|
|
304
|
-
Ke = !1, Ze.current = _,
|
|
304
|
+
Ke = !1, Ze.current = _, Er(), Error.prepareStackTrace = C;
|
|
305
305
|
}
|
|
306
|
-
var
|
|
307
|
-
return typeof a == "function" &&
|
|
306
|
+
var ge = a ? a.displayName || a.name : "", ue = ge ? Ae(ge) : "";
|
|
307
|
+
return typeof a == "function" && $e.set(a, ue), ue;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
return
|
|
309
|
+
function jr(a, f, h) {
|
|
310
|
+
return St(a, !1);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Nr(a) {
|
|
313
313
|
var f = a.prototype;
|
|
314
314
|
return !!(f && f.isReactComponent);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Me(a, f, h) {
|
|
317
317
|
if (a == null)
|
|
318
318
|
return "";
|
|
319
319
|
if (typeof a == "function")
|
|
320
|
-
return
|
|
320
|
+
return St(a, Nr(a));
|
|
321
321
|
if (typeof a == "string")
|
|
322
|
-
return
|
|
322
|
+
return Ae(a);
|
|
323
323
|
switch (a) {
|
|
324
324
|
case c:
|
|
325
|
-
return
|
|
325
|
+
return Ae("Suspense");
|
|
326
326
|
case g:
|
|
327
|
-
return
|
|
327
|
+
return Ae("SuspenseList");
|
|
328
328
|
}
|
|
329
329
|
if (typeof a == "object")
|
|
330
330
|
switch (a.$$typeof) {
|
|
331
331
|
case u:
|
|
332
|
-
return
|
|
332
|
+
return jr(a.render);
|
|
333
333
|
case d:
|
|
334
|
-
return
|
|
334
|
+
return Me(a.type, f, h);
|
|
335
335
|
case b: {
|
|
336
|
-
var v = a,
|
|
336
|
+
var v = a, C = v._payload, _ = v._init;
|
|
337
337
|
try {
|
|
338
|
-
return
|
|
338
|
+
return Me(_(C), f, h);
|
|
339
339
|
} catch {
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return "";
|
|
344
344
|
}
|
|
345
|
-
var
|
|
345
|
+
var Se = Object.prototype.hasOwnProperty, Rt = {}, _t = j.ReactDebugCurrentFrame;
|
|
346
346
|
function Ie(a) {
|
|
347
347
|
if (a) {
|
|
348
|
-
var f = a._owner, h =
|
|
349
|
-
|
|
348
|
+
var f = a._owner, h = Me(a.type, a._source, f ? f.type : null);
|
|
349
|
+
_t.setExtraStackFrame(h);
|
|
350
350
|
} else
|
|
351
|
-
|
|
351
|
+
_t.setExtraStackFrame(null);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Pr(a, f, h, v, C) {
|
|
354
354
|
{
|
|
355
|
-
var _ = Function.call.bind(
|
|
356
|
-
for (var
|
|
357
|
-
if (_(a,
|
|
358
|
-
var
|
|
355
|
+
var _ = Function.call.bind(Se);
|
|
356
|
+
for (var x in a)
|
|
357
|
+
if (_(a, x)) {
|
|
358
|
+
var w = void 0;
|
|
359
359
|
try {
|
|
360
|
-
if (typeof a[
|
|
361
|
-
var
|
|
362
|
-
throw
|
|
360
|
+
if (typeof a[x] != "function") {
|
|
361
|
+
var F = Error((v || "React class") + ": " + h + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
362
|
+
throw F.name = "Invariant Violation", F;
|
|
363
363
|
}
|
|
364
|
-
|
|
365
|
-
} catch (
|
|
366
|
-
|
|
364
|
+
w = a[x](f, x, v, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
365
|
+
} catch (k) {
|
|
366
|
+
w = k;
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
w && !(w instanceof Error) && (Ie(C), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", h, x, typeof w), Ie(null)), w instanceof Error && !(w.message in Rt) && (Rt[w.message] = !0, Ie(C), y("Failed %s type: %s", h, w.message), Ie(null));
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
var
|
|
373
|
-
function
|
|
374
|
-
return
|
|
372
|
+
var Tr = Array.isArray;
|
|
373
|
+
function Je(a) {
|
|
374
|
+
return Tr(a);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Dr(a) {
|
|
377
377
|
{
|
|
378
378
|
var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
379
379
|
return h;
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function kr(a) {
|
|
383
383
|
try {
|
|
384
|
-
return
|
|
384
|
+
return Et(a), !1;
|
|
385
385
|
} catch {
|
|
386
386
|
return !0;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Et(a) {
|
|
390
390
|
return "" + a;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
if (
|
|
394
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
392
|
+
function Ot(a) {
|
|
393
|
+
if (kr(a))
|
|
394
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Dr(a)), Et(a);
|
|
395
395
|
}
|
|
396
|
-
var
|
|
396
|
+
var Re = j.ReactCurrentOwner, Ar = {
|
|
397
397
|
key: !0,
|
|
398
398
|
ref: !0,
|
|
399
399
|
__self: !0,
|
|
400
400
|
__source: !0
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
function
|
|
404
|
-
if (
|
|
401
|
+
}, jt, Nt, Xe;
|
|
402
|
+
Xe = {};
|
|
403
|
+
function $r(a) {
|
|
404
|
+
if (Se.call(a, "ref")) {
|
|
405
405
|
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
406
406
|
if (f && f.isReactWarning)
|
|
407
407
|
return !1;
|
|
408
408
|
}
|
|
409
409
|
return a.ref !== void 0;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
if (
|
|
411
|
+
function Mr(a) {
|
|
412
|
+
if (Se.call(a, "key")) {
|
|
413
413
|
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
414
414
|
if (f && f.isReactWarning)
|
|
415
415
|
return !1;
|
|
416
416
|
}
|
|
417
417
|
return a.key !== void 0;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
if (typeof a.ref == "string" &&
|
|
421
|
-
var h =
|
|
422
|
-
|
|
419
|
+
function Ir(a, f) {
|
|
420
|
+
if (typeof a.ref == "string" && Re.current && f && Re.current.stateNode !== f) {
|
|
421
|
+
var h = D(Re.current.type);
|
|
422
|
+
Xe[h] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', D(Re.current.type), a.ref), Xe[h] = !0);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Lr(a, f) {
|
|
426
426
|
{
|
|
427
427
|
var h = function() {
|
|
428
|
-
|
|
428
|
+
jt || (jt = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
429
429
|
};
|
|
430
430
|
h.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
431
431
|
get: h,
|
|
@@ -433,10 +433,10 @@ function vn() {
|
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function Yr(a, f) {
|
|
437
437
|
{
|
|
438
438
|
var h = function() {
|
|
439
|
-
|
|
439
|
+
Nt || (Nt = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
440
440
|
};
|
|
441
441
|
h.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
442
442
|
get: h,
|
|
@@ -444,70 +444,70 @@ function vn() {
|
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
var
|
|
448
|
-
var
|
|
447
|
+
var Hr = function(a, f, h, v, C, _, x) {
|
|
448
|
+
var w = {
|
|
449
449
|
// This tag allows us to uniquely identify this as a React Element
|
|
450
450
|
$$typeof: e,
|
|
451
451
|
// Built-in properties that belong on the element
|
|
452
452
|
type: a,
|
|
453
453
|
key: f,
|
|
454
454
|
ref: h,
|
|
455
|
-
props:
|
|
455
|
+
props: x,
|
|
456
456
|
// Record the component responsible for creating this element.
|
|
457
457
|
_owner: _
|
|
458
458
|
};
|
|
459
|
-
return
|
|
459
|
+
return w._store = {}, Object.defineProperty(w._store, "validated", {
|
|
460
460
|
configurable: !1,
|
|
461
461
|
enumerable: !1,
|
|
462
462
|
writable: !0,
|
|
463
463
|
value: !1
|
|
464
|
-
}), Object.defineProperty(
|
|
464
|
+
}), Object.defineProperty(w, "_self", {
|
|
465
465
|
configurable: !1,
|
|
466
466
|
enumerable: !1,
|
|
467
467
|
writable: !1,
|
|
468
468
|
value: v
|
|
469
|
-
}), Object.defineProperty(
|
|
469
|
+
}), Object.defineProperty(w, "_source", {
|
|
470
470
|
configurable: !1,
|
|
471
471
|
enumerable: !1,
|
|
472
472
|
writable: !1,
|
|
473
|
-
value:
|
|
474
|
-
}), Object.freeze && (Object.freeze(
|
|
473
|
+
value: C
|
|
474
|
+
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
475
475
|
};
|
|
476
|
-
function zr(a, f, h, v,
|
|
476
|
+
function zr(a, f, h, v, C) {
|
|
477
477
|
{
|
|
478
|
-
var _,
|
|
479
|
-
h !== void 0 && (
|
|
478
|
+
var _, x = {}, w = null, F = null;
|
|
479
|
+
h !== void 0 && (Ot(h), w = "" + h), Mr(f) && (Ot(f.key), w = "" + f.key), $r(f) && (F = f.ref, Ir(f, C));
|
|
480
480
|
for (_ in f)
|
|
481
|
-
|
|
481
|
+
Se.call(f, _) && !Ar.hasOwnProperty(_) && (x[_] = f[_]);
|
|
482
482
|
if (a && a.defaultProps) {
|
|
483
|
-
var
|
|
484
|
-
for (_ in
|
|
485
|
-
|
|
483
|
+
var k = a.defaultProps;
|
|
484
|
+
for (_ in k)
|
|
485
|
+
x[_] === void 0 && (x[_] = k[_]);
|
|
486
486
|
}
|
|
487
|
-
if (
|
|
487
|
+
if (w || F) {
|
|
488
488
|
var A = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
489
|
-
|
|
489
|
+
w && Lr(x, A), F && Yr(x, A);
|
|
490
490
|
}
|
|
491
|
-
return
|
|
491
|
+
return Hr(a, w, F, C, v, Re.current, x);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
var
|
|
495
|
-
function
|
|
494
|
+
var Qe = j.ReactCurrentOwner, Pt = j.ReactDebugCurrentFrame;
|
|
495
|
+
function he(a) {
|
|
496
496
|
if (a) {
|
|
497
|
-
var f = a._owner, h =
|
|
498
|
-
|
|
497
|
+
var f = a._owner, h = Me(a.type, a._source, f ? f.type : null);
|
|
498
|
+
Pt.setExtraStackFrame(h);
|
|
499
499
|
} else
|
|
500
|
-
|
|
500
|
+
Pt.setExtraStackFrame(null);
|
|
501
501
|
}
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
function
|
|
502
|
+
var et;
|
|
503
|
+
et = !1;
|
|
504
|
+
function tt(a) {
|
|
505
505
|
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Tt() {
|
|
508
508
|
{
|
|
509
|
-
if (
|
|
510
|
-
var a =
|
|
509
|
+
if (Qe.current) {
|
|
510
|
+
var a = D(Qe.current.type);
|
|
511
511
|
if (a)
|
|
512
512
|
return `
|
|
513
513
|
|
|
@@ -516,7 +516,7 @@ Check the render method of \`` + a + "`.";
|
|
|
516
516
|
return "";
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Vr(a) {
|
|
520
520
|
{
|
|
521
521
|
if (a !== void 0) {
|
|
522
522
|
var f = a.fileName.replace(/^.*[\\\/]/, ""), h = a.lineNumber;
|
|
@@ -527,10 +527,10 @@ Check your code at ` + f + ":" + h + ".";
|
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
var
|
|
531
|
-
function
|
|
530
|
+
var Dt = {};
|
|
531
|
+
function Fr(a) {
|
|
532
532
|
{
|
|
533
|
-
var f =
|
|
533
|
+
var f = Tt();
|
|
534
534
|
if (!f) {
|
|
535
535
|
var h = typeof a == "string" ? a : a.displayName || a.name;
|
|
536
536
|
h && (f = `
|
|
@@ -540,39 +540,39 @@ Check the top-level render call using <` + h + ">.");
|
|
|
540
540
|
return f;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function kt(a, f) {
|
|
544
544
|
{
|
|
545
545
|
if (!a._store || a._store.validated || a.key != null)
|
|
546
546
|
return;
|
|
547
547
|
a._store.validated = !0;
|
|
548
|
-
var h =
|
|
549
|
-
if (
|
|
548
|
+
var h = Fr(f);
|
|
549
|
+
if (Dt[h])
|
|
550
550
|
return;
|
|
551
|
-
|
|
551
|
+
Dt[h] = !0;
|
|
552
552
|
var v = "";
|
|
553
|
-
a && a._owner && a._owner !==
|
|
553
|
+
a && a._owner && a._owner !== Qe.current && (v = " It was passed a child from " + D(a._owner.type) + "."), he(a), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, v), he(null);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function At(a, f) {
|
|
557
557
|
{
|
|
558
558
|
if (typeof a != "object")
|
|
559
559
|
return;
|
|
560
|
-
if (
|
|
560
|
+
if (Je(a))
|
|
561
561
|
for (var h = 0; h < a.length; h++) {
|
|
562
562
|
var v = a[h];
|
|
563
|
-
|
|
563
|
+
tt(v) && kt(v, f);
|
|
564
564
|
}
|
|
565
|
-
else if (
|
|
565
|
+
else if (tt(a))
|
|
566
566
|
a._store && (a._store.validated = !0);
|
|
567
567
|
else if (a) {
|
|
568
|
-
var
|
|
569
|
-
if (typeof
|
|
570
|
-
for (var _ =
|
|
571
|
-
|
|
568
|
+
var C = H(a);
|
|
569
|
+
if (typeof C == "function" && C !== a.entries)
|
|
570
|
+
for (var _ = C.call(a), x; !(x = _.next()).done; )
|
|
571
|
+
tt(x.value) && kt(x.value, f);
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Ur(a) {
|
|
576
576
|
{
|
|
577
577
|
var f = a.type;
|
|
578
578
|
if (f == null || typeof f == "string")
|
|
@@ -587,159 +587,402 @@ Check the top-level render call using <` + h + ">.");
|
|
|
587
587
|
else
|
|
588
588
|
return;
|
|
589
589
|
if (h) {
|
|
590
|
-
var v =
|
|
591
|
-
|
|
592
|
-
} else if (f.PropTypes !== void 0 && !
|
|
593
|
-
|
|
594
|
-
var
|
|
595
|
-
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
590
|
+
var v = D(f);
|
|
591
|
+
Pr(h, a.props, "prop", v, a);
|
|
592
|
+
} else if (f.PropTypes !== void 0 && !et) {
|
|
593
|
+
et = !0;
|
|
594
|
+
var C = D(f);
|
|
595
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
596
596
|
}
|
|
597
597
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Wr(a) {
|
|
601
601
|
{
|
|
602
602
|
for (var f = Object.keys(a.props), h = 0; h < f.length; h++) {
|
|
603
603
|
var v = f[h];
|
|
604
604
|
if (v !== "children" && v !== "key") {
|
|
605
|
-
|
|
605
|
+
he(a), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), he(null);
|
|
606
606
|
break;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
a.ref !== null && (
|
|
609
|
+
a.ref !== null && (he(a), y("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
var
|
|
613
|
-
function
|
|
612
|
+
var $t = {};
|
|
613
|
+
function Mt(a, f, h, v, C, _) {
|
|
614
614
|
{
|
|
615
|
-
var
|
|
616
|
-
if (!
|
|
617
|
-
var
|
|
618
|
-
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
var
|
|
622
|
-
a === null ?
|
|
615
|
+
var x = ce(a);
|
|
616
|
+
if (!x) {
|
|
617
|
+
var w = "";
|
|
618
|
+
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
619
|
+
var F = Vr(C);
|
|
620
|
+
F ? w += F : w += Tt();
|
|
621
|
+
var k;
|
|
622
|
+
a === null ? k = "null" : Je(a) ? k = "array" : a !== void 0 && a.$$typeof === e ? (k = "<" + (D(a.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : k = typeof a, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, w);
|
|
623
623
|
}
|
|
624
|
-
var A = zr(a, f, h,
|
|
624
|
+
var A = zr(a, f, h, C, _);
|
|
625
625
|
if (A == null)
|
|
626
626
|
return A;
|
|
627
|
-
if (
|
|
628
|
-
var
|
|
629
|
-
if (
|
|
627
|
+
if (x) {
|
|
628
|
+
var Q = f.children;
|
|
629
|
+
if (Q !== void 0)
|
|
630
630
|
if (v)
|
|
631
|
-
if (
|
|
632
|
-
for (var
|
|
633
|
-
|
|
634
|
-
Object.freeze && Object.freeze(
|
|
631
|
+
if (Je(Q)) {
|
|
632
|
+
for (var ge = 0; ge < Q.length; ge++)
|
|
633
|
+
At(Q[ge], a);
|
|
634
|
+
Object.freeze && Object.freeze(Q);
|
|
635
635
|
} else
|
|
636
636
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
637
637
|
else
|
|
638
|
-
|
|
638
|
+
At(Q, a);
|
|
639
639
|
}
|
|
640
|
-
if (
|
|
641
|
-
var
|
|
642
|
-
return
|
|
643
|
-
}),
|
|
644
|
-
if (
|
|
645
|
-
var
|
|
640
|
+
if (Se.call(f, "key")) {
|
|
641
|
+
var ue = D(a), Z = Object.keys(f).filter(function(Jr) {
|
|
642
|
+
return Jr !== "key";
|
|
643
|
+
}), rt = Z.length > 0 ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
644
|
+
if (!$t[ue + rt]) {
|
|
645
|
+
var Kr = Z.length > 0 ? "{" + Z.join(": ..., ") + ": ...}" : "{}";
|
|
646
646
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
647
647
|
let props = %s;
|
|
648
648
|
<%s {...props} />
|
|
649
649
|
React keys must be passed directly to JSX without using spread:
|
|
650
650
|
let props = %s;
|
|
651
|
-
<%s key={someKey} {...props} />`,
|
|
651
|
+
<%s key={someKey} {...props} />`, rt, ue, Kr, ue), $t[ue + rt] = !0;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
return a ===
|
|
654
|
+
return a === r ? Wr(A) : Ur(A), A;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
return
|
|
657
|
+
function Br(a, f, h) {
|
|
658
|
+
return Mt(a, f, h, !0);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
660
|
+
function qr(a, f, h) {
|
|
661
|
+
return Mt(a, f, h, !1);
|
|
662
662
|
}
|
|
663
|
-
var
|
|
664
|
-
|
|
665
|
-
}()),
|
|
663
|
+
var Zr = qr, Gr = Br;
|
|
664
|
+
Ee.Fragment = r, Ee.jsx = Zr, Ee.jsxs = Gr;
|
|
665
|
+
}()), Ee;
|
|
666
666
|
}
|
|
667
|
-
process.env.NODE_ENV === "production" ?
|
|
668
|
-
var p =
|
|
669
|
-
class
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
try {
|
|
704
|
-
s = t.toString().split(".")[1].length;
|
|
705
|
-
} catch {
|
|
706
|
-
s = 0;
|
|
707
|
-
}
|
|
708
|
-
return o = Math.pow(10, Math.max(n, s)), i = n >= s ? n : s, Number(((e * o - t * o) / o).toFixed(i));
|
|
667
|
+
process.env.NODE_ENV === "production" ? ct.exports = bn() : ct.exports = yn();
|
|
668
|
+
var p = ct.exports;
|
|
669
|
+
const L = class L {
|
|
670
|
+
/**
|
|
671
|
+
* 获取数字的小数位数长度
|
|
672
|
+
* @private
|
|
673
|
+
* @param num 要检查的数字
|
|
674
|
+
* @returns 小数位数长度
|
|
675
|
+
*/
|
|
676
|
+
static getDecimalLength(e) {
|
|
677
|
+
const t = e.toString(), r = t.indexOf(".");
|
|
678
|
+
return r === -1 ? 0 : t.length - r - 1;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* 将数字转换为整数(移除小数点)
|
|
682
|
+
* @private
|
|
683
|
+
* @param num 要转换的数字
|
|
684
|
+
* @param decimalPlaces 需要补零的小数位数
|
|
685
|
+
* @returns 转换后的整数值
|
|
686
|
+
*/
|
|
687
|
+
static toInteger(e, t) {
|
|
688
|
+
const r = e.toString().replace(".", "");
|
|
689
|
+
return Number(r) * Math.pow(10, t);
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* 精确加法运算(支持多个参数)
|
|
693
|
+
* @param args 要相加的数字序列
|
|
694
|
+
* @returns 所有数字的和
|
|
695
|
+
* @example
|
|
696
|
+
* cmx.add(0.1, 0.2) // 返回 0.3
|
|
697
|
+
* cmx.add(1, 2, 3) // 返回 6
|
|
698
|
+
*/
|
|
699
|
+
add(...e) {
|
|
700
|
+
return e.length < 2 ? e[0] || 0 : e.reduce((t, r) => {
|
|
701
|
+
const s = L.getDecimalLength(t), o = L.getDecimalLength(r), i = Math.max(s, o), l = Math.pow(10, i), u = L.toInteger(t, i - s), c = L.toInteger(r, i - o);
|
|
702
|
+
return (u + c) / l;
|
|
709
703
|
});
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* 精确减法运算
|
|
707
|
+
* @param arg1 被减数
|
|
708
|
+
* @param arg2 减数
|
|
709
|
+
* @returns 两数之差
|
|
710
|
+
* @example
|
|
711
|
+
* cmx.sub(0.3, 0.1) // 返回 0.2
|
|
712
|
+
*/
|
|
713
|
+
sub(e, t) {
|
|
714
|
+
const r = L.getDecimalLength(e), s = L.getDecimalLength(t), o = Math.max(r, s), i = Math.pow(10, o);
|
|
715
|
+
return Number(((e * i - t * i) / i).toFixed(o));
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* 精确乘法运算(支持多个参数)
|
|
719
|
+
* @param args 要相乘的数字序列
|
|
720
|
+
* @returns 所有数字的乘积
|
|
721
|
+
* @example
|
|
722
|
+
* cmx.mul(0.1, 0.2) // 返回 0.02
|
|
723
|
+
* cmx.mul(2, 3, 4) // 返回 24
|
|
724
|
+
*/
|
|
725
|
+
mul(...e) {
|
|
726
|
+
return e.length < 2 ? e[0] || 0 : e.reduce((t, r) => {
|
|
727
|
+
const s = L.getDecimalLength(t) + L.getDecimalLength(r), o = Number(t.toString().replace(".", "")), i = Number(r.toString().replace(".", ""));
|
|
728
|
+
return o * i / Math.pow(10, s);
|
|
724
729
|
});
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* 精确除法运算
|
|
733
|
+
* @param arg1 被除数
|
|
734
|
+
* @param arg2 除数
|
|
735
|
+
* @returns 两数之商
|
|
736
|
+
* @throws {Error} 除数为零时抛出错误
|
|
737
|
+
* @example
|
|
738
|
+
* cmx.div(0.3, 0.1) // 返回 3
|
|
739
|
+
*/
|
|
740
|
+
div(e, t) {
|
|
741
|
+
if (t === 0)
|
|
742
|
+
throw new Error("除数不能为零");
|
|
743
|
+
const r = 1 + Number.EPSILON, s = L.getDecimalLength(e), o = L.getDecimalLength(t), i = Number(e.toString().replace(".", "")) * r, l = Number(t.toString().replace(".", "")) * r;
|
|
744
|
+
return i / l * Math.pow(10, o - s);
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* 精确四舍五入
|
|
748
|
+
* @param num 要舍入的数字
|
|
749
|
+
* @param decimalPlaces 保留的小数位数(默认为0)
|
|
750
|
+
* @returns 舍入后的数字
|
|
751
|
+
* @example
|
|
752
|
+
* cmx.round(1.2345, 2) // 返回 1.23
|
|
753
|
+
*/
|
|
754
|
+
round(e, t = 0) {
|
|
755
|
+
const r = Math.pow(10, t);
|
|
756
|
+
return Math.round(e * r) / r;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* 计算百分比值
|
|
760
|
+
* @param value 基础值
|
|
761
|
+
* @param percent 百分比
|
|
762
|
+
* @returns 计算后的百分比值
|
|
763
|
+
* @example
|
|
764
|
+
* cmx.percent(200, 15) // 返回 30(200的15%)
|
|
765
|
+
*/
|
|
766
|
+
percent(e, t) {
|
|
767
|
+
return this.div(this.mul(e, t), 100);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* 计算平均数
|
|
771
|
+
* @param args 要计算平均数的数字序列
|
|
772
|
+
* @returns 平均数
|
|
773
|
+
* @example
|
|
774
|
+
* cmx.average(1, 2, 3) // 返回 2
|
|
775
|
+
*/
|
|
776
|
+
average(...e) {
|
|
777
|
+
return e.length === 0 ? 0 : this.div(
|
|
778
|
+
e.reduce((t, r) => this.add(t, r)),
|
|
779
|
+
e.length
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* 判断两个数是否近似相等(解决浮点数精度问题)
|
|
784
|
+
* @param a 第一个数
|
|
785
|
+
* @param b 第二个数
|
|
786
|
+
* @param tolerance 允许的误差范围(默认为1e-10)
|
|
787
|
+
* @returns 如果差值小于误差范围则返回true
|
|
788
|
+
* @example
|
|
789
|
+
* cmx.approxEqual(0.1 + 0.2, 0.3) // 返回 true
|
|
790
|
+
*/
|
|
791
|
+
approxEqual(e, t, r = 1e-10) {
|
|
792
|
+
return Math.abs(this.sub(e, t)) < r;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* 计算自然对数(ln(x))
|
|
796
|
+
* @param num 要计算对数的数字
|
|
797
|
+
* @param decimalPlaces 结果保留的小数位数(默认保留10位)
|
|
798
|
+
* @returns 自然对数值
|
|
799
|
+
* @throws {Error} 当输入小于等于0时抛出错误
|
|
800
|
+
* @example
|
|
801
|
+
* cmx.ln(1) // 返回 0
|
|
802
|
+
* cmx.ln(Math.E) // 返回 1
|
|
803
|
+
*/
|
|
804
|
+
ln(e, t = 10) {
|
|
805
|
+
if (e <= 0)
|
|
806
|
+
throw new Error("对数函数的输入必须为正数");
|
|
807
|
+
if (e === 1)
|
|
808
|
+
return 0;
|
|
809
|
+
let r = 0;
|
|
810
|
+
const s = Math.pow(10, -t - 1);
|
|
811
|
+
let o = this.div(this.sub(e, 1), this.add(e, 1));
|
|
812
|
+
const i = this.mul(o, o);
|
|
813
|
+
let l = o, u = 1;
|
|
814
|
+
do
|
|
815
|
+
r = this.add(r, this.div(l, u)), l = this.mul(l, i), u += 2;
|
|
816
|
+
while (Math.abs(l) > s);
|
|
817
|
+
return this.round(this.mul(2, r), t);
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* 高精度指数函数(解决Math.exp的精度问题)
|
|
821
|
+
* @param x 指数
|
|
822
|
+
* @param decimalPlaces 精度位数(默认10位)
|
|
823
|
+
* @returns e^x 的精确值
|
|
824
|
+
* @example
|
|
825
|
+
* cmx.exp(1) // 2.7182818285(比Math.exp(1)更可控精度)
|
|
826
|
+
* cmx.exp(-3.5) // 0.0301973834
|
|
827
|
+
*/
|
|
828
|
+
exp(e, t = 10) {
|
|
829
|
+
if (e === 0)
|
|
830
|
+
return 1;
|
|
831
|
+
if (e === 1)
|
|
832
|
+
return Math.E;
|
|
833
|
+
let r = 1, s = 1;
|
|
834
|
+
const o = Math.pow(10, -t - 1);
|
|
835
|
+
let i = 1, l = 0;
|
|
836
|
+
do
|
|
837
|
+
l = r, s = this.div(this.mul(s, e), i), r = this.add(r, s), i++;
|
|
838
|
+
while (Math.abs(s) > o && !this.approxEqual(r, l, o));
|
|
839
|
+
return this.round(r, t);
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* 精确计算平方根(解决Math.sqrt的精度问题)
|
|
843
|
+
* @param num 输入数字(必须 ≥0)
|
|
844
|
+
* @param decimalPlaces 结果精度(默认10位)
|
|
845
|
+
* @returns 精确的平方根值
|
|
846
|
+
* @throws {Error} 输入负数时抛出
|
|
847
|
+
* @example
|
|
848
|
+
* cmx.sqrt(2) // 1.4142135624 (Math.sqrt(2)可能产生微小误差)
|
|
849
|
+
*/
|
|
850
|
+
sqrt(e, t = 10) {
|
|
851
|
+
if (e < 0)
|
|
852
|
+
throw new Error("负数平方根需使用复数计算");
|
|
853
|
+
if (e === 0)
|
|
854
|
+
return 0;
|
|
855
|
+
let r = e / 2;
|
|
856
|
+
const s = Math.pow(10, -t - 1);
|
|
857
|
+
do
|
|
858
|
+
r = this.div(this.add(r, this.div(e, r)), 2);
|
|
859
|
+
while (Math.abs(this.sub(this.mul(r, r), e)) > s);
|
|
860
|
+
return this.round(r, t);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* 安全对数计算(解决Math.log的边界问题)
|
|
864
|
+
* @param num 输入数字(支持 ≤0 的特殊处理)
|
|
865
|
+
* @param options 配置项:
|
|
866
|
+
* - safe: 是否返回安全值(默认true)
|
|
867
|
+
* - replaceNeg: 负数替换值(默认NaN)
|
|
868
|
+
* - replaceZero: 零替换值(默认-Infinity)
|
|
869
|
+
* @returns 处理后的结果
|
|
870
|
+
* @example
|
|
871
|
+
* cmx.safeLog(-1) // NaN(Math.log直接报错)
|
|
872
|
+
* cmx.safeLog(0) // -Infinity(可配置替换值)
|
|
873
|
+
*/
|
|
874
|
+
safeLog(e, t = {}) {
|
|
875
|
+
const { safe: r = !0, replaceNeg: s = NaN, replaceZero: o = -1 / 0 } = t;
|
|
876
|
+
if (e > 0)
|
|
877
|
+
return Math.log(e);
|
|
878
|
+
if (!r)
|
|
879
|
+
throw new Error("Invalid input");
|
|
880
|
+
return e === 0 ? o : s;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* 精确阶乘(解决Math无阶乘方法的问题)
|
|
884
|
+
* @param n 输入整数(0≤n≤170)
|
|
885
|
+
* @returns 精确结果(超过170返回Infinity)
|
|
886
|
+
* @example
|
|
887
|
+
* cmx.factorial(20) // 2432902008176640000(JS整数精确范围)
|
|
888
|
+
*/
|
|
889
|
+
factorial(e) {
|
|
890
|
+
if (!Number.isInteger(e) || e < 0)
|
|
891
|
+
return NaN;
|
|
892
|
+
if (e < 0)
|
|
893
|
+
return NaN;
|
|
894
|
+
if (e > Number.MAX_SAFE_INTEGER) {
|
|
895
|
+
let r = BigInt(1);
|
|
896
|
+
for (let s = 2; s <= e; s++)
|
|
897
|
+
r *= BigInt(s);
|
|
898
|
+
return Number(r.toString());
|
|
899
|
+
}
|
|
900
|
+
if (e > 170)
|
|
901
|
+
return 1 / 0;
|
|
902
|
+
if (L.factorialCache.has(e))
|
|
903
|
+
return L.factorialCache.get(e);
|
|
904
|
+
let t = 1;
|
|
905
|
+
for (let r = 2; r <= e; r++) {
|
|
906
|
+
if (L.factorialCache.has(r)) {
|
|
907
|
+
t = L.factorialCache.get(r);
|
|
908
|
+
continue;
|
|
737
909
|
}
|
|
738
|
-
|
|
739
|
-
}
|
|
910
|
+
t = this.mul(t, r), L.factorialCache.set(r, t);
|
|
911
|
+
}
|
|
912
|
+
return t;
|
|
740
913
|
}
|
|
741
|
-
|
|
742
|
-
|
|
914
|
+
/**
|
|
915
|
+
* 双曲函数精确计算(解决大数精度问题)
|
|
916
|
+
* @param x 输入值
|
|
917
|
+
* @param type 函数类型:'sinh' | 'cosh' | 'tanh'
|
|
918
|
+
* @param decimalPlaces 精度(默认10位)
|
|
919
|
+
* @returns 计算结果
|
|
920
|
+
* @example
|
|
921
|
+
* cmx.hypFunc(1, 'tanh') // 0.761594156(比Math.tanh更精确)
|
|
922
|
+
*/
|
|
923
|
+
hypFunc(e, t, r = 10) {
|
|
924
|
+
const s = this.exp(e, r + 2), o = this.exp(-e, r + 2);
|
|
925
|
+
switch (t) {
|
|
926
|
+
case "sinh":
|
|
927
|
+
return this.round(this.div(this.sub(s, o), 2), r);
|
|
928
|
+
case "cosh":
|
|
929
|
+
return this.round(this.div(this.add(s, o), 2), r);
|
|
930
|
+
case "tanh":
|
|
931
|
+
return this.round(
|
|
932
|
+
this.div(this.sub(s, o), this.add(s, o)),
|
|
933
|
+
r
|
|
934
|
+
);
|
|
935
|
+
default:
|
|
936
|
+
throw new Error("不支持的函数类型");
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* 精确排列组合(解决大数计算问题)
|
|
941
|
+
* @param n 总数
|
|
942
|
+
* @param k 选取数
|
|
943
|
+
* @param type 计算类型:'permutation' | 'combination'
|
|
944
|
+
* @returns 精确结果
|
|
945
|
+
* @example
|
|
946
|
+
* cmx.permComb(100, 5, 'combination') // 75287520
|
|
947
|
+
*/
|
|
948
|
+
permComb(e, t, r) {
|
|
949
|
+
if (!Number.isInteger(e) || !Number.isInteger(t) || t > e || t < 0)
|
|
950
|
+
return NaN;
|
|
951
|
+
let s = 1;
|
|
952
|
+
for (let o = 0; o < t; o++)
|
|
953
|
+
s = this.mul(s, e - o), r === "combination" && (s = this.div(s, o + 1));
|
|
954
|
+
return s;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* 计算最大公约数(GCD)
|
|
958
|
+
* @param a 第一个数字
|
|
959
|
+
* @param b 第二个数字
|
|
960
|
+
* @returns 最大公约数
|
|
961
|
+
* @example
|
|
962
|
+
* cmx.gcd(48, 18) // 返回 6
|
|
963
|
+
*/
|
|
964
|
+
gcd(e, t) {
|
|
965
|
+
for (e = Math.abs(e), t = Math.abs(t); t !== 0; ) {
|
|
966
|
+
const r = t;
|
|
967
|
+
t = e % t, e = r;
|
|
968
|
+
}
|
|
969
|
+
return e;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* 计算最小公倍数(LCM)
|
|
973
|
+
* @param a 第一个数字
|
|
974
|
+
* @param b 第二个数字
|
|
975
|
+
* @returns 最小公倍数
|
|
976
|
+
* @example
|
|
977
|
+
* cmx.lcm(12, 15) // 返回 60
|
|
978
|
+
*/
|
|
979
|
+
lcm(e, t) {
|
|
980
|
+
return this.div(this.mul(e, t), this.gcd(e, t));
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
m(L, "factorialCache", /* @__PURE__ */ new Map());
|
|
984
|
+
let lt = L;
|
|
985
|
+
const Ta = new lt(), De = class De {
|
|
743
986
|
constructor() {
|
|
744
987
|
m(this, "callbacks", []);
|
|
745
988
|
m(this, "pending", !1);
|
|
@@ -753,9 +996,9 @@ const Ta = new bn(), Ne = class Ne {
|
|
|
753
996
|
}
|
|
754
997
|
if (typeof MutationObserver < "u" && typeof window < "u") {
|
|
755
998
|
let e = 1;
|
|
756
|
-
const t = new MutationObserver(this.flushCallbacks.bind(this)),
|
|
757
|
-
return t.observe(
|
|
758
|
-
e = (e + 1) % 2,
|
|
999
|
+
const t = new MutationObserver(this.flushCallbacks.bind(this)), r = document.createTextNode(String(e));
|
|
1000
|
+
return t.observe(r, { characterData: !0 }), () => {
|
|
1001
|
+
e = (e + 1) % 2, r.data = String(e);
|
|
759
1002
|
};
|
|
760
1003
|
}
|
|
761
1004
|
return () => setTimeout(this.flushCallbacks.bind(this), 0);
|
|
@@ -768,7 +1011,7 @@ const Ta = new bn(), Ne = class Ne {
|
|
|
768
1011
|
e[t]();
|
|
769
1012
|
}
|
|
770
1013
|
nextTick(e, t) {
|
|
771
|
-
let
|
|
1014
|
+
let r;
|
|
772
1015
|
if (this.callbacks.push(() => {
|
|
773
1016
|
if (e)
|
|
774
1017
|
try {
|
|
@@ -777,60 +1020,60 @@ const Ta = new bn(), Ne = class Ne {
|
|
|
777
1020
|
console.error("Error in nextTick:", s);
|
|
778
1021
|
}
|
|
779
1022
|
else
|
|
780
|
-
|
|
1023
|
+
r && r();
|
|
781
1024
|
}), this.pending || (this.pending = !0, this.timerFunc()), !e && typeof Promise < "u")
|
|
782
1025
|
return new Promise((s) => {
|
|
783
|
-
|
|
1026
|
+
r = s;
|
|
784
1027
|
});
|
|
785
1028
|
}
|
|
786
1029
|
static nextTick(e, t) {
|
|
787
|
-
return
|
|
1030
|
+
return De.instance.nextTick(e, t);
|
|
788
1031
|
}
|
|
789
1032
|
static get instance() {
|
|
790
|
-
return this._instance || (this._instance = new
|
|
1033
|
+
return this._instance || (this._instance = new De()), this._instance;
|
|
791
1034
|
}
|
|
792
1035
|
};
|
|
793
|
-
m(
|
|
794
|
-
let
|
|
795
|
-
const
|
|
796
|
-
var
|
|
1036
|
+
m(De, "_instance");
|
|
1037
|
+
let Fe = De;
|
|
1038
|
+
const Da = Fe.instance.nextTick.bind(Fe.instance);
|
|
1039
|
+
var pe = {}, ut, ft, Oe = pn;
|
|
797
1040
|
if (process.env.NODE_ENV === "production")
|
|
798
|
-
|
|
1041
|
+
ft = pe.createRoot = Oe.createRoot, ut = pe.hydrateRoot = Oe.hydrateRoot;
|
|
799
1042
|
else {
|
|
800
|
-
var
|
|
801
|
-
|
|
802
|
-
|
|
1043
|
+
var Le = Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1044
|
+
ft = pe.createRoot = function(n, e) {
|
|
1045
|
+
Le.usingClientEntryPoint = !0;
|
|
803
1046
|
try {
|
|
804
|
-
return
|
|
1047
|
+
return Oe.createRoot(n, e);
|
|
805
1048
|
} finally {
|
|
806
|
-
|
|
1049
|
+
Le.usingClientEntryPoint = !1;
|
|
807
1050
|
}
|
|
808
|
-
},
|
|
809
|
-
|
|
1051
|
+
}, ut = pe.hydrateRoot = function(n, e, t) {
|
|
1052
|
+
Le.usingClientEntryPoint = !0;
|
|
810
1053
|
try {
|
|
811
|
-
return
|
|
1054
|
+
return Oe.hydrateRoot(n, e, t);
|
|
812
1055
|
} finally {
|
|
813
|
-
|
|
1056
|
+
Le.usingClientEntryPoint = !1;
|
|
814
1057
|
}
|
|
815
1058
|
};
|
|
816
1059
|
}
|
|
817
|
-
const
|
|
1060
|
+
const wn = /* @__PURE__ */ mn({
|
|
818
1061
|
__proto__: null,
|
|
819
1062
|
get createRoot() {
|
|
820
|
-
return
|
|
1063
|
+
return ft;
|
|
821
1064
|
},
|
|
822
|
-
default:
|
|
1065
|
+
default: pe,
|
|
823
1066
|
get hydrateRoot() {
|
|
824
|
-
return
|
|
1067
|
+
return ut;
|
|
825
1068
|
}
|
|
826
|
-
}, [
|
|
827
|
-
let
|
|
1069
|
+
}, [pe]), { createRoot: xn } = wn;
|
|
1070
|
+
let se = null, fe = null;
|
|
828
1071
|
function Cn() {
|
|
829
|
-
return
|
|
1072
|
+
return se || (se = document.createElement("div"), document.body.appendChild(se)), se;
|
|
830
1073
|
}
|
|
831
|
-
function
|
|
1074
|
+
function Sn(n, e) {
|
|
832
1075
|
const t = Cn();
|
|
833
|
-
let
|
|
1076
|
+
let r = {
|
|
834
1077
|
open: !0,
|
|
835
1078
|
...e,
|
|
836
1079
|
// 默认自动关闭
|
|
@@ -838,9 +1081,9 @@ function wn(r, e) {
|
|
|
838
1081
|
u(c);
|
|
839
1082
|
})
|
|
840
1083
|
};
|
|
841
|
-
if (!
|
|
1084
|
+
if (!fe)
|
|
842
1085
|
try {
|
|
843
|
-
|
|
1086
|
+
fe = xn(t);
|
|
844
1087
|
} catch (c) {
|
|
845
1088
|
return console.error("Failed to create root:", c), {
|
|
846
1089
|
destroy: () => {
|
|
@@ -850,66 +1093,66 @@ function wn(r, e) {
|
|
|
850
1093
|
};
|
|
851
1094
|
}
|
|
852
1095
|
const s = () => {
|
|
853
|
-
|
|
1096
|
+
fe && (fe.unmount(), fe = null), se && se.parentNode && (se.parentNode.removeChild(se), se = null);
|
|
854
1097
|
}, o = (c) => {
|
|
855
|
-
typeof
|
|
1098
|
+
typeof r.onClosed == "function" && r.onClosed(c), s();
|
|
856
1099
|
}, i = (c) => {
|
|
857
|
-
|
|
1100
|
+
fe && fe.render(/* @__PURE__ */ p.jsx(n, { ...c }));
|
|
858
1101
|
}, l = (c) => {
|
|
859
|
-
|
|
1102
|
+
r = typeof c == "function" ? c(r) : { ...r, ...c }, i(r);
|
|
860
1103
|
}, u = (c) => {
|
|
861
|
-
|
|
862
|
-
...
|
|
1104
|
+
r.open ? (r = {
|
|
1105
|
+
...r,
|
|
863
1106
|
open: !1,
|
|
864
1107
|
onClosed: (g) => {
|
|
865
1108
|
e.onClosed && e.onClosed(g || c), o(g || c);
|
|
866
1109
|
}
|
|
867
|
-
}, i(
|
|
1110
|
+
}, i(r)) : console.warn("Modal is already closed.");
|
|
868
1111
|
};
|
|
869
|
-
return i(
|
|
1112
|
+
return i(r), {
|
|
870
1113
|
destroy: u,
|
|
871
1114
|
update: l
|
|
872
1115
|
};
|
|
873
1116
|
}
|
|
874
1117
|
const ka = () => {
|
|
875
|
-
},
|
|
876
|
-
const t =
|
|
877
|
-
let
|
|
1118
|
+
}, Ue = (n, e) => {
|
|
1119
|
+
const t = n;
|
|
1120
|
+
let r = n;
|
|
878
1121
|
if (e.includes(" ")) {
|
|
879
|
-
|
|
1122
|
+
r = "";
|
|
880
1123
|
const s = e == null ? void 0 : e.split(" ");
|
|
881
1124
|
for (const o of s)
|
|
882
|
-
|
|
1125
|
+
r += ` ${t}-${o}`;
|
|
883
1126
|
} else
|
|
884
|
-
e && (
|
|
885
|
-
return
|
|
886
|
-
},
|
|
1127
|
+
e && (r = `${n}-${e}`);
|
|
1128
|
+
return r;
|
|
1129
|
+
}, Aa = (n, e) => {
|
|
887
1130
|
const t = e == null ? void 0 : e.split(".");
|
|
888
|
-
let
|
|
1131
|
+
let r = n;
|
|
889
1132
|
for (const s of t)
|
|
890
|
-
|
|
891
|
-
return n;
|
|
892
|
-
}, Sn = (r) => {
|
|
893
|
-
for (const e in r)
|
|
894
|
-
r[e] === null && delete r[e];
|
|
1133
|
+
r = r[s];
|
|
895
1134
|
return r;
|
|
896
|
-
},
|
|
1135
|
+
}, Rn = (n) => {
|
|
1136
|
+
for (const e in n)
|
|
1137
|
+
n[e] === null && delete n[e];
|
|
1138
|
+
return n;
|
|
1139
|
+
}, or = (n, e) => {
|
|
897
1140
|
let t = null;
|
|
898
|
-
return (...
|
|
1141
|
+
return (...r) => {
|
|
899
1142
|
t && clearTimeout(t), t = setTimeout(() => {
|
|
900
|
-
|
|
1143
|
+
n(...r);
|
|
901
1144
|
}, e);
|
|
902
1145
|
};
|
|
903
|
-
},
|
|
904
|
-
let t = null,
|
|
1146
|
+
}, $a = (n, e) => {
|
|
1147
|
+
let t = null, r = 0;
|
|
905
1148
|
return (...s) => {
|
|
906
1149
|
const o = Date.now();
|
|
907
|
-
t ? o -
|
|
1150
|
+
t ? o - r >= e && (n(...s), r = o) : (n(...s), r = o, t = setTimeout(() => {
|
|
908
1151
|
t = null;
|
|
909
1152
|
}, e));
|
|
910
1153
|
};
|
|
911
1154
|
};
|
|
912
|
-
class
|
|
1155
|
+
class Ma {
|
|
913
1156
|
/**
|
|
914
1157
|
* 验证版本号格式是否有效
|
|
915
1158
|
* @param version 版本号字符串
|
|
@@ -927,7 +1170,7 @@ class $a {
|
|
|
927
1170
|
static compare(e, t) {
|
|
928
1171
|
if (!this.isValid(e) || !this.isValid(t))
|
|
929
1172
|
throw new Error("Invalid version format");
|
|
930
|
-
const
|
|
1173
|
+
const r = (u) => u.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
931
1174
|
for (let u = 0; u < 3; u++) {
|
|
932
1175
|
const c = parseInt(s[u] || "0", 10), g = parseInt(o[u] || "0", 10);
|
|
933
1176
|
if (c > g)
|
|
@@ -947,7 +1190,7 @@ class $a {
|
|
|
947
1190
|
static satisfies(e, t) {
|
|
948
1191
|
if (!this.isValid(e))
|
|
949
1192
|
return !1;
|
|
950
|
-
const
|
|
1193
|
+
const r = /([<>]=?|==?|\^|~)?\s*v?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+)?)/g, s = t.match(r);
|
|
951
1194
|
return !s || s.length === 0 ? !1 : s.every((o) => {
|
|
952
1195
|
const i = o.match(/([<>]=?|==?|\^|~)?\s*(v?[0-9].*)/);
|
|
953
1196
|
if (!i)
|
|
@@ -983,7 +1226,7 @@ class $a {
|
|
|
983
1226
|
* @returns 是否匹配
|
|
984
1227
|
*/
|
|
985
1228
|
static caretRange(e, t) {
|
|
986
|
-
const
|
|
1229
|
+
const r = (l) => l.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
987
1230
|
let i = 0;
|
|
988
1231
|
for (let l = 0; l < o.length; l++)
|
|
989
1232
|
if (parseInt(o[l], 10) !== 0) {
|
|
@@ -1004,7 +1247,7 @@ class $a {
|
|
|
1004
1247
|
* @returns 是否匹配
|
|
1005
1248
|
*/
|
|
1006
1249
|
static tildeRange(e, t) {
|
|
1007
|
-
const
|
|
1250
|
+
const r = (u) => u.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
1008
1251
|
for (let u = 0; u < o.length - 1; u++) {
|
|
1009
1252
|
const c = parseInt(s[u] || "0", 10), g = parseInt(o[u] || "0", 10);
|
|
1010
1253
|
if (c !== g)
|
|
@@ -1069,25 +1312,25 @@ class $a {
|
|
|
1069
1312
|
return t ? t[1] : null;
|
|
1070
1313
|
}
|
|
1071
1314
|
}
|
|
1072
|
-
const
|
|
1315
|
+
const ir = tr({
|
|
1073
1316
|
theme: {
|
|
1074
1317
|
cssVar: !0,
|
|
1075
|
-
algorithm: [
|
|
1318
|
+
algorithm: [ze.defaultAlgorithm]
|
|
1076
1319
|
}
|
|
1077
|
-
}), Ia =
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1320
|
+
}), Ia = ir.Provider;
|
|
1321
|
+
function _n() {
|
|
1322
|
+
return rr(ir);
|
|
1080
1323
|
}
|
|
1081
|
-
function
|
|
1082
|
-
const { theme: e } =
|
|
1083
|
-
return /* @__PURE__ */ p.jsx(
|
|
1324
|
+
function we(n) {
|
|
1325
|
+
const { theme: e } = _n();
|
|
1326
|
+
return /* @__PURE__ */ p.jsx(nr, { theme: e, children: n.children });
|
|
1084
1327
|
}
|
|
1085
|
-
const zt = (
|
|
1086
|
-
const
|
|
1087
|
-
return e.render ? /* @__PURE__ */ p.jsx("span", { className:
|
|
1328
|
+
const zt = (n = "") => Ue("items-row", n), En = (n) => n.items ? /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx("div", { className: `${zt()} ${n.className || ""}`, style: n.style, children: (n.items || []).map((e, t) => {
|
|
1329
|
+
const r = `${zt("item")} ${e.className}`;
|
|
1330
|
+
return e.render ? /* @__PURE__ */ p.jsx("span", { className: r, children: e.render() }, t) : /* @__PURE__ */ p.jsx(
|
|
1088
1331
|
Pe,
|
|
1089
1332
|
{
|
|
1090
|
-
className:
|
|
1333
|
+
className: r,
|
|
1091
1334
|
...e.btnProps,
|
|
1092
1335
|
type: e.type || "primary",
|
|
1093
1336
|
onClick: e.onClick,
|
|
@@ -1096,21 +1339,21 @@ const zt = (r = "") => Fe("items-row", r), _n = (r) => r.items ? /* @__PURE__ */
|
|
|
1096
1339
|
e.label
|
|
1097
1340
|
);
|
|
1098
1341
|
}) }) }) : null;
|
|
1099
|
-
const
|
|
1342
|
+
const je = (n = "") => Ue("m-breadcrumb", n), La = (n) => {
|
|
1100
1343
|
const {
|
|
1101
1344
|
routes: e,
|
|
1102
1345
|
customItems: t,
|
|
1103
|
-
style:
|
|
1346
|
+
style: r,
|
|
1104
1347
|
className: s,
|
|
1105
1348
|
offsetTop: o = 64,
|
|
1106
1349
|
mainAppBaseUrl: i,
|
|
1107
1350
|
microAppName: l
|
|
1108
|
-
} =
|
|
1351
|
+
} = n, u = W.useRef(null), c = W.useCallback(() => {
|
|
1109
1352
|
var d, b;
|
|
1110
1353
|
(b = (d = u.current) == null ? void 0 : d.updatePosition) == null || b.call(d);
|
|
1111
1354
|
}, []);
|
|
1112
|
-
|
|
1113
|
-
const g =
|
|
1355
|
+
W.useEffect(() => (window.addEventListener("scroll", c, !0), () => window.removeEventListener("scroll", c)), [c]);
|
|
1356
|
+
const g = W.useCallback(
|
|
1114
1357
|
(d) => {
|
|
1115
1358
|
if (!d)
|
|
1116
1359
|
return "";
|
|
@@ -1123,23 +1366,23 @@ const Oe = (r = "") => Fe("m-breadcrumb", r), Ma = (r) => {
|
|
|
1123
1366
|
},
|
|
1124
1367
|
[i, l]
|
|
1125
1368
|
);
|
|
1126
|
-
return /* @__PURE__ */ p.jsx(
|
|
1127
|
-
|
|
1369
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx("div", { className: `${je()} ${s || ""}`, style: r, children: /* @__PURE__ */ p.jsx(tn, { ref: u, offsetTop: o, children: /* @__PURE__ */ p.jsxs(
|
|
1370
|
+
ar,
|
|
1128
1371
|
{
|
|
1129
|
-
className:
|
|
1130
|
-
rootClassName:
|
|
1372
|
+
className: je("container"),
|
|
1373
|
+
rootClassName: je("body"),
|
|
1131
1374
|
variant: "borderless",
|
|
1132
1375
|
children: [
|
|
1133
|
-
/* @__PURE__ */ p.jsx(
|
|
1134
|
-
/* @__PURE__ */ p.jsx("div", { className:
|
|
1376
|
+
/* @__PURE__ */ p.jsx(It, { className: je("inner-breadcrumb"), style: { fontSize: "18px" }, children: e == null ? void 0 : e.map((d) => /* @__PURE__ */ p.jsx(It.Item, { children: d.url ? /* @__PURE__ */ p.jsx("a", { href: `#${g(d.url)}`, children: d.name }) : d.name }, d.url || d.name)) }),
|
|
1377
|
+
/* @__PURE__ */ p.jsx("div", { className: je("custom-item-wrapper"), children: /* @__PURE__ */ p.jsx(En, { items: t }) })
|
|
1135
1378
|
]
|
|
1136
1379
|
}
|
|
1137
1380
|
) }) }) });
|
|
1138
|
-
},
|
|
1381
|
+
}, On = (n) => {
|
|
1139
1382
|
const {
|
|
1140
1383
|
data: e,
|
|
1141
1384
|
title: t,
|
|
1142
|
-
column:
|
|
1385
|
+
column: r = 3,
|
|
1143
1386
|
lineHeight: s,
|
|
1144
1387
|
align: o = "left",
|
|
1145
1388
|
itemLayout: i,
|
|
@@ -1149,70 +1392,70 @@ const Oe = (r = "") => Fe("m-breadcrumb", r), Ma = (r) => {
|
|
|
1149
1392
|
className: g,
|
|
1150
1393
|
labelStyle: d,
|
|
1151
1394
|
contentStyle: b
|
|
1152
|
-
} =
|
|
1395
|
+
} = n, O = {
|
|
1153
1396
|
...s ? { lineHeight: `${s}px` } : {},
|
|
1154
1397
|
textAlign: o,
|
|
1155
1398
|
...i != null && i.label ? { width: `${i.label}px` } : {},
|
|
1156
1399
|
...d
|
|
1157
|
-
},
|
|
1400
|
+
}, P = {
|
|
1158
1401
|
...s ? { lineHeight: `${s}px` } : {},
|
|
1159
1402
|
...i != null && i.value ? { width: `${i.value}px` } : {},
|
|
1160
1403
|
...b
|
|
1161
1404
|
};
|
|
1162
|
-
return /* @__PURE__ */ p.jsx(
|
|
1163
|
-
|
|
1405
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(
|
|
1406
|
+
Lt,
|
|
1164
1407
|
{
|
|
1165
1408
|
title: t,
|
|
1166
|
-
column:
|
|
1409
|
+
column: r,
|
|
1167
1410
|
colon: l,
|
|
1168
1411
|
bordered: u,
|
|
1169
1412
|
style: c,
|
|
1170
1413
|
className: g,
|
|
1171
1414
|
labelStyle: O,
|
|
1172
|
-
contentStyle:
|
|
1173
|
-
children: e.map((
|
|
1415
|
+
contentStyle: P,
|
|
1416
|
+
children: e.map((T, H) => {
|
|
1174
1417
|
var j;
|
|
1175
1418
|
return /* @__PURE__ */ p.jsx(
|
|
1176
|
-
|
|
1419
|
+
Lt.Item,
|
|
1177
1420
|
{
|
|
1178
|
-
label:
|
|
1179
|
-
span:
|
|
1180
|
-
children:
|
|
1421
|
+
label: T.label,
|
|
1422
|
+
span: T.span,
|
|
1423
|
+
children: T.value || "-"
|
|
1181
1424
|
},
|
|
1182
|
-
((j =
|
|
1425
|
+
((j = T.label) == null ? void 0 : j.toString()) || H
|
|
1183
1426
|
);
|
|
1184
1427
|
})
|
|
1185
1428
|
}
|
|
1186
1429
|
) });
|
|
1187
1430
|
};
|
|
1188
|
-
|
|
1189
|
-
var
|
|
1190
|
-
const
|
|
1191
|
-
function
|
|
1192
|
-
return
|
|
1431
|
+
On.displayName = "MDescriptions";
|
|
1432
|
+
var jn = /* @__PURE__ */ tr({});
|
|
1433
|
+
const cr = jn;
|
|
1434
|
+
function ye() {
|
|
1435
|
+
return ye = Object.assign ? Object.assign.bind() : function(n) {
|
|
1193
1436
|
for (var e = 1; e < arguments.length; e++) {
|
|
1194
1437
|
var t = arguments[e];
|
|
1195
|
-
for (var
|
|
1196
|
-
({}).hasOwnProperty.call(t,
|
|
1438
|
+
for (var r in t)
|
|
1439
|
+
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1197
1440
|
}
|
|
1198
|
-
return
|
|
1199
|
-
},
|
|
1441
|
+
return n;
|
|
1442
|
+
}, ye.apply(null, arguments);
|
|
1200
1443
|
}
|
|
1201
|
-
function
|
|
1202
|
-
if (Array.isArray(
|
|
1203
|
-
return
|
|
1444
|
+
function Nn(n) {
|
|
1445
|
+
if (Array.isArray(n))
|
|
1446
|
+
return n;
|
|
1204
1447
|
}
|
|
1205
|
-
function Pn(
|
|
1206
|
-
var t =
|
|
1448
|
+
function Pn(n, e) {
|
|
1449
|
+
var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
1207
1450
|
if (t != null) {
|
|
1208
|
-
var
|
|
1451
|
+
var r, s, o, i, l = [], u = !0, c = !1;
|
|
1209
1452
|
try {
|
|
1210
|
-
if (o = (t = t.call(
|
|
1453
|
+
if (o = (t = t.call(n)).next, e === 0) {
|
|
1211
1454
|
if (Object(t) !== t)
|
|
1212
1455
|
return;
|
|
1213
1456
|
u = !1;
|
|
1214
1457
|
} else
|
|
1215
|
-
for (; !(u = (
|
|
1458
|
+
for (; !(u = (r = o.call(t)).done) && (l.push(r.value), l.length !== e); u = !0)
|
|
1216
1459
|
;
|
|
1217
1460
|
} catch (g) {
|
|
1218
1461
|
c = !0, s = g;
|
|
@@ -1228,99 +1471,99 @@ function Pn(r, e) {
|
|
|
1228
1471
|
return l;
|
|
1229
1472
|
}
|
|
1230
1473
|
}
|
|
1231
|
-
function
|
|
1232
|
-
(e == null || e >
|
|
1233
|
-
for (var t = 0,
|
|
1234
|
-
|
|
1235
|
-
return
|
|
1474
|
+
function Vt(n, e) {
|
|
1475
|
+
(e == null || e > n.length) && (e = n.length);
|
|
1476
|
+
for (var t = 0, r = Array(e); t < e; t++)
|
|
1477
|
+
r[t] = n[t];
|
|
1478
|
+
return r;
|
|
1236
1479
|
}
|
|
1237
|
-
function Tn(
|
|
1238
|
-
if (
|
|
1239
|
-
if (typeof
|
|
1240
|
-
return
|
|
1241
|
-
var t = {}.toString.call(
|
|
1242
|
-
return t === "Object" &&
|
|
1480
|
+
function Tn(n, e) {
|
|
1481
|
+
if (n) {
|
|
1482
|
+
if (typeof n == "string")
|
|
1483
|
+
return Vt(n, e);
|
|
1484
|
+
var t = {}.toString.call(n).slice(8, -1);
|
|
1485
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Vt(n, e) : void 0;
|
|
1243
1486
|
}
|
|
1244
1487
|
}
|
|
1245
|
-
function
|
|
1488
|
+
function Dn() {
|
|
1246
1489
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1247
1490
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1248
1491
|
}
|
|
1249
|
-
function
|
|
1250
|
-
return
|
|
1492
|
+
function lr(n, e) {
|
|
1493
|
+
return Nn(n) || Pn(n, e) || Tn(n, e) || Dn();
|
|
1251
1494
|
}
|
|
1252
|
-
function
|
|
1495
|
+
function de(n) {
|
|
1253
1496
|
"@babel/helpers - typeof";
|
|
1254
|
-
return
|
|
1497
|
+
return de = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1255
1498
|
return typeof e;
|
|
1256
1499
|
} : function(e) {
|
|
1257
1500
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1258
|
-
},
|
|
1501
|
+
}, de(n);
|
|
1259
1502
|
}
|
|
1260
|
-
function kn(
|
|
1261
|
-
if (
|
|
1262
|
-
return
|
|
1263
|
-
var t =
|
|
1503
|
+
function kn(n, e) {
|
|
1504
|
+
if (de(n) != "object" || !n)
|
|
1505
|
+
return n;
|
|
1506
|
+
var t = n[Symbol.toPrimitive];
|
|
1264
1507
|
if (t !== void 0) {
|
|
1265
|
-
var
|
|
1266
|
-
if (
|
|
1267
|
-
return
|
|
1508
|
+
var r = t.call(n, e || "default");
|
|
1509
|
+
if (de(r) != "object")
|
|
1510
|
+
return r;
|
|
1268
1511
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1269
1512
|
}
|
|
1270
|
-
return (e === "string" ? String : Number)(
|
|
1513
|
+
return (e === "string" ? String : Number)(n);
|
|
1271
1514
|
}
|
|
1272
|
-
function
|
|
1273
|
-
var e = kn(
|
|
1274
|
-
return
|
|
1515
|
+
function An(n) {
|
|
1516
|
+
var e = kn(n, "string");
|
|
1517
|
+
return de(e) == "symbol" ? e : e + "";
|
|
1275
1518
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return (e =
|
|
1519
|
+
function U(n, e, t) {
|
|
1520
|
+
return (e = An(e)) in n ? Object.defineProperty(n, e, {
|
|
1278
1521
|
value: t,
|
|
1279
1522
|
enumerable: !0,
|
|
1280
1523
|
configurable: !0,
|
|
1281
1524
|
writable: !0
|
|
1282
|
-
}) :
|
|
1525
|
+
}) : n[e] = t, n;
|
|
1283
1526
|
}
|
|
1284
|
-
function
|
|
1285
|
-
if (
|
|
1527
|
+
function $n(n, e) {
|
|
1528
|
+
if (n == null)
|
|
1286
1529
|
return {};
|
|
1287
1530
|
var t = {};
|
|
1288
|
-
for (var
|
|
1289
|
-
if ({}.hasOwnProperty.call(
|
|
1290
|
-
if (e.indexOf(
|
|
1531
|
+
for (var r in n)
|
|
1532
|
+
if ({}.hasOwnProperty.call(n, r)) {
|
|
1533
|
+
if (e.indexOf(r) !== -1)
|
|
1291
1534
|
continue;
|
|
1292
|
-
t[
|
|
1535
|
+
t[r] = n[r];
|
|
1293
1536
|
}
|
|
1294
1537
|
return t;
|
|
1295
1538
|
}
|
|
1296
|
-
function
|
|
1297
|
-
if (
|
|
1539
|
+
function ur(n, e) {
|
|
1540
|
+
if (n == null)
|
|
1298
1541
|
return {};
|
|
1299
|
-
var t,
|
|
1542
|
+
var t, r, s = $n(n, e);
|
|
1300
1543
|
if (Object.getOwnPropertySymbols) {
|
|
1301
|
-
var o = Object.getOwnPropertySymbols(
|
|
1302
|
-
for (
|
|
1303
|
-
t = o[
|
|
1544
|
+
var o = Object.getOwnPropertySymbols(n);
|
|
1545
|
+
for (r = 0; r < o.length; r++)
|
|
1546
|
+
t = o[r], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (s[t] = n[t]);
|
|
1304
1547
|
}
|
|
1305
1548
|
return s;
|
|
1306
1549
|
}
|
|
1307
|
-
var
|
|
1550
|
+
var fr = { exports: {} };
|
|
1308
1551
|
/*!
|
|
1309
1552
|
Copyright (c) 2018 Jed Watson.
|
|
1310
1553
|
Licensed under the MIT License (MIT), see
|
|
1311
1554
|
http://jedwatson.github.io/classnames
|
|
1312
1555
|
*/
|
|
1313
|
-
(function(
|
|
1556
|
+
(function(n) {
|
|
1314
1557
|
(function() {
|
|
1315
1558
|
var e = {}.hasOwnProperty;
|
|
1316
1559
|
function t() {
|
|
1317
1560
|
for (var o = "", i = 0; i < arguments.length; i++) {
|
|
1318
1561
|
var l = arguments[i];
|
|
1319
|
-
l && (o = s(o,
|
|
1562
|
+
l && (o = s(o, r(l)));
|
|
1320
1563
|
}
|
|
1321
1564
|
return o;
|
|
1322
1565
|
}
|
|
1323
|
-
function
|
|
1566
|
+
function r(o) {
|
|
1324
1567
|
if (typeof o == "string" || typeof o == "number")
|
|
1325
1568
|
return o;
|
|
1326
1569
|
if (typeof o != "object")
|
|
@@ -1337,39 +1580,39 @@ var lr = { exports: {} };
|
|
|
1337
1580
|
function s(o, i) {
|
|
1338
1581
|
return i ? o ? o + " " + i : o + i : o;
|
|
1339
1582
|
}
|
|
1340
|
-
|
|
1583
|
+
n.exports ? (t.default = t, n.exports = t) : window.classNames = t;
|
|
1341
1584
|
})();
|
|
1342
|
-
})(
|
|
1343
|
-
var
|
|
1344
|
-
const In = /* @__PURE__ */
|
|
1345
|
-
function
|
|
1346
|
-
const t =
|
|
1585
|
+
})(fr);
|
|
1586
|
+
var Mn = fr.exports;
|
|
1587
|
+
const In = /* @__PURE__ */ vn(Mn), I = Math.round;
|
|
1588
|
+
function at(n, e) {
|
|
1589
|
+
const t = n.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], r = t.map((s) => parseFloat(s));
|
|
1347
1590
|
for (let s = 0; s < 3; s += 1)
|
|
1348
|
-
|
|
1349
|
-
return t[3] ?
|
|
1591
|
+
r[s] = e(r[s] || 0, t[s] || "", s);
|
|
1592
|
+
return t[3] ? r[3] = t[3].includes("%") ? r[3] / 100 : r[3] : r[3] = 1, r;
|
|
1350
1593
|
}
|
|
1351
|
-
const
|
|
1352
|
-
function
|
|
1594
|
+
const Ft = (n, e, t) => t === 0 ? n : n / 100;
|
|
1595
|
+
function Ne(n, e) {
|
|
1353
1596
|
const t = e || 255;
|
|
1354
|
-
return
|
|
1597
|
+
return n > t ? t : n < 0 ? 0 : n;
|
|
1355
1598
|
}
|
|
1356
|
-
class
|
|
1599
|
+
class me {
|
|
1357
1600
|
constructor(e) {
|
|
1358
|
-
|
|
1359
|
-
function t(
|
|
1360
|
-
return
|
|
1601
|
+
U(this, "isValid", !0), U(this, "r", 0), U(this, "g", 0), U(this, "b", 0), U(this, "a", 1), U(this, "_h", void 0), U(this, "_s", void 0), U(this, "_l", void 0), U(this, "_v", void 0), U(this, "_max", void 0), U(this, "_min", void 0), U(this, "_brightness", void 0);
|
|
1602
|
+
function t(r) {
|
|
1603
|
+
return r[0] in e && r[1] in e && r[2] in e;
|
|
1361
1604
|
}
|
|
1362
1605
|
if (e)
|
|
1363
1606
|
if (typeof e == "string") {
|
|
1364
1607
|
let s = function(o) {
|
|
1365
|
-
return
|
|
1608
|
+
return r.startsWith(o);
|
|
1366
1609
|
};
|
|
1367
|
-
const
|
|
1368
|
-
/^#?[A-F\d]{3,8}$/i.test(
|
|
1369
|
-
} else if (e instanceof
|
|
1610
|
+
const r = e.trim();
|
|
1611
|
+
/^#?[A-F\d]{3,8}$/i.test(r) ? this.fromHexString(r) : s("rgb") ? this.fromRgbString(r) : s("hsl") ? this.fromHslString(r) : (s("hsv") || s("hsb")) && this.fromHsvString(r);
|
|
1612
|
+
} else if (e instanceof me)
|
|
1370
1613
|
this.r = e.r, this.g = e.g, this.b = e.b, this.a = e.a, this._h = e._h, this._s = e._s, this._l = e._l, this._v = e._v;
|
|
1371
1614
|
else if (t("rgb"))
|
|
1372
|
-
this.r =
|
|
1615
|
+
this.r = Ne(e.r), this.g = Ne(e.g), this.b = Ne(e.b), this.a = typeof e.a == "number" ? Ne(e.a, 1) : 1;
|
|
1373
1616
|
else if (t("hsl"))
|
|
1374
1617
|
this.fromHsl(e);
|
|
1375
1618
|
else if (t("hsv"))
|
|
@@ -1404,13 +1647,13 @@ class pe {
|
|
|
1404
1647
|
const i = o / 255;
|
|
1405
1648
|
return i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
1406
1649
|
}
|
|
1407
|
-
const t = e(this.r),
|
|
1408
|
-
return 0.2126 * t + 0.7152 *
|
|
1650
|
+
const t = e(this.r), r = e(this.g), s = e(this.b);
|
|
1651
|
+
return 0.2126 * t + 0.7152 * r + 0.0722 * s;
|
|
1409
1652
|
}
|
|
1410
1653
|
getHue() {
|
|
1411
1654
|
if (typeof this._h > "u") {
|
|
1412
1655
|
const e = this.getMax() - this.getMin();
|
|
1413
|
-
e === 0 ? this._h = 0 : this._h =
|
|
1656
|
+
e === 0 ? this._h = 0 : this._h = I(60 * (this.r === this.getMax() ? (this.g - this.b) / e + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / e + 2 : (this.r - this.g) / e + 4));
|
|
1414
1657
|
}
|
|
1415
1658
|
return this._h;
|
|
1416
1659
|
}
|
|
@@ -1437,21 +1680,21 @@ class pe {
|
|
|
1437
1680
|
}
|
|
1438
1681
|
// ======================== Func ========================
|
|
1439
1682
|
darken(e = 10) {
|
|
1440
|
-
const t = this.getHue(),
|
|
1683
|
+
const t = this.getHue(), r = this.getSaturation();
|
|
1441
1684
|
let s = this.getLightness() - e / 100;
|
|
1442
1685
|
return s < 0 && (s = 0), this._c({
|
|
1443
1686
|
h: t,
|
|
1444
|
-
s:
|
|
1687
|
+
s: r,
|
|
1445
1688
|
l: s,
|
|
1446
1689
|
a: this.a
|
|
1447
1690
|
});
|
|
1448
1691
|
}
|
|
1449
1692
|
lighten(e = 10) {
|
|
1450
|
-
const t = this.getHue(),
|
|
1693
|
+
const t = this.getHue(), r = this.getSaturation();
|
|
1451
1694
|
let s = this.getLightness() + e / 100;
|
|
1452
1695
|
return s > 1 && (s = 1), this._c({
|
|
1453
1696
|
h: t,
|
|
1454
|
-
s:
|
|
1697
|
+
s: r,
|
|
1455
1698
|
l: s,
|
|
1456
1699
|
a: this.a
|
|
1457
1700
|
});
|
|
@@ -1461,11 +1704,11 @@ class pe {
|
|
|
1461
1704
|
* 0 means no mixing (return current color).
|
|
1462
1705
|
*/
|
|
1463
1706
|
mix(e, t = 50) {
|
|
1464
|
-
const
|
|
1465
|
-
r:
|
|
1466
|
-
g:
|
|
1467
|
-
b:
|
|
1468
|
-
a:
|
|
1707
|
+
const r = this._c(e), s = t / 100, o = (l) => (r[l] - this[l]) * s + this[l], i = {
|
|
1708
|
+
r: I(o("r")),
|
|
1709
|
+
g: I(o("g")),
|
|
1710
|
+
b: I(o("b")),
|
|
1711
|
+
a: I(o("a") * 100) / 100
|
|
1469
1712
|
};
|
|
1470
1713
|
return this._c(i);
|
|
1471
1714
|
}
|
|
@@ -1494,12 +1737,12 @@ class pe {
|
|
|
1494
1737
|
}, e);
|
|
1495
1738
|
}
|
|
1496
1739
|
onBackground(e) {
|
|
1497
|
-
const t = this._c(e),
|
|
1740
|
+
const t = this._c(e), r = this.a + t.a * (1 - this.a), s = (o) => I((this[o] * this.a + t[o] * t.a * (1 - this.a)) / r);
|
|
1498
1741
|
return this._c({
|
|
1499
1742
|
r: s("r"),
|
|
1500
1743
|
g: s("g"),
|
|
1501
1744
|
b: s("b"),
|
|
1502
|
-
a:
|
|
1745
|
+
a: r
|
|
1503
1746
|
});
|
|
1504
1747
|
}
|
|
1505
1748
|
// ======================= Status =======================
|
|
@@ -1521,11 +1764,11 @@ class pe {
|
|
|
1521
1764
|
let e = "#";
|
|
1522
1765
|
const t = (this.r || 0).toString(16);
|
|
1523
1766
|
e += t.length === 2 ? t : "0" + t;
|
|
1524
|
-
const
|
|
1525
|
-
e +=
|
|
1767
|
+
const r = (this.g || 0).toString(16);
|
|
1768
|
+
e += r.length === 2 ? r : "0" + r;
|
|
1526
1769
|
const s = (this.b || 0).toString(16);
|
|
1527
1770
|
if (e += s.length === 2 ? s : "0" + s, typeof this.a == "number" && this.a >= 0 && this.a < 1) {
|
|
1528
|
-
const o =
|
|
1771
|
+
const o = I(this.a * 255).toString(16);
|
|
1529
1772
|
e += o.length === 2 ? o : "0" + o;
|
|
1530
1773
|
}
|
|
1531
1774
|
return e;
|
|
@@ -1541,8 +1784,8 @@ class pe {
|
|
|
1541
1784
|
}
|
|
1542
1785
|
/** CSS support color pattern */
|
|
1543
1786
|
toHslString() {
|
|
1544
|
-
const e = this.getHue(), t =
|
|
1545
|
-
return this.a !== 1 ? `hsla(${e},${t}%,${
|
|
1787
|
+
const e = this.getHue(), t = I(this.getSaturation() * 100), r = I(this.getLightness() * 100);
|
|
1788
|
+
return this.a !== 1 ? `hsla(${e},${t}%,${r}%,${this.a})` : `hsl(${e},${t}%,${r}%)`;
|
|
1546
1789
|
}
|
|
1547
1790
|
/** Same as toHsb */
|
|
1548
1791
|
toHsv() {
|
|
@@ -1569,9 +1812,9 @@ class pe {
|
|
|
1569
1812
|
}
|
|
1570
1813
|
// ====================== Privates ======================
|
|
1571
1814
|
/** Return a new FastColor object with one channel changed */
|
|
1572
|
-
_sc(e, t,
|
|
1815
|
+
_sc(e, t, r) {
|
|
1573
1816
|
const s = this.clone();
|
|
1574
|
-
return s[e] =
|
|
1817
|
+
return s[e] = Ne(t, r), s;
|
|
1575
1818
|
}
|
|
1576
1819
|
_c(e) {
|
|
1577
1820
|
return new this.constructor(e);
|
|
@@ -1584,38 +1827,38 @@ class pe {
|
|
|
1584
1827
|
}
|
|
1585
1828
|
fromHexString(e) {
|
|
1586
1829
|
const t = e.replace("#", "");
|
|
1587
|
-
function
|
|
1830
|
+
function r(s, o) {
|
|
1588
1831
|
return parseInt(t[s] + t[o || s], 16);
|
|
1589
1832
|
}
|
|
1590
|
-
t.length < 6 ? (this.r =
|
|
1833
|
+
t.length < 6 ? (this.r = r(0), this.g = r(1), this.b = r(2), this.a = t[3] ? r(3) / 255 : 1) : (this.r = r(0, 1), this.g = r(2, 3), this.b = r(4, 5), this.a = t[6] ? r(6, 7) / 255 : 1);
|
|
1591
1834
|
}
|
|
1592
1835
|
fromHsl({
|
|
1593
1836
|
h: e,
|
|
1594
1837
|
s: t,
|
|
1595
|
-
l:
|
|
1838
|
+
l: r,
|
|
1596
1839
|
a: s
|
|
1597
1840
|
}) {
|
|
1598
|
-
if (this._h = e % 360, this._s = t, this._l =
|
|
1599
|
-
const b =
|
|
1841
|
+
if (this._h = e % 360, this._s = t, this._l = r, this.a = typeof s == "number" ? s : 1, t <= 0) {
|
|
1842
|
+
const b = I(r * 255);
|
|
1600
1843
|
this.r = b, this.g = b, this.b = b;
|
|
1601
1844
|
}
|
|
1602
1845
|
let o = 0, i = 0, l = 0;
|
|
1603
|
-
const u = e / 60, c = (1 - Math.abs(2 *
|
|
1846
|
+
const u = e / 60, c = (1 - Math.abs(2 * r - 1)) * t, g = c * (1 - Math.abs(u % 2 - 1));
|
|
1604
1847
|
u >= 0 && u < 1 ? (o = c, i = g) : u >= 1 && u < 2 ? (o = g, i = c) : u >= 2 && u < 3 ? (i = c, l = g) : u >= 3 && u < 4 ? (i = g, l = c) : u >= 4 && u < 5 ? (o = g, l = c) : u >= 5 && u < 6 && (o = c, l = g);
|
|
1605
|
-
const d =
|
|
1606
|
-
this.r =
|
|
1848
|
+
const d = r - c / 2;
|
|
1849
|
+
this.r = I((o + d) * 255), this.g = I((i + d) * 255), this.b = I((l + d) * 255);
|
|
1607
1850
|
}
|
|
1608
1851
|
fromHsv({
|
|
1609
1852
|
h: e,
|
|
1610
1853
|
s: t,
|
|
1611
|
-
v:
|
|
1854
|
+
v: r,
|
|
1612
1855
|
a: s
|
|
1613
1856
|
}) {
|
|
1614
|
-
this._h = e % 360, this._s = t, this._v =
|
|
1615
|
-
const o =
|
|
1857
|
+
this._h = e % 360, this._s = t, this._v = r, this.a = typeof s == "number" ? s : 1;
|
|
1858
|
+
const o = I(r * 255);
|
|
1616
1859
|
if (this.r = o, this.g = o, this.b = o, t <= 0)
|
|
1617
1860
|
return;
|
|
1618
|
-
const i = e / 60, l = Math.floor(i), u = i - l, c =
|
|
1861
|
+
const i = e / 60, l = Math.floor(i), u = i - l, c = I(r * (1 - t) * 255), g = I(r * (1 - t * u) * 255), d = I(r * (1 - t * (1 - u)) * 255);
|
|
1619
1862
|
switch (l) {
|
|
1620
1863
|
case 0:
|
|
1621
1864
|
this.g = d, this.b = c;
|
|
@@ -1639,7 +1882,7 @@ class pe {
|
|
|
1639
1882
|
}
|
|
1640
1883
|
}
|
|
1641
1884
|
fromHsvString(e) {
|
|
1642
|
-
const t =
|
|
1885
|
+
const t = at(e, Ft);
|
|
1643
1886
|
this.fromHsv({
|
|
1644
1887
|
h: t[0],
|
|
1645
1888
|
s: t[1],
|
|
@@ -1648,7 +1891,7 @@ class pe {
|
|
|
1648
1891
|
});
|
|
1649
1892
|
}
|
|
1650
1893
|
fromHslString(e) {
|
|
1651
|
-
const t =
|
|
1894
|
+
const t = at(e, Ft);
|
|
1652
1895
|
this.fromHsl({
|
|
1653
1896
|
h: t[0],
|
|
1654
1897
|
s: t[1],
|
|
@@ -1657,14 +1900,14 @@ class pe {
|
|
|
1657
1900
|
});
|
|
1658
1901
|
}
|
|
1659
1902
|
fromRgbString(e) {
|
|
1660
|
-
const t =
|
|
1903
|
+
const t = at(e, (r, s) => (
|
|
1661
1904
|
// Convert percentage to number. e.g. 50% -> 128
|
|
1662
|
-
s.includes("%") ?
|
|
1905
|
+
s.includes("%") ? I(r / 100 * 255) : r
|
|
1663
1906
|
));
|
|
1664
1907
|
this.r = t[0], this.g = t[1], this.b = t[2], this.a = t[3];
|
|
1665
1908
|
}
|
|
1666
1909
|
}
|
|
1667
|
-
var Ye = 2,
|
|
1910
|
+
var Ye = 2, Ut = 0.16, Ln = 0.05, Yn = 0.05, Hn = 0.15, dr = 5, hr = 4, zn = [{
|
|
1668
1911
|
index: 7,
|
|
1669
1912
|
amount: 15
|
|
1670
1913
|
}, {
|
|
@@ -1695,115 +1938,115 @@ var Ye = 2, Vt = 0.16, Mn = 0.05, Yn = 0.05, zn = 0.15, ur = 5, fr = 4, Hn = [{
|
|
|
1695
1938
|
index: 1,
|
|
1696
1939
|
amount: 98
|
|
1697
1940
|
}];
|
|
1698
|
-
function
|
|
1699
|
-
var
|
|
1700
|
-
return Math.round(
|
|
1701
|
-
}
|
|
1702
|
-
function
|
|
1703
|
-
if (
|
|
1704
|
-
return
|
|
1705
|
-
var
|
|
1706
|
-
return t ?
|
|
1707
|
-
}
|
|
1708
|
-
function
|
|
1709
|
-
var
|
|
1710
|
-
return t ?
|
|
1711
|
-
}
|
|
1712
|
-
function
|
|
1713
|
-
for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [],
|
|
1714
|
-
var i = new
|
|
1715
|
-
h:
|
|
1716
|
-
s:
|
|
1717
|
-
v:
|
|
1941
|
+
function Wt(n, e, t) {
|
|
1942
|
+
var r;
|
|
1943
|
+
return Math.round(n.h) >= 60 && Math.round(n.h) <= 240 ? r = t ? Math.round(n.h) - Ye * e : Math.round(n.h) + Ye * e : r = t ? Math.round(n.h) + Ye * e : Math.round(n.h) - Ye * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
|
|
1944
|
+
}
|
|
1945
|
+
function Bt(n, e, t) {
|
|
1946
|
+
if (n.h === 0 && n.s === 0)
|
|
1947
|
+
return n.s;
|
|
1948
|
+
var r;
|
|
1949
|
+
return t ? r = n.s - Ut * e : e === hr ? r = n.s + Ut : r = n.s + Ln * e, r > 1 && (r = 1), t && e === dr && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Math.round(r * 100) / 100;
|
|
1950
|
+
}
|
|
1951
|
+
function qt(n, e, t) {
|
|
1952
|
+
var r;
|
|
1953
|
+
return t ? r = n.v + Yn * e : r = n.v - Hn * e, r = Math.max(0, Math.min(1, r)), Math.round(r * 100) / 100;
|
|
1954
|
+
}
|
|
1955
|
+
function Vn(n) {
|
|
1956
|
+
for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], r = new me(n), s = r.toHsv(), o = dr; o > 0; o -= 1) {
|
|
1957
|
+
var i = new me({
|
|
1958
|
+
h: Wt(s, o, !0),
|
|
1959
|
+
s: Bt(s, o, !0),
|
|
1960
|
+
v: qt(s, o, !0)
|
|
1718
1961
|
});
|
|
1719
1962
|
t.push(i);
|
|
1720
1963
|
}
|
|
1721
|
-
t.push(
|
|
1722
|
-
for (var l = 1; l <=
|
|
1723
|
-
var u = new
|
|
1724
|
-
h:
|
|
1725
|
-
s:
|
|
1726
|
-
v:
|
|
1964
|
+
t.push(r);
|
|
1965
|
+
for (var l = 1; l <= hr; l += 1) {
|
|
1966
|
+
var u = new me({
|
|
1967
|
+
h: Wt(s, l),
|
|
1968
|
+
s: Bt(s, l),
|
|
1969
|
+
v: qt(s, l)
|
|
1727
1970
|
});
|
|
1728
1971
|
t.push(u);
|
|
1729
1972
|
}
|
|
1730
|
-
return e.theme === "dark" ?
|
|
1973
|
+
return e.theme === "dark" ? zn.map(function(c) {
|
|
1731
1974
|
var g = c.index, d = c.amount;
|
|
1732
|
-
return new
|
|
1975
|
+
return new me(e.backgroundColor || "#141414").mix(t[g], d).toHexString();
|
|
1733
1976
|
}) : t.map(function(c) {
|
|
1734
1977
|
return c.toHexString();
|
|
1735
1978
|
});
|
|
1736
1979
|
}
|
|
1737
|
-
var
|
|
1738
|
-
|
|
1739
|
-
function
|
|
1740
|
-
var t = Object.keys(
|
|
1980
|
+
var dt = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
|
|
1981
|
+
dt.primary = dt[5];
|
|
1982
|
+
function Zt(n, e) {
|
|
1983
|
+
var t = Object.keys(n);
|
|
1741
1984
|
if (Object.getOwnPropertySymbols) {
|
|
1742
|
-
var
|
|
1743
|
-
e && (
|
|
1744
|
-
return Object.getOwnPropertyDescriptor(
|
|
1745
|
-
})), t.push.apply(t,
|
|
1985
|
+
var r = Object.getOwnPropertySymbols(n);
|
|
1986
|
+
e && (r = r.filter(function(s) {
|
|
1987
|
+
return Object.getOwnPropertyDescriptor(n, s).enumerable;
|
|
1988
|
+
})), t.push.apply(t, r);
|
|
1746
1989
|
}
|
|
1747
1990
|
return t;
|
|
1748
1991
|
}
|
|
1749
|
-
function
|
|
1992
|
+
function re(n) {
|
|
1750
1993
|
for (var e = 1; e < arguments.length; e++) {
|
|
1751
1994
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
1752
|
-
e % 2 ?
|
|
1753
|
-
|
|
1754
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
1755
|
-
Object.defineProperty(
|
|
1995
|
+
e % 2 ? Zt(Object(t), !0).forEach(function(r) {
|
|
1996
|
+
U(n, r, t[r]);
|
|
1997
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Zt(Object(t)).forEach(function(r) {
|
|
1998
|
+
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
1756
1999
|
});
|
|
1757
2000
|
}
|
|
1758
|
-
return
|
|
2001
|
+
return n;
|
|
1759
2002
|
}
|
|
1760
|
-
function
|
|
2003
|
+
function Fn() {
|
|
1761
2004
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1762
2005
|
}
|
|
1763
|
-
function
|
|
1764
|
-
if (!
|
|
2006
|
+
function Un(n, e) {
|
|
2007
|
+
if (!n)
|
|
1765
2008
|
return !1;
|
|
1766
|
-
if (
|
|
1767
|
-
return
|
|
2009
|
+
if (n.contains)
|
|
2010
|
+
return n.contains(e);
|
|
1768
2011
|
for (var t = e; t; ) {
|
|
1769
|
-
if (t ===
|
|
2012
|
+
if (t === n)
|
|
1770
2013
|
return !0;
|
|
1771
2014
|
t = t.parentNode;
|
|
1772
2015
|
}
|
|
1773
2016
|
return !1;
|
|
1774
2017
|
}
|
|
1775
|
-
var
|
|
1776
|
-
function
|
|
1777
|
-
var
|
|
1778
|
-
return e ? e.startsWith("data-") ? e : "data-".concat(e) :
|
|
2018
|
+
var Gt = "data-rc-order", Kt = "data-rc-priority", Wn = "rc-util-key", ht = /* @__PURE__ */ new Map();
|
|
2019
|
+
function gr() {
|
|
2020
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = n.mark;
|
|
2021
|
+
return e ? e.startsWith("data-") ? e : "data-".concat(e) : Wn;
|
|
1779
2022
|
}
|
|
1780
|
-
function
|
|
1781
|
-
if (
|
|
1782
|
-
return
|
|
2023
|
+
function mt(n) {
|
|
2024
|
+
if (n.attachTo)
|
|
2025
|
+
return n.attachTo;
|
|
1783
2026
|
var e = document.querySelector("head");
|
|
1784
2027
|
return e || document.body;
|
|
1785
2028
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
2029
|
+
function Bn(n) {
|
|
2030
|
+
return n === "queue" ? "prependQueue" : n ? "prepend" : "append";
|
|
1788
2031
|
}
|
|
1789
|
-
function
|
|
1790
|
-
return Array.from((
|
|
2032
|
+
function vt(n) {
|
|
2033
|
+
return Array.from((ht.get(n) || n).children).filter(function(e) {
|
|
1791
2034
|
return e.tagName === "STYLE";
|
|
1792
2035
|
});
|
|
1793
2036
|
}
|
|
1794
|
-
function
|
|
2037
|
+
function pr(n) {
|
|
1795
2038
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1796
|
-
if (!
|
|
2039
|
+
if (!Fn())
|
|
1797
2040
|
return null;
|
|
1798
|
-
var t = e.csp,
|
|
1799
|
-
u.setAttribute(
|
|
1800
|
-
var c =
|
|
1801
|
-
if (
|
|
2041
|
+
var t = e.csp, r = e.prepend, s = e.priority, o = s === void 0 ? 0 : s, i = Bn(r), l = i === "prependQueue", u = document.createElement("style");
|
|
2042
|
+
u.setAttribute(Gt, i), l && o && u.setAttribute(Kt, "".concat(o)), t != null && t.nonce && (u.nonce = t == null ? void 0 : t.nonce), u.innerHTML = n;
|
|
2043
|
+
var c = mt(e), g = c.firstChild;
|
|
2044
|
+
if (r) {
|
|
1802
2045
|
if (l) {
|
|
1803
|
-
var d = (e.styles ||
|
|
1804
|
-
if (!["prepend", "prependQueue"].includes(b.getAttribute(
|
|
2046
|
+
var d = (e.styles || vt(c)).filter(function(b) {
|
|
2047
|
+
if (!["prepend", "prependQueue"].includes(b.getAttribute(Gt)))
|
|
1805
2048
|
return !1;
|
|
1806
|
-
var O = Number(b.getAttribute(
|
|
2049
|
+
var O = Number(b.getAttribute(Kt) || 0);
|
|
1807
2050
|
return o >= O;
|
|
1808
2051
|
});
|
|
1809
2052
|
if (d.length)
|
|
@@ -1814,123 +2057,123 @@ function hr(r) {
|
|
|
1814
2057
|
c.appendChild(u);
|
|
1815
2058
|
return u;
|
|
1816
2059
|
}
|
|
1817
|
-
function
|
|
1818
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t =
|
|
1819
|
-
return (e.styles ||
|
|
1820
|
-
return
|
|
2060
|
+
function qn(n) {
|
|
2061
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = mt(e);
|
|
2062
|
+
return (e.styles || vt(t)).find(function(r) {
|
|
2063
|
+
return r.getAttribute(gr(e)) === n;
|
|
1821
2064
|
});
|
|
1822
2065
|
}
|
|
1823
|
-
function Zn(
|
|
1824
|
-
var t =
|
|
1825
|
-
if (!t || !
|
|
1826
|
-
var
|
|
1827
|
-
|
|
2066
|
+
function Zn(n, e) {
|
|
2067
|
+
var t = ht.get(n);
|
|
2068
|
+
if (!t || !Un(document, t)) {
|
|
2069
|
+
var r = pr("", e), s = r.parentNode;
|
|
2070
|
+
ht.set(n, s), n.removeChild(r);
|
|
1828
2071
|
}
|
|
1829
2072
|
}
|
|
1830
|
-
function
|
|
1831
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
2073
|
+
function Gn(n, e) {
|
|
2074
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = mt(t), s = vt(r), o = re(re({}, t), {}, {
|
|
1832
2075
|
styles: s
|
|
1833
2076
|
});
|
|
1834
|
-
Zn(
|
|
1835
|
-
var i =
|
|
2077
|
+
Zn(r, o);
|
|
2078
|
+
var i = qn(e, o);
|
|
1836
2079
|
if (i) {
|
|
1837
2080
|
var l, u;
|
|
1838
2081
|
if ((l = o.csp) !== null && l !== void 0 && l.nonce && i.nonce !== ((u = o.csp) === null || u === void 0 ? void 0 : u.nonce)) {
|
|
1839
2082
|
var c;
|
|
1840
2083
|
i.nonce = (c = o.csp) === null || c === void 0 ? void 0 : c.nonce;
|
|
1841
2084
|
}
|
|
1842
|
-
return i.innerHTML !==
|
|
2085
|
+
return i.innerHTML !== n && (i.innerHTML = n), i;
|
|
1843
2086
|
}
|
|
1844
|
-
var g =
|
|
1845
|
-
return g.setAttribute(
|
|
2087
|
+
var g = pr(n, o);
|
|
2088
|
+
return g.setAttribute(gr(o), e), g;
|
|
1846
2089
|
}
|
|
1847
|
-
function
|
|
2090
|
+
function mr(n) {
|
|
1848
2091
|
var e;
|
|
1849
|
-
return
|
|
2092
|
+
return n == null || (e = n.getRootNode) === null || e === void 0 ? void 0 : e.call(n);
|
|
1850
2093
|
}
|
|
1851
|
-
function Kn(
|
|
1852
|
-
return
|
|
2094
|
+
function Kn(n) {
|
|
2095
|
+
return mr(n) instanceof ShadowRoot;
|
|
1853
2096
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return Kn(
|
|
2097
|
+
function Jn(n) {
|
|
2098
|
+
return Kn(n) ? mr(n) : null;
|
|
1856
2099
|
}
|
|
1857
|
-
var
|
|
1858
|
-
|
|
2100
|
+
var gt = {}, bt = [], Xn = function(e) {
|
|
2101
|
+
bt.push(e);
|
|
1859
2102
|
};
|
|
1860
|
-
function
|
|
1861
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1862
|
-
var t =
|
|
1863
|
-
return s(
|
|
2103
|
+
function Qn(n, e) {
|
|
2104
|
+
if (process.env.NODE_ENV !== "production" && !n && console !== void 0) {
|
|
2105
|
+
var t = bt.reduce(function(r, s) {
|
|
2106
|
+
return s(r ?? "", "warning");
|
|
1864
2107
|
}, e);
|
|
1865
2108
|
t && console.error("Warning: ".concat(t));
|
|
1866
2109
|
}
|
|
1867
2110
|
}
|
|
1868
|
-
function
|
|
1869
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1870
|
-
var t =
|
|
1871
|
-
return s(
|
|
2111
|
+
function ea(n, e) {
|
|
2112
|
+
if (process.env.NODE_ENV !== "production" && !n && console !== void 0) {
|
|
2113
|
+
var t = bt.reduce(function(r, s) {
|
|
2114
|
+
return s(r ?? "", "note");
|
|
1872
2115
|
}, e);
|
|
1873
2116
|
t && console.warn("Note: ".concat(t));
|
|
1874
2117
|
}
|
|
1875
2118
|
}
|
|
1876
|
-
function
|
|
1877
|
-
|
|
2119
|
+
function ta() {
|
|
2120
|
+
gt = {};
|
|
1878
2121
|
}
|
|
1879
|
-
function
|
|
1880
|
-
!e && !
|
|
2122
|
+
function vr(n, e, t) {
|
|
2123
|
+
!e && !gt[t] && (n(!1, t), gt[t] = !0);
|
|
1881
2124
|
}
|
|
1882
|
-
function
|
|
1883
|
-
|
|
2125
|
+
function We(n, e) {
|
|
2126
|
+
vr(Qn, n, e);
|
|
1884
2127
|
}
|
|
1885
|
-
function
|
|
1886
|
-
|
|
2128
|
+
function ra(n, e) {
|
|
2129
|
+
vr(ea, n, e);
|
|
1887
2130
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
2131
|
+
We.preMessage = Xn;
|
|
2132
|
+
We.resetWarned = ta;
|
|
2133
|
+
We.noteOnce = ra;
|
|
2134
|
+
function na(n) {
|
|
2135
|
+
return n.replace(/-(.)/g, function(e, t) {
|
|
1893
2136
|
return t.toUpperCase();
|
|
1894
2137
|
});
|
|
1895
2138
|
}
|
|
1896
|
-
function
|
|
1897
|
-
|
|
2139
|
+
function aa(n, e) {
|
|
2140
|
+
We(n, "[@ant-design/icons] ".concat(e));
|
|
1898
2141
|
}
|
|
1899
|
-
function
|
|
1900
|
-
return
|
|
2142
|
+
function Jt(n) {
|
|
2143
|
+
return de(n) === "object" && typeof n.name == "string" && typeof n.theme == "string" && (de(n.icon) === "object" || typeof n.icon == "function");
|
|
1901
2144
|
}
|
|
1902
|
-
function
|
|
1903
|
-
var
|
|
1904
|
-
return Object.keys(
|
|
1905
|
-
var
|
|
2145
|
+
function Xt() {
|
|
2146
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2147
|
+
return Object.keys(n).reduce(function(e, t) {
|
|
2148
|
+
var r = n[t];
|
|
1906
2149
|
switch (t) {
|
|
1907
2150
|
case "class":
|
|
1908
|
-
e.className =
|
|
2151
|
+
e.className = r, delete e.class;
|
|
1909
2152
|
break;
|
|
1910
2153
|
default:
|
|
1911
|
-
delete e[t], e[
|
|
2154
|
+
delete e[t], e[na(t)] = r;
|
|
1912
2155
|
}
|
|
1913
2156
|
return e;
|
|
1914
2157
|
}, {});
|
|
1915
2158
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return t ? /* @__PURE__ */
|
|
2159
|
+
function pt(n, e, t) {
|
|
2160
|
+
return t ? /* @__PURE__ */ Ve.createElement(n.tag, re(re({
|
|
1918
2161
|
key: e
|
|
1919
|
-
},
|
|
1920
|
-
return
|
|
1921
|
-
})) : /* @__PURE__ */
|
|
2162
|
+
}, Xt(n.attrs)), t), (n.children || []).map(function(r, s) {
|
|
2163
|
+
return pt(r, "".concat(e, "-").concat(n.tag, "-").concat(s));
|
|
2164
|
+
})) : /* @__PURE__ */ Ve.createElement(n.tag, re({
|
|
1922
2165
|
key: e
|
|
1923
|
-
},
|
|
1924
|
-
return
|
|
2166
|
+
}, Xt(n.attrs)), (n.children || []).map(function(r, s) {
|
|
2167
|
+
return pt(r, "".concat(e, "-").concat(n.tag, "-").concat(s));
|
|
1925
2168
|
}));
|
|
1926
2169
|
}
|
|
1927
|
-
function
|
|
1928
|
-
return
|
|
2170
|
+
function br(n) {
|
|
2171
|
+
return Vn(n)[0];
|
|
1929
2172
|
}
|
|
1930
|
-
function
|
|
1931
|
-
return
|
|
2173
|
+
function yr(n) {
|
|
2174
|
+
return n ? Array.isArray(n) ? n : [n] : [];
|
|
1932
2175
|
}
|
|
1933
|
-
var
|
|
2176
|
+
var sa = `
|
|
1934
2177
|
.anticon {
|
|
1935
2178
|
display: inline-flex;
|
|
1936
2179
|
align-items: center;
|
|
@@ -1985,42 +2228,42 @@ var aa = `
|
|
|
1985
2228
|
transform: rotate(360deg);
|
|
1986
2229
|
}
|
|
1987
2230
|
}
|
|
1988
|
-
`,
|
|
1989
|
-
var t =
|
|
2231
|
+
`, oa = function(e) {
|
|
2232
|
+
var t = rr(cr), r = t.csp, s = t.prefixCls, o = t.layer, i = sa;
|
|
1990
2233
|
s && (i = i.replace(/anticon/g, s)), o && (i = "@layer ".concat(o, ` {
|
|
1991
2234
|
`).concat(i, `
|
|
1992
|
-
}`)),
|
|
1993
|
-
var l = e.current, u =
|
|
1994
|
-
|
|
2235
|
+
}`)), ie(function() {
|
|
2236
|
+
var l = e.current, u = Jn(l);
|
|
2237
|
+
Gn(i, "@ant-design-icons", {
|
|
1995
2238
|
prepend: !o,
|
|
1996
|
-
csp:
|
|
2239
|
+
csp: r,
|
|
1997
2240
|
attachTo: u
|
|
1998
2241
|
});
|
|
1999
2242
|
}, []);
|
|
2000
|
-
},
|
|
2243
|
+
}, ia = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"], Te = {
|
|
2001
2244
|
primaryColor: "#333",
|
|
2002
2245
|
secondaryColor: "#E6E6E6",
|
|
2003
2246
|
calculated: !1
|
|
2004
2247
|
};
|
|
2005
|
-
function
|
|
2006
|
-
var e =
|
|
2007
|
-
Te.primaryColor = e, Te.secondaryColor = t ||
|
|
2248
|
+
function ca(n) {
|
|
2249
|
+
var e = n.primaryColor, t = n.secondaryColor;
|
|
2250
|
+
Te.primaryColor = e, Te.secondaryColor = t || br(e), Te.calculated = !!t;
|
|
2008
2251
|
}
|
|
2009
|
-
function
|
|
2010
|
-
return
|
|
2252
|
+
function la() {
|
|
2253
|
+
return re({}, Te);
|
|
2011
2254
|
}
|
|
2012
|
-
var
|
|
2013
|
-
var t = e.icon,
|
|
2255
|
+
var Be = function(e) {
|
|
2256
|
+
var t = e.icon, r = e.className, s = e.onClick, o = e.style, i = e.primaryColor, l = e.secondaryColor, u = ur(e, ia), c = W.useRef(), g = Te;
|
|
2014
2257
|
if (i && (g = {
|
|
2015
2258
|
primaryColor: i,
|
|
2016
|
-
secondaryColor: l ||
|
|
2017
|
-
}),
|
|
2259
|
+
secondaryColor: l || br(i)
|
|
2260
|
+
}), oa(c), aa(Jt(t), "icon should be icon definiton, but got ".concat(t)), !Jt(t))
|
|
2018
2261
|
return null;
|
|
2019
2262
|
var d = t;
|
|
2020
|
-
return d && typeof d.icon == "function" && (d =
|
|
2263
|
+
return d && typeof d.icon == "function" && (d = re(re({}, d), {}, {
|
|
2021
2264
|
icon: d.icon(g.primaryColor, g.secondaryColor)
|
|
2022
|
-
})),
|
|
2023
|
-
className:
|
|
2265
|
+
})), pt(d.icon, "svg-".concat(d.name), re(re({
|
|
2266
|
+
className: r,
|
|
2024
2267
|
onClick: s,
|
|
2025
2268
|
style: o,
|
|
2026
2269
|
"data-icon": d.name,
|
|
@@ -2032,81 +2275,81 @@ var We = function(e) {
|
|
|
2032
2275
|
ref: c
|
|
2033
2276
|
}));
|
|
2034
2277
|
};
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
const
|
|
2039
|
-
function
|
|
2040
|
-
var e =
|
|
2041
|
-
return
|
|
2042
|
-
primaryColor:
|
|
2278
|
+
Be.displayName = "IconReact";
|
|
2279
|
+
Be.getTwoToneColors = la;
|
|
2280
|
+
Be.setTwoToneColors = ca;
|
|
2281
|
+
const yt = Be;
|
|
2282
|
+
function wr(n) {
|
|
2283
|
+
var e = yr(n), t = lr(e, 2), r = t[0], s = t[1];
|
|
2284
|
+
return yt.setTwoToneColors({
|
|
2285
|
+
primaryColor: r,
|
|
2043
2286
|
secondaryColor: s
|
|
2044
2287
|
});
|
|
2045
2288
|
}
|
|
2046
|
-
function
|
|
2047
|
-
var
|
|
2048
|
-
return
|
|
2049
|
-
}
|
|
2050
|
-
var
|
|
2051
|
-
|
|
2052
|
-
var
|
|
2053
|
-
var t =
|
|
2054
|
-
|
|
2055
|
-
var
|
|
2289
|
+
function ua() {
|
|
2290
|
+
var n = yt.getTwoToneColors();
|
|
2291
|
+
return n.calculated ? [n.primaryColor, n.secondaryColor] : n.primaryColor;
|
|
2292
|
+
}
|
|
2293
|
+
var fa = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
2294
|
+
wr(dt.primary);
|
|
2295
|
+
var qe = /* @__PURE__ */ W.forwardRef(function(n, e) {
|
|
2296
|
+
var t = n.className, r = n.icon, s = n.spin, o = n.rotate, i = n.tabIndex, l = n.onClick, u = n.twoToneColor, c = ur(n, fa), g = W.useContext(cr), d = g.prefixCls, b = d === void 0 ? "anticon" : d, O = g.rootClassName, P = In(O, b, U(U({}, "".concat(b, "-").concat(r.name), !!r.name), "".concat(b, "-spin"), !!s || r.name === "loading"), t), T = i;
|
|
2297
|
+
T === void 0 && l && (T = -1);
|
|
2298
|
+
var H = o ? {
|
|
2056
2299
|
msTransform: "rotate(".concat(o, "deg)"),
|
|
2057
2300
|
transform: "rotate(".concat(o, "deg)")
|
|
2058
|
-
} : void 0, j =
|
|
2059
|
-
return /* @__PURE__ */
|
|
2301
|
+
} : void 0, j = yr(u), y = lr(j, 2), E = y[0], M = y[1];
|
|
2302
|
+
return /* @__PURE__ */ W.createElement("span", ye({
|
|
2060
2303
|
role: "img",
|
|
2061
|
-
"aria-label":
|
|
2304
|
+
"aria-label": r.name
|
|
2062
2305
|
}, c, {
|
|
2063
2306
|
ref: e,
|
|
2064
|
-
tabIndex:
|
|
2307
|
+
tabIndex: T,
|
|
2065
2308
|
onClick: l,
|
|
2066
|
-
className:
|
|
2067
|
-
}), /* @__PURE__ */
|
|
2068
|
-
icon:
|
|
2309
|
+
className: P
|
|
2310
|
+
}), /* @__PURE__ */ W.createElement(yt, {
|
|
2311
|
+
icon: r,
|
|
2069
2312
|
primaryColor: E,
|
|
2070
|
-
secondaryColor:
|
|
2071
|
-
style:
|
|
2313
|
+
secondaryColor: M,
|
|
2314
|
+
style: H
|
|
2072
2315
|
}));
|
|
2073
2316
|
});
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2078
|
-
var
|
|
2079
|
-
const
|
|
2080
|
-
var
|
|
2081
|
-
return /* @__PURE__ */
|
|
2317
|
+
qe.displayName = "AntdIcon";
|
|
2318
|
+
qe.getTwoToneColor = ua;
|
|
2319
|
+
qe.setTwoToneColor = wr;
|
|
2320
|
+
const wt = qe;
|
|
2321
|
+
var da = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "outlined" };
|
|
2322
|
+
const ha = da;
|
|
2323
|
+
var ga = function(e, t) {
|
|
2324
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
2082
2325
|
ref: t,
|
|
2083
|
-
icon:
|
|
2326
|
+
icon: ha
|
|
2084
2327
|
}));
|
|
2085
|
-
},
|
|
2086
|
-
process.env.NODE_ENV !== "production" && (
|
|
2087
|
-
const
|
|
2088
|
-
var
|
|
2089
|
-
const
|
|
2090
|
-
var
|
|
2091
|
-
return /* @__PURE__ */
|
|
2328
|
+
}, xr = /* @__PURE__ */ W.forwardRef(ga);
|
|
2329
|
+
process.env.NODE_ENV !== "production" && (xr.displayName = "CaretDownOutlined");
|
|
2330
|
+
const pa = xr;
|
|
2331
|
+
var ma = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, name: "caret-up", theme: "outlined" };
|
|
2332
|
+
const va = ma;
|
|
2333
|
+
var ba = function(e, t) {
|
|
2334
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
2092
2335
|
ref: t,
|
|
2093
|
-
icon:
|
|
2336
|
+
icon: va
|
|
2094
2337
|
}));
|
|
2095
|
-
},
|
|
2096
|
-
process.env.NODE_ENV !== "production" && (
|
|
2097
|
-
const
|
|
2098
|
-
var
|
|
2099
|
-
const xa =
|
|
2338
|
+
}, Cr = /* @__PURE__ */ W.forwardRef(ba);
|
|
2339
|
+
process.env.NODE_ENV !== "production" && (Cr.displayName = "CaretUpOutlined");
|
|
2340
|
+
const ya = Cr;
|
|
2341
|
+
var wa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, name: "upload", theme: "outlined" };
|
|
2342
|
+
const xa = wa;
|
|
2100
2343
|
var Ca = function(e, t) {
|
|
2101
|
-
return /* @__PURE__ */
|
|
2344
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
2102
2345
|
ref: t,
|
|
2103
2346
|
icon: xa
|
|
2104
2347
|
}));
|
|
2105
|
-
},
|
|
2106
|
-
process.env.NODE_ENV !== "production" && (
|
|
2107
|
-
const
|
|
2108
|
-
var
|
|
2109
|
-
const { RangePicker:
|
|
2348
|
+
}, Sr = /* @__PURE__ */ W.forwardRef(Ca);
|
|
2349
|
+
process.env.NODE_ENV !== "production" && (Sr.displayName = "UploadOutlined");
|
|
2350
|
+
const Sa = Sr;
|
|
2351
|
+
var G = /* @__PURE__ */ ((n) => (n.Input = "input", n.InputNumber = "inputNumber", n.Text = "text", n.Password = "password", n.Radio = "radio", n.Select = "select", n.Checkbox = "checkbox", n.DatePicker = "datePicker", n.RangePicker = "rangePicker", n.Upload = "upload", n.Mentions = "mentions", n.Cascader = "cascader", n.TreeSelect = "treeSelect", n))(G || {});
|
|
2352
|
+
const { RangePicker: Ra } = sr, R = class R {
|
|
2110
2353
|
static getDefaultArrayPlaceholder(e) {
|
|
2111
2354
|
let t;
|
|
2112
2355
|
switch (e.type) {
|
|
@@ -2119,21 +2362,21 @@ const { RangePicker: Sa } = nr, R = class R {
|
|
|
2119
2362
|
static getDefaultPlaceholder(e) {
|
|
2120
2363
|
let t;
|
|
2121
2364
|
switch (e.type) {
|
|
2122
|
-
case
|
|
2123
|
-
case
|
|
2124
|
-
case
|
|
2125
|
-
case
|
|
2126
|
-
case
|
|
2365
|
+
case G.Input:
|
|
2366
|
+
case G.Password:
|
|
2367
|
+
case G.InputNumber:
|
|
2368
|
+
case G.Text:
|
|
2369
|
+
case G.Mentions:
|
|
2127
2370
|
t = `请输入${e.label}`;
|
|
2128
2371
|
break;
|
|
2129
|
-
case
|
|
2130
|
-
case
|
|
2131
|
-
case
|
|
2132
|
-
case
|
|
2133
|
-
case
|
|
2134
|
-
case
|
|
2135
|
-
case
|
|
2136
|
-
case
|
|
2372
|
+
case G.Select:
|
|
2373
|
+
case G.Checkbox:
|
|
2374
|
+
case G.Radio:
|
|
2375
|
+
case G.DatePicker:
|
|
2376
|
+
case G.RangePicker:
|
|
2377
|
+
case G.Cascader:
|
|
2378
|
+
case G.Upload:
|
|
2379
|
+
case G.TreeSelect:
|
|
2137
2380
|
t = `请选择${e.label}`;
|
|
2138
2381
|
break;
|
|
2139
2382
|
}
|
|
@@ -2144,7 +2387,7 @@ const { RangePicker: Sa } = nr, R = class R {
|
|
|
2144
2387
|
// };
|
|
2145
2388
|
};
|
|
2146
2389
|
m(R, "labelCol", { span: 7 }), m(R, "wrapperCol", { span: 17 }), m(R, "defaultRowGutter", 24), m(R, "input", (e) => /* @__PURE__ */ p.jsx(
|
|
2147
|
-
|
|
2390
|
+
nt,
|
|
2148
2391
|
{
|
|
2149
2392
|
disabled: e.disabled,
|
|
2150
2393
|
maxLength: e.maxLength,
|
|
@@ -2152,14 +2395,14 @@ m(R, "labelCol", { span: 7 }), m(R, "wrapperCol", { span: 17 }), m(R, "defaultRo
|
|
|
2152
2395
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2153
2396
|
}
|
|
2154
2397
|
)), m(R, "password", (e) => /* @__PURE__ */ p.jsx(
|
|
2155
|
-
|
|
2398
|
+
nt.Password,
|
|
2156
2399
|
{
|
|
2157
2400
|
disabled: e.disabled,
|
|
2158
2401
|
...e.props,
|
|
2159
2402
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2160
2403
|
}
|
|
2161
2404
|
)), m(R, "text", (e) => /* @__PURE__ */ p.jsx(
|
|
2162
|
-
|
|
2405
|
+
nt.TextArea,
|
|
2163
2406
|
{
|
|
2164
2407
|
disabled: e.disabled,
|
|
2165
2408
|
maxLength: e.maxLength,
|
|
@@ -2167,7 +2410,7 @@ m(R, "labelCol", { span: 7 }), m(R, "wrapperCol", { span: 17 }), m(R, "defaultRo
|
|
|
2167
2410
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2168
2411
|
}
|
|
2169
2412
|
)), m(R, "inputNumber", (e) => /* @__PURE__ */ p.jsx(
|
|
2170
|
-
|
|
2413
|
+
rn,
|
|
2171
2414
|
{
|
|
2172
2415
|
disabled: e.disabled,
|
|
2173
2416
|
maxLength: e.maxLength,
|
|
@@ -2175,55 +2418,55 @@ m(R, "labelCol", { span: 7 }), m(R, "wrapperCol", { span: 17 }), m(R, "defaultRo
|
|
|
2175
2418
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2176
2419
|
}
|
|
2177
2420
|
)), m(R, "datePicker", (e) => /* @__PURE__ */ p.jsx(
|
|
2178
|
-
|
|
2421
|
+
sr,
|
|
2179
2422
|
{
|
|
2180
2423
|
disabled: e.disabled,
|
|
2181
2424
|
...e.props,
|
|
2182
2425
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2183
2426
|
}
|
|
2184
2427
|
)), m(R, "rangePicker", (e) => /* @__PURE__ */ p.jsx(
|
|
2185
|
-
|
|
2428
|
+
Ra,
|
|
2186
2429
|
{
|
|
2187
2430
|
disabled: e.disabled,
|
|
2188
2431
|
...e.props,
|
|
2189
2432
|
placeholder: e.placeholder || R.getDefaultArrayPlaceholder(e)
|
|
2190
2433
|
}
|
|
2191
2434
|
)), m(R, "select", (e) => /* @__PURE__ */ p.jsx(
|
|
2192
|
-
|
|
2435
|
+
nn,
|
|
2193
2436
|
{
|
|
2194
2437
|
...e.props,
|
|
2195
2438
|
disabled: e.disabled,
|
|
2196
2439
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2197
2440
|
}
|
|
2198
|
-
)), m(R, "radio", (e) => /* @__PURE__ */ p.jsx(
|
|
2199
|
-
/* @__PURE__ */ p.jsx(
|
|
2441
|
+
)), m(R, "radio", (e) => /* @__PURE__ */ p.jsx(an.Group, { disabled: e.disabled, ...e.props })), m(R, "checkbox", (e) => /* @__PURE__ */ p.jsx(sn.Group, { disabled: e.disabled, ...e.props })), m(R, "upload", (e) => /* @__PURE__ */ p.jsx(on, { defaultFileList: e.initialValue, ...e.props, children: e.children || /* @__PURE__ */ p.jsxs(Pe, { children: [
|
|
2442
|
+
/* @__PURE__ */ p.jsx(Sa, {}),
|
|
2200
2443
|
" 点击上传"
|
|
2201
2444
|
] }) })), m(R, "mentions", (e) => /* @__PURE__ */ p.jsx(
|
|
2202
|
-
|
|
2445
|
+
cn,
|
|
2203
2446
|
{
|
|
2204
2447
|
...e.props,
|
|
2205
2448
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2206
2449
|
}
|
|
2207
2450
|
)), m(R, "cascader", (e) => /* @__PURE__ */ p.jsx(
|
|
2208
|
-
|
|
2451
|
+
ln,
|
|
2209
2452
|
{
|
|
2210
2453
|
...e.props,
|
|
2211
2454
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2212
2455
|
}
|
|
2213
2456
|
)), m(R, "treeSelect", (e) => /* @__PURE__ */ p.jsx(
|
|
2214
|
-
|
|
2457
|
+
un,
|
|
2215
2458
|
{
|
|
2216
2459
|
...e.props,
|
|
2217
2460
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2218
2461
|
}
|
|
2219
2462
|
));
|
|
2220
|
-
let
|
|
2221
|
-
const
|
|
2222
|
-
function
|
|
2223
|
-
const { formProps: e, formItems: t = [], column:
|
|
2463
|
+
let ve = R;
|
|
2464
|
+
const st = (n = "") => Ue("m-form", n);
|
|
2465
|
+
function Rr(n) {
|
|
2466
|
+
const { formProps: e, formItems: t = [], column: r = 1, form: s, itemLayout: o, formRowProps: i } = n, l = (c, g) => {
|
|
2224
2467
|
if (c.render)
|
|
2225
2468
|
return c.render(g);
|
|
2226
|
-
const d =
|
|
2469
|
+
const d = ve[c.type];
|
|
2227
2470
|
return c && c.type && d ? d(c) : /* @__PURE__ */ p.jsx("div", { className: "error-message", children: "Invalid form item configuration" });
|
|
2228
2471
|
}, u = (c) => {
|
|
2229
2472
|
const { show: g = !0 } = c;
|
|
@@ -2232,13 +2475,13 @@ function wr(r) {
|
|
|
2232
2475
|
const d = [...c.rules || []];
|
|
2233
2476
|
c.required && d.push({ required: !0, message: c.required });
|
|
2234
2477
|
const b = {
|
|
2235
|
-
labelCol:
|
|
2236
|
-
wrapperCol:
|
|
2478
|
+
labelCol: ve.labelCol,
|
|
2479
|
+
wrapperCol: ve.wrapperCol,
|
|
2237
2480
|
...o,
|
|
2238
2481
|
...c.itemLayout
|
|
2239
2482
|
};
|
|
2240
|
-
return /* @__PURE__ */ p.jsx(
|
|
2241
|
-
|
|
2483
|
+
return /* @__PURE__ */ p.jsx(dn, { span: c.span || 24 / r, children: /* @__PURE__ */ p.jsx("div", { className: st("item-wrapper"), children: /* @__PURE__ */ p.jsx(
|
|
2484
|
+
it.Item,
|
|
2242
2485
|
{
|
|
2243
2486
|
label: c.label,
|
|
2244
2487
|
name: c.id,
|
|
@@ -2250,60 +2493,60 @@ function wr(r) {
|
|
|
2250
2493
|
}
|
|
2251
2494
|
) }) }, `col-${c.id}`);
|
|
2252
2495
|
};
|
|
2253
|
-
return /* @__PURE__ */ p.jsx(
|
|
2254
|
-
|
|
2496
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(it, { form: s, ...e, className: `${st()} ${e == null ? void 0 : e.className}`, children: /* @__PURE__ */ p.jsx(
|
|
2497
|
+
fn,
|
|
2255
2498
|
{
|
|
2256
|
-
gutter:
|
|
2499
|
+
gutter: ve.defaultRowGutter,
|
|
2257
2500
|
...i,
|
|
2258
|
-
className: `${
|
|
2501
|
+
className: `${st("grid")} ${i == null ? void 0 : i.className}`,
|
|
2259
2502
|
children: t.map((c) => u(c))
|
|
2260
2503
|
}
|
|
2261
2504
|
) }) });
|
|
2262
2505
|
}
|
|
2263
|
-
|
|
2264
|
-
let
|
|
2265
|
-
const
|
|
2266
|
-
let
|
|
2267
|
-
switch (
|
|
2506
|
+
Rr.displayName = "MForm";
|
|
2507
|
+
let ot = "default";
|
|
2508
|
+
const He = [];
|
|
2509
|
+
let Qt = (n) => {
|
|
2510
|
+
switch (n) {
|
|
2268
2511
|
case "light":
|
|
2269
2512
|
return {
|
|
2270
|
-
algorithm: [
|
|
2513
|
+
algorithm: [ze.defaultAlgorithm]
|
|
2271
2514
|
};
|
|
2272
2515
|
case "dark":
|
|
2273
2516
|
return {
|
|
2274
|
-
algorithm: [
|
|
2517
|
+
algorithm: [ze.darkAlgorithm]
|
|
2275
2518
|
};
|
|
2276
2519
|
default:
|
|
2277
2520
|
return {
|
|
2278
|
-
algorithm: [
|
|
2521
|
+
algorithm: [ze.defaultAlgorithm]
|
|
2279
2522
|
};
|
|
2280
2523
|
}
|
|
2281
2524
|
};
|
|
2282
|
-
const
|
|
2525
|
+
const be = class be extends en {
|
|
2283
2526
|
constructor() {
|
|
2284
2527
|
super(...arguments);
|
|
2285
2528
|
m(this, "handleCancel", (t) => {
|
|
2286
|
-
var
|
|
2287
|
-
(s = (
|
|
2529
|
+
var r, s, o, i;
|
|
2530
|
+
(s = (r = this.props).onCancel) == null || s.call(r, t), (i = (o = this.props).onClosed) == null || i.call(o, { cancel: !0 });
|
|
2288
2531
|
});
|
|
2289
2532
|
m(this, "handleOk", (t) => {
|
|
2290
|
-
var
|
|
2291
|
-
(s = (
|
|
2533
|
+
var r, s, o, i;
|
|
2534
|
+
(s = (r = this.props).onOk) == null || s.call(r, t), (i = (o = this.props).onClosed) == null || i.call(o, { ok: !0 });
|
|
2292
2535
|
});
|
|
2293
2536
|
}
|
|
2294
2537
|
getTheme() {
|
|
2295
|
-
const t = this.props.mode ||
|
|
2296
|
-
return
|
|
2538
|
+
const t = this.props.mode || ot;
|
|
2539
|
+
return Qt(t);
|
|
2297
2540
|
}
|
|
2298
2541
|
render() {
|
|
2299
2542
|
return /* @__PURE__ */ p.jsx(
|
|
2300
|
-
|
|
2543
|
+
nr,
|
|
2301
2544
|
{
|
|
2302
2545
|
theme: this.getTheme(),
|
|
2303
2546
|
componentSize: "middle",
|
|
2304
2547
|
componentDisabled: !1,
|
|
2305
2548
|
children: /* @__PURE__ */ p.jsx(
|
|
2306
|
-
|
|
2549
|
+
hn,
|
|
2307
2550
|
{
|
|
2308
2551
|
maskClosable: !1,
|
|
2309
2552
|
open: this.props.open,
|
|
@@ -2320,98 +2563,98 @@ const ve = class ve extends Xr {
|
|
|
2320
2563
|
}
|
|
2321
2564
|
};
|
|
2322
2565
|
// 静态方法设置全局模式并更新所有弹窗
|
|
2323
|
-
m(
|
|
2324
|
-
|
|
2325
|
-
|
|
2566
|
+
m(be, "setMode", (t) => {
|
|
2567
|
+
ot = t, He.forEach((r) => {
|
|
2568
|
+
r.update({ mode: t });
|
|
2326
2569
|
});
|
|
2327
2570
|
}), // 静态方法设置全局ThemeConfig
|
|
2328
|
-
m(
|
|
2329
|
-
|
|
2330
|
-
}), m(
|
|
2331
|
-
const
|
|
2332
|
-
mode:
|
|
2571
|
+
m(be, "setThemeConfig", (t) => {
|
|
2572
|
+
Qt = t;
|
|
2573
|
+
}), m(be, "open", (t) => {
|
|
2574
|
+
const r = Sn(be, {
|
|
2575
|
+
mode: ot,
|
|
2333
2576
|
// 默认使用全局主题
|
|
2334
2577
|
...t
|
|
2335
2578
|
});
|
|
2336
|
-
|
|
2337
|
-
const s =
|
|
2338
|
-
return
|
|
2339
|
-
const i =
|
|
2340
|
-
return i !== -1 &&
|
|
2341
|
-
},
|
|
2579
|
+
He.push(r);
|
|
2580
|
+
const s = r.destroy;
|
|
2581
|
+
return r.destroy = (...o) => {
|
|
2582
|
+
const i = He.indexOf(r);
|
|
2583
|
+
return i !== -1 && He.splice(i, 1), s(...o);
|
|
2584
|
+
}, r;
|
|
2342
2585
|
});
|
|
2343
|
-
let
|
|
2344
|
-
const
|
|
2586
|
+
let er = be;
|
|
2587
|
+
const _a = 13, ae = (n = "") => Ue("m-search", n), Ya = (n) => {
|
|
2345
2588
|
const {
|
|
2346
2589
|
className: e,
|
|
2347
2590
|
searchItems: t = [],
|
|
2348
|
-
onSearch:
|
|
2591
|
+
onSearch: r,
|
|
2349
2592
|
defaultShowAll: s = !1,
|
|
2350
2593
|
customButtons: o = [],
|
|
2351
2594
|
form: i
|
|
2352
|
-
} =
|
|
2595
|
+
} = n, [l, u] = Y(s), [c] = it.useForm(), g = K(null), d = i ?? c, b = (y) => {
|
|
2353
2596
|
const { keyCode: E } = y;
|
|
2354
|
-
E ===
|
|
2597
|
+
E === _a && P();
|
|
2355
2598
|
};
|
|
2356
|
-
|
|
2599
|
+
ie(() => {
|
|
2357
2600
|
const y = g.current;
|
|
2358
2601
|
return y == null || y.addEventListener("keydown", b), () => {
|
|
2359
2602
|
y == null || y.removeEventListener("keydown", b);
|
|
2360
2603
|
};
|
|
2361
2604
|
}, []);
|
|
2362
2605
|
const O = () => {
|
|
2363
|
-
d == null || d.resetFields(),
|
|
2364
|
-
},
|
|
2606
|
+
d == null || d.resetFields(), P(!0);
|
|
2607
|
+
}, P = (y = !1) => {
|
|
2365
2608
|
d == null || d.validateFields().then((E) => {
|
|
2366
|
-
|
|
2609
|
+
Rn(E), r == null || r(E, y);
|
|
2367
2610
|
});
|
|
2368
|
-
},
|
|
2611
|
+
}, T = () => {
|
|
2369
2612
|
const y = t.length > 2;
|
|
2370
|
-
return /* @__PURE__ */ p.jsxs("div", { className:
|
|
2371
|
-
(o == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ p.jsx(p.Fragment, { children: o.map((E,
|
|
2372
|
-
/* @__PURE__ */ p.jsx(Pe, { className:
|
|
2373
|
-
/* @__PURE__ */ p.jsx(Pe, { className:
|
|
2613
|
+
return /* @__PURE__ */ p.jsxs("div", { className: ae("btn-wrapper"), children: [
|
|
2614
|
+
(o == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ p.jsx(p.Fragment, { children: o.map((E, M) => /* @__PURE__ */ p.jsx(Pe, { className: ae("btn"), ...E, children: E.children }, `custom-btn-${M}`)) }) : /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
2615
|
+
/* @__PURE__ */ p.jsx(Pe, { className: ae("btn btn-reset"), onClick: O, children: "重置" }),
|
|
2616
|
+
/* @__PURE__ */ p.jsx(Pe, { className: ae("btn btn-search"), onClick: () => P(), type: "primary", children: "搜索" })
|
|
2374
2617
|
] }),
|
|
2375
|
-
y && /* @__PURE__ */ p.jsxs("div", { className:
|
|
2618
|
+
y && /* @__PURE__ */ p.jsxs("div", { className: ae("btn btn-collapse"), onClick: () => u(!l), children: [
|
|
2376
2619
|
/* @__PURE__ */ p.jsx("span", { children: l ? "收起" : "展开" }),
|
|
2377
|
-
l ? /* @__PURE__ */ p.jsx(
|
|
2620
|
+
l ? /* @__PURE__ */ p.jsx(ya, {}) : /* @__PURE__ */ p.jsx(pa, {})
|
|
2378
2621
|
] })
|
|
2379
2622
|
] });
|
|
2380
|
-
},
|
|
2381
|
-
var
|
|
2382
|
-
const
|
|
2383
|
-
return t.length > 2 && E >= 2 && !l && (
|
|
2623
|
+
}, H = t.map((y, E) => {
|
|
2624
|
+
var B;
|
|
2625
|
+
const M = { ...y };
|
|
2626
|
+
return t.length > 2 && E >= 2 && !l && (M.formItemProps = {
|
|
2384
2627
|
...y.formItemProps,
|
|
2385
2628
|
style: {
|
|
2386
|
-
...(
|
|
2629
|
+
...(B = y.formItemProps) == null ? void 0 : B.style,
|
|
2387
2630
|
display: "none"
|
|
2388
2631
|
}
|
|
2389
|
-
}),
|
|
2632
|
+
}), M;
|
|
2390
2633
|
}), j = t.length > 2;
|
|
2391
|
-
return /* @__PURE__ */ p.jsx(
|
|
2634
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(
|
|
2392
2635
|
"div",
|
|
2393
2636
|
{
|
|
2394
|
-
className: `${
|
|
2637
|
+
className: `${ae("")} ${l ? "" : ae("collapsed")} ${e || ""}`,
|
|
2395
2638
|
ref: g,
|
|
2396
|
-
children: /* @__PURE__ */ p.jsxs(
|
|
2397
|
-
/* @__PURE__ */ p.jsxs("div", { className:
|
|
2398
|
-
/* @__PURE__ */ p.jsx(
|
|
2399
|
-
(!j || j && !l) &&
|
|
2639
|
+
children: /* @__PURE__ */ p.jsxs(ar, { children: [
|
|
2640
|
+
/* @__PURE__ */ p.jsxs("div", { className: ae("form"), children: [
|
|
2641
|
+
/* @__PURE__ */ p.jsx(Rr, { form: d, formItems: H, column: 3 }),
|
|
2642
|
+
(!j || j && !l) && T()
|
|
2400
2643
|
] }),
|
|
2401
|
-
j && l && /* @__PURE__ */ p.jsx("div", { className:
|
|
2644
|
+
j && l && /* @__PURE__ */ p.jsx("div", { className: ae("footer"), children: T() })
|
|
2402
2645
|
] })
|
|
2403
2646
|
}
|
|
2404
2647
|
) });
|
|
2405
2648
|
};
|
|
2406
|
-
function
|
|
2649
|
+
function Ha(n) {
|
|
2407
2650
|
var t;
|
|
2408
|
-
const e = ((t =
|
|
2409
|
-
return /* @__PURE__ */ p.jsxs(
|
|
2410
|
-
/* @__PURE__ */ p.jsx(
|
|
2651
|
+
const e = ((t = n.columns) == null ? void 0 : t.map((r) => ({ ...r, dataIndex: r.key }))) ?? [];
|
|
2652
|
+
return /* @__PURE__ */ p.jsxs(we, { children: [
|
|
2653
|
+
/* @__PURE__ */ p.jsx(gn, { rowKey: (r) => r.id, ...n, columns: e }),
|
|
2411
2654
|
";"
|
|
2412
2655
|
] });
|
|
2413
2656
|
}
|
|
2414
|
-
const
|
|
2657
|
+
const za = {
|
|
2415
2658
|
YMD_Hms: "YYYY-MM-DD HH:mm:ss",
|
|
2416
2659
|
YMD: "YYYY-MM-DD",
|
|
2417
2660
|
YMD2: "YYYYMMDD",
|
|
@@ -2420,229 +2663,275 @@ const Ha = {
|
|
|
2420
2663
|
Hm: "HH:mm",
|
|
2421
2664
|
YMD_000: "YYYY-MM-DD 00:00:00",
|
|
2422
2665
|
YMD_end: "YYYY-MM-DD 23:59:59",
|
|
2423
|
-
YMD_Hm: "YYYYMMDD HHmm"
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
m(
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
m(
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
m(
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
m(
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
m(
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
m(
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2666
|
+
YMD_Hm: "YYYYMMDD HHmm",
|
|
2667
|
+
YMD_SLASH: "YYYY/MM/DD",
|
|
2668
|
+
YMD_SLASH_Hms: "YYYY/MM/DD HH:mm:ss"
|
|
2669
|
+
}, Ea = 10;
|
|
2670
|
+
class N {
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* 整数
|
|
2674
|
+
*/
|
|
2675
|
+
m(N, "integerRegex", /^-?\d+$/), /**
|
|
2676
|
+
* 正整数
|
|
2677
|
+
*/
|
|
2678
|
+
m(N, "positiveIntegerRegex", /^[1-9]\d*$/), /**
|
|
2679
|
+
* 负整数
|
|
2680
|
+
*/
|
|
2681
|
+
m(N, "negativeIntegerRegex", /^-[1-9]\d*$/), /**
|
|
2682
|
+
* 浮点数
|
|
2683
|
+
*/
|
|
2684
|
+
m(N, "floatRegex", /^-?\d+(\.\d+)?$/), /**
|
|
2685
|
+
* 字母
|
|
2686
|
+
*/
|
|
2687
|
+
m(N, "letter", /^[a-zA-Z]+$/), /**
|
|
2688
|
+
* 汉字
|
|
2689
|
+
*/
|
|
2690
|
+
m(N, "chinese", /^[\u4e00-\u9fa5]+$/), /**
|
|
2691
|
+
* 数字
|
|
2692
|
+
*/
|
|
2693
|
+
m(N, "number", /^[0-9]*$/), /**
|
|
2694
|
+
* 用户名 字母开头,允许字母数字下划线,长度4-16
|
|
2695
|
+
*/
|
|
2696
|
+
m(N, "username", /^[a-zA-Z]\w{3,15}$/), /**
|
|
2697
|
+
* 强用户名 必须包含大小写字母和数字,6-20位
|
|
2698
|
+
*/
|
|
2699
|
+
m(N, "strongUsername", /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/), /**
|
|
2700
|
+
* 密码 至少8位,包含字母和数字
|
|
2701
|
+
*/
|
|
2702
|
+
m(N, "password", /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/), /**
|
|
2703
|
+
* 强密码 至少8位,包含大小写字母、数字和特殊字符
|
|
2704
|
+
*/
|
|
2705
|
+
m(N, "strongPassword", /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/), /**
|
|
2706
|
+
* 中国大陆的手机号
|
|
2707
|
+
*/
|
|
2708
|
+
m(N, "phone", /^1[3-9]\d{9}$/), /**
|
|
2709
|
+
* 带区号的手机号
|
|
2710
|
+
*/
|
|
2711
|
+
m(N, "phoneWithAreaCode", /^\+?\d{2,3}-?\d{8,11}$/), /**
|
|
2712
|
+
* 邮箱
|
|
2713
|
+
*/
|
|
2714
|
+
m(N, "email", /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/), /**
|
|
2715
|
+
* 身份证
|
|
2716
|
+
*/
|
|
2717
|
+
m(N, "idCard", /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/), /**
|
|
2718
|
+
* 银行卡
|
|
2719
|
+
*/
|
|
2720
|
+
m(N, "bankCard", /^[1-9]\d{3,30}$/), /**
|
|
2721
|
+
* 邮政编码
|
|
2722
|
+
*/
|
|
2723
|
+
m(N, "zipCode", /^[1-9]\d{5}$/), /**
|
|
2724
|
+
* IP
|
|
2725
|
+
*/
|
|
2726
|
+
m(N, "ip", /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/), /**
|
|
2727
|
+
* URL
|
|
2728
|
+
*/
|
|
2729
|
+
m(N, "url", /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/), /**
|
|
2730
|
+
* 车牌
|
|
2731
|
+
*/
|
|
2732
|
+
m(N, "carNumber", /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/), /**
|
|
2733
|
+
* 时间 hh:mm:ss
|
|
2734
|
+
*/
|
|
2735
|
+
m(N, "time", /^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/), /**
|
|
2736
|
+
* 日期 YYYY-MM-DD
|
|
2737
|
+
*/
|
|
2738
|
+
m(N, "date", /^(\d{4})-(\d{2})-(\d{2})$/);
|
|
2739
|
+
function Va(n, e) {
|
|
2740
|
+
const [t, r] = Y(!1), [s, o] = Y(null), [i, l] = Y(null), u = K(void 0), c = K(0), g = () => {
|
|
2452
2741
|
var b;
|
|
2453
|
-
(b = u.current) == null || b.abort(),
|
|
2742
|
+
(b = u.current) == null || b.abort(), r(!1), o(null);
|
|
2454
2743
|
}, d = async (...b) => {
|
|
2455
|
-
var
|
|
2744
|
+
var T, H, j, y;
|
|
2456
2745
|
const O = ++c.current;
|
|
2457
2746
|
g();
|
|
2458
|
-
const
|
|
2459
|
-
u.current =
|
|
2747
|
+
const P = new AbortController();
|
|
2748
|
+
u.current = P;
|
|
2460
2749
|
try {
|
|
2461
|
-
if (
|
|
2750
|
+
if (r(!0), o(null), e != null && e.onBefore && !await ((T = e == null ? void 0 : e.onBefore) == null ? void 0 : T.call(e, ...b))) {
|
|
2462
2751
|
g();
|
|
2463
2752
|
return;
|
|
2464
2753
|
}
|
|
2465
|
-
const E = b.length >=
|
|
2466
|
-
return !
|
|
2754
|
+
const E = b.length >= n.length ? b : [...b, { signal: P.signal }], M = await n(...E);
|
|
2755
|
+
return !P.signal.aborted && O === c.current && (l(M), await ((H = e == null ? void 0 : e.onSuccess) == null ? void 0 : H.call(e, M))), M;
|
|
2467
2756
|
} catch (E) {
|
|
2468
|
-
throw !
|
|
2757
|
+
throw !P.signal.aborted && O === c.current && (o(E), await ((j = e == null ? void 0 : e.onError) == null ? void 0 : j.call(e, E))), E;
|
|
2469
2758
|
} finally {
|
|
2470
|
-
!
|
|
2759
|
+
!P.signal.aborted && O === c.current && (r(!1), await ((y = e == null ? void 0 : e.onFinally) == null ? void 0 : y.call(e)));
|
|
2471
2760
|
}
|
|
2472
2761
|
};
|
|
2473
|
-
return
|
|
2762
|
+
return ie(() => (e != null && e.autoRunArgs && d(...e.autoRunArgs).catch(() => {
|
|
2474
2763
|
}), g), [JSON.stringify(e == null ? void 0 : e.autoRunArgs)]), { run: d, cancel: g, loading: t, error: s, data: i };
|
|
2475
2764
|
}
|
|
2476
|
-
function
|
|
2477
|
-
const
|
|
2478
|
-
|
|
2479
|
-
s.current =
|
|
2480
|
-
}, [
|
|
2481
|
-
const o =
|
|
2482
|
-
|
|
2483
|
-
}, []), i =
|
|
2484
|
-
o(), e != null && (
|
|
2765
|
+
function Fa(n, e, t = !1) {
|
|
2766
|
+
const r = K(void 0), s = K(n);
|
|
2767
|
+
ie(() => {
|
|
2768
|
+
s.current = n;
|
|
2769
|
+
}, [n]);
|
|
2770
|
+
const o = oe(() => {
|
|
2771
|
+
r.current && (clearInterval(r.current), r.current = void 0);
|
|
2772
|
+
}, []), i = oe(() => {
|
|
2773
|
+
o(), e != null && (r.current = setInterval(() => s.current(), e));
|
|
2485
2774
|
}, [e, o]);
|
|
2486
|
-
return
|
|
2775
|
+
return ie(() => (t && s.current(), i(), o), [e, i, o, t]), { start: i, clear: o, isRunning: !!r.current };
|
|
2487
2776
|
}
|
|
2488
|
-
const
|
|
2777
|
+
const Ua = (n, e, t) => {
|
|
2489
2778
|
const {
|
|
2490
|
-
isReady:
|
|
2779
|
+
isReady: r = !0,
|
|
2491
2780
|
dataSource: s = [],
|
|
2492
2781
|
current: o = 1,
|
|
2493
2782
|
pageSize: i = 10
|
|
2494
|
-
} = t || {}, [l, u] = Y(o), [c, g] = Y(i), [d, b] = Y(s), [O,
|
|
2783
|
+
} = t || {}, [l, u] = Y(o), [c, g] = Y(i), [d, b] = Y(s), [O, P] = Y(0), [T, H] = Y(!1), [j, y] = Y(!1), E = K(l), M = K(c), B = (S) => {
|
|
2495
2784
|
u(S), E.current = S;
|
|
2496
|
-
},
|
|
2497
|
-
g(S),
|
|
2498
|
-
},
|
|
2499
|
-
if (!
|
|
2785
|
+
}, ne = (S) => {
|
|
2786
|
+
g(S), M.current = S;
|
|
2787
|
+
}, J = K(0), xe = async () => {
|
|
2788
|
+
if (!r)
|
|
2500
2789
|
return;
|
|
2501
|
-
let S = E.current, $ =
|
|
2502
|
-
|
|
2503
|
-
const
|
|
2790
|
+
let S = E.current, $ = M.current;
|
|
2791
|
+
H(!0), J.current++;
|
|
2792
|
+
const ee = J.current;
|
|
2504
2793
|
try {
|
|
2505
|
-
let
|
|
2506
|
-
|
|
2507
|
-
let { dataSource:
|
|
2794
|
+
let q = Math.round((S - 1) * $);
|
|
2795
|
+
q < 0 && (q = 0), $ < 1 && ($ = 1);
|
|
2796
|
+
let { dataSource: le, total: te } = await n({
|
|
2508
2797
|
limit: $,
|
|
2509
|
-
offset:
|
|
2798
|
+
offset: q,
|
|
2510
2799
|
current: S
|
|
2511
2800
|
});
|
|
2512
|
-
if (
|
|
2801
|
+
if (ee !== J.current)
|
|
2513
2802
|
return;
|
|
2514
|
-
if (c * (S - 1) >=
|
|
2803
|
+
if (c * (S - 1) >= te && S !== 1) {
|
|
2515
2804
|
S = 1;
|
|
2516
|
-
const ke = Math.ceil(
|
|
2517
|
-
if ({ dataSource:
|
|
2805
|
+
const ke = Math.ceil(te / c);
|
|
2806
|
+
if ({ dataSource: le, total: te } = await n({
|
|
2518
2807
|
limit: $,
|
|
2519
|
-
offset:
|
|
2808
|
+
offset: q,
|
|
2520
2809
|
current: S
|
|
2521
|
-
}),
|
|
2810
|
+
}), ee !== J.current)
|
|
2522
2811
|
return;
|
|
2523
2812
|
S = ke;
|
|
2524
2813
|
}
|
|
2525
|
-
b(
|
|
2526
|
-
} catch (
|
|
2527
|
-
if (console.error("fetch err",
|
|
2814
|
+
b(le), B(S), ne($), P(te);
|
|
2815
|
+
} catch (q) {
|
|
2816
|
+
if (console.error("fetch err", q), ee !== J.current)
|
|
2528
2817
|
return;
|
|
2529
2818
|
} finally {
|
|
2530
|
-
y(!0),
|
|
2819
|
+
y(!0), H(!1);
|
|
2531
2820
|
}
|
|
2532
|
-
},
|
|
2533
|
-
S && (b([]),
|
|
2534
|
-
},
|
|
2535
|
-
return
|
|
2536
|
-
|
|
2821
|
+
}, X = async (S) => {
|
|
2822
|
+
S && (b([]), B(o), ne(i)), await xe();
|
|
2823
|
+
}, ce = oe(or(X, 500), [X]), Ce = [...e || [], r];
|
|
2824
|
+
return ie(() => {
|
|
2825
|
+
r && ce(!0);
|
|
2537
2826
|
}, Ce), {
|
|
2538
2827
|
tableProps: {
|
|
2539
|
-
loading:
|
|
2828
|
+
loading: T,
|
|
2540
2829
|
dataSource: d
|
|
2541
2830
|
},
|
|
2542
|
-
loading:
|
|
2831
|
+
loading: T,
|
|
2543
2832
|
dataSource: d,
|
|
2544
2833
|
paginationProps: {
|
|
2545
2834
|
current: l,
|
|
2546
2835
|
pageSize: c,
|
|
2547
2836
|
total: O,
|
|
2548
2837
|
onChange: async (S, $) => {
|
|
2549
|
-
|
|
2838
|
+
B(S), ne($), await X();
|
|
2550
2839
|
},
|
|
2551
2840
|
onShowSizeChange: async (S, $) => {
|
|
2552
|
-
|
|
2841
|
+
ne(S), B($), await X();
|
|
2553
2842
|
}
|
|
2554
2843
|
},
|
|
2555
2844
|
isFirstComplete: j,
|
|
2556
|
-
refresh:
|
|
2557
|
-
debounceRefresh:
|
|
2845
|
+
refresh: X,
|
|
2846
|
+
debounceRefresh: ce,
|
|
2558
2847
|
setDataSource: b
|
|
2559
2848
|
};
|
|
2560
2849
|
};
|
|
2561
|
-
function
|
|
2562
|
-
const
|
|
2850
|
+
function Wa() {
|
|
2851
|
+
const n = window.location.href.split("?")[1] || "", e = new URLSearchParams(n);
|
|
2563
2852
|
return Object.fromEntries(e.entries());
|
|
2564
2853
|
}
|
|
2565
|
-
const
|
|
2566
|
-
const [e, t] = Y(
|
|
2854
|
+
const Ba = (n) => {
|
|
2855
|
+
const [e, t] = Y(n), r = K(e), s = oe((l) => {
|
|
2567
2856
|
t((u) => {
|
|
2568
2857
|
const c = typeof l == "function" ? l(u) : l, g = { ...u, ...c };
|
|
2569
|
-
return
|
|
2858
|
+
return r.current = g, g;
|
|
2570
2859
|
});
|
|
2571
|
-
}, []), o =
|
|
2572
|
-
t(
|
|
2573
|
-
}, [
|
|
2860
|
+
}, []), o = oe(() => r.current, []), i = oe(() => {
|
|
2861
|
+
t(n), r.current = n;
|
|
2862
|
+
}, [n]);
|
|
2574
2863
|
return [e, s, o, i];
|
|
2575
2864
|
};
|
|
2576
|
-
function
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2579
|
-
s.current =
|
|
2580
|
-
}, [
|
|
2581
|
-
const o =
|
|
2582
|
-
|
|
2583
|
-
}, []), i =
|
|
2584
|
-
o(), e != null && (
|
|
2865
|
+
function qa(n, e, t = !1) {
|
|
2866
|
+
const r = K(void 0), s = K(n);
|
|
2867
|
+
ie(() => {
|
|
2868
|
+
s.current = n;
|
|
2869
|
+
}, [n]);
|
|
2870
|
+
const o = oe(() => {
|
|
2871
|
+
r.current && (clearTimeout(r.current), r.current = void 0);
|
|
2872
|
+
}, []), i = oe(() => {
|
|
2873
|
+
o(), e != null && (r.current = setTimeout(() => s.current(), e));
|
|
2585
2874
|
}, [e, o]);
|
|
2586
|
-
return
|
|
2875
|
+
return ie(() => (t && s.current(), i(), o), [e, i, o, t]), { start: i, clear: o, isRunning: !!r.current };
|
|
2587
2876
|
}
|
|
2588
|
-
const Za = (
|
|
2877
|
+
const Za = (n, e, t) => {
|
|
2589
2878
|
const {
|
|
2590
|
-
isReady:
|
|
2879
|
+
isReady: r = !0,
|
|
2591
2880
|
dataSource: s = [],
|
|
2592
2881
|
current: o = 1,
|
|
2593
|
-
pageSize: i =
|
|
2594
|
-
} = t || {}, [l, u] = Y(!1), [c, g] = Y(o), [d, b] = Y(i), [O,
|
|
2595
|
-
g(
|
|
2596
|
-
},
|
|
2597
|
-
b(
|
|
2598
|
-
},
|
|
2599
|
-
if (!
|
|
2882
|
+
pageSize: i = Ea
|
|
2883
|
+
} = t || {}, [l, u] = Y(!1), [c, g] = Y(o), [d, b] = Y(i), [O, P] = Y(0), [T, H] = Y(!1), [j, y] = Y(s), E = K(c), M = K(d), B = (z) => {
|
|
2884
|
+
g(z), E.current = z;
|
|
2885
|
+
}, ne = (z) => {
|
|
2886
|
+
b(z), M.current = z;
|
|
2887
|
+
}, J = K(0), xe = async (z) => {
|
|
2888
|
+
if (!r)
|
|
2600
2889
|
return;
|
|
2601
|
-
let
|
|
2602
|
-
|
|
2603
|
-
const S =
|
|
2890
|
+
let D = E.current, V = M.current;
|
|
2891
|
+
H(!0), J.current += 1;
|
|
2892
|
+
const S = J.current;
|
|
2604
2893
|
try {
|
|
2605
|
-
let $ = Math.round((
|
|
2606
|
-
$ < 0 && ($ = 0),
|
|
2607
|
-
let { dataSource:
|
|
2608
|
-
limit:
|
|
2894
|
+
let $ = Math.round((D - 1) * V);
|
|
2895
|
+
$ < 0 && ($ = 0), V < 1 && (V = 1);
|
|
2896
|
+
let { dataSource: ee, total: q } = await n({
|
|
2897
|
+
limit: V,
|
|
2609
2898
|
offset: $,
|
|
2610
|
-
current:
|
|
2899
|
+
current: D
|
|
2611
2900
|
});
|
|
2612
|
-
if (S !==
|
|
2901
|
+
if (S !== J.current)
|
|
2613
2902
|
return;
|
|
2614
|
-
if (d * (
|
|
2615
|
-
const
|
|
2616
|
-
if ({ dataSource:
|
|
2617
|
-
limit:
|
|
2618
|
-
offset: Math.round((
|
|
2619
|
-
current:
|
|
2620
|
-
}), S !==
|
|
2903
|
+
if (d * (D - 1) >= q && D !== 1) {
|
|
2904
|
+
const te = Math.ceil(q / d);
|
|
2905
|
+
if ({ dataSource: ee, total: q } = await n({
|
|
2906
|
+
limit: V,
|
|
2907
|
+
offset: Math.round((te - 1) * V),
|
|
2908
|
+
current: D
|
|
2909
|
+
}), S !== J.current)
|
|
2621
2910
|
return;
|
|
2622
|
-
|
|
2911
|
+
D = te;
|
|
2623
2912
|
}
|
|
2624
|
-
const
|
|
2625
|
-
y(
|
|
2913
|
+
const le = z ? ee : j.concat(ee);
|
|
2914
|
+
y(le), B(D), ne(V), P(q);
|
|
2626
2915
|
} catch ($) {
|
|
2627
|
-
if (console.error("fetch err", $), S !==
|
|
2916
|
+
if (console.error("fetch err", $), S !== J.current)
|
|
2628
2917
|
return;
|
|
2629
2918
|
}
|
|
2630
|
-
u(!0),
|
|
2631
|
-
},
|
|
2632
|
-
if (
|
|
2633
|
-
y([]),
|
|
2919
|
+
u(!0), H(!1);
|
|
2920
|
+
}, X = async (z) => {
|
|
2921
|
+
if (z)
|
|
2922
|
+
y([]), B(o), ne(i);
|
|
2634
2923
|
else {
|
|
2635
|
-
const
|
|
2636
|
-
if (O && O <=
|
|
2924
|
+
const D = d * c;
|
|
2925
|
+
if (O && O <= D)
|
|
2637
2926
|
return;
|
|
2638
|
-
|
|
2927
|
+
B(c + 1);
|
|
2639
2928
|
}
|
|
2640
|
-
await xe(
|
|
2641
|
-
},
|
|
2642
|
-
return
|
|
2643
|
-
|
|
2929
|
+
await xe(z);
|
|
2930
|
+
}, ce = oe(or(X, 500), [X]), Ce = [...e || [], r];
|
|
2931
|
+
return ie(() => {
|
|
2932
|
+
r && ce(!0);
|
|
2644
2933
|
}, Ce), {
|
|
2645
|
-
loading:
|
|
2934
|
+
loading: T,
|
|
2646
2935
|
dataSource: j,
|
|
2647
2936
|
paginationProps: {
|
|
2648
2937
|
current: c,
|
|
@@ -2650,46 +2939,46 @@ const Za = (r, e, t) => {
|
|
|
2650
2939
|
total: O
|
|
2651
2940
|
},
|
|
2652
2941
|
isFirstComplete: l,
|
|
2653
|
-
refresh: async (
|
|
2654
|
-
await
|
|
2942
|
+
refresh: async (z) => {
|
|
2943
|
+
await X(z);
|
|
2655
2944
|
},
|
|
2656
|
-
debounceRefresh:
|
|
2945
|
+
debounceRefresh: ce,
|
|
2657
2946
|
setDataSource: y,
|
|
2658
|
-
setTotal:
|
|
2947
|
+
setTotal: P
|
|
2659
2948
|
};
|
|
2660
2949
|
};
|
|
2661
2950
|
export {
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2951
|
+
we as CompThemeProvider,
|
|
2952
|
+
za as DATE_FORMAT,
|
|
2953
|
+
En as ItemsRow,
|
|
2954
|
+
La as MBreadcrumb,
|
|
2955
|
+
On as MDescriptions,
|
|
2956
|
+
Rr as MForm,
|
|
2957
|
+
ve as MFormItemConst,
|
|
2958
|
+
G as MFormItemTypeEnum,
|
|
2670
2959
|
Ya as MSearch,
|
|
2671
|
-
|
|
2672
|
-
|
|
2960
|
+
Ha as MTable,
|
|
2961
|
+
er as MiModal,
|
|
2673
2962
|
Ia as MiThemeProvider,
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2963
|
+
Fe as NextTick,
|
|
2964
|
+
Ea as PAGE_SIZE,
|
|
2965
|
+
N as PatternType,
|
|
2966
|
+
Ma as VersionUtil,
|
|
2678
2967
|
Ta as cmx,
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2968
|
+
or as debounce,
|
|
2969
|
+
Ue as getClassName,
|
|
2970
|
+
Aa as getFieldsByPath,
|
|
2971
|
+
Da as nextTick,
|
|
2683
2972
|
ka as noop,
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2973
|
+
Sn as openModal,
|
|
2974
|
+
Rn as removeNull,
|
|
2975
|
+
$a as throttle,
|
|
2976
|
+
Va as useFuncRequest,
|
|
2977
|
+
Fa as useInterval,
|
|
2978
|
+
_n as useMiThemeConfig,
|
|
2979
|
+
Ua as usePagination,
|
|
2980
|
+
Wa as useQuery,
|
|
2981
|
+
Ba as useReactive,
|
|
2982
|
+
qa as useTimeout,
|
|
2694
2983
|
Za as useVirtualList
|
|
2695
2984
|
};
|