Socket
Socket
Sign inDemoInstall

uuid

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uuid - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

11

CHANGELOG.md

@@ -5,2 +5,13 @@ # Changelog

## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20)
### Features
- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d))
- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2))
### Bug Fixes
- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [/github.com/ai/nanoevents/issues/44#issuecomment-602010343](https://github.com/uuidjs//github.com/ai/nanoevents/issues/44/issues/issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444)
## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)

@@ -7,0 +18,0 @@

13

dist/bytesToUuid.js

@@ -12,13 +12,14 @@ "use strict";

*/
var byteToHex = [];
const byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).substr(1));
}
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
const i = offset || 0;
const bth = byteToHex; // Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
return (bth[buf[i + 0]] + bth[buf[i + 1]] + bth[buf[i + 2]] + bth[buf[i + 3]] + '-' + bth[buf[i + 4]] + bth[buf[i + 5]] + '-' + bth[buf[i + 6]] + bth[buf[i + 7]] + '-' + bth[buf[i + 8]] + bth[buf[i + 9]] + '-' + bth[buf[i + 10]] + bth[buf[i + 11]] + bth[buf[i + 12]] + bth[buf[i + 13]] + bth[buf[i + 14]] + bth[buf[i + 15]]).toLowerCase();
}

@@ -25,0 +26,0 @@

@@ -8,3 +8,3 @@ /**

for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
byteToHex.push((i + 0x100).toString(16).substr(1));
}

@@ -14,7 +14,8 @@

var i = offset || 0;
var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
var bth = byteToHex; // Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
return (bth[buf[i + 0]] + bth[buf[i + 1]] + bth[buf[i + 2]] + bth[buf[i + 3]] + '-' + bth[buf[i + 4]] + bth[buf[i + 5]] + '-' + bth[buf[i + 6]] + bth[buf[i + 7]] + '-' + bth[buf[i + 8]] + bth[buf[i + 9]] + '-' + bth[buf[i + 10]] + bth[buf[i + 11]] + bth[buf[i + 12]] + bth[buf[i + 13]] + bth[buf[i + 14]] + bth[buf[i + 15]]).toLowerCase();
}
export default bytesToUuid;

@@ -22,8 +22,8 @@ /*

function md5(bytes) {
if (typeof bytes == 'string') {
if (typeof bytes === 'string') {
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Array(msg.length);
bytes = new Uint8Array(msg.length);
for (var i = 0; i < msg.length; i++) {
for (var i = 0; i < msg.length; ++i) {
bytes[i] = msg.charCodeAt(i);

@@ -41,12 +41,9 @@ }

function md5ToHexEncodedArray(input) {
var i;
var x;
var output = [];
var length32 = input.length * 32;
var hexTab = '0123456789abcdef';
var hex;
for (i = 0; i < length32; i += 8) {
x = input[i >> 5] >>> i % 32 & 0xff;
hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
for (var i = 0; i < length32; i += 8) {
var x = input[i >> 5] >>> i % 32 & 0xff;
var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
output.push(hex);

@@ -57,2 +54,10 @@ }

}
/**
* Calculate output length with padding and bit length
*/
function getOutputLength(inputLength8) {
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
}
/*

@@ -66,8 +71,3 @@ * Calculate the MD5 of an array of little-endian words, and a bit length.

x[len >> 5] |= 0x80 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var i;
var olda;
var oldb;
var oldc;
var oldd;
x[getOutputLength(len) - 1] = len;
var a = 1732584193;

@@ -78,7 +78,7 @@ var b = -271733879;

for (i = 0; i < x.length; i += 16) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
for (var i = 0; i < x.length; i += 16) {
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5ff(a, b, c, d, x[i], 7, -680876936);

@@ -163,13 +163,10 @@ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);

function bytesToWords(input) {
var i;
var output = [];
output[(input.length >> 2) - 1] = undefined;
for (i = 0; i < output.length; i += 1) {
output[i] = 0;
if (input.length === 0) {
return [];
}
var length8 = input.length * 8;
var output = new Uint32Array(getOutputLength(length8));
for (i = 0; i < length8; i += 8) {
for (var i = 0; i < length8; i += 8) {
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;

@@ -176,0 +173,0 @@ }

@@ -6,5 +6,4 @@ // Unique ID creation requires a high quality random # generator. In the browser we therefore

// find the complete implementation of crypto (msCrypto) on IE11.
var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
var getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
var rnds8 = new Uint8Array(16);
export default function rng() {

@@ -11,0 +10,0 @@ if (!getRandomValues) {

@@ -27,9 +27,9 @@ // Adapted from Chris Veness' SHA1 code at

if (typeof bytes == 'string') {
if (typeof bytes === 'string') {
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Array(msg.length);
bytes = [];
for (var i = 0; i < msg.length; i++) {
bytes[i] = msg.charCodeAt(i);
for (var i = 0; i < msg.length; ++i) {
bytes.push(msg.charCodeAt(i));
}

@@ -43,8 +43,10 @@ }

for (var i = 0; i < N; i++) {
M[i] = new Array(16);
for (var _i = 0; _i < N; ++_i) {
var arr = new Uint32Array(16);
for (var j = 0; j < 16; j++) {
M[i][j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
for (var j = 0; j < 16; ++j) {
arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
}
M[_i] = arr;
}

@@ -56,11 +58,11 @@

for (var i = 0; i < N; i++) {
var W = new Array(80);
for (var _i2 = 0; _i2 < N; ++_i2) {
var W = new Uint32Array(80);
for (var t = 0; t < 16; t++) {
W[t] = M[i][t];
for (var t = 0; t < 16; ++t) {
W[t] = M[_i2][t];
}
for (var t = 16; t < 80; t++) {
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
for (var _t = 16; _t < 80; ++_t) {
W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
}

@@ -74,5 +76,5 @@

for (var t = 0; t < 80; t++) {
var s = Math.floor(t / 20);
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
for (var _t2 = 0; _t2 < 80; ++_t2) {
var s = Math.floor(_t2 / 20);
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
e = d;

@@ -79,0 +81,0 @@ d = c;

@@ -42,3 +42,3 @@ import rng from './rng.js';

var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock
var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock

@@ -93,5 +93,5 @@

return buf ? buf : bytesToUuid(b);
return buf || bytesToUuid(b);
}
export default v1;

@@ -15,6 +15,6 @@ import bytesToUuid from './bytesToUuid.js';

var bytes = new Array(str.length);
var bytes = [];
for (var i = 0; i < str.length; i++) {
bytes[i] = str.charCodeAt(i);
for (var i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}

@@ -28,9 +28,16 @@

export default function (name, version, hashfunc) {
var generateUUID = function generateUUID(value, namespace, buf, offset) {
function generateUUID(value, namespace, buf, offset) {
var off = buf && offset || 0;
if (typeof value == 'string') value = stringToBytes(value);
if (typeof namespace == 'string') namespace = uuidToBytes(namespace);
if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); // Per 4.3
if (typeof value === 'string') value = stringToBytes(value);
if (typeof namespace === 'string') namespace = uuidToBytes(namespace);
if (!Array.isArray(value)) {
throw TypeError('value must be an array of bytes');
}
if (!Array.isArray(namespace) || namespace.length !== 16) {
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
} // Per 4.3
var bytes = hashfunc(namespace.concat(value));

@@ -47,7 +54,7 @@ bytes[6] = bytes[6] & 0x0f | version;

return buf || bytesToUuid(bytes);
}; // Function#name is not settable on some platforms (#270)
} // Function#name is not settable on some platforms (#270)
try {
generateUUID.name = name;
generateUUID.name = name; // eslint-disable-next-line no-empty
} catch (err) {} // For CommonJS default export support

@@ -54,0 +61,0 @@

@@ -5,6 +5,4 @@ import rng from './rng.js';

function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof options == 'string') {
buf = options === 'binary' ? new Array(16) : null;
if (typeof options === 'string') {
buf = options === 'binary' ? new Uint8Array(16) : null;
options = null;

@@ -20,10 +18,14 @@ }

if (buf) {
for (var ii = 0; ii < 16; ++ii) {
buf[i + ii] = rnds[ii];
var start = offset || 0;
for (var i = 0; i < 16; ++i) {
buf[start + i] = rnds[i];
}
return buf;
}
return buf || bytesToUuid(rnds);
return bytesToUuid(rnds);
}
export default v4;

@@ -5,15 +5,16 @@ /**

*/
var byteToHex = [];
const byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).substr(1));
}
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
const i = offset || 0;
const bth = byteToHex; // Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
return (bth[buf[i + 0]] + bth[buf[i + 1]] + bth[buf[i + 2]] + bth[buf[i + 3]] + '-' + bth[buf[i + 4]] + bth[buf[i + 5]] + '-' + bth[buf[i + 6]] + bth[buf[i + 7]] + '-' + bth[buf[i + 8]] + bth[buf[i + 9]] + '-' + bth[buf[i + 10]] + bth[buf[i + 11]] + bth[buf[i + 12]] + bth[buf[i + 13]] + bth[buf[i + 14]] + bth[buf[i + 15]]).toLowerCase();
}
export default bytesToUuid;
import crypto from 'crypto';
const rnds8 = new Uint8Array(16);
export default function rng() {
return crypto.randomBytes(16);
return crypto.randomFillSync(rnds8);
}

