jk-vue-comps 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/bignumber.js@11.
|
|
1
|
+
//#region node_modules/.pnpm/bignumber.js@11.1.1/node_modules/bignumber.js/dist/bignumber.mjs
|
|
2
2
|
var e = d(), t = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, n = Math.ceil, r = Math.floor, i = "[BigNumber Error] ", a = 0x5af3107a4000, o = 14, s = 9007199254740991, c = [
|
|
3
3
|
1,
|
|
4
4
|
10,
|
|
@@ -16,26 +16,28 @@ var e = d(), t = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, n = Math.ceil, r
|
|
|
16
16
|
0x9184e72a000
|
|
17
17
|
], l = 1e7, u = 1e9;
|
|
18
18
|
function d(e) {
|
|
19
|
-
var
|
|
20
|
-
constructor:
|
|
19
|
+
var b, x, S = /^(-?)0([xbo])(?=[^.])/i, C = /^-?(Infinity|NaN)$/, w = /^\s*\+(?!-)|^\s+|\s+$/g, T = z.prototype = {
|
|
20
|
+
constructor: z,
|
|
21
21
|
toString: null,
|
|
22
22
|
valueOf: null
|
|
23
|
-
},
|
|
23
|
+
}, E = new z(1), D = 20, O = 4, k = -7, A = 21, j = -1e7, M = 1e7, N = !1, P = !0, F = 1, I = 0, L = {
|
|
24
24
|
prefix: "",
|
|
25
|
+
negativeSign: "-",
|
|
26
|
+
positiveSign: "",
|
|
27
|
+
groupSeparator: ",",
|
|
25
28
|
groupSize: 3,
|
|
26
29
|
secondaryGroupSize: 0,
|
|
27
|
-
groupSeparator: ",",
|
|
28
30
|
decimalSeparator: ".",
|
|
31
|
+
fractionGroupSeparator: "",
|
|
29
32
|
fractionGroupSize: 0,
|
|
30
|
-
fractionGroupSeparator: "\xA0",
|
|
31
33
|
suffix: ""
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
+
}, R = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
35
|
+
function z(e, n) {
|
|
34
36
|
var r, a, o, s, c = this;
|
|
35
|
-
if (!(c instanceof
|
|
37
|
+
if (!(c instanceof z)) return new z(e, n);
|
|
36
38
|
if (s = typeof e, n == null) {
|
|
37
|
-
if (
|
|
38
|
-
c.s = e.s, !e.c || e.e >
|
|
39
|
+
if (U(e)) {
|
|
40
|
+
c.s = e.s, !e.c || e.e > M ? c.c = c.e = null : e.e < j ? c.c = [c.e = 0] : (c.e = e.e, c.c = e.c.slice());
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
43
|
if (s == "number") {
|
|
@@ -45,94 +47,107 @@ function d(e) {
|
|
|
45
47
|
}
|
|
46
48
|
if (c.s = 1 / e < 0 ? (e = -e, -1) : 1, e === ~~e) {
|
|
47
49
|
for (r = 0, a = e; a >= 10; a /= 10, r++);
|
|
48
|
-
r >
|
|
50
|
+
r > M ? c.c = c.e = null : (c.e = r, c.c = [e]);
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
|
-
return
|
|
53
|
+
return B(c, String(e));
|
|
52
54
|
}
|
|
53
|
-
if (s == "bigint") return c.s = e < 0 ? (e = -e, -1) : 1,
|
|
55
|
+
if (s == "bigint") return c.s = e < 0 ? (e = -e, -1) : 1, B(c, String(e));
|
|
54
56
|
if (s == "string") o = e;
|
|
55
57
|
else {
|
|
56
|
-
if (
|
|
58
|
+
if (P) throw Error(i + "BigNumber, string, number, or BigInt expected: " + e);
|
|
57
59
|
o = String(e);
|
|
58
60
|
}
|
|
59
|
-
if (t.test(o)) return c.s = o.charCodeAt(0) == 45 ? (o = o.slice(1), -1) : 1,
|
|
60
|
-
if (o = o.replace(
|
|
61
|
+
if (t.test(o)) return c.s = o.charCodeAt(0) == 45 ? (o = o.slice(1), -1) : 1, B(c, o);
|
|
62
|
+
if (o = o.replace(w, ""), C.test(o)) {
|
|
61
63
|
c.s = isNaN(o) ? null : o < 0 ? -1 : 1, c.c = c.e = null;
|
|
62
64
|
return;
|
|
63
65
|
}
|
|
64
|
-
if (o = o.replace(
|
|
66
|
+
if (o = o.replace(S, function(e, t, r) {
|
|
65
67
|
return n = (r = r.toLowerCase()) == "x" ? 16 : r == "b" ? 2 : 8, t;
|
|
66
|
-
}), n) return
|
|
67
|
-
if (o = o.replace(/(\d)_(?=\d)/g, "$1"), t.test(o)) return c.s = o.charCodeAt(0) == 45 ? (o = o.slice(1), -1) : 1,
|
|
68
|
-
if (
|
|
68
|
+
}), n) return V(c, o, n, e);
|
|
69
|
+
if (o = o.replace(/(\d)_(?=\d)/g, "$1"), t.test(o)) return c.s = o.charCodeAt(0) == 45 ? (o = o.slice(1), -1) : 1, B(c, o);
|
|
70
|
+
if (P) throw Error(i + "Not a number: " + e);
|
|
69
71
|
c.s = c.c = c.e = null;
|
|
70
72
|
} else {
|
|
71
73
|
if (s != "string") {
|
|
72
|
-
if (
|
|
74
|
+
if (P) throw Error(i + "String expected: " + e);
|
|
73
75
|
e = String(e);
|
|
74
76
|
}
|
|
75
|
-
h(n, 2,
|
|
77
|
+
h(n, 2, R.length, "Base"), V(c, e.replace(w, ""), n, e);
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
|
|
80
|
+
z.clone = d, z.ROUND_UP = 0, z.ROUND_DOWN = 1, z.ROUND_CEIL = 2, z.ROUND_FLOOR = 3, z.ROUND_HALF_UP = 4, z.ROUND_HALF_DOWN = 5, z.ROUND_HALF_EVEN = 6, z.ROUND_HALF_CEIL = 7, z.ROUND_HALF_FLOOR = 8, z.EUCLID = 9, z.config = z.set = function(e) {
|
|
79
81
|
var t, n;
|
|
80
82
|
if (e != null) if (typeof e == "object") {
|
|
81
|
-
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (
|
|
82
|
-
else if (h(n, -u, u, t), n) M = -(N = n < 0 ? -n : n);
|
|
83
|
+
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (D = h(e[t], 0, u, t)), e.hasOwnProperty(t = "ROUNDING_MODE") && (O = h(e[t], 0, 8, t)), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (n = e[t], g(n) ? (h(n[0], -u, 0, t), h(n[1], 0, u, t), k = n[0], A = n[1]) : k = -(A = h(n, -u, u, t) < 0 ? -n : n)), e.hasOwnProperty(t = "RANGE")) if (n = e[t], n) g(n) ? (h(n[0], -u, -1, t), h(n[1], 1, u, t), j = n[0], M = n[1]) : j = -(M = h(n, -u, u, t) < 0 ? -n : n);
|
|
83
84
|
else throw Error(i + t + " cannot be zero: " + n);
|
|
84
|
-
if (e.hasOwnProperty(t = "CRYPTO")) if (n = e[t], n === !!n) if (n) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
85
|
-
else throw
|
|
86
|
-
else
|
|
85
|
+
if (e.hasOwnProperty(t = "CRYPTO")) if (n = e[t], n === !!n) if (n) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) N = n;
|
|
86
|
+
else throw N = !n, Error(i + "crypto unavailable");
|
|
87
|
+
else N = n;
|
|
87
88
|
else throw Error(i + t + " not true or false: " + n);
|
|
88
|
-
if (e.hasOwnProperty(t = "STRICT")) if (n = e[t], n === !!n)
|
|
89
|
+
if (e.hasOwnProperty(t = "STRICT")) if (n = e[t], n === !!n) P = n;
|
|
89
90
|
else throw Error(i + t + " not true or false: " + n);
|
|
90
|
-
if (e.hasOwnProperty(t = "MODULO_MODE") && (
|
|
91
|
+
if (e.hasOwnProperty(t = "MODULO_MODE") && (F = h(e[t], 0, 9, t)), e.hasOwnProperty(t = "POW_PRECISION") && (I = h(e[t], 0, u, t)), e.hasOwnProperty(t = "FORMAT")) if (n = e[t], typeof n == "object") for (t in n) n.hasOwnProperty(t) && L.hasOwnProperty(t) && (L[t] = n[t]);
|
|
91
92
|
else throw Error(i + t + " not an object: " + n);
|
|
92
|
-
if (e.hasOwnProperty(t = "ALPHABET")) if (n = e[t], typeof n == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(n))
|
|
93
|
+
if (e.hasOwnProperty(t = "ALPHABET")) if (n = e[t], typeof n == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(n)) R = n;
|
|
93
94
|
else throw Error(i + t + " invalid: " + n);
|
|
94
95
|
} else throw Error(i + "Object expected: " + e);
|
|
95
96
|
return {
|
|
96
|
-
DECIMAL_PLACES:
|
|
97
|
-
ROUNDING_MODE:
|
|
98
|
-
EXPONENTIAL_AT: [
|
|
99
|
-
RANGE: [
|
|
100
|
-
CRYPTO:
|
|
101
|
-
STRICT:
|
|
102
|
-
MODULO_MODE:
|
|
103
|
-
POW_PRECISION:
|
|
104
|
-
FORMAT:
|
|
105
|
-
ALPHABET:
|
|
97
|
+
DECIMAL_PLACES: D,
|
|
98
|
+
ROUNDING_MODE: O,
|
|
99
|
+
EXPONENTIAL_AT: [k, A],
|
|
100
|
+
RANGE: [j, M],
|
|
101
|
+
CRYPTO: N,
|
|
102
|
+
STRICT: P,
|
|
103
|
+
MODULO_MODE: F,
|
|
104
|
+
POW_PRECISION: I,
|
|
105
|
+
FORMAT: L,
|
|
106
|
+
ALPHABET: R
|
|
106
107
|
};
|
|
107
|
-
},
|
|
108
|
-
if (
|
|
108
|
+
}, z.fromFormat = function(e, t) {
|
|
109
|
+
if (typeof e != "string") throw Error(i + "Not a string: " + e);
|
|
110
|
+
if (t == null) t = L;
|
|
111
|
+
else if (typeof t != "object") throw Error(i + "Argument not an object: " + t);
|
|
112
|
+
else t = K(t);
|
|
113
|
+
var n, r, a, o, s = t.negativeSign || "-", c = t.positiveSign || "", l = t.prefix || "", u = t.suffix || "", d = t.groupSeparator || "", f = t.decimalSeparator || ".", p = t.fractionGroupSeparator || "";
|
|
114
|
+
if (l && e.indexOf(l) === 0 && (e = e.slice(l.length)), u && e.lastIndexOf(u) === e.length - u.length && (e = e.slice(0, -u.length)), s && e.indexOf(s) === 0 ? (e = e.slice(s.length), r = !0) : c && e.indexOf(c) === 0 && (e = e.slice(c.length)), n = e.indexOf(f), n < 0) {
|
|
115
|
+
if (d) for (; e.indexOf(d) > -1;) e = e.replace(d, "");
|
|
116
|
+
} else {
|
|
117
|
+
if (a = e.slice(0, n), o = e.slice(n + f.length), d) for (; a.indexOf(d) > -1;) a = a.replace(d, "");
|
|
118
|
+
if (p) for (; o.indexOf(p) > -1;) o = o.replace(p, "");
|
|
119
|
+
e = a + "." + o;
|
|
120
|
+
}
|
|
121
|
+
return new z(r ? "-" + e : e);
|
|
122
|
+
}, z.isBigNumber = function(e) {
|
|
123
|
+
if (!U(e)) return !1;
|
|
109
124
|
var t, n, i = e.c, s = e.e, c = e.s;
|
|
110
|
-
if (
|
|
125
|
+
if (!g(i)) return i === null && s === null && (c === null || c === 1 || c === -1);
|
|
111
126
|
if (c !== 1 && c !== -1 || s < -u || s > u || s !== r(s)) return !1;
|
|
112
127
|
if (i[0] === 0) return s === 0 && i.length === 1;
|
|
113
128
|
if (t = (s + 1) % o, t < 1 && (t += o), String(i[0]).length !== t) return !1;
|
|
114
129
|
for (t = 0; t < i.length; t++) if (n = i[t], n < 0 || n >= a || n !== r(n)) return !1;
|
|
115
130
|
return n !== 0;
|
|
116
|
-
},
|
|
117
|
-
return
|
|
118
|
-
},
|
|
119
|
-
return
|
|
120
|
-
},
|
|
131
|
+
}, z.maximum = z.max = function() {
|
|
132
|
+
return W(arguments, -1);
|
|
133
|
+
}, z.minimum = z.min = function() {
|
|
134
|
+
return W(arguments, 1);
|
|
135
|
+
}, z.random = (function() {
|
|
121
136
|
var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
|
|
122
137
|
return r(Math.random() * e);
|
|
123
138
|
} : function() {
|
|
124
139
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
125
140
|
};
|
|
126
141
|
return function(e) {
|
|
127
|
-
var a, s, l, d, f, p = 0, m = [], g = new
|
|
128
|
-
if (e == null ?
|
|
142
|
+
var a, s, l, d, f, p = 0, m = [], g = new z(E);
|
|
143
|
+
if (e = e == null ? D : h(e, 0, u), d = n(e / o), N) if (crypto.getRandomValues) {
|
|
129
144
|
for (a = crypto.getRandomValues(new Uint32Array(d *= 2)); p < d;) f = a[p] * 131072 + (a[p + 1] >>> 11), f >= 9e15 ? (s = crypto.getRandomValues(new Uint32Array(2)), a[p] = s[0], a[p + 1] = s[1]) : (m.push(f % 0x5af3107a4000), p += 2);
|
|
130
145
|
p = d / 2;
|
|
131
146
|
} else if (crypto.randomBytes) {
|
|
132
147
|
for (a = crypto.randomBytes(d *= 7); p < d;) f = (a[p] & 31) * 281474976710656 + a[p + 1] * 1099511627776 + a[p + 2] * 4294967296 + a[p + 3] * 16777216 + (a[p + 4] << 16) + (a[p + 5] << 8) + a[p + 6], f >= 9e15 ? crypto.randomBytes(7).copy(a, p) : (m.push(f % 0x5af3107a4000), p += 7);
|
|
133
148
|
p = d / 7;
|
|
134
|
-
} else throw
|
|
135
|
-
if (!
|
|
149
|
+
} else throw N = !1, Error(i + "crypto unavailable");
|
|
150
|
+
if (!N) for (; p < d;) f = t(), f < 9e15 && (m[p++] = f % 0x5af3107a4000);
|
|
136
151
|
for (d = m[--p], e %= o, d && e && (f = c[o - e], m[p] = r(d / f) * f); m[p] === 0; m.pop(), p--);
|
|
137
152
|
if (p < 0) m = [l = 0];
|
|
138
153
|
else {
|
|
@@ -142,15 +157,16 @@ function d(e) {
|
|
|
142
157
|
}
|
|
143
158
|
return g.e = l, g.c = m, g;
|
|
144
159
|
};
|
|
145
|
-
})(),
|
|
146
|
-
for (var e =
|
|
147
|
-
return
|
|
148
|
-
}
|
|
160
|
+
})(), z.sum = function() {
|
|
161
|
+
for (var e = 0, t = new z(0); e < arguments.length;) t = t.plus(arguments[e++]);
|
|
162
|
+
return t;
|
|
163
|
+
};
|
|
164
|
+
function B(e, t) {
|
|
149
165
|
var n, r, i;
|
|
150
166
|
for ((n = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (r = t.search(/e/i)) > 0 ? (n < 0 && (n = r), n += +t.slice(r + 1), t = t.substring(0, r)) : n < 0 && (n = t.length), r = 0; t.charCodeAt(r) === 48; r++);
|
|
151
167
|
for (i = t.length; t.charCodeAt(--i) === 48;);
|
|
152
|
-
if (t = t.slice(r, ++i)) if (i -= r, n = n - r - 1, n >
|
|
153
|
-
else if (n <
|
|
168
|
+
if (t = t.slice(r, ++i)) if (i -= r, n = n - r - 1, n > M) e.c = e.e = null;
|
|
169
|
+
else if (n < j) e.c = [e.e = 0];
|
|
154
170
|
else {
|
|
155
171
|
if (e.e = n, e.c = [], r = (n + 1) % o, n < 0 && (r += o), r < i) {
|
|
156
172
|
for (r && e.c.push(+t.slice(0, r)), i -= o; r < i;) e.c.push(+t.slice(r, r += o));
|
|
@@ -160,8 +176,9 @@ function d(e) {
|
|
|
160
176
|
e.c.push(+t);
|
|
161
177
|
}
|
|
162
178
|
else e.c = [e.e = 0];
|
|
163
|
-
}
|
|
164
|
-
|
|
179
|
+
}
|
|
180
|
+
function V(e, t, n, r) {
|
|
181
|
+
var a, o, s = R.slice(0, n), c = 0, l = "", u = !1, d = !1, f = !1;
|
|
165
182
|
for (e.s = t.charCodeAt(0) === 45 ? (t = t.slice(1), -1) : 1, o = t.length; c < o; c++) {
|
|
166
183
|
if (a = t.charAt(c), s.indexOf(a) >= 0) {
|
|
167
184
|
l += a, d = !0;
|
|
@@ -182,12 +199,13 @@ function d(e) {
|
|
|
182
199
|
c = -1, l = "", f = !0, u = d = !1;
|
|
183
200
|
continue;
|
|
184
201
|
}
|
|
185
|
-
if (
|
|
202
|
+
if (P) throw Error(i + "Not a base " + n + " number: " + r);
|
|
186
203
|
e.s = e.c = e.e = null;
|
|
187
204
|
return;
|
|
188
205
|
}
|
|
189
|
-
|
|
190
|
-
}
|
|
206
|
+
B(e, x(l, n, 10, e.s));
|
|
207
|
+
}
|
|
208
|
+
x = (function() {
|
|
191
209
|
var e = "0123456789";
|
|
192
210
|
function t(e, t, n, r) {
|
|
193
211
|
for (var i, a = [0], o, s = 0, c = e.length; s < c;) {
|
|
@@ -197,19 +215,19 @@ function d(e) {
|
|
|
197
215
|
return a.reverse();
|
|
198
216
|
}
|
|
199
217
|
return function(n, r, i, a, o) {
|
|
200
|
-
var s, c, l, u, d, f, m, h, g = n.indexOf("."), _ =
|
|
201
|
-
for (g >= 0 && (u =
|
|
218
|
+
var s, c, l, u, d, f, m, h, g = n.indexOf("."), _ = D, v = O;
|
|
219
|
+
for (g >= 0 && (u = I, I = 0, n = n.replace(".", ""), h = new z(r), f = h.pow(n.length - g), I = u, h.c = t(y(p(f.c), f.e, "0"), 10, i, e), h.e = h.c.length), m = t(n, r, i, o ? (s = R, e) : (s = e, R)), l = u = m.length; m[--u] == 0; m.pop());
|
|
202
220
|
if (!m[0]) return s.charAt(0);
|
|
203
|
-
if (g < 0 ? --l : (f.c = m, f.e = l, f.s = a, f =
|
|
221
|
+
if (g < 0 ? --l : (f.c = m, f.e = l, f.s = a, f = b(f, h, _, v, i), m = f.c, d = f.r, l = f.e), c = l + _ + 1, g = m[c], u = i / 2, d = d || c < 0 || m[c + 1] != null, d = v < 4 ? (g != null || d) && (v == 0 || v == (f.s < 0 ? 3 : 2)) : g > u || g == u && (v == 4 || d || v == 6 && m[c - 1] & 1 || v == (f.s < 0 ? 8 : 7)), c < 1 || !m[0]) n = d ? y(s.charAt(1), -_, s.charAt(0)) : s.charAt(0);
|
|
204
222
|
else {
|
|
205
|
-
if (m.length = c, d) for (--i; ++m[--c] > i;) m[c] = 0, c || (++l, m = [1].concat(m));
|
|
223
|
+
if (c < m.length && (m.length = c), d) for (--i; ++m[--c] > i;) m[c] = 0, c || (++l, m = [1].concat(m));
|
|
206
224
|
for (u = m.length; !m[--u];);
|
|
207
225
|
for (g = 0, n = ""; g <= u; n += s.charAt(m[g++]));
|
|
208
|
-
n =
|
|
226
|
+
n = y(n, l, s.charAt(0));
|
|
209
227
|
}
|
|
210
228
|
return n;
|
|
211
229
|
};
|
|
212
|
-
})(),
|
|
230
|
+
})(), b = (function() {
|
|
213
231
|
function e(e, t, n) {
|
|
214
232
|
var r, i, a, o, s = 0, c = e.length, u = t % l, d = t / l | 0;
|
|
215
233
|
for (e = e.slice(); c--;) a = e[c] % l, o = e[c] / l | 0, r = d * a + o * u, i = u * a + r % l * l + s, s = (i / n | 0) + (r / l | 0) + d * o, e[c] = i % n;
|
|
@@ -230,8 +248,8 @@ function d(e) {
|
|
|
230
248
|
}
|
|
231
249
|
return function(i, s, c, l, u) {
|
|
232
250
|
var d, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k = i.s == s.s ? 1 : -1, A = i.c, j = s.c;
|
|
233
|
-
if (!A || !A[0] || !j || !j[0]) return new
|
|
234
|
-
for (y = new
|
|
251
|
+
if (!A || !A[0] || !j || !j[0]) return new z(!i.s || !s.s || (A ? j && A[0] == j[0] : !j) ? NaN : A && A[0] == 0 || !j ? k * 0 : k / 0);
|
|
252
|
+
for (y = new z(k), b = y.c = [], p = i.e - s.e, k = c + p + 1, u || (u = a, p = f(i.e / o) - f(s.e / o), k = k / o | 0), m = 0; j[m] == (A[m] || 0); m++);
|
|
235
253
|
if (j[m] > (A[m] || 0) && p--, k < 0) b.push(1), h = !0;
|
|
236
254
|
else {
|
|
237
255
|
for (T = A.length, D = j.length, m = 0, k += 2, g = r(u / (j[0] + 1)), g > 1 && (j = e(j, g, u), A = e(A, g, u), D = j.length, T = A.length), w = D, x = A.slice(0, D), S = x.length; S < D; x[S++] = 0);
|
|
@@ -248,36 +266,41 @@ function d(e) {
|
|
|
248
266
|
}
|
|
249
267
|
if (u == a) {
|
|
250
268
|
for (m = 1, k = b[0]; k >= 10; k /= 10, m++);
|
|
251
|
-
|
|
269
|
+
q(y, c + (y.e = m + p * o - 1) + 1, l, h);
|
|
252
270
|
} else y.e = p, y.r = +h;
|
|
253
271
|
return y;
|
|
254
272
|
};
|
|
255
273
|
})();
|
|
256
|
-
function
|
|
274
|
+
function H(e, t, n, r) {
|
|
257
275
|
var i, a, o, s, c;
|
|
258
|
-
if (n == null ?
|
|
259
|
-
if (i = e.c[0], o = e.e, t == null) c = p(e.c), c = r == 1 || r == 2 && (o <=
|
|
260
|
-
else if (e =
|
|
276
|
+
if (n = n == null ? O : h(n, 0, 8), !e.c) return e.toString();
|
|
277
|
+
if (i = e.c[0], o = e.e, t == null) c = p(e.c), c = r == 1 || r == 2 && (o <= k || o >= A) ? v(c, o) : y(c, o, "0");
|
|
278
|
+
else if (e = q(new z(e), t, n), a = e.e, c = p(e.c), s = c.length, r == 1 || r == 2 && (t <= a || a <= k)) {
|
|
261
279
|
for (; s < t; c += "0", s++);
|
|
262
|
-
c =
|
|
263
|
-
} else if (t -= o + (r === 2 && a > o), c =
|
|
280
|
+
c = v(c, a);
|
|
281
|
+
} else if (t -= o + (r === 2 && a > o), c = y(c, a, "0"), a + 1 > s) {
|
|
264
282
|
if (--t > 0) for (c += "."; t--; c += "0");
|
|
265
283
|
} else if (t += a - s, t > 0) for (a + 1 == s && (c += "."); t--; c += "0");
|
|
266
284
|
return e.s < 0 && i ? "-" + c : c;
|
|
267
285
|
}
|
|
268
|
-
function
|
|
269
|
-
return e instanceof
|
|
286
|
+
function U(e) {
|
|
287
|
+
return e instanceof z || !!e && e._isBigNumber === !0;
|
|
270
288
|
}
|
|
271
|
-
function
|
|
272
|
-
for (var n, r, i = 1, a = new
|
|
289
|
+
function W(e, t) {
|
|
290
|
+
for (var n, r, i = 1, a = new z(e[0]); i < e.length; i++) r = new z(e[i]), (!r.s || (n = m(a, r)) === t || n === 0 && a.s === t) && (a = r);
|
|
273
291
|
return a;
|
|
274
292
|
}
|
|
275
|
-
function
|
|
293
|
+
function G(e, t, n) {
|
|
276
294
|
for (var r = 1, i = t.length; !t[--i]; t.pop());
|
|
277
295
|
for (i = t[0]; i >= 10; i /= 10, r++);
|
|
278
|
-
return (n = r + n * o - 1) >
|
|
296
|
+
return (n = r + n * o - 1) > M ? e.c = e.e = null : n < j ? e.c = [e.e = 0] : (e.e = n, e.c = t), e;
|
|
297
|
+
}
|
|
298
|
+
function K(e) {
|
|
299
|
+
var t, n = {};
|
|
300
|
+
for (t in L) L.hasOwnProperty(t) && (n[t] = e.hasOwnProperty(t) ? e[t] : L[t]);
|
|
301
|
+
return n;
|
|
279
302
|
}
|
|
280
|
-
function
|
|
303
|
+
function q(e, t, i, s) {
|
|
281
304
|
var l, u, d, f, p, m, h, g = e.c, _ = c;
|
|
282
305
|
if (g) {
|
|
283
306
|
out: {
|
|
@@ -303,39 +326,39 @@ function d(e) {
|
|
|
303
326
|
}
|
|
304
327
|
for (u = g.length; g[--u] === 0; g.pop());
|
|
305
328
|
}
|
|
306
|
-
e.e >
|
|
329
|
+
e.e > M ? e.c = e.e = null : e.e < j && (e.c = [e.e = 0]);
|
|
307
330
|
}
|
|
308
331
|
return e;
|
|
309
332
|
}
|
|
310
|
-
function
|
|
333
|
+
function J(e) {
|
|
311
334
|
var t, n = e.e;
|
|
312
|
-
return n === null ? e.toString() : (t = p(e.c), t = n <=
|
|
335
|
+
return n === null ? e.toString() : (t = p(e.c), t = n <= k || n >= A ? v(t, n) : y(t, n, "0"), e.s < 0 ? "-" + t : t);
|
|
313
336
|
}
|
|
314
|
-
return
|
|
315
|
-
var e = new
|
|
337
|
+
return T.absoluteValue = T.abs = function() {
|
|
338
|
+
var e = new z(this);
|
|
316
339
|
return e.s < 0 && (e.s = 1), e;
|
|
317
|
-
},
|
|
318
|
-
return m(this, new
|
|
319
|
-
},
|
|
340
|
+
}, T.comparedTo = function(e, t) {
|
|
341
|
+
return m(this, new z(e, t));
|
|
342
|
+
}, T.decimalPlaces = T.dp = function(e, t) {
|
|
320
343
|
var n, r, i, a = this;
|
|
321
|
-
if (e != null) return h(e,
|
|
344
|
+
if (e != null) return q(new z(a), h(e, -u, u) + a.e + 1, t == null ? O : h(t, 0, 8));
|
|
322
345
|
if (!(n = a.c)) return null;
|
|
323
346
|
if (r = ((i = n.length - 1) - f(this.e / o)) * o, i = n[i]) for (; i % 10 == 0; i /= 10, r--);
|
|
324
347
|
return r < 0 && (r = 0), r;
|
|
325
|
-
},
|
|
326
|
-
return
|
|
327
|
-
},
|
|
328
|
-
return
|
|
329
|
-
},
|
|
348
|
+
}, T.dividedBy = T.div = function(e, t) {
|
|
349
|
+
return b(this, new z(e, t), D, O);
|
|
350
|
+
}, T.dividedToIntegerBy = T.idiv = function(e, t) {
|
|
351
|
+
return b(this, new z(e, t), 0, 1);
|
|
352
|
+
}, T.exponentiatedBy = T.pow = function(e, t) {
|
|
330
353
|
var a, s, c, l, u, d, f, p, m, h = this;
|
|
331
|
-
if (e = new
|
|
332
|
-
if (t != null && (t = new
|
|
354
|
+
if (e = new z(e), e.c && !e.isInteger()) throw Error(i + "Exponent not an integer: " + J(e));
|
|
355
|
+
if (t != null && (t = new z(t)), d = e.e > 14, !h.c || !h.c[0] || h.c[0] == 1 && !h.e && h.c.length == 1 || !e.c || !e.c[0]) return m = new z(J(h) ** (d ? e.s * (2 - _(e)) : +J(e))), t ? m.mod(t) : m;
|
|
333
356
|
if (f = e.s < 0, t) {
|
|
334
|
-
if (t.c ? !t.c[0] : !t.s) return new
|
|
357
|
+
if (t.c ? !t.c[0] : !t.s) return new z(NaN);
|
|
335
358
|
s = !f && h.isInteger() && t.isInteger(), s && (h = h.mod(t));
|
|
336
|
-
} else if (e.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || d && h.c[1] >= 24e7 : h.c[0] < 8e13 || d && h.c[0] <= 9999975e7))) return l = h.s < 0 &&
|
|
337
|
-
else
|
|
338
|
-
for (d ? (a = new
|
|
359
|
+
} else if (e.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || d && h.c[1] >= 24e7 : h.c[0] < 8e13 || d && h.c[0] <= 9999975e7))) return l = h.s < 0 && _(e) ? -0 : 0, h.e > -1 && (l = 1 / l), new z(f ? 1 / l : l);
|
|
360
|
+
else I && (l = n(I / o + 2));
|
|
361
|
+
for (d ? (a = new z(.5), f && (e.s = 1), p = _(e)) : (c = Math.abs(+J(e)), p = c % 2), m = new z(E);;) {
|
|
339
362
|
if (p) {
|
|
340
363
|
if (m = m.times(h), !m.c) break;
|
|
341
364
|
l ? m.c.length > l && (m.c.length = l) : s && (m = m.mod(t));
|
|
@@ -343,47 +366,47 @@ function d(e) {
|
|
|
343
366
|
if (c) {
|
|
344
367
|
if (c = r(c / 2), c === 0) break;
|
|
345
368
|
p = c % 2;
|
|
346
|
-
} else if (e = e.times(a),
|
|
369
|
+
} else if (e = e.times(a), q(e, e.e + 1, 1), e.e > 14) p = _(e);
|
|
347
370
|
else {
|
|
348
|
-
if (c = +
|
|
371
|
+
if (c = +J(e), c === 0) break;
|
|
349
372
|
p = c % 2;
|
|
350
373
|
}
|
|
351
374
|
h = h.times(h), l ? h.c && h.c.length > l && (h.c.length = l) : s && (h = h.mod(t));
|
|
352
375
|
}
|
|
353
|
-
return s ? m : (f && (m =
|
|
354
|
-
},
|
|
355
|
-
var t = new
|
|
356
|
-
return e == null ?
|
|
357
|
-
},
|
|
358
|
-
return m(this, new
|
|
359
|
-
},
|
|
376
|
+
return s ? m : (f && (m = E.div(m)), t ? m.mod(t) : l ? q(m, I, O, u) : m);
|
|
377
|
+
}, T.integerValue = function(e) {
|
|
378
|
+
var t = new z(this);
|
|
379
|
+
return q(t, t.e + 1, e == null ? O : h(e, 0, 8));
|
|
380
|
+
}, T.isEqualTo = T.eq = function(e, t) {
|
|
381
|
+
return m(this, new z(e, t)) === 0;
|
|
382
|
+
}, T.isFinite = function() {
|
|
360
383
|
return !!this.c;
|
|
361
|
-
},
|
|
362
|
-
return m(this, new
|
|
363
|
-
},
|
|
364
|
-
return (t = m(this, new
|
|
365
|
-
},
|
|
384
|
+
}, T.isGreaterThan = T.gt = function(e, t) {
|
|
385
|
+
return m(this, new z(e, t)) > 0;
|
|
386
|
+
}, T.isGreaterThanOrEqualTo = T.gte = function(e, t) {
|
|
387
|
+
return (t = m(this, new z(e, t))) === 1 || t === 0;
|
|
388
|
+
}, T.isInteger = function() {
|
|
366
389
|
return !!this.c && f(this.e / o) > this.c.length - 2;
|
|
367
|
-
},
|
|
368
|
-
return m(this, new
|
|
369
|
-
},
|
|
370
|
-
return (t = m(this, new
|
|
371
|
-
},
|
|
390
|
+
}, T.isLessThan = T.lt = function(e, t) {
|
|
391
|
+
return m(this, new z(e, t)) < 0;
|
|
392
|
+
}, T.isLessThanOrEqualTo = T.lte = function(e, t) {
|
|
393
|
+
return (t = m(this, new z(e, t))) === -1 || t === 0;
|
|
394
|
+
}, T.isNaN = function() {
|
|
372
395
|
return !this.s;
|
|
373
|
-
},
|
|
396
|
+
}, T.isNegative = function() {
|
|
374
397
|
return this.s < 0;
|
|
375
|
-
},
|
|
398
|
+
}, T.isPositive = function() {
|
|
376
399
|
return this.s > 0;
|
|
377
|
-
},
|
|
400
|
+
}, T.isZero = function() {
|
|
378
401
|
return !!this.c && this.c[0] == 0;
|
|
379
|
-
},
|
|
402
|
+
}, T.minus = function(e, t) {
|
|
380
403
|
var n, r, i, s, c = this, l = c.s;
|
|
381
|
-
if (e = new
|
|
404
|
+
if (e = new z(e, t), t = e.s, !l || !t) return new z(NaN);
|
|
382
405
|
if (l != t) return e.s = -t, c.plus(e);
|
|
383
406
|
var u = c.e / o, d = e.e / o, p = c.c, m = e.c;
|
|
384
407
|
if (!u || !d) {
|
|
385
|
-
if (!p || !m) return p ? (e.s = -t, e) : new
|
|
386
|
-
if (!p[0] || !m[0]) return m[0] ? (e.s = -t, e) : new
|
|
408
|
+
if (!p || !m) return p ? (e.s = -t, e) : new z(m ? c : NaN);
|
|
409
|
+
if (!p[0] || !m[0]) return m[0] ? (e.s = -t, e) : new z(p[0] ? c : O == 3 ? -0 : 0);
|
|
387
410
|
}
|
|
388
411
|
if (u = f(u), d = f(d), p = p.slice(), l = u - d) {
|
|
389
412
|
for ((s = l < 0) ? (l = -l, i = p) : (d = u, i = m), i.reverse(), t = l; t--; i.push(0));
|
|
@@ -401,104 +424,114 @@ function d(e) {
|
|
|
401
424
|
p[r] -= m[r];
|
|
402
425
|
}
|
|
403
426
|
for (; p[0] == 0; p.splice(0, 1), --d);
|
|
404
|
-
return p[0] ?
|
|
405
|
-
},
|
|
427
|
+
return p[0] ? G(e, p, d) : (e.s = O == 3 ? -1 : 1, e.c = [e.e = 0], e);
|
|
428
|
+
}, T.modulo = T.mod = function(e, t) {
|
|
406
429
|
var n, r, i = this;
|
|
407
|
-
return e = new
|
|
408
|
-
},
|
|
409
|
-
var n, r, i, s, c, u, d, p, m, h, g, _, v, y, b, x = this, S = x.c, C = (e = new
|
|
430
|
+
return e = new z(e, t), !i.c || !e.s || e.c && !e.c[0] ? new z(NaN) : !e.c || i.c && !i.c[0] ? new z(i) : (F == 9 ? (r = e.s, e.s = 1, n = b(i, e, 0, 3), e.s = r, n.s *= r) : n = b(i, e, 0, F), e = i.minus(n.times(e)), !e.c[0] && F == 1 && (e.s = i.s), e);
|
|
431
|
+
}, T.multipliedBy = T.times = function(e, t) {
|
|
432
|
+
var n, r, i, s, c, u, d, p, m, h, g, _, v, y, b, x = this, S = x.c, C = (e = new z(e, t)).c;
|
|
410
433
|
if (!S || !C || !S[0] || !C[0]) return !x.s || !e.s || S && !S[0] && !C || C && !C[0] && !S ? e.c = e.e = e.s = null : (e.s *= x.s, !S || !C ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
|
|
411
434
|
for (r = f(x.e / o) + f(e.e / o), e.s *= x.s, d = S.length, h = C.length, d < h && (v = S, S = C, C = v, i = d, d = h, h = i), i = d + h, v = []; i--; v.push(0));
|
|
412
435
|
for (y = a, b = l, i = h; --i >= 0;) {
|
|
413
436
|
for (n = 0, g = C[i] % b, _ = C[i] / b | 0, c = d, s = i + c; s > i;) p = S[--c] % b, m = S[c] / b | 0, u = _ * p + m * g, p = g * p + u % b * b + v[s] + n, n = (p / y | 0) + (u / b | 0) + _ * m, v[s--] = p % y;
|
|
414
437
|
v[s] = n;
|
|
415
438
|
}
|
|
416
|
-
return n ? ++r : v.splice(0, 1),
|
|
417
|
-
},
|
|
418
|
-
var e = new
|
|
439
|
+
return n ? ++r : v.splice(0, 1), G(e, v, r);
|
|
440
|
+
}, T.negated = function() {
|
|
441
|
+
var e = new z(this);
|
|
419
442
|
return e.s = -e.s || null, e;
|
|
420
|
-
},
|
|
443
|
+
}, T.plus = function(e, t) {
|
|
421
444
|
var n, r = this, i = r.s;
|
|
422
|
-
if (e = new
|
|
445
|
+
if (e = new z(e, t), t = e.s, !i || !t) return new z(NaN);
|
|
423
446
|
if (i != t) return e.s = -t, r.minus(e);
|
|
424
447
|
var s = r.e / o, c = e.e / o, l = r.c, u = e.c;
|
|
425
448
|
if (!s || !c) {
|
|
426
|
-
if (!l || !u) return new
|
|
427
|
-
if (!l[0] || !u[0]) return u[0] ? e : new
|
|
449
|
+
if (!l || !u) return new z(i / 0);
|
|
450
|
+
if (!l[0] || !u[0]) return u[0] ? e : new z(l[0] ? r : i * 0);
|
|
428
451
|
}
|
|
429
452
|
if (s = f(s), c = f(c), l = l.slice(), i = s - c) {
|
|
430
453
|
for (i > 0 ? (c = s, n = u) : (i = -i, n = l), n.reverse(); i--; n.push(0));
|
|
431
454
|
n.reverse();
|
|
432
455
|
}
|
|
433
456
|
for (i = l.length, t = u.length, i - t < 0 && (n = u, u = l, l = n, t = i), i = 0; t;) i = (l[--t] = l[t] + u[t] + i) / a | 0, l[t] = a === l[t] ? 0 : l[t] % a;
|
|
434
|
-
return i && (l = [i].concat(l), ++c),
|
|
435
|
-
},
|
|
457
|
+
return i && (l = [i].concat(l), ++c), G(e, l, c);
|
|
458
|
+
}, T.precision = T.sd = function(e, t) {
|
|
436
459
|
var n, r, i, a = this;
|
|
437
|
-
if (e != null && e !== !!e) return h(e, 1, u), t == null ?
|
|
460
|
+
if (e != null && e !== !!e) return q(new z(a), h(e, 1, u), t == null ? O : h(t, 0, 8));
|
|
438
461
|
if (!(n = a.c)) return null;
|
|
439
462
|
if (i = n.length - 1, r = i * o + 1, i = n[i]) {
|
|
440
463
|
for (; i % 10 == 0; i /= 10, r--);
|
|
441
464
|
for (i = n[0]; i >= 10; i /= 10, r++);
|
|
442
465
|
}
|
|
443
466
|
return e && a.e + 1 > r && (r = a.e + 1), r;
|
|
444
|
-
},
|
|
445
|
-
return
|
|
446
|
-
},
|
|
447
|
-
var e, t, n, r, i, a = this, o = a.c, s = a.s, c = a.e, l =
|
|
448
|
-
if (s !== 1 || !o || !o[0]) return new
|
|
449
|
-
if (s = Math.sqrt(+
|
|
450
|
-
for (c = n.e, s = c + l, s < 3 && (s = 0);;) if (i = n, n = u.times(i.plus(
|
|
451
|
-
if (!r && (
|
|
467
|
+
}, T.shiftedBy = function(e) {
|
|
468
|
+
return this.times("1e" + h(e, -s, s));
|
|
469
|
+
}, T.squareRoot = T.sqrt = function() {
|
|
470
|
+
var e, t, n, r, i, a = this, o = a.c, s = a.s, c = a.e, l = D + 4, u = new z("0.5");
|
|
471
|
+
if (s !== 1 || !o || !o[0]) return new z(!s || s < 0 && (!o || o[0]) ? NaN : o ? a : Infinity);
|
|
472
|
+
if (s = Math.sqrt(+J(a)), s == 0 || s == Infinity ? (t = p(o), (t.length + c) % 2 == 0 && (t += "0"), s = Math.sqrt(+t), c = f((c + 1) / 2) - (c < 0 || c % 2), s == Infinity ? t = "5e" + c : (t = s.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + c), n = new z(t)) : n = new z(s + ""), n.c[0]) {
|
|
473
|
+
for (c = n.e, s = c + l, s < 3 && (s = 0);;) if (i = n, n = u.times(i.plus(b(a, i, l, 1))), p(i.c).slice(0, s) === (t = p(n.c)).slice(0, s)) if (n.e < c && --s, t = t.slice(s - 3, s + 1), t == "9999" || !r && t == "4999") {
|
|
474
|
+
if (!r && (q(i, i.e + D + 2, 0), i.times(i).eq(a))) {
|
|
452
475
|
n = i;
|
|
453
476
|
break;
|
|
454
477
|
}
|
|
455
478
|
l += 4, s += 4, r = 1;
|
|
456
479
|
} else {
|
|
457
|
-
(!+t || !+t.slice(1) && t.charAt(0) == "5") && (
|
|
480
|
+
(!+t || !+t.slice(1) && t.charAt(0) == "5") && (q(n, n.e + D + 2, 1), e = !n.times(n).eq(a));
|
|
458
481
|
break;
|
|
459
482
|
}
|
|
460
483
|
}
|
|
461
|
-
return
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
484
|
+
return q(n, n.e + D + 1, O, e);
|
|
485
|
+
}, typeof BigInt == "function" && (T.toBigInt = function(e) {
|
|
486
|
+
var t = this;
|
|
487
|
+
return t.c ? BigInt(H(t, t.e + 1, e)) : null;
|
|
488
|
+
}), T.toExponential = function(e, t) {
|
|
489
|
+
return H(this, e == null ? e : h(e, 0, u) + 1, t, 1);
|
|
490
|
+
}, T.toFixed = function(e, t) {
|
|
491
|
+
return H(this, e == null ? e : h(e, -u, u) + this.e + 1, t);
|
|
492
|
+
}, T.toFormat = function(e, t, n) {
|
|
493
|
+
var r, a, o, s = this;
|
|
494
|
+
if (n == null) n = L, e != null && (t == null ? typeof e == "object" && !g(e) && (n = K(e), e = t = null) : typeof t == "object" && (n = K(t), t = null));
|
|
469
495
|
else if (typeof n != "object") throw Error(i + "Argument not an object: " + n);
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
if (
|
|
473
|
-
|
|
474
|
-
|
|
496
|
+
else n = K(n);
|
|
497
|
+
if (e != null) if (g(e) && e.length <= 2) {
|
|
498
|
+
if (r = e[0], a = e[1], e = s.dp(), a != null && e > h(a, 0, u) && (e = a), r != null && h(r, 0, u) !== 0) {
|
|
499
|
+
if (a != null && r > a) throw Error(i + "Minimum must not exceed maximum");
|
|
500
|
+
e < r && (e = r);
|
|
475
501
|
}
|
|
476
|
-
|
|
502
|
+
} else h(e, -u, u);
|
|
503
|
+
if (o = s.toFixed(e, t), s.s < 0 && (o = o.slice(1)), s.c) {
|
|
504
|
+
var c, l = o.split("."), d = +n.groupSize, f = +n.secondaryGroupSize, p = n.groupSeparator || "", m = l[0], _ = l[1], v = m.length;
|
|
505
|
+
if (f && (c = d, d = f, f = c, v -= c), d > 0 && v > 0) {
|
|
506
|
+
for (c = v % d || d, o = m.substr(0, c); c < v; c += d) o += p + m.substr(c, d);
|
|
507
|
+
f > 0 && (o += p + m.slice(c));
|
|
508
|
+
}
|
|
509
|
+
_ && (c = +n.fractionGroupSize, c && (_ = _.replace(RegExp("\\d{" + c + "}\\B", "g"), "$&" + (n.fractionGroupSeparator || ""))), o += (n.decimalSeparator || "") + _);
|
|
477
510
|
}
|
|
478
|
-
return (n.prefix || "") +
|
|
479
|
-
},
|
|
511
|
+
return (n.prefix || "") + (s.s < 0 ? n.negativeSign || "" : s.s > 0 && n.positiveSign || "") + o + (n.suffix || "");
|
|
512
|
+
}, T.toFraction = function(e) {
|
|
480
513
|
var t, n, r, a, s, l, u, d, f, m, h, g, _ = this, v = _.c;
|
|
481
|
-
if (e != null && (u = new
|
|
482
|
-
if (!v) return [new
|
|
483
|
-
for (t = new
|
|
484
|
-
return a =
|
|
485
|
-
},
|
|
486
|
-
return +
|
|
487
|
-
},
|
|
514
|
+
if (e != null && (u = new z(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(E))) throw Error(i + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + J(u));
|
|
515
|
+
if (!v) return [new z(_.s || 0), new z(0)];
|
|
516
|
+
for (t = new z(E), f = n = new z(E), r = d = new z(E), g = p(v), s = t.e = g.length - _.e - 1, t.c[0] = c[(l = s % o) < 0 ? o + l : l], e = !e || u.comparedTo(t) > 0 ? s > 0 ? t : f : u, l = M, M = Infinity, u = new z(g), d.c[0] = 0; m = b(u, t, 0, 1), a = n.plus(m.times(r)), a.comparedTo(e) != 1;) n = r, r = a, f = d.plus(m.times(a = f)), d = a, t = u.minus(m.times(a = t)), u = a;
|
|
517
|
+
return a = b(e.minus(n), r, 0, 1), d = d.plus(a.times(f)), n = n.plus(a.times(r)), d.s = f.s = _.s, s *= 2, h = b(f, r, s, O).minus(_).abs().comparedTo(b(d, n, s, O).minus(_).abs()) < 1 ? [f, r] : [d, n], M = l, h;
|
|
518
|
+
}, T.toNumber = function() {
|
|
519
|
+
return +J(this);
|
|
520
|
+
}, T.toObject = function() {
|
|
488
521
|
var e = this;
|
|
489
522
|
return {
|
|
490
523
|
c: e.c ? e.c.slice() : null,
|
|
491
524
|
e: e.e,
|
|
492
525
|
s: e.s
|
|
493
526
|
};
|
|
494
|
-
},
|
|
495
|
-
return e
|
|
496
|
-
},
|
|
527
|
+
}, T.toPrecision = function(e, t) {
|
|
528
|
+
return H(this, e == null ? e : h(e, 1, u), t, 2);
|
|
529
|
+
}, T.toString = function(e) {
|
|
497
530
|
var t, n = this, r = n.s, i = n.e;
|
|
498
|
-
return i === null ? r ? (t = "Infinity", r < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = i <=
|
|
499
|
-
},
|
|
500
|
-
return
|
|
501
|
-
},
|
|
531
|
+
return i === null ? r ? (t = "Infinity", r < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = i <= k || i >= A ? v(p(n.c), i) : y(p(n.c), i, "0") : (h(e, 2, R.length, "Base"), t = x(y(p(n.c), i, "0"), 10, e, r, !0)), r < 0 && n.c[0] && (t = "-" + t)), t;
|
|
532
|
+
}, T.valueOf = T.toJSON = function() {
|
|
533
|
+
return J(this);
|
|
534
|
+
}, T._isBigNumber = !0, e != null && z.set(e), z;
|
|
502
535
|
}
|
|
503
536
|
function f(e) {
|
|
504
537
|
var t = e | 0;
|
|
@@ -524,15 +557,19 @@ function m(e, t) {
|
|
|
524
557
|
}
|
|
525
558
|
function h(e, t, n, a) {
|
|
526
559
|
if (e < t || e > n || e !== r(e)) throw Error(i + (a || "Argument") + (typeof e == "number" ? e < t || e > n ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
560
|
+
return e;
|
|
527
561
|
}
|
|
528
562
|
function g(e) {
|
|
563
|
+
return {}.toString.call(e) == "[object Array]";
|
|
564
|
+
}
|
|
565
|
+
function _(e) {
|
|
529
566
|
var t = e.c.length - 1;
|
|
530
567
|
return f(e.e / o) == t && e.c[t] % 2 != 0;
|
|
531
568
|
}
|
|
532
|
-
function
|
|
569
|
+
function v(e, t) {
|
|
533
570
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
|
|
534
571
|
}
|
|
535
|
-
function
|
|
572
|
+
function y(e, t, n) {
|
|
536
573
|
var r, i;
|
|
537
574
|
if (t < 0) {
|
|
538
575
|
for (i = n + "."; ++t; i += n);
|
|
@@ -545,88 +582,88 @@ function v(e, t, n) {
|
|
|
545
582
|
}
|
|
546
583
|
//#endregion
|
|
547
584
|
//#region src/utils/math.ts
|
|
548
|
-
var
|
|
549
|
-
function
|
|
550
|
-
if (
|
|
585
|
+
var b = e.ROUND_DOWN, x = e.ROUND_UP, S = e;
|
|
586
|
+
function C(t) {
|
|
587
|
+
if (w(t)) return e(~~t);
|
|
551
588
|
if (!t) return e(0);
|
|
552
|
-
if (
|
|
589
|
+
if (T(t)) return t.isNaN() ? e(0) : t;
|
|
553
590
|
let n = e(t);
|
|
554
591
|
return n.isNaN() ? e(0) : n;
|
|
555
592
|
}
|
|
556
|
-
function
|
|
593
|
+
function w(e) {
|
|
557
594
|
return typeof e == "boolean";
|
|
558
595
|
}
|
|
559
|
-
function
|
|
596
|
+
function T(t) {
|
|
560
597
|
return e.isBigNumber(t);
|
|
561
598
|
}
|
|
562
|
-
function
|
|
563
|
-
return typeof e == "number" && !
|
|
599
|
+
function E(e) {
|
|
600
|
+
return typeof e == "number" && !D(e);
|
|
564
601
|
}
|
|
565
|
-
function
|
|
602
|
+
function D(t) {
|
|
566
603
|
return t == null || t == null ? !1 : e(t).isNaN();
|
|
567
604
|
}
|
|
568
|
-
function
|
|
605
|
+
function O(t) {
|
|
569
606
|
return t == null || t == null ? !1 : e(t).isInteger();
|
|
570
607
|
}
|
|
571
|
-
function O(e, t) {
|
|
572
|
-
return S(e).isGreaterThan(S(t));
|
|
573
|
-
}
|
|
574
608
|
function k(e, t) {
|
|
575
|
-
return
|
|
609
|
+
return C(e).isGreaterThan(C(t));
|
|
576
610
|
}
|
|
577
611
|
function A(e, t) {
|
|
578
|
-
return
|
|
612
|
+
return C(e).isLessThan(C(t));
|
|
579
613
|
}
|
|
580
614
|
function j(e, t) {
|
|
581
|
-
return
|
|
615
|
+
return C(e).isEqualTo(C(t));
|
|
582
616
|
}
|
|
583
617
|
function M(e, t) {
|
|
584
|
-
return
|
|
618
|
+
return C(e).isGreaterThanOrEqualTo(C(t));
|
|
585
619
|
}
|
|
586
|
-
function N(e) {
|
|
587
|
-
return
|
|
620
|
+
function N(e, t) {
|
|
621
|
+
return C(e).isLessThanOrEqualTo(C(t));
|
|
588
622
|
}
|
|
589
623
|
function P(e) {
|
|
590
|
-
return
|
|
624
|
+
return C(e);
|
|
591
625
|
}
|
|
592
|
-
function F(e
|
|
593
|
-
return
|
|
626
|
+
function F(e) {
|
|
627
|
+
return C(e).toNumber();
|
|
594
628
|
}
|
|
595
|
-
function I(e) {
|
|
596
|
-
return
|
|
629
|
+
function I(e, t = !1) {
|
|
630
|
+
return F(C(e).integerValue(t ? x : b));
|
|
597
631
|
}
|
|
598
|
-
function L(e
|
|
599
|
-
|
|
600
|
-
return P(t === void 0 ? r : r.decimalPlaces(t, n ? b : y));
|
|
632
|
+
function L(e) {
|
|
633
|
+
return C(e).toString();
|
|
601
634
|
}
|
|
602
|
-
function R(e) {
|
|
603
|
-
|
|
635
|
+
function R(e, t, n = !1) {
|
|
636
|
+
let r = C(e);
|
|
637
|
+
return F(t === void 0 ? r : r.decimalPlaces(t, n ? x : b));
|
|
604
638
|
}
|
|
605
|
-
function z(
|
|
606
|
-
return
|
|
639
|
+
function z(e) {
|
|
640
|
+
return C(e).toFormat();
|
|
607
641
|
}
|
|
608
642
|
function B(...e) {
|
|
609
|
-
return e.length === 0 ? 0 :
|
|
643
|
+
return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).plus(C(t)), 0));
|
|
610
644
|
}
|
|
611
645
|
function V(...e) {
|
|
612
|
-
return e.length === 0 ? 0 :
|
|
646
|
+
return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).minus(C(t))));
|
|
613
647
|
}
|
|
614
648
|
function H(...e) {
|
|
649
|
+
return e.length === 0 ? 0 : F(e.reduce((e, t) => C(e).times(C(t)), 1));
|
|
650
|
+
}
|
|
651
|
+
function U(...e) {
|
|
615
652
|
if (e.length === 0) return 0;
|
|
616
|
-
let t = e.map((e) =>
|
|
653
|
+
let t = e.map((e) => P(e));
|
|
617
654
|
return t.some((e) => e.isZero()) ? 0 : t.reduce((e, t) => e.dividedBy(t)).toNumber();
|
|
618
655
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
656
|
+
function W(e, t) {
|
|
657
|
+
return F(C(e).pow(C(t)));
|
|
621
658
|
}
|
|
622
|
-
function
|
|
623
|
-
let n =
|
|
624
|
-
return `${
|
|
659
|
+
function G(e, t = "%") {
|
|
660
|
+
let n = C(e).times(100);
|
|
661
|
+
return `${k(n, 0) ? R(n, 2) : 0}${t}`;
|
|
625
662
|
}
|
|
626
|
-
function
|
|
627
|
-
let t =
|
|
628
|
-
return
|
|
663
|
+
function K(e) {
|
|
664
|
+
let t = C(e).div(100);
|
|
665
|
+
return k(t, 0) ? R(t, 4) : 0;
|
|
629
666
|
}
|
|
630
|
-
var
|
|
667
|
+
var q = k, J = M, Y = A, X = N, Z = j, Q = D;
|
|
631
668
|
//#endregion
|
|
632
|
-
export {
|
|
669
|
+
export { z as A, X as C, P as D, V as E, L as M, K as N, R as O, Y as S, W as T, A as _, U as a, D as b, q as c, T as d, w as f, O as g, M as h, B as i, F as j, I as k, J as l, k as m, b as n, Z as o, j as p, x as r, G as s, S as t, C as u, N as v, H as w, E as x, Q as y };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { is as ee, isArray as e, isBoolean as te, isClient as ne, isDate as re, isDef as t, isEdgeBrowser as n, isElement as r, isEmail as i, isEmpty as a, isFunction as o, isHtmlStr as s, isInMobileBrowser as c, isIp as l, isMap as u, isNull as d, isNullAndUnDef as f, isNullOrUnDef as p, isNumber as m, isObject as h, isPromise as g, isPromiseLink as _, isRegExp as v, isServer as y, isString as b, isUnDef as x, isUrl as S, isValidPhoneNumber as C, isWindow as w, isZhLang as T } from "./utils/is.js";
|
|
2
|
-
import { A as E, C as D, D as O, E as k, M as A, N as j, O as M, S as N, T as P, _ as F, a as I, b as L, c as R, d as z, f as B, g as V, h as H, i as U, j as W, k as G, l as K, m as q, n as J, o as Y, p as X, r as ie, s as ae, t as oe, u as se, v as ce, w as le, x as ue, y as de } from "./chunks/math-
|
|
2
|
+
import { A as E, C as D, D as O, E as k, M as A, N as j, O as M, S as N, T as P, _ as F, a as I, b as L, c as R, d as z, f as B, g as V, h as H, i as U, j as W, k as G, l as K, m as q, n as J, o as Y, p as X, r as ie, s as ae, t as oe, u as se, v as ce, w as le, x as ue, y as de } from "./chunks/math-Xp7OBfoD.js";
|
|
3
3
|
import { propTypes as fe } from "./utils/vuePropTypes.js";
|
|
4
4
|
import { timeZoneOptions as pe } from "./utils/timeZone.js";
|
|
5
5
|
import { withInstall as me } from "./utils/withInstall.js";
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../chunks/chunk-cBPL4W67.js";
|
|
2
2
|
import { is as t, isArray as n, isBoolean as r, isClient as i, isDate as a, isDef as o, isEdgeBrowser as s, isElement as c, isEmail as l, isEmpty as u, isFunction as d, isHtmlStr as f, isInMobileBrowser as p, isIp as ee, isMap as te, isNull as ne, isNullAndUnDef as m, isNullOrUnDef as h, isNumber as g, isObject as _, isPromise as v, isPromiseLink as y, isRegExp as b, isServer as x, isString as S, isUnDef as C, isUrl as w, isValidPhoneNumber as T, isWindow as E, isZhLang as D } from "./is.js";
|
|
3
|
-
import { A as O, C as k, D as A, E as j, M, N, O as P, S as F, T as I, _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, j as K, k as q, l as J, m as Y, n as re, o as X, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe } from "../chunks/math-
|
|
3
|
+
import { A as O, C as k, D as A, E as j, M, N, O as P, S as F, T as I, _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, j as K, k as q, l as J, m as Y, n as re, o as X, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe } from "../chunks/math-Xp7OBfoD.js";
|
|
4
4
|
import { propTypes as pe } from "./vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as me } from "./timeZone.js";
|
|
6
6
|
import { withInstall as he } from "./withInstall.js";
|
package/dist/utils/math.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "../chunks/math-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, c as f, d as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, v as k, w as A, x as j, y as M } from "../chunks/math-Xp7OBfoD.js";
|
|
2
2
|
export { D as BigNumber, S as DOWN, T as UP, _ as add, u as divide, C as eq, E as formatRate, f as gt, b as gte, O as helper, p as isBigNum, m as isBool, w as isEqualTo, x as isGreaterThan, g as isGreaterThanOrEqualTo, h as isInt, l as isLessThan, k as isLessThanOrEqualTo, M as isNan, d as isNanValue, j as isNum, s as lt, t as lte, A as multiply, c as power, r as subtract, n as toBigNum, o as toDecimalPlaces, y as toInt, e as toLocaleString, v as toNum, i as toString, a as unFormatRate };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jk-vue-comps",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "jk-vue-comps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"lint:all": "pnpm lint:fmt && pnpm lint:ox"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"bignumber.js": "11.
|
|
34
|
-
"vue": "3.5.
|
|
33
|
+
"bignumber.js": "11.1.1",
|
|
34
|
+
"vue": "3.5.34",
|
|
35
35
|
"vue-types": "6.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "22.18.0",
|
|
39
39
|
"@vitejs/plugin-vue": "6.0.6",
|
|
40
40
|
"@vitejs/plugin-vue-jsx": "5.1.5",
|
|
41
|
-
"oxfmt": "^0.
|
|
42
|
-
"oxlint": "^1.
|
|
41
|
+
"oxfmt": "^0.48.0",
|
|
42
|
+
"oxlint": "^1.63.0",
|
|
43
43
|
"typescript": "6.0.3",
|
|
44
44
|
"vite": "8.0.10",
|
|
45
|
-
"vite-plugin-dts": "^
|
|
45
|
+
"vite-plugin-dts": "^5.0.0",
|
|
46
46
|
"rimraf": "^6.1.3",
|
|
47
|
-
"vue-tsc": "^3.2.
|
|
47
|
+
"vue-tsc": "^3.2.8"
|
|
48
48
|
}
|
|
49
49
|
}
|