@freqhole/midden 0.1.32 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -58
- package/midden.d.ts +242 -17
- package/midden.js +2 -2
- package/midden_bg.js +876 -240
- package/midden_bg.wasm +0 -0
- package/package.json +1 -1
package/midden_bg.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export class BiStream {
|
|
13
13
|
static __wrap(ptr) {
|
|
14
|
-
ptr = ptr >>> 0;
|
|
15
14
|
const obj = Object.create(BiStream.prototype);
|
|
16
15
|
obj.__wbg_ptr = ptr;
|
|
17
16
|
BiStreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -147,7 +146,7 @@ export class BiStream {
|
|
|
147
146
|
* race the QUIC flush -- the peer's `read_to_end` then errors with
|
|
148
147
|
* "connection lost" mid-payload because the in-flight frames are
|
|
149
148
|
* torn down with the connection. matters most for large payloads
|
|
150
|
-
* (e.g. base64-encoded blob bodies in `
|
|
149
|
+
* (e.g. base64-encoded blob bodies in `api_response`).
|
|
151
150
|
* @param {Uint8Array} data
|
|
152
151
|
* @returns {Promise<void>}
|
|
153
152
|
*/
|
|
@@ -160,12 +159,120 @@ export class BiStream {
|
|
|
160
159
|
}
|
|
161
160
|
if (Symbol.dispose) BiStream.prototype[Symbol.dispose] = BiStream.prototype.free;
|
|
162
161
|
|
|
162
|
+
/**
|
|
163
|
+
* incremental blake3 hasher for streaming uploads — feed fixed-size chunks
|
|
164
|
+
* via update() and read the final hex hash from finalize(). lets JS hash a
|
|
165
|
+
* File while streaming it (file.stream() reader loop) instead of holding
|
|
166
|
+
* the whole payload in memory for a one-shot hash_blake3().
|
|
167
|
+
*/
|
|
168
|
+
export class Blake3Hasher {
|
|
169
|
+
__destroy_into_raw() {
|
|
170
|
+
const ptr = this.__wbg_ptr;
|
|
171
|
+
this.__wbg_ptr = 0;
|
|
172
|
+
Blake3HasherFinalization.unregister(this);
|
|
173
|
+
return ptr;
|
|
174
|
+
}
|
|
175
|
+
free() {
|
|
176
|
+
const ptr = this.__destroy_into_raw();
|
|
177
|
+
wasm.__wbg_blake3hasher_free(ptr, 0);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* finish and return the hash as a 64-char hex string. the hasher can
|
|
181
|
+
* keep absorbing after this (blake3 finalize is non-destructive), but
|
|
182
|
+
* callers should treat the session as done.
|
|
183
|
+
* @returns {string}
|
|
184
|
+
*/
|
|
185
|
+
finalize() {
|
|
186
|
+
let deferred1_0;
|
|
187
|
+
let deferred1_1;
|
|
188
|
+
try {
|
|
189
|
+
const ret = wasm.blake3hasher_finalize(this.__wbg_ptr);
|
|
190
|
+
deferred1_0 = ret[0];
|
|
191
|
+
deferred1_1 = ret[1];
|
|
192
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
193
|
+
} finally {
|
|
194
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
constructor() {
|
|
198
|
+
const ret = wasm.blake3hasher_new();
|
|
199
|
+
this.__wbg_ptr = ret;
|
|
200
|
+
Blake3HasherFinalization.register(this, this.__wbg_ptr, this);
|
|
201
|
+
return this;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* absorb the next chunk of data.
|
|
205
|
+
* @param {Uint8Array} chunk
|
|
206
|
+
*/
|
|
207
|
+
update(chunk) {
|
|
208
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
|
|
209
|
+
const len0 = WASM_VECTOR_LEN;
|
|
210
|
+
wasm.blake3hasher_update(this.__wbg_ptr, ptr0, len0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (Symbol.dispose) Blake3Hasher.prototype[Symbol.dispose] = Blake3Hasher.prototype.free;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* cooperative cancellation for in-flight downloads (pause/cancel from JS).
|
|
217
|
+
* the download loops select on `cancelled()` between progress events —
|
|
218
|
+
* cancellation takes effect at the next event boundary, and the partial
|
|
219
|
+
* data stays in the store, so a later download of the same hash resumes
|
|
220
|
+
* from the persisted bitfield (only missing ranges transfer).
|
|
221
|
+
*/
|
|
222
|
+
export class CancelToken {
|
|
223
|
+
static __wrap(ptr) {
|
|
224
|
+
const obj = Object.create(CancelToken.prototype);
|
|
225
|
+
obj.__wbg_ptr = ptr;
|
|
226
|
+
CancelTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
227
|
+
return obj;
|
|
228
|
+
}
|
|
229
|
+
__destroy_into_raw() {
|
|
230
|
+
const ptr = this.__wbg_ptr;
|
|
231
|
+
this.__wbg_ptr = 0;
|
|
232
|
+
CancelTokenFinalization.unregister(this);
|
|
233
|
+
return ptr;
|
|
234
|
+
}
|
|
235
|
+
free() {
|
|
236
|
+
const ptr = this.__destroy_into_raw();
|
|
237
|
+
wasm.__wbg_canceltoken_free(ptr, 0);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* request cancellation. idempotent.
|
|
241
|
+
*/
|
|
242
|
+
cancel() {
|
|
243
|
+
wasm.canceltoken_cancel(this.__wbg_ptr);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* return a new CancelToken sharing the same cancellation state.
|
|
247
|
+
* needed because passing a wasm class by value consumes the JS handle —
|
|
248
|
+
* callers keep the original and pass a clone into download calls.
|
|
249
|
+
* @returns {CancelToken}
|
|
250
|
+
*/
|
|
251
|
+
clone_token() {
|
|
252
|
+
const ret = wasm.canceltoken_clone_token(this.__wbg_ptr);
|
|
253
|
+
return CancelToken.__wrap(ret);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @returns {boolean}
|
|
257
|
+
*/
|
|
258
|
+
is_cancelled() {
|
|
259
|
+
const ret = wasm.canceltoken_is_cancelled(this.__wbg_ptr);
|
|
260
|
+
return ret !== 0;
|
|
261
|
+
}
|
|
262
|
+
constructor() {
|
|
263
|
+
const ret = wasm.canceltoken_new();
|
|
264
|
+
this.__wbg_ptr = ret;
|
|
265
|
+
CancelTokenFinalization.register(this, this.__wbg_ptr, this);
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (Symbol.dispose) CancelToken.prototype[Symbol.dispose] = CancelToken.prototype.free;
|
|
270
|
+
|
|
163
271
|
/**
|
|
164
272
|
* result from fetching the server hello image from a peer
|
|
165
273
|
*/
|
|
166
274
|
export class HelloImageResult {
|
|
167
275
|
static __wrap(ptr) {
|
|
168
|
-
ptr = ptr >>> 0;
|
|
169
276
|
const obj = Object.create(HelloImageResult.prototype);
|
|
170
277
|
obj.__wbg_ptr = ptr;
|
|
171
278
|
HelloImageResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -203,6 +310,65 @@ export class HelloImageResult {
|
|
|
203
310
|
}
|
|
204
311
|
if (Symbol.dispose) HelloImageResult.prototype[Symbol.dispose] = HelloImageResult.prototype.free;
|
|
205
312
|
|
|
313
|
+
/**
|
|
314
|
+
* chunked import session — the streaming counterpart to import_blob.
|
|
315
|
+
*
|
|
316
|
+
* created via MiddenNode::start_import(). JS feeds fixed-size chunks with
|
|
317
|
+
* push() (backpressured: the promise resolves only once the chunk is
|
|
318
|
+
* queued), then finish() completes the import and returns the blake3 hash.
|
|
319
|
+
* the wasm boundary never sees the whole payload at once; the store's
|
|
320
|
+
* ImportByteStream machinery computes the bao tree incrementally.
|
|
321
|
+
*
|
|
322
|
+
* the finished blob is pinned in the node's active_tags (same as
|
|
323
|
+
* import_blob) until release_blob() is called.
|
|
324
|
+
*/
|
|
325
|
+
export class ImportSession {
|
|
326
|
+
static __wrap(ptr) {
|
|
327
|
+
const obj = Object.create(ImportSession.prototype);
|
|
328
|
+
obj.__wbg_ptr = ptr;
|
|
329
|
+
ImportSessionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
330
|
+
return obj;
|
|
331
|
+
}
|
|
332
|
+
__destroy_into_raw() {
|
|
333
|
+
const ptr = this.__wbg_ptr;
|
|
334
|
+
this.__wbg_ptr = 0;
|
|
335
|
+
ImportSessionFinalization.unregister(this);
|
|
336
|
+
return ptr;
|
|
337
|
+
}
|
|
338
|
+
free() {
|
|
339
|
+
const ptr = this.__destroy_into_raw();
|
|
340
|
+
wasm.__wbg_importsession_free(ptr, 0);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* abort the import. any partially-imported data is left to GC.
|
|
344
|
+
*/
|
|
345
|
+
abort() {
|
|
346
|
+
wasm.importsession_abort(this.__wbg_ptr);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* signal end-of-stream, wait for the import to complete, pin the
|
|
350
|
+
* resulting blob, and return its blake3 hash as a hex string.
|
|
351
|
+
* @returns {Promise<string>}
|
|
352
|
+
*/
|
|
353
|
+
finish() {
|
|
354
|
+
const ret = wasm.importsession_finish(this.__wbg_ptr);
|
|
355
|
+
return ret;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* queue the next chunk. resolves once the chunk has been accepted by
|
|
359
|
+
* the import stream (bounded channel — this is the backpressure point).
|
|
360
|
+
* @param {Uint8Array} chunk
|
|
361
|
+
* @returns {Promise<void>}
|
|
362
|
+
*/
|
|
363
|
+
push(chunk) {
|
|
364
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
|
|
365
|
+
const len0 = WASM_VECTOR_LEN;
|
|
366
|
+
const ret = wasm.importsession_push(this.__wbg_ptr, ptr0, len0);
|
|
367
|
+
return ret;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (Symbol.dispose) ImportSession.prototype[Symbol.dispose] = ImportSession.prototype.free;
|
|
371
|
+
|
|
206
372
|
export class IntoUnderlyingByteSource {
|
|
207
373
|
__destroy_into_raw() {
|
|
208
374
|
const ptr = this.__wbg_ptr;
|
|
@@ -318,12 +484,11 @@ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderly
|
|
|
318
484
|
* browser P2P node for freqhole federation
|
|
319
485
|
*
|
|
320
486
|
* supports two protocols:
|
|
321
|
-
* - freqhole/1: API
|
|
487
|
+
* - freqhole/1: API requests and small blob streaming
|
|
322
488
|
* - iroh-blobs: verified streaming for audio files
|
|
323
489
|
*/
|
|
324
490
|
export class MiddenNode {
|
|
325
491
|
static __wrap(ptr) {
|
|
326
|
-
ptr = ptr >>> 0;
|
|
327
492
|
const obj = Object.create(MiddenNode.prototype);
|
|
328
493
|
obj.__wbg_ptr = ptr;
|
|
329
494
|
MiddenNodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -363,6 +528,40 @@ export class MiddenNode {
|
|
|
363
528
|
const ret = wasm.middennode_active_blob_count(this.__wbg_ptr);
|
|
364
529
|
return ret >>> 0;
|
|
365
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* send an API request to a peer
|
|
533
|
+
* peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
|
|
534
|
+
* @param {string} peer_addr
|
|
535
|
+
* @param {string} method
|
|
536
|
+
* @param {string} path
|
|
537
|
+
* @param {string | null} [body]
|
|
538
|
+
* @returns {Promise<any>}
|
|
539
|
+
*/
|
|
540
|
+
api_request(peer_addr, method, path, body) {
|
|
541
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
+
const len0 = WASM_VECTOR_LEN;
|
|
543
|
+
const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
544
|
+
const len1 = WASM_VECTOR_LEN;
|
|
545
|
+
const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
546
|
+
const len2 = WASM_VECTOR_LEN;
|
|
547
|
+
var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
|
+
var len3 = WASM_VECTOR_LEN;
|
|
549
|
+
const ret = wasm.middennode_api_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
550
|
+
return ret;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* PROTOTYPE: remove a hash's restriction, returning it to the default
|
|
554
|
+
* (served to anyone) state.
|
|
555
|
+
* @param {string} blake3_hash
|
|
556
|
+
*/
|
|
557
|
+
clear_blob_restriction(blake3_hash) {
|
|
558
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
559
|
+
const len0 = WASM_VECTOR_LEN;
|
|
560
|
+
const ret = wasm.middennode_clear_blob_restriction(this.__wbg_ptr, ptr0, len0);
|
|
561
|
+
if (ret[1]) {
|
|
562
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
366
565
|
/**
|
|
367
566
|
* compute blake3 hash for a blob on demand
|
|
368
567
|
*
|
|
@@ -384,8 +583,10 @@ export class MiddenNode {
|
|
|
384
583
|
return ret;
|
|
385
584
|
}
|
|
386
585
|
/**
|
|
387
|
-
* create a new node with random identity
|
|
388
|
-
* waits for relay connection before returning.
|
|
586
|
+
* create a new node with random identity, an in-memory blob store, and
|
|
587
|
+
* the default ALPN set. waits for relay connection before returning.
|
|
588
|
+
*
|
|
589
|
+
* deprecated: use `create_with_options` instead.
|
|
389
590
|
*
|
|
390
591
|
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
391
592
|
* (defaults to 10s when omitted/undefined).
|
|
@@ -393,13 +594,15 @@ export class MiddenNode {
|
|
|
393
594
|
* @returns {Promise<MiddenNode>}
|
|
394
595
|
*/
|
|
395
596
|
static create(connect_timeout_ms) {
|
|
396
|
-
const ret = wasm.middennode_create(isLikeNone(connect_timeout_ms) ?
|
|
597
|
+
const ret = wasm.middennode_create(isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
397
598
|
return ret;
|
|
398
599
|
}
|
|
399
600
|
/**
|
|
400
601
|
* create a node from existing secret key bytes (for persistence)
|
|
401
602
|
* key_bytes must be exactly 32 bytes.
|
|
402
603
|
*
|
|
604
|
+
* deprecated: use `create_with_options` instead.
|
|
605
|
+
*
|
|
403
606
|
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
404
607
|
* (defaults to 10s when omitted/undefined).
|
|
405
608
|
* @param {Uint8Array} key_bytes
|
|
@@ -409,14 +612,16 @@ export class MiddenNode {
|
|
|
409
612
|
static create_from_key(key_bytes, connect_timeout_ms) {
|
|
410
613
|
const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
|
|
411
614
|
const len0 = WASM_VECTOR_LEN;
|
|
412
|
-
const ret = wasm.middennode_create_from_key(ptr0, len0, isLikeNone(connect_timeout_ms) ?
|
|
615
|
+
const ret = wasm.middennode_create_from_key(ptr0, len0, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
413
616
|
return ret;
|
|
414
617
|
}
|
|
415
618
|
/**
|
|
416
619
|
* create a node from existing secret key with additional ALPN protocols.
|
|
417
620
|
*
|
|
621
|
+
* deprecated: use `create_with_options` instead.
|
|
622
|
+
*
|
|
418
623
|
* `extra_alpns` is a JS array of strings (e.g. ["iroh/automerge-repo/1"]).
|
|
419
|
-
* the node always registers
|
|
624
|
+
* the node always registers the default ALPN set plus whatever extra ALPNs are given.
|
|
420
625
|
*
|
|
421
626
|
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
422
627
|
* (defaults to 10s when omitted/undefined).
|
|
@@ -428,7 +633,20 @@ export class MiddenNode {
|
|
|
428
633
|
static create_with_alpns(key_bytes, extra_alpns, connect_timeout_ms) {
|
|
429
634
|
const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
|
|
430
635
|
const len0 = WASM_VECTOR_LEN;
|
|
431
|
-
const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns, isLikeNone(connect_timeout_ms) ?
|
|
636
|
+
const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
637
|
+
return ret;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* create a node from an options bag. this is the single canonical
|
|
641
|
+
* constructor — `create`/`create_from_key`/`create_with_alpns` below
|
|
642
|
+
* are deprecated wrappers kept for existing callers (spume, playlistz).
|
|
643
|
+
* @param {MiddenNodeOptions} options
|
|
644
|
+
* @returns {Promise<MiddenNode>}
|
|
645
|
+
*/
|
|
646
|
+
static create_with_options(options) {
|
|
647
|
+
_assertClass(options, MiddenNodeOptions);
|
|
648
|
+
var ptr0 = options.__destroy_into_raw();
|
|
649
|
+
const ret = wasm.middennode_create_with_options(ptr0);
|
|
432
650
|
return ret;
|
|
433
651
|
}
|
|
434
652
|
/**
|
|
@@ -472,6 +690,25 @@ export class MiddenNode {
|
|
|
472
690
|
const ret = wasm.middennode_download_verified_by_id(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
473
691
|
return ret;
|
|
474
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* full pipeline from blob_id with progress reporting.
|
|
695
|
+
*
|
|
696
|
+
* computes blake3 on demand, then uses verified download with progress.
|
|
697
|
+
* returns [data: Uint8Array, blake3: string].
|
|
698
|
+
* @param {string} peer_addr
|
|
699
|
+
* @param {string} blob_id
|
|
700
|
+
* @param {number} total_size
|
|
701
|
+
* @param {Function} on_progress
|
|
702
|
+
* @returns {Promise<Array<any>>}
|
|
703
|
+
*/
|
|
704
|
+
download_verified_by_id_progress(peer_addr, blob_id, total_size, on_progress) {
|
|
705
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
706
|
+
const len0 = WASM_VECTOR_LEN;
|
|
707
|
+
const ptr1 = passStringToWasm0(blob_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
708
|
+
const len1 = WASM_VECTOR_LEN;
|
|
709
|
+
const ret = wasm.middennode_download_verified_by_id_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress);
|
|
710
|
+
return ret;
|
|
711
|
+
}
|
|
475
712
|
/**
|
|
476
713
|
* download a verified blob and stream chunks to JS via callback
|
|
477
714
|
*
|
|
@@ -496,33 +733,46 @@ export class MiddenNode {
|
|
|
496
733
|
* @param {number} total_size
|
|
497
734
|
* @param {Function} on_chunk
|
|
498
735
|
* @param {Function} on_progress
|
|
736
|
+
* @param {CancelToken | null} [cancel]
|
|
499
737
|
* @returns {Promise<number>}
|
|
500
738
|
*/
|
|
501
|
-
download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
|
|
739
|
+
download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
|
|
502
740
|
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
503
741
|
const len0 = WASM_VECTOR_LEN;
|
|
504
742
|
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
505
743
|
const len1 = WASM_VECTOR_LEN;
|
|
506
|
-
|
|
744
|
+
let ptr2 = 0;
|
|
745
|
+
if (!isLikeNone(cancel)) {
|
|
746
|
+
_assertClass(cancel, CancelToken);
|
|
747
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
748
|
+
}
|
|
749
|
+
const ret = wasm.middennode_download_verified_streaming(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
|
|
507
750
|
return ret;
|
|
508
751
|
}
|
|
509
752
|
/**
|
|
510
753
|
* streaming download with auto ensure+retry. first attempts the streaming
|
|
511
754
|
* download; if the verified download fails (blob not in peer's store), calls
|
|
512
|
-
* ensure_blob to load it, then retries.
|
|
755
|
+
* ensure_blob to load it, then retries. a deliberate cancellation is NOT
|
|
756
|
+
* retried — it propagates immediately with the "download cancelled" message.
|
|
513
757
|
* @param {string} peer_addr
|
|
514
758
|
* @param {string} blake3_hash
|
|
515
759
|
* @param {number} total_size
|
|
516
760
|
* @param {Function} on_chunk
|
|
517
761
|
* @param {Function} on_progress
|
|
762
|
+
* @param {CancelToken | null} [cancel]
|
|
518
763
|
* @returns {Promise<number>}
|
|
519
764
|
*/
|
|
520
|
-
download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
|
|
765
|
+
download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
|
|
521
766
|
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
522
767
|
const len0 = WASM_VECTOR_LEN;
|
|
523
768
|
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
524
769
|
const len1 = WASM_VECTOR_LEN;
|
|
525
|
-
|
|
770
|
+
let ptr2 = 0;
|
|
771
|
+
if (!isLikeNone(cancel)) {
|
|
772
|
+
_assertClass(cancel, CancelToken);
|
|
773
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
774
|
+
}
|
|
775
|
+
const ret = wasm.middennode_download_verified_streaming_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
|
|
526
776
|
return ret;
|
|
527
777
|
}
|
|
528
778
|
/**
|
|
@@ -542,6 +792,71 @@ export class MiddenNode {
|
|
|
542
792
|
const ret = wasm.middennode_download_verified_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
543
793
|
return ret;
|
|
544
794
|
}
|
|
795
|
+
/**
|
|
796
|
+
* download with ensure + retry and progress reporting.
|
|
797
|
+
*
|
|
798
|
+
* tries download first; if blob not in peer's FsStore, calls ensure_blob
|
|
799
|
+
* then retries. progress callback receives fraction (0.0 to 1.0).
|
|
800
|
+
* `cancel`: optional cooperative cancellation (pause) — a deliberate
|
|
801
|
+
* cancellation is NOT retried, it propagates immediately.
|
|
802
|
+
*
|
|
803
|
+
* NOTE: any failure on the first attempt triggers this same
|
|
804
|
+
* ensure-then-retry fallback, not just the "blob not in FsStore yet"
|
|
805
|
+
* case the fallback was designed for. for a large blob, the first
|
|
806
|
+
* attempt can stream a substantial fraction of the bytes (driving
|
|
807
|
+
* `on_progress` most/all of the way to 1.0) before failing late, so the
|
|
808
|
+
* caller-visible symptom is a full 0->100% progress cycle that silently
|
|
809
|
+
* restarts from 0 for a second full cycle. logging the first attempt's
|
|
810
|
+
* error and explicitly resetting progress to 0 here makes this restart
|
|
811
|
+
* visible/diagnosable instead of looking like a silent glitch.
|
|
812
|
+
* @param {string} peer_addr
|
|
813
|
+
* @param {string} blake3_hash
|
|
814
|
+
* @param {number} total_size
|
|
815
|
+
* @param {Function} on_progress
|
|
816
|
+
* @param {CancelToken | null} [cancel]
|
|
817
|
+
* @returns {Promise<Uint8Array>}
|
|
818
|
+
*/
|
|
819
|
+
download_verified_with_ensure_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
|
|
820
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
821
|
+
const len0 = WASM_VECTOR_LEN;
|
|
822
|
+
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
823
|
+
const len1 = WASM_VECTOR_LEN;
|
|
824
|
+
let ptr2 = 0;
|
|
825
|
+
if (!isLikeNone(cancel)) {
|
|
826
|
+
_assertClass(cancel, CancelToken);
|
|
827
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
828
|
+
}
|
|
829
|
+
const ret = wasm.middennode_download_verified_with_ensure_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
|
|
830
|
+
return ret;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* download a blob with progress reporting via JS callback
|
|
834
|
+
*
|
|
835
|
+
* same as download_verified but calls on_progress(fraction) where
|
|
836
|
+
* fraction is bytes_received / total_size (0.0 to 1.0).
|
|
837
|
+
* total_size should come from the caller's known size field.
|
|
838
|
+
* `cancel`: optional cooperative cancellation (pause) — see
|
|
839
|
+
* download_verified_streaming for the semantics.
|
|
840
|
+
* @param {string} peer_addr
|
|
841
|
+
* @param {string} blake3_hash
|
|
842
|
+
* @param {number} total_size
|
|
843
|
+
* @param {Function} on_progress
|
|
844
|
+
* @param {CancelToken | null} [cancel]
|
|
845
|
+
* @returns {Promise<Uint8Array>}
|
|
846
|
+
*/
|
|
847
|
+
download_verified_with_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
|
|
848
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
|
+
const len0 = WASM_VECTOR_LEN;
|
|
850
|
+
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
851
|
+
const len1 = WASM_VECTOR_LEN;
|
|
852
|
+
let ptr2 = 0;
|
|
853
|
+
if (!isLikeNone(cancel)) {
|
|
854
|
+
_assertClass(cancel, CancelToken);
|
|
855
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
856
|
+
}
|
|
857
|
+
const ret = wasm.middennode_download_verified_with_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
|
|
858
|
+
return ret;
|
|
859
|
+
}
|
|
545
860
|
/**
|
|
546
861
|
* ensure a blob is loaded into the peer's FsStore by blake3 hash
|
|
547
862
|
*
|
|
@@ -575,7 +890,7 @@ export class MiddenNode {
|
|
|
575
890
|
return ret;
|
|
576
891
|
}
|
|
577
892
|
/**
|
|
578
|
-
* check whether a blob with the given blake3 hash is currently held in the
|
|
893
|
+
* check whether a blob with the given blake3 hash is currently held in the store
|
|
579
894
|
* via an active TempTag. avoids expensive OPFS read + bao recomputation when the
|
|
580
895
|
* blob is already loaded.
|
|
581
896
|
* @param {string} blake3_hash
|
|
@@ -587,6 +902,20 @@ export class MiddenNode {
|
|
|
587
902
|
const ret = wasm.middennode_has_active_blob(this.__wbg_ptr, ptr0, len0);
|
|
588
903
|
return ret !== 0;
|
|
589
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* check whether a COMPLETE blob with this hash exists in the blob store
|
|
907
|
+
* itself — with the persistent opfs store this is true across reloads,
|
|
908
|
+
* even when no TempTag pins it. lets serving paths skip re-imports
|
|
909
|
+
* entirely.
|
|
910
|
+
* @param {string} blake3_hash
|
|
911
|
+
* @returns {Promise<boolean>}
|
|
912
|
+
*/
|
|
913
|
+
has_complete_blob(blake3_hash) {
|
|
914
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
915
|
+
const len0 = WASM_VECTOR_LEN;
|
|
916
|
+
const ret = wasm.middennode_has_complete_blob(this.__wbg_ptr, ptr0, len0);
|
|
917
|
+
return ret;
|
|
918
|
+
}
|
|
590
919
|
/**
|
|
591
920
|
* import a blob from its pre-computed bao-encoded bytes, skipping the
|
|
592
921
|
* expensive bao tree computation. `blake3_hash` is the 64-char hex hash,
|
|
@@ -612,7 +941,7 @@ export class MiddenNode {
|
|
|
612
941
|
* import raw bytes into the iroh-blobs store, returning the blake3 hash.
|
|
613
942
|
* this makes the blob available for verified download by peers.
|
|
614
943
|
* the blob stays in the store as long as its TempTag is held in active_tags.
|
|
615
|
-
* call release_blob() to allow GC
|
|
944
|
+
* call release_blob() to allow GC.
|
|
616
945
|
* @param {Uint8Array} data
|
|
617
946
|
* @returns {Promise<string>}
|
|
618
947
|
*/
|
|
@@ -685,7 +1014,7 @@ export class MiddenNode {
|
|
|
685
1014
|
* open a bidirectional stream to a peer on a specific ALPN.
|
|
686
1015
|
*
|
|
687
1016
|
* `peer_addr` can be a plain node_id hex string or a full endpoint
|
|
688
|
-
* address JSON (same format as
|
|
1017
|
+
* address JSON (same format as api_request). `alpn` is the protocol
|
|
689
1018
|
* to negotiate (e.g. "iroh/automerge-repo/1").
|
|
690
1019
|
*
|
|
691
1020
|
* returns a BiStream for length-delimited message exchange.
|
|
@@ -701,6 +1030,20 @@ export class MiddenNode {
|
|
|
701
1030
|
const ret = wasm.middennode_open_bi(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
702
1031
|
return ret;
|
|
703
1032
|
}
|
|
1033
|
+
/**
|
|
1034
|
+
* pin a hash so gc won't sweep it (e.g. a paused partial download).
|
|
1035
|
+
* idempotent. pair with unprotect_blob when the partial is resumed to
|
|
1036
|
+
* completion or discarded.
|
|
1037
|
+
* @param {string} blake3_hash
|
|
1038
|
+
*/
|
|
1039
|
+
protect_blob(blake3_hash) {
|
|
1040
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
const ret = wasm.middennode_protect_blob(this.__wbg_ptr, ptr0, len0);
|
|
1043
|
+
if (ret[1]) {
|
|
1044
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
704
1047
|
/**
|
|
705
1048
|
* dispatch a typed admin command to a peer over the freqhole-admin/1 ALPN.
|
|
706
1049
|
*
|
|
@@ -723,27 +1066,6 @@ export class MiddenNode {
|
|
|
723
1066
|
const ret = wasm.middennode_proxy_admin(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
724
1067
|
return ret;
|
|
725
1068
|
}
|
|
726
|
-
/**
|
|
727
|
-
* send an API request to a peer
|
|
728
|
-
* peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
|
|
729
|
-
* @param {string} peer_addr
|
|
730
|
-
* @param {string} method
|
|
731
|
-
* @param {string} path
|
|
732
|
-
* @param {string | null} [body]
|
|
733
|
-
* @returns {Promise<any>}
|
|
734
|
-
*/
|
|
735
|
-
proxy_request(peer_addr, method, path, body) {
|
|
736
|
-
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
737
|
-
const len0 = WASM_VECTOR_LEN;
|
|
738
|
-
const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
739
|
-
const len1 = WASM_VECTOR_LEN;
|
|
740
|
-
const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
741
|
-
const len2 = WASM_VECTOR_LEN;
|
|
742
|
-
var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
743
|
-
var len3 = WASM_VECTOR_LEN;
|
|
744
|
-
const ret = wasm.middennode_proxy_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
745
|
-
return ret;
|
|
746
|
-
}
|
|
747
1069
|
/**
|
|
748
1070
|
* release a blob's TempTag, allowing the store to garbage-collect it.
|
|
749
1071
|
* blake3_hash should be the 64-char hex string returned by import_blob.
|
|
@@ -757,6 +1079,27 @@ export class MiddenNode {
|
|
|
757
1079
|
throw takeFromExternrefTable0(ret[0]);
|
|
758
1080
|
}
|
|
759
1081
|
}
|
|
1082
|
+
/**
|
|
1083
|
+
* PROTOTYPE: restrict a blob (by blake3 hex hash) so only the given
|
|
1084
|
+
* peer node ids may fetch it over the `iroh-blobs/*` ALPN. a hash with
|
|
1085
|
+
* no restriction registered is served to anyone (today's default
|
|
1086
|
+
* behavior, unchanged) — calling this is what opts a specific hash
|
|
1087
|
+
* into gating.
|
|
1088
|
+
*
|
|
1089
|
+
* this is a stopgap/demo hook, not the real canvas-ACL integration: it
|
|
1090
|
+
* has to be called explicitly, from JS, with an already-resolved list
|
|
1091
|
+
* of allowed peer node ids for this one hash.
|
|
1092
|
+
* @param {string} blake3_hash
|
|
1093
|
+
* @param {Array<any>} peer_node_ids
|
|
1094
|
+
*/
|
|
1095
|
+
restrict_blob_to_peers(blake3_hash, peer_node_ids) {
|
|
1096
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1097
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1098
|
+
const ret = wasm.middennode_restrict_blob_to_peers(this.__wbg_ptr, ptr0, len0, peer_node_ids);
|
|
1099
|
+
if (ret[1]) {
|
|
1100
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
760
1103
|
/**
|
|
761
1104
|
* get the secret key bytes for persistence (32 bytes)
|
|
762
1105
|
* store this in IndexedDB to maintain the same identity across sessions
|
|
@@ -786,6 +1129,16 @@ export class MiddenNode {
|
|
|
786
1129
|
start_blob_server() {
|
|
787
1130
|
wasm.middennode_start_blob_server(this.__wbg_ptr);
|
|
788
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* begin a chunked import — the streaming counterpart to import_blob for
|
|
1134
|
+
* payloads that shouldn't be materialized as one contiguous &[u8] across
|
|
1135
|
+
* the wasm boundary. see ImportSession for the push/finish protocol.
|
|
1136
|
+
* @returns {ImportSession}
|
|
1137
|
+
*/
|
|
1138
|
+
start_import() {
|
|
1139
|
+
const ret = wasm.middennode_start_import(this.__wbg_ptr);
|
|
1140
|
+
return ImportSession.__wrap(ret);
|
|
1141
|
+
}
|
|
789
1142
|
/**
|
|
790
1143
|
* connect to a freqhole radio broadcaster.
|
|
791
1144
|
*
|
|
@@ -815,9 +1168,128 @@ export class MiddenNode {
|
|
|
815
1168
|
const ret = wasm.middennode_tune_radio(this.__wbg_ptr, ptr0, len0, ptr1, len1, on_hello, on_meta, on_chunk);
|
|
816
1169
|
return ret;
|
|
817
1170
|
}
|
|
1171
|
+
/**
|
|
1172
|
+
* remove a gc pin added by protect_blob (or by a cancelled download).
|
|
1173
|
+
* @param {string} blake3_hash
|
|
1174
|
+
*/
|
|
1175
|
+
unprotect_blob(blake3_hash) {
|
|
1176
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1177
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1178
|
+
const ret = wasm.middennode_unprotect_blob(this.__wbg_ptr, ptr0, len0);
|
|
1179
|
+
if (ret[1]) {
|
|
1180
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
818
1183
|
}
|
|
819
1184
|
if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.free;
|
|
820
1185
|
|
|
1186
|
+
/**
|
|
1187
|
+
* options bag for `MiddenNode::create_with_options`, the single canonical
|
|
1188
|
+
* constructor. build one, set whichever fields are needed, and pass it in:
|
|
1189
|
+
*
|
|
1190
|
+
* ```js
|
|
1191
|
+
* const opts = new MiddenNodeOptions();
|
|
1192
|
+
* opts.opfs_store_dir = "midden-blob-store";
|
|
1193
|
+
* opts.connect_timeout_ms = 5000;
|
|
1194
|
+
* const node = await MiddenNode.create_with_options(opts);
|
|
1195
|
+
* ```
|
|
1196
|
+
*
|
|
1197
|
+
* `create`/`create_from_key`/`create_with_alpns` remain as deprecated
|
|
1198
|
+
* wrappers over this constructor for existing callers (spume, playlistz).
|
|
1199
|
+
*/
|
|
1200
|
+
export class MiddenNodeOptions {
|
|
1201
|
+
__destroy_into_raw() {
|
|
1202
|
+
const ptr = this.__wbg_ptr;
|
|
1203
|
+
this.__wbg_ptr = 0;
|
|
1204
|
+
MiddenNodeOptionsFinalization.unregister(this);
|
|
1205
|
+
return ptr;
|
|
1206
|
+
}
|
|
1207
|
+
free() {
|
|
1208
|
+
const ptr = this.__destroy_into_raw();
|
|
1209
|
+
wasm.__wbg_middennodeoptions_free(ptr, 0);
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* per-dial timeout (ms) for `open_bi`/`connect` (defaults to 10s).
|
|
1213
|
+
* @returns {number | undefined}
|
|
1214
|
+
*/
|
|
1215
|
+
get connect_timeout_ms() {
|
|
1216
|
+
const ret = wasm.middennodeoptions_get_connect_timeout_ms(this.__wbg_ptr);
|
|
1217
|
+
return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* additional ALPN protocols to register beyond the default set.
|
|
1221
|
+
* @returns {string[] | undefined}
|
|
1222
|
+
*/
|
|
1223
|
+
get extra_alpns() {
|
|
1224
|
+
const ret = wasm.middennodeoptions_get_extra_alpns(this.__wbg_ptr);
|
|
1225
|
+
let v1;
|
|
1226
|
+
if (ret[0] !== 0) {
|
|
1227
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1228
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1229
|
+
}
|
|
1230
|
+
return v1;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* when given, blobs persist in an OPFS-backed store under this
|
|
1234
|
+
* directory (worker context required); otherwise (or when OPFS is
|
|
1235
|
+
* unavailable) an in-memory store is used.
|
|
1236
|
+
* @returns {string | undefined}
|
|
1237
|
+
*/
|
|
1238
|
+
get opfs_store_dir() {
|
|
1239
|
+
const ret = wasm.middennodeoptions_get_opfs_store_dir(this.__wbg_ptr);
|
|
1240
|
+
let v1;
|
|
1241
|
+
if (ret[0] !== 0) {
|
|
1242
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1243
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1244
|
+
}
|
|
1245
|
+
return v1;
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* the node's secret key (32 raw bytes). omit (or pass null/undefined)
|
|
1249
|
+
* to generate a random identity.
|
|
1250
|
+
* @returns {Uint8Array | undefined}
|
|
1251
|
+
*/
|
|
1252
|
+
get secret_key() {
|
|
1253
|
+
const ret = wasm.middennodeoptions_get_secret_key(this.__wbg_ptr);
|
|
1254
|
+
return ret;
|
|
1255
|
+
}
|
|
1256
|
+
constructor() {
|
|
1257
|
+
const ret = wasm.middennodeoptions_new();
|
|
1258
|
+
this.__wbg_ptr = ret;
|
|
1259
|
+
MiddenNodeOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
1260
|
+
return this;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* @param {number | null} [ms]
|
|
1264
|
+
*/
|
|
1265
|
+
set connect_timeout_ms(ms) {
|
|
1266
|
+
wasm.middennodeoptions_set_connect_timeout_ms(this.__wbg_ptr, isLikeNone(ms) ? Number.MAX_SAFE_INTEGER : (ms) >>> 0);
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* @param {string[] | null} [alpns]
|
|
1270
|
+
*/
|
|
1271
|
+
set extra_alpns(alpns) {
|
|
1272
|
+
var ptr0 = isLikeNone(alpns) ? 0 : passArrayJsValueToWasm0(alpns, wasm.__wbindgen_malloc);
|
|
1273
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1274
|
+
wasm.middennodeoptions_set_extra_alpns(this.__wbg_ptr, ptr0, len0);
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* @param {string | null} [dir]
|
|
1278
|
+
*/
|
|
1279
|
+
set opfs_store_dir(dir) {
|
|
1280
|
+
var ptr0 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1281
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1282
|
+
wasm.middennodeoptions_set_opfs_store_dir(this.__wbg_ptr, ptr0, len0);
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* @param {Uint8Array | null} [key]
|
|
1286
|
+
*/
|
|
1287
|
+
set secret_key(key) {
|
|
1288
|
+
wasm.middennodeoptions_set_secret_key(this.__wbg_ptr, isLikeNone(key) ? 0 : addToExternrefTable0(key));
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
if (Symbol.dispose) MiddenNodeOptions.prototype[Symbol.dispose] = MiddenNodeOptions.prototype.free;
|
|
1292
|
+
|
|
821
1293
|
/**
|
|
822
1294
|
* handle returned to JS for a tuned-in radio session. dropping the handle
|
|
823
1295
|
* (or calling `leave()`) closes the iroh connection, which tears down both
|
|
@@ -825,7 +1297,6 @@ if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.
|
|
|
825
1297
|
*/
|
|
826
1298
|
export class RadioHandle {
|
|
827
1299
|
static __wrap(ptr) {
|
|
828
|
-
ptr = ptr >>> 0;
|
|
829
1300
|
const obj = Object.create(RadioHandle.prototype);
|
|
830
1301
|
obj.__wbg_ptr = ptr;
|
|
831
1302
|
RadioHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -871,10 +1342,33 @@ export function hash_blake3(data) {
|
|
|
871
1342
|
}
|
|
872
1343
|
}
|
|
873
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* opfs store selftest — runs the full import/export round trip against
|
|
1347
|
+
* real OPFS through the real iroh-blobs api. worker context required
|
|
1348
|
+
* (sync access handles). wasm-only debug helper, used for manual
|
|
1349
|
+
* debugging from the blob worker, not from automated tests.
|
|
1350
|
+
* @returns {Promise<string>}
|
|
1351
|
+
*/
|
|
1352
|
+
export function opfs_store_selftest() {
|
|
1353
|
+
const ret = wasm.opfs_store_selftest();
|
|
1354
|
+
return ret;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* persistence selftest: blobs + tags survive a store shutdown/reopen over
|
|
1359
|
+
* the same OPFS directory. worker context required. wasm-only debug
|
|
1360
|
+
* helper, used for manual debugging from the blob worker.
|
|
1361
|
+
* @returns {Promise<string>}
|
|
1362
|
+
*/
|
|
1363
|
+
export function opfs_store_selftest_persistence() {
|
|
1364
|
+
const ret = wasm.opfs_store_selftest_persistence();
|
|
1365
|
+
return ret;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
874
1368
|
export function start() {
|
|
875
1369
|
wasm.start();
|
|
876
1370
|
}
|
|
877
|
-
export function
|
|
1371
|
+
export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
|
|
878
1372
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
879
1373
|
return ret;
|
|
880
1374
|
}
|
|
@@ -885,36 +1379,36 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
885
1379
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
886
1380
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
887
1381
|
}
|
|
888
|
-
export function
|
|
1382
|
+
export function __wbg___wbindgen_boolean_get_fa956cfa2d1bd751(arg0) {
|
|
889
1383
|
const v = arg0;
|
|
890
1384
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
891
1385
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
892
1386
|
}
|
|
893
|
-
export function
|
|
1387
|
+
export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
|
|
894
1388
|
const ret = debugString(arg1);
|
|
895
1389
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
896
1390
|
const len1 = WASM_VECTOR_LEN;
|
|
897
1391
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
898
1392
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
899
1393
|
}
|
|
900
|
-
export function
|
|
1394
|
+
export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
|
|
901
1395
|
const ret = typeof(arg0) === 'function';
|
|
902
1396
|
return ret;
|
|
903
1397
|
}
|
|
904
|
-
export function
|
|
1398
|
+
export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
|
|
905
1399
|
const val = arg0;
|
|
906
1400
|
const ret = typeof(val) === 'object' && val !== null;
|
|
907
1401
|
return ret;
|
|
908
1402
|
}
|
|
909
|
-
export function
|
|
1403
|
+
export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
|
|
910
1404
|
const ret = typeof(arg0) === 'string';
|
|
911
1405
|
return ret;
|
|
912
1406
|
}
|
|
913
|
-
export function
|
|
1407
|
+
export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
|
|
914
1408
|
const ret = arg0 === undefined;
|
|
915
1409
|
return ret;
|
|
916
1410
|
}
|
|
917
|
-
export function
|
|
1411
|
+
export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
|
|
918
1412
|
const obj = arg1;
|
|
919
1413
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
920
1414
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -922,25 +1416,25 @@ export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
|
|
|
922
1416
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
923
1417
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
924
1418
|
}
|
|
925
|
-
export function
|
|
1419
|
+
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
|
|
926
1420
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
927
1421
|
}
|
|
928
|
-
export function
|
|
1422
|
+
export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
|
|
929
1423
|
arg0._wbg_cb_unref();
|
|
930
1424
|
}
|
|
931
|
-
export function
|
|
1425
|
+
export function __wbg_abort_8bae0f33e7833997(arg0) {
|
|
932
1426
|
arg0.abort();
|
|
933
1427
|
}
|
|
934
|
-
export function
|
|
1428
|
+
export function __wbg_abort_eee9248a6d680839(arg0, arg1) {
|
|
935
1429
|
arg0.abort(arg1);
|
|
936
1430
|
}
|
|
937
|
-
export function
|
|
1431
|
+
export function __wbg_addEventListener_c33b246adf950d7c() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
938
1432
|
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
939
1433
|
}, arguments); }
|
|
940
|
-
export function
|
|
1434
|
+
export function __wbg_append_01c74e5c6b58aa64() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
941
1435
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
942
1436
|
}, arguments); }
|
|
943
|
-
export function
|
|
1437
|
+
export function __wbg_arrayBuffer_3b637f0fa65c5351() { return handleError(function (arg0) {
|
|
944
1438
|
const ret = arg0.arrayBuffer();
|
|
945
1439
|
return ret;
|
|
946
1440
|
}, arguments); }
|
|
@@ -948,75 +1442,86 @@ export function __wbg_bistream_new(arg0) {
|
|
|
948
1442
|
const ret = BiStream.__wrap(arg0);
|
|
949
1443
|
return ret;
|
|
950
1444
|
}
|
|
951
|
-
export function
|
|
1445
|
+
export function __wbg_body_18c9f2ac15ead4b2(arg0) {
|
|
952
1446
|
const ret = arg0.body;
|
|
953
1447
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
954
1448
|
}
|
|
955
|
-
export function
|
|
1449
|
+
export function __wbg_buffer_54b87055582c8a81(arg0) {
|
|
956
1450
|
const ret = arg0.buffer;
|
|
957
1451
|
return ret;
|
|
958
1452
|
}
|
|
959
|
-
export function
|
|
1453
|
+
export function __wbg_byobRequest_06b654bb15590436(arg0) {
|
|
960
1454
|
const ret = arg0.byobRequest;
|
|
961
1455
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
962
1456
|
}
|
|
963
|
-
export function
|
|
1457
|
+
export function __wbg_byteLength_41862ca4020b9c43(arg0) {
|
|
964
1458
|
const ret = arg0.byteLength;
|
|
965
1459
|
return ret;
|
|
966
1460
|
}
|
|
967
|
-
export function
|
|
1461
|
+
export function __wbg_byteOffset_d42e18c4441f628b(arg0) {
|
|
968
1462
|
const ret = arg0.byteOffset;
|
|
969
1463
|
return ret;
|
|
970
1464
|
}
|
|
971
|
-
export function
|
|
972
|
-
const ret = arg0.call(arg1, arg2);
|
|
1465
|
+
export function __wbg_call_44b7209e1e252e6a() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1466
|
+
const ret = arg0.call(arg1, arg2, arg3, arg4);
|
|
973
1467
|
return ret;
|
|
974
1468
|
}, arguments); }
|
|
975
|
-
export function
|
|
976
|
-
const ret = arg0.call(arg1
|
|
1469
|
+
export function __wbg_call_8a2dd23819f8a60a() { return handleError(function (arg0, arg1) {
|
|
1470
|
+
const ret = arg0.call(arg1);
|
|
977
1471
|
return ret;
|
|
978
1472
|
}, arguments); }
|
|
979
|
-
export function
|
|
980
|
-
const ret = arg0.call(arg1, arg2
|
|
1473
|
+
export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
|
|
1474
|
+
const ret = arg0.call(arg1, arg2);
|
|
1475
|
+
return ret;
|
|
1476
|
+
}, arguments); }
|
|
1477
|
+
export function __wbg_call_e3b662382210db98() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1478
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
981
1479
|
return ret;
|
|
982
1480
|
}, arguments); }
|
|
983
|
-
export function
|
|
1481
|
+
export function __wbg_cancel_3983a93e24cc66b3(arg0) {
|
|
984
1482
|
const ret = arg0.cancel();
|
|
985
1483
|
return ret;
|
|
986
1484
|
}
|
|
987
|
-
export function
|
|
1485
|
+
export function __wbg_catch_c1a60df4c30d76d3(arg0, arg1) {
|
|
988
1486
|
const ret = arg0.catch(arg1);
|
|
989
1487
|
return ret;
|
|
990
1488
|
}
|
|
991
|
-
export function
|
|
1489
|
+
export function __wbg_clearTimeout_333bba87532ab9d3(arg0) {
|
|
992
1490
|
const ret = clearTimeout(arg0);
|
|
993
1491
|
return ret;
|
|
994
1492
|
}
|
|
995
1493
|
export function __wbg_clearTimeout_47a40e3be01ed7a3() { return handleError(function (arg0, arg1) {
|
|
996
1494
|
arg0.clearTimeout(arg1);
|
|
997
1495
|
}, arguments); }
|
|
998
|
-
export function
|
|
1496
|
+
export function __wbg_close_249a23304523681b() { return handleError(function (arg0) {
|
|
999
1497
|
arg0.close();
|
|
1000
1498
|
}, arguments); }
|
|
1001
|
-
export function
|
|
1499
|
+
export function __wbg_close_72d318d9c16e83ef() { return handleError(function (arg0) {
|
|
1002
1500
|
arg0.close();
|
|
1003
1501
|
}, arguments); }
|
|
1004
|
-
export function
|
|
1502
|
+
export function __wbg_close_c65ca0257e895318() { return handleError(function (arg0) {
|
|
1005
1503
|
arg0.close();
|
|
1006
1504
|
}, arguments); }
|
|
1007
|
-
export function
|
|
1505
|
+
export function __wbg_close_d00f4cb641f9db10(arg0) {
|
|
1506
|
+
arg0.close();
|
|
1507
|
+
}
|
|
1508
|
+
export function __wbg_code_1fc52b4142a112ac(arg0) {
|
|
1008
1509
|
const ret = arg0.code;
|
|
1009
1510
|
return ret;
|
|
1010
1511
|
}
|
|
1011
|
-
export function
|
|
1512
|
+
export function __wbg_code_cb4327cfc515673b(arg0) {
|
|
1012
1513
|
const ret = arg0.code;
|
|
1013
1514
|
return ret;
|
|
1014
1515
|
}
|
|
1516
|
+
export function __wbg_createSyncAccessHandle_0caafebe31e4f2d9(arg0) {
|
|
1517
|
+
const ret = arg0.createSyncAccessHandle();
|
|
1518
|
+
return ret;
|
|
1519
|
+
}
|
|
1015
1520
|
export function __wbg_crypto_38df2bab126b63dc(arg0) {
|
|
1016
1521
|
const ret = arg0.crypto;
|
|
1017
1522
|
return ret;
|
|
1018
1523
|
}
|
|
1019
|
-
export function
|
|
1524
|
+
export function __wbg_data_328de4280640da92(arg0) {
|
|
1020
1525
|
const ret = arg0.data;
|
|
1021
1526
|
return ret;
|
|
1022
1527
|
}
|
|
@@ -1025,14 +1530,14 @@ export function __wbg_debug_eaef3b49d572d680(arg0, arg1) {
|
|
|
1025
1530
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1026
1531
|
console.debug(...v0);
|
|
1027
1532
|
}
|
|
1028
|
-
export function
|
|
1533
|
+
export function __wbg_done_89b2b13e91a60321(arg0) {
|
|
1029
1534
|
const ret = arg0.done;
|
|
1030
1535
|
return ret;
|
|
1031
1536
|
}
|
|
1032
|
-
export function
|
|
1537
|
+
export function __wbg_enqueue_6d83b4c6281bafd6() { return handleError(function (arg0, arg1) {
|
|
1033
1538
|
arg0.enqueue(arg1);
|
|
1034
1539
|
}, arguments); }
|
|
1035
|
-
export function
|
|
1540
|
+
export function __wbg_entries_900cefd6f70eb290(arg0) {
|
|
1036
1541
|
const ret = arg0.entries();
|
|
1037
1542
|
return ret;
|
|
1038
1543
|
}
|
|
@@ -1052,45 +1557,64 @@ export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
|
|
|
1052
1557
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1053
1558
|
}
|
|
1054
1559
|
}
|
|
1055
|
-
export function
|
|
1560
|
+
export function __wbg_fetch_074561c3e313c86f(arg0) {
|
|
1056
1561
|
const ret = fetch(arg0);
|
|
1057
1562
|
return ret;
|
|
1058
1563
|
}
|
|
1059
|
-
export function
|
|
1564
|
+
export function __wbg_fetch_b5951fc96f52f786(arg0, arg1) {
|
|
1060
1565
|
const ret = arg0.fetch(arg1);
|
|
1061
1566
|
return ret;
|
|
1062
1567
|
}
|
|
1063
|
-
export function
|
|
1064
|
-
|
|
1568
|
+
export function __wbg_flush_a4bd8d4e05ad23f6() { return handleError(function (arg0) {
|
|
1569
|
+
arg0.flush();
|
|
1065
1570
|
}, arguments); }
|
|
1571
|
+
export function __wbg_getDirectoryHandle_cf175faf1a75a384(arg0, arg1, arg2, arg3) {
|
|
1572
|
+
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
1573
|
+
return ret;
|
|
1574
|
+
}
|
|
1575
|
+
export function __wbg_getDirectory_389283588dfb8117(arg0) {
|
|
1576
|
+
const ret = arg0.getDirectory();
|
|
1577
|
+
return ret;
|
|
1578
|
+
}
|
|
1579
|
+
export function __wbg_getFileHandle_72de55ab3ca9ad57(arg0, arg1, arg2, arg3) {
|
|
1580
|
+
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
1581
|
+
return ret;
|
|
1582
|
+
}
|
|
1066
1583
|
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
1067
1584
|
arg0.getRandomValues(arg1);
|
|
1068
1585
|
}, arguments); }
|
|
1586
|
+
export function __wbg_getRandomValues_cc7f052a444bb2ce() { return handleError(function (arg0, arg1) {
|
|
1587
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1588
|
+
}, arguments); }
|
|
1069
1589
|
export function __wbg_getReader_9facd4f899beac89() { return handleError(function (arg0) {
|
|
1070
1590
|
const ret = arg0.getReader();
|
|
1071
1591
|
return ret;
|
|
1072
1592
|
}, arguments); }
|
|
1073
|
-
export function
|
|
1074
|
-
const ret =
|
|
1593
|
+
export function __wbg_getSize_29187e13478442fb() { return handleError(function (arg0) {
|
|
1594
|
+
const ret = arg0.getSize();
|
|
1075
1595
|
return ret;
|
|
1076
1596
|
}, arguments); }
|
|
1077
|
-
export function
|
|
1597
|
+
export function __wbg_get_507a50627bffa49b(arg0, arg1) {
|
|
1078
1598
|
const ret = arg0[arg1 >>> 0];
|
|
1079
1599
|
return ret;
|
|
1080
1600
|
}
|
|
1081
|
-
export function
|
|
1601
|
+
export function __wbg_get_78f252d074a84d0b() { return handleError(function (arg0, arg1) {
|
|
1602
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1603
|
+
return ret;
|
|
1604
|
+
}, arguments); }
|
|
1605
|
+
export function __wbg_get_done_670108eb06ecbe46(arg0) {
|
|
1082
1606
|
const ret = arg0.done;
|
|
1083
1607
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1084
1608
|
}
|
|
1085
|
-
export function
|
|
1609
|
+
export function __wbg_get_value_f465f5be30aa0963(arg0) {
|
|
1086
1610
|
const ret = arg0.value;
|
|
1087
1611
|
return ret;
|
|
1088
1612
|
}
|
|
1089
|
-
export function
|
|
1613
|
+
export function __wbg_has_8374cf06984d8bfc() { return handleError(function (arg0, arg1) {
|
|
1090
1614
|
const ret = Reflect.has(arg0, arg1);
|
|
1091
1615
|
return ret;
|
|
1092
1616
|
}, arguments); }
|
|
1093
|
-
export function
|
|
1617
|
+
export function __wbg_headers_cf9c80f30e2a4eff(arg0) {
|
|
1094
1618
|
const ret = arg0.headers;
|
|
1095
1619
|
return ret;
|
|
1096
1620
|
}
|
|
@@ -1098,7 +1622,7 @@ export function __wbg_helloimageresult_new(arg0) {
|
|
|
1098
1622
|
const ret = HelloImageResult.__wrap(arg0);
|
|
1099
1623
|
return ret;
|
|
1100
1624
|
}
|
|
1101
|
-
export function
|
|
1625
|
+
export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
|
|
1102
1626
|
let result;
|
|
1103
1627
|
try {
|
|
1104
1628
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1108,7 +1632,7 @@ export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
|
|
|
1108
1632
|
const ret = result;
|
|
1109
1633
|
return ret;
|
|
1110
1634
|
}
|
|
1111
|
-
export function
|
|
1635
|
+
export function __wbg_instanceof_Blob_c6523f92a32c8695(arg0) {
|
|
1112
1636
|
let result;
|
|
1113
1637
|
try {
|
|
1114
1638
|
result = arg0 instanceof Blob;
|
|
@@ -1118,7 +1642,37 @@ export function __wbg_instanceof_Blob_c91af000f11c2d0b(arg0) {
|
|
|
1118
1642
|
const ret = result;
|
|
1119
1643
|
return ret;
|
|
1120
1644
|
}
|
|
1121
|
-
export function
|
|
1645
|
+
export function __wbg_instanceof_FileSystemDirectoryHandle_c9ab7c5cdb7a7c30(arg0) {
|
|
1646
|
+
let result;
|
|
1647
|
+
try {
|
|
1648
|
+
result = arg0 instanceof FileSystemDirectoryHandle;
|
|
1649
|
+
} catch (_) {
|
|
1650
|
+
result = false;
|
|
1651
|
+
}
|
|
1652
|
+
const ret = result;
|
|
1653
|
+
return ret;
|
|
1654
|
+
}
|
|
1655
|
+
export function __wbg_instanceof_FileSystemFileHandle_68e80b30532d5f04(arg0) {
|
|
1656
|
+
let result;
|
|
1657
|
+
try {
|
|
1658
|
+
result = arg0 instanceof FileSystemFileHandle;
|
|
1659
|
+
} catch (_) {
|
|
1660
|
+
result = false;
|
|
1661
|
+
}
|
|
1662
|
+
const ret = result;
|
|
1663
|
+
return ret;
|
|
1664
|
+
}
|
|
1665
|
+
export function __wbg_instanceof_FileSystemSyncAccessHandle_db0b7504516129c1(arg0) {
|
|
1666
|
+
let result;
|
|
1667
|
+
try {
|
|
1668
|
+
result = arg0 instanceof FileSystemSyncAccessHandle;
|
|
1669
|
+
} catch (_) {
|
|
1670
|
+
result = false;
|
|
1671
|
+
}
|
|
1672
|
+
const ret = result;
|
|
1673
|
+
return ret;
|
|
1674
|
+
}
|
|
1675
|
+
export function __wbg_instanceof_Response_c8b64b2256f01bec(arg0) {
|
|
1122
1676
|
let result;
|
|
1123
1677
|
try {
|
|
1124
1678
|
result = arg0 instanceof Response;
|
|
@@ -1128,15 +1682,35 @@ export function __wbg_instanceof_Response_9b4d9fd451e051b1(arg0) {
|
|
|
1128
1682
|
const ret = result;
|
|
1129
1683
|
return ret;
|
|
1130
1684
|
}
|
|
1131
|
-
export function
|
|
1685
|
+
export function __wbg_instanceof_Window_05ba1ee4f6781663(arg0) {
|
|
1686
|
+
let result;
|
|
1687
|
+
try {
|
|
1688
|
+
result = arg0 instanceof Window;
|
|
1689
|
+
} catch (_) {
|
|
1690
|
+
result = false;
|
|
1691
|
+
}
|
|
1692
|
+
const ret = result;
|
|
1693
|
+
return ret;
|
|
1694
|
+
}
|
|
1695
|
+
export function __wbg_instanceof_WorkerGlobalScope_8ec07b5e040a41c3(arg0) {
|
|
1696
|
+
let result;
|
|
1697
|
+
try {
|
|
1698
|
+
result = arg0 instanceof WorkerGlobalScope;
|
|
1699
|
+
} catch (_) {
|
|
1700
|
+
result = false;
|
|
1701
|
+
}
|
|
1702
|
+
const ret = result;
|
|
1703
|
+
return ret;
|
|
1704
|
+
}
|
|
1705
|
+
export function __wbg_isArray_0677c962b281d01a(arg0) {
|
|
1132
1706
|
const ret = Array.isArray(arg0);
|
|
1133
1707
|
return ret;
|
|
1134
1708
|
}
|
|
1135
|
-
export function
|
|
1709
|
+
export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
|
|
1136
1710
|
const ret = arg0.length;
|
|
1137
1711
|
return ret;
|
|
1138
1712
|
}
|
|
1139
|
-
export function
|
|
1713
|
+
export function __wbg_length_370319915dc99107(arg0) {
|
|
1140
1714
|
const ret = arg0.length;
|
|
1141
1715
|
return ret;
|
|
1142
1716
|
}
|
|
@@ -1145,7 +1719,7 @@ export function __wbg_log_7a0760e115750083(arg0, arg1) {
|
|
|
1145
1719
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1146
1720
|
console.log(...v0);
|
|
1147
1721
|
}
|
|
1148
|
-
export function
|
|
1722
|
+
export function __wbg_message_fb0e6e7854e6ea7a(arg0, arg1) {
|
|
1149
1723
|
const ret = arg1.message;
|
|
1150
1724
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1151
1725
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1160,7 +1734,15 @@ export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
|
|
|
1160
1734
|
const ret = arg0.msCrypto;
|
|
1161
1735
|
return ret;
|
|
1162
1736
|
}
|
|
1163
|
-
export function
|
|
1737
|
+
export function __wbg_navigator_51379c10a84aeec9(arg0) {
|
|
1738
|
+
const ret = arg0.navigator;
|
|
1739
|
+
return ret;
|
|
1740
|
+
}
|
|
1741
|
+
export function __wbg_navigator_99621db14b3f1099(arg0) {
|
|
1742
|
+
const ret = arg0.navigator;
|
|
1743
|
+
return ret;
|
|
1744
|
+
}
|
|
1745
|
+
export function __wbg_new_0d809930cd1354c6() { return handleError(function () {
|
|
1164
1746
|
const ret = new Headers();
|
|
1165
1747
|
return ret;
|
|
1166
1748
|
}, arguments); }
|
|
@@ -1168,46 +1750,46 @@ export function __wbg_new_227d7c05414eb861() {
|
|
|
1168
1750
|
const ret = new Error();
|
|
1169
1751
|
return ret;
|
|
1170
1752
|
}
|
|
1171
|
-
export function
|
|
1172
|
-
const ret = new Map();
|
|
1173
|
-
return ret;
|
|
1174
|
-
}
|
|
1175
|
-
export function __wbg_new_5f486cdf45a04d78(arg0) {
|
|
1176
|
-
const ret = new Uint8Array(arg0);
|
|
1177
|
-
return ret;
|
|
1178
|
-
}
|
|
1179
|
-
export function __wbg_new_a70fbab9066b301f() {
|
|
1753
|
+
export function __wbg_new_32b398fb48b6d94a() {
|
|
1180
1754
|
const ret = new Array();
|
|
1181
1755
|
return ret;
|
|
1182
1756
|
}
|
|
1183
|
-
export function
|
|
1184
|
-
const ret = new Object();
|
|
1185
|
-
return ret;
|
|
1186
|
-
}
|
|
1187
|
-
export function __wbg_new_c518c60af666645b() { return handleError(function () {
|
|
1757
|
+
export function __wbg_new_4339b2a2675a03e3() { return handleError(function () {
|
|
1188
1758
|
const ret = new AbortController();
|
|
1189
1759
|
return ret;
|
|
1190
1760
|
}, arguments); }
|
|
1191
|
-
export function
|
|
1761
|
+
export function __wbg_new_7796ffc7ed656783() {
|
|
1762
|
+
const ret = new Map();
|
|
1763
|
+
return ret;
|
|
1764
|
+
}
|
|
1765
|
+
export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
|
|
1192
1766
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1193
1767
|
return ret;
|
|
1194
1768
|
}
|
|
1195
|
-
export function
|
|
1769
|
+
export function __wbg_new_bf8729ffe10e9ee7() { return handleError(function (arg0, arg1) {
|
|
1196
1770
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
1197
1771
|
return ret;
|
|
1198
1772
|
}, arguments); }
|
|
1199
|
-
export function
|
|
1773
|
+
export function __wbg_new_cd45aabdf6073e84(arg0) {
|
|
1774
|
+
const ret = new Uint8Array(arg0);
|
|
1775
|
+
return ret;
|
|
1776
|
+
}
|
|
1777
|
+
export function __wbg_new_da52cf8fe3429cb2() {
|
|
1778
|
+
const ret = new Object();
|
|
1779
|
+
return ret;
|
|
1780
|
+
}
|
|
1781
|
+
export function __wbg_new_from_slice_77cdfb7977362f3c(arg0, arg1) {
|
|
1200
1782
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1201
1783
|
return ret;
|
|
1202
1784
|
}
|
|
1203
|
-
export function
|
|
1785
|
+
export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
|
|
1204
1786
|
try {
|
|
1205
1787
|
var state0 = {a: arg0, b: arg1};
|
|
1206
1788
|
var cb0 = (arg0, arg1) => {
|
|
1207
1789
|
const a = state0.a;
|
|
1208
1790
|
state0.a = 0;
|
|
1209
1791
|
try {
|
|
1210
|
-
return
|
|
1792
|
+
return wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1211
1793
|
} finally {
|
|
1212
1794
|
state0.a = a;
|
|
1213
1795
|
}
|
|
@@ -1215,26 +1797,26 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
|
|
|
1215
1797
|
const ret = new Promise(cb0);
|
|
1216
1798
|
return ret;
|
|
1217
1799
|
} finally {
|
|
1218
|
-
state0.a =
|
|
1800
|
+
state0.a = 0;
|
|
1219
1801
|
}
|
|
1220
1802
|
}
|
|
1221
|
-
export function
|
|
1803
|
+
export function __wbg_new_with_byte_offset_and_length_54c7724ee3ec7d82(arg0, arg1, arg2) {
|
|
1222
1804
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1223
1805
|
return ret;
|
|
1224
1806
|
}
|
|
1225
|
-
export function
|
|
1807
|
+
export function __wbg_new_with_length_e6785c33c8e4cce8(arg0) {
|
|
1226
1808
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1227
1809
|
return ret;
|
|
1228
1810
|
}
|
|
1229
|
-
export function
|
|
1811
|
+
export function __wbg_new_with_str_and_init_d95cbe11ce28e65e() { return handleError(function (arg0, arg1, arg2) {
|
|
1230
1812
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1231
1813
|
return ret;
|
|
1232
1814
|
}, arguments); }
|
|
1233
|
-
export function
|
|
1815
|
+
export function __wbg_new_with_str_sequence_2de2f569c29910ad() { return handleError(function (arg0, arg1, arg2) {
|
|
1234
1816
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
1235
1817
|
return ret;
|
|
1236
1818
|
}, arguments); }
|
|
1237
|
-
export function
|
|
1819
|
+
export function __wbg_next_71f2aa1cb3d1e37e() { return handleError(function (arg0) {
|
|
1238
1820
|
const ret = arg0.next();
|
|
1239
1821
|
return ret;
|
|
1240
1822
|
}, arguments); }
|
|
@@ -1242,7 +1824,7 @@ export function __wbg_node_84ea875411254db1(arg0) {
|
|
|
1242
1824
|
const ret = arg0.node;
|
|
1243
1825
|
return ret;
|
|
1244
1826
|
}
|
|
1245
|
-
export function
|
|
1827
|
+
export function __wbg_now_86c0d4ba3fa605b8() {
|
|
1246
1828
|
const ret = Date.now();
|
|
1247
1829
|
return ret;
|
|
1248
1830
|
}
|
|
@@ -1258,25 +1840,25 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
|
1258
1840
|
const ret = arg0.process;
|
|
1259
1841
|
return ret;
|
|
1260
1842
|
}
|
|
1261
|
-
export function
|
|
1843
|
+
export function __wbg_protocol_14b3b1c4bf71cd4a(arg0, arg1) {
|
|
1262
1844
|
const ret = arg1.protocol;
|
|
1263
1845
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1264
1846
|
const len1 = WASM_VECTOR_LEN;
|
|
1265
1847
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1266
1848
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1267
1849
|
}
|
|
1268
|
-
export function
|
|
1850
|
+
export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
|
|
1269
1851
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1270
1852
|
}
|
|
1271
|
-
export function
|
|
1853
|
+
export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
|
|
1272
1854
|
const ret = arg0.push(arg1);
|
|
1273
1855
|
return ret;
|
|
1274
1856
|
}
|
|
1275
|
-
export function
|
|
1857
|
+
export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
|
|
1276
1858
|
const ret = arg0.queueMicrotask;
|
|
1277
1859
|
return ret;
|
|
1278
1860
|
}
|
|
1279
|
-
export function
|
|
1861
|
+
export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
|
|
1280
1862
|
queueMicrotask(arg0);
|
|
1281
1863
|
}
|
|
1282
1864
|
export function __wbg_radiohandle_new(arg0) {
|
|
@@ -1286,109 +1868,130 @@ export function __wbg_radiohandle_new(arg0) {
|
|
|
1286
1868
|
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
1287
1869
|
arg0.randomFillSync(arg1);
|
|
1288
1870
|
}, arguments); }
|
|
1289
|
-
export function
|
|
1871
|
+
export function __wbg_random_039a7d5d06e0d333() {
|
|
1872
|
+
const ret = Math.random();
|
|
1873
|
+
return ret;
|
|
1874
|
+
}
|
|
1875
|
+
export function __wbg_read_27d98fb08886b1fc() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1876
|
+
const ret = arg0.read(getArrayU8FromWasm0(arg1, arg2), arg3);
|
|
1877
|
+
return ret;
|
|
1878
|
+
}, arguments); }
|
|
1879
|
+
export function __wbg_read_8afa15f12a160ef8(arg0) {
|
|
1290
1880
|
const ret = arg0.read();
|
|
1291
1881
|
return ret;
|
|
1292
1882
|
}
|
|
1293
|
-
export function
|
|
1883
|
+
export function __wbg_readyState_50bc38c2a9e83db6(arg0) {
|
|
1294
1884
|
const ret = arg0.readyState;
|
|
1295
1885
|
return ret;
|
|
1296
1886
|
}
|
|
1297
|
-
export function
|
|
1887
|
+
export function __wbg_reason_5dc8e429d537d6a9(arg0, arg1) {
|
|
1298
1888
|
const ret = arg1.reason;
|
|
1299
1889
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1300
1890
|
const len1 = WASM_VECTOR_LEN;
|
|
1301
1891
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1302
1892
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1303
1893
|
}
|
|
1304
|
-
export function
|
|
1894
|
+
export function __wbg_releaseLock_5b92874cad775644(arg0) {
|
|
1305
1895
|
arg0.releaseLock();
|
|
1306
1896
|
}
|
|
1307
|
-
export function
|
|
1897
|
+
export function __wbg_removeEntry_e38219fa4a98cfb3(arg0, arg1, arg2) {
|
|
1898
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
1899
|
+
return ret;
|
|
1900
|
+
}
|
|
1901
|
+
export function __wbg_removeEventListener_eb8291c80ca9056d() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1308
1902
|
arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
1309
1903
|
}, arguments); }
|
|
1310
1904
|
export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
|
|
1311
1905
|
const ret = module.require;
|
|
1312
1906
|
return ret;
|
|
1313
1907
|
}, arguments); }
|
|
1314
|
-
export function
|
|
1908
|
+
export function __wbg_resolve_2191a4dfe481c25b(arg0) {
|
|
1315
1909
|
const ret = Promise.resolve(arg0);
|
|
1316
1910
|
return ret;
|
|
1317
1911
|
}
|
|
1318
|
-
export function
|
|
1912
|
+
export function __wbg_respond_510e32df8aeb6817() { return handleError(function (arg0, arg1) {
|
|
1319
1913
|
arg0.respond(arg1 >>> 0);
|
|
1320
1914
|
}, arguments); }
|
|
1321
|
-
export function
|
|
1322
|
-
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
1323
|
-
}, arguments); }
|
|
1324
|
-
export function __wbg_send_d31a693c975dea74() { return handleError(function (arg0, arg1, arg2) {
|
|
1915
|
+
export function __wbg_send_a321b376d40ec867() { return handleError(function (arg0, arg1, arg2) {
|
|
1325
1916
|
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
1326
1917
|
}, arguments); }
|
|
1918
|
+
export function __wbg_send_df98dd5ede9b3f4d() { return handleError(function (arg0, arg1, arg2) {
|
|
1919
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
1920
|
+
}, arguments); }
|
|
1921
|
+
export function __wbg_setTimeout_3a808dd861dd3c12(arg0, arg1) {
|
|
1922
|
+
const ret = setTimeout(arg0, arg1);
|
|
1923
|
+
return ret;
|
|
1924
|
+
}
|
|
1327
1925
|
export function __wbg_setTimeout_6613a51400c1bf9f() { return handleError(function (arg0, arg1, arg2) {
|
|
1328
1926
|
const ret = arg0.setTimeout(arg1, arg2);
|
|
1329
1927
|
return ret;
|
|
1330
1928
|
}, arguments); }
|
|
1331
|
-
export function
|
|
1332
|
-
|
|
1333
|
-
return ret;
|
|
1929
|
+
export function __wbg_set_4d7dd76f3dae2926(arg0, arg1, arg2) {
|
|
1930
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1334
1931
|
}
|
|
1335
|
-
export function
|
|
1336
|
-
|
|
1932
|
+
export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
|
|
1933
|
+
const ret = arg0.set(arg1, arg2);
|
|
1934
|
+
return ret;
|
|
1337
1935
|
}
|
|
1338
1936
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1339
1937
|
arg0[arg1] = arg2;
|
|
1340
1938
|
}
|
|
1341
|
-
export function
|
|
1939
|
+
export function __wbg_set_8535240470bf2500() { return handleError(function (arg0, arg1, arg2) {
|
|
1342
1940
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1343
1941
|
return ret;
|
|
1344
1942
|
}, arguments); }
|
|
1345
|
-
export function
|
|
1346
|
-
arg0
|
|
1943
|
+
export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
|
|
1944
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1347
1945
|
}
|
|
1348
|
-
export function
|
|
1349
|
-
|
|
1350
|
-
return ret;
|
|
1946
|
+
export function __wbg_set_at_674f6538cd77adef(arg0, arg1) {
|
|
1947
|
+
arg0.at = arg1;
|
|
1351
1948
|
}
|
|
1352
|
-
export function
|
|
1949
|
+
export function __wbg_set_binaryType_a37b086c78ca7c29(arg0, arg1) {
|
|
1353
1950
|
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
1354
1951
|
}
|
|
1355
|
-
export function
|
|
1952
|
+
export function __wbg_set_body_029f2d171e0a005f(arg0, arg1) {
|
|
1356
1953
|
arg0.body = arg1;
|
|
1357
1954
|
}
|
|
1358
|
-
export function
|
|
1955
|
+
export function __wbg_set_cache_b4a740b195c051f4(arg0, arg1) {
|
|
1359
1956
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1360
1957
|
}
|
|
1361
|
-
export function
|
|
1958
|
+
export function __wbg_set_create_a807a6e9ac628698(arg0, arg1) {
|
|
1959
|
+
arg0.create = arg1 !== 0;
|
|
1960
|
+
}
|
|
1961
|
+
export function __wbg_set_create_fa1dfa475fac91e9(arg0, arg1) {
|
|
1962
|
+
arg0.create = arg1 !== 0;
|
|
1963
|
+
}
|
|
1964
|
+
export function __wbg_set_credentials_bb34a40189e3b43b(arg0, arg1) {
|
|
1362
1965
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1363
1966
|
}
|
|
1364
|
-
export function
|
|
1967
|
+
export function __wbg_set_handle_event_dd6bc370a8cb4486(arg0, arg1) {
|
|
1365
1968
|
arg0.handleEvent = arg1;
|
|
1366
1969
|
}
|
|
1367
|
-
export function
|
|
1970
|
+
export function __wbg_set_headers_9c61d123c3ee1f10(arg0, arg1) {
|
|
1368
1971
|
arg0.headers = arg1;
|
|
1369
1972
|
}
|
|
1370
|
-
export function
|
|
1973
|
+
export function __wbg_set_method_5532d59b92d76467(arg0, arg1, arg2) {
|
|
1371
1974
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1372
1975
|
}
|
|
1373
|
-
export function
|
|
1976
|
+
export function __wbg_set_mode_66c79886ad78fc05(arg0, arg1) {
|
|
1374
1977
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1375
1978
|
}
|
|
1376
|
-
export function
|
|
1979
|
+
export function __wbg_set_onclose_f706475385ecce07(arg0, arg1) {
|
|
1377
1980
|
arg0.onclose = arg1;
|
|
1378
1981
|
}
|
|
1379
|
-
export function
|
|
1982
|
+
export function __wbg_set_onerror_9f5773fd31512333(arg0, arg1) {
|
|
1380
1983
|
arg0.onerror = arg1;
|
|
1381
1984
|
}
|
|
1382
|
-
export function
|
|
1985
|
+
export function __wbg_set_onmessage_836d2f72130b4706(arg0, arg1) {
|
|
1383
1986
|
arg0.onmessage = arg1;
|
|
1384
1987
|
}
|
|
1385
|
-
export function
|
|
1988
|
+
export function __wbg_set_onopen_4f65470ae522a61a(arg0, arg1) {
|
|
1386
1989
|
arg0.onopen = arg1;
|
|
1387
1990
|
}
|
|
1388
|
-
export function
|
|
1991
|
+
export function __wbg_set_signal_c4ef8faddb4c1446(arg0, arg1) {
|
|
1389
1992
|
arg0.signal = arg1;
|
|
1390
1993
|
}
|
|
1391
|
-
export function
|
|
1994
|
+
export function __wbg_signal_dad7cb35193abd31(arg0) {
|
|
1392
1995
|
const ret = arg0.signal;
|
|
1393
1996
|
return ret;
|
|
1394
1997
|
}
|
|
@@ -1399,53 +2002,64 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
|
|
|
1399
2002
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1400
2003
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1401
2004
|
}
|
|
1402
|
-
export function
|
|
2005
|
+
export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
|
|
1403
2006
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1404
2007
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1405
2008
|
}
|
|
1406
|
-
export function
|
|
2009
|
+
export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
|
|
1407
2010
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1408
2011
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1409
2012
|
}
|
|
1410
|
-
export function
|
|
2013
|
+
export function __wbg_static_accessor_SELF_146583524fe1469b() {
|
|
1411
2014
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1412
2015
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1413
2016
|
}
|
|
1414
|
-
export function
|
|
2017
|
+
export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
|
|
1415
2018
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1416
2019
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1417
2020
|
}
|
|
1418
|
-
export function
|
|
2021
|
+
export function __wbg_status_c45b3b9b3033184a(arg0) {
|
|
1419
2022
|
const ret = arg0.status;
|
|
1420
2023
|
return ret;
|
|
1421
2024
|
}
|
|
1422
|
-
export function
|
|
1423
|
-
const ret = arg0.
|
|
2025
|
+
export function __wbg_storage_3c893ad40b9e831e(arg0) {
|
|
2026
|
+
const ret = arg0.storage;
|
|
1424
2027
|
return ret;
|
|
1425
2028
|
}
|
|
1426
|
-
export function
|
|
1427
|
-
const ret = arg0.
|
|
2029
|
+
export function __wbg_storage_756400487605531a(arg0) {
|
|
2030
|
+
const ret = arg0.storage;
|
|
2031
|
+
return ret;
|
|
2032
|
+
}
|
|
2033
|
+
export function __wbg_subarray_3ed232c8a6baee09(arg0, arg1, arg2) {
|
|
2034
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1428
2035
|
return ret;
|
|
1429
2036
|
}
|
|
1430
|
-
export function
|
|
2037
|
+
export function __wbg_then_16d107c451e9905d(arg0, arg1, arg2) {
|
|
1431
2038
|
const ret = arg0.then(arg1, arg2);
|
|
1432
2039
|
return ret;
|
|
1433
2040
|
}
|
|
1434
|
-
export function
|
|
2041
|
+
export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
|
|
2042
|
+
const ret = arg0.then(arg1);
|
|
2043
|
+
return ret;
|
|
2044
|
+
}
|
|
2045
|
+
export function __wbg_truncate_98a6032d23095328() { return handleError(function (arg0, arg1) {
|
|
2046
|
+
arg0.truncate(arg1);
|
|
2047
|
+
}, arguments); }
|
|
2048
|
+
export function __wbg_url_a410c0bec2fb1b2c(arg0, arg1) {
|
|
1435
2049
|
const ret = arg1.url;
|
|
1436
2050
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1437
2051
|
const len1 = WASM_VECTOR_LEN;
|
|
1438
2052
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1439
2053
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1440
2054
|
}
|
|
1441
|
-
export function
|
|
2055
|
+
export function __wbg_url_abdb8fb08377f8c0(arg0, arg1) {
|
|
1442
2056
|
const ret = arg1.url;
|
|
1443
2057
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1444
2058
|
const len1 = WASM_VECTOR_LEN;
|
|
1445
2059
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1446
2060
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1447
2061
|
}
|
|
1448
|
-
export function
|
|
2062
|
+
export function __wbg_value_a5d5488a9589444a(arg0) {
|
|
1449
2063
|
const ret = arg0.value;
|
|
1450
2064
|
return ret;
|
|
1451
2065
|
}
|
|
@@ -1453,7 +2067,7 @@ export function __wbg_versions_276b2795b1c6a219(arg0) {
|
|
|
1453
2067
|
const ret = arg0.versions;
|
|
1454
2068
|
return ret;
|
|
1455
2069
|
}
|
|
1456
|
-
export function
|
|
2070
|
+
export function __wbg_view_21f1d4a4f175dfa9(arg0) {
|
|
1457
2071
|
const ret = arg0.view;
|
|
1458
2072
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1459
2073
|
}
|
|
@@ -1462,71 +2076,70 @@ export function __wbg_warn_3a37cdd7216f1479(arg0, arg1) {
|
|
|
1462
2076
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1463
2077
|
console.warn(...v0);
|
|
1464
2078
|
}
|
|
1465
|
-
export function
|
|
2079
|
+
export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
|
|
1466
2080
|
const ret = arg0.wasClean;
|
|
1467
2081
|
return ret;
|
|
1468
2082
|
}
|
|
2083
|
+
export function __wbg_write_e557b5312ec23477() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2084
|
+
const ret = arg0.write(getArrayU8FromWasm0(arg1, arg2), arg3);
|
|
2085
|
+
return ret;
|
|
2086
|
+
}, arguments); }
|
|
1469
2087
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1470
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1471
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2088
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3530, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2089
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_);
|
|
1472
2090
|
return ret;
|
|
1473
2091
|
}
|
|
1474
2092
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1475
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1476
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2093
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5576, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2094
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_);
|
|
1477
2095
|
return ret;
|
|
1478
2096
|
}
|
|
1479
2097
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1480
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1481
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2098
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2808, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2099
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_);
|
|
1482
2100
|
return ret;
|
|
1483
2101
|
}
|
|
1484
2102
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1485
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1486
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2103
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4161, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2104
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_);
|
|
1487
2105
|
return ret;
|
|
1488
2106
|
}
|
|
1489
2107
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1490
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1491
|
-
const ret =
|
|
2108
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3449, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2109
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_);
|
|
1492
2110
|
return ret;
|
|
1493
2111
|
}
|
|
1494
2112
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
1495
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1496
|
-
const ret =
|
|
2113
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3703, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2114
|
+
const ret = makeClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_);
|
|
1497
2115
|
return ret;
|
|
1498
2116
|
}
|
|
1499
2117
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1500
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1501
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2118
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2119
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_);
|
|
1502
2120
|
return ret;
|
|
1503
2121
|
}
|
|
1504
|
-
export function __wbindgen_cast_0000000000000008(arg0
|
|
1505
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 5083, function: Function { arguments: [Externref], shim_idx: 5084, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1506
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb75a498ac0db6fe5, wasm_bindgen__convert__closures_____invoke__h190e8892b208884b);
|
|
1507
|
-
return ret;
|
|
1508
|
-
}
|
|
1509
|
-
export function __wbindgen_cast_0000000000000009(arg0) {
|
|
2122
|
+
export function __wbindgen_cast_0000000000000008(arg0) {
|
|
1510
2123
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1511
2124
|
const ret = arg0;
|
|
1512
2125
|
return ret;
|
|
1513
2126
|
}
|
|
1514
|
-
export function
|
|
2127
|
+
export function __wbindgen_cast_0000000000000009(arg0) {
|
|
1515
2128
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1516
2129
|
const ret = arg0;
|
|
1517
2130
|
return ret;
|
|
1518
2131
|
}
|
|
1519
|
-
export function
|
|
2132
|
+
export function __wbindgen_cast_000000000000000a(arg0, arg1) {
|
|
1520
2133
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1521
2134
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1522
2135
|
return ret;
|
|
1523
2136
|
}
|
|
1524
|
-
export function
|
|
2137
|
+
export function __wbindgen_cast_000000000000000b(arg0, arg1) {
|
|
1525
2138
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1526
2139
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1527
2140
|
return ret;
|
|
1528
2141
|
}
|
|
1529
|
-
export function
|
|
2142
|
+
export function __wbindgen_cast_000000000000000c(arg0) {
|
|
1530
2143
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1531
2144
|
const ret = BigInt.asUintN(64, arg0);
|
|
1532
2145
|
return ret;
|
|
@@ -1540,43 +2153,39 @@ export function __wbindgen_init_externref_table() {
|
|
|
1540
2153
|
table.set(offset + 2, true);
|
|
1541
2154
|
table.set(offset + 3, false);
|
|
1542
2155
|
}
|
|
1543
|
-
function
|
|
1544
|
-
wasm.
|
|
2156
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
2157
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1545
2158
|
}
|
|
1546
2159
|
|
|
1547
|
-
function
|
|
1548
|
-
wasm.
|
|
2160
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1) {
|
|
2161
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1);
|
|
1549
2162
|
}
|
|
1550
2163
|
|
|
1551
|
-
function
|
|
1552
|
-
wasm.
|
|
2164
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1) {
|
|
2165
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1);
|
|
1553
2166
|
}
|
|
1554
2167
|
|
|
1555
|
-
function
|
|
1556
|
-
wasm.
|
|
2168
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2) {
|
|
2169
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2);
|
|
1557
2170
|
}
|
|
1558
2171
|
|
|
1559
|
-
function
|
|
1560
|
-
wasm.
|
|
2172
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
|
|
2173
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
|
|
1561
2174
|
}
|
|
1562
2175
|
|
|
1563
|
-
function
|
|
1564
|
-
wasm.
|
|
2176
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2) {
|
|
2177
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2);
|
|
1565
2178
|
}
|
|
1566
2179
|
|
|
1567
|
-
function
|
|
1568
|
-
wasm.
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
function wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2) {
|
|
1572
|
-
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2);
|
|
2180
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2) {
|
|
2181
|
+
const ret = wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2);
|
|
1573
2182
|
if (ret[1]) {
|
|
1574
2183
|
throw takeFromExternrefTable0(ret[0]);
|
|
1575
2184
|
}
|
|
1576
2185
|
}
|
|
1577
2186
|
|
|
1578
|
-
function
|
|
1579
|
-
wasm.
|
|
2187
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
2188
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1580
2189
|
}
|
|
1581
2190
|
|
|
1582
2191
|
|
|
@@ -1595,25 +2204,37 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1595
2204
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1596
2205
|
const BiStreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1597
2206
|
? { register: () => {}, unregister: () => {} }
|
|
1598
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr
|
|
2207
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr, 1));
|
|
2208
|
+
const Blake3HasherFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2209
|
+
? { register: () => {}, unregister: () => {} }
|
|
2210
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_blake3hasher_free(ptr, 1));
|
|
2211
|
+
const CancelTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2212
|
+
? { register: () => {}, unregister: () => {} }
|
|
2213
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_canceltoken_free(ptr, 1));
|
|
1599
2214
|
const HelloImageResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1600
2215
|
? { register: () => {}, unregister: () => {} }
|
|
1601
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr
|
|
2216
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr, 1));
|
|
2217
|
+
const ImportSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2218
|
+
? { register: () => {}, unregister: () => {} }
|
|
2219
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_importsession_free(ptr, 1));
|
|
1602
2220
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1603
2221
|
? { register: () => {}, unregister: () => {} }
|
|
1604
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr
|
|
2222
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
|
|
1605
2223
|
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1606
2224
|
? { register: () => {}, unregister: () => {} }
|
|
1607
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr
|
|
2225
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
|
|
1608
2226
|
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1609
2227
|
? { register: () => {}, unregister: () => {} }
|
|
1610
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr
|
|
2228
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
|
|
1611
2229
|
const MiddenNodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1612
2230
|
? { register: () => {}, unregister: () => {} }
|
|
1613
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr
|
|
2231
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr, 1));
|
|
2232
|
+
const MiddenNodeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2233
|
+
? { register: () => {}, unregister: () => {} }
|
|
2234
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_middennodeoptions_free(ptr, 1));
|
|
1614
2235
|
const RadioHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1615
2236
|
? { register: () => {}, unregister: () => {} }
|
|
1616
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr
|
|
2237
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr, 1));
|
|
1617
2238
|
|
|
1618
2239
|
function addToExternrefTable0(obj) {
|
|
1619
2240
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1621,9 +2242,15 @@ function addToExternrefTable0(obj) {
|
|
|
1621
2242
|
return idx;
|
|
1622
2243
|
}
|
|
1623
2244
|
|
|
2245
|
+
function _assertClass(instance, klass) {
|
|
2246
|
+
if (!(instance instanceof klass)) {
|
|
2247
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
|
|
1624
2251
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1625
2252
|
? { register: () => {}, unregister: () => {} }
|
|
1626
|
-
: new FinalizationRegistry(state =>
|
|
2253
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
1627
2254
|
|
|
1628
2255
|
function debugString(val) {
|
|
1629
2256
|
// primitive types
|
|
@@ -1715,8 +2342,7 @@ function getDataViewMemory0() {
|
|
|
1715
2342
|
}
|
|
1716
2343
|
|
|
1717
2344
|
function getStringFromWasm0(ptr, len) {
|
|
1718
|
-
|
|
1719
|
-
return decodeText(ptr, len);
|
|
2345
|
+
return decodeText(ptr >>> 0, len);
|
|
1720
2346
|
}
|
|
1721
2347
|
|
|
1722
2348
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -1740,8 +2366,8 @@ function isLikeNone(x) {
|
|
|
1740
2366
|
return x === undefined || x === null;
|
|
1741
2367
|
}
|
|
1742
2368
|
|
|
1743
|
-
function makeClosure(arg0, arg1,
|
|
1744
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
2369
|
+
function makeClosure(arg0, arg1, f) {
|
|
2370
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1745
2371
|
const real = (...args) => {
|
|
1746
2372
|
|
|
1747
2373
|
// First up with a closure we increment the internal reference
|
|
@@ -1756,7 +2382,7 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
1756
2382
|
};
|
|
1757
2383
|
real._wbg_cb_unref = () => {
|
|
1758
2384
|
if (--state.cnt === 0) {
|
|
1759
|
-
|
|
2385
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1760
2386
|
state.a = 0;
|
|
1761
2387
|
CLOSURE_DTORS.unregister(state);
|
|
1762
2388
|
}
|
|
@@ -1765,8 +2391,8 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
1765
2391
|
return real;
|
|
1766
2392
|
}
|
|
1767
2393
|
|
|
1768
|
-
function makeMutClosure(arg0, arg1,
|
|
1769
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
2394
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2395
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1770
2396
|
const real = (...args) => {
|
|
1771
2397
|
|
|
1772
2398
|
// First up with a closure we increment the internal reference
|
|
@@ -1784,7 +2410,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
1784
2410
|
};
|
|
1785
2411
|
real._wbg_cb_unref = () => {
|
|
1786
2412
|
if (--state.cnt === 0) {
|
|
1787
|
-
|
|
2413
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1788
2414
|
state.a = 0;
|
|
1789
2415
|
CLOSURE_DTORS.unregister(state);
|
|
1790
2416
|
}
|
|
@@ -1800,6 +2426,16 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
1800
2426
|
return ptr;
|
|
1801
2427
|
}
|
|
1802
2428
|
|
|
2429
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2430
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2431
|
+
for (let i = 0; i < array.length; i++) {
|
|
2432
|
+
const add = addToExternrefTable0(array[i]);
|
|
2433
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
2434
|
+
}
|
|
2435
|
+
WASM_VECTOR_LEN = array.length;
|
|
2436
|
+
return ptr;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
1803
2439
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1804
2440
|
if (realloc === undefined) {
|
|
1805
2441
|
const buf = cachedTextEncoder.encode(arg);
|