@@ -7,16 +7,16 @@ import rng from './rng.js';

var _nodeId;
let _nodeId;
var _clockseq; // Previous uuid creation time
let _clockseq; // Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
let _lastMSecs = 0;
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || [];
let i = buf && offset || 0;
const b = buf || [];
options = options || {};
var node = options.node || _nodeId;
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
let node = options.node || _nodeId;
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
// specified. We do this lazily to minimize issues related to insufficient

@@ -26,3 +26,3 @@ // system entropy. See #189

if (node == null || clockseq == null) {
var seedBytes = options.random || (options.rng || rng)();
const seedBytes = options.random || (options.rng || rng)();

@@ -44,8 +44,8 @@ if (node == null) {

var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression

@@ -73,3 +73,3 @@ if (dt < 0 && options.clockseq === undefined) {

var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;

@@ -80,3 +80,3 @@ b[i++] = tl >>> 16 & 0xff;

var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;

@@ -93,9 +93,9 @@ b[i++] = tmh & 0xff; // `time_high_and_version`

for (var n = 0; n < 6; ++n) {
for (let n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf ? buf : bytesToUuid(b);
return buf || bytesToUuid(b);
}
export default v1;

@@ -5,3 +5,3 @@ import bytesToUuid from './bytesToUuid.js';

// Note: We assume we're being passed a valid uuid string
var bytes = [];
const bytes = [];
uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {

@@ -16,6 +16,6 @@ bytes.push(parseInt(hex, 16));

var bytes = new Array(str.length);
const bytes = [];
for (var i = 0; i < str.length; i++) {
bytes[i] = str.charCodeAt(i);
for (let i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}

@@ -29,10 +29,17 @@

export default function (name, version, hashfunc) {
var generateUUID = function (value, namespace, buf, offset) {
var off = buf && offset || 0;
if (typeof value == 'string') value = stringToBytes(value);
if (typeof namespace == 'string') namespace = uuidToBytes(namespace);
if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); // Per 4.3
function generateUUID(value, namespace, buf, offset) {
const off = buf && offset || 0;
if (typeof value === 'string') value = stringToBytes(value);
if (typeof namespace === 'string') namespace = uuidToBytes(namespace);
var bytes = hashfunc(namespace.concat(value));
if (!Array.isArray(value)) {
throw TypeError('value must be an array of bytes');
}
if (!Array.isArray(namespace) || namespace.length !== 16) {
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
} // Per 4.3
const bytes = hashfunc(namespace.concat(value));
bytes[6] = bytes[6] & 0x0f | version;

@@ -42,3 +49,3 @@ bytes[8] = bytes[8] & 0x3f | 0x80;

if (buf) {
for (var idx = 0; idx < 16; ++idx) {
for (let idx = 0; idx < 16; ++idx) {
buf[off + idx] = bytes[idx];

@@ -49,7 +56,7 @@ }

return buf || bytesToUuid(bytes);
}; // Function#name is not settable on some platforms (#270)
} // Function#name is not settable on some platforms (#270)
try {
generateUUID.name = name;
generateUUID.name = name; // eslint-disable-next-line no-empty
} catch (err) {} // For CommonJS default export support

@@ -56,0 +63,0 @@

@@ -5,6 +5,4 @@ import rng from './rng.js';

function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof options == 'string') {
buf = options === 'binary' ? new Array(16) : null;
if (typeof options === 'string') {
buf = options === 'binary' ? new Uint8Array(16) : null;
options = null;

@@ -14,3 +12,3 @@ }

options = options || {};
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`

@@ -21,10 +19,14 @@ rnds[6] = rnds[6] & 0x0f | 0x40;

if (buf) {
for (var ii = 0; ii < 16; ++ii) {
buf[i + ii] = rnds[ii];
const start = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[start + i] = rnds[i];
}
return buf;
}
return buf || bytesToUuid(rnds);
return bytesToUuid(rnds);
}
export default v4;

@@ -29,8 +29,10 @@ "use strict";

function md5(bytes) {
if (typeof bytes == 'string') {
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
if (typeof bytes === 'string') {
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Array(msg.length);
bytes = new Uint8Array(msg.length);
for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);
for (let i = 0; i < msg.length; ++i) {
bytes[i] = msg.charCodeAt(i);
}
}

@@ -46,12 +48,9 @@

function md5ToHexEncodedArray(input) {
var i;
var x;
var output = [];
var length32 = input.length * 32;
var hexTab = '0123456789abcdef';
var hex;
const output = [];
const length32 = input.length * 32;
const hexTab = '0123456789abcdef';
for (i = 0; i < length32; i += 8) {
x = input[i >> 5] >>> i % 32 & 0xff;
hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
for (let i = 0; i < length32; i += 8) {
const x = input[i >> 5] >>> i % 32 & 0xff;
const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
output.push(hex);

@@ -62,2 +61,10 @@ }

}
/**
* Calculate output length with padding and bit length
*/
function getOutputLength(inputLength8) {
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
}
/*

@@ -71,18 +78,13 @@ * Calculate the MD5 of an array of little-endian words, and a bit length.

x[len >> 5] |= 0x80 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var i;
var olda;
var oldb;
var oldc;
var oldd;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
x[getOutputLength(len) - 1] = len;
let a = 1732584193;
let b = -271733879;
let c = -1732584194;
let d = 271733878;
for (i = 0; i < x.length; i += 16) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
for (let i = 0; i < x.length; i += 16) {
const olda = a;
const oldb = b;
const oldc = c;
const oldd = d;
a = md5ff(a, b, c, d, x[i], 7, -680876936);

@@ -167,13 +169,10 @@ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);

function bytesToWords(input) {
var i;
var output = [];
output[(input.length >> 2) - 1] = undefined;
for (i = 0; i < output.length; i += 1) {
output[i] = 0;
if (input.length === 0) {
return [];
}
var length8 = input.length * 8;
const length8 = input.length * 8;
const output = new Uint32Array(getOutputLength(length8));
for (i = 0; i < length8; i += 8) {
for (let i = 0; i < length8; i += 8) {
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;

@@ -191,4 +190,4 @@ }

function safeAdd(x, y) {
var lsw = (x & 0xffff) + (y & 0xffff);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
const lsw = (x & 0xffff) + (y & 0xffff);
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return msw << 16 | lsw & 0xffff;

@@ -195,0 +194,0 @@ }

@@ -12,4 +12,4 @@ "use strict";

// find the complete implementation of crypto (msCrypto) on IE11.
var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
const getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
const rnds8 = new Uint8Array(16);

@@ -16,0 +16,0 @@ function rng() {

@@ -12,4 +12,6 @@ "use strict";

const rnds8 = new Uint8Array(16);
function rng() {
return _crypto.default.randomBytes(16);
return _crypto.default.randomFillSync(rnds8);
}

@@ -31,24 +31,28 @@ "use strict";

function sha1(bytes) {
var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
if (typeof bytes == 'string') {
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
if (typeof bytes === 'string') {
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Array(msg.length);
bytes = [];
for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);
for (let i = 0; i < msg.length; ++i) {
bytes.push(msg.charCodeAt(i));
}
}
bytes.push(0x80);
var l = bytes.length / 4 + 2;
var N = Math.ceil(l / 16);
var M = new Array(N);
const l = bytes.length / 4 + 2;
const N = Math.ceil(l / 16);
const M = new Array(N);
for (var i = 0; i < N; i++) {
M[i] = new Array(16);
for (let i = 0; i < N; ++i) {
const arr = new Uint32Array(16);
for (var j = 0; j < 16; j++) {
M[i][j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
for (let j = 0; j < 16; ++j) {
arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
}
M[i] = arr;
}

@@ -60,20 +64,22 @@

for (var i = 0; i < N; i++) {
var W = new Array(80);
for (let i = 0; i < N; ++i) {
const W = new Uint32Array(80);
for (var t = 0; t < 16; t++) W[t] = M[i][t];
for (let t = 0; t < 16; ++t) {
W[t] = M[i][t];
}
for (var t = 16; t < 80; t++) {
for (let t = 16; t < 80; ++t) {
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
}
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
let a = H[0];
let b = H[1];
let c = H[2];
let d = H[3];
let e = H[4];
for (var t = 0; t < 80; t++) {
var s = Math.floor(t / 20);
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
for (let t = 0; t < 80; ++t) {
const s = Math.floor(t / 20);
const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
e = d;

@@ -80,0 +86,0 @@ d = c;

@@ -1,1 +0,1 @@

!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((r=r||self).uuid={})}(this,(function(r){"use strict";var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function t(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(e)}for(var o,a,u=[],f=0;f<256;++f)u[f]=(f+256).toString(16).substr(1);function c(r,n){var e=n||0,t=u;return[t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]]].join("")}var i=0,s=0;function v(r,n,e){var t=function(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var n=new Array(r.length),e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n}(r)),"string"==typeof t&&(t=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=e(t.concat(r));if(f[6]=15&f[6]|n,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)};try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function d(r,n){var e=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(e>>16)<<16|65535&e}function l(r,n,e,t,o,a){return d((u=d(d(n,r),d(t,a)))<<(f=o)|u>>>32-f,e);var u,f}function p(r,n,e,t,o,a,u){return l(n&e|~n&t,r,n,o,a,u)}function y(r,n,e,t,o,a,u){return l(n&t|e&~t,r,n,o,a,u)}function h(r,n,e,t,o,a,u){return l(n^e^t,r,n,o,a,u)}function g(r,n,e,t,o,a,u){return l(e^(n|~t),r,n,o,a,u)}var m=v("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Array(n.length);for(var e=0;e<n.length;e++)r[e]=n.charCodeAt(e)}return function(r){var n,e,t,o=[],a=32*r.length;for(n=0;n<a;n+=8)e=r[n>>5]>>>n%32&255,t=parseInt("0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e),16),o.push(t);return o}(function(r,n){var e,t,o,a,u;r[n>>5]|=128<<n%32,r[14+(n+64>>>9<<4)]=n;var f=1732584193,c=-271733879,i=-1732584194,s=271733878;for(e=0;e<r.length;e+=16)t=f,o=c,a=i,u=s,f=p(f,c,i,s,r[e],7,-680876936),s=p(s,f,c,i,r[e+1],12,-389564586),i=p(i,s,f,c,r[e+2],17,606105819),c=p(c,i,s,f,r[e+3],22,-1044525330),f=p(f,c,i,s,r[e+4],7,-176418897),s=p(s,f,c,i,r[e+5],12,1200080426),i=p(i,s,f,c,r[e+6],17,-1473231341),c=p(c,i,s,f,r[e+7],22,-45705983),f=p(f,c,i,s,r[e+8],7,1770035416),s=p(s,f,c,i,r[e+9],12,-1958414417),i=p(i,s,f,c,r[e+10],17,-42063),c=p(c,i,s,f,r[e+11],22,-1990404162),f=p(f,c,i,s,r[e+12],7,1804603682),s=p(s,f,c,i,r[e+13],12,-40341101),i=p(i,s,f,c,r[e+14],17,-1502002290),c=p(c,i,s,f,r[e+15],22,1236535329),f=y(f,c,i,s,r[e+1],5,-165796510),s=y(s,f,c,i,r[e+6],9,-1069501632),i=y(i,s,f,c,r[e+11],14,643717713),c=y(c,i,s,f,r[e],20,-373897302),f=y(f,c,i,s,r[e+5],5,-701558691),s=y(s,f,c,i,r[e+10],9,38016083),i=y(i,s,f,c,r[e+15],14,-660478335),c=y(c,i,s,f,r[e+4],20,-405537848),f=y(f,c,i,s,r[e+9],5,568446438),s=y(s,f,c,i,r[e+14],9,-1019803690),i=y(i,s,f,c,r[e+3],14,-187363961),c=y(c,i,s,f,r[e+8],20,1163531501),f=y(f,c,i,s,r[e+13],5,-1444681467),s=y(s,f,c,i,r[e+2],9,-51403784),i=y(i,s,f,c,r[e+7],14,1735328473),c=y(c,i,s,f,r[e+12],20,-1926607734),f=h(f,c,i,s,r[e+5],4,-378558),s=h(s,f,c,i,r[e+8],11,-2022574463),i=h(i,s,f,c,r[e+11],16,1839030562),c=h(c,i,s,f,r[e+14],23,-35309556),f=h(f,c,i,s,r[e+1],4,-1530992060),s=h(s,f,c,i,r[e+4],11,1272893353),i=h(i,s,f,c,r[e+7],16,-155497632),c=h(c,i,s,f,r[e+10],23,-1094730640),f=h(f,c,i,s,r[e+13],4,681279174),s=h(s,f,c,i,r[e],11,-358537222),i=h(i,s,f,c,r[e+3],16,-722521979),c=h(c,i,s,f,r[e+6],23,76029189),f=h(f,c,i,s,r[e+9],4,-640364487),s=h(s,f,c,i,r[e+12],11,-421815835),i=h(i,s,f,c,r[e+15],16,530742520),c=h(c,i,s,f,r[e+2],23,-995338651),f=g(f,c,i,s,r[e],6,-198630844),s=g(s,f,c,i,r[e+7],10,1126891415),i=g(i,s,f,c,r[e+14],15,-1416354905),c=g(c,i,s,f,r[e+5],21,-57434055),f=g(f,c,i,s,r[e+12],6,1700485571),s=g(s,f,c,i,r[e+3],10,-1894986606),i=g(i,s,f,c,r[e+10],15,-1051523),c=g(c,i,s,f,r[e+1],21,-2054922799),f=g(f,c,i,s,r[e+8],6,1873313359),s=g(s,f,c,i,r[e+15],10,-30611744),i=g(i,s,f,c,r[e+6],15,-1560198380),c=g(c,i,s,f,r[e+13],21,1309151649),f=g(f,c,i,s,r[e+4],6,-145523070),s=g(s,f,c,i,r[e+11],10,-1120210379),i=g(i,s,f,c,r[e+2],15,718787259),c=g(c,i,s,f,r[e+9],21,-343485551),f=d(f,t),c=d(c,o),i=d(i,a),s=d(s,u);return[f,c,i,s]}(function(r){var n,e=[];for(e[(r.length>>2)-1]=void 0,n=0;n<e.length;n+=1)e[n]=0;var t=8*r.length;for(n=0;n<t;n+=8)e[n>>5]|=(255&r[n/8])<<n%32;return e}(r),8*r.length))}));function b(r,n,e,t){switch(r){case 0:return n&e^~n&t;case 1:return n^e^t;case 2:return n&e^n&t^e&t;case 3:return n^e^t}}function A(r,n){return r<<n|r>>>32-n}var w=v("v5",80,(function(r){var n=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=new Array(t.length);for(var o=0;o<t.length;o++)r[o]=t.charCodeAt(o)}r.push(128);var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u);for(o=0;o<u;o++){f[o]=new Array(16);for(var c=0;c<16;c++)f[o][c]=r[64*o+4*c]<<24|r[64*o+4*c+1]<<16|r[64*o+4*c+2]<<8|r[64*o+4*c+3]}for(f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295,o=0;o<u;o++){for(var i=new Array(80),s=0;s<16;s++)i[s]=f[o][s];for(s=16;s<80;s++)i[s]=A(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var v=e[0],d=e[1],l=e[2],p=e[3],y=e[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=A(v,5)+b(h,d,l,p)+y+n[h]+i[s]>>>0;y=p,p=l,l=A(d,30)>>>0,d=v,v=g}e[0]=e[0]+v>>>0,e[1]=e[1]+d>>>0,e[2]=e[2]+l>>>0,e[3]=e[3]+p>>>0,e[4]=e[4]+y>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}));r.v1=function(r,n,e){var u=n&&e||0,f=n||[],v=(r=r||{}).node||o,d=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==d){var l=r.random||(r.rng||t)();null==v&&(v=o=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==d&&(d=a=16383&(l[6]<<8|l[7]))}var p=void 0!==r.msecs?r.msecs:(new Date).getTime(),y=void 0!==r.nsecs?r.nsecs:s+1,h=p-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(d=d+1&16383),(h<0||p>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=p,s=y,a=d;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=p/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=d>>>8|128,f[u++]=255&d;for(var b=0;b<6;++b)f[u+b]=v[b];return n||c(f)},r.v3=m,r.v4=function(r,n,e){var o=n&&e||0;"string"==typeof r&&(n="binary"===r?new Array(16):null,r=null);var a=(r=r||{}).random||(r.rng||t)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var u=0;u<16;++u)n[o+u]=a[u];return n||c(a)},r.v5=w,Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((r=r||self).uuid={})}(this,(function(r){"use strict";var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function t(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(e)}for(var o,a,u=[],f=0;f<256;++f)u.push((f+256).toString(16).substr(1));function c(r,n){var e=n||0,t=u;return(t[r[e+0]]+t[r[e+1]]+t[r[e+2]]+t[r[e+3]]+"-"+t[r[e+4]]+t[r[e+5]]+"-"+t[r[e+6]]+t[r[e+7]]+"-"+t[r[e+8]]+t[r[e+9]]+"-"+t[r[e+10]]+t[r[e+11]]+t[r[e+12]]+t[r[e+13]]+t[r[e+14]]+t[r[e+15]]).toLowerCase()}var i=0,s=0;function v(r,n,e){function t(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var n=[],e=0;e<r.length;++e)n.push(r.charCodeAt(e));return n}(r)),"string"==typeof t&&(t=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=e(t.concat(r));if(f[6]=15&f[6]|n,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)}try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function d(r){return 14+(r+64>>>9<<4)+1}function p(r,n){var e=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(e>>16)<<16|65535&e}function l(r,n,e,t,o,a){return p((u=p(p(n,r),p(t,a)))<<(f=o)|u>>>32-f,e);var u,f}function y(r,n,e,t,o,a,u){return l(n&e|~n&t,r,n,o,a,u)}function h(r,n,e,t,o,a,u){return l(n&t|e&~t,r,n,o,a,u)}function g(r,n,e,t,o,a,u){return l(n^e^t,r,n,o,a,u)}function m(r,n,e,t,o,a,u){return l(e^(n|~t),r,n,o,a,u)}var b=v("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Uint8Array(n.length);for(var e=0;e<n.length;++e)r[e]=n.charCodeAt(e)}return function(r){for(var n=[],e=32*r.length,t=0;t<e;t+=8){var o=r[t>>5]>>>t%32&255,a=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);n.push(a)}return n}(function(r,n){r[n>>5]|=128<<n%32,r[d(n)-1]=n;for(var e=1732584193,t=-271733879,o=-1732584194,a=271733878,u=0;u<r.length;u+=16){var f=e,c=t,i=o,s=a;e=y(e,t,o,a,r[u],7,-680876936),a=y(a,e,t,o,r[u+1],12,-389564586),o=y(o,a,e,t,r[u+2],17,606105819),t=y(t,o,a,e,r[u+3],22,-1044525330),e=y(e,t,o,a,r[u+4],7,-176418897),a=y(a,e,t,o,r[u+5],12,1200080426),o=y(o,a,e,t,r[u+6],17,-1473231341),t=y(t,o,a,e,r[u+7],22,-45705983),e=y(e,t,o,a,r[u+8],7,1770035416),a=y(a,e,t,o,r[u+9],12,-1958414417),o=y(o,a,e,t,r[u+10],17,-42063),t=y(t,o,a,e,r[u+11],22,-1990404162),e=y(e,t,o,a,r[u+12],7,1804603682),a=y(a,e,t,o,r[u+13],12,-40341101),o=y(o,a,e,t,r[u+14],17,-1502002290),t=y(t,o,a,e,r[u+15],22,1236535329),e=h(e,t,o,a,r[u+1],5,-165796510),a=h(a,e,t,o,r[u+6],9,-1069501632),o=h(o,a,e,t,r[u+11],14,643717713),t=h(t,o,a,e,r[u],20,-373897302),e=h(e,t,o,a,r[u+5],5,-701558691),a=h(a,e,t,o,r[u+10],9,38016083),o=h(o,a,e,t,r[u+15],14,-660478335),t=h(t,o,a,e,r[u+4],20,-405537848),e=h(e,t,o,a,r[u+9],5,568446438),a=h(a,e,t,o,r[u+14],9,-1019803690),o=h(o,a,e,t,r[u+3],14,-187363961),t=h(t,o,a,e,r[u+8],20,1163531501),e=h(e,t,o,a,r[u+13],5,-1444681467),a=h(a,e,t,o,r[u+2],9,-51403784),o=h(o,a,e,t,r[u+7],14,1735328473),t=h(t,o,a,e,r[u+12],20,-1926607734),e=g(e,t,o,a,r[u+5],4,-378558),a=g(a,e,t,o,r[u+8],11,-2022574463),o=g(o,a,e,t,r[u+11],16,1839030562),t=g(t,o,a,e,r[u+14],23,-35309556),e=g(e,t,o,a,r[u+1],4,-1530992060),a=g(a,e,t,o,r[u+4],11,1272893353),o=g(o,a,e,t,r[u+7],16,-155497632),t=g(t,o,a,e,r[u+10],23,-1094730640),e=g(e,t,o,a,r[u+13],4,681279174),a=g(a,e,t,o,r[u],11,-358537222),o=g(o,a,e,t,r[u+3],16,-722521979),t=g(t,o,a,e,r[u+6],23,76029189),e=g(e,t,o,a,r[u+9],4,-640364487),a=g(a,e,t,o,r[u+12],11,-421815835),o=g(o,a,e,t,r[u+15],16,530742520),t=g(t,o,a,e,r[u+2],23,-995338651),e=m(e,t,o,a,r[u],6,-198630844),a=m(a,e,t,o,r[u+7],10,1126891415),o=m(o,a,e,t,r[u+14],15,-1416354905),t=m(t,o,a,e,r[u+5],21,-57434055),e=m(e,t,o,a,r[u+12],6,1700485571),a=m(a,e,t,o,r[u+3],10,-1894986606),o=m(o,a,e,t,r[u+10],15,-1051523),t=m(t,o,a,e,r[u+1],21,-2054922799),e=m(e,t,o,a,r[u+8],6,1873313359),a=m(a,e,t,o,r[u+15],10,-30611744),o=m(o,a,e,t,r[u+6],15,-1560198380),t=m(t,o,a,e,r[u+13],21,1309151649),e=m(e,t,o,a,r[u+4],6,-145523070),a=m(a,e,t,o,r[u+11],10,-1120210379),o=m(o,a,e,t,r[u+2],15,718787259),t=m(t,o,a,e,r[u+9],21,-343485551),e=p(e,f),t=p(t,c),o=p(o,i),a=p(a,s)}return[e,t,o,a]}(function(r){if(0===r.length)return[];for(var n=8*r.length,e=new Uint32Array(d(n)),t=0;t<n;t+=8)e[t>>5]|=(255&r[t/8])<<t%32;return e}(r),8*r.length))}));function A(r,n,e,t){switch(r){case 0:return n&e^~n&t;case 1:return n^e^t;case 2:return n&e^n&t^e&t;case 3:return n^e^t}}function w(r,n){return r<<n|r>>>32-n}var C=v("v5",80,(function(r){var n=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o<t.length;++o)r.push(t.charCodeAt(o))}r.push(128);for(var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u),c=0;c<u;++c){for(var i=new Uint32Array(16),s=0;s<16;++s)i[s]=r[64*c+4*s]<<24|r[64*c+4*s+1]<<16|r[64*c+4*s+2]<<8|r[64*c+4*s+3];f[c]=i}f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295;for(var v=0;v<u;++v){for(var d=new Uint32Array(80),p=0;p<16;++p)d[p]=f[v][p];for(var l=16;l<80;++l)d[l]=w(d[l-3]^d[l-8]^d[l-14]^d[l-16],1);for(var y=e[0],h=e[1],g=e[2],m=e[3],b=e[4],C=0;C<80;++C){var U=Math.floor(C/20),R=w(y,5)+A(U,h,g,m)+b+n[U]+d[C]>>>0;b=m,m=g,g=w(h,30)>>>0,h=y,y=R}e[0]=e[0]+y>>>0,e[1]=e[1]+h>>>0,e[2]=e[2]+g>>>0,e[3]=e[3]+m>>>0,e[4]=e[4]+b>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}));r.v1=function(r,n,e){var u=n&&e||0,f=n||[],v=(r=r||{}).node||o,d=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==d){var p=r.random||(r.rng||t)();null==v&&(v=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=a=16383&(p[6]<<8|p[7]))}var l=void 0!==r.msecs?r.msecs:Date.now(),y=void 0!==r.nsecs?r.nsecs:s+1,h=l-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(d=d+1&16383),(h<0||l>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=l,s=y,a=d;var g=(1e4*(268435455&(l+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=l/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=d>>>8|128,f[u++]=255&d;for(var b=0;b<6;++b)f[u+b]=v[b];return n||c(f)},r.v3=b,r.v4=function(r,n,e){"string"==typeof r&&(n="binary"===r?new Uint8Array(16):null,r=null);var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n){for(var a=e||0,u=0;u<16;++u)n[a+u]=o[u];return n}return c(o)},r.v5=C,Object.defineProperty(r,"__esModule",{value:!0})}));

@@ -1,1 +0,1 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function n(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}for(var t,r,u=[],s=0;s<256;++s)u[s]=(s+256).toString(16).substr(1);var i=0,d=0;return function(e,o,s){var a=o&&s||0,c=o||[],f=(e=e||{}).node||t,p=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==p){var l=e.random||(e.rng||n)();null==f&&(f=t=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==p&&(p=r=16383&(l[6]<<8|l[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:d+1,y=m-i+(v-d)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||m>i)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=m,d=v,r=p;var g=(1e4*(268435455&(m+=122192928e5))+v)%4294967296;c[a++]=g>>>24&255,c[a++]=g>>>16&255,c[a++]=g>>>8&255,c[a++]=255&g;var h=m/4294967296*1e4&268435455;c[a++]=h>>>8&255,c[a++]=255&h,c[a++]=h>>>24&15|16,c[a++]=h>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var w=0;w<6;++w)c[a+w]=f[w];return o||function(e,o){var n=o||0,t=u;return[t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]]].join("")}(c)}}));
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}for(var n,r,u=[],s=0;s<256;++s)u.push((s+256).toString(16).substr(1));var d=0,i=0;return function(e,o,s){var a=o&&s||0,c=o||[],f=(e=e||{}).node||n,p=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==p){var l=e.random||(e.rng||t)();null==f&&(f=n=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==p&&(p=r=16383&(l[6]<<8|l[7]))}var m=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:i+1,y=m-d+(v-i)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||m>d)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=m,i=v,r=p;var g=(1e4*(268435455&(m+=122192928e5))+v)%4294967296;c[a++]=g>>>24&255,c[a++]=g>>>16&255,c[a++]=g>>>8&255,c[a++]=255&g;var h=m/4294967296*1e4&268435455;c[a++]=h>>>8&255,c[a++]=255&h,c[a++]=h>>>24&15|16,c[a++]=h>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var w=0;w<6;++w)c[a+w]=f[w];return o||function(e,o){var t=o||0,n=u;return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}(c)}}));

@@ -1,1 +0,1 @@

!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self).uuidv3=n()}(this,(function(){"use strict";for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);function t(r,n){var t=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(t>>16)<<16|65535&t}function e(r,n,e,o,a,u){return t((f=t(t(n,r),t(o,u)))<<(c=a)|f>>>32-c,e);var f,c}function o(r,n,t,o,a,u,f){return e(n&t|~n&o,r,n,a,u,f)}function a(r,n,t,o,a,u,f){return e(n&o|t&~o,r,n,a,u,f)}function u(r,n,t,o,a,u,f){return e(n^t^o,r,n,a,u,f)}function f(r,n,t,o,a,u,f){return e(t^(n|~o),r,n,a,u,f)}return function(n,t,e){var o=function(n,o,a,u){var f=a&&u||0;if("string"==typeof n&&(n=function(r){r=unescape(encodeURIComponent(r));for(var n=new Array(r.length),t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n}(n)),"string"==typeof o&&(o=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(o)),!Array.isArray(n))throw TypeError("value must be an array of bytes");if(!Array.isArray(o)||16!==o.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=e(o.concat(n));if(c[6]=15&c[6]|t,c[8]=63&c[8]|128,a)for(var i=0;i<16;++i)a[f+i]=c[i];return a||function(n,t){var e=t||0,o=r;return[o[n[e++]],o[n[e++]],o[n[e++]],o[n[e++]],"-",o[n[e++]],o[n[e++]],"-",o[n[e++]],o[n[e++]],"-",o[n[e++]],o[n[e++]],"-",o[n[e++]],o[n[e++]],o[n[e++]],o[n[e++]],o[n[e++]],o[n[e++]]].join("")}(c)};try{o.name=n}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Array(n.length);for(var e=0;e<n.length;e++)r[e]=n.charCodeAt(e)}return function(r){var n,t,e,o=[],a=32*r.length;for(n=0;n<a;n+=8)t=r[n>>5]>>>n%32&255,e=parseInt("0123456789abcdef".charAt(t>>>4&15)+"0123456789abcdef".charAt(15&t),16),o.push(e);return o}(function(r,n){var e,c,i,d,s;r[n>>5]|=128<<n%32,r[14+(n+64>>>9<<4)]=n;var v=1732584193,h=-271733879,p=-1732584194,y=271733878;for(e=0;e<r.length;e+=16)c=v,i=h,d=p,s=y,v=o(v,h,p,y,r[e],7,-680876936),y=o(y,v,h,p,r[e+1],12,-389564586),p=o(p,y,v,h,r[e+2],17,606105819),h=o(h,p,y,v,r[e+3],22,-1044525330),v=o(v,h,p,y,r[e+4],7,-176418897),y=o(y,v,h,p,r[e+5],12,1200080426),p=o(p,y,v,h,r[e+6],17,-1473231341),h=o(h,p,y,v,r[e+7],22,-45705983),v=o(v,h,p,y,r[e+8],7,1770035416),y=o(y,v,h,p,r[e+9],12,-1958414417),p=o(p,y,v,h,r[e+10],17,-42063),h=o(h,p,y,v,r[e+11],22,-1990404162),v=o(v,h,p,y,r[e+12],7,1804603682),y=o(y,v,h,p,r[e+13],12,-40341101),p=o(p,y,v,h,r[e+14],17,-1502002290),h=o(h,p,y,v,r[e+15],22,1236535329),v=a(v,h,p,y,r[e+1],5,-165796510),y=a(y,v,h,p,r[e+6],9,-1069501632),p=a(p,y,v,h,r[e+11],14,643717713),h=a(h,p,y,v,r[e],20,-373897302),v=a(v,h,p,y,r[e+5],5,-701558691),y=a(y,v,h,p,r[e+10],9,38016083),p=a(p,y,v,h,r[e+15],14,-660478335),h=a(h,p,y,v,r[e+4],20,-405537848),v=a(v,h,p,y,r[e+9],5,568446438),y=a(y,v,h,p,r[e+14],9,-1019803690),p=a(p,y,v,h,r[e+3],14,-187363961),h=a(h,p,y,v,r[e+8],20,1163531501),v=a(v,h,p,y,r[e+13],5,-1444681467),y=a(y,v,h,p,r[e+2],9,-51403784),p=a(p,y,v,h,r[e+7],14,1735328473),h=a(h,p,y,v,r[e+12],20,-1926607734),v=u(v,h,p,y,r[e+5],4,-378558),y=u(y,v,h,p,r[e+8],11,-2022574463),p=u(p,y,v,h,r[e+11],16,1839030562),h=u(h,p,y,v,r[e+14],23,-35309556),v=u(v,h,p,y,r[e+1],4,-1530992060),y=u(y,v,h,p,r[e+4],11,1272893353),p=u(p,y,v,h,r[e+7],16,-155497632),h=u(h,p,y,v,r[e+10],23,-1094730640),v=u(v,h,p,y,r[e+13],4,681279174),y=u(y,v,h,p,r[e],11,-358537222),p=u(p,y,v,h,r[e+3],16,-722521979),h=u(h,p,y,v,r[e+6],23,76029189),v=u(v,h,p,y,r[e+9],4,-640364487),y=u(y,v,h,p,r[e+12],11,-421815835),p=u(p,y,v,h,r[e+15],16,530742520),h=u(h,p,y,v,r[e+2],23,-995338651),v=f(v,h,p,y,r[e],6,-198630844),y=f(y,v,h,p,r[e+7],10,1126891415),p=f(p,y,v,h,r[e+14],15,-1416354905),h=f(h,p,y,v,r[e+5],21,-57434055),v=f(v,h,p,y,r[e+12],6,1700485571),y=f(y,v,h,p,r[e+3],10,-1894986606),p=f(p,y,v,h,r[e+10],15,-1051523),h=f(h,p,y,v,r[e+1],21,-2054922799),v=f(v,h,p,y,r[e+8],6,1873313359),y=f(y,v,h,p,r[e+15],10,-30611744),p=f(p,y,v,h,r[e+6],15,-1560198380),h=f(h,p,y,v,r[e+13],21,1309151649),v=f(v,h,p,y,r[e+4],6,-145523070),y=f(y,v,h,p,r[e+11],10,-1120210379),p=f(p,y,v,h,r[e+2],15,718787259),h=f(h,p,y,v,r[e+9],21,-343485551),v=t(v,c),h=t(h,i),p=t(p,d),y=t(y,s);return[v,h,p,y]}(function(r){var n,t=[];for(t[(r.length>>2)-1]=void 0,n=0;n<t.length;n+=1)t[n]=0;var e=8*r.length;for(n=0;n<e;n+=8)t[n>>5]|=(255&r[n/8])<<n%32;return t}(r),8*r.length))}))}));
!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self).uuidv3=n()}(this,(function(){"use strict";for(var r=[],n=0;n<256;++n)r.push((n+256).toString(16).substr(1));function t(r){return 14+(r+64>>>9<<4)+1}function e(r,n){var t=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(t>>16)<<16|65535&t}function o(r,n,t,o,u,a){return e((f=e(e(n,r),e(o,a)))<<(c=u)|f>>>32-c,t);var f,c}function u(r,n,t,e,u,a,f){return o(n&t|~n&e,r,n,u,a,f)}function a(r,n,t,e,u,a,f){return o(n&e|t&~e,r,n,u,a,f)}function f(r,n,t,e,u,a,f){return o(n^t^e,r,n,u,a,f)}function c(r,n,t,e,u,a,f){return o(t^(n|~e),r,n,u,a,f)}return function(n,t,e){function o(n,o,u,a){var f=u&&a||0;if("string"==typeof n&&(n=function(r){r=unescape(encodeURIComponent(r));for(var n=[],t=0;t<r.length;++t)n.push(r.charCodeAt(t));return n}(n)),"string"==typeof o&&(o=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(o)),!Array.isArray(n))throw TypeError("value must be an array of bytes");if(!Array.isArray(o)||16!==o.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=e(o.concat(n));if(c[6]=15&c[6]|t,c[8]=63&c[8]|128,u)for(var i=0;i<16;++i)u[f+i]=c[i];return u||function(n,t){var e=t||0,o=r;return(o[n[e+0]]+o[n[e+1]]+o[n[e+2]]+o[n[e+3]]+"-"+o[n[e+4]]+o[n[e+5]]+"-"+o[n[e+6]]+o[n[e+7]]+"-"+o[n[e+8]]+o[n[e+9]]+"-"+o[n[e+10]]+o[n[e+11]]+o[n[e+12]]+o[n[e+13]]+o[n[e+14]]+o[n[e+15]]).toLowerCase()}(c)}try{o.name=n}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Uint8Array(n.length);for(var o=0;o<n.length;++o)r[o]=n.charCodeAt(o)}return function(r){for(var n=[],t=32*r.length,e=0;e<t;e+=8){var o=r[e>>5]>>>e%32&255,u=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);n.push(u)}return n}(function(r,n){r[n>>5]|=128<<n%32,r[t(n)-1]=n;for(var o=1732584193,i=-271733879,s=-1732584194,d=271733878,p=0;p<r.length;p+=16){var h=o,v=i,y=s,g=d;o=u(o,i,s,d,r[p],7,-680876936),d=u(d,o,i,s,r[p+1],12,-389564586),s=u(s,d,o,i,r[p+2],17,606105819),i=u(i,s,d,o,r[p+3],22,-1044525330),o=u(o,i,s,d,r[p+4],7,-176418897),d=u(d,o,i,s,r[p+5],12,1200080426),s=u(s,d,o,i,r[p+6],17,-1473231341),i=u(i,s,d,o,r[p+7],22,-45705983),o=u(o,i,s,d,r[p+8],7,1770035416),d=u(d,o,i,s,r[p+9],12,-1958414417),s=u(s,d,o,i,r[p+10],17,-42063),i=u(i,s,d,o,r[p+11],22,-1990404162),o=u(o,i,s,d,r[p+12],7,1804603682),d=u(d,o,i,s,r[p+13],12,-40341101),s=u(s,d,o,i,r[p+14],17,-1502002290),i=u(i,s,d,o,r[p+15],22,1236535329),o=a(o,i,s,d,r[p+1],5,-165796510),d=a(d,o,i,s,r[p+6],9,-1069501632),s=a(s,d,o,i,r[p+11],14,643717713),i=a(i,s,d,o,r[p],20,-373897302),o=a(o,i,s,d,r[p+5],5,-701558691),d=a(d,o,i,s,r[p+10],9,38016083),s=a(s,d,o,i,r[p+15],14,-660478335),i=a(i,s,d,o,r[p+4],20,-405537848),o=a(o,i,s,d,r[p+9],5,568446438),d=a(d,o,i,s,r[p+14],9,-1019803690),s=a(s,d,o,i,r[p+3],14,-187363961),i=a(i,s,d,o,r[p+8],20,1163531501),o=a(o,i,s,d,r[p+13],5,-1444681467),d=a(d,o,i,s,r[p+2],9,-51403784),s=a(s,d,o,i,r[p+7],14,1735328473),i=a(i,s,d,o,r[p+12],20,-1926607734),o=f(o,i,s,d,r[p+5],4,-378558),d=f(d,o,i,s,r[p+8],11,-2022574463),s=f(s,d,o,i,r[p+11],16,1839030562),i=f(i,s,d,o,r[p+14],23,-35309556),o=f(o,i,s,d,r[p+1],4,-1530992060),d=f(d,o,i,s,r[p+4],11,1272893353),s=f(s,d,o,i,r[p+7],16,-155497632),i=f(i,s,d,o,r[p+10],23,-1094730640),o=f(o,i,s,d,r[p+13],4,681279174),d=f(d,o,i,s,r[p],11,-358537222),s=f(s,d,o,i,r[p+3],16,-722521979),i=f(i,s,d,o,r[p+6],23,76029189),o=f(o,i,s,d,r[p+9],4,-640364487),d=f(d,o,i,s,r[p+12],11,-421815835),s=f(s,d,o,i,r[p+15],16,530742520),i=f(i,s,d,o,r[p+2],23,-995338651),o=c(o,i,s,d,r[p],6,-198630844),d=c(d,o,i,s,r[p+7],10,1126891415),s=c(s,d,o,i,r[p+14],15,-1416354905),i=c(i,s,d,o,r[p+5],21,-57434055),o=c(o,i,s,d,r[p+12],6,1700485571),d=c(d,o,i,s,r[p+3],10,-1894986606),s=c(s,d,o,i,r[p+10],15,-1051523),i=c(i,s,d,o,r[p+1],21,-2054922799),o=c(o,i,s,d,r[p+8],6,1873313359),d=c(d,o,i,s,r[p+15],10,-30611744),s=c(s,d,o,i,r[p+6],15,-1560198380),i=c(i,s,d,o,r[p+13],21,1309151649),o=c(o,i,s,d,r[p+4],6,-145523070),d=c(d,o,i,s,r[p+11],10,-1120210379),s=c(s,d,o,i,r[p+2],15,718787259),i=c(i,s,d,o,r[p+9],21,-343485551),o=e(o,h),i=e(i,v),s=e(s,y),d=e(d,g)}return[o,i,s,d]}(function(r){if(0===r.length)return[];for(var n=8*r.length,e=new Uint32Array(t(n)),o=0;o<n;o+=8)e[o>>5]|=(255&r[o/8])<<o%32;return e}(r),8*r.length))}))}));

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function n(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);return function(t,e,r){var u=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var i=(t=t||{}).random||(t.rng||n)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var d=0;d<16;++d)e[u+d]=i[d];return e||function(t,e){var n=e||0,r=o;return[r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]]].join("")}(i)}}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function n(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}for(var o=[],r=0;r<256;++r)o.push((r+256).toString(16).substr(1));return function(t,e,r){"string"==typeof t&&(e="binary"===t?new Uint8Array(16):null,t=null);var u=(t=t||{}).random||(t.rng||n)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,e){for(var i=r||0,d=0;d<16;++d)e[i+d]=u[d];return e}return function(t,e){var n=e||0,r=o;return(r[t[n+0]]+r[t[n+1]]+r[t[n+2]]+r[t[n+3]]+"-"+r[t[n+4]]+r[t[n+5]]+"-"+r[t[n+6]]+r[t[n+7]]+"-"+r[t[n+8]]+r[t[n+9]]+"-"+r[t[n+10]]+r[t[n+11]]+r[t[n+12]]+r[t[n+13]]+r[t[n+14]]+r[t[n+15]]).toLowerCase()}(u)}}));

@@ -1,1 +0,1 @@

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).uuidv5=e()}(this,(function(){"use strict";for(var r=[],e=0;e<256;++e)r[e]=(e+256).toString(16).substr(1);function n(r,e,n,t){switch(r){case 0:return e&n^~e&t;case 1:return e^n^t;case 2:return e&n^e&t^n&t;case 3:return e^n^t}}function t(r,e){return r<<e|r>>>32-e}return function(e,n,t){var a=function(e,a,o,f){var u=o&&f||0;if("string"==typeof e&&(e=function(r){r=unescape(encodeURIComponent(r));for(var e=new Array(r.length),n=0;n<r.length;n++)e[n]=r.charCodeAt(n);return e}(e)),"string"==typeof a&&(a=function(r){var e=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){e.push(parseInt(r,16))})),e}(a)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(a)||16!==a.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=t(a.concat(e));if(c[6]=15&c[6]|n,c[8]=63&c[8]|128,o)for(var i=0;i<16;++i)o[u+i]=c[i];return o||function(e,n){var t=n||0,a=r;return[a[e[t++]],a[e[t++]],a[e[t++]],a[e[t++]],"-",a[e[t++]],a[e[t++]],"-",a[e[t++]],a[e[t++]],"-",a[e[t++]],a[e[t++]],"-",a[e[t++]],a[e[t++]],a[e[t++]],a[e[t++]],a[e[t++]],a[e[t++]]].join("")}(c)};try{a.name=e}catch(r){}return a.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",a.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",a}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var o=unescape(encodeURIComponent(r));r=new Array(o.length);for(var f=0;f<o.length;f++)r[f]=o.charCodeAt(f)}r.push(128);var u=r.length/4+2,c=Math.ceil(u/16),i=new Array(c);for(f=0;f<c;f++){i[f]=new Array(16);for(var s=0;s<16;s++)i[f][s]=r[64*f+4*s]<<24|r[64*f+4*s+1]<<16|r[64*f+4*s+2]<<8|r[64*f+4*s+3]}for(i[c-1][14]=8*(r.length-1)/Math.pow(2,32),i[c-1][14]=Math.floor(i[c-1][14]),i[c-1][15]=8*(r.length-1)&4294967295,f=0;f<c;f++){for(var d=new Array(80),y=0;y<16;y++)d[y]=i[f][y];for(y=16;y<80;y++)d[y]=t(d[y-3]^d[y-8]^d[y-14]^d[y-16],1);var h=a[0],p=a[1],v=a[2],l=a[3],g=a[4];for(y=0;y<80;y++){var A=Math.floor(y/20),b=t(h,5)+n(A,p,v,l)+g+e[A]+d[y]>>>0;g=l,l=v,v=t(p,30)>>>0,p=h,h=b}a[0]=a[0]+h>>>0,a[1]=a[1]+p>>>0,a[2]=a[2]+v>>>0,a[3]=a[3]+l>>>0,a[4]=a[4]+g>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}))}));
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).uuidv5=e()}(this,(function(){"use strict";for(var r=[],e=0;e<256;++e)r.push((e+256).toString(16).substr(1));function n(r,e,n,t){switch(r){case 0:return e&n^~e&t;case 1:return e^n^t;case 2:return e&n^e&t^n&t;case 3:return e^n^t}}function t(r,e){return r<<e|r>>>32-e}return function(e,n,t){function a(e,a,o,f){var u=o&&f||0;if("string"==typeof e&&(e=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n<r.length;++n)e.push(r.charCodeAt(n));return e}(e)),"string"==typeof a&&(a=function(r){var e=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){e.push(parseInt(r,16))})),e}(a)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(a)||16!==a.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var c=t(a.concat(e));if(c[6]=15&c[6]|n,c[8]=63&c[8]|128,o)for(var i=0;i<16;++i)o[u+i]=c[i];return o||function(e,n){var t=n||0,a=r;return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(c)}try{a.name=e}catch(r){}return a.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",a.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",a}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var o=unescape(encodeURIComponent(r));r=[];for(var f=0;f<o.length;++f)r.push(o.charCodeAt(f))}r.push(128);for(var u=r.length/4+2,c=Math.ceil(u/16),i=new Array(c),s=0;s<c;++s){for(var p=new Uint32Array(16),d=0;d<16;++d)p[d]=r[64*s+4*d]<<24|r[64*s+4*d+1]<<16|r[64*s+4*d+2]<<8|r[64*s+4*d+3];i[s]=p}i[c-1][14]=8*(r.length-1)/Math.pow(2,32),i[c-1][14]=Math.floor(i[c-1][14]),i[c-1][15]=8*(r.length-1)&4294967295;for(var h=0;h<c;++h){for(var v=new Uint32Array(80),y=0;y<16;++y)v[y]=i[h][y];for(var l=16;l<80;++l)v[l]=t(v[l-3]^v[l-8]^v[l-14]^v[l-16],1);for(var b=a[0],g=a[1],A=a[2],m=a[3],w=a[4],C=0;C<80;++C){var U=Math.floor(C/20),M=t(b,5)+n(U,g,A,m)+w+e[U]+v[C]>>>0;w=m,m=A,A=t(g,30)>>>0,g=b,b=M}a[0]=a[0]+b>>>0,a[1]=a[1]+g>>>0,a[2]=a[2]+A>>>0,a[3]=a[3]+m>>>0,a[4]=a[4]+w>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,255&a[0],a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,255&a[1],a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,255&a[2],a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,255&a[3],a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,255&a[4]]}))}));

@@ -26,3 +26,3 @@ "use strict";

var args = process.argv.slice(2);
const args = process.argv.slice(2);

@@ -34,3 +34,3 @@ if (args.indexOf('--help') >= 0) {

var version = args.shift() || 'v4';
const version = args.shift() || 'v4';

@@ -43,10 +43,12 @@ switch (version) {

case 'v3':
var name = args.shift();
var namespace = args.shift();
(0, _assert.default)(name != null, 'v3 name not specified');
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
if (namespace === 'URL') namespace = _v2.default.URL;
if (namespace === 'DNS') namespace = _v2.default.DNS;
console.log((0, _v2.default)(name, namespace));
break;
{
const name = args.shift();
let namespace = args.shift();
(0, _assert.default)(name != null, 'v3 name not specified');
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
if (namespace === 'URL') namespace = _v2.default.URL;
if (namespace === 'DNS') namespace = _v2.default.DNS;
console.log((0, _v2.default)(name, namespace));
break;
}

@@ -58,10 +60,12 @@ case 'v4':

case 'v5':
var name = args.shift();
var namespace = args.shift();
(0, _assert.default)(name != null, 'v5 name not specified');
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
if (namespace === 'URL') namespace = _v4.default.URL;
if (namespace === 'DNS') namespace = _v4.default.DNS;
console.log((0, _v4.default)(name, namespace));
break;
{
const name = args.shift();
let namespace = args.shift();
(0, _assert.default)(name != null, 'v5 name not specified');
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
if (namespace === 'URL') namespace = _v4.default.URL;
if (namespace === 'DNS') namespace = _v4.default.DNS;
console.log((0, _v4.default)(name, namespace));
break;
}

@@ -68,0 +72,0 @@ default:

@@ -18,16 +18,16 @@ "use strict";

// and http://docs.python.org/library/uuid.html
var _nodeId;
let _nodeId;
var _clockseq; // Previous uuid creation time
let _clockseq; // Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
let _lastMSecs = 0;
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || [];
let i = buf && offset || 0;
const b = buf || [];
options = options || {};
var node = options.node || _nodeId;
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
let node = options.node || _nodeId;
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
// specified. We do this lazily to minimize issues related to insufficient

@@ -37,3 +37,3 @@ // system entropy. See #189

if (node == null || clockseq == null) {
var seedBytes = options.random || (options.rng || _rng.default)();
const seedBytes = options.random || (options.rng || _rng.default)();

@@ -55,8 +55,8 @@ if (node == null) {

var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression

@@ -84,3 +84,3 @@ if (dt < 0 && options.clockseq === undefined) {

var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;

@@ -91,3 +91,3 @@ b[i++] = tl >>> 16 & 0xff;

var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;

@@ -104,7 +104,7 @@ b[i++] = tmh & 0xff; // `time_high_and_version`

for (var n = 0; n < 6; ++n) {
for (let n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf ? buf : (0, _bytesToUuid.default)(b);
return buf || (0, _bytesToUuid.default)(b);
}

@@ -111,0 +111,0 @@

@@ -15,3 +15,3 @@ "use strict";

// Note: We assume we're being passed a valid uuid string
var bytes = [];
const bytes = [];
uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {

@@ -26,6 +26,6 @@ bytes.push(parseInt(hex, 16));

var bytes = new Array(str.length);
const bytes = [];
for (var i = 0; i < str.length; i++) {
bytes[i] = str.charCodeAt(i);
for (let i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}

@@ -42,10 +42,17 @@

function _default(name, version, hashfunc) {
var generateUUID = function (value, namespace, buf, offset) {
var off = buf && offset || 0;
if (typeof value == 'string') value = stringToBytes(value);
if (typeof namespace == 'string') namespace = uuidToBytes(namespace);
if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); // Per 4.3
function generateUUID(value, namespace, buf, offset) {
const off = buf && offset || 0;
if (typeof value === 'string') value = stringToBytes(value);
if (typeof namespace === 'string') namespace = uuidToBytes(namespace);
var bytes = hashfunc(namespace.concat(value));
if (!Array.isArray(value)) {
throw TypeError('value must be an array of bytes');
}
if (!Array.isArray(namespace) || namespace.length !== 16) {
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
} // Per 4.3
const bytes = hashfunc(namespace.concat(value));
bytes[6] = bytes[6] & 0x0f | version;

@@ -55,3 +62,3 @@ bytes[8] = bytes[8] & 0x3f | 0x80;

if (buf) {
for (var idx = 0; idx < 16; ++idx) {
for (let idx = 0; idx < 16; ++idx) {
buf[off + idx] = bytes[idx];

@@ -62,7 +69,7 @@ }

return buf || (0, _bytesToUuid.default)(bytes);
}; // Function#name is not settable on some platforms (#270)
} // Function#name is not settable on some platforms (#270)
try {
generateUUID.name = name;
generateUUID.name = name; // eslint-disable-next-line no-empty
} catch (err) {} // For CommonJS default export support

@@ -69,0 +76,0 @@

@@ -15,6 +15,4 @@ "use strict";

function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof options == 'string') {
buf = options === 'binary' ? new Array(16) : null;
if (typeof options === 'string') {
buf = options === 'binary' ? new Uint8Array(16) : null;
options = null;

@@ -25,3 +23,3 @@ }

var rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`

@@ -33,8 +31,12 @@

if (buf) {
for (var ii = 0; ii < 16; ++ii) {
buf[i + ii] = rnds[ii];
const start = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[start + i] = rnds[i];
}
return buf;
}
return buf || (0, _bytesToUuid.default)(rnds);
return (0, _bytesToUuid.default)(rnds);
}

@@ -41,0 +43,0 @@

{
"name": "uuid",
"version": "8.0.0",
"version": "8.1.0",
"description": "RFC4122 (v1, v4, and v5) UUIDs",

@@ -22,4 +22,7 @@ "commitlint": {

"exports": {
"require": "./dist/index.js",
"import": "./wrapper.mjs"
"./package.json": "./package.json",
".": {
"require": "./dist/index.js",
"import": "./wrapper.mjs"
}
},

@@ -59,3 +62,8 @@ "module": "./dist/esm-node/index.js",

"eslint-config-prettier": "6.10.1",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1",
"husky": "4.2.5",

@@ -86,2 +94,4 @@ "jest": "25.3.0",

"test:pack": "./scripts/testpack.sh",
"pretest:benchmark": "npm run build",
"test:benchmark": "cd examples/benchmark && npm install && npm test",
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",

@@ -88,0 +98,0 @@ "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc