@lntvow/utils 2.3.3 → 2.3.5
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/index.cjs +1 -1
- package/dist/index.d.ts +48 -11
- package/dist/index.mjs +705 -267
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -1,189 +1,634 @@
|
|
|
1
|
-
function
|
|
2
|
-
return t.reduce((
|
|
3
|
-
return e(
|
|
1
|
+
function j0(...t) {
|
|
2
|
+
return t.reduce((e, r) => function(...s) {
|
|
3
|
+
return r(e(...s));
|
|
4
4
|
});
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return t.reduce((
|
|
8
|
-
return
|
|
6
|
+
function R0(...t) {
|
|
7
|
+
return t.reduce((e, r) => function(...s) {
|
|
8
|
+
return e(r(...s));
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
return function(...
|
|
14
|
-
|
|
15
|
-
t.apply(this,
|
|
16
|
-
},
|
|
11
|
+
function Z0(t, e = 500) {
|
|
12
|
+
let r = null;
|
|
13
|
+
return function(...s) {
|
|
14
|
+
r && clearTimeout(r), r = setTimeout(() => {
|
|
15
|
+
t.apply(this, s);
|
|
16
|
+
}, e);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
let
|
|
21
|
-
function
|
|
22
|
-
|
|
19
|
+
const S0 = Object.prototype.toString, s0 = (t) => S0.call(t);
|
|
20
|
+
let c0 = null;
|
|
21
|
+
function I0(t) {
|
|
22
|
+
i0(t) && (c0 = t);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
const
|
|
24
|
+
const U0 = (t, ...e) => {
|
|
25
|
+
const r = e.length === 0 ? "" : e.length === 1 ? e[0] : e;
|
|
26
26
|
console.log(
|
|
27
27
|
`%c ${t} `,
|
|
28
28
|
"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",
|
|
29
|
-
|
|
30
|
-
),
|
|
31
|
-
},
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
function
|
|
35
|
-
if (
|
|
36
|
-
return new Date(
|
|
37
|
-
if (
|
|
38
|
-
return new RegExp(
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
for (let
|
|
46
|
-
|
|
47
|
-
return
|
|
29
|
+
r
|
|
30
|
+
), c0 && c0(t, r);
|
|
31
|
+
}, P0 = (...t) => console.warn(...t), k0 = (...t) => console.error(...t), z0 = (t) => s0(t) === "[object Map]", W0 = (t) => s0(t) === "[object Set]", b0 = (t) => s0(t) === "[object Date]", O0 = (t) => s0(t) === "[object RegExp]", i0 = (t) => typeof t == "function", h0 = (t) => typeof t == "number", A0 = (t) => typeof t == "string", V0 = (t) => typeof t == "symbol", o0 = (t) => t !== null && typeof t == "object", q0 = (t) => o0(t) && i0(t.then) && i0(t.catch), n0 = (t) => t == null, X0 = (t) => t === void 0, B0 = (t) => t === null, J0 = (t) => t != null, G0 = (t) => typeof t == "boolean", r0 = Array.isArray, f0 = (t, e) => Object.hasOwn(t, e), K0 = (t, e) => t !== e;
|
|
32
|
+
function l0(t) {
|
|
33
|
+
const e = /* @__PURE__ */ new WeakMap();
|
|
34
|
+
function r(s) {
|
|
35
|
+
if (b0(s))
|
|
36
|
+
return new Date(s);
|
|
37
|
+
if (O0(s))
|
|
38
|
+
return new RegExp(s);
|
|
39
|
+
if (o0(s)) {
|
|
40
|
+
if (e.has(s))
|
|
41
|
+
return e.get(s);
|
|
42
|
+
let l = {};
|
|
43
|
+
if (r0(s)) {
|
|
44
|
+
l = [], e.set(s, l);
|
|
45
|
+
for (let d = 0; d < s.length; d++)
|
|
46
|
+
l[d] = r(s[d]);
|
|
47
|
+
return l;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
for (const
|
|
51
|
-
|
|
52
|
-
return
|
|
49
|
+
e.set(s, l);
|
|
50
|
+
for (const d in s)
|
|
51
|
+
f0(s, d) && (l[d] = r(s[d]));
|
|
52
|
+
return l;
|
|
53
53
|
} else
|
|
54
|
-
return
|
|
54
|
+
return s;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return r(t);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
58
|
+
function k(t, e, r) {
|
|
59
|
+
return r0(t) ? C0(t, e, r) : x0(t, e, r);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
return Object.keys(t).forEach((
|
|
64
|
-
|
|
65
|
-
}),
|
|
61
|
+
function x0(t, e, r) {
|
|
62
|
+
const s = Q(e, r);
|
|
63
|
+
return Object.keys(t).forEach((d) => {
|
|
64
|
+
n0(e[d]) ? s[d] = Q(t[d], r) : s[d] = o0(t[d]) && o0(e[d]) ? k(t[d], e[d], r) : Q(e[d], r);
|
|
65
|
+
}), s;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
return
|
|
67
|
+
function C0(t, e, r) {
|
|
68
|
+
if (r0(e)) {
|
|
69
|
+
const s = Q(e, r);
|
|
70
|
+
return s.push(...Q(t, r)), s;
|
|
71
71
|
} else
|
|
72
|
-
return
|
|
72
|
+
return Q(t, r);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
const { clone:
|
|
76
|
-
return
|
|
74
|
+
function Q(t, e) {
|
|
75
|
+
const { clone: r = !0 } = e || {};
|
|
76
|
+
return r ? l0(t) : t;
|
|
77
77
|
}
|
|
78
|
-
class
|
|
79
|
-
constructor(
|
|
80
|
-
super(
|
|
78
|
+
class m0 extends Error {
|
|
79
|
+
constructor(e) {
|
|
80
|
+
super(e), this.name = "LntvowError";
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
throw new
|
|
83
|
+
function t0(t, e) {
|
|
84
|
+
throw new m0(`[${t}] ${e}`);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Q0(t, e) {
|
|
87
87
|
if (process.env.NODE_ENV !== "production") {
|
|
88
|
-
const
|
|
89
|
-
console.warn(
|
|
88
|
+
const r = A0(t) ? new m0(`[${t}] ${e}`) : t;
|
|
89
|
+
console.warn(r);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const { decode:
|
|
92
|
+
function L0(t, e) {
|
|
93
|
+
const { decode: r } = k({ decode: !0 }, e || {}), s = {};
|
|
94
94
|
t.startsWith("?") && (t = t.slice(1)), t.includes("?") && (t = t.slice(t.indexOf("?") + 1));
|
|
95
|
-
const
|
|
96
|
-
for (const
|
|
97
|
-
const [
|
|
98
|
-
|
|
95
|
+
const l = t.split("&").filter(Boolean);
|
|
96
|
+
for (const d of l) {
|
|
97
|
+
const [S, y] = d.split("=");
|
|
98
|
+
s[S] = r ? decodeURIComponent(y) : y;
|
|
99
99
|
}
|
|
100
|
-
return
|
|
100
|
+
return s;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
const { encode:
|
|
104
|
-
for (const
|
|
105
|
-
const
|
|
106
|
-
|
|
102
|
+
function $0(t, e) {
|
|
103
|
+
const { encode: r } = k({ encode: !0 }, e || {}), s = [];
|
|
104
|
+
for (const l in t) {
|
|
105
|
+
const d = t[l];
|
|
106
|
+
s.push(`${l}=${r ? encodeURIComponent(d) : d}`);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return s.join("&");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
const
|
|
112
|
-
return t.includes("?") ? t.endsWith("?") || t.endsWith("&") ? `${t}${
|
|
110
|
+
function E0(t, e, r) {
|
|
111
|
+
const s = k({ encode: !0 }, r || {}), l = $0(e, s);
|
|
112
|
+
return t.includes("?") ? t.endsWith("?") || t.endsWith("&") ? `${t}${l}` : `${t}&${l}` : `${t}?${l}`;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
parse:
|
|
116
|
-
stringify:
|
|
117
|
-
appendQueryString:
|
|
114
|
+
const t2 = {
|
|
115
|
+
parse: L0,
|
|
116
|
+
stringify: $0,
|
|
117
|
+
appendQueryString: E0
|
|
118
118
|
};
|
|
119
|
-
function
|
|
120
|
-
let
|
|
121
|
-
return function(...
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
119
|
+
function e2(t, e = 500) {
|
|
120
|
+
let r = null;
|
|
121
|
+
return function(...s) {
|
|
122
|
+
if (n0(r))
|
|
123
|
+
return r = Date.now(), t.apply(this, s);
|
|
124
124
|
{
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
125
|
+
const l = Date.now();
|
|
126
|
+
if (l - r >= e)
|
|
127
|
+
return r = l, t.apply(this, s);
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function n2(t) {
|
|
132
132
|
return /^-?\d{1,3}\.\d{6}$/.test(t);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return !
|
|
134
|
+
function r2(t) {
|
|
135
|
+
return !n0(t) && /^[\dA-Za-z\u4E00-\u9FA5]+$/.test(t);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return !
|
|
137
|
+
function i2(t) {
|
|
138
|
+
return !n0(t) && /^[A-Za-z\u4E00-\u9FA5]+$/.test(t);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return !
|
|
140
|
+
function o2(t) {
|
|
141
|
+
return !n0(t) && /^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function s2(t) {
|
|
144
144
|
return /^[\dA-Z_]+$/.test(t);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function g0(t) {
|
|
147
|
+
return r0(t) ? t : [t];
|
|
148
|
+
}
|
|
149
|
+
function u2(t, e) {
|
|
150
|
+
const r = l0(t);
|
|
151
|
+
return g0(e).forEach((l) => {
|
|
152
|
+
f0(r, l) && delete r[l];
|
|
153
|
+
}), r;
|
|
148
154
|
}
|
|
149
|
-
function
|
|
150
|
-
const
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
}),
|
|
155
|
+
function a2(t, e) {
|
|
156
|
+
const r = {};
|
|
157
|
+
return g0(e).forEach((l) => {
|
|
158
|
+
f0(t, l) && (r[l] = t[l]);
|
|
159
|
+
}), r;
|
|
154
160
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
return O(n).forEach((o) => {
|
|
158
|
-
w(t, o) && (e[o] = t[o]);
|
|
159
|
-
}), e;
|
|
161
|
+
function c2(t, e) {
|
|
162
|
+
return (!h0(t) || t <= 0) && t0("generateRandomArray", "num 必须大于0"), i0(e) || t0("generateRandomArray", "cb 必须是函数"), Array.from({ length: t }, e);
|
|
160
163
|
}
|
|
161
|
-
function
|
|
164
|
+
function f2() {
|
|
162
165
|
return `#${Math.random().toString(16).slice(2, 8).padEnd(6, "0")}`;
|
|
163
166
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
var p0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
168
|
+
function M0(t) {
|
|
169
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
170
|
+
}
|
|
171
|
+
var y0 = { exports: {} };
|
|
172
|
+
(function(t, e) {
|
|
173
|
+
(function(r, s) {
|
|
174
|
+
t.exports = s();
|
|
175
|
+
})(p0, function() {
|
|
176
|
+
var r = 1e3, s = 6e4, l = 36e5, d = "millisecond", S = "second", y = "minute", _ = "hour", M = "day", W = "week", A = "month", G = "quarter", C = "year", X = "date", h = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, w = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
|
|
177
|
+
var o = ["th", "st", "nd", "rd"], n = a % 100;
|
|
178
|
+
return "[" + a + (o[(n - 20) % 10] || o[n] || o[0]) + "]";
|
|
179
|
+
} }, T = function(a, o, n) {
|
|
180
|
+
var u = String(a);
|
|
181
|
+
return !u || u.length >= o ? a : "" + Array(o + 1 - u.length).join(n) + a;
|
|
182
|
+
}, Z = { s: T, z: function(a) {
|
|
183
|
+
var o = -a.utcOffset(), n = Math.abs(o), u = Math.floor(n / 60), i = n % 60;
|
|
184
|
+
return (o <= 0 ? "+" : "-") + T(u, 2, "0") + ":" + T(i, 2, "0");
|
|
185
|
+
}, m: function a(o, n) {
|
|
186
|
+
if (o.date() < n.date())
|
|
187
|
+
return -a(n, o);
|
|
188
|
+
var u = 12 * (n.year() - o.year()) + (n.month() - o.month()), i = o.clone().add(u, A), c = n - i < 0, f = o.clone().add(u + (c ? -1 : 1), A);
|
|
189
|
+
return +(-(u + (n - i) / (c ? i - f : f - i)) || 0);
|
|
190
|
+
}, a: function(a) {
|
|
191
|
+
return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
|
|
192
|
+
}, p: function(a) {
|
|
193
|
+
return { M: A, y: C, w: W, d: M, D: X, h: _, m: y, s: S, ms: d, Q: G }[a] || String(a || "").toLowerCase().replace(/s$/, "");
|
|
194
|
+
}, u: function(a) {
|
|
195
|
+
return a === void 0;
|
|
196
|
+
} }, I = "en", L = {};
|
|
197
|
+
L[I] = w;
|
|
198
|
+
var N = "$isDayjsObject", F = function(a) {
|
|
199
|
+
return a instanceof x || !(!a || !a[N]);
|
|
200
|
+
}, j = function a(o, n, u) {
|
|
201
|
+
var i;
|
|
202
|
+
if (!o)
|
|
203
|
+
return I;
|
|
204
|
+
if (typeof o == "string") {
|
|
205
|
+
var c = o.toLowerCase();
|
|
206
|
+
L[c] && (i = c), n && (L[c] = n, i = c);
|
|
207
|
+
var f = o.split("-");
|
|
208
|
+
if (!i && f.length > 1)
|
|
209
|
+
return a(f[0]);
|
|
210
|
+
} else {
|
|
211
|
+
var $ = o.name;
|
|
212
|
+
L[$] = o, i = $;
|
|
213
|
+
}
|
|
214
|
+
return !u && i && (I = i), i || !u && I;
|
|
215
|
+
}, p = function(a, o) {
|
|
216
|
+
if (F(a))
|
|
217
|
+
return a.clone();
|
|
218
|
+
var n = typeof o == "object" ? o : {};
|
|
219
|
+
return n.date = a, n.args = arguments, new x(n);
|
|
220
|
+
}, m = Z;
|
|
221
|
+
m.l = j, m.i = F, m.w = function(a, o) {
|
|
222
|
+
return p(a, { locale: o.$L, utc: o.$u, x: o.$x, $offset: o.$offset });
|
|
223
|
+
};
|
|
224
|
+
var x = function() {
|
|
225
|
+
function a(n) {
|
|
226
|
+
this.$L = j(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[N] = !0;
|
|
227
|
+
}
|
|
228
|
+
var o = a.prototype;
|
|
229
|
+
return o.parse = function(n) {
|
|
230
|
+
this.$d = function(u) {
|
|
231
|
+
var i = u.date, c = u.utc;
|
|
232
|
+
if (i === null)
|
|
233
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
234
|
+
if (m.u(i))
|
|
235
|
+
return /* @__PURE__ */ new Date();
|
|
236
|
+
if (i instanceof Date)
|
|
237
|
+
return new Date(i);
|
|
238
|
+
if (typeof i == "string" && !/Z$/i.test(i)) {
|
|
239
|
+
var f = i.match(g);
|
|
240
|
+
if (f) {
|
|
241
|
+
var $ = f[2] - 1 || 0, Y = (f[7] || "0").substring(0, 3);
|
|
242
|
+
return c ? new Date(Date.UTC(f[1], $, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, Y)) : new Date(f[1], $, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, Y);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return new Date(i);
|
|
246
|
+
}(n), this.init();
|
|
247
|
+
}, o.init = function() {
|
|
248
|
+
var n = this.$d;
|
|
249
|
+
this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
|
|
250
|
+
}, o.$utils = function() {
|
|
251
|
+
return m;
|
|
252
|
+
}, o.isValid = function() {
|
|
253
|
+
return this.$d.toString() !== h;
|
|
254
|
+
}, o.isSame = function(n, u) {
|
|
255
|
+
var i = p(n);
|
|
256
|
+
return this.startOf(u) <= i && i <= this.endOf(u);
|
|
257
|
+
}, o.isAfter = function(n, u) {
|
|
258
|
+
return p(n) < this.startOf(u);
|
|
259
|
+
}, o.isBefore = function(n, u) {
|
|
260
|
+
return this.endOf(u) < p(n);
|
|
261
|
+
}, o.$g = function(n, u, i) {
|
|
262
|
+
return m.u(n) ? this[u] : this.set(i, n);
|
|
263
|
+
}, o.unix = function() {
|
|
264
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
265
|
+
}, o.valueOf = function() {
|
|
266
|
+
return this.$d.getTime();
|
|
267
|
+
}, o.startOf = function(n, u) {
|
|
268
|
+
var i = this, c = !!m.u(u) || u, f = m.p(n), $ = function(P, O) {
|
|
269
|
+
var H = m.w(i.$u ? Date.UTC(i.$y, O, P) : new Date(i.$y, O, P), i);
|
|
270
|
+
return c ? H : H.endOf(M);
|
|
271
|
+
}, Y = function(P, O) {
|
|
272
|
+
return m.w(i.toDate()[P].apply(i.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), i);
|
|
273
|
+
}, v = this.$W, b = this.$M, E = this.$D, B = "set" + (this.$u ? "UTC" : "");
|
|
274
|
+
switch (f) {
|
|
275
|
+
case C:
|
|
276
|
+
return c ? $(1, 0) : $(31, 11);
|
|
277
|
+
case A:
|
|
278
|
+
return c ? $(1, b) : $(0, b + 1);
|
|
279
|
+
case W:
|
|
280
|
+
var z = this.$locale().weekStart || 0, V = (v < z ? v + 7 : v) - z;
|
|
281
|
+
return $(c ? E - V : E + (6 - V), b);
|
|
282
|
+
case M:
|
|
283
|
+
case X:
|
|
284
|
+
return Y(B + "Hours", 0);
|
|
285
|
+
case _:
|
|
286
|
+
return Y(B + "Minutes", 1);
|
|
287
|
+
case y:
|
|
288
|
+
return Y(B + "Seconds", 2);
|
|
289
|
+
case S:
|
|
290
|
+
return Y(B + "Milliseconds", 3);
|
|
291
|
+
default:
|
|
292
|
+
return this.clone();
|
|
293
|
+
}
|
|
294
|
+
}, o.endOf = function(n) {
|
|
295
|
+
return this.startOf(n, !1);
|
|
296
|
+
}, o.$set = function(n, u) {
|
|
297
|
+
var i, c = m.p(n), f = "set" + (this.$u ? "UTC" : ""), $ = (i = {}, i[M] = f + "Date", i[X] = f + "Date", i[A] = f + "Month", i[C] = f + "FullYear", i[_] = f + "Hours", i[y] = f + "Minutes", i[S] = f + "Seconds", i[d] = f + "Milliseconds", i)[c], Y = c === M ? this.$D + (u - this.$W) : u;
|
|
298
|
+
if (c === A || c === C) {
|
|
299
|
+
var v = this.clone().set(X, 1);
|
|
300
|
+
v.$d[$](Y), v.init(), this.$d = v.set(X, Math.min(this.$D, v.daysInMonth())).$d;
|
|
301
|
+
} else
|
|
302
|
+
$ && this.$d[$](Y);
|
|
303
|
+
return this.init(), this;
|
|
304
|
+
}, o.set = function(n, u) {
|
|
305
|
+
return this.clone().$set(n, u);
|
|
306
|
+
}, o.get = function(n) {
|
|
307
|
+
return this[m.p(n)]();
|
|
308
|
+
}, o.add = function(n, u) {
|
|
309
|
+
var i, c = this;
|
|
310
|
+
n = Number(n);
|
|
311
|
+
var f = m.p(u), $ = function(b) {
|
|
312
|
+
var E = p(c);
|
|
313
|
+
return m.w(E.date(E.date() + Math.round(b * n)), c);
|
|
314
|
+
};
|
|
315
|
+
if (f === A)
|
|
316
|
+
return this.set(A, this.$M + n);
|
|
317
|
+
if (f === C)
|
|
318
|
+
return this.set(C, this.$y + n);
|
|
319
|
+
if (f === M)
|
|
320
|
+
return $(1);
|
|
321
|
+
if (f === W)
|
|
322
|
+
return $(7);
|
|
323
|
+
var Y = (i = {}, i[y] = s, i[_] = l, i[S] = r, i)[f] || 1, v = this.$d.getTime() + n * Y;
|
|
324
|
+
return m.w(v, this);
|
|
325
|
+
}, o.subtract = function(n, u) {
|
|
326
|
+
return this.add(-1 * n, u);
|
|
327
|
+
}, o.format = function(n) {
|
|
328
|
+
var u = this, i = this.$locale();
|
|
329
|
+
if (!this.isValid())
|
|
330
|
+
return i.invalidDate || h;
|
|
331
|
+
var c = n || "YYYY-MM-DDTHH:mm:ssZ", f = m.z(this), $ = this.$H, Y = this.$m, v = this.$M, b = i.weekdays, E = i.months, B = i.meridiem, z = function(O, H, q, J) {
|
|
332
|
+
return O && (O[H] || O(u, c)) || q[H].slice(0, J);
|
|
333
|
+
}, V = function(O) {
|
|
334
|
+
return m.s($ % 12 || 12, O, "0");
|
|
335
|
+
}, P = B || function(O, H, q) {
|
|
336
|
+
var J = O < 12 ? "AM" : "PM";
|
|
337
|
+
return q ? J.toLowerCase() : J;
|
|
338
|
+
};
|
|
339
|
+
return c.replace(D, function(O, H) {
|
|
340
|
+
return H || function(q) {
|
|
341
|
+
switch (q) {
|
|
342
|
+
case "YY":
|
|
343
|
+
return String(u.$y).slice(-2);
|
|
344
|
+
case "YYYY":
|
|
345
|
+
return m.s(u.$y, 4, "0");
|
|
346
|
+
case "M":
|
|
347
|
+
return v + 1;
|
|
348
|
+
case "MM":
|
|
349
|
+
return m.s(v + 1, 2, "0");
|
|
350
|
+
case "MMM":
|
|
351
|
+
return z(i.monthsShort, v, E, 3);
|
|
352
|
+
case "MMMM":
|
|
353
|
+
return z(E, v);
|
|
354
|
+
case "D":
|
|
355
|
+
return u.$D;
|
|
356
|
+
case "DD":
|
|
357
|
+
return m.s(u.$D, 2, "0");
|
|
358
|
+
case "d":
|
|
359
|
+
return String(u.$W);
|
|
360
|
+
case "dd":
|
|
361
|
+
return z(i.weekdaysMin, u.$W, b, 2);
|
|
362
|
+
case "ddd":
|
|
363
|
+
return z(i.weekdaysShort, u.$W, b, 3);
|
|
364
|
+
case "dddd":
|
|
365
|
+
return b[u.$W];
|
|
366
|
+
case "H":
|
|
367
|
+
return String($);
|
|
368
|
+
case "HH":
|
|
369
|
+
return m.s($, 2, "0");
|
|
370
|
+
case "h":
|
|
371
|
+
return V(1);
|
|
372
|
+
case "hh":
|
|
373
|
+
return V(2);
|
|
374
|
+
case "a":
|
|
375
|
+
return P($, Y, !0);
|
|
376
|
+
case "A":
|
|
377
|
+
return P($, Y, !1);
|
|
378
|
+
case "m":
|
|
379
|
+
return String(Y);
|
|
380
|
+
case "mm":
|
|
381
|
+
return m.s(Y, 2, "0");
|
|
382
|
+
case "s":
|
|
383
|
+
return String(u.$s);
|
|
384
|
+
case "ss":
|
|
385
|
+
return m.s(u.$s, 2, "0");
|
|
386
|
+
case "SSS":
|
|
387
|
+
return m.s(u.$ms, 3, "0");
|
|
388
|
+
case "Z":
|
|
389
|
+
return f;
|
|
390
|
+
}
|
|
391
|
+
return null;
|
|
392
|
+
}(O) || f.replace(":", "");
|
|
393
|
+
});
|
|
394
|
+
}, o.utcOffset = function() {
|
|
395
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
396
|
+
}, o.diff = function(n, u, i) {
|
|
397
|
+
var c, f = this, $ = m.p(u), Y = p(n), v = (Y.utcOffset() - this.utcOffset()) * s, b = this - Y, E = function() {
|
|
398
|
+
return m.m(f, Y);
|
|
399
|
+
};
|
|
400
|
+
switch ($) {
|
|
401
|
+
case C:
|
|
402
|
+
c = E() / 12;
|
|
403
|
+
break;
|
|
404
|
+
case A:
|
|
405
|
+
c = E();
|
|
406
|
+
break;
|
|
407
|
+
case G:
|
|
408
|
+
c = E() / 3;
|
|
409
|
+
break;
|
|
410
|
+
case W:
|
|
411
|
+
c = (b - v) / 6048e5;
|
|
412
|
+
break;
|
|
413
|
+
case M:
|
|
414
|
+
c = (b - v) / 864e5;
|
|
415
|
+
break;
|
|
416
|
+
case _:
|
|
417
|
+
c = b / l;
|
|
418
|
+
break;
|
|
419
|
+
case y:
|
|
420
|
+
c = b / s;
|
|
421
|
+
break;
|
|
422
|
+
case S:
|
|
423
|
+
c = b / r;
|
|
424
|
+
break;
|
|
425
|
+
default:
|
|
426
|
+
c = b;
|
|
427
|
+
}
|
|
428
|
+
return i ? c : m.a(c);
|
|
429
|
+
}, o.daysInMonth = function() {
|
|
430
|
+
return this.endOf(A).$D;
|
|
431
|
+
}, o.$locale = function() {
|
|
432
|
+
return L[this.$L];
|
|
433
|
+
}, o.locale = function(n, u) {
|
|
434
|
+
if (!n)
|
|
435
|
+
return this.$L;
|
|
436
|
+
var i = this.clone(), c = j(n, u, !0);
|
|
437
|
+
return c && (i.$L = c), i;
|
|
438
|
+
}, o.clone = function() {
|
|
439
|
+
return m.w(this.$d, this);
|
|
440
|
+
}, o.toDate = function() {
|
|
441
|
+
return new Date(this.valueOf());
|
|
442
|
+
}, o.toJSON = function() {
|
|
443
|
+
return this.isValid() ? this.toISOString() : null;
|
|
444
|
+
}, o.toISOString = function() {
|
|
445
|
+
return this.$d.toISOString();
|
|
446
|
+
}, o.toString = function() {
|
|
447
|
+
return this.$d.toUTCString();
|
|
448
|
+
}, a;
|
|
449
|
+
}(), U = x.prototype;
|
|
450
|
+
return p.prototype = U, [["$ms", d], ["$s", S], ["$m", y], ["$H", _], ["$W", M], ["$M", A], ["$y", C], ["$D", X]].forEach(function(a) {
|
|
451
|
+
U[a[1]] = function(o) {
|
|
452
|
+
return this.$g(o, a[0], a[1]);
|
|
453
|
+
};
|
|
454
|
+
}), p.extend = function(a, o) {
|
|
455
|
+
return a.$i || (a(o, x, p), a.$i = !0), p;
|
|
456
|
+
}, p.locale = j, p.isDayjs = F, p.unix = function(a) {
|
|
457
|
+
return p(1e3 * a);
|
|
458
|
+
}, p.en = L[I], p.Ls = L, p.p = {}, p;
|
|
459
|
+
});
|
|
460
|
+
})(y0);
|
|
461
|
+
var _0 = y0.exports;
|
|
462
|
+
const R = /* @__PURE__ */ M0(_0);
|
|
463
|
+
var D0 = { exports: {} };
|
|
464
|
+
(function(t, e) {
|
|
465
|
+
(function(r, s) {
|
|
466
|
+
t.exports = s();
|
|
467
|
+
})(p0, function() {
|
|
468
|
+
var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, s = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, l = /\d\d/, d = /\d\d?/, S = /\d*[^-_:/,()\s\d]+/, y = {}, _ = function(h) {
|
|
469
|
+
return (h = +h) + (h > 68 ? 1900 : 2e3);
|
|
470
|
+
}, M = function(h) {
|
|
471
|
+
return function(g) {
|
|
472
|
+
this[h] = +g;
|
|
473
|
+
};
|
|
474
|
+
}, W = [/[+-]\d\d:?(\d\d)?|Z/, function(h) {
|
|
475
|
+
(this.zone || (this.zone = {})).offset = function(g) {
|
|
476
|
+
if (!g || g === "Z")
|
|
477
|
+
return 0;
|
|
478
|
+
var D = g.match(/([+-]|\d\d)/g), w = 60 * D[1] + (+D[2] || 0);
|
|
479
|
+
return w === 0 ? 0 : D[0] === "+" ? -w : w;
|
|
480
|
+
}(h);
|
|
481
|
+
}], A = function(h) {
|
|
482
|
+
var g = y[h];
|
|
483
|
+
return g && (g.indexOf ? g : g.s.concat(g.f));
|
|
484
|
+
}, G = function(h, g) {
|
|
485
|
+
var D, w = y.meridiem;
|
|
486
|
+
if (w) {
|
|
487
|
+
for (var T = 1; T <= 24; T += 1)
|
|
488
|
+
if (h.indexOf(w(T, 0, g)) > -1) {
|
|
489
|
+
D = T > 12;
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
} else
|
|
493
|
+
D = h === (g ? "pm" : "PM");
|
|
494
|
+
return D;
|
|
495
|
+
}, C = { A: [S, function(h) {
|
|
496
|
+
this.afternoon = G(h, !1);
|
|
497
|
+
}], a: [S, function(h) {
|
|
498
|
+
this.afternoon = G(h, !0);
|
|
499
|
+
}], S: [/\d/, function(h) {
|
|
500
|
+
this.milliseconds = 100 * +h;
|
|
501
|
+
}], SS: [l, function(h) {
|
|
502
|
+
this.milliseconds = 10 * +h;
|
|
503
|
+
}], SSS: [/\d{3}/, function(h) {
|
|
504
|
+
this.milliseconds = +h;
|
|
505
|
+
}], s: [d, M("seconds")], ss: [d, M("seconds")], m: [d, M("minutes")], mm: [d, M("minutes")], H: [d, M("hours")], h: [d, M("hours")], HH: [d, M("hours")], hh: [d, M("hours")], D: [d, M("day")], DD: [l, M("day")], Do: [S, function(h) {
|
|
506
|
+
var g = y.ordinal, D = h.match(/\d+/);
|
|
507
|
+
if (this.day = D[0], g)
|
|
508
|
+
for (var w = 1; w <= 31; w += 1)
|
|
509
|
+
g(w).replace(/\[|\]/g, "") === h && (this.day = w);
|
|
510
|
+
}], M: [d, M("month")], MM: [l, M("month")], MMM: [S, function(h) {
|
|
511
|
+
var g = A("months"), D = (A("monthsShort") || g.map(function(w) {
|
|
512
|
+
return w.slice(0, 3);
|
|
513
|
+
})).indexOf(h) + 1;
|
|
514
|
+
if (D < 1)
|
|
515
|
+
throw new Error();
|
|
516
|
+
this.month = D % 12 || D;
|
|
517
|
+
}], MMMM: [S, function(h) {
|
|
518
|
+
var g = A("months").indexOf(h) + 1;
|
|
519
|
+
if (g < 1)
|
|
520
|
+
throw new Error();
|
|
521
|
+
this.month = g % 12 || g;
|
|
522
|
+
}], Y: [/[+-]?\d+/, M("year")], YY: [l, function(h) {
|
|
523
|
+
this.year = _(h);
|
|
524
|
+
}], YYYY: [/\d{4}/, M("year")], Z: W, ZZ: W };
|
|
525
|
+
function X(h) {
|
|
526
|
+
var g, D;
|
|
527
|
+
g = h, D = y && y.formats;
|
|
528
|
+
for (var w = (h = g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(j, p, m) {
|
|
529
|
+
var x = m && m.toUpperCase();
|
|
530
|
+
return p || D[m] || r[m] || D[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(U, a, o) {
|
|
531
|
+
return a || o.slice(1);
|
|
532
|
+
});
|
|
533
|
+
})).match(s), T = w.length, Z = 0; Z < T; Z += 1) {
|
|
534
|
+
var I = w[Z], L = C[I], N = L && L[0], F = L && L[1];
|
|
535
|
+
w[Z] = F ? { regex: N, parser: F } : I.replace(/^\[|\]$/g, "");
|
|
536
|
+
}
|
|
537
|
+
return function(j) {
|
|
538
|
+
for (var p = {}, m = 0, x = 0; m < T; m += 1) {
|
|
539
|
+
var U = w[m];
|
|
540
|
+
if (typeof U == "string")
|
|
541
|
+
x += U.length;
|
|
542
|
+
else {
|
|
543
|
+
var a = U.regex, o = U.parser, n = j.slice(x), u = a.exec(n)[0];
|
|
544
|
+
o.call(p, u), j = j.replace(u, "");
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return function(i) {
|
|
548
|
+
var c = i.afternoon;
|
|
549
|
+
if (c !== void 0) {
|
|
550
|
+
var f = i.hours;
|
|
551
|
+
c ? f < 12 && (i.hours += 12) : f === 12 && (i.hours = 0), delete i.afternoon;
|
|
552
|
+
}
|
|
553
|
+
}(p), p;
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
return function(h, g, D) {
|
|
557
|
+
D.p.customParseFormat = !0, h && h.parseTwoDigitYear && (_ = h.parseTwoDigitYear);
|
|
558
|
+
var w = g.prototype, T = w.parse;
|
|
559
|
+
w.parse = function(Z) {
|
|
560
|
+
var I = Z.date, L = Z.utc, N = Z.args;
|
|
561
|
+
this.$u = L;
|
|
562
|
+
var F = N[1];
|
|
563
|
+
if (typeof F == "string") {
|
|
564
|
+
var j = N[2] === !0, p = N[3] === !0, m = j || p, x = N[2];
|
|
565
|
+
p && (x = N[2]), y = this.$locale(), !j && x && (y = D.Ls[x]), this.$d = function(n, u, i) {
|
|
566
|
+
try {
|
|
567
|
+
if (["x", "X"].indexOf(u) > -1)
|
|
568
|
+
return new Date((u === "X" ? 1e3 : 1) * n);
|
|
569
|
+
var c = X(u)(n), f = c.year, $ = c.month, Y = c.day, v = c.hours, b = c.minutes, E = c.seconds, B = c.milliseconds, z = c.zone, V = /* @__PURE__ */ new Date(), P = Y || (f || $ ? 1 : V.getDate()), O = f || V.getFullYear(), H = 0;
|
|
570
|
+
f && !$ || (H = $ > 0 ? $ - 1 : V.getMonth());
|
|
571
|
+
var q = v || 0, J = b || 0, u0 = E || 0, a0 = B || 0;
|
|
572
|
+
return z ? new Date(Date.UTC(O, H, P, q, J, u0, a0 + 60 * z.offset * 1e3)) : i ? new Date(Date.UTC(O, H, P, q, J, u0, a0)) : new Date(O, H, P, q, J, u0, a0);
|
|
573
|
+
} catch {
|
|
574
|
+
return /* @__PURE__ */ new Date("");
|
|
575
|
+
}
|
|
576
|
+
}(I, F, L), this.init(), x && x !== !0 && (this.$L = this.locale(x).$L), m && I != this.format(F) && (this.$d = /* @__PURE__ */ new Date("")), y = {};
|
|
577
|
+
} else if (F instanceof Array)
|
|
578
|
+
for (var U = F.length, a = 1; a <= U; a += 1) {
|
|
579
|
+
N[1] = F[a - 1];
|
|
580
|
+
var o = D.apply(this, N);
|
|
581
|
+
if (o.isValid()) {
|
|
582
|
+
this.$d = o.$d, this.$L = o.$L, this.init();
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
a === U && (this.$d = /* @__PURE__ */ new Date(""));
|
|
586
|
+
}
|
|
587
|
+
else
|
|
588
|
+
T.call(this, Z);
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
});
|
|
592
|
+
})(D0);
|
|
593
|
+
var T0 = D0.exports;
|
|
594
|
+
const w0 = /* @__PURE__ */ M0(T0);
|
|
595
|
+
function K(t = 0, e = Number.MAX_SAFE_INTEGER) {
|
|
596
|
+
return Math.floor(Math.random() * (e - t + 1)) + Math.floor(t);
|
|
597
|
+
}
|
|
598
|
+
R.extend(w0);
|
|
599
|
+
function Y0(t = {}) {
|
|
600
|
+
const e = {
|
|
601
|
+
start: "1800-01-01 00:00:00",
|
|
602
|
+
end: R().format("YYYY-MM-DD HH:mm:ss"),
|
|
603
|
+
format: "YYYY-MM-DD HH:mm:ss"
|
|
604
|
+
}, { start: r, end: s, format: l } = k(e, t);
|
|
605
|
+
(!R(r).isValid() || !R(s).isValid()) && t0("generateRandomDate", "start end 参数必须是合法的时间格式");
|
|
606
|
+
const d = R(r).year(), S = R(s).year(), y = K(d, S), _ = K(1, 12), M = K(1, 31), W = K(0, 23), A = K(0, 59), G = K(0, 59), C = R(`${y}-${_}-${M} ${W}:${A}:${G}`);
|
|
607
|
+
return C.isBefore(R(r)) || C.isAfter(R(s)) ? (console.log("不合法时间", R(C).format("YYYY-MM-DD HH:mm:ss")), Y0(t)) : C.format(l);
|
|
608
|
+
}
|
|
609
|
+
function F0(t, e = {}) {
|
|
610
|
+
const { lowerCase: r, upperCase: s, number: l } = k({ lowerCase: !0, upperCase: !0, number: !0 }, e);
|
|
611
|
+
r || s || l || t0("generateRandomString", "lowerCase upperCase number 至少需要一个参数为true");
|
|
612
|
+
let d = "";
|
|
613
|
+
r && (d += "abcdefghijklmnopqrstuvwxyz"), s && (d += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), l && (d += "0123456789");
|
|
614
|
+
let S = "";
|
|
615
|
+
for (let y = 0; y < t; y++) {
|
|
616
|
+
const _ = Math.floor(Math.random() * d.length);
|
|
617
|
+
S += d.charAt(_);
|
|
173
618
|
}
|
|
174
|
-
return
|
|
619
|
+
return S;
|
|
175
620
|
}
|
|
176
|
-
function
|
|
621
|
+
function e0(t) {
|
|
177
622
|
return t[Math.floor(Math.random() * t.length)];
|
|
178
623
|
}
|
|
179
|
-
function
|
|
624
|
+
function d2() {
|
|
180
625
|
const t = ["gmail.com", "yahoo.com", "outlook.com", "example.com", "qq.com", "163.com"];
|
|
181
|
-
return `${
|
|
626
|
+
return `${F0(10)}@${e0(t)}`;
|
|
182
627
|
}
|
|
183
|
-
function
|
|
184
|
-
return Math.random() * (
|
|
628
|
+
function h2(t = 0, e = 1e9) {
|
|
629
|
+
return Math.random() * (e - t) + t;
|
|
185
630
|
}
|
|
186
|
-
const
|
|
631
|
+
const v0 = {
|
|
187
632
|
北京市: "110000",
|
|
188
633
|
东城区: "110101",
|
|
189
634
|
西城区: "110102",
|
|
@@ -2084,7 +2529,6 @@ const P = {
|
|
|
2084
2529
|
黄埔区: "440112",
|
|
2085
2530
|
番禺区: "440113",
|
|
2086
2531
|
花都区: "440114",
|
|
2087
|
-
南沙区: "-",
|
|
2088
2532
|
从化区: "440117",
|
|
2089
2533
|
增城区: "440118",
|
|
2090
2534
|
韶关市: "440200",
|
|
@@ -2353,7 +2797,6 @@ const P = {
|
|
|
2353
2797
|
天涯区: "460204",
|
|
2354
2798
|
崖州区: "460205",
|
|
2355
2799
|
三沙市: "460300",
|
|
2356
|
-
西沙区: "-",
|
|
2357
2800
|
儋州市: "460400",
|
|
2358
2801
|
五指山市: "469001",
|
|
2359
2802
|
琼海市: "469002",
|
|
@@ -3358,187 +3801,182 @@ const P = {
|
|
|
3358
3801
|
香港特别行政区: "810000",
|
|
3359
3802
|
澳门特别行政区: "820000"
|
|
3360
3803
|
};
|
|
3361
|
-
function
|
|
3362
|
-
t <= 0 &&
|
|
3363
|
-
let
|
|
3364
|
-
|
|
3365
|
-
for (let
|
|
3366
|
-
|
|
3367
|
-
return
|
|
3804
|
+
function d0(t, e) {
|
|
3805
|
+
(!h0(t) || t <= 0) && t0("generateRandomStringFromSource", "num 必须大于0"), (!r0(e) || e.length === 0) && t0("generateRandomStringFromSource", "source 不能为空数组");
|
|
3806
|
+
let r = "";
|
|
3807
|
+
e0(e);
|
|
3808
|
+
for (let s = 0; s < t; s++)
|
|
3809
|
+
r += e0(e);
|
|
3810
|
+
return r;
|
|
3368
3811
|
}
|
|
3369
|
-
function
|
|
3370
|
-
const t =
|
|
3812
|
+
function l2() {
|
|
3813
|
+
const t = e0(Object.values(v0)), e = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
3371
3814
|
return [
|
|
3372
3815
|
t,
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
new Array(12).fill("").map((r, o) => o < 9 ? `0${o + 1}` : `${o + 1}`)
|
|
3378
|
-
),
|
|
3379
|
-
u(
|
|
3380
|
-
1,
|
|
3381
|
-
new Array(31).fill("").map((r, o) => o < 9 ? `0${o + 1}` : `${o + 1}`)
|
|
3382
|
-
),
|
|
3383
|
-
u(3, n),
|
|
3384
|
-
u(1, [...n, "X", "x"])
|
|
3385
|
-
];
|
|
3386
|
-
}
|
|
3387
|
-
function U(t = 0, n = Number.MAX_SAFE_INTEGER) {
|
|
3388
|
-
return Math.floor(Math.random() * (n - t + 1)) + Math.floor(t);
|
|
3816
|
+
Y0({ format: "YYYYMMDD" }),
|
|
3817
|
+
d0(3, e),
|
|
3818
|
+
d0(1, [...e, "X", "x"])
|
|
3819
|
+
].join("");
|
|
3389
3820
|
}
|
|
3390
|
-
function
|
|
3821
|
+
function m2() {
|
|
3391
3822
|
let t = ["130", "131", "132", "133", "134", "135", "136", "137", "138", "139"];
|
|
3392
|
-
return t = [...t, "145", "146", "147", "149"], t = [...t, "150", "151", "152", "153", "155", "156", "157", "158", "159"], t = [...t, "166", "167"], t = [...t, "170", "171", "172", "173", "174", "175", "176", "177", "178"], t = [...t, "180", "181", "182", "183", "184", "185", "186", "187", "188", "189"], t = [...t, "190", "191", "192", "195", "196", "197", "198", "199"],
|
|
3823
|
+
return t = [...t, "145", "146", "147", "149"], t = [...t, "150", "151", "152", "153", "155", "156", "157", "158", "159"], t = [...t, "166", "167"], t = [...t, "170", "171", "172", "173", "174", "175", "176", "177", "178"], t = [...t, "180", "181", "182", "183", "184", "185", "186", "187", "188", "189"], t = [...t, "190", "191", "192", "195", "196", "197", "198", "199"], e0(t) + K(0, 99999999).toString().padEnd(8, "0");
|
|
3393
3824
|
}
|
|
3394
|
-
function
|
|
3825
|
+
function $2(t) {
|
|
3395
3826
|
return /^\d+$/.test(t);
|
|
3396
3827
|
}
|
|
3397
|
-
function
|
|
3828
|
+
function g2(t) {
|
|
3398
3829
|
return /^[\u4E00-\u9FA5]+$/.test(t);
|
|
3399
3830
|
}
|
|
3400
|
-
function
|
|
3831
|
+
function p2(t) {
|
|
3401
3832
|
return /^[A-Za-z]+$/.test(t);
|
|
3402
3833
|
}
|
|
3403
|
-
function
|
|
3834
|
+
function M2(t) {
|
|
3404
3835
|
return /^[A-Z]+$/.test(t);
|
|
3405
3836
|
}
|
|
3406
|
-
function
|
|
3837
|
+
function y2(t) {
|
|
3407
3838
|
return /^[\dA-Z]+$/.test(t);
|
|
3408
3839
|
}
|
|
3409
|
-
function
|
|
3840
|
+
function D2(t) {
|
|
3410
3841
|
return /^[\dA-Z\u4E00-\u9FA5]+$/.test(t);
|
|
3411
3842
|
}
|
|
3412
|
-
function
|
|
3843
|
+
function w2(t) {
|
|
3413
3844
|
return /^[a-z]+$/.test(t);
|
|
3414
3845
|
}
|
|
3415
|
-
function
|
|
3846
|
+
function Y2(t) {
|
|
3416
3847
|
return /^[\da-z]+$/.test(t);
|
|
3417
3848
|
}
|
|
3418
|
-
function
|
|
3849
|
+
function v2(t) {
|
|
3419
3850
|
return /^[\da-z\u4E00-\u9FA5]+$/.test(t);
|
|
3420
3851
|
}
|
|
3421
|
-
function
|
|
3422
|
-
const { integer:
|
|
3423
|
-
return
|
|
3852
|
+
function S2(t, e = {}) {
|
|
3853
|
+
const { integer: r } = k({ integer: !0 }, e);
|
|
3854
|
+
return r ? /^-?(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^-?(0|[1-9]\d*)\.\d+$/.test(t);
|
|
3424
3855
|
}
|
|
3425
|
-
function
|
|
3426
|
-
const { integer:
|
|
3427
|
-
return
|
|
3856
|
+
function b2(t, e = {}) {
|
|
3857
|
+
const { integer: r } = k({ integer: !0 }, e);
|
|
3858
|
+
return r ? /^[1-9]\d*\.?\d*|^0\.\d*[1-9]\d*$/.test(t) : /^[1-9]\d*\.\d*|^0\.\d*[1-9]\d*$/.test(t);
|
|
3428
3859
|
}
|
|
3429
|
-
function
|
|
3430
|
-
const { integer:
|
|
3431
|
-
return
|
|
3860
|
+
function O2(t, e = {}) {
|
|
3861
|
+
const { integer: r } = k({ integer: !0 }, e);
|
|
3862
|
+
return r ? /^-[1-9]\d*\.?\d*|^-0\.\d*[1-9]\d*$/.test(t) : /^-[1-9]\d*\.\d*|^-0\.\d*[1-9]\d*$/.test(t);
|
|
3432
3863
|
}
|
|
3433
|
-
function
|
|
3434
|
-
const { integer:
|
|
3435
|
-
return
|
|
3864
|
+
function A2(t, e = {}) {
|
|
3865
|
+
const { integer: r } = k({ integer: !0 }, e);
|
|
3866
|
+
return r ? /^(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^(0|[1-9]\d*)\.\d+$/.test(t);
|
|
3436
3867
|
}
|
|
3437
|
-
function
|
|
3438
|
-
const { integer:
|
|
3439
|
-
return
|
|
3868
|
+
function x2(t, e = {}) {
|
|
3869
|
+
const { integer: r } = k({ integer: !0 }, e);
|
|
3870
|
+
return r ? /^(-?0(\.0+)?|-(0|[1-9]\d*)(\.\d+)?)$/.test(t) : /^(-?0\.0+|-(0|[1-9]\d*)\.\d+)$/.test(t);
|
|
3440
3871
|
}
|
|
3441
|
-
function
|
|
3872
|
+
function C2(t) {
|
|
3442
3873
|
return /^-?(0|[1-9]\d*)$/.test(t);
|
|
3443
3874
|
}
|
|
3444
|
-
function
|
|
3875
|
+
function L2(t) {
|
|
3445
3876
|
return /^[1-9]\d*$/.test(t);
|
|
3446
3877
|
}
|
|
3447
|
-
function
|
|
3878
|
+
function E2(t) {
|
|
3448
3879
|
return /^(0|[1-9]\d*)$/.test(t);
|
|
3449
3880
|
}
|
|
3450
|
-
function
|
|
3881
|
+
function _2(t) {
|
|
3451
3882
|
return /^-([1-9]\d*)$/.test(t);
|
|
3452
3883
|
}
|
|
3453
|
-
function
|
|
3884
|
+
function T2(t) {
|
|
3454
3885
|
return /^(0|-(0|[1-9]\d*))$/.test(t);
|
|
3455
3886
|
}
|
|
3456
|
-
function
|
|
3887
|
+
function F2(t) {
|
|
3457
3888
|
return /^(?:(?:\+|00)86)?1(?:(?:3\d)|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8\d)|(?:9[0-25-9]))\d{8}$/.test(
|
|
3458
3889
|
t
|
|
3459
3890
|
);
|
|
3460
3891
|
}
|
|
3461
|
-
function
|
|
3892
|
+
function H2(t) {
|
|
3462
3893
|
return /^([\w-])+@([\w-])+(\.[\w-])+/.test(t);
|
|
3463
3894
|
}
|
|
3464
|
-
function
|
|
3895
|
+
function N2(t) {
|
|
3465
3896
|
return t === "";
|
|
3466
3897
|
}
|
|
3467
|
-
function
|
|
3468
|
-
return
|
|
3898
|
+
function H0(t, e = "YYYY-MM-DD HH:mm:ss") {
|
|
3899
|
+
return R.extend(w0), R(t, e, !0).isValid();
|
|
3900
|
+
}
|
|
3901
|
+
function j2(t) {
|
|
3902
|
+
let e = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(t);
|
|
3903
|
+
return !e || (e = Object.values(v0).includes(t.slice(0, 6)), !e) || (e = H0(t.slice(6, 14), "YYYYMMDD"), !e), e;
|
|
3469
3904
|
}
|
|
3470
3905
|
export {
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3906
|
+
g0 as castArray,
|
|
3907
|
+
j0 as compose,
|
|
3908
|
+
R0 as composeRight,
|
|
3909
|
+
Z0 as debounce,
|
|
3910
|
+
Q0 as debugWarn,
|
|
3911
|
+
l0 as deepClone,
|
|
3912
|
+
k as deepMerge,
|
|
3913
|
+
k0 as error,
|
|
3914
|
+
u2 as excludeProperties,
|
|
3915
|
+
a2 as extractProperties,
|
|
3916
|
+
c2 as generateRandomArray,
|
|
3917
|
+
f2 as generateRandomColor,
|
|
3918
|
+
Y0 as generateRandomDate,
|
|
3919
|
+
d2 as generateRandomEmail,
|
|
3920
|
+
h2 as generateRandomFloat,
|
|
3921
|
+
l2 as generateRandomIdCard,
|
|
3922
|
+
K as generateRandomInteger,
|
|
3923
|
+
m2 as generateRandomMobilePhone,
|
|
3924
|
+
F0 as generateRandomString,
|
|
3925
|
+
d0 as generateRandomStringFromSource,
|
|
3926
|
+
e0 as getRandomItem,
|
|
3927
|
+
K0 as hasChanged,
|
|
3928
|
+
f0 as hasOwn,
|
|
3929
|
+
I0 as initLog,
|
|
3930
|
+
r0 as isArray,
|
|
3931
|
+
G0 as isBoolean,
|
|
3932
|
+
g2 as isChinese,
|
|
3933
|
+
b0 as isDate,
|
|
3934
|
+
H0 as isDateString,
|
|
3935
|
+
J0 as isDef,
|
|
3936
|
+
H2 as isEmail,
|
|
3937
|
+
N2 as isEmptyString,
|
|
3938
|
+
p2 as isEnglishAphabet,
|
|
3939
|
+
S2 as isFloat,
|
|
3940
|
+
i0 as isFunction,
|
|
3941
|
+
j2 as isIdCard,
|
|
3942
|
+
C2 as isInteger,
|
|
3943
|
+
w2 as isLowerCase,
|
|
3944
|
+
Y2 as isLowerCaseAndNumber,
|
|
3945
|
+
v2 as isLowerCaseAndNumberAndChinese,
|
|
3946
|
+
z0 as isMap,
|
|
3947
|
+
F2 as isMobilePhone,
|
|
3948
|
+
O2 as isNegativeFloat,
|
|
3949
|
+
x2 as isNegativeFloatOrZero,
|
|
3950
|
+
_2 as isNegativeInteger,
|
|
3951
|
+
T2 as isNegativeIntegerOrZero,
|
|
3952
|
+
B0 as isNull,
|
|
3953
|
+
h0 as isNumber,
|
|
3954
|
+
$2 as isNumberOrNumberString,
|
|
3955
|
+
o0 as isObject,
|
|
3956
|
+
b2 as isPositiveFloat,
|
|
3957
|
+
A2 as isPositiveFloatOrZero,
|
|
3958
|
+
L2 as isPositiveInteger,
|
|
3959
|
+
E2 as isPositiveIntegerOrZero,
|
|
3960
|
+
q0 as isPromise,
|
|
3961
|
+
O0 as isRegExp,
|
|
3962
|
+
W0 as isSet,
|
|
3963
|
+
A0 as isString,
|
|
3964
|
+
V0 as isSymbol,
|
|
3965
|
+
n0 as isUndef,
|
|
3966
|
+
X0 as isUndefined,
|
|
3967
|
+
M2 as isUpperCase,
|
|
3968
|
+
y2 as isUpperCaseAndNumber,
|
|
3969
|
+
D2 as isUpperCaseAndNumberAndChinese,
|
|
3970
|
+
U0 as log,
|
|
3971
|
+
S0 as objectToString,
|
|
3972
|
+
t2 as qs,
|
|
3973
|
+
e2 as throttle,
|
|
3974
|
+
t0 as throwError,
|
|
3975
|
+
s0 as toTypeString,
|
|
3976
|
+
i2 as validatorChineseOrEnglish,
|
|
3977
|
+
r2 as validatorChineseOrEnglishOrNumber,
|
|
3978
|
+
n2 as validatorLatitudeOrLongitude,
|
|
3979
|
+
o2 as validatorUppercaseOrNumbersOrSpecial,
|
|
3980
|
+
s2 as validatorUppercaseOrNumbersOrUnderline,
|
|
3981
|
+
P0 as warn
|
|
3544
3982
|
};
|