luigi12345 commited on
Commit
9bb0dd5
1 Parent(s): e7bf109

305185df6c31835446b7c77e6073d2003b84055be1354e96e17f28a6a7fef5d5

Browse files
Files changed (50) hide show
  1. workers1/auto3d/node_modules/blake3-wasm/dist/build/versions.js +12 -0
  2. workers1/auto3d/node_modules/blake3-wasm/dist/build/versions.js.map +1 -0
  3. workers1/auto3d/node_modules/blake3-wasm/dist/index.d.ts +1 -0
  4. workers1/auto3d/node_modules/blake3-wasm/dist/index.js +19 -0
  5. workers1/auto3d/node_modules/blake3-wasm/dist/index.js.map +1 -0
  6. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.d.ts +21 -0
  7. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.js +51 -0
  8. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.js.map +1 -0
  9. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-instance.d.ts +15 -0
  10. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-instance.js +31 -0
  11. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-instance.js.map +1 -0
  12. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.d.ts +5 -0
  13. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.js +13 -0
  14. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.js.map +1 -0
  15. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.d.ts +16 -0
  16. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.js +5 -0
  17. workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.js.map +1 -0
  18. workers1/auto3d/node_modules/blake3-wasm/dist/node.test.d.ts +1 -0
  19. workers1/auto3d/node_modules/blake3-wasm/dist/node.test.js +207 -0
  20. workers1/auto3d/node_modules/blake3-wasm/dist/node.test.js.map +1 -0
  21. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.d.ts +24 -0
  22. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.js +45 -0
  23. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.js.map +1 -0
  24. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.d.ts +75 -0
  25. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.js +79 -0
  26. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.js.map +1 -0
  27. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.d.ts +16 -0
  28. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.js +27 -0
  29. workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.js.map +1 -0
  30. workers1/auto3d/node_modules/blake3-wasm/dist/node/index.d.ts +4 -0
  31. workers1/auto3d/node_modules/blake3-wasm/dist/node/index.js +13 -0
  32. workers1/auto3d/node_modules/blake3-wasm/dist/node/index.js.map +1 -0
  33. workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.d.ts +6 -0
  34. workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.js +14 -0
  35. workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.js.map +1 -0
  36. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js.d.ts +51 -0
  37. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js.js +2 -0
  38. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js_bg.wasm +0 -0
  39. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/package.json +12 -0
  40. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js.d.ts +51 -0
  41. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js.js +196 -0
  42. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js_bg.wasm +0 -0
  43. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/package.json +12 -0
  44. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js.d.ts +82 -0
  45. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js.js +273 -0
  46. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js_bg.wasm +0 -0
  47. workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/package.json +12 -0
  48. workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.d.ts +17 -0
  49. workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.js +27 -0
  50. workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.js.map +1 -0
workers1/auto3d/node_modules/blake3-wasm/dist/build/versions.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.minNodeVersion = 10;
4
+ /**
5
+ * @hidden
6
+ */
7
+ exports.parseVersion = (version) => {
8
+ const [, major, minor, patch] = /^v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(version) || [];
9
+ return { major: Number(major), minor: Number(minor), patch: Number(patch) };
10
+ };
11
+ exports.compareVersion = (a, b) => a.major - b.major || a.minor - b.minor || a.patch - b.patch;
12
+ //# sourceMappingURL=versions.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/build/versions.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../ts/build/versions.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,EAAE,CAAC;AAWjC;;GAEG;AACU,QAAA,YAAY,GAAG,CAAC,OAAe,EAAY,EAAE;IACxD,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACrF,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC9E,CAAC,CAAC;AAEW,QAAA,cAAc,GAAG,CAAC,CAAW,EAAE,CAAW,EAAE,EAAE,CACzD,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/index.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export * from './node';
workers1/auto3d/node_modules/blake3-wasm/dist/index.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // Bunlers add the `process.browser` flag to indicate the build enviroment.
7
+ // Throw a verbose error if we see people bundling the Node.js build in their
8
+ // browser, since it probably won't work for them (or at least not give them)
9
+ // nice tree shaking and such.
10
+ //
11
+ // Note that we don't check the presence of window/document, since those can
12
+ // be emulated in common test scenarios (e.g. jest's default setup with jsdom).
13
+ if (process.browser) {
14
+ throw new Error('You tried to import the Node.js version of blake3, instead of the browser ' +
15
+ 'version, in your build. You can fix this by importing "blake3/browser" ' +
16
+ 'instead of "blake3"');
17
+ }
18
+ __export(require("./node"));
19
+ //# sourceMappingURL=index.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;;;;AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,8BAA8B;AAC9B,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,IAAK,OAAe,CAAC,OAAO,EAAE;IAC5B,MAAM,IAAI,KAAK,CACb,4EAA4E;QAC1E,yEAAyE;QACzE,qBAAqB,CACxB,CAAC;CACH;AAED,4BAAuB"}
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.d.ts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { HashInput } from '../node/hash-fn';
3
+ import { IBaseHashOptions } from '../base/hash-fn';
4
+ /**
5
+ * @hidden
6
+ */
7
+ export declare const normalizeInput: (input: HashInput, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined) => Buffer;
8
+ /**
9
+ * Returns a blake3 hash of the input, returning the binary hash data.
10
+ */
11
+ export declare function hash(input: HashInput, { length }?: IBaseHashOptions): Buffer | string;
12
+ /**
13
+ * Given cryptographic key material and a context string, services a subkey of
14
+ * any length. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.derive_key.html}
15
+ * for more information.
16
+ */
17
+ export declare function deriveKey(context: string, material: HashInput, { length }?: IBaseHashOptions): Buffer;
18
+ /**
19
+ * The keyed hash function. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.keyed_hash.html}.
20
+ */
21
+ export declare function keyedHash(key: Buffer, input: HashInput, { length }?: IBaseHashOptions): Buffer;
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const native_1 = __importDefault(require("./native"));
7
+ const hash_fn_1 = require("../base/hash-fn");
8
+ /**
9
+ * @hidden
10
+ */
11
+ exports.normalizeInput = (input, encoding) => {
12
+ if (input instanceof Buffer) {
13
+ return input;
14
+ }
15
+ if (typeof input === 'string') {
16
+ return Buffer.from(input, encoding);
17
+ }
18
+ return Buffer.from(input);
19
+ };
20
+ /**
21
+ * Returns a blake3 hash of the input, returning the binary hash data.
22
+ */
23
+ function hash(input, { length = hash_fn_1.defaultHashLength } = {}) {
24
+ return native_1.default.hash(exports.normalizeInput(input), length);
25
+ }
26
+ exports.hash = hash;
27
+ /**
28
+ * Given cryptographic key material and a context string, services a subkey of
29
+ * any length. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.derive_key.html}
30
+ * for more information.
31
+ */
32
+ function deriveKey(context, material, { length = hash_fn_1.defaultHashLength } = {}) {
33
+ const hasher = new native_1.default.Hasher(undefined, context);
34
+ hasher.update(exports.normalizeInput(material));
35
+ const result = Buffer.alloc(length);
36
+ hasher.digest(result);
37
+ return result;
38
+ }
39
+ exports.deriveKey = deriveKey;
40
+ /**
41
+ * The keyed hash function. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.keyed_hash.html}.
42
+ */
43
+ function keyedHash(key, input, { length = hash_fn_1.defaultHashLength } = {}) {
44
+ const hasher = new native_1.default.Hasher(key);
45
+ hasher.update(exports.normalizeInput(input));
46
+ const result = Buffer.alloc(length);
47
+ hasher.digest(result);
48
+ return result;
49
+ }
50
+ exports.keyedHash = keyedHash;
51
+ //# sourceMappingURL=hash-fn.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-fn.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"hash-fn.js","sourceRoot":"","sources":["../../ts/node-native/hash-fn.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,6CAAsE;AAEtE;;GAEG;AACU,QAAA,cAAc,GAAG,CAAC,KAAgB,EAAE,QAAyB,EAAU,EAAE;IACpF,IAAI,KAAK,YAAY,MAAM,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,OAAO,KAAK,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-instance.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { INativeReader } from './native';
3
+ import { NodeHash } from '../node/hash-instance';
4
+ /**
5
+ * A Node.js crypto-like createHash method.
6
+ */
7
+ export declare const createHash: () => NodeHash<INativeReader>;
8
+ /**
9
+ * Construct a new Hasher for the keyed hash function.
10
+ */
11
+ export declare const createKeyed: (key: Buffer) => NodeHash<INativeReader>;
12
+ /**
13
+ * Construct a new Hasher for the key derivation function.
14
+ */
15
+ export declare const createDeriveKey: (context: string) => NodeHash<INativeReader>;
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-instance.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const native_1 = __importDefault(require("./native"));
7
+ const hash_instance_1 = require("../node/hash-instance");
8
+ const hash_reader_1 = require("../node/hash-reader");
9
+ // A buffer we reuse for sending bigints. set_position is synchronous, so
10
+ // this just saves creating garbage.
11
+ const bigIntBuffer = Buffer.alloc(8);
12
+ const readerFactory = (r) => new hash_reader_1.NodeHashReader({
13
+ fill: target => r.fill(target),
14
+ set_position: position => {
15
+ bigIntBuffer.writeBigUInt64BE(position);
16
+ r.set_position(bigIntBuffer);
17
+ },
18
+ });
19
+ /**
20
+ * A Node.js crypto-like createHash method.
21
+ */
22
+ exports.createHash = () => new hash_instance_1.NodeHash(new native_1.default.Hasher(), readerFactory);
23
+ /**
24
+ * Construct a new Hasher for the keyed hash function.
25
+ */
26
+ exports.createKeyed = (key) => new hash_instance_1.NodeHash(new native_1.default.Hasher(key), readerFactory);
27
+ /**
28
+ * Construct a new Hasher for the key derivation function.
29
+ */
30
+ exports.createDeriveKey = (context) => new hash_instance_1.NodeHash(new native_1.default.Hasher(undefined, context), readerFactory);
31
+ //# sourceMappingURL=hash-instance.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/hash-instance.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"hash-instance.js","sourceRoot":"","sources":["../../ts/node-native/hash-instance.ts"],"names":[],"mappings":";;;;;AAAA,sDAAiD;AACjD,yDAAiD;AACjD,qDAAqD;AAErD,yEAAyE;AACzE,oCAAoC;AACpC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAErC,MAAM,aAAa,GAAG,CAAC,CAAgB,EAAE,EAAE,CACzC,IAAI,4BAAc,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IAC9B,YAAY,EAAE,QAAQ,CAAC,EAAE;QACvB,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC;AAEL;;GAEG;AACU,QAAA,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,wBAAQ,CAAC,IAAI,gBAAM,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC;AAEjF;;GAEG;AACU,QAAA,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,wBAAQ,CAAC,IAAI,gBAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;AAEhG;;GAEG;AACU,QAAA,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE,CACjD,IAAI,wBAAQ,CAAC,IAAI,gBAAM,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.d.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export { HashInput } from '../node/hash-fn';
2
+ export { hash, deriveKey, keyedHash } from './hash-fn';
3
+ export * from '../node/hash-reader';
4
+ export * from './hash-instance';
5
+ export * from '../base/index';
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var hash_fn_1 = require("./hash-fn");
7
+ exports.hash = hash_fn_1.hash;
8
+ exports.deriveKey = hash_fn_1.deriveKey;
9
+ exports.keyedHash = hash_fn_1.keyedHash;
10
+ __export(require("../node/hash-reader"));
11
+ __export(require("./hash-instance"));
12
+ __export(require("../base/index"));
13
+ //# sourceMappingURL=index.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/node-native/index.ts"],"names":[],"mappings":";;;;;AACA,qCAAuD;AAA9C,yBAAA,IAAI,CAAA;AAAE,8BAAA,SAAS,CAAA;AAAE,8BAAA,SAAS,CAAA;AACnC,yCAAoC;AACpC,qCAAgC;AAChC,mCAA8B"}
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.d.ts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { IInternalHash } from '../base/index';
3
+ export interface INativeReader {
4
+ free?(): void;
5
+ fill(target: Uint8Array): void;
6
+ set_position(position: Buffer): void;
7
+ }
8
+ export interface INativeHash extends IInternalHash<INativeReader> {
9
+ new (hashKey?: Buffer, context?: string): INativeHash;
10
+ }
11
+ export interface INativeModule {
12
+ Hasher: INativeHash;
13
+ hash(input: Buffer, length: number): Buffer;
14
+ }
15
+ declare const native: INativeModule;
16
+ export default native;
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const native = require('../native.node');
4
+ exports.default = native;
5
+ //# sourceMappingURL=native.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node-native/native.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../../ts/node-native/native.ts"],"names":[],"mappings":";;AAiBA,MAAM,MAAM,GAAkB,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAExD,kBAAe,MAAM,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node.test.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ export {};
workers1/auto3d/node_modules/blake3-wasm/dist/node.test.js ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importStar = (this && this.__importStar) || function (mod) {
12
+ if (mod && mod.__esModule) return mod;
13
+ var result = {};
14
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15
+ result["default"] = mod;
16
+ return result;
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const wasm = __importStar(require("./node"));
20
+ const native = __importStar(require("./node-native"));
21
+ const chai_1 = require("chai");
22
+ const test_helpers_1 = require("./base/test-helpers");
23
+ const stream_buffers_1 = require("stream-buffers");
24
+ const hash_reader_1 = require("./base/hash-reader");
25
+ function suite({ hash, createHash, keyedHash, deriveKey, createDeriveKey, createKeyed, }) {
26
+ describe('encoding', () => {
27
+ it('hashes a buffer', () => {
28
+ chai_1.expect(hash(Buffer.from(test_helpers_1.inputs.hello.input))).to.deep.equal(test_helpers_1.inputs.hello.hash);
29
+ });
30
+ it('hashes a string', () => {
31
+ chai_1.expect(hash(test_helpers_1.inputs.hello.input)).to.deep.equal(test_helpers_1.inputs.hello.hash);
32
+ });
33
+ it('hashes an arraybuffer', () => {
34
+ const buf = Buffer.from(test_helpers_1.inputs.hello.input);
35
+ chai_1.expect(hash(new Uint8Array(buf).buffer)).to.deep.equal(test_helpers_1.inputs.hello.hash);
36
+ });
37
+ it('customizes the output length', () => {
38
+ chai_1.expect(hash(test_helpers_1.inputs.hello.input, { length: 16 })).to.deep.equal(test_helpers_1.inputs.hello.hash.slice(0, 16));
39
+ });
40
+ });
41
+ describe('memory-safety (#5)', () => {
42
+ it('hash', () => {
43
+ const hashA = hash('hello');
44
+ const hashB = hash('goodbye');
45
+ chai_1.expect(hashA.toString('hex')).to.equal('ea8f163db38682925e4491c5e58d4bb3506ef8c14eb78a86e908c5624a67200f');
46
+ chai_1.expect(hashB.toString('hex')).to.equal('f94a694227c5f31a07551908ad5fb252f5f0964030df5f2f200adedfae4d9b69');
47
+ });
48
+ it('hasher', () => {
49
+ const hasherA = createHash();
50
+ const hasherB = createHash();
51
+ hasherA.update('hel');
52
+ hasherB.update('good');
53
+ hasherA.update('lo');
54
+ hasherB.update('bye');
55
+ const hashA = hasherA.digest();
56
+ const hashB = hasherB.digest();
57
+ chai_1.expect(hashA.toString('hex')).to.equal('ea8f163db38682925e4491c5e58d4bb3506ef8c14eb78a86e908c5624a67200f');
58
+ chai_1.expect(hashB.toString('hex')).to.equal('f94a694227c5f31a07551908ad5fb252f5f0964030df5f2f200adedfae4d9b69');
59
+ });
60
+ });
61
+ describe('hasher', () => {
62
+ it('digests', callback => {
63
+ const buffer = new stream_buffers_1.ReadableStreamBuffer();
64
+ buffer.put(Buffer.from(test_helpers_1.inputs.large.input));
65
+ buffer.stop();
66
+ const hash = createHash();
67
+ buffer.on('data', b => hash.update(b));
68
+ buffer.on('end', () => {
69
+ const actual = hash.digest();
70
+ chai_1.expect(actual).to.deep.equal(test_helpers_1.inputs.large.hash);
71
+ callback();
72
+ });
73
+ });
74
+ it('is a transform stream', callback => {
75
+ const buffer = new stream_buffers_1.ReadableStreamBuffer();
76
+ buffer.put(Buffer.from(test_helpers_1.inputs.large.input));
77
+ buffer.stop();
78
+ buffer
79
+ .pipe(createHash())
80
+ .on('error', callback)
81
+ .on('data', hash => {
82
+ chai_1.expect(hash).to.deep.equal(test_helpers_1.inputs.large.hash);
83
+ callback();
84
+ });
85
+ });
86
+ it('customizes the output length', () => {
87
+ const hash = createHash();
88
+ hash.update(test_helpers_1.inputs.hello.input);
89
+ chai_1.expect(hash.digest('hex', { length: 16 })).to.equal(test_helpers_1.inputs.hello.hash.slice(0, 16).toString('hex'));
90
+ });
91
+ it('throws on write after dispose', () => {
92
+ const hash = createHash();
93
+ hash.dispose();
94
+ chai_1.expect(() => hash.update('')).to.throw(/after dispose/);
95
+ });
96
+ it('allows taking incremental hashes', () => {
97
+ const hasher = createHash();
98
+ hasher.update('hel');
99
+ const hashA = hasher.digest(undefined, { dispose: false });
100
+ const readA = hasher.reader({ dispose: false });
101
+ hasher.update('lo');
102
+ const hashB = hasher.digest(undefined, { dispose: false });
103
+ const readB = hasher.reader({ dispose: false });
104
+ const expectedA = Buffer.from('3121c5bb1b9193123447ac7cfda042f67f967e7a8cf5c12e7570e25529746e4a', 'hex');
105
+ chai_1.expect(hashA).to.deep.equal(expectedA);
106
+ chai_1.expect(readA.toBuffer()).to.deep.equal(expectedA);
107
+ chai_1.expect(hashB).to.deep.equal(test_helpers_1.inputs.hello.hash);
108
+ chai_1.expect(readB.toBuffer()).to.deep.equal(test_helpers_1.inputs.hello.hash);
109
+ hasher.dispose();
110
+ readA.dispose();
111
+ readB.dispose();
112
+ });
113
+ });
114
+ describe('reader', () => {
115
+ let reader;
116
+ beforeEach(() => {
117
+ const hash = createHash();
118
+ hash.update(test_helpers_1.inputs.hello.input);
119
+ reader = hash.reader();
120
+ });
121
+ afterEach(() => reader.dispose());
122
+ it('implements toString()', () => {
123
+ chai_1.expect(reader.toString('hex')).to.equal(test_helpers_1.inputs.hello.hash.toString('hex'));
124
+ reader.position = BigInt(42);
125
+ chai_1.expect(reader.toString('hex')).to.equal(test_helpers_1.inputs.hello.hash.toString('hex'));
126
+ });
127
+ it('implements toBuffer()', () => {
128
+ chai_1.expect(reader.toBuffer()).to.deep.equal(test_helpers_1.inputs.hello.hash);
129
+ reader.position = BigInt(42);
130
+ chai_1.expect(reader.toBuffer()).to.deep.equal(test_helpers_1.inputs.hello.hash);
131
+ });
132
+ it('implements readInto() and advances', () => {
133
+ const actual = Buffer.alloc(32);
134
+ reader.readInto(actual.slice(0, 10));
135
+ reader.readInto(actual.slice(10));
136
+ chai_1.expect(actual).to.deep.equal(test_helpers_1.inputs.hello.hash);
137
+ chai_1.expect(reader.position).to.equal(BigInt(32));
138
+ });
139
+ it('implements read() and advances', () => {
140
+ const actual = reader.read(32);
141
+ chai_1.expect(actual).to.deep.equal(test_helpers_1.inputs.hello.hash);
142
+ chai_1.expect(reader.position).to.equal(BigInt(32));
143
+ const actualNext = reader.read(16);
144
+ chai_1.expect(actualNext).to.deep.equal(test_helpers_1.hello48.slice(32));
145
+ chai_1.expect(reader.position).to.equal(BigInt(48));
146
+ });
147
+ it('manually sets position', () => {
148
+ reader.position = BigInt(32);
149
+ const actual = reader.read(16);
150
+ chai_1.expect(actual).to.deep.equal(test_helpers_1.hello48.slice(32));
151
+ });
152
+ it('throws if set out of range', () => {
153
+ chai_1.expect(() => (reader.position = BigInt(-1))).to.throw(RangeError);
154
+ chai_1.expect(() => (reader.position = BigInt('18446744073709551616'))).to.throw(RangeError);
155
+ reader.position = hash_reader_1.maxHashBytes - BigInt(1);
156
+ chai_1.expect(() => reader.read(2)).to.throw(RangeError);
157
+ });
158
+ });
159
+ describe('original test vectors', () => {
160
+ for (const { inputLen, expectedDerive, expectedKeyed, expectedHash } of test_helpers_1.ogTestVectors.cases) {
161
+ describe(`${inputLen}`, () => __awaiter(this, void 0, void 0, function* () {
162
+ const input = Buffer.alloc(inputLen);
163
+ for (let i = 0; i < inputLen; i++) {
164
+ input[i] = i % 251;
165
+ }
166
+ it('hash()', () => {
167
+ chai_1.expect(hash(input, { length: expectedHash.length / 2 }).toString('hex')).to.equal(expectedHash);
168
+ });
169
+ it('deriveKey()', () => {
170
+ chai_1.expect(deriveKey(test_helpers_1.ogTestVectors.context, input, { length: expectedDerive.length / 2 }).toString('hex')).to.equal(expectedDerive);
171
+ });
172
+ it('createDeriveKey()', callback => {
173
+ const buffer = new stream_buffers_1.ReadableStreamBuffer();
174
+ buffer.put(Buffer.from(input));
175
+ buffer.stop();
176
+ const hash = createDeriveKey(test_helpers_1.ogTestVectors.context);
177
+ buffer.on('data', b => hash.update(b));
178
+ buffer.on('end', () => {
179
+ const actual = hash.digest({ length: expectedDerive.length / 2 }).toString('hex');
180
+ chai_1.expect(actual).to.equal(expectedDerive);
181
+ callback();
182
+ });
183
+ });
184
+ it('keyedHash()', () => {
185
+ chai_1.expect(keyedHash(Buffer.from(test_helpers_1.ogTestVectors.key), input, {
186
+ length: expectedKeyed.length / 2,
187
+ }).toString('hex')).to.equal(expectedKeyed);
188
+ });
189
+ it('createKeyed()', callback => {
190
+ const buffer = new stream_buffers_1.ReadableStreamBuffer();
191
+ buffer.put(Buffer.from(input));
192
+ buffer.stop();
193
+ const hash = createKeyed(Buffer.from(test_helpers_1.ogTestVectors.key));
194
+ buffer.on('data', b => hash.update(b));
195
+ buffer.on('end', () => {
196
+ const actual = hash.digest({ length: expectedDerive.length / 2 }).toString('hex');
197
+ chai_1.expect(actual).to.equal(expectedKeyed);
198
+ callback();
199
+ });
200
+ });
201
+ }));
202
+ }
203
+ });
204
+ }
205
+ describe('node.js wasm', () => suite(wasm));
206
+ describe('node.js native', () => suite(native));
207
+ //# sourceMappingURL=node.test.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node.test.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"node.test.js","sourceRoot":"","sources":["../ts/node.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,sDAAwC;AACxC,+BAA8B;AAC9B,sDAAqE;AACrE,mDAAsD;AACtD,oDAAkD;AAElD,SAAS,KAAK,CAAC,EACb,IAAI,EACJ,UAAU,EACV,SAAS,EACT,SAAS,EACT,eAAe,EACf,WAAW,GACiB;IAC5B,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;YACzB,aAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAM,CAAC,KAAK,CAAC,IAAI,CA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MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;oBACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;wBACpB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;wBAClF,aAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;wBACvC,QAAQ,EAAE,CAAC;oBACb,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAA,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.d.ts ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { BaseHashInput, IBaseHashOptions } from '../base/hash-fn';
3
+ /**
4
+ * Input used for node-based hashes.
5
+ */
6
+ export declare type HashInput = BaseHashInput | string;
7
+ /**
8
+ * @hidden
9
+ */
10
+ export declare const normalizeInput: (input: HashInput, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined) => Uint8Array;
11
+ /**
12
+ * Returns a blake3 hash of the input, returning the binary hash data.
13
+ */
14
+ export declare function hash(input: HashInput, { length }?: IBaseHashOptions): Buffer | string;
15
+ /**
16
+ * Given cryptographic key material and a context string, services a subkey of
17
+ * any length. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.derive_key.html}
18
+ * for more information.
19
+ */
20
+ export declare function deriveKey(context: string, material: HashInput, { length }?: IBaseHashOptions): Buffer;
21
+ /**
22
+ * The keyed hash function. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.keyed_hash.html}.
23
+ */
24
+ export declare function keyedHash(key: Buffer, input: HashInput, { length }?: IBaseHashOptions): Buffer;
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hash_fn_1 = require("../base/hash-fn");
4
+ const blake3_js_1 = require("../../dist/wasm/nodejs/blake3_js");
5
+ /**
6
+ * @hidden
7
+ */
8
+ exports.normalizeInput = (input, encoding) => hash_fn_1.inputToArray(typeof input === 'string' ? Buffer.from(input, encoding) : input);
9
+ /**
10
+ * Returns a blake3 hash of the input, returning the binary hash data.
11
+ */
12
+ function hash(input, { length = hash_fn_1.defaultHashLength } = {}) {
13
+ const result = Buffer.alloc(length);
14
+ blake3_js_1.hash(exports.normalizeInput(input), result);
15
+ return result;
16
+ }
17
+ exports.hash = hash;
18
+ /**
19
+ * Given cryptographic key material and a context string, services a subkey of
20
+ * any length. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.derive_key.html}
21
+ * for more information.
22
+ */
23
+ function deriveKey(context, material, { length = hash_fn_1.defaultHashLength } = {}) {
24
+ const derive = blake3_js_1.create_derive(context);
25
+ derive.update(exports.normalizeInput(material));
26
+ const result = Buffer.alloc(length);
27
+ derive.digest(result);
28
+ return result;
29
+ }
30
+ exports.deriveKey = deriveKey;
31
+ /**
32
+ * The keyed hash function. See {@link https://docs.rs/blake3/0.1.3/blake3/fn.keyed_hash.html}.
33
+ */
34
+ function keyedHash(key, input, { length = hash_fn_1.defaultHashLength } = {}) {
35
+ if (key.length !== 32) {
36
+ throw new Error(`key provided to keyedHash must be 32 bytes, got ${key.length}`);
37
+ }
38
+ const derive = blake3_js_1.create_keyed(key);
39
+ derive.update(exports.normalizeInput(input));
40
+ const result = Buffer.alloc(length);
41
+ derive.digest(result);
42
+ return result;
43
+ }
44
+ exports.keyedHash = keyedHash;
45
+ //# sourceMappingURL=hash-fn.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-fn.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"hash-fn.js","sourceRoot":"","sources":["../../ts/node/hash-fn.ts"],"names":[],"mappings":";;AAAA,6CAAmG;AACnG,gEAI0C;AAO1C;;GAEG;AACU,QAAA,cAAc,GAAG,CAAC,KAAgB,EAAE,QAAyB,EAAc,EAAE,CACxF,sBAAY,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAEjF;;GAEG;AACH,SAAgB,IAAI,CAClB,KAAgB,EAChB,EAAE,MAAM,GAAG,2BAAiB,KAAuB,EAAE;IAErD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAO,CAAC,sBAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC;AAChB,CAAC;AAPD,oBAOC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CACvB,OAAe,EACf,QAAmB,EACnB,EAAE,MAAM,GAAG,2BAAiB,KAAuB,EAAE;IAErD,MAAM,MAAM,GAAG,yBAAY,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC;AAVD,8BAUC;AAED;;GAEG;AACH,SAAgB,SAAS,CACvB,GAAW,EACX,KAAgB,EAChB,EAAE,MAAM,GAAG,2BAAiB,KAAuB,EAAE;IAErD,IAAI,GAAG,CAAC,MAAM,KAAK,EAAE,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,mDAAmD,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;KAClF;IAED,MAAM,MAAM,GAAG,wBAAW,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC;AAdD,8BAcC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.d.ts ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { HashInput } from './hash-fn';
3
+ import { IHasher, IInternalHash, IHasherDigestOptions } from '../base/index';
4
+ import { Transform, TransformCallback } from 'stream';
5
+ import { IBaseHashOptions } from '../base/hash-fn';
6
+ import { NodeHashReader } from './hash-reader';
7
+ export interface INodeHash extends IHasher<Buffer> {
8
+ /**
9
+ * @inheritdoc
10
+ * @override
11
+ */
12
+ update(data: HashInput, encoding?: BufferEncoding): this;
13
+ /**
14
+ * @inheritdoc
15
+ * @override
16
+ */
17
+ digest(options?: IBaseHashOptions): Buffer;
18
+ /**
19
+ * Returns a digest of the hash with the given set of hash options.
20
+ */
21
+ digest(encoding: undefined, options: IBaseHashOptions): Buffer;
22
+ /**
23
+ * Returns a digest of the hash with the given encoding.
24
+ */
25
+ digest(encoding: BufferEncoding, options?: IBaseHashOptions): string;
26
+ }
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ export declare class NodeHash<Reader> extends Transform implements IHasher<Buffer> {
31
+ private readonly hash;
32
+ constructor(implementation: IInternalHash<Reader>, getReader: (r: Reader) => NodeHashReader);
33
+ /**
34
+ * @reader
35
+ */
36
+ reader(options?: {
37
+ dispose?: boolean;
38
+ }): NodeHashReader;
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ update(data: HashInput, encoding?: BufferEncoding): this;
43
+ /**
44
+ * @inheritdoc
45
+ */
46
+ digest(encoding?: IHasherDigestOptions): Buffer;
47
+ digest(encoding: undefined, options: IHasherDigestOptions): Buffer;
48
+ digest(encoding: BufferEncoding, options?: IHasherDigestOptions): string;
49
+ /**
50
+ * @inheritdoc
51
+ */
52
+ dispose(): void;
53
+ /**
54
+ * @inheritdoc
55
+ * @hidden
56
+ */
57
+ _transform(chunk: Buffer | string, encoding: string, callback: TransformCallback): void;
58
+ /**
59
+ * @inheritdoc
60
+ * @hidden
61
+ */
62
+ _flush(callback: TransformCallback): void;
63
+ }
64
+ /**
65
+ * A Node.js crypto-like createHash method.
66
+ */
67
+ export declare const createHash: () => NodeHash<import("../../dist/wasm/nodejs/blake3_js").HashReader>;
68
+ /**
69
+ * Construct a new Hasher for the keyed hash function.
70
+ */
71
+ export declare const createKeyed: (key: Buffer) => NodeHash<import("../../dist/wasm/nodejs/blake3_js").HashReader>;
72
+ /**
73
+ * Construct a new Hasher for the key derivation function.
74
+ */
75
+ export declare const createDeriveKey: (context: string) => NodeHash<import("../../dist/wasm/nodejs/blake3_js").HashReader>;
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hash_fn_1 = require("./hash-fn");
4
+ const index_1 = require("../base/index");
5
+ const stream_1 = require("stream");
6
+ const wasm_1 = require("./wasm");
7
+ const hash_reader_1 = require("./hash-reader");
8
+ /**
9
+ * @inheritdoc
10
+ */
11
+ class NodeHash extends stream_1.Transform {
12
+ constructor(implementation, getReader) {
13
+ super();
14
+ this.hash = new index_1.BaseHash(implementation, l => Buffer.alloc(l), getReader);
15
+ }
16
+ /**
17
+ * @reader
18
+ */
19
+ reader(options) {
20
+ const reader = this.hash.reader(options);
21
+ return reader;
22
+ }
23
+ /**
24
+ * @inheritdoc
25
+ */
26
+ update(data, encoding) {
27
+ this.hash.update(hash_fn_1.normalizeInput(data, encoding));
28
+ return this;
29
+ }
30
+ digest(encoding, options) {
31
+ let resolvedOpts;
32
+ let resolvedEnc;
33
+ if (encoding && typeof encoding === 'object') {
34
+ resolvedOpts = encoding;
35
+ resolvedEnc = undefined;
36
+ }
37
+ else {
38
+ resolvedOpts = options;
39
+ resolvedEnc = encoding;
40
+ }
41
+ const result = this.hash.digest(resolvedOpts);
42
+ return resolvedEnc ? result.toString(resolvedEnc) : result;
43
+ }
44
+ /**
45
+ * @inheritdoc
46
+ */
47
+ dispose() {
48
+ this.hash.dispose();
49
+ }
50
+ /**
51
+ * @inheritdoc
52
+ * @hidden
53
+ */
54
+ _transform(chunk, encoding, callback) {
55
+ this.update(chunk, encoding);
56
+ callback();
57
+ }
58
+ /**
59
+ * @inheritdoc
60
+ * @hidden
61
+ */
62
+ _flush(callback) {
63
+ callback(null, this.digest());
64
+ }
65
+ }
66
+ exports.NodeHash = NodeHash;
67
+ /**
68
+ * A Node.js crypto-like createHash method.
69
+ */
70
+ exports.createHash = () => new NodeHash(wasm_1.getWasm().create_hasher(), r => new hash_reader_1.NodeHashReader(r));
71
+ /**
72
+ * Construct a new Hasher for the keyed hash function.
73
+ */
74
+ exports.createKeyed = (key) => new NodeHash(wasm_1.getWasm().create_keyed(key), r => new hash_reader_1.NodeHashReader(r));
75
+ /**
76
+ * Construct a new Hasher for the key derivation function.
77
+ */
78
+ exports.createDeriveKey = (context) => new NodeHash(wasm_1.getWasm().create_derive(context), r => new hash_reader_1.NodeHashReader(r));
79
+ //# sourceMappingURL=hash-instance.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-instance.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"hash-instance.js","sourceRoot":"","sources":["../../ts/node/hash-instance.ts"],"names":[],"mappings":";;AAAA,uCAAsD;AACtD,yCAAuF;AACvF,mCAAsD;AAEtD,iCAAiC;AACjC,+CAA+C;AA0B/C;;GAEG;AACH,MAAa,QAAiB,SAAQ,kBAAS;IAG7C,YAAY,cAAqC,EAAE,SAAwC;QACzF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,gBAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B;QAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,IAAe,EAAE,QAAyB;QACtD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,wBAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IA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AC,CAAC;AAExE;;GAEG;AACU,QAAA,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE,CACjD,IAAI,QAAQ,CAAC,cAAO,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,4BAAc,CAAC,CAAC,CAAC,CAAC,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.d.ts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ import { BaseHashReader } from '../base/hash-reader';
3
+ /**
4
+ * A hash reader for WebAssembly targets.
5
+ */
6
+ export declare class NodeHashReader extends BaseHashReader<Buffer> {
7
+ /**
8
+ * Converts first 32 bytes of the hash to a string with the given encoding.
9
+ */
10
+ toString(encoding?: BufferEncoding): string;
11
+ /**
12
+ * Converts first 32 bytes of the hash to an array.
13
+ */
14
+ toBuffer(): Buffer;
15
+ protected alloc(bytes: number): Buffer;
16
+ }
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hash_reader_1 = require("../base/hash-reader");
4
+ const hash_fn_1 = require("../base/hash-fn");
5
+ /**
6
+ * A hash reader for WebAssembly targets.
7
+ */
8
+ class NodeHashReader extends hash_reader_1.BaseHashReader {
9
+ /**
10
+ * Converts first 32 bytes of the hash to a string with the given encoding.
11
+ */
12
+ toString(encoding = 'hex') {
13
+ return this.toBuffer().toString(encoding);
14
+ }
15
+ /**
16
+ * Converts first 32 bytes of the hash to an array.
17
+ */
18
+ toBuffer() {
19
+ this.position = BigInt(0);
20
+ return this.read(hash_fn_1.defaultHashLength);
21
+ }
22
+ alloc(bytes) {
23
+ return Buffer.alloc(bytes);
24
+ }
25
+ }
26
+ exports.NodeHashReader = NodeHashReader;
27
+ //# sourceMappingURL=hash-reader.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node/hash-reader.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"hash-reader.js","sourceRoot":"","sources":["../../ts/node/hash-reader.ts"],"names":[],"mappings":";;AAAA,qDAAqD;AACrD,6CAAoD;AAEpD;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAsB;IACxD;;OAEG;IACI,QAAQ,CAAC,WAA2B,KAAK;QAC9C,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,2BAAiB,CAAC,CAAC;IACtC,CAAC;IAES,KAAK,CAAC,KAAa;QAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF;AAnBD,wCAmBC"}
workers1/auto3d/node_modules/blake3-wasm/dist/node/index.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export { hash, deriveKey, keyedHash, HashInput } from './hash-fn';
2
+ export * from './hash-instance';
3
+ export * from './hash-reader';
4
+ export * from '../base/index';
workers1/auto3d/node_modules/blake3-wasm/dist/node/index.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var hash_fn_1 = require("./hash-fn");
7
+ exports.hash = hash_fn_1.hash;
8
+ exports.deriveKey = hash_fn_1.deriveKey;
9
+ exports.keyedHash = hash_fn_1.keyedHash;
10
+ __export(require("./hash-instance"));
11
+ __export(require("./hash-reader"));
12
+ __export(require("../base/index"));
13
+ //# sourceMappingURL=index.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/node/index.ts"],"names":[],"mappings":";;;;;AAAA,qCAAkE;AAAzD,yBAAA,IAAI,CAAA;AAAE,8BAAA,SAAS,CAAA;AAAE,8BAAA,SAAS,CAAA;AACnC,qCAAgC;AAChC,mCAA8B;AAC9B,mCAA8B"}
workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.d.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import * as wasm from '../../dist/wasm/nodejs/blake3_js';
2
+ /**
3
+ * Lazyily get the WebAssembly module. Used to avoid unnecessarily importing
4
+ * the wasm when extending the WebAssembly node code for native bindings.
5
+ */
6
+ export declare const getWasm: () => typeof wasm;
workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ let w;
4
+ /**
5
+ * Lazyily get the WebAssembly module. Used to avoid unnecessarily importing
6
+ * the wasm when extending the WebAssembly node code for native bindings.
7
+ */
8
+ exports.getWasm = () => {
9
+ if (!w) {
10
+ w = require('../../dist/wasm/nodejs/blake3_js');
11
+ }
12
+ return w;
13
+ };
14
+ //# sourceMappingURL=wasm.js.map
workers1/auto3d/node_modules/blake3-wasm/dist/node/wasm.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"wasm.js","sourceRoot":"","sources":["../../ts/node/wasm.ts"],"names":[],"mappings":";;AAEA,IAAI,CAA0B,CAAC;AAE/B;;;GAGG;AACU,QAAA,OAAO,GAAG,GAAG,EAAE;IAC1B,IAAI,CAAC,CAAC,EAAE;QACN,CAAC,GAAG,OAAO,CAAC,kCAAkC,CAAgB,CAAC;KAChE;IAED,OAAO,CAAC,CAAC;AACX,CAAC,CAAC"}
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js.d.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {Uint8Array} data
5
+ * @param {Uint8Array} out
6
+ */
7
+ export function hash(data: Uint8Array, out: Uint8Array): void;
8
+ /**
9
+ * @returns {Blake3Hash}
10
+ */
11
+ export function create_hasher(): Blake3Hash;
12
+ /**
13
+ * @param {Uint8Array} key_slice
14
+ * @returns {Blake3Hash}
15
+ */
16
+ export function create_keyed(key_slice: Uint8Array): Blake3Hash;
17
+ /**
18
+ * @param {string} context
19
+ * @returns {Blake3Hash}
20
+ */
21
+ export function create_derive(context: string): Blake3Hash;
22
+ /**
23
+ */
24
+ export class Blake3Hash {
25
+ free(): void;
26
+ /**
27
+ * @returns {HashReader}
28
+ */
29
+ reader(): HashReader;
30
+ /**
31
+ * @param {Uint8Array} input_bytes
32
+ */
33
+ update(input_bytes: Uint8Array): void;
34
+ /**
35
+ * @param {Uint8Array} out
36
+ */
37
+ digest(out: Uint8Array): void;
38
+ }
39
+ /**
40
+ */
41
+ export class HashReader {
42
+ free(): void;
43
+ /**
44
+ * @param {Uint8Array} bytes
45
+ */
46
+ fill(bytes: Uint8Array): void;
47
+ /**
48
+ * @param {BigInt} position
49
+ */
50
+ set_position(position: BigInt): void;
51
+ }
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import * as wasm from "./blake3_js_bg.wasm";
2
+ export * from "./blake3_js_bg.js";
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/blake3_js_bg.wasm ADDED
Binary file (34.4 kB). View file
 
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/browser/package.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "blake3-js",
3
+ "version": "0.1.0",
4
+ "files": [
5
+ "blake3_js_bg.wasm",
6
+ "blake3_js.js",
7
+ "blake3_js.d.ts"
8
+ ],
9
+ "module": "blake3_js.js",
10
+ "types": "blake3_js.d.ts",
11
+ "sideEffects": false
12
+ }
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js.d.ts ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {Uint8Array} data
5
+ * @param {Uint8Array} out
6
+ */
7
+ export function hash(data: Uint8Array, out: Uint8Array): void;
8
+ /**
9
+ * @returns {Blake3Hash}
10
+ */
11
+ export function create_hasher(): Blake3Hash;
12
+ /**
13
+ * @param {Uint8Array} key_slice
14
+ * @returns {Blake3Hash}
15
+ */
16
+ export function create_keyed(key_slice: Uint8Array): Blake3Hash;
17
+ /**
18
+ * @param {string} context
19
+ * @returns {Blake3Hash}
20
+ */
21
+ export function create_derive(context: string): Blake3Hash;
22
+ /**
23
+ */
24
+ export class Blake3Hash {
25
+ free(): void;
26
+ /**
27
+ * @returns {HashReader}
28
+ */
29
+ reader(): HashReader;
30
+ /**
31
+ * @param {Uint8Array} input_bytes
32
+ */
33
+ update(input_bytes: Uint8Array): void;
34
+ /**
35
+ * @param {Uint8Array} out
36
+ */
37
+ digest(out: Uint8Array): void;
38
+ }
39
+ /**
40
+ */
41
+ export class HashReader {
42
+ free(): void;
43
+ /**
44
+ * @param {Uint8Array} bytes
45
+ */
46
+ fill(bytes: Uint8Array): void;
47
+ /**
48
+ * @param {BigInt} position
49
+ */
50
+ set_position(position: BigInt): void;
51
+ }
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js.js ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ let imports = {};
2
+ imports['__wbindgen_placeholder__'] = module.exports;
3
+ let wasm;
4
+ const { TextDecoder } = require(String.raw`util`);
5
+
6
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
7
+
8
+ cachedTextDecoder.decode();
9
+
10
+ let cachegetUint8Memory0 = null;
11
+ function getUint8Memory0() {
12
+ if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
13
+ cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
14
+ }
15
+ return cachegetUint8Memory0;
16
+ }
17
+
18
+ function getStringFromWasm0(ptr, len) {
19
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
20
+ }
21
+
22
+ let WASM_VECTOR_LEN = 0;
23
+
24
+ function passArray8ToWasm0(arg, malloc) {
25
+ const ptr = malloc(arg.length * 1);
26
+ getUint8Memory0().set(arg, ptr / 1);
27
+ WASM_VECTOR_LEN = arg.length;
28
+ return ptr;
29
+ }
30
+ /**
31
+ * @param {Uint8Array} data
32
+ * @param {Uint8Array} out
33
+ */
34
+ module.exports.hash = function(data, out) {
35
+ try {
36
+ var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
37
+ var len0 = WASM_VECTOR_LEN;
38
+ var ptr1 = passArray8ToWasm0(out, wasm.__wbindgen_malloc);
39
+ var len1 = WASM_VECTOR_LEN;
40
+ wasm.hash(ptr0, len0, ptr1, len1);
41
+ } finally {
42
+ out.set(getUint8Memory0().subarray(ptr1 / 1, ptr1 / 1 + len1));
43
+ wasm.__wbindgen_free(ptr1, len1 * 1);
44
+ }
45
+ };
46
+
47
+ /**
48
+ * @returns {Blake3Hash}
49
+ */
50
+ module.exports.create_hasher = function() {
51
+ var ret = wasm.create_hasher();
52
+ return Blake3Hash.__wrap(ret);
53
+ };
54
+
55
+ /**
56
+ * @param {Uint8Array} key_slice
57
+ * @returns {Blake3Hash}
58
+ */
59
+ module.exports.create_keyed = function(key_slice) {
60
+ var ptr0 = passArray8ToWasm0(key_slice, wasm.__wbindgen_malloc);
61
+ var len0 = WASM_VECTOR_LEN;
62
+ var ret = wasm.create_keyed(ptr0, len0);
63
+ return Blake3Hash.__wrap(ret);
64
+ };
65
+
66
+ let cachegetNodeBufferMemory0 = null;
67
+ function getNodeBufferMemory0() {
68
+ if (cachegetNodeBufferMemory0 === null || cachegetNodeBufferMemory0.buffer !== wasm.memory.buffer) {
69
+ cachegetNodeBufferMemory0 = Buffer.from(wasm.memory.buffer);
70
+ }
71
+ return cachegetNodeBufferMemory0;
72
+ }
73
+
74
+ function passStringToWasm0(arg, malloc) {
75
+
76
+ const len = Buffer.byteLength(arg);
77
+ const ptr = malloc(len);
78
+ getNodeBufferMemory0().write(arg, ptr, len);
79
+ WASM_VECTOR_LEN = len;
80
+ return ptr;
81
+ }
82
+ /**
83
+ * @param {string} context
84
+ * @returns {Blake3Hash}
85
+ */
86
+ module.exports.create_derive = function(context) {
87
+ var ptr0 = passStringToWasm0(context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
88
+ var len0 = WASM_VECTOR_LEN;
89
+ var ret = wasm.create_derive(ptr0, len0);
90
+ return Blake3Hash.__wrap(ret);
91
+ };
92
+
93
+ const u32CvtShim = new Uint32Array(2);
94
+
95
+ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
96
+ /**
97
+ */
98
+ class Blake3Hash {
99
+
100
+ static __wrap(ptr) {
101
+ const obj = Object.create(Blake3Hash.prototype);
102
+ obj.ptr = ptr;
103
+
104
+ return obj;
105
+ }
106
+
107
+ free() {
108
+ const ptr = this.ptr;
109
+ this.ptr = 0;
110
+
111
+ wasm.__wbg_blake3hash_free(ptr);
112
+ }
113
+ /**
114
+ * @returns {HashReader}
115
+ */
116
+ reader() {
117
+ var ret = wasm.blake3hash_reader(this.ptr);
118
+ return HashReader.__wrap(ret);
119
+ }
120
+ /**
121
+ * @param {Uint8Array} input_bytes
122
+ */
123
+ update(input_bytes) {
124
+ var ptr0 = passArray8ToWasm0(input_bytes, wasm.__wbindgen_malloc);
125
+ var len0 = WASM_VECTOR_LEN;
126
+ wasm.blake3hash_update(this.ptr, ptr0, len0);
127
+ }
128
+ /**
129
+ * @param {Uint8Array} out
130
+ */
131
+ digest(out) {
132
+ try {
133
+ var ptr0 = passArray8ToWasm0(out, wasm.__wbindgen_malloc);
134
+ var len0 = WASM_VECTOR_LEN;
135
+ wasm.blake3hash_digest(this.ptr, ptr0, len0);
136
+ } finally {
137
+ out.set(getUint8Memory0().subarray(ptr0 / 1, ptr0 / 1 + len0));
138
+ wasm.__wbindgen_free(ptr0, len0 * 1);
139
+ }
140
+ }
141
+ }
142
+ module.exports.Blake3Hash = Blake3Hash;
143
+ /**
144
+ */
145
+ class HashReader {
146
+
147
+ static __wrap(ptr) {
148
+ const obj = Object.create(HashReader.prototype);
149
+ obj.ptr = ptr;
150
+
151
+ return obj;
152
+ }
153
+
154
+ free() {
155
+ const ptr = this.ptr;
156
+ this.ptr = 0;
157
+
158
+ wasm.__wbg_hashreader_free(ptr);
159
+ }
160
+ /**
161
+ * @param {Uint8Array} bytes
162
+ */
163
+ fill(bytes) {
164
+ try {
165
+ var ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
166
+ var len0 = WASM_VECTOR_LEN;
167
+ wasm.hashreader_fill(this.ptr, ptr0, len0);
168
+ } finally {
169
+ bytes.set(getUint8Memory0().subarray(ptr0 / 1, ptr0 / 1 + len0));
170
+ wasm.__wbindgen_free(ptr0, len0 * 1);
171
+ }
172
+ }
173
+ /**
174
+ * @param {BigInt} position
175
+ */
176
+ set_position(position) {
177
+ uint64CvtShim[0] = position;
178
+ const low0 = u32CvtShim[0];
179
+ const high0 = u32CvtShim[1];
180
+ wasm.hashreader_set_position(this.ptr, low0, high0);
181
+ }
182
+ }
183
+ module.exports.HashReader = HashReader;
184
+
185
+ module.exports.__wbindgen_throw = function(arg0, arg1) {
186
+ throw new Error(getStringFromWasm0(arg0, arg1));
187
+ };
188
+
189
+ const path = require('path').join(__dirname, 'blake3_js_bg.wasm');
190
+ const bytes = require('fs').readFileSync(path);
191
+
192
+ const wasmModule = new WebAssembly.Module(bytes);
193
+ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
194
+ wasm = wasmInstance.exports;
195
+ module.exports.__wasm = wasm;
196
+
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/blake3_js_bg.wasm ADDED
Binary file (34.4 kB). View file
 
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/nodejs/package.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "blake3-js",
3
+ "version": "0.1.0",
4
+ "files": [
5
+ "blake3_js_bg.wasm",
6
+ "blake3_js.js",
7
+ "blake3_js_bg.js",
8
+ "blake3_js.d.ts"
9
+ ],
10
+ "main": "blake3_js.js",
11
+ "types": "blake3_js.d.ts"
12
+ }
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js.d.ts ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {Uint8Array} data
5
+ * @param {Uint8Array} out
6
+ */
7
+ export function hash(data: Uint8Array, out: Uint8Array): void;
8
+ /**
9
+ * @returns {Blake3Hash}
10
+ */
11
+ export function create_hasher(): Blake3Hash;
12
+ /**
13
+ * @param {Uint8Array} key_slice
14
+ * @returns {Blake3Hash}
15
+ */
16
+ export function create_keyed(key_slice: Uint8Array): Blake3Hash;
17
+ /**
18
+ * @param {string} context
19
+ * @returns {Blake3Hash}
20
+ */
21
+ export function create_derive(context: string): Blake3Hash;
22
+ /**
23
+ */
24
+ export class Blake3Hash {
25
+ free(): void;
26
+ /**
27
+ * @returns {HashReader}
28
+ */
29
+ reader(): HashReader;
30
+ /**
31
+ * @param {Uint8Array} input_bytes
32
+ */
33
+ update(input_bytes: Uint8Array): void;
34
+ /**
35
+ * @param {Uint8Array} out
36
+ */
37
+ digest(out: Uint8Array): void;
38
+ }
39
+ /**
40
+ */
41
+ export class HashReader {
42
+ free(): void;
43
+ /**
44
+ * @param {Uint8Array} bytes
45
+ */
46
+ fill(bytes: Uint8Array): void;
47
+ /**
48
+ * @param {BigInt} position
49
+ */
50
+ set_position(position: BigInt): void;
51
+ }
52
+
53
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
54
+
55
+ export interface InitOutput {
56
+ readonly memory: WebAssembly.Memory;
57
+ readonly hash: (a: number, b: number, c: number, d: number) => void;
58
+ readonly create_hasher: () => number;
59
+ readonly create_keyed: (a: number, b: number) => number;
60
+ readonly create_derive: (a: number, b: number) => number;
61
+ readonly __wbg_blake3hash_free: (a: number) => void;
62
+ readonly blake3hash_reader: (a: number) => number;
63
+ readonly blake3hash_update: (a: number, b: number, c: number) => void;
64
+ readonly blake3hash_digest: (a: number, b: number, c: number) => void;
65
+ readonly __wbg_hashreader_free: (a: number) => void;
66
+ readonly hashreader_fill: (a: number, b: number, c: number) => void;
67
+ readonly hashreader_set_position: (a: number, b: number, c: number) => void;
68
+ readonly __wbindgen_malloc: (a: number) => number;
69
+ readonly __wbindgen_free: (a: number, b: number) => void;
70
+ readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
71
+ }
72
+
73
+ /**
74
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
75
+ * for everything else, calls `WebAssembly.instantiate` directly.
76
+ *
77
+ * @param {InitInput | Promise<InitInput>} module_or_path
78
+ *
79
+ * @returns {Promise<InitOutput>}
80
+ */
81
+ export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
82
+
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js.js ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ let wasm;
3
+
4
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
5
+
6
+ cachedTextDecoder.decode();
7
+
8
+ let cachegetUint8Memory0 = null;
9
+ function getUint8Memory0() {
10
+ if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
11
+ cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
+ }
13
+ return cachegetUint8Memory0;
14
+ }
15
+
16
+ function getStringFromWasm0(ptr, len) {
17
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
18
+ }
19
+
20
+ let WASM_VECTOR_LEN = 0;
21
+
22
+ function passArray8ToWasm0(arg, malloc) {
23
+ const ptr = malloc(arg.length * 1);
24
+ getUint8Memory0().set(arg, ptr / 1);
25
+ WASM_VECTOR_LEN = arg.length;
26
+ return ptr;
27
+ }
28
+ /**
29
+ * @param {Uint8Array} data
30
+ * @param {Uint8Array} out
31
+ */
32
+ export function hash(data, out) {
33
+ try {
34
+ var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
35
+ var len0 = WASM_VECTOR_LEN;
36
+ var ptr1 = passArray8ToWasm0(out, wasm.__wbindgen_malloc);
37
+ var len1 = WASM_VECTOR_LEN;
38
+ wasm.hash(ptr0, len0, ptr1, len1);
39
+ } finally {
40
+ out.set(getUint8Memory0().subarray(ptr1 / 1, ptr1 / 1 + len1));
41
+ wasm.__wbindgen_free(ptr1, len1 * 1);
42
+ }
43
+ }
44
+
45
+ /**
46
+ * @returns {Blake3Hash}
47
+ */
48
+ export function create_hasher() {
49
+ var ret = wasm.create_hasher();
50
+ return Blake3Hash.__wrap(ret);
51
+ }
52
+
53
+ /**
54
+ * @param {Uint8Array} key_slice
55
+ * @returns {Blake3Hash}
56
+ */
57
+ export function create_keyed(key_slice) {
58
+ var ptr0 = passArray8ToWasm0(key_slice, wasm.__wbindgen_malloc);
59
+ var len0 = WASM_VECTOR_LEN;
60
+ var ret = wasm.create_keyed(ptr0, len0);
61
+ return Blake3Hash.__wrap(ret);
62
+ }
63
+
64
+ let cachedTextEncoder = new TextEncoder('utf-8');
65
+
66
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
67
+ ? function (arg, view) {
68
+ return cachedTextEncoder.encodeInto(arg, view);
69
+ }
70
+ : function (arg, view) {
71
+ const buf = cachedTextEncoder.encode(arg);
72
+ view.set(buf);
73
+ return {
74
+ read: arg.length,
75
+ written: buf.length
76
+ };
77
+ });
78
+
79
+ function passStringToWasm0(arg, malloc, realloc) {
80
+
81
+ if (realloc === undefined) {
82
+ const buf = cachedTextEncoder.encode(arg);
83
+ const ptr = malloc(buf.length);
84
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
85
+ WASM_VECTOR_LEN = buf.length;
86
+ return ptr;
87
+ }
88
+
89
+ let len = arg.length;
90
+ let ptr = malloc(len);
91
+
92
+ const mem = getUint8Memory0();
93
+
94
+ let offset = 0;
95
+
96
+ for (; offset < len; offset++) {
97
+ const code = arg.charCodeAt(offset);
98
+ if (code > 0x7F) break;
99
+ mem[ptr + offset] = code;
100
+ }
101
+
102
+ if (offset !== len) {
103
+ if (offset !== 0) {
104
+ arg = arg.slice(offset);
105
+ }
106
+ ptr = realloc(ptr, len, len = offset + arg.length * 3);
107
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
108
+ const ret = encodeString(arg, view);
109
+
110
+ offset += ret.written;
111
+ }
112
+
113
+ WASM_VECTOR_LEN = offset;
114
+ return ptr;
115
+ }
116
+ /**
117
+ * @param {string} context
118
+ * @returns {Blake3Hash}
119
+ */
120
+ export function create_derive(context) {
121
+ var ptr0 = passStringToWasm0(context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
122
+ var len0 = WASM_VECTOR_LEN;
123
+ var ret = wasm.create_derive(ptr0, len0);
124
+ return Blake3Hash.__wrap(ret);
125
+ }
126
+
127
+ const u32CvtShim = new Uint32Array(2);
128
+
129
+ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
130
+ /**
131
+ */
132
+ export class Blake3Hash {
133
+
134
+ static __wrap(ptr) {
135
+ const obj = Object.create(Blake3Hash.prototype);
136
+ obj.ptr = ptr;
137
+
138
+ return obj;
139
+ }
140
+
141
+ free() {
142
+ const ptr = this.ptr;
143
+ this.ptr = 0;
144
+
145
+ wasm.__wbg_blake3hash_free(ptr);
146
+ }
147
+ /**
148
+ * @returns {HashReader}
149
+ */
150
+ reader() {
151
+ var ret = wasm.blake3hash_reader(this.ptr);
152
+ return HashReader.__wrap(ret);
153
+ }
154
+ /**
155
+ * @param {Uint8Array} input_bytes
156
+ */
157
+ update(input_bytes) {
158
+ var ptr0 = passArray8ToWasm0(input_bytes, wasm.__wbindgen_malloc);
159
+ var len0 = WASM_VECTOR_LEN;
160
+ wasm.blake3hash_update(this.ptr, ptr0, len0);
161
+ }
162
+ /**
163
+ * @param {Uint8Array} out
164
+ */
165
+ digest(out) {
166
+ try {
167
+ var ptr0 = passArray8ToWasm0(out, wasm.__wbindgen_malloc);
168
+ var len0 = WASM_VECTOR_LEN;
169
+ wasm.blake3hash_digest(this.ptr, ptr0, len0);
170
+ } finally {
171
+ out.set(getUint8Memory0().subarray(ptr0 / 1, ptr0 / 1 + len0));
172
+ wasm.__wbindgen_free(ptr0, len0 * 1);
173
+ }
174
+ }
175
+ }
176
+ /**
177
+ */
178
+ export class HashReader {
179
+
180
+ static __wrap(ptr) {
181
+ const obj = Object.create(HashReader.prototype);
182
+ obj.ptr = ptr;
183
+
184
+ return obj;
185
+ }
186
+
187
+ free() {
188
+ const ptr = this.ptr;
189
+ this.ptr = 0;
190
+
191
+ wasm.__wbg_hashreader_free(ptr);
192
+ }
193
+ /**
194
+ * @param {Uint8Array} bytes
195
+ */
196
+ fill(bytes) {
197
+ try {
198
+ var ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
199
+ var len0 = WASM_VECTOR_LEN;
200
+ wasm.hashreader_fill(this.ptr, ptr0, len0);
201
+ } finally {
202
+ bytes.set(getUint8Memory0().subarray(ptr0 / 1, ptr0 / 1 + len0));
203
+ wasm.__wbindgen_free(ptr0, len0 * 1);
204
+ }
205
+ }
206
+ /**
207
+ * @param {BigInt} position
208
+ */
209
+ set_position(position) {
210
+ uint64CvtShim[0] = position;
211
+ const low0 = u32CvtShim[0];
212
+ const high0 = u32CvtShim[1];
213
+ wasm.hashreader_set_position(this.ptr, low0, high0);
214
+ }
215
+ }
216
+
217
+ async function load(module, imports) {
218
+ if (typeof Response === 'function' && module instanceof Response) {
219
+
220
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
221
+ try {
222
+ return await WebAssembly.instantiateStreaming(module, imports);
223
+
224
+ } catch (e) {
225
+ if (module.headers.get('Content-Type') != 'application/wasm') {
226
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
227
+
228
+ } else {
229
+ throw e;
230
+ }
231
+ }
232
+ }
233
+
234
+ const bytes = await module.arrayBuffer();
235
+ return await WebAssembly.instantiate(bytes, imports);
236
+
237
+ } else {
238
+
239
+ const instance = await WebAssembly.instantiate(module, imports);
240
+
241
+ if (instance instanceof WebAssembly.Instance) {
242
+ return { instance, module };
243
+
244
+ } else {
245
+ return instance;
246
+ }
247
+ }
248
+ }
249
+
250
+ async function init(input) {
251
+ if (typeof input === 'undefined') {
252
+ input = import.meta.url.replace(/\.js$/, '_bg.wasm');
253
+ }
254
+ const imports = {};
255
+ imports.wbg = {};
256
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
257
+ throw new Error(getStringFromWasm0(arg0, arg1));
258
+ };
259
+
260
+ if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
261
+ input = fetch(input);
262
+ }
263
+
264
+ const { instance, module } = await load(await input, imports);
265
+
266
+ wasm = instance.exports;
267
+ init.__wbindgen_wasm_module = module;
268
+
269
+ return wasm;
270
+ }
271
+
272
+ export default init;
273
+
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/blake3_js_bg.wasm ADDED
Binary file (34.4 kB). View file
 
workers1/auto3d/node_modules/blake3-wasm/dist/wasm/web/package.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "blake3-js",
3
+ "version": "0.1.0",
4
+ "files": [
5
+ "blake3_js_bg.wasm",
6
+ "blake3_js.js",
7
+ "blake3_js.d.ts"
8
+ ],
9
+ "module": "blake3_js.js",
10
+ "types": "blake3_js.d.ts",
11
+ "sideEffects": false
12
+ }
workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.d.ts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * A type which requires manual disposal to free unmanaged resources. In the
3
+ * context of this library, this usually means freeing memory from WebAssembly
4
+ * code.
5
+ */
6
+ export interface IDisposable {
7
+ /**
8
+ * Frees unmanaged resources of the object. This method is idempotent;
9
+ * calling it multiple times will have no ill effects.
10
+ */
11
+ dispose(): void;
12
+ }
13
+ /**
14
+ * A helper function that calls `.dispose()` on the {@link IDisposable} when
15
+ * the given function (or promise returned by the function) returns.
16
+ */
17
+ export declare const using: <T, D extends IDisposable>(disposable: D, fn: (d: D) => T) => T;
workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const isPromiseLike = (value) => typeof value === 'object' && !!value && 'then' in value;
2
+ /**
3
+ * A helper function that calls `.dispose()` on the {@link IDisposable} when
4
+ * the given function (or promise returned by the function) returns.
5
+ */
6
+ export const using = (disposable, fn) => {
7
+ let ret;
8
+ try {
9
+ ret = fn(disposable);
10
+ }
11
+ catch (e) {
12
+ disposable.dispose();
13
+ throw e;
14
+ }
15
+ if (!isPromiseLike(ret)) {
16
+ disposable.dispose();
17
+ return ret;
18
+ }
19
+ return ret.then(value => {
20
+ disposable.dispose();
21
+ return value;
22
+ }, err => {
23
+ disposable.dispose();
24
+ throw err;
25
+ });
26
+ };
27
+ //# sourceMappingURL=disposable.js.map
workers1/auto3d/node_modules/blake3-wasm/esm/base/disposable.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"disposable.js","sourceRoot":"","sources":["../../ts/base/disposable.ts"],"names":[],"mappings":"AAaA,MAAM,aAAa,GAAG,CAAC,KAAc,EAAiC,EAAE,CACtE,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,IAAI,MAAM,IAAI,KAAK,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAA2B,UAAa,EAAE,EAAe,EAAK,EAAE;IACnF,IAAI,GAAmB,CAAC;IACxB,IAAI;QACF,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,CAAC,CAAC;KACT;IAED,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;QACvB,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC;KACZ;IAED,OAAQ,GAAG,CAAC,IAAI,CACd,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC,EACD,GAAG,CAAC,EAAE;QACJ,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,GAAG,CAAC;IACZ,CAAC,CACe,CAAC;AACrB,CAAC,CAAC"}