lumina-node-wasm 0.4.0 → 0.5.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.
@@ -1,2430 +1,7 @@
1
- let wasm;
2
1
 
3
- const heap = new Array(128).fill(undefined);
2
+ import * as wasm from "./lumina_node_wasm_bg.wasm";
3
+ import { __wbg_set_wasm } from "./lumina_node_wasm_bg.js";
4
+ __wbg_set_wasm(wasm);
5
+ export * from "./lumina_node_wasm_bg.js";
4
6
 
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let heap_next = heap.length;
10
-
11
- function dropObject(idx) {
12
- if (idx < 132) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
24
-
25
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
26
-
27
- let cachedUint8ArrayMemory0 = null;
28
-
29
- function getUint8ArrayMemory0() {
30
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
31
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
32
- }
33
- return cachedUint8ArrayMemory0;
34
- }
35
-
36
- function getStringFromWasm0(ptr, len) {
37
- ptr = ptr >>> 0;
38
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
39
- }
40
-
41
- function addHeapObject(obj) {
42
- if (heap_next === heap.length) heap.push(heap.length + 1);
43
- const idx = heap_next;
44
- heap_next = heap[idx];
45
-
46
- heap[idx] = obj;
47
- return idx;
48
- }
49
-
50
- let WASM_VECTOR_LEN = 0;
51
-
52
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
53
-
54
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
55
- ? function (arg, view) {
56
- return cachedTextEncoder.encodeInto(arg, view);
57
- }
58
- : function (arg, view) {
59
- const buf = cachedTextEncoder.encode(arg);
60
- view.set(buf);
61
- return {
62
- read: arg.length,
63
- written: buf.length
64
- };
65
- });
66
-
67
- function passStringToWasm0(arg, malloc, realloc) {
68
-
69
- if (realloc === undefined) {
70
- const buf = cachedTextEncoder.encode(arg);
71
- const ptr = malloc(buf.length, 1) >>> 0;
72
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
73
- WASM_VECTOR_LEN = buf.length;
74
- return ptr;
75
- }
76
-
77
- let len = arg.length;
78
- let ptr = malloc(len, 1) >>> 0;
79
-
80
- const mem = getUint8ArrayMemory0();
81
-
82
- let offset = 0;
83
-
84
- for (; offset < len; offset++) {
85
- const code = arg.charCodeAt(offset);
86
- if (code > 0x7F) break;
87
- mem[ptr + offset] = code;
88
- }
89
-
90
- if (offset !== len) {
91
- if (offset !== 0) {
92
- arg = arg.slice(offset);
93
- }
94
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
95
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
96
- const ret = encodeString(arg, view);
97
-
98
- offset += ret.written;
99
- ptr = realloc(ptr, len, offset, 1) >>> 0;
100
- }
101
-
102
- WASM_VECTOR_LEN = offset;
103
- return ptr;
104
- }
105
-
106
- function isLikeNone(x) {
107
- return x === undefined || x === null;
108
- }
109
-
110
- let cachedDataViewMemory0 = null;
111
-
112
- function getDataViewMemory0() {
113
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
114
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
115
- }
116
- return cachedDataViewMemory0;
117
- }
118
-
119
- function debugString(val) {
120
- // primitive types
121
- const type = typeof val;
122
- if (type == 'number' || type == 'boolean' || val == null) {
123
- return `${val}`;
124
- }
125
- if (type == 'string') {
126
- return `"${val}"`;
127
- }
128
- if (type == 'symbol') {
129
- const description = val.description;
130
- if (description == null) {
131
- return 'Symbol';
132
- } else {
133
- return `Symbol(${description})`;
134
- }
135
- }
136
- if (type == 'function') {
137
- const name = val.name;
138
- if (typeof name == 'string' && name.length > 0) {
139
- return `Function(${name})`;
140
- } else {
141
- return 'Function';
142
- }
143
- }
144
- // objects
145
- if (Array.isArray(val)) {
146
- const length = val.length;
147
- let debug = '[';
148
- if (length > 0) {
149
- debug += debugString(val[0]);
150
- }
151
- for(let i = 1; i < length; i++) {
152
- debug += ', ' + debugString(val[i]);
153
- }
154
- debug += ']';
155
- return debug;
156
- }
157
- // Test for built-in
158
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
159
- let className;
160
- if (builtInMatches.length > 1) {
161
- className = builtInMatches[1];
162
- } else {
163
- // Failed to match the standard '[object ClassName]'
164
- return toString.call(val);
165
- }
166
- if (className == 'Object') {
167
- // we're a user defined class or Object
168
- // JSON.stringify avoids problems with cycles, and is generally much
169
- // easier than looping through ownProperties of `val`.
170
- try {
171
- return 'Object(' + JSON.stringify(val) + ')';
172
- } catch (_) {
173
- return 'Object';
174
- }
175
- }
176
- // errors
177
- if (val instanceof Error) {
178
- return `${val.name}: ${val.message}\n${val.stack}`;
179
- }
180
- // TODO we could test for more things here, like `Set`s and `Map`s.
181
- return className;
182
- }
183
-
184
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
185
- ? { register: () => {}, unregister: () => {} }
186
- : new FinalizationRegistry(state => {
187
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
188
- });
189
-
190
- function makeMutClosure(arg0, arg1, dtor, f) {
191
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
192
- const real = (...args) => {
193
- // First up with a closure we increment the internal reference
194
- // count. This ensures that the Rust closure environment won't
195
- // be deallocated while we're invoking it.
196
- state.cnt++;
197
- const a = state.a;
198
- state.a = 0;
199
- try {
200
- return f(a, state.b, ...args);
201
- } finally {
202
- if (--state.cnt === 0) {
203
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
204
- CLOSURE_DTORS.unregister(state);
205
- } else {
206
- state.a = a;
207
- }
208
- }
209
- };
210
- real.original = state;
211
- CLOSURE_DTORS.register(real, state, state);
212
- return real;
213
- }
214
- function __wbg_adapter_58(arg0, arg1, arg2) {
215
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7b30f8a760eb9e89(arg0, arg1, addHeapObject(arg2));
216
- }
217
-
218
- function makeClosure(arg0, arg1, dtor, f) {
219
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
220
- const real = (...args) => {
221
- // First up with a closure we increment the internal reference
222
- // count. This ensures that the Rust closure environment won't
223
- // be deallocated while we're invoking it.
224
- state.cnt++;
225
- try {
226
- return f(state.a, state.b, ...args);
227
- } finally {
228
- if (--state.cnt === 0) {
229
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
230
- state.a = 0;
231
- CLOSURE_DTORS.unregister(state);
232
- }
233
- }
234
- };
235
- real.original = state;
236
- CLOSURE_DTORS.register(real, state, state);
237
- return real;
238
- }
239
- function __wbg_adapter_61(arg0, arg1, arg2) {
240
- wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h27a0729df05e61c2(arg0, arg1, addHeapObject(arg2));
241
- }
242
-
243
- function __wbg_adapter_64(arg0, arg1) {
244
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd779103e89088afd(arg0, arg1);
245
- }
246
-
247
- function __wbg_adapter_71(arg0, arg1, arg2) {
248
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h62ad66d3e9f77ac4(arg0, arg1, addHeapObject(arg2));
249
- }
250
-
251
- function __wbg_adapter_74(arg0, arg1) {
252
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0a0047be2e37408e(arg0, arg1);
253
- }
254
-
255
- function __wbg_adapter_77(arg0, arg1, arg2) {
256
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h80386b419f109aff(arg0, arg1, addHeapObject(arg2));
257
- }
258
-
259
- function __wbg_adapter_80(arg0, arg1, arg2) {
260
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0ff40ee0b4df5b25(arg0, arg1, addHeapObject(arg2));
261
- }
262
-
263
- function __wbg_adapter_87(arg0, arg1, arg2) {
264
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbfb1f6eb8d7aa58f(arg0, arg1, addHeapObject(arg2));
265
- }
266
-
267
- function __wbg_adapter_90(arg0, arg1) {
268
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9503509ad8c78ce2(arg0, arg1);
269
- }
270
-
271
- function _assertClass(instance, klass) {
272
- if (!(instance instanceof klass)) {
273
- throw new Error(`expected instance of ${klass.name}`);
274
- }
275
- return instance.ptr;
276
- }
277
- /**
278
- * Set up a logging layer that direct logs to the browser's console.
279
- */
280
- export function setup_logging() {
281
- wasm.setup_logging();
282
- }
283
-
284
- function getArrayJsValueFromWasm0(ptr, len) {
285
- ptr = ptr >>> 0;
286
- const mem = getDataViewMemory0();
287
- const result = [];
288
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
289
- result.push(takeObject(mem.getUint32(i, true)));
290
- }
291
- return result;
292
- }
293
-
294
- function passArrayJsValueToWasm0(array, malloc) {
295
- const ptr = malloc(array.length * 4, 4) >>> 0;
296
- const mem = getDataViewMemory0();
297
- for (let i = 0; i < array.length; i++) {
298
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
299
- }
300
- WASM_VECTOR_LEN = array.length;
301
- return ptr;
302
- }
303
-
304
- function handleError(f, args) {
305
- try {
306
- return f.apply(this, args);
307
- } catch (e) {
308
- wasm.__wbindgen_exn_store(addHeapObject(e));
309
- }
310
- }
311
-
312
- function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
313
-
314
- function getArrayU8FromWasm0(ptr, len) {
315
- ptr = ptr >>> 0;
316
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
317
- }
318
- function __wbg_adapter_552(arg0, arg1, arg2, arg3) {
319
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h47e988f82b6e4529(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
320
- }
321
-
322
- /**
323
- * Supported Celestia networks.
324
- */
325
- export const Network = Object.freeze({
326
- /**
327
- * Celestia mainnet.
328
- */
329
- Mainnet:0,"0":"Mainnet",
330
- /**
331
- * Arabica testnet.
332
- */
333
- Arabica:1,"1":"Arabica",
334
- /**
335
- * Mocha testnet.
336
- */
337
- Mocha:2,"2":"Mocha",
338
- /**
339
- * Private local network.
340
- */
341
- Private:3,"3":"Private", });
342
-
343
- const BlockRangeFinalization = (typeof FinalizationRegistry === 'undefined')
344
- ? { register: () => {}, unregister: () => {} }
345
- : new FinalizationRegistry(ptr => wasm.__wbg_blockrange_free(ptr >>> 0, 1));
346
- /**
347
- */
348
- export class BlockRange {
349
-
350
- static __wrap(ptr) {
351
- ptr = ptr >>> 0;
352
- const obj = Object.create(BlockRange.prototype);
353
- obj.__wbg_ptr = ptr;
354
- BlockRangeFinalization.register(obj, obj.__wbg_ptr, obj);
355
- return obj;
356
- }
357
-
358
- static __unwrap(jsValue) {
359
- if (!(jsValue instanceof BlockRange)) {
360
- return 0;
361
- }
362
- return jsValue.__destroy_into_raw();
363
- }
364
-
365
- toJSON() {
366
- return {
367
- start: this.start,
368
- end: this.end,
369
- };
370
- }
371
-
372
- toString() {
373
- return JSON.stringify(this);
374
- }
375
-
376
- __destroy_into_raw() {
377
- const ptr = this.__wbg_ptr;
378
- this.__wbg_ptr = 0;
379
- BlockRangeFinalization.unregister(this);
380
- return ptr;
381
- }
382
-
383
- free() {
384
- const ptr = this.__destroy_into_raw();
385
- wasm.__wbg_blockrange_free(ptr, 0);
386
- }
387
- /**
388
- * @returns {bigint}
389
- */
390
- get start() {
391
- const ret = wasm.__wbg_get_blockrange_start(this.__wbg_ptr);
392
- return BigInt.asUintN(64, ret);
393
- }
394
- /**
395
- * @param {bigint} arg0
396
- */
397
- set start(arg0) {
398
- wasm.__wbg_set_blockrange_start(this.__wbg_ptr, arg0);
399
- }
400
- /**
401
- * @returns {bigint}
402
- */
403
- get end() {
404
- const ret = wasm.__wbg_get_blockrange_end(this.__wbg_ptr);
405
- return BigInt.asUintN(64, ret);
406
- }
407
- /**
408
- * @param {bigint} arg0
409
- */
410
- set end(arg0) {
411
- wasm.__wbg_set_blockrange_end(this.__wbg_ptr, arg0);
412
- }
413
- }
414
-
415
- const ConnectionCountersSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
416
- ? { register: () => {}, unregister: () => {} }
417
- : new FinalizationRegistry(ptr => wasm.__wbg_connectioncounterssnapshot_free(ptr >>> 0, 1));
418
- /**
419
- */
420
- export class ConnectionCountersSnapshot {
421
-
422
- static __wrap(ptr) {
423
- ptr = ptr >>> 0;
424
- const obj = Object.create(ConnectionCountersSnapshot.prototype);
425
- obj.__wbg_ptr = ptr;
426
- ConnectionCountersSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
427
- return obj;
428
- }
429
-
430
- toJSON() {
431
- return {
432
- num_connections: this.num_connections,
433
- num_pending: this.num_pending,
434
- num_pending_incoming: this.num_pending_incoming,
435
- num_pending_outgoing: this.num_pending_outgoing,
436
- num_established: this.num_established,
437
- num_established_incoming: this.num_established_incoming,
438
- num_established_outgoing: this.num_established_outgoing,
439
- };
440
- }
441
-
442
- toString() {
443
- return JSON.stringify(this);
444
- }
445
-
446
- __destroy_into_raw() {
447
- const ptr = this.__wbg_ptr;
448
- this.__wbg_ptr = 0;
449
- ConnectionCountersSnapshotFinalization.unregister(this);
450
- return ptr;
451
- }
452
-
453
- free() {
454
- const ptr = this.__destroy_into_raw();
455
- wasm.__wbg_connectioncounterssnapshot_free(ptr, 0);
456
- }
457
- /**
458
- * @returns {number}
459
- */
460
- get num_connections() {
461
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_connections(this.__wbg_ptr);
462
- return ret >>> 0;
463
- }
464
- /**
465
- * @param {number} arg0
466
- */
467
- set num_connections(arg0) {
468
- wasm.__wbg_set_connectioncounterssnapshot_num_connections(this.__wbg_ptr, arg0);
469
- }
470
- /**
471
- * @returns {number}
472
- */
473
- get num_pending() {
474
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_pending(this.__wbg_ptr);
475
- return ret >>> 0;
476
- }
477
- /**
478
- * @param {number} arg0
479
- */
480
- set num_pending(arg0) {
481
- wasm.__wbg_set_connectioncounterssnapshot_num_pending(this.__wbg_ptr, arg0);
482
- }
483
- /**
484
- * @returns {number}
485
- */
486
- get num_pending_incoming() {
487
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_pending_incoming(this.__wbg_ptr);
488
- return ret >>> 0;
489
- }
490
- /**
491
- * @param {number} arg0
492
- */
493
- set num_pending_incoming(arg0) {
494
- wasm.__wbg_set_connectioncounterssnapshot_num_pending_incoming(this.__wbg_ptr, arg0);
495
- }
496
- /**
497
- * @returns {number}
498
- */
499
- get num_pending_outgoing() {
500
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_pending_outgoing(this.__wbg_ptr);
501
- return ret >>> 0;
502
- }
503
- /**
504
- * @param {number} arg0
505
- */
506
- set num_pending_outgoing(arg0) {
507
- wasm.__wbg_set_connectioncounterssnapshot_num_pending_outgoing(this.__wbg_ptr, arg0);
508
- }
509
- /**
510
- * @returns {number}
511
- */
512
- get num_established() {
513
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_established(this.__wbg_ptr);
514
- return ret >>> 0;
515
- }
516
- /**
517
- * @param {number} arg0
518
- */
519
- set num_established(arg0) {
520
- wasm.__wbg_set_connectioncounterssnapshot_num_established(this.__wbg_ptr, arg0);
521
- }
522
- /**
523
- * @returns {number}
524
- */
525
- get num_established_incoming() {
526
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_established_incoming(this.__wbg_ptr);
527
- return ret >>> 0;
528
- }
529
- /**
530
- * @param {number} arg0
531
- */
532
- set num_established_incoming(arg0) {
533
- wasm.__wbg_set_connectioncounterssnapshot_num_established_incoming(this.__wbg_ptr, arg0);
534
- }
535
- /**
536
- * @returns {number}
537
- */
538
- get num_established_outgoing() {
539
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_established_outgoing(this.__wbg_ptr);
540
- return ret >>> 0;
541
- }
542
- /**
543
- * @param {number} arg0
544
- */
545
- set num_established_outgoing(arg0) {
546
- wasm.__wbg_set_connectioncounterssnapshot_num_established_outgoing(this.__wbg_ptr, arg0);
547
- }
548
- }
549
-
550
- const NetworkInfoSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
551
- ? { register: () => {}, unregister: () => {} }
552
- : new FinalizationRegistry(ptr => wasm.__wbg_networkinfosnapshot_free(ptr >>> 0, 1));
553
- /**
554
- */
555
- export class NetworkInfoSnapshot {
556
-
557
- static __wrap(ptr) {
558
- ptr = ptr >>> 0;
559
- const obj = Object.create(NetworkInfoSnapshot.prototype);
560
- obj.__wbg_ptr = ptr;
561
- NetworkInfoSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
562
- return obj;
563
- }
564
-
565
- toJSON() {
566
- return {
567
- num_peers: this.num_peers,
568
- connection_counters: this.connection_counters,
569
- };
570
- }
571
-
572
- toString() {
573
- return JSON.stringify(this);
574
- }
575
-
576
- __destroy_into_raw() {
577
- const ptr = this.__wbg_ptr;
578
- this.__wbg_ptr = 0;
579
- NetworkInfoSnapshotFinalization.unregister(this);
580
- return ptr;
581
- }
582
-
583
- free() {
584
- const ptr = this.__destroy_into_raw();
585
- wasm.__wbg_networkinfosnapshot_free(ptr, 0);
586
- }
587
- /**
588
- * @returns {number}
589
- */
590
- get num_peers() {
591
- const ret = wasm.__wbg_get_connectioncounterssnapshot_num_connections(this.__wbg_ptr);
592
- return ret >>> 0;
593
- }
594
- /**
595
- * @param {number} arg0
596
- */
597
- set num_peers(arg0) {
598
- wasm.__wbg_set_connectioncounterssnapshot_num_connections(this.__wbg_ptr, arg0);
599
- }
600
- /**
601
- * @returns {ConnectionCountersSnapshot}
602
- */
603
- get connection_counters() {
604
- const ret = wasm.__wbg_get_networkinfosnapshot_connection_counters(this.__wbg_ptr);
605
- return ConnectionCountersSnapshot.__wrap(ret);
606
- }
607
- /**
608
- * @param {ConnectionCountersSnapshot} arg0
609
- */
610
- set connection_counters(arg0) {
611
- _assertClass(arg0, ConnectionCountersSnapshot);
612
- var ptr0 = arg0.__destroy_into_raw();
613
- wasm.__wbg_set_networkinfosnapshot_connection_counters(this.__wbg_ptr, ptr0);
614
- }
615
- }
616
-
617
- const NodeClientFinalization = (typeof FinalizationRegistry === 'undefined')
618
- ? { register: () => {}, unregister: () => {} }
619
- : new FinalizationRegistry(ptr => wasm.__wbg_nodeclient_free(ptr >>> 0, 1));
620
- /**
621
- * `NodeClient` is responsible for steering [`NodeWorker`] by sending it commands and receiving
622
- * responses over the provided port.
623
- *
624
- * [`NodeWorker`]: crate::worker::NodeWorker
625
- */
626
- export class NodeClient {
627
-
628
- static __wrap(ptr) {
629
- ptr = ptr >>> 0;
630
- const obj = Object.create(NodeClient.prototype);
631
- obj.__wbg_ptr = ptr;
632
- NodeClientFinalization.register(obj, obj.__wbg_ptr, obj);
633
- return obj;
634
- }
635
-
636
- __destroy_into_raw() {
637
- const ptr = this.__wbg_ptr;
638
- this.__wbg_ptr = 0;
639
- NodeClientFinalization.unregister(this);
640
- return ptr;
641
- }
642
-
643
- free() {
644
- const ptr = this.__destroy_into_raw();
645
- wasm.__wbg_nodeclient_free(ptr, 0);
646
- }
647
- /**
648
- * Create a new connection to a Lumina node running in [`NodeWorker`]. Provided `port` is
649
- * expected to have `MessagePort`-like interface for sending and receiving messages.
650
- * @param {any} port
651
- */
652
- constructor(port) {
653
- const ret = wasm.nodeclient_new(addHeapObject(port));
654
- return takeObject(ret);
655
- }
656
- /**
657
- * Establish a new connection to the existing worker over provided port
658
- * @param {any} port
659
- * @returns {Promise<void>}
660
- */
661
- addConnectionToWorker(port) {
662
- const ret = wasm.nodeclient_addConnectionToWorker(this.__wbg_ptr, addHeapObject(port));
663
- return takeObject(ret);
664
- }
665
- /**
666
- * Check whether Lumina is currently running
667
- * @returns {Promise<boolean>}
668
- */
669
- isRunning() {
670
- const ret = wasm.nodeclient_isRunning(this.__wbg_ptr);
671
- return takeObject(ret);
672
- }
673
- /**
674
- * Start a node with the provided config, if it's not running
675
- * @param {NodeConfig} config
676
- * @returns {Promise<void>}
677
- */
678
- start(config) {
679
- _assertClass(config, NodeConfig);
680
- const ret = wasm.nodeclient_start(this.__wbg_ptr, config.__wbg_ptr);
681
- return takeObject(ret);
682
- }
683
- /**
684
- * @returns {Promise<void>}
685
- */
686
- stop() {
687
- const ret = wasm.nodeclient_stop(this.__wbg_ptr);
688
- return takeObject(ret);
689
- }
690
- /**
691
- * Get node's local peer ID.
692
- * @returns {Promise<string>}
693
- */
694
- localPeerId() {
695
- const ret = wasm.nodeclient_localPeerId(this.__wbg_ptr);
696
- return takeObject(ret);
697
- }
698
- /**
699
- * Get current [`PeerTracker`] info.
700
- * @returns {Promise<PeerTrackerInfoSnapshot>}
701
- */
702
- peerTrackerInfo() {
703
- const ret = wasm.nodeclient_peerTrackerInfo(this.__wbg_ptr);
704
- return takeObject(ret);
705
- }
706
- /**
707
- * Wait until the node is connected to at least 1 peer.
708
- * @returns {Promise<void>}
709
- */
710
- waitConnected() {
711
- const ret = wasm.nodeclient_waitConnected(this.__wbg_ptr);
712
- return takeObject(ret);
713
- }
714
- /**
715
- * Wait until the node is connected to at least 1 trusted peer.
716
- * @returns {Promise<void>}
717
- */
718
- waitConnectedTrusted() {
719
- const ret = wasm.nodeclient_waitConnectedTrusted(this.__wbg_ptr);
720
- return takeObject(ret);
721
- }
722
- /**
723
- * Get current network info.
724
- * @returns {Promise<NetworkInfoSnapshot>}
725
- */
726
- networkInfo() {
727
- const ret = wasm.nodeclient_networkInfo(this.__wbg_ptr);
728
- return takeObject(ret);
729
- }
730
- /**
731
- * Get all the multiaddresses on which the node listens.
732
- * @returns {Promise<Array<any>>}
733
- */
734
- listeners() {
735
- const ret = wasm.nodeclient_listeners(this.__wbg_ptr);
736
- return takeObject(ret);
737
- }
738
- /**
739
- * Get all the peers that node is connected to.
740
- * @returns {Promise<Array<any>>}
741
- */
742
- connectedPeers() {
743
- const ret = wasm.nodeclient_connectedPeers(this.__wbg_ptr);
744
- return takeObject(ret);
745
- }
746
- /**
747
- * Trust or untrust the peer with a given ID.
748
- * @param {string} peer_id
749
- * @param {boolean} is_trusted
750
- * @returns {Promise<void>}
751
- */
752
- setPeerTrust(peer_id, is_trusted) {
753
- const ptr0 = passStringToWasm0(peer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
754
- const len0 = WASM_VECTOR_LEN;
755
- const ret = wasm.nodeclient_setPeerTrust(this.__wbg_ptr, ptr0, len0, is_trusted);
756
- return takeObject(ret);
757
- }
758
- /**
759
- * Request the head header from the network.
760
- *
761
- * Returns a javascript object with given structure:
762
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
763
- * @returns {Promise<any>}
764
- */
765
- requestHeadHeader() {
766
- const ret = wasm.nodeclient_requestHeadHeader(this.__wbg_ptr);
767
- return takeObject(ret);
768
- }
769
- /**
770
- * Request a header for the block with a given hash from the network.
771
- *
772
- * Returns a javascript object with given structure:
773
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
774
- * @param {string} hash
775
- * @returns {Promise<any>}
776
- */
777
- requestHeaderByHash(hash) {
778
- const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
779
- const len0 = WASM_VECTOR_LEN;
780
- const ret = wasm.nodeclient_requestHeaderByHash(this.__wbg_ptr, ptr0, len0);
781
- return takeObject(ret);
782
- }
783
- /**
784
- * Request a header for the block with a given height from the network.
785
- *
786
- * Returns a javascript object with given structure:
787
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
788
- * @param {bigint} height
789
- * @returns {Promise<any>}
790
- */
791
- requestHeaderByHeight(height) {
792
- const ret = wasm.nodeclient_requestHeaderByHeight(this.__wbg_ptr, height);
793
- return takeObject(ret);
794
- }
795
- /**
796
- * Request headers in range (from, from + amount] from the network.
797
- *
798
- * The headers will be verified with the `from` header.
799
- *
800
- * Returns an array of javascript objects with given structure:
801
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
802
- * @param {any} from_header
803
- * @param {bigint} amount
804
- * @returns {Promise<Array<any>>}
805
- */
806
- requestVerifiedHeaders(from_header, amount) {
807
- const ret = wasm.nodeclient_requestVerifiedHeaders(this.__wbg_ptr, addHeapObject(from_header), amount);
808
- return takeObject(ret);
809
- }
810
- /**
811
- * Get current header syncing info.
812
- * @returns {Promise<SyncingInfoSnapshot>}
813
- */
814
- syncerInfo() {
815
- const ret = wasm.nodeclient_syncerInfo(this.__wbg_ptr);
816
- return takeObject(ret);
817
- }
818
- /**
819
- * Get the latest header announced in the network.
820
- *
821
- * Returns a javascript object with given structure:
822
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
823
- * @returns {Promise<any>}
824
- */
825
- getNetworkHeadHeader() {
826
- const ret = wasm.nodeclient_getNetworkHeadHeader(this.__wbg_ptr);
827
- return takeObject(ret);
828
- }
829
- /**
830
- * Get the latest locally synced header.
831
- *
832
- * Returns a javascript object with given structure:
833
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
834
- * @returns {Promise<any>}
835
- */
836
- getLocalHeadHeader() {
837
- const ret = wasm.nodeclient_getLocalHeadHeader(this.__wbg_ptr);
838
- return takeObject(ret);
839
- }
840
- /**
841
- * Get a synced header for the block with a given hash.
842
- *
843
- * Returns a javascript object with given structure:
844
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
845
- * @param {string} hash
846
- * @returns {Promise<any>}
847
- */
848
- getHeaderByHash(hash) {
849
- const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
850
- const len0 = WASM_VECTOR_LEN;
851
- const ret = wasm.nodeclient_getHeaderByHash(this.__wbg_ptr, ptr0, len0);
852
- return takeObject(ret);
853
- }
854
- /**
855
- * Get a synced header for the block with a given height.
856
- *
857
- * Returns a javascript object with given structure:
858
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
859
- * @param {bigint} height
860
- * @returns {Promise<any>}
861
- */
862
- getHeaderByHeight(height) {
863
- const ret = wasm.nodeclient_getHeaderByHeight(this.__wbg_ptr, height);
864
- return takeObject(ret);
865
- }
866
- /**
867
- * Get synced headers from the given heights range.
868
- *
869
- * If start of the range is undefined (None), the first returned header will be of height 1.
870
- * If end of the range is undefined (None), the last returned header will be the last header in the
871
- * store.
872
- *
873
- * # Errors
874
- *
875
- * If range contains a height of a header that is not found in the store.
876
- *
877
- * Returns an array of javascript objects with given structure:
878
- * https://docs.rs/celestia-types/latest/celestia_types/struct.ExtendedHeader.html
879
- * @param {bigint | undefined} [start_height]
880
- * @param {bigint | undefined} [end_height]
881
- * @returns {Promise<Array<any>>}
882
- */
883
- getHeaders(start_height, end_height) {
884
- const ret = wasm.nodeclient_getHeaders(this.__wbg_ptr, !isLikeNone(start_height), isLikeNone(start_height) ? BigInt(0) : start_height, !isLikeNone(end_height), isLikeNone(end_height) ? BigInt(0) : end_height);
885
- return takeObject(ret);
886
- }
887
- /**
888
- * Get data sampling metadata of an already sampled height.
889
- *
890
- * Returns a javascript object with given structure:
891
- * https://docs.rs/lumina-node/latest/lumina_node/store/struct.SamplingMetadata.html
892
- * @param {bigint} height
893
- * @returns {Promise<any>}
894
- */
895
- getSamplingMetadata(height) {
896
- const ret = wasm.nodeclient_getSamplingMetadata(this.__wbg_ptr, height);
897
- return takeObject(ret);
898
- }
899
- /**
900
- * Returns a [`BroadcastChannel`] for events generated by [`Node`].
901
- * @returns {Promise<BroadcastChannel>}
902
- */
903
- eventsChannel() {
904
- const ret = wasm.nodeclient_eventsChannel(this.__wbg_ptr);
905
- return takeObject(ret);
906
- }
907
- }
908
-
909
- const NodeConfigFinalization = (typeof FinalizationRegistry === 'undefined')
910
- ? { register: () => {}, unregister: () => {} }
911
- : new FinalizationRegistry(ptr => wasm.__wbg_nodeconfig_free(ptr >>> 0, 1));
912
- /**
913
- * Config for the lumina wasm node.
914
- */
915
- export class NodeConfig {
916
-
917
- static __wrap(ptr) {
918
- ptr = ptr >>> 0;
919
- const obj = Object.create(NodeConfig.prototype);
920
- obj.__wbg_ptr = ptr;
921
- NodeConfigFinalization.register(obj, obj.__wbg_ptr, obj);
922
- return obj;
923
- }
924
-
925
- toJSON() {
926
- return {
927
- network: this.network,
928
- bootnodes: this.bootnodes,
929
- };
930
- }
931
-
932
- toString() {
933
- return JSON.stringify(this);
934
- }
935
-
936
- __destroy_into_raw() {
937
- const ptr = this.__wbg_ptr;
938
- this.__wbg_ptr = 0;
939
- NodeConfigFinalization.unregister(this);
940
- return ptr;
941
- }
942
-
943
- free() {
944
- const ptr = this.__destroy_into_raw();
945
- wasm.__wbg_nodeconfig_free(ptr, 0);
946
- }
947
- /**
948
- * A network to connect to.
949
- * @returns {Network}
950
- */
951
- get network() {
952
- const ret = wasm.__wbg_get_nodeconfig_network(this.__wbg_ptr);
953
- return ret;
954
- }
955
- /**
956
- * A network to connect to.
957
- * @param {Network} arg0
958
- */
959
- set network(arg0) {
960
- wasm.__wbg_set_nodeconfig_network(this.__wbg_ptr, arg0);
961
- }
962
- /**
963
- * A list of bootstrap peers to connect to.
964
- * @returns {(string)[]}
965
- */
966
- get bootnodes() {
967
- try {
968
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
969
- wasm.__wbg_get_nodeconfig_bootnodes(retptr, this.__wbg_ptr);
970
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
971
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
972
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
973
- wasm.__wbindgen_free(r0, r1 * 4, 4);
974
- return v1;
975
- } finally {
976
- wasm.__wbindgen_add_to_stack_pointer(16);
977
- }
978
- }
979
- /**
980
- * A list of bootstrap peers to connect to.
981
- * @param {(string)[]} arg0
982
- */
983
- set bootnodes(arg0) {
984
- const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
985
- const len0 = WASM_VECTOR_LEN;
986
- wasm.__wbg_set_nodeconfig_bootnodes(this.__wbg_ptr, ptr0, len0);
987
- }
988
- /**
989
- * Get the configuration with default bootnodes for provided network
990
- * @param {Network} network
991
- * @returns {NodeConfig}
992
- */
993
- static default(network) {
994
- const ret = wasm.nodeconfig_default(network);
995
- return NodeConfig.__wrap(ret);
996
- }
997
- }
998
-
999
- const NodeWorkerFinalization = (typeof FinalizationRegistry === 'undefined')
1000
- ? { register: () => {}, unregister: () => {} }
1001
- : new FinalizationRegistry(ptr => wasm.__wbg_nodeworker_free(ptr >>> 0, 1));
1002
- /**
1003
- */
1004
- export class NodeWorker {
1005
-
1006
- __destroy_into_raw() {
1007
- const ptr = this.__wbg_ptr;
1008
- this.__wbg_ptr = 0;
1009
- NodeWorkerFinalization.unregister(this);
1010
- return ptr;
1011
- }
1012
-
1013
- free() {
1014
- const ptr = this.__destroy_into_raw();
1015
- wasm.__wbg_nodeworker_free(ptr, 0);
1016
- }
1017
- /**
1018
- * @param {any} port_like_object
1019
- */
1020
- constructor(port_like_object) {
1021
- const ret = wasm.nodeworker_new(addHeapObject(port_like_object));
1022
- this.__wbg_ptr = ret >>> 0;
1023
- NodeWorkerFinalization.register(this, this.__wbg_ptr, this);
1024
- return this;
1025
- }
1026
- /**
1027
- * @returns {Promise<void>}
1028
- */
1029
- run() {
1030
- const ret = wasm.nodeworker_run(this.__wbg_ptr);
1031
- return takeObject(ret);
1032
- }
1033
- }
1034
-
1035
- const PeerTrackerInfoSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
1036
- ? { register: () => {}, unregister: () => {} }
1037
- : new FinalizationRegistry(ptr => wasm.__wbg_peertrackerinfosnapshot_free(ptr >>> 0, 1));
1038
- /**
1039
- */
1040
- export class PeerTrackerInfoSnapshot {
1041
-
1042
- static __wrap(ptr) {
1043
- ptr = ptr >>> 0;
1044
- const obj = Object.create(PeerTrackerInfoSnapshot.prototype);
1045
- obj.__wbg_ptr = ptr;
1046
- PeerTrackerInfoSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
1047
- return obj;
1048
- }
1049
-
1050
- toJSON() {
1051
- return {
1052
- num_connected_peers: this.num_connected_peers,
1053
- num_connected_trusted_peers: this.num_connected_trusted_peers,
1054
- };
1055
- }
1056
-
1057
- toString() {
1058
- return JSON.stringify(this);
1059
- }
1060
-
1061
- __destroy_into_raw() {
1062
- const ptr = this.__wbg_ptr;
1063
- this.__wbg_ptr = 0;
1064
- PeerTrackerInfoSnapshotFinalization.unregister(this);
1065
- return ptr;
1066
- }
1067
-
1068
- free() {
1069
- const ptr = this.__destroy_into_raw();
1070
- wasm.__wbg_peertrackerinfosnapshot_free(ptr, 0);
1071
- }
1072
- /**
1073
- * @returns {bigint}
1074
- */
1075
- get num_connected_peers() {
1076
- const ret = wasm.__wbg_get_blockrange_start(this.__wbg_ptr);
1077
- return BigInt.asUintN(64, ret);
1078
- }
1079
- /**
1080
- * @param {bigint} arg0
1081
- */
1082
- set num_connected_peers(arg0) {
1083
- wasm.__wbg_set_blockrange_start(this.__wbg_ptr, arg0);
1084
- }
1085
- /**
1086
- * @returns {bigint}
1087
- */
1088
- get num_connected_trusted_peers() {
1089
- const ret = wasm.__wbg_get_blockrange_end(this.__wbg_ptr);
1090
- return BigInt.asUintN(64, ret);
1091
- }
1092
- /**
1093
- * @param {bigint} arg0
1094
- */
1095
- set num_connected_trusted_peers(arg0) {
1096
- wasm.__wbg_set_blockrange_end(this.__wbg_ptr, arg0);
1097
- }
1098
- }
1099
-
1100
- const SyncingInfoSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
1101
- ? { register: () => {}, unregister: () => {} }
1102
- : new FinalizationRegistry(ptr => wasm.__wbg_syncinginfosnapshot_free(ptr >>> 0, 1));
1103
- /**
1104
- */
1105
- export class SyncingInfoSnapshot {
1106
-
1107
- static __wrap(ptr) {
1108
- ptr = ptr >>> 0;
1109
- const obj = Object.create(SyncingInfoSnapshot.prototype);
1110
- obj.__wbg_ptr = ptr;
1111
- SyncingInfoSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
1112
- return obj;
1113
- }
1114
-
1115
- toJSON() {
1116
- return {
1117
- stored_headers: this.stored_headers,
1118
- subjective_head: this.subjective_head,
1119
- };
1120
- }
1121
-
1122
- toString() {
1123
- return JSON.stringify(this);
1124
- }
1125
-
1126
- __destroy_into_raw() {
1127
- const ptr = this.__wbg_ptr;
1128
- this.__wbg_ptr = 0;
1129
- SyncingInfoSnapshotFinalization.unregister(this);
1130
- return ptr;
1131
- }
1132
-
1133
- free() {
1134
- const ptr = this.__destroy_into_raw();
1135
- wasm.__wbg_syncinginfosnapshot_free(ptr, 0);
1136
- }
1137
- /**
1138
- * @returns {(BlockRange)[]}
1139
- */
1140
- get stored_headers() {
1141
- try {
1142
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1143
- wasm.__wbg_get_syncinginfosnapshot_stored_headers(retptr, this.__wbg_ptr);
1144
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1145
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1146
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1147
- wasm.__wbindgen_free(r0, r1 * 4, 4);
1148
- return v1;
1149
- } finally {
1150
- wasm.__wbindgen_add_to_stack_pointer(16);
1151
- }
1152
- }
1153
- /**
1154
- * @param {(BlockRange)[]} arg0
1155
- */
1156
- set stored_headers(arg0) {
1157
- const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
1158
- const len0 = WASM_VECTOR_LEN;
1159
- wasm.__wbg_set_syncinginfosnapshot_stored_headers(this.__wbg_ptr, ptr0, len0);
1160
- }
1161
- /**
1162
- * @returns {bigint}
1163
- */
1164
- get subjective_head() {
1165
- const ret = wasm.__wbg_get_blockrange_start(this.__wbg_ptr);
1166
- return BigInt.asUintN(64, ret);
1167
- }
1168
- /**
1169
- * @param {bigint} arg0
1170
- */
1171
- set subjective_head(arg0) {
1172
- wasm.__wbg_set_blockrange_start(this.__wbg_ptr, arg0);
1173
- }
1174
- }
1175
-
1176
- async function __wbg_load(module, imports) {
1177
- if (typeof Response === 'function' && module instanceof Response) {
1178
- if (typeof WebAssembly.instantiateStreaming === 'function') {
1179
- try {
1180
- return await WebAssembly.instantiateStreaming(module, imports);
1181
-
1182
- } catch (e) {
1183
- if (module.headers.get('Content-Type') != 'application/wasm') {
1184
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
1185
-
1186
- } else {
1187
- throw e;
1188
- }
1189
- }
1190
- }
1191
-
1192
- const bytes = await module.arrayBuffer();
1193
- return await WebAssembly.instantiate(bytes, imports);
1194
-
1195
- } else {
1196
- const instance = await WebAssembly.instantiate(module, imports);
1197
-
1198
- if (instance instanceof WebAssembly.Instance) {
1199
- return { instance, module };
1200
-
1201
- } else {
1202
- return instance;
1203
- }
1204
- }
1205
- }
1206
-
1207
- function __wbg_get_imports() {
1208
- const imports = {};
1209
- imports.wbg = {};
1210
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1211
- takeObject(arg0);
1212
- };
1213
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
1214
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1215
- return addHeapObject(ret);
1216
- };
1217
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1218
- const ret = getStringFromWasm0(arg0, arg1);
1219
- return addHeapObject(ret);
1220
- };
1221
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
1222
- const obj = takeObject(arg0).original;
1223
- if (obj.cnt-- == 1) {
1224
- obj.a = 0;
1225
- return true;
1226
- }
1227
- const ret = false;
1228
- return ret;
1229
- };
1230
- imports.wbg.__wbindgen_typeof = function(arg0) {
1231
- const ret = typeof getObject(arg0);
1232
- return addHeapObject(ret);
1233
- };
1234
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
1235
- const obj = getObject(arg1);
1236
- const ret = typeof(obj) === 'string' ? obj : undefined;
1237
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1238
- var len1 = WASM_VECTOR_LEN;
1239
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1240
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1241
- };
1242
- imports.wbg.__wbg_syncinginfosnapshot_new = function(arg0) {
1243
- const ret = SyncingInfoSnapshot.__wrap(arg0);
1244
- return addHeapObject(ret);
1245
- };
1246
- imports.wbg.__wbg_blockrange_new = function(arg0) {
1247
- const ret = BlockRange.__wrap(arg0);
1248
- return addHeapObject(ret);
1249
- };
1250
- imports.wbg.__wbindgen_number_new = function(arg0) {
1251
- const ret = arg0;
1252
- return addHeapObject(ret);
1253
- };
1254
- imports.wbg.__wbg_peertrackerinfosnapshot_new = function(arg0) {
1255
- const ret = PeerTrackerInfoSnapshot.__wrap(arg0);
1256
- return addHeapObject(ret);
1257
- };
1258
- imports.wbg.__wbg_networkinfosnapshot_new = function(arg0) {
1259
- const ret = NetworkInfoSnapshot.__wrap(arg0);
1260
- return addHeapObject(ret);
1261
- };
1262
- imports.wbg.__wbg_nodeclient_new = function(arg0) {
1263
- const ret = NodeClient.__wrap(arg0);
1264
- return addHeapObject(ret);
1265
- };
1266
- imports.wbg.__wbindgen_is_object = function(arg0) {
1267
- const val = getObject(arg0);
1268
- const ret = typeof(val) === 'object' && val !== null;
1269
- return ret;
1270
- };
1271
- imports.wbg.__wbg_postMessage_8649714a6cbab7be = function() { return handleError(function (arg0, arg1) {
1272
- getObject(arg0).postMessage(getObject(arg1));
1273
- }, arguments) };
1274
- imports.wbg.__wbindgen_as_number = function(arg0) {
1275
- const ret = +getObject(arg0);
1276
- return ret;
1277
- };
1278
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1279
- const ret = getObject(arg0);
1280
- return addHeapObject(ret);
1281
- };
1282
- imports.wbg.__wbindgen_is_string = function(arg0) {
1283
- const ret = typeof(getObject(arg0)) === 'string';
1284
- return ret;
1285
- };
1286
- imports.wbg.__wbindgen_is_falsy = function(arg0) {
1287
- const ret = !getObject(arg0);
1288
- return ret;
1289
- };
1290
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
1291
- const obj = getObject(arg1);
1292
- const ret = typeof(obj) === 'number' ? obj : undefined;
1293
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1294
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1295
- };
1296
- imports.wbg.__wbindgen_is_function = function(arg0) {
1297
- const ret = typeof(getObject(arg0)) === 'function';
1298
- return ret;
1299
- };
1300
- imports.wbg.__wbg_blockrange_unwrap = function(arg0) {
1301
- const ret = BlockRange.__unwrap(takeObject(arg0));
1302
- return ret;
1303
- };
1304
- imports.wbg.__wbg_postMessage_415d5111deee4f28 = function() { return handleError(function (arg0, arg1, arg2) {
1305
- getObject(arg0).postMessage(getObject(arg1), getObject(arg2));
1306
- }, arguments) };
1307
- imports.wbg.__wbindgen_is_array = function(arg0) {
1308
- const ret = Array.isArray(getObject(arg0));
1309
- return ret;
1310
- };
1311
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
1312
- const ret = getObject(arg0) === undefined;
1313
- return ret;
1314
- };
1315
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
1316
- const v = getObject(arg0);
1317
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1318
- return ret;
1319
- };
1320
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
1321
- const ret = typeof(getObject(arg0)) === 'bigint';
1322
- return ret;
1323
- };
1324
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
1325
- const ret = getObject(arg0) in getObject(arg1);
1326
- return ret;
1327
- };
1328
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
1329
- const ret = arg0;
1330
- return addHeapObject(ret);
1331
- };
1332
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
1333
- const ret = getObject(arg0) === getObject(arg1);
1334
- return ret;
1335
- };
1336
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
1337
- const ret = BigInt.asUintN(64, arg0);
1338
- return addHeapObject(ret);
1339
- };
1340
- imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
1341
- const ret = new Error();
1342
- return addHeapObject(ret);
1343
- };
1344
- imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
1345
- const ret = getObject(arg1).stack;
1346
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1347
- const len1 = WASM_VECTOR_LEN;
1348
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1349
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1350
- };
1351
- imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
1352
- let deferred0_0;
1353
- let deferred0_1;
1354
- try {
1355
- deferred0_0 = arg0;
1356
- deferred0_1 = arg1;
1357
- console.error(getStringFromWasm0(arg0, arg1));
1358
- } finally {
1359
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1360
- }
1361
- };
1362
- imports.wbg.__wbg_clearTimeout_e821a57e0a355106 = typeof clearTimeout == 'function' ? clearTimeout : notDefined('clearTimeout');
1363
- imports.wbg.__wbg_setTimeout_0e2683d7f8a5eec5 = function(arg0, arg1) {
1364
- const ret = setTimeout(getObject(arg0), arg1 >>> 0);
1365
- return ret;
1366
- };
1367
- imports.wbg.__wbindgen_is_null = function(arg0) {
1368
- const ret = getObject(arg0) === null;
1369
- return ret;
1370
- };
1371
- imports.wbg.__wbg_clearTimeout_541ac0980ffcef74 = function(arg0) {
1372
- const ret = clearTimeout(takeObject(arg0));
1373
- return addHeapObject(ret);
1374
- };
1375
- imports.wbg.__wbg_clearInterval_7f51e4380e64c6c5 = function(arg0) {
1376
- const ret = clearInterval(takeObject(arg0));
1377
- return addHeapObject(ret);
1378
- };
1379
- imports.wbg.__wbg_setTimeout_7d81d052875b0f4f = function() { return handleError(function (arg0, arg1) {
1380
- const ret = setTimeout(getObject(arg0), arg1);
1381
- return addHeapObject(ret);
1382
- }, arguments) };
1383
- imports.wbg.__wbg_setInterval_e227d4d8a9d44d66 = function() { return handleError(function (arg0, arg1) {
1384
- const ret = setInterval(getObject(arg0), arg1);
1385
- return addHeapObject(ret);
1386
- }, arguments) };
1387
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
1388
- const ret = getObject(arg0) == getObject(arg1);
1389
- return ret;
1390
- };
1391
- imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
1392
- const ret = String(getObject(arg1));
1393
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1394
- const len1 = WASM_VECTOR_LEN;
1395
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1396
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1397
- };
1398
- imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
1399
- const ret = getObject(arg0)[getObject(arg1)];
1400
- return addHeapObject(ret);
1401
- };
1402
- imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
1403
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1404
- };
1405
- imports.wbg.__wbg_instanceof_WebTransportBidirectionalStream_70b0a7cc2c4bf751 = function(arg0) {
1406
- let result;
1407
- try {
1408
- result = getObject(arg0) instanceof WebTransportBidirectionalStream;
1409
- } catch (_) {
1410
- result = false;
1411
- }
1412
- const ret = result;
1413
- return ret;
1414
- };
1415
- imports.wbg.__wbg_ready_9ddf4efeab609ba5 = function(arg0) {
1416
- const ret = getObject(arg0).ready;
1417
- return addHeapObject(ret);
1418
- };
1419
- imports.wbg.__wbg_closed_bab1971a43e2d966 = function(arg0) {
1420
- const ret = getObject(arg0).closed;
1421
- return addHeapObject(ret);
1422
- };
1423
- imports.wbg.__wbg_incomingBidirectionalStreams_1675813a7f64da3f = function(arg0) {
1424
- const ret = getObject(arg0).incomingBidirectionalStreams;
1425
- return addHeapObject(ret);
1426
- };
1427
- imports.wbg.__wbg_new_a769ee7b91c82ffc = function() { return handleError(function (arg0, arg1) {
1428
- const ret = new WebTransport(getStringFromWasm0(arg0, arg1));
1429
- return addHeapObject(ret);
1430
- }, arguments) };
1431
- imports.wbg.__wbg_newwithoptions_ebf0d9b96b354471 = function() { return handleError(function (arg0, arg1, arg2) {
1432
- const ret = new WebTransport(getStringFromWasm0(arg0, arg1), getObject(arg2));
1433
- return addHeapObject(ret);
1434
- }, arguments) };
1435
- imports.wbg.__wbg_close_adf2df3b9682035f = function(arg0) {
1436
- getObject(arg0).close();
1437
- };
1438
- imports.wbg.__wbg_createBidirectionalStream_e604ff9464076683 = function(arg0) {
1439
- const ret = getObject(arg0).createBidirectionalStream();
1440
- return addHeapObject(ret);
1441
- };
1442
- imports.wbg.__wbg_readable_7e977276662c88d8 = function(arg0) {
1443
- const ret = getObject(arg0).readable;
1444
- return addHeapObject(ret);
1445
- };
1446
- imports.wbg.__wbg_writable_bd1bdd26d4e17424 = function(arg0) {
1447
- const ret = getObject(arg0).writable;
1448
- return addHeapObject(ret);
1449
- };
1450
- imports.wbg.__wbg_WorkerGlobalScope_c44775816e379c0e = function(arg0) {
1451
- const ret = getObject(arg0).WorkerGlobalScope;
1452
- return addHeapObject(ret);
1453
- };
1454
- imports.wbg.__wbg_instanceof_Window_5012736c80a01584 = function(arg0) {
1455
- let result;
1456
- try {
1457
- result = getObject(arg0) instanceof Window;
1458
- } catch (_) {
1459
- result = false;
1460
- }
1461
- const ret = result;
1462
- return ret;
1463
- };
1464
- imports.wbg.__wbg_navigator_6210380287bf8581 = function(arg0) {
1465
- const ret = getObject(arg0).navigator;
1466
- return addHeapObject(ret);
1467
- };
1468
- imports.wbg.__wbg_clearInterval_df3409c32c572e85 = function(arg0, arg1) {
1469
- getObject(arg0).clearInterval(arg1);
1470
- };
1471
- imports.wbg.__wbg_fetch_f3adf866d8944b41 = function(arg0, arg1) {
1472
- const ret = getObject(arg0).fetch(getObject(arg1));
1473
- return addHeapObject(ret);
1474
- };
1475
- imports.wbg.__wbg_setInterval_d4a371ef4db258a7 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1476
- const ret = getObject(arg0).setInterval(getObject(arg1), arg2, ...getObject(arg3));
1477
- return ret;
1478
- }, arguments) };
1479
- imports.wbg.__wbg_navigator_db73b5b11a0c5c93 = function(arg0) {
1480
- const ret = getObject(arg0).navigator;
1481
- return addHeapObject(ret);
1482
- };
1483
- imports.wbg.__wbg_clearInterval_26e463ce3f550c4b = function(arg0, arg1) {
1484
- getObject(arg0).clearInterval(arg1);
1485
- };
1486
- imports.wbg.__wbg_fetch_ba7fe179e527d942 = function(arg0, arg1) {
1487
- const ret = getObject(arg0).fetch(getObject(arg1));
1488
- return addHeapObject(ret);
1489
- };
1490
- imports.wbg.__wbg_setInterval_1758524273ba5b22 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1491
- const ret = getObject(arg0).setInterval(getObject(arg1), arg2, ...getObject(arg3));
1492
- return ret;
1493
- }, arguments) };
1494
- imports.wbg.__wbg_instanceof_DedicatedWorkerGlobalScope_a7feec288dff4a90 = function(arg0) {
1495
- let result;
1496
- try {
1497
- result = getObject(arg0) instanceof DedicatedWorkerGlobalScope;
1498
- } catch (_) {
1499
- result = false;
1500
- }
1501
- const ret = result;
1502
- return ret;
1503
- };
1504
- imports.wbg.__wbg_key_37c613728ba0b769 = function() { return handleError(function (arg0) {
1505
- const ret = getObject(arg0).key;
1506
- return addHeapObject(ret);
1507
- }, arguments) };
1508
- imports.wbg.__wbg_request_3c4da92b3538e80a = function(arg0) {
1509
- const ret = getObject(arg0).request;
1510
- return addHeapObject(ret);
1511
- };
1512
- imports.wbg.__wbg_advance_0922866a23942467 = function() { return handleError(function (arg0, arg1) {
1513
- getObject(arg0).advance(arg1 >>> 0);
1514
- }, arguments) };
1515
- imports.wbg.__wbg_continue_a92b4c9f17458897 = function() { return handleError(function (arg0) {
1516
- getObject(arg0).continue();
1517
- }, arguments) };
1518
- imports.wbg.__wbg_continue_6672b1997d5c8efb = function() { return handleError(function (arg0, arg1) {
1519
- getObject(arg0).continue(getObject(arg1));
1520
- }, arguments) };
1521
- imports.wbg.__wbg_readyState_7237e2b1adac03a6 = function(arg0) {
1522
- const ret = getObject(arg0).readyState;
1523
- return ret;
1524
- };
1525
- imports.wbg.__wbg_bufferedAmount_77ba515edae4df34 = function(arg0) {
1526
- const ret = getObject(arg0).bufferedAmount;
1527
- return ret;
1528
- };
1529
- imports.wbg.__wbg_setonopen_7e770c87269cae90 = function(arg0, arg1) {
1530
- getObject(arg0).onopen = getObject(arg1);
1531
- };
1532
- imports.wbg.__wbg_setonerror_5ec4625df3060159 = function(arg0, arg1) {
1533
- getObject(arg0).onerror = getObject(arg1);
1534
- };
1535
- imports.wbg.__wbg_setonclose_40f935717ad6ffcd = function(arg0, arg1) {
1536
- getObject(arg0).onclose = getObject(arg1);
1537
- };
1538
- imports.wbg.__wbg_setonmessage_b670c12ea34acd8b = function(arg0, arg1) {
1539
- getObject(arg0).onmessage = getObject(arg1);
1540
- };
1541
- imports.wbg.__wbg_setbinaryType_d164a0be4c212c9c = function(arg0, arg1) {
1542
- getObject(arg0).binaryType = ["blob","arraybuffer",][arg1];
1543
- };
1544
- imports.wbg.__wbg_new_0bf4a5b0632517ed = function() { return handleError(function (arg0, arg1) {
1545
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1546
- return addHeapObject(ret);
1547
- }, arguments) };
1548
- imports.wbg.__wbg_close_0a0cd79519b11318 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1549
- getObject(arg0).close(arg1, getStringFromWasm0(arg2, arg3));
1550
- }, arguments) };
1551
- imports.wbg.__wbg_send_1b333b26681a902d = function() { return handleError(function (arg0, arg1, arg2) {
1552
- getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
1553
- }, arguments) };
1554
- imports.wbg.__wbg_target_b7cb1739bee70928 = function(arg0) {
1555
- const ret = getObject(arg0).target;
1556
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1557
- };
1558
- imports.wbg.__wbg_instanceof_IdbCursorWithValue_2302382a73f62174 = function(arg0) {
1559
- let result;
1560
- try {
1561
- result = getObject(arg0) instanceof IDBCursorWithValue;
1562
- } catch (_) {
1563
- result = false;
1564
- }
1565
- const ret = result;
1566
- return ret;
1567
- };
1568
- imports.wbg.__wbg_value_d4be628e515b251f = function() { return handleError(function (arg0) {
1569
- const ret = getObject(arg0).value;
1570
- return addHeapObject(ret);
1571
- }, arguments) };
1572
- imports.wbg.__wbg_userAgent_58dedff4303aeb66 = function() { return handleError(function (arg0, arg1) {
1573
- const ret = getObject(arg1).userAgent;
1574
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1575
- const len1 = WASM_VECTOR_LEN;
1576
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1577
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1578
- }, arguments) };
1579
- imports.wbg.__wbg_storage_0016c19400b7c179 = function(arg0) {
1580
- const ret = getObject(arg0).storage;
1581
- return addHeapObject(ret);
1582
- };
1583
- imports.wbg.__wbg_getReader_1997658275516cc3 = function(arg0) {
1584
- const ret = getObject(arg0).getReader();
1585
- return addHeapObject(ret);
1586
- };
1587
- imports.wbg.__wbg_headers_7d46f181de2aa1dd = function(arg0) {
1588
- const ret = getObject(arg0).headers;
1589
- return addHeapObject(ret);
1590
- };
1591
- imports.wbg.__wbg_newwithstrandinit_a31c69e4cc337183 = function() { return handleError(function (arg0, arg1, arg2) {
1592
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1593
- return addHeapObject(ret);
1594
- }, arguments) };
1595
- imports.wbg.__wbg_instanceof_IdbFactory_9c1359c26643add1 = function(arg0) {
1596
- let result;
1597
- try {
1598
- result = getObject(arg0) instanceof IDBFactory;
1599
- } catch (_) {
1600
- result = false;
1601
- }
1602
- const ret = result;
1603
- return ret;
1604
- };
1605
- imports.wbg.__wbg_open_a89af1720976a433 = function() { return handleError(function (arg0, arg1, arg2) {
1606
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
1607
- return addHeapObject(ret);
1608
- }, arguments) };
1609
- imports.wbg.__wbg_open_e8f45f3526088828 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1610
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1611
- return addHeapObject(ret);
1612
- }, arguments) };
1613
- imports.wbg.__wbg_only_8e9aa7d9138d3f35 = function() { return handleError(function (arg0) {
1614
- const ret = IDBKeyRange.only(getObject(arg0));
1615
- return addHeapObject(ret);
1616
- }, arguments) };
1617
- imports.wbg.__wbg_data_5c47a6985fefc490 = function(arg0) {
1618
- const ret = getObject(arg0).data;
1619
- return addHeapObject(ret);
1620
- };
1621
- imports.wbg.__wbg_ports_6e856b8ee68d6242 = function(arg0) {
1622
- const ret = getObject(arg0).ports;
1623
- return addHeapObject(ret);
1624
- };
1625
- imports.wbg.__wbg_getWriter_300edebcd3c2c126 = function() { return handleError(function (arg0) {
1626
- const ret = getObject(arg0).getWriter();
1627
- return addHeapObject(ret);
1628
- }, arguments) };
1629
- imports.wbg.__wbg_setmethod_dc68a742c2db5c6a = function(arg0, arg1, arg2) {
1630
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1631
- };
1632
- imports.wbg.__wbg_setmode_a781aae2bd3df202 = function(arg0, arg1) {
1633
- getObject(arg0).mode = ["same-origin","no-cors","cors","navigate",][arg1];
1634
- };
1635
- imports.wbg.__wbg_length_82021578cc4f0d2c = function(arg0) {
1636
- const ret = getObject(arg0).length;
1637
- return ret;
1638
- };
1639
- imports.wbg.__wbg_get_913f8df8566b2d82 = function(arg0, arg1, arg2) {
1640
- const ret = getObject(arg1)[arg2 >>> 0];
1641
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1642
- var len1 = WASM_VECTOR_LEN;
1643
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1644
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1645
- };
1646
- imports.wbg.__wbg_instanceof_IdbOpenDbRequest_c0d2e9c902441588 = function(arg0) {
1647
- let result;
1648
- try {
1649
- result = getObject(arg0) instanceof IDBOpenDBRequest;
1650
- } catch (_) {
1651
- result = false;
1652
- }
1653
- const ret = result;
1654
- return ret;
1655
- };
1656
- imports.wbg.__wbg_setonupgradeneeded_8f3f0ac5d7130a6f = function(arg0, arg1) {
1657
- getObject(arg0).onupgradeneeded = getObject(arg1);
1658
- };
1659
- imports.wbg.__wbg_instanceof_IdbRequest_44d99b46adafe829 = function(arg0) {
1660
- let result;
1661
- try {
1662
- result = getObject(arg0) instanceof IDBRequest;
1663
- } catch (_) {
1664
- result = false;
1665
- }
1666
- const ret = result;
1667
- return ret;
1668
- };
1669
- imports.wbg.__wbg_result_fd2dae625828961d = function() { return handleError(function (arg0) {
1670
- const ret = getObject(arg0).result;
1671
- return addHeapObject(ret);
1672
- }, arguments) };
1673
- imports.wbg.__wbg_error_1221bc1f1d0b14d3 = function() { return handleError(function (arg0) {
1674
- const ret = getObject(arg0).error;
1675
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1676
- }, arguments) };
1677
- imports.wbg.__wbg_transaction_0549f2d854da77a6 = function(arg0) {
1678
- const ret = getObject(arg0).transaction;
1679
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1680
- };
1681
- imports.wbg.__wbg_setonsuccess_962c293b6e38a5d5 = function(arg0, arg1) {
1682
- getObject(arg0).onsuccess = getObject(arg1);
1683
- };
1684
- imports.wbg.__wbg_setonerror_bd61d0a61808ca40 = function(arg0, arg1) {
1685
- getObject(arg0).onerror = getObject(arg1);
1686
- };
1687
- imports.wbg.__wbg_instanceof_IdbTransaction_d3f561bdf80cbd35 = function(arg0) {
1688
- let result;
1689
- try {
1690
- result = getObject(arg0) instanceof IDBTransaction;
1691
- } catch (_) {
1692
- result = false;
1693
- }
1694
- const ret = result;
1695
- return ret;
1696
- };
1697
- imports.wbg.__wbg_error_5c7bb46bfc30aee8 = function(arg0) {
1698
- const ret = getObject(arg0).error;
1699
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1700
- };
1701
- imports.wbg.__wbg_setonabort_aedc77f0151af20c = function(arg0, arg1) {
1702
- getObject(arg0).onabort = getObject(arg1);
1703
- };
1704
- imports.wbg.__wbg_setoncomplete_a9e0ec1d6568a6d9 = function(arg0, arg1) {
1705
- getObject(arg0).oncomplete = getObject(arg1);
1706
- };
1707
- imports.wbg.__wbg_setonerror_00500154a07e987d = function(arg0, arg1) {
1708
- getObject(arg0).onerror = getObject(arg1);
1709
- };
1710
- imports.wbg.__wbg_abort_91c8863e70a93d96 = function() { return handleError(function (arg0) {
1711
- getObject(arg0).abort();
1712
- }, arguments) };
1713
- imports.wbg.__wbg_commit_d40764961dd886fa = function() { return handleError(function (arg0) {
1714
- getObject(arg0).commit();
1715
- }, arguments) };
1716
- imports.wbg.__wbg_objectStore_80724f9f6d33ab5b = function() { return handleError(function (arg0, arg1, arg2) {
1717
- const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
1718
- return addHeapObject(ret);
1719
- }, arguments) };
1720
- imports.wbg.__wbg_now_a69647afb1f66247 = function(arg0) {
1721
- const ret = getObject(arg0).now();
1722
- return ret;
1723
- };
1724
- imports.wbg.__wbg_userAgent_105bbcdb33968848 = function() { return handleError(function (arg0, arg1) {
1725
- const ret = getObject(arg1).userAgent;
1726
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1727
- const len1 = WASM_VECTOR_LEN;
1728
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1729
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1730
- }, arguments) };
1731
- imports.wbg.__wbg_storage_947fc01a38842a90 = function(arg0) {
1732
- const ret = getObject(arg0).storage;
1733
- return addHeapObject(ret);
1734
- };
1735
- imports.wbg.__wbg_new_699704451bc0e988 = function() { return handleError(function (arg0, arg1) {
1736
- const ret = new BroadcastChannel(getStringFromWasm0(arg0, arg1));
1737
- return addHeapObject(ret);
1738
- }, arguments) };
1739
- imports.wbg.__wbg_postMessage_b33651b7ca54b884 = function() { return handleError(function (arg0, arg1) {
1740
- getObject(arg0).postMessage(getObject(arg1));
1741
- }, arguments) };
1742
- imports.wbg.__wbg_instanceof_IdbDatabase_2c9f91b2db322a72 = function(arg0) {
1743
- let result;
1744
- try {
1745
- result = getObject(arg0) instanceof IDBDatabase;
1746
- } catch (_) {
1747
- result = false;
1748
- }
1749
- const ret = result;
1750
- return ret;
1751
- };
1752
- imports.wbg.__wbg_objectStoreNames_2fc72464aff4baed = function(arg0) {
1753
- const ret = getObject(arg0).objectStoreNames;
1754
- return addHeapObject(ret);
1755
- };
1756
- imports.wbg.__wbg_setonversionchange_b1a0928064e9b758 = function(arg0, arg1) {
1757
- getObject(arg0).onversionchange = getObject(arg1);
1758
- };
1759
- imports.wbg.__wbg_close_7bef29d1d5feecdb = function(arg0) {
1760
- getObject(arg0).close();
1761
- };
1762
- imports.wbg.__wbg_createObjectStore_cfb780710dbc3ad2 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1763
- const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2), getObject(arg3));
1764
- return addHeapObject(ret);
1765
- }, arguments) };
1766
- imports.wbg.__wbg_deleteObjectStore_745da9b507613eca = function() { return handleError(function (arg0, arg1, arg2) {
1767
- getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
1768
- }, arguments) };
1769
- imports.wbg.__wbg_transaction_66168ca19ab39a78 = function() { return handleError(function (arg0, arg1, arg2) {
1770
- const ret = getObject(arg0).transaction(getObject(arg1), ["readonly","readwrite","versionchange","readwriteflush","cleanup",][arg2]);
1771
- return addHeapObject(ret);
1772
- }, arguments) };
1773
- imports.wbg.__wbg_keyPath_99296ea462206d00 = function() { return handleError(function (arg0) {
1774
- const ret = getObject(arg0).keyPath;
1775
- return addHeapObject(ret);
1776
- }, arguments) };
1777
- imports.wbg.__wbg_multiEntry_986f6867169805dd = function(arg0) {
1778
- const ret = getObject(arg0).multiEntry;
1779
- return ret;
1780
- };
1781
- imports.wbg.__wbg_unique_3abe1f8c203c19fd = function(arg0) {
1782
- const ret = getObject(arg0).unique;
1783
- return ret;
1784
- };
1785
- imports.wbg.__wbg_count_bb99b5211d93738d = function() { return handleError(function (arg0) {
1786
- const ret = getObject(arg0).count();
1787
- return addHeapObject(ret);
1788
- }, arguments) };
1789
- imports.wbg.__wbg_count_aa9c1d027bfed24b = function() { return handleError(function (arg0, arg1) {
1790
- const ret = getObject(arg0).count(getObject(arg1));
1791
- return addHeapObject(ret);
1792
- }, arguments) };
1793
- imports.wbg.__wbg_get_b51eae1c0542125a = function() { return handleError(function (arg0, arg1) {
1794
- const ret = getObject(arg0).get(getObject(arg1));
1795
- return addHeapObject(ret);
1796
- }, arguments) };
1797
- imports.wbg.__wbg_instanceof_ReadableStreamDefaultReader_742c2b00918b6df9 = function(arg0) {
1798
- let result;
1799
- try {
1800
- result = getObject(arg0) instanceof ReadableStreamDefaultReader;
1801
- } catch (_) {
1802
- result = false;
1803
- }
1804
- const ret = result;
1805
- return ret;
1806
- };
1807
- imports.wbg.__wbg_read_e48a676fb81ea800 = function(arg0) {
1808
- const ret = getObject(arg0).read();
1809
- return addHeapObject(ret);
1810
- };
1811
- imports.wbg.__wbg_cancel_97a2795574a4f522 = function(arg0) {
1812
- const ret = getObject(arg0).cancel();
1813
- return addHeapObject(ret);
1814
- };
1815
- imports.wbg.__wbg_instanceof_SharedWorkerGlobalScope_78edb7d25b55ea60 = function(arg0) {
1816
- let result;
1817
- try {
1818
- result = getObject(arg0) instanceof SharedWorkerGlobalScope;
1819
- } catch (_) {
1820
- result = false;
1821
- }
1822
- const ret = result;
1823
- return ret;
1824
- };
1825
- imports.wbg.__wbg_debug_5a33c41aeac15ee6 = function(arg0) {
1826
- console.debug(getObject(arg0));
1827
- };
1828
- imports.wbg.__wbg_error_09480e4aadca50ad = function(arg0) {
1829
- console.error(getObject(arg0));
1830
- };
1831
- imports.wbg.__wbg_info_c261acb2deacd903 = function(arg0) {
1832
- console.info(getObject(arg0));
1833
- };
1834
- imports.wbg.__wbg_warn_2b3adb99ce26c314 = function(arg0) {
1835
- console.warn(getObject(arg0));
1836
- };
1837
- imports.wbg.__wbg_indexNames_f6708f233630e491 = function(arg0) {
1838
- const ret = getObject(arg0).indexNames;
1839
- return addHeapObject(ret);
1840
- };
1841
- imports.wbg.__wbg_add_534cfd1b901a15b4 = function() { return handleError(function (arg0, arg1) {
1842
- const ret = getObject(arg0).add(getObject(arg1));
1843
- return addHeapObject(ret);
1844
- }, arguments) };
1845
- imports.wbg.__wbg_add_4d2791d6295ba9ec = function() { return handleError(function (arg0, arg1, arg2) {
1846
- const ret = getObject(arg0).add(getObject(arg1), getObject(arg2));
1847
- return addHeapObject(ret);
1848
- }, arguments) };
1849
- imports.wbg.__wbg_clear_324ffb9a7c18a41c = function() { return handleError(function (arg0) {
1850
- const ret = getObject(arg0).clear();
1851
- return addHeapObject(ret);
1852
- }, arguments) };
1853
- imports.wbg.__wbg_count_7b9a7e71c616b931 = function() { return handleError(function (arg0) {
1854
- const ret = getObject(arg0).count();
1855
- return addHeapObject(ret);
1856
- }, arguments) };
1857
- imports.wbg.__wbg_count_89ec71d494623a00 = function() { return handleError(function (arg0, arg1) {
1858
- const ret = getObject(arg0).count(getObject(arg1));
1859
- return addHeapObject(ret);
1860
- }, arguments) };
1861
- imports.wbg.__wbg_createIndex_6d4c3e20ee0f1066 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1862
- const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
1863
- return addHeapObject(ret);
1864
- }, arguments) };
1865
- imports.wbg.__wbg_delete_34764ece57bdc720 = function() { return handleError(function (arg0, arg1) {
1866
- const ret = getObject(arg0).delete(getObject(arg1));
1867
- return addHeapObject(ret);
1868
- }, arguments) };
1869
- imports.wbg.__wbg_deleteIndex_86b1a90a771f3fd2 = function() { return handleError(function (arg0, arg1, arg2) {
1870
- getObject(arg0).deleteIndex(getStringFromWasm0(arg1, arg2));
1871
- }, arguments) };
1872
- imports.wbg.__wbg_get_88b5e79e9daccb9f = function() { return handleError(function (arg0, arg1) {
1873
- const ret = getObject(arg0).get(getObject(arg1));
1874
- return addHeapObject(ret);
1875
- }, arguments) };
1876
- imports.wbg.__wbg_getAll_754dfd3c399e3aa2 = function() { return handleError(function (arg0) {
1877
- const ret = getObject(arg0).getAll();
1878
- return addHeapObject(ret);
1879
- }, arguments) };
1880
- imports.wbg.__wbg_getAll_cf97564e37784cbe = function() { return handleError(function (arg0, arg1) {
1881
- const ret = getObject(arg0).getAll(getObject(arg1));
1882
- return addHeapObject(ret);
1883
- }, arguments) };
1884
- imports.wbg.__wbg_getAll_a97ae2dbaa2373f9 = function() { return handleError(function (arg0, arg1, arg2) {
1885
- const ret = getObject(arg0).getAll(getObject(arg1), arg2 >>> 0);
1886
- return addHeapObject(ret);
1887
- }, arguments) };
1888
- imports.wbg.__wbg_getAllKeys_404d5487a041555d = function() { return handleError(function (arg0) {
1889
- const ret = getObject(arg0).getAllKeys();
1890
- return addHeapObject(ret);
1891
- }, arguments) };
1892
- imports.wbg.__wbg_getAllKeys_0496b6bb8aa48052 = function() { return handleError(function (arg0, arg1) {
1893
- const ret = getObject(arg0).getAllKeys(getObject(arg1));
1894
- return addHeapObject(ret);
1895
- }, arguments) };
1896
- imports.wbg.__wbg_getAllKeys_f676e7c1f7048fee = function() { return handleError(function (arg0, arg1, arg2) {
1897
- const ret = getObject(arg0).getAllKeys(getObject(arg1), arg2 >>> 0);
1898
- return addHeapObject(ret);
1899
- }, arguments) };
1900
- imports.wbg.__wbg_index_c90226e82bd94b45 = function() { return handleError(function (arg0, arg1, arg2) {
1901
- const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
1902
- return addHeapObject(ret);
1903
- }, arguments) };
1904
- imports.wbg.__wbg_openCursor_728ede41c2e2d7ec = function() { return handleError(function (arg0) {
1905
- const ret = getObject(arg0).openCursor();
1906
- return addHeapObject(ret);
1907
- }, arguments) };
1908
- imports.wbg.__wbg_openCursor_8ca06744434102da = function() { return handleError(function (arg0, arg1) {
1909
- const ret = getObject(arg0).openCursor(getObject(arg1));
1910
- return addHeapObject(ret);
1911
- }, arguments) };
1912
- imports.wbg.__wbg_openCursor_3193d7a663a8bc61 = function() { return handleError(function (arg0, arg1, arg2) {
1913
- const ret = getObject(arg0).openCursor(getObject(arg1), ["next","nextunique","prev","prevunique",][arg2]);
1914
- return addHeapObject(ret);
1915
- }, arguments) };
1916
- imports.wbg.__wbg_put_b697dfdbcfb0598f = function() { return handleError(function (arg0, arg1) {
1917
- const ret = getObject(arg0).put(getObject(arg1));
1918
- return addHeapObject(ret);
1919
- }, arguments) };
1920
- imports.wbg.__wbg_put_f83d95662936dee7 = function() { return handleError(function (arg0, arg1, arg2) {
1921
- const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
1922
- return addHeapObject(ret);
1923
- }, arguments) };
1924
- imports.wbg.__wbg_instanceof_Response_e91b7eb7c611a9ae = function(arg0) {
1925
- let result;
1926
- try {
1927
- result = getObject(arg0) instanceof Response;
1928
- } catch (_) {
1929
- result = false;
1930
- }
1931
- const ret = result;
1932
- return ret;
1933
- };
1934
- imports.wbg.__wbg_json_3555ed3b0ef0dcad = function() { return handleError(function (arg0) {
1935
- const ret = getObject(arg0).json();
1936
- return addHeapObject(ret);
1937
- }, arguments) };
1938
- imports.wbg.__wbg_setmultientry_a4c0f50fb1bb8977 = function(arg0, arg1) {
1939
- getObject(arg0).multiEntry = arg1 !== 0;
1940
- };
1941
- imports.wbg.__wbg_setunique_6f46c3f803001492 = function(arg0, arg1) {
1942
- getObject(arg0).unique = arg1 !== 0;
1943
- };
1944
- imports.wbg.__wbg_setautoincrement_56aa89e6d3e15210 = function(arg0, arg1) {
1945
- getObject(arg0).autoIncrement = arg1 !== 0;
1946
- };
1947
- imports.wbg.__wbg_setkeypath_e6a7c50640d3005a = function(arg0, arg1) {
1948
- getObject(arg0).keyPath = getObject(arg1);
1949
- };
1950
- imports.wbg.__wbg_set_b3c7c6d2e5e783d6 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1951
- getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1952
- }, arguments) };
1953
- imports.wbg.__wbg_persist_449ac4ddd01ee63f = function() { return handleError(function (arg0) {
1954
- const ret = getObject(arg0).persist();
1955
- return addHeapObject(ret);
1956
- }, arguments) };
1957
- imports.wbg.__wbg_closed_308162adc3f122f3 = function(arg0) {
1958
- const ret = getObject(arg0).closed;
1959
- return addHeapObject(ret);
1960
- };
1961
- imports.wbg.__wbg_desiredSize_82fd81d4149bca9a = function() { return handleError(function (arg0, arg1) {
1962
- const ret = getObject(arg1).desiredSize;
1963
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1964
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1965
- }, arguments) };
1966
- imports.wbg.__wbg_ready_466364612ddb7cc4 = function(arg0) {
1967
- const ret = getObject(arg0).ready;
1968
- return addHeapObject(ret);
1969
- };
1970
- imports.wbg.__wbg_close_b4499ff2e2550f21 = function(arg0) {
1971
- const ret = getObject(arg0).close();
1972
- return addHeapObject(ret);
1973
- };
1974
- imports.wbg.__wbg_write_8c6e3bf306db71f2 = function(arg0, arg1) {
1975
- const ret = getObject(arg0).write(getObject(arg1));
1976
- return addHeapObject(ret);
1977
- };
1978
- imports.wbg.__wbg_queueMicrotask_48421b3cc9052b68 = function(arg0) {
1979
- const ret = getObject(arg0).queueMicrotask;
1980
- return addHeapObject(ret);
1981
- };
1982
- imports.wbg.__wbg_queueMicrotask_12a30234db4045d3 = function(arg0) {
1983
- queueMicrotask(getObject(arg0));
1984
- };
1985
- imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function(arg0) {
1986
- const ret = clearTimeout(takeObject(arg0));
1987
- return addHeapObject(ret);
1988
- };
1989
- imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function() { return handleError(function (arg0, arg1) {
1990
- const ret = setTimeout(getObject(arg0), arg1);
1991
- return addHeapObject(ret);
1992
- }, arguments) };
1993
- imports.wbg.__wbg_performance_a1b8bde2ee512264 = function(arg0) {
1994
- const ret = getObject(arg0).performance;
1995
- return addHeapObject(ret);
1996
- };
1997
- imports.wbg.__wbg_now_abd80e969af37148 = function(arg0) {
1998
- const ret = getObject(arg0).now();
1999
- return ret;
2000
- };
2001
- imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
2002
- const ret = getObject(arg0).crypto;
2003
- return addHeapObject(ret);
2004
- };
2005
- imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
2006
- const ret = getObject(arg0).process;
2007
- return addHeapObject(ret);
2008
- };
2009
- imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {
2010
- const ret = getObject(arg0).versions;
2011
- return addHeapObject(ret);
2012
- };
2013
- imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {
2014
- const ret = getObject(arg0).node;
2015
- return addHeapObject(ret);
2016
- };
2017
- imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {
2018
- const ret = module.require;
2019
- return addHeapObject(ret);
2020
- }, arguments) };
2021
- imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
2022
- const ret = getObject(arg0).msCrypto;
2023
- return addHeapObject(ret);
2024
- };
2025
- imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
2026
- getObject(arg0).randomFillSync(takeObject(arg1));
2027
- }, arguments) };
2028
- imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
2029
- getObject(arg0).getRandomValues(getObject(arg1));
2030
- }, arguments) };
2031
- imports.wbg.__wbg_get_3baa728f9d58d3f6 = function(arg0, arg1) {
2032
- const ret = getObject(arg0)[arg1 >>> 0];
2033
- return addHeapObject(ret);
2034
- };
2035
- imports.wbg.__wbg_length_ae22078168b726f5 = function(arg0) {
2036
- const ret = getObject(arg0).length;
2037
- return ret;
2038
- };
2039
- imports.wbg.__wbg_new_a220cf903aa02ca2 = function() {
2040
- const ret = new Array();
2041
- return addHeapObject(ret);
2042
- };
2043
- imports.wbg.__wbg_newnoargs_76313bd6ff35d0f2 = function(arg0, arg1) {
2044
- const ret = new Function(getStringFromWasm0(arg0, arg1));
2045
- return addHeapObject(ret);
2046
- };
2047
- imports.wbg.__wbg_new_8608a2b51a5f6737 = function() {
2048
- const ret = new Map();
2049
- return addHeapObject(ret);
2050
- };
2051
- imports.wbg.__wbg_next_de3e9db4440638b2 = function(arg0) {
2052
- const ret = getObject(arg0).next;
2053
- return addHeapObject(ret);
2054
- };
2055
- imports.wbg.__wbg_next_f9cb570345655b9a = function() { return handleError(function (arg0) {
2056
- const ret = getObject(arg0).next();
2057
- return addHeapObject(ret);
2058
- }, arguments) };
2059
- imports.wbg.__wbg_done_bfda7aa8f252b39f = function(arg0) {
2060
- const ret = getObject(arg0).done;
2061
- return ret;
2062
- };
2063
- imports.wbg.__wbg_value_6d39332ab4788d86 = function(arg0) {
2064
- const ret = getObject(arg0).value;
2065
- return addHeapObject(ret);
2066
- };
2067
- imports.wbg.__wbg_iterator_888179a48810a9fe = function() {
2068
- const ret = Symbol.iterator;
2069
- return addHeapObject(ret);
2070
- };
2071
- imports.wbg.__wbg_get_224d16597dbbfd96 = function() { return handleError(function (arg0, arg1) {
2072
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2073
- return addHeapObject(ret);
2074
- }, arguments) };
2075
- imports.wbg.__wbg_call_1084a111329e68ce = function() { return handleError(function (arg0, arg1) {
2076
- const ret = getObject(arg0).call(getObject(arg1));
2077
- return addHeapObject(ret);
2078
- }, arguments) };
2079
- imports.wbg.__wbg_new_525245e2b9901204 = function() {
2080
- const ret = new Object();
2081
- return addHeapObject(ret);
2082
- };
2083
- imports.wbg.__wbg_self_3093d5d1f7bcb682 = function() { return handleError(function () {
2084
- const ret = self.self;
2085
- return addHeapObject(ret);
2086
- }, arguments) };
2087
- imports.wbg.__wbg_window_3bcfc4d31bc012f8 = function() { return handleError(function () {
2088
- const ret = window.window;
2089
- return addHeapObject(ret);
2090
- }, arguments) };
2091
- imports.wbg.__wbg_globalThis_86b222e13bdf32ed = function() { return handleError(function () {
2092
- const ret = globalThis.globalThis;
2093
- return addHeapObject(ret);
2094
- }, arguments) };
2095
- imports.wbg.__wbg_global_e5a3fe56f8be9485 = function() { return handleError(function () {
2096
- const ret = global.global;
2097
- return addHeapObject(ret);
2098
- }, arguments) };
2099
- imports.wbg.__wbg_set_673dda6c73d19609 = function(arg0, arg1, arg2) {
2100
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2101
- };
2102
- imports.wbg.__wbg_from_0791d740a9d37830 = function(arg0) {
2103
- const ret = Array.from(getObject(arg0));
2104
- return addHeapObject(ret);
2105
- };
2106
- imports.wbg.__wbg_isArray_8364a5371e9737d8 = function(arg0) {
2107
- const ret = Array.isArray(getObject(arg0));
2108
- return ret;
2109
- };
2110
- imports.wbg.__wbg_of_4a1c869ef05b4b73 = function(arg0) {
2111
- const ret = Array.of(getObject(arg0));
2112
- return addHeapObject(ret);
2113
- };
2114
- imports.wbg.__wbg_push_37c89022f34c01ca = function(arg0, arg1) {
2115
- const ret = getObject(arg0).push(getObject(arg1));
2116
- return ret;
2117
- };
2118
- imports.wbg.__wbg_instanceof_ArrayBuffer_61dfc3198373c902 = function(arg0) {
2119
- let result;
2120
- try {
2121
- result = getObject(arg0) instanceof ArrayBuffer;
2122
- } catch (_) {
2123
- result = false;
2124
- }
2125
- const ret = result;
2126
- return ret;
2127
- };
2128
- imports.wbg.__wbg_instanceof_Error_69bde193b0cc95e3 = function(arg0) {
2129
- let result;
2130
- try {
2131
- result = getObject(arg0) instanceof Error;
2132
- } catch (_) {
2133
- result = false;
2134
- }
2135
- const ret = result;
2136
- return ret;
2137
- };
2138
- imports.wbg.__wbg_new_796382978dfd4fb0 = function(arg0, arg1) {
2139
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2140
- return addHeapObject(ret);
2141
- };
2142
- imports.wbg.__wbg_cause_a84a2d408263556b = function(arg0) {
2143
- const ret = getObject(arg0).cause;
2144
- return addHeapObject(ret);
2145
- };
2146
- imports.wbg.__wbg_setcause_95acfe0bd827ffdb = function(arg0, arg1) {
2147
- getObject(arg0).cause = getObject(arg1);
2148
- };
2149
- imports.wbg.__wbg_message_e18bae0a0e2c097a = function(arg0) {
2150
- const ret = getObject(arg0).message;
2151
- return addHeapObject(ret);
2152
- };
2153
- imports.wbg.__wbg_name_ac78212e803c7941 = function(arg0) {
2154
- const ret = getObject(arg0).name;
2155
- return addHeapObject(ret);
2156
- };
2157
- imports.wbg.__wbg_toString_9d18e102ca933e68 = function(arg0) {
2158
- const ret = getObject(arg0).toString();
2159
- return addHeapObject(ret);
2160
- };
2161
- imports.wbg.__wbg_call_89af060b4e1523f2 = function() { return handleError(function (arg0, arg1, arg2) {
2162
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2163
- return addHeapObject(ret);
2164
- }, arguments) };
2165
- imports.wbg.__wbg_instanceof_Map_763ce0e95960d55e = function(arg0) {
2166
- let result;
2167
- try {
2168
- result = getObject(arg0) instanceof Map;
2169
- } catch (_) {
2170
- result = false;
2171
- }
2172
- const ret = result;
2173
- return ret;
2174
- };
2175
- imports.wbg.__wbg_set_49185437f0ab06f8 = function(arg0, arg1, arg2) {
2176
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2177
- return addHeapObject(ret);
2178
- };
2179
- imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
2180
- const ret = Number.isSafeInteger(getObject(arg0));
2181
- return ret;
2182
- };
2183
- imports.wbg.__wbg_getTime_91058879093a1589 = function(arg0) {
2184
- const ret = getObject(arg0).getTime();
2185
- return ret;
2186
- };
2187
- imports.wbg.__wbg_new0_65387337a95cf44d = function() {
2188
- const ret = new Date();
2189
- return addHeapObject(ret);
2190
- };
2191
- imports.wbg.__wbg_now_b7a162010a9e75b4 = function() {
2192
- const ret = Date.now();
2193
- return ret;
2194
- };
2195
- imports.wbg.__wbg_entries_7a0e06255456ebcd = function(arg0) {
2196
- const ret = Object.entries(getObject(arg0));
2197
- return addHeapObject(ret);
2198
- };
2199
- imports.wbg.__wbg_new_b85e72ed1bfd57f9 = function(arg0, arg1) {
2200
- try {
2201
- var state0 = {a: arg0, b: arg1};
2202
- var cb0 = (arg0, arg1) => {
2203
- const a = state0.a;
2204
- state0.a = 0;
2205
- try {
2206
- return __wbg_adapter_552(a, state0.b, arg0, arg1);
2207
- } finally {
2208
- state0.a = a;
2209
- }
2210
- };
2211
- const ret = new Promise(cb0);
2212
- return addHeapObject(ret);
2213
- } finally {
2214
- state0.a = state0.b = 0;
2215
- }
2216
- };
2217
- imports.wbg.__wbg_resolve_570458cb99d56a43 = function(arg0) {
2218
- const ret = Promise.resolve(getObject(arg0));
2219
- return addHeapObject(ret);
2220
- };
2221
- imports.wbg.__wbg_catch_a279b1da46d132d8 = function(arg0, arg1) {
2222
- const ret = getObject(arg0).catch(getObject(arg1));
2223
- return addHeapObject(ret);
2224
- };
2225
- imports.wbg.__wbg_then_95e6edc0f89b73b1 = function(arg0, arg1) {
2226
- const ret = getObject(arg0).then(getObject(arg1));
2227
- return addHeapObject(ret);
2228
- };
2229
- imports.wbg.__wbg_then_876bb3c633745cc6 = function(arg0, arg1, arg2) {
2230
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2231
- return addHeapObject(ret);
2232
- };
2233
- imports.wbg.__wbg_buffer_b7b08af79b0b0974 = function(arg0) {
2234
- const ret = getObject(arg0).buffer;
2235
- return addHeapObject(ret);
2236
- };
2237
- imports.wbg.__wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9 = function(arg0, arg1, arg2) {
2238
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2239
- return addHeapObject(ret);
2240
- };
2241
- imports.wbg.__wbg_new_ea1883e1e5e86686 = function(arg0) {
2242
- const ret = new Uint8Array(getObject(arg0));
2243
- return addHeapObject(ret);
2244
- };
2245
- imports.wbg.__wbg_set_d1e79e2388520f18 = function(arg0, arg1, arg2) {
2246
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2247
- };
2248
- imports.wbg.__wbg_length_8339fcf5d8ecd12e = function(arg0) {
2249
- const ret = getObject(arg0).length;
2250
- return ret;
2251
- };
2252
- imports.wbg.__wbg_instanceof_Uint8Array_247a91427532499e = function(arg0) {
2253
- let result;
2254
- try {
2255
- result = getObject(arg0) instanceof Uint8Array;
2256
- } catch (_) {
2257
- result = false;
2258
- }
2259
- const ret = result;
2260
- return ret;
2261
- };
2262
- imports.wbg.__wbg_newwithlength_ec548f448387c968 = function(arg0) {
2263
- const ret = new Uint8Array(arg0 >>> 0);
2264
- return addHeapObject(ret);
2265
- };
2266
- imports.wbg.__wbg_subarray_7c2e3576afe181d1 = function(arg0, arg1, arg2) {
2267
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2268
- return addHeapObject(ret);
2269
- };
2270
- imports.wbg.__wbg_slice_b698b331b2ab7d72 = function(arg0, arg1, arg2) {
2271
- const ret = getObject(arg0).slice(arg1 >>> 0, arg2 >>> 0);
2272
- return addHeapObject(ret);
2273
- };
2274
- imports.wbg.__wbg_byteLength_850664ef28f3e42f = function(arg0) {
2275
- const ret = getObject(arg0).byteLength;
2276
- return ret;
2277
- };
2278
- imports.wbg.__wbg_random_4a6f48b07d1eab14 = typeof Math.random == 'function' ? Math.random : notDefined('Math.random');
2279
- imports.wbg.__wbg_apply_64f7fdc797dfb4f3 = function() { return handleError(function (arg0, arg1, arg2) {
2280
- const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
2281
- return addHeapObject(ret);
2282
- }, arguments) };
2283
- imports.wbg.__wbg_has_4bfbc01db38743f7 = function() { return handleError(function (arg0, arg1) {
2284
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
2285
- return ret;
2286
- }, arguments) };
2287
- imports.wbg.__wbg_set_eacc7d73fefaafdf = function() { return handleError(function (arg0, arg1, arg2) {
2288
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2289
- return ret;
2290
- }, arguments) };
2291
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
2292
- const v = getObject(arg1);
2293
- const ret = typeof(v) === 'bigint' ? v : undefined;
2294
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
2295
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2296
- };
2297
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
2298
- const ret = debugString(getObject(arg1));
2299
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2300
- const len1 = WASM_VECTOR_LEN;
2301
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2302
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2303
- };
2304
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
2305
- throw new Error(getStringFromWasm0(arg0, arg1));
2306
- };
2307
- imports.wbg.__wbindgen_memory = function() {
2308
- const ret = wasm.memory;
2309
- return addHeapObject(ret);
2310
- };
2311
- imports.wbg.__wbindgen_closure_wrapper2148 = function(arg0, arg1, arg2) {
2312
- const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_58);
2313
- return addHeapObject(ret);
2314
- };
2315
- imports.wbg.__wbindgen_closure_wrapper2149 = function(arg0, arg1, arg2) {
2316
- const ret = makeClosure(arg0, arg1, 742, __wbg_adapter_61);
2317
- return addHeapObject(ret);
2318
- };
2319
- imports.wbg.__wbindgen_closure_wrapper2150 = function(arg0, arg1, arg2) {
2320
- const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_64);
2321
- return addHeapObject(ret);
2322
- };
2323
- imports.wbg.__wbindgen_closure_wrapper2153 = function(arg0, arg1, arg2) {
2324
- const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_58);
2325
- return addHeapObject(ret);
2326
- };
2327
- imports.wbg.__wbindgen_closure_wrapper2155 = function(arg0, arg1, arg2) {
2328
- const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_58);
2329
- return addHeapObject(ret);
2330
- };
2331
- imports.wbg.__wbindgen_closure_wrapper4455 = function(arg0, arg1, arg2) {
2332
- const ret = makeMutClosure(arg0, arg1, 1469, __wbg_adapter_71);
2333
- return addHeapObject(ret);
2334
- };
2335
- imports.wbg.__wbindgen_closure_wrapper4515 = function(arg0, arg1, arg2) {
2336
- const ret = makeMutClosure(arg0, arg1, 1474, __wbg_adapter_74);
2337
- return addHeapObject(ret);
2338
- };
2339
- imports.wbg.__wbindgen_closure_wrapper5372 = function(arg0, arg1, arg2) {
2340
- const ret = makeMutClosure(arg0, arg1, 1835, __wbg_adapter_77);
2341
- return addHeapObject(ret);
2342
- };
2343
- imports.wbg.__wbindgen_closure_wrapper5404 = function(arg0, arg1, arg2) {
2344
- const ret = makeMutClosure(arg0, arg1, 1861, __wbg_adapter_80);
2345
- return addHeapObject(ret);
2346
- };
2347
- imports.wbg.__wbindgen_closure_wrapper5405 = function(arg0, arg1, arg2) {
2348
- const ret = makeMutClosure(arg0, arg1, 1861, __wbg_adapter_80);
2349
- return addHeapObject(ret);
2350
- };
2351
- imports.wbg.__wbindgen_closure_wrapper5406 = function(arg0, arg1, arg2) {
2352
- const ret = makeMutClosure(arg0, arg1, 1861, __wbg_adapter_80);
2353
- return addHeapObject(ret);
2354
- };
2355
- imports.wbg.__wbindgen_closure_wrapper7638 = function(arg0, arg1, arg2) {
2356
- const ret = makeMutClosure(arg0, arg1, 2503, __wbg_adapter_87);
2357
- return addHeapObject(ret);
2358
- };
2359
- imports.wbg.__wbindgen_closure_wrapper7746 = function(arg0, arg1, arg2) {
2360
- const ret = makeMutClosure(arg0, arg1, 2563, __wbg_adapter_90);
2361
- return addHeapObject(ret);
2362
- };
2363
-
2364
- return imports;
2365
- }
2366
-
2367
- function __wbg_init_memory(imports, memory) {
2368
-
2369
- }
2370
-
2371
- function __wbg_finalize_init(instance, module) {
2372
- wasm = instance.exports;
2373
- __wbg_init.__wbindgen_wasm_module = module;
2374
- cachedDataViewMemory0 = null;
2375
- cachedUint8ArrayMemory0 = null;
2376
-
2377
-
2378
- wasm.__wbindgen_start();
2379
- return wasm;
2380
- }
2381
-
2382
- function initSync(module) {
2383
- if (wasm !== undefined) return wasm;
2384
-
2385
-
2386
- if (typeof module !== 'undefined' && Object.getPrototypeOf(module) === Object.prototype)
2387
- ({module} = module)
2388
- else
2389
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2390
-
2391
- const imports = __wbg_get_imports();
2392
-
2393
- __wbg_init_memory(imports);
2394
-
2395
- if (!(module instanceof WebAssembly.Module)) {
2396
- module = new WebAssembly.Module(module);
2397
- }
2398
-
2399
- const instance = new WebAssembly.Instance(module, imports);
2400
-
2401
- return __wbg_finalize_init(instance, module);
2402
- }
2403
-
2404
- async function __wbg_init(module_or_path) {
2405
- if (wasm !== undefined) return wasm;
2406
-
2407
-
2408
- if (typeof module_or_path !== 'undefined' && Object.getPrototypeOf(module_or_path) === Object.prototype)
2409
- ({module_or_path} = module_or_path)
2410
- else
2411
- console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2412
-
2413
- if (typeof module_or_path === 'undefined') {
2414
- module_or_path = new URL('lumina_node_wasm_bg.wasm', import.meta.url);
2415
- }
2416
- const imports = __wbg_get_imports();
2417
-
2418
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2419
- module_or_path = fetch(module_or_path);
2420
- }
2421
-
2422
- __wbg_init_memory(imports);
2423
-
2424
- const { instance, module } = await __wbg_load(await module_or_path, imports);
2425
-
2426
- return __wbg_finalize_init(instance, module);
2427
- }
2428
-
2429
- export { initSync };
2430
- export default __wbg_init;
7
+ wasm.__wbindgen_start();