lakutata 2.0.42 → 2.0.43
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/helper.cjs +98 -1408
- package/helper.d.ts +6 -1
- package/helper.mjs +3 -1315
- package/package.json +1 -1
- package/src/lib/helpers/BigNumber.cjs +1353 -0
- package/src/lib/helpers/BigNumber.mjs +1323 -0
- package/vendor/Package.19.cjs +55 -60
- package/vendor/Package.19.mjs +270 -291
package/helper.cjs
CHANGED
|
@@ -10,103 +10,105 @@ const e = require("./src/lib/helpers/ArrayToSet.cjs");
|
|
|
10
10
|
|
|
11
11
|
const r = require("./src/lib/helpers/As.cjs");
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const s = require("./src/lib/helpers/Delay.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const t = require("./src/lib/helpers/DevNull.cjs");
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const o = require("./src/lib/helpers/GetObjectNestingDepth.cjs");
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const c = require("./src/lib/helpers/GetObjectPropertyPaths.cjs");
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const i = require("./src/lib/helpers/GraceExit.cjs");
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const n = require("./src/lib/helpers/IsEmptyObject.cjs");
|
|
24
24
|
|
|
25
25
|
const l = require("./src/lib/helpers/IsExists.cjs");
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const p = require("./vendor/Package.9.cjs");
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const a = require("./src/lib/helpers/IsHtml.cjs");
|
|
30
30
|
|
|
31
|
-
const
|
|
31
|
+
const u = require("./src/lib/helpers/IsNativeFunction.cjs");
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const b = require("./src/lib/helpers/IsPromise.cjs");
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const j = require("./src/lib/helpers/IsPromiseLike.cjs");
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const q = require("./vendor/Package.2.cjs");
|
|
38
38
|
|
|
39
|
-
const
|
|
39
|
+
const x = require("./src/lib/helpers/IsXML.cjs");
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const h = require("./src/lib/helpers/NoCase.cjs");
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const g = require("./src/lib/helpers/ObjectConstructor.cjs");
|
|
44
44
|
|
|
45
|
-
const
|
|
45
|
+
const d = require("./src/lib/helpers/ObjectHash.cjs");
|
|
46
46
|
|
|
47
|
-
const
|
|
47
|
+
const I = require("./src/lib/helpers/ObjectParentConstructor.cjs");
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const S = require("./src/lib/helpers/ObjectParentConstructors.cjs");
|
|
50
50
|
|
|
51
|
-
const
|
|
51
|
+
const y = require("./src/lib/helpers/ObjectPrototype.cjs");
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
const P = require("./src/lib/helpers/SetToArray.cjs");
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const T = require("./src/lib/helpers/Templating.cjs");
|
|
56
56
|
|
|
57
|
-
const
|
|
57
|
+
const E = require("./src/lib/helpers/UniqueArray.cjs");
|
|
58
58
|
|
|
59
|
-
const
|
|
59
|
+
const v = require("./src/lib/helpers/ObjectToMap.cjs");
|
|
60
60
|
|
|
61
|
-
const
|
|
61
|
+
const A = require("./src/lib/helpers/IsPath.cjs");
|
|
62
62
|
|
|
63
|
-
const
|
|
63
|
+
const O = require("./src/lib/helpers/ConvertArrayLikeToIterable.cjs");
|
|
64
64
|
|
|
65
|
-
const
|
|
65
|
+
const m = require("./src/lib/helpers/ConvertArrayLikeToStream.cjs");
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const H = require("./src/lib/helpers/MergeSet.cjs");
|
|
68
68
|
|
|
69
|
-
const
|
|
69
|
+
const M = require("./src/lib/helpers/MergeArray.cjs");
|
|
70
70
|
|
|
71
|
-
const
|
|
71
|
+
const k = require("./src/lib/helpers/MergeMap.cjs");
|
|
72
72
|
|
|
73
|
-
const
|
|
73
|
+
const C = require("./src/lib/helpers/SortArray.cjs");
|
|
74
74
|
|
|
75
75
|
const L = require("./src/lib/helpers/SortKeys.cjs");
|
|
76
76
|
|
|
77
|
-
const
|
|
77
|
+
const N = require("./src/lib/helpers/SortObject.cjs");
|
|
78
78
|
|
|
79
79
|
const D = require("./src/lib/helpers/RandomString.cjs");
|
|
80
80
|
|
|
81
|
-
const
|
|
81
|
+
const G = require("./src/lib/helpers/NonceStr.cjs");
|
|
82
82
|
|
|
83
|
-
const
|
|
83
|
+
const U = require("./src/lib/helpers/IsAbortError.cjs");
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const B = require("./src/lib/helpers/Glob.cjs");
|
|
86
86
|
|
|
87
87
|
const R = require("./src/lib/helpers/IPToolkit.cjs");
|
|
88
88
|
|
|
89
|
-
const
|
|
89
|
+
const f = require("./src/lib/helpers/HexToUnsigned.cjs");
|
|
90
90
|
|
|
91
|
-
const
|
|
91
|
+
const V = require("./src/lib/helpers/UnsignedToHex.cjs");
|
|
92
92
|
|
|
93
|
-
const
|
|
93
|
+
const K = require("./src/lib/helpers/HexToSigned.cjs");
|
|
94
94
|
|
|
95
|
-
const
|
|
95
|
+
const w = require("./src/lib/helpers/SignedToHex.cjs");
|
|
96
96
|
|
|
97
|
-
const
|
|
97
|
+
const F = require("./src/lib/helpers/HexToIEEE754.cjs");
|
|
98
98
|
|
|
99
|
-
const
|
|
99
|
+
const X = require("./src/lib/helpers/IEEE754ToHex.cjs");
|
|
100
100
|
|
|
101
|
-
const
|
|
101
|
+
const W = require("./src/lib/helpers/MD5.cjs");
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const _ = require("./src/lib/helpers/SHA1.cjs");
|
|
104
104
|
|
|
105
|
-
const
|
|
105
|
+
const z = require("./src/lib/helpers/SHA256.cjs");
|
|
106
106
|
|
|
107
|
-
const
|
|
107
|
+
const J = require("./src/lib/helpers/URLBuilder.cjs");
|
|
108
108
|
|
|
109
|
-
const
|
|
109
|
+
const Q = require("./src/lib/helpers/Statistics.cjs");
|
|
110
|
+
|
|
111
|
+
const Y = require("./src/lib/helpers/BigNumber.cjs");
|
|
110
112
|
|
|
111
113
|
require("./vendor/Package.5.cjs");
|
|
112
114
|
|
|
@@ -174,1405 +176,93 @@ require("node:crypto");
|
|
|
174
176
|
|
|
175
177
|
require("./vendor/Package.16.cjs");
|
|
176
178
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
function le(e) {
|
|
180
|
-
var r, t, i, s = m.prototype = {
|
|
181
|
-
constructor: m,
|
|
182
|
-
toString: null,
|
|
183
|
-
valueOf: null
|
|
184
|
-
}, n = new m(1), o = 20, c = 4, l = -7, u = 21, f = -1e7, a = 1e7, p = false, h = 1, g = 0, b = {
|
|
185
|
-
prefix: "",
|
|
186
|
-
groupSize: 3,
|
|
187
|
-
secondaryGroupSize: 0,
|
|
188
|
-
groupSeparator: ",",
|
|
189
|
-
decimalSeparator: ".",
|
|
190
|
-
fractionGroupSize: 0,
|
|
191
|
-
fractionGroupSeparator: " ",
|
|
192
|
-
suffix: ""
|
|
193
|
-
}, d = "0123456789abcdefghijklmnopqrstuvwxyz", j = true;
|
|
194
|
-
function m(e, r) {
|
|
195
|
-
var s, n, l, u, p, h, g, b, x = this;
|
|
196
|
-
if (!(x instanceof m)) return new m(e, r);
|
|
197
|
-
if (r == null) {
|
|
198
|
-
if (e && e._isBigNumber === true) {
|
|
199
|
-
x.s = e.s;
|
|
200
|
-
if (!e.c || e.e > a) {
|
|
201
|
-
x.c = x.e = null;
|
|
202
|
-
} else if (e.e < f) {
|
|
203
|
-
x.c = [ x.e = 0 ];
|
|
204
|
-
} else {
|
|
205
|
-
x.e = e.e;
|
|
206
|
-
x.c = e.c.slice();
|
|
207
|
-
}
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
if ((h = typeof e == "number") && e * 0 == 0) {
|
|
211
|
-
x.s = 1 / e < 0 ? (e = -e, -1) : 1;
|
|
212
|
-
if (e === ~~e) {
|
|
213
|
-
for (u = 0, p = e; p >= 10; p /= 10, u++) ;
|
|
214
|
-
if (u > a) {
|
|
215
|
-
x.c = x.e = null;
|
|
216
|
-
} else {
|
|
217
|
-
x.e = u;
|
|
218
|
-
x.c = [ e ];
|
|
219
|
-
}
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
b = String(e);
|
|
223
|
-
} else {
|
|
224
|
-
if (!J.test(b = String(e))) return i(x, b, h);
|
|
225
|
-
x.s = b.charCodeAt(0) == 45 ? (b = b.slice(1), -1) : 1;
|
|
226
|
-
}
|
|
227
|
-
if ((u = b.indexOf(".")) > -1) b = b.replace(".", "");
|
|
228
|
-
if ((p = b.search(/e/i)) > 0) {
|
|
229
|
-
if (u < 0) u = p;
|
|
230
|
-
u += +b.slice(p + 1);
|
|
231
|
-
b = b.substring(0, p);
|
|
232
|
-
} else if (u < 0) {
|
|
233
|
-
u = b.length;
|
|
234
|
-
}
|
|
235
|
-
} else {
|
|
236
|
-
pe(r, 2, d.length, "Base");
|
|
237
|
-
if (r == 10 && j) {
|
|
238
|
-
x = new m(e);
|
|
239
|
-
return w(x, o + x.e + 1, c);
|
|
240
|
-
}
|
|
241
|
-
b = String(e);
|
|
242
|
-
if (h = typeof e == "number") {
|
|
243
|
-
if (e * 0 != 0) return i(x, b, h, r);
|
|
244
|
-
x.s = 1 / e < 0 ? (b = b.slice(1), -1) : 1;
|
|
245
|
-
if (m.DEBUG && b.replace(/^0\.0*|\./, "").length > 15) {
|
|
246
|
-
throw Error(re + e);
|
|
247
|
-
}
|
|
248
|
-
} else {
|
|
249
|
-
x.s = b.charCodeAt(0) === 45 ? (b = b.slice(1), -1) : 1;
|
|
250
|
-
}
|
|
251
|
-
s = d.slice(0, r);
|
|
252
|
-
u = p = 0;
|
|
253
|
-
for (g = b.length; p < g; p++) {
|
|
254
|
-
if (s.indexOf(n = b.charAt(p)) < 0) {
|
|
255
|
-
if (n == ".") {
|
|
256
|
-
if (p > u) {
|
|
257
|
-
u = g;
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
} else if (!l) {
|
|
261
|
-
if (b == b.toUpperCase() && (b = b.toLowerCase()) || b == b.toLowerCase() && (b = b.toUpperCase())) {
|
|
262
|
-
l = true;
|
|
263
|
-
p = -1;
|
|
264
|
-
u = 0;
|
|
265
|
-
continue;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
return i(x, String(e), h, r);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
h = false;
|
|
272
|
-
b = t(b, r, 10, x.s);
|
|
273
|
-
if ((u = b.indexOf(".")) > -1) b = b.replace(".", ""); else u = b.length;
|
|
274
|
-
}
|
|
275
|
-
for (p = 0; b.charCodeAt(p) === 48; p++) ;
|
|
276
|
-
for (g = b.length; b.charCodeAt(--g) === 48; ) ;
|
|
277
|
-
if (b = b.slice(p, ++g)) {
|
|
278
|
-
g -= p;
|
|
279
|
-
if (h && m.DEBUG && g > 15 && (e > se || e !== Q(e))) {
|
|
280
|
-
throw Error(re + x.s * e);
|
|
281
|
-
}
|
|
282
|
-
if ((u = u - p - 1) > a) {
|
|
283
|
-
x.c = x.e = null;
|
|
284
|
-
} else if (u < f) {
|
|
285
|
-
x.c = [ x.e = 0 ];
|
|
286
|
-
} else {
|
|
287
|
-
x.e = u;
|
|
288
|
-
x.c = [];
|
|
289
|
-
p = (u + 1) % ie;
|
|
290
|
-
if (u < 0) p += ie;
|
|
291
|
-
if (p < g) {
|
|
292
|
-
if (p) x.c.push(+b.slice(0, p));
|
|
293
|
-
for (g -= ie; p < g; ) {
|
|
294
|
-
x.c.push(+b.slice(p, p += ie));
|
|
295
|
-
}
|
|
296
|
-
p = ie - (b = b.slice(p)).length;
|
|
297
|
-
} else {
|
|
298
|
-
p -= g;
|
|
299
|
-
}
|
|
300
|
-
for (;p--; b += "0") ;
|
|
301
|
-
x.c.push(+b);
|
|
302
|
-
}
|
|
303
|
-
} else {
|
|
304
|
-
x.c = [ x.e = 0 ];
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
m.clone = le;
|
|
308
|
-
m.ROUND_UP = 0;
|
|
309
|
-
m.ROUND_DOWN = 1;
|
|
310
|
-
m.ROUND_CEIL = 2;
|
|
311
|
-
m.ROUND_FLOOR = 3;
|
|
312
|
-
m.ROUND_HALF_UP = 4;
|
|
313
|
-
m.ROUND_HALF_DOWN = 5;
|
|
314
|
-
m.ROUND_HALF_EVEN = 6;
|
|
315
|
-
m.ROUND_HALF_CEIL = 7;
|
|
316
|
-
m.ROUND_HALF_FLOOR = 8;
|
|
317
|
-
m.EUCLID = 9;
|
|
318
|
-
m.config = m.set = function(e) {
|
|
319
|
-
var r, t;
|
|
320
|
-
if (e != null) {
|
|
321
|
-
if (typeof e == "object") {
|
|
322
|
-
if (e.hasOwnProperty(r = "DECIMAL_PLACES")) {
|
|
323
|
-
t = e[r];
|
|
324
|
-
pe(t, 0, ce, r);
|
|
325
|
-
o = t;
|
|
326
|
-
}
|
|
327
|
-
if (e.hasOwnProperty(r = "ROUNDING_MODE")) {
|
|
328
|
-
t = e[r];
|
|
329
|
-
pe(t, 0, 8, r);
|
|
330
|
-
c = t;
|
|
331
|
-
}
|
|
332
|
-
if (e.hasOwnProperty(r = "EXPONENTIAL_AT")) {
|
|
333
|
-
t = e[r];
|
|
334
|
-
if (t && t.pop) {
|
|
335
|
-
pe(t[0], -ce, 0, r);
|
|
336
|
-
pe(t[1], 0, ce, r);
|
|
337
|
-
l = t[0];
|
|
338
|
-
u = t[1];
|
|
339
|
-
} else {
|
|
340
|
-
pe(t, -ce, ce, r);
|
|
341
|
-
l = -(u = t < 0 ? -t : t);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
if (e.hasOwnProperty(r = "RANGE")) {
|
|
345
|
-
t = e[r];
|
|
346
|
-
if (t && t.pop) {
|
|
347
|
-
pe(t[0], -ce, -1, r);
|
|
348
|
-
pe(t[1], 1, ce, r);
|
|
349
|
-
f = t[0];
|
|
350
|
-
a = t[1];
|
|
351
|
-
} else {
|
|
352
|
-
pe(t, -ce, ce, r);
|
|
353
|
-
if (t) {
|
|
354
|
-
f = -(a = t < 0 ? -t : t);
|
|
355
|
-
} else {
|
|
356
|
-
throw Error(ee + r + " cannot be zero: " + t);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (e.hasOwnProperty(r = "CRYPTO")) {
|
|
361
|
-
t = e[r];
|
|
362
|
-
if (t === !!t) {
|
|
363
|
-
if (t) {
|
|
364
|
-
if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
|
|
365
|
-
p = t;
|
|
366
|
-
} else {
|
|
367
|
-
p = !t;
|
|
368
|
-
throw Error(ee + "crypto unavailable");
|
|
369
|
-
}
|
|
370
|
-
} else {
|
|
371
|
-
p = t;
|
|
372
|
-
}
|
|
373
|
-
} else {
|
|
374
|
-
throw Error(ee + r + " not true or false: " + t);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
if (e.hasOwnProperty(r = "MODULO_MODE")) {
|
|
378
|
-
t = e[r];
|
|
379
|
-
pe(t, 0, 9, r);
|
|
380
|
-
h = t;
|
|
381
|
-
}
|
|
382
|
-
if (e.hasOwnProperty(r = "POW_PRECISION")) {
|
|
383
|
-
t = e[r];
|
|
384
|
-
pe(t, 0, ce, r);
|
|
385
|
-
g = t;
|
|
386
|
-
}
|
|
387
|
-
if (e.hasOwnProperty(r = "FORMAT")) {
|
|
388
|
-
t = e[r];
|
|
389
|
-
if (typeof t == "object") b = t; else throw Error(ee + r + " not an object: " + t);
|
|
390
|
-
}
|
|
391
|
-
if (e.hasOwnProperty(r = "ALPHABET")) {
|
|
392
|
-
t = e[r];
|
|
393
|
-
if (typeof t == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(t)) {
|
|
394
|
-
j = t.slice(0, 10) == "0123456789";
|
|
395
|
-
d = t;
|
|
396
|
-
} else {
|
|
397
|
-
throw Error(ee + r + " invalid: " + t);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
} else {
|
|
401
|
-
throw Error(ee + "Object expected: " + e);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
return {
|
|
405
|
-
DECIMAL_PLACES: o,
|
|
406
|
-
ROUNDING_MODE: c,
|
|
407
|
-
EXPONENTIAL_AT: [ l, u ],
|
|
408
|
-
RANGE: [ f, a ],
|
|
409
|
-
CRYPTO: p,
|
|
410
|
-
MODULO_MODE: h,
|
|
411
|
-
POW_PRECISION: g,
|
|
412
|
-
FORMAT: b,
|
|
413
|
-
ALPHABET: d
|
|
414
|
-
};
|
|
415
|
-
};
|
|
416
|
-
m.isBigNumber = function(e) {
|
|
417
|
-
if (!e || e._isBigNumber !== true) return false;
|
|
418
|
-
if (!m.DEBUG) return true;
|
|
419
|
-
var r, t, i = e.c, s = e.e, n = e.s;
|
|
420
|
-
e: if ({}.toString.call(i) == "[object Array]") {
|
|
421
|
-
if ((n === 1 || n === -1) && s >= -ce && s <= ce && s === Q(s)) {
|
|
422
|
-
if (i[0] === 0) {
|
|
423
|
-
if (s === 0 && i.length === 1) return true;
|
|
424
|
-
break e;
|
|
425
|
-
}
|
|
426
|
-
r = (s + 1) % ie;
|
|
427
|
-
if (r < 1) r += ie;
|
|
428
|
-
if (String(i[0]).length == r) {
|
|
429
|
-
for (r = 0; r < i.length; r++) {
|
|
430
|
-
t = i[r];
|
|
431
|
-
if (t < 0 || t >= te || t !== Q(t)) break e;
|
|
432
|
-
}
|
|
433
|
-
if (t !== 0) return true;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
} else if (i === null && s === null && (n === null || n === 1 || n === -1)) {
|
|
437
|
-
return true;
|
|
438
|
-
}
|
|
439
|
-
throw Error(ee + "Invalid BigNumber: " + e);
|
|
440
|
-
};
|
|
441
|
-
m.maximum = m.max = function() {
|
|
442
|
-
return v(arguments, -1);
|
|
443
|
-
};
|
|
444
|
-
m.minimum = m.min = function() {
|
|
445
|
-
return v(arguments, 1);
|
|
446
|
-
};
|
|
447
|
-
m.random = function() {
|
|
448
|
-
var e = 9007199254740992;
|
|
449
|
-
var r = Math.random() * e & 2097151 ? function() {
|
|
450
|
-
return Q(Math.random() * e);
|
|
451
|
-
} : function() {
|
|
452
|
-
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
453
|
-
};
|
|
454
|
-
return function(e) {
|
|
455
|
-
var t, i, s, c, l, u = 0, f = [], a = new m(n);
|
|
456
|
-
if (e == null) e = o; else pe(e, 0, ce);
|
|
457
|
-
c = Z(e / ie);
|
|
458
|
-
if (p) {
|
|
459
|
-
if (crypto.getRandomValues) {
|
|
460
|
-
t = crypto.getRandomValues(new Uint32Array(c *= 2));
|
|
461
|
-
for (;u < c; ) {
|
|
462
|
-
l = t[u] * 131072 + (t[u + 1] >>> 11);
|
|
463
|
-
if (l >= 9e15) {
|
|
464
|
-
i = crypto.getRandomValues(new Uint32Array(2));
|
|
465
|
-
t[u] = i[0];
|
|
466
|
-
t[u + 1] = i[1];
|
|
467
|
-
} else {
|
|
468
|
-
f.push(l % 1e14);
|
|
469
|
-
u += 2;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
u = c / 2;
|
|
473
|
-
} else if (crypto.randomBytes) {
|
|
474
|
-
t = crypto.randomBytes(c *= 7);
|
|
475
|
-
for (;u < c; ) {
|
|
476
|
-
l = (t[u] & 31) * 281474976710656 + t[u + 1] * 1099511627776 + t[u + 2] * 4294967296 + t[u + 3] * 16777216 + (t[u + 4] << 16) + (t[u + 5] << 8) + t[u + 6];
|
|
477
|
-
if (l >= 9e15) {
|
|
478
|
-
crypto.randomBytes(7).copy(t, u);
|
|
479
|
-
} else {
|
|
480
|
-
f.push(l % 1e14);
|
|
481
|
-
u += 7;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
u = c / 7;
|
|
485
|
-
} else {
|
|
486
|
-
p = false;
|
|
487
|
-
throw Error(ee + "crypto unavailable");
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
if (!p) {
|
|
491
|
-
for (;u < c; ) {
|
|
492
|
-
l = r();
|
|
493
|
-
if (l < 9e15) f[u++] = l % 1e14;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
c = f[--u];
|
|
497
|
-
e %= ie;
|
|
498
|
-
if (c && e) {
|
|
499
|
-
l = ne[ie - e];
|
|
500
|
-
f[u] = Q(c / l) * l;
|
|
501
|
-
}
|
|
502
|
-
for (;f[u] === 0; f.pop(), u--) ;
|
|
503
|
-
if (u < 0) {
|
|
504
|
-
f = [ s = 0 ];
|
|
505
|
-
} else {
|
|
506
|
-
for (s = -1; f[0] === 0; f.splice(0, 1), s -= ie) ;
|
|
507
|
-
for (u = 1, l = f[0]; l >= 10; l /= 10, u++) ;
|
|
508
|
-
if (u < ie) s -= ie - u;
|
|
509
|
-
}
|
|
510
|
-
a.e = s;
|
|
511
|
-
a.c = f;
|
|
512
|
-
return a;
|
|
513
|
-
};
|
|
514
|
-
}();
|
|
515
|
-
m.sum = function() {
|
|
516
|
-
var e = 1, r = arguments, t = new m(r[0]);
|
|
517
|
-
for (;e < r.length; ) t = t.plus(r[e++]);
|
|
518
|
-
return t;
|
|
519
|
-
};
|
|
520
|
-
t = function() {
|
|
521
|
-
var e = "0123456789";
|
|
522
|
-
function t(e, r, t, i) {
|
|
523
|
-
var s, n = [ 0 ], o, c = 0, l = e.length;
|
|
524
|
-
for (;c < l; ) {
|
|
525
|
-
for (o = n.length; o--; n[o] *= r) ;
|
|
526
|
-
n[0] += i.indexOf(e.charAt(c++));
|
|
527
|
-
for (s = 0; s < n.length; s++) {
|
|
528
|
-
if (n[s] > t - 1) {
|
|
529
|
-
if (n[s + 1] == null) n[s + 1] = 0;
|
|
530
|
-
n[s + 1] += n[s] / t | 0;
|
|
531
|
-
n[s] %= t;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
return n.reverse();
|
|
536
|
-
}
|
|
537
|
-
return function(i, s, n, l, u) {
|
|
538
|
-
var f, a, p, h, b, j, x, v, q = i.indexOf("."), w = o, y = c;
|
|
539
|
-
if (q >= 0) {
|
|
540
|
-
h = g;
|
|
541
|
-
g = 0;
|
|
542
|
-
i = i.replace(".", "");
|
|
543
|
-
v = new m(s);
|
|
544
|
-
j = v.pow(i.length - q);
|
|
545
|
-
g = h;
|
|
546
|
-
v.c = t(be(fe(j.c), j.e, "0"), 10, n, e);
|
|
547
|
-
v.e = v.c.length;
|
|
548
|
-
}
|
|
549
|
-
x = t(i, s, n, u ? (f = d, e) : (f = e, d));
|
|
550
|
-
p = h = x.length;
|
|
551
|
-
for (;x[--h] == 0; x.pop()) ;
|
|
552
|
-
if (!x[0]) return f.charAt(0);
|
|
553
|
-
if (q < 0) {
|
|
554
|
-
--p;
|
|
555
|
-
} else {
|
|
556
|
-
j.c = x;
|
|
557
|
-
j.e = p;
|
|
558
|
-
j.s = l;
|
|
559
|
-
j = r(j, v, w, y, n);
|
|
560
|
-
x = j.c;
|
|
561
|
-
b = j.r;
|
|
562
|
-
p = j.e;
|
|
563
|
-
}
|
|
564
|
-
a = p + w + 1;
|
|
565
|
-
q = x[a];
|
|
566
|
-
h = n / 2;
|
|
567
|
-
b = b || a < 0 || x[a + 1] != null;
|
|
568
|
-
b = y < 4 ? (q != null || b) && (y == 0 || y == (j.s < 0 ? 3 : 2)) : q > h || q == h && (y == 4 || b || y == 6 && x[a - 1] & 1 || y == (j.s < 0 ? 8 : 7));
|
|
569
|
-
if (a < 1 || !x[0]) {
|
|
570
|
-
i = b ? be(f.charAt(1), -w, f.charAt(0)) : f.charAt(0);
|
|
571
|
-
} else {
|
|
572
|
-
x.length = a;
|
|
573
|
-
if (b) {
|
|
574
|
-
for (--n; ++x[--a] > n; ) {
|
|
575
|
-
x[a] = 0;
|
|
576
|
-
if (!a) {
|
|
577
|
-
++p;
|
|
578
|
-
x = [ 1 ].concat(x);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
for (h = x.length; !x[--h]; ) ;
|
|
583
|
-
for (q = 0, i = ""; q <= h; i += f.charAt(x[q++])) ;
|
|
584
|
-
i = be(i, p, f.charAt(0));
|
|
585
|
-
}
|
|
586
|
-
return i;
|
|
587
|
-
};
|
|
588
|
-
}();
|
|
589
|
-
r = function() {
|
|
590
|
-
function e(e, r, t) {
|
|
591
|
-
var i, s, n, o, c = 0, l = e.length, u = r % oe, f = r / oe | 0;
|
|
592
|
-
for (e = e.slice(); l--; ) {
|
|
593
|
-
n = e[l] % oe;
|
|
594
|
-
o = e[l] / oe | 0;
|
|
595
|
-
i = f * n + o * u;
|
|
596
|
-
s = u * n + i % oe * oe + c;
|
|
597
|
-
c = (s / t | 0) + (i / oe | 0) + f * o;
|
|
598
|
-
e[l] = s % t;
|
|
599
|
-
}
|
|
600
|
-
if (c) e = [ c ].concat(e);
|
|
601
|
-
return e;
|
|
602
|
-
}
|
|
603
|
-
function r(e, r, t, i) {
|
|
604
|
-
var s, n;
|
|
605
|
-
if (t != i) {
|
|
606
|
-
n = t > i ? 1 : -1;
|
|
607
|
-
} else {
|
|
608
|
-
for (s = n = 0; s < t; s++) {
|
|
609
|
-
if (e[s] != r[s]) {
|
|
610
|
-
n = e[s] > r[s] ? 1 : -1;
|
|
611
|
-
break;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
return n;
|
|
616
|
-
}
|
|
617
|
-
function t(e, r, t, i) {
|
|
618
|
-
var s = 0;
|
|
619
|
-
for (;t--; ) {
|
|
620
|
-
e[t] -= s;
|
|
621
|
-
s = e[t] < r[t] ? 1 : 0;
|
|
622
|
-
e[t] = s * i + e[t] - r[t];
|
|
623
|
-
}
|
|
624
|
-
for (;!e[0] && e.length > 1; e.splice(0, 1)) ;
|
|
625
|
-
}
|
|
626
|
-
return function(i, s, n, o, c) {
|
|
627
|
-
var l, u, f, a, p, h, g, b, d, j, x, v, q, y, O, E, S, A = i.s == s.s ? 1 : -1, N = i.c, I = s.c;
|
|
628
|
-
if (!N || !N[0] || !I || !I[0]) {
|
|
629
|
-
return new m(!i.s || !s.s || (N ? I && N[0] == I[0] : !I) ? NaN : N && N[0] == 0 || !I ? A * 0 : A / 0);
|
|
630
|
-
}
|
|
631
|
-
b = new m(A);
|
|
632
|
-
d = b.c = [];
|
|
633
|
-
u = i.e - s.e;
|
|
634
|
-
A = n + u + 1;
|
|
635
|
-
if (!c) {
|
|
636
|
-
c = te;
|
|
637
|
-
u = ue(i.e / ie) - ue(s.e / ie);
|
|
638
|
-
A = A / ie | 0;
|
|
639
|
-
}
|
|
640
|
-
for (f = 0; I[f] == (N[f] || 0); f++) ;
|
|
641
|
-
if (I[f] > (N[f] || 0)) u--;
|
|
642
|
-
if (A < 0) {
|
|
643
|
-
d.push(1);
|
|
644
|
-
a = true;
|
|
645
|
-
} else {
|
|
646
|
-
y = N.length;
|
|
647
|
-
E = I.length;
|
|
648
|
-
f = 0;
|
|
649
|
-
A += 2;
|
|
650
|
-
p = Q(c / (I[0] + 1));
|
|
651
|
-
if (p > 1) {
|
|
652
|
-
I = e(I, p, c);
|
|
653
|
-
N = e(N, p, c);
|
|
654
|
-
E = I.length;
|
|
655
|
-
y = N.length;
|
|
656
|
-
}
|
|
657
|
-
q = E;
|
|
658
|
-
j = N.slice(0, E);
|
|
659
|
-
x = j.length;
|
|
660
|
-
for (;x < E; j[x++] = 0) ;
|
|
661
|
-
S = I.slice();
|
|
662
|
-
S = [ 0 ].concat(S);
|
|
663
|
-
O = I[0];
|
|
664
|
-
if (I[1] >= c / 2) O++;
|
|
665
|
-
do {
|
|
666
|
-
p = 0;
|
|
667
|
-
l = r(I, j, E, x);
|
|
668
|
-
if (l < 0) {
|
|
669
|
-
v = j[0];
|
|
670
|
-
if (E != x) v = v * c + (j[1] || 0);
|
|
671
|
-
p = Q(v / O);
|
|
672
|
-
if (p > 1) {
|
|
673
|
-
if (p >= c) p = c - 1;
|
|
674
|
-
h = e(I, p, c);
|
|
675
|
-
g = h.length;
|
|
676
|
-
x = j.length;
|
|
677
|
-
while (r(h, j, g, x) == 1) {
|
|
678
|
-
p--;
|
|
679
|
-
t(h, E < g ? S : I, g, c);
|
|
680
|
-
g = h.length;
|
|
681
|
-
l = 1;
|
|
682
|
-
}
|
|
683
|
-
} else {
|
|
684
|
-
if (p == 0) {
|
|
685
|
-
l = p = 1;
|
|
686
|
-
}
|
|
687
|
-
h = I.slice();
|
|
688
|
-
g = h.length;
|
|
689
|
-
}
|
|
690
|
-
if (g < x) h = [ 0 ].concat(h);
|
|
691
|
-
t(j, h, x, c);
|
|
692
|
-
x = j.length;
|
|
693
|
-
if (l == -1) {
|
|
694
|
-
while (r(I, j, E, x) < 1) {
|
|
695
|
-
p++;
|
|
696
|
-
t(j, E < x ? S : I, x, c);
|
|
697
|
-
x = j.length;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
} else if (l === 0) {
|
|
701
|
-
p++;
|
|
702
|
-
j = [ 0 ];
|
|
703
|
-
}
|
|
704
|
-
d[f++] = p;
|
|
705
|
-
if (j[0]) {
|
|
706
|
-
j[x++] = N[q] || 0;
|
|
707
|
-
} else {
|
|
708
|
-
j = [ N[q] ];
|
|
709
|
-
x = 1;
|
|
710
|
-
}
|
|
711
|
-
} while ((q++ < y || j[0] != null) && A--);
|
|
712
|
-
a = j[0] != null;
|
|
713
|
-
if (!d[0]) d.splice(0, 1);
|
|
714
|
-
}
|
|
715
|
-
if (c == te) {
|
|
716
|
-
for (f = 1, A = d[0]; A >= 10; A /= 10, f++) ;
|
|
717
|
-
w(b, n + (b.e = f + u * ie - 1) + 1, o, a);
|
|
718
|
-
} else {
|
|
719
|
-
b.e = u;
|
|
720
|
-
b.r = +a;
|
|
721
|
-
}
|
|
722
|
-
return b;
|
|
723
|
-
};
|
|
724
|
-
}();
|
|
725
|
-
function x(e, r, t, i) {
|
|
726
|
-
var s, n, o, f, a;
|
|
727
|
-
if (t == null) t = c; else pe(t, 0, 8);
|
|
728
|
-
if (!e.c) return e.toString();
|
|
729
|
-
s = e.c[0];
|
|
730
|
-
o = e.e;
|
|
731
|
-
if (r == null) {
|
|
732
|
-
a = fe(e.c);
|
|
733
|
-
a = i == 1 || i == 2 && (o <= l || o >= u) ? ge(a, o) : be(a, o, "0");
|
|
734
|
-
} else {
|
|
735
|
-
e = w(new m(e), r, t);
|
|
736
|
-
n = e.e;
|
|
737
|
-
a = fe(e.c);
|
|
738
|
-
f = a.length;
|
|
739
|
-
if (i == 1 || i == 2 && (r <= n || n <= l)) {
|
|
740
|
-
for (;f < r; a += "0", f++) ;
|
|
741
|
-
a = ge(a, n);
|
|
742
|
-
} else {
|
|
743
|
-
r -= o + (i === 2 && n > o);
|
|
744
|
-
a = be(a, n, "0");
|
|
745
|
-
if (n + 1 > f) {
|
|
746
|
-
if (--r > 0) for (a += "."; r--; a += "0") ;
|
|
747
|
-
} else {
|
|
748
|
-
r += n - f;
|
|
749
|
-
if (r > 0) {
|
|
750
|
-
if (n + 1 == f) a += ".";
|
|
751
|
-
for (;r--; a += "0") ;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
return e.s < 0 && s ? "-" + a : a;
|
|
757
|
-
}
|
|
758
|
-
function v(e, r) {
|
|
759
|
-
var t, i, s = 1, n = new m(e[0]);
|
|
760
|
-
for (;s < e.length; s++) {
|
|
761
|
-
i = new m(e[s]);
|
|
762
|
-
if (!i.s || (t = ae(n, i)) === r || t === 0 && n.s === r) {
|
|
763
|
-
n = i;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
return n;
|
|
767
|
-
}
|
|
768
|
-
function q(e, r, t) {
|
|
769
|
-
var i = 1, s = r.length;
|
|
770
|
-
for (;!r[--s]; r.pop()) ;
|
|
771
|
-
for (s = r[0]; s >= 10; s /= 10, i++) ;
|
|
772
|
-
if ((t = i + t * ie - 1) > a) {
|
|
773
|
-
e.c = e.e = null;
|
|
774
|
-
} else if (t < f) {
|
|
775
|
-
e.c = [ e.e = 0 ];
|
|
776
|
-
} else {
|
|
777
|
-
e.e = t;
|
|
778
|
-
e.c = r;
|
|
779
|
-
}
|
|
780
|
-
return e;
|
|
781
|
-
}
|
|
782
|
-
i = function() {
|
|
783
|
-
var e = /^(-?)0([xbo])(?=\w[\w.]*$)/i, r = /^([^.]+)\.$/, t = /^\.([^.]+)$/, i = /^-?(Infinity|NaN)$/, s = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
784
|
-
return function(n, o, c, l) {
|
|
785
|
-
var u, f = c ? o : o.replace(s, "");
|
|
786
|
-
if (i.test(f)) {
|
|
787
|
-
n.s = isNaN(f) ? null : f < 0 ? -1 : 1;
|
|
788
|
-
} else {
|
|
789
|
-
if (!c) {
|
|
790
|
-
f = f.replace(e, (function(e, r, t) {
|
|
791
|
-
u = (t = t.toLowerCase()) == "x" ? 16 : t == "b" ? 2 : 8;
|
|
792
|
-
return !l || l == u ? r : e;
|
|
793
|
-
}));
|
|
794
|
-
if (l) {
|
|
795
|
-
u = l;
|
|
796
|
-
f = f.replace(r, "$1").replace(t, "0.$1");
|
|
797
|
-
}
|
|
798
|
-
if (o != f) return new m(f, u);
|
|
799
|
-
}
|
|
800
|
-
if (m.DEBUG) {
|
|
801
|
-
throw Error(ee + "Not a" + (l ? " base " + l : "") + " number: " + o);
|
|
802
|
-
}
|
|
803
|
-
n.s = null;
|
|
804
|
-
}
|
|
805
|
-
n.c = n.e = null;
|
|
806
|
-
};
|
|
807
|
-
}();
|
|
808
|
-
function w(e, r, t, i) {
|
|
809
|
-
var s, n, o, c, l, u, p, h = e.c, g = ne;
|
|
810
|
-
if (h) {
|
|
811
|
-
e: {
|
|
812
|
-
for (s = 1, c = h[0]; c >= 10; c /= 10, s++) ;
|
|
813
|
-
n = r - s;
|
|
814
|
-
if (n < 0) {
|
|
815
|
-
n += ie;
|
|
816
|
-
o = r;
|
|
817
|
-
l = h[u = 0];
|
|
818
|
-
p = Q(l / g[s - o - 1] % 10);
|
|
819
|
-
} else {
|
|
820
|
-
u = Z((n + 1) / ie);
|
|
821
|
-
if (u >= h.length) {
|
|
822
|
-
if (i) {
|
|
823
|
-
for (;h.length <= u; h.push(0)) ;
|
|
824
|
-
l = p = 0;
|
|
825
|
-
s = 1;
|
|
826
|
-
n %= ie;
|
|
827
|
-
o = n - ie + 1;
|
|
828
|
-
} else {
|
|
829
|
-
break e;
|
|
830
|
-
}
|
|
831
|
-
} else {
|
|
832
|
-
l = c = h[u];
|
|
833
|
-
for (s = 1; c >= 10; c /= 10, s++) ;
|
|
834
|
-
n %= ie;
|
|
835
|
-
o = n - ie + s;
|
|
836
|
-
p = o < 0 ? 0 : Q(l / g[s - o - 1] % 10);
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
i = i || r < 0 || h[u + 1] != null || (o < 0 ? l : l % g[s - o - 1]);
|
|
840
|
-
i = t < 4 ? (p || i) && (t == 0 || t == (e.s < 0 ? 3 : 2)) : p > 5 || p == 5 && (t == 4 || i || t == 6 && (n > 0 ? o > 0 ? l / g[s - o] : 0 : h[u - 1]) % 10 & 1 || t == (e.s < 0 ? 8 : 7));
|
|
841
|
-
if (r < 1 || !h[0]) {
|
|
842
|
-
h.length = 0;
|
|
843
|
-
if (i) {
|
|
844
|
-
r -= e.e + 1;
|
|
845
|
-
h[0] = g[(ie - r % ie) % ie];
|
|
846
|
-
e.e = -r || 0;
|
|
847
|
-
} else {
|
|
848
|
-
h[0] = e.e = 0;
|
|
849
|
-
}
|
|
850
|
-
return e;
|
|
851
|
-
}
|
|
852
|
-
if (n == 0) {
|
|
853
|
-
h.length = u;
|
|
854
|
-
c = 1;
|
|
855
|
-
u--;
|
|
856
|
-
} else {
|
|
857
|
-
h.length = u + 1;
|
|
858
|
-
c = g[ie - n];
|
|
859
|
-
h[u] = o > 0 ? Q(l / g[s - o] % g[o]) * c : 0;
|
|
860
|
-
}
|
|
861
|
-
if (i) {
|
|
862
|
-
for (;;) {
|
|
863
|
-
if (u == 0) {
|
|
864
|
-
for (n = 1, o = h[0]; o >= 10; o /= 10, n++) ;
|
|
865
|
-
o = h[0] += c;
|
|
866
|
-
for (c = 1; o >= 10; o /= 10, c++) ;
|
|
867
|
-
if (n != c) {
|
|
868
|
-
e.e++;
|
|
869
|
-
if (h[0] == te) h[0] = 1;
|
|
870
|
-
}
|
|
871
|
-
break;
|
|
872
|
-
} else {
|
|
873
|
-
h[u] += c;
|
|
874
|
-
if (h[u] != te) break;
|
|
875
|
-
h[u--] = 0;
|
|
876
|
-
c = 1;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
for (n = h.length; h[--n] === 0; h.pop()) ;
|
|
881
|
-
}
|
|
882
|
-
if (e.e > a) {
|
|
883
|
-
e.c = e.e = null;
|
|
884
|
-
} else if (e.e < f) {
|
|
885
|
-
e.c = [ e.e = 0 ];
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
return e;
|
|
889
|
-
}
|
|
890
|
-
function y(e) {
|
|
891
|
-
var r, t = e.e;
|
|
892
|
-
if (t === null) return e.toString();
|
|
893
|
-
r = fe(e.c);
|
|
894
|
-
r = t <= l || t >= u ? ge(r, t) : be(r, t, "0");
|
|
895
|
-
return e.s < 0 ? "-" + r : r;
|
|
896
|
-
}
|
|
897
|
-
s.absoluteValue = s.abs = function() {
|
|
898
|
-
var e = new m(this);
|
|
899
|
-
if (e.s < 0) e.s = 1;
|
|
900
|
-
return e;
|
|
901
|
-
};
|
|
902
|
-
s.comparedTo = function(e, r) {
|
|
903
|
-
return ae(this, new m(e, r));
|
|
904
|
-
};
|
|
905
|
-
s.decimalPlaces = s.dp = function(e, r) {
|
|
906
|
-
var t, i, s, n = this;
|
|
907
|
-
if (e != null) {
|
|
908
|
-
pe(e, 0, ce);
|
|
909
|
-
if (r == null) r = c; else pe(r, 0, 8);
|
|
910
|
-
return w(new m(n), e + n.e + 1, r);
|
|
911
|
-
}
|
|
912
|
-
if (!(t = n.c)) return null;
|
|
913
|
-
i = ((s = t.length - 1) - ue(this.e / ie)) * ie;
|
|
914
|
-
if (s = t[s]) for (;s % 10 == 0; s /= 10, i--) ;
|
|
915
|
-
if (i < 0) i = 0;
|
|
916
|
-
return i;
|
|
917
|
-
};
|
|
918
|
-
s.dividedBy = s.div = function(e, t) {
|
|
919
|
-
return r(this, new m(e, t), o, c);
|
|
920
|
-
};
|
|
921
|
-
s.dividedToIntegerBy = s.idiv = function(e, t) {
|
|
922
|
-
return r(this, new m(e, t), 0, 1);
|
|
923
|
-
};
|
|
924
|
-
s.exponentiatedBy = s.pow = function(e, r) {
|
|
925
|
-
var t, i, s, o, l, u, f, a, p, h = this;
|
|
926
|
-
e = new m(e);
|
|
927
|
-
if (e.c && !e.isInteger()) {
|
|
928
|
-
throw Error(ee + "Exponent not an integer: " + y(e));
|
|
929
|
-
}
|
|
930
|
-
if (r != null) r = new m(r);
|
|
931
|
-
u = e.e > 14;
|
|
932
|
-
if (!h.c || !h.c[0] || h.c[0] == 1 && !h.e && h.c.length == 1 || !e.c || !e.c[0]) {
|
|
933
|
-
p = new m(Math.pow(+y(h), u ? e.s * (2 - he(e)) : +y(e)));
|
|
934
|
-
return r ? p.mod(r) : p;
|
|
935
|
-
}
|
|
936
|
-
f = e.s < 0;
|
|
937
|
-
if (r) {
|
|
938
|
-
if (r.c ? !r.c[0] : !r.s) return new m(NaN);
|
|
939
|
-
i = !f && h.isInteger() && r.isInteger();
|
|
940
|
-
if (i) h = h.mod(r);
|
|
941
|
-
} else if (e.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || u && h.c[1] >= 24e7 : h.c[0] < 8e13 || u && h.c[0] <= 9999975e7))) {
|
|
942
|
-
o = h.s < 0 && he(e) ? -0 : 0;
|
|
943
|
-
if (h.e > -1) o = 1 / o;
|
|
944
|
-
return new m(f ? 1 / o : o);
|
|
945
|
-
} else if (g) {
|
|
946
|
-
o = Z(g / ie + 2);
|
|
947
|
-
}
|
|
948
|
-
if (u) {
|
|
949
|
-
t = new m(.5);
|
|
950
|
-
if (f) e.s = 1;
|
|
951
|
-
a = he(e);
|
|
952
|
-
} else {
|
|
953
|
-
s = Math.abs(+y(e));
|
|
954
|
-
a = s % 2;
|
|
955
|
-
}
|
|
956
|
-
p = new m(n);
|
|
957
|
-
for (;;) {
|
|
958
|
-
if (a) {
|
|
959
|
-
p = p.times(h);
|
|
960
|
-
if (!p.c) break;
|
|
961
|
-
if (o) {
|
|
962
|
-
if (p.c.length > o) p.c.length = o;
|
|
963
|
-
} else if (i) {
|
|
964
|
-
p = p.mod(r);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
if (s) {
|
|
968
|
-
s = Q(s / 2);
|
|
969
|
-
if (s === 0) break;
|
|
970
|
-
a = s % 2;
|
|
971
|
-
} else {
|
|
972
|
-
e = e.times(t);
|
|
973
|
-
w(e, e.e + 1, 1);
|
|
974
|
-
if (e.e > 14) {
|
|
975
|
-
a = he(e);
|
|
976
|
-
} else {
|
|
977
|
-
s = +y(e);
|
|
978
|
-
if (s === 0) break;
|
|
979
|
-
a = s % 2;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
h = h.times(h);
|
|
983
|
-
if (o) {
|
|
984
|
-
if (h.c && h.c.length > o) h.c.length = o;
|
|
985
|
-
} else if (i) {
|
|
986
|
-
h = h.mod(r);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
if (i) return p;
|
|
990
|
-
if (f) p = n.div(p);
|
|
991
|
-
return r ? p.mod(r) : o ? w(p, g, c, l) : p;
|
|
992
|
-
};
|
|
993
|
-
s.integerValue = function(e) {
|
|
994
|
-
var r = new m(this);
|
|
995
|
-
if (e == null) e = c; else pe(e, 0, 8);
|
|
996
|
-
return w(r, r.e + 1, e);
|
|
997
|
-
};
|
|
998
|
-
s.isEqualTo = s.eq = function(e, r) {
|
|
999
|
-
return ae(this, new m(e, r)) === 0;
|
|
1000
|
-
};
|
|
1001
|
-
s.isFinite = function() {
|
|
1002
|
-
return !!this.c;
|
|
1003
|
-
};
|
|
1004
|
-
s.isGreaterThan = s.gt = function(e, r) {
|
|
1005
|
-
return ae(this, new m(e, r)) > 0;
|
|
1006
|
-
};
|
|
1007
|
-
s.isGreaterThanOrEqualTo = s.gte = function(e, r) {
|
|
1008
|
-
return (r = ae(this, new m(e, r))) === 1 || r === 0;
|
|
1009
|
-
};
|
|
1010
|
-
s.isInteger = function() {
|
|
1011
|
-
return !!this.c && ue(this.e / ie) > this.c.length - 2;
|
|
1012
|
-
};
|
|
1013
|
-
s.isLessThan = s.lt = function(e, r) {
|
|
1014
|
-
return ae(this, new m(e, r)) < 0;
|
|
1015
|
-
};
|
|
1016
|
-
s.isLessThanOrEqualTo = s.lte = function(e, r) {
|
|
1017
|
-
return (r = ae(this, new m(e, r))) === -1 || r === 0;
|
|
1018
|
-
};
|
|
1019
|
-
s.isNaN = function() {
|
|
1020
|
-
return !this.s;
|
|
1021
|
-
};
|
|
1022
|
-
s.isNegative = function() {
|
|
1023
|
-
return this.s < 0;
|
|
1024
|
-
};
|
|
1025
|
-
s.isPositive = function() {
|
|
1026
|
-
return this.s > 0;
|
|
1027
|
-
};
|
|
1028
|
-
s.isZero = function() {
|
|
1029
|
-
return !!this.c && this.c[0] == 0;
|
|
1030
|
-
};
|
|
1031
|
-
s.minus = function(e, r) {
|
|
1032
|
-
var t, i, s, n, o = this, l = o.s;
|
|
1033
|
-
e = new m(e, r);
|
|
1034
|
-
r = e.s;
|
|
1035
|
-
if (!l || !r) return new m(NaN);
|
|
1036
|
-
if (l != r) {
|
|
1037
|
-
e.s = -r;
|
|
1038
|
-
return o.plus(e);
|
|
1039
|
-
}
|
|
1040
|
-
var u = o.e / ie, f = e.e / ie, a = o.c, p = e.c;
|
|
1041
|
-
if (!u || !f) {
|
|
1042
|
-
if (!a || !p) return a ? (e.s = -r, e) : new m(p ? o : NaN);
|
|
1043
|
-
if (!a[0] || !p[0]) {
|
|
1044
|
-
return p[0] ? (e.s = -r, e) : new m(a[0] ? o : c == 3 ? -0 : 0);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
u = ue(u);
|
|
1048
|
-
f = ue(f);
|
|
1049
|
-
a = a.slice();
|
|
1050
|
-
if (l = u - f) {
|
|
1051
|
-
if (n = l < 0) {
|
|
1052
|
-
l = -l;
|
|
1053
|
-
s = a;
|
|
1054
|
-
} else {
|
|
1055
|
-
f = u;
|
|
1056
|
-
s = p;
|
|
1057
|
-
}
|
|
1058
|
-
s.reverse();
|
|
1059
|
-
for (r = l; r--; s.push(0)) ;
|
|
1060
|
-
s.reverse();
|
|
1061
|
-
} else {
|
|
1062
|
-
i = (n = (l = a.length) < (r = p.length)) ? l : r;
|
|
1063
|
-
for (l = r = 0; r < i; r++) {
|
|
1064
|
-
if (a[r] != p[r]) {
|
|
1065
|
-
n = a[r] < p[r];
|
|
1066
|
-
break;
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
if (n) {
|
|
1071
|
-
s = a;
|
|
1072
|
-
a = p;
|
|
1073
|
-
p = s;
|
|
1074
|
-
e.s = -e.s;
|
|
1075
|
-
}
|
|
1076
|
-
r = (i = p.length) - (t = a.length);
|
|
1077
|
-
if (r > 0) for (;r--; a[t++] = 0) ;
|
|
1078
|
-
r = te - 1;
|
|
1079
|
-
for (;i > l; ) {
|
|
1080
|
-
if (a[--i] < p[i]) {
|
|
1081
|
-
for (t = i; t && !a[--t]; a[t] = r) ;
|
|
1082
|
-
--a[t];
|
|
1083
|
-
a[i] += te;
|
|
1084
|
-
}
|
|
1085
|
-
a[i] -= p[i];
|
|
1086
|
-
}
|
|
1087
|
-
for (;a[0] == 0; a.splice(0, 1), --f) ;
|
|
1088
|
-
if (!a[0]) {
|
|
1089
|
-
e.s = c == 3 ? -1 : 1;
|
|
1090
|
-
e.c = [ e.e = 0 ];
|
|
1091
|
-
return e;
|
|
1092
|
-
}
|
|
1093
|
-
return q(e, a, f);
|
|
1094
|
-
};
|
|
1095
|
-
s.modulo = s.mod = function(e, t) {
|
|
1096
|
-
var i, s, n = this;
|
|
1097
|
-
e = new m(e, t);
|
|
1098
|
-
if (!n.c || !e.s || e.c && !e.c[0]) {
|
|
1099
|
-
return new m(NaN);
|
|
1100
|
-
} else if (!e.c || n.c && !n.c[0]) {
|
|
1101
|
-
return new m(n);
|
|
1102
|
-
}
|
|
1103
|
-
if (h == 9) {
|
|
1104
|
-
s = e.s;
|
|
1105
|
-
e.s = 1;
|
|
1106
|
-
i = r(n, e, 0, 3);
|
|
1107
|
-
e.s = s;
|
|
1108
|
-
i.s *= s;
|
|
1109
|
-
} else {
|
|
1110
|
-
i = r(n, e, 0, h);
|
|
1111
|
-
}
|
|
1112
|
-
e = n.minus(i.times(e));
|
|
1113
|
-
if (!e.c[0] && h == 1) e.s = n.s;
|
|
1114
|
-
return e;
|
|
1115
|
-
};
|
|
1116
|
-
s.multipliedBy = s.times = function(e, r) {
|
|
1117
|
-
var t, i, s, n, o, c, l, u, f, a, p, h, g, b, d, j = this, x = j.c, v = (e = new m(e, r)).c;
|
|
1118
|
-
if (!x || !v || !x[0] || !v[0]) {
|
|
1119
|
-
if (!j.s || !e.s || x && !x[0] && !v || v && !v[0] && !x) {
|
|
1120
|
-
e.c = e.e = e.s = null;
|
|
1121
|
-
} else {
|
|
1122
|
-
e.s *= j.s;
|
|
1123
|
-
if (!x || !v) {
|
|
1124
|
-
e.c = e.e = null;
|
|
1125
|
-
} else {
|
|
1126
|
-
e.c = [ 0 ];
|
|
1127
|
-
e.e = 0;
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
return e;
|
|
1131
|
-
}
|
|
1132
|
-
i = ue(j.e / ie) + ue(e.e / ie);
|
|
1133
|
-
e.s *= j.s;
|
|
1134
|
-
l = x.length;
|
|
1135
|
-
a = v.length;
|
|
1136
|
-
if (l < a) {
|
|
1137
|
-
g = x;
|
|
1138
|
-
x = v;
|
|
1139
|
-
v = g;
|
|
1140
|
-
s = l;
|
|
1141
|
-
l = a;
|
|
1142
|
-
a = s;
|
|
1143
|
-
}
|
|
1144
|
-
for (s = l + a, g = []; s--; g.push(0)) ;
|
|
1145
|
-
b = te;
|
|
1146
|
-
d = oe;
|
|
1147
|
-
for (s = a; --s >= 0; ) {
|
|
1148
|
-
t = 0;
|
|
1149
|
-
p = v[s] % d;
|
|
1150
|
-
h = v[s] / d | 0;
|
|
1151
|
-
for (o = l, n = s + o; n > s; ) {
|
|
1152
|
-
u = x[--o] % d;
|
|
1153
|
-
f = x[o] / d | 0;
|
|
1154
|
-
c = h * u + f * p;
|
|
1155
|
-
u = p * u + c % d * d + g[n] + t;
|
|
1156
|
-
t = (u / b | 0) + (c / d | 0) + h * f;
|
|
1157
|
-
g[n--] = u % b;
|
|
1158
|
-
}
|
|
1159
|
-
g[n] = t;
|
|
1160
|
-
}
|
|
1161
|
-
if (t) {
|
|
1162
|
-
++i;
|
|
1163
|
-
} else {
|
|
1164
|
-
g.splice(0, 1);
|
|
1165
|
-
}
|
|
1166
|
-
return q(e, g, i);
|
|
1167
|
-
};
|
|
1168
|
-
s.negated = function() {
|
|
1169
|
-
var e = new m(this);
|
|
1170
|
-
e.s = -e.s || null;
|
|
1171
|
-
return e;
|
|
1172
|
-
};
|
|
1173
|
-
s.plus = function(e, r) {
|
|
1174
|
-
var t, i = this, s = i.s;
|
|
1175
|
-
e = new m(e, r);
|
|
1176
|
-
r = e.s;
|
|
1177
|
-
if (!s || !r) return new m(NaN);
|
|
1178
|
-
if (s != r) {
|
|
1179
|
-
e.s = -r;
|
|
1180
|
-
return i.minus(e);
|
|
1181
|
-
}
|
|
1182
|
-
var n = i.e / ie, o = e.e / ie, c = i.c, l = e.c;
|
|
1183
|
-
if (!n || !o) {
|
|
1184
|
-
if (!c || !l) return new m(s / 0);
|
|
1185
|
-
if (!c[0] || !l[0]) return l[0] ? e : new m(c[0] ? i : s * 0);
|
|
1186
|
-
}
|
|
1187
|
-
n = ue(n);
|
|
1188
|
-
o = ue(o);
|
|
1189
|
-
c = c.slice();
|
|
1190
|
-
if (s = n - o) {
|
|
1191
|
-
if (s > 0) {
|
|
1192
|
-
o = n;
|
|
1193
|
-
t = l;
|
|
1194
|
-
} else {
|
|
1195
|
-
s = -s;
|
|
1196
|
-
t = c;
|
|
1197
|
-
}
|
|
1198
|
-
t.reverse();
|
|
1199
|
-
for (;s--; t.push(0)) ;
|
|
1200
|
-
t.reverse();
|
|
1201
|
-
}
|
|
1202
|
-
s = c.length;
|
|
1203
|
-
r = l.length;
|
|
1204
|
-
if (s - r < 0) {
|
|
1205
|
-
t = l;
|
|
1206
|
-
l = c;
|
|
1207
|
-
c = t;
|
|
1208
|
-
r = s;
|
|
1209
|
-
}
|
|
1210
|
-
for (s = 0; r; ) {
|
|
1211
|
-
s = (c[--r] = c[r] + l[r] + s) / te | 0;
|
|
1212
|
-
c[r] = te === c[r] ? 0 : c[r] % te;
|
|
1213
|
-
}
|
|
1214
|
-
if (s) {
|
|
1215
|
-
c = [ s ].concat(c);
|
|
1216
|
-
++o;
|
|
1217
|
-
}
|
|
1218
|
-
return q(e, c, o);
|
|
1219
|
-
};
|
|
1220
|
-
s.precision = s.sd = function(e, r) {
|
|
1221
|
-
var t, i, s, n = this;
|
|
1222
|
-
if (e != null && e !== !!e) {
|
|
1223
|
-
pe(e, 1, ce);
|
|
1224
|
-
if (r == null) r = c; else pe(r, 0, 8);
|
|
1225
|
-
return w(new m(n), e, r);
|
|
1226
|
-
}
|
|
1227
|
-
if (!(t = n.c)) return null;
|
|
1228
|
-
s = t.length - 1;
|
|
1229
|
-
i = s * ie + 1;
|
|
1230
|
-
if (s = t[s]) {
|
|
1231
|
-
for (;s % 10 == 0; s /= 10, i--) ;
|
|
1232
|
-
for (s = t[0]; s >= 10; s /= 10, i++) ;
|
|
1233
|
-
}
|
|
1234
|
-
if (e && n.e + 1 > i) i = n.e + 1;
|
|
1235
|
-
return i;
|
|
1236
|
-
};
|
|
1237
|
-
s.shiftedBy = function(e) {
|
|
1238
|
-
pe(e, -se, se);
|
|
1239
|
-
return this.times("1e" + e);
|
|
1240
|
-
};
|
|
1241
|
-
s.squareRoot = s.sqrt = function() {
|
|
1242
|
-
var e, t, i, s, n, l = this, u = l.c, f = l.s, a = l.e, p = o + 4, h = new m("0.5");
|
|
1243
|
-
if (f !== 1 || !u || !u[0]) {
|
|
1244
|
-
return new m(!f || f < 0 && (!u || u[0]) ? NaN : u ? l : 1 / 0);
|
|
1245
|
-
}
|
|
1246
|
-
f = Math.sqrt(+y(l));
|
|
1247
|
-
if (f == 0 || f == 1 / 0) {
|
|
1248
|
-
t = fe(u);
|
|
1249
|
-
if ((t.length + a) % 2 == 0) t += "0";
|
|
1250
|
-
f = Math.sqrt(+t);
|
|
1251
|
-
a = ue((a + 1) / 2) - (a < 0 || a % 2);
|
|
1252
|
-
if (f == 1 / 0) {
|
|
1253
|
-
t = "5e" + a;
|
|
1254
|
-
} else {
|
|
1255
|
-
t = f.toExponential();
|
|
1256
|
-
t = t.slice(0, t.indexOf("e") + 1) + a;
|
|
1257
|
-
}
|
|
1258
|
-
i = new m(t);
|
|
1259
|
-
} else {
|
|
1260
|
-
i = new m(f + "");
|
|
1261
|
-
}
|
|
1262
|
-
if (i.c[0]) {
|
|
1263
|
-
a = i.e;
|
|
1264
|
-
f = a + p;
|
|
1265
|
-
if (f < 3) f = 0;
|
|
1266
|
-
for (;;) {
|
|
1267
|
-
n = i;
|
|
1268
|
-
i = h.times(n.plus(r(l, n, p, 1)));
|
|
1269
|
-
if (fe(n.c).slice(0, f) === (t = fe(i.c)).slice(0, f)) {
|
|
1270
|
-
if (i.e < a) --f;
|
|
1271
|
-
t = t.slice(f - 3, f + 1);
|
|
1272
|
-
if (t == "9999" || !s && t == "4999") {
|
|
1273
|
-
if (!s) {
|
|
1274
|
-
w(n, n.e + o + 2, 0);
|
|
1275
|
-
if (n.times(n).eq(l)) {
|
|
1276
|
-
i = n;
|
|
1277
|
-
break;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
p += 4;
|
|
1281
|
-
f += 4;
|
|
1282
|
-
s = 1;
|
|
1283
|
-
} else {
|
|
1284
|
-
if (!+t || !+t.slice(1) && t.charAt(0) == "5") {
|
|
1285
|
-
w(i, i.e + o + 2, 1);
|
|
1286
|
-
e = !i.times(i).eq(l);
|
|
1287
|
-
}
|
|
1288
|
-
break;
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
return w(i, i.e + o + 1, c, e);
|
|
1294
|
-
};
|
|
1295
|
-
s.toExponential = function(e, r) {
|
|
1296
|
-
if (e != null) {
|
|
1297
|
-
pe(e, 0, ce);
|
|
1298
|
-
e++;
|
|
1299
|
-
}
|
|
1300
|
-
return x(this, e, r, 1);
|
|
1301
|
-
};
|
|
1302
|
-
s.toFixed = function(e, r) {
|
|
1303
|
-
if (e != null) {
|
|
1304
|
-
pe(e, 0, ce);
|
|
1305
|
-
e = e + this.e + 1;
|
|
1306
|
-
}
|
|
1307
|
-
return x(this, e, r);
|
|
1308
|
-
};
|
|
1309
|
-
s.toFormat = function(e, r, t) {
|
|
1310
|
-
var i, s = this;
|
|
1311
|
-
if (t == null) {
|
|
1312
|
-
if (e != null && r && typeof r == "object") {
|
|
1313
|
-
t = r;
|
|
1314
|
-
r = null;
|
|
1315
|
-
} else if (e && typeof e == "object") {
|
|
1316
|
-
t = e;
|
|
1317
|
-
e = r = null;
|
|
1318
|
-
} else {
|
|
1319
|
-
t = b;
|
|
1320
|
-
}
|
|
1321
|
-
} else if (typeof t != "object") {
|
|
1322
|
-
throw Error(ee + "Argument not an object: " + t);
|
|
1323
|
-
}
|
|
1324
|
-
i = s.toFixed(e, r);
|
|
1325
|
-
if (s.c) {
|
|
1326
|
-
var n, o = i.split("."), c = +t.groupSize, l = +t.secondaryGroupSize, u = t.groupSeparator || "", f = o[0], a = o[1], p = s.s < 0, h = p ? f.slice(1) : f, g = h.length;
|
|
1327
|
-
if (l) {
|
|
1328
|
-
n = c;
|
|
1329
|
-
c = l;
|
|
1330
|
-
l = n;
|
|
1331
|
-
g -= n;
|
|
1332
|
-
}
|
|
1333
|
-
if (c > 0 && g > 0) {
|
|
1334
|
-
n = g % c || c;
|
|
1335
|
-
f = h.substr(0, n);
|
|
1336
|
-
for (;n < g; n += c) f += u + h.substr(n, c);
|
|
1337
|
-
if (l > 0) f += u + h.slice(n);
|
|
1338
|
-
if (p) f = "-" + f;
|
|
1339
|
-
}
|
|
1340
|
-
i = a ? f + (t.decimalSeparator || "") + ((l = +t.fractionGroupSize) ? a.replace(new RegExp("\\d{" + l + "}\\B", "g"), "$&" + (t.fractionGroupSeparator || "")) : a) : f;
|
|
1341
|
-
}
|
|
1342
|
-
return (t.prefix || "") + i + (t.suffix || "");
|
|
1343
|
-
};
|
|
1344
|
-
s.toFraction = function(e) {
|
|
1345
|
-
var t, i, s, o, l, u, f, p, h, g, b, d, j = this, x = j.c;
|
|
1346
|
-
if (e != null) {
|
|
1347
|
-
f = new m(e);
|
|
1348
|
-
if (!f.isInteger() && (f.c || f.s !== 1) || f.lt(n)) {
|
|
1349
|
-
throw Error(ee + "Argument " + (f.isInteger() ? "out of range: " : "not an integer: ") + y(f));
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
if (!x) return new m(j);
|
|
1353
|
-
t = new m(n);
|
|
1354
|
-
h = i = new m(n);
|
|
1355
|
-
s = p = new m(n);
|
|
1356
|
-
d = fe(x);
|
|
1357
|
-
l = t.e = d.length - j.e - 1;
|
|
1358
|
-
t.c[0] = ne[(u = l % ie) < 0 ? ie + u : u];
|
|
1359
|
-
e = !e || f.comparedTo(t) > 0 ? l > 0 ? t : h : f;
|
|
1360
|
-
u = a;
|
|
1361
|
-
a = 1 / 0;
|
|
1362
|
-
f = new m(d);
|
|
1363
|
-
p.c[0] = 0;
|
|
1364
|
-
for (;;) {
|
|
1365
|
-
g = r(f, t, 0, 1);
|
|
1366
|
-
o = i.plus(g.times(s));
|
|
1367
|
-
if (o.comparedTo(e) == 1) break;
|
|
1368
|
-
i = s;
|
|
1369
|
-
s = o;
|
|
1370
|
-
h = p.plus(g.times(o = h));
|
|
1371
|
-
p = o;
|
|
1372
|
-
t = f.minus(g.times(o = t));
|
|
1373
|
-
f = o;
|
|
1374
|
-
}
|
|
1375
|
-
o = r(e.minus(i), s, 0, 1);
|
|
1376
|
-
p = p.plus(o.times(h));
|
|
1377
|
-
i = i.plus(o.times(s));
|
|
1378
|
-
p.s = h.s = j.s;
|
|
1379
|
-
l = l * 2;
|
|
1380
|
-
b = r(h, s, l, c).minus(j).abs().comparedTo(r(p, i, l, c).minus(j).abs()) < 1 ? [ h, s ] : [ p, i ];
|
|
1381
|
-
a = u;
|
|
1382
|
-
return b;
|
|
1383
|
-
};
|
|
1384
|
-
s.toNumber = function() {
|
|
1385
|
-
return +y(this);
|
|
1386
|
-
};
|
|
1387
|
-
s.toPrecision = function(e, r) {
|
|
1388
|
-
if (e != null) pe(e, 1, ce);
|
|
1389
|
-
return x(this, e, r, 2);
|
|
1390
|
-
};
|
|
1391
|
-
s.toString = function(e) {
|
|
1392
|
-
var r, i = this, s = i.s, n = i.e;
|
|
1393
|
-
if (n === null) {
|
|
1394
|
-
if (s) {
|
|
1395
|
-
r = "Infinity";
|
|
1396
|
-
if (s < 0) r = "-" + r;
|
|
1397
|
-
} else {
|
|
1398
|
-
r = "NaN";
|
|
1399
|
-
}
|
|
1400
|
-
} else {
|
|
1401
|
-
if (e == null) {
|
|
1402
|
-
r = n <= l || n >= u ? ge(fe(i.c), n) : be(fe(i.c), n, "0");
|
|
1403
|
-
} else if (e === 10 && j) {
|
|
1404
|
-
i = w(new m(i), o + n + 1, c);
|
|
1405
|
-
r = be(fe(i.c), i.e, "0");
|
|
1406
|
-
} else {
|
|
1407
|
-
pe(e, 2, d.length, "Base");
|
|
1408
|
-
r = t(be(fe(i.c), n, "0"), 10, e, s, true);
|
|
1409
|
-
}
|
|
1410
|
-
if (s < 0 && i.c[0]) r = "-" + r;
|
|
1411
|
-
}
|
|
1412
|
-
return r;
|
|
1413
|
-
};
|
|
1414
|
-
s.valueOf = s.toJSON = function() {
|
|
1415
|
-
return y(this);
|
|
1416
|
-
};
|
|
1417
|
-
s._isBigNumber = true;
|
|
1418
|
-
s[Symbol.toStringTag] = "BigNumber";
|
|
1419
|
-
s[Symbol.for("nodejs.util.inspect.custom")] = s.valueOf;
|
|
1420
|
-
if (e != null) m.set(e);
|
|
1421
|
-
return m;
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
function ue(e) {
|
|
1425
|
-
var r = e | 0;
|
|
1426
|
-
return e > 0 || e === r ? r : r - 1;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
function fe(e) {
|
|
1430
|
-
var r, t, i = 1, s = e.length, n = e[0] + "";
|
|
1431
|
-
for (;i < s; ) {
|
|
1432
|
-
r = e[i++] + "";
|
|
1433
|
-
t = ie - r.length;
|
|
1434
|
-
for (;t--; r = "0" + r) ;
|
|
1435
|
-
n += r;
|
|
1436
|
-
}
|
|
1437
|
-
for (s = n.length; n.charCodeAt(--s) === 48; ) ;
|
|
1438
|
-
return n.slice(0, s + 1 || 1);
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
function ae(e, r) {
|
|
1442
|
-
var t, i, s = e.c, n = r.c, o = e.s, c = r.s, l = e.e, u = r.e;
|
|
1443
|
-
if (!o || !c) return null;
|
|
1444
|
-
t = s && !s[0];
|
|
1445
|
-
i = n && !n[0];
|
|
1446
|
-
if (t || i) return t ? i ? 0 : -c : o;
|
|
1447
|
-
if (o != c) return o;
|
|
1448
|
-
t = o < 0;
|
|
1449
|
-
i = l == u;
|
|
1450
|
-
if (!s || !n) return i ? 0 : !s ^ t ? 1 : -1;
|
|
1451
|
-
if (!i) return l > u ^ t ? 1 : -1;
|
|
1452
|
-
c = (l = s.length) < (u = n.length) ? l : u;
|
|
1453
|
-
for (o = 0; o < c; o++) if (s[o] != n[o]) return s[o] > n[o] ^ t ? 1 : -1;
|
|
1454
|
-
return l == u ? 0 : l > u ^ t ? 1 : -1;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
function pe(e, r, t, i) {
|
|
1458
|
-
if (e < r || e > t || e !== Q(e)) {
|
|
1459
|
-
throw Error(ee + (i || "Argument") + (typeof e == "number" ? e < r || e > t ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
function he(e) {
|
|
1464
|
-
var r = e.c.length - 1;
|
|
1465
|
-
return ue(e.e / ie) == r && e.c[r] % 2 != 0;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
function ge(e, r) {
|
|
1469
|
-
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (r < 0 ? "e" : "e+") + r;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
function be(e, r, t) {
|
|
1473
|
-
var i, s;
|
|
1474
|
-
if (r < 0) {
|
|
1475
|
-
for (s = t + "."; ++r; s += t) ;
|
|
1476
|
-
e = s + e;
|
|
1477
|
-
} else {
|
|
1478
|
-
i = e.length;
|
|
1479
|
-
if (++r > i) {
|
|
1480
|
-
for (s = t, r -= i; --r; s += t) ;
|
|
1481
|
-
e += s;
|
|
1482
|
-
} else if (r < i) {
|
|
1483
|
-
e = e.slice(0, r) + "." + e.slice(r);
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
return e;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
var de = le();
|
|
179
|
+
require("node:util");
|
|
1490
180
|
|
|
1491
181
|
exports.ArrayToSet = e.ArrayToSet;
|
|
1492
182
|
|
|
1493
183
|
exports.As = r.As;
|
|
1494
184
|
|
|
1495
|
-
exports.Delay =
|
|
185
|
+
exports.Delay = s.Delay;
|
|
1496
186
|
|
|
1497
|
-
exports.DevNull =
|
|
187
|
+
exports.DevNull = t.DevNull;
|
|
1498
188
|
|
|
1499
|
-
exports.GetObjectNestingDepth =
|
|
189
|
+
exports.GetObjectNestingDepth = o.GetObjectNestingDepth;
|
|
1500
190
|
|
|
1501
|
-
exports.GetObjectPropertyPaths =
|
|
191
|
+
exports.GetObjectPropertyPaths = c.GetObjectPropertyPaths;
|
|
1502
192
|
|
|
1503
|
-
exports.GraceExit =
|
|
193
|
+
exports.GraceExit = i.GraceExit;
|
|
1504
194
|
|
|
1505
|
-
exports.IsEmptyObject =
|
|
195
|
+
exports.IsEmptyObject = n.IsEmptyObject;
|
|
1506
196
|
|
|
1507
197
|
exports.IsExists = l.IsExists;
|
|
1508
198
|
|
|
1509
|
-
exports.IsGlobString =
|
|
199
|
+
exports.IsGlobString = p.IsGlobString;
|
|
1510
200
|
|
|
1511
|
-
exports.IsHtml =
|
|
201
|
+
exports.IsHtml = a.IsHtml;
|
|
1512
202
|
|
|
1513
|
-
exports.IsNativeFunction =
|
|
203
|
+
exports.IsNativeFunction = u.IsNativeFunction;
|
|
1514
204
|
|
|
1515
|
-
exports.IsPromise =
|
|
205
|
+
exports.IsPromise = b.IsPromise;
|
|
1516
206
|
|
|
1517
|
-
exports.IsPromiseLike =
|
|
207
|
+
exports.IsPromiseLike = j.IsPromiseLike;
|
|
1518
208
|
|
|
1519
|
-
exports.IsSymbol =
|
|
209
|
+
exports.IsSymbol = q.IsSymbol;
|
|
1520
210
|
|
|
1521
|
-
exports.IsXML =
|
|
211
|
+
exports.IsXML = x.IsXML;
|
|
1522
212
|
|
|
1523
|
-
exports.NoCase =
|
|
213
|
+
exports.NoCase = h.NoCase;
|
|
1524
214
|
|
|
1525
|
-
exports.Split =
|
|
215
|
+
exports.Split = h.Split;
|
|
1526
216
|
|
|
1527
|
-
exports.ToLower =
|
|
217
|
+
exports.ToLower = h.ToLower;
|
|
1528
218
|
|
|
1529
|
-
exports.ToUpper =
|
|
219
|
+
exports.ToUpper = h.ToUpper;
|
|
1530
220
|
|
|
1531
|
-
exports.ObjectConstructor =
|
|
221
|
+
exports.ObjectConstructor = g.ObjectConstructor;
|
|
1532
222
|
|
|
1533
|
-
exports.ObjectHash =
|
|
223
|
+
exports.ObjectHash = d.ObjectHash;
|
|
1534
224
|
|
|
1535
|
-
exports.ObjectParentConstructor =
|
|
225
|
+
exports.ObjectParentConstructor = I.ObjectParentConstructor;
|
|
1536
226
|
|
|
1537
|
-
exports.ObjectParentConstructors =
|
|
227
|
+
exports.ObjectParentConstructors = S.ObjectParentConstructors;
|
|
1538
228
|
|
|
1539
|
-
exports.ObjectPrototype =
|
|
229
|
+
exports.ObjectPrototype = y.ObjectPrototype;
|
|
1540
230
|
|
|
1541
|
-
exports.SetToArray =
|
|
231
|
+
exports.SetToArray = P.SetToArray;
|
|
1542
232
|
|
|
1543
|
-
exports.MissingValueError =
|
|
233
|
+
exports.MissingValueError = T.MissingValueError;
|
|
1544
234
|
|
|
1545
|
-
exports.Templating =
|
|
235
|
+
exports.Templating = T.Templating;
|
|
1546
236
|
|
|
1547
|
-
exports.UniqueArray =
|
|
237
|
+
exports.UniqueArray = E.UniqueArray;
|
|
1548
238
|
|
|
1549
|
-
exports.ObjectToMap =
|
|
239
|
+
exports.ObjectToMap = v.ObjectToMap;
|
|
1550
240
|
|
|
1551
|
-
exports.IsPath =
|
|
241
|
+
exports.IsPath = A.IsPath;
|
|
1552
242
|
|
|
1553
|
-
exports.ConvertArrayLikeToIterable =
|
|
243
|
+
exports.ConvertArrayLikeToIterable = O.ConvertArrayLikeToIterable;
|
|
1554
244
|
|
|
1555
|
-
exports.ConvertArrayLikeToStream =
|
|
245
|
+
exports.ConvertArrayLikeToStream = m.ConvertArrayLikeToStream;
|
|
1556
246
|
|
|
1557
|
-
exports.MergeSet =
|
|
247
|
+
exports.MergeSet = H.MergeSet;
|
|
1558
248
|
|
|
1559
|
-
exports.MergeArray =
|
|
249
|
+
exports.MergeArray = M.MergeArray;
|
|
1560
250
|
|
|
1561
|
-
exports.MergeMap =
|
|
251
|
+
exports.MergeMap = k.MergeMap;
|
|
1562
252
|
|
|
1563
|
-
exports.SortArray =
|
|
253
|
+
exports.SortArray = C.SortArray;
|
|
1564
254
|
|
|
1565
255
|
exports.SortKeys = L.SortKeys;
|
|
1566
256
|
|
|
1567
|
-
exports.SortObject =
|
|
257
|
+
exports.SortObject = N.SortObject;
|
|
1568
258
|
|
|
1569
259
|
exports.RandomString = D.RandomString;
|
|
1570
260
|
|
|
1571
|
-
exports.NonceStr =
|
|
261
|
+
exports.NonceStr = G.NonceStr;
|
|
1572
262
|
|
|
1573
|
-
exports.IsAbortError =
|
|
263
|
+
exports.IsAbortError = U.IsAbortError;
|
|
1574
264
|
|
|
1575
|
-
exports.Glob =
|
|
265
|
+
exports.Glob = B.Glob;
|
|
1576
266
|
|
|
1577
267
|
exports.IP = R.IP;
|
|
1578
268
|
|
|
@@ -1580,26 +270,26 @@ exports.IPv4 = R.IPv4;
|
|
|
1580
270
|
|
|
1581
271
|
exports.IPv6 = R.IPv6;
|
|
1582
272
|
|
|
1583
|
-
exports.HexToUnsigned =
|
|
273
|
+
exports.HexToUnsigned = f.HexToUnsigned;
|
|
1584
274
|
|
|
1585
|
-
exports.UnsignedToHex =
|
|
275
|
+
exports.UnsignedToHex = V.UnsignedToHex;
|
|
1586
276
|
|
|
1587
|
-
exports.HexToSigned =
|
|
277
|
+
exports.HexToSigned = K.HexToSigned;
|
|
1588
278
|
|
|
1589
|
-
exports.SignedToHex =
|
|
279
|
+
exports.SignedToHex = w.SignedToHex;
|
|
1590
280
|
|
|
1591
|
-
exports.HexToIEEE754 =
|
|
281
|
+
exports.HexToIEEE754 = F.HexToIEEE754;
|
|
1592
282
|
|
|
1593
|
-
exports.IEEE754ToHex =
|
|
283
|
+
exports.IEEE754ToHex = X.IEEE754ToHex;
|
|
1594
284
|
|
|
1595
|
-
exports.MD5 =
|
|
285
|
+
exports.MD5 = W.MD5;
|
|
1596
286
|
|
|
1597
|
-
exports.SHA1 =
|
|
287
|
+
exports.SHA1 = _.SHA1;
|
|
1598
288
|
|
|
1599
|
-
exports.SHA256 =
|
|
289
|
+
exports.SHA256 = z.SHA256;
|
|
1600
290
|
|
|
1601
|
-
exports.URLBuilder =
|
|
291
|
+
exports.URLBuilder = J.URLBuilder;
|
|
1602
292
|
|
|
1603
|
-
exports.Statistics =
|
|
293
|
+
exports.Statistics = Q.Statistics;
|
|
1604
294
|
|
|
1605
|
-
exports.BigNumber =
|
|
295
|
+
exports.BigNumber = Y.BigNumber;
|