parse 7.1.0 → 7.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +127 -626
- package/dist/parse.min.js +1 -1
- package/dist/parse.weapp.js +1 -1
- package/dist/parse.weapp.min.js +1 -1
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/uuid.js +4 -2
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/uuid.js +1 -2
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/uuid.js +2 -0
- package/package.json +1 -3
package/dist/parse.js
CHANGED
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
SERVER_URL: "https://api.parse.com/1",
|
|
192
192
|
LIVEQUERY_SERVER_URL: null,
|
|
193
193
|
ENCRYPTED_KEY: null,
|
|
194
|
-
VERSION: "js7.1.
|
|
194
|
+
VERSION: "js7.1.1-alpha.1",
|
|
195
195
|
APPLICATION_ID: null,
|
|
196
196
|
JAVASCRIPT_KEY: null,
|
|
197
197
|
MAINTENANCE_KEY: null,
|
|
@@ -2012,24 +2012,24 @@
|
|
|
2012
2012
|
var c = n + a, e = q[c];
|
|
2013
2013
|
q[c] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360;
|
|
2014
2014
|
}
|
|
2015
|
-
var a = this._hash.words, c = q[n + 0], e = q[n + 1], j = q[n + 2], k = q[n + 3], z = q[n + 4], r2 = q[n + 5], t2 = q[n + 6], w2 = q[n + 7], v2 = q[n + 8], A = q[n + 9], B = q[n + 10], C = q[n + 11], u2 = q[n + 12], D = q[n + 13], E = q[n + 14], x2 = q[n + 15],
|
|
2015
|
+
var a = this._hash.words, c = q[n + 0], e = q[n + 1], j = q[n + 2], k = q[n + 3], z = q[n + 4], r2 = q[n + 5], t2 = q[n + 6], w2 = q[n + 7], v2 = q[n + 8], A = q[n + 9], B = q[n + 10], C = q[n + 11], u2 = q[n + 12], D = q[n + 13], E = q[n + 14], x2 = q[n + 15], f = a[0], m = a[1], g = a[2], h = a[3], f = p(f, m, g, h, c, 7, b[0]), h = p(h, f, m, g, e, 12, b[1]), g = p(g, h, f, m, j, 17, b[2]), m = p(m, g, h, f, k, 22, b[3]), f = p(f, m, g, h, z, 7, b[4]), h = p(h, f, m, g, r2, 12, b[5]), g = p(g, h, f, m, t2, 17, b[6]), m = p(m, g, h, f, w2, 22, b[7]), f = p(f, m, g, h, v2, 7, b[8]), h = p(h, f, m, g, A, 12, b[9]), g = p(g, h, f, m, B, 17, b[10]), m = p(m, g, h, f, C, 22, b[11]), f = p(f, m, g, h, u2, 7, b[12]), h = p(h, f, m, g, D, 12, b[13]), g = p(g, h, f, m, E, 17, b[14]), m = p(m, g, h, f, x2, 22, b[15]), f = d(f, m, g, h, e, 5, b[16]), h = d(h, f, m, g, t2, 9, b[17]), g = d(g, h, f, m, C, 14, b[18]), m = d(m, g, h, f, c, 20, b[19]), f = d(f, m, g, h, r2, 5, b[20]), h = d(h, f, m, g, B, 9, b[21]), g = d(g, h, f, m, x2, 14, b[22]), m = d(m, g, h, f, z, 20, b[23]), f = d(f, m, g, h, A, 5, b[24]), h = d(h, f, m, g, E, 9, b[25]), g = d(g, h, f, m, k, 14, b[26]), m = d(m, g, h, f, v2, 20, b[27]), f = d(f, m, g, h, D, 5, b[28]), h = d(
|
|
2016
2016
|
h,
|
|
2017
|
-
|
|
2017
|
+
f,
|
|
2018
2018
|
m,
|
|
2019
2019
|
g,
|
|
2020
2020
|
j,
|
|
2021
2021
|
9,
|
|
2022
2022
|
b[29]
|
|
2023
|
-
), g = d(g, h,
|
|
2023
|
+
), g = d(g, h, f, m, w2, 14, b[30]), m = d(m, g, h, f, u2, 20, b[31]), f = l(f, m, g, h, r2, 4, b[32]), h = l(h, f, m, g, v2, 11, b[33]), g = l(g, h, f, m, C, 16, b[34]), m = l(m, g, h, f, E, 23, b[35]), f = l(f, m, g, h, e, 4, b[36]), h = l(h, f, m, g, z, 11, b[37]), g = l(g, h, f, m, w2, 16, b[38]), m = l(m, g, h, f, B, 23, b[39]), f = l(f, m, g, h, D, 4, b[40]), h = l(h, f, m, g, c, 11, b[41]), g = l(g, h, f, m, k, 16, b[42]), m = l(m, g, h, f, t2, 23, b[43]), f = l(f, m, g, h, A, 4, b[44]), h = l(h, f, m, g, u2, 11, b[45]), g = l(g, h, f, m, x2, 16, b[46]), m = l(m, g, h, f, j, 23, b[47]), f = s(f, m, g, h, c, 6, b[48]), h = s(h, f, m, g, w2, 10, b[49]), g = s(
|
|
2024
2024
|
g,
|
|
2025
2025
|
h,
|
|
2026
|
-
|
|
2026
|
+
f,
|
|
2027
2027
|
m,
|
|
2028
2028
|
E,
|
|
2029
2029
|
15,
|
|
2030
2030
|
b[50]
|
|
2031
|
-
), m = s(m, g, h,
|
|
2032
|
-
a[0] = a[0] +
|
|
2031
|
+
), m = s(m, g, h, f, r2, 21, b[51]), f = s(f, m, g, h, u2, 6, b[52]), h = s(h, f, m, g, k, 10, b[53]), g = s(g, h, f, m, B, 15, b[54]), m = s(m, g, h, f, e, 21, b[55]), f = s(f, m, g, h, v2, 6, b[56]), h = s(h, f, m, g, x2, 10, b[57]), g = s(g, h, f, m, t2, 15, b[58]), m = s(m, g, h, f, D, 21, b[59]), f = s(f, m, g, h, z, 6, b[60]), h = s(h, f, m, g, C, 10, b[61]), g = s(g, h, f, m, j, 15, b[62]), m = s(m, g, h, f, A, 21, b[63]);
|
|
2032
|
+
a[0] = a[0] + f | 0;
|
|
2033
2033
|
a[1] = a[1] + m | 0;
|
|
2034
2034
|
a[2] = a[2] + g | 0;
|
|
2035
2035
|
a[3] = a[3] + h | 0;
|
|
@@ -2287,12 +2287,12 @@
|
|
|
2287
2287
|
d2 = a2[c2 + 1];
|
|
2288
2288
|
a2[c2 + 1] = a2[c2 + 3];
|
|
2289
2289
|
a2[c2 + 3] = d2;
|
|
2290
|
-
}, _doCryptBlock: function(a2, b2, c2, d2, e2, j2, l2,
|
|
2290
|
+
}, _doCryptBlock: function(a2, b2, c2, d2, e2, j2, l2, f) {
|
|
2291
2291
|
for (var m = this._nRounds, g = a2[b2] ^ c2[0], h = a2[b2 + 1] ^ c2[1], k2 = a2[b2 + 2] ^ c2[2], n2 = a2[b2 + 3] ^ c2[3], p2 = 4, r2 = 1; r2 < m; r2++) var q2 = d2[g >>> 24] ^ e2[h >>> 16 & 255] ^ j2[k2 >>> 8 & 255] ^ l2[n2 & 255] ^ c2[p2++], s2 = d2[h >>> 24] ^ e2[k2 >>> 16 & 255] ^ j2[n2 >>> 8 & 255] ^ l2[g & 255] ^ c2[p2++], t2 = d2[k2 >>> 24] ^ e2[n2 >>> 16 & 255] ^ j2[g >>> 8 & 255] ^ l2[h & 255] ^ c2[p2++], n2 = d2[n2 >>> 24] ^ e2[g >>> 16 & 255] ^ j2[h >>> 8 & 255] ^ l2[k2 & 255] ^ c2[p2++], g = q2, h = s2, k2 = t2;
|
|
2292
|
-
q2 = (
|
|
2293
|
-
s2 = (
|
|
2294
|
-
t2 = (
|
|
2295
|
-
n2 = (
|
|
2292
|
+
q2 = (f[g >>> 24] << 24 | f[h >>> 16 & 255] << 16 | f[k2 >>> 8 & 255] << 8 | f[n2 & 255]) ^ c2[p2++];
|
|
2293
|
+
s2 = (f[h >>> 24] << 24 | f[k2 >>> 16 & 255] << 16 | f[n2 >>> 8 & 255] << 8 | f[g & 255]) ^ c2[p2++];
|
|
2294
|
+
t2 = (f[k2 >>> 24] << 24 | f[n2 >>> 16 & 255] << 16 | f[g >>> 8 & 255] << 8 | f[h & 255]) ^ c2[p2++];
|
|
2295
|
+
n2 = (f[n2 >>> 24] << 24 | f[g >>> 16 & 255] << 16 | f[h >>> 8 & 255] << 8 | f[k2 & 255]) ^ c2[p2++];
|
|
2296
2296
|
a2[b2] = q2;
|
|
2297
2297
|
a2[b2 + 1] = s2;
|
|
2298
2298
|
a2[b2 + 2] = t2;
|
|
@@ -4175,8 +4175,8 @@
|
|
|
4175
4175
|
throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11");
|
|
4176
4176
|
}
|
|
4177
4177
|
var Buffer2 = requireSafeBuffer$a().Buffer;
|
|
4178
|
-
var
|
|
4179
|
-
if (
|
|
4178
|
+
var crypto = commonjsGlobal.crypto || commonjsGlobal.msCrypto;
|
|
4179
|
+
if (crypto && crypto.getRandomValues) {
|
|
4180
4180
|
browser$c.exports = randomBytes;
|
|
4181
4181
|
} else {
|
|
4182
4182
|
browser$c.exports = oldBrowser;
|
|
@@ -4187,10 +4187,10 @@
|
|
|
4187
4187
|
if (size > 0) {
|
|
4188
4188
|
if (size > MAX_BYTES) {
|
|
4189
4189
|
for (var generated = 0; generated < size; generated += MAX_BYTES) {
|
|
4190
|
-
|
|
4190
|
+
crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES));
|
|
4191
4191
|
}
|
|
4192
4192
|
} else {
|
|
4193
|
-
|
|
4193
|
+
crypto.getRandomValues(bytes);
|
|
4194
4194
|
}
|
|
4195
4195
|
}
|
|
4196
4196
|
if (typeof cb === "function") {
|
|
@@ -4821,13 +4821,13 @@
|
|
|
4821
4821
|
floor = Math.floor;
|
|
4822
4822
|
return floor;
|
|
4823
4823
|
}
|
|
4824
|
-
var max
|
|
4824
|
+
var max;
|
|
4825
4825
|
var hasRequiredMax;
|
|
4826
4826
|
function requireMax() {
|
|
4827
|
-
if (hasRequiredMax) return max
|
|
4827
|
+
if (hasRequiredMax) return max;
|
|
4828
4828
|
hasRequiredMax = 1;
|
|
4829
|
-
max
|
|
4830
|
-
return max
|
|
4829
|
+
max = Math.max;
|
|
4830
|
+
return max;
|
|
4831
4831
|
}
|
|
4832
4832
|
var min;
|
|
4833
4833
|
var hasRequiredMin;
|
|
@@ -6178,8 +6178,8 @@
|
|
|
6178
6178
|
var isGeneratorFunction2 = requireIsGeneratorFunction();
|
|
6179
6179
|
var whichTypedArray2 = /* @__PURE__ */ requireWhichTypedArray();
|
|
6180
6180
|
var isTypedArray2 = /* @__PURE__ */ requireIsTypedArray();
|
|
6181
|
-
function uncurryThis(
|
|
6182
|
-
return
|
|
6181
|
+
function uncurryThis(f) {
|
|
6182
|
+
return f.call.bind(f);
|
|
6183
6183
|
}
|
|
6184
6184
|
var BigIntSupported = typeof BigInt !== "undefined";
|
|
6185
6185
|
var SymbolSupported = typeof Symbol !== "undefined";
|
|
@@ -6423,8 +6423,8 @@
|
|
|
6423
6423
|
return descriptors;
|
|
6424
6424
|
};
|
|
6425
6425
|
var formatRegExp = /%[sdj%]/g;
|
|
6426
|
-
exports2.format = function(
|
|
6427
|
-
if (!isString(
|
|
6426
|
+
exports2.format = function(f) {
|
|
6427
|
+
if (!isString(f)) {
|
|
6428
6428
|
var objects = [];
|
|
6429
6429
|
for (var i2 = 0; i2 < arguments.length; i2++) {
|
|
6430
6430
|
objects.push(inspect(arguments[i2]));
|
|
@@ -6434,7 +6434,7 @@
|
|
|
6434
6434
|
var i2 = 1;
|
|
6435
6435
|
var args = arguments;
|
|
6436
6436
|
var len2 = args.length;
|
|
6437
|
-
var str = String(
|
|
6437
|
+
var str = String(f).replace(formatRegExp, function(x2) {
|
|
6438
6438
|
if (x2 === "%%") return "%";
|
|
6439
6439
|
if (i2 >= len2) return x2;
|
|
6440
6440
|
switch (x2) {
|
|
@@ -10618,10 +10618,10 @@
|
|
|
10618
10618
|
sha$1 = Sha;
|
|
10619
10619
|
return sha$1;
|
|
10620
10620
|
}
|
|
10621
|
-
var sha1$
|
|
10621
|
+
var sha1$2;
|
|
10622
10622
|
var hasRequiredSha1$1;
|
|
10623
10623
|
function requireSha1$1() {
|
|
10624
|
-
if (hasRequiredSha1$1) return sha1$
|
|
10624
|
+
if (hasRequiredSha1$1) return sha1$2;
|
|
10625
10625
|
hasRequiredSha1$1 = 1;
|
|
10626
10626
|
var inherits = requireInherits_browser();
|
|
10627
10627
|
var Hash = requireHash$1();
|
|
@@ -10702,8 +10702,8 @@
|
|
|
10702
10702
|
H.writeInt32BE(this._e | 0, 16);
|
|
10703
10703
|
return H;
|
|
10704
10704
|
};
|
|
10705
|
-
sha1$
|
|
10706
|
-
return sha1$
|
|
10705
|
+
sha1$2 = Sha1;
|
|
10706
|
+
return sha1$2;
|
|
10707
10707
|
}
|
|
10708
10708
|
var sha256$1;
|
|
10709
10709
|
var hasRequiredSha256;
|
|
@@ -10822,7 +10822,7 @@
|
|
|
10822
10822
|
var c = this._c | 0;
|
|
10823
10823
|
var d = this._d | 0;
|
|
10824
10824
|
var e = this._e | 0;
|
|
10825
|
-
var
|
|
10825
|
+
var f = this._f | 0;
|
|
10826
10826
|
var g = this._g | 0;
|
|
10827
10827
|
var h = this._h | 0;
|
|
10828
10828
|
for (var i2 = 0; i2 < 16; ++i2) {
|
|
@@ -10832,11 +10832,11 @@
|
|
|
10832
10832
|
w[i2] = gamma1(w[i2 - 2]) + w[i2 - 7] + gamma0(w[i2 - 15]) + w[i2 - 16] | 0;
|
|
10833
10833
|
}
|
|
10834
10834
|
for (var j = 0; j < 64; ++j) {
|
|
10835
|
-
var T1 = h + sigma1(e) + ch(e,
|
|
10835
|
+
var T1 = h + sigma1(e) + ch(e, f, g) + K[j] + w[j] | 0;
|
|
10836
10836
|
var T2 = sigma0(a) + maj(a, b, c) | 0;
|
|
10837
10837
|
h = g;
|
|
10838
|
-
g =
|
|
10839
|
-
|
|
10838
|
+
g = f;
|
|
10839
|
+
f = e;
|
|
10840
10840
|
e = d + T1 | 0;
|
|
10841
10841
|
d = c;
|
|
10842
10842
|
c = b;
|
|
@@ -10848,7 +10848,7 @@
|
|
|
10848
10848
|
this._c = c + this._c | 0;
|
|
10849
10849
|
this._d = d + this._d | 0;
|
|
10850
10850
|
this._e = e + this._e | 0;
|
|
10851
|
-
this._f =
|
|
10851
|
+
this._f = f + this._f | 0;
|
|
10852
10852
|
this._g = g + this._g | 0;
|
|
10853
10853
|
this._h = h + this._h | 0;
|
|
10854
10854
|
};
|
|
@@ -11577,16 +11577,16 @@
|
|
|
11577
11577
|
legacy = Hmac;
|
|
11578
11578
|
return legacy;
|
|
11579
11579
|
}
|
|
11580
|
-
var md5$
|
|
11580
|
+
var md5$3;
|
|
11581
11581
|
var hasRequiredMd5$2;
|
|
11582
11582
|
function requireMd5$2() {
|
|
11583
|
-
if (hasRequiredMd5$2) return md5$
|
|
11583
|
+
if (hasRequiredMd5$2) return md5$3;
|
|
11584
11584
|
hasRequiredMd5$2 = 1;
|
|
11585
11585
|
var MD5 = requireMd5_js();
|
|
11586
|
-
md5$
|
|
11586
|
+
md5$3 = function(buffer2) {
|
|
11587
11587
|
return new MD5().update(buffer2).digest();
|
|
11588
11588
|
};
|
|
11589
|
-
return md5$
|
|
11589
|
+
return md5$3;
|
|
11590
11590
|
}
|
|
11591
11591
|
var browser$9;
|
|
11592
11592
|
var hasRequiredBrowser$9;
|
|
@@ -13595,10 +13595,10 @@
|
|
|
13595
13595
|
};
|
|
13596
13596
|
return makeHash;
|
|
13597
13597
|
}
|
|
13598
|
-
var md5$
|
|
13598
|
+
var md5$2;
|
|
13599
13599
|
var hasRequiredMd5$1;
|
|
13600
13600
|
function requireMd5$1() {
|
|
13601
|
-
if (hasRequiredMd5$1) return md5$
|
|
13601
|
+
if (hasRequiredMd5$1) return md5$2;
|
|
13602
13602
|
hasRequiredMd5$1 = 1;
|
|
13603
13603
|
var makeHash2 = requireMakeHash();
|
|
13604
13604
|
function core_md5(x, len2) {
|
|
@@ -13707,10 +13707,10 @@
|
|
|
13707
13707
|
function bit_rol(num, cnt) {
|
|
13708
13708
|
return num << cnt | num >>> 32 - cnt;
|
|
13709
13709
|
}
|
|
13710
|
-
md5$
|
|
13710
|
+
md5$2 = function md52(buf) {
|
|
13711
13711
|
return makeHash2(buf, core_md5);
|
|
13712
13712
|
};
|
|
13713
|
-
return md5$
|
|
13713
|
+
return md5$2;
|
|
13714
13714
|
}
|
|
13715
13715
|
var hashBase;
|
|
13716
13716
|
var hasRequiredHashBase;
|
|
@@ -15433,9 +15433,9 @@
|
|
|
15433
15433
|
keyL ^= state2.tmp[0];
|
|
15434
15434
|
keyR ^= state2.tmp[1];
|
|
15435
15435
|
var s = utils2.substitute(keyL, keyR);
|
|
15436
|
-
var
|
|
15436
|
+
var f = utils2.permute(s);
|
|
15437
15437
|
var t = r;
|
|
15438
|
-
r = (l ^
|
|
15438
|
+
r = (l ^ f) >>> 0;
|
|
15439
15439
|
l = t;
|
|
15440
15440
|
}
|
|
15441
15441
|
utils2.rip(r, l, out, off);
|
|
@@ -15450,9 +15450,9 @@
|
|
|
15450
15450
|
keyL ^= state2.tmp[0];
|
|
15451
15451
|
keyR ^= state2.tmp[1];
|
|
15452
15452
|
var s = utils2.substitute(keyL, keyR);
|
|
15453
|
-
var
|
|
15453
|
+
var f = utils2.permute(s);
|
|
15454
15454
|
var t = l;
|
|
15455
|
-
l = (r ^
|
|
15455
|
+
l = (r ^ f) >>> 0;
|
|
15456
15456
|
r = t;
|
|
15457
15457
|
}
|
|
15458
15458
|
utils2.rip(l, r, out, off);
|
|
@@ -22321,11 +22321,11 @@
|
|
|
22321
22321
|
}
|
|
22322
22322
|
} else {
|
|
22323
22323
|
try {
|
|
22324
|
-
var
|
|
22325
|
-
if (typeof
|
|
22324
|
+
var crypto = requireCryptoBrowserify();
|
|
22325
|
+
if (typeof crypto.randomBytes !== "function")
|
|
22326
22326
|
throw new Error("Not supported");
|
|
22327
22327
|
Rand.prototype._rand = function _rand(n) {
|
|
22328
|
-
return
|
|
22328
|
+
return crypto.randomBytes(n);
|
|
22329
22329
|
};
|
|
22330
22330
|
} catch (e) {
|
|
22331
22331
|
}
|
|
@@ -27317,9 +27317,9 @@
|
|
|
27317
27317
|
return browserifyRsa;
|
|
27318
27318
|
}
|
|
27319
27319
|
var elliptic = {};
|
|
27320
|
-
const version
|
|
27320
|
+
const version = "6.6.1";
|
|
27321
27321
|
const require$$0 = {
|
|
27322
|
-
version
|
|
27322
|
+
version
|
|
27323
27323
|
};
|
|
27324
27324
|
var utils$2 = {};
|
|
27325
27325
|
var bn$7 = { exports: {} };
|
|
@@ -30336,7 +30336,7 @@
|
|
|
30336
30336
|
BaseCurve.prototype.point = function point() {
|
|
30337
30337
|
throw new Error("Not implemented");
|
|
30338
30338
|
};
|
|
30339
|
-
BaseCurve.prototype.validate = function
|
|
30339
|
+
BaseCurve.prototype.validate = function validate() {
|
|
30340
30340
|
throw new Error("Not implemented");
|
|
30341
30341
|
};
|
|
30342
30342
|
BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
|
|
@@ -30526,7 +30526,7 @@
|
|
|
30526
30526
|
BasePoint.prototype.eq = function eq() {
|
|
30527
30527
|
throw new Error("Not implemented");
|
|
30528
30528
|
};
|
|
30529
|
-
BasePoint.prototype.validate = function
|
|
30529
|
+
BasePoint.prototype.validate = function validate() {
|
|
30530
30530
|
return this.curve.validate(this);
|
|
30531
30531
|
};
|
|
30532
30532
|
BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
|
|
@@ -30755,13 +30755,13 @@
|
|
|
30755
30755
|
};
|
|
30756
30756
|
ShortCurve.prototype._endoSplit = function _endoSplit(k) {
|
|
30757
30757
|
var basis = this.endo.basis;
|
|
30758
|
-
var
|
|
30758
|
+
var v1 = basis[0];
|
|
30759
30759
|
var v2 = basis[1];
|
|
30760
30760
|
var c1 = v2.b.mul(k).divRound(this.n);
|
|
30761
|
-
var c2 =
|
|
30762
|
-
var p1 = c1.mul(
|
|
30761
|
+
var c2 = v1.b.neg().mul(k).divRound(this.n);
|
|
30762
|
+
var p1 = c1.mul(v1.a);
|
|
30763
30763
|
var p2 = c2.mul(v2.a);
|
|
30764
|
-
var q1 = c1.mul(
|
|
30764
|
+
var q1 = c1.mul(v1.b);
|
|
30765
30765
|
var q2 = c2.mul(v2.b);
|
|
30766
30766
|
var k1 = k.sub(p1).sub(p2);
|
|
30767
30767
|
var k2 = q1.add(q2).neg();
|
|
@@ -30780,7 +30780,7 @@
|
|
|
30780
30780
|
y = y.redNeg();
|
|
30781
30781
|
return this.point(x, y);
|
|
30782
30782
|
};
|
|
30783
|
-
ShortCurve.prototype.validate = function
|
|
30783
|
+
ShortCurve.prototype.validate = function validate(point) {
|
|
30784
30784
|
if (point.inf)
|
|
30785
30785
|
return true;
|
|
30786
30786
|
var x = point.x;
|
|
@@ -31174,11 +31174,11 @@
|
|
|
31174
31174
|
var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
|
|
31175
31175
|
d = d.redIAdd(d);
|
|
31176
31176
|
var e = a.redAdd(a).redIAdd(a);
|
|
31177
|
-
var
|
|
31177
|
+
var f = e.redSqr();
|
|
31178
31178
|
var c8 = c.redIAdd(c);
|
|
31179
31179
|
c8 = c8.redIAdd(c8);
|
|
31180
31180
|
c8 = c8.redIAdd(c8);
|
|
31181
|
-
nx =
|
|
31181
|
+
nx = f.redISub(d).redISub(d);
|
|
31182
31182
|
ny = e.redMul(d.redISub(nx)).redISub(c8);
|
|
31183
31183
|
nz = this.y.redMul(this.z);
|
|
31184
31184
|
nz = nz.redIAdd(nz);
|
|
@@ -31338,7 +31338,7 @@
|
|
|
31338
31338
|
}
|
|
31339
31339
|
inherits(MontCurve, Base);
|
|
31340
31340
|
mont = MontCurve;
|
|
31341
|
-
MontCurve.prototype.validate = function
|
|
31341
|
+
MontCurve.prototype.validate = function validate(point) {
|
|
31342
31342
|
var x = point.normalize().x;
|
|
31343
31343
|
var x2 = x.redSqr();
|
|
31344
31344
|
var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
|
|
@@ -31525,7 +31525,7 @@
|
|
|
31525
31525
|
x = x.redNeg();
|
|
31526
31526
|
return this.point(x, y);
|
|
31527
31527
|
};
|
|
31528
|
-
EdwardsCurve.prototype.validate = function
|
|
31528
|
+
EdwardsCurve.prototype.validate = function validate(point) {
|
|
31529
31529
|
if (point.isInfinity())
|
|
31530
31530
|
return true;
|
|
31531
31531
|
point.normalize();
|
|
@@ -31590,12 +31590,12 @@
|
|
|
31590
31590
|
var d = this.curve._mulA(a);
|
|
31591
31591
|
var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
|
|
31592
31592
|
var g = d.redAdd(b);
|
|
31593
|
-
var
|
|
31593
|
+
var f = g.redSub(c);
|
|
31594
31594
|
var h = d.redSub(b);
|
|
31595
|
-
var nx = e.redMul(
|
|
31595
|
+
var nx = e.redMul(f);
|
|
31596
31596
|
var ny = g.redMul(h);
|
|
31597
31597
|
var nt = e.redMul(h);
|
|
31598
|
-
var nz =
|
|
31598
|
+
var nz = f.redMul(g);
|
|
31599
31599
|
return this.curve.point(nx, ny, nz, nt);
|
|
31600
31600
|
};
|
|
31601
31601
|
Point.prototype._projDbl = function _projDbl() {
|
|
@@ -31610,17 +31610,17 @@
|
|
|
31610
31610
|
var j;
|
|
31611
31611
|
if (this.curve.twisted) {
|
|
31612
31612
|
e = this.curve._mulA(c);
|
|
31613
|
-
var
|
|
31613
|
+
var f = e.redAdd(d);
|
|
31614
31614
|
if (this.zOne) {
|
|
31615
|
-
nx = b.redSub(c).redSub(d).redMul(
|
|
31616
|
-
ny =
|
|
31617
|
-
nz =
|
|
31615
|
+
nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
|
|
31616
|
+
ny = f.redMul(e.redSub(d));
|
|
31617
|
+
nz = f.redSqr().redSub(f).redSub(f);
|
|
31618
31618
|
} else {
|
|
31619
31619
|
h = this.z.redSqr();
|
|
31620
|
-
j =
|
|
31620
|
+
j = f.redSub(h).redISub(h);
|
|
31621
31621
|
nx = b.redSub(c).redISub(d).redMul(j);
|
|
31622
|
-
ny =
|
|
31623
|
-
nz =
|
|
31622
|
+
ny = f.redMul(e.redSub(d));
|
|
31623
|
+
nz = f.redMul(j);
|
|
31624
31624
|
}
|
|
31625
31625
|
} else {
|
|
31626
31626
|
e = c.redAdd(d);
|
|
@@ -31646,13 +31646,13 @@
|
|
|
31646
31646
|
var c = this.t.redMul(this.curve.dd).redMul(p.t);
|
|
31647
31647
|
var d = this.z.redMul(p.z.redAdd(p.z));
|
|
31648
31648
|
var e = b.redSub(a);
|
|
31649
|
-
var
|
|
31649
|
+
var f = d.redSub(c);
|
|
31650
31650
|
var g = d.redAdd(c);
|
|
31651
31651
|
var h = b.redAdd(a);
|
|
31652
|
-
var nx = e.redMul(
|
|
31652
|
+
var nx = e.redMul(f);
|
|
31653
31653
|
var ny = g.redMul(h);
|
|
31654
31654
|
var nt = e.redMul(h);
|
|
31655
|
-
var nz =
|
|
31655
|
+
var nz = f.redMul(g);
|
|
31656
31656
|
return this.curve.point(nx, ny, nz, nt);
|
|
31657
31657
|
};
|
|
31658
31658
|
Point.prototype._projAdd = function _projAdd(p) {
|
|
@@ -31661,18 +31661,18 @@
|
|
|
31661
31661
|
var c = this.x.redMul(p.x);
|
|
31662
31662
|
var d = this.y.redMul(p.y);
|
|
31663
31663
|
var e = this.curve.d.redMul(c).redMul(d);
|
|
31664
|
-
var
|
|
31664
|
+
var f = b.redSub(e);
|
|
31665
31665
|
var g = b.redAdd(e);
|
|
31666
31666
|
var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
|
|
31667
|
-
var nx = a.redMul(
|
|
31667
|
+
var nx = a.redMul(f).redMul(tmp);
|
|
31668
31668
|
var ny;
|
|
31669
31669
|
var nz;
|
|
31670
31670
|
if (this.curve.twisted) {
|
|
31671
31671
|
ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
|
|
31672
|
-
nz =
|
|
31672
|
+
nz = f.redMul(g);
|
|
31673
31673
|
} else {
|
|
31674
31674
|
ny = a.redMul(g).redMul(d.redSub(c));
|
|
31675
|
-
nz = this.curve._mulC(
|
|
31675
|
+
nz = this.curve._mulC(f).redMul(g);
|
|
31676
31676
|
}
|
|
31677
31677
|
return this.curve.point(nx, ny, nz);
|
|
31678
31678
|
};
|
|
@@ -32325,16 +32325,16 @@
|
|
|
32325
32325
|
var c = this.h[2];
|
|
32326
32326
|
var d = this.h[3];
|
|
32327
32327
|
var e = this.h[4];
|
|
32328
|
-
var
|
|
32328
|
+
var f = this.h[5];
|
|
32329
32329
|
var g = this.h[6];
|
|
32330
32330
|
var h = this.h[7];
|
|
32331
32331
|
assert(this.k.length === W.length);
|
|
32332
32332
|
for (i2 = 0; i2 < W.length; i2++) {
|
|
32333
|
-
var T1 = sum32_5(h, s1_256(e), ch32(e,
|
|
32333
|
+
var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i2], W[i2]);
|
|
32334
32334
|
var T2 = sum32(s0_256(a), maj32(a, b, c));
|
|
32335
32335
|
h = g;
|
|
32336
|
-
g =
|
|
32337
|
-
|
|
32336
|
+
g = f;
|
|
32337
|
+
f = e;
|
|
32338
32338
|
e = sum32(d, T1);
|
|
32339
32339
|
d = c;
|
|
32340
32340
|
c = b;
|
|
@@ -32346,7 +32346,7 @@
|
|
|
32346
32346
|
this.h[2] = sum32(this.h[2], c);
|
|
32347
32347
|
this.h[3] = sum32(this.h[3], d);
|
|
32348
32348
|
this.h[4] = sum32(this.h[4], e);
|
|
32349
|
-
this.h[5] = sum32(this.h[5],
|
|
32349
|
+
this.h[5] = sum32(this.h[5], f);
|
|
32350
32350
|
this.h[6] = sum32(this.h[6], g);
|
|
32351
32351
|
this.h[7] = sum32(this.h[7], h);
|
|
32352
32352
|
};
|
|
@@ -32927,7 +32927,7 @@
|
|
|
32927
32927
|
for (var j = 0; j < 80; j++) {
|
|
32928
32928
|
var T = sum32(
|
|
32929
32929
|
rotl32(
|
|
32930
|
-
sum32_4(A,
|
|
32930
|
+
sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
|
|
32931
32931
|
s[j]
|
|
32932
32932
|
),
|
|
32933
32933
|
E
|
|
@@ -32939,7 +32939,7 @@
|
|
|
32939
32939
|
B = T;
|
|
32940
32940
|
T = sum32(
|
|
32941
32941
|
rotl32(
|
|
32942
|
-
sum32_4(Ah,
|
|
32942
|
+
sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
|
|
32943
32943
|
sh[j]
|
|
32944
32944
|
),
|
|
32945
32945
|
Eh
|
|
@@ -32963,7 +32963,7 @@
|
|
|
32963
32963
|
else
|
|
32964
32964
|
return utils2.split32(this.h, "little");
|
|
32965
32965
|
};
|
|
32966
|
-
function
|
|
32966
|
+
function f(j, x, y, z) {
|
|
32967
32967
|
if (j <= 15)
|
|
32968
32968
|
return x ^ y ^ z;
|
|
32969
32969
|
else if (j <= 31)
|
|
@@ -34482,7 +34482,7 @@
|
|
|
34482
34482
|
privEnc: enc
|
|
34483
34483
|
});
|
|
34484
34484
|
};
|
|
34485
|
-
KeyPair.prototype.validate = function
|
|
34485
|
+
KeyPair.prototype.validate = function validate() {
|
|
34486
34486
|
var pub = this.getPublic();
|
|
34487
34487
|
if (pub.isInfinity())
|
|
34488
34488
|
return { result: false, reason: "Invalid public key" };
|
|
@@ -46352,7 +46352,7 @@
|
|
|
46352
46352
|
var randombytes = requireBrowser$c();
|
|
46353
46353
|
var Buffer2 = safeBuffer2.Buffer;
|
|
46354
46354
|
var kBufferMaxLength = safeBuffer2.kMaxLength;
|
|
46355
|
-
var
|
|
46355
|
+
var crypto = commonjsGlobal.crypto || commonjsGlobal.msCrypto;
|
|
46356
46356
|
var kMaxUint32 = Math.pow(2, 32) - 1;
|
|
46357
46357
|
function assertOffset(offset, length) {
|
|
46358
46358
|
if (typeof offset !== "number" || offset !== offset) {
|
|
@@ -46376,7 +46376,7 @@
|
|
|
46376
46376
|
throw new RangeError("buffer too small");
|
|
46377
46377
|
}
|
|
46378
46378
|
}
|
|
46379
|
-
if (
|
|
46379
|
+
if (crypto && crypto.getRandomValues || !process$1.browser) {
|
|
46380
46380
|
browser$1.randomFill = randomFill;
|
|
46381
46381
|
browser$1.randomFillSync = randomFillSync;
|
|
46382
46382
|
} else {
|
|
@@ -46405,7 +46405,7 @@
|
|
|
46405
46405
|
if (process$1.browser) {
|
|
46406
46406
|
var ourBuf = buf.buffer;
|
|
46407
46407
|
var uint = new Uint8Array(ourBuf, offset, size);
|
|
46408
|
-
|
|
46408
|
+
crypto.getRandomValues(uint);
|
|
46409
46409
|
if (cb) {
|
|
46410
46410
|
process$1.nextTick(function() {
|
|
46411
46411
|
cb(null, buf);
|
|
@@ -46531,39 +46531,39 @@
|
|
|
46531
46531
|
}
|
|
46532
46532
|
})(core, function() {
|
|
46533
46533
|
var CryptoJS = CryptoJS || function(Math2, undefined$1) {
|
|
46534
|
-
var
|
|
46534
|
+
var crypto;
|
|
46535
46535
|
if (typeof window !== "undefined" && window.crypto) {
|
|
46536
|
-
|
|
46536
|
+
crypto = window.crypto;
|
|
46537
46537
|
}
|
|
46538
46538
|
if (typeof self !== "undefined" && self.crypto) {
|
|
46539
|
-
|
|
46539
|
+
crypto = self.crypto;
|
|
46540
46540
|
}
|
|
46541
46541
|
if (typeof globalThis !== "undefined" && globalThis.crypto) {
|
|
46542
|
-
|
|
46542
|
+
crypto = globalThis.crypto;
|
|
46543
46543
|
}
|
|
46544
|
-
if (!
|
|
46545
|
-
|
|
46544
|
+
if (!crypto && typeof window !== "undefined" && window.msCrypto) {
|
|
46545
|
+
crypto = window.msCrypto;
|
|
46546
46546
|
}
|
|
46547
|
-
if (!
|
|
46548
|
-
|
|
46547
|
+
if (!crypto && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
|
|
46548
|
+
crypto = commonjsGlobal.crypto;
|
|
46549
46549
|
}
|
|
46550
|
-
if (!
|
|
46550
|
+
if (!crypto && typeof commonjsRequire === "function") {
|
|
46551
46551
|
try {
|
|
46552
|
-
|
|
46552
|
+
crypto = requireCryptoBrowserify();
|
|
46553
46553
|
} catch (err) {
|
|
46554
46554
|
}
|
|
46555
46555
|
}
|
|
46556
46556
|
var cryptoSecureRandomInt = function() {
|
|
46557
|
-
if (
|
|
46558
|
-
if (typeof
|
|
46557
|
+
if (crypto) {
|
|
46558
|
+
if (typeof crypto.getRandomValues === "function") {
|
|
46559
46559
|
try {
|
|
46560
|
-
return
|
|
46560
|
+
return crypto.getRandomValues(new Uint32Array(1))[0];
|
|
46561
46561
|
} catch (err) {
|
|
46562
46562
|
}
|
|
46563
46563
|
}
|
|
46564
|
-
if (typeof
|
|
46564
|
+
if (typeof crypto.randomBytes === "function") {
|
|
46565
46565
|
try {
|
|
46566
|
-
return
|
|
46566
|
+
return crypto.randomBytes(4).readInt32LE();
|
|
46567
46567
|
} catch (err) {
|
|
46568
46568
|
}
|
|
46569
46569
|
}
|
|
@@ -47234,18 +47234,18 @@
|
|
|
47234
47234
|
})(encBase64$1);
|
|
47235
47235
|
return encBase64$1.exports;
|
|
47236
47236
|
}
|
|
47237
|
-
var md5$
|
|
47238
|
-
var md5
|
|
47237
|
+
var md5$1 = { exports: {} };
|
|
47238
|
+
var md5 = md5$1.exports;
|
|
47239
47239
|
var hasRequiredMd5;
|
|
47240
47240
|
function requireMd5() {
|
|
47241
|
-
if (hasRequiredMd5) return md5$
|
|
47241
|
+
if (hasRequiredMd5) return md5$1.exports;
|
|
47242
47242
|
hasRequiredMd5 = 1;
|
|
47243
47243
|
(function(module, exports2) {
|
|
47244
47244
|
(function(root, factory) {
|
|
47245
47245
|
{
|
|
47246
47246
|
module.exports = factory(requireCore());
|
|
47247
47247
|
}
|
|
47248
|
-
})(md5
|
|
47248
|
+
})(md5, function(CryptoJS) {
|
|
47249
47249
|
(function(Math2) {
|
|
47250
47250
|
var C = CryptoJS;
|
|
47251
47251
|
var C_lib = C.lib;
|
|
@@ -47410,22 +47410,22 @@
|
|
|
47410
47410
|
})(Math);
|
|
47411
47411
|
return CryptoJS.MD5;
|
|
47412
47412
|
});
|
|
47413
|
-
})(md5$
|
|
47414
|
-
return md5$
|
|
47413
|
+
})(md5$1);
|
|
47414
|
+
return md5$1.exports;
|
|
47415
47415
|
}
|
|
47416
47416
|
var evpkdf$1 = { exports: {} };
|
|
47417
|
-
var sha1$
|
|
47418
|
-
var sha1
|
|
47417
|
+
var sha1$1 = { exports: {} };
|
|
47418
|
+
var sha1 = sha1$1.exports;
|
|
47419
47419
|
var hasRequiredSha1;
|
|
47420
47420
|
function requireSha1() {
|
|
47421
|
-
if (hasRequiredSha1) return sha1$
|
|
47421
|
+
if (hasRequiredSha1) return sha1$1.exports;
|
|
47422
47422
|
hasRequiredSha1 = 1;
|
|
47423
47423
|
(function(module, exports2) {
|
|
47424
47424
|
(function(root, factory) {
|
|
47425
47425
|
{
|
|
47426
47426
|
module.exports = factory(requireCore());
|
|
47427
47427
|
}
|
|
47428
|
-
})(sha1
|
|
47428
|
+
})(sha1, function(CryptoJS) {
|
|
47429
47429
|
(function() {
|
|
47430
47430
|
var C = CryptoJS;
|
|
47431
47431
|
var C_lib = C.lib;
|
|
@@ -47502,8 +47502,8 @@
|
|
|
47502
47502
|
})();
|
|
47503
47503
|
return CryptoJS.SHA1;
|
|
47504
47504
|
});
|
|
47505
|
-
})(sha1$
|
|
47506
|
-
return sha1$
|
|
47505
|
+
})(sha1$1);
|
|
47506
|
+
return sha1$1.exports;
|
|
47507
47507
|
}
|
|
47508
47508
|
var hmac$1 = { exports: {} };
|
|
47509
47509
|
var hmac = hmac$1.exports;
|
|
@@ -48501,7 +48501,7 @@
|
|
|
48501
48501
|
}
|
|
48502
48502
|
var aesExports = requireAes();
|
|
48503
48503
|
const aes = /* @__PURE__ */ getDefaultExportFromCjs(aesExports);
|
|
48504
|
-
const __CJS__import__1__$
|
|
48504
|
+
const __CJS__import__1__$1 = /* @__PURE__ */ _mergeNamespaces({
|
|
48505
48505
|
__proto__: null,
|
|
48506
48506
|
default: aes
|
|
48507
48507
|
}, [aesExports]);
|
|
@@ -48531,7 +48531,7 @@
|
|
|
48531
48531
|
let AES;
|
|
48532
48532
|
let ENC;
|
|
48533
48533
|
{
|
|
48534
|
-
AES = aes || __CJS__import__1__$
|
|
48534
|
+
AES = aes || __CJS__import__1__$1;
|
|
48535
48535
|
ENC = encUtf8 || __CJS__import__2__;
|
|
48536
48536
|
}
|
|
48537
48537
|
const CryptoController = {
|
|
@@ -48699,508 +48699,9 @@
|
|
|
48699
48699
|
return !!(key2 && (key2 === DEFAULT_PIN || key2.startsWith(PIN_PREFIX) || key2.startsWith(OBJECT_PREFIX)));
|
|
48700
48700
|
}
|
|
48701
48701
|
requireCryptoBrowserify();
|
|
48702
|
-
const max = "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
|
48703
|
-
const nil = "00000000-0000-0000-0000-000000000000";
|
|
48704
|
-
const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
48705
|
-
function validate(uuid2) {
|
|
48706
|
-
return typeof uuid2 === "string" && REGEX.test(uuid2);
|
|
48707
|
-
}
|
|
48708
|
-
function parse(uuid2) {
|
|
48709
|
-
if (!validate(uuid2)) {
|
|
48710
|
-
throw TypeError("Invalid UUID");
|
|
48711
|
-
}
|
|
48712
|
-
let v;
|
|
48713
|
-
return Uint8Array.of((v = parseInt(uuid2.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid2.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid2.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid2.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid2.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
48714
|
-
}
|
|
48715
|
-
const byteToHex = [];
|
|
48716
|
-
for (let i2 = 0; i2 < 256; ++i2) {
|
|
48717
|
-
byteToHex.push((i2 + 256).toString(16).slice(1));
|
|
48718
|
-
}
|
|
48719
|
-
function unsafeStringify(arr, offset = 0) {
|
|
48720
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
48721
|
-
}
|
|
48722
|
-
function stringify(arr, offset = 0) {
|
|
48723
|
-
const uuid2 = unsafeStringify(arr, offset);
|
|
48724
|
-
if (!validate(uuid2)) {
|
|
48725
|
-
throw TypeError("Stringified UUID is invalid");
|
|
48726
|
-
}
|
|
48727
|
-
return uuid2;
|
|
48728
|
-
}
|
|
48729
|
-
let getRandomValues;
|
|
48730
|
-
const rnds8 = new Uint8Array(16);
|
|
48731
|
-
function rng() {
|
|
48732
|
-
if (!getRandomValues) {
|
|
48733
|
-
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
48734
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
48735
|
-
}
|
|
48736
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
48737
|
-
}
|
|
48738
|
-
return getRandomValues(rnds8);
|
|
48739
|
-
}
|
|
48740
|
-
const _state$1 = {};
|
|
48741
|
-
function v1(options, buf, offset) {
|
|
48742
|
-
var _a;
|
|
48743
|
-
let bytes;
|
|
48744
|
-
const isV6 = (options == null ? void 0 : options._v6) ?? false;
|
|
48745
|
-
if (options) {
|
|
48746
|
-
const optionsKeys = Object.keys(options);
|
|
48747
|
-
if (optionsKeys.length === 1 && optionsKeys[0] === "_v6") {
|
|
48748
|
-
options = void 0;
|
|
48749
|
-
}
|
|
48750
|
-
}
|
|
48751
|
-
if (options) {
|
|
48752
|
-
bytes = v1Bytes(options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);
|
|
48753
|
-
} else {
|
|
48754
|
-
const now = Date.now();
|
|
48755
|
-
const rnds = rng();
|
|
48756
|
-
updateV1State(_state$1, now, rnds);
|
|
48757
|
-
bytes = v1Bytes(rnds, _state$1.msecs, _state$1.nsecs, isV6 ? void 0 : _state$1.clockseq, isV6 ? void 0 : _state$1.node, buf, offset);
|
|
48758
|
-
}
|
|
48759
|
-
return buf ?? unsafeStringify(bytes);
|
|
48760
|
-
}
|
|
48761
|
-
function updateV1State(state2, now, rnds) {
|
|
48762
|
-
state2.msecs ?? (state2.msecs = -Infinity);
|
|
48763
|
-
state2.nsecs ?? (state2.nsecs = 0);
|
|
48764
|
-
if (now === state2.msecs) {
|
|
48765
|
-
state2.nsecs++;
|
|
48766
|
-
if (state2.nsecs >= 1e4) {
|
|
48767
|
-
state2.node = void 0;
|
|
48768
|
-
state2.nsecs = 0;
|
|
48769
|
-
}
|
|
48770
|
-
} else if (now > state2.msecs) {
|
|
48771
|
-
state2.nsecs = 0;
|
|
48772
|
-
} else if (now < state2.msecs) {
|
|
48773
|
-
state2.node = void 0;
|
|
48774
|
-
}
|
|
48775
|
-
if (!state2.node) {
|
|
48776
|
-
state2.node = rnds.slice(10, 16);
|
|
48777
|
-
state2.node[0] |= 1;
|
|
48778
|
-
state2.clockseq = (rnds[8] << 8 | rnds[9]) & 16383;
|
|
48779
|
-
}
|
|
48780
|
-
state2.msecs = now;
|
|
48781
|
-
return state2;
|
|
48782
|
-
}
|
|
48783
|
-
function v1Bytes(rnds, msecs, nsecs, clockseq, node2, buf, offset = 0) {
|
|
48784
|
-
if (rnds.length < 16) {
|
|
48785
|
-
throw new Error("Random bytes length must be >= 16");
|
|
48786
|
-
}
|
|
48787
|
-
if (!buf) {
|
|
48788
|
-
buf = new Uint8Array(16);
|
|
48789
|
-
offset = 0;
|
|
48790
|
-
} else {
|
|
48791
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
48792
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
48793
|
-
}
|
|
48794
|
-
}
|
|
48795
|
-
msecs ?? (msecs = Date.now());
|
|
48796
|
-
nsecs ?? (nsecs = 0);
|
|
48797
|
-
clockseq ?? (clockseq = (rnds[8] << 8 | rnds[9]) & 16383);
|
|
48798
|
-
node2 ?? (node2 = rnds.slice(10, 16));
|
|
48799
|
-
msecs += 122192928e5;
|
|
48800
|
-
const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
|
|
48801
|
-
buf[offset++] = tl >>> 24 & 255;
|
|
48802
|
-
buf[offset++] = tl >>> 16 & 255;
|
|
48803
|
-
buf[offset++] = tl >>> 8 & 255;
|
|
48804
|
-
buf[offset++] = tl & 255;
|
|
48805
|
-
const tmh = msecs / 4294967296 * 1e4 & 268435455;
|
|
48806
|
-
buf[offset++] = tmh >>> 8 & 255;
|
|
48807
|
-
buf[offset++] = tmh & 255;
|
|
48808
|
-
buf[offset++] = tmh >>> 24 & 15 | 16;
|
|
48809
|
-
buf[offset++] = tmh >>> 16 & 255;
|
|
48810
|
-
buf[offset++] = clockseq >>> 8 | 128;
|
|
48811
|
-
buf[offset++] = clockseq & 255;
|
|
48812
|
-
for (let n = 0; n < 6; ++n) {
|
|
48813
|
-
buf[offset++] = node2[n];
|
|
48814
|
-
}
|
|
48815
|
-
return buf;
|
|
48816
|
-
}
|
|
48817
|
-
function v1ToV6(uuid2) {
|
|
48818
|
-
const v1Bytes2 = typeof uuid2 === "string" ? parse(uuid2) : uuid2;
|
|
48819
|
-
const v6Bytes = _v1ToV6(v1Bytes2);
|
|
48820
|
-
return typeof uuid2 === "string" ? unsafeStringify(v6Bytes) : v6Bytes;
|
|
48821
|
-
}
|
|
48822
|
-
function _v1ToV6(v1Bytes2) {
|
|
48823
|
-
return Uint8Array.of((v1Bytes2[6] & 15) << 4 | v1Bytes2[7] >> 4 & 15, (v1Bytes2[7] & 15) << 4 | (v1Bytes2[4] & 240) >> 4, (v1Bytes2[4] & 15) << 4 | (v1Bytes2[5] & 240) >> 4, (v1Bytes2[5] & 15) << 4 | (v1Bytes2[0] & 240) >> 4, (v1Bytes2[0] & 15) << 4 | (v1Bytes2[1] & 240) >> 4, (v1Bytes2[1] & 15) << 4 | (v1Bytes2[2] & 240) >> 4, 96 | v1Bytes2[2] & 15, v1Bytes2[3], v1Bytes2[8], v1Bytes2[9], v1Bytes2[10], v1Bytes2[11], v1Bytes2[12], v1Bytes2[13], v1Bytes2[14], v1Bytes2[15]);
|
|
48824
|
-
}
|
|
48825
|
-
function md5(bytes) {
|
|
48826
|
-
const words = uint8ToUint32(bytes);
|
|
48827
|
-
const md5Bytes = wordsToMd5(words, bytes.length * 8);
|
|
48828
|
-
return uint32ToUint8(md5Bytes);
|
|
48829
|
-
}
|
|
48830
|
-
function uint32ToUint8(input) {
|
|
48831
|
-
const bytes = new Uint8Array(input.length * 4);
|
|
48832
|
-
for (let i2 = 0; i2 < input.length * 4; i2++) {
|
|
48833
|
-
bytes[i2] = input[i2 >> 2] >>> i2 % 4 * 8 & 255;
|
|
48834
|
-
}
|
|
48835
|
-
return bytes;
|
|
48836
|
-
}
|
|
48837
|
-
function getOutputLength(inputLength8) {
|
|
48838
|
-
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
|
48839
|
-
}
|
|
48840
|
-
function wordsToMd5(x, len2) {
|
|
48841
|
-
const xpad = new Uint32Array(getOutputLength(len2)).fill(0);
|
|
48842
|
-
xpad.set(x);
|
|
48843
|
-
xpad[len2 >> 5] |= 128 << len2 % 32;
|
|
48844
|
-
xpad[xpad.length - 1] = len2;
|
|
48845
|
-
x = xpad;
|
|
48846
|
-
let a = 1732584193;
|
|
48847
|
-
let b = -271733879;
|
|
48848
|
-
let c = -1732584194;
|
|
48849
|
-
let d = 271733878;
|
|
48850
|
-
for (let i2 = 0; i2 < x.length; i2 += 16) {
|
|
48851
|
-
const olda = a;
|
|
48852
|
-
const oldb = b;
|
|
48853
|
-
const oldc = c;
|
|
48854
|
-
const oldd = d;
|
|
48855
|
-
a = md5ff(a, b, c, d, x[i2], 7, -680876936);
|
|
48856
|
-
d = md5ff(d, a, b, c, x[i2 + 1], 12, -389564586);
|
|
48857
|
-
c = md5ff(c, d, a, b, x[i2 + 2], 17, 606105819);
|
|
48858
|
-
b = md5ff(b, c, d, a, x[i2 + 3], 22, -1044525330);
|
|
48859
|
-
a = md5ff(a, b, c, d, x[i2 + 4], 7, -176418897);
|
|
48860
|
-
d = md5ff(d, a, b, c, x[i2 + 5], 12, 1200080426);
|
|
48861
|
-
c = md5ff(c, d, a, b, x[i2 + 6], 17, -1473231341);
|
|
48862
|
-
b = md5ff(b, c, d, a, x[i2 + 7], 22, -45705983);
|
|
48863
|
-
a = md5ff(a, b, c, d, x[i2 + 8], 7, 1770035416);
|
|
48864
|
-
d = md5ff(d, a, b, c, x[i2 + 9], 12, -1958414417);
|
|
48865
|
-
c = md5ff(c, d, a, b, x[i2 + 10], 17, -42063);
|
|
48866
|
-
b = md5ff(b, c, d, a, x[i2 + 11], 22, -1990404162);
|
|
48867
|
-
a = md5ff(a, b, c, d, x[i2 + 12], 7, 1804603682);
|
|
48868
|
-
d = md5ff(d, a, b, c, x[i2 + 13], 12, -40341101);
|
|
48869
|
-
c = md5ff(c, d, a, b, x[i2 + 14], 17, -1502002290);
|
|
48870
|
-
b = md5ff(b, c, d, a, x[i2 + 15], 22, 1236535329);
|
|
48871
|
-
a = md5gg(a, b, c, d, x[i2 + 1], 5, -165796510);
|
|
48872
|
-
d = md5gg(d, a, b, c, x[i2 + 6], 9, -1069501632);
|
|
48873
|
-
c = md5gg(c, d, a, b, x[i2 + 11], 14, 643717713);
|
|
48874
|
-
b = md5gg(b, c, d, a, x[i2], 20, -373897302);
|
|
48875
|
-
a = md5gg(a, b, c, d, x[i2 + 5], 5, -701558691);
|
|
48876
|
-
d = md5gg(d, a, b, c, x[i2 + 10], 9, 38016083);
|
|
48877
|
-
c = md5gg(c, d, a, b, x[i2 + 15], 14, -660478335);
|
|
48878
|
-
b = md5gg(b, c, d, a, x[i2 + 4], 20, -405537848);
|
|
48879
|
-
a = md5gg(a, b, c, d, x[i2 + 9], 5, 568446438);
|
|
48880
|
-
d = md5gg(d, a, b, c, x[i2 + 14], 9, -1019803690);
|
|
48881
|
-
c = md5gg(c, d, a, b, x[i2 + 3], 14, -187363961);
|
|
48882
|
-
b = md5gg(b, c, d, a, x[i2 + 8], 20, 1163531501);
|
|
48883
|
-
a = md5gg(a, b, c, d, x[i2 + 13], 5, -1444681467);
|
|
48884
|
-
d = md5gg(d, a, b, c, x[i2 + 2], 9, -51403784);
|
|
48885
|
-
c = md5gg(c, d, a, b, x[i2 + 7], 14, 1735328473);
|
|
48886
|
-
b = md5gg(b, c, d, a, x[i2 + 12], 20, -1926607734);
|
|
48887
|
-
a = md5hh(a, b, c, d, x[i2 + 5], 4, -378558);
|
|
48888
|
-
d = md5hh(d, a, b, c, x[i2 + 8], 11, -2022574463);
|
|
48889
|
-
c = md5hh(c, d, a, b, x[i2 + 11], 16, 1839030562);
|
|
48890
|
-
b = md5hh(b, c, d, a, x[i2 + 14], 23, -35309556);
|
|
48891
|
-
a = md5hh(a, b, c, d, x[i2 + 1], 4, -1530992060);
|
|
48892
|
-
d = md5hh(d, a, b, c, x[i2 + 4], 11, 1272893353);
|
|
48893
|
-
c = md5hh(c, d, a, b, x[i2 + 7], 16, -155497632);
|
|
48894
|
-
b = md5hh(b, c, d, a, x[i2 + 10], 23, -1094730640);
|
|
48895
|
-
a = md5hh(a, b, c, d, x[i2 + 13], 4, 681279174);
|
|
48896
|
-
d = md5hh(d, a, b, c, x[i2], 11, -358537222);
|
|
48897
|
-
c = md5hh(c, d, a, b, x[i2 + 3], 16, -722521979);
|
|
48898
|
-
b = md5hh(b, c, d, a, x[i2 + 6], 23, 76029189);
|
|
48899
|
-
a = md5hh(a, b, c, d, x[i2 + 9], 4, -640364487);
|
|
48900
|
-
d = md5hh(d, a, b, c, x[i2 + 12], 11, -421815835);
|
|
48901
|
-
c = md5hh(c, d, a, b, x[i2 + 15], 16, 530742520);
|
|
48902
|
-
b = md5hh(b, c, d, a, x[i2 + 2], 23, -995338651);
|
|
48903
|
-
a = md5ii(a, b, c, d, x[i2], 6, -198630844);
|
|
48904
|
-
d = md5ii(d, a, b, c, x[i2 + 7], 10, 1126891415);
|
|
48905
|
-
c = md5ii(c, d, a, b, x[i2 + 14], 15, -1416354905);
|
|
48906
|
-
b = md5ii(b, c, d, a, x[i2 + 5], 21, -57434055);
|
|
48907
|
-
a = md5ii(a, b, c, d, x[i2 + 12], 6, 1700485571);
|
|
48908
|
-
d = md5ii(d, a, b, c, x[i2 + 3], 10, -1894986606);
|
|
48909
|
-
c = md5ii(c, d, a, b, x[i2 + 10], 15, -1051523);
|
|
48910
|
-
b = md5ii(b, c, d, a, x[i2 + 1], 21, -2054922799);
|
|
48911
|
-
a = md5ii(a, b, c, d, x[i2 + 8], 6, 1873313359);
|
|
48912
|
-
d = md5ii(d, a, b, c, x[i2 + 15], 10, -30611744);
|
|
48913
|
-
c = md5ii(c, d, a, b, x[i2 + 6], 15, -1560198380);
|
|
48914
|
-
b = md5ii(b, c, d, a, x[i2 + 13], 21, 1309151649);
|
|
48915
|
-
a = md5ii(a, b, c, d, x[i2 + 4], 6, -145523070);
|
|
48916
|
-
d = md5ii(d, a, b, c, x[i2 + 11], 10, -1120210379);
|
|
48917
|
-
c = md5ii(c, d, a, b, x[i2 + 2], 15, 718787259);
|
|
48918
|
-
b = md5ii(b, c, d, a, x[i2 + 9], 21, -343485551);
|
|
48919
|
-
a = safeAdd(a, olda);
|
|
48920
|
-
b = safeAdd(b, oldb);
|
|
48921
|
-
c = safeAdd(c, oldc);
|
|
48922
|
-
d = safeAdd(d, oldd);
|
|
48923
|
-
}
|
|
48924
|
-
return Uint32Array.of(a, b, c, d);
|
|
48925
|
-
}
|
|
48926
|
-
function uint8ToUint32(input) {
|
|
48927
|
-
if (input.length === 0) {
|
|
48928
|
-
return new Uint32Array();
|
|
48929
|
-
}
|
|
48930
|
-
const output = new Uint32Array(getOutputLength(input.length * 8)).fill(0);
|
|
48931
|
-
for (let i2 = 0; i2 < input.length; i2++) {
|
|
48932
|
-
output[i2 >> 2] |= (input[i2] & 255) << i2 % 4 * 8;
|
|
48933
|
-
}
|
|
48934
|
-
return output;
|
|
48935
|
-
}
|
|
48936
|
-
function safeAdd(x, y) {
|
|
48937
|
-
const lsw = (x & 65535) + (y & 65535);
|
|
48938
|
-
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
48939
|
-
return msw << 16 | lsw & 65535;
|
|
48940
|
-
}
|
|
48941
|
-
function bitRotateLeft(num, cnt) {
|
|
48942
|
-
return num << cnt | num >>> 32 - cnt;
|
|
48943
|
-
}
|
|
48944
|
-
function md5cmn(q, a, b, x, s, t) {
|
|
48945
|
-
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
|
48946
|
-
}
|
|
48947
|
-
function md5ff(a, b, c, d, x, s, t) {
|
|
48948
|
-
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
|
48949
|
-
}
|
|
48950
|
-
function md5gg(a, b, c, d, x, s, t) {
|
|
48951
|
-
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
|
48952
|
-
}
|
|
48953
|
-
function md5hh(a, b, c, d, x, s, t) {
|
|
48954
|
-
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
|
48955
|
-
}
|
|
48956
|
-
function md5ii(a, b, c, d, x, s, t) {
|
|
48957
|
-
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
48958
|
-
}
|
|
48959
|
-
function stringToBytes(str) {
|
|
48960
|
-
str = unescape(encodeURIComponent(str));
|
|
48961
|
-
const bytes = new Uint8Array(str.length);
|
|
48962
|
-
for (let i2 = 0; i2 < str.length; ++i2) {
|
|
48963
|
-
bytes[i2] = str.charCodeAt(i2);
|
|
48964
|
-
}
|
|
48965
|
-
return bytes;
|
|
48966
|
-
}
|
|
48967
|
-
const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
48968
|
-
const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
48969
|
-
function v35(version2, hash2, value, namespace, buf, offset) {
|
|
48970
|
-
const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
|
|
48971
|
-
const namespaceBytes = typeof namespace === "string" ? parse(namespace) : namespace;
|
|
48972
|
-
if (typeof namespace === "string") {
|
|
48973
|
-
namespace = parse(namespace);
|
|
48974
|
-
}
|
|
48975
|
-
if ((namespace == null ? void 0 : namespace.length) !== 16) {
|
|
48976
|
-
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
48977
|
-
}
|
|
48978
|
-
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
48979
|
-
bytes.set(namespaceBytes);
|
|
48980
|
-
bytes.set(valueBytes, namespaceBytes.length);
|
|
48981
|
-
bytes = hash2(bytes);
|
|
48982
|
-
bytes[6] = bytes[6] & 15 | version2;
|
|
48983
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
48984
|
-
if (buf) {
|
|
48985
|
-
offset = offset || 0;
|
|
48986
|
-
for (let i2 = 0; i2 < 16; ++i2) {
|
|
48987
|
-
buf[offset + i2] = bytes[i2];
|
|
48988
|
-
}
|
|
48989
|
-
return buf;
|
|
48990
|
-
}
|
|
48991
|
-
return unsafeStringify(bytes);
|
|
48992
|
-
}
|
|
48993
|
-
function v3(value, namespace, buf, offset) {
|
|
48994
|
-
return v35(48, md5, value, namespace, buf, offset);
|
|
48995
|
-
}
|
|
48996
|
-
v3.DNS = DNS;
|
|
48997
|
-
v3.URL = URL;
|
|
48998
|
-
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
48999
|
-
const native = { randomUUID };
|
|
49000
|
-
function _v4(options, buf, offset) {
|
|
49001
|
-
var _a;
|
|
49002
|
-
options = options || {};
|
|
49003
|
-
const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
|
|
49004
|
-
if (rnds.length < 16) {
|
|
49005
|
-
throw new Error("Random bytes length must be >= 16");
|
|
49006
|
-
}
|
|
49007
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
49008
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
49009
|
-
if (buf) {
|
|
49010
|
-
offset = offset || 0;
|
|
49011
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
49012
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
49013
|
-
}
|
|
49014
|
-
for (let i2 = 0; i2 < 16; ++i2) {
|
|
49015
|
-
buf[offset + i2] = rnds[i2];
|
|
49016
|
-
}
|
|
49017
|
-
return buf;
|
|
49018
|
-
}
|
|
49019
|
-
return unsafeStringify(rnds);
|
|
49020
|
-
}
|
|
49021
|
-
function v4(options, buf, offset) {
|
|
49022
|
-
if (native.randomUUID && !buf && !options) {
|
|
49023
|
-
return native.randomUUID();
|
|
49024
|
-
}
|
|
49025
|
-
return _v4(options, buf, offset);
|
|
49026
|
-
}
|
|
49027
|
-
function f(s, x, y, z) {
|
|
49028
|
-
switch (s) {
|
|
49029
|
-
case 0:
|
|
49030
|
-
return x & y ^ ~x & z;
|
|
49031
|
-
case 1:
|
|
49032
|
-
return x ^ y ^ z;
|
|
49033
|
-
case 2:
|
|
49034
|
-
return x & y ^ x & z ^ y & z;
|
|
49035
|
-
case 3:
|
|
49036
|
-
return x ^ y ^ z;
|
|
49037
|
-
}
|
|
49038
|
-
}
|
|
49039
|
-
function ROTL(x, n) {
|
|
49040
|
-
return x << n | x >>> 32 - n;
|
|
49041
|
-
}
|
|
49042
|
-
function sha1(bytes) {
|
|
49043
|
-
const K = [1518500249, 1859775393, 2400959708, 3395469782];
|
|
49044
|
-
const H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
49045
|
-
const newBytes = new Uint8Array(bytes.length + 1);
|
|
49046
|
-
newBytes.set(bytes);
|
|
49047
|
-
newBytes[bytes.length] = 128;
|
|
49048
|
-
bytes = newBytes;
|
|
49049
|
-
const l = bytes.length / 4 + 2;
|
|
49050
|
-
const N = Math.ceil(l / 16);
|
|
49051
|
-
const M = new Array(N);
|
|
49052
|
-
for (let i2 = 0; i2 < N; ++i2) {
|
|
49053
|
-
const arr = new Uint32Array(16);
|
|
49054
|
-
for (let j = 0; j < 16; ++j) {
|
|
49055
|
-
arr[j] = bytes[i2 * 64 + j * 4] << 24 | bytes[i2 * 64 + j * 4 + 1] << 16 | bytes[i2 * 64 + j * 4 + 2] << 8 | bytes[i2 * 64 + j * 4 + 3];
|
|
49056
|
-
}
|
|
49057
|
-
M[i2] = arr;
|
|
49058
|
-
}
|
|
49059
|
-
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
|
49060
|
-
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
|
49061
|
-
M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295;
|
|
49062
|
-
for (let i2 = 0; i2 < N; ++i2) {
|
|
49063
|
-
const W = new Uint32Array(80);
|
|
49064
|
-
for (let t = 0; t < 16; ++t) {
|
|
49065
|
-
W[t] = M[i2][t];
|
|
49066
|
-
}
|
|
49067
|
-
for (let t = 16; t < 80; ++t) {
|
|
49068
|
-
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
|
|
49069
|
-
}
|
|
49070
|
-
let a = H[0];
|
|
49071
|
-
let b = H[1];
|
|
49072
|
-
let c = H[2];
|
|
49073
|
-
let d = H[3];
|
|
49074
|
-
let e = H[4];
|
|
49075
|
-
for (let t = 0; t < 80; ++t) {
|
|
49076
|
-
const s = Math.floor(t / 20);
|
|
49077
|
-
const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
|
|
49078
|
-
e = d;
|
|
49079
|
-
d = c;
|
|
49080
|
-
c = ROTL(b, 30) >>> 0;
|
|
49081
|
-
b = a;
|
|
49082
|
-
a = T;
|
|
49083
|
-
}
|
|
49084
|
-
H[0] = H[0] + a >>> 0;
|
|
49085
|
-
H[1] = H[1] + b >>> 0;
|
|
49086
|
-
H[2] = H[2] + c >>> 0;
|
|
49087
|
-
H[3] = H[3] + d >>> 0;
|
|
49088
|
-
H[4] = H[4] + e >>> 0;
|
|
49089
|
-
}
|
|
49090
|
-
return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]);
|
|
49091
|
-
}
|
|
49092
|
-
function v5(value, namespace, buf, offset) {
|
|
49093
|
-
return v35(80, sha1, value, namespace, buf, offset);
|
|
49094
|
-
}
|
|
49095
|
-
v5.DNS = DNS;
|
|
49096
|
-
v5.URL = URL;
|
|
49097
|
-
function v6(options, buf, offset) {
|
|
49098
|
-
options ?? (options = {});
|
|
49099
|
-
offset ?? (offset = 0);
|
|
49100
|
-
let bytes = v1({ ...options, _v6: true }, new Uint8Array(16));
|
|
49101
|
-
bytes = v1ToV6(bytes);
|
|
49102
|
-
if (buf) {
|
|
49103
|
-
for (let i2 = 0; i2 < 16; i2++) {
|
|
49104
|
-
buf[offset + i2] = bytes[i2];
|
|
49105
|
-
}
|
|
49106
|
-
return buf;
|
|
49107
|
-
}
|
|
49108
|
-
return unsafeStringify(bytes);
|
|
49109
|
-
}
|
|
49110
|
-
function v6ToV1(uuid2) {
|
|
49111
|
-
const v6Bytes = typeof uuid2 === "string" ? parse(uuid2) : uuid2;
|
|
49112
|
-
const v1Bytes2 = _v6ToV1(v6Bytes);
|
|
49113
|
-
return typeof uuid2 === "string" ? unsafeStringify(v1Bytes2) : v1Bytes2;
|
|
49114
|
-
}
|
|
49115
|
-
function _v6ToV1(v6Bytes) {
|
|
49116
|
-
return Uint8Array.of((v6Bytes[3] & 15) << 4 | v6Bytes[4] >> 4 & 15, (v6Bytes[4] & 15) << 4 | (v6Bytes[5] & 240) >> 4, (v6Bytes[5] & 15) << 4 | v6Bytes[6] & 15, v6Bytes[7], (v6Bytes[1] & 15) << 4 | (v6Bytes[2] & 240) >> 4, (v6Bytes[2] & 15) << 4 | (v6Bytes[3] & 240) >> 4, 16 | (v6Bytes[0] & 240) >> 4, (v6Bytes[0] & 15) << 4 | (v6Bytes[1] & 240) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
|
|
49117
|
-
}
|
|
49118
|
-
const _state = {};
|
|
49119
|
-
function v7(options, buf, offset) {
|
|
49120
|
-
var _a;
|
|
49121
|
-
let bytes;
|
|
49122
|
-
if (options) {
|
|
49123
|
-
bytes = v7Bytes(options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng(), options.msecs, options.seq, buf, offset);
|
|
49124
|
-
} else {
|
|
49125
|
-
const now = Date.now();
|
|
49126
|
-
const rnds = rng();
|
|
49127
|
-
updateV7State(_state, now, rnds);
|
|
49128
|
-
bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);
|
|
49129
|
-
}
|
|
49130
|
-
return buf ?? unsafeStringify(bytes);
|
|
49131
|
-
}
|
|
49132
|
-
function updateV7State(state2, now, rnds) {
|
|
49133
|
-
state2.msecs ?? (state2.msecs = -Infinity);
|
|
49134
|
-
state2.seq ?? (state2.seq = 0);
|
|
49135
|
-
if (now > state2.msecs) {
|
|
49136
|
-
state2.seq = rnds[6] << 23 | rnds[7] << 16 | rnds[8] << 8 | rnds[9];
|
|
49137
|
-
state2.msecs = now;
|
|
49138
|
-
} else {
|
|
49139
|
-
state2.seq = state2.seq + 1 | 0;
|
|
49140
|
-
if (state2.seq === 0) {
|
|
49141
|
-
state2.msecs++;
|
|
49142
|
-
}
|
|
49143
|
-
}
|
|
49144
|
-
return state2;
|
|
49145
|
-
}
|
|
49146
|
-
function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
|
|
49147
|
-
if (rnds.length < 16) {
|
|
49148
|
-
throw new Error("Random bytes length must be >= 16");
|
|
49149
|
-
}
|
|
49150
|
-
if (!buf) {
|
|
49151
|
-
buf = new Uint8Array(16);
|
|
49152
|
-
offset = 0;
|
|
49153
|
-
} else {
|
|
49154
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
49155
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
49156
|
-
}
|
|
49157
|
-
}
|
|
49158
|
-
msecs ?? (msecs = Date.now());
|
|
49159
|
-
seq ?? (seq = rnds[6] * 127 << 24 | rnds[7] << 16 | rnds[8] << 8 | rnds[9]);
|
|
49160
|
-
buf[offset++] = msecs / 1099511627776 & 255;
|
|
49161
|
-
buf[offset++] = msecs / 4294967296 & 255;
|
|
49162
|
-
buf[offset++] = msecs / 16777216 & 255;
|
|
49163
|
-
buf[offset++] = msecs / 65536 & 255;
|
|
49164
|
-
buf[offset++] = msecs / 256 & 255;
|
|
49165
|
-
buf[offset++] = msecs & 255;
|
|
49166
|
-
buf[offset++] = 112 | seq >>> 28 & 15;
|
|
49167
|
-
buf[offset++] = seq >>> 20 & 255;
|
|
49168
|
-
buf[offset++] = 128 | seq >>> 14 & 63;
|
|
49169
|
-
buf[offset++] = seq >>> 6 & 255;
|
|
49170
|
-
buf[offset++] = seq << 2 & 255 | rnds[10] & 3;
|
|
49171
|
-
buf[offset++] = rnds[11];
|
|
49172
|
-
buf[offset++] = rnds[12];
|
|
49173
|
-
buf[offset++] = rnds[13];
|
|
49174
|
-
buf[offset++] = rnds[14];
|
|
49175
|
-
buf[offset++] = rnds[15];
|
|
49176
|
-
return buf;
|
|
49177
|
-
}
|
|
49178
|
-
function version(uuid2) {
|
|
49179
|
-
if (!validate(uuid2)) {
|
|
49180
|
-
throw TypeError("Invalid UUID");
|
|
49181
|
-
}
|
|
49182
|
-
return parseInt(uuid2.slice(14, 15), 16);
|
|
49183
|
-
}
|
|
49184
|
-
const __CJS__import__1__$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
49185
|
-
__proto__: null,
|
|
49186
|
-
MAX: max,
|
|
49187
|
-
NIL: nil,
|
|
49188
|
-
parse,
|
|
49189
|
-
stringify,
|
|
49190
|
-
v1,
|
|
49191
|
-
v1ToV6,
|
|
49192
|
-
v3,
|
|
49193
|
-
v4,
|
|
49194
|
-
v5,
|
|
49195
|
-
v6,
|
|
49196
|
-
v6ToV1,
|
|
49197
|
-
v7,
|
|
49198
|
-
validate,
|
|
49199
|
-
version
|
|
49200
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
49201
48702
|
let uuid;
|
|
49202
48703
|
{
|
|
49203
|
-
uuid =
|
|
48704
|
+
uuid = () => globalThis.crypto.randomUUID();
|
|
49204
48705
|
}
|
|
49205
48706
|
const uuidv4 = uuid;
|
|
49206
48707
|
function arrayContainsObject(array, object) {
|
|
@@ -56571,8 +56072,8 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
56571
56072
|
json.className = "_User";
|
|
56572
56073
|
let userData = JSON.stringify(json);
|
|
56573
56074
|
if (CoreManager.get("ENCRYPTED_USER")) {
|
|
56574
|
-
const
|
|
56575
|
-
userData =
|
|
56075
|
+
const crypto = CoreManager.getCryptoController();
|
|
56076
|
+
userData = crypto.encrypt(json, CoreManager.get("ENCRYPTED_KEY"));
|
|
56576
56077
|
}
|
|
56577
56078
|
return Storage.setItemAsync(path, userData).then(() => {
|
|
56578
56079
|
return user;
|
|
@@ -56610,8 +56111,8 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
56610
56111
|
return null;
|
|
56611
56112
|
}
|
|
56612
56113
|
if (CoreManager.get("ENCRYPTED_USER")) {
|
|
56613
|
-
const
|
|
56614
|
-
userData =
|
|
56114
|
+
const crypto = CoreManager.getCryptoController();
|
|
56115
|
+
userData = crypto.decrypt(userData, CoreManager.get("ENCRYPTED_KEY"));
|
|
56615
56116
|
}
|
|
56616
56117
|
userData = JSON.parse(userData);
|
|
56617
56118
|
if (!userData.className) {
|
|
@@ -56647,8 +56148,8 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
56647
56148
|
return Promise.resolve(null);
|
|
56648
56149
|
}
|
|
56649
56150
|
if (CoreManager.get("ENCRYPTED_USER")) {
|
|
56650
|
-
const
|
|
56651
|
-
userData =
|
|
56151
|
+
const crypto = CoreManager.getCryptoController();
|
|
56152
|
+
userData = crypto.decrypt(userData.toString(), CoreManager.get("ENCRYPTED_KEY"));
|
|
56652
56153
|
}
|
|
56653
56154
|
userData = JSON.parse(userData);
|
|
56654
56155
|
if (!userData.className) {
